From: Loren Merritt Date: Mon, 3 Mar 2008 00:27:38 +0000 (-0700) Subject: increase the alignment of the i8x8 edge cache, needed for sse2 intra prediction. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d5beaee8325c2788f17a632558759ec95ec76e6;p=libx264 increase the alignment of the i8x8 edge cache, needed for sse2 intra prediction. patch by Alexander Strange. --- diff --git a/encoder/analyse.c b/encoder/analyse.c index 109c4360..2b3ec7e2 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -582,7 +582,7 @@ static void x264_mb_analyse_intra( x264_t *h, x264_mb_analysis_t *a, int i_satd_ /* 8x8 prediction selection */ if( flags & X264_ANALYSE_I8x8 ) { - DECLARE_ALIGNED( uint8_t, edge[33], 8 ); + DECLARE_ALIGNED( uint8_t, edge[33], 16 ); x264_pixel_cmp_t sa8d = (*h->pixf.mbcmp == *h->pixf.sad) ? h->pixf.sad[PIXEL_8x8] : h->pixf.sa8d[PIXEL_8x8]; int i_satd_thresh = a->b_mbrd ? COST_MAX : X264_MIN( i_satd_inter, a->i_satd_i16x16 ); int i_cost = 0; @@ -836,7 +836,7 @@ static void x264_intra_rd_refine( x264_t *h, x264_mb_analysis_t *a ) } else if( h->mb.i_type == I_8x8 ) { - DECLARE_ALIGNED( uint8_t, edge[33], 8 ); + DECLARE_ALIGNED( uint8_t, edge[33], 16 ); for( idx = 0; idx < 4; idx++ ) { uint64_t pels_h = 0; diff --git a/encoder/macroblock.c b/encoder/macroblock.c index 30471f91..67bc2d83 100644 --- a/encoder/macroblock.c +++ b/encoder/macroblock.c @@ -366,7 +366,7 @@ void x264_macroblock_encode( x264_t *h ) } else if( h->mb.i_type == I_8x8 ) { - DECLARE_ALIGNED( uint8_t, edge[33], 8 ); + DECLARE_ALIGNED( uint8_t, edge[33], 16 ); h->mb.b_transform_8x8 = 1; for( i = 0; i < 4; i++ ) { diff --git a/encoder/slicetype.c b/encoder/slicetype.c index f3faa5da..b0e6359a 100644 --- a/encoder/slicetype.c +++ b/encoder/slicetype.c @@ -218,7 +218,7 @@ lowres_intra_mb: if( i_icost < i_bcost * 2 ) { - DECLARE_ALIGNED( uint8_t, edge[33], 8 ); + DECLARE_ALIGNED( uint8_t, edge[33], 16 ); x264_predict_8x8_filter( pix, edge, ALL_NEIGHBORS, ALL_NEIGHBORS ); for( i=3; i<9; i++ ) { diff --git a/tools/checkasm.c b/tools/checkasm.c index 102f2bfa..4fbc6a34 100644 --- a/tools/checkasm.c +++ b/tools/checkasm.c @@ -33,7 +33,7 @@ static int check_pixel( int cpu_ref, int cpu_new ) x264_predict_t predict_8x8c[4+3]; x264_predict_t predict_4x4[9+3]; x264_predict8x8_t predict_8x8[9+3]; - DECLARE_ALIGNED( uint8_t, edge[33], 8 ); + DECLARE_ALIGNED( uint8_t, edge[33], 16 ); uint16_t cost_mv[32]; int ret = 0, ok, used_asm; int i, j; @@ -737,7 +737,7 @@ static int check_intra( int cpu_ref, int cpu_new ) { int ret = 0, ok = 1, used_asm = 0; int i; - DECLARE_ALIGNED( uint8_t, edge[33], 8 ); + DECLARE_ALIGNED( uint8_t, edge[33], 16 ); struct { x264_predict_t predict_16x16[4+3];