[x264-devel] commit: increase the alignment of the i8x8 edge cache, needed for sse2 intra prediction. (Loren Merritt )

git version control git at videolan.org
Mon Mar 3 01:30:02 CET 2008


x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Sun Mar  2 17:27:38 2008 -0700| [6e55e8a729d59130f479f22ea5d53852b1ae2e1f]

increase the alignment of the i8x8 edge cache, needed for sse2 intra prediction.
patch by Alexander Strange.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=6e55e8a729d59130f479f22ea5d53852b1ae2e1f
---

 encoder/analyse.c    |    4 ++--
 encoder/macroblock.c |    2 +-
 encoder/slicetype.c  |    2 +-
 tools/checkasm.c     |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/encoder/analyse.c b/encoder/analyse.c
index 109c436..2b3ec7e 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 30471f9..67bc2d8 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 f3faa5d..b0e6359 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 102f2bf..4fbc6a3 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];



More information about the x264-devel mailing list