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

jm at svn.xiph.org jm at svn.xiph.org
Thu Dec 8 01:28:12 PST 2005


Author: jm
Date: 2005-12-08 01:28:10 -0800 (Thu, 08 Dec 2005)
New Revision: 10566

Modified:
   trunk/speex/libspeex/mdf.c
Log:
cleanup


Modified: trunk/speex/libspeex/mdf.c
===================================================================
--- trunk/speex/libspeex/mdf.c	2005-12-08 08:56:25 UTC (rev 10565)
+++ trunk/speex/libspeex/mdf.c	2005-12-08 09:28:10 UTC (rev 10566)
@@ -448,37 +448,34 @@
       //if(1)
       if (j==M-1 || st->cancel_count%(M-1) == j)
       {
-         float w[N];
+         spx_word16_t w[N];
 #ifdef FIXED_POINT
-         float w2[N];
+         spx_word16_t w2[N];
          for (i=0;i<N;i++)
-            w2[i] = .03125*st->W[j*N+i];
-         spx_ifft_float(st->fft_table, w2, w);
+            w2[i] = PSHR16(st->W[j*N+i],5);
+         spx_ifft(st->fft_table, w2, w);
          for (i=0;i<st->frame_size;i++)
          {
             w[i]=0;
          }
          for (i=st->frame_size;i<N;i++)
          {
-            w[i]*=4;
+            w[i]=SHL(w[i],2);
          }
-         spx_fft_float(st->fft_table, w, w2);
+         spx_fft(st->fft_table, w, w2);
          for (i=0;i<N;i++)
          {
-            w2[i]*=.25;
+            w2[i]=PSHR(w2[i],4);
          }
          for (i=0;i<N;i++)
-            st->W[j*N+i] -= 32*w2[i];
+            st->W[j*N+i] -= SHL16(w2[i],5);
 #else
-         float w2[N];
-         fixed_point = 0;
-         spx_ifft_float(st->fft_table, &st->W[j*N], w);
+         spx_ifft(st->fft_table, &st->W[j*N], w);
          for (i=st->frame_size;i<N;i++)
          {
             w[i]=0;
          }
-         spx_fft_float(st->fft_table, w, &st->W[j*N]);
-         fixed_point=1;
+         spx_fft(st->fft_table, w, &st->W[j*N]);
 #endif
       }
    }



More information about the commits mailing list