diff options
| author | Thom Johansen <thomj@rockbox.org> | 2007-11-22 00:04:58 +0000 |
|---|---|---|
| committer | Thom Johansen <thomj@rockbox.org> | 2007-11-22 00:04:58 +0000 |
| commit | e7988b8d8826f4ef756e0bcda395c40b11daf7e6 (patch) | |
| tree | 944668e7b9255a72265fed4ce601025021b968f2 /apps/codecs/libspeex | |
| parent | e2e287d80e52b51120d600da7aa997ddeccb126d (diff) | |
| download | rockbox-e7988b8d8826f4ef756e0bcda395c40b11daf7e6.zip rockbox-e7988b8d8826f4ef756e0bcda395c40b11daf7e6.tar.gz rockbox-e7988b8d8826f4ef756e0bcda395c40b11daf7e6.tar.bz2 rockbox-e7988b8d8826f4ef756e0bcda395c40b11daf7e6.tar.xz | |
Remove a couple of redundant array copy operations.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15747 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex')
| -rw-r--r-- | apps/codecs/libspeex/nb_celp.c | 10 | ||||
| -rw-r--r-- | apps/codecs/libspeex/sb_celp.c | 4 |
2 files changed, 4 insertions, 10 deletions
diff --git a/apps/codecs/libspeex/nb_celp.c b/apps/codecs/libspeex/nb_celp.c index 9ddac46..d1e8cae 100644 --- a/apps/codecs/libspeex/nb_celp.c +++ b/apps/codecs/libspeex/nb_celp.c @@ -1081,11 +1081,9 @@ static void nb_decode_lost(DecState *st, spx_word16_t *out, char *stack) speex_rand(noise_gain, &st->seed); } - for (i=0;i<st->frameSize;i++) - out[i]=st->exc[i-st->subframeSize]; bw_lpc(QCONST16(.98,15), st->interp_qlpc, st->interp_qlpc, st->lpcSize); - iir_mem16(out, st->interp_qlpc, out, st->frameSize, st->lpcSize, - st->mem_sp, stack); + iir_mem16(&st->exc[-st->subframeSize], st->interp_qlpc, out, + st->frameSize, st->lpcSize, st->mem_sp, stack); highpass(out, out, st->frameSize, HIGHPASS_NARROWBAND|HIGHPASS_OUTPUT, st->mem_hp); st->first = 0; @@ -1238,10 +1236,8 @@ int nb_decode(void *state, SpeexBits *bits, void *vout) st->first=1; - 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, stack); + iir_mem16(st->exc, lpc, out, st->frameSize, st->lpcSize, st->mem_sp, stack); st->count_lost=0; return 0; diff --git a/apps/codecs/libspeex/sb_celp.c b/apps/codecs/libspeex/sb_celp.c index 424d590..17cfc73 100644 --- a/apps/codecs/libspeex/sb_celp.c +++ b/apps/codecs/libspeex/sb_celp.c @@ -1098,9 +1098,7 @@ int sb_decode(void *state, SpeexBits *bits, void *vout) innov_save[2*i]=EXTRACT16(PSHR32(exc[i],SIG_SHIFT)); } - for (i=0;i<st->subframeSize;i++) - sp[i]=st->excBuf[i]; - iir_mem16(sp, st->interp_qlpc, sp, st->subframeSize, st->lpcSize, + iir_mem16(st->excBuf, st->interp_qlpc, sp, st->subframeSize, st->lpcSize, st->mem_sp, stack); for (i=0;i<st->subframeSize;i++) st->excBuf[i]=EXTRACT16(PSHR32(exc[i],SIG_SHIFT)); |