};
#endif
- struct vp9_token vp9_coef_encodings[ENTROPY_TOKENS];
-
- void vp9_coef_tree_initialize() {
- vp9_tokens_from_tree(vp9_coef_encodings, vp9_coef_tree);
- }
+ const struct vp9_token vp9_coef_encodings[ENTROPY_TOKENS] = {
+ {2, 2}, {6, 3}, {28, 5}, {58, 6}, {59, 6}, {60, 6}, {61, 6}, {124, 7},
+ {125, 7}, {126, 7}, {127, 7}, {0, 1}
+ };
-static void tokenize_init_one(TOKENVALUE *t, const vp9_extra_bit *const e,
+static void tokenize_init_one(const vp9_extra_bit *const e,
int16_t *value_cost, int max_value) {
int i = -max_value;
- int sign = 1;
+ TOKENVALUE t;
do {
- if (!i)
- sign = 0;
-
- {
- const int a = sign ? -i : i;
- int eb = sign;
-
- if (a > 4) {
- int j = 4;
-
- while (++j < 11 && e[j].base_val <= a) {}
-
- t[i].token = --j;
- eb |= (a - e[j].base_val) << 1;
- } else {
- t[i].token = a;
- }
- t[i].extra = eb;
- }
+ vp9_get_token_extra(i, &t.token, &t.extra);
// initialize the cost for extra bits for all possible coefficient value.
{
int cost = 0;