Commit 4305dd47 authored by Paul Wilkins's avatar Paul Wilkins
Browse files

Avoid calls to get_coef_band().

Use value already computed value to save of calls

Change-Id: I42836698e59c116416ccd75395bebdd11dd609fb
parent dd9dc0e9
...@@ -62,7 +62,7 @@ DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]); ...@@ -62,7 +62,7 @@ DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]);
#define INCREMENT_COUNT(token) \ #define INCREMENT_COUNT(token) \
do { \ do { \
coef_counts[type][ref][get_coef_band(scan, txfm_size, c)] \ coef_counts[type][ref][band] \
[pt][token]++; \ [pt][token]++; \
token_cache[scan[c]] = token; \ token_cache[scan[c]] = token; \
} while (0) } while (0)
...@@ -96,6 +96,7 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd, ...@@ -96,6 +96,7 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
ENTROPY_CONTEXT above_ec, left_ec; ENTROPY_CONTEXT above_ec, left_ec;
FRAME_CONTEXT *const fc = &dx->common.fc; FRAME_CONTEXT *const fc = &dx->common.fc;
int pt, c = 0, pad, default_eob; int pt, c = 0, pad, default_eob;
int band;
vp9_coeff_probs *coef_probs; vp9_coeff_probs *coef_probs;
vp9_prob *prob; vp9_prob *prob;
vp9_coeff_count *coef_counts; vp9_coeff_count *coef_counts;
...@@ -162,7 +163,6 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd, ...@@ -162,7 +163,6 @@ static int decode_coefs(VP9D_COMP *dx, const MACROBLOCKD *xd,
while (1) { while (1) {
int val; int val;
int band;
const uint8_t *cat6 = cat6_prob; const uint8_t *cat6 = cat6_prob;
if (c >= seg_eob) if (c >= seg_eob)
break; break;
...@@ -249,8 +249,7 @@ SKIP_START: ...@@ -249,8 +249,7 @@ SKIP_START:
} }
if (c < seg_eob) if (c < seg_eob)
coef_counts[type][ref][get_coef_band(scan, txfm_size, c)] coef_counts[type][ref][band][pt][DCT_EOB_TOKEN]++;
[pt][DCT_EOB_TOKEN]++;
for (pt = 0; pt < (1 << txfm_size); pt++) { for (pt = 0; pt < (1 << txfm_size); pt++) {
A[pt] = L[pt] = c > 0; A[pt] = L[pt] = c > 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment