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