| 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 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_internal.h", |   27     "aec/aec_core_internal.h", | 
|   28     "aec/aec_rdft.c", |   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", | 
|   34     "aec/echo_cancellation_internal.h", |   34     "aec/echo_cancellation_internal.h", | 
|   35     "aecm/aecm_core.cc", |   35     "aecm/aecm_core.cc", | 
|   36     "aecm/aecm_core.h", |   36     "aecm/aecm_core.h", | 
|   37     "aecm/echo_control_mobile.cc", |   37     "aecm/echo_control_mobile.cc", | 
|   38     "aecm/echo_control_mobile.h", |   38     "aecm/echo_control_mobile.h", | 
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  193  |  193  | 
|  194   if (rtc_build_with_neon) { |  194   if (rtc_build_with_neon) { | 
|  195     deps += [ ":audio_processing_neon" ] |  195     deps += [ ":audio_processing_neon" ] | 
|  196   } |  196   } | 
|  197  |  197  | 
|  198   if (current_cpu == "mipsel") { |  198   if (current_cpu == "mipsel") { | 
|  199     sources += [ "aecm/aecm_core_mips.cc" ] |  199     sources += [ "aecm/aecm_core_mips.cc" ] | 
|  200     if (mips_float_abi == "hard") { |  200     if (mips_float_abi == "hard") { | 
|  201       sources += [ |  201       sources += [ | 
|  202         "aec/aec_core_mips.cc", |  202         "aec/aec_core_mips.cc", | 
|  203         "aec/aec_rdft_mips.c", |  203         "aec/aec_rdft_mips.cc", | 
|  204       ] |  204       ] | 
|  205     } |  205     } | 
|  206   } else { |  206   } else { | 
|  207     sources += [ "aecm/aecm_core_c.cc" ] |  207     sources += [ "aecm/aecm_core_c.cc" ] | 
|  208   } |  208   } | 
|  209  |  209  | 
|  210   if (is_win) { |  210   if (is_win) { | 
|  211     cflags = [ |  211     cflags = [ | 
|  212       # TODO(jschuh): Bug 1348: fix this warning. |  212       # TODO(jschuh): Bug 1348: fix this warning. | 
|  213       "/wd4267",  # size_t to int truncations |  213       "/wd4267",  # size_t to int truncations | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
|  234     ] |  234     ] | 
|  235  |  235  | 
|  236     proto_out_dir = "webrtc/modules/audio_processing" |  236     proto_out_dir = "webrtc/modules/audio_processing" | 
|  237   } |  237   } | 
|  238 } |  238 } | 
|  239  |  239  | 
|  240 if (current_cpu == "x86" || current_cpu == "x64") { |  240 if (current_cpu == "x86" || current_cpu == "x64") { | 
|  241   source_set("audio_processing_sse2") { |  241   source_set("audio_processing_sse2") { | 
|  242     sources = [ |  242     sources = [ | 
|  243       "aec/aec_core_sse2.cc", |  243       "aec/aec_core_sse2.cc", | 
|  244       "aec/aec_rdft_sse2.c", |  244       "aec/aec_rdft_sse2.cc", | 
|  245     ] |  245     ] | 
|  246  |  246  | 
|  247     if (is_posix) { |  247     if (is_posix) { | 
|  248       cflags = [ "-msse2" ] |  248       cflags = [ "-msse2" ] | 
|  249     } |  249     } | 
|  250  |  250  | 
|  251     configs += [ "../..:common_config" ] |  251     configs += [ "../..:common_config" ] | 
|  252     public_configs = [ "../..:common_inherited_config" ] |  252     public_configs = [ "../..:common_inherited_config" ] | 
|  253   } |  253   } | 
|  254 } |  254 } | 
|  255  |  255  | 
|  256 if (rtc_build_with_neon) { |  256 if (rtc_build_with_neon) { | 
|  257   source_set("audio_processing_neon") { |  257   source_set("audio_processing_neon") { | 
|  258     sources = [ |  258     sources = [ | 
|  259       "aec/aec_core_neon.cc", |  259       "aec/aec_core_neon.cc", | 
|  260       "aec/aec_rdft_neon.c", |  260       "aec/aec_rdft_neon.cc", | 
|  261       "aecm/aecm_core_neon.cc", |  261       "aecm/aecm_core_neon.cc", | 
|  262       "ns/nsx_core_neon.c", |  262       "ns/nsx_core_neon.c", | 
|  263     ] |  263     ] | 
|  264  |  264  | 
|  265     if (current_cpu != "arm64") { |  265     if (current_cpu != "arm64") { | 
|  266       # Enable compilation for the NEON instruction set. This is needed |  266       # Enable compilation for the NEON instruction set. This is needed | 
|  267       # 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. | 
|  268       # This provides the same functionality as webrtc/build/arm_neon.gypi. |  268       # This provides the same functionality as webrtc/build/arm_neon.gypi. | 
|  269       configs -= [ "//build/config/compiler:compiler_arm_fpu" ] |  269       configs -= [ "//build/config/compiler:compiler_arm_fpu" ] | 
|  270       cflags = [ "-mfpu=neon" ] |  270       cflags = [ "-mfpu=neon" ] | 
|  271     } |  271     } | 
|  272  |  272  | 
|  273     # Disable LTO on NEON targets due to compiler bug. |  273     # Disable LTO on NEON targets due to compiler bug. | 
|  274     # TODO(fdegans): Enable this. See crbug.com/408997. |  274     # TODO(fdegans): Enable this. See crbug.com/408997. | 
|  275     if (rtc_use_lto) { |  275     if (rtc_use_lto) { | 
|  276       cflags -= [ |  276       cflags -= [ | 
|  277         "-flto", |  277         "-flto", | 
|  278         "-ffat-lto-objects", |  278         "-ffat-lto-objects", | 
|  279       ] |  279       ] | 
|  280     } |  280     } | 
|  281  |  281  | 
|  282     configs += [ "../..:common_config" ] |  282     configs += [ "../..:common_config" ] | 
|  283     public_configs = [ "../..:common_inherited_config" ] |  283     public_configs = [ "../..:common_inherited_config" ] | 
|  284  |  284  | 
|  285     deps = [ |  285     deps = [ | 
|  286       "../../common_audio", |  286       "../../common_audio", | 
|  287     ] |  287     ] | 
|  288   } |  288   } | 
|  289 } |  289 } | 
| OLD | NEW |