1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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@khirnov.net>
This commit is contained in:
John Van Sickle 2012-09-25 12:29:22 -04:00 committed by Anton Khirnov
parent d8a74d1d95
commit 2f325a6fd4

View File

@ -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" },