| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 assert(0); | 183 assert(0); |
| 184 return -1; | 184 return -1; |
| 185 } | 185 } |
| 186 #else | 186 #else |
| 187 val = CAT6_MIN_VAL + read_coeff(cat6_prob, 14, r); | 187 val = CAT6_MIN_VAL + read_coeff(cat6_prob, 14, r); |
| 188 #endif | 188 #endif |
| 189 break; | 189 break; |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 v = (val * dqv) >> dq_shift; | 192 v = (val * dqv) >> dq_shift; |
| 193 #if CONFIG_COEFFICIENT_RANGE_CHECKING |
| 194 dqcoeff[scan[c]] = check_range(vp9_read_bit(r) ? -v : v); |
| 195 #else |
| 193 dqcoeff[scan[c]] = vp9_read_bit(r) ? -v : v; | 196 dqcoeff[scan[c]] = vp9_read_bit(r) ? -v : v; |
| 197 #endif |
| 194 token_cache[scan[c]] = vp9_pt_energy_class[token]; | 198 token_cache[scan[c]] = vp9_pt_energy_class[token]; |
| 195 ++c; | 199 ++c; |
| 196 ctx = get_coef_context(nb, token_cache, c); | 200 ctx = get_coef_context(nb, token_cache, c); |
| 197 dqv = dq[1]; | 201 dqv = dq[1]; |
| 198 } | 202 } |
| 199 | 203 |
| 200 return c; | 204 return c; |
| 201 } | 205 } |
| 202 | 206 |
| 203 int vp9_decode_block_tokens(VP9_COMMON *cm, MACROBLOCKD *xd, | 207 int vp9_decode_block_tokens(VP9_COMMON *cm, MACROBLOCKD *xd, |
| 204 int plane, int block, BLOCK_SIZE plane_bsize, | 208 int plane, int block, BLOCK_SIZE plane_bsize, |
| 205 int x, int y, TX_SIZE tx_size, vp9_reader *r) { | 209 int x, int y, TX_SIZE tx_size, vp9_reader *r) { |
| 206 struct macroblockd_plane *const pd = &xd->plane[plane]; | 210 struct macroblockd_plane *const pd = &xd->plane[plane]; |
| 207 const int ctx = get_entropy_context(tx_size, pd->above_context + x, | 211 const int ctx = get_entropy_context(tx_size, pd->above_context + x, |
| 208 pd->left_context + y); | 212 pd->left_context + y); |
| 209 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); |
| 210 const int eob = decode_coefs(cm, xd, pd->plane_type, | 214 const int eob = decode_coefs(cm, xd, pd->plane_type, |
| 211 BLOCK_OFFSET(pd->dqcoeff, block), tx_size, | 215 BLOCK_OFFSET(pd->dqcoeff, block), tx_size, |
| 212 pd->dequant, ctx, so->scan, so->neighbors, r); | 216 pd->dequant, ctx, so->scan, so->neighbors, r); |
| 213 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); |
| 214 return eob; | 218 return eob; |
| 215 } | 219 } |
| 216 | 220 |
| 217 | 221 |
| OLD | NEW |