Index: source/libvpx/vp9/common/vp9_entropy.h |
=================================================================== |
--- source/libvpx/vp9/common/vp9_entropy.h (revision 219822) |
+++ source/libvpx/vp9/common/vp9_entropy.h (working copy) |
@@ -50,7 +50,7 @@ |
int base_val; |
} vp9_extra_bit; |
-extern vp9_extra_bit vp9_extra_bits[12]; /* indexed by token value */ |
+extern const vp9_extra_bit vp9_extra_bits[12]; /* indexed by token value */ |
#define MAX_PROB 255 |
#define DCT_MAX_VALUE 16384 |
@@ -80,7 +80,6 @@ |
coefficient band (and since zigzag positions 0, 1, and 2 are in |
distinct bands). */ |
-/*# define DC_TOKEN_CONTEXTS 3*/ /* 00, 0!0, !0!0 */ |
#define PREV_COEF_CONTEXTS 6 |
// #define ENTROPY_STATS |
@@ -102,7 +101,7 @@ |
extern DECLARE_ALIGNED(16, const int16_t, vp9_col_scan_4x4[16]); |
extern DECLARE_ALIGNED(16, const int16_t, vp9_row_scan_4x4[16]); |
-extern DECLARE_ALIGNED(64, const int16_t, vp9_default_scan_8x8[64]); |
+extern DECLARE_ALIGNED(16, const int16_t, vp9_default_scan_8x8[64]); |
extern DECLARE_ALIGNED(16, const int16_t, vp9_col_scan_8x8[64]); |
extern DECLARE_ALIGNED(16, const int16_t, vp9_row_scan_8x8[64]); |
@@ -119,7 +118,7 @@ |
extern DECLARE_ALIGNED(16, int16_t, vp9_col_iscan_4x4[16]); |
extern DECLARE_ALIGNED(16, int16_t, vp9_row_iscan_4x4[16]); |
-extern DECLARE_ALIGNED(64, int16_t, vp9_default_iscan_8x8[64]); |
+extern DECLARE_ALIGNED(16, int16_t, vp9_default_iscan_8x8[64]); |
extern DECLARE_ALIGNED(16, int16_t, vp9_col_iscan_8x8[64]); |
extern DECLARE_ALIGNED(16, int16_t, vp9_row_iscan_8x8[64]); |
@@ -157,17 +156,15 @@ |
void vp9_coef_tree_initialize(void); |
void vp9_adapt_coef_probs(struct VP9Common *); |
-static INLINE void vp9_reset_sb_tokens_context(MACROBLOCKD* const xd, |
- BLOCK_SIZE_TYPE bsize) { |
- /* Clear entropy contexts */ |
- const int bw = 1 << b_width_log2(bsize); |
- const int bh = 1 << b_height_log2(bsize); |
+static INLINE void reset_skip_context(MACROBLOCKD *xd, BLOCK_SIZE bsize) { |
int i; |
for (i = 0; i < MAX_MB_PLANE; i++) { |
- vpx_memset(xd->plane[i].above_context, 0, |
- sizeof(ENTROPY_CONTEXT) * bw >> xd->plane[i].subsampling_x); |
- vpx_memset(xd->plane[i].left_context, 0, |
- sizeof(ENTROPY_CONTEXT) * bh >> xd->plane[i].subsampling_y); |
+ struct macroblockd_plane *const pd = &xd->plane[i]; |
+ const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd); |
+ vpx_memset(pd->above_context, 0, sizeof(ENTROPY_CONTEXT) * |
+ num_4x4_blocks_wide_lookup[plane_bsize]); |
+ vpx_memset(pd->left_context, 0, sizeof(ENTROPY_CONTEXT) * |
+ num_4x4_blocks_high_lookup[plane_bsize]); |
} |
} |