shithub: opus

Download patch

ref: 18335e8e4d6ddb289b31d8a4a362f5e15c24ff0a
parent: b4d0df8ddee3b555369c571a60d76360e1ecfd86
author: Jean-Marc Valin <[email protected]>
date: Mon Aug 15 15:50:45 EDT 2016

Removed a float operation that sneaked in in the fixed-point code

--- a/celt/vq.c
+++ b/celt/vq.c
@@ -210,8 +210,12 @@
          while (++j<N);
          sum = QCONST16(1.f,14);
       }
+#ifdef FIXED_POINT
+      rcp = EXTRACT16(MULT16_32_Q16(K, celt_rcp(sum)));
+#else
       /* Using K+e with e < 1 guarantees we cannot get more than K pulses. */
       rcp = EXTRACT16(MULT16_32_Q16(K+0.8, celt_rcp(sum)));
+#endif
       j=0; do {
 #ifdef FIXED_POINT
          /* It's really important to round *towards zero* here */