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

jm at svn.xiph.org jm at svn.xiph.org
Wed Aug 2 03:13:46 PDT 2006


Author: jm
Date: 2006-08-02 03:13:43 -0700 (Wed, 02 Aug 2006)
New Revision: 11727

Modified:
   trunk/speex/libspeex/filters.c
   trunk/speex/libspeex/filters.h
Log:
cleaning up the IO filters


Modified: trunk/speex/libspeex/filters.c
===================================================================
--- trunk/speex/libspeex/filters.c	2006-08-02 03:29:59 UTC (rev 11726)
+++ trunk/speex/libspeex/filters.c	2006-08-02 10:13:43 UTC (rev 11727)
@@ -77,13 +77,11 @@
    /*return;*/
    for (i=0;i<len;i++)
    {
-      spx_word16_t xi, yi, nyi;
+      spx_word16_t yi;
       spx_word32_t vout = ADD32(MULT16_16(num[0], x[i]),mem[0]);
-      xi = x[i];
       yi = EXTRACT16(SATURATE(PSHR32(vout,14),32767));
-      nyi = NEG16(yi);
-      mem[0] = ADD32(MAC16_16(mem[1], num[1],xi), MULT16_32_Q14(-den[1],vout));
-      mem[1] = ADD32(MULT16_16(num[2],xi), MULT16_32_Q14(-den[2],vout));
+      mem[0] = ADD32(MAC16_16(mem[1], num[1],x[i]), MULT16_32_Q14(-den[1],vout));
+      mem[1] = ADD32(MULT16_16(num[2],x[i]), MULT16_32_Q14(-den[2],vout));
       y[i] = yi;
    }
 }

Modified: trunk/speex/libspeex/filters.h
===================================================================
--- trunk/speex/libspeex/filters.h	2006-08-02 03:29:59 UTC (rev 11726)
+++ trunk/speex/libspeex/filters.h	2006-08-02 10:13:43 UTC (rev 11727)
@@ -49,6 +49,13 @@
 #endif
 
 
+#define HIGHPASS_NARROWBAND 0
+#define HIGHPASS_WIDEBAND 2
+#define HIGHPASS_INPUT 0
+#define HIGHPASS_OUTPUT 1
+void highpass(const spx_word16_t *x, spx_word16_t *y, int len, int filtID, spx_mem_t *mem);
+
+
 void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_sig_t *, spx_sig_t *y2, int N, int M, spx_word16_t *mem, char *stack);
 void fir_mem_up(const spx_sig_t *x, const spx_word16_t *a, spx_sig_t *y, int N, int M, spx_word32_t *mem, char *stack);
 



More information about the commits mailing list