Commit e41fd6e3 authored by Paul Wilkins's avatar Paul Wilkins Committed by Yaowu Xu
Browse files

Fix bug in 4x4 band definition.

Also some unused data structures/references removed.

Change-Id: I295809e887173543e794250cb60ddaf1475ffd24
parent 75850499
......@@ -35,35 +35,16 @@ DECLARE_ALIGNED(16, const uint8_t, vp9_norm[256]) = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
// Unified coefficient band structure used by all block sizes
DECLARE_ALIGNED(16, const int, vp9_coef_bands8x8[64]) = {
0, 1, 2, 3, 4, 4, 5, 5,
1, 2, 3, 4, 4, 5, 5, 5,
2, 3, 4, 4, 5, 5, 5, 5,
3, 4, 4, 5, 5, 5, 5, 5,
4, 4, 5, 5, 5, 5, 5, 5,
4, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5
};
DECLARE_ALIGNED(16, const uint8_t,
vp9_coefband_trans_8x8plus[MAXBAND_INDEX + 1]) = {
0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 5
};
DECLARE_ALIGNED(16, const int, vp9_coef_bands4x4[16]) = {
0, 1, 2, 3,
1, 2, 3, 4,
2, 3, 4, 5,
3, 4, 5, 5
};
DECLARE_ALIGNED(16, const uint8_t,
vp9_coefband_trans_4x4[MAXBAND_INDEX + 1]) = {
0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 5
0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5,
5, 5, 5, 5, 5, 5
};
DECLARE_ALIGNED(16, const uint8_t, vp9_pt_energy_class[MAX_ENTROPY_TOKENS]) = {
......
......@@ -134,17 +134,16 @@ static INLINE void vp9_reset_sb_tokens_context(MACROBLOCKD* const xd,
}
}
extern const int vp9_coef_bands8x8[64];
extern const int vp9_coef_bands4x4[16];
extern const uint8_t vp9_coefband_trans_8x8plus[22];
extern const uint8_t vp9_coefband_trans_4x4[22];
// This is the index in the scan order beyond which all coefficients for
// 8x8 transform and above are in the top band.
// For 4x4 blocks the index is less but to keep things common the lookup
// table for 4x4 is padded out to this index.
#define MAXBAND_INDEX 21
extern const uint8_t vp9_coefband_trans_8x8plus[MAXBAND_INDEX + 1];
extern const uint8_t vp9_coefband_trans_4x4[MAXBAND_INDEX + 1];
static int get_coef_band(const uint8_t * band_translate, int coef_index) {
return (coef_index > MAXBAND_INDEX)
? (COEF_BANDS-1) : band_translate[coef_index];
......
......@@ -58,8 +58,6 @@ static const vp9_prob cat6_prob[15] = {
254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0
};
DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]);
#define INCREMENT_COUNT(token) \
do { \
coef_counts[type][ref][band][pt] \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment