[xiph-commits] r11534 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Wed Jun 7 02:42:15 PDT 2006
Author: jm
Date: 2006-06-07 02:42:09 -0700 (Wed, 07 Jun 2006)
New Revision: 11534
Modified:
trunk/speex/libspeex/filters.c
trunk/speex/libspeex/filters.h
trunk/speex/libspeex/filters_bfin.h
trunk/speex/libspeex/ltp.c
trunk/speex/libspeex/nb_celp.c
Log:
Patch by David Rowe: sending the stack parameter to *_mem16() filters.
Modified: trunk/speex/libspeex/filters.c
===================================================================
--- trunk/speex/libspeex/filters.c 2006-06-07 09:27:32 UTC (rev 11533)
+++ trunk/speex/libspeex/filters.c 2006-06-07 09:42:09 UTC (rev 11534)
@@ -319,7 +319,7 @@
#ifdef FIXED_POINT
#ifndef 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)
+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)
{
int i,j;
spx_word16_t xi,yi,nyi;
@@ -338,7 +338,7 @@
}
#endif
#else
-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)
+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)
{
filter_mem2(x, num, den, y, N, ord, mem);
}
@@ -392,7 +392,7 @@
#ifdef FIXED_POINT
#ifndef 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)
+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)
{
int i,j;
spx_word16_t yi,nyi;
@@ -411,7 +411,7 @@
}
#endif
#else
-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)
+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)
{
iir_mem2(x, den, y, N, ord, mem);
}
@@ -464,7 +464,7 @@
#ifdef FIXED_POINT
#ifndef OVERRIDE_FIR_MEM16
-void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem)
+void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
{
int i,j;
spx_word16_t xi,yi;
@@ -483,7 +483,7 @@
}
#endif
#else
-void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem)
+void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
{
fir_mem2(x, num, y, N, ord, mem);
}
Modified: trunk/speex/libspeex/filters.h
===================================================================
--- trunk/speex/libspeex/filters.h 2006-06-07 09:27:32 UTC (rev 11533)
+++ trunk/speex/libspeex/filters.h 2006-06-07 09:42:09 UTC (rev 11534)
@@ -57,9 +57,9 @@
void fir_mem2(const spx_sig_t *x, const spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
void iir_mem2(const spx_sig_t *x, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
-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);
-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);
-void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem);
+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);
+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);
+void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
/* Apply bandwidth expansion on LPC coef */
void bw_lpc(spx_word16_t , const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order);
Modified: trunk/speex/libspeex/filters_bfin.h
===================================================================
--- trunk/speex/libspeex/filters_bfin.h 2006-06-07 09:27:32 UTC (rev 11533)
+++ trunk/speex/libspeex/filters_bfin.h 2006-06-07 09:42:09 UTC (rev 11534)
@@ -230,7 +230,7 @@
#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)
+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;
@@ -493,7 +493,7 @@
#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)
+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];
spx_word16_t *yy;
@@ -627,7 +627,7 @@
}
#define OVERRIDE_FIR_MEM16
-void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem)
+void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
{
int i;
spx_coef_t den2[12];
@@ -635,7 +635,7 @@
den = (spx_coef_t*)((((int)den2)+4)&0xfffffffc);
for (i=0;i<10;i++)
den[i] = 0;
- filter_mem16(x, num, den, y, N, ord, mem);
+ filter_mem16(x, num, den, y, N, ord, mem, stack);
}
Modified: trunk/speex/libspeex/ltp.c
===================================================================
--- trunk/speex/libspeex/ltp.c 2006-06-07 09:27:32 UTC (rev 11533)
+++ trunk/speex/libspeex/ltp.c 2006-06-07 09:42:09 UTC (rev 11534)
@@ -343,10 +343,10 @@
}
for (j=0;j<p;j++)
mm[j] = 0;
- iir_mem16(e, ak, e, nsf, p, mm);
+ iir_mem16(e, ak, e, nsf, p, mm, stack);
for (j=0;j<p;j++)
mm[j] = 0;
- filter_mem16(e, awk1, awk2, e, nsf, p, mm);
+ filter_mem16(e, awk1, awk2, e, nsf, p, mm, stack);
for (j=0;j<nsf;j++)
x[2][j] = e[j];
}
Modified: trunk/speex/libspeex/nb_celp.c
===================================================================
--- trunk/speex/libspeex/nb_celp.c 2006-06-07 09:27:32 UTC (rev 11533)
+++ trunk/speex/libspeex/nb_celp.c 2006-06-07 09:42:09 UTC (rev 11534)
@@ -358,7 +358,7 @@
st->sw[i] = st->winBuf[i];
for (;i<st->frameSize;i++)
st->sw[i] = in[i-st->windowSize+st->frameSize];
- filter_mem16(st->sw, bw_lpc1, bw_lpc2, st->sw, st->frameSize, st->lpcSize, st->mem_sw_whole);
+ filter_mem16(st->sw, bw_lpc1, bw_lpc2, st->sw, st->frameSize, st->lpcSize, st->mem_sw_whole, stack);
open_loop_nbest_pitch(st->sw, st->min_pitch, st->max_pitch, st->frameSize,
nol_pitch, nol_pitch_coef, 6, stack);
@@ -406,7 +406,7 @@
st->exc[i] = st->winBuf[i];
for (;i<st->frameSize;i++)
st->exc[i] = in[i-st->windowSize+st->frameSize];
- fir_mem16(st->exc, interp_lpc, st->exc, st->frameSize, st->lpcSize, st->mem_exc);
+ fir_mem16(st->exc, interp_lpc, st->exc, st->frameSize, st->lpcSize, st->mem_exc, stack);
/* Compute open-loop excitation gain */
#ifdef EPIC_48K
@@ -784,7 +784,7 @@
real_exc[i] = sw[i] = in[i+((sub-1)*st->subframeSize)];
}
}
- fir_mem16(real_exc, interp_qlpc, real_exc, st->subframeSize, st->lpcSize, st->mem_exc2);
+ fir_mem16(real_exc, interp_qlpc, real_exc, st->subframeSize, st->lpcSize, st->mem_exc2, stack);
if (st->complexity==0)
response_bound >>= 1;
@@ -798,23 +798,23 @@
for (i=0;i<st->subframeSize;i++)
ringing[i] = VERY_SMALL;
#ifdef SHORTCUTS2
- iir_mem16(ringing, interp_qlpc, ringing, response_bound, st->lpcSize, mem);
+ iir_mem16(ringing, interp_qlpc, ringing, response_bound, st->lpcSize, mem, stack);
for (i=0;i<st->lpcSize;i++)
mem[i]=SHL32(st->mem_sw[i],1);
- filter_mem16(ringing, st->bw_lpc1, st->bw_lpc2, ringing, response_bound, st->lpcSize, mem);
+ filter_mem16(ringing, st->bw_lpc1, st->bw_lpc2, ringing, response_bound, st->lpcSize, mem, stack);
for (i=response_bound;i<st->subframeSize;i++)
ringing[i]=0;
#else
- iir_mem16(ringing, interp_qlpc, ringing, st->subframeSize, st->lpcSize, mem);
+ iir_mem16(ringing, interp_qlpc, ringing, st->subframeSize, st->lpcSize, mem, stack);
for (i=0;i<st->lpcSize;i++)
mem[i]=SHL32(st->mem_sw[i],1);
- filter_mem16(ringing, bw_lpc1, bw_lpc2, ringing, st->subframeSize, st->lpcSize, mem);
+ filter_mem16(ringing, bw_lpc1, bw_lpc2, ringing, st->subframeSize, st->lpcSize, mem, stack);
#endif
/* Compute weighted signal */
for (i=0;i<st->lpcSize;i++)
mem[i]=st->mem_sw[i];
- filter_mem16(sw, bw_lpc1, bw_lpc2, sw, st->subframeSize, st->lpcSize, mem);
+ filter_mem16(sw, bw_lpc1, bw_lpc2, sw, st->subframeSize, st->lpcSize, mem, stack);
if (st->complexity==0)
for (i=0;i<st->lpcSize;i++)
@@ -980,11 +980,11 @@
for (i=0;i<st->subframeSize;i++)
sw[i] = exc[i];
/* Final signal synthesis from excitation */
- iir_mem16(sw, interp_qlpc, sw, st->subframeSize, st->lpcSize, st->mem_sp);
+ iir_mem16(sw, interp_qlpc, sw, st->subframeSize, st->lpcSize, st->mem_sp, stack);
/* Compute weighted signal again, from synthesized speech (not sure it's the right thing) */
if (st->complexity!=0)
- filter_mem16(sw, bw_lpc1, bw_lpc2, sw, st->subframeSize, st->lpcSize, st->mem_sw);
+ filter_mem16(sw, bw_lpc1, bw_lpc2, sw, st->subframeSize, st->lpcSize, st->mem_sw, stack);
}
@@ -1210,7 +1210,7 @@
sp[i]=exc[i-st->subframeSize];
#endif
iir_mem16(sp, st->interp_qlpc, sp, st->subframeSize, st->lpcSize,
- st->mem_sp);
+ st->mem_sp, stack);
bw_lpc(QCONST16(.98,15), st->interp_qlpc, st->interp_qlpc, st->lpcSize);
}
@@ -1377,7 +1377,7 @@
for (i=0;i<st->frameSize;i++)
out[i] = st->exc[i];
/* Final signal synthesis from excitation */
- iir_mem16(out, lpc, out, st->frameSize, st->lpcSize, st->mem_sp);
+ iir_mem16(out, lpc, out, st->frameSize, st->lpcSize, st->mem_sp, stack);
st->count_lost=0;
return 0;
@@ -1763,7 +1763,7 @@
}
iir_mem16(sp, st->interp_qlpc, sp, st->subframeSize, st->lpcSize,
- st->mem_sp);
+ st->mem_sp, stack);
for (i=0;i<st->lpcSize;i++)
st->interp_qlpc[i] = ak[i];
More information about the commits
mailing list