shithub: opus

Download patch

ref: 72a554775facd90985235d2c0505d1a1ff9ddbd8
parent: d121260f38f13d83c0e2146114eeca144183f5f1
author: Jean-Marc Valin <[email protected]>
date: Tue Jan 25 10:58:58 EST 2011

Oops, fixed the sqrt(2) constant for anti_collapse()

--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -258,7 +258,7 @@
          else
             r = 0;
          if (LM==3)
-            r = MULT16_16_Q15(QCONST16(.70710678f,15), r);
+            r = MULT16_16_Q14(QCONST16(1.41421356f,14), r);
          r = SHR16(MIN16(thresh, r),1);
          r = SHR32(MULT16_16_Q15(sqrt_1, r),shift);
 #else
@@ -266,7 +266,7 @@
             short blocks don't have the same energy as long */
          r = 2.f*celt_exp2(-Ediff);
          if (LM==3)
-            r *= .70710678f;
+            r *= 1.41421356f;
          r = MIN16(thresh, r);
          r = r*sqrt_1;
 #endif