Commit 58b004ff authored by Dmitry Kovalev's avatar Dmitry Kovalev Committed by Gerrit Code Review
Browse files

Merge "Adding const to tree pointer inside vp9_extra_bit struct."

parents 8dd39051 20f34ff0
...@@ -51,7 +51,7 @@ extern const vp9_tree_index vp9_coefmodel_tree[]; ...@@ -51,7 +51,7 @@ extern const vp9_tree_index vp9_coefmodel_tree[];
extern struct vp9_token vp9_coef_encodings[MAX_ENTROPY_TOKENS]; extern struct vp9_token vp9_coef_encodings[MAX_ENTROPY_TOKENS];
typedef struct { typedef struct {
vp9_tree_index *tree; const vp9_tree_index *tree;
const vp9_prob *prob; const vp9_prob *prob;
int len; int len;
int base_val; int base_val;
......
...@@ -256,15 +256,15 @@ static void update_inter_mode_probs(VP9_COMMON *cm, vp9_writer *w) { ...@@ -256,15 +256,15 @@ static void update_inter_mode_probs(VP9_COMMON *cm, vp9_writer *w) {
} }
} }
static void pack_mb_tokens(vp9_writer* const bc, static void pack_mb_tokens(vp9_writer* const w,
TOKENEXTRA **tp, TOKENEXTRA **tp,
const TOKENEXTRA *const stop) { const TOKENEXTRA *const stop) {
TOKENEXTRA *p = *tp; TOKENEXTRA *p = *tp;
while (p < stop && p->token != EOSB_TOKEN) { while (p < stop && p->token != EOSB_TOKEN) {
const int t = p->token; const int t = p->token;
const struct vp9_token *const a = vp9_coef_encodings + t; const struct vp9_token *const a = &vp9_coef_encodings[t];
const vp9_extra_bit *const b = vp9_extra_bits + t; const vp9_extra_bit *const b = &vp9_extra_bits[t];
int i = 0; int i = 0;
const vp9_prob *pp; const vp9_prob *pp;
int v = a->value; int v = a->value;
...@@ -287,7 +287,7 @@ static void pack_mb_tokens(vp9_writer* const bc, ...@@ -287,7 +287,7 @@ static void pack_mb_tokens(vp9_writer* const bc,
do { do {
const int bb = (v >> --n) & 1; const int bb = (v >> --n) & 1;
vp9_write(bc, bb, pp[i >> 1]); vp9_write(w, bb, pp[i >> 1]);
i = vp9_coef_tree[i + bb]; i = vp9_coef_tree[i + bb];
} while (n); } while (n);
...@@ -302,12 +302,12 @@ static void pack_mb_tokens(vp9_writer* const bc, ...@@ -302,12 +302,12 @@ static void pack_mb_tokens(vp9_writer* const bc,
do { do {
const int bb = (v >> --n) & 1; const int bb = (v >> --n) & 1;
vp9_write(bc, bb, pb[i >> 1]); vp9_write(w, bb, pb[i >> 1]);
i = b->tree[i + bb]; i = b->tree[i + bb];
} while (n); } while (n);
} }
vp9_write_bit(bc, e & 1); vp9_write_bit(w, e & 1);
} }
++p; ++p;
} }
......
...@@ -57,7 +57,7 @@ static void fill_value_tokens() { ...@@ -57,7 +57,7 @@ static void fill_value_tokens() {
// initialize the cost for extra bits for all possible coefficient value. // initialize the cost for extra bits for all possible coefficient value.
{ {
int cost = 0; int cost = 0;
const 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) { if (p->base_val) {
const int extra = t[i].extra; const int extra = t[i].extra;
......
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