diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-05-26 00:33:30 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-05-26 00:33:30 -0400 |
commit | 30fe6eb66c59f8c2b0b16ef305a9ab3742595115 (patch) | |
tree | bb693aab02a7a289a08df75b6d1a428c09c1d495 | |
parent | 00b856365469b4ff82928597923094aa3236abb5 (diff) | |
download | rockbox-30fe6eb66c59f8c2b0b16ef305a9ab3742595115.tar.gz rockbox-30fe6eb66c59f8c2b0b16ef305a9ab3742595115.zip |
SPC Codec ARMv5: I didn't have fast gauss quite right.
Fix wrapping hazard which did eventually manifest on the right file.
Change-Id: I996a6efd3181b56fd172b5c3a526c7434f88bbbe
-rw-r--r-- | lib/rbcodec/codecs/libspc/cpu/spc_dsp_armv5.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/rbcodec/codecs/libspc/cpu/spc_dsp_armv5.c b/lib/rbcodec/codecs/libspc/cpu/spc_dsp_armv5.c index dd08e9edef..10bbb47a5f 100644 --- a/lib/rbcodec/codecs/libspc/cpu/spc_dsp_armv5.c +++ b/lib/rbcodec/codecs/libspc/cpu/spc_dsp_armv5.c | |||
@@ -55,14 +55,14 @@ static inline int gaussian_fast_amp( struct voice_t* voice, int output, | |||
55 | int* amp_0, int* amp_1 ) | 55 | int* amp_0, int* amp_1 ) |
56 | { | 56 | { |
57 | asm volatile ( | 57 | asm volatile ( |
58 | "mov %[out], %[out], asr #15 \n" | 58 | "smulwb %[out], %[out], %[envx] \n" |
59 | "smulbb %[out], %[out], %[envx] \n" | ||
60 | : [out]"+r"(output) | 59 | : [out]"+r"(output) |
61 | : [envx]"r"(voice->envx)); | 60 | : [envx]"r"(voice->envx)); |
62 | asm volatile ( | 61 | asm volatile ( |
63 | "mov %[out], %[out], asr #11 \n" | 62 | "mov %[out], %[out], asl #6 \n" |
64 | "smulbb %[a0], %[out], %[v0] \n" | 63 | "smulwb %[a0], %[out], %[v0] \n" |
65 | "smulbb %[a1], %[out], %[v1] \n" | 64 | "smulwb %[a1], %[out], %[v1] \n" |
65 | "mov %[out], %[out], asr #5 \n" | ||
66 | : [out]"+r"(output), | 66 | : [out]"+r"(output), |
67 | [a0]"=&r"(*amp_0), [a1]"=r"(*amp_1) | 67 | [a0]"=&r"(*amp_0), [a1]"=r"(*amp_1) |
68 | : [v0]"r"(voice->volume [0]), | 68 | : [v0]"r"(voice->volume [0]), |