From 146137adeebec273b6c91e008bedff9ebe07c8fd Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Tue, 21 Apr 2020 09:56:16 +0200 Subject: [PATCH] Merge OOURA BUILD.gn files. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No-Tree-Checks: True No-Try: True Bug: webrtc:11509 Change-Id: If66483a02085396e231986e39ef0dafcdd3f4bed Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173740 Commit-Queue: Mirko Bonadei Reviewed-by: Per Ã…hgren Reviewed-by: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#31114} --- common_audio/BUILD.gn | 4 +-- .../ooura/{fft_size_128 => }/BUILD.gn | 33 +++++++++++-------- .../third_party/ooura/fft_size_256/BUILD.gn | 16 --------- modules/audio_processing/BUILD.gn | 2 +- modules/audio_processing/aec3/BUILD.gn | 2 +- modules/audio_processing/agc/BUILD.gn | 2 +- modules/audio_processing/agc2/BUILD.gn | 2 +- modules/audio_processing/ns/BUILD.gn | 4 +-- modules/audio_processing/transient/BUILD.gn | 2 +- modules/audio_processing/vad/BUILD.gn | 2 +- 10 files changed, 30 insertions(+), 39 deletions(-) rename common_audio/third_party/ooura/{fft_size_128 => }/BUILD.gn (59%) delete mode 100644 common_audio/third_party/ooura/fft_size_256/BUILD.gn diff --git a/common_audio/BUILD.gn b/common_audio/BUILD.gn index 36f723d1c6..72eed1f003 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/ooura/fft_size_256:fft4g", + "third_party/ooura:fft_size_256", "//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/ooura/fft_size_256:fft4g", + "third_party/ooura:fft_size_256", "third_party/spl_sqrt_floor", ] } diff --git a/common_audio/third_party/ooura/fft_size_128/BUILD.gn b/common_audio/third_party/ooura/BUILD.gn similarity index 59% rename from common_audio/third_party/ooura/fft_size_128/BUILD.gn rename to common_audio/third_party/ooura/BUILD.gn index cbafc7bcd1..742f620044 100644 --- a/common_audio/third_party/ooura/fft_size_128/BUILD.gn +++ b/common_audio/third_party/ooura/BUILD.gn @@ -6,24 +6,24 @@ # 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("ooura_fft") { +rtc_library("fft_size_128") { sources = [ - "ooura_fft.cc", - "ooura_fft.h", - "ooura_fft_tables_common.h", + "fft_size_128/ooura_fft.cc", + "fft_size_128/ooura_fft.h", + "fft_size_128/ooura_fft_tables_common.h", ] deps = [ - "../../../../rtc_base/system:arch", - "../../../../system_wrappers:cpu_features_api", + "../../../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", + "fft_size_128/ooura_fft_sse2.cc", + "fft_size_128/ooura_fft_tables_neon_sse2.h", ] if (is_posix || is_fuchsia) { cflags += [ "-msse2" ] @@ -32,11 +32,11 @@ rtc_library("ooura_fft") { if (rtc_build_with_neon) { sources += [ - "ooura_fft_neon.cc", - "ooura_fft_tables_neon_sse2.h", + "fft_size_128/ooura_fft_neon.cc", + "fft_size_128/ooura_fft_tables_neon_sse2.h", ] - deps += [ "../../../../common_audio" ] + deps += [ "../../../common_audio" ] if (current_cpu != "arm64") { # Enable compilation for the NEON instruction set. @@ -46,6 +46,13 @@ rtc_library("ooura_fft") { } if (current_cpu == "mipsel" && mips_float_abi == "hard") { - sources += [ "ooura_fft_mips.cc" ] + sources += [ "fft_size_128/ooura_fft_mips.cc" ] } } + +rtc_library("fft_size_256") { + sources = [ + "fft_size_256/fft4g.cc", + "fft_size_256/fft4g.h", + ] +} diff --git a/common_audio/third_party/ooura/fft_size_256/BUILD.gn b/common_audio/third_party/ooura/fft_size_256/BUILD.gn deleted file mode 100644 index 030867b0ae..0000000000 --- a/common_audio/third_party/ooura/fft_size_256/BUILD.gn +++ /dev/null @@ -1,16 +0,0 @@ -# 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("fft4g") { - sources = [ - "fft4g.cc", - "fft4g.h", - ] -} diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn index ffda2da91d..69f94fa69f 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/ooura/fft_size_256:fft4g", + "../../common_audio/third_party/ooura:fft_size_256", "../../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 9f6b6eb3ff..d07ffa6abe 100644 --- a/modules/audio_processing/aec3/BUILD.gn +++ b/modules/audio_processing/aec3/BUILD.gn @@ -140,7 +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", + "../../../common_audio/third_party/ooura:fft_size_128", "../../../rtc_base:checks", "../../../rtc_base:rtc_base_approved", "../../../rtc_base:safe_minmax", diff --git a/modules/audio_processing/agc/BUILD.gn b/modules/audio_processing/agc/BUILD.gn index 43612d6a27..42830c918d 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/ooura/fft_size_256:fft4g", + "../../../common_audio/third_party/ooura:fft_size_256", "../../../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 0d1c956b54..8d9bb14731 100644 --- a/modules/audio_processing/agc2/BUILD.gn +++ b/modules/audio_processing/agc2/BUILD.gn @@ -150,7 +150,7 @@ rtc_library("noise_level_estimator") { "..:audio_frame_view", "../../../api:array_view", "../../../common_audio", - "../../../common_audio/third_party/ooura/fft_size_128:ooura_fft", + "../../../common_audio/third_party/ooura:fft_size_128", "../../../rtc_base:checks", "../../../rtc_base:macromagic", ] diff --git a/modules/audio_processing/ns/BUILD.gn b/modules/audio_processing/ns/BUILD.gn index b988239586..442a313e64 100644 --- a/modules/audio_processing/ns/BUILD.gn +++ b/modules/audio_processing/ns/BUILD.gn @@ -54,8 +54,8 @@ rtc_static_library("ns") { "..:high_pass_filter", "../../../api:array_view", "../../../common_audio:common_audio_c", - "../../../common_audio/third_party/ooura/fft_size_128:ooura_fft", - "../../../common_audio/third_party/ooura/fft_size_256:fft4g", + "../../../common_audio/third_party/ooura:fft_size_128", + "../../../common_audio/third_party/ooura:fft_size_256", "../../../rtc_base:checks", "../../../rtc_base:rtc_base_approved", "../../../rtc_base:safe_minmax", diff --git a/modules/audio_processing/transient/BUILD.gn b/modules/audio_processing/transient/BUILD.gn index 9df9323542..984ffbfc8d 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/ooura/fft_size_256:fft4g", + "../../../common_audio/third_party/ooura:fft_size_256", "../../../rtc_base:checks", "../../../rtc_base:gtest_prod", "../../../rtc_base:logging", diff --git a/modules/audio_processing/vad/BUILD.gn b/modules/audio_processing/vad/BUILD.gn index 9f48883e60..71e079d3a3 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/ooura/fft_size_256:fft4g", + "../../../common_audio/third_party/ooura:fft_size_256", "../../../rtc_base:checks", "../../audio_coding:isac_vad", ]