ref: 3689122b1c8a1fa0113efa0c81cb3caef42e70c3
parent: 35b1d2e38fa3cdc04d3aca74e731399d31959cf4
parent: 77f4697a135361fe72c048c55633055d929d7464
author: Dmitry Kovalev <[email protected]>
date: Fri Apr 19 06:09:04 EDT 2013
Merge "Fixing member names inside TOKENVALUE and TOKENEXTRA structs." into experimental
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -420,7 +420,7 @@
TOKENEXTRA *p = *tp;
while (p < stop) {
- const int t = p->Token;
+ const int t = p->token;
const struct vp9_token *const a = vp9_coef_encodings + t;
const vp9_extra_bit_struct *const b = vp9_extra_bits + t;
int i = 0;
@@ -448,7 +448,7 @@
if (b->base_val) {
- const int e = p->Extra, L = b->Len;
+ const int e = p->extra, L = b->Len;
if (L) {
const unsigned char *pp = b->prob;
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -769,7 +769,7 @@
update_stats(cpi, mb_row, mb_col);
cpi->partition_count[partition_plane(bsize)][PARTITION_NONE]++;
- (*tp)->Token = EOSB_TOKEN;
+ (*tp)->token = EOSB_TOKEN;
(*tp)++;
}
#if CONFIG_SBSEGMENT
@@ -787,7 +787,7 @@
if (output_enabled) {
update_stats(cpi, mb_row, mb_col + i);
- (*tp)->Token = EOSB_TOKEN;
+ (*tp)->token = EOSB_TOKEN;
(*tp)++;
}
}
@@ -805,7 +805,7 @@
if (output_enabled) {
update_stats(cpi, mb_row + i, mb_col);
- (*tp)->Token = EOSB_TOKEN;
+ (*tp)->token = EOSB_TOKEN;
(*tp)++;
}
}
@@ -836,7 +836,7 @@
if (output_enabled) {
update_stats(cpi, mb_row + y_idx, mb_col + x_idx);
- (*tp)->Token = EOSB_TOKEN;
+ (*tp)->token = EOSB_TOKEN;
(*tp)++;
}
}
@@ -869,7 +869,7 @@
1, mb_row, mb_col, bsize);
update_stats(cpi, mb_row, mb_col);
- (*tp)->Token = EOSB_TOKEN;
+ (*tp)->token = EOSB_TOKEN;
(*tp)++;
cpi->partition_count[partition_plane(bsize)][PARTITION_NONE]++;
#if CONFIG_SBSEGMENT
@@ -884,7 +884,7 @@
1, mb_row, mb_col + i * 2, BLOCK_SIZE_SB32X64);
update_stats(cpi, mb_row, mb_col + i * 2);
- (*tp)->Token = EOSB_TOKEN;
+ (*tp)->token = EOSB_TOKEN;
(*tp)++;
}
} else if (is_sb[0] == BLOCK_SIZE_SB64X32) {
@@ -898,7 +898,7 @@
1, mb_row + i * 2, mb_col, BLOCK_SIZE_SB64X32);
update_stats(cpi, mb_row + i * 2, mb_col);
- (*tp)->Token = EOSB_TOKEN;
+ (*tp)->token = EOSB_TOKEN;
(*tp)++;
}
#endif
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -429,7 +429,7 @@
*(tokens[eob] + 1) = *(tokens[eob] + 0);
next = eob;
for (i = 0; i < eob; i++)
- token_cache[i] = vp9_dct_value_tokens_ptr[qcoeff_ptr[scan[i]]].Token;
+ token_cache[i] = vp9_dct_value_tokens_ptr[qcoeff_ptr[scan[i]]].token;
nb = vp9_get_coef_neighbors_handle(scan, &pad);
for (i = eob; i-- > i0;) {
@@ -448,7 +448,7 @@
/* Evaluate the first possibility for this state. */
rate0 = tokens[next][0].rate;
rate1 = tokens[next][1].rate;
- t0 = (vp9_dct_value_tokens_ptr + x)->Token;
+ t0 = (vp9_dct_value_tokens_ptr + x)->token;
/* Consider both possible successor states. */
if (next < default_eob) {
band = get_coef_band(scan, tx_size, i + 1);
@@ -509,7 +509,7 @@
}
#endif
} else {
- t0 = t1 = (vp9_dct_value_tokens_ptr + x)->Token;
+ t0 = t1 = (vp9_dct_value_tokens_ptr + x)->token;
}
if (next < default_eob) {
band = get_coef_band(scan, tx_size, i + 1);
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -514,7 +514,7 @@
#endif
for (; c < eob; c++) {
int v = qcoeff_ptr[scan[c]];
- int t = vp9_dct_value_tokens_ptr[v].Token;
+ int t = vp9_dct_value_tokens_ptr[v].token;
#if CONFIG_CODE_NONZEROCOUNT
nzc += (v != 0);
#endif
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -77,21 +77,21 @@
while (++j < 11 && e[j].base_val <= a) {}
- t[i].Token = --j;
+ t[i].token = --j;
eb |= (a - e[j].base_val) << 1;
} else
- t[i].Token = a;
+ t[i].token = a;
- t[i].Extra = eb;
+ t[i].extra = eb;
}
// initialize the cost for extra bits for all possible coefficient value.
{
int cost = 0;
- vp9_extra_bit_struct *p = vp9_extra_bits + t[i].Token;
+ vp9_extra_bit_struct *p = vp9_extra_bits + t[i].token;
if (p->base_val) {
- const int extra = t[i].Extra;
+ const int extra = t[i].extra;
const int Length = p->Len;
if (Length)
@@ -307,8 +307,8 @@
v = qcoeff_ptr[rc];
assert(-DCT_MAX_VALUE <= v && v < DCT_MAX_VALUE);
- t->Extra = vp9_dct_value_tokens_ptr[v].Extra;
- token = vp9_dct_value_tokens_ptr[v].Token;
+ t->extra = vp9_dct_value_tokens_ptr[v].extra;
+ token = vp9_dct_value_tokens_ptr[v].token;
} else {
#if CONFIG_CODE_NONZEROCOUNT
if (nzc_used)
@@ -318,7 +318,7 @@
token = DCT_EOB_TOKEN;
}
- t->Token = token;
+ t->token = token;
t->context_tree = probs[type][ref][band][pt];
#if CONFIG_CODE_NONZEROCOUNT
// Skip zero node if there are no zeros left
@@ -327,7 +327,7 @@
else
#endif
t->skip_eob_node = (c > 0) && (token_cache[c - 1] == 0);
- assert(vp9_coef_encodings[t->Token].len - t->skip_eob_node > 0);
+ assert(vp9_coef_encodings[t->token].len - t->skip_eob_node > 0);
if (!dry_run) {
++counts[type][ref][band][pt][token];
if (!t->skip_eob_node)
@@ -809,7 +809,7 @@
#endif
pt = combine_entropy_contexts(a_ec, l_ec);
band = 0;
- t->Token = DCT_EOB_TOKEN;
+ t->token = DCT_EOB_TOKEN;
t->context_tree = probs[type][ref][band][pt];
t->skip_eob_node = 0;
++t;
--- a/vp9/encoder/vp9_tokenize.h
+++ b/vp9/encoder/vp9_tokenize.h
@@ -17,14 +17,14 @@
void vp9_tokenize_initialize();
typedef struct {
- int16_t Token;
- int16_t Extra;
+ int16_t token;
+ int16_t extra;
} TOKENVALUE;
typedef struct {
const vp9_prob *context_tree;
- int16_t Extra;
- uint8_t Token;
+ int16_t extra;
+ uint8_t token;
uint8_t skip_eob_node;
} TOKENEXTRA;