Merge "SSE2 code for the filter in MFQE."
[platform/upstream/libvpx.git] / vp9 / common / vp9_rtcd_defs.pl
1 sub vp9_common_forward_decls() {
2 print <<EOF
3 /*
4  * VP9
5  */
6
7 #include "vpx/vpx_integer.h"
8 #include "vp9/common/vp9_common.h"
9 #include "vp9/common/vp9_enums.h"
10
11 struct macroblockd;
12
13 /* Encoder forward decls */
14 struct macroblock;
15 struct vp9_variance_vtable;
16 struct search_site_config;
17 struct mv;
18 union int_mv;
19 struct yv12_buffer_config;
20 EOF
21 }
22 forward_decls qw/vp9_common_forward_decls/;
23
24 # x86inc.asm doesn't work if pic is enabled on 32 bit platforms so no assembly.
25 if (vpx_config("CONFIG_USE_X86INC") eq "yes") {
26   $mmx_x86inc = 'mmx';
27   $sse_x86inc = 'sse';
28   $sse2_x86inc = 'sse2';
29   $ssse3_x86inc = 'ssse3';
30   $avx_x86inc = 'avx';
31   $avx2_x86inc = 'avx2';
32 } else {
33   $mmx_x86inc = $sse_x86inc = $sse2_x86inc = $ssse3_x86inc =
34   $avx_x86inc = $avx2_x86inc = '';
35 }
36
37 # this variable is for functions that are 64 bit only.
38 if ($opts{arch} eq "x86_64") {
39   $mmx_x86_64 = 'mmx';
40   $sse2_x86_64 = 'sse2';
41   $ssse3_x86_64 = 'ssse3';
42   $avx_x86_64 = 'avx';
43   $avx2_x86_64 = 'avx2';
44 } else {
45   $mmx_x86_64 = $sse2_x86_64 = $ssse3_x86_64 =
46   $avx_x86_64 = $avx2_x86_64 = '';
47 }
48
49 # optimizations which depend on multiple features
50 if ((vpx_config("HAVE_AVX2") eq "yes") && (vpx_config("HAVE_SSSE3") eq "yes")) {
51   $avx2_ssse3 = 'avx2';
52 } else {
53   $avx2_ssse3 = '';
54 }
55
56 #
57 # RECON
58 #
59 add_proto qw/void vp9_d207_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
60 specialize qw/vp9_d207_predictor_4x4/, "$ssse3_x86inc";
61
62 add_proto qw/void vp9_d45_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
63 specialize qw/vp9_d45_predictor_4x4/, "$ssse3_x86inc";
64
65 add_proto qw/void vp9_d63_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
66 specialize qw/vp9_d63_predictor_4x4/, "$ssse3_x86inc";
67
68 add_proto qw/void vp9_h_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
69 specialize qw/vp9_h_predictor_4x4 neon dspr2/, "$ssse3_x86inc";
70
71 add_proto qw/void vp9_d117_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
72 specialize qw/vp9_d117_predictor_4x4/;
73
74 add_proto qw/void vp9_d135_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
75 specialize qw/vp9_d135_predictor_4x4/;
76
77 add_proto qw/void vp9_d153_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
78 specialize qw/vp9_d153_predictor_4x4/, "$ssse3_x86inc";
79
80 add_proto qw/void vp9_v_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
81 specialize qw/vp9_v_predictor_4x4 neon/, "$sse_x86inc";
82
83 add_proto qw/void vp9_tm_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
84 specialize qw/vp9_tm_predictor_4x4 neon dspr2/, "$sse_x86inc";
85
86 add_proto qw/void vp9_dc_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
87 specialize qw/vp9_dc_predictor_4x4 dspr2/, "$sse_x86inc";
88
89 add_proto qw/void vp9_dc_top_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
90 specialize qw/vp9_dc_top_predictor_4x4/;
91
92 add_proto qw/void vp9_dc_left_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
93 specialize qw/vp9_dc_left_predictor_4x4/;
94
95 add_proto qw/void vp9_dc_128_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
96 specialize qw/vp9_dc_128_predictor_4x4/;
97
98 add_proto qw/void vp9_d207_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
99 specialize qw/vp9_d207_predictor_8x8/, "$ssse3_x86inc";
100
101 add_proto qw/void vp9_d45_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
102 specialize qw/vp9_d45_predictor_8x8/, "$ssse3_x86inc";
103
104 add_proto qw/void vp9_d63_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
105 specialize qw/vp9_d63_predictor_8x8/, "$ssse3_x86inc";
106
107 add_proto qw/void vp9_h_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
108 specialize qw/vp9_h_predictor_8x8 neon dspr2/, "$ssse3_x86inc";
109
110 add_proto qw/void vp9_d117_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
111 specialize qw/vp9_d117_predictor_8x8/;
112
113 add_proto qw/void vp9_d135_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
114 specialize qw/vp9_d135_predictor_8x8/;
115
116 add_proto qw/void vp9_d153_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
117 specialize qw/vp9_d153_predictor_8x8/, "$ssse3_x86inc";
118
119 add_proto qw/void vp9_v_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
120 specialize qw/vp9_v_predictor_8x8 neon/, "$sse_x86inc";
121
122 add_proto qw/void vp9_tm_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
123 specialize qw/vp9_tm_predictor_8x8 neon dspr2/, "$sse2_x86inc";
124
125 add_proto qw/void vp9_dc_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
126 specialize qw/vp9_dc_predictor_8x8 dspr2/, "$sse_x86inc";
127
128 add_proto qw/void vp9_dc_top_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
129 specialize qw/vp9_dc_top_predictor_8x8/;
130
131 add_proto qw/void vp9_dc_left_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
132 specialize qw/vp9_dc_left_predictor_8x8/;
133
134 add_proto qw/void vp9_dc_128_predictor_8x8/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
135 specialize qw/vp9_dc_128_predictor_8x8/;
136
137 add_proto qw/void vp9_d207_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
138 specialize qw/vp9_d207_predictor_16x16/, "$ssse3_x86inc";
139
140 add_proto qw/void vp9_d45_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
141 specialize qw/vp9_d45_predictor_16x16/, "$ssse3_x86inc";
142
143 add_proto qw/void vp9_d63_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
144 specialize qw/vp9_d63_predictor_16x16/, "$ssse3_x86inc";
145
146 add_proto qw/void vp9_h_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
147 specialize qw/vp9_h_predictor_16x16 neon dspr2/, "$ssse3_x86inc";
148
149 add_proto qw/void vp9_d117_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
150 specialize qw/vp9_d117_predictor_16x16/;
151
152 add_proto qw/void vp9_d135_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
153 specialize qw/vp9_d135_predictor_16x16/;
154
155 add_proto qw/void vp9_d153_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
156 specialize qw/vp9_d153_predictor_16x16/, "$ssse3_x86inc";
157
158 add_proto qw/void vp9_v_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
159 specialize qw/vp9_v_predictor_16x16 neon/, "$sse2_x86inc";
160
161 add_proto qw/void vp9_tm_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
162 specialize qw/vp9_tm_predictor_16x16 neon/, "$sse2_x86inc";
163
164 add_proto qw/void vp9_dc_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
165 specialize qw/vp9_dc_predictor_16x16 dspr2/, "$sse2_x86inc";
166
167 add_proto qw/void vp9_dc_top_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
168 specialize qw/vp9_dc_top_predictor_16x16/;
169
170 add_proto qw/void vp9_dc_left_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
171 specialize qw/vp9_dc_left_predictor_16x16/;
172
173 add_proto qw/void vp9_dc_128_predictor_16x16/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
174 specialize qw/vp9_dc_128_predictor_16x16/;
175
176 add_proto qw/void vp9_d207_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
177 specialize qw/vp9_d207_predictor_32x32/, "$ssse3_x86inc";
178
179 add_proto qw/void vp9_d45_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
180 specialize qw/vp9_d45_predictor_32x32/, "$ssse3_x86inc";
181
182 add_proto qw/void vp9_d63_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
183 specialize qw/vp9_d63_predictor_32x32/, "$ssse3_x86inc";
184
185 add_proto qw/void vp9_h_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
186 specialize qw/vp9_h_predictor_32x32 neon/, "$ssse3_x86inc";
187
188 add_proto qw/void vp9_d117_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
189 specialize qw/vp9_d117_predictor_32x32/;
190
191 add_proto qw/void vp9_d135_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
192 specialize qw/vp9_d135_predictor_32x32/;
193
194 add_proto qw/void vp9_d153_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
195 specialize qw/vp9_d153_predictor_32x32/;
196
197 add_proto qw/void vp9_v_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
198 specialize qw/vp9_v_predictor_32x32 neon/, "$sse2_x86inc";
199
200 add_proto qw/void vp9_tm_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
201 specialize qw/vp9_tm_predictor_32x32 neon/, "$sse2_x86_64";
202
203 add_proto qw/void vp9_dc_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
204 specialize qw/vp9_dc_predictor_32x32/, "$sse2_x86inc";
205
206 add_proto qw/void vp9_dc_top_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
207 specialize qw/vp9_dc_top_predictor_32x32/;
208
209 add_proto qw/void vp9_dc_left_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
210 specialize qw/vp9_dc_left_predictor_32x32/;
211
212 add_proto qw/void vp9_dc_128_predictor_32x32/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
213 specialize qw/vp9_dc_128_predictor_32x32/;
214
215 #
216 # Loopfilter
217 #
218 add_proto qw/void vp9_lpf_vertical_16/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh";
219 specialize qw/vp9_lpf_vertical_16 sse2 neon_asm dspr2/;
220 $vp9_lpf_vertical_16_neon_asm=vp9_lpf_vertical_16_neon;
221
222 add_proto qw/void vp9_lpf_vertical_16_dual/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh";
223 specialize qw/vp9_lpf_vertical_16_dual sse2 neon_asm dspr2/;
224 $vp9_lpf_vertical_16_dual_neon_asm=vp9_lpf_vertical_16_dual_neon;
225
226 add_proto qw/void vp9_lpf_vertical_8/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count";
227 specialize qw/vp9_lpf_vertical_8 sse2 neon_asm dspr2/;
228 $vp9_lpf_vertical_8_neon_asm=vp9_lpf_vertical_8_neon;
229
230 add_proto qw/void vp9_lpf_vertical_8_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1";
231 specialize qw/vp9_lpf_vertical_8_dual sse2 neon_asm dspr2/;
232 $vp9_lpf_vertical_8_dual_neon_asm=vp9_lpf_vertical_8_dual_neon;
233
234 add_proto qw/void vp9_lpf_vertical_4/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count";
235 specialize qw/vp9_lpf_vertical_4 mmx neon dspr2/;
236
237 add_proto qw/void vp9_lpf_vertical_4_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1";
238 specialize qw/vp9_lpf_vertical_4_dual sse2 neon dspr2/;
239
240 add_proto qw/void vp9_lpf_horizontal_16/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count";
241 specialize qw/vp9_lpf_horizontal_16 sse2 avx2 neon_asm dspr2/;
242 $vp9_lpf_horizontal_16_neon_asm=vp9_lpf_horizontal_16_neon;
243
244 add_proto qw/void vp9_lpf_horizontal_8/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count";
245 specialize qw/vp9_lpf_horizontal_8 sse2 neon_asm dspr2/;
246 $vp9_lpf_horizontal_8_neon_asm=vp9_lpf_horizontal_8_neon;
247
248 add_proto qw/void vp9_lpf_horizontal_8_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1";
249 specialize qw/vp9_lpf_horizontal_8_dual sse2 neon_asm dspr2/;
250 $vp9_lpf_horizontal_8_dual_neon_asm=vp9_lpf_horizontal_8_dual_neon;
251
252 add_proto qw/void vp9_lpf_horizontal_4/, "uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count";
253 specialize qw/vp9_lpf_horizontal_4 mmx neon dspr2/;
254
255 add_proto qw/void vp9_lpf_horizontal_4_dual/, "uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1";
256 specialize qw/vp9_lpf_horizontal_4_dual sse2 neon dspr2/;
257
258 #
259 # post proc
260 #
261 if (vpx_config("CONFIG_VP9_POSTPROC") eq "yes") {
262 add_proto qw/void vp9_mbpost_proc_down/, "uint8_t *dst, int pitch, int rows, int cols, int flimit";
263 specialize qw/vp9_mbpost_proc_down sse2/;
264 $vp9_mbpost_proc_down_sse2=vp9_mbpost_proc_down_xmm;
265
266 add_proto qw/void vp9_mbpost_proc_across_ip/, "uint8_t *src, int pitch, int rows, int cols, int flimit";
267 specialize qw/vp9_mbpost_proc_across_ip sse2/;
268 $vp9_mbpost_proc_across_ip_sse2=vp9_mbpost_proc_across_ip_xmm;
269
270 add_proto qw/void vp9_post_proc_down_and_across/, "const uint8_t *src_ptr, uint8_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit";
271 specialize qw/vp9_post_proc_down_and_across sse2/;
272 $vp9_post_proc_down_and_across_sse2=vp9_post_proc_down_and_across_xmm;
273
274 add_proto qw/void vp9_plane_add_noise/, "uint8_t *Start, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int Width, unsigned int Height, int Pitch";
275 specialize qw/vp9_plane_add_noise sse2/;
276 $vp9_plane_add_noise_sse2=vp9_plane_add_noise_wmt;
277
278 add_proto qw/void vp9_filter_by_weight16x16/, "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight";
279 specialize qw/vp9_filter_by_weight16x16 sse2/;
280
281 add_proto qw/void vp9_filter_by_weight8x8/, "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight";
282 specialize qw/vp9_filter_by_weight8x8 sse2/;
283 }
284
285 #
286 # Sub Pixel Filters
287 #
288 add_proto qw/void vp9_convolve_copy/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
289 specialize qw/vp9_convolve_copy neon dspr2/, "$sse2_x86inc";
290
291 add_proto qw/void vp9_convolve_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
292 specialize qw/vp9_convolve_avg neon dspr2/, "$sse2_x86inc";
293
294 add_proto qw/void vp9_convolve8/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
295 specialize qw/vp9_convolve8 sse2 ssse3 neon dspr2/, "$avx2_ssse3";
296
297 add_proto qw/void vp9_convolve8_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
298 specialize qw/vp9_convolve8_horiz sse2 ssse3 neon dspr2/, "$avx2_ssse3";
299
300 add_proto qw/void vp9_convolve8_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
301 specialize qw/vp9_convolve8_vert sse2 ssse3 neon dspr2/, "$avx2_ssse3";
302
303 add_proto qw/void vp9_convolve8_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
304 specialize qw/vp9_convolve8_avg sse2 ssse3 neon dspr2/;
305
306 add_proto qw/void vp9_convolve8_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
307 specialize qw/vp9_convolve8_avg_horiz sse2 ssse3 neon dspr2/;
308
309 add_proto qw/void vp9_convolve8_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h";
310 specialize qw/vp9_convolve8_avg_vert sse2 ssse3 neon dspr2/;
311
312 #
313 # dct
314 #
315 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
316   # Note as optimized versions of these functions are added we need to add a check to ensure
317   # that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only.
318   add_proto qw/void vp9_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
319   specialize qw/vp9_idct4x4_1_add/;
320
321   add_proto qw/void vp9_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
322   specialize qw/vp9_idct4x4_16_add/;
323
324   add_proto qw/void vp9_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
325   specialize qw/vp9_idct8x8_1_add/;
326
327   add_proto qw/void vp9_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
328   specialize qw/vp9_idct8x8_64_add/;
329
330   add_proto qw/void vp9_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
331   specialize qw/vp9_idct8x8_12_add/;
332
333   add_proto qw/void vp9_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
334   specialize qw/vp9_idct16x16_1_add/;
335
336   add_proto qw/void vp9_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
337   specialize qw/vp9_idct16x16_256_add/;
338
339   add_proto qw/void vp9_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
340   specialize qw/vp9_idct16x16_10_add/;
341
342   add_proto qw/void vp9_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
343   specialize qw/vp9_idct32x32_1024_add/;
344
345   add_proto qw/void vp9_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
346   specialize qw/vp9_idct32x32_34_add/;
347
348   add_proto qw/void vp9_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
349   specialize qw/vp9_idct32x32_1_add/;
350
351   add_proto qw/void vp9_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
352   specialize qw/vp9_iht4x4_16_add/;
353
354   add_proto qw/void vp9_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
355   specialize qw/vp9_iht8x8_64_add/;
356
357   add_proto qw/void vp9_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type";
358   specialize qw/vp9_iht16x16_256_add/;
359
360   # dct and add
361
362   add_proto qw/void vp9_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
363   specialize qw/vp9_iwht4x4_1_add/;
364
365   add_proto qw/void vp9_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
366   specialize qw/vp9_iwht4x4_16_add/;
367
368 } else {
369   # Force C versions if CONFIG_EMULATE_HARDWARE is 1
370   if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") {
371     add_proto qw/void vp9_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
372     specialize qw/vp9_idct4x4_1_add/;
373
374     add_proto qw/void vp9_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
375     specialize qw/vp9_idct4x4_16_add/;
376
377     add_proto qw/void vp9_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
378     specialize qw/vp9_idct8x8_1_add/;
379
380     add_proto qw/void vp9_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
381     specialize qw/vp9_idct8x8_64_add/;
382
383     add_proto qw/void vp9_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
384     specialize qw/vp9_idct8x8_12_add/;
385
386     add_proto qw/void vp9_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
387     specialize qw/vp9_idct16x16_1_add/;
388
389     add_proto qw/void vp9_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
390     specialize qw/vp9_idct16x16_256_add/;
391
392     add_proto qw/void vp9_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
393     specialize qw/vp9_idct16x16_10_add/;
394
395     add_proto qw/void vp9_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
396     specialize qw/vp9_idct32x32_1024_add/;
397
398     add_proto qw/void vp9_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
399     specialize qw/vp9_idct32x32_34_add/;
400
401     add_proto qw/void vp9_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
402     specialize qw/vp9_idct32x32_1_add/;
403
404     add_proto qw/void vp9_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
405     specialize qw/vp9_iht4x4_16_add/;
406
407     add_proto qw/void vp9_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
408     specialize qw/vp9_iht8x8_64_add/;
409
410     add_proto qw/void vp9_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type";
411     specialize qw/vp9_iht16x16_256_add/;
412
413     # dct and add
414
415     add_proto qw/void vp9_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
416     specialize qw/vp9_iwht4x4_1_add/;
417
418     add_proto qw/void vp9_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
419     specialize qw/vp9_iwht4x4_16_add/;
420   } else {
421     add_proto qw/void vp9_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
422     specialize qw/vp9_idct4x4_1_add sse2 neon dspr2/;
423
424     add_proto qw/void vp9_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
425     specialize qw/vp9_idct4x4_16_add sse2 neon dspr2/;
426
427     add_proto qw/void vp9_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
428     specialize qw/vp9_idct8x8_1_add sse2 neon dspr2/;
429
430     add_proto qw/void vp9_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
431     specialize qw/vp9_idct8x8_64_add sse2 neon dspr2/, "$ssse3_x86_64";
432
433     add_proto qw/void vp9_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
434     specialize qw/vp9_idct8x8_12_add sse2 neon dspr2/, "$ssse3_x86_64";
435
436     add_proto qw/void vp9_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
437     specialize qw/vp9_idct16x16_1_add sse2 neon dspr2/;
438
439     add_proto qw/void vp9_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
440     specialize qw/vp9_idct16x16_256_add sse2 ssse3 neon dspr2/;
441
442     add_proto qw/void vp9_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
443     specialize qw/vp9_idct16x16_10_add sse2 ssse3 neon dspr2/;
444
445     add_proto qw/void vp9_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
446     specialize qw/vp9_idct32x32_1024_add sse2 neon dspr2/;
447
448     add_proto qw/void vp9_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
449     specialize qw/vp9_idct32x32_34_add sse2 neon_asm dspr2/;
450     #is this a typo?
451     $vp9_idct32x32_34_add_neon_asm=vp9_idct32x32_1024_add_neon;
452
453     add_proto qw/void vp9_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
454     specialize qw/vp9_idct32x32_1_add sse2 neon dspr2/;
455
456     add_proto qw/void vp9_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
457     specialize qw/vp9_iht4x4_16_add sse2 neon dspr2/;
458
459     add_proto qw/void vp9_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
460     specialize qw/vp9_iht8x8_64_add sse2 neon dspr2/;
461
462     add_proto qw/void vp9_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type";
463     specialize qw/vp9_iht16x16_256_add sse2 dspr2/;
464
465     # dct and add
466
467     add_proto qw/void vp9_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
468     specialize qw/vp9_iwht4x4_1_add/;
469
470     add_proto qw/void vp9_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
471     specialize qw/vp9_iwht4x4_16_add/;
472   }
473 }
474
475 # High bitdepth functions
476 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
477   #
478   # Intra prediction
479   #
480   add_proto qw/void vp9_highbd_d207_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
481   specialize qw/vp9_highbd_d207_predictor_4x4/;
482
483   add_proto qw/void vp9_highbd_d45_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
484   specialize qw/vp9_highbd_d45_predictor_4x4/;
485
486   add_proto qw/void vp9_highbd_d63_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
487   specialize qw/vp9_highbd_d63_predictor_4x4/;
488
489   add_proto qw/void vp9_highbd_h_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
490   specialize qw/vp9_highbd_h_predictor_4x4/;
491
492   add_proto qw/void vp9_highbd_d117_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
493   specialize qw/vp9_highbd_d117_predictor_4x4/;
494
495   add_proto qw/void vp9_highbd_d135_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
496   specialize qw/vp9_highbd_d135_predictor_4x4/;
497
498   add_proto qw/void vp9_highbd_d153_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
499   specialize qw/vp9_highbd_d153_predictor_4x4/;
500
501   add_proto qw/void vp9_highbd_v_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
502   specialize qw/vp9_highbd_v_predictor_4x4 neon/, "$sse_x86inc";
503
504   add_proto qw/void vp9_highbd_tm_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
505   specialize qw/vp9_highbd_tm_predictor_4x4/, "$sse_x86inc";
506
507   add_proto qw/void vp9_highbd_dc_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
508   specialize qw/vp9_highbd_dc_predictor_4x4/, "$sse_x86inc";
509
510   add_proto qw/void vp9_highbd_dc_top_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
511   specialize qw/vp9_highbd_dc_top_predictor_4x4/;
512
513   add_proto qw/void vp9_highbd_dc_left_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
514   specialize qw/vp9_highbd_dc_left_predictor_4x4/;
515
516   add_proto qw/void vp9_highbd_dc_128_predictor_4x4/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
517   specialize qw/vp9_highbd_dc_128_predictor_4x4/;
518
519   add_proto qw/void vp9_highbd_d207_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
520   specialize qw/vp9_highbd_d207_predictor_8x8/;
521
522   add_proto qw/void vp9_highbd_d45_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
523   specialize qw/vp9_highbd_d45_predictor_8x8/;
524
525   add_proto qw/void vp9_highbd_d63_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
526   specialize qw/vp9_highbd_d63_predictor_8x8/;
527
528   add_proto qw/void vp9_highbd_h_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
529   specialize qw/vp9_highbd_h_predictor_8x8/;
530
531   add_proto qw/void vp9_highbd_d117_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
532   specialize qw/vp9_highbd_d117_predictor_8x8/;
533
534   add_proto qw/void vp9_highbd_d135_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
535   specialize qw/vp9_highbd_d135_predictor_8x8/;
536
537   add_proto qw/void vp9_highbd_d153_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
538   specialize qw/vp9_highbd_d153_predictor_8x8/;
539
540   add_proto qw/void vp9_highbd_v_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
541   specialize qw/vp9_highbd_v_predictor_8x8/, "$sse2_x86inc";
542
543   add_proto qw/void vp9_highbd_tm_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
544   specialize qw/vp9_highbd_tm_predictor_8x8/, "$sse2_x86inc";
545
546   add_proto qw/void vp9_highbd_dc_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
547   specialize qw/vp9_highbd_dc_predictor_8x8/, "$sse2_x86inc";;
548
549   add_proto qw/void vp9_highbd_dc_top_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
550   specialize qw/vp9_highbd_dc_top_predictor_8x8/;
551
552   add_proto qw/void vp9_highbd_dc_left_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
553   specialize qw/vp9_highbd_dc_left_predictor_8x8/;
554
555   add_proto qw/void vp9_highbd_dc_128_predictor_8x8/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
556   specialize qw/vp9_highbd_dc_128_predictor_8x8/;
557
558   add_proto qw/void vp9_highbd_d207_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
559   specialize qw/vp9_highbd_d207_predictor_16x16/;
560
561   add_proto qw/void vp9_highbd_d45_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
562   specialize qw/vp9_highbd_d45_predictor_16x16/;
563
564   add_proto qw/void vp9_highbd_d63_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
565   specialize qw/vp9_highbd_d63_predictor_16x16/;
566
567   add_proto qw/void vp9_highbd_h_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
568   specialize qw/vp9_highbd_h_predictor_16x16/;
569
570   add_proto qw/void vp9_highbd_d117_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
571   specialize qw/vp9_highbd_d117_predictor_16x16/;
572
573   add_proto qw/void vp9_highbd_d135_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
574   specialize qw/vp9_highbd_d135_predictor_16x16/;
575
576   add_proto qw/void vp9_highbd_d153_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
577   specialize qw/vp9_highbd_d153_predictor_16x16/;
578
579   add_proto qw/void vp9_highbd_v_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
580   specialize qw/vp9_highbd_v_predictor_16x16 neon/, "$sse2_x86inc";
581
582   add_proto qw/void vp9_highbd_tm_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
583   specialize qw/vp9_highbd_tm_predictor_16x16/, "$sse2_x86_64";
584
585   add_proto qw/void vp9_highbd_dc_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
586   specialize qw/vp9_highbd_dc_predictor_16x16/, "$sse2_x86inc";
587
588   add_proto qw/void vp9_highbd_dc_top_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
589   specialize qw/vp9_highbd_dc_top_predictor_16x16/;
590
591   add_proto qw/void vp9_highbd_dc_left_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
592   specialize qw/vp9_highbd_dc_left_predictor_16x16/;
593
594   add_proto qw/void vp9_highbd_dc_128_predictor_16x16/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
595   specialize qw/vp9_highbd_dc_128_predictor_16x16/;
596
597   add_proto qw/void vp9_highbd_d207_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
598   specialize qw/vp9_highbd_d207_predictor_32x32/;
599
600   add_proto qw/void vp9_highbd_d45_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
601   specialize qw/vp9_highbd_d45_predictor_32x32/;
602
603   add_proto qw/void vp9_highbd_d63_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
604   specialize qw/vp9_highbd_d63_predictor_32x32/;
605
606   add_proto qw/void vp9_highbd_h_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
607   specialize qw/vp9_highbd_h_predictor_32x32/;
608
609   add_proto qw/void vp9_highbd_d117_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
610   specialize qw/vp9_highbd_d117_predictor_32x32/;
611
612   add_proto qw/void vp9_highbd_d135_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
613   specialize qw/vp9_highbd_d135_predictor_32x32/;
614
615   add_proto qw/void vp9_highbd_d153_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
616   specialize qw/vp9_highbd_d153_predictor_32x32/;
617
618   add_proto qw/void vp9_highbd_v_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
619   specialize qw/vp9_highbd_v_predictor_32x32/, "$sse2_x86inc";
620
621   add_proto qw/void vp9_highbd_tm_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
622   specialize qw/vp9_highbd_tm_predictor_32x32/, "$sse2_x86_64";
623
624   add_proto qw/void vp9_highbd_dc_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
625   specialize qw/vp9_highbd_dc_predictor_32x32/, "$sse2_x86_64";
626
627   add_proto qw/void vp9_highbd_dc_top_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
628   specialize qw/vp9_highbd_dc_top_predictor_32x32/;
629
630   add_proto qw/void vp9_highbd_dc_left_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
631   specialize qw/vp9_highbd_dc_left_predictor_32x32/;
632
633   add_proto qw/void vp9_highbd_dc_128_predictor_32x32/, "uint16_t *dst, ptrdiff_t y_stride, const uint16_t *above, const uint16_t *left, int bd";
634   specialize qw/vp9_highbd_dc_128_predictor_32x32/;
635
636   #
637   # Sub Pixel Filters
638   #
639   add_proto qw/void vp9_highbd_convolve_copy/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps";
640   specialize qw/vp9_highbd_convolve_copy/;
641
642   add_proto qw/void vp9_highbd_convolve_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps";
643   specialize qw/vp9_highbd_convolve_avg/;
644
645   add_proto qw/void vp9_highbd_convolve8/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps";
646   specialize qw/vp9_highbd_convolve8/, "$sse2_x86_64";
647
648   add_proto qw/void vp9_highbd_convolve8_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps";
649   specialize qw/vp9_highbd_convolve8_horiz/, "$sse2_x86_64";
650
651   add_proto qw/void vp9_highbd_convolve8_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps";
652   specialize qw/vp9_highbd_convolve8_vert/, "$sse2_x86_64";
653
654   add_proto qw/void vp9_highbd_convolve8_avg/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps";
655   specialize qw/vp9_highbd_convolve8_avg/, "$sse2_x86_64";
656
657   add_proto qw/void vp9_highbd_convolve8_avg_horiz/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps";
658   specialize qw/vp9_highbd_convolve8_avg_horiz/, "$sse2_x86_64";
659
660   add_proto qw/void vp9_highbd_convolve8_avg_vert/, "const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h, int bps";
661   specialize qw/vp9_highbd_convolve8_avg_vert/, "$sse2_x86_64";
662
663   #
664   # Loopfilter
665   #
666   add_proto qw/void vp9_highbd_lpf_vertical_16/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd";
667   specialize qw/vp9_highbd_lpf_vertical_16 sse2/;
668
669   add_proto qw/void vp9_highbd_lpf_vertical_16_dual/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int bd";
670   specialize qw/vp9_highbd_lpf_vertical_16_dual sse2/;
671
672   add_proto qw/void vp9_highbd_lpf_vertical_8/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd";
673   specialize qw/vp9_highbd_lpf_vertical_8 sse2/;
674
675   add_proto qw/void vp9_highbd_lpf_vertical_8_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd";
676   specialize qw/vp9_highbd_lpf_vertical_8_dual sse2/;
677
678   add_proto qw/void vp9_highbd_lpf_vertical_4/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd";
679   specialize qw/vp9_highbd_lpf_vertical_4 sse2/;
680
681   add_proto qw/void vp9_highbd_lpf_vertical_4_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd";
682   specialize qw/vp9_highbd_lpf_vertical_4_dual sse2/;
683
684   add_proto qw/void vp9_highbd_lpf_horizontal_16/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd";
685   specialize qw/vp9_highbd_lpf_horizontal_16 sse2/;
686
687   add_proto qw/void vp9_highbd_lpf_horizontal_8/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd";
688   specialize qw/vp9_highbd_lpf_horizontal_8 sse2/;
689
690   add_proto qw/void vp9_highbd_lpf_horizontal_8_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd";
691   specialize qw/vp9_highbd_lpf_horizontal_8_dual sse2/;
692
693   add_proto qw/void vp9_highbd_lpf_horizontal_4/, "uint16_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count, int bd";
694   specialize qw/vp9_highbd_lpf_horizontal_4 sse2/;
695
696   add_proto qw/void vp9_highbd_lpf_horizontal_4_dual/, "uint16_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1, int bd";
697   specialize qw/vp9_highbd_lpf_horizontal_4_dual sse2/;
698
699   #
700   # post proc
701   #
702   if (vpx_config("CONFIG_VP9_POSTPROC") eq "yes") {
703     add_proto qw/void vp9_highbd_mbpost_proc_down/, "uint16_t *dst, int pitch, int rows, int cols, int flimit";
704     specialize qw/vp9_highbd_mbpost_proc_down/;
705
706     add_proto qw/void vp9_highbd_mbpost_proc_across_ip/, "uint16_t *src, int pitch, int rows, int cols, int flimit";
707     specialize qw/vp9_highbd_mbpost_proc_across_ip/;
708
709     add_proto qw/void vp9_highbd_post_proc_down_and_across/, "const uint16_t *src_ptr, uint16_t *dst_ptr, int src_pixels_per_line, int dst_pixels_per_line, int rows, int cols, int flimit";
710     specialize qw/vp9_highbd_post_proc_down_and_across/;
711
712     add_proto qw/void vp9_highbd_plane_add_noise/, "uint8_t *Start, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int Width, unsigned int Height, int Pitch";
713     specialize qw/vp9_highbd_plane_add_noise/;
714   }
715
716   #
717   # dct
718   #
719   # Note as optimized versions of these functions are added we need to add a check to ensure
720   # that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only.
721   add_proto qw/void vp9_highbd_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
722   specialize qw/vp9_highbd_idct4x4_1_add/;
723
724   add_proto qw/void vp9_highbd_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
725   specialize qw/vp9_highbd_idct8x8_1_add/;
726
727   add_proto qw/void vp9_highbd_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
728   specialize qw/vp9_highbd_idct16x16_1_add/;
729
730   add_proto qw/void vp9_highbd_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
731   specialize qw/vp9_highbd_idct32x32_1024_add/;
732
733   add_proto qw/void vp9_highbd_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
734   specialize qw/vp9_highbd_idct32x32_34_add/;
735
736   add_proto qw/void vp9_highbd_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
737   specialize qw/vp9_highbd_idct32x32_1_add/;
738
739   add_proto qw/void vp9_highbd_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type, int bd";
740   specialize qw/vp9_highbd_iht4x4_16_add/;
741
742   add_proto qw/void vp9_highbd_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type, int bd";
743   specialize qw/vp9_highbd_iht8x8_64_add/;
744
745   add_proto qw/void vp9_highbd_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd";
746   specialize qw/vp9_highbd_iht16x16_256_add/;
747
748   # dct and add
749
750   add_proto qw/void vp9_highbd_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
751   specialize qw/vp9_highbd_iwht4x4_1_add/;
752
753   add_proto qw/void vp9_highbd_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
754   specialize qw/vp9_highbd_iwht4x4_16_add/;
755
756   # Force C versions if CONFIG_EMULATE_HARDWARE is 1
757   if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") {
758
759     add_proto qw/void vp9_highbd_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
760     specialize qw/vp9_highbd_idct4x4_16_add/;
761
762     add_proto qw/void vp9_highbd_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
763     specialize qw/vp9_highbd_idct8x8_64_add/;
764
765     add_proto qw/void vp9_highbd_idct8x8_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
766     specialize qw/vp9_highbd_idct8x8_10_add/;
767
768     add_proto qw/void vp9_highbd_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
769     specialize qw/vp9_highbd_idct16x16_256_add/;
770
771     add_proto qw/void vp9_highbd_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
772     specialize qw/vp9_highbd_idct16x16_10_add/;
773
774   } else {
775
776     add_proto qw/void vp9_highbd_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
777     specialize qw/vp9_highbd_idct4x4_16_add sse2/;
778
779     add_proto qw/void vp9_highbd_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
780     specialize qw/vp9_highbd_idct8x8_64_add sse2/;
781
782     add_proto qw/void vp9_highbd_idct8x8_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
783     specialize qw/vp9_highbd_idct8x8_10_add sse2/;
784
785     add_proto qw/void vp9_highbd_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
786     specialize qw/vp9_highbd_idct16x16_256_add sse2/;
787
788     add_proto qw/void vp9_highbd_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
789     specialize qw/vp9_highbd_idct16x16_10_add sse2/;
790   }
791 }
792
793 #
794 # Encoder functions below this point.
795 #
796 if (vpx_config("CONFIG_VP9_ENCODER") eq "yes") {
797
798
799 # variance
800 add_proto qw/unsigned int vp9_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
801 specialize qw/vp9_variance32x16 avx2/, "$sse2_x86inc";
802
803 add_proto qw/unsigned int vp9_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
804 specialize qw/vp9_variance16x32/, "$sse2_x86inc";
805
806 add_proto qw/unsigned int vp9_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
807 specialize qw/vp9_variance64x32 avx2 neon/, "$sse2_x86inc";
808
809 add_proto qw/unsigned int vp9_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
810 specialize qw/vp9_variance32x64 neon/, "$sse2_x86inc";
811
812 add_proto qw/unsigned int vp9_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
813 specialize qw/vp9_variance32x32 avx2 neon/, "$sse2_x86inc";
814
815 add_proto qw/unsigned int vp9_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
816 specialize qw/vp9_variance64x64 avx2 neon/, "$sse2_x86inc";
817
818 add_proto qw/unsigned int vp9_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
819 specialize qw/vp9_variance16x16 avx2 neon/, "$sse2_x86inc";
820
821 add_proto qw/unsigned int vp9_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
822 specialize qw/vp9_variance16x8/, "$sse2_x86inc";
823
824 add_proto qw/unsigned int vp9_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
825 specialize qw/vp9_variance8x16/, "$sse2_x86inc";
826
827 add_proto qw/unsigned int vp9_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
828 specialize qw/vp9_variance8x8 neon/, "$sse2_x86inc";
829
830 add_proto qw/void vp9_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
831 specialize qw/vp9_get8x8var neon/, "$sse2_x86inc";
832
833 add_proto qw/void vp9_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
834 specialize qw/vp9_get16x16var avx2 neon/, "$sse2_x86inc";
835
836 add_proto qw/unsigned int vp9_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
837 specialize qw/vp9_variance8x4/, "$sse2_x86inc";
838
839 add_proto qw/unsigned int vp9_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
840 specialize qw/vp9_variance4x8/, "$sse2_x86inc";
841
842 add_proto qw/unsigned int vp9_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
843 specialize qw/vp9_variance4x4/, "$sse2_x86inc";
844
845 add_proto qw/unsigned int vp9_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
846 specialize qw/vp9_sub_pixel_variance64x64 avx2 neon/, "$sse2_x86inc", "$ssse3_x86inc";
847
848 add_proto qw/unsigned int vp9_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
849 specialize qw/vp9_sub_pixel_avg_variance64x64 avx2/, "$sse2_x86inc", "$ssse3_x86inc";
850
851 add_proto qw/unsigned int vp9_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
852 specialize qw/vp9_sub_pixel_variance32x64/, "$sse2_x86inc", "$ssse3_x86inc";
853
854 add_proto qw/unsigned int vp9_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
855 specialize qw/vp9_sub_pixel_avg_variance32x64/, "$sse2_x86inc", "$ssse3_x86inc";
856
857 add_proto qw/unsigned int vp9_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
858 specialize qw/vp9_sub_pixel_variance64x32/, "$sse2_x86inc", "$ssse3_x86inc";
859
860 add_proto qw/unsigned int vp9_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
861 specialize qw/vp9_sub_pixel_avg_variance64x32/, "$sse2_x86inc", "$ssse3_x86inc";
862
863 add_proto qw/unsigned int vp9_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
864 specialize qw/vp9_sub_pixel_variance32x16/, "$sse2_x86inc", "$ssse3_x86inc";
865
866 add_proto qw/unsigned int vp9_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
867 specialize qw/vp9_sub_pixel_avg_variance32x16/, "$sse2_x86inc", "$ssse3_x86inc";
868
869 add_proto qw/unsigned int vp9_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
870 specialize qw/vp9_sub_pixel_variance16x32/, "$sse2_x86inc", "$ssse3_x86inc";
871
872 add_proto qw/unsigned int vp9_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
873 specialize qw/vp9_sub_pixel_avg_variance16x32/, "$sse2_x86inc", "$ssse3_x86inc";
874
875 add_proto qw/unsigned int vp9_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
876 specialize qw/vp9_sub_pixel_variance32x32 avx2 neon/, "$sse2_x86inc", "$ssse3_x86inc";
877
878 add_proto qw/unsigned int vp9_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
879 specialize qw/vp9_sub_pixel_avg_variance32x32 avx2/, "$sse2_x86inc", "$ssse3_x86inc";
880
881 add_proto qw/unsigned int vp9_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
882 specialize qw/vp9_sub_pixel_variance16x16 neon/, "$sse2_x86inc", "$ssse3_x86inc";
883
884 add_proto qw/unsigned int vp9_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
885 specialize qw/vp9_sub_pixel_avg_variance16x16/, "$sse2_x86inc", "$ssse3_x86inc";
886
887 add_proto qw/unsigned int vp9_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
888 specialize qw/vp9_sub_pixel_variance8x16/, "$sse2_x86inc", "$ssse3_x86inc";
889
890 add_proto qw/unsigned int vp9_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
891 specialize qw/vp9_sub_pixel_avg_variance8x16/, "$sse2_x86inc", "$ssse3_x86inc";
892
893 add_proto qw/unsigned int vp9_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
894 specialize qw/vp9_sub_pixel_variance16x8/, "$sse2_x86inc", "$ssse3_x86inc";
895
896 add_proto qw/unsigned int vp9_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
897 specialize qw/vp9_sub_pixel_avg_variance16x8/, "$sse2_x86inc", "$ssse3_x86inc";
898
899 add_proto qw/unsigned int vp9_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
900 specialize qw/vp9_sub_pixel_variance8x8 neon/, "$sse2_x86inc", "$ssse3_x86inc";
901
902 add_proto qw/unsigned int vp9_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
903 specialize qw/vp9_sub_pixel_avg_variance8x8/, "$sse2_x86inc", "$ssse3_x86inc";
904
905 # TODO(jingning): need to convert 8x4/4x8 functions into mmx/sse form
906 add_proto qw/unsigned int vp9_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
907 specialize qw/vp9_sub_pixel_variance8x4/, "$sse2_x86inc", "$ssse3_x86inc";
908
909 add_proto qw/unsigned int vp9_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
910 specialize qw/vp9_sub_pixel_avg_variance8x4/, "$sse2_x86inc", "$ssse3_x86inc";
911
912 add_proto qw/unsigned int vp9_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
913 specialize qw/vp9_sub_pixel_variance4x8/, "$sse_x86inc", "$ssse3_x86inc";
914
915 add_proto qw/unsigned int vp9_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
916 specialize qw/vp9_sub_pixel_avg_variance4x8/, "$sse_x86inc", "$ssse3_x86inc";
917
918 add_proto qw/unsigned int vp9_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
919 specialize qw/vp9_sub_pixel_variance4x4/, "$sse_x86inc", "$ssse3_x86inc";
920 #vp9_sub_pixel_variance4x4_sse2=vp9_sub_pixel_variance4x4_wmt
921
922 add_proto qw/unsigned int vp9_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
923 specialize qw/vp9_sub_pixel_avg_variance4x4/, "$sse_x86inc", "$ssse3_x86inc";
924
925 add_proto qw/unsigned int vp9_sad64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
926 specialize qw/vp9_sad64x64 neon avx2/, "$sse2_x86inc";
927
928 add_proto qw/unsigned int vp9_sad32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
929 specialize qw/vp9_sad32x64 avx2/, "$sse2_x86inc";
930
931 add_proto qw/unsigned int vp9_sad64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
932 specialize qw/vp9_sad64x32 avx2/, "$sse2_x86inc";
933
934 add_proto qw/unsigned int vp9_sad32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
935 specialize qw/vp9_sad32x16 avx2/, "$sse2_x86inc";
936
937 add_proto qw/unsigned int vp9_sad16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
938 specialize qw/vp9_sad16x32/, "$sse2_x86inc";
939
940 add_proto qw/unsigned int vp9_sad32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
941 specialize qw/vp9_sad32x32 neon avx2/, "$sse2_x86inc";
942
943 add_proto qw/unsigned int vp9_sad16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
944 specialize qw/vp9_sad16x16 neon/, "$sse2_x86inc";
945
946 add_proto qw/unsigned int vp9_sad16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
947 specialize qw/vp9_sad16x8/, "$sse2_x86inc";
948
949 add_proto qw/unsigned int vp9_sad8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
950 specialize qw/vp9_sad8x16/, "$sse2_x86inc";
951
952 add_proto qw/unsigned int vp9_sad8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
953 specialize qw/vp9_sad8x8 neon/, "$sse2_x86inc";
954
955 add_proto qw/unsigned int vp9_sad8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
956 specialize qw/vp9_sad8x4/, "$sse2_x86inc";
957
958 add_proto qw/unsigned int vp9_sad4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
959 specialize qw/vp9_sad4x8/, "$sse_x86inc";
960
961 add_proto qw/unsigned int vp9_sad4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
962 specialize qw/vp9_sad4x4/, "$sse_x86inc";
963
964 add_proto qw/unsigned int vp9_sad64x64_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
965 specialize qw/vp9_sad64x64_avg avx2/, "$sse2_x86inc";
966
967 add_proto qw/unsigned int vp9_sad32x64_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
968 specialize qw/vp9_sad32x64_avg avx2/, "$sse2_x86inc";
969
970 add_proto qw/unsigned int vp9_sad64x32_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
971 specialize qw/vp9_sad64x32_avg avx2/, "$sse2_x86inc";
972
973 add_proto qw/unsigned int vp9_sad32x16_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
974 specialize qw/vp9_sad32x16_avg avx2/, "$sse2_x86inc";
975
976 add_proto qw/unsigned int vp9_sad16x32_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
977 specialize qw/vp9_sad16x32_avg/, "$sse2_x86inc";
978
979 add_proto qw/unsigned int vp9_sad32x32_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
980 specialize qw/vp9_sad32x32_avg avx2/, "$sse2_x86inc";
981
982 add_proto qw/unsigned int vp9_sad16x16_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
983 specialize qw/vp9_sad16x16_avg/, "$sse2_x86inc";
984
985 add_proto qw/unsigned int vp9_sad16x8_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
986 specialize qw/vp9_sad16x8_avg/, "$sse2_x86inc";
987
988 add_proto qw/unsigned int vp9_sad8x16_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
989 specialize qw/vp9_sad8x16_avg/, "$sse2_x86inc";
990
991 add_proto qw/unsigned int vp9_sad8x8_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
992 specialize qw/vp9_sad8x8_avg/, "$sse2_x86inc";
993
994 add_proto qw/unsigned int vp9_sad8x4_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
995 specialize qw/vp9_sad8x4_avg/, "$sse2_x86inc";
996
997 add_proto qw/unsigned int vp9_sad4x8_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
998 specialize qw/vp9_sad4x8_avg/, "$sse_x86inc";
999
1000 add_proto qw/unsigned int vp9_sad4x4_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
1001 specialize qw/vp9_sad4x4_avg/, "$sse_x86inc";
1002
1003 add_proto qw/void vp9_sad64x64x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1004 specialize qw/vp9_sad64x64x3/;
1005
1006 add_proto qw/void vp9_sad32x32x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1007 specialize qw/vp9_sad32x32x3/;
1008
1009 add_proto qw/void vp9_sad16x16x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1010 specialize qw/vp9_sad16x16x3 sse3 ssse3/;
1011
1012 add_proto qw/void vp9_sad16x8x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1013 specialize qw/vp9_sad16x8x3 sse3 ssse3/;
1014
1015 add_proto qw/void vp9_sad8x16x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1016 specialize qw/vp9_sad8x16x3 sse3/;
1017
1018 add_proto qw/void vp9_sad8x8x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1019 specialize qw/vp9_sad8x8x3 sse3/;
1020
1021 add_proto qw/void vp9_sad4x4x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1022 specialize qw/vp9_sad4x4x3 sse3/;
1023
1024 add_proto qw/void vp9_sad64x64x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1025 specialize qw/vp9_sad64x64x8/;
1026
1027 add_proto qw/void vp9_sad32x32x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1028 specialize qw/vp9_sad32x32x8/;
1029
1030 add_proto qw/void vp9_sad16x16x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1031 specialize qw/vp9_sad16x16x8 sse4/;
1032
1033 add_proto qw/void vp9_sad16x8x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1034 specialize qw/vp9_sad16x8x8 sse4/;
1035
1036 add_proto qw/void vp9_sad8x16x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1037 specialize qw/vp9_sad8x16x8 sse4/;
1038
1039 add_proto qw/void vp9_sad8x8x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1040 specialize qw/vp9_sad8x8x8 sse4/;
1041
1042 add_proto qw/void vp9_sad8x4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array";
1043 specialize qw/vp9_sad8x4x8/;
1044
1045 add_proto qw/void vp9_sad4x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array";
1046 specialize qw/vp9_sad4x8x8/;
1047
1048 add_proto qw/void vp9_sad4x4x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1049 specialize qw/vp9_sad4x4x8 sse4/;
1050
1051 add_proto qw/void vp9_sad64x64x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1052 specialize qw/vp9_sad64x64x4d sse2 avx2/;
1053
1054 add_proto qw/void vp9_sad32x64x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1055 specialize qw/vp9_sad32x64x4d sse2/;
1056
1057 add_proto qw/void vp9_sad64x32x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1058 specialize qw/vp9_sad64x32x4d sse2/;
1059
1060 add_proto qw/void vp9_sad32x16x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1061 specialize qw/vp9_sad32x16x4d sse2/;
1062
1063 add_proto qw/void vp9_sad16x32x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1064 specialize qw/vp9_sad16x32x4d sse2/;
1065
1066 add_proto qw/void vp9_sad32x32x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1067 specialize qw/vp9_sad32x32x4d sse2 avx2/;
1068
1069 add_proto qw/void vp9_sad16x16x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1070 specialize qw/vp9_sad16x16x4d sse2/;
1071
1072 add_proto qw/void vp9_sad16x8x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1073 specialize qw/vp9_sad16x8x4d sse2/;
1074
1075 add_proto qw/void vp9_sad8x16x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1076 specialize qw/vp9_sad8x16x4d sse2/;
1077
1078 add_proto qw/void vp9_sad8x8x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1079 specialize qw/vp9_sad8x8x4d sse2/;
1080
1081 # TODO(jingning): need to convert these 4x8/8x4 functions into sse2 form
1082 add_proto qw/void vp9_sad8x4x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array";
1083 specialize qw/vp9_sad8x4x4d sse2/;
1084
1085 add_proto qw/void vp9_sad4x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array";
1086 specialize qw/vp9_sad4x8x4d sse/;
1087
1088 add_proto qw/void vp9_sad4x4x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1089 specialize qw/vp9_sad4x4x4d sse/;
1090
1091 add_proto qw/unsigned int vp9_mse16x16/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1092 specialize qw/vp9_mse16x16 avx2/, "$sse2_x86inc";
1093
1094 add_proto qw/unsigned int vp9_mse8x16/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1095 specialize qw/vp9_mse8x16/, "$sse2_x86inc";
1096
1097 add_proto qw/unsigned int vp9_mse16x8/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1098 specialize qw/vp9_mse16x8/, "$sse2_x86inc";
1099
1100 add_proto qw/unsigned int vp9_mse8x8/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1101 specialize qw/vp9_mse8x8/, "$sse2_x86inc";
1102
1103 add_proto qw/unsigned int vp9_get_mb_ss/, "const int16_t *";
1104 specialize qw/vp9_get_mb_ss/, "$sse2_x86inc";
1105
1106 add_proto qw/unsigned int vp9_avg_8x8/, "const uint8_t *, int p";
1107 specialize qw/vp9_avg_8x8 sse2 neon/;
1108
1109 add_proto qw/unsigned int vp9_avg_4x4/, "const uint8_t *, int p";
1110 specialize qw/vp9_avg_4x4 sse2/;
1111
1112 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
1113   add_proto qw/unsigned int vp9_highbd_avg_8x8/, "const uint8_t *, int p";
1114   specialize qw/vp9_highbd_avg_8x8/;
1115   add_proto qw/unsigned int vp9_highbd_avg_4x4/, "const uint8_t *, int p";
1116   specialize qw/vp9_highbd_avg_4x4/;
1117 }
1118
1119 # ENCODEMB INVOKE
1120
1121 add_proto qw/void vp9_subtract_block/, "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride";
1122 specialize qw/vp9_subtract_block neon/, "$sse2_x86inc";
1123
1124 #
1125 # Denoiser
1126 #
1127 if (vpx_config("CONFIG_VP9_TEMPORAL_DENOISING") eq "yes") {
1128   add_proto qw/int vp9_denoiser_filter/, "const uint8_t *sig, int sig_stride, const uint8_t *mc_avg, int mc_avg_stride, uint8_t *avg, int avg_stride, int increase_denoising, BLOCK_SIZE bs, int motion_magnitude";
1129   specialize qw/vp9_denoiser_filter sse2/;
1130 }
1131
1132 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
1133 # the transform coefficients are held in 32-bit
1134 # values, so the assembler code for  vp9_block_error can no longer be used.
1135   add_proto qw/int64_t vp9_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz";
1136   specialize qw/vp9_block_error/;
1137
1138   add_proto qw/void vp9_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1139   specialize qw/vp9_quantize_fp/;
1140
1141   add_proto qw/void vp9_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1142   specialize qw/vp9_quantize_fp_32x32/;
1143
1144   add_proto qw/void vp9_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1145   specialize qw/vp9_quantize_b/;
1146
1147   add_proto qw/void vp9_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1148   specialize qw/vp9_quantize_b_32x32/;
1149
1150   add_proto qw/void vp9_fdct8x8_quant/, "const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1151   specialize qw/vp9_fdct8x8_quant/;
1152 } else {
1153   add_proto qw/int64_t vp9_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz";
1154   specialize qw/vp9_block_error avx2/, "$sse2_x86inc";
1155
1156   add_proto qw/void vp9_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1157   specialize qw/vp9_quantize_fp neon sse2/, "$ssse3_x86_64";
1158
1159   add_proto qw/void vp9_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1160   specialize qw/vp9_quantize_fp_32x32/, "$ssse3_x86_64";
1161
1162   add_proto qw/void vp9_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1163   specialize qw/vp9_quantize_b sse2/, "$ssse3_x86_64";
1164
1165   add_proto qw/void vp9_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1166   specialize qw/vp9_quantize_b_32x32/, "$ssse3_x86_64";
1167
1168   add_proto qw/void vp9_fdct8x8_quant/, "const int16_t *input, int stride, tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1169   specialize qw/vp9_fdct8x8_quant sse2 ssse3/;
1170 }
1171
1172 #
1173 # Structured Similarity (SSIM)
1174 #
1175 if (vpx_config("CONFIG_INTERNAL_STATS") eq "yes") {
1176     add_proto qw/void vp9_ssim_parms_8x8/, "uint8_t *s, int sp, uint8_t *r, int rp, unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sxr";
1177     specialize qw/vp9_ssim_parms_8x8/, "$sse2_x86_64";
1178
1179     add_proto qw/void vp9_ssim_parms_16x16/, "uint8_t *s, int sp, uint8_t *r, int rp, unsigned long *sum_s, unsigned long *sum_r, unsigned long *sum_sq_s, unsigned long *sum_sq_r, unsigned long *sum_sxr";
1180     specialize qw/vp9_ssim_parms_16x16/, "$sse2_x86_64";
1181 }
1182
1183 # fdct functions
1184
1185 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
1186   add_proto qw/void vp9_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
1187   specialize qw/vp9_fht4x4 sse2/;
1188
1189   add_proto qw/void vp9_fht8x8/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
1190   specialize qw/vp9_fht8x8 sse2/;
1191
1192   add_proto qw/void vp9_fht16x16/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
1193   specialize qw/vp9_fht16x16 sse2/;
1194
1195   add_proto qw/void vp9_fwht4x4/, "const int16_t *input, tran_low_t *output, int stride";
1196   specialize qw/vp9_fwht4x4/, "$mmx_x86inc";
1197
1198   add_proto qw/void vp9_fdct4x4_1/, "const int16_t *input, tran_low_t *output, int stride";
1199   specialize qw/vp9_fdct4x4_1 sse2/;
1200
1201   add_proto qw/void vp9_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride";
1202   specialize qw/vp9_fdct4x4 sse2/;
1203
1204   add_proto qw/void vp9_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride";
1205   specialize qw/vp9_fdct8x8_1 sse2/;
1206
1207   add_proto qw/void vp9_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride";
1208   specialize qw/vp9_fdct8x8 sse2/;
1209
1210   add_proto qw/void vp9_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride";
1211   specialize qw/vp9_fdct16x16_1 sse2/;
1212
1213   add_proto qw/void vp9_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride";
1214   specialize qw/vp9_fdct16x16 sse2/;
1215
1216   add_proto qw/void vp9_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride";
1217   specialize qw/vp9_fdct32x32_1 sse2/;
1218
1219   add_proto qw/void vp9_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride";
1220   specialize qw/vp9_fdct32x32 sse2/;
1221
1222   add_proto qw/void vp9_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride";
1223   specialize qw/vp9_fdct32x32_rd sse2/;
1224 } else {
1225   add_proto qw/void vp9_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
1226   specialize qw/vp9_fht4x4 sse2/;
1227
1228   add_proto qw/void vp9_fht8x8/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
1229   specialize qw/vp9_fht8x8 sse2/;
1230
1231   add_proto qw/void vp9_fht16x16/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
1232   specialize qw/vp9_fht16x16 sse2/;
1233
1234   add_proto qw/void vp9_fwht4x4/, "const int16_t *input, tran_low_t *output, int stride";
1235   specialize qw/vp9_fwht4x4/, "$mmx_x86inc";
1236
1237   add_proto qw/void vp9_fdct4x4_1/, "const int16_t *input, tran_low_t *output, int stride";
1238   specialize qw/vp9_fdct4x4_1 sse2/;
1239
1240   add_proto qw/void vp9_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride";
1241   specialize qw/vp9_fdct4x4 sse2/;
1242
1243   add_proto qw/void vp9_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride";
1244   specialize qw/vp9_fdct8x8_1 sse2 neon/;
1245
1246   add_proto qw/void vp9_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride";
1247   specialize qw/vp9_fdct8x8 sse2 neon/, "$ssse3_x86_64";
1248
1249   add_proto qw/void vp9_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride";
1250   specialize qw/vp9_fdct16x16_1 sse2/;
1251
1252   add_proto qw/void vp9_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride";
1253   specialize qw/vp9_fdct16x16 sse2/;
1254
1255   add_proto qw/void vp9_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride";
1256   specialize qw/vp9_fdct32x32_1 sse2/;
1257
1258   add_proto qw/void vp9_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride";
1259   specialize qw/vp9_fdct32x32 sse2 avx2/;
1260
1261   add_proto qw/void vp9_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride";
1262   specialize qw/vp9_fdct32x32_rd sse2 avx2/;
1263 }
1264
1265 #
1266 # Motion search
1267 #
1268 add_proto qw/int vp9_full_search_sad/, "const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv, struct mv *best_mv";
1269 specialize qw/vp9_full_search_sad sse3 sse4_1/;
1270 $vp9_full_search_sad_sse3=vp9_full_search_sadx3;
1271 $vp9_full_search_sad_sse4_1=vp9_full_search_sadx8;
1272
1273 add_proto qw/int vp9_diamond_search_sad/, "const struct macroblock *x, const struct search_site_config *cfg,  struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv";
1274 specialize qw/vp9_diamond_search_sad/;
1275
1276 add_proto qw/int vp9_full_range_search/, "const struct macroblock *x, const struct search_site_config *cfg, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, const struct mv *center_mv";
1277 specialize qw/vp9_full_range_search/;
1278
1279 add_proto qw/void vp9_temporal_filter_apply/, "uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count";
1280 specialize qw/vp9_temporal_filter_apply sse2/;
1281
1282 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
1283
1284   # variance
1285   add_proto qw/unsigned int vp9_highbd_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1286   specialize qw/vp9_highbd_variance32x16/, "$sse2_x86inc";
1287
1288   add_proto qw/unsigned int vp9_highbd_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1289   specialize qw/vp9_highbd_variance16x32/, "$sse2_x86inc";
1290
1291   add_proto qw/unsigned int vp9_highbd_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1292   specialize qw/vp9_highbd_variance64x32/, "$sse2_x86inc";
1293
1294   add_proto qw/unsigned int vp9_highbd_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1295   specialize qw/vp9_highbd_variance32x64/, "$sse2_x86inc";
1296
1297   add_proto qw/unsigned int vp9_highbd_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1298   specialize qw/vp9_highbd_variance32x32/, "$sse2_x86inc";
1299
1300   add_proto qw/unsigned int vp9_highbd_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1301   specialize qw/vp9_highbd_variance64x64/, "$sse2_x86inc";
1302
1303   add_proto qw/unsigned int vp9_highbd_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1304   specialize qw/vp9_highbd_variance16x16/, "$sse2_x86inc";
1305
1306   add_proto qw/unsigned int vp9_highbd_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1307   specialize qw/vp9_highbd_variance16x8/, "$sse2_x86inc";
1308
1309   add_proto qw/unsigned int vp9_highbd_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1310   specialize qw/vp9_highbd_variance8x16/, "$sse2_x86inc";
1311
1312   add_proto qw/unsigned int vp9_highbd_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1313   specialize qw/vp9_highbd_variance8x8/, "$sse2_x86inc";
1314
1315   add_proto qw/unsigned int vp9_highbd_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1316   specialize qw/vp9_highbd_variance8x4/;
1317
1318   add_proto qw/unsigned int vp9_highbd_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1319   specialize qw/vp9_highbd_variance4x8/;
1320
1321   add_proto qw/unsigned int vp9_highbd_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1322   specialize qw/vp9_highbd_variance4x4/;
1323
1324   add_proto qw/void vp9_highbd_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
1325   specialize qw/vp9_highbd_get8x8var/, "$sse2_x86inc";
1326
1327   add_proto qw/void vp9_highbd_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
1328   specialize qw/vp9_highbd_get16x16var/, "$sse2_x86inc";
1329
1330   add_proto qw/unsigned int vp9_highbd_10_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1331   specialize qw/vp9_highbd_10_variance32x16/, "$sse2_x86inc";
1332
1333   add_proto qw/unsigned int vp9_highbd_10_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1334   specialize qw/vp9_highbd_10_variance16x32/, "$sse2_x86inc";
1335
1336   add_proto qw/unsigned int vp9_highbd_10_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1337   specialize qw/vp9_highbd_10_variance64x32/, "$sse2_x86inc";
1338
1339   add_proto qw/unsigned int vp9_highbd_10_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1340   specialize qw/vp9_highbd_10_variance32x64/, "$sse2_x86inc";
1341
1342   add_proto qw/unsigned int vp9_highbd_10_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1343   specialize qw/vp9_highbd_10_variance32x32/, "$sse2_x86inc";
1344
1345   add_proto qw/unsigned int vp9_highbd_10_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1346   specialize qw/vp9_highbd_10_variance64x64/, "$sse2_x86inc";
1347
1348   add_proto qw/unsigned int vp9_highbd_10_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1349   specialize qw/vp9_highbd_10_variance16x16/, "$sse2_x86inc";
1350
1351   add_proto qw/unsigned int vp9_highbd_10_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1352   specialize qw/vp9_highbd_10_variance16x8/, "$sse2_x86inc";
1353
1354   add_proto qw/unsigned int vp9_highbd_10_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1355   specialize qw/vp9_highbd_10_variance8x16/, "$sse2_x86inc";
1356
1357   add_proto qw/unsigned int vp9_highbd_10_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1358   specialize qw/vp9_highbd_10_variance8x8/, "$sse2_x86inc";
1359
1360   add_proto qw/unsigned int vp9_highbd_10_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1361   specialize qw/vp9_highbd_10_variance8x4/;
1362
1363   add_proto qw/unsigned int vp9_highbd_10_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1364   specialize qw/vp9_highbd_10_variance4x8/;
1365
1366   add_proto qw/unsigned int vp9_highbd_10_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1367   specialize qw/vp9_highbd_10_variance4x4/;
1368
1369   add_proto qw/void vp9_highbd_10_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
1370   specialize qw/vp9_highbd_10_get8x8var/, "$sse2_x86inc";
1371
1372   add_proto qw/void vp9_highbd_10_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
1373   specialize qw/vp9_highbd_10_get16x16var/, "$sse2_x86inc";
1374
1375   add_proto qw/unsigned int vp9_highbd_12_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1376   specialize qw/vp9_highbd_12_variance32x16/, "$sse2_x86inc";
1377
1378   add_proto qw/unsigned int vp9_highbd_12_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1379   specialize qw/vp9_highbd_12_variance16x32/, "$sse2_x86inc";
1380
1381   add_proto qw/unsigned int vp9_highbd_12_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1382   specialize qw/vp9_highbd_12_variance64x32/, "$sse2_x86inc";
1383
1384   add_proto qw/unsigned int vp9_highbd_12_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1385   specialize qw/vp9_highbd_12_variance32x64/, "$sse2_x86inc";
1386
1387   add_proto qw/unsigned int vp9_highbd_12_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1388   specialize qw/vp9_highbd_12_variance32x32/, "$sse2_x86inc";
1389
1390   add_proto qw/unsigned int vp9_highbd_12_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1391   specialize qw/vp9_highbd_12_variance64x64/, "$sse2_x86inc";
1392
1393   add_proto qw/unsigned int vp9_highbd_12_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1394   specialize qw/vp9_highbd_12_variance16x16/, "$sse2_x86inc";
1395
1396   add_proto qw/unsigned int vp9_highbd_12_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1397   specialize qw/vp9_highbd_12_variance16x8/, "$sse2_x86inc";
1398
1399   add_proto qw/unsigned int vp9_highbd_12_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1400   specialize qw/vp9_highbd_12_variance8x16/, "$sse2_x86inc";
1401
1402   add_proto qw/unsigned int vp9_highbd_12_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1403   specialize qw/vp9_highbd_12_variance8x8/, "$sse2_x86inc";
1404
1405   add_proto qw/unsigned int vp9_highbd_12_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1406   specialize qw/vp9_highbd_12_variance8x4/;
1407
1408   add_proto qw/unsigned int vp9_highbd_12_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1409   specialize qw/vp9_highbd_12_variance4x8/;
1410
1411   add_proto qw/unsigned int vp9_highbd_12_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1412   specialize qw/vp9_highbd_12_variance4x4/;
1413
1414   add_proto qw/void vp9_highbd_12_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
1415   specialize qw/vp9_highbd_12_get8x8var/, "$sse2_x86inc";
1416
1417   add_proto qw/void vp9_highbd_12_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
1418   specialize qw/vp9_highbd_12_get16x16var/, "$sse2_x86inc";
1419
1420   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1421   specialize qw/vp9_highbd_sub_pixel_variance64x64/, "$sse2_x86inc";
1422
1423   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1424   specialize qw/vp9_highbd_sub_pixel_avg_variance64x64/, "$sse2_x86inc";
1425
1426   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1427   specialize qw/vp9_highbd_sub_pixel_variance32x64/, "$sse2_x86inc";
1428
1429   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1430   specialize qw/vp9_highbd_sub_pixel_avg_variance32x64/, "$sse2_x86inc";
1431
1432   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1433   specialize qw/vp9_highbd_sub_pixel_variance64x32/, "$sse2_x86inc";
1434
1435   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1436   specialize qw/vp9_highbd_sub_pixel_avg_variance64x32/, "$sse2_x86inc";
1437
1438   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1439   specialize qw/vp9_highbd_sub_pixel_variance32x16/, "$sse2_x86inc";
1440
1441   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1442   specialize qw/vp9_highbd_sub_pixel_avg_variance32x16/, "$sse2_x86inc";
1443
1444   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1445   specialize qw/vp9_highbd_sub_pixel_variance16x32/, "$sse2_x86inc";
1446
1447   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1448   specialize qw/vp9_highbd_sub_pixel_avg_variance16x32/, "$sse2_x86inc";
1449
1450   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1451   specialize qw/vp9_highbd_sub_pixel_variance32x32/, "$sse2_x86inc";
1452
1453   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1454   specialize qw/vp9_highbd_sub_pixel_avg_variance32x32/, "$sse2_x86inc";
1455
1456   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1457   specialize qw/vp9_highbd_sub_pixel_variance16x16/, "$sse2_x86inc";
1458
1459   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1460   specialize qw/vp9_highbd_sub_pixel_avg_variance16x16/, "$sse2_x86inc";
1461
1462   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1463   specialize qw/vp9_highbd_sub_pixel_variance8x16/, "$sse2_x86inc";
1464
1465   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1466   specialize qw/vp9_highbd_sub_pixel_avg_variance8x16/, "$sse2_x86inc";
1467
1468   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1469   specialize qw/vp9_highbd_sub_pixel_variance16x8/, "$sse2_x86inc";
1470
1471   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1472   specialize qw/vp9_highbd_sub_pixel_avg_variance16x8/, "$sse2_x86inc";
1473
1474   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1475   specialize qw/vp9_highbd_sub_pixel_variance8x8/, "$sse2_x86inc";
1476
1477   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1478   specialize qw/vp9_highbd_sub_pixel_avg_variance8x8/, "$sse2_x86inc";
1479
1480   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1481   specialize qw/vp9_highbd_sub_pixel_variance8x4/, "$sse2_x86inc";
1482
1483   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1484   specialize qw/vp9_highbd_sub_pixel_avg_variance8x4/, "$sse2_x86inc";
1485
1486   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1487   specialize qw/vp9_highbd_sub_pixel_variance4x8/;
1488
1489   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1490   specialize qw/vp9_highbd_sub_pixel_avg_variance4x8/;
1491
1492   add_proto qw/unsigned int vp9_highbd_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1493   specialize qw/vp9_highbd_sub_pixel_variance4x4/;
1494
1495   add_proto qw/unsigned int vp9_highbd_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1496   specialize qw/vp9_highbd_sub_pixel_avg_variance4x4/;
1497
1498   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1499   specialize qw/vp9_highbd_10_sub_pixel_variance64x64/, "$sse2_x86inc";
1500
1501   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1502   specialize qw/vp9_highbd_10_sub_pixel_avg_variance64x64/, "$sse2_x86inc";
1503
1504   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1505   specialize qw/vp9_highbd_10_sub_pixel_variance32x64/, "$sse2_x86inc";
1506
1507   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1508   specialize qw/vp9_highbd_10_sub_pixel_avg_variance32x64/, "$sse2_x86inc";
1509
1510   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1511   specialize qw/vp9_highbd_10_sub_pixel_variance64x32/, "$sse2_x86inc";
1512
1513   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1514   specialize qw/vp9_highbd_10_sub_pixel_avg_variance64x32/, "$sse2_x86inc";
1515
1516   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1517   specialize qw/vp9_highbd_10_sub_pixel_variance32x16/, "$sse2_x86inc";
1518
1519   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1520   specialize qw/vp9_highbd_10_sub_pixel_avg_variance32x16/, "$sse2_x86inc";
1521
1522   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1523   specialize qw/vp9_highbd_10_sub_pixel_variance16x32/, "$sse2_x86inc";
1524
1525   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1526   specialize qw/vp9_highbd_10_sub_pixel_avg_variance16x32/, "$sse2_x86inc";
1527
1528   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1529   specialize qw/vp9_highbd_10_sub_pixel_variance32x32/, "$sse2_x86inc";
1530
1531   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1532   specialize qw/vp9_highbd_10_sub_pixel_avg_variance32x32/, "$sse2_x86inc";
1533
1534   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1535   specialize qw/vp9_highbd_10_sub_pixel_variance16x16/, "$sse2_x86inc";
1536
1537   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1538   specialize qw/vp9_highbd_10_sub_pixel_avg_variance16x16/, "$sse2_x86inc";
1539
1540   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1541   specialize qw/vp9_highbd_10_sub_pixel_variance8x16/, "$sse2_x86inc";
1542
1543   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1544   specialize qw/vp9_highbd_10_sub_pixel_avg_variance8x16/, "$sse2_x86inc";
1545
1546   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1547   specialize qw/vp9_highbd_10_sub_pixel_variance16x8/, "$sse2_x86inc";
1548
1549   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1550   specialize qw/vp9_highbd_10_sub_pixel_avg_variance16x8/, "$sse2_x86inc";
1551
1552   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1553   specialize qw/vp9_highbd_10_sub_pixel_variance8x8/, "$sse2_x86inc";
1554
1555   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1556   specialize qw/vp9_highbd_10_sub_pixel_avg_variance8x8/, "$sse2_x86inc";
1557
1558   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1559   specialize qw/vp9_highbd_10_sub_pixel_variance8x4/, "$sse2_x86inc";
1560
1561   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1562   specialize qw/vp9_highbd_10_sub_pixel_avg_variance8x4/, "$sse2_x86inc";
1563
1564   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1565   specialize qw/vp9_highbd_10_sub_pixel_variance4x8/;
1566
1567   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1568   specialize qw/vp9_highbd_10_sub_pixel_avg_variance4x8/;
1569
1570   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1571   specialize qw/vp9_highbd_10_sub_pixel_variance4x4/;
1572
1573   add_proto qw/unsigned int vp9_highbd_10_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1574   specialize qw/vp9_highbd_10_sub_pixel_avg_variance4x4/;
1575
1576   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1577   specialize qw/vp9_highbd_12_sub_pixel_variance64x64/, "$sse2_x86inc";
1578
1579   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance64x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1580   specialize qw/vp9_highbd_12_sub_pixel_avg_variance64x64/, "$sse2_x86inc";
1581
1582   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1583   specialize qw/vp9_highbd_12_sub_pixel_variance32x64/, "$sse2_x86inc";
1584
1585   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance32x64/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1586   specialize qw/vp9_highbd_12_sub_pixel_avg_variance32x64/, "$sse2_x86inc";
1587
1588   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1589   specialize qw/vp9_highbd_12_sub_pixel_variance64x32/, "$sse2_x86inc";
1590
1591   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance64x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1592   specialize qw/vp9_highbd_12_sub_pixel_avg_variance64x32/, "$sse2_x86inc";
1593
1594   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1595   specialize qw/vp9_highbd_12_sub_pixel_variance32x16/, "$sse2_x86inc";
1596
1597   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance32x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1598   specialize qw/vp9_highbd_12_sub_pixel_avg_variance32x16/, "$sse2_x86inc";
1599
1600   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1601   specialize qw/vp9_highbd_12_sub_pixel_variance16x32/, "$sse2_x86inc";
1602
1603   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance16x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1604   specialize qw/vp9_highbd_12_sub_pixel_avg_variance16x32/, "$sse2_x86inc";
1605
1606   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1607   specialize qw/vp9_highbd_12_sub_pixel_variance32x32/, "$sse2_x86inc";
1608
1609   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance32x32/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1610   specialize qw/vp9_highbd_12_sub_pixel_avg_variance32x32/, "$sse2_x86inc";
1611
1612   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1613   specialize qw/vp9_highbd_12_sub_pixel_variance16x16/, "$sse2_x86inc";
1614
1615   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance16x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1616   specialize qw/vp9_highbd_12_sub_pixel_avg_variance16x16/, "$sse2_x86inc";
1617
1618   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1619   specialize qw/vp9_highbd_12_sub_pixel_variance8x16/, "$sse2_x86inc";
1620
1621   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance8x16/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1622   specialize qw/vp9_highbd_12_sub_pixel_avg_variance8x16/, "$sse2_x86inc";
1623
1624   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1625   specialize qw/vp9_highbd_12_sub_pixel_variance16x8/, "$sse2_x86inc";
1626
1627   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance16x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1628   specialize qw/vp9_highbd_12_sub_pixel_avg_variance16x8/, "$sse2_x86inc";
1629
1630   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1631   specialize qw/vp9_highbd_12_sub_pixel_variance8x8/, "$sse2_x86inc";
1632
1633   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance8x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1634   specialize qw/vp9_highbd_12_sub_pixel_avg_variance8x8/, "$sse2_x86inc";
1635
1636   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1637   specialize qw/vp9_highbd_12_sub_pixel_variance8x4/, "$sse2_x86inc";
1638
1639   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance8x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1640   specialize qw/vp9_highbd_12_sub_pixel_avg_variance8x4/, "$sse2_x86inc";
1641
1642   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1643   specialize qw/vp9_highbd_12_sub_pixel_variance4x8/;
1644
1645   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance4x8/, "const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1646   specialize qw/vp9_highbd_12_sub_pixel_avg_variance4x8/;
1647
1648   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
1649   specialize qw/vp9_highbd_12_sub_pixel_variance4x4/;
1650
1651   add_proto qw/unsigned int vp9_highbd_12_sub_pixel_avg_variance4x4/, "const uint8_t *src_ptr, int source_stride, int xoffset, int  yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred";
1652   specialize qw/vp9_highbd_12_sub_pixel_avg_variance4x4/;
1653
1654   add_proto qw/unsigned int vp9_highbd_sad64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
1655   specialize qw/vp9_highbd_sad64x64/, "$sse2_x86inc";
1656
1657   add_proto qw/unsigned int vp9_highbd_sad32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
1658   specialize qw/vp9_highbd_sad32x64/, "$sse2_x86inc";
1659
1660   add_proto qw/unsigned int vp9_highbd_sad64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
1661   specialize qw/vp9_highbd_sad64x32/, "$sse2_x86inc";
1662
1663   add_proto qw/unsigned int vp9_highbd_sad32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
1664   specialize qw/vp9_highbd_sad32x16/, "$sse2_x86inc";
1665
1666   add_proto qw/unsigned int vp9_highbd_sad16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
1667   specialize qw/vp9_highbd_sad16x32/, "$sse2_x86inc";
1668
1669   add_proto qw/unsigned int vp9_highbd_sad32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
1670   specialize qw/vp9_highbd_sad32x32/, "$sse2_x86inc";
1671
1672   add_proto qw/unsigned int vp9_highbd_sad16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
1673   specialize qw/vp9_highbd_sad16x16/, "$sse2_x86inc";
1674
1675   add_proto qw/unsigned int vp9_highbd_sad16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
1676   specialize qw/vp9_highbd_sad16x8/, "$sse2_x86inc";
1677
1678   add_proto qw/unsigned int vp9_highbd_sad8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
1679   specialize qw/vp9_highbd_sad8x16/, "$sse2_x86inc";
1680
1681   add_proto qw/unsigned int vp9_highbd_sad8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
1682   specialize qw/vp9_highbd_sad8x8/, "$sse2_x86inc";
1683
1684   add_proto qw/unsigned int vp9_highbd_sad8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
1685   specialize qw/vp9_highbd_sad8x4/, "$sse2_x86inc";
1686
1687   add_proto qw/unsigned int vp9_highbd_sad4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride";
1688   specialize qw/vp9_highbd_sad4x8/;
1689
1690   add_proto qw/unsigned int vp9_highbd_sad4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride";
1691   specialize qw/vp9_highbd_sad4x4/;
1692
1693   add_proto qw/unsigned int vp9_highbd_sad64x64_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
1694   specialize qw/vp9_highbd_sad64x64_avg/, "$sse2_x86inc";
1695
1696   add_proto qw/unsigned int vp9_highbd_sad32x64_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
1697   specialize qw/vp9_highbd_sad32x64_avg/, "$sse2_x86inc";
1698
1699   add_proto qw/unsigned int vp9_highbd_sad64x32_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
1700   specialize qw/vp9_highbd_sad64x32_avg/, "$sse2_x86inc";
1701
1702   add_proto qw/unsigned int vp9_highbd_sad32x16_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
1703   specialize qw/vp9_highbd_sad32x16_avg/, "$sse2_x86inc";
1704
1705   add_proto qw/unsigned int vp9_highbd_sad16x32_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
1706   specialize qw/vp9_highbd_sad16x32_avg/, "$sse2_x86inc";
1707
1708   add_proto qw/unsigned int vp9_highbd_sad32x32_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
1709   specialize qw/vp9_highbd_sad32x32_avg/, "$sse2_x86inc";
1710
1711   add_proto qw/unsigned int vp9_highbd_sad16x16_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
1712   specialize qw/vp9_highbd_sad16x16_avg/, "$sse2_x86inc";
1713
1714   add_proto qw/unsigned int vp9_highbd_sad16x8_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
1715   specialize qw/vp9_highbd_sad16x8_avg/, "$sse2_x86inc";
1716
1717   add_proto qw/unsigned int vp9_highbd_sad8x16_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
1718   specialize qw/vp9_highbd_sad8x16_avg/, "$sse2_x86inc";
1719
1720   add_proto qw/unsigned int vp9_highbd_sad8x8_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
1721   specialize qw/vp9_highbd_sad8x8_avg/, "$sse2_x86inc";
1722
1723   add_proto qw/unsigned int vp9_highbd_sad8x4_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
1724   specialize qw/vp9_highbd_sad8x4_avg/, "$sse2_x86inc";
1725
1726   add_proto qw/unsigned int vp9_highbd_sad4x8_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred";
1727   specialize qw/vp9_highbd_sad4x8_avg/;
1728
1729   add_proto qw/unsigned int vp9_highbd_sad4x4_avg/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, const uint8_t *second_pred";
1730   specialize qw/vp9_highbd_sad4x4_avg/;
1731
1732   add_proto qw/void vp9_highbd_sad64x64x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1733   specialize qw/vp9_highbd_sad64x64x3/;
1734
1735   add_proto qw/void vp9_highbd_sad32x32x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1736   specialize qw/vp9_highbd_sad32x32x3/;
1737
1738   add_proto qw/void vp9_highbd_sad16x16x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1739   specialize qw/vp9_highbd_sad16x16x3/;
1740
1741   add_proto qw/void vp9_highbd_sad16x8x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1742   specialize qw/vp9_highbd_sad16x8x3/;
1743
1744   add_proto qw/void vp9_highbd_sad8x16x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1745   specialize qw/vp9_highbd_sad8x16x3/;
1746
1747   add_proto qw/void vp9_highbd_sad8x8x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1748   specialize qw/vp9_highbd_sad8x8x3/;
1749
1750   add_proto qw/void vp9_highbd_sad4x4x3/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int  ref_stride, unsigned int *sad_array";
1751   specialize qw/vp9_highbd_sad4x4x3/;
1752
1753   add_proto qw/void vp9_highbd_sad64x64x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1754   specialize qw/vp9_highbd_sad64x64x8/;
1755
1756   add_proto qw/void vp9_highbd_sad32x32x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1757   specialize qw/vp9_highbd_sad32x32x8/;
1758
1759   add_proto qw/void vp9_highbd_sad16x16x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1760   specialize qw/vp9_highbd_sad16x16x8/;
1761
1762   add_proto qw/void vp9_highbd_sad16x8x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1763   specialize qw/vp9_highbd_sad16x8x8/;
1764
1765   add_proto qw/void vp9_highbd_sad8x16x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1766   specialize qw/vp9_highbd_sad8x16x8/;
1767
1768   add_proto qw/void vp9_highbd_sad8x8x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1769   specialize qw/vp9_highbd_sad8x8x8/;
1770
1771   add_proto qw/void vp9_highbd_sad8x4x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array";
1772   specialize qw/vp9_highbd_sad8x4x8/;
1773
1774   add_proto qw/void vp9_highbd_sad4x8x8/, "const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array";
1775   specialize qw/vp9_highbd_sad4x8x8/;
1776
1777   add_proto qw/void vp9_highbd_sad4x4x8/, "const uint8_t *src_ptr, int  src_stride, const uint8_t *ref_ptr, int  ref_stride, uint32_t *sad_array";
1778   specialize qw/vp9_highbd_sad4x4x8/;
1779
1780   add_proto qw/void vp9_highbd_sad64x64x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1781   specialize qw/vp9_highbd_sad64x64x4d sse2/;
1782
1783   add_proto qw/void vp9_highbd_sad32x64x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1784   specialize qw/vp9_highbd_sad32x64x4d sse2/;
1785
1786   add_proto qw/void vp9_highbd_sad64x32x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1787   specialize qw/vp9_highbd_sad64x32x4d sse2/;
1788
1789   add_proto qw/void vp9_highbd_sad32x16x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1790   specialize qw/vp9_highbd_sad32x16x4d sse2/;
1791
1792   add_proto qw/void vp9_highbd_sad16x32x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1793   specialize qw/vp9_highbd_sad16x32x4d sse2/;
1794
1795   add_proto qw/void vp9_highbd_sad32x32x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1796   specialize qw/vp9_highbd_sad32x32x4d sse2/;
1797
1798   add_proto qw/void vp9_highbd_sad16x16x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1799   specialize qw/vp9_highbd_sad16x16x4d sse2/;
1800
1801   add_proto qw/void vp9_highbd_sad16x8x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1802   specialize qw/vp9_highbd_sad16x8x4d sse2/;
1803
1804   add_proto qw/void vp9_highbd_sad8x16x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1805   specialize qw/vp9_highbd_sad8x16x4d sse2/;
1806
1807   add_proto qw/void vp9_highbd_sad8x8x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1808   specialize qw/vp9_highbd_sad8x8x4d sse2/;
1809
1810   add_proto qw/void vp9_highbd_sad8x4x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array";
1811   specialize qw/vp9_highbd_sad8x4x4d sse2/;
1812
1813   add_proto qw/void vp9_highbd_sad4x8x4d/, "const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array";
1814   specialize qw/vp9_highbd_sad4x8x4d sse2/;
1815
1816   add_proto qw/void vp9_highbd_sad4x4x4d/, "const uint8_t *src_ptr, int  src_stride, const uint8_t* const ref_ptr[], int  ref_stride, unsigned int *sad_array";
1817   specialize qw/vp9_highbd_sad4x4x4d sse2/;
1818
1819   add_proto qw/unsigned int vp9_highbd_mse16x16/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1820   specialize qw/vp9_highbd_mse16x16/, "$sse2_x86inc";
1821
1822   add_proto qw/unsigned int vp9_highbd_mse8x16/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1823   specialize qw/vp9_highbd_mse8x16/;
1824
1825   add_proto qw/unsigned int vp9_highbd_mse16x8/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1826   specialize qw/vp9_highbd_mse16x8/;
1827
1828   add_proto qw/unsigned int vp9_highbd_mse8x8/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1829   specialize qw/vp9_highbd_mse8x8/, "$sse2_x86inc";
1830
1831   add_proto qw/unsigned int vp9_highbd_10_mse16x16/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1832   specialize qw/vp9_highbd_10_mse16x16/, "$sse2_x86inc";
1833
1834   add_proto qw/unsigned int vp9_highbd_10_mse8x16/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1835   specialize qw/vp9_highbd_10_mse8x16/;
1836
1837   add_proto qw/unsigned int vp9_highbd_10_mse16x8/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1838   specialize qw/vp9_highbd_10_mse16x8/;
1839
1840   add_proto qw/unsigned int vp9_highbd_10_mse8x8/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1841   specialize qw/vp9_highbd_10_mse8x8/, "$sse2_x86inc";
1842
1843   add_proto qw/unsigned int vp9_highbd_12_mse16x16/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1844   specialize qw/vp9_highbd_12_mse16x16/, "$sse2_x86inc";
1845
1846   add_proto qw/unsigned int vp9_highbd_12_mse8x16/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1847   specialize qw/vp9_highbd_12_mse8x16/;
1848
1849   add_proto qw/unsigned int vp9_highbd_12_mse16x8/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1850   specialize qw/vp9_highbd_12_mse16x8/;
1851
1852   add_proto qw/unsigned int vp9_highbd_12_mse8x8/, "const uint8_t *src_ptr, int  source_stride, const uint8_t *ref_ptr, int  recon_stride, unsigned int *sse";
1853   specialize qw/vp9_highbd_12_mse8x8/, "$sse2_x86inc";
1854
1855   # ENCODEMB INVOKE
1856
1857   add_proto qw/int64_t vp9_highbd_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd";
1858   specialize qw/vp9_highbd_block_error sse2/;
1859
1860   add_proto qw/void vp9_highbd_subtract_block/, "int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride, int bd";
1861   specialize qw/vp9_highbd_subtract_block/;
1862
1863   add_proto qw/void vp9_highbd_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1864   specialize qw/vp9_highbd_quantize_fp/;
1865
1866   add_proto qw/void vp9_highbd_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1867   specialize qw/vp9_highbd_quantize_fp_32x32/;
1868
1869   add_proto qw/void vp9_highbd_quantize_b/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1870   specialize qw/vp9_highbd_quantize_b sse2/;
1871
1872   add_proto qw/void vp9_highbd_quantize_b_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan";
1873   specialize qw/vp9_highbd_quantize_b_32x32 sse2/;
1874
1875   #
1876   # Structured Similarity (SSIM)
1877   #
1878   if (vpx_config("CONFIG_INTERNAL_STATS") eq "yes") {
1879     add_proto qw/void vp9_highbd_ssim_parms_8x8/, "uint16_t *s, int sp, uint16_t *r, int rp, uint32_t *sum_s, uint32_t *sum_r, uint32_t *sum_sq_s, uint32_t *sum_sq_r, uint32_t *sum_sxr";
1880     specialize qw/vp9_highbd_ssim_parms_8x8/;
1881   }
1882
1883   # fdct functions
1884   add_proto qw/void vp9_highbd_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
1885   specialize qw/vp9_highbd_fht4x4 sse2/;
1886
1887   add_proto qw/void vp9_highbd_fht8x8/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
1888   specialize qw/vp9_highbd_fht8x8 sse2/;
1889
1890   add_proto qw/void vp9_highbd_fht16x16/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
1891   specialize qw/vp9_highbd_fht16x16 sse2/;
1892
1893   add_proto qw/void vp9_highbd_fwht4x4/, "const int16_t *input, tran_low_t *output, int stride";
1894   specialize qw/vp9_highbd_fwht4x4/;
1895
1896   add_proto qw/void vp9_highbd_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride";
1897   specialize qw/vp9_highbd_fdct4x4 sse2/;
1898
1899   add_proto qw/void vp9_highbd_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride";
1900   specialize qw/vp9_highbd_fdct8x8_1/;
1901
1902   add_proto qw/void vp9_highbd_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride";
1903   specialize qw/vp9_highbd_fdct8x8 sse2/;
1904
1905   add_proto qw/void vp9_highbd_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride";
1906   specialize qw/vp9_highbd_fdct16x16_1/;
1907
1908   add_proto qw/void vp9_highbd_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride";
1909   specialize qw/vp9_highbd_fdct16x16 sse2/;
1910
1911   add_proto qw/void vp9_highbd_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride";
1912   specialize qw/vp9_highbd_fdct32x32_1/;
1913
1914   add_proto qw/void vp9_highbd_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride";
1915   specialize qw/vp9_highbd_fdct32x32 sse2/;
1916
1917   add_proto qw/void vp9_highbd_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride";
1918   specialize qw/vp9_highbd_fdct32x32_rd sse2/;
1919
1920   add_proto qw/void vp9_highbd_temporal_filter_apply/, "uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count";
1921   specialize qw/vp9_highbd_temporal_filter_apply/;
1922
1923 }
1924 # End vp9_high encoder functions
1925
1926 }
1927 # end encoder functions
1928 1;