- add third_party src.
[platform/framework/web/crosswalk.git] / src / third_party / openmax_dl / dl / dl.gyp
1 #  Copyright (c) 2013 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
9 {
10   'variables' : {
11     # Override this value to build with small float FFT tables
12     'big_float_fft%' : 1,
13   },
14   'targets': [
15     {
16       'target_name': 'openmax_dl',
17       'type': 'static_library',
18       'include_dirs': [
19         '../',
20       ],
21       'sources': [
22         'api/omxtypes.h',
23         'sp/api/omxSP.h',
24         'sp/src/armSP_FFT_F32TwiddleTable.c',
25       ],
26       'conditions' : [
27         ['big_float_fft == 1', {
28           'defines': [
29             'BIG_FFT_TABLE',
30           ],
31         }],
32         ['target_arch=="arm"', {
33           'cflags!': [
34             '-mfpu=vfpv3-d16',
35           ],
36           'cflags': [
37             # We enable Neon instructions even with arm_neon==0, to support
38             # runtime detection.
39             '-mfpu=neon',
40           ],
41           'dependencies': [
42             '<(android_ndk_root)/android_tools_ndk.gyp:cpu_features',
43             'openmax_dl_armv7',
44           ],
45           'link_settings' : {
46             'libraries': [
47               # To get the __android_log_print routine
48               '-llog',
49             ],
50           },
51           'sources': [
52             # Common files that are used by both the NEON and non-NEON code.
53             'api/armCOMM_s.h',
54             'api/armOMX.h',
55             'api/omxtypes_s.h',
56             'sp/api/armSP.h',
57             'sp/src/arm/armSP_FFT_S32TwiddleTable.c',
58             'sp/src/arm/detect.c',
59             'sp/src/arm/omxSP_FFTGetBufSize_C_FC32.c',
60             'sp/src/arm/omxSP_FFTGetBufSize_C_SC16.c',
61             'sp/src/arm/omxSP_FFTGetBufSize_C_SC32.c',
62             'sp/src/arm/omxSP_FFTGetBufSize_R_F32.c',
63             'sp/src/arm/omxSP_FFTGetBufSize_R_S16.c',
64             'sp/src/arm/omxSP_FFTGetBufSize_R_S16S32.c',
65             'sp/src/arm/omxSP_FFTGetBufSize_R_S32.c',
66             'sp/src/arm/omxSP_FFTInit_C_FC32.c',
67             'sp/src/arm/omxSP_FFTInit_C_SC16.c',
68             'sp/src/arm/omxSP_FFTInit_C_SC32.c',
69             'sp/src/arm/omxSP_FFTInit_R_F32.c',
70             'sp/src/arm/omxSP_FFTInit_R_S16.c',
71             'sp/src/arm/omxSP_FFTInit_R_S16S32.c',
72             'sp/src/arm/omxSP_FFTInit_R_S32.c',
73
74             # Complex 32-bit fixed-point FFT.
75             'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_fs_unsafe_s.S',
76             'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_ls_unsafe_s.S',
77             'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_fs_unsafe_s.S',
78             'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_fs_unsafe_s.S',
79             'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_ls_unsafe_s.S',
80             'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix2_unsafe_s.S',
81             'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix4_unsafe_s.S',
82             'sp/src/arm/neon/armSP_FFT_CToC_SC32_Radix8_fs_unsafe_s.S',
83             'sp/src/arm/neon/omxSP_FFTInv_CToC_SC32_Sfs_s.S',
84             'sp/src/arm/neon/omxSP_FFTFwd_CToC_SC32_Sfs_s.S',
85             # Real 32-bit fixed-point FFT
86             'sp/src/arm/neon/armSP_FFTInv_CCSToR_S32_preTwiddleRadix2_unsafe_s.S',
87             'sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S32_Sfs_s.S',
88             'sp/src/arm/neon/omxSP_FFTInv_CCSToR_S32_Sfs_s.S',
89             # Complex 16-bit fixed-point FFT
90             'sp/src/arm/neon/armSP_FFTInv_CCSToR_S16_preTwiddleRadix2_unsafe_s.S',
91             'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_fs_unsafe_s.S',
92             'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_ls_unsafe_s.S',
93             'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_ps_unsafe_s.S',
94             'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix2_unsafe_s.S',
95             'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_fs_unsafe_s.S',
96             'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_ls_unsafe_s.S',
97             'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix4_unsafe_s.S',
98             'sp/src/arm/neon/armSP_FFT_CToC_SC16_Radix8_fs_unsafe_s.S',
99             'sp/src/arm/neon/omxSP_FFTFwd_CToC_SC16_Sfs_s.S',
100             'sp/src/arm/neon/omxSP_FFTInv_CToC_SC16_Sfs_s.S',
101             # Real 16-bit fixed-point FFT
102             'sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S16_Sfs_s.S',
103             'sp/src/arm/neon/omxSP_FFTInv_CCSToR_S16_Sfs_s.S',
104             'sp/src/arm/neon/omxSP_FFTFwd_RToCCS_S16S32_Sfs_s.S',
105             'sp/src/arm/neon/omxSP_FFTInv_CCSToR_S32S16_Sfs_s.S',
106             # Complex floating-point FFT
107             'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S',
108             'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_ls_unsafe_s.S',
109             'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S',
110             'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_fs_unsafe_s.S',
111             'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_ls_unsafe_s.S',
112             'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix2_unsafe_s.S',
113             'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix4_unsafe_s.S',
114             'sp/src/arm/neon/armSP_FFT_CToC_FC32_Radix8_fs_unsafe_s.S',
115             'sp/src/arm/neon/omxSP_FFTInv_CToC_FC32_Sfs_s.S',
116             'sp/src/arm/neon/omxSP_FFTFwd_CToC_FC32_Sfs_s.S',
117             # Real floating-point FFT
118             'sp/src/arm/neon/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_unsafe_s.S',
119             'sp/src/arm/neon/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S',
120             'sp/src/arm/neon/omxSP_FFTInv_CCSToR_F32_Sfs_s.S',
121           ],
122         }],
123         ['target_arch=="ia32" or target_arch=="x64"', {
124           'cflags': [
125             '-msse2',
126           ],
127           'sources': [
128             # Real 32-bit floating-point FFT.
129             'sp/api/x86SP.h',
130             'sp/src/x86/omxSP_FFTFwd_RToCCS_F32_Sfs.c',
131             'sp/src/x86/omxSP_FFTGetBufSize_R_F32.c',
132             'sp/src/x86/omxSP_FFTInit_R_F32.c',
133             'sp/src/x86/omxSP_FFTInv_CCSToR_F32_Sfs.c',
134             'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_fs.c',
135             'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_ls.c',
136             'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_ls_sse.c',
137             'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix2_ms.c',
138             'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_fs.c',
139             'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_fs_sse.c',
140             'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ls.c',
141             'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ls_sse.c',
142             'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ms.c',
143             'sp/src/x86/x86SP_FFT_CToC_FC32_Fwd_Radix4_ms_sse.c',
144             'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_fs.c',
145             'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_ls.c',
146             'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_ls_sse.c',
147             'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix2_ms.c',
148             'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_fs.c',
149             'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_fs_sse.c',
150             'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ls.c',
151             'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ls_sse.c',
152             'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ms.c',
153             'sp/src/x86/x86SP_FFT_CToC_FC32_Inv_Radix4_ms_sse.c',
154             'sp/src/x86/x86SP_FFT_F32_radix2_kernel.c',
155             'sp/src/x86/x86SP_FFT_F32_radix4_kernel.c',
156             'sp/src/x86/x86SP_SSE_Math.h',
157           ],
158         }],
159       ],
160     },
161   ],
162   'conditions': [
163     ['target_arch=="arm"', {
164       'targets': [
165         {
166           # Non-NEON implementation of FFT. This library is NOT
167           # standalone. Applications must link with openmax_dl.
168           'target_name': 'openmax_dl_armv7',
169           'type': 'static_library',
170           'include_dirs': [
171             '../',
172           ],
173           'cflags!': [
174             '-mfpu=neon',
175           ],
176           'sources': [
177             # Complex floating-point FFT
178             'sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S',
179             'sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix2_fs_unsafe_s.S',
180             'sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix4_fs_unsafe_s.S',
181             'sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix4_unsafe_s.S',
182             'sp/src/arm/armv7/armSP_FFT_CToC_FC32_Radix8_fs_unsafe_s.S',
183             'sp/src/arm/armv7/omxSP_FFTInv_CToC_FC32_Sfs_s.S',
184             'sp/src/arm/armv7/omxSP_FFTFwd_CToC_FC32_Sfs_s.S',
185             # Real floating-point FFT
186             'sp/src/arm/armv7/armSP_FFTInv_CCSToR_F32_preTwiddleRadix2_unsafe_s.S',
187             'sp/src/arm/armv7/omxSP_FFTFwd_RToCCS_F32_Sfs_s.S',
188             'sp/src/arm/armv7/omxSP_FFTInv_CCSToR_F32_Sfs_s.S',
189           ],
190         },
191       ],
192     }],
193   ],
194 }