diff options
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r-- | libavcodec/libx264.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 2e0404d490..a394213680 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -286,7 +286,6 @@ static av_cold int X264_init(AVCodecContext *avctx) x4->params.b_deblocking_filter = avctx->flags & CODEC_FLAG_LOOP_FILTER; - 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; if (x4->preset || x4->tune) @@ -357,6 +356,9 @@ 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->me_method == ME_EPZS) x4->params.analyse.i_me_method = X264_ME_DIA; else if (avctx->me_method == ME_HEX) @@ -693,6 +695,7 @@ static const AVCodecDefault x264_defaults[] = { { "bf", "-1" }, { "flags2", "0" }, { "g", "-1" }, + { "i_qfactor", "-1" }, { "qmin", "-1" }, { "qmax", "-1" }, { "qdiff", "-1" }, |