diff options
author | Dmitry Kovalev <dkovalev@google.com> | 2013-10-16 13:13:04 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2013-10-16 13:13:04 -0700 |
commit | 9e66515886b19b9a8b96ef1f49652bc04bb4443e (patch) | |
tree | f985673130c86b93ff625a351d8c6baf1b819875 | |
parent | e078c3d8546182cc2cc793053476a2e3caa50b4c (diff) | |
parent | a97fe8953884071dfbd3e18f8b6aa9404dc3b635 (diff) | |
download | libvpx-9e66515886b19b9a8b96ef1f49652bc04bb4443e.tar libvpx-9e66515886b19b9a8b96ef1f49652bc04bb4443e.tar.gz libvpx-9e66515886b19b9a8b96ef1f49652bc04bb4443e.tar.bz2 libvpx-9e66515886b19b9a8b96ef1f49652bc04bb4443e.zip |
Merge "Using constants instead of plain numbers."
-rw-r--r-- | vp9/common/vp9_entropy.c | 4 | ||||
-rw-r--r-- | vp9/common/vp9_entropy.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/vp9/common/vp9_entropy.c b/vp9/common/vp9_entropy.c index 7479e7a79..2640ac72b 100644 --- a/vp9/common/vp9_entropy.c +++ b/vp9/common/vp9_entropy.c @@ -56,7 +56,7 @@ DECLARE_ALIGNED(16, const uint8_t, vp9_pt_energy_class[MAX_ENTROPY_TOKENS]) = { /* Array indices are identical to previously-existing CONTEXT_NODE indices */ -const vp9_tree_index vp9_coef_tree[ 22] = { +const vp9_tree_index vp9_coef_tree[TREE_SIZE(MAX_ENTROPY_TOKENS)] = { -DCT_EOB_TOKEN, 2, /* 0 = EOB */ -ZERO_TOKEN, 4, /* 1 = ZERO */ -ONE_TOKEN, 6, /* 2 = ONE */ @@ -274,7 +274,7 @@ static void init_bit_trees() { init_bit_tree(cat6, 14); } -const vp9_extra_bit vp9_extra_bits[12] = { +const vp9_extra_bit vp9_extra_bits[MAX_ENTROPY_TOKENS] = { { 0, 0, 0, 0}, { 0, 0, 0, 1}, { 0, 0, 0, 2}, diff --git a/vp9/common/vp9_entropy.h b/vp9/common/vp9_entropy.h index 02178b579..518731df6 100644 --- a/vp9/common/vp9_entropy.h +++ b/vp9/common/vp9_entropy.h @@ -43,7 +43,7 @@ extern DECLARE_ALIGNED(16, const uint8_t, vp9_pt_energy_class[MAX_ENTROPY_TOKENS]); -extern const vp9_tree_index vp9_coef_tree[]; +extern const vp9_tree_index vp9_coef_tree[TREE_SIZE(MAX_ENTROPY_TOKENS)]; #define DCT_EOB_MODEL_TOKEN 3 /* EOB Extra Bits 0+0 */ extern const vp9_tree_index vp9_coefmodel_tree[]; @@ -57,7 +57,8 @@ typedef struct { int base_val; } vp9_extra_bit; -extern const vp9_extra_bit vp9_extra_bits[12]; /* indexed by token value */ +// indexed by token value +extern const vp9_extra_bit vp9_extra_bits[MAX_ENTROPY_TOKENS]; #define MAX_PROB 255 #define DCT_MAX_VALUE 16384 |