diff options
author | bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-05-28 08:45:04 +0000 |
---|---|---|
committer | bjornv@webrtc.org <bjornv@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-05-28 08:45:04 +0000 |
commit | ff6b4a8eddca609ad2691b54f443b6f1e9342579 (patch) | |
tree | eb6c98e8a99ce0cb83f0b360c63b86acecf0a9a2 /common_audio/signal_processing | |
parent | b552ce6cab162625d2fa7b35c684459bfdec533b (diff) | |
download | webrtc-ff6b4a8eddca609ad2691b54f443b6f1e9342579.tar.gz |
common_audio/signal_processing: Fixes arm compilation issues with gcc 4.8
In r6240 gcc was rolled from 4.6 to 4.8 changing the behavior on arm. The output of ComplexFFT differs causing both AECM and NS to perform worse. Looking at issues on gcc it says that there could be a memory shuffling/optimization despite using volatile affecting the output.
Splitting the three instructions in one call into two separate calls makes the compiler take proper actions resulting in correct outputs.
BUG=3370,3395
TESTED=trybots
R=kwiberg@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/21549004
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6261 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'common_audio/signal_processing')
-rw-r--r-- | common_audio/signal_processing/complex_fft.c | 10 | ||||
-rw-r--r-- | common_audio/signal_processing/real_fft_unittest.cc | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/common_audio/signal_processing/complex_fft.c b/common_audio/signal_processing/complex_fft.c index 2e8eb323..a026b70b 100644 --- a/common_audio/signal_processing/complex_fft.c +++ b/common_audio/signal_processing/complex_fft.c @@ -115,18 +115,18 @@ int WebRtcSpl_ComplexFFT(int16_t frfi[], int stages, int mode) j = i + l; #ifdef WEBRTC_ARCH_ARM_V7 - __asm __volatile( + __asm __volatile( "pkhbt %[frfi_r], %[frfi_even], %[frfi_odd], lsl #16\n\t" "smlsd %[tr32], %[wri], %[frfi_r], %[cfftrnd]\n\t" - "smladx %[ti32], %[wri], %[frfi_r], %[cfftrnd]\n\t" :[frfi_r]"+r"(frfi_r), - [tr32]"=r"(tr32), - [ti32]"=r"(ti32) + [tr32]"=r"(tr32) :[frfi_even]"r"((int32_t)frfi[2*j]), [frfi_odd]"r"((int32_t)frfi[2*j +1]), [wri]"r"(wri), [cfftrnd]"r"(CFFTRND) - ); + ); + __asm __volatile("smladx %0, %1, %2, %3\n\t" : "=r"(ti32) : + "r"(wri), "r"(frfi_r), "r"(CFFTRND)); #else tr32 = WEBRTC_SPL_MUL_16_16(wr, frfi[2 * j]) diff --git a/common_audio/signal_processing/real_fft_unittest.cc b/common_audio/signal_processing/real_fft_unittest.cc index 75472e32..9bd35cd6 100644 --- a/common_audio/signal_processing/real_fft_unittest.cc +++ b/common_audio/signal_processing/real_fft_unittest.cc @@ -49,7 +49,7 @@ TEST_F(RealFFTTest, CreateFailsOnBadInput) { EXPECT_TRUE(fft == NULL); } -TEST_F(RealFFTTest, DISABLED_ON_ANDROID(RealAndComplexMatch)) { +TEST_F(RealFFTTest, RealAndComplexMatch) { int i = 0; int j = 0; int16_t real_fft_time[kTimeDataLength] = {0}; |