OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 12, 14, /* 5 = CAT_THREEFOUR */ | 51 12, 14, /* 5 = CAT_THREEFOUR */ |
52 -CATEGORY3_TOKEN, -CATEGORY4_TOKEN, /* 6 = CAT_THREE */ | 52 -CATEGORY3_TOKEN, -CATEGORY4_TOKEN, /* 6 = CAT_THREE */ |
53 -CATEGORY5_TOKEN, -CATEGORY6_TOKEN /* 7 = CAT_FIVE */ | 53 -CATEGORY5_TOKEN, -CATEGORY6_TOKEN /* 7 = CAT_FIVE */ |
54 }; | 54 }; |
55 | 55 |
56 static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, PLANE_TYPE type, | 56 static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, PLANE_TYPE type, |
57 tran_low_t *dqcoeff, TX_SIZE tx_size, const int16_t *dq, | 57 tran_low_t *dqcoeff, TX_SIZE tx_size, const int16_t *dq, |
58 int ctx, const int16_t *scan, const int16_t *nb, | 58 int ctx, const int16_t *scan, const int16_t *nb, |
59 vp9_reader *r) { | 59 vp9_reader *r) { |
60 const int max_eob = 16 << (tx_size << 1); | 60 const int max_eob = 16 << (tx_size << 1); |
61 const FRAME_CONTEXT *const fc = &cm->fc; | 61 const FRAME_CONTEXT *const fc = cm->fc; |
62 FRAME_COUNTS *const counts = &cm->counts; | 62 FRAME_COUNTS *const counts = &cm->counts; |
63 const int ref = is_inter_block(&xd->mi[0].src_mi->mbmi); | 63 const int ref = is_inter_block(&xd->mi[0].src_mi->mbmi); |
64 int band, c = 0; | 64 int band, c = 0; |
65 const vp9_prob (*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = | 65 const vp9_prob (*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = |
66 fc->coef_probs[tx_size][type][ref]; | 66 fc->coef_probs[tx_size][type][ref]; |
67 const vp9_prob *prob; | 67 const vp9_prob *prob; |
68 unsigned int (*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1] = | 68 unsigned int (*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1] = |
69 counts->coef[tx_size][type][ref]; | 69 counts->coef[tx_size][type][ref]; |
70 unsigned int (*eob_branch_count)[COEFF_CONTEXTS] = | 70 unsigned int (*eob_branch_count)[COEFF_CONTEXTS] = |
71 counts->eob_branch[tx_size][type][ref]; | 71 counts->eob_branch[tx_size][type][ref]; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 pd->left_context + y); | 212 pd->left_context + y); |
213 const scan_order *so = get_scan(xd, tx_size, pd->plane_type, block); | 213 const scan_order *so = get_scan(xd, tx_size, pd->plane_type, block); |
214 const int eob = decode_coefs(cm, xd, pd->plane_type, | 214 const int eob = decode_coefs(cm, xd, pd->plane_type, |
215 BLOCK_OFFSET(pd->dqcoeff, block), tx_size, | 215 BLOCK_OFFSET(pd->dqcoeff, block), tx_size, |
216 pd->dequant, ctx, so->scan, so->neighbors, r); | 216 pd->dequant, ctx, so->scan, so->neighbors, r); |
217 vp9_set_contexts(xd, pd, plane_bsize, tx_size, eob > 0, x, y); | 217 vp9_set_contexts(xd, pd, plane_bsize, tx_size, eob > 0, x, y); |
218 return eob; | 218 return eob; |
219 } | 219 } |
220 | 220 |
221 | 221 |
OLD | NEW |