From 9eea9fa20637df99da6d7a70fb89a6dfb415c33d Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 28 Mar 2013 09:24:29 -0700 Subject: 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 --- vp9/common/vp9_entropy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vp9/common') 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]] + -- cgit v1.2.3