mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00

This is a reland of 09b439c6f7
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 <mbonadei@webrtc.org>
> Reviewed-by: Per Åhgren <peah@webrtc.org>
> 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 <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31111}
118 lines
2.8 KiB
Text
118 lines
2.8 KiB
Text
# 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",
|
|
"//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:fft4g",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:rtc_base_approved",
|
|
"../../../system_wrappers:cpu_features_api",
|
|
]
|
|
|
|
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",
|
|
]
|
|
}
|
|
}
|