Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: webrtc/modules/audio_coding/BUILD.gn

Issue 1181373004: Add a [rtc_]build_with_neon variable to unify conditions. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use new variable and add arm_neon_config. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 "codecs/isac/fix/source/entropy_coding.h", 491 "codecs/isac/fix/source/entropy_coding.h",
492 "codecs/isac/fix/source/fft.c", 492 "codecs/isac/fix/source/fft.c",
493 "codecs/isac/fix/source/fft.h", 493 "codecs/isac/fix/source/fft.h",
494 "codecs/isac/fix/source/filterbank_tables.c", 494 "codecs/isac/fix/source/filterbank_tables.c",
495 "codecs/isac/fix/source/filterbank_tables.h", 495 "codecs/isac/fix/source/filterbank_tables.h",
496 "codecs/isac/fix/source/filterbanks.c", 496 "codecs/isac/fix/source/filterbanks.c",
497 "codecs/isac/fix/source/filters.c", 497 "codecs/isac/fix/source/filters.c",
498 "codecs/isac/fix/source/initialize.c", 498 "codecs/isac/fix/source/initialize.c",
499 "codecs/isac/fix/source/isacfix.c", 499 "codecs/isac/fix/source/isacfix.c",
500 "codecs/isac/fix/source/lattice.c", 500 "codecs/isac/fix/source/lattice.c",
501 "codecs/isac/fix/source/lattice_c.c",
501 "codecs/isac/fix/source/lpc_masking_model.c", 502 "codecs/isac/fix/source/lpc_masking_model.c",
502 "codecs/isac/fix/source/lpc_masking_model.h", 503 "codecs/isac/fix/source/lpc_masking_model.h",
503 "codecs/isac/fix/source/lpc_tables.c", 504 "codecs/isac/fix/source/lpc_tables.c",
504 "codecs/isac/fix/source/lpc_tables.h", 505 "codecs/isac/fix/source/lpc_tables.h",
505 "codecs/isac/fix/source/pitch_estimator.c", 506 "codecs/isac/fix/source/pitch_estimator.c",
506 "codecs/isac/fix/source/pitch_estimator.h", 507 "codecs/isac/fix/source/pitch_estimator.h",
507 "codecs/isac/fix/source/pitch_estimator_c.c", 508 "codecs/isac/fix/source/pitch_estimator_c.c",
508 "codecs/isac/fix/source/pitch_filter.c", 509 "codecs/isac/fix/source/pitch_filter.c",
509 "codecs/isac/fix/source/pitch_filter_c.c", 510 "codecs/isac/fix/source/pitch_filter_c.c",
510 "codecs/isac/fix/source/pitch_gain_tables.c", 511 "codecs/isac/fix/source/pitch_gain_tables.c",
(...skipping 18 matching lines...) Expand all
529 "../..:common_inherited_config", 530 "../..:common_inherited_config",
530 ":isac_fix_config", 531 ":isac_fix_config",
531 ] 532 ]
532 533
533 deps = [ 534 deps = [
534 ":audio_encoder_interface", 535 ":audio_encoder_interface",
535 "../../common_audio", 536 "../../common_audio",
536 "../../system_wrappers", 537 "../../system_wrappers",
537 ] 538 ]
538 539
539 if (current_cpu == "arm64") { 540 if (rtc_build_with_neon) {
540 deps += [ ":isac_neon" ] 541 deps += [ ":isac_neon" ]
541 } 542 }
542 543
543 if (rtc_build_armv7_neon) { 544 if (current_cpu == "arm" && arm_version >= 7) {
Andrew MacDonald 2015/06/17 17:44:16 I know the armv6 file below doesn't require arm_ve
jridges 2015/06/17 18:46:51 I agree, especially since the plan is to get rid o
544 deps += [ ":isac_neon" ]
545
546 # Enable compilation for the ARM v7 Neon instruction set. This is needed
547 # since //build/config/arm.gni only enables Neon for iOS, not Android.
548 # This provides the same functionality as webrtc/build/arm_neon.gypi.
549 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
550 # //build/config/arm.gni instead, to reduce code duplication.
551 # Remove the -mfpu=vfpv3-d16 cflag.
552 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
553 cflags = [ "-mfpu=neon" ]
554
555 sources += [ 545 sources += [
556 "codecs/isac/fix/source/lattice_armv7.S", 546 "codecs/isac/fix/source/lattice_armv7.S",
557 "codecs/isac/fix/source/pitch_filter_armv6.S", 547 "codecs/isac/fix/source/pitch_filter_armv6.S",
558 ] 548 ]
559 sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ] 549 sources -= [
550 "codecs/isac/fix/source/lattice_c.c",
551 "codecs/isac/fix/source/pitch_filter_c.c",
552 ]
560 } 553 }
561 554
562 if (current_cpu == "mipsel") { 555 if (current_cpu == "mipsel") {
563 sources += [ 556 sources += [
564 "codecs/isac/fix/source/entropy_coding_mips.c", 557 "codecs/isac/fix/source/entropy_coding_mips.c",
565 "codecs/isac/fix/source/filters_mips.c", 558 "codecs/isac/fix/source/filters_mips.c",
566 "codecs/isac/fix/source/lattice_mips.c", 559 "codecs/isac/fix/source/lattice_mips.c",
567 "codecs/isac/fix/source/pitch_estimator_mips.c", 560 "codecs/isac/fix/source/pitch_estimator_mips.c",
568 "codecs/isac/fix/source/transform_mips.c", 561 "codecs/isac/fix/source/transform_mips.c",
569 ] 562 ]
570 sources -= [ "codecs/isac/fix/source/pitch_estimator_c.c" ] 563 sources -= [
564 "codecs/isac/fix/source/lattice_c.c",
565 "codecs/isac/fix/source/pitch_estimator_c.c",
566 ]
571 if (mips_dsp_rev > 0) { 567 if (mips_dsp_rev > 0) {
572 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ] 568 sources += [ "codecs/isac/fix/source/filterbanks_mips.c" ]
573 } 569 }
574 if (mips_dsp_rev > 1) { 570 if (mips_dsp_rev > 1) {
575 sources += [ 571 sources += [
576 "codecs/isac/fix/source/lpc_masking_model_mips.c", 572 "codecs/isac/fix/source/lpc_masking_model_mips.c",
577 "codecs/isac/fix/source/pitch_filter_mips.c", 573 "codecs/isac/fix/source/pitch_filter_mips.c",
578 ] 574 ]
579 sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ] 575 sources -= [ "codecs/isac/fix/source/pitch_filter_c.c" ]
580 } 576 }
581 } 577 }
582
583 if (!rtc_build_armv7_neon && current_cpu != "mipsel") {
584 sources += [ "codecs/isac/fix/source/lattice_c.c" ]
Andrew MacDonald 2015/06/17 17:44:16 I think adding this to the primary source list and
585 }
586 } 578 }
587 579
588 if (rtc_build_armv7_neon || current_cpu == "arm64") { 580 if (rtc_build_with_neon) {
589 source_set("isac_neon") { 581 source_set("isac_neon") {
590 sources = [ 582 sources = [
591 "codecs/isac/fix/source/entropy_coding_neon.c", 583 "codecs/isac/fix/source/entropy_coding_neon.c",
592 "codecs/isac/fix/source/filters_neon.c", 584 "codecs/isac/fix/source/filters_neon.c",
593 "codecs/isac/fix/source/lattice_neon.c", 585 "codecs/isac/fix/source/lattice_neon.c",
594 "codecs/isac/fix/source/transform_neon.c", 586 "codecs/isac/fix/source/transform_neon.c",
595 ] 587 ]
596
597 if (rtc_build_armv7_neon) {
598 # Enable compilation for the ARM v7 Neon instruction set. This is needed
599 # since //build/config/arm.gni only enables Neon for iOS, not Android.
600 # This provides the same functionality as webrtc/build/arm_neon.gypi.
601 # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
602 # //build/config/arm.gni instead, to reduce code duplication.
603 # Remove the -mfpu=vfpv3-d16 cflag.
604 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
605 cflags = [ "-mfpu=neon" ]
606 }
607
608 if (current_cpu != "arm64" || !is_clang) { 588 if (current_cpu != "arm64" || !is_clang) {
609 # Disable AllpassFilter2FixDec16Neon function due to a clang bug. 589 # Disable AllpassFilter2FixDec16Neon function due to a clang bug.
610 # Refer more details at: 590 # For more details refer to:
611 # https://code.google.com/p/webrtc/issues/detail?id=4567 591 # https://code.google.com/p/webrtc/issues/detail?id=4567
612 sources += [ "codecs/isac/fix/source/filterbanks_neon.c" ] 592 sources += [ "codecs/isac/fix/source/filterbanks_neon.c" ]
613 } 593 }
614 594
615 # Disable LTO in audio_processing_neon target due to compiler bug. 595 configs += [
616 if (rtc_use_lto) { 596 "../..:arm_neon_config",
617 cflags -= [ 597 "../..:common_config",
618 "-flto", 598 ]
619 "-ffat-lto-objects",
620 ]
621 }
622
623 configs += [ "../..:common_config" ]
624 public_configs = [ "../..:common_inherited_config" ] 599 public_configs = [ "../..:common_inherited_config" ]
625 600
626 deps = [ 601 deps = [
627 "../../common_audio", 602 "../../common_audio",
628 ] 603 ]
629 } 604 }
630 } 605 }
631 606
632 config("pcm16b_config") { 607 config("pcm16b_config") {
633 include_dirs = [ 608 include_dirs = [
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 "../../system_wrappers", 758 "../../system_wrappers",
784 ] 759 ]
785 760
786 defines = [] 761 defines = []
787 762
788 if (rtc_include_opus) { 763 if (rtc_include_opus) {
789 defines += [ "WEBRTC_CODEC_OPUS" ] 764 defines += [ "WEBRTC_CODEC_OPUS" ]
790 deps += [ ":webrtc_opus" ] 765 deps += [ ":webrtc_opus" ]
791 } 766 }
792 } 767 }
OLDNEW
« no previous file with comments | « webrtc/common_audio/common_audio.gyp ('k') | webrtc/modules/audio_coding/codecs/isac/isacfix.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698