diff options
author | Baptiste Coudurier <baptiste.coudurier@smartjog.com> | 2008-11-29 14:08:48 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2008-11-29 14:08:48 +0000 |
commit | 3bff4d8b7a9342e795c925ebab407cead2b9b54e (patch) | |
tree | 3c0aa9012cba95c2f5543d7b6334821bc908496c /libavcodec/mpegvideo_enc.c | |
parent | cd0e37d3b16c403d922857ffb7df35ed6e89e50d (diff) | |
download | ffmpeg-3bff4d8b7a9342e795c925ebab407cead2b9b54e.tar.gz |
Implement the fields rc_max_available_vbv_use and
rc_min_vbv_overflow_use in AVCodecContext, and use their values in the
ratecontrol code rather than hardcoded ones.
See the thread: "[RFC] ratecontrol buffer size magic".
Patch by Baptiste Coudurier.
Originally committed as revision 15955 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r-- | libavcodec/mpegvideo_enc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 49546e7b87..ae00b02684 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1231,7 +1231,7 @@ vbv_retry: if(avctx->rc_buffer_size){ RateControlContext *rcc= &s->rc_context; - int max_size= rcc->buffer_index/3; + int max_size= rcc->buffer_index * avctx->rc_max_available_vbv_use; if(put_bits_count(&s->pb) > max_size && s->lambda < s->avctx->lmax){ s->next_lambda= FFMAX(s->lambda+1, s->lambda*(s->qscale+1) / s->qscale); |