ref: 4610d183056f5589caee043f598676ffdc1b68ea
parent: de79c378bde36f1a37278046788a9a4d84a55aa5
author: Jean-Marc Valin <[email protected]>
date: Wed Jan 26 05:00:28 EST 2011
Should avoid running log2Amp on uninitialized data
--- a/libcelt/quant_bands.c
+++ b/libcelt/quant_bands.c
@@ -545,12 +545,16 @@
const int C = CHANNELS(_C);
c=0;
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]
+ SHL16((celt_word16)eMeans[i],6);
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);
}