]> granicus.if.org Git - libvpx/blob - vpx_dsp/vpx_dsp.mk
Merge "Remove UNINITIALIZED_IS_SAFE"
[libvpx] / vpx_dsp / vpx_dsp.mk
1 ##
2 ## Copyright (c) 2015 The WebM project authors. All Rights Reserved.
3 ##
4 ##  Use of this source code is governed by a BSD-style license
5 ##  that can be found in the LICENSE file in the root of the source
6 ##  tree. An additional intellectual property rights grant can be found
7 ##  in the file PATENTS.  All contributing project authors may
8 ##  be found in the AUTHORS file in the root of the source tree.
9 ##
10
11 DSP_SRCS-yes += vpx_dsp.mk
12 DSP_SRCS-yes += vpx_dsp_common.h
13
14 DSP_SRCS-$(HAVE_MSA)    += mips/macros_msa.h
15
16 DSP_SRCS-$(HAVE_SSE2)   += x86/bitdepth_conversion_sse2.h
17 # This file is included in libs.mk. Including it here would cause it to be
18 # compiled into an object. Even as an empty file, this would create an
19 # executable section on the stack.
20 #DSP_SRCS-$(HAVE_SSE2)   += x86/bitdepth_conversion_sse2$(ASM)
21
22 # bit reader
23 DSP_SRCS-yes += prob.h
24 DSP_SRCS-yes += prob.c
25
26 ifeq ($(CONFIG_ENCODERS),yes)
27 DSP_SRCS-yes += bitwriter.h
28 DSP_SRCS-yes += bitwriter.c
29 DSP_SRCS-yes += bitwriter_buffer.c
30 DSP_SRCS-yes += bitwriter_buffer.h
31 DSP_SRCS-yes += psnr.c
32 DSP_SRCS-yes += psnr.h
33 DSP_SRCS-$(CONFIG_INTERNAL_STATS) += ssim.c
34 DSP_SRCS-$(CONFIG_INTERNAL_STATS) += ssim.h
35 DSP_SRCS-$(CONFIG_INTERNAL_STATS) += psnrhvs.c
36 DSP_SRCS-$(CONFIG_INTERNAL_STATS) += fastssim.c
37 endif
38
39 ifeq ($(CONFIG_DECODERS),yes)
40 DSP_SRCS-yes += bitreader.h
41 DSP_SRCS-yes += bitreader.c
42 DSP_SRCS-yes += bitreader_buffer.c
43 DSP_SRCS-yes += bitreader_buffer.h
44 endif
45
46 # intra predictions
47 DSP_SRCS-yes += intrapred.c
48
49 DSP_SRCS-$(HAVE_SSE) += x86/intrapred_sse2.asm
50 DSP_SRCS-$(HAVE_SSE2) += x86/intrapred_sse2.asm
51 DSP_SRCS-$(HAVE_SSSE3) += x86/intrapred_ssse3.asm
52 DSP_SRCS-$(HAVE_SSSE3) += x86/vpx_subpixel_8t_ssse3.asm
53
54 ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
55 DSP_SRCS-$(HAVE_SSE)  += x86/highbd_intrapred_sse2.asm
56 DSP_SRCS-$(HAVE_SSE2) += x86/highbd_intrapred_sse2.asm
57 DSP_SRCS-$(HAVE_NEON) += arm/highbd_intrapred_neon.c
58 endif  # CONFIG_VP9_HIGHBITDEPTH
59
60 ifneq ($(filter yes,$(CONFIG_POSTPROC) $(CONFIG_VP9_POSTPROC)),)
61 DSP_SRCS-yes += add_noise.c
62 DSP_SRCS-yes += deblock.c
63 DSP_SRCS-yes += postproc.h
64 DSP_SRCS-$(HAVE_MSA) += mips/add_noise_msa.c
65 DSP_SRCS-$(HAVE_MSA) += mips/deblock_msa.c
66 DSP_SRCS-$(HAVE_NEON) += arm/deblock_neon.c
67 DSP_SRCS-$(HAVE_SSE2) += x86/add_noise_sse2.asm
68 DSP_SRCS-$(HAVE_SSE2) += x86/deblock_sse2.asm
69 endif # CONFIG_POSTPROC
70
71 DSP_SRCS-$(HAVE_NEON_ASM) += arm/intrapred_neon_asm$(ASM)
72 DSP_SRCS-$(HAVE_NEON) += arm/intrapred_neon.c
73 DSP_SRCS-$(HAVE_MSA) += mips/intrapred_msa.c
74 DSP_SRCS-$(HAVE_DSPR2)  += mips/intrapred4_dspr2.c
75 DSP_SRCS-$(HAVE_DSPR2)  += mips/intrapred8_dspr2.c
76 DSP_SRCS-$(HAVE_DSPR2)  += mips/intrapred16_dspr2.c
77
78 DSP_SRCS-$(HAVE_DSPR2)  += mips/common_dspr2.h
79 DSP_SRCS-$(HAVE_DSPR2)  += mips/common_dspr2.c
80
81 # interpolation filters
82 DSP_SRCS-yes += vpx_convolve.c
83 DSP_SRCS-yes += vpx_convolve.h
84 DSP_SRCS-yes += vpx_filter.h
85
86 DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64) += x86/convolve.h
87 DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64) += x86/vpx_asm_stubs.c
88 DSP_SRCS-$(HAVE_SSE2)  += x86/vpx_subpixel_8t_sse2.asm
89 DSP_SRCS-$(HAVE_SSE2)  += x86/vpx_subpixel_bilinear_sse2.asm
90 DSP_SRCS-$(HAVE_SSSE3) += x86/vpx_subpixel_8t_ssse3.asm
91 DSP_SRCS-$(HAVE_SSSE3) += x86/vpx_subpixel_bilinear_ssse3.asm
92 DSP_SRCS-$(HAVE_AVX2)  += x86/vpx_subpixel_8t_intrin_avx2.c
93 DSP_SRCS-$(HAVE_SSSE3) += x86/vpx_subpixel_8t_intrin_ssse3.c
94 ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
95 DSP_SRCS-$(HAVE_SSE2)  += x86/vpx_high_subpixel_8t_sse2.asm
96 DSP_SRCS-$(HAVE_SSE2)  += x86/vpx_high_subpixel_bilinear_sse2.asm
97 DSP_SRCS-$(HAVE_NEON)  += arm/highbd_vpx_convolve_copy_neon.c
98 DSP_SRCS-$(HAVE_NEON)  += arm/highbd_vpx_convolve_avg_neon.c
99 DSP_SRCS-$(HAVE_NEON)  += arm/highbd_vpx_convolve8_neon.c
100 DSP_SRCS-$(HAVE_NEON)  += arm/highbd_vpx_convolve_neon.c
101 endif
102
103 DSP_SRCS-$(HAVE_SSE2)  += x86/vpx_convolve_copy_sse2.asm
104
105 ifeq ($(HAVE_NEON_ASM),yes)
106 DSP_SRCS-yes += arm/vpx_convolve_copy_neon_asm$(ASM)
107 DSP_SRCS-yes += arm/vpx_convolve8_avg_neon_asm$(ASM)
108 DSP_SRCS-yes += arm/vpx_convolve8_neon_asm$(ASM)
109 DSP_SRCS-yes += arm/vpx_convolve_avg_neon_asm$(ASM)
110 DSP_SRCS-yes += arm/vpx_convolve_neon.c
111 else
112 ifeq ($(HAVE_NEON),yes)
113 DSP_SRCS-yes += arm/vpx_convolve_copy_neon.c
114 DSP_SRCS-yes += arm/vpx_convolve8_neon.c
115 DSP_SRCS-yes += arm/vpx_convolve_avg_neon.c
116 DSP_SRCS-yes += arm/vpx_convolve_neon.c
117 endif  # HAVE_NEON
118 endif  # HAVE_NEON_ASM
119
120 # common (msa)
121 DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_avg_horiz_msa.c
122 DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_avg_msa.c
123 DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_avg_vert_msa.c
124 DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_horiz_msa.c
125 DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_msa.c
126 DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve8_vert_msa.c
127 DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve_avg_msa.c
128 DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve_copy_msa.c
129 DSP_SRCS-$(HAVE_MSA) += mips/vpx_convolve_msa.h
130
131 # common (dspr2)
132 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve_common_dspr2.h
133 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve2_avg_dspr2.c
134 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve2_avg_horiz_dspr2.c
135 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve2_dspr2.c
136 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve2_horiz_dspr2.c
137 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve2_vert_dspr2.c
138 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve8_avg_dspr2.c
139 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve8_avg_horiz_dspr2.c
140 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve8_dspr2.c
141 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve8_horiz_dspr2.c
142 DSP_SRCS-$(HAVE_DSPR2)  += mips/convolve8_vert_dspr2.c
143
144 # loop filters
145 DSP_SRCS-yes += loopfilter.c
146
147 DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64)   += x86/loopfilter_sse2.c
148 DSP_SRCS-$(HAVE_AVX2)                += x86/loopfilter_avx2.c
149
150 ifeq ($(HAVE_NEON_ASM),yes)
151 DSP_SRCS-yes  += arm/loopfilter_16_neon$(ASM)
152 DSP_SRCS-yes  += arm/loopfilter_8_neon$(ASM)
153 DSP_SRCS-yes  += arm/loopfilter_4_neon$(ASM)
154 else
155 DSP_SRCS-$(HAVE_NEON)   += arm/loopfilter_neon.c
156 endif  # HAVE_NEON_ASM
157
158 DSP_SRCS-$(HAVE_MSA)    += mips/loopfilter_msa.h
159 DSP_SRCS-$(HAVE_MSA)    += mips/loopfilter_16_msa.c
160 DSP_SRCS-$(HAVE_MSA)    += mips/loopfilter_8_msa.c
161 DSP_SRCS-$(HAVE_MSA)    += mips/loopfilter_4_msa.c
162 DSP_SRCS-$(HAVE_DSPR2)  += mips/loopfilter_filters_dspr2.h
163 DSP_SRCS-$(HAVE_DSPR2)  += mips/loopfilter_filters_dspr2.c
164 DSP_SRCS-$(HAVE_DSPR2)  += mips/loopfilter_macros_dspr2.h
165 DSP_SRCS-$(HAVE_DSPR2)  += mips/loopfilter_masks_dspr2.h
166 DSP_SRCS-$(HAVE_DSPR2)  += mips/loopfilter_mb_dspr2.c
167 DSP_SRCS-$(HAVE_DSPR2)  += mips/loopfilter_mb_horiz_dspr2.c
168 DSP_SRCS-$(HAVE_DSPR2)  += mips/loopfilter_mb_vert_dspr2.c
169
170 ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
171 DSP_SRCS-$(HAVE_NEON)   += arm/highbd_loopfilter_neon.c
172 DSP_SRCS-$(HAVE_SSE2)   += x86/highbd_loopfilter_sse2.c
173 endif  # CONFIG_VP9_HIGHBITDEPTH
174
175 DSP_SRCS-yes            += txfm_common.h
176 DSP_SRCS-$(HAVE_SSE2)   += x86/txfm_common_sse2.h
177 DSP_SRCS-$(HAVE_MSA)    += mips/txfm_macros_msa.h
178 # forward transform
179 ifeq ($(CONFIG_VP9_ENCODER),yes)
180 DSP_SRCS-yes            += fwd_txfm.c
181 DSP_SRCS-yes            += fwd_txfm.h
182 DSP_SRCS-$(HAVE_SSE2)   += x86/fwd_txfm_sse2.h
183 DSP_SRCS-$(HAVE_SSE2)   += x86/fwd_txfm_sse2.c
184 DSP_SRCS-$(HAVE_SSE2)   += x86/fwd_txfm_impl_sse2.h
185 DSP_SRCS-$(HAVE_SSE2)   += x86/fwd_dct32x32_impl_sse2.h
186 ifeq ($(ARCH_X86_64),yes)
187 DSP_SRCS-$(HAVE_SSSE3)  += x86/fwd_txfm_ssse3_x86_64.asm
188 endif
189 DSP_SRCS-$(HAVE_AVX2)   += x86/fwd_txfm_avx2.c
190 DSP_SRCS-$(HAVE_AVX2)   += x86/fwd_dct32x32_impl_avx2.h
191 DSP_SRCS-$(HAVE_NEON)   += arm/fwd_txfm_neon.c
192 DSP_SRCS-$(HAVE_MSA)    += mips/fwd_txfm_msa.h
193 DSP_SRCS-$(HAVE_MSA)    += mips/fwd_txfm_msa.c
194 DSP_SRCS-$(HAVE_MSA)    += mips/fwd_dct32x32_msa.c
195 endif  # CONFIG_VP9_ENCODER
196
197 # inverse transform
198 ifeq ($(CONFIG_VP9),yes)
199 DSP_SRCS-yes            += inv_txfm.h
200 DSP_SRCS-yes            += inv_txfm.c
201 DSP_SRCS-$(HAVE_SSE2)   += x86/inv_txfm_sse2.h
202 DSP_SRCS-$(HAVE_SSE2)   += x86/inv_txfm_sse2.c
203 DSP_SRCS-$(HAVE_SSE2)   += x86/inv_wht_sse2.asm
204 DSP_SRCS-$(HAVE_SSSE3)  += x86/inv_txfm_ssse3.c
205 ifeq ($(ARCH_X86_64),yes)
206 DSP_SRCS-$(HAVE_SSSE3)  += x86/inv_txfm_ssse3_x86_64.asm
207 endif  # ARCH_X86_64
208
209 DSP_SRCS-$(HAVE_NEON_ASM) += arm/save_reg_neon$(ASM)
210
211 ifneq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
212 DSP_SRCS-$(HAVE_MSA)   += mips/inv_txfm_msa.h
213 DSP_SRCS-$(HAVE_MSA)   += mips/idct4x4_msa.c
214 DSP_SRCS-$(HAVE_MSA)   += mips/idct8x8_msa.c
215 DSP_SRCS-$(HAVE_MSA)   += mips/idct16x16_msa.c
216 DSP_SRCS-$(HAVE_MSA)   += mips/idct32x32_msa.c
217
218 DSP_SRCS-$(HAVE_DSPR2) += mips/inv_txfm_dspr2.h
219 DSP_SRCS-$(HAVE_DSPR2) += mips/itrans4_dspr2.c
220 DSP_SRCS-$(HAVE_DSPR2) += mips/itrans8_dspr2.c
221 DSP_SRCS-$(HAVE_DSPR2) += mips/itrans16_dspr2.c
222 DSP_SRCS-$(HAVE_DSPR2) += mips/itrans32_dspr2.c
223 DSP_SRCS-$(HAVE_DSPR2) += mips/itrans32_cols_dspr2.c
224 else  # CONFIG_VP9_HIGHBITDEPTH
225 DSP_SRCS-$(HAVE_NEON)  += arm/highbd_idct4x4_add_neon.c
226 DSP_SRCS-$(HAVE_NEON)  += arm/highbd_idct8x8_add_neon.c
227 DSP_SRCS-$(HAVE_NEON)  += arm/highbd_idct16x16_add_neon.c
228 DSP_SRCS-$(HAVE_NEON)  += arm/highbd_idct32x32_add_neon.c
229 endif  # !CONFIG_VP9_HIGHBITDEPTH
230
231 ifeq ($(HAVE_NEON_ASM),yes)
232 DSP_SRCS-yes += arm/idct_neon$(ASM)
233 DSP_SRCS-yes += arm/idct4x4_1_add_neon$(ASM)
234 DSP_SRCS-yes += arm/idct4x4_add_neon$(ASM)
235 else
236 DSP_SRCS-$(HAVE_NEON) += arm/idct4x4_1_add_neon.c
237 DSP_SRCS-$(HAVE_NEON) += arm/idct4x4_add_neon.c
238 endif  # HAVE_NEON_ASM
239 DSP_SRCS-$(HAVE_NEON) += arm/idct_neon.h
240 DSP_SRCS-$(HAVE_NEON) += arm/idct8x8_1_add_neon.c
241 DSP_SRCS-$(HAVE_NEON) += arm/idct8x8_add_neon.c
242 DSP_SRCS-$(HAVE_NEON) += arm/idct16x16_1_add_neon.c
243 DSP_SRCS-$(HAVE_NEON) += arm/idct16x16_add_neon.c
244 DSP_SRCS-$(HAVE_NEON) += arm/idct32x32_1_add_neon.c
245 DSP_SRCS-$(HAVE_NEON) += arm/idct32x32_34_add_neon.c
246 DSP_SRCS-$(HAVE_NEON) += arm/idct32x32_135_add_neon.c
247 DSP_SRCS-$(HAVE_NEON) += arm/idct32x32_add_neon.c
248
249 endif  # CONFIG_VP9
250
251 # quantization
252 ifeq ($(CONFIG_VP9_ENCODER),yes)
253 DSP_SRCS-yes            += quantize.c
254 DSP_SRCS-yes            += quantize.h
255
256 DSP_SRCS-$(HAVE_SSE2)   += x86/quantize_sse2.c
257 ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
258 DSP_SRCS-$(HAVE_SSE2)   += x86/highbd_quantize_intrin_sse2.c
259 endif
260 ifeq ($(ARCH_X86_64),yes)
261 DSP_SRCS-$(HAVE_SSSE3)  += x86/quantize_ssse3_x86_64.asm
262 DSP_SRCS-$(HAVE_AVX)    += x86/quantize_avx_x86_64.asm
263 endif
264
265 # avg
266 DSP_SRCS-yes           += avg.c
267 DSP_SRCS-$(HAVE_SSE2)  += x86/avg_intrin_sse2.c
268 DSP_SRCS-$(HAVE_NEON)  += arm/avg_neon.c
269 DSP_SRCS-$(HAVE_MSA)   += mips/avg_msa.c
270 DSP_SRCS-$(HAVE_NEON)  += arm/hadamard_neon.c
271 ifeq ($(ARCH_X86_64),yes)
272 DSP_SRCS-$(HAVE_SSSE3) += x86/avg_ssse3_x86_64.asm
273 endif
274
275 endif  # CONFIG_VP9_ENCODER
276
277 ifeq ($(CONFIG_ENCODERS),yes)
278 DSP_SRCS-yes            += sad.c
279 DSP_SRCS-yes            += subtract.c
280 DSP_SRCS-yes            += sum_squares.c
281 DSP_SRCS-$(HAVE_SSE2)   += x86/sum_squares_sse2.c
282 DSP_SRCS-$(HAVE_MSA)    += mips/sum_squares_msa.c
283
284 DSP_SRCS-$(HAVE_NEON)   += arm/sad4d_neon.c
285 DSP_SRCS-$(HAVE_NEON)   += arm/sad_neon.c
286 DSP_SRCS-$(HAVE_NEON)   += arm/subtract_neon.c
287
288 DSP_SRCS-$(HAVE_MSA)    += mips/sad_msa.c
289 DSP_SRCS-$(HAVE_MSA)    += mips/subtract_msa.c
290
291 DSP_SRCS-$(HAVE_SSE3)   += x86/sad_sse3.asm
292 DSP_SRCS-$(HAVE_SSSE3)  += x86/sad_ssse3.asm
293 DSP_SRCS-$(HAVE_SSE4_1) += x86/sad_sse4.asm
294 DSP_SRCS-$(HAVE_AVX2)   += x86/sad4d_avx2.c
295 DSP_SRCS-$(HAVE_AVX2)   += x86/sad_avx2.c
296
297 DSP_SRCS-$(HAVE_SSE)    += x86/sad4d_sse2.asm
298 DSP_SRCS-$(HAVE_SSE)    += x86/sad_sse2.asm
299 DSP_SRCS-$(HAVE_SSE2)   += x86/sad4d_sse2.asm
300 DSP_SRCS-$(HAVE_SSE2)   += x86/sad_sse2.asm
301 DSP_SRCS-$(HAVE_SSE2)   += x86/subtract_sse2.asm
302
303 ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
304 DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad4d_sse2.asm
305 DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad_sse2.asm
306 endif  # CONFIG_VP9_HIGHBITDEPTH
307
308 endif  # CONFIG_ENCODERS
309
310 ifneq ($(filter yes,$(CONFIG_ENCODERS) $(CONFIG_POSTPROC) $(CONFIG_VP9_POSTPROC)),)
311 DSP_SRCS-yes            += variance.c
312 DSP_SRCS-yes            += variance.h
313
314 DSP_SRCS-$(HAVE_NEON)   += arm/subpel_variance_neon.c
315 DSP_SRCS-$(HAVE_NEON)   += arm/variance_neon.c
316
317 DSP_SRCS-$(HAVE_MSA)    += mips/variance_msa.c
318 DSP_SRCS-$(HAVE_MSA)    += mips/sub_pixel_variance_msa.c
319
320 DSP_SRCS-$(HAVE_SSE)    += x86/variance_sse2.c
321 DSP_SRCS-$(HAVE_SSE2)   += x86/variance_sse2.c  # Contains SSE2 and SSSE3
322 DSP_SRCS-$(HAVE_AVX2)   += x86/variance_avx2.c
323 DSP_SRCS-$(HAVE_AVX2)   += x86/variance_impl_avx2.c
324
325 ifeq ($(ARCH_X86_64),yes)
326 DSP_SRCS-$(HAVE_SSE2)   += x86/ssim_opt_x86_64.asm
327 endif  # ARCH_X86_64
328
329 DSP_SRCS-$(HAVE_SSE)    += x86/subpel_variance_sse2.asm
330 DSP_SRCS-$(HAVE_SSE2)   += x86/subpel_variance_sse2.asm  # Contains SSE2 and SSSE3
331
332 ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
333 DSP_SRCS-$(HAVE_SSE2)   += x86/highbd_variance_sse2.c
334 DSP_SRCS-$(HAVE_SSE2)   += x86/highbd_variance_impl_sse2.asm
335 DSP_SRCS-$(HAVE_SSE2)   += x86/highbd_subpel_variance_impl_sse2.asm
336 endif  # CONFIG_VP9_HIGHBITDEPTH
337 endif  # CONFIG_ENCODERS || CONFIG_POSTPROC || CONFIG_VP9_POSTPROC
338
339 # Neon utilities
340 DSP_SRCS-$(HAVE_NEON) += arm/transpose_neon.h
341
342 DSP_SRCS-no += $(DSP_SRCS_REMOVE-yes)
343
344 DSP_SRCS-yes += vpx_dsp_rtcd.c
345 DSP_SRCS-yes += vpx_dsp_rtcd_defs.pl
346
347 $(eval $(call rtcd_h_template,vpx_dsp_rtcd,vpx_dsp/vpx_dsp_rtcd_defs.pl))