detokenization speedups
removed unnecessary ifs and branches .. Change-Id: Id1698a35292659388f48926791024d1400f2cea9
This commit is contained in:
parent
b38e42fe9d
commit
70ffd5d055
@ -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_
|
||||
|
Loading…
x
Reference in New Issue
Block a user