From: Michael Stuurman Date: Thu, 31 Mar 2011 20:45:22 +0000 (-0700) Subject: Fix bug in intra-refresh ratecontrol X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=86d1963f69b192037373d69aea5ede7fd6c352db;p=x264.git Fix bug in intra-refresh ratecontrol Row SATDs were slightly incorrect. --- diff --git a/encoder/slicetype.c b/encoder/slicetype.c index 1e0c80a9..df20fcf6 100644 --- a/encoder/slicetype.c +++ b/encoder/slicetype.c @@ -1653,7 +1653,7 @@ int x264_rc_analyse_slice( x264_t *h ) int ip_factor = 256 * h->param.rc.f_ip_factor; /* fix8 */ for( int y = 0; y < h->mb.i_mb_height; y++ ) { - int mb_xy = y * h->mb.i_mb_stride; + int mb_xy = y * h->mb.i_mb_stride + h->fdec->i_pir_start_col; for( int x = h->fdec->i_pir_start_col; x <= h->fdec->i_pir_end_col; x++, mb_xy++ ) { int intra_cost = (h->fenc->i_intra_cost[mb_xy] * ip_factor + 128) >> 8;