Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 1 | # Copyright (c) 2019 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 | |
| 9 | import("../../../webrtc.gni") |
| 10 | |
| 11 | rtc_static_library("ns") { |
| 12 | visibility = [ "*" ] |
| 13 | configs += [ "..:apm_debug_dump" ] |
| 14 | sources = [ |
| 15 | "fast_math.cc", |
| 16 | "fast_math.h", |
| 17 | "histograms.cc", |
| 18 | "histograms.h", |
| 19 | "noise_estimator.cc", |
| 20 | "noise_estimator.h", |
| 21 | "noise_suppressor.cc", |
| 22 | "noise_suppressor.h", |
| 23 | "ns_common.h", |
| 24 | "ns_config.h", |
| 25 | "ns_fft.cc", |
| 26 | "ns_fft.h", |
| 27 | "prior_signal_model.cc", |
| 28 | "prior_signal_model.h", |
| 29 | "prior_signal_model_estimator.cc", |
| 30 | "prior_signal_model_estimator.h", |
| 31 | "quantile_noise_estimator.cc", |
| 32 | "quantile_noise_estimator.h", |
| 33 | "signal_model.cc", |
| 34 | "signal_model.h", |
| 35 | "signal_model_estimator.cc", |
| 36 | "signal_model_estimator.h", |
| 37 | "speech_probability_estimator.cc", |
| 38 | "speech_probability_estimator.h", |
| 39 | "suppression_params.cc", |
| 40 | "suppression_params.h", |
| 41 | "wiener_filter.cc", |
| 42 | "wiener_filter.h", |
| 43 | ] |
| 44 | |
| 45 | defines = [] |
| 46 | if (rtc_build_with_neon && current_cpu != "arm64") { |
| 47 | suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] |
| 48 | cflags = [ "-mfpu=neon" ] |
| 49 | } |
| 50 | |
| 51 | deps = [ |
| 52 | "..:apm_logging", |
| 53 | "..:audio_buffer", |
| 54 | "..:high_pass_filter", |
| 55 | "../../../api:array_view", |
| 56 | "../../../common_audio:common_audio_c", |
Mirko Bonadei | 146137a | 2020-04-21 09:56:16 +0200 | [diff] [blame] | 57 | "../../../common_audio/third_party/ooura:fft_size_128", |
| 58 | "../../../common_audio/third_party/ooura:fft_size_256", |
Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 59 | "../../../rtc_base:checks", |
| 60 | "../../../rtc_base:rtc_base_approved", |
| 61 | "../../../rtc_base:safe_minmax", |
| 62 | "../../../rtc_base/system:arch", |
Mirko Bonadei | 66e7338 | 2020-09-05 21:55:35 +0200 | [diff] [blame] | 63 | "../../../system_wrappers", |
Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 64 | "../../../system_wrappers:field_trial", |
| 65 | "../../../system_wrappers:metrics", |
| 66 | "../utility:cascaded_biquad_filter", |
Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 67 | ] |
Mirko Bonadei | 2dcf348 | 2020-06-05 14:30:41 +0200 | [diff] [blame] | 68 | absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] |
Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | if (rtc_include_tests) { |
| 72 | rtc_source_set("ns_unittests") { |
| 73 | testonly = true |
| 74 | |
| 75 | configs += [ "..:apm_debug_dump" ] |
Mirko Bonadei | ccbe95f | 2020-01-21 12:10:10 +0100 | [diff] [blame] | 76 | sources = [ "noise_suppressor_unittest.cc" ] |
Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 77 | |
| 78 | deps = [ |
| 79 | ":ns", |
| 80 | "..:apm_logging", |
| 81 | "..:audio_buffer", |
| 82 | "..:audio_processing", |
Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 83 | "..:high_pass_filter", |
| 84 | "../../../api:array_view", |
| 85 | "../../../rtc_base:checks", |
| 86 | "../../../rtc_base:rtc_base_approved", |
| 87 | "../../../rtc_base:safe_minmax", |
| 88 | "../../../rtc_base/system:arch", |
Mirko Bonadei | 66e7338 | 2020-09-05 21:55:35 +0200 | [diff] [blame] | 89 | "../../../system_wrappers", |
Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 90 | "../../../test:test_support", |
| 91 | "../utility:cascaded_biquad_filter", |
Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 92 | ] |
Mirko Bonadei | 2dcf348 | 2020-06-05 14:30:41 +0200 | [diff] [blame] | 93 | absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] |
Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 94 | |
| 95 | defines = [] |
| 96 | |
| 97 | if (rtc_enable_protobuf) { |
| 98 | sources += [] |
| 99 | } |
Andrey Logvin | e7c79fd | 2021-02-01 09:56:37 +0000 | [diff] [blame] | 100 | |
| 101 | if (!build_with_chromium) { |
| 102 | deps += [ "..:audio_processing_unittests" ] |
| 103 | } |
Per Åhgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame] | 104 | } |
| 105 | } |