
This reverts commit 2b242d8fba59ccf67e4c5bcf5a1ea80917a23e1c. Reason for revert: Breaks downstream project. 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=mbonadei@webrtc.org,kwiberg@webrtc.org Change-Id: I4daa7582e55a0343eef72f08ed023c73e0b6456b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183443 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32040}
143 lines
4.1 KiB
Plaintext
143 lines
4.1 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_library("rnn_vad") {
|
|
visibility = [ "../*" ]
|
|
sources = [
|
|
"auto_correlation.cc",
|
|
"auto_correlation.h",
|
|
"common.cc",
|
|
"common.h",
|
|
"features_extraction.cc",
|
|
"features_extraction.h",
|
|
"lp_residual.cc",
|
|
"lp_residual.h",
|
|
"pitch_info.h",
|
|
"pitch_search.cc",
|
|
"pitch_search.h",
|
|
"pitch_search_internal.cc",
|
|
"pitch_search_internal.h",
|
|
"ring_buffer.h",
|
|
"rnn.cc",
|
|
"rnn.h",
|
|
"sequence_buffer.h",
|
|
"spectral_features.cc",
|
|
"spectral_features.h",
|
|
"spectral_features_internal.cc",
|
|
"spectral_features_internal.h",
|
|
"symmetric_matrix_buffer.h",
|
|
]
|
|
|
|
defines = []
|
|
if (rtc_build_with_neon && current_cpu != "arm64") {
|
|
suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
|
|
cflags = [ "-mfpu=neon" ]
|
|
}
|
|
|
|
deps = [
|
|
"..:biquad_filter",
|
|
"../../../../api:array_view",
|
|
"../../../../api:function_view",
|
|
"../../../../rtc_base:checks",
|
|
"../../../../rtc_base:rtc_base_approved",
|
|
"../../../../rtc_base/system:arch",
|
|
"../../../../system_wrappers:cpu_features_api",
|
|
"../../utility:pffft_wrapper",
|
|
"//third_party/rnnoise:rnn_vad",
|
|
]
|
|
}
|
|
|
|
if (rtc_include_tests) {
|
|
rtc_library("test_utils") {
|
|
testonly = true
|
|
sources = [
|
|
"test_utils.cc",
|
|
"test_utils.h",
|
|
]
|
|
deps = [
|
|
":rnn_vad",
|
|
"../../../../api:array_view",
|
|
"../../../../api:scoped_refptr",
|
|
"../../../../rtc_base:checks",
|
|
"../../../../rtc_base/system:arch",
|
|
"../../../../system_wrappers:cpu_features_api",
|
|
"../../../../test:fileutils",
|
|
"../../../../test:test_support",
|
|
]
|
|
}
|
|
|
|
unittest_resources = [
|
|
"../../../../resources/audio_processing/agc2/rnn_vad/band_energies.dat",
|
|
"../../../../resources/audio_processing/agc2/rnn_vad/pitch_buf_24k.dat",
|
|
"../../../../resources/audio_processing/agc2/rnn_vad/pitch_lp_res.dat",
|
|
"../../../../resources/audio_processing/agc2/rnn_vad/pitch_search_int.dat",
|
|
"../../../../resources/audio_processing/agc2/rnn_vad/samples.pcm",
|
|
"../../../../resources/audio_processing/agc2/rnn_vad/vad_prob.dat",
|
|
]
|
|
|
|
if (is_ios) {
|
|
bundle_data("unittests_bundle_data") {
|
|
testonly = true
|
|
sources = unittest_resources
|
|
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
|
|
}
|
|
}
|
|
|
|
rtc_library("unittests") {
|
|
testonly = true
|
|
sources = [
|
|
"auto_correlation_unittest.cc",
|
|
"features_extraction_unittest.cc",
|
|
"lp_residual_unittest.cc",
|
|
"pitch_search_internal_unittest.cc",
|
|
"pitch_search_unittest.cc",
|
|
"ring_buffer_unittest.cc",
|
|
"rnn_unittest.cc",
|
|
"rnn_vad_unittest.cc",
|
|
"sequence_buffer_unittest.cc",
|
|
"spectral_features_internal_unittest.cc",
|
|
"spectral_features_unittest.cc",
|
|
"symmetric_matrix_buffer_unittest.cc",
|
|
]
|
|
deps = [
|
|
":rnn_vad",
|
|
":test_utils",
|
|
"../..:audioproc_test_utils",
|
|
"../../../../api:array_view",
|
|
"../../../../common_audio/",
|
|
"../../../../rtc_base:checks",
|
|
"../../../../rtc_base:logging",
|
|
"../../../../rtc_base/system:arch",
|
|
"../../../../test:test_support",
|
|
"../../utility:pffft_wrapper",
|
|
"//third_party/rnnoise:rnn_vad",
|
|
]
|
|
absl_deps = [ "//third_party/abseil-cpp/absl/memory" ]
|
|
data = unittest_resources
|
|
if (is_ios) {
|
|
deps += [ ":unittests_bundle_data" ]
|
|
}
|
|
}
|
|
|
|
rtc_executable("rnn_vad_tool") {
|
|
testonly = true
|
|
sources = [ "rnn_vad_tool.cc" ]
|
|
deps = [
|
|
":rnn_vad",
|
|
"../../../../api:array_view",
|
|
"../../../../common_audio",
|
|
"../../../../rtc_base:rtc_base_approved",
|
|
"../../../../test:test_support",
|
|
"//third_party/abseil-cpp/absl/flags:flag",
|
|
"//third_party/abseil-cpp/absl/flags:parse",
|
|
]
|
|
}
|
|
}
|