Should avoid running log2Amp on uninitialized data
This commit is contained in:
parent
de79c378bd
commit
4610d18305
1 changed files with 5 additions and 1 deletions
|
@ -545,12 +545,16 @@ void log2Amp(const CELTMode *m, int start, int end,
|
||||||
const int C = CHANNELS(_C);
|
const int C = CHANNELS(_C);
|
||||||
c=0;
|
c=0;
|
||||||
do {
|
do {
|
||||||
for (i=start;i<m->nbEBands;i++)
|
for (i=0;i<start;i++)
|
||||||
|
eBands[i+c*m->nbEBands] = 0;
|
||||||
|
for (;i<end;i++)
|
||||||
{
|
{
|
||||||
celt_word16 lg = oldEBands[i+c*m->nbEBands]
|
celt_word16 lg = oldEBands[i+c*m->nbEBands]
|
||||||
+ SHL16((celt_word16)eMeans[i],6);
|
+ SHL16((celt_word16)eMeans[i],6);
|
||||||
eBands[i+c*m->nbEBands] = PSHR32(celt_exp2(SHL16(lg,11-DB_SHIFT)),4);
|
eBands[i+c*m->nbEBands] = PSHR32(celt_exp2(SHL16(lg,11-DB_SHIFT)),4);
|
||||||
}
|
}
|
||||||
|
for (;i<m->nbEBands;i++)
|
||||||
|
eBands[i+c*m->nbEBands] = 0;
|
||||||
} while (++c < C);
|
} while (++c < C);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue