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

jm at svn.xiph.org jm at svn.xiph.org
Sat Jun 10 21:24:05 PDT 2006


Author: jm
Date: 2006-06-10 21:24:03 -0700 (Sat, 10 Jun 2006)
New Revision: 11558

Modified:
   trunk/speex/libspeex/filters_bfin.h
Log:
Patch by David Rowe -- make bfin version of filter_mem2 and iir_mem2 use
the standard scratch memory allocator


Modified: trunk/speex/libspeex/filters_bfin.h
===================================================================
--- trunk/speex/libspeex/filters_bfin.h	2006-06-11 04:16:58 UTC (rev 11557)
+++ trunk/speex/libspeex/filters_bfin.h	2006-06-11 04:24:03 UTC (rev 11558)
@@ -221,11 +221,17 @@
 #define OVERRIDE_FILTER_MEM16
 void filter_mem16(const spx_word16_t *_x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *_y, int N, int ord, spx_mem_t *mem, char *stack)
 {
-   spx_word32_t xy2[N+1];
-   spx_word32_t *xy = xy2+1;
-   spx_word32_t numden_a[2*ord+2];
-   spx_word16_t *numden = (spx_word16_t*) numden_a;
+   VARDECL(spx_word32_t *xy2);
+   VARDECL(spx_word32_t *numden_a);
+   spx_word32_t *xy;
+   spx_word16_t *numden;
    int i;
+
+   ALLOC(xy2, (N+1), spx_word32_t);
+   ALLOC(numden_a, (2*ord+2), spx_word32_t);
+   xy = xy2+1;  
+   numden = (spx_word16_t*) numden_a;
+
    for (i=0;i<ord;i++)
    {
       numden[2*i] = num[i];
@@ -484,9 +490,12 @@
 #define OVERRIDE_IIR_MEM16
 void iir_mem16(const spx_word16_t *_x, const spx_coef_t *den, spx_word16_t *_y, int N, int ord, spx_mem_t *mem, char *stack)
 {
-   spx_word16_t y[N+2];
+   VARDECL(spx_word16_t *y);
    spx_word16_t *yy;
+
+   ALLOC(y, (N+2), spx_word16_t);
    yy = y+2;
+
    __asm__ __volatile__
    (
    /* Register setup */



More information about the commits mailing list