[FFmpeg-devel] [PATCH] avcodec/libaomenc: remove the experimental flag when using libaom 2.0.0 or newer

James Almer jamrial at gmail.com
Wed May 27 04:32:18 EEST 2020


Signed-off-by: James Almer <jamrial at gmail.com>
---
Alternatively, we could remove support for libaom 1.0.0, since it's pretty much
unusable. But unfortunately both current Debian Stable and latest Ubuntu LTS
ship it, so i'm not sure if it would be wise.

Any opinions?

 libavcodec/libaomenc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index fc1ea96659..d26083a426 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -1055,6 +1055,9 @@ static av_cold void av1_init_static(AVCodec *codec)
         codec->pix_fmts = av1_pix_fmts_highbd;
     else
         codec->pix_fmts = av1_pix_fmts;
+
+    if (aom_codec_version_major() < 2)
+        codec->capabilities |= AV_CODEC_CAP_EXPERIMENTAL;
 }
 
 static av_cold int av1_init(AVCodecContext *avctx)
@@ -1131,7 +1134,7 @@ AVCodec ff_libaom_av1_encoder = {
     .init           = av1_init,
     .encode2        = aom_encode,
     .close          = aom_free,
-    .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS | AV_CODEC_CAP_EXPERIMENTAL,
+    .capabilities   = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,
     .profiles       = NULL_IF_CONFIG_SMALL(ff_av1_profiles),
     .priv_class     = &class_aom,
     .defaults       = defaults,
-- 
2.26.2



More information about the ffmpeg-devel mailing list