1 # Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
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.
11 # Override this value to build with small float FFT tables
19 ['target_arch=="arm"', {
22 # Enable build-time NEON selection.
23 'defines': ['DL_ARM_NEON',],
24 'direct_dependent_settings': {
25 'defines': ['DL_ARM_NEON',],
28 ['arm_neon==0 and OS=="android"', {
29 # Enable run-time NEON selection.
30 'defines': ['DL_ARM_NEON_OPTIONAL',],
31 'direct_dependent_settings': {
32 'defines': ['DL_ARM_NEON_OPTIONAL',],
37 ['target_arch=="arm64"', {
38 # Enable build-time NEON selection.
39 'defines': ['DL_ARM_NEON',],
40 'direct_dependent_settings': {
41 'defines': ['DL_ARM_NEON',],
48 'target_name': 'openmax_dl',
49 'type': 'static_library',
50 'direct_dependent_settings': {
58 'sp/src/armSP_FFT_F32TwiddleTable.c',
61 ['big_float_fft==1', {
66 ['target_arch=="arm" or target_arch=="arm64"', {
68 # Common files that are used by both arm and arm64 code.
70 'api/arm/omxtypes_s.h',
72 'sp/src/arm/armSP_FFT_S32TwiddleTable.c',
73 'sp/src/arm/omxSP_FFTGetBufSize_C_FC32.c',
74 'sp/src/arm/omxSP_FFTGetBufSize_C_SC32.c',
75 'sp/src/arm/omxSP_FFTGetBufSize_R_F32.c',
76 'sp/src/arm/omxSP_FFTGetBufSize_R_S32.c',
77 'sp/src/arm/omxSP_FFTInit_C_FC32.c',
78 'sp/src/arm/omxSP_FFTInit_R_F32.c',
81 ['target_arch=="arm"', {
83 ['arm_neon==0 or OS=="android"', {
88 ['arm_neon==1 or OS=="android"', {
96 # Common files that are used by both the NEON and non-NEON code.
98 'sp/src/arm/omxSP_FFTGetBufSize_C_SC16.c',
99 'sp/src/arm/omxSP_FFTGetBufSize_R_S16.c',
100 'sp/src/arm/omxSP_FFTGetBufSize_R_S16S32.c',
101 'sp/src/arm/omxSP_FFTInit_C_SC16.c',
102 'sp/src/arm/omxSP_FFTInit_C_SC32.c',
103 'sp/src/arm/omxSP_FFTInit_R_S16.c',
104 'sp/src/arm/omxSP_FFTInit_R_S16S32.c',
105 'sp/src/arm/omxSP_FFTInit_R_S32.c',
107 # Complex 32-bit fixed-point FFT.
108 'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_fs_unsafe_s.S',
109 'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_ls_unsafe_s.S',
110 'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_fs_unsafe_s.S',
111 'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_fs_unsafe_s.S',
112 'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_ls_unsafe_s.S',
113 'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_unsafe_s.S',
114 'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_unsafe_s.S',
115 'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix8_fs_unsafe_s.S',
116 'sp/src/arm/neon/omxSP_FFTInv_CToC_SC32_Sfs_s.S',
117 'sp/src/arm/neon/omxSP_FFTFwd_CToC_SC32_Sfs_s.S',
118 # Real 32-bit fixed-point FFT
119 'sp/src/arm/neon/armSP_FFTInv_CCSToR_S32_preTwiddleRadix2_unsafe_s.S',
120 'sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S32_Sfs_s.S',
121 'sp/src/arm/neon/omxSP_FFTInv_CCSToR_S32_Sfs_s.S',
122 # Complex 16-bit fixed-point FFT
123 'sp/src/arm/neon/armSP_FFTInv_CCSToR_S16_preTwiddleRadix2_unsafe_s.S',
124 'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_fs_unsafe_s.S',
125 'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_ls_unsafe_s.S',
126 'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_ps_unsafe_s.S',
127 'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_unsafe_s.S',
128 'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_fs_unsafe_s.S',
129 'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_ls_unsafe_s.S',
130 'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_unsafe_s.S',
131 'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix8_fs_unsafe_s.S',
132 'sp/src/arm/neon/omxSP_FFTFwd_CToC_SC16_Sfs_s.S',
133 'sp/src/arm/neon/omxSP_FFTInv_CToC_SC16_Sfs_s.S',
134 # Real 16-bit fixed-point FFT
135 'sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S16_Sfs_s.S',
136 'sp/src/arm/neon/omxSP_FFTInv_CCSToR_S16_Sfs_s.S',
137 'sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S16S32_Sfs_s.S',
138 'sp/src/arm/neon/omxSP_FFTInv_CCSToR_S32S16_Sfs_s.S',
139 # Complex floating-point FFT
140 'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S',
141 'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_ls_unsafe_s.S',
142 'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S',
143 'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_fs_unsafe_s.S',
144 'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_ls_unsafe_s.S',
145 'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_unsafe_s.S',
146 'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_unsafe_s.S',
147 'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix8_fs_unsafe_s.S',
148 'sp/src/arm/neon/omxSP_FFTInv_CToC_FC32_Sfs_s.S',
149 'sp/src/arm/neon/omxSP_FFTFwd_CToC_FC32_Sfs_s.S',
150 # Real floating-point FFT
151 'sp/src/arm/neon/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_unsafe_s.S',
152 'sp/src/arm/neon/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S',
153 'sp/src/arm/neon/omxSP_FFTInv_CCSToR_F32_Sfs_s.S',
158 ['target_arch=="ia32" or target_arch=="x64"', {
163 # Real 32-bit floating-point FFT.
165 'sp/src/x86/omxSP_FFTFwd_RToCCS_F32_Sfs.c',
166 'sp/src/x86/omxSP_FFTGetBufSize_R_F32.c',
167 'sp/src/x86/omxSP_FFTInit_R_F32.c',
168 'sp/src/x86/omxSP_FFTInv_CCSToR_F32_Sfs.c',
169 'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_fs.c',
170 'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_ls.c',
171 'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_ls_sse.c',
172 'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_ms.c',
173 'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_fs.c',
174 'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_fs_sse.c',
175 'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ls.c',
176 'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ls_sse.c',
177 'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ms.c',
178 'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ms_sse.c',
179 'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_fs.c',
180 'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_ls.c',
181 'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_ls_sse.c',
182 'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_ms.c',
183 'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_fs.c',
184 'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_fs_sse.c',
185 'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ls.c',
186 'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ls_sse.c',
187 'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ms.c',
188 'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ms_sse.c',
189 'sp/src/x86/x86SP_FFT_F32_radix2_kernel.c',
190 'sp/src/x86/x86SP_FFT_F32_radix4_kernel.c',
191 'sp/src/x86/x86SP_SSE_Math.h',
194 ['target_arch=="arm64"', {
196 'api/arm/arm64COMM_s.h',
198 # Complex floating-point FFT
199 'sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix2_fs_s.S',
200 'sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix2_ls_s.S',
201 'sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix2_s.S',
202 'sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix4_fs_s.S',
203 'sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix4_ls_s.S',
204 'sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix4_s.S',
205 'sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix8_fs_s.S',
206 'sp/src/arm/arm64/omxSP_FFTInv_CToC_FC32.c',
207 'sp/src/arm/arm64/omxSP_FFTFwd_CToC_FC32.c',
208 # Real floating-point FFT
209 'sp/src/arm/arm64/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_s.S',
210 'sp/src/arm/arm64/omxSP_FFTFwd_RToCCS_F32.c',
211 'sp/src/arm/arm64/ComplexToRealFixup.S',
212 'sp/src/arm/arm64/omxSP_FFTInv_CCSToR_F32.c',
215 ['target_arch=="mipsel"', {
220 'sp/src/armSP_FFT_F32TwiddleTable.c',
224 'sp/src/mips/mips_FFTFwd_RToCCS_F32_complex.c',
225 'sp/src/mips/mips_FFTFwd_RToCCS_F32_real.c',
226 'sp/src/mips/mips_FFTInv_CCSToR_F32_complex.c',
227 'sp/src/mips/mips_FFTInv_CCSToR_F32_real.c',
228 'sp/src/mips/omxSP_FFT_F32TwiddleTable.c',
229 'sp/src/mips/omxSP_FFTFwd_RToCCS_F32_Sfs.c',
230 'sp/src/mips/omxSP_FFTGetBufSize_R_F32.c',
231 'sp/src/mips/omxSP_FFTInit_R_F32.c',
232 'sp/src/mips/omxSP_FFTInv_CCSToR_F32_Sfs.c',
239 ['target_arch=="arm"', {
242 # Non-NEON implementation of FFT. This library is NOT
243 # standalone. Applications must link with openmax_dl.
244 'target_name': 'openmax_dl_armv7',
245 'type': 'static_library',
250 # Complex floating-point FFT
251 'sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S',
252 'sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S',
253 'sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix4_fs_unsafe_s.S',
254 'sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix4_unsafe_s.S',
255 'sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix8_fs_unsafe_s.S',
256 'sp/src/arm/armv7/omxSP_FFTInv_CToC_FC32_Sfs_s.S',
257 'sp/src/arm/armv7/omxSP_FFTFwd_CToC_FC32_Sfs_s.S',
258 # Real floating-point FFT
259 'sp/src/arm/armv7/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_unsafe_s.S',
260 'sp/src/arm/armv7/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S',
261 'sp/src/arm/armv7/omxSP_FFTInv_CCSToR_F32_Sfs_s.S',
265 # We only do run-time NEON detection on Android.
267 '../../../build/android/cpufeatures.gypi',
271 # To get the __android_log_print routine
277 'sp/src/arm/detect.c',