blob: 309527d5303bac47a85968c4bf3b4977c9fa76b3 [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
9import("//build/config/arm.gni")
10import("../../../webrtc.gni")
11
12rtc_source_set("block_mean_calculator") {
13 sources = [
14 "block_mean_calculator.cc",
15 "block_mean_calculator.h",
16 ]
17 deps = [
18 "../../../rtc_base:checks",
19 "../../../rtc_base:rtc_base_approved",
20 ]
21}
22
23rtc_source_set("legacy_delay_estimator") {
24 sources = [
25 "delay_estimator.cc",
26 "delay_estimator.h",
27 "delay_estimator_internal.h",
28 "delay_estimator_wrapper.cc",
29 "delay_estimator_wrapper.h",
30 ]
31 deps = [
32 "../../..:typedefs",
33 "../../../rtc_base:checks",
34 ]
35}
36
37rtc_source_set("ooura_fft") {
38 sources = [
39 "ooura_fft.cc",
40 "ooura_fft.h",
41 "ooura_fft_tables_common.h",
42 ]
43 deps = [
44 "../../..:typedefs",
45 "../../../system_wrappers:cpu_features_api",
46 ]
47 cflags = []
48
49 if (current_cpu == "x86" || current_cpu == "x64") {
50 sources += [
51 "ooura_fft_sse2.cc",
52 "ooura_fft_tables_neon_sse2.h",
53 ]
54 if (is_posix || is_fuchsia) {
55 cflags += [ "-msse2" ]
56 }
57 }
58
59 if (rtc_build_with_neon) {
60 sources += [
61 "ooura_fft_neon.cc",
62 "ooura_fft_tables_neon_sse2.h",
63 ]
64
65 deps += [ "../../../common_audio" ]
66
67 if (current_cpu != "arm64") {
68 # Enable compilation for the NEON instruction set. This is needed
69 # since //build/config/arm.gni only enables NEON for iOS, not Android.
70 # This provides the same functionality as webrtc/build/arm_neon.gypi.
71 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ]
72 cflags += [ "-mfpu=neon" ]
73 }
74
75 # Disable LTO on NEON targets due to compiler bug.
76 # TODO(fdegans): Enable this. See crbug.com/408997.
77 if (rtc_use_lto) {
78 cflags -= [
79 "-flto",
80 "-ffat-lto-objects",
81 ]
82 }
83 }
84
85 if (current_cpu == "mipsel" && mips_float_abi == "hard") {
86 sources += [ "ooura_fft_mips.cc" ]
87 }
88}
89
90if (rtc_include_tests) {
91 rtc_source_set("block_mean_calculator_unittest") {
92 testonly = true
93
94 sources = [
95 "block_mean_calculator_unittest.cc",
96 ]
97 deps = [
98 ":block_mean_calculator",
99 "../../../rtc_base:rtc_base_approved",
100 "../../../test:test_support",
101 "//testing/gtest",
102 ]
103 }
104
105 rtc_source_set("legacy_delay_estimator_unittest") {
106 testonly = true
107
108 sources = [
109 "delay_estimator_unittest.cc",
110 ]
111 deps = [
112 ":legacy_delay_estimator",
113 "../../..:typedefs",
114 "../../../rtc_base:rtc_base_approved",
115 "../../../test:test_support",
116 "//testing/gtest",
117 ]
118 }
119}