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

Side by Side Diff: build/secondary/third_party/openmax_dl/dl/BUILD.gn

Issue 871433002: Roll openmax_dl to the latest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « build/config/arm.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//build/config/arm.gni")
6
7 declare_args() {
8 # Override this value to build with small float FFT tables
9 openmax_big_float_fft = true
10 }
11
12 config("dl_config") {
13 include_dirs = [ ".." ]
14 if (cpu_arch == "arm") {
15 if (arm_use_neon) {
16 # Enable build-time NEON selection.
17 defines = [ "DL_ARM_NEON" ]
18 } else if (is_android) {
19 # Enable run-time NEON selection.
20 defines = [ "DL_ARM_NEON_OPTIONAL" ]
21 }
22 } else if (cpu_arch == "arm64") {
23 # Enable build-time NEON selection.
24 defines = [ "DL_ARM_NEON" ]
25 }
26 }
27
28 # GYP: third_party/openmax_dl/dl/dl.gyp:openmax_dl
29 source_set("dl") {
30 public_configs = [ ":dl_config" ]
31 sources = [
32 "api/omxtypes.h",
33 "sp/api/omxSP.h",
34 "sp/src/armSP_FFT_F32TwiddleTable.c",
35 ]
36
37 cflags = []
38 deps = []
39 defines = []
40
41 if (openmax_big_float_fft) {
42 defines += [ "BIG_FFT_TABLE" ]
43 }
44
45 if (cpu_arch == "arm" || cpu_arch == "arm64") {
46 sources += [
47 # Common files that are used by both arm and arm64 code.
48 "api/arm/armOMX.h",
49 "api/arm/omxtypes_s.h",
50 "sp/api/armSP.h",
51 "sp/src/arm/armSP_FFT_S32TwiddleTable.c",
52 "sp/src/arm/omxSP_FFTGetBufSize_C_FC32.c",
53 "sp/src/arm/omxSP_FFTGetBufSize_C_SC32.c",
54 "sp/src/arm/omxSP_FFTGetBufSize_R_F32.c",
55 "sp/src/arm/omxSP_FFTGetBufSize_R_S32.c",
56 "sp/src/arm/omxSP_FFTInit_C_FC32.c",
57 "sp/src/arm/omxSP_FFTInit_R_F32.c",
58 ]
59 }
60
61 if (cpu_arch == "arm") {
62 if (arm_use_neon || is_android) {
63 deps += [ ":openmax_dl_armv7" ]
64 }
65 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
66 cflags += [ "-mfpu=neon" ]
67
68 if (arm_use_neon || is_android) {
69 sources += [
70 # Common files that are used by both the NEON and non-NEON code.
71 "api/armCOMM_s.h",
72 "sp/src/arm/omxSP_FFTGetBufSize_C_SC16.c",
73 "sp/src/arm/omxSP_FFTGetBufSize_R_S16.c",
74 "sp/src/arm/omxSP_FFTGetBufSize_R_S16S32.c",
75 "sp/src/arm/omxSP_FFTInit_C_SC16.c",
76 "sp/src/arm/omxSP_FFTInit_C_SC32.c",
77 "sp/src/arm/omxSP_FFTInit_R_S16.c",
78 "sp/src/arm/omxSP_FFTInit_R_S16S32.c",
79 "sp/src/arm/omxSP_FFTInit_R_S32.c",
80
81 # Complex 32-bit fixed-point FFT.
82 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_fs_unsafe_s.S",
83 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_ls_unsafe_s.S",
84 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_unsafe_s.S",
85 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_fs_unsafe_s.S",
86 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_ls_unsafe_s.S",
87 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_unsafe_s.S",
88 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix8_fs_unsafe_s.S",
89 "sp/src/arm/neon/omxSP_FFTFwd_CToC_SC32_Sfs_s.S",
90 "sp/src/arm/neon/omxSP_FFTInv_CToC_SC32_Sfs_s.S",
91
92 # Real 32-bit fixed-point FFT
93 "sp/src/arm/neon/armSP_FFTInv_CCSToR_S32_preTwiddleRadix2_unsafe_s.S",
94 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S32_Sfs_s.S",
95 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_S32_Sfs_s.S",
96
97 # Complex 16-bit fixed-point FFT
98 "sp/src/arm/neon/armSP_FFTInv_CCSToR_S16_preTwiddleRadix2_unsafe_s.S",
99 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_fs_unsafe_s.S",
100 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_ls_unsafe_s.S",
101 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_ps_unsafe_s.S",
102 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_unsafe_s.S",
103 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_fs_unsafe_s.S",
104 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_ls_unsafe_s.S",
105 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_unsafe_s.S",
106 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix8_fs_unsafe_s.S",
107 "sp/src/arm/neon/omxSP_FFTFwd_CToC_SC16_Sfs_s.S",
108 "sp/src/arm/neon/omxSP_FFTInv_CToC_SC16_Sfs_s.S",
109
110 # Real 16-bit fixed-point FFT
111 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S16_Sfs_s.S",
112 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_S16_Sfs_s.S",
113 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S16S32_Sfs_s.S",
114 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_S32S16_Sfs_s.S",
115
116 # Complex floating-point FFT
117 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S",
118 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_ls_unsafe_s.S",
119 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_unsafe_s.S",
120 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_fs_unsafe_s.S",
121 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_ls_unsafe_s.S",
122 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_unsafe_s.S",
123 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix8_fs_unsafe_s.S",
124 "sp/src/arm/neon/omxSP_FFTFwd_CToC_FC32_Sfs_s.S",
125 "sp/src/arm/neon/omxSP_FFTInv_CToC_FC32_Sfs_s.S",
126
127 # Real floating-point FFT
128 "sp/src/arm/neon/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_unsafe_s.S",
129 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S",
130 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_F32_Sfs_s.S",
131 ]
132 }
133 }
134
135 if (cpu_arch == "ia32" || cpu_arch == "x64") {
136 cflags += [ "-msse2" ]
137
138 sources += [
139 # Real 32-bit floating-point FFT.
140 "sp/api/x86SP.h",
141 "sp/src/x86/omxSP_FFTFwd_RToCCS_F32_Sfs.c",
142 "sp/src/x86/omxSP_FFTGetBufSize_R_F32.c",
143 "sp/src/x86/omxSP_FFTInit_R_F32.c",
144 "sp/src/x86/omxSP_FFTInv_CCSToR_F32_Sfs.c",
145 "sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_fs.c",
146 "sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_ls.c",
147 "sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_ls_sse.c",
148 "sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_ms.c",
149 "sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_fs.c",
150 "sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_fs_sse.c",
151 "sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ls.c",
152 "sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ls_sse.c",
153 "sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ms.c",
154 "sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ms_sse.c",
155 "sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_fs.c",
156 "sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_ls.c",
157 "sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_ls_sse.c",
158 "sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_ms.c",
159 "sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_fs.c",
160 "sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_fs_sse.c",
161 "sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ls.c",
162 "sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ls_sse.c",
163 "sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ms.c",
164 "sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ms_sse.c",
165 "sp/src/x86/x86SP_FFT_F32_radix2_kernel.c",
166 "sp/src/x86/x86SP_FFT_F32_radix4_kernel.c",
167 "sp/src/x86/x86SP_SSE_Math.h",
168 ]
169 }
170 if (cpu_arch == "arm64") {
171 sources += [
172 "api/arm/arm64COMM_s.h",
173
174 # Complex floating-point FFT
175 "sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix2_fs_s.S",
176 "sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix2_ls_s.S",
177 "sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix2_s.S",
178 "sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix4_fs_s.S",
179 "sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix4_ls_s.S",
180 "sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix4_s.S",
181 "sp/src/arm/arm64/armSP_FFT_CToC_FC32_Radix8_fs_s.S",
182 "sp/src/arm/arm64/omxSP_FFTInv_CToC_FC32.c",
183 "sp/src/arm/arm64/omxSP_FFTFwd_CToC_FC32.c",
184
185 # Real floating-point FFT
186 "sp/src/arm/arm64/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_s.S",
187 "sp/src/arm/arm64/omxSP_FFTFwd_RToCCS_F32.c",
188 "sp/src/arm/arm64/ComplexToRealFixup.S",
189 "sp/src/arm/arm64/omxSP_FFTInv_CCSToR_F32.c",
190 ]
191 }
192 if (cpu_arch == "mipsel") {
193 cflags += [ "-std=c99" ]
194 sources -= [ "sp/src/armSP_FFT_F32TwiddleTable.c" ]
195
196 sources += [
197 "sp/api/mipsSP.h",
198 "sp/src/mips/mips_FFTFwd_RToCCS_F32_complex.c",
199 "sp/src/mips/mips_FFTFwd_RToCCS_F32_real.c",
200 "sp/src/mips/mips_FFTInv_CCSToR_F32_complex.c",
201 "sp/src/mips/mips_FFTInv_CCSToR_F32_real.c",
202 "sp/src/mips/omxSP_FFT_F32TwiddleTable.c",
203 "sp/src/mips/omxSP_FFTFwd_RToCCS_F32_Sfs.c",
204 "sp/src/mips/omxSP_FFTGetBufSize_R_F32.c",
205 "sp/src/mips/omxSP_FFTInit_R_F32.c",
206 "sp/src/mips/omxSP_FFTInv_CCSToR_F32_Sfs.c",
207 ]
208 }
209 }
210
211 if (cpu_arch == "arm") {
212 # GYP: third_party/openmax_dl/dl/dl.gyp:openmax_dl
213 # Non-NEON implementation of FFT. This library is NOT
214 # standalone. Applications must link with openmax_dl.
215 source_set("openmax_dl_armv7") {
216 configs += [ ":dl_config" ]
217 visibility = [ ":*" ]
218
219 #TODO(GYP):
220 #'cflags!': [
221 #'-mfpu=neon',
222 #],
223
224 sources = [
225 # Complex floating-point FFT
226 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S",
227 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix4_fs_unsafe_s.S",
228 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix4_unsafe_s.S",
229 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix8_fs_unsafe_s.S",
230 "sp/src/arm/armv7/omxSP_FFTInv_CToC_FC32_Sfs_s.S",
231 "sp/src/arm/armv7/omxSP_FFTFwd_CToC_FC32_Sfs_s.S",
232
233 # Real floating-point FFT
234 "sp/src/arm/armv7/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_unsafe_s.S",
235 "sp/src/arm/armv7/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S",
236 "sp/src/arm/armv7/omxSP_FFTInv_CCSToR_F32_Sfs_s.S",
237 ]
238 if (is_android) {
239 # We only do run-time NEON detection on Android.
240 deps = [
241 "//third_party/android_tools:cpu_features",
242 ]
243 libs = [ "log" ]
244
245 # Detection routine
246 sources += [ "sp/src/arm/detect.c" ]
247 }
248 }
249 }
OLDNEW
« no previous file with comments | « build/config/arm.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698