[FFmpeg-cvslog] libx264: fix -b_qfactor and -chromaoffset

Hii git at videolan.org
Tue Aug 26 20:14:53 CEST 2014


ffmpeg | branch: master | Hii <hiiragikei at gmail.com> | Tue Aug 26 14:55:14 2014 +0800| [604c4eab2bf633ad4583cbb7b0efb5d1f010c8ee] | committer: Michael Niedermayer

libx264: fix -b_qfactor and -chromaoffset

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/libx264.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 7793581..8830f59 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -371,8 +371,6 @@ static av_cold int X264_init(AVCodecContext *avctx)
 
     x4->params.b_deblocking_filter         = avctx->flags & CODEC_FLAG_LOOP_FILTER;
 
-    x4->params.rc.f_pb_factor             = avctx->b_quant_factor;
-    x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
     if (x4->preset || x4->tune)
         if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) < 0) {
             int i;
@@ -430,6 +428,10 @@ static av_cold int X264_init(AVCodecContext *avctx)
 
     if (avctx->i_quant_factor > 0)
         x4->params.rc.f_ip_factor         = 1 / fabs(avctx->i_quant_factor);
+    if (avctx->b_quant_factor > 0)
+        x4->params.rc.f_pb_factor         = avctx->b_quant_factor;
+    if (avctx->chromaoffset)
+        x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
 
     if (avctx->me_method == ME_EPZS)
         x4->params.analyse.i_me_method = X264_ME_DIA;
@@ -827,6 +829,7 @@ static const AVCodecDefault x264_defaults[] = {
     { "flags2",           "0" },
     { "g",                "-1" },
     { "i_qfactor",        "-1" },
+    { "b_qfactor",        "-1" },
     { "qmin",             "-1" },
     { "qmax",             "-1" },
     { "qdiff",            "-1" },



More information about the ffmpeg-cvslog mailing list