mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-14 06:10:40 +01:00

- Reset the tested metrics to avoid interactions between tests that depend on the execution order - Address the comment in [1] by adding a function to log the same histogram in two different places [1] https://chromium-review.googlesource.com/c/chromium/src/+/4087426/4/tools/metrics/histograms/metadata/web_rtc/histograms.xml#179 Bug: webrtc:7494 Change-Id: Ia4d339b03c8078eb63626c91579f8a9547f087f7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287681 Reviewed-by: Hanna Silen <silen@webrtc.org> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38873}
126 lines
3.1 KiB
Text
126 lines
3.1 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",
|
|
":level_estimation",
|
|
"..:api",
|
|
"..:apm_logging",
|
|
"..:audio_buffer",
|
|
"..:audio_frame_view",
|
|
"../../../api:array_view",
|
|
"../../../common_audio",
|
|
"../../../common_audio:common_audio_c",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:gtest_prod",
|
|
"../../../rtc_base:logging",
|
|
"../../../rtc_base:safe_minmax",
|
|
"../../../system_wrappers:field_trial",
|
|
"../../../system_wrappers:metrics",
|
|
"../agc2:clipping_predictor",
|
|
"../agc2:gain_map",
|
|
"../agc2:input_volume_stats_reporter",
|
|
"../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 = [
|
|
"../../../api:array_view",
|
|
"../../../rtc_base:checks",
|
|
"../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",
|
|
"../../../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" ]
|
|
}
|
|
}
|
|
}
|
|
|
|
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",
|
|
"../../../api:array_view",
|
|
"../../../rtc_base:checks",
|
|
"../../../rtc_base:random",
|
|
"../../../rtc_base:safe_conversions",
|
|
"../../../rtc_base:safe_minmax",
|
|
"../../../rtc_base:stringutils",
|
|
"../../../system_wrappers:metrics",
|
|
"../../../test:field_trial",
|
|
"../../../test:fileutils",
|
|
"../../../test:test_support",
|
|
"//testing/gtest",
|
|
]
|
|
absl_deps = [
|
|
"//third_party/abseil-cpp/absl/strings",
|
|
"//third_party/abseil-cpp/absl/types:optional",
|
|
]
|
|
}
|
|
}
|