blob: 745775e8cc79d2e5471385d2a0f0bd57c82b5b3a [file] [log] [blame]
Sam Zackrissonb2e17652018-07-05 16:41:55 +02001# Copyright (c) 2014 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
Sam Zackrissonb2e17652018-07-05 16:41:55 +02009import("../../../webrtc.gni")
10
Mirko Bonadei86d053c2019-10-17 21:32:04 +020011rtc_library("cascaded_biquad_filter") {
Per Åhgren0aefbf02019-08-23 21:29:17 +020012 sources = [
13 "cascaded_biquad_filter.cc",
14 "cascaded_biquad_filter.h",
15 ]
16 deps = [
17 "../../../api:array_view",
18 "../../../rtc_base:checks",
19 ]
20}
21
Mirko Bonadei86d053c2019-10-17 21:32:04 +020022rtc_library("block_mean_calculator") {
Sam Zackrissonb2e17652018-07-05 16:41:55 +020023 sources = [
24 "block_mean_calculator.cc",
25 "block_mean_calculator.h",
26 ]
27 deps = [
28 "../../../rtc_base:checks",
29 "../../../rtc_base:rtc_base_approved",
30 ]
31}
32
Mirko Bonadei86d053c2019-10-17 21:32:04 +020033rtc_library("legacy_delay_estimator") {
Sam Zackrissonb2e17652018-07-05 16:41:55 +020034 sources = [
35 "delay_estimator.cc",
36 "delay_estimator.h",
37 "delay_estimator_internal.h",
38 "delay_estimator_wrapper.cc",
39 "delay_estimator_wrapper.h",
40 ]
41 deps = [
Sam Zackrissonb2e17652018-07-05 16:41:55 +020042 "../../../rtc_base:checks",
43 ]
44}
45
Mirko Bonadei86d053c2019-10-17 21:32:04 +020046rtc_library("ooura_fft") {
Sam Zackrissonb2e17652018-07-05 16:41:55 +020047 sources = [
48 "ooura_fft.cc",
49 "ooura_fft.h",
50 "ooura_fft_tables_common.h",
51 ]
52 deps = [
Niels Möllera12c42a2018-07-25 16:05:48 +020053 "../../../rtc_base/system:arch",
Sam Zackrissonb2e17652018-07-05 16:41:55 +020054 "../../../system_wrappers:cpu_features_api",
55 ]
56 cflags = []
57
58 if (current_cpu == "x86" || current_cpu == "x64") {
59 sources += [
60 "ooura_fft_sse2.cc",
61 "ooura_fft_tables_neon_sse2.h",
62 ]
63 if (is_posix || is_fuchsia) {
64 cflags += [ "-msse2" ]
65 }
66 }
67
68 if (rtc_build_with_neon) {
69 sources += [
70 "ooura_fft_neon.cc",
71 "ooura_fft_tables_neon_sse2.h",
72 ]
73
74 deps += [ "../../../common_audio" ]
75
76 if (current_cpu != "arm64") {
Oleh Prypind2f4e8b2018-08-01 12:18:05 +020077 # Enable compilation for the NEON instruction set.
Sam Zackrissonb2e17652018-07-05 16:41:55 +020078 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
79 cflags += [ "-mfpu=neon" ]
80 }
Sam Zackrissonb2e17652018-07-05 16:41:55 +020081 }
82
83 if (current_cpu == "mipsel" && mips_float_abi == "hard") {
84 sources += [ "ooura_fft_mips.cc" ]
85 }
86}
87
Mirko Bonadei86d053c2019-10-17 21:32:04 +020088rtc_library("pffft_wrapper") {
Alessio Bazzicac8ba8b22019-03-27 09:30:14 +010089 visibility = [ "../*" ]
Alessio Bazzicacaa499b2019-02-21 17:35:43 +010090 sources = [
91 "pffft_wrapper.cc",
92 "pffft_wrapper.h",
93 ]
94 deps = [
95 "../../../api:array_view",
96 "../../../rtc_base:checks",
97 "//third_party/pffft",
98 ]
99}
100
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200101if (rtc_include_tests) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200102 rtc_library("cascaded_biquad_filter_unittest") {
Per Åhgren0aefbf02019-08-23 21:29:17 +0200103 testonly = true
104
105 sources = [
106 "cascaded_biquad_filter_unittest.cc",
107 ]
108 deps = [
109 ":cascaded_biquad_filter",
110 "../../../rtc_base:rtc_base_approved",
111 "../../../test:test_support",
112 "//testing/gtest",
113 ]
114 }
115
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200116 rtc_library("block_mean_calculator_unittest") {
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200117 testonly = true
118
119 sources = [
120 "block_mean_calculator_unittest.cc",
121 ]
122 deps = [
123 ":block_mean_calculator",
124 "../../../rtc_base:rtc_base_approved",
125 "../../../test:test_support",
126 "//testing/gtest",
127 ]
128 }
129
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200130 rtc_library("legacy_delay_estimator_unittest") {
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200131 testonly = true
132
133 sources = [
134 "delay_estimator_unittest.cc",
135 ]
136 deps = [
137 ":legacy_delay_estimator",
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200138 "../../../rtc_base:rtc_base_approved",
139 "../../../test:test_support",
140 "//testing/gtest",
141 ]
142 }
Alessio Bazzicacaa499b2019-02-21 17:35:43 +0100143
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200144 rtc_library("pffft_wrapper_unittest") {
Alessio Bazzicacaa499b2019-02-21 17:35:43 +0100145 testonly = true
146 sources = [
147 "pffft_wrapper_unittest.cc",
148 ]
149 deps = [
150 ":pffft_wrapper",
151 "../../../test:test_support",
152 "//testing/gtest",
153 "//third_party/pffft",
154 ]
155 }
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200156}