1# Copyright (c) 2020 The WebRTC project authors. All Rights Reserved. 2# 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 5# tree. An additional intellectual property rights grant can be found 6# in the file PATENTS. All contributing project authors may 7# be found in the AUTHORS file in the root of the source tree. 8 9import("../../../webrtc.gni") 10 11rtc_library("fft_size_128") { 12 sources = [ 13 "fft_size_128/ooura_fft.cc", 14 "fft_size_128/ooura_fft.h", 15 "fft_size_128/ooura_fft_tables_common.h", 16 ] 17 deps = [ 18 "../../../rtc_base/system:arch", 19 "../../../system_wrappers", 20 ] 21 cflags = [] 22 23 if (current_cpu == "x86" || current_cpu == "x64") { 24 sources += [ 25 "fft_size_128/ooura_fft_sse2.cc", 26 "fft_size_128/ooura_fft_tables_neon_sse2.h", 27 ] 28 if (is_posix || is_fuchsia) { 29 cflags += [ "-msse2" ] 30 } 31 } 32 33 if (rtc_build_with_neon) { 34 sources += [ 35 "fft_size_128/ooura_fft_neon.cc", 36 "fft_size_128/ooura_fft_tables_neon_sse2.h", 37 ] 38 39 deps += [ "../../../common_audio" ] 40 41 if (current_cpu != "arm64") { 42 # Enable compilation for the NEON instruction set. 43 suppressed_configs += [ "//build/config/compiler:compiler_arm_fpu" ] 44 cflags += [ "-mfpu=neon" ] 45 } 46 } 47 48 if (current_cpu == "mipsel" && mips_float_abi == "hard") { 49 sources += [ "fft_size_128/ooura_fft_mips.cc" ] 50 } 51} 52 53rtc_library("fft_size_256") { 54 sources = [ 55 "fft_size_256/fft4g.cc", 56 "fft_size_256/fft4g.h", 57 ] 58} 59