Index: source/libvpx/vp9/decoder/vp9_detokenize.c |
diff --git a/source/libvpx/vp9/decoder/vp9_detokenize.c b/source/libvpx/vp9/decoder/vp9_detokenize.c |
index 35690b89b726a20725b56f04070307ed6800e216..bb8c66fc09f8c67d363d8638d073bad563e7624f 100644 |
--- a/source/libvpx/vp9/decoder/vp9_detokenize.c |
+++ b/source/libvpx/vp9/decoder/vp9_detokenize.c |
@@ -45,17 +45,6 @@ static INLINE int read_coeff(const vp9_prob *probs, int n, vp9_reader *r) { |
return val; |
} |
-static const vp9_tree_index coeff_subtree_high[TREE_SIZE(ENTROPY_TOKENS)] = { |
- 2, 6, /* 0 = LOW_VAL */ |
- -TWO_TOKEN, 4, /* 1 = TWO */ |
- -THREE_TOKEN, -FOUR_TOKEN, /* 2 = THREE */ |
- 8, 10, /* 3 = HIGH_LOW */ |
- -CATEGORY1_TOKEN, -CATEGORY2_TOKEN, /* 4 = CAT_ONE */ |
- 12, 14, /* 5 = CAT_THREEFOUR */ |
- -CATEGORY3_TOKEN, -CATEGORY4_TOKEN, /* 6 = CAT_THREE */ |
- -CATEGORY5_TOKEN, -CATEGORY6_TOKEN /* 7 = CAT_FIVE */ |
-}; |
- |
static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, |
FRAME_COUNTS *counts, PLANE_TYPE type, |
tran_low_t *dqcoeff, TX_SIZE tx_size, const int16_t *dq, |
@@ -63,7 +52,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, |
vp9_reader *r) { |
const int max_eob = 16 << (tx_size << 1); |
const FRAME_CONTEXT *const fc = cm->fc; |
- const int ref = is_inter_block(&xd->mi[0].src_mi->mbmi); |
+ const int ref = is_inter_block(&xd->mi[0]->mbmi); |
int band, c = 0; |
const vp9_prob (*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = |
fc->coef_probs[tx_size][type][ref]; |
@@ -147,7 +136,7 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, |
val = 1; |
} else { |
INCREMENT_COUNT(TWO_TOKEN); |
- token = vp9_read_tree(r, coeff_subtree_high, |
+ token = vp9_read_tree(r, vp9_coef_con_tree, |
vp9_pareto8_full[prob[PIVOT_NODE] - 1]); |
switch (token) { |
case TWO_TOKEN: |
@@ -216,8 +205,10 @@ int vp9_decode_block_tokens(VP9_COMMON *cm, MACROBLOCKD *xd, |
FRAME_COUNTS *counts, int plane, int block, |
BLOCK_SIZE plane_bsize, int x, int y, |
TX_SIZE tx_size, vp9_reader *r, |
- const int16_t *const dequant) { |
+ int seg_id) { |
struct macroblockd_plane *const pd = &xd->plane[plane]; |
+ const int16_t *const dequant = (plane == 0) ? cm->y_dequant[seg_id] |
+ : cm->uv_dequant[seg_id]; |
const int ctx = get_entropy_context(tx_size, pd->above_context + x, |
pd->left_context + y); |
const scan_order *so = get_scan(xd, tx_size, pd->plane_type, block); |