]> git.sesse.net Git - x264/commitdiff
reduce the size of some arrays
authorLoren Merritt <pengvado@akuvian.org>
Thu, 20 Mar 2008 05:42:20 +0000 (23:42 -0600)
committerLoren Merritt <pengvado@akuvian.org>
Thu, 20 Mar 2008 05:42:20 +0000 (23:42 -0600)
common/common.h
common/macroblock.h

index 7c4be09afba1a4ac56b81ebbad506e1820d77554..5ee3ef8aad14349c60d54cc9c2e96b6196a305d3 100644 (file)
@@ -463,10 +463,10 @@ struct x264_t
         struct
         {
             /* real intra4x4_pred_mode if I_4X4 or I_8X8, I_PRED_4x4_DC if mb available, -1 if not */
-            int     intra4x4_pred_mode[X264_SCAN8_SIZE];
+            int8_t  intra4x4_pred_mode[X264_SCAN8_SIZE];
 
             /* i_non_zero_count if available else 0x80 */
-            int     non_zero_count[X264_SCAN8_SIZE];
+            int8_t  non_zero_count[X264_SCAN8_SIZE];
 
             /* -1 if unused, -2 if unavailable */
             DECLARE_ALIGNED( int8_t, ref[2][X264_SCAN8_SIZE], 4 );
@@ -498,11 +498,11 @@ struct x264_t
         int     b_direct_auto_write; /* analyse direct modes, to use and/or save */
 
         /* B_direct and weighted prediction */
-        int     dist_scale_factor[16][2];
-        int     bipred_weight[32][4];
+        int16_t dist_scale_factor[16][2];
+        int16_t bipred_weight[32][4];
         /* maps fref1[0]'s ref indices into the current list0 */
-        int     map_col_to_list0_buf[2]; // for negative indices
-        int     map_col_to_list0[16];
+        int8_t  map_col_to_list0_buf[2]; // for negative indices
+        int8_t  map_col_to_list0[16];
     } mb;
 
     /* rate control encoding only */
index 29574a80265a2766b9961c4dfa6247769ad20c7b..60d87ed0c8c5c0ed90b273a9678d4309ec52be8b 100644 (file)
@@ -344,7 +344,7 @@ static ALWAYS_INLINE void x264_macroblock_cache_skip( x264_t *h, int x, int y, i
 }
 static ALWAYS_INLINE void x264_macroblock_cache_intra8x8_pred( x264_t *h, int x, int y, int i_mode )
 {
-    int *cache = &h->mb.cache.intra4x4_pred_mode[X264_SCAN8_0+x+8*y];
+    int8_t *cache = &h->mb.cache.intra4x4_pred_mode[X264_SCAN8_0+x+8*y];
     cache[0] = cache[1] = cache[8] = cache[9] = i_mode;
 }