]> git.sesse.net Git - ffmpeg/commitdiff
Change libaom default to crf=32.
authorelliottk <elliottk@google.com>
Wed, 21 Aug 2019 19:18:20 +0000 (12:18 -0700)
committerJames Zern <jzern@google.com>
Fri, 23 Aug 2019 17:56:34 +0000 (10:56 -0700)
Current default is 256kbps, which produces inconsistent
results (too high for low-res, too low for hi-res).
Use CRF instead, which will adapt.

Signed-off-by: James Zern <jzern@google.com>
libavcodec/libaomenc.c
libavcodec/version.h

index 9b4fb3b4eba27476054edb08f4b31b995485e451..7f47707a097ccfa010568ebb4bf9625efcebaa9b 100644 (file)
@@ -575,10 +575,11 @@ static av_cold int aom_init(AVCodecContext *avctx,
         if (enccfg.rc_end_usage == AOM_CQ) {
             enccfg.rc_target_bitrate = 1000000;
         } else {
-            avctx->bit_rate = enccfg.rc_target_bitrate * 1000;
+            enccfg.rc_end_usage = AOM_Q;
+            ctx->crf = 32;
             av_log(avctx, AV_LOG_WARNING,
-                   "Neither bitrate nor constrained quality specified, using default bitrate of %dkbit/sec\n",
-                   enccfg.rc_target_bitrate);
+                   "Neither bitrate nor constrained quality specified, using default CRF of %d\n",
+                   ctx->crf);
         }
     }
 
@@ -1091,7 +1092,7 @@ static const AVOption options[] = {
 };
 
 static const AVCodecDefault defaults[] = {
-    { "b",          "256*1000" },
+    { "b",                 "0" },
     { "qmin",             "-1" },
     { "qmax",             "-1" },
     { "g",                "-1" },
index 43c8cdb59f9d63bd9c29b2f9551db52e23a2e4f0..e70ebc0c70d65ddbe3d16693b5f6c40f1032a0b5 100644 (file)
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR  58
 #define LIBAVCODEC_VERSION_MINOR  55
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \