[x264-devel] commit: Shrink some arrays in x264_t (Jason Garrett-Glaser )

git at videolan.org git at videolan.org
Sun Mar 28 04:44:22 CEST 2010


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Thu Mar  4 09:59:09 2010 -0800| [e19bef27581dcba813a20d37005ccdf4c285be69] | committer: Jason Garrett-Glaser 

Shrink some arrays in x264_t
Also remove an unnecessary assignment from cache_load.

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

 common/common.h     |   11 ++++++-----
 common/macroblock.c |    1 -
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/common/common.h b/common/common.h
index ff74e54..798dcde 100644
--- a/common/common.h
+++ b/common/common.h
@@ -308,6 +308,7 @@ typedef struct x264_lookahead_t
 /* From ffmpeg
  */
 #define X264_SCAN8_SIZE (6*8)
+#define X264_SCAN8_LUMA_SIZE (5*8)
 #define X264_SCAN8_0 (4+1*8)
 
 static const int x264_scan8[16+2*4+3] =
@@ -632,20 +633,20 @@ struct x264_t
         struct
         {
             /* real intra4x4_pred_mode if I_4X4 or I_8X8, I_PRED_4x4_DC if mb available, -1 if not */
-            ALIGNED_8( int8_t intra4x4_pred_mode[X264_SCAN8_SIZE] );
+            ALIGNED_8( int8_t intra4x4_pred_mode[X264_SCAN8_LUMA_SIZE] );
 
             /* i_non_zero_count if available else 0x80 */
             ALIGNED_4( uint8_t non_zero_count[X264_SCAN8_SIZE] );
 
             /* -1 if unused, -2 if unavailable */
-            ALIGNED_4( int8_t ref[2][X264_SCAN8_SIZE] );
+            ALIGNED_4( int8_t ref[2][X264_SCAN8_LUMA_SIZE] );
 
             /* 0 if not available */
-            ALIGNED_16( int16_t mv[2][X264_SCAN8_SIZE][2] );
-            ALIGNED_8( uint8_t mvd[2][X264_SCAN8_SIZE][2] );
+            ALIGNED_16( int16_t mv[2][X264_SCAN8_LUMA_SIZE][2] );
+            ALIGNED_8( uint8_t mvd[2][X264_SCAN8_LUMA_SIZE][2] );
 
             /* 1 if SKIP or DIRECT. set only for B-frames + CABAC */
-            ALIGNED_4( int8_t skip[X264_SCAN8_SIZE] );
+            ALIGNED_4( int8_t skip[X264_SCAN8_LUMA_SIZE] );
 
             ALIGNED_4( int16_t direct_mv[2][4][2] );
             ALIGNED_4( int8_t  direct_ref[2][4] );
diff --git a/common/macroblock.c b/common/macroblock.c
index 23f98ca..406d236 100644
--- a/common/macroblock.c
+++ b/common/macroblock.c
@@ -1181,7 +1181,6 @@ void x264_macroblock_cache_load( x264_t *h, int i_mb_x, int i_mb_y )
             {
                 const int i8 = x264_scan8[0] + 4 - 1*8;
                 h->mb.cache.ref[i_list][i8] = -2;
-                M32( h->mb.cache.mv[i_list][i8] ) = 0;
             }
 
             if( h->mb.i_neighbour & MB_LEFT )



More information about the x264-devel mailing list