This is a reland of 2b242d8fba59ccf67e4c5bcf5a1ea80917a23e1c Original change's description: > Merge cpu_features build targets into //system_wrappers. > > Before this CL, functions declared in cpu_features_wrapper.h where > not defined in the same build target, causing brittle builds that > might fail at link time if the binary was not depending on > //system_wrappers (the target with the definitions), violating [1]. > > This CL moves everything into //system_wrappers and also moves > cpu_features_wrapper.h definitions from C to C++ (in order to be able > to add the definitions to a C++ build target like //system_wrappers). > > [1] - https://webrtc.googlesource.com/src/+/refs/heads/master/style-guide.md#h-cc-pairs > > Bug: None > Change-Id: I5a0009cddb17206b19f2a71eeba722faacc4bcae > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183380 > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#32039} TBR=kwiberg@webrtc.org Bug: None Change-Id: I1695b9a34d3ec20c50c1202a745f64fac58edef0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183444 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32042}
119 lines
2.8 KiB
Plaintext
119 lines
2.8 KiB
Plaintext
# Copyright (c) 2018 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_source_set("gain_control_interface") {
|
|
sources = [ "gain_control.h" ]
|
|
}
|
|
|
|
rtc_library("agc") {
|
|
sources = [
|
|
"agc_manager_direct.cc",
|
|
"agc_manager_direct.h",
|
|
]
|
|
configs += [ "..:apm_debug_dump" ]
|
|
deps = [
|
|
":gain_control_interface",
|
|
":gain_map",
|
|
":level_estimation",
|
|
"..:apm_logging",
|
|
"..:audio_buffer",
|
|
"../../../common_audio",
|
|
"../../../common_audio:common_audio_c",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:gtest_prod",
|
|
"../../../rtc_base:logging",
|
|
"../../../rtc_base:macromagic",
|
|
"../../../rtc_base:rtc_base_approved",
|
|
"../../../rtc_base:safe_minmax",
|
|
"../../../system_wrappers:field_trial",
|
|
"../../../system_wrappers:metrics",
|
|
"../agc2:level_estimation_agc",
|
|
"../vad",
|
|
]
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
|
}
|
|
|
|
rtc_library("level_estimation") {
|
|
sources = [
|
|
"agc.cc",
|
|
"agc.h",
|
|
"loudness_histogram.cc",
|
|
"loudness_histogram.h",
|
|
"utility.cc",
|
|
"utility.h",
|
|
]
|
|
deps = [
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:macromagic",
|
|
"../vad",
|
|
]
|
|
}
|
|
|
|
rtc_library("legacy_agc") {
|
|
visibility = [
|
|
":*",
|
|
"..:*",
|
|
] # Only targets in this file and in
|
|
# audio_processing can depend on
|
|
# this.
|
|
|
|
sources = [
|
|
"legacy/analog_agc.cc",
|
|
"legacy/analog_agc.h",
|
|
"legacy/digital_agc.cc",
|
|
"legacy/digital_agc.h",
|
|
"legacy/gain_control.h",
|
|
]
|
|
|
|
deps = [
|
|
"../../../common_audio",
|
|
"../../../common_audio:common_audio_c",
|
|
"../../../common_audio/third_party/ooura:fft_size_256",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:rtc_base_approved",
|
|
"../../../system_wrappers",
|
|
]
|
|
|
|
if (rtc_build_with_neon) {
|
|
if (current_cpu != "arm64") {
|
|
# Enable compilation for the NEON instruction set.
|
|
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
|
|
cflags = [ "-mfpu=neon" ]
|
|
}
|
|
}
|
|
}
|
|
|
|
rtc_source_set("gain_map") {
|
|
sources = [ "gain_map_internal.h" ]
|
|
}
|
|
|
|
if (rtc_include_tests) {
|
|
rtc_library("agc_unittests") {
|
|
testonly = true
|
|
sources = [
|
|
"agc_manager_direct_unittest.cc",
|
|
"loudness_histogram_unittest.cc",
|
|
"mock_agc.h",
|
|
]
|
|
configs += [ "..:apm_debug_dump" ]
|
|
|
|
deps = [
|
|
":agc",
|
|
":gain_control_interface",
|
|
":level_estimation",
|
|
"..:mocks",
|
|
"../../../test:field_trial",
|
|
"../../../test:fileutils",
|
|
"../../../test:test_support",
|
|
"//testing/gtest",
|
|
]
|
|
}
|
|
}
|