shithub: opus

Download patch

ref: c7635b45f48b730985b00615806d4b37d47afc67
parent: a733f08eb58f4ddec0441c34a75c106963432817
author: Jean-Marc Valin <[email protected]>
date: Thu Dec 4 18:26:32 EST 2008

New VQ search works in fixed-point even though there's still some float ops left

--- a/libcelt/vq.c
+++ b/libcelt/vq.c
@@ -148,9 +148,9 @@
       sum = K/(EPSILON+sum);
       j=0; do {
          iy[j] = floor(sum*X[j]);
-         y[j] = iy[j];
-         yy += y[j]*y[j];
-         xy += X[j]*y[j];
+         y[j] = SHL16(iy[j],yshift);
+         yy = MAC16_16(yy, y[j],y[j]);
+         xy = MAC16_16(xy, X[j],y[j]);
          yp += P[j]*y[j];
          y[j] *= 2;;
          pulsesLeft -= iy[j];