summaryrefslogtreecommitdiff
path: root/vp9/common
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2013-03-28 09:24:29 -0700
committerRonald S. Bultje <rbultje@google.com>2013-03-28 09:24:29 -0700
commit9eea9fa20637df99da6d7a70fb89a6dfb415c33d (patch)
tree74f3814e2620d45e4cba1b7a810a58306a8867ba /vp9/common
parent35dc9f55469d4a1d17545bfa0ff016756943ab36 (diff)
downloadlibvpx-9eea9fa20637df99da6d7a70fb89a6dfb415c33d.tar
libvpx-9eea9fa20637df99da6d7a70fb89a6dfb415c33d.tar.gz
libvpx-9eea9fa20637df99da6d7a70fb89a6dfb415c33d.tar.bz2
libvpx-9eea9fa20637df99da6d7a70fb89a6dfb415c33d.zip
Fix mix-up in pt token indexing.
This fixes uninitialized reads in the trellis, and probably makes the trellis do something again. Change-Id: Ifac8dae9aa77574bde0954a71d4571c5c556df3c
Diffstat (limited to 'vp9/common')
-rw-r--r--vp9/common/vp9_entropy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vp9/common/vp9_entropy.c b/vp9/common/vp9_entropy.c
index a1dbd3e85..d05be990d 100644
--- a/vp9/common/vp9_entropy.c
+++ b/vp9/common/vp9_entropy.c
@@ -2105,11 +2105,10 @@ int vp9_get_coef_context(const int *scan, const int *neighbors,
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]] +