From: Jason Garrett-Glaser Date: Thu, 8 Jul 2010 23:20:48 +0000 (-0700) Subject: Fix off-by-one error in slice VBV predictor updates X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=d6228aea4f0adf29be8526b8ce1d9d1237d23975;p=x264.git Fix off-by-one error in slice VBV predictor updates --- diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c index a2c4cfed..8d0b7ae3 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;