diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-09 18:50:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-09 18:50:00 +0200 |
commit | 73e0ec2ff453799e361c67395b93df11986609b3 (patch) | |
tree | ca15a7133e9363a9d2b6bfa525d8538266a9bf9a /libavcodec/ratecontrol.c | |
parent | ed14517c234299387d401959c6037f25e0937f02 (diff) | |
download | ffmpeg-73e0ec2ff453799e361c67395b93df11986609b3.tar.gz |
rc: finetune convergence failure fix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 1c29dbde4b..d085f04113 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -866,7 +866,7 @@ static int init_pass2(MpegEncContext *s) assert(filter_size%2==1); /* fixed I/B QP relative to P mode */ - for(i=0; i<rcc->num_entries; i++){ + for(i=FFMAX(0, rcc->num_entries-300); i<rcc->num_entries; i++){ RateControlEntry *rce= &rcc->entry[i]; qscale[i]= get_diff_limited_q(s, rce, qscale[i]); |