diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-09 18:06:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-09 18:06:51 +0200 |
commit | ed14517c234299387d401959c6037f25e0937f02 (patch) | |
tree | 9f5c21107d7ca7372bd6acbbc4f63a2a5759309f /libavcodec/ratecontrol.c | |
parent | bcef876f168ce8e0263f018f45b8f88ce4dba623 (diff) | |
download | ffmpeg-ed14517c234299387d401959c6037f25e0937f02.tar.gz |
rc: fix convergence failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index af8289e312..1c29dbde4b 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -866,6 +866,12 @@ 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++){ + RateControlEntry *rce= &rcc->entry[i]; + + qscale[i]= get_diff_limited_q(s, rce, qscale[i]); + } + for(i=rcc->num_entries-1; i>=0; i--){ RateControlEntry *rce= &rcc->entry[i]; |