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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 val += (vp9_read(r, prob) << bits_count); \ | 79 val += (vp9_read(r, prob) << bits_count); \ |
80 } while (0) | 80 } while (0) |
81 | 81 |
82 static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, PLANE_TYPE type, | 82 static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd, PLANE_TYPE type, |
83 int16_t *dqcoeff, TX_SIZE tx_size, const int16_t *dq, | 83 int16_t *dqcoeff, TX_SIZE tx_size, const int16_t *dq, |
84 int ctx, const int16_t *scan, const int16_t *nb, | 84 int ctx, const int16_t *scan, const int16_t *nb, |
85 vp9_reader *r) { | 85 vp9_reader *r) { |
86 const int max_eob = 16 << (tx_size << 1); | 86 const int max_eob = 16 << (tx_size << 1); |
87 const FRAME_CONTEXT *const fc = &cm->fc; | 87 const FRAME_CONTEXT *const fc = &cm->fc; |
88 FRAME_COUNTS *const counts = &cm->counts; | 88 FRAME_COUNTS *const counts = &cm->counts; |
89 const int ref = is_inter_block(&xd->mi_8x8[0]->mbmi); | 89 const int ref = is_inter_block(&xd->mi[0]->mbmi); |
90 int band, c = 0; | 90 int band, c = 0; |
91 const vp9_prob (*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = | 91 const vp9_prob (*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = |
92 fc->coef_probs[tx_size][type][ref]; | 92 fc->coef_probs[tx_size][type][ref]; |
93 const vp9_prob *prob; | 93 const vp9_prob *prob; |
94 unsigned int (*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1] = | 94 unsigned int (*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1] = |
95 counts->coef[tx_size][type][ref]; | 95 counts->coef[tx_size][type][ref]; |
96 unsigned int (*eob_branch_count)[COEFF_CONTEXTS] = | 96 unsigned int (*eob_branch_count)[COEFF_CONTEXTS] = |
97 counts->eob_branch[tx_size][type][ref]; | 97 counts->eob_branch[tx_size][type][ref]; |
98 uint8_t token_cache[32 * 32]; | 98 uint8_t token_cache[32 * 32]; |
99 const uint8_t *cat6; | 99 const uint8_t *cat6; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 pd->left_context + y); | 202 pd->left_context + y); |
203 const scan_order *so = get_scan(xd, tx_size, pd->plane_type, block); | 203 const scan_order *so = get_scan(xd, tx_size, pd->plane_type, block); |
204 const int eob = decode_coefs(cm, xd, pd->plane_type, | 204 const int eob = decode_coefs(cm, xd, pd->plane_type, |
205 BLOCK_OFFSET(pd->dqcoeff, block), tx_size, | 205 BLOCK_OFFSET(pd->dqcoeff, block), tx_size, |
206 pd->dequant, ctx, so->scan, so->neighbors, r); | 206 pd->dequant, ctx, so->scan, so->neighbors, r); |
207 vp9_set_contexts(xd, pd, plane_bsize, tx_size, eob > 0, x, y); | 207 vp9_set_contexts(xd, pd, plane_bsize, tx_size, eob > 0, x, y); |
208 return eob; | 208 return eob; |
209 } | 209 } |
210 | 210 |
211 | 211 |
OLD | NEW |