blob: 6a4304d19214785f6786e5db60465808d8586424 [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
11rtc_source_set("block_mean_calculator") {
12 sources = [
13 "block_mean_calculator.cc",
14 "block_mean_calculator.h",
15 ]
16 deps = [
17 "../../../rtc_base:checks",
18 "../../../rtc_base:rtc_base_approved",
19 ]
20}
21
22rtc_source_set("legacy_delay_estimator") {
23 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 ]
30 deps = [
Sam Zackrissonb2e17652018-07-05 16:41:55 +020031 "../../../rtc_base:checks",
32 ]
33}
34
35rtc_source_set("ooura_fft") {
36 sources = [
37 "ooura_fft.cc",
38 "ooura_fft.h",
39 "ooura_fft_tables_common.h",
40 ]
41 deps = [
Niels Möllera12c42a2018-07-25 16:05:48 +020042 "../../../rtc_base/system:arch",
Sam Zackrissonb2e17652018-07-05 16:41:55 +020043 "../../../system_wrappers:cpu_features_api",
44 ]
45 cflags = []
46
47 if (current_cpu == "x86" || current_cpu == "x64") {
48 sources += [
49 "ooura_fft_sse2.cc",
50 "ooura_fft_tables_neon_sse2.h",
51 ]
52 if (is_posix || is_fuchsia) {
53 cflags += [ "-msse2" ]
54 }
55 }
56
57 if (rtc_build_with_neon) {
58 sources += [
59 "ooura_fft_neon.cc",
60 "ooura_fft_tables_neon_sse2.h",
61 ]
62
63 deps += [ "../../../common_audio" ]
64
65 if (current_cpu != "arm64") {
Oleh Prypind2f4e8b2018-08-01 12:18:05 +020066 # Enable compilation for the NEON instruction set.
Sam Zackrissonb2e17652018-07-05 16:41:55 +020067 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
68 cflags += [ "-mfpu=neon" ]
69 }
70
71 # Disable LTO on NEON targets due to compiler bug.
72 # TODO(fdegans): Enable this. See crbug.com/408997.
73 if (rtc_use_lto) {
74 cflags -= [
75 "-flto",
76 "-ffat-lto-objects",
77 ]
78 }
79 }
80
81 if (current_cpu == "mipsel" && mips_float_abi == "hard") {
82 sources += [ "ooura_fft_mips.cc" ]
83 }
84}
85
86if (rtc_include_tests) {
87 rtc_source_set("block_mean_calculator_unittest") {
88 testonly = true
89
90 sources = [
91 "block_mean_calculator_unittest.cc",
92 ]
93 deps = [
94 ":block_mean_calculator",
95 "../../../rtc_base:rtc_base_approved",
96 "../../../test:test_support",
97 "//testing/gtest",
98 ]
99 }
100
101 rtc_source_set("legacy_delay_estimator_unittest") {
102 testonly = true
103
104 sources = [
105 "delay_estimator_unittest.cc",
106 ]
107 deps = [
108 ":legacy_delay_estimator",
Sam Zackrissonb2e17652018-07-05 16:41:55 +0200109 "../../../rtc_base:rtc_base_approved",
110 "../../../test:test_support",
111 "//testing/gtest",
112 ]
113 }
114}