From 24f25b6afd21488a93bd86098f98dfaf229fc149 Mon Sep 17 00:00:00 2001 From: Henrik Gramner Date: Sun, 3 Apr 2016 15:49:26 +0200 Subject: [PATCH] analyse: i_sub_partition write combining --- encoder/analyse.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/encoder/analyse.c b/encoder/analyse.c index 4a2d8a2f..e243fca6 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -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 ); -- 2.39.2