shithub: opus

Download patch

ref: 0773fec4ad5647bb84e3d8ce401a715342c83456
parent: 71a84590e705ed4a985b2b67445f758dc22848db
author: Jean-Marc Valin <[email protected]>
date: Fri Mar 14 12:28:28 EDT 2008

fixed-point: fixed a 16-bit issue in normalise_bands() where Q15ONE was directly
shifted left

--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -125,7 +125,7 @@
          shift = celt_ilog2(bank[i*C+c])-13;
          E = VSHR32(bank[i*C+c], shift);
          if (E>0)
-            g = DIV32_16(SHL32(Q15ONE,13),MULT16_16_Q14(E,sqrtC_1[C-1]));
+            g = DIV32_16(QCONST32(1.f,28),MULT16_16_Q14(E,sqrtC_1[C-1]));
          else
             g = 0;
          for (j=B*eBands[i];j<B*eBands[i+1];j++)