[xiph-commits] r11469 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Tue May 30 09:31:55 PDT 2006


Author: jm
Date: 2006-05-30 09:31:52 -0700 (Tue, 30 May 2006)
New Revision: 11469

Modified:
   trunk/speex/libspeex/lsp.c
Log:
David's lsp patch broke the float version. It's fixed now.


Modified: trunk/speex/libspeex/lsp.c
===================================================================
--- trunk/speex/libspeex/lsp.c	2006-05-30 16:22:49 UTC (rev 11468)
+++ trunk/speex/libspeex/lsp.c	2006-05-30 16:31:52 UTC (rev 11469)
@@ -138,7 +138,6 @@
 {
    int k;
    float b0, b1, tmp;
-   int m2=m>>1;
 
    /* Initial conditions */
    b0=0; /* b_(m+1) */
@@ -147,14 +146,14 @@
    x*=2;
 
    /* Calculate the b_(k) */
-   for(k=m2;k>0;k--)
+   for(k=m;k>0;k--)
    {
       tmp=b0;                           /* tmp holds the previous value of b0 */
-      b0=x*b0-b1+coef[m2-k];    /* b0 holds its new value based on b0 and b1 */
+      b0=x*b0-b1+coef[m-k];    /* b0 holds its new value based on b0 and b1 */
       b1=tmp;                           /* b1 holds the previous value of b0 */
    }
 
-   return(-b1+.5*x*b0+coef[m2]);
+   return(-b1+.5*x*b0+coef[m]);
 }
 #endif
 



More information about the commits mailing list