| 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") |
| 11 import("../../build/webrtc.gni") | 11 import("../../build/webrtc.gni") |
| 12 | 12 |
| 13 declare_args() { | 13 declare_args() { |
| 14 # Outputs some low-level debug files. | 14 # Outputs some low-level debug files. |
| 15 aec_debug_dump = false | 15 aec_debug_dump = false |
| 16 | 16 |
| 17 # Disables the usual mode where we trust the reported system delay | 17 # Disables the usual mode where we trust the reported system delay |
| 18 # values the AEC receives. The corresponding define is set appropriately | 18 # values the AEC receives. The corresponding define is set appropriately |
| 19 # in the code, but it can be force-enabled here for testing. | 19 # in the code, but it can be force-enabled here for testing. |
| 20 aec_untrusted_delay_for_testing = false | 20 aec_untrusted_delay_for_testing = false |
| 21 } | 21 } |
| 22 | 22 |
| 23 source_set("audio_processing") { | 23 rtc_source_set("audio_processing") { |
| 24 sources = [ | 24 sources = [ |
| 25 "aec/aec_core.cc", | 25 "aec/aec_core.cc", |
| 26 "aec/aec_core.h", | 26 "aec/aec_core.h", |
| 27 "aec/aec_core_optimized_methods.h", | 27 "aec/aec_core_optimized_methods.h", |
| 28 "aec/aec_rdft.cc", | 28 "aec/aec_rdft.cc", |
| 29 "aec/aec_rdft.h", | 29 "aec/aec_rdft.h", |
| 30 "aec/aec_resampler.cc", | 30 "aec/aec_resampler.cc", |
| 31 "aec/aec_resampler.h", | 31 "aec/aec_resampler.h", |
| 32 "aec/echo_cancellation.cc", | 32 "aec/echo_cancellation.cc", |
| 33 "aec/echo_cancellation.h", | 33 "aec/echo_cancellation.h", |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 proto_library("audioproc_debug_proto") { | 250 proto_library("audioproc_debug_proto") { |
| 251 sources = [ | 251 sources = [ |
| 252 "debug.proto", | 252 "debug.proto", |
| 253 ] | 253 ] |
| 254 | 254 |
| 255 proto_out_dir = "webrtc/modules/audio_processing" | 255 proto_out_dir = "webrtc/modules/audio_processing" |
| 256 } | 256 } |
| 257 } | 257 } |
| 258 | 258 |
| 259 if (current_cpu == "x86" || current_cpu == "x64") { | 259 if (current_cpu == "x86" || current_cpu == "x64") { |
| 260 source_set("audio_processing_sse2") { | 260 rtc_source_set("audio_processing_sse2") { |
| 261 sources = [ | 261 sources = [ |
| 262 "aec/aec_core_sse2.cc", | 262 "aec/aec_core_sse2.cc", |
| 263 "aec/aec_rdft_sse2.cc", | 263 "aec/aec_rdft_sse2.cc", |
| 264 ] | 264 ] |
| 265 | 265 |
| 266 if (is_posix) { | 266 if (is_posix) { |
| 267 cflags = [ "-msse2" ] | 267 cflags = [ "-msse2" ] |
| 268 } | 268 } |
| 269 | 269 |
| 270 configs += [ "../..:common_config" ] | 270 configs += [ "../..:common_config" ] |
| 271 public_configs = [ "../..:common_inherited_config" ] | 271 public_configs = [ "../..:common_inherited_config" ] |
| 272 | 272 |
| 273 if (aec_debug_dump) { | 273 if (aec_debug_dump) { |
| 274 defines = [ "WEBRTC_AEC_DEBUG_DUMP=1" ] | 274 defines = [ "WEBRTC_AEC_DEBUG_DUMP=1" ] |
| 275 } else { | 275 } else { |
| 276 defines = [ "WEBRTC_AEC_DEBUG_DUMP=0" ] | 276 defines = [ "WEBRTC_AEC_DEBUG_DUMP=0" ] |
| 277 } | 277 } |
| 278 } | 278 } |
| 279 } | 279 } |
| 280 | 280 |
| 281 if (rtc_build_with_neon) { | 281 if (rtc_build_with_neon) { |
| 282 source_set("audio_processing_neon") { | 282 rtc_source_set("audio_processing_neon") { |
| 283 sources = [ | 283 sources = [ |
| 284 "aec/aec_core_neon.cc", | 284 "aec/aec_core_neon.cc", |
| 285 "aec/aec_rdft_neon.cc", | 285 "aec/aec_rdft_neon.cc", |
| 286 "aecm/aecm_core_neon.cc", | 286 "aecm/aecm_core_neon.cc", |
| 287 "ns/nsx_core_neon.c", | 287 "ns/nsx_core_neon.c", |
| 288 ] | 288 ] |
| 289 | 289 |
| 290 if (current_cpu != "arm64") { | 290 if (current_cpu != "arm64") { |
| 291 # Enable compilation for the NEON instruction set. This is needed | 291 # Enable compilation for the NEON instruction set. This is needed |
| 292 # since //build/config/arm.gni only enables NEON for iOS, not Android. | 292 # since //build/config/arm.gni only enables NEON for iOS, not Android. |
| 293 # This provides the same functionality as webrtc/build/arm_neon.gypi. | 293 # This provides the same functionality as webrtc/build/arm_neon.gypi. |
| 294 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 294 configs_suppressions += [ "//build/config/compiler:compiler_arm_fpu" ] |
| 295 cflags = [ "-mfpu=neon" ] | 295 cflags = [ "-mfpu=neon" ] |
| 296 } | 296 } |
| 297 | 297 |
| 298 # Disable LTO on NEON targets due to compiler bug. | 298 # Disable LTO on NEON targets due to compiler bug. |
| 299 # TODO(fdegans): Enable this. See crbug.com/408997. | 299 # TODO(fdegans): Enable this. See crbug.com/408997. |
| 300 if (rtc_use_lto) { | 300 if (rtc_use_lto) { |
| 301 cflags -= [ | 301 cflags -= [ |
| 302 "-flto", | 302 "-flto", |
| 303 "-ffat-lto-objects", | 303 "-ffat-lto-objects", |
| 304 ] | 304 ] |
| 305 } | 305 } |
| 306 | 306 |
| 307 configs += [ "../..:common_config" ] | 307 configs += [ "../..:common_config" ] |
| 308 public_configs = [ "../..:common_inherited_config" ] | 308 public_configs = [ "../..:common_inherited_config" ] |
| 309 | 309 |
| 310 deps = [ | 310 deps = [ |
| 311 "../../common_audio", | 311 "../../common_audio", |
| 312 ] | 312 ] |
| 313 | 313 |
| 314 if (aec_debug_dump) { | 314 if (aec_debug_dump) { |
| 315 defines = [ "WEBRTC_AEC_DEBUG_DUMP=1" ] | 315 defines = [ "WEBRTC_AEC_DEBUG_DUMP=1" ] |
| 316 } else { | 316 } else { |
| 317 defines = [ "WEBRTC_AEC_DEBUG_DUMP=0" ] | 317 defines = [ "WEBRTC_AEC_DEBUG_DUMP=0" ] |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 | 321 |
| 322 if (rtc_include_tests) { | 322 if (rtc_include_tests) { |
| 323 executable("audioproc") { | 323 rtc_executable("audioproc") { |
| 324 testonly = true | 324 testonly = true |
| 325 sources = [ | 325 sources = [ |
| 326 "test/process_test.cc", | 326 "test/process_test.cc", |
| 327 ] | 327 ] |
| 328 | 328 |
| 329 configs += [ "../..:common_config" ] | 329 configs += [ "../..:common_config" ] |
| 330 public_configs = [ "../..:common_inherited_config" ] | 330 public_configs = [ "../..:common_inherited_config" ] |
| 331 | 331 |
| 332 deps = [ | 332 deps = [ |
| 333 ":audio_processing", | 333 ":audio_processing", |
| 334 ":audioproc_debug_proto", | 334 ":audioproc_debug_proto", |
| 335 ":audioproc_protobuf_utils", | 335 ":audioproc_protobuf_utils", |
| 336 ":audioproc_test_utils", | 336 ":audioproc_test_utils", |
| 337 "../../system_wrappers", | 337 "../../system_wrappers", |
| 338 "../../system_wrappers:system_wrappers_default", | 338 "../../system_wrappers:system_wrappers_default", |
| 339 "../../test:test_support", | 339 "../../test:test_support", |
| 340 "//build/config/sanitizers:deps", | 340 "//build/config/sanitizers:deps", |
| 341 "//testing/gtest", | 341 "//testing/gtest", |
| 342 "//third_party/gflags:gflags", | 342 "//third_party/gflags:gflags", |
| 343 ] | 343 ] |
| 344 } # audioproc | 344 } # audioproc |
| 345 | 345 |
| 346 executable("unpack_aecdump") { | 346 rtc_executable("unpack_aecdump") { |
| 347 testonly = true | 347 testonly = true |
| 348 sources = [ | 348 sources = [ |
| 349 "test/unpack.cc", | 349 "test/unpack.cc", |
| 350 ] | 350 ] |
| 351 | 351 |
| 352 configs += [ "../..:common_config" ] | 352 configs += [ "../..:common_config" ] |
| 353 public_configs = [ "../..:common_inherited_config" ] | 353 public_configs = [ "../..:common_inherited_config" ] |
| 354 | 354 |
| 355 deps = [ | 355 deps = [ |
| 356 ":audio_processing", | 356 ":audio_processing", |
| 357 ":audioproc_debug_proto", | 357 ":audioproc_debug_proto", |
| 358 ":audioproc_protobuf_utils", | 358 ":audioproc_protobuf_utils", |
| 359 ":audioproc_test_utils", | 359 ":audioproc_test_utils", |
| 360 "../../common_audio", | 360 "../../common_audio", |
| 361 "../../system_wrappers:system_wrappers_default", | 361 "../../system_wrappers:system_wrappers_default", |
| 362 "//build/config/sanitizers:deps", | 362 "//build/config/sanitizers:deps", |
| 363 "//third_party/gflags:gflags", | 363 "//third_party/gflags:gflags", |
| 364 ] | 364 ] |
| 365 } # unpack_aecdump | 365 } # unpack_aecdump |
| 366 | 366 |
| 367 executable("audioproc_f") { | 367 rtc_executable("audioproc_f") { |
| 368 testonly = true | 368 testonly = true |
| 369 sources = [ | 369 sources = [ |
| 370 "test/aec_dump_based_simulator.cc", | 370 "test/aec_dump_based_simulator.cc", |
| 371 "test/aec_dump_based_simulator.h", | 371 "test/aec_dump_based_simulator.h", |
| 372 "test/audio_processing_simulator.cc", | 372 "test/audio_processing_simulator.cc", |
| 373 "test/audio_processing_simulator.h", | 373 "test/audio_processing_simulator.h", |
| 374 "test/audioproc_float.cc", | 374 "test/audioproc_float.cc", |
| 375 "test/wav_based_simulator.cc", | 375 "test/wav_based_simulator.cc", |
| 376 "test/wav_based_simulator.h", | 376 "test/wav_based_simulator.h", |
| 377 ] | 377 ] |
| 378 | 378 |
| 379 configs += [ "../..:common_config" ] | 379 configs += [ "../..:common_config" ] |
| 380 public_configs = [ "../..:common_inherited_config" ] | 380 public_configs = [ "../..:common_inherited_config" ] |
| 381 | 381 |
| 382 deps = [ | 382 deps = [ |
| 383 ":audio_processing", | 383 ":audio_processing", |
| 384 ":audioproc_debug_proto", | 384 ":audioproc_debug_proto", |
| 385 ":audioproc_protobuf_utils", | 385 ":audioproc_protobuf_utils", |
| 386 ":audioproc_test_utils", | 386 ":audioproc_test_utils", |
| 387 "../../system_wrappers", | 387 "../../system_wrappers", |
| 388 "../../system_wrappers:system_wrappers_default", | 388 "../../system_wrappers:system_wrappers_default", |
| 389 "../../test:test_support", | 389 "../../test:test_support", |
| 390 "//build/config/sanitizers:deps", | 390 "//build/config/sanitizers:deps", |
| 391 "//testing/gtest", | 391 "//testing/gtest", |
| 392 "//third_party/gflags:gflags", | 392 "//third_party/gflags:gflags", |
| 393 ] | 393 ] |
| 394 } # audioproc_f | 394 } # audioproc_f |
| 395 | 395 |
| 396 source_set("audioproc_test_utils") { | 396 rtc_source_set("audioproc_test_utils") { |
| 397 testonly = true | 397 testonly = true |
| 398 sources = [ | 398 sources = [ |
| 399 "test/audio_buffer_tools.cc", | 399 "test/audio_buffer_tools.cc", |
| 400 "test/audio_buffer_tools.h", | 400 "test/audio_buffer_tools.h", |
| 401 "test/test_utils.cc", | 401 "test/test_utils.cc", |
| 402 "test/test_utils.h", | 402 "test/test_utils.h", |
| 403 ] | 403 ] |
| 404 | 404 |
| 405 configs += [ "../..:common_config" ] | 405 configs += [ "../..:common_config" ] |
| 406 public_configs = [ "../..:common_inherited_config" ] | 406 public_configs = [ "../..:common_inherited_config" ] |
| 407 | 407 |
| 408 deps = [ | 408 deps = [ |
| 409 "../../base:rtc_base_approved", | 409 "../../base:rtc_base_approved", |
| 410 "../../common_audio", | 410 "../../common_audio", |
| 411 ] | 411 ] |
| 412 } | 412 } |
| 413 | 413 |
| 414 executable("transient_suppression_test") { | 414 rtc_executable("transient_suppression_test") { |
| 415 testonly = true | 415 testonly = true |
| 416 sources = [ | 416 sources = [ |
| 417 "transient/file_utils.cc", | 417 "transient/file_utils.cc", |
| 418 "transient/file_utils.h", | 418 "transient/file_utils.h", |
| 419 "transient/transient_suppression_test.cc", | 419 "transient/transient_suppression_test.cc", |
| 420 ] | 420 ] |
| 421 deps = [ | 421 deps = [ |
| 422 ":audio_processing", | 422 ":audio_processing", |
| 423 "../../system_wrappers:metrics_default", | 423 "../../system_wrappers:metrics_default", |
| 424 "../../test:test_support", | 424 "../../test:test_support", |
| 425 "//testing/gtest", | 425 "//testing/gtest", |
| 426 "//third_party/gflags", | 426 "//third_party/gflags", |
| 427 ] | 427 ] |
| 428 } | 428 } |
| 429 | 429 |
| 430 executable("click_annotate") { | 430 rtc_executable("click_annotate") { |
| 431 testonly = true | 431 testonly = true |
| 432 sources = [ | 432 sources = [ |
| 433 "transient/click_annotate.cc", | 433 "transient/click_annotate.cc", |
| 434 "transient/file_utils.cc", | 434 "transient/file_utils.cc", |
| 435 "transient/file_utils.h", | 435 "transient/file_utils.h", |
| 436 ] | 436 ] |
| 437 deps = [ | 437 deps = [ |
| 438 ":audio_processing", | 438 ":audio_processing", |
| 439 "../../system_wrappers:metrics_default", | 439 "../../system_wrappers:metrics_default", |
| 440 ] | 440 ] |
| 441 } | 441 } |
| 442 | 442 |
| 443 executable("nonlinear_beamformer_test") { | 443 rtc_executable("nonlinear_beamformer_test") { |
| 444 testonly = true | 444 testonly = true |
| 445 sources = [ | 445 sources = [ |
| 446 "beamformer/nonlinear_beamformer_test.cc", | 446 "beamformer/nonlinear_beamformer_test.cc", |
| 447 ] | 447 ] |
| 448 deps = [ | 448 deps = [ |
| 449 ":audio_processing", | 449 ":audio_processing", |
| 450 ":audioproc_test_utils", | 450 ":audioproc_test_utils", |
| 451 "../../system_wrappers:metrics_default", | 451 "../../system_wrappers:metrics_default", |
| 452 "//third_party/gflags", | 452 "//third_party/gflags", |
| 453 ] | 453 ] |
| 454 } | 454 } |
| 455 | 455 |
| 456 if (rtc_enable_intelligibility_enhancer) { | 456 if (rtc_enable_intelligibility_enhancer) { |
| 457 executable("intelligibility_proc") { | 457 rtc_executable("intelligibility_proc") { |
| 458 testonly = true | 458 testonly = true |
| 459 sources = [ | 459 sources = [ |
| 460 "intelligibility/test/intelligibility_proc.cc", | 460 "intelligibility/test/intelligibility_proc.cc", |
| 461 ] | 461 ] |
| 462 deps = [ | 462 deps = [ |
| 463 ":audio_processing", | 463 ":audio_processing", |
| 464 ":audioproc_test_utils", | 464 ":audioproc_test_utils", |
| 465 "../../system_wrappers:metrics_default", | 465 "../../system_wrappers:metrics_default", |
| 466 "../../test:test_support", | 466 "../../test:test_support", |
| 467 "//testing/gtest", | 467 "//testing/gtest", |
| 468 "//third_party/gflags", | 468 "//third_party/gflags", |
| 469 ] | 469 ] |
| 470 } | 470 } |
| 471 } | 471 } |
| 472 | 472 |
| 473 if (rtc_enable_protobuf) { | 473 if (rtc_enable_protobuf) { |
| 474 proto_library("audioproc_unittest_proto") { | 474 proto_library("audioproc_unittest_proto") { |
| 475 sources = [ | 475 sources = [ |
| 476 "test/unittest.proto", | 476 "test/unittest.proto", |
| 477 ] | 477 ] |
| 478 proto_out_dir = "webrtc/modules/audio_processing" | 478 proto_out_dir = "webrtc/modules/audio_processing" |
| 479 } | 479 } |
| 480 | 480 |
| 481 source_set("audioproc_protobuf_utils") { | 481 rtc_source_set("audioproc_protobuf_utils") { |
| 482 sources = [ | 482 sources = [ |
| 483 "test/protobuf_utils.cc", | 483 "test/protobuf_utils.cc", |
| 484 "test/protobuf_utils.h", | 484 "test/protobuf_utils.h", |
| 485 ] | 485 ] |
| 486 | 486 |
| 487 deps = [ | 487 deps = [ |
| 488 ":audioproc_debug_proto", | 488 ":audioproc_debug_proto", |
| 489 ] | 489 ] |
| 490 } | 490 } |
| 491 } | 491 } |
| 492 } | 492 } |
| OLD | NEW |