]> git.sesse.net Git - x264/commitdiff
Fix bug in intra-refresh ratecontrol
authorMichael Stuurman <michael.stuurman@gmail.com>
Thu, 31 Mar 2011 20:45:22 +0000 (13:45 -0700)
committerFiona Glaser <fiona@x264.com>
Tue, 12 Apr 2011 08:37:29 +0000 (01:37 -0700)
Row SATDs were slightly incorrect.

encoder/slicetype.c

index 01dcb671caf001e019553875aaec90ec2438830c..6bef0fba68a059b3eca4687d107d431d0f2664e0 100644 (file)
@@ -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;