summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Andrade <dario@ip.tv>2005-09-14 21:05:24 +0000
committerMåns Rullgård <mans@mansr.com>2005-09-14 21:05:24 +0000
commit18ae520b72390694c75c0f8dd34a4f14827b99a6 (patch)
treef1059c228f68fa0a206555ee40f51aaa025528ca
parent9fcfac15bafc9ff19a56d09e5a029f04608c6c5b (diff)
set more x264 encoding parameters
patch by Dario Andrade <dario at ip tv> Originally committed as revision 4594 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/x264.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/x264.c b/libavcodec/x264.c
index df5df9810a..b2e922f0a7 100644
--- a/libavcodec/x264.c
+++ b/libavcodec/x264.c
@@ -135,6 +135,7 @@ X264_init(AVCodecContext *avctx)
x4->params.i_keyint_max = avctx->gop_size;
x4->params.rc.i_bitrate = avctx->bit_rate / 1000;
x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000;
+ x4->params.rc.i_vbv_max_bitrate = avctx->rc_max_rate / 1000;
if(avctx->rc_buffer_size)
x4->params.rc.b_cbr = 1;
x4->params.i_bframe = avctx->max_b_frames;
@@ -144,6 +145,9 @@ X264_init(AVCodecContext *avctx)
x4->params.rc.i_qp_max = avctx->qmax;
x4->params.rc.i_qp_step = avctx->max_qdiff;
+ x4->params.rc.f_qcompress = avctx->qcompress; /* 0.0 => cbr, 1.0 => constant qp */
+ x4->params.rc.f_qblur = avctx->qblur; /* temporally blur quants */
+
if(avctx->flags & CODEC_FLAG_QSCALE && avctx->global_quality > 0)
x4->params.rc.i_qp_constant =
12 + 6 * log2((double) avctx->global_quality / FF_QP2LAMBDA);