ref: 4305dd4778f7ed3f0859982e2c81d87a98a8f448
parent: dd9dc0e9d65a985ba889e4e87926f23122eb7fa2
author: Paul Wilkins <paulwilkins@google.com>
date: Thu May 9 09:51:15 EDT 2013
Avoid calls to get_coef_band(). Use value already computed value to save of calls Change-Id: I42836698e59c116416ccd75395bebdd11dd609fb
--- a/vp9/decoder/vp9_detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -62,7 +62,7 @@
#define INCREMENT_COUNT(token) \
do { \
- coef_counts[type][ref][get_coef_band(scan, txfm_size, c)] \
+ coef_counts[type][ref][band] \
[pt][token]++; \
token_cache[scan[c]] = token; \
} while (0)
@@ -96,6 +96,7 @@
ENTROPY_CONTEXT above_ec, left_ec;
FRAME_CONTEXT *const fc = &dx->common.fc;
int pt, c = 0, pad, default_eob;
+ int band;
vp9_coeff_probs *coef_probs;
vp9_prob *prob;
vp9_coeff_count *coef_counts;
@@ -162,7 +163,6 @@
while (1) {
int val;
- int band;
const uint8_t *cat6 = cat6_prob;
if (c >= seg_eob)
break;
@@ -249,8 +249,7 @@
}
if (c < seg_eob)
- coef_counts[type][ref][get_coef_band(scan, txfm_size, c)]
- [pt][DCT_EOB_TOKEN]++;
+ coef_counts[type][ref][band][pt][DCT_EOB_TOKEN]++;
for (pt = 0; pt < (1 << txfm_size); pt++) {
A[pt] = L[pt] = c > 0;