shithub: opus

Download patch

ref: fa14707713d102a4e6d9aea4c3ff53677aa925eb
parent: ed90daef3e6f64b931647906e2b6dcf8345085c2
author: Jean-Marc Valin <[email protected]>
date: Fri Apr 18 06:59:03 EDT 2008

Removed implicit 32=>16 conversion (changed to EXTRACT16)

--- a/libcelt/pitch.c
+++ b/libcelt/pitch.c
@@ -169,8 +169,8 @@
       /* weight = 1/sqrt(curve) */
       n = celt_rsqrt(EPSILON+curve[i]);
       /* Pre-multiply X by n, so we can keep everything in 16 bits */
-      Xr = SHR32(MULT16_16(n, X[2*i  ]),3);
-      Xi = SHR32(MULT16_16(n, X[2*i+1]),3);
+      Xr = EXTRACT16(SHR32(MULT16_16(n, X[2*i  ]),3));
+      Xi = EXTRACT16(SHR32(MULT16_16(n, X[2*i+1]),3));
       /* Cross-spectrum between X and conj(Y) */
       X[2*i]   = ADD16(MULT16_16_Q15(Xr, Y[2*i  ]), MULT16_16_Q15(Xi,Y[2*i+1]));
       X[2*i+1] = SUB16(MULT16_16_Q15(Xr, Y[2*i+1]), MULT16_16_Q15(Xi,Y[2*i  ]));