[xiph-cvs] cvs commit: speex/libspeex filters.c

Jean-Marc Valin jm at xiph.org
Mon Nov 10 09:17:33 PST 2003



jm          03/11/10 12:17:33

  Modified:    libspeex filters.c
  Log:
  fixed-point: integerized bandwidth expansion

Revision  Changes    Path
1.57      +18 -0     speex/libspeex/filters.c

Index: filters.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/filters.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- filters.c	10 Nov 2003 08:57:27 -0000	1.56
+++ filters.c	10 Nov 2003 17:17:33 -0000	1.57
@@ -36,6 +36,21 @@
 #include "misc.h"
 #include "math_approx.h"
 
+
+#ifdef FIXED_POINT
+void bw_lpc(float gamma, spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order)
+{
+   int i;
+   lpc_out[0] = lpc_in[0];
+   spx_word16_t g=gamma*32768;
+   spx_word16_t tmp=g;
+   for (i=1;i<order+1;i++)
+   {
+      lpc_out[i] = MULT16_16_Q15(tmp,lpc_in[i]);
+      tmp = MULT16_16_Q15(tmp, g);
+   }
+}
+#else
 void bw_lpc(float gamma, spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order)
 {
    int i;
@@ -47,6 +62,9 @@
    }
 }
 
+#endif
+
+
 #ifdef FIXED_POINT
 
 /* FIXME: These functions are ugly and probably might too much error */

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list