diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2013-12-03 17:23:03 -0800 |
---|---|---|
committer | Dmitry Kovalev <dkovalev@google.com> | 2013-12-03 17:23:03 -0800 |
commit | 8e89e2f2e0df6bbec5c992d2a87fdb4010e64f07 (patch) | |
tree | 74111cd4211b5cf8f9ea6092f70ce866befff9df /vp9/common/vp9_entropy.h | |
parent | 4585b9dbac94121830998ea417f340a22213482d (diff) | |
download | libvpx-8e89e2f2e0df6bbec5c992d2a87fdb4010e64f07.tar libvpx-8e89e2f2e0df6bbec5c992d2a87fdb4010e64f07.tar.gz libvpx-8e89e2f2e0df6bbec5c992d2a87fdb4010e64f07.tar.bz2 libvpx-8e89e2f2e0df6bbec5c992d2a87fdb4010e64f07.zip |
Cleaning up vp9_entropy.h file.
Renaming constants for consistency:
DCT_VAL_CATEGORY1 => CATEGORY1_TOKEN
DCT_VAL_CATEGORY2 => CATEGORY2_TOKEN
DCT_VAL_CATEGORY3 => CATEGORY3_TOKEN
DCT_VAL_CATEGORY4 => CATEGORY4_TOKEN
DCT_VAL_CATEGORY5 => CATEGORY5_TOKEN
DCT_VAL_CATEGORY6 => CATEGORY6_TOKEN
DCT_EOB_TOKEN => EOB_TOKEN
DCT_EOB_MODEL_TOKEN => EOB_MODEL_TOKEN
MAX_ENTROPY_TOKENS => ENTROPY_TOKENS
Moving constants:
INTER_MODE_CONTEXTS from vp9_entropy.h to vp9_blockd.h.
EOSB_TOKEN from vp9_entropy.h to vp9_tokenize.h
Change-Id: I5fcbf081318e1d365792b6d290a930c6cb0f3fc2
Diffstat (limited to 'vp9/common/vp9_entropy.h')
-rw-r--r-- | vp9/common/vp9_entropy.h | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/vp9/common/vp9_entropy.h b/vp9/common/vp9_entropy.h index 941b251c3..179d16a20 100644 --- a/vp9/common/vp9_entropy.h +++ b/vp9/common/vp9_entropy.h @@ -21,30 +21,27 @@ #define DIFF_UPDATE_PROB 252 -/* Coefficient token alphabet */ - -#define ZERO_TOKEN 0 /* 0 Extra Bits 0+0 */ -#define ONE_TOKEN 1 /* 1 Extra Bits 0+1 */ -#define TWO_TOKEN 2 /* 2 Extra Bits 0+1 */ -#define THREE_TOKEN 3 /* 3 Extra Bits 0+1 */ -#define FOUR_TOKEN 4 /* 4 Extra Bits 0+1 */ -#define DCT_VAL_CATEGORY1 5 /* 5-6 Extra Bits 1+1 */ -#define DCT_VAL_CATEGORY2 6 /* 7-10 Extra Bits 2+1 */ -#define DCT_VAL_CATEGORY3 7 /* 11-18 Extra Bits 3+1 */ -#define DCT_VAL_CATEGORY4 8 /* 19-34 Extra Bits 4+1 */ -#define DCT_VAL_CATEGORY5 9 /* 35-66 Extra Bits 5+1 */ -#define DCT_VAL_CATEGORY6 10 /* 67+ Extra Bits 14+1 */ -#define DCT_EOB_TOKEN 11 /* EOB Extra Bits 0+0 */ -#define MAX_ENTROPY_TOKENS 12 -#define ENTROPY_NODES 11 -#define EOSB_TOKEN 127 /* Not signalled, encoder only */ - -#define INTER_MODE_CONTEXTS 7 - -extern DECLARE_ALIGNED(16, const uint8_t, - vp9_pt_energy_class[MAX_ENTROPY_TOKENS]); - -#define DCT_EOB_MODEL_TOKEN 3 /* EOB Extra Bits 0+0 */ +// Coefficient token alphabet +#define ZERO_TOKEN 0 // 0 Extra Bits 0+0 +#define ONE_TOKEN 1 // 1 Extra Bits 0+1 +#define TWO_TOKEN 2 // 2 Extra Bits 0+1 +#define THREE_TOKEN 3 // 3 Extra Bits 0+1 +#define FOUR_TOKEN 4 // 4 Extra Bits 0+1 +#define CATEGORY1_TOKEN 5 // 5-6 Extra Bits 1+1 +#define CATEGORY2_TOKEN 6 // 7-10 Extra Bits 2+1 +#define CATEGORY3_TOKEN 7 // 11-18 Extra Bits 3+1 +#define CATEGORY4_TOKEN 8 // 19-34 Extra Bits 4+1 +#define CATEGORY5_TOKEN 9 // 35-66 Extra Bits 5+1 +#define CATEGORY6_TOKEN 10 // 67+ Extra Bits 14+1 +#define EOB_TOKEN 11 // EOB Extra Bits 0+0 + +#define ENTROPY_TOKENS 12 + +#define ENTROPY_NODES 11 + +extern DECLARE_ALIGNED(16, const uint8_t, vp9_pt_energy_class[ENTROPY_TOKENS]); + +#define EOB_MODEL_TOKEN 3 extern const vp9_tree_index vp9_coefmodel_tree[]; typedef struct { @@ -55,7 +52,7 @@ typedef struct { } vp9_extra_bit; // indexed by token value -extern const vp9_extra_bit vp9_extra_bits[MAX_ENTROPY_TOKENS]; +extern const vp9_extra_bit vp9_extra_bits[ENTROPY_TOKENS]; #define MAX_PROB 255 #define DCT_MAX_VALUE 16384 @@ -90,7 +87,7 @@ extern const vp9_extra_bit vp9_extra_bits[MAX_ENTROPY_TOKENS]; // #define ENTROPY_STATS typedef unsigned int vp9_coeff_count[REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS] - [MAX_ENTROPY_TOKENS]; + [ENTROPY_TOKENS]; typedef unsigned int vp9_coeff_stats[REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS] [ENTROPY_NODES][2]; |