| 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("../webrtc.gni") | 10 import("../webrtc.gni") |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 "real_fourier.h", | 39 "real_fourier.h", |
| 40 "real_fourier_ooura.cc", | 40 "real_fourier_ooura.cc", |
| 41 "real_fourier_ooura.h", | 41 "real_fourier_ooura.h", |
| 42 "resampler/include/push_resampler.h", | 42 "resampler/include/push_resampler.h", |
| 43 "resampler/include/resampler.h", | 43 "resampler/include/resampler.h", |
| 44 "resampler/push_resampler.cc", | 44 "resampler/push_resampler.cc", |
| 45 "resampler/push_sinc_resampler.cc", | 45 "resampler/push_sinc_resampler.cc", |
| 46 "resampler/push_sinc_resampler.h", | 46 "resampler/push_sinc_resampler.h", |
| 47 "resampler/resampler.cc", | 47 "resampler/resampler.cc", |
| 48 "resampler/sinc_resampler.cc", | 48 "resampler/sinc_resampler.cc", |
| 49 "resampler/sinc_resampler.h", | |
| 50 "smoothing_filter.cc", | 49 "smoothing_filter.cc", |
| 51 "smoothing_filter.h", | 50 "smoothing_filter.h", |
| 52 "sparse_fir_filter.cc", | 51 "sparse_fir_filter.cc", |
| 53 "sparse_fir_filter.h", | 52 "sparse_fir_filter.h", |
| 54 "vad/include/vad.h", | 53 "vad/include/vad.h", |
| 55 "vad/vad.cc", | 54 "vad/vad.cc", |
| 56 "wav_file.cc", | 55 "wav_file.cc", |
| 57 "wav_file.h", | 56 "wav_file.h", |
| 58 "wav_header.cc", | 57 "wav_header.cc", |
| 59 "wav_header.h", | 58 "wav_header.h", |
| 60 "window_generator.cc", | 59 "window_generator.cc", |
| 61 "window_generator.h", | 60 "window_generator.h", |
| 62 ] | 61 ] |
| 63 | 62 |
| 64 deps = [ | 63 deps = [ |
| 64 ":sinc_resampler", |
| 65 "..:webrtc_common", |
| 66 "../base:gtest_prod", |
| 67 "../base:rtc_base_approved", |
| 65 "../system_wrappers", | 68 "../system_wrappers", |
| 66 ] | 69 ] |
| 67 public_deps = [ | 70 public_deps = [ |
| 68 ":common_audio_c", | 71 ":common_audio_c", |
| 69 ] | 72 ] |
| 70 | 73 |
| 71 defines = [] | 74 defines = [] |
| 72 if (rtc_use_openmax_dl) { | 75 if (rtc_use_openmax_dl) { |
| 73 sources += [ | 76 sources += [ |
| 74 "real_fourier_openmax.cc", | 77 "real_fourier_openmax.cc", |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 "signal_processing/filter_ar_fast_q12.c", | 195 "signal_processing/filter_ar_fast_q12.c", |
| 193 "signal_processing/spl_sqrt_floor.c", | 196 "signal_processing/spl_sqrt_floor.c", |
| 194 ] | 197 ] |
| 195 } | 198 } |
| 196 | 199 |
| 197 if (is_win) { | 200 if (is_win) { |
| 198 cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. | 201 cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. |
| 199 } | 202 } |
| 200 | 203 |
| 201 public_configs = [ ":common_audio_config" ] | 204 public_configs = [ ":common_audio_config" ] |
| 205 deps = [ |
| 206 "..:webrtc_common", |
| 207 "../base:rtc_base_approved", |
| 208 "../system_wrappers:system_wrappers", |
| 209 ] |
| 210 } |
| 211 |
| 212 rtc_source_set("sinc_resampler") { |
| 213 sources = [ |
| 214 "resampler/sinc_resampler.h", |
| 215 ] |
| 216 deps = [ |
| 217 "..:webrtc_common", |
| 218 "../base:gtest_prod", |
| 219 "../base:rtc_base_approved", |
| 220 "../system_wrappers", |
| 221 ] |
| 202 } | 222 } |
| 203 | 223 |
| 204 if (current_cpu == "x86" || current_cpu == "x64") { | 224 if (current_cpu == "x86" || current_cpu == "x64") { |
| 205 rtc_static_library("common_audio_sse2") { | 225 rtc_static_library("common_audio_sse2") { |
| 226 # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
| 227 # Enabling GN check triggers dependency cycle: |
| 228 # //webrtc/common_audio:common_audio -> |
| 229 # //webrtc/common_audio:common_audio_sse2 -> |
| 230 # //webrtc/common_audio:common_audio |
| 231 check_includes = false |
| 206 sources = [ | 232 sources = [ |
| 207 "fir_filter_sse.cc", | 233 "fir_filter_sse.cc", |
| 208 "resampler/sinc_resampler_sse.cc", | 234 "resampler/sinc_resampler_sse.cc", |
| 209 ] | 235 ] |
| 210 | 236 |
| 211 if (is_posix) { | 237 if (is_posix) { |
| 212 cflags = [ "-msse2" ] | 238 cflags = [ "-msse2" ] |
| 213 } | 239 } |
| 214 | 240 |
| 215 if (!build_with_chromium && is_clang) { | 241 if (!build_with_chromium && is_clang) { |
| 216 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 242 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 217 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 243 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 218 } | 244 } |
| 245 deps = [ |
| 246 ":sinc_resampler", |
| 247 ] |
| 219 } | 248 } |
| 220 } | 249 } |
| 221 | 250 |
| 222 if (rtc_build_with_neon) { | 251 if (rtc_build_with_neon) { |
| 223 rtc_static_library("common_audio_neon") { | 252 rtc_static_library("common_audio_neon") { |
| 253 # TODO(kjellander): Remove (bugs.webrtc.org/6828) |
| 254 # Enabling GN check triggers dependency cycle: |
| 255 # //webrtc/common_audio:common_audio -> |
| 256 # //webrtc/common_audio:common_audio_neon -> |
| 257 # //webrtc/common_audio:common_audio |
| 258 check_includes = false |
| 224 sources = [ | 259 sources = [ |
| 225 "fir_filter_neon.cc", | 260 "fir_filter_neon.cc", |
| 226 "resampler/sinc_resampler_neon.cc", | 261 "resampler/sinc_resampler_neon.cc", |
| 227 ] | 262 ] |
| 228 | 263 |
| 229 if (current_cpu != "arm64") { | 264 if (current_cpu != "arm64") { |
| 230 # Enable compilation for the NEON instruction set. This is needed | 265 # Enable compilation for the NEON instruction set. This is needed |
| 231 # since //build/config/arm.gni only enables NEON for iOS, not Android. | 266 # since //build/config/arm.gni only enables NEON for iOS, not Android. |
| 232 # This provides the same functionality as webrtc/build/arm_neon.gypi. | 267 # This provides the same functionality as webrtc/build/arm_neon.gypi. |
| 233 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] | 268 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] |
| 234 cflags = [ "-mfpu=neon" ] | 269 cflags = [ "-mfpu=neon" ] |
| 235 } | 270 } |
| 236 | 271 |
| 237 # Disable LTO on NEON targets due to compiler bug. | 272 # Disable LTO on NEON targets due to compiler bug. |
| 238 # TODO(fdegans): Enable this. See crbug.com/408997. | 273 # TODO(fdegans): Enable this. See crbug.com/408997. |
| 239 if (rtc_use_lto) { | 274 if (rtc_use_lto) { |
| 240 cflags -= [ | 275 cflags -= [ |
| 241 "-flto", | 276 "-flto", |
| 242 "-ffat-lto-objects", | 277 "-ffat-lto-objects", |
| 243 ] | 278 ] |
| 244 } | 279 } |
| 245 | 280 |
| 246 if (!build_with_chromium && is_clang) { | 281 if (!build_with_chromium && is_clang) { |
| 247 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 282 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 248 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 283 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 249 } | 284 } |
| 250 | 285 |
| 286 deps = [ |
| 287 ":sinc_resampler", |
| 288 ] |
| 289 |
| 251 public_deps = [ | 290 public_deps = [ |
| 252 ":common_audio_neon_c", | 291 ":common_audio_neon_c", |
| 253 ] | 292 ] |
| 254 } | 293 } |
| 255 | 294 |
| 256 rtc_source_set("common_audio_neon_c") { | 295 rtc_source_set("common_audio_neon_c") { |
| 257 visibility = [ ":*" ] # Only targets in this file can depend on this. | 296 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 258 sources = [ | 297 sources = [ |
| 259 "signal_processing/cross_correlation_neon.c", | 298 "signal_processing/cross_correlation_neon.c", |
| 260 "signal_processing/downsample_fast_neon.c", | 299 "signal_processing/downsample_fast_neon.c", |
| (...skipping 14 matching lines...) Expand all Loading... |
| 275 cflags -= [ | 314 cflags -= [ |
| 276 "-flto", | 315 "-flto", |
| 277 "-ffat-lto-objects", | 316 "-ffat-lto-objects", |
| 278 ] | 317 ] |
| 279 } | 318 } |
| 280 | 319 |
| 281 if (!build_with_chromium && is_clang) { | 320 if (!build_with_chromium && is_clang) { |
| 282 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 321 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 283 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 322 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 284 } | 323 } |
| 324 deps = [ |
| 325 ":common_audio_c", |
| 326 "../base:rtc_base_approved", |
| 327 ] |
| 285 } | 328 } |
| 286 } | 329 } |
| 287 | 330 |
| 288 if (rtc_include_tests) { | 331 if (rtc_include_tests) { |
| 289 rtc_test("common_audio_unittests") { | 332 rtc_test("common_audio_unittests") { |
| 290 testonly = true | 333 testonly = true |
| 291 | 334 |
| 292 sources = [ | 335 sources = [ |
| 293 "audio_converter_unittest.cc", | 336 "audio_converter_unittest.cc", |
| 294 "audio_ring_buffer_unittest.cc", | 337 "audio_ring_buffer_unittest.cc", |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 defines = [ "RTC_USE_OPENMAX_DL" ] | 371 defines = [ "RTC_USE_OPENMAX_DL" ] |
| 329 } | 372 } |
| 330 | 373 |
| 331 if (!build_with_chromium && is_clang) { | 374 if (!build_with_chromium && is_clang) { |
| 332 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 375 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| 333 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 376 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 334 } | 377 } |
| 335 | 378 |
| 336 deps = [ | 379 deps = [ |
| 337 ":common_audio", | 380 ":common_audio", |
| 381 ":sinc_resampler", |
| 382 "..:webrtc_common", |
| 383 "../base:rtc_base_approved", |
| 384 "../system_wrappers", |
| 338 "../test:test_main", | 385 "../test:test_main", |
| 339 "//testing/gmock", | 386 "//testing/gmock", |
| 340 "//testing/gtest", | 387 "//testing/gtest", |
| 341 ] | 388 ] |
| 342 | 389 |
| 343 if (is_android) { | 390 if (is_android) { |
| 344 deps += [ "//testing/android/native_test:native_test_support" ] | 391 deps += [ "//testing/android/native_test:native_test_support" ] |
| 345 | 392 |
| 346 shard_timeout = 900 | 393 shard_timeout = 900 |
| 347 } | 394 } |
| 348 } | 395 } |
| 349 } | 396 } |
| OLD | NEW |