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

jm at svn.xiph.org jm at svn.xiph.org
Mon May 8 05:14:24 PDT 2006


Author: jm
Date: 2006-05-08 05:14:15 -0700 (Mon, 08 May 2006)
New Revision: 11375

Modified:
   trunk/speex/libspeex/filters.c
Log:
removed an "if" from the enhancer inner loop


Modified: trunk/speex/libspeex/filters.c
===================================================================
--- trunk/speex/libspeex/filters.c	2006-05-08 11:22:31 UTC (rev 11374)
+++ trunk/speex/libspeex/filters.c	2006-05-08 12:14:15 UTC (rev 11375)
@@ -683,12 +683,16 @@
    {
       for (j=0;j<7;j++)
       {
+         int i1, i2;
+         i1 = 3-j;
+         if (i1<0)
+            i1 = 0;
+         i2 = 10-j;
+         if (i2>7)
+            i2 = 7;
          spx_word32_t tmp=0;
-         for (k=0;k<7;k++)
-         {
-            if (j+k-3 >= 0 && j+k-3 < 7)
-               tmp += MULT16_32_Q15(shift_filt[i][k],corr[0][j+k-3]);
-         }
+         for (k=i1;k<i2;k++)
+            tmp += MULT16_32_Q15(shift_filt[i][k],corr[0][j+k-3]);
          corr[i+1][j] = tmp;
       }
    }



More information about the commits mailing list