diff options
author | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2006-06-07 13:42:09 +0400 |
---|---|---|
committer | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2006-06-07 13:42:09 +0400 |
commit | ec8c698f45dabd4df2b98850d7b3dbca4abe103b (patch) | |
tree | 2b9df2a77e701a6142ead2a026018d10f92c3621 /libspeex/nb_celp.c | |
parent | b4c7c0085ab4e9a4ef573955af2ffbfb45b59282 (diff) |
Patch by David Rowe: sending the stack parameter to *_mem16() filters.
git-svn-id: http://svn.xiph.org/trunk/speex@11534 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'libspeex/nb_celp.c')
-rw-r--r-- | libspeex/nb_celp.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libspeex/nb_celp.c b/libspeex/nb_celp.c index 01d2d23..be762f8 100644 --- a/libspeex/nb_celp.c +++ b/libspeex/nb_celp.c @@ -358,7 +358,7 @@ int nb_encode(void *state, void *vin, SpeexBits *bits) 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 @@ int nb_encode(void *state, void *vin, SpeexBits *bits) 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 @@ int nb_encode(void *state, void *vin, SpeexBits *bits) 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 @@ int nb_encode(void *state, void *vin, SpeexBits *bits) 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 @@ int nb_encode(void *state, void *vin, SpeexBits *bits) 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 @@ static void nb_decode_lost(DecState *st, spx_word16_t *out, char *stack) 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 @@ int nb_decode(void *state, SpeexBits *bits, void *vout) 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 @@ int nb_decode(void *state, SpeexBits *bits, void *vout) } 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]; |