summaryrefslogtreecommitdiff
path: root/vp9/decoder/vp9_detokenize.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2013-02-11 19:19:21 +0000
committerPaul Wilkins <paulwilkins@google.com>2013-02-13 18:56:30 +0000
commit0d284ffed10d8df86caff32bc56caefc45ed5c44 (patch)
treec17f651e2291737c7dff52f9bc55af077e1d40d8 /vp9/decoder/vp9_detokenize.c
parentafa57bfc971242ce2205f8bb86ccd43b545fe144 (diff)
downloadlibvpx-0d284ffed10d8df86caff32bc56caefc45ed5c44.tar
libvpx-0d284ffed10d8df86caff32bc56caefc45ed5c44.tar.gz
libvpx-0d284ffed10d8df86caff32bc56caefc45ed5c44.tar.bz2
libvpx-0d284ffed10d8df86caff32bc56caefc45ed5c44.zip
Abstract the selection of coefficient context.
This is an initial step to facilitate experimentation with changes to the prior token context used to code coefficients to take better account of the energy of preceding tokens. This patch merely abstracts the selection of context into two functions and does not alter the output. Change-Id: I117fff0b49c61da83aed641e36620442f86def86
Diffstat (limited to 'vp9/decoder/vp9_detokenize.c')
-rw-r--r--vp9/decoder/vp9_detokenize.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vp9/decoder/vp9_detokenize.c b/vp9/decoder/vp9_detokenize.c
index 9e1df063c..bfdb486b8 100644
--- a/vp9/decoder/vp9_detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -65,8 +65,8 @@ static int get_signed(BOOL_DECODER *br, int value_to_sign) {
#define INCREMENT_COUNT(token) \
do { \
- coef_counts[type][coef_bands[c]][pt][token]++; \
- pt = vp9_prev_token_class[token]; \
+ coef_counts[type][coef_bands[c]][pt][token]++; \
+ pt = vp9_get_coef_context(&recent_energy, token); \
} while (0)
#define WRITE_COEF_CONTINUE(val, token) \
@@ -95,6 +95,7 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
const int lidx = vp9_block2left[txfm_size][block_idx];
ENTROPY_CONTEXT above_ec = A0[aidx] != 0, left_ec = L0[lidx] != 0;
FRAME_CONTEXT *const fc = &dx->common.fc;
+ int recent_energy = 0;
int nodc = (type == PLANE_TYPE_Y_NO_DC);
int pt, c = nodc;
vp9_coeff_probs *coef_probs;