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

jm at svn.xiph.org jm at svn.xiph.org
Fri Aug 4 05:47:35 PDT 2006


Author: jm
Date: 2006-08-04 05:47:31 -0700 (Fri, 04 Aug 2006)
New Revision: 11731

Modified:
   trunk/speex/libspeex/filters.c
   trunk/speex/libspeex/filters.h
Log:
pseudo-IRS filter (not used yet)


Modified: trunk/speex/libspeex/filters.c
===================================================================
--- trunk/speex/libspeex/filters.c	2006-08-03 09:44:22 UTC (rev 11730)
+++ trunk/speex/libspeex/filters.c	2006-08-04 12:47:31 UTC (rev 11731)
@@ -66,13 +66,16 @@
 {
    int i;
 #ifdef FIXED_POINT
-   const spx_word16_t Pcoef[4][3] = {{16384, -31313, 14991}, {16384, -31569, 15249}, {16384, -31677, 15328}, {16384, -32313, 15947}};
-   const spx_word16_t Zcoef[4][3] = {{15672, -31344, 15672}, {15802, -31601, 15802}, {15847, -31694, 15847}, {16162, -32322, 16162}};
+   const spx_word16_t Pcoef[5][3] = {{16384, -31313, 14991}, {16384, -31569, 15249}, {16384, -31677, 15328}, {16384, -32313, 15947}, {16384, -22446, 6537}};
+   const spx_word16_t Zcoef[5][3] = {{15672, -31344, 15672}, {15802, -31601, 15802}, {15847, -31694, 15847}, {16162, -32322, 16162}, {14418, -28836, 14418}};
 #else
-   const spx_word16_t Pcoef[4][3] = {{1.00000, -1.91120, 0.91498}, {1.00000, -1.92683, 0.93071}, {1.00000, -1.93338, 0.93553}, {1.00000, -1.97226, 0.97332}};
-   const spx_word16_t Zcoef[4][3] = {{0.95654, -1.91309, 0.95654}, {0.96446, -1.92879, 0.96446}, {0.96723, -1.93445, 0.96723}, {0.98645, -1.97277, 0.98645}};
+   const spx_word16_t Pcoef[5][3] = {{1.00000f, -1.91120f, 0.91498f}, {1.00000f, -1.92683f, 0.93071f}, {1.00000f, -1.93338f, 0.93553f}, {1.00000f, -1.97226f, 0.97332f}, {1.00000f, -1.37000f, 0.39900f}};
+   const spx_word16_t Zcoef[5][3] = {{0.95654f, -1.91309f, 0.95654f}, {0.96446f, -1.92879f, 0.96446f}, {0.96723f, -1.93445f, 0.96723f}, {0.98645f, -1.97277f, 0.98645f}, {0.88000f, -1.76000f, 0.88000f}};
 #endif
    const spx_word16_t *den, *num;
+   if (filtID>4)
+      filtID=4;
+   
    den = Pcoef[filtID]; num = Zcoef[filtID];
    /*return;*/
    for (i=0;i<len;i++)

Modified: trunk/speex/libspeex/filters.h
===================================================================
--- trunk/speex/libspeex/filters.h	2006-08-03 09:44:22 UTC (rev 11730)
+++ trunk/speex/libspeex/filters.h	2006-08-04 12:47:31 UTC (rev 11731)
@@ -53,6 +53,8 @@
 #define HIGHPASS_WIDEBAND 2
 #define HIGHPASS_INPUT 0
 #define HIGHPASS_OUTPUT 1
+#define HIGHPASS_IRS 4
+
 void highpass(const spx_word16_t *x, spx_word16_t *y, int len, int filtID, spx_mem_t *mem);
 
 



More information about the commits mailing list