From f0d64a5f9b3b5d3e9f1e43c3fffe286fd2649f1a Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Fri, 17 Apr 2020 12:25:19 +0200 Subject: [PATCH] Reland "Unify OOURA implementations in one directory." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a reland of 09b439c6f7fa15d7cedbfb74cc22e9512ce3df47 Original change's description: > Unify OOURA implementations in one directory. > > This CL moves the two OOURA implementations present in the WebRTC tree > in one place. > > No functional change is expected. > > TBR=kwiberg@webrtc.org > > No-Try: True > Bug: webrtc:11509 > Change-Id: I330a9ec57e3dc65c9c8b43edd4bb295c55920efa > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173682 > Commit-Queue: Mirko Bonadei > Reviewed-by: Per Åhgren > Cr-Commit-Position: refs/heads/master@{#31106} TBR=kwiberg@webrtc.org, peah@webrtc.org No-Tree-Checks: True No-Try: True Bug: webrtc:11509 Change-Id: Ifc28b0380062ab5aad5c498700aa3cc7f9c7802c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173720 Commit-Queue: Mirko Bonadei Reviewed-by: Mirko Bonadei Reviewed-by: Per Åhgren Cr-Commit-Position: refs/heads/master@{#31111} --- common_audio/BUILD.gn | 4 +- common_audio/real_fourier_ooura.cc | 2 +- common_audio/real_fourier_ooura.h | 2 +- .../third_party/{fft4g => ooura}/LICENSE | 0 .../{fft4g => ooura}/README.chromium | 0 .../third_party/ooura/fft_size_128/BUILD.gn | 51 +++++++++++++++++++ .../ooura/fft_size_128}/ooura_fft.cc | 4 +- .../ooura/fft_size_128}/ooura_fft.h | 0 .../ooura/fft_size_128}/ooura_fft_mips.cc | 4 +- .../ooura/fft_size_128}/ooura_fft_neon.cc | 6 +-- .../ooura/fft_size_128}/ooura_fft_sse2.cc | 6 +-- .../fft_size_128}/ooura_fft_tables_common.h | 2 +- .../ooura_fft_tables_neon_sse2.h | 2 +- .../{fft4g => ooura/fft_size_256}/BUILD.gn | 4 +- .../{fft4g => ooura/fft_size_256}/fft4g.cc | 2 + .../{fft4g => ooura/fft_size_256}/fft4g.h | 6 +-- modules/audio_processing/BUILD.gn | 2 +- modules/audio_processing/aec3/BUILD.gn | 2 +- modules/audio_processing/aec3/aec3_fft.h | 2 +- .../aec3/suppression_filter.h | 2 +- modules/audio_processing/agc/BUILD.gn | 2 +- modules/audio_processing/agc2/BUILD.gn | 2 +- .../audio_processing/agc2/signal_classifier.h | 2 +- modules/audio_processing/ns/BUILD.gn | 4 +- modules/audio_processing/ns/ns_fft.cc | 2 +- modules/audio_processing/transient/BUILD.gn | 2 +- .../transient/transient_suppressor_impl.cc | 2 +- modules/audio_processing/utility/BUILD.gn | 42 --------------- modules/audio_processing/vad/BUILD.gn | 2 +- .../audio_processing/vad/vad_audio_proc.cc | 2 +- tools_webrtc/libs/generate_licenses.py | 2 +- 31 files changed, 89 insertions(+), 78 deletions(-) rename common_audio/third_party/{fft4g => ooura}/LICENSE (100%) rename common_audio/third_party/{fft4g => ooura}/README.chromium (100%) create mode 100644 common_audio/third_party/ooura/fft_size_128/BUILD.gn rename {modules/audio_processing/utility => common_audio/third_party/ooura/fft_size_128}/ooura_fft.cc (98%) rename {modules/audio_processing/utility => common_audio/third_party/ooura/fft_size_128}/ooura_fft.h (100%) rename {modules/audio_processing/utility => common_audio/third_party/ooura/fft_size_128}/ooura_fft_mips.cc (99%) rename {modules/audio_processing/utility => common_audio/third_party/ooura/fft_size_128}/ooura_fft_neon.cc (98%) rename {modules/audio_processing/utility => common_audio/third_party/ooura/fft_size_128}/ooura_fft_sse2.cc (98%) rename {modules/audio_processing/utility => common_audio/third_party/ooura/fft_size_128}/ooura_fft_tables_common.h (97%) rename {modules/audio_processing/utility => common_audio/third_party/ooura/fft_size_128}/ooura_fft_tables_neon_sse2.h (98%) rename common_audio/third_party/{fft4g => ooura/fft_size_256}/BUILD.gn (81%) rename common_audio/third_party/{fft4g => ooura/fft_size_256}/fft4g.cc (99%) rename common_audio/third_party/{fft4g => ooura/fft_size_256}/fft4g.h (75%) diff --git a/common_audio/BUILD.gn b/common_audio/BUILD.gn index 6c89bf257f..36f723d1c6 100644 --- a/common_audio/BUILD.gn +++ b/common_audio/BUILD.gn @@ -55,7 +55,7 @@ rtc_library("common_audio") { "../rtc_base/system:file_wrapper", "../system_wrappers", "../system_wrappers:cpu_features_api", - "third_party/fft4g", + "third_party/ooura/fft_size_256:fft4g", "//third_party/abseil-cpp/absl/types:optional", ] @@ -185,7 +185,7 @@ rtc_library("common_audio_c") { "../rtc_base/system:arch", "../system_wrappers", "../system_wrappers:cpu_features_api", - "third_party/fft4g", + "third_party/ooura/fft_size_256:fft4g", "third_party/spl_sqrt_floor", ] } diff --git a/common_audio/real_fourier_ooura.cc b/common_audio/real_fourier_ooura.cc index 89694c1667..9acda5494c 100644 --- a/common_audio/real_fourier_ooura.cc +++ b/common_audio/real_fourier_ooura.cc @@ -13,7 +13,7 @@ #include #include -#include "common_audio/third_party/fft4g/fft4g.h" +#include "common_audio/third_party/ooura/fft_size_256/fft4g.h" #include "rtc_base/checks.h" namespace webrtc { diff --git a/common_audio/real_fourier_ooura.h b/common_audio/real_fourier_ooura.h index b5f1bcff5d..ae85dfd0dd 100644 --- a/common_audio/real_fourier_ooura.h +++ b/common_audio/real_fourier_ooura.h @@ -35,7 +35,7 @@ class RealFourierOoura : public RealFourier { const size_t length_; const size_t complex_length_; // These are work arrays for Ooura. The names are based on the comments in - // fft4g.c. + // common_audio/third_party/ooura/fft_size_256/fft4g.cc. const std::unique_ptr work_ip_; const std::unique_ptr work_w_; }; diff --git a/common_audio/third_party/fft4g/LICENSE b/common_audio/third_party/ooura/LICENSE similarity index 100% rename from common_audio/third_party/fft4g/LICENSE rename to common_audio/third_party/ooura/LICENSE diff --git a/common_audio/third_party/fft4g/README.chromium b/common_audio/third_party/ooura/README.chromium similarity index 100% rename from common_audio/third_party/fft4g/README.chromium rename to common_audio/third_party/ooura/README.chromium diff --git a/common_audio/third_party/ooura/fft_size_128/BUILD.gn b/common_audio/third_party/ooura/fft_size_128/BUILD.gn new file mode 100644 index 0000000000..cbafc7bcd1 --- /dev/null +++ b/common_audio/third_party/ooura/fft_size_128/BUILD.gn @@ -0,0 +1,51 @@ +# Copyright (c) 2020 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the ../../../LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("../../../../webrtc.gni") + +rtc_library("ooura_fft") { + sources = [ + "ooura_fft.cc", + "ooura_fft.h", + "ooura_fft_tables_common.h", + ] + deps = [ + "../../../../rtc_base/system:arch", + "../../../../system_wrappers:cpu_features_api", + ] + cflags = [] + + if (current_cpu == "x86" || current_cpu == "x64") { + sources += [ + "ooura_fft_sse2.cc", + "ooura_fft_tables_neon_sse2.h", + ] + if (is_posix || is_fuchsia) { + cflags += [ "-msse2" ] + } + } + + if (rtc_build_with_neon) { + sources += [ + "ooura_fft_neon.cc", + "ooura_fft_tables_neon_sse2.h", + ] + + deps += [ "../../../../common_audio" ] + + if (current_cpu != "arm64") { + # Enable compilation for the NEON instruction set. + suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] + cflags += [ "-mfpu=neon" ] + } + } + + if (current_cpu == "mipsel" && mips_float_abi == "hard") { + sources += [ "ooura_fft_mips.cc" ] + } +} diff --git a/modules/audio_processing/utility/ooura_fft.cc b/common_audio/third_party/ooura/fft_size_128/ooura_fft.cc similarity index 98% rename from modules/audio_processing/utility/ooura_fft.cc rename to common_audio/third_party/ooura/fft_size_128/ooura_fft.cc index 8628bd39f0..2918374bba 100644 --- a/modules/audio_processing/utility/ooura_fft.cc +++ b/common_audio/third_party/ooura/fft_size_128/ooura_fft.cc @@ -21,9 +21,9 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/audio_processing/utility/ooura_fft.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft.h" -#include "modules/audio_processing/utility/ooura_fft_tables_common.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_common.h" #include "rtc_base/system/arch.h" #include "system_wrappers/include/cpu_features_wrapper.h" diff --git a/modules/audio_processing/utility/ooura_fft.h b/common_audio/third_party/ooura/fft_size_128/ooura_fft.h similarity index 100% rename from modules/audio_processing/utility/ooura_fft.h rename to common_audio/third_party/ooura/fft_size_128/ooura_fft.h diff --git a/modules/audio_processing/utility/ooura_fft_mips.cc b/common_audio/third_party/ooura/fft_size_128/ooura_fft_mips.cc similarity index 99% rename from modules/audio_processing/utility/ooura_fft_mips.cc rename to common_audio/third_party/ooura/fft_size_128/ooura_fft_mips.cc index 42b9d3a496..4c231e357d 100644 --- a/modules/audio_processing/utility/ooura_fft_mips.cc +++ b/common_audio/third_party/ooura/fft_size_128/ooura_fft_mips.cc @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/audio_processing/utility/ooura_fft.h" -#include "modules/audio_processing/utility/ooura_fft_tables_common.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_common.h" namespace webrtc { diff --git a/modules/audio_processing/utility/ooura_fft_neon.cc b/common_audio/third_party/ooura/fft_size_128/ooura_fft_neon.cc similarity index 98% rename from modules/audio_processing/utility/ooura_fft_neon.cc rename to common_audio/third_party/ooura/fft_size_128/ooura_fft_neon.cc index 95b5f09ae0..acab9722dc 100644 --- a/modules/audio_processing/utility/ooura_fft_neon.cc +++ b/common_audio/third_party/ooura/fft_size_128/ooura_fft_neon.cc @@ -16,9 +16,9 @@ #include -#include "modules/audio_processing/utility/ooura_fft.h" -#include "modules/audio_processing/utility/ooura_fft_tables_common.h" -#include "modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_common.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_neon_sse2.h" namespace webrtc { diff --git a/modules/audio_processing/utility/ooura_fft_sse2.cc b/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc similarity index 98% rename from modules/audio_processing/utility/ooura_fft_sse2.cc rename to common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc index 0e4a44becc..7f0802ddfa 100644 --- a/modules/audio_processing/utility/ooura_fft_sse2.cc +++ b/common_audio/third_party/ooura/fft_size_128/ooura_fft_sse2.cc @@ -11,9 +11,9 @@ #include #include -#include "modules/audio_processing/utility/ooura_fft.h" -#include "modules/audio_processing/utility/ooura_fft_tables_common.h" -#include "modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_common.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_neon_sse2.h" #include "rtc_base/system/arch.h" namespace webrtc { diff --git a/modules/audio_processing/utility/ooura_fft_tables_common.h b/common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_common.h similarity index 97% rename from modules/audio_processing/utility/ooura_fft_tables_common.h rename to common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_common.h index 47d076ea2a..6db1dd9ae4 100644 --- a/modules/audio_processing/utility/ooura_fft_tables_common.h +++ b/common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_common.h @@ -11,7 +11,7 @@ #ifndef MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_ #define MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_COMMON_H_ -#include "modules/audio_processing/utility/ooura_fft.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft.h" namespace webrtc { diff --git a/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h b/common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_neon_sse2.h similarity index 98% rename from modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h rename to common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_neon_sse2.h index 10aebac42a..a63d187018 100644 --- a/modules/audio_processing/utility/ooura_fft_tables_neon_sse2.h +++ b/common_audio/third_party/ooura/fft_size_128/ooura_fft_tables_neon_sse2.h @@ -11,7 +11,7 @@ #ifndef MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_ #define MODULES_AUDIO_PROCESSING_UTILITY_OOURA_FFT_TABLES_NEON_SSE2_H_ -#include "modules/audio_processing/utility/ooura_fft.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft.h" #include "rtc_base/system/arch.h" #ifdef _MSC_VER /* visual c++ */ diff --git a/common_audio/third_party/fft4g/BUILD.gn b/common_audio/third_party/ooura/fft_size_256/BUILD.gn similarity index 81% rename from common_audio/third_party/fft4g/BUILD.gn rename to common_audio/third_party/ooura/fft_size_256/BUILD.gn index c7dd8f7108..030867b0ae 100644 --- a/common_audio/third_party/fft4g/BUILD.gn +++ b/common_audio/third_party/ooura/fft_size_256/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. +# Copyright (c) 2020 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the ../../../LICENSE file in the root of the source @@ -6,7 +6,7 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. -import("../../../webrtc.gni") +import("../../../../webrtc.gni") rtc_library("fft4g") { sources = [ diff --git a/common_audio/third_party/fft4g/fft4g.cc b/common_audio/third_party/ooura/fft_size_256/fft4g.cc similarity index 99% rename from common_audio/third_party/fft4g/fft4g.cc rename to common_audio/third_party/ooura/fft_size_256/fft4g.cc index fadd1bef0a..d2f7c1c41e 100644 --- a/common_audio/third_party/fft4g/fft4g.cc +++ b/common_audio/third_party/ooura/fft_size_256/fft4g.cc @@ -289,6 +289,8 @@ Appendix : #include #include +#include "common_audio/third_party/ooura/fft_size_256/fft4g.h" + namespace webrtc { namespace { diff --git a/common_audio/third_party/fft4g/fft4g.h b/common_audio/third_party/ooura/fft_size_256/fft4g.h similarity index 75% rename from common_audio/third_party/fft4g/fft4g.h rename to common_audio/third_party/ooura/fft_size_256/fft4g.h index 7cdc695633..d41d2c65aa 100644 --- a/common_audio/third_party/fft4g/fft4g.h +++ b/common_audio/third_party/ooura/fft_size_256/fft4g.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef COMMON_AUDIO_THIRD_PARTY_FFT4G_FFT4G_H_ -#define COMMON_AUDIO_THIRD_PARTY_FFT4G_FFT4G_H_ +#ifndef COMMON_AUDIO_THIRD_PARTY_OOURA_FFT_SIZE_256_FFT4G_H_ +#define COMMON_AUDIO_THIRD_PARTY_OOURA_FFT_SIZE_256_FFT4G_H_ namespace webrtc { @@ -18,4 +18,4 @@ void WebRtc_rdft(size_t n, int isgn, float* a, size_t* ip, float* w); } // namespace webrtc -#endif /* COMMON_AUDIO_THIRD_PARTY_FFT4G_FFT4G_H_ */ +#endif // COMMON_AUDIO_THIRD_PARTY_OOURA_FFT_SIZE_256_FFT4G_H_ diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn index 03c42edd3a..ffda2da91d 100644 --- a/modules/audio_processing/BUILD.gn +++ b/modules/audio_processing/BUILD.gn @@ -164,7 +164,7 @@ rtc_library("audio_processing") { "../../api/audio:echo_control", "../../audio/utility:audio_frame_operations", "../../common_audio:common_audio_c", - "../../common_audio/third_party/fft4g", + "../../common_audio/third_party/ooura/fft_size_256:fft4g", "../../rtc_base:checks", "../../rtc_base:deprecation", "../../rtc_base:gtest_prod", diff --git a/modules/audio_processing/aec3/BUILD.gn b/modules/audio_processing/aec3/BUILD.gn index 5d451eb692..9f6b6eb3ff 100644 --- a/modules/audio_processing/aec3/BUILD.gn +++ b/modules/audio_processing/aec3/BUILD.gn @@ -140,6 +140,7 @@ rtc_library("aec3") { "../../../api/audio:aec3_config", "../../../api/audio:echo_control", "../../../common_audio:common_audio_c", + "../../../common_audio/third_party/ooura/fft_size_128:ooura_fft", "../../../rtc_base:checks", "../../../rtc_base:rtc_base_approved", "../../../rtc_base:safe_minmax", @@ -149,7 +150,6 @@ rtc_library("aec3") { "../../../system_wrappers:field_trial", "../../../system_wrappers:metrics", "../utility:cascaded_biquad_filter", - "../utility:ooura_fft", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/modules/audio_processing/aec3/aec3_fft.h b/modules/audio_processing/aec3/aec3_fft.h index d5db83ec59..7a2e024d75 100644 --- a/modules/audio_processing/aec3/aec3_fft.h +++ b/modules/audio_processing/aec3/aec3_fft.h @@ -14,9 +14,9 @@ #include #include "api/array_view.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft.h" #include "modules/audio_processing/aec3/aec3_common.h" #include "modules/audio_processing/aec3/fft_data.h" -#include "modules/audio_processing/utility/ooura_fft.h" #include "rtc_base/checks.h" #include "rtc_base/constructor_magic.h" diff --git a/modules/audio_processing/aec3/suppression_filter.h b/modules/audio_processing/aec3/suppression_filter.h index a35fb406f3..281c2c30c4 100644 --- a/modules/audio_processing/aec3/suppression_filter.h +++ b/modules/audio_processing/aec3/suppression_filter.h @@ -14,10 +14,10 @@ #include #include +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft.h" #include "modules/audio_processing/aec3/aec3_common.h" #include "modules/audio_processing/aec3/aec3_fft.h" #include "modules/audio_processing/aec3/fft_data.h" -#include "modules/audio_processing/utility/ooura_fft.h" #include "rtc_base/constructor_magic.h" namespace webrtc { diff --git a/modules/audio_processing/agc/BUILD.gn b/modules/audio_processing/agc/BUILD.gn index 41c2ad3208..43612d6a27 100644 --- a/modules/audio_processing/agc/BUILD.gn +++ b/modules/audio_processing/agc/BUILD.gn @@ -75,7 +75,7 @@ rtc_library("legacy_agc") { deps = [ "../../../common_audio", "../../../common_audio:common_audio_c", - "../../../common_audio/third_party/fft4g", + "../../../common_audio/third_party/ooura/fft_size_256:fft4g", "../../../rtc_base:checks", "../../../rtc_base:rtc_base_approved", "../../../system_wrappers:cpu_features_api", diff --git a/modules/audio_processing/agc2/BUILD.gn b/modules/audio_processing/agc2/BUILD.gn index 2810defcd6..0d1c956b54 100644 --- a/modules/audio_processing/agc2/BUILD.gn +++ b/modules/audio_processing/agc2/BUILD.gn @@ -150,9 +150,9 @@ rtc_library("noise_level_estimator") { "..:audio_frame_view", "../../../api:array_view", "../../../common_audio", + "../../../common_audio/third_party/ooura/fft_size_128:ooura_fft", "../../../rtc_base:checks", "../../../rtc_base:macromagic", - "../utility:ooura_fft", ] configs += [ "..:apm_debug_dump" ] diff --git a/modules/audio_processing/agc2/signal_classifier.h b/modules/audio_processing/agc2/signal_classifier.h index e0d6771b78..ae288ae775 100644 --- a/modules/audio_processing/agc2/signal_classifier.h +++ b/modules/audio_processing/agc2/signal_classifier.h @@ -15,9 +15,9 @@ #include #include "api/array_view.h" +#include "common_audio/third_party/ooura/fft_size_128/ooura_fft.h" #include "modules/audio_processing/agc2/down_sampler.h" #include "modules/audio_processing/agc2/noise_spectrum_estimator.h" -#include "modules/audio_processing/utility/ooura_fft.h" #include "rtc_base/constructor_magic.h" namespace webrtc { diff --git a/modules/audio_processing/ns/BUILD.gn b/modules/audio_processing/ns/BUILD.gn index 005cfa232f..b988239586 100644 --- a/modules/audio_processing/ns/BUILD.gn +++ b/modules/audio_processing/ns/BUILD.gn @@ -54,7 +54,8 @@ rtc_static_library("ns") { "..:high_pass_filter", "../../../api:array_view", "../../../common_audio:common_audio_c", - "../../../common_audio/third_party/fft4g", + "../../../common_audio/third_party/ooura/fft_size_128:ooura_fft", + "../../../common_audio/third_party/ooura/fft_size_256:fft4g", "../../../rtc_base:checks", "../../../rtc_base:rtc_base_approved", "../../../rtc_base:safe_minmax", @@ -63,7 +64,6 @@ rtc_static_library("ns") { "../../../system_wrappers:field_trial", "../../../system_wrappers:metrics", "../utility:cascaded_biquad_filter", - "../utility:ooura_fft", "//third_party/abseil-cpp/absl/types:optional", ] } diff --git a/modules/audio_processing/ns/ns_fft.cc b/modules/audio_processing/ns/ns_fft.cc index 8d1c43fea7..264c46972c 100644 --- a/modules/audio_processing/ns/ns_fft.cc +++ b/modules/audio_processing/ns/ns_fft.cc @@ -10,7 +10,7 @@ #include "modules/audio_processing/ns/ns_fft.h" -#include "common_audio/third_party/fft4g/fft4g.h" +#include "common_audio/third_party/ooura/fft_size_256/fft4g.h" namespace webrtc { diff --git a/modules/audio_processing/transient/BUILD.gn b/modules/audio_processing/transient/BUILD.gn index d8854fa4ad..9df9323542 100644 --- a/modules/audio_processing/transient/BUILD.gn +++ b/modules/audio_processing/transient/BUILD.gn @@ -52,7 +52,7 @@ rtc_library("transient_suppressor_impl") { "../../../common_audio:common_audio_c", "../../../common_audio:fir_filter", "../../../common_audio:fir_filter_factory", - "../../../common_audio/third_party/fft4g", + "../../../common_audio/third_party/ooura/fft_size_256:fft4g", "../../../rtc_base:checks", "../../../rtc_base:gtest_prod", "../../../rtc_base:logging", diff --git a/modules/audio_processing/transient/transient_suppressor_impl.cc b/modules/audio_processing/transient/transient_suppressor_impl.cc index 7990956af4..d515d30131 100644 --- a/modules/audio_processing/transient/transient_suppressor_impl.cc +++ b/modules/audio_processing/transient/transient_suppressor_impl.cc @@ -21,7 +21,7 @@ #include "common_audio/include/audio_util.h" #include "common_audio/signal_processing/include/signal_processing_library.h" -#include "common_audio/third_party/fft4g/fft4g.h" +#include "common_audio/third_party/ooura/fft_size_256/fft4g.h" #include "modules/audio_processing/transient/common.h" #include "modules/audio_processing/transient/transient_detector.h" #include "modules/audio_processing/transient/transient_suppressor.h" diff --git a/modules/audio_processing/utility/BUILD.gn b/modules/audio_processing/utility/BUILD.gn index 88d2bbd318..437b544fc9 100644 --- a/modules/audio_processing/utility/BUILD.gn +++ b/modules/audio_processing/utility/BUILD.gn @@ -30,48 +30,6 @@ rtc_library("legacy_delay_estimator") { deps = [ "../../../rtc_base:checks" ] } -rtc_library("ooura_fft") { - sources = [ - "ooura_fft.cc", - "ooura_fft.h", - "ooura_fft_tables_common.h", - ] - deps = [ - "../../../rtc_base/system:arch", - "../../../system_wrappers:cpu_features_api", - ] - cflags = [] - - if (current_cpu == "x86" || current_cpu == "x64") { - sources += [ - "ooura_fft_sse2.cc", - "ooura_fft_tables_neon_sse2.h", - ] - if (is_posix || is_fuchsia) { - cflags += [ "-msse2" ] - } - } - - if (rtc_build_with_neon) { - sources += [ - "ooura_fft_neon.cc", - "ooura_fft_tables_neon_sse2.h", - ] - - deps += [ "../../../common_audio" ] - - if (current_cpu != "arm64") { - # Enable compilation for the NEON instruction set. - suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] - cflags += [ "-mfpu=neon" ] - } - } - - if (current_cpu == "mipsel" && mips_float_abi == "hard") { - sources += [ "ooura_fft_mips.cc" ] - } -} - rtc_library("pffft_wrapper") { visibility = [ "../*" ] sources = [ diff --git a/modules/audio_processing/vad/BUILD.gn b/modules/audio_processing/vad/BUILD.gn index c266929dee..9f48883e60 100644 --- a/modules/audio_processing/vad/BUILD.gn +++ b/modules/audio_processing/vad/BUILD.gn @@ -38,7 +38,7 @@ rtc_library("vad") { "../../../audio/utility:audio_frame_operations", "../../../common_audio", "../../../common_audio:common_audio_c", - "../../../common_audio/third_party/fft4g", + "../../../common_audio/third_party/ooura/fft_size_256:fft4g", "../../../rtc_base:checks", "../../audio_coding:isac_vad", ] diff --git a/modules/audio_processing/vad/vad_audio_proc.cc b/modules/audio_processing/vad/vad_audio_proc.cc index 53eb6de70f..97cf65151c 100644 --- a/modules/audio_processing/vad/vad_audio_proc.cc +++ b/modules/audio_processing/vad/vad_audio_proc.cc @@ -14,7 +14,7 @@ #include #include -#include "common_audio/third_party/fft4g/fft4g.h" +#include "common_audio/third_party/ooura/fft_size_256/fft4g.h" #include "modules/audio_processing/vad/pitch_internal.h" #include "modules/audio_processing/vad/pole_zero_filter.h" #include "modules/audio_processing/vad/vad_audio_proc_internal.h" diff --git a/tools_webrtc/libs/generate_licenses.py b/tools_webrtc/libs/generate_licenses.py index 216d3f8f16..04d655cba0 100755 --- a/tools_webrtc/libs/generate_licenses.py +++ b/tools_webrtc/libs/generate_licenses.py @@ -68,7 +68,7 @@ LIB_TO_LICENSES_DICT = { 'fft': ['modules/third_party/fft/LICENSE'], 'g711': ['modules/third_party/g711/LICENSE'], 'g722': ['modules/third_party/g722/LICENSE'], - 'fft4g': ['common_audio/third_party/fft4g/LICENSE'], + 'ooura': ['common_audio/third_party/ooura/LICENSE'], 'spl_sqrt_floor': ['common_audio/third_party/spl_sqrt_floor/LICENSE'], # TODO(bugs.webrtc.org/1110): Remove this hack. This is not a lib.