Merge other top-level C code
[platform/upstream/libvpx.git] / vp9 / common / rtcd_defs.sh
1 common_forward_decls() {
2 cat <<EOF
3
4 struct loop_filter_info;
5 struct blockd;
6 struct macroblockd;
7 struct loop_filter_info;
8
9 /* Encoder forward decls */
10 struct block;
11 struct macroblock;
12 struct variance_vtable;
13
14 /* Encoder forward decls */
15 struct variance_vtable;
16 union int_mv;
17 struct yv12_buffer_config;
18 EOF
19 }
20 forward_decls common_forward_decls
21
22 prototype void vp9_filter_block2d_4x4_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
23 prototype void vp9_filter_block2d_8x4_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
24 prototype void vp9_filter_block2d_8x8_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
25 prototype void vp9_filter_block2d_16x16_8 "const unsigned char *src_ptr, const unsigned int src_stride, const short *HFilter_aligned16, const short *VFilter_aligned16, unsigned char *dst_ptr, unsigned int dst_stride"
26
27 # At the very least, MSVC 2008 has compiler bug exhibited by this code; code
28 # compiles warning free but a dissassembly of generated code show bugs. To be
29 # on the safe side, only enabled when compiled with 'gcc'.
30 if [ "$CONFIG_GCC" = "yes" ]; then
31     specialize vp9_filter_block2d_4x4_8 sse4_1 sse2
32 fi
33     specialize vp9_filter_block2d_8x4_8 ssse3 #sse4_1 sse2
34     specialize vp9_filter_block2d_8x8_8 ssse3 #sse4_1 sse2
35     specialize vp9_filter_block2d_16x16_8 ssse3 #sse4_1 sse2
36
37 #
38 # Dequant
39 #
40 prototype void vp9_dequantize_b "struct blockd *x"
41 specialize vp9_dequantize_b mmx
42
43 prototype void vp9_dequantize_b_2x2 "struct blockd *x"
44 specialize vp9_dequantize_b_2x2
45
46 prototype void vp9_dequant_dc_idct_add_y_block_8x8 "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc, struct macroblockd *xd"
47 specialize vp9_dequant_dc_idct_add_y_block_8x8
48
49 prototype void vp9_dequant_idct_add_y_block_8x8 "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, struct macroblockd *xd"
50 specialize vp9_dequant_idct_add_y_block_8x8
51
52 prototype void vp9_dequant_idct_add_uv_block_8x8 "short *q, short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, char *eobs, struct macroblockd *xd"
53 specialize vp9_dequant_idct_add_uv_block_8x8
54
55 prototype void vp9_dequant_idct_add_16x16 "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
56 specialize vp9_dequant_idct_add_16x16
57
58 prototype void vp9_dequant_idct_add "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride"
59 specialize vp9_dequant_idct_add
60
61 prototype void vp9_dequant_dc_idct_add "short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride, int Dc"
62 specialize vp9_dequant_dc_idct_add
63
64 prototype void vp9_dequant_dc_idct_add_y_block "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs, short *dc"
65 specialize vp9_dequant_dc_idct_add_y_block mmx
66
67 prototype void vp9_dequant_idct_add_y_block "short *q, short *dq, unsigned char *pre, unsigned char *dst, int stride, char *eobs"
68 specialize vp9_dequant_idct_add_y_block mmx
69
70 prototype void vp9_dequant_idct_add_uv_block "short *q, short *dq, unsigned char *pre, unsigned char *dstu, unsigned char *dstv, int stride, char *eobs"
71 specialize vp9_dequant_idct_add_uv_block mmx
72
73 #
74 # RECON
75 #
76 prototype void vp9_copy_mem16x16 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
77 specialize vp9_copy_mem16x16 mmx sse2 media neon dspr2
78 vp9_copy_mem16x16_media=vp9_copy_mem16x16_v6
79 vp9_copy_mem16x16_dspr2=vp9_copy_mem16x16_dspr2
80
81 prototype void vp9_copy_mem8x8 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
82 specialize vp9_copy_mem8x8 mmx media neon dspr2
83 vp9_copy_mem8x8_media=vp9_copy_mem8x8_v6
84 vp9_copy_mem8x8_dspr2=vp9_copy_mem8x8_dspr2
85
86 prototype void vp9_copy_mem8x4 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
87 specialize vp9_copy_mem8x4 mmx
88
89 prototype void vp9_intra4x4_predict "unsigned char *Above, unsigned char *yleft, int left_stride, B_PREDICTION_MODE b_mode, unsigned char *dst, int dst_stride, unsigned char top_left"
90 specialize vp9_intra4x4_predict
91
92 prototype void vp9_avg_mem16x16 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
93 specialize vp9_avg_mem16x16
94
95 prototype void vp9_avg_mem8x8 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
96 specialize vp9_avg_mem8x8
97
98 prototype void vp9_copy_mem8x4 "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch"
99 specialize vp9_copy_mem8x4 mmx media neon dspr2
100 vp9_copy_mem8x4_media=vp9_copy_mem8x4_v6
101 vp9_copy_mem8x4_dspr2=vp9_copy_mem8x4_dspr2
102
103 prototype void vp9_recon_b "unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int stride"
104 specialize vp9_recon_b
105
106 prototype void vp9_recon_uv_b "unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int stride"
107 specialize vp9_recon_uv_b
108
109 prototype void vp9_recon2b "unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int stride"
110 specialize vp9_recon2b sse2
111
112 prototype void vp9_recon4b "unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int stride"
113 specialize vp9_recon4b sse2
114
115 prototype void vp9_recon_mb "struct macroblockd *x"
116 specialize vp9_recon_mb
117
118 prototype void vp9_recon_mby "struct macroblockd *x"
119 specialize vp9_recon_mby
120
121 prototype void vp9_build_intra_predictors_mby_s "struct macroblockd *x"
122 specialize vp9_build_intra_predictors_mby_s
123
124 prototype void vp9_build_intra_predictors_sby_s "struct macroblockd *x"
125 specialize vp9_build_intra_predictors_sby_s;
126
127 prototype void vp9_build_intra_predictors_sbuv_s "struct macroblockd *x"
128 specialize vp9_build_intra_predictors_sbuv_s;
129
130 prototype void vp9_build_intra_predictors_mby "struct macroblockd *x"
131 specialize vp9_build_intra_predictors_mby;
132
133 prototype void vp9_build_comp_intra_predictors_mby "struct macroblockd *x"
134 specialize vp9_build_comp_intra_predictors_mby;
135
136 prototype void vp9_build_intra_predictors_mby_s "struct macroblockd *x"
137 specialize vp9_build_intra_predictors_mby_s;
138
139 prototype void vp9_build_intra_predictors_mbuv "struct macroblockd *x"
140 specialize vp9_build_intra_predictors_mbuv;
141
142 prototype void vp9_build_intra_predictors_mbuv_s "struct macroblockd *x"
143 specialize vp9_build_intra_predictors_mbuv_s;
144
145 prototype void vp9_build_comp_intra_predictors_mbuv "struct macroblockd *x"
146 specialize vp9_build_comp_intra_predictors_mbuv;
147
148 prototype void vp9_intra4x4_predict "struct blockd *x, int b_mode, unsigned char *predictor"
149 specialize vp9_intra4x4_predict;
150
151 prototype void vp9_comp_intra4x4_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor"
152 specialize vp9_comp_intra4x4_predict;
153
154 prototype void vp9_intra8x8_predict "struct blockd *x, int b_mode, unsigned char *predictor"
155 specialize vp9_intra8x8_predict;
156
157 prototype void vp9_comp_intra8x8_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor"
158 specialize vp9_comp_intra8x8_predict;
159
160 prototype void vp9_intra_uv4x4_predict "struct blockd *x, int b_mode, unsigned char *predictor"
161 specialize vp9_intra_uv4x4_predict;
162
163 prototype void vp9_comp_intra_uv4x4_predict "struct blockd *x, int b_mode, int second_mode, unsigned char *predictor"
164 specialize vp9_comp_intra_uv4x4_predict;
165
166 #
167 # Loopfilter
168 #
169 prototype void vp9_loop_filter_mbv "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
170 specialize vp9_loop_filter_mbv sse2
171
172 prototype void vp9_loop_filter_bv "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
173 specialize vp9_loop_filter_bv sse2
174
175 prototype void vp9_loop_filter_bv8x8 "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
176 specialize vp9_loop_filter_bv8x8 sse2
177
178 prototype void vp9_loop_filter_mbh "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
179 specialize vp9_loop_filter_mbh sse2
180
181 prototype void vp9_loop_filter_bh "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
182 specialize vp9_loop_filter_bh sse2
183
184 prototype void vp9_loop_filter_bh8x8 "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi"
185 specialize vp9_loop_filter_bh8x8 sse2
186
187 prototype void vp9_loop_filter_simple_mbv "unsigned char *y, int ystride, const unsigned char *blimit"
188 specialize vp9_loop_filter_simple_mbv mmx sse2 media neon
189 vp9_loop_filter_simple_mbv_c=vp9_loop_filter_simple_vertical_edge_c
190 vp9_loop_filter_simple_mbv_mmx=vp9_loop_filter_simple_vertical_edge_mmx
191 vp9_loop_filter_simple_mbv_sse2=vp9_loop_filter_simple_vertical_edge_sse2
192 vp9_loop_filter_simple_mbv_media=vp9_loop_filter_simple_vertical_edge_armv6
193 vp9_loop_filter_simple_mbv_neon=vp9_loop_filter_mbvs_neon
194
195 prototype void vp9_loop_filter_simple_mbh "unsigned char *y, int ystride, const unsigned char *blimit"
196 specialize vp9_loop_filter_simple_mbh mmx sse2 media neon
197 vp9_loop_filter_simple_mbh_c=vp9_loop_filter_simple_horizontal_edge_c
198 vp9_loop_filter_simple_mbh_mmx=vp9_loop_filter_simple_horizontal_edge_mmx
199 vp9_loop_filter_simple_mbh_sse2=vp9_loop_filter_simple_horizontal_edge_sse2
200 vp9_loop_filter_simple_mbh_media=vp9_loop_filter_simple_horizontal_edge_armv6
201 vp9_loop_filter_simple_mbh_neon=vp9_loop_filter_mbhs_neon
202
203 prototype void vp9_loop_filter_simple_bv "unsigned char *y, int ystride, const unsigned char *blimit"
204 specialize vp9_loop_filter_simple_bv mmx sse2 media neon
205 vp9_loop_filter_simple_bv_c=vp9_loop_filter_bvs_c
206 vp9_loop_filter_simple_bv_mmx=vp9_loop_filter_bvs_mmx
207 vp9_loop_filter_simple_bv_sse2=vp9_loop_filter_bvs_sse2
208 vp9_loop_filter_simple_bv_media=vp9_loop_filter_bvs_armv6
209 vp9_loop_filter_simple_bv_neon=vp9_loop_filter_bvs_neon
210
211 prototype void vp9_loop_filter_simple_bh "unsigned char *y, int ystride, const unsigned char *blimit"
212 specialize vp9_loop_filter_simple_bh mmx sse2 media neon
213 vp9_loop_filter_simple_bh_c=vp9_loop_filter_bhs_c
214 vp9_loop_filter_simple_bh_mmx=vp9_loop_filter_bhs_mmx
215 vp9_loop_filter_simple_bh_sse2=vp9_loop_filter_bhs_sse2
216 vp9_loop_filter_simple_bh_media=vp9_loop_filter_bhs_armv6
217 vp9_loop_filter_simple_bh_neon=vp9_loop_filter_bhs_neon
218
219 #
220 # sad 16x3, 3x16
221 #
222 if [ "$CONFIG_NEWBESTREFMV" = "yes" ]; then
223 prototype unsigned int vp9_sad16x3 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int ref_stride, int max_sad"
224 specialize vp9_sad16x3 sse2
225
226 prototype unsigned int vp9_sad3x16 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int ref_stride, int max_sad"
227 specialize vp9_sad3x16 sse2
228 fi
229
230 #
231 # Encoder functions below this point.
232 #
233 if [ "$CONFIG_VP9_ENCODER" = "yes" ]; then
234
235
236 # variance
237 [ $arch = "x86_64" ] && mmx_x86_64=mmx && sse2_x86_64=sse2
238
239 prototype unsigned int vp9_variance32x32 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
240 specialize vp9_variance32x32
241
242 prototype unsigned int vp9_variance16x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
243 specialize vp9_variance16x16 mmx sse2
244 vp9_variance16x16_sse2=vp9_variance16x16_wmt
245 vp9_variance16x16_mmx=vp9_variance16x16_mmx
246
247 prototype unsigned int vp9_variance16x8 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
248 specialize vp9_variance16x8 mmx sse2
249 vp9_variance16x8_sse2=vp9_variance16x8_wmt
250 vp9_variance16x8_mmx=vp9_variance16x8_mmx
251
252 prototype unsigned int vp9_variance8x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
253 specialize vp9_variance8x16 mmx sse2
254 vp9_variance8x16_sse2=vp9_variance8x16_wmt
255 vp9_variance8x16_mmx=vp9_variance8x16_mmx
256
257 prototype unsigned int vp9_variance8x8 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
258 specialize vp9_variance8x8 mmx sse2
259 vp9_variance8x8_sse2=vp9_variance8x8_wmt
260 vp9_variance8x8_mmx=vp9_variance8x8_mmx
261
262 prototype unsigned int vp9_variance4x4 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
263 specialize vp9_variance4x4 mmx sse2
264 vp9_variance4x4_sse2=vp9_variance4x4_wmt
265 vp9_variance4x4_mmx=vp9_variance4x4_mmx
266
267 prototype unsigned int vp9_sub_pixel_variance32x32 "const unsigned char *src_ptr, int source_stride, int xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
268 specialize vp9_sub_pixel_variance32x32
269
270 prototype unsigned int vp9_sub_pixel_variance16x16 "const unsigned char *src_ptr, int source_stride, int xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
271 specialize vp9_sub_pixel_variance16x16 sse2 mmx ssse3
272 vp9_sub_pixel_variance16x16_sse2=vp9_sub_pixel_variance16x16_wmt
273
274 prototype unsigned int vp9_sub_pixel_variance8x16 "const unsigned char *src_ptr, int source_stride, int xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
275 specialize vp9_sub_pixel_variance8x16 sse2 mmx
276 vp9_sub_pixel_variance8x16_sse2=vp9_sub_pixel_variance8x16_wmt
277
278 prototype unsigned int vp9_sub_pixel_variance16x8 "const unsigned char *src_ptr, int source_stride, int xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
279 specialize vp9_sub_pixel_variance16x8 sse2 mmx ssse3
280 vp9_sub_pixel_variance16x8_sse2=vp9_sub_pixel_variance16x8_ssse3;
281 vp9_sub_pixel_variance16x8_sse2=vp9_sub_pixel_variance16x8_wmt
282
283 prototype unsigned int vp9_sub_pixel_variance8x8 "const unsigned char *src_ptr, int source_stride, int xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
284 specialize vp9_sub_pixel_variance8x8 sse2 mmx
285 vp9_sub_pixel_variance8x8_sse2=vp9_sub_pixel_variance8x8_wmt
286
287 prototype unsigned int vp9_sub_pixel_variance4x4 "const unsigned char *src_ptr, int source_stride, int xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
288 specialize vp9_sub_pixel_variance4x4 sse2 mmx
289 vp9_sub_pixel_variance4x4_sse2=vp9_sub_pixel_variance4x4_wmt
290
291 prototype unsigned int vp9_sad32x32 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int max_sad"
292 specialize vp9_sad32x32
293
294 prototype unsigned int vp9_sad16x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int max_sad"
295 specialize vp9_sad16x16 mmx sse2 sse3
296 vp9_sad16x16_sse2=vp9_sad16x16_wmt
297
298 prototype unsigned int vp9_sad16x8 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int max_sad"
299 specialize vp9_sad16x8 mmx sse2
300 vp9_sad16x8_sse2=vp9_sad16x8_wmt
301
302 prototype unsigned int vp9_sad8x16 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int max_sad"
303 specialize vp9_sad8x16 mmx sse2
304 vp9_sad8x16_sse2=vp9_sad8x16_wmt
305
306 prototype unsigned int vp9_sad8x8 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int max_sad"
307 specialize vp9_sad8x8 mmx sse2
308 vp9_sad8x8_sse2=vp9_sad8x8_wmt
309
310 prototype unsigned int vp9_sad4x4 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int max_sad"
311 specialize vp9_sad4x4 mmx sse2
312 vp9_sad4x4_sse2=vp9_sad4x4_wmt
313
314 prototype unsigned int vp9_variance_halfpixvar16x16_h "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
315 specialize vp9_variance_halfpixvar16x16_h mmx sse2
316 vp9_variance_halfpixvar16x16_h_sse2=vp9_variance_halfpixvar16x16_h_wmt
317
318 prototype unsigned int vp9_variance_halfpixvar16x16_v "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
319 specialize vp9_variance_halfpixvar16x16_v mmx sse2
320 vp9_variance_halfpixvar16x16_v_sse2=vp9_variance_halfpixvar16x16_v_wmt
321
322 prototype unsigned int vp9_variance_halfpixvar16x16_hv "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
323 specialize vp9_variance_halfpixvar16x16_hv mmx sse2
324 vp9_variance_halfpixvar16x16_hv_sse2=vp9_variance_halfpixvar16x16_hv_wmt
325
326 prototype unsigned int vp9_variance_halfpixvar32x32_h "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
327 specialize vp9_variance_halfpixvar32x32_h
328
329 prototype unsigned int vp9_variance_halfpixvar32x32_v "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
330 specialize vp9_variance_halfpixvar32x32_v
331
332 prototype unsigned int vp9_variance_halfpixvar32x32_hv "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse"
333 specialize vp9_variance_halfpixvar32x32_hv
334
335 prototype void vp9_sad32x32x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
336 specialize vp9_sad32x32x3
337
338 prototype void vp9_sad16x16x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
339 specialize vp9_sad16x16x3 sse3 ssse3
340
341 prototype void vp9_sad16x8x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
342 specialize vp9_sad16x8x3 sse3 ssse3
343
344 prototype void vp9_sad8x16x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
345 specialize vp9_sad8x16x3 sse3
346
347 prototype void vp9_sad8x8x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
348 specialize vp9_sad8x8x3 sse3
349
350 prototype void vp9_sad4x4x3 "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned int *sad_array"
351 specialize vp9_sad4x4x3 sse3
352
353 prototype void vp9_sad32x32x8 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
354 specialize vp9_sad32x32x8
355
356 prototype void vp9_sad16x16x8 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
357 specialize vp9_sad16x16x8 sse4
358
359 prototype void vp9_sad16x8x8 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
360 specialize vp9_sad16x8x8 sse4
361
362 prototype void vp9_sad8x16x8 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
363 specialize vp9_sad8x16x8 sse4
364
365 prototype void vp9_sad8x8x8 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
366 specialize vp9_sad8x8x8 sse4
367
368 prototype void vp9_sad4x4x8 "const unsigned char *src_ptr, int  src_stride, const unsigned char *ref_ptr, int  ref_stride, unsigned short *sad_array"
369 specialize vp9_sad4x4x8 sse4
370
371 prototype void vp9_sad32x32x4d "const unsigned char *src_ptr, int  src_stride, unsigned char *ref_ptr[], int  ref_stride, unsigned int *sad_array"
372 specialize vp9_sad32x32x4d
373
374 prototype void vp9_sad16x16x4d "const unsigned char *src_ptr, int  src_stride, unsigned char *ref_ptr[], int  ref_stride, unsigned int *sad_array"
375 specialize vp9_sad16x16x4d sse3
376
377 prototype void vp9_sad16x8x4d "const unsigned char *src_ptr, int  src_stride, unsigned char *ref_ptr[], int  ref_stride, unsigned int *sad_array"
378 specialize vp9_sad16x8x4d sse3
379
380 prototype void vp9_sad8x16x4d "const unsigned char *src_ptr, int  src_stride, unsigned char *ref_ptr[], int  ref_stride, unsigned int *sad_array"
381 specialize vp9_sad8x16x4d sse3
382
383 prototype void vp9_sad8x8x4d "const unsigned char *src_ptr, int  src_stride, unsigned char *ref_ptr[], int  ref_stride, unsigned int *sad_array"
384 specialize vp9_sad8x8x4d sse3
385
386 prototype void vp9_sad4x4x4d "const unsigned char *src_ptr, int  src_stride, unsigned char *ref_ptr[], int  ref_stride, unsigned int *sad_array"
387 specialize vp9_sad4x4x4d sse3
388
389 #
390 # Block copy
391 #
392 case $arch in
393     x86*)
394     prototype void vp9_copy32xn "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, int n"
395     specialize vp9_copy32xn sse2 sse3
396     ;;
397 esac
398
399 prototype unsigned int vp9_sub_pixel_mse16x16 "const unsigned char  *src_ptr, int  src_pixels_per_line, int  xoffset, int  yoffset, const unsigned char *dst_ptr, int dst_pixels_per_line, unsigned int *sse"
400 specialize vp9_sub_pixel_mse16x16 sse2 mmx
401 vp9_sub_pixel_mse16x16_sse2=vp9_sub_pixel_mse16x16_wmt
402
403 prototype unsigned int vp9_mse16x16 "const unsigned char *src_ptr, int  source_stride, const unsigned char *ref_ptr, int  recon_stride, unsigned int *sse"
404 specialize vp9_mse16x16 mmx sse2
405 vp9_mse16x16_sse2=vp9_mse16x16_wmt
406
407 prototype unsigned int vp9_sub_pixel_mse32x32 "const unsigned char  *src_ptr, int  source_stride, int  xoffset, int  yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse"
408 specialize vp9_sub_pixel_mse32x32
409
410 prototype unsigned int vp9_get_mb_ss "const short *"
411 specialize vp9_get_mb_ss mmx sse2
412 # ENCODEMB INVOKE
413 prototype int vp9_mbblock_error "struct macroblock *mb, int dc"
414 specialize vp9_mbblock_error mmx sse2
415 vp9_mbblock_error_sse2=vp9_mbblock_error_xmm
416
417 prototype int vp9_block_error "short *coeff, short *dqcoeff, int block_size"
418 specialize vp9_block_error mmx sse2
419 vp9_block_error_sse2=vp9_block_error_xmm
420
421 prototype void vp9_subtract_b "struct block *be, struct blockd *bd, int pitch"
422 specialize vp9_subtract_b mmx sse2
423
424 prototype int vp9_mbuverror "struct macroblock *mb"
425 specialize vp9_mbuverror mmx sse2
426 vp9_mbuverror_sse2=vp9_mbuverror_xmm
427
428 prototype void vp9_subtract_b "struct block *be, struct blockd *bd, int pitch"
429 specialize vp9_subtract_b mmx sse2
430
431 prototype void vp9_subtract_mby "short *diff, unsigned char *src, unsigned char *pred, int stride"
432 specialize vp9_subtract_mby mmx sse2
433
434 prototype void vp9_subtract_mbuv "short *diff, unsigned char *usrc, unsigned char *vsrc, unsigned char *pred, int stride"
435 specialize vp9_subtract_mbuv mmx sse2
436
437 #
438 # Structured Similarity (SSIM)
439 #
440 if [ "$CONFIG_INTERNAL_STATS" = "yes" ]; then
441     [ $arch = "x86_64" ] && sse2_on_x86_64=sse2
442
443     prototype void vp9_ssim_parms_8x8 "unsigned char *s, int sp, unsigned char *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"
444     specialize vp9_ssim_parms_8x8 $sse2_on_x86_64
445
446     prototype void vp9_ssim_parms_16x16 "unsigned char *s, int sp, unsigned char *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"
447     specialize vp9_ssim_parms_16x16 $sse2_on_x86_64
448 fi
449
450 # fdct functions
451 prototype void vp9_fht "const short *input, int pitch, short *output, int tx_type, int tx_dim"
452 specialize vp9_fht
453
454 prototype void vp9_short_fdct8x8 "short *InputData, short *OutputData, int pitch"
455 specialize vp9_short_fdct8x8
456
457 prototype void vp9_short_fhaar2x2 "short *InputData, short *OutputData, int pitch"
458 specialize vp9_short_fhaar2x2
459
460 prototype void vp9_short_fdct4x4 "short *InputData, short *OutputData, int pitch"
461 specialize vp9_short_fdct4x4
462
463 prototype void vp9_short_fdct8x4 "short *InputData, short *OutputData, int pitch"
464 specialize vp9_short_fdct8x4
465
466 prototype void vp9_short_walsh4x4 "short *InputData, short *OutputData, int pitch"
467 specialize vp9_short_walsh4x4
468
469 prototype void vp9_short_fdct16x16 "short *InputData, short *OutputData, int pitch"
470 specialize vp9_short_fdct16x16
471
472 prototype void vp9_short_walsh4x4_lossless "short *InputData, short *OutputData, int pitch"
473 specialize vp9_short_walsh4x4_lossless
474
475 prototype void vp9_short_walsh4x4_x8 "short *InputData, short *OutputData, int pitch"
476 specialize vp9_short_walsh4x4_x8
477
478 prototype void vp9_short_walsh8x4_x8 "short *InputData, short *OutputData, int pitch"
479 specialize vp9_short_walsh8x4_x8
480
481 fi
482 # end encoder functions
483
484 # Scaler functions
485 if [ "CONFIG_SPATIAL_RESAMPLING" != "yes" ]; then
486     prototype void vp8_horizontal_line_4_5_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
487     prototype void vp8_vertical_band_4_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
488     prototype void vp8_last_vertical_band_4_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
489     prototype void vp8_horizontal_line_2_3_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
490     prototype void vp8_vertical_band_2_3_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
491     prototype void vp8_last_vertical_band_2_3_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
492     prototype void vp8_horizontal_line_3_5_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
493     prototype void vp8_vertical_band_3_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
494     prototype void vp8_last_vertical_band_3_5_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
495     prototype void vp8_horizontal_line_3_4_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
496     prototype void vp8_vertical_band_3_4_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
497     prototype void vp8_last_vertical_band_3_4_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
498     prototype void vp8_horizontal_line_1_2_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
499     prototype void vp8_vertical_band_1_2_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
500     prototype void vp8_last_vertical_band_1_2_scale "unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
501     prototype void vp8_horizontal_line_5_4_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
502     prototype void vp8_vertical_band_5_4_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
503     prototype void vp8_horizontal_line_5_3_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
504     prototype void vp8_vertical_band_5_3_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
505     prototype void vp8_horizontal_line_2_1_scale "const unsigned char *source, unsigned int source_width, unsigned char *dest, unsigned int dest_width"
506     prototype void vp8_vertical_band_2_1_scale "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
507     prototype void vp8_vertical_band_2_1_scale_i "unsigned char *source, unsigned int src_pitch, unsigned char *dest, unsigned int dest_pitch, unsigned int dest_width"
508 fi
509
510 prototype void vp8_yv12_extend_frame_borders "struct yv12_buffer_config *ybf"
511 specialize vp8_yv12_extend_frame_borders neon
512
513 prototype void vp8_yv12_copy_frame "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"
514 specialize vp8_yv12_copy_frame neon
515
516 prototype void vp8_yv12_copy_y "struct yv12_buffer_config *src_ybc, struct yv12_buffer_config *dst_ybc"
517 specialize vp8_yv12_copy_y neon
518