summaryrefslogtreecommitdiff
path: root/vp9/decoder
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-01-03 18:18:39 -0800
committerDmitry Kovalev <dkovalev@google.com>2014-01-03 18:18:39 -0800
commit5771276fda2c0f64b734c7b6f654ac842a383ec4 (patch)
treed7e9d7e7a87ffdf1d4a4c8bc233611c728f91263 /vp9/decoder
parented2fba2a79efd9d32e5e082f1fbe4ca4a54ed058 (diff)
downloadlibvpx-5771276fda2c0f64b734c7b6f654ac842a383ec4.tar
libvpx-5771276fda2c0f64b734c7b6f654ac842a383ec4.tar.gz
libvpx-5771276fda2c0f64b734c7b6f654ac842a383ec4.tar.bz2
libvpx-5771276fda2c0f64b734c7b6f654ac842a383ec4.zip
Moving get_scan() call out of decode_coeffs() function.
Change-Id: I5db2e5a6c36e6c503dea2e07d9d2e0daf4ac9d89
Diffstat (limited to 'vp9/decoder')
-rw-r--r--vp9/decoder/vp9_detokenize.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/vp9/decoder/vp9_detokenize.c b/vp9/decoder/vp9_detokenize.c
index 63f1731de..18cafbaef 100644
--- a/vp9/decoder/vp9_detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -79,9 +79,10 @@ static const vp9_prob cat6_prob[15] = {
val += (vp9_read(r, prob) << bits_count); \
} while (0)
-static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, int block,
- PLANE_TYPE type, int16_t *dqcoeff, TX_SIZE tx_size,
- const int16_t *dq, int ctx, vp9_reader *r) {
+static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, PLANE_TYPE type,
+ int16_t *dqcoeff, TX_SIZE tx_size, const int16_t *dq,
+ int ctx, const int16_t *scan, const int16_t *nb,
+ vp9_reader *r) {
const int max_eob = 16 << (tx_size << 1);
const FRAME_CONTEXT *const fc = &cm->fc;
FRAME_COUNTS *const counts = &cm->counts;
@@ -98,9 +99,6 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, int block,
const uint8_t *cat6;
const uint8_t *band_translate = get_band_translate(tx_size);
const int dq_shift = (tx_size == TX_32X32);
- const scan_order *so = get_scan(xd, tx_size, type, block);
- const int16_t *scan = so->scan;
- const int16_t *nb = so->neighbors;
int v;
int16_t dqv = dq[0];
@@ -202,9 +200,10 @@ int vp9_decode_block_tokens(VP9_COMMON *cm, MACROBLOCKD *xd,
struct macroblockd_plane *const pd = &xd->plane[plane];
const int ctx = get_entropy_context(tx_size, pd->above_context + x,
pd->left_context + y);
- const int eob = decode_coefs(cm, xd, block, pd->plane_type,
+ const scan_order *so = get_scan(xd, tx_size, pd->plane_type, block);
+ const int eob = decode_coefs(cm, xd, pd->plane_type,
BLOCK_OFFSET(pd->dqcoeff, block), tx_size,
- pd->dequant, ctx, r);
+ pd->dequant, ctx, so->scan, so->neighbors, r);
set_contexts(xd, pd, plane_bsize, tx_size, eob > 0, x, y);
return eob;
}