]> git.videolan.org Git - x264.git/commitdiff
Shrink some arrays in x264_t
authorJason Garrett-Glaser <darkshikari@gmail.com>
Thu, 4 Mar 2010 17:59:09 +0000 (09:59 -0800)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Sat, 27 Mar 2010 19:47:06 +0000 (12:47 -0700)
Also remove an unnecessary assignment from cache_load.

common/common.h
common/macroblock.c

index ff74e54d61c875becf6b02f6a9e5803e6009ddf8..798dcde5ee319fac01c208fd596aee024eb7fac6 100644 (file)
@@ -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] );
index 23f98ca05864030cc7a188bdbc01549c4bb5dc9c..406d23608bec118d5430e14110adc16ff7634764 100644 (file)
@@ -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 )