aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2020-07-01 19:53:54 -0700
committerJames Zern <jzern@google.com>2020-07-08 10:12:27 -0700
commitd294716c22c827d889dde235a8e9fcd4dd6466c9 (patch)
tree3ef8b015bec685836919fd6a004f8e9491b5f9e3 /libavcodec
parentf9277cd796575c075cbf7c5bacd1c25ab86f5758 (diff)
downloadffmpeg-d294716c22c827d889dde235a8e9fcd4dd6466c9.tar.gz
avcodec/libaomenc: fix build w/libaom v1.0.0
broken since: aa5c6f382b avcodec/libaomenc: Add command-line options to control the use of partition tools Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: James Zern <jzern@google.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libaomenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index cb6558476c..2ecb3de3a7 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -145,6 +145,7 @@ static const char *const ctlidstr[] = {
#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",
@@ -155,6 +156,7 @@ static const char *const ctlidstr[] = {
[AV1E_SET_ENABLE_PAETH_INTRA] = "AV1E_SET_ENABLE_PAETH_INTRA",
[AV1E_SET_ENABLE_SMOOTH_INTRA] = "AV1E_SET_ENABLE_SMOOTH_INTRA",
[AV1E_SET_ENABLE_PALETTE] = "AV1E_SET_ENABLE_PALETTE",
+#endif
};
static av_cold void log_encoder_error(AVCodecContext *avctx, const char *desc)
@@ -718,6 +720,7 @@ 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)
@@ -738,6 +741,7 @@ static av_cold int aom_init(AVCodecContext *avctx,
codecctl_int(avctx, AV1E_SET_ENABLE_SMOOTH_INTRA, ctx->enable_smooth_intra);
if (ctx->enable_palette >= 0)
codecctl_int(avctx, AV1E_SET_ENABLE_PALETTE, ctx->enable_palette);
+#endif
codecctl_int(avctx, AOME_SET_STATIC_THRESHOLD, ctx->static_thresh);
if (ctx->crf >= 0)