analyse: i_sub_partition write combining
authorHenrik Gramner <henrik@gramner.com>
Sun, 3 Apr 2016 13:49:26 +0000 (15:49 +0200)
committerHenrik Gramner <henrik@gramner.com>
Tue, 12 Apr 2016 15:10:39 +0000 (17:10 +0200)
encoder/analyse.c

index 4a2d8a2..e243fca 100644 (file)
@@ -1543,8 +1543,7 @@ static void x264_mb_analyse_inter_p8x8_mixed_ref( x264_t *h, x264_mb_analysis_t
     if( !h->param.b_cabac && !(a->l0.me8x8[0].i_ref | a->l0.me8x8[1].i_ref |
                                a->l0.me8x8[2].i_ref | a->l0.me8x8[3].i_ref) )
         a->l0.i_cost8x8 -= REF_COST( 0, 0 ) * 4;
-    h->mb.i_sub_partition[0] = h->mb.i_sub_partition[1] =
-    h->mb.i_sub_partition[2] = h->mb.i_sub_partition[3] = D_L0_8x8;
+    M32( h->mb.i_sub_partition ) = D_L0_8x8 * 0x01010101;
 }
 
 static void x264_mb_analyse_inter_p8x8( x264_t *h, x264_mb_analysis_t *a )
@@ -1599,8 +1598,7 @@ static void x264_mb_analyse_inter_p8x8( x264_t *h, x264_mb_analysis_t *a )
      * but 3 seems a better approximation of cabac. */
     if( h->param.b_cabac )
         a->l0.i_cost8x8 -= i_ref_cost;
-    h->mb.i_sub_partition[0] = h->mb.i_sub_partition[1] =
-    h->mb.i_sub_partition[2] = h->mb.i_sub_partition[3] = D_L0_8x8;
+    M32( h->mb.i_sub_partition ) = D_L0_8x8 * 0x01010101;
 }
 
 static void x264_mb_analyse_inter_p16x8( x264_t *h, x264_mb_analysis_t *a, int i_best_satd )
@@ -3383,8 +3381,7 @@ skip_analysis:
                 }
                 else if( i_partition == D_16x8 )
                 {
-                    h->mb.i_sub_partition[0] = h->mb.i_sub_partition[1] =
-                    h->mb.i_sub_partition[2] = h->mb.i_sub_partition[3] = D_L0_8x8;
+                    M32( h->mb.i_sub_partition ) = D_L0_8x8 * 0x01010101;
                     x264_macroblock_cache_ref( h, 0, 0, 4, 2, 0, analysis.l0.me16x8[0].i_ref );
                     x264_macroblock_cache_ref( h, 0, 2, 4, 2, 0, analysis.l0.me16x8[1].i_ref );
                     x264_me_refine_qpel_rd( h, &analysis.l0.me16x8[0], analysis.i_lambda2, 0, 0 );
@@ -3392,8 +3389,7 @@ skip_analysis:
                 }
                 else if( i_partition == D_8x16 )
                 {
-                    h->mb.i_sub_partition[0] = h->mb.i_sub_partition[1] =
-                    h->mb.i_sub_partition[2] = h->mb.i_sub_partition[3] = D_L0_8x8;
+                    M32( h->mb.i_sub_partition ) = D_L0_8x8 * 0x01010101;
                     x264_macroblock_cache_ref( h, 0, 0, 2, 4, 0, analysis.l0.me8x16[0].i_ref );
                     x264_macroblock_cache_ref( h, 2, 0, 2, 4, 0, analysis.l0.me8x16[1].i_ref );
                     x264_me_refine_qpel_rd( h, &analysis.l0.me8x16[0], analysis.i_lambda2, 0, 0 );