Skip to content
Snippets Groups Projects
Commit 0828b650 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

fixed-point: using MULT16_16 instead of * in compute_band_energies()

parent fd8fda99
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ void compute_band_energies(const CELTMode *m, const celt_sig_t *X, celt_ener_t *
{
int shift = celt_ilog2(maxval)-10;
for (j=B*eBands[i];j<B*eBands[i+1];j++)
sum += VSHR32(X[j*C+c],shift)*VSHR32(X[j*C+c],shift);
sum += MULT16_16(EXTRACT16(VSHR32(X[j*C+c],shift)),EXTRACT16(VSHR32(X[j*C+c],shift)));
/* We're adding one here to make damn sure we never end up with a pitch vector that's
larger than unity norm */
bank[i*C+c] = EPSILON+VSHR32(EXTEND32(celt_sqrt(sum)),-shift);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment