OLD | NEW |
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 import("//build/config/arm.gni") | 9 import("//build/config/arm.gni") |
10 import("../build/webrtc.gni") | 10 import("../build/webrtc.gni") |
(...skipping 10 matching lines...) Expand all Loading... |
21 sources = [ | 21 sources = [ |
22 "audio_converter.cc", | 22 "audio_converter.cc", |
23 "audio_converter.h", | 23 "audio_converter.h", |
24 "audio_ring_buffer.cc", | 24 "audio_ring_buffer.cc", |
25 "audio_ring_buffer.h", | 25 "audio_ring_buffer.h", |
26 "audio_util.cc", | 26 "audio_util.cc", |
27 "blocker.cc", | 27 "blocker.cc", |
28 "blocker.h", | 28 "blocker.h", |
29 "channel_buffer.cc", | 29 "channel_buffer.cc", |
30 "channel_buffer.h", | 30 "channel_buffer.h", |
31 "fft4g.c", | |
32 "fft4g.h", | |
33 "fir_filter.cc", | 31 "fir_filter.cc", |
34 "fir_filter.h", | 32 "fir_filter.h", |
35 "fir_filter_neon.h", | 33 "fir_filter_neon.h", |
36 "fir_filter_sse.h", | 34 "fir_filter_sse.h", |
37 "include/audio_util.h", | 35 "include/audio_util.h", |
38 "lapped_transform.cc", | 36 "lapped_transform.cc", |
39 "lapped_transform.h", | 37 "lapped_transform.h", |
40 "real_fourier.cc", | 38 "real_fourier.cc", |
41 "real_fourier.h", | 39 "real_fourier.h", |
42 "real_fourier_ooura.cc", | 40 "real_fourier_ooura.cc", |
43 "real_fourier_ooura.h", | 41 "real_fourier_ooura.h", |
44 "resampler/include/push_resampler.h", | 42 "resampler/include/push_resampler.h", |
45 "resampler/include/resampler.h", | 43 "resampler/include/resampler.h", |
46 "resampler/push_resampler.cc", | 44 "resampler/push_resampler.cc", |
47 "resampler/push_sinc_resampler.cc", | 45 "resampler/push_sinc_resampler.cc", |
48 "resampler/push_sinc_resampler.h", | 46 "resampler/push_sinc_resampler.h", |
49 "resampler/resampler.cc", | 47 "resampler/resampler.cc", |
50 "resampler/sinc_resampler.cc", | 48 "resampler/sinc_resampler.cc", |
51 "resampler/sinc_resampler.h", | 49 "resampler/sinc_resampler.h", |
| 50 "smoothing_filter.cc", |
| 51 "smoothing_filter.h", |
| 52 "sparse_fir_filter.cc", |
| 53 "sparse_fir_filter.h", |
| 54 "vad/include/vad.h", |
| 55 "vad/vad.cc", |
| 56 "wav_file.cc", |
| 57 "wav_file.h", |
| 58 "wav_header.cc", |
| 59 "wav_header.h", |
| 60 "window_generator.cc", |
| 61 "window_generator.h", |
| 62 ] |
| 63 |
| 64 deps = [ |
| 65 "../base:rtc_analytics", |
| 66 "../system_wrappers", |
| 67 ] |
| 68 public_deps = [ |
| 69 ":common_audio_c", |
| 70 ] |
| 71 |
| 72 defines = [] |
| 73 if (rtc_use_openmax_dl) { |
| 74 sources += [ |
| 75 "real_fourier_openmax.cc", |
| 76 "real_fourier_openmax.h", |
| 77 ] |
| 78 defines += [ "RTC_USE_OPENMAX_DL" ] |
| 79 if (rtc_build_openmax_dl) { |
| 80 deps += [ "//third_party/openmax_dl/dl" ] |
| 81 } |
| 82 } |
| 83 |
| 84 if (rtc_build_with_neon) { |
| 85 deps += [ ":common_audio_neon" ] |
| 86 } |
| 87 |
| 88 if (is_win) { |
| 89 cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. |
| 90 } |
| 91 |
| 92 public_configs = [ ":common_audio_config" ] |
| 93 |
| 94 if (!build_with_chromium && is_clang) { |
| 95 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 96 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 97 } |
| 98 |
| 99 if (current_cpu == "x86" || current_cpu == "x64") { |
| 100 deps += [ ":common_audio_sse2" ] |
| 101 } |
| 102 } |
| 103 |
| 104 rtc_source_set("common_audio_c") { |
| 105 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 106 sources = [ |
| 107 "fft4g.c", |
| 108 "fft4g.h", |
52 "ring_buffer.c", | 109 "ring_buffer.c", |
53 "ring_buffer.h", | 110 "ring_buffer.h", |
54 "signal_processing/auto_corr_to_refl_coef.c", | 111 "signal_processing/auto_corr_to_refl_coef.c", |
55 "signal_processing/auto_correlation.c", | 112 "signal_processing/auto_correlation.c", |
56 "signal_processing/complex_fft_tables.h", | 113 "signal_processing/complex_fft_tables.h", |
57 "signal_processing/copy_set_operations.c", | 114 "signal_processing/copy_set_operations.c", |
58 "signal_processing/cross_correlation.c", | 115 "signal_processing/cross_correlation.c", |
59 "signal_processing/division_operations.c", | 116 "signal_processing/division_operations.c", |
60 "signal_processing/dot_product_with_scale.c", | 117 "signal_processing/dot_product_with_scale.c", |
61 "signal_processing/downsample_fast.c", | 118 "signal_processing/downsample_fast.c", |
(...skipping 17 matching lines...) Expand all Loading... |
79 "signal_processing/resample_by_2.c", | 136 "signal_processing/resample_by_2.c", |
80 "signal_processing/resample_by_2_internal.c", | 137 "signal_processing/resample_by_2_internal.c", |
81 "signal_processing/resample_by_2_internal.h", | 138 "signal_processing/resample_by_2_internal.h", |
82 "signal_processing/resample_fractional.c", | 139 "signal_processing/resample_fractional.c", |
83 "signal_processing/spl_init.c", | 140 "signal_processing/spl_init.c", |
84 "signal_processing/spl_inl.c", | 141 "signal_processing/spl_inl.c", |
85 "signal_processing/spl_sqrt.c", | 142 "signal_processing/spl_sqrt.c", |
86 "signal_processing/splitting_filter.c", | 143 "signal_processing/splitting_filter.c", |
87 "signal_processing/sqrt_of_one_minus_x_squared.c", | 144 "signal_processing/sqrt_of_one_minus_x_squared.c", |
88 "signal_processing/vector_scaling_operations.c", | 145 "signal_processing/vector_scaling_operations.c", |
89 "smoothing_filter.cc", | |
90 "smoothing_filter.h", | |
91 "sparse_fir_filter.cc", | |
92 "sparse_fir_filter.h", | |
93 "vad/include/vad.h", | |
94 "vad/include/webrtc_vad.h", | 146 "vad/include/webrtc_vad.h", |
95 "vad/vad.cc", | |
96 "vad/vad_core.c", | 147 "vad/vad_core.c", |
97 "vad/vad_core.h", | 148 "vad/vad_core.h", |
98 "vad/vad_filterbank.c", | 149 "vad/vad_filterbank.c", |
99 "vad/vad_filterbank.h", | 150 "vad/vad_filterbank.h", |
100 "vad/vad_gmm.c", | 151 "vad/vad_gmm.c", |
101 "vad/vad_gmm.h", | 152 "vad/vad_gmm.h", |
102 "vad/vad_sp.c", | 153 "vad/vad_sp.c", |
103 "vad/vad_sp.h", | 154 "vad/vad_sp.h", |
104 "vad/webrtc_vad.c", | 155 "vad/webrtc_vad.c", |
105 "wav_file.cc", | |
106 "wav_file.h", | |
107 "wav_header.cc", | |
108 "wav_header.h", | |
109 "window_generator.cc", | |
110 "window_generator.h", | |
111 ] | 156 ] |
112 | 157 |
113 deps = [ | |
114 "../base:rtc_analytics", | |
115 "../system_wrappers", | |
116 ] | |
117 | |
118 defines = [] | |
119 if (rtc_use_openmax_dl) { | |
120 sources += [ | |
121 "real_fourier_openmax.cc", | |
122 "real_fourier_openmax.h", | |
123 ] | |
124 defines += [ "RTC_USE_OPENMAX_DL" ] | |
125 if (rtc_build_openmax_dl) { | |
126 deps += [ "//third_party/openmax_dl/dl" ] | |
127 } | |
128 } | |
129 | |
130 if (current_cpu == "arm") { | 158 if (current_cpu == "arm") { |
131 sources += [ | 159 sources += [ |
132 "signal_processing/complex_bit_reverse_arm.S", | 160 "signal_processing/complex_bit_reverse_arm.S", |
133 "signal_processing/spl_sqrt_floor_arm.S", | 161 "signal_processing/spl_sqrt_floor_arm.S", |
134 ] | 162 ] |
135 | 163 |
136 if (arm_version >= 7) { | 164 if (arm_version >= 7) { |
137 sources += [ "signal_processing/filter_ar_fast_q12_armv7.S" ] | 165 sources += [ "signal_processing/filter_ar_fast_q12_armv7.S" ] |
138 } else { | 166 } else { |
139 sources += [ "signal_processing/filter_ar_fast_q12.c" ] | 167 sources += [ "signal_processing/filter_ar_fast_q12.c" ] |
140 } | 168 } |
141 } | 169 } |
142 | 170 |
143 if (rtc_build_with_neon) { | |
144 deps += [ ":common_audio_neon" ] | |
145 } | |
146 | |
147 if (current_cpu == "mipsel") { | 171 if (current_cpu == "mipsel") { |
148 sources += [ | 172 sources += [ |
149 "signal_processing/complex_bit_reverse_mips.c", | 173 "signal_processing/complex_bit_reverse_mips.c", |
150 "signal_processing/complex_fft_mips.c", | 174 "signal_processing/complex_fft_mips.c", |
151 "signal_processing/cross_correlation_mips.c", | 175 "signal_processing/cross_correlation_mips.c", |
152 "signal_processing/downsample_fast_mips.c", | 176 "signal_processing/downsample_fast_mips.c", |
153 "signal_processing/filter_ar_fast_q12_mips.c", | 177 "signal_processing/filter_ar_fast_q12_mips.c", |
154 "signal_processing/include/spl_inl_mips.h", | 178 "signal_processing/include/spl_inl_mips.h", |
155 "signal_processing/min_max_operations_mips.c", | 179 "signal_processing/min_max_operations_mips.c", |
156 "signal_processing/resample_by_2_mips.c", | 180 "signal_processing/resample_by_2_mips.c", |
(...skipping 12 matching lines...) Expand all Loading... |
169 "signal_processing/filter_ar_fast_q12.c", | 193 "signal_processing/filter_ar_fast_q12.c", |
170 "signal_processing/spl_sqrt_floor.c", | 194 "signal_processing/spl_sqrt_floor.c", |
171 ] | 195 ] |
172 } | 196 } |
173 | 197 |
174 if (is_win) { | 198 if (is_win) { |
175 cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. | 199 cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. |
176 } | 200 } |
177 | 201 |
178 public_configs = [ ":common_audio_config" ] | 202 public_configs = [ ":common_audio_config" ] |
179 | |
180 if (!build_with_chromium && is_clang) { | |
181 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | |
182 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | |
183 } | |
184 | |
185 if (current_cpu == "x86" || current_cpu == "x64") { | |
186 deps += [ ":common_audio_sse2" ] | |
187 } | |
188 } | 203 } |
189 | 204 |
190 if (current_cpu == "x86" || current_cpu == "x64") { | 205 if (current_cpu == "x86" || current_cpu == "x64") { |
191 rtc_static_library("common_audio_sse2") { | 206 rtc_static_library("common_audio_sse2") { |
192 sources = [ | 207 sources = [ |
193 "fir_filter_sse.cc", | 208 "fir_filter_sse.cc", |
194 "resampler/sinc_resampler_sse.cc", | 209 "resampler/sinc_resampler_sse.cc", |
195 ] | 210 ] |
196 | 211 |
197 if (is_posix) { | 212 if (is_posix) { |
198 cflags = [ "-msse2" ] | 213 cflags = [ "-msse2" ] |
199 } | 214 } |
200 | 215 |
201 if (!build_with_chromium && is_clang) { | 216 if (!build_with_chromium && is_clang) { |
202 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 217 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
203 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 218 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
204 } | 219 } |
205 } | 220 } |
206 } | 221 } |
207 | 222 |
208 if (rtc_build_with_neon) { | 223 if (rtc_build_with_neon) { |
209 rtc_static_library("common_audio_neon") { | 224 rtc_static_library("common_audio_neon") { |
210 sources = [ | 225 sources = [ |
211 "fir_filter_neon.cc", | 226 "fir_filter_neon.cc", |
212 "resampler/sinc_resampler_neon.cc", | 227 "resampler/sinc_resampler_neon.cc", |
| 228 ] |
| 229 |
| 230 if (current_cpu != "arm64") { |
| 231 # Enable compilation for the NEON instruction set. This is needed |
| 232 # since //build/config/arm.gni only enables NEON for iOS, not Android. |
| 233 # This provides the same functionality as webrtc/build/arm_neon.gypi. |
| 234 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] |
| 235 cflags = [ "-mfpu=neon" ] |
| 236 } |
| 237 |
| 238 # Disable LTO on NEON targets due to compiler bug. |
| 239 # TODO(fdegans): Enable this. See crbug.com/408997. |
| 240 if (rtc_use_lto) { |
| 241 cflags -= [ |
| 242 "-flto", |
| 243 "-ffat-lto-objects", |
| 244 ] |
| 245 } |
| 246 |
| 247 if (!build_with_chromium && is_clang) { |
| 248 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 249 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 250 } |
| 251 |
| 252 public_deps = [ |
| 253 ":common_audio_neon_c", |
| 254 ] |
| 255 } |
| 256 |
| 257 rtc_source_set("common_audio_neon_c") { |
| 258 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 259 sources = [ |
213 "signal_processing/cross_correlation_neon.c", | 260 "signal_processing/cross_correlation_neon.c", |
214 "signal_processing/downsample_fast_neon.c", | 261 "signal_processing/downsample_fast_neon.c", |
215 "signal_processing/min_max_operations_neon.c", | 262 "signal_processing/min_max_operations_neon.c", |
216 ] | 263 ] |
217 | 264 |
218 if (current_cpu != "arm64") { | 265 if (current_cpu != "arm64") { |
219 # Enable compilation for the NEON instruction set. This is needed | 266 # Enable compilation for the NEON instruction set. This is needed |
220 # since //build/config/arm.gni only enables NEON for iOS, not Android. | 267 # since //build/config/arm.gni only enables NEON for iOS, not Android. |
221 # This provides the same functionality as webrtc/build/arm_neon.gypi. | 268 # This provides the same functionality as webrtc/build/arm_neon.gypi. |
222 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] | 269 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 "//testing/gtest", | 341 "//testing/gtest", |
295 ] | 342 ] |
296 | 343 |
297 if (is_android) { | 344 if (is_android) { |
298 deps += [ "//testing/android/native_test:native_test_support" ] | 345 deps += [ "//testing/android/native_test:native_test_support" ] |
299 | 346 |
300 shard_timeout = 900 | 347 shard_timeout = 900 |
301 } | 348 } |
302 } | 349 } |
303 } | 350 } |
OLD | NEW |