Create separate build targets for utility/ in APM
This clarifies the dependencies of utility/ a lot (spoiler: there are very few) and makes it easier to separate the build targets for aecm and aec2. Bug: webrtc:9488 Change-Id: If916f86e80c19d1b650d0908fbe8343ea7c47bd7 Reviewed-on: https://webrtc-review.googlesource.com/87141 Reviewed-by: Alex Loiko <aleloi@webrtc.org> Commit-Queue: Sam Zackrisson <saza@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23860}
This commit is contained in:

committed by
Commit Bot

parent
426d5b75bb
commit
b2e176522e
@ -335,16 +335,6 @@ rtc_source_set("aec_core") {
|
|||||||
"aecm/aecm_defines.h",
|
"aecm/aecm_defines.h",
|
||||||
"aecm/echo_control_mobile.cc",
|
"aecm/echo_control_mobile.cc",
|
||||||
"aecm/echo_control_mobile.h",
|
"aecm/echo_control_mobile.h",
|
||||||
"utility/block_mean_calculator.cc",
|
|
||||||
"utility/block_mean_calculator.h",
|
|
||||||
"utility/delay_estimator.cc",
|
|
||||||
"utility/delay_estimator.h",
|
|
||||||
"utility/delay_estimator_internal.h",
|
|
||||||
"utility/delay_estimator_wrapper.cc",
|
|
||||||
"utility/delay_estimator_wrapper.h",
|
|
||||||
"utility/ooura_fft.cc",
|
|
||||||
"utility/ooura_fft.h",
|
|
||||||
"utility/ooura_fft_tables_common.h",
|
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":apm_logging",
|
":apm_logging",
|
||||||
@ -358,16 +348,15 @@ rtc_source_set("aec_core") {
|
|||||||
"../../rtc_base:sanitizer",
|
"../../rtc_base:sanitizer",
|
||||||
"../../system_wrappers:cpu_features_api",
|
"../../system_wrappers:cpu_features_api",
|
||||||
"../../system_wrappers:metrics_api",
|
"../../system_wrappers:metrics_api",
|
||||||
|
"utility:block_mean_calculator",
|
||||||
|
"utility:legacy_delay_estimator",
|
||||||
|
"utility:ooura_fft",
|
||||||
]
|
]
|
||||||
cflags = []
|
cflags = []
|
||||||
defines = []
|
defines = []
|
||||||
|
|
||||||
if (current_cpu == "x86" || current_cpu == "x64") {
|
if (current_cpu == "x86" || current_cpu == "x64") {
|
||||||
sources += [
|
sources += [ "aec/aec_core_sse2.cc" ]
|
||||||
"aec/aec_core_sse2.cc",
|
|
||||||
"utility/ooura_fft_sse2.cc",
|
|
||||||
"utility/ooura_fft_tables_neon_sse2.h",
|
|
||||||
]
|
|
||||||
if (is_posix || is_fuchsia) {
|
if (is_posix || is_fuchsia) {
|
||||||
cflags += [ "-msse2" ]
|
cflags += [ "-msse2" ]
|
||||||
}
|
}
|
||||||
@ -377,8 +366,6 @@ rtc_source_set("aec_core") {
|
|||||||
sources += [
|
sources += [
|
||||||
"aec/aec_core_neon.cc",
|
"aec/aec_core_neon.cc",
|
||||||
"aecm/aecm_core_neon.cc",
|
"aecm/aecm_core_neon.cc",
|
||||||
"utility/ooura_fft_neon.cc",
|
|
||||||
"utility/ooura_fft_tables_neon_sse2.h",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (current_cpu != "arm64") {
|
if (current_cpu != "arm64") {
|
||||||
@ -404,10 +391,7 @@ rtc_source_set("aec_core") {
|
|||||||
if (current_cpu == "mipsel") {
|
if (current_cpu == "mipsel") {
|
||||||
sources += [ "aecm/aecm_core_mips.cc" ]
|
sources += [ "aecm/aecm_core_mips.cc" ]
|
||||||
if (mips_float_abi == "hard") {
|
if (mips_float_abi == "hard") {
|
||||||
sources += [
|
sources += [ "aec/aec_core_mips.cc" ]
|
||||||
"aec/aec_core_mips.cc",
|
|
||||||
"utility/ooura_fft_mips.cc",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sources += [ "aecm/aecm_core_c.cc" ]
|
sources += [ "aecm/aecm_core_c.cc" ]
|
||||||
@ -482,8 +466,6 @@ if (rtc_include_tests) {
|
|||||||
"transient/transient_suppressor_unittest.cc",
|
"transient/transient_suppressor_unittest.cc",
|
||||||
"transient/wpd_node_unittest.cc",
|
"transient/wpd_node_unittest.cc",
|
||||||
"transient/wpd_tree_unittest.cc",
|
"transient/wpd_tree_unittest.cc",
|
||||||
"utility/block_mean_calculator_unittest.cc",
|
|
||||||
"utility/delay_estimator_unittest.cc",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
@ -521,6 +503,8 @@ if (rtc_include_tests) {
|
|||||||
"agc2:noise_estimator_unittests",
|
"agc2:noise_estimator_unittests",
|
||||||
"agc2/rnn_vad:unittests",
|
"agc2/rnn_vad:unittests",
|
||||||
"test/conversational_speech:unittest",
|
"test/conversational_speech:unittest",
|
||||||
|
"utility:block_mean_calculator_unittest",
|
||||||
|
"utility:legacy_delay_estimator_unittest",
|
||||||
"vad:vad_unittests",
|
"vad:vad_unittests",
|
||||||
"//testing/gtest",
|
"//testing/gtest",
|
||||||
"//third_party/abseil-cpp/absl/memory",
|
"//third_party/abseil-cpp/absl/memory",
|
||||||
|
@ -111,7 +111,6 @@ rtc_static_library("aec3") {
|
|||||||
|
|
||||||
defines = []
|
defines = []
|
||||||
deps = [
|
deps = [
|
||||||
"..:aec_core",
|
|
||||||
"..:apm_logging",
|
"..:apm_logging",
|
||||||
"..:audio_processing",
|
"..:audio_processing",
|
||||||
"../../..:typedefs",
|
"../../..:typedefs",
|
||||||
@ -125,6 +124,7 @@ rtc_static_library("aec3") {
|
|||||||
"../../../system_wrappers:cpu_features_api",
|
"../../../system_wrappers:cpu_features_api",
|
||||||
"../../../system_wrappers:field_trial_api",
|
"../../../system_wrappers:field_trial_api",
|
||||||
"../../../system_wrappers:metrics_api",
|
"../../../system_wrappers:metrics_api",
|
||||||
|
"../utility:ooura_fft",
|
||||||
"//third_party/abseil-cpp/absl/types:optional",
|
"//third_party/abseil-cpp/absl/types:optional",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,6 @@ rtc_source_set("adaptive_digital") {
|
|||||||
":gain_applier",
|
":gain_applier",
|
||||||
":noise_level_estimator",
|
":noise_level_estimator",
|
||||||
":rnn_vad_with_level",
|
":rnn_vad_with_level",
|
||||||
"..:aec_core",
|
|
||||||
"..:apm_logging",
|
"..:apm_logging",
|
||||||
"..:audio_frame_view",
|
"..:audio_frame_view",
|
||||||
"../../../api:array_view",
|
"../../../api:array_view",
|
||||||
@ -119,13 +118,13 @@ rtc_source_set("noise_level_estimator") {
|
|||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":biquad_filter",
|
":biquad_filter",
|
||||||
"..:aec_core",
|
|
||||||
"..:apm_logging",
|
"..:apm_logging",
|
||||||
"..:audio_frame_view",
|
"..:audio_frame_view",
|
||||||
"../../../api:array_view",
|
"../../../api:array_view",
|
||||||
"../../../common_audio",
|
"../../../common_audio",
|
||||||
"../../../rtc_base:checks",
|
"../../../rtc_base:checks",
|
||||||
"../../../rtc_base:macromagic",
|
"../../../rtc_base:macromagic",
|
||||||
|
"../utility:ooura_fft",
|
||||||
]
|
]
|
||||||
|
|
||||||
configs += [ "..:apm_debug_dump" ]
|
configs += [ "..:apm_debug_dump" ]
|
||||||
|
119
modules/audio_processing/utility/BUILD.gn
Normal file
119
modules/audio_processing/utility/BUILD.gn
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
# Copyright (c) 2014 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("//build/config/arm.gni")
|
||||||
|
import("../../../webrtc.gni")
|
||||||
|
|
||||||
|
rtc_source_set("block_mean_calculator") {
|
||||||
|
sources = [
|
||||||
|
"block_mean_calculator.cc",
|
||||||
|
"block_mean_calculator.h",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"../../../rtc_base:checks",
|
||||||
|
"../../../rtc_base:rtc_base_approved",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
rtc_source_set("legacy_delay_estimator") {
|
||||||
|
sources = [
|
||||||
|
"delay_estimator.cc",
|
||||||
|
"delay_estimator.h",
|
||||||
|
"delay_estimator_internal.h",
|
||||||
|
"delay_estimator_wrapper.cc",
|
||||||
|
"delay_estimator_wrapper.h",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"../../..:typedefs",
|
||||||
|
"../../../rtc_base:checks",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
rtc_source_set("ooura_fft") {
|
||||||
|
sources = [
|
||||||
|
"ooura_fft.cc",
|
||||||
|
"ooura_fft.h",
|
||||||
|
"ooura_fft_tables_common.h",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
"../../..:typedefs",
|
||||||
|
"../../../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. This is needed
|
||||||
|
# since //build/config/arm.gni only enables NEON for iOS, not Android.
|
||||||
|
# This provides the same functionality as webrtc/build/arm_neon.gypi.
|
||||||
|
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
|
||||||
|
cflags += [ "-mfpu=neon" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Disable LTO on NEON targets due to compiler bug.
|
||||||
|
# TODO(fdegans): Enable this. See crbug.com/408997.
|
||||||
|
if (rtc_use_lto) {
|
||||||
|
cflags -= [
|
||||||
|
"-flto",
|
||||||
|
"-ffat-lto-objects",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (current_cpu == "mipsel" && mips_float_abi == "hard") {
|
||||||
|
sources += [ "ooura_fft_mips.cc" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rtc_include_tests) {
|
||||||
|
rtc_source_set("block_mean_calculator_unittest") {
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"block_mean_calculator_unittest.cc",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
":block_mean_calculator",
|
||||||
|
"../../../rtc_base:rtc_base_approved",
|
||||||
|
"../../../test:test_support",
|
||||||
|
"//testing/gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
rtc_source_set("legacy_delay_estimator_unittest") {
|
||||||
|
testonly = true
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
"delay_estimator_unittest.cc",
|
||||||
|
]
|
||||||
|
deps = [
|
||||||
|
":legacy_delay_estimator",
|
||||||
|
"../../..:typedefs",
|
||||||
|
"../../../rtc_base:rtc_base_approved",
|
||||||
|
"../../../test:test_support",
|
||||||
|
"//testing/gtest",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -33,8 +33,8 @@ const size_t kSizeEnable = sizeof(kEnable) / sizeof(*kEnable);
|
|||||||
class DelayEstimatorTest : public ::testing::Test {
|
class DelayEstimatorTest : public ::testing::Test {
|
||||||
protected:
|
protected:
|
||||||
DelayEstimatorTest();
|
DelayEstimatorTest();
|
||||||
virtual void SetUp();
|
void SetUp() override;
|
||||||
virtual void TearDown();
|
void TearDown() override;
|
||||||
|
|
||||||
void Init();
|
void Init();
|
||||||
void InitBinary();
|
void InitBinary();
|
||||||
|
Reference in New Issue
Block a user