diff --git a/vp9/common/vp9_entropy.c b/vp9/common/vp9_entropy.c index c7733ad0425f9f68c4c92dd11001caacc7b39577..df3a9fed53bb8ed3f70e6d027a89af37a50a9f82 100644 --- a/vp9/common/vp9_entropy.c +++ b/vp9/common/vp9_entropy.c @@ -419,7 +419,7 @@ static void init_bit_trees() { init_bit_tree(cat6, 14); } -vp9_extra_bit vp9_extra_bits[12] = { +const vp9_extra_bit vp9_extra_bits[12] = { { 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 9fa1fc60d906e6e1c8a6d01ee48b5dbf75a39d44..861c0786c80683f9d2f4495b09c8d096aa41f219 100644 --- a/vp9/common/vp9_entropy.h +++ b/vp9/common/vp9_entropy.h @@ -50,7 +50,7 @@ typedef struct { 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 diff --git a/vp9/encoder/vp9_tokenize.c b/vp9/encoder/vp9_tokenize.c index 27831aa22fdc90d553ff89045189aec4eb7a1431..0a42a32aea9f9c02d067e45f2591b0a44b5148fc 100644 --- a/vp9/encoder/vp9_tokenize.c +++ b/vp9/encoder/vp9_tokenize.c @@ -40,7 +40,7 @@ const int *vp9_dct_value_cost_ptr; static void fill_value_tokens() { TOKENVALUE *const t = dct_value_tokens + DCT_MAX_VALUE; - vp9_extra_bit *const e = vp9_extra_bits; + const vp9_extra_bit *const e = vp9_extra_bits; int i = -DCT_MAX_VALUE; int sign = 1; @@ -69,7 +69,7 @@ static void fill_value_tokens() { // initialize the cost for extra bits for all possible coefficient value. { int cost = 0; - vp9_extra_bit *p = vp9_extra_bits + t[i].token; + const vp9_extra_bit *p = vp9_extra_bits + t[i].token; if (p->base_val) { const int extra = t[i].extra;