[x264-devel] commit: Fix off-by-one error in slice VBV predictor updates ( Jason Garrett-Glaser )

git at videolan.org git at videolan.org
Thu Jul 15 04:08:42 CEST 2010


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Thu Jul  8 16:20:48 2010 -0700| [d6228aea4f0adf29be8526b8ce1d9d1237d23975] | committer: Jason Garrett-Glaser 

Fix off-by-one error in slice VBV predictor updates

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=d6228aea4f0adf29be8526b8ce1d9d1237d23975
---

 encoder/ratecontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
index a2c4cfe..8d0b7ae 100644
--- a/encoder/ratecontrol.c
+++ b/encoder/ratecontrol.c
@@ -2292,7 +2292,7 @@ void x264_threads_merge_ratecontrol( x264_t *h )
                 size += h->fdec->i_row_satd[row];
             int bits = t->stat.frame.i_mv_bits + t->stat.frame.i_tex_bits + t->stat.frame.i_misc_bits;
             int mb_count = (t->i_threadslice_end - t->i_threadslice_start) * h->mb.i_mb_width;
-            update_predictor( &rc->pred[h->sh.i_type+5*i], qp2qscale( rct->qpa_rc/mb_count ), size, bits );
+            update_predictor( &rc->pred[h->sh.i_type+(i+1)*5], qp2qscale( rct->qpa_rc/mb_count ), size, bits );
         }
         if( !i )
             continue;



More information about the x264-devel mailing list