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

encoder/slicetype.c

index 1e0c80a98b2b328fee169acd9298df53e571e24f..df20fcf6834b44d35f214f810b2cdeb6165af1c1 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;