Switch iteration over channels to the do{}while(); construct in order to inform the compiler that the these loops execute at least once. (This results in more intelligent output from the clang static analysis tool and should also produce faster code on at least some architectures.)
This commit is contained in:
parent
60c316b419
commit
9743bf38ca
3 changed files with 56 additions and 68 deletions
|
@ -74,14 +74,13 @@ static int intra_decision(const celt_word16 *eBands, celt_word16 *oldEBands, int
|
|||
{
|
||||
int c, i;
|
||||
celt_word32 dist = 0;
|
||||
for (c=0;c<C;c++)
|
||||
{
|
||||
c=0; do {
|
||||
for (i=start;i<end;i++)
|
||||
{
|
||||
celt_word16 d = SHR16(SUB16(eBands[i+c*len], oldEBands[i+c*len]),2);
|
||||
dist = MAC16_16(dist, d,d);
|
||||
}
|
||||
}
|
||||
} while (++c<C);
|
||||
return SHR32(dist,2*DB_SHIFT-4) > 2*C*(end-start);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue