From d6228aea4f0adf29be8526b8ce1d9d1237d23975 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Thu, 8 Jul 2010 16:20:48 -0700 Subject: [PATCH] Fix off-by-one error in slice VBV predictor updates --- encoder/ratecontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3