[x264-devel] commit: reduce the size of some arrays (Loren Merritt )
git version control
git at videolan.org
Thu Mar 20 07:53:49 CET 2008
x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Wed Mar 19 23:42:20 2008 -0600| [84452e50633eb7d98a2e5f55ff4c799b2bf30f32]
reduce the size of some arrays
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=84452e50633eb7d98a2e5f55ff4c799b2bf30f32
---
common/common.h | 12 ++++++------
common/macroblock.h | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/common/common.h b/common/common.h
index 7c4be09..5ee3ef8 100644
--- a/common/common.h
+++ b/common/common.h
@@ -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 */
diff --git a/common/macroblock.h b/common/macroblock.h
index 29574a8..60d87ed 100644
--- a/common/macroblock.h
+++ b/common/macroblock.h
@@ -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;
}
More information about the x264-devel
mailing list