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