diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2012-10-07 12:34:54 +0200 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2012-10-07 12:34:54 +0200 |
commit | 0ae8d16643fac1ba935a4e5303cc423655fb3ff7 (patch) | |
tree | 70ed2e31d4cebb3a8b9fdc0656c99de8ba2e8665 | |
parent | c7840e745e9359f8210e5112bef388c4e3157765 (diff) | |
download | rockbox-0ae8d16643fac1ba935a4e5303cc423655fb3ff7.tar.gz rockbox-0ae8d16643fac1ba935a4e5303cc423655fb3ff7.zip |
opus: replace copy loops with calls to memcpy
speeds up decoding of a 64kbps test file by 0.5Hz on h300 (cf)
0.9MHz on c200 (pp) and 0.2MHz on fuzev1 (amsv1)
Change-Id: Ib537c2393fa6dca0b61e4e9f80eef5e688c2c2bd
Signed-off-by: Nils Wallménius <nils@rockbox.org>
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/mdct.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/mdct.c b/lib/rbcodec/codecs/libopus/celt/mdct.c index 8fc1b54db7..0f9af9eac4 100644 --- a/lib/rbcodec/codecs/libopus/celt/mdct.c +++ b/lib/rbcodec/codecs/libopus/celt/mdct.c | |||
@@ -305,12 +305,11 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala | |||
305 | kiss_fft_scalar * OPUS_RESTRICT yp1 = out+N4-overlap/2; | 305 | kiss_fft_scalar * OPUS_RESTRICT yp1 = out+N4-overlap/2; |
306 | const opus_val16 * OPUS_RESTRICT wp1 = window; | 306 | const opus_val16 * OPUS_RESTRICT wp1 = window; |
307 | const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; | 307 | const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; |
308 | for(i = 0; i< N4-overlap/2; i++) | 308 | |
309 | { | 309 | i = N4-overlap/2; |
310 | *xp1 = *fp1; | 310 | xp1 -= N4-overlap/2; |
311 | xp1--; | 311 | fp1 -= N4-overlap/2; |
312 | fp1--; | 312 | OPUS_COPY(xp1+1, fp1+1, N4-overlap/2); |
313 | } | ||
314 | for(; i < N4; i++) | 313 | for(; i < N4; i++) |
315 | { | 314 | { |
316 | kiss_fft_scalar x1; | 315 | kiss_fft_scalar x1; |
@@ -327,12 +326,11 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala | |||
327 | kiss_fft_scalar * OPUS_RESTRICT yp2 = out+N-1-(N4-overlap/2); | 326 | kiss_fft_scalar * OPUS_RESTRICT yp2 = out+N-1-(N4-overlap/2); |
328 | const opus_val16 * OPUS_RESTRICT wp1 = window; | 327 | const opus_val16 * OPUS_RESTRICT wp1 = window; |
329 | const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; | 328 | const opus_val16 * OPUS_RESTRICT wp2 = window+overlap-1; |
330 | for(i = 0; i< N4-overlap/2; i++) | 329 | |
331 | { | 330 | i = N4-overlap/2; |
332 | *xp2 = *fp2; | 331 | OPUS_COPY(xp2, fp2, N4-overlap/2); |
333 | xp2++; | 332 | xp2 += N4-overlap/2; |
334 | fp2++; | 333 | fp2 += N4-overlap/2; |
335 | } | ||
336 | for(; i < N4; i++) | 334 | for(; i < N4; i++) |
337 | { | 335 | { |
338 | kiss_fft_scalar x2; | 336 | kiss_fft_scalar x2; |