ref: 66fb246219bbb26467f1cc6fa046b12701c4c326
parent: 095abafcb7b7e64a7a9fe58e789aa9f03ceeb669
author: Jean-Marc Valin <[email protected]>
date: Sun Jun 14 08:31:33 EDT 2009
removing redundant calls to exp2()
--- a/libcelt/quant_bands.c
+++ b/libcelt/quant_bands.c
@@ -192,12 +192,12 @@
offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384);
#endif
oldEBands[i] += offset;
+ eBands[i] = log2Amp(oldEBands[i]);
bits_left--;
}
}
for (i=0;i<m->nbEBands;i++)
{
- eBands[i] = log2Amp(oldEBands[i]);
if (oldEBands[i] < -QCONST16(7.f,8))
oldEBands[i] = -QCONST16(7.f,8);
}
@@ -280,12 +280,12 @@
offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384);
#endif
oldEBands[i] += offset;
+ eBands[i] = log2Amp(oldEBands[i]);
bits_left--;
}
}
for (i=0;i<m->nbEBands;i++)
{
- eBands[i] = log2Amp(oldEBands[i]);
if (oldEBands[i] < -QCONST16(7.f,8))
oldEBands[i] = -QCONST16(7.f,8);
}