[FFmpeg-cvslog] libx264: change i_qfactor to use x264cli's default

John Van Sickle git at videolan.org
Sun Feb 24 14:09:58 CET 2013


ffmpeg | branch: master | John Van Sickle <john.vansickle at gmail.com> | Tue Sep 25 12:29:22 2012 -0400| [2f325a6fd4421c4dd4e26d7065e5d4bf26ed52f2] | committer: Anton Khirnov

libx264: change i_qfactor to use x264cli's default

This also allows libx264 to modify its i_qfactor value
when using the "-tune" setting. Previously it had a static
value of 1.25

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f325a6fd4421c4dd4e26d7065e5d4bf26ed52f2
---

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

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 1792662..bb92110 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -279,7 +279,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
             (float)avctx->rc_initial_buffer_occupancy / avctx->rc_buffer_size;
     }
 
-    x4->params.rc.f_ip_factor             = 1 / fabs(avctx->i_quant_factor);
+    if (avctx->i_quant_factor > 0)
+        x4->params.rc.f_ip_factor         = 1 / fabs(avctx->i_quant_factor);
     x4->params.rc.f_pb_factor             = avctx->b_quant_factor;
     x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
 
@@ -559,6 +560,7 @@ static const AVCodecDefault x264_defaults[] = {
     { "b",                "0" },
     { "bf",               "-1" },
     { "g",                "-1" },
+    { "i_qfactor",        "-1" },
     { "qmin",             "-1" },
     { "qmax",             "-1" },
     { "qdiff",            "-1" },



More information about the ffmpeg-cvslog mailing list