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

jm at motherfish-iii.xiph.org jm at motherfish-iii.xiph.org
Wed Feb 16 21:42:34 PST 2005


Author: jm
Date: 2005-02-16 21:42:33 -0800 (Wed, 16 Feb 2005)
New Revision: 8940

Modified:
   trunk/speex/libspeex/ltp.c
Log:
oops, that should fix the float version


Modified: trunk/speex/libspeex/ltp.c
===================================================================
--- trunk/speex/libspeex/ltp.c	2005-02-17 03:35:34 UTC (rev 8939)
+++ trunk/speex/libspeex/ltp.c	2005-02-17 05:42:33 UTC (rev 8940)
@@ -485,8 +485,11 @@
    
    err=0;
    for (i=0;i<nsf;i++)
-      err+=(target[i]-gain[2]*x[0][i]-gain[1]*x[1][i]-gain[0]*x[2][i])
-      * (target[i]-gain[2]*x[0][i]-gain[1]*x[1][i]-gain[0]*x[2][i]);
+   {
+      spx_sig_t tmp = gain[2]*x[0][i]+gain[1]*x[1][i]+gain[0]*x[2][i];
+      new_target[i] = target[i] - tmp;
+      err+=new_target[i]*new_target[i];
+   }
 #endif
 
    return err;



More information about the commits mailing list