| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 const int segment_id = mbmi->segment_id; | 225 const int segment_id = mbmi->segment_id; |
| 226 const int16_t *scan, *nb; | 226 const int16_t *scan, *nb; |
| 227 const scan_order *so; | 227 const scan_order *so; |
| 228 const int ref = is_inter_block(mbmi); | 228 const int ref = is_inter_block(mbmi); |
| 229 unsigned int (*const counts)[COEFF_CONTEXTS][ENTROPY_TOKENS] = | 229 unsigned int (*const counts)[COEFF_CONTEXTS][ENTROPY_TOKENS] = |
| 230 cpi->coef_counts[tx_size][type][ref]; | 230 cpi->coef_counts[tx_size][type][ref]; |
| 231 vp9_prob (*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = | 231 vp9_prob (*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] = |
| 232 cpi->common.fc.coef_probs[tx_size][type][ref]; | 232 cpi->common.fc.coef_probs[tx_size][type][ref]; |
| 233 unsigned int (*const eob_branch)[COEFF_CONTEXTS] = | 233 unsigned int (*const eob_branch)[COEFF_CONTEXTS] = |
| 234 cpi->common.counts.eob_branch[tx_size][type][ref]; | 234 cpi->common.counts.eob_branch[tx_size][type][ref]; |
| 235 | |
| 236 const uint8_t *const band = get_band_translate(tx_size); | 235 const uint8_t *const band = get_band_translate(tx_size); |
| 237 const int seg_eob = get_tx_eob(&cpi->common.seg, segment_id, tx_size); | 236 const int seg_eob = get_tx_eob(&cpi->common.seg, segment_id, tx_size); |
| 238 | 237 |
| 239 int aoff, loff; | 238 int aoff, loff; |
| 240 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &aoff, &loff); | 239 txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &aoff, &loff); |
| 241 | 240 |
| 242 pt = get_entropy_context(tx_size, pd->above_context + aoff, | 241 pt = get_entropy_context(tx_size, pd->above_context + aoff, |
| 243 pd->left_context + loff); | 242 pd->left_context + loff); |
| 244 so = get_scan(xd, tx_size, type, block); | 243 so = get_scan(xd, tx_size, type, block); |
| 245 scan = so->scan; | 244 scan = so->scan; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 | 286 |
| 288 struct is_skippable_args { | 287 struct is_skippable_args { |
| 289 MACROBLOCK *x; | 288 MACROBLOCK *x; |
| 290 int *skippable; | 289 int *skippable; |
| 291 }; | 290 }; |
| 292 | 291 |
| 293 static void is_skippable(int plane, int block, | 292 static void is_skippable(int plane, int block, |
| 294 BLOCK_SIZE plane_bsize, TX_SIZE tx_size, | 293 BLOCK_SIZE plane_bsize, TX_SIZE tx_size, |
| 295 void *argv) { | 294 void *argv) { |
| 296 struct is_skippable_args *args = argv; | 295 struct is_skippable_args *args = argv; |
| 296 (void)plane_bsize; |
| 297 (void)tx_size; |
| 297 args->skippable[0] &= (!args->x->plane[plane].eobs[block]); | 298 args->skippable[0] &= (!args->x->plane[plane].eobs[block]); |
| 298 } | 299 } |
| 299 | 300 |
| 300 int vp9_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { | 301 int vp9_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { |
| 301 int result = 1; | 302 int result = 1; |
| 302 struct is_skippable_args args = {x, &result}; | 303 struct is_skippable_args args = {x, &result}; |
| 303 vp9_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane, is_skippable, | 304 vp9_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane, is_skippable, |
| 304 &args); | 305 &args); |
| 305 return result; | 306 return result; |
| 306 } | 307 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 325 } | 326 } |
| 326 | 327 |
| 327 if (!dry_run) { | 328 if (!dry_run) { |
| 328 cm->counts.skip[ctx][0] += skip_inc; | 329 cm->counts.skip[ctx][0] += skip_inc; |
| 329 vp9_foreach_transformed_block(xd, bsize, tokenize_b, &arg); | 330 vp9_foreach_transformed_block(xd, bsize, tokenize_b, &arg); |
| 330 } else { | 331 } else { |
| 331 vp9_foreach_transformed_block(xd, bsize, set_entropy_context_b, &arg); | 332 vp9_foreach_transformed_block(xd, bsize, set_entropy_context_b, &arg); |
| 332 *t = t_backup; | 333 *t = t_backup; |
| 333 } | 334 } |
| 334 } | 335 } |
| OLD | NEW |