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("//third_party/protobuf/proto_library.gni") | 10 import("//third_party/protobuf/proto_library.gni") |
(...skipping 17 matching lines...) Expand all Loading... |
28 "aec/echo_cancellation.h", | 28 "aec/echo_cancellation.h", |
29 "aecm/aecm_core.cc", | 29 "aecm/aecm_core.cc", |
30 "aecm/aecm_core.h", | 30 "aecm/aecm_core.h", |
31 "aecm/echo_control_mobile.cc", | 31 "aecm/echo_control_mobile.cc", |
32 "aecm/echo_control_mobile.h", | 32 "aecm/echo_control_mobile.h", |
33 "agc/agc.cc", | 33 "agc/agc.cc", |
34 "agc/agc.h", | 34 "agc/agc.h", |
35 "agc/agc_manager_direct.cc", | 35 "agc/agc_manager_direct.cc", |
36 "agc/agc_manager_direct.h", | 36 "agc/agc_manager_direct.h", |
37 "agc/gain_map_internal.h", | 37 "agc/gain_map_internal.h", |
38 "agc/legacy/analog_agc.c", | |
39 "agc/legacy/analog_agc.h", | |
40 "agc/legacy/digital_agc.c", | |
41 "agc/legacy/digital_agc.h", | |
42 "agc/legacy/gain_control.h", | |
43 "agc/loudness_histogram.cc", | 38 "agc/loudness_histogram.cc", |
44 "agc/loudness_histogram.h", | 39 "agc/loudness_histogram.h", |
45 "agc/utility.cc", | 40 "agc/utility.cc", |
46 "agc/utility.h", | 41 "agc/utility.h", |
47 "audio_buffer.cc", | 42 "audio_buffer.cc", |
48 "audio_buffer.h", | 43 "audio_buffer.h", |
49 "audio_processing_impl.cc", | 44 "audio_processing_impl.cc", |
50 "audio_processing_impl.h", | 45 "audio_processing_impl.h", |
51 "beamformer/array_util.cc", | 46 "beamformer/array_util.cc", |
52 "beamformer/array_util.h", | 47 "beamformer/array_util.h", |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 "vad/voice_gmm_tables.h", | 155 "vad/voice_gmm_tables.h", |
161 "voice_detection_impl.cc", | 156 "voice_detection_impl.cc", |
162 "voice_detection_impl.h", | 157 "voice_detection_impl.h", |
163 ] | 158 ] |
164 | 159 |
165 defines = [] | 160 defines = [] |
166 deps = [ | 161 deps = [ |
167 "../..:webrtc_common", | 162 "../..:webrtc_common", |
168 "../audio_coding:isac", | 163 "../audio_coding:isac", |
169 ] | 164 ] |
| 165 public_deps = [ |
| 166 ":audio_processing_c", |
| 167 ] |
170 | 168 |
171 if (apm_debug_dump) { | 169 if (apm_debug_dump) { |
172 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ] | 170 defines += [ "WEBRTC_APM_DEBUG_DUMP=1" ] |
173 } else { | 171 } else { |
174 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ] | 172 defines += [ "WEBRTC_APM_DEBUG_DUMP=0" ] |
175 } | 173 } |
176 | 174 |
177 if (aec_untrusted_delay_for_testing) { | 175 if (aec_untrusted_delay_for_testing) { |
178 defines += [ "WEBRTC_UNTRUSTED_DELAY" ] | 176 defines += [ "WEBRTC_UNTRUSTED_DELAY" ] |
179 } | 177 } |
(...skipping 10 matching lines...) Expand all Loading... |
190 "intelligibility/intelligibility_enhancer.h", | 188 "intelligibility/intelligibility_enhancer.h", |
191 "intelligibility/intelligibility_utils.cc", | 189 "intelligibility/intelligibility_utils.cc", |
192 "intelligibility/intelligibility_utils.h", | 190 "intelligibility/intelligibility_utils.h", |
193 ] | 191 ] |
194 } else { | 192 } else { |
195 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ] | 193 defines += [ "WEBRTC_INTELLIGIBILITY_ENHANCER=0" ] |
196 } | 194 } |
197 | 195 |
198 if (rtc_prefer_fixed_point) { | 196 if (rtc_prefer_fixed_point) { |
199 defines += [ "WEBRTC_NS_FIXED" ] | 197 defines += [ "WEBRTC_NS_FIXED" ] |
200 sources += [ | |
201 "ns/noise_suppression_x.c", | |
202 "ns/noise_suppression_x.h", | |
203 "ns/nsx_core.c", | |
204 "ns/nsx_core.h", | |
205 "ns/nsx_defines.h", | |
206 ] | |
207 if (current_cpu == "mipsel") { | |
208 sources += [ "ns/nsx_core_mips.c" ] | |
209 } else { | |
210 sources += [ "ns/nsx_core_c.c" ] | |
211 } | |
212 } else { | 198 } else { |
213 defines += [ "WEBRTC_NS_FLOAT" ] | 199 defines += [ "WEBRTC_NS_FLOAT" ] |
214 sources += [ | |
215 "ns/defines.h", | |
216 "ns/noise_suppression.c", | |
217 "ns/noise_suppression.h", | |
218 "ns/ns_core.c", | |
219 "ns/ns_core.h", | |
220 "ns/windows_private.h", | |
221 ] | |
222 } | 200 } |
223 | 201 |
224 if (current_cpu == "x86" || current_cpu == "x64") { | 202 if (current_cpu == "x86" || current_cpu == "x64") { |
225 deps += [ ":audio_processing_sse2" ] | 203 deps += [ ":audio_processing_sse2" ] |
226 } | 204 } |
227 | 205 |
228 if (rtc_build_with_neon) { | 206 if (rtc_build_with_neon) { |
229 deps += [ ":audio_processing_neon" ] | 207 deps += [ ":audio_processing_neon" ] |
230 } | 208 } |
231 | 209 |
(...skipping 12 matching lines...) Expand all Loading... |
244 # TODO(jschuh): Bug 1348: fix this warning. | 222 # TODO(jschuh): Bug 1348: fix this warning. |
245 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 223 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
246 | 224 |
247 deps += [ | 225 deps += [ |
248 "../../base:rtc_base_approved", | 226 "../../base:rtc_base_approved", |
249 "../../common_audio", | 227 "../../common_audio", |
250 "../../system_wrappers", | 228 "../../system_wrappers", |
251 ] | 229 ] |
252 } | 230 } |
253 | 231 |
| 232 rtc_source_set("audio_processing_c") { |
| 233 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 234 sources = [ |
| 235 "agc/legacy/analog_agc.c", |
| 236 "agc/legacy/analog_agc.h", |
| 237 "agc/legacy/digital_agc.c", |
| 238 "agc/legacy/digital_agc.h", |
| 239 "agc/legacy/gain_control.h", |
| 240 ] |
| 241 |
| 242 if (rtc_prefer_fixed_point) { |
| 243 sources += [ |
| 244 "ns/noise_suppression_x.c", |
| 245 "ns/noise_suppression_x.h", |
| 246 "ns/nsx_core.c", |
| 247 "ns/nsx_core.h", |
| 248 "ns/nsx_defines.h", |
| 249 ] |
| 250 if (current_cpu == "mipsel") { |
| 251 sources += [ "ns/nsx_core_mips.c" ] |
| 252 } else { |
| 253 sources += [ "ns/nsx_core_c.c" ] |
| 254 } |
| 255 } else { |
| 256 sources += [ |
| 257 "ns/defines.h", |
| 258 "ns/noise_suppression.c", |
| 259 "ns/noise_suppression.h", |
| 260 "ns/ns_core.c", |
| 261 "ns/ns_core.h", |
| 262 "ns/windows_private.h", |
| 263 ] |
| 264 } |
| 265 |
| 266 deps = [ |
| 267 "../../base:rtc_base_approved", |
| 268 "../../common_audio", |
| 269 "../../system_wrappers", |
| 270 ] |
| 271 } |
| 272 |
254 if (rtc_enable_protobuf) { | 273 if (rtc_enable_protobuf) { |
255 proto_library("audioproc_debug_proto") { | 274 proto_library("audioproc_debug_proto") { |
256 sources = [ | 275 sources = [ |
257 "debug.proto", | 276 "debug.proto", |
258 ] | 277 ] |
259 | 278 |
260 proto_out_dir = "webrtc/modules/audio_processing" | 279 proto_out_dir = "webrtc/modules/audio_processing" |
261 } | 280 } |
262 } | 281 } |
263 | 282 |
(...skipping 15 matching lines...) Expand all Loading... |
279 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ] | 298 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ] |
280 } | 299 } |
281 } | 300 } |
282 } | 301 } |
283 | 302 |
284 if (rtc_build_with_neon) { | 303 if (rtc_build_with_neon) { |
285 rtc_static_library("audio_processing_neon") { | 304 rtc_static_library("audio_processing_neon") { |
286 sources = [ | 305 sources = [ |
287 "aec/aec_core_neon.cc", | 306 "aec/aec_core_neon.cc", |
288 "aecm/aecm_core_neon.cc", | 307 "aecm/aecm_core_neon.cc", |
289 "ns/nsx_core_neon.c", | |
290 "utility/ooura_fft_neon.cc", | 308 "utility/ooura_fft_neon.cc", |
291 "utility/ooura_fft_tables_neon_sse2.h", | 309 "utility/ooura_fft_tables_neon_sse2.h", |
292 ] | 310 ] |
293 | 311 |
294 if (current_cpu != "arm64") { | 312 if (current_cpu != "arm64") { |
295 # Enable compilation for the NEON instruction set. This is needed | 313 # Enable compilation for the NEON instruction set. This is needed |
296 # since //build/config/arm.gni only enables NEON for iOS, not Android. | 314 # since //build/config/arm.gni only enables NEON for iOS, not Android. |
297 # This provides the same functionality as webrtc/build/arm_neon.gypi. | 315 # This provides the same functionality as webrtc/build/arm_neon.gypi. |
298 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] | 316 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] |
299 cflags = [ "-mfpu=neon" ] | 317 cflags = [ "-mfpu=neon" ] |
300 } | 318 } |
301 | 319 |
302 # Disable LTO on NEON targets due to compiler bug. | 320 # Disable LTO on NEON targets due to compiler bug. |
303 # TODO(fdegans): Enable this. See crbug.com/408997. | 321 # TODO(fdegans): Enable this. See crbug.com/408997. |
304 if (rtc_use_lto) { | 322 if (rtc_use_lto) { |
305 cflags -= [ | 323 cflags -= [ |
306 "-flto", | 324 "-flto", |
307 "-ffat-lto-objects", | 325 "-ffat-lto-objects", |
308 ] | 326 ] |
309 } | 327 } |
310 | 328 |
311 deps = [ | 329 deps = [ |
312 "../../common_audio", | 330 "../../common_audio", |
313 ] | 331 ] |
| 332 public_deps = [ |
| 333 ":audio_processing_neon_c", |
| 334 ] |
314 | 335 |
315 if (apm_debug_dump) { | 336 if (apm_debug_dump) { |
316 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ] | 337 defines = [ "WEBRTC_APM_DEBUG_DUMP=1" ] |
317 } else { | 338 } else { |
318 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ] | 339 defines = [ "WEBRTC_APM_DEBUG_DUMP=0" ] |
319 } | 340 } |
320 } | 341 } |
| 342 |
| 343 rtc_static_library("audio_processing_neon_c") { |
| 344 sources = [ |
| 345 "ns/nsx_core_neon.c", |
| 346 ] |
| 347 |
| 348 if (current_cpu != "arm64") { |
| 349 # Enable compilation for the NEON instruction set. This is needed |
| 350 # since //build/config/arm.gni only enables NEON for iOS, not Android. |
| 351 # This provides the same functionality as webrtc/build/arm_neon.gypi. |
| 352 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] |
| 353 cflags = [ "-mfpu=neon" ] |
| 354 } |
| 355 |
| 356 # Disable LTO on NEON targets due to compiler bug. |
| 357 # TODO(fdegans): Enable this. See crbug.com/408997. |
| 358 if (rtc_use_lto) { |
| 359 cflags -= [ |
| 360 "-flto", |
| 361 "-ffat-lto-objects", |
| 362 ] |
| 363 } |
| 364 } |
321 } | 365 } |
322 | 366 |
323 if (rtc_include_tests) { | 367 if (rtc_include_tests) { |
324 group("audio_processing_tests") { | 368 group("audio_processing_tests") { |
325 testonly = true | 369 testonly = true |
326 public_deps = [ | 370 public_deps = [ |
327 ":audioproc_f", | 371 ":audioproc_f", |
328 ":audioproc_test_utils", | 372 ":audioproc_test_utils", |
329 ":click_annotate", | 373 ":click_annotate", |
330 ":nonlinear_beamformer_test", | 374 ":nonlinear_beamformer_test", |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 "test/protobuf_utils.cc", | 518 "test/protobuf_utils.cc", |
475 "test/protobuf_utils.h", | 519 "test/protobuf_utils.h", |
476 ] | 520 ] |
477 | 521 |
478 deps = [ | 522 deps = [ |
479 ":audioproc_debug_proto", | 523 ":audioproc_debug_proto", |
480 ] | 524 ] |
481 } | 525 } |
482 } | 526 } |
483 } | 527 } |
OLD | NEW |