Commit 70ffd5d0 authored by Jim Bankoski's avatar Jim Bankoski

detokenization speedups

removed unnecessary ifs and branches ..

Change-Id: Id1698a35292659388f48926791024d1400f2cea9
parent b38e42fe
......@@ -81,6 +81,7 @@ static const int token_to_counttoken[MAX_ENTROPY_TOKENS] = {
INCREMENT_COUNT(token); \
token_cache[scan[c]] = vp9_pt_energy_class[token]; \
++c; \
pt = get_coef_context(nb, token_cache, c); \
dqv = dq[1]; \
continue; \
}
......@@ -118,30 +119,24 @@ static int decode_coefs(VP9_COMMON *cm, const MACROBLOCKD *xd,
while (c < seg_eob) {
int val;
if (c)
pt = get_coef_context(nb, token_cache, c);
band = *band_translate++;
prob = coef_probs[band][pt];
if (!cm->frame_parallel_decoding_mode)
++eob_branch_count[band][pt];
if (!vp9_read(r, prob[EOB_CONTEXT_NODE]))
break;
goto DECODE_ZERO;
SKIP_START:
if (c >= seg_eob)
break;
if (c)
pt = get_coef_context(nb, token_cache, c);
band = *band_translate++;
prob = coef_probs[band][pt];
DECODE_ZERO:
if (!vp9_read(r, prob[ZERO_CONTEXT_NODE])) {
INCREMENT_COUNT(ZERO_TOKEN);
dqv = dq[1];
++c;
goto SKIP_START;
if (c >= seg_eob)
break;
pt = get_coef_context(nb, token_cache, c);
band = *band_translate++;
prob = coef_probs[band][pt];
goto DECODE_ZERO;
}
// ONE_CONTEXT_NODE_0_
......
Markdown is supported
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