]> granicus.if.org Git - libx264/commitdiff
increase the alignment of the i8x8 edge cache, needed for sse2 intra prediction.
authorLoren Merritt <pengvado@akuvian.org>
Mon, 3 Mar 2008 00:27:38 +0000 (17:27 -0700)
committerLoren Merritt <pengvado@akuvian.org>
Mon, 3 Mar 2008 00:27:38 +0000 (17:27 -0700)
patch by Alexander Strange.

encoder/analyse.c
encoder/macroblock.c
encoder/slicetype.c
tools/checkasm.c

index 109c436077cc8b2a230c70e1e9ed7a13572afe96..2b3ec7e23bed210164b21d451497fc2b69a74202 100644 (file)
@@ -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;
index 30471f91f2307435d4cce161e83ca38d8010683b..67bc2d83b04bb7932911b4dc16befc4b31755a8a 100644 (file)
@@ -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++ )
         {
index f3faa5da625936ea3dab2a3f81959a7b47858266..b0e6359ab5aaf2e4eda3175744a00ca1943cf4a3 100644 (file)
@@ -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++ )
             {
index 102f2bfa99add91936fa65f7855a3bdce65342f3..4fbc6a34aad790cd91d67813a11b53d155cec16a 100644 (file)
@@ -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];