blob: 5f9a13969a4ed5d8592f73a358bffc746ab1d3f9 [file] [log] [blame]
Sam Zackrisson4b6ba7c2020-03-12 12:45:21 +01001# Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../../../webrtc.gni")
10
sazaaa42ecd2020-04-01 15:24:40 +020011rtc_source_set("transient_suppressor_api") {
12 sources = [ "transient_suppressor.h" ]
13}
14
sazaaa42ecd2020-04-01 15:24:40 +020015rtc_library("transient_suppressor_impl") {
16 visibility = [
Andrey Logvinb79acd82021-01-29 10:36:11 +000017 ":click_annotate",
sazaaa42ecd2020-04-01 15:24:40 +020018 ":transient_suppression_test",
19 ":transient_suppression_unittests",
Andrey Logvinb79acd82021-01-29 10:36:11 +000020 "..:optionally_built_submodule_creators",
sazaaa42ecd2020-04-01 15:24:40 +020021 ]
Sam Zackrisson4b6ba7c2020-03-12 12:45:21 +010022 sources = [
23 "common.h",
24 "daubechies_8_wavelet_coeffs.h",
25 "dyadic_decimator.h",
26 "moving_moments.cc",
27 "moving_moments.h",
28 "transient_detector.cc",
29 "transient_detector.h",
sazaaa42ecd2020-04-01 15:24:40 +020030 "transient_suppressor_impl.cc",
31 "transient_suppressor_impl.h",
Sam Zackrisson4b6ba7c2020-03-12 12:45:21 +010032 "windows_private.h",
33 "wpd_node.cc",
34 "wpd_node.h",
35 "wpd_tree.cc",
36 "wpd_tree.h",
37 ]
38 deps = [
sazaaa42ecd2020-04-01 15:24:40 +020039 ":transient_suppressor_api",
Sam Zackrisson4b6ba7c2020-03-12 12:45:21 +010040 "../../../common_audio:common_audio",
41 "../../../common_audio:common_audio_c",
42 "../../../common_audio:fir_filter",
43 "../../../common_audio:fir_filter_factory",
Mirko Bonadei146137a2020-04-21 09:56:16 +020044 "../../../common_audio/third_party/ooura:fft_size_256",
Sam Zackrisson4b6ba7c2020-03-12 12:45:21 +010045 "../../../rtc_base:checks",
46 "../../../rtc_base:gtest_prod",
47 "../../../rtc_base:logging",
48 ]
49}
50
51if (rtc_include_tests) {
Andrey Logvine7c79fd2021-02-01 09:56:37 +000052 if (!build_with_chromium) {
53 rtc_executable("click_annotate") {
54 testonly = true
55 sources = [
56 "click_annotate.cc",
57 "file_utils.cc",
58 "file_utils.h",
59 ]
60 deps = [
61 ":transient_suppressor_impl",
62 "..:audio_processing",
63 "../../../rtc_base/system:file_wrapper",
64 "../../../system_wrappers",
65 ]
66 }
Sam Zackrisson4b6ba7c2020-03-12 12:45:21 +010067
Andrey Logvine7c79fd2021-02-01 09:56:37 +000068 rtc_executable("transient_suppression_test") {
69 testonly = true
70 sources = [
71 "file_utils.cc",
72 "file_utils.h",
73 "transient_suppression_test.cc",
74 ]
75 deps = [
76 ":transient_suppressor_impl",
77 "..:audio_processing",
78 "../../../common_audio",
79 "../../../rtc_base:rtc_base_approved",
80 "../../../rtc_base/system:file_wrapper",
81 "../../../system_wrappers",
82 "../../../test:fileutils",
83 "../../../test:test_support",
84 "../agc:level_estimation",
85 "//testing/gtest",
86 "//third_party/abseil-cpp/absl/flags:flag",
87 "//third_party/abseil-cpp/absl/flags:parse",
88 ]
89 }
Sam Zackrisson4b6ba7c2020-03-12 12:45:21 +010090 }
91
92 rtc_library("transient_suppression_unittests") {
93 testonly = true
94 sources = [
95 "dyadic_decimator_unittest.cc",
96 "file_utils.cc",
97 "file_utils.h",
98 "file_utils_unittest.cc",
99 "moving_moments_unittest.cc",
100 "transient_detector_unittest.cc",
101 "transient_suppressor_unittest.cc",
102 "wpd_node_unittest.cc",
103 "wpd_tree_unittest.cc",
104 ]
105 deps = [
sazaaa42ecd2020-04-01 15:24:40 +0200106 ":transient_suppressor_impl",
Sam Zackrisson4b6ba7c2020-03-12 12:45:21 +0100107 "../../../rtc_base:stringutils",
108 "../../../rtc_base/system:file_wrapper",
109 "../../../test:fileutils",
110 "../../../test:test_support",
111 "//testing/gtest",
112 ]
113 }
114}