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