ref: 6cb2fcf601b98875ec8b6e40823f7156b046e04b
parent: e071fe15b20f73014b529f1ef3bdf66f55aec023
parent: 9eea9fa20637df99da6d7a70fb89a6dfb415c33d
author: Ronald S. Bultje <rbultje@google.com>
date: Thu Mar 28 08:53:00 EDT 2013
Merge "Fix mix-up in pt token indexing." into experimental
--- a/vp9/common/vp9_entropy.c
+++ b/vp9/common/vp9_entropy.c
@@ -2105,11 +2105,10 @@
int nb_pad, uint8_t *token_cache, int c, int l) {
int eob = l;
assert(nb_pad == MAX_NEIGHBORS);
- if (c == eob - 1) {
+ if (c == eob) {
return 0;
} else {
int ctx;
- c++;
assert(neighbors[MAX_NEIGHBORS * c + 0] >= 0);
if (neighbors[MAX_NEIGHBORS * c + 1] >= 0) {
ctx = (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
--- a/vp9/decoder/vp9_detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -69,7 +69,7 @@
[pt][token]++; \
token_cache[c] = token; \
pt = vp9_get_coef_context(scan, nb, pad, token_cache, \
- c, default_eob); \
+ c + 1, default_eob); \
} while (0)
#if CONFIG_CODE_NONZEROCOUNT
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -595,7 +595,7 @@
[get_coef_band(scan, tx_size, c)]
[pt][0], 1);
#endif
- pt = vp9_get_coef_context(scan, nb, pad, token_cache, c, default_eob);
+ pt = vp9_get_coef_context(scan, nb, pad, token_cache, c + 1, default_eob);
}
#if CONFIG_CODE_NONZEROCOUNT
cost += nzc_cost[nzc];
--- a/vp9/encoder/vp9_tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -291,7 +291,7 @@
#endif
token_cache[c] = token;
- pt = vp9_get_coef_context(scan, nb, pad, token_cache, c, default_eob);
+ pt = vp9_get_coef_context(scan, nb, pad, token_cache, c + 1, default_eob);
++t;
} while (c < eob && ++c < seg_eob);
#if CONFIG_CODE_NONZEROCOUNT
--
⑨