v2.0.0 is already four years old and available on stable distro releases.
With this we stop setting codec capabilities during static data initialization.
Signed-off-by: James Almer
---
configure | 2 +-
libavcodec/libaomenc.c | 42 --
2 files changed, 1 insertion(+), 43 deletions(-)
diff --git a/configure b/configure
index 493fe3cffd..f511fbae49 100755
--- a/configure
+++ b/configure
@@ -6834,7 +6834,7 @@ enabled gnutls&& require_pkg_config gnutls
gnutls gnutls/gnutls.h gn
enabled jni && { [ $target_os = "android" ] && check_headers
jni.h && enabled pthreads || die "ERROR: jni not found"; }
enabled ladspa&& require_headers "ladspa.h dlfcn.h"
enabled lcms2 && require_pkg_config lcms2 "lcms2 >= 2.13" lcms2.h
cmsCreateContext
-enabled libaom&& require_pkg_config libaom "aom >= 1.0.0"
aom/aom_codec.h aom_codec_version
+enabled libaom&& require_pkg_config libaom "aom >= 2.0.0"
aom/aom_codec.h aom_codec_version
enabled libaribb24&& { check_pkg_config libaribb24 "aribb24 > 1.0.3"
"aribb24/aribb24.h" arib_instance_new ||
{ enabled gpl && require_pkg_config libaribb24
aribb24 "aribb24/aribb24.h" arib_instance_new; } ||
die "ERROR: libaribb24 requires version higher
than 1.0.3 or --enable-gpl."; }
diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index d660afab4e..d2bdb622e0 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -155,27 +155,14 @@ static const char *const ctlidstr[] = {
[AV1E_SET_TILE_COLUMNS] = "AV1E_SET_TILE_COLUMNS",
[AV1E_SET_TILE_ROWS]= "AV1E_SET_TILE_ROWS",
[AV1E_SET_ENABLE_RESTORATION] = "AV1E_SET_ENABLE_RESTORATION",
-#ifdef AOM_CTRL_AV1E_SET_ROW_MT
[AV1E_SET_ROW_MT] = "AV1E_SET_ROW_MT",
-#endif
-#ifdef AOM_CTRL_AV1E_SET_DENOISE_NOISE_LEVEL
[AV1E_SET_DENOISE_NOISE_LEVEL] = "AV1E_SET_DENOISE_NOISE_LEVEL",
-#endif
-#ifdef AOM_CTRL_AV1E_SET_DENOISE_BLOCK_SIZE
[AV1E_SET_DENOISE_BLOCK_SIZE] = "AV1E_SET_DENOISE_BLOCK_SIZE",
-#endif
-#ifdef AOM_CTRL_AV1E_SET_MAX_REFERENCE_FRAMES
[AV1E_SET_MAX_REFERENCE_FRAMES] = "AV1E_SET_MAX_REFERENCE_FRAMES",
-#endif
-#ifdef AOM_CTRL_AV1E_SET_ENABLE_GLOBAL_MOTION
[AV1E_SET_ENABLE_GLOBAL_MOTION] = "AV1E_SET_ENABLE_GLOBAL_MOTION",
-#endif
-#ifdef AOM_CTRL_AV1E_SET_ENABLE_INTRABC
[AV1E_SET_ENABLE_INTRABC] = "AV1E_SET_ENABLE_INTRABC",
-#endif
[AV1E_SET_ENABLE_CDEF] = "AV1E_SET_ENABLE_CDEF",
[AOME_SET_TUNING] = "AOME_SET_TUNING",
-#if AOM_ENCODER_ABI_VERSION >= 22
[AV1E_SET_ENABLE_1TO4_PARTITIONS] = "AV1E_SET_ENABLE_1TO4_PARTITIONS",
[AV1E_SET_ENABLE_AB_PARTITIONS] = "AV1E_SET_ENABLE_AB_PARTITIONS",
[AV1E_SET_ENABLE_RECT_PARTITIONS] = "AV1E_SET_ENABLE_RECT_PARTITIONS",
@@ -204,13 +191,10 @@ static const char *const ctlidstr[] = {
[AV1E_SET_REDUCED_REFERENCE_SET]= "AV1E_SET_REDUCED_REFERENCE_SET",
[AV1E_SET_ENABLE_SMOOTH_INTERINTRA] = "AV1E_SET_ENABLE_SMOOTH_INTERINTRA",
[AV1E_SET_ENABLE_REF_FRAME_MVS] = "AV1E_SET_ENABLE_REF_FRAME_MVS",
-#endif
#ifdef AOM_CTRL_AV1E_GET_NUM_OPERATING_POINTS
[AV1E_GET_NUM_OPERATING_POINTS] = "AV1E_GET_NUM_OPERATING_POINTS",
#endif
-#ifdef AOM_CTRL_AV1E_GET_SEQ_LEVEL_IDX
[AV1E_GET_SEQ_LEVEL_IDX]= "AV1E_GET_SEQ_LEVEL_IDX",
-#endif
#ifdef AOM_CTRL_AV1E_GET_TARGET_SEQ_LEVEL_IDX
[AV1E_GET_TARGET_SEQ_LEVEL_IDX] = "AV1E_GET_TARGET_SEQ_LEVEL_IDX",
#endif
@@ -691,12 +675,9 @@ static av_cold int aom_init(AVCodecContext *avctx,
AOMContext *ctx = avctx->priv_data;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
struct aom_codec_enc_cfg enccfg = { 0 };
-#ifdef AOM_FRAME_IS_INTRAONLY
aom_codec_flags_t flags =
(avctx->flags & AV_CODEC_FLAG_PSNR) ? AOM_CODEC_USE_PSNR : 0;
-#else
aom_codec_flags_t flags = 0;
-#endif
AVCPBProperties *cpb_props;
int res;
aom_img_fmt_t img_fmt;
@@ -886,7 +867,6 @@ static av_cold int aom_init(AVCodecContext *avctx,
codecctl_int(avctx, AV1E_SET_ENABLE_CDEF, ctx->enable_cdef);
if (ctx->enable_restoration >= 0)
codecctl_int(avctx, AV1E_SET_ENABLE_RESTORATION,
ctx->enable_restoration);
-#if AOM_ENCODER_ABI_VERSION >= 22
if (ctx->enable_rect_partitions >= 0)
codecctl_int(avctx, AV1E_SET_ENABLE_RECT_PARTITIONS,
ctx->enable_rect_partitions);
if (ctx->enable_1to4_partitions >= 0)
@@ -943,7 +923,6 @@ static av_cold int aom_init(AVCodecContext *avctx,
codecctl_int(avctx, AV1E_SET_ENABLE_ONESIDED_COMP,
ctx->enable_onesided_comp);
if (ctx->enable_smooth_interintra >= 0)
codecctl_int(avctx, AV1E_SET_ENABLE_SMOOTH_INTERINTRA,
ctx->enable_smooth_interintra);
-#endif
codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh);
if (ctx->crf >= 0)
@@ -972,31 +951,19 @@ static