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

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

Issue 626183003: Roll openmax_dl 79e64bc:6d58d90. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gn. Created 6 years, 2 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 | « DEPS ('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
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 if (cpu_arch == "arm") {
kjellander_chromium 2014/10/04 11:28:45 You can skip this condition as it's already in the
ajm 2014/10/06 05:53:28 Done.
6 import("//build/config/arm.gni")
7 }
8
5 declare_args() { 9 declare_args() {
6 # Override this value to build with small float FFT tables 10 # Override this value to build with small float FFT tables
7 openmax_big_float_fft = true 11 openmax_big_float_fft = true
8 } 12 }
9 13
10 config("dl_config") { 14 config("dl_config") {
11 include_dirs = [ ".." ] 15 include_dirs = [ ".." ]
16 if (cpu_arch == "arm") {
17 if (arm_use_neon) {
18 # Enable build-time NEON selection.
19 defines = [ "DL_ARM_NEON" ]
20 }
21 if (!arm_use_neon && is_android) {
kjellander_chromium 2014/10/04 11:28:45 replace with: } else if (is_android) {
ajm 2014/10/06 05:53:28 Done.
22 # Enable run-time NEON selection.
23 defines = [ "DL_ARM_NEON_OPTIONAL" ]
24 }
25 }
12 } 26 }
13 27
14 # GYP: third_party/openmax_dl/dl/dl.gyp:openmax_dl 28 # GYP: third_party/openmax_dl/dl/dl.gyp:openmax_dl
15 source_set("dl") { 29 source_set("dl") {
16 public_configs = [ ":dl_config" ] 30 public_configs = [ ":dl_config" ]
17 sources = [ 31 sources = [
18 "api/omxtypes.h", 32 "api/omxtypes.h",
19 "sp/api/omxSP.h", 33 "sp/api/omxSP.h",
20 "sp/src/armSP_FFT_F32TwiddleTable.c", 34 "sp/src/armSP_FFT_F32TwiddleTable.c",
21 ] 35 ]
(...skipping 18 matching lines...) Expand all
40 "sp/src/arm/omxSP_FFTGetBufSize_C_FC32.c", 54 "sp/src/arm/omxSP_FFTGetBufSize_C_FC32.c",
41 "sp/src/arm/omxSP_FFTGetBufSize_C_SC32.c", 55 "sp/src/arm/omxSP_FFTGetBufSize_C_SC32.c",
42 "sp/src/arm/omxSP_FFTGetBufSize_R_F32.c", 56 "sp/src/arm/omxSP_FFTGetBufSize_R_F32.c",
43 "sp/src/arm/omxSP_FFTGetBufSize_R_S32.c", 57 "sp/src/arm/omxSP_FFTGetBufSize_R_S32.c",
44 "sp/src/arm/omxSP_FFTInit_C_FC32.c", 58 "sp/src/arm/omxSP_FFTInit_C_FC32.c",
45 "sp/src/arm/omxSP_FFTInit_R_F32.c", 59 "sp/src/arm/omxSP_FFTInit_R_F32.c",
46 ] 60 ]
47 } 61 }
48 62
49 if (cpu_arch == "arm") { 63 if (cpu_arch == "arm") {
64 if (arm_use_neon || is_android) {
65 deps += [
66 ":openmax_dl_armv7"
67 ]
68 }
50 configs -= [ "//build/config/compiler:compiler_arm_fpu" ] 69 configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
51 cflags += [ 70 cflags += [
52 "-mfpu=neon" 71 "-mfpu=neon"
53 ] 72 ]
54 73
55 deps += [ 74 if (arm_use_neon || is_android) {
56 ":openmax_dl_armv7" 75 sources += [
Raymond Toy 2014/10/06 16:21:29 This dependency seems to have been removed. It's s
ajm 2014/10/06 16:35:59 It's been moved above to line 66. Sorry for the ba
57 ] 76 # Common files that are used by both the NEON and non-NEON code.
77 "api/armCOMM_s.h",
78 "sp/src/arm/omxSP_FFTGetBufSize_C_SC16.c",
79 "sp/src/arm/omxSP_FFTGetBufSize_R_S16.c",
80 "sp/src/arm/omxSP_FFTGetBufSize_R_S16S32.c",
81 "sp/src/arm/omxSP_FFTInit_C_SC16.c",
82 "sp/src/arm/omxSP_FFTInit_C_SC32.c",
83 "sp/src/arm/omxSP_FFTInit_R_S16.c",
84 "sp/src/arm/omxSP_FFTInit_R_S16S32.c",
85 "sp/src/arm/omxSP_FFTInit_R_S32.c",
58 86
59 sources += [ 87 # Complex 32-bit fixed-point FFT.
60 # Common files that are used by both the NEON and non-NEON code. 88 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_fs_unsafe_s.S",
61 "api/armCOMM_s.h", 89 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_ls_unsafe_s.S",
62 "sp/src/arm/omxSP_FFTGetBufSize_C_SC16.c", 90 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_unsafe_s.S",
63 "sp/src/arm/omxSP_FFTGetBufSize_R_S16.c", 91 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_fs_unsafe_s.S",
64 "sp/src/arm/omxSP_FFTGetBufSize_R_S16S32.c", 92 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_ls_unsafe_s.S",
65 "sp/src/arm/omxSP_FFTInit_C_SC16.c", 93 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_unsafe_s.S",
66 "sp/src/arm/omxSP_FFTInit_C_SC32.c", 94 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix8_fs_unsafe_s.S",
67 "sp/src/arm/omxSP_FFTInit_R_S16.c", 95 "sp/src/arm/neon/omxSP_FFTFwd_CToC_SC32_Sfs_s.S",
68 "sp/src/arm/omxSP_FFTInit_R_S16S32.c", 96 "sp/src/arm/neon/omxSP_FFTInv_CToC_SC32_Sfs_s.S",
69 "sp/src/arm/omxSP_FFTInit_R_S32.c", 97 # Real 32-bit fixed-point FFT
70 98 "sp/src/arm/neon/armSP_FFTInv_CCSToR_S32_preTwiddleRadix2_unsafe_s.S",
71 # Complex 32-bit fixed-point FFT. 99 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S32_Sfs_s.S",
72 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_fs_unsafe_s.S", 100 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_S32_Sfs_s.S",
73 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_ls_unsafe_s.S", 101 # Complex 16-bit fixed-point FFT
74 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_unsafe_s.S", 102 "sp/src/arm/neon/armSP_FFTInv_CCSToR_S16_preTwiddleRadix2_unsafe_s.S",
75 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_fs_unsafe_s.S", 103 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_fs_unsafe_s.S",
76 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_ls_unsafe_s.S", 104 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_ls_unsafe_s.S",
77 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_unsafe_s.S", 105 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_ps_unsafe_s.S",
78 "sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix8_fs_unsafe_s.S", 106 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_unsafe_s.S",
79 "sp/src/arm/neon/omxSP_FFTFwd_CToC_SC32_Sfs_s.S", 107 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_fs_unsafe_s.S",
80 "sp/src/arm/neon/omxSP_FFTInv_CToC_SC32_Sfs_s.S", 108 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_ls_unsafe_s.S",
81 # Real 32-bit fixed-point FFT 109 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_unsafe_s.S",
82 "sp/src/arm/neon/armSP_FFTInv_CCSToR_S32_preTwiddleRadix2_unsafe_s.S", 110 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix8_fs_unsafe_s.S",
83 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S32_Sfs_s.S", 111 "sp/src/arm/neon/omxSP_FFTFwd_CToC_SC16_Sfs_s.S",
84 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_S32_Sfs_s.S", 112 "sp/src/arm/neon/omxSP_FFTInv_CToC_SC16_Sfs_s.S",
85 # Complex 16-bit fixed-point FFT 113 # Real 16-bit fixed-point FFT
86 "sp/src/arm/neon/armSP_FFTInv_CCSToR_S16_preTwiddleRadix2_unsafe_s.S", 114 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S16_Sfs_s.S",
87 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_fs_unsafe_s.S", 115 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_S16_Sfs_s.S",
88 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_ls_unsafe_s.S", 116 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S16S32_Sfs_s.S",
89 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_ps_unsafe_s.S", 117 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_S32S16_Sfs_s.S",
90 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_unsafe_s.S", 118 # Complex floating-point FFT
91 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_fs_unsafe_s.S", 119 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S",
92 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_ls_unsafe_s.S", 120 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_ls_unsafe_s.S",
93 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_unsafe_s.S", 121 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_unsafe_s.S",
94 "sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix8_fs_unsafe_s.S", 122 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_fs_unsafe_s.S",
95 "sp/src/arm/neon/omxSP_FFTFwd_CToC_SC16_Sfs_s.S", 123 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_ls_unsafe_s.S",
96 "sp/src/arm/neon/omxSP_FFTInv_CToC_SC16_Sfs_s.S", 124 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_unsafe_s.S",
97 # Real 16-bit fixed-point FFT 125 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix8_fs_unsafe_s.S",
98 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S16_Sfs_s.S", 126 "sp/src/arm/neon/omxSP_FFTFwd_CToC_FC32_Sfs_s.S",
99 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_S16_Sfs_s.S", 127 "sp/src/arm/neon/omxSP_FFTInv_CToC_FC32_Sfs_s.S",
100 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S16S32_Sfs_s.S", 128 # Real floating-point FFT
101 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_S32S16_Sfs_s.S", 129 "sp/src/arm/neon/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_unsafe_s.S",
102 # Complex floating-point FFT 130 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S",
103 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S", 131 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_F32_Sfs_s.S",
104 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_ls_unsafe_s.S", 132 ]
105 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_unsafe_s.S", 133 }
106 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_fs_unsafe_s.S",
107 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_ls_unsafe_s.S",
108 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_unsafe_s.S",
109 "sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix8_fs_unsafe_s.S",
110 "sp/src/arm/neon/omxSP_FFTFwd_CToC_FC32_Sfs_s.S",
111 "sp/src/arm/neon/omxSP_FFTInv_CToC_FC32_Sfs_s.S",
112 # Real floating-point FFT
113 "sp/src/arm/neon/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_unsafe_s.S",
114 "sp/src/arm/neon/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S",
115 "sp/src/arm/neon/omxSP_FFTInv_CCSToR_F32_Sfs_s.S",
116 ]
117 } 134 }
118 135
119 if (cpu_arch == "ia32" || cpu_arch == "x64") { 136 if (cpu_arch == "ia32" || cpu_arch == "x64") {
120 cflags += [ 137 cflags += [
121 "-msse2" 138 "-msse2"
122 ] 139 ]
123 140
124 sources += [ 141 sources += [
125 # Real 32-bit floating-point FFT. 142 # Real 32-bit floating-point FFT.
126 "sp/api/x86SP.h", 143 "sp/api/x86SP.h",
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 ] 213 ]
197 } 214 }
198 } 215 }
199 216
200 if (cpu_arch == "arm") { 217 if (cpu_arch == "arm") {
201 # GYP: third_party/openmax_dl/dl/dl.gyp:openmax_dl 218 # GYP: third_party/openmax_dl/dl/dl.gyp:openmax_dl
202 # Non-NEON implementation of FFT. This library is NOT 219 # Non-NEON implementation of FFT. This library is NOT
203 # standalone. Applications must link with openmax_dl. 220 # standalone. Applications must link with openmax_dl.
204 source_set("openmax_dl_armv7") { 221 source_set("openmax_dl_armv7") {
205 configs += [ ":dl_config" ] 222 configs += [ ":dl_config" ]
206 deps = [ "//third_party/android_tools:cpu_features" ]
207 visibility = [ ":*" ] 223 visibility = [ ":*" ]
208 224
209 #TODO(GYP): 225 #TODO(GYP):
210 #'cflags!': [ 226 #'cflags!': [
211 #'-mfpu=neon', 227 #'-mfpu=neon',
212 #], 228 #],
213 229
214 libs = [ "log" ]
215
216 sources = [ 230 sources = [
217 # Detection routine
218 "sp/src/arm/detect.c",
219 # Complex floating-point FFT 231 # Complex floating-point FFT
220 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S", 232 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S",
221 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix4_fs_unsafe_s.S", 233 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix4_fs_unsafe_s.S",
222 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix4_unsafe_s.S", 234 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix4_unsafe_s.S",
223 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix8_fs_unsafe_s.S", 235 "sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix8_fs_unsafe_s.S",
224 "sp/src/arm/armv7/omxSP_FFTInv_CToC_FC32_Sfs_s.S", 236 "sp/src/arm/armv7/omxSP_FFTInv_CToC_FC32_Sfs_s.S",
225 "sp/src/arm/armv7/omxSP_FFTFwd_CToC_FC32_Sfs_s.S", 237 "sp/src/arm/armv7/omxSP_FFTFwd_CToC_FC32_Sfs_s.S",
226 # Real floating-point FFT 238 # Real floating-point FFT
227 "sp/src/arm/armv7/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_unsafe_s.S", 239 "sp/src/arm/armv7/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_unsafe_s.S",
228 "sp/src/arm/armv7/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S", 240 "sp/src/arm/armv7/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S",
229 "sp/src/arm/armv7/omxSP_FFTInv_CCSToR_F32_Sfs_s.S", 241 "sp/src/arm/armv7/omxSP_FFTInv_CCSToR_F32_Sfs_s.S",
230 ] 242 ]
243 if (is_android) {
244 # We only do run-time NEON detection on Android.
245 deps = [ "//third_party/android_tools:cpu_features" ]
246 libs = [ "log" ]
247 # Detection routine
248 sources += [ "sp/src/arm/detect.c", ]
kjellander_chromium 2014/10/04 11:28:45 nit: skip comma after source entry.
ajm 2014/10/06 05:53:28 Done.
249 }
231 } 250 }
232 } 251 }
OLDNEW
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698