forked from len0rd/rockbox
Rearrange loop to avoid one branch per iteration.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21988 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bebd3f735b
commit
c062259216
1 changed files with 13 additions and 7 deletions
|
|
@ -174,6 +174,11 @@ static void scalar_dequant_math(COOKContext *q, int index,
|
|||
FIXP f;
|
||||
int i;
|
||||
|
||||
|
||||
if(s >= 64)
|
||||
mlt_p[i]=0;
|
||||
else
|
||||
{
|
||||
for(i=0 ; i<SUBBAND_SIZE ; i++) {
|
||||
f = table[subband_coef_index[i]];
|
||||
/* noise coding if subband_coef_index[i] == 0 */
|
||||
|
|
@ -181,7 +186,8 @@ static void scalar_dequant_math(COOKContext *q, int index,
|
|||
((subband_coef_index[i] != 0) && subband_coef_sign[i]))
|
||||
f = -f;
|
||||
|
||||
mlt_p[i] = (s >= 64) ? 0 : fixp_pow2(f, -(s/2));
|
||||
mlt_p[i] =fixp_pow2(f, -(s/2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue