vpx_dsp.mk 5.65 KB
Newer Older
Johann's avatar
Johann committed
1
2
3
4
5
6
7
8
9
10
11
##
## Copyright (c) 2015 The WebM project authors. All Rights Reserved.
##
##  Use of this source code is governed by a BSD-style license
##  that can be found in the LICENSE file in the root of the source
##  tree. An additional intellectual property rights grant can be found
##  in the file PATENTS.  All contributing project authors may
##  be found in the AUTHORS file in the root of the source tree.
##

DSP_SRCS-yes += vpx_dsp.mk
Jingning Han's avatar
Jingning Han committed
12
DSP_SRCS-yes += vpx_dsp_common.h
Johann's avatar
Johann committed
13

Johann's avatar
Johann committed
14
15
DSP_SRCS-$(HAVE_MSA)    += mips/macros_msa.h

Yaowu Xu's avatar
Yaowu Xu committed
16
# bit reader
17
18
DSP_SRCS-yes += prob.h
DSP_SRCS-yes += prob.c
Yaowu Xu's avatar
Yaowu Xu committed
19

Yaowu Xu's avatar
Yaowu Xu committed
20
ifeq ($(CONFIG_ENCODERS),yes)
21
22
23
24
DSP_SRCS-yes += bitwriter.h
DSP_SRCS-yes += bitwriter.c
DSP_SRCS-yes += bitwriter_buffer.c
DSP_SRCS-yes += bitwriter_buffer.h
Yaowu Xu's avatar
Yaowu Xu committed
25
26
endif

Yaowu Xu's avatar
Yaowu Xu committed
27
ifeq ($(CONFIG_DECODERS),yes)
28
29
30
31
DSP_SRCS-yes += bitreader.h
DSP_SRCS-yes += bitreader.c
DSP_SRCS-yes += bitreader_buffer.c
DSP_SRCS-yes += bitreader_buffer.h
Yaowu Xu's avatar
Yaowu Xu committed
32
33
endif

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# loop filters
DSP_SRCS-yes += loopfilter.c

DSP_SRCS-$(ARCH_X86)$(ARCH_X86_64)   += x86/loopfilter_sse2.c
DSP_SRCS-$(HAVE_AVX2)                += x86/loopfilter_avx2.c
DSP_SRCS-$(HAVE_MMX)                 += x86/loopfilter_mmx.asm

DSP_SRCS-$(HAVE_NEON)   += arm/loopfilter_neon.c
ifeq ($(HAVE_NEON_ASM),yes)
DSP_SRCS-yes  += arm/loopfilter_mb_neon$(ASM)
DSP_SRCS-yes  += arm/loopfilter_16_neon$(ASM)
DSP_SRCS-yes  += arm/loopfilter_8_neon$(ASM)
DSP_SRCS-yes  += arm/loopfilter_4_neon$(ASM)
else
ifeq ($(HAVE_NEON),yes)
DSP_SRCS-yes   += arm/loopfilter_16_neon.c
DSP_SRCS-yes   += arm/loopfilter_8_neon.c
DSP_SRCS-yes   += arm/loopfilter_4_neon.c
endif  # HAVE_NEON
endif  # HAVE_NEON_ASM

DSP_SRCS-$(HAVE_MSA)    += mips/loopfilter_msa.h
DSP_SRCS-$(HAVE_MSA)    += mips/loopfilter_16_msa.c
DSP_SRCS-$(HAVE_MSA)    += mips/loopfilter_8_msa.c
DSP_SRCS-$(HAVE_MSA)    += mips/loopfilter_4_msa.c

ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2)   += x86/highbd_loopfilter_sse2.c
endif  # CONFIG_VP9_HIGHBITDEPTH

Jingning Han's avatar
Jingning Han committed
64
65
DSP_SRCS-yes            += txfm_common.h
DSP_SRCS-$(HAVE_SSE2)   += x86/txfm_common_sse2.h
66
DSP_SRCS-$(HAVE_MSA)    += mips/txfm_macros_msa.h
67
68
69
70
71
72
# forward transform
ifeq ($(CONFIG_VP9_ENCODER),yes)
DSP_SRCS-yes            += fwd_txfm.c
DSP_SRCS-yes            += fwd_txfm.h
DSP_SRCS-$(HAVE_SSE2)   += x86/fwd_txfm_sse2.c
DSP_SRCS-$(HAVE_SSE2)   += x86/fwd_txfm_impl_sse2.h
73
ifeq ($(ARCH_X86_64),yes)
74
ifeq ($(CONFIG_USE_X86INC),yes)
75
76
DSP_SRCS-$(HAVE_SSSE3)  += x86/fwd_txfm_ssse3_x86_64.asm
endif
77
78
endif
DSP_SRCS-$(HAVE_NEON)   += arm/fwd_txfm_neon.c
79
80
DSP_SRCS-$(HAVE_MSA)    += mips/fwd_txfm_msa.h
DSP_SRCS-$(HAVE_MSA)    += mips/fwd_txfm_msa.c
81
82
83
endif  # CONFIG_VP9_ENCODER

# quantization
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
ifeq ($(CONFIG_VP9_ENCODER),yes)
DSP_SRCS-yes            += quantize.c
DSP_SRCS-yes            += quantize.h

DSP_SRCS-$(HAVE_SSE2)   += x86/quantize_sse2.c
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2)   += x86/highbd_quantize_intrin_sse2.c
endif
ifeq ($(ARCH_X86_64),yes)
ifeq ($(CONFIG_USE_X86INC),yes)
DSP_SRCS-$(HAVE_SSSE3) += x86/quantize_ssse3_x86_64.asm
endif
endif
endif  # CONFIG_VP9_ENCODER

Johann's avatar
Johann committed
99
100
ifeq ($(CONFIG_ENCODERS),yes)
DSP_SRCS-yes            += sad.c
101
DSP_SRCS-yes            += subtract.c
Johann's avatar
Johann committed
102
103
104
105

DSP_SRCS-$(HAVE_MEDIA)  += arm/sad_media$(ASM)
DSP_SRCS-$(HAVE_NEON)   += arm/sad4d_neon.c
DSP_SRCS-$(HAVE_NEON)   += arm/sad_neon.c
106
DSP_SRCS-$(HAVE_NEON)   += arm/subtract_neon.c
Johann's avatar
Johann committed
107

Johann's avatar
Johann committed
108
DSP_SRCS-$(HAVE_MSA)    += mips/sad_msa.c
109
DSP_SRCS-$(HAVE_MSA)    += mips/subtract_msa.c
Johann's avatar
Johann committed
110

Johann's avatar
Johann committed
111
112
113
114
115
116
117
DSP_SRCS-$(HAVE_MMX)    += x86/sad_mmx.asm
DSP_SRCS-$(HAVE_SSE3)   += x86/sad_sse3.asm
DSP_SRCS-$(HAVE_SSSE3)  += x86/sad_ssse3.asm
DSP_SRCS-$(HAVE_SSE4_1) += x86/sad_sse4.asm
DSP_SRCS-$(HAVE_AVX2)   += x86/sad4d_avx2.c
DSP_SRCS-$(HAVE_AVX2)   += x86/sad_avx2.c

Johann's avatar
Johann committed
118
119
120
ifeq ($(CONFIG_USE_X86INC),yes)
DSP_SRCS-$(HAVE_SSE2)   += x86/sad4d_sse2.asm
DSP_SRCS-$(HAVE_SSE2)   += x86/sad_sse2.asm
121
DSP_SRCS-$(HAVE_SSE2)   += x86/subtract_sse2.asm
122

Johann's avatar
Johann committed
123
124
125
126
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad4d_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad_sse2.asm
endif  # CONFIG_VP9_HIGHBITDEPTH
Johann's avatar
Johann committed
127
128
endif  # CONFIG_USE_X86INC

Johann's avatar
Johann committed
129
130
endif  # CONFIG_ENCODERS

Johann's avatar
Johann committed
131
132
ifneq ($(filter yes,$(CONFIG_ENCODERS) $(CONFIG_POSTPROC) $(CONFIG_VP9_POSTPROC)),)
DSP_SRCS-yes            += variance.c
Johann's avatar
Johann committed
133
DSP_SRCS-yes            += variance.h
Johann's avatar
Johann committed
134

Johann's avatar
Johann committed
135
136
137
138
139
DSP_SRCS-$(HAVE_MEDIA)  += arm/bilinear_filter_media$(ASM)
DSP_SRCS-$(HAVE_MEDIA)  += arm/subpel_variance_media.c
DSP_SRCS-$(HAVE_MEDIA)  += arm/variance_halfpixvar16x16_h_media$(ASM)
DSP_SRCS-$(HAVE_MEDIA)  += arm/variance_halfpixvar16x16_hv_media$(ASM)
DSP_SRCS-$(HAVE_MEDIA)  += arm/variance_halfpixvar16x16_v_media$(ASM)
Johann's avatar
Johann committed
140
DSP_SRCS-$(HAVE_MEDIA)  += arm/variance_media$(ASM)
Johann's avatar
Johann committed
141
DSP_SRCS-$(HAVE_NEON)   += arm/subpel_variance_neon.c
Johann's avatar
Johann committed
142
143
DSP_SRCS-$(HAVE_NEON)   += arm/variance_neon.c

Johann's avatar
Johann committed
144
DSP_SRCS-$(HAVE_MSA)    += mips/variance_msa.c
Johann's avatar
Johann committed
145
DSP_SRCS-$(HAVE_MSA)    += mips/sub_pixel_variance_msa.c
Johann's avatar
Johann committed
146

Johann's avatar
Johann committed
147
148
DSP_SRCS-$(HAVE_MMX)    += x86/variance_mmx.c
DSP_SRCS-$(HAVE_MMX)    += x86/variance_impl_mmx.asm
Johann's avatar
Johann committed
149
DSP_SRCS-$(HAVE_SSE2)   += x86/variance_sse2.c  # Contains SSE2 and SSSE3
Johann's avatar
Johann committed
150
151
152
DSP_SRCS-$(HAVE_AVX2)   += x86/variance_avx2.c
DSP_SRCS-$(HAVE_AVX2)   += x86/variance_impl_avx2.c

Johann's avatar
Johann committed
153
154
155
156
ifeq ($(CONFIG_USE_X86INC),yes)
DSP_SRCS-$(HAVE_SSE2)   += x86/subpel_variance_sse2.asm  # Contains SSE2 and SSSE3
endif  # CONFIG_USE_X86INC

Johann's avatar
Johann committed
157
158
159
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2)   += x86/highbd_variance_sse2.c
DSP_SRCS-$(HAVE_SSE2)   += x86/highbd_variance_impl_sse2.asm
Johann's avatar
Johann committed
160
161
162
ifeq ($(CONFIG_USE_X86INC),yes)
DSP_SRCS-$(HAVE_SSE2)   += x86/highbd_subpel_variance_impl_sse2.asm
endif  # CONFIG_USE_X86INC
Johann's avatar
Johann committed
163
164
165
endif  # CONFIG_VP9_HIGHBITDEPTH
endif  # CONFIG_ENCODERS || CONFIG_POSTPROC || CONFIG_VP9_POSTPROC

Johann's avatar
Johann committed
166
167
168
169
170
171
DSP_SRCS-no += $(DSP_SRCS_REMOVE-yes)

DSP_SRCS-yes += vpx_dsp_rtcd.c
DSP_SRCS-yes += vpx_dsp_rtcd_defs.pl

$(eval $(call rtcd_h_template,vpx_dsp_rtcd,vpx_dsp/vpx_dsp_rtcd_defs.pl))