From b3cc77f4baea230bd815a0d696969fd5e9e9f4ba Mon Sep 17 00:00:00 2001 From: Zhongwei Yao Date: Tue, 28 Jul 2015 11:17:40 +0800 Subject: [PATCH] Re-enable WebRtcIsacfix_AllpassFilter2FixDec16Neon WebRtcIsacfix_AllpassFilter2FixDec16Neon was disabled due to a Clang bug. The bug is fixed in current Clang version, re-enable it in this patch. BUG=4567 R=andrew@webrtc.org, kjellander@webrtc.org TEST=buildbot build Change-Id: I71e309cec6caf376181cf9c299c9e8967c9a328e Review URL: https://codereview.webrtc.org/1194773002 . Patch from Zhongwei Yao . Cr-Commit-Position: refs/heads/master@{#9645} --- webrtc/modules/audio_coding/BUILD.gn | 7 +------ .../codecs/isac/fix/source/filterbank_internal.h | 5 ----- .../codecs/isac/fix/source/filterbanks_unittest.cc | 6 ------ .../audio_coding/codecs/isac/fix/source/isacfix.c | 5 ----- webrtc/modules/audio_coding/codecs/isac/isacfix.gypi | 9 +-------- 5 files changed, 2 insertions(+), 30 deletions(-) diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn index 15ea369005..4b7e417a92 100644 --- a/webrtc/modules/audio_coding/BUILD.gn +++ b/webrtc/modules/audio_coding/BUILD.gn @@ -611,16 +611,11 @@ if (rtc_build_with_neon) { source_set("isac_neon") { sources = [ "codecs/isac/fix/source/entropy_coding_neon.c", + "codecs/isac/fix/source/filterbanks_neon.c", "codecs/isac/fix/source/filters_neon.c", "codecs/isac/fix/source/lattice_neon.c", "codecs/isac/fix/source/transform_neon.c", ] - if (current_cpu != "arm64" || !is_clang) { - # Disable AllpassFilter2FixDec16Neon function due to a clang bug. - # For more details refer to: - # https://code.google.com/p/webrtc/issues/detail?id=4567 - sources += [ "codecs/isac/fix/source/filterbanks_neon.c" ] - } if (current_cpu != "arm64") { # Enable compilation for the NEON instruction set. This is needed diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h index d6153e09fc..0e67e300ac 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h @@ -60,10 +60,6 @@ void WebRtcIsacfix_AllpassFilter2FixDec16C( int32_t *filter_state_ch1, int32_t *filter_state_ch2); -// Disable AllpassFilter2FixDec16Neon function due to a clang bug. -// Refer more details at: -// https://code.google.com/p/webrtc/issues/detail?id=4567 -#if !defined(__clang__) || !defined(WEBRTC_ARCH_ARM64) #if (defined WEBRTC_DETECT_NEON) || (defined WEBRTC_HAS_NEON) void WebRtcIsacfix_AllpassFilter2FixDec16Neon( int16_t *data_ch1, @@ -74,7 +70,6 @@ void WebRtcIsacfix_AllpassFilter2FixDec16Neon( int32_t *filter_state_ch1, int32_t *filter_state_ch2); #endif -#endif #if defined(MIPS_DSP_R1_LE) void WebRtcIsacfix_AllpassFilter2FixDec16MIPS( diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc b/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc index 8ef05e897b..80fb3929b9 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc @@ -64,11 +64,6 @@ class FilterBanksTest : public testing::Test { TEST_F(FilterBanksTest, AllpassFilter2FixDec16Test) { CalculateResidualEnergyTester(WebRtcIsacfix_AllpassFilter2FixDec16C); - -// Disable AllpassFilter2FixDec16Neon function due to a clang bug. -// Refer more details at: -// https://code.google.com/p/webrtc/issues/detail?id=4567 -#if !(defined __clang__) || !defined(WEBRTC_ARCH_ARM64) #ifdef WEBRTC_DETECT_NEON if ((WebRtc_GetCPUFeaturesARM() & kCPUFeatureNEON) != 0) { CalculateResidualEnergyTester(WebRtcIsacfix_AllpassFilter2FixDec16Neon); @@ -76,7 +71,6 @@ TEST_F(FilterBanksTest, AllpassFilter2FixDec16Test) { #elif defined(WEBRTC_HAS_NEON) CalculateResidualEnergyTester(WebRtcIsacfix_AllpassFilter2FixDec16Neon); #endif -#endif } TEST_F(FilterBanksTest, HighpassFilterFixDec32Test) { diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c index 43a9e52127..ba055ebdf5 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c @@ -207,13 +207,8 @@ static void WebRtcIsacfix_InitNeon(void) { WebRtcIsacfix_FilterMaLoopFix = WebRtcIsacfix_FilterMaLoopNeon; WebRtcIsacfix_Spec2Time = WebRtcIsacfix_Spec2TimeNeon; WebRtcIsacfix_Time2Spec = WebRtcIsacfix_Time2SpecNeon; -// Disable AllpassFilter2FixDec16Neon function due to a clang bug. -// Refer more details at: -// https://code.google.com/p/webrtc/issues/detail?id=4567 -#if !defined(__clang__) || !defined(WEBRTC_ARCH_ARM64) WebRtcIsacfix_AllpassFilter2FixDec16 = WebRtcIsacfix_AllpassFilter2FixDec16Neon; -#endif WebRtcIsacfix_MatrixProduct1 = WebRtcIsacfix_MatrixProduct1Neon; WebRtcIsacfix_MatrixProduct2 = WebRtcIsacfix_MatrixProduct2Neon; } diff --git a/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi b/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi index 68aa8d09c6..e20177c365 100644 --- a/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi +++ b/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi @@ -137,18 +137,11 @@ ], 'sources': [ 'fix/source/entropy_coding_neon.c', + 'fix/source/filterbanks_neon.c', 'fix/source/filters_neon.c', 'fix/source/lattice_neon.c', 'fix/source/transform_neon.c', ], - 'conditions': [ - # Disable AllpassFilter2FixDec16Neon function due to a clang bug. - # For more details refer to: - # https://code.google.com/p/webrtc/issues/detail?id=4567 - ['target_arch!="arm64" or clang==0', { - 'sources': ['fix/source/filterbanks_neon.c',], - }] - ], }, ], }],