[FFmpeg-cvslog] rc: fix convergence failure

Michael Niedermayer git at videolan.org
Wed Sep 21 21:08:30 CEST 2011


ffmpeg | branch: release/0.8 | Michael Niedermayer <michaelni at gmx.at> | Fri Sep  9 18:06:51 2011 +0200| [4fbc35cd537a7629735badd5fe56f09138d6af93] | committer: Michael Niedermayer

rc: fix convergence failure

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit ed14517c234299387d401959c6037f25e0937f02)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fbc35cd537a7629735badd5fe56f09138d6af93
---

 libavcodec/ratecontrol.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 6874fc7..bd42d72 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];
 



More information about the ffmpeg-cvslog mailing list