blob: 88d2bbd3189faa9a2983d447a7065deba7e87572 [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("legacy_delay_estimator") {
Sam Zackrissonb2e17652018-07-05 16:41:55 +020023 sources = [
24 "delay_estimator.cc",
25 "delay_estimator.h",
26 "delay_estimator_internal.h",
27 "delay_estimator_wrapper.cc",
28 "delay_estimator_wrapper.h",
29 ]
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010030 deps = [ "../../../rtc_base:checks" ]
Sam Zackrissonb2e17652018-07-05 16:41:55 +020031}
32
Mirko Bonadei86d053c2019-10-17 21:32:04 +020033rtc_library("ooura_fft") {
Sam Zackrissonb2e17652018-07-05 16:41:55 +020034 sources = [
35 "ooura_fft.cc",
36 "ooura_fft.h",
37 "ooura_fft_tables_common.h",
38 ]
39 deps = [
Niels Möllera12c42a2018-07-25 16:05:48 +020040 "../../../rtc_base/system:arch",
Sam Zackrissonb2e17652018-07-05 16:41:55 +020041 "../../../system_wrappers:cpu_features_api",
42 ]
43 cflags = []
44
45 if (current_cpu == "x86" || current_cpu == "x64") {
46 sources += [
47 "ooura_fft_sse2.cc",
48 "ooura_fft_tables_neon_sse2.h",
49 ]
50 if (is_posix || is_fuchsia) {
51 cflags += [ "-msse2" ]
52 }
53 }
54
55 if (rtc_build_with_neon) {
56 sources += [
57 "ooura_fft_neon.cc",
58 "ooura_fft_tables_neon_sse2.h",
59 ]
60
61 deps += [ "../../../common_audio" ]
62
63 if (current_cpu != "arm64") {
Oleh Prypind2f4e8b2018-08-01 12:18:05 +020064 # Enable compilation for the NEON instruction set.
Sam Zackrissonb2e17652018-07-05 16:41:55 +020065 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
66 cflags += [ "-mfpu=neon" ]
67 }
Sam Zackrissonb2e17652018-07-05 16:41:55 +020068 }
69
70 if (current_cpu == "mipsel" && mips_float_abi == "hard") {
71 sources += [ "ooura_fft_mips.cc" ]
72 }
73}
74
Mirko Bonadei86d053c2019-10-17 21:32:04 +020075rtc_library("pffft_wrapper") {
Alessio Bazzicac8ba8b22019-03-27 09:30:14 +010076 visibility = [ "../*" ]
Alessio Bazzicacaa499b2019-02-21 17:35:43 +010077 sources = [
78 "pffft_wrapper.cc",
79 "pffft_wrapper.h",
80 ]
81 deps = [
82 "../../../api:array_view",
83 "../../../rtc_base:checks",
84 "//third_party/pffft",
85 ]
86}
87
Sam Zackrissonb2e17652018-07-05 16:41:55 +020088if (rtc_include_tests) {
Mirko Bonadei86d053c2019-10-17 21:32:04 +020089 rtc_library("cascaded_biquad_filter_unittest") {
Per Åhgren0aefbf02019-08-23 21:29:17 +020090 testonly = true
91
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +010092 sources = [ "cascaded_biquad_filter_unittest.cc" ]
Per Åhgren0aefbf02019-08-23 21:29:17 +020093 deps = [
94 ":cascaded_biquad_filter",
95 "../../../rtc_base:rtc_base_approved",
96 "../../../test:test_support",
97 "//testing/gtest",
98 ]
99 }
100
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200101 rtc_library("legacy_delay_estimator_unittest") {
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200102 testonly = true
103
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100104 sources = [ "delay_estimator_unittest.cc" ]
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200105 deps = [
106 ":legacy_delay_estimator",
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200107 "../../../rtc_base:rtc_base_approved",
108 "../../../test:test_support",
109 "//testing/gtest",
110 ]
111 }
Alessio Bazzicacaa499b2019-02-21 17:35:43 +0100112
Mirko Bonadei86d053c2019-10-17 21:32:04 +0200113 rtc_library("pffft_wrapper_unittest") {
Alessio Bazzicacaa499b2019-02-21 17:35:43 +0100114 testonly = true
Mirko Bonadeiccbe95f2020-01-21 12:10:10 +0100115 sources = [ "pffft_wrapper_unittest.cc" ]
Alessio Bazzicacaa499b2019-02-21 17:35:43 +0100116 deps = [
117 ":pffft_wrapper",
118 "../../../test:test_support",
119 "//testing/gtest",
120 "//third_party/pffft",
121 ]
122 }
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200123}