1##
2##  Copyright (c) 2017 The WebM project authors. All Rights Reserved.
3##
4##  Use of this source code is governed by a BSD-style license
5##  that can be found in the LICENSE file in the root of the source
6##  tree. An additional intellectual property rights grant can be found
7##  in the file PATENTS.  All contributing project authors may
8##  be found in the AUTHORS file in the root of the source tree.
9##
10
11sub vp8_common_forward_decls() {
12print <<EOF
13/*
14 * VP8
15 */
16
17struct blockd;
18struct macroblockd;
19struct loop_filter_info;
20
21/* Encoder forward decls */
22struct block;
23struct macroblock;
24struct variance_vtable;
25union int_mv;
26struct yv12_buffer_config;
27EOF
28}
29forward_decls qw/vp8_common_forward_decls/;
30
31#
32# Dequant
33#
34add_proto qw/void vp8_dequantize_b/, "struct blockd*, short *DQC";
35specialize qw/vp8_dequantize_b mmx neon msa mmi/;
36
37add_proto qw/void vp8_dequant_idct_add/, "short *input, short *dq, unsigned char *dest, int stride";
38specialize qw/vp8_dequant_idct_add mmx neon dspr2 msa mmi/;
39
40add_proto qw/void vp8_dequant_idct_add_y_block/, "short *q, short *dq, unsigned char *dst, int stride, char *eobs";
41specialize qw/vp8_dequant_idct_add_y_block sse2 neon dspr2 msa mmi/;
42
43add_proto qw/void vp8_dequant_idct_add_uv_block/, "short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs";
44specialize qw/vp8_dequant_idct_add_uv_block sse2 neon dspr2 msa mmi/;
45
46#
47# Loopfilter
48#
49add_proto qw/void vp8_loop_filter_mbv/, "unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr, int y_stride, int uv_stride, struct loop_filter_info *lfi";
50specialize qw/vp8_loop_filter_mbv sse2 neon dspr2 msa mmi/;
51
52add_proto qw/void vp8_loop_filter_bv/, "unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr, int y_stride, int uv_stride, struct loop_filter_info *lfi";
53specialize qw/vp8_loop_filter_bv sse2 neon dspr2 msa mmi/;
54
55add_proto qw/void vp8_loop_filter_mbh/, "unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr, int y_stride, int uv_stride, struct loop_filter_info *lfi";
56specialize qw/vp8_loop_filter_mbh sse2 neon dspr2 msa mmi/;
57
58add_proto qw/void vp8_loop_filter_bh/, "unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr, int y_stride, int uv_stride, struct loop_filter_info *lfi";
59specialize qw/vp8_loop_filter_bh sse2 neon dspr2 msa mmi/;
60
61
62add_proto qw/void vp8_loop_filter_simple_mbv/, "unsigned char *y_ptr, int y_stride, const unsigned char *blimit";
63specialize qw/vp8_loop_filter_simple_mbv sse2 neon msa mmi/;
64$vp8_loop_filter_simple_mbv_c=vp8_loop_filter_simple_vertical_edge_c;
65$vp8_loop_filter_simple_mbv_sse2=vp8_loop_filter_simple_vertical_edge_sse2;
66$vp8_loop_filter_simple_mbv_neon=vp8_loop_filter_mbvs_neon;
67$vp8_loop_filter_simple_mbv_msa=vp8_loop_filter_simple_vertical_edge_msa;
68$vp8_loop_filter_simple_mbv_mmi=vp8_loop_filter_simple_vertical_edge_mmi;
69
70add_proto qw/void vp8_loop_filter_simple_mbh/, "unsigned char *y_ptr, int y_stride, const unsigned char *blimit";
71specialize qw/vp8_loop_filter_simple_mbh sse2 neon msa mmi/;
72$vp8_loop_filter_simple_mbh_c=vp8_loop_filter_simple_horizontal_edge_c;
73$vp8_loop_filter_simple_mbh_sse2=vp8_loop_filter_simple_horizontal_edge_sse2;
74$vp8_loop_filter_simple_mbh_neon=vp8_loop_filter_mbhs_neon;
75$vp8_loop_filter_simple_mbh_msa=vp8_loop_filter_simple_horizontal_edge_msa;
76$vp8_loop_filter_simple_mbh_mmi=vp8_loop_filter_simple_horizontal_edge_mmi;
77
78add_proto qw/void vp8_loop_filter_simple_bv/, "unsigned char *y_ptr, int y_stride, const unsigned char *blimit";
79specialize qw/vp8_loop_filter_simple_bv sse2 neon msa mmi/;
80$vp8_loop_filter_simple_bv_c=vp8_loop_filter_bvs_c;
81$vp8_loop_filter_simple_bv_sse2=vp8_loop_filter_bvs_sse2;
82$vp8_loop_filter_simple_bv_neon=vp8_loop_filter_bvs_neon;
83$vp8_loop_filter_simple_bv_msa=vp8_loop_filter_bvs_msa;
84$vp8_loop_filter_simple_bv_mmi=vp8_loop_filter_bvs_mmi;
85
86add_proto qw/void vp8_loop_filter_simple_bh/, "unsigned char *y_ptr, int y_stride, const unsigned char *blimit";
87specialize qw/vp8_loop_filter_simple_bh sse2 neon msa mmi/;
88$vp8_loop_filter_simple_bh_c=vp8_loop_filter_bhs_c;
89$vp8_loop_filter_simple_bh_sse2=vp8_loop_filter_bhs_sse2;
90$vp8_loop_filter_simple_bh_neon=vp8_loop_filter_bhs_neon;
91$vp8_loop_filter_simple_bh_msa=vp8_loop_filter_bhs_msa;
92$vp8_loop_filter_simple_bh_mmi=vp8_loop_filter_bhs_mmi;
93
94#
95# IDCT
96#
97#idct16
98add_proto qw/void vp8_short_idct4x4llm/, "short *input, unsigned char *pred_ptr, int pred_stride, unsigned char *dst_ptr, int dst_stride";
99specialize qw/vp8_short_idct4x4llm mmx neon dspr2 msa mmi/;
100
101#iwalsh1
102add_proto qw/void vp8_short_inv_walsh4x4_1/, "short *input, short *mb_dqcoeff";
103specialize qw/vp8_short_inv_walsh4x4_1 dspr2/;
104
105#iwalsh16
106add_proto qw/void vp8_short_inv_walsh4x4/, "short *input, short *mb_dqcoeff";
107specialize qw/vp8_short_inv_walsh4x4 sse2 neon dspr2 msa mmi/;
108
109#idct1_scalar_add
110add_proto qw/void vp8_dc_only_idct_add/, "short input_dc, unsigned char *pred_ptr, int pred_stride, unsigned char *dst_ptr, int dst_stride";
111specialize qw/vp8_dc_only_idct_add mmx neon dspr2 msa mmi/;
112
113#
114# RECON
115#
116add_proto qw/void vp8_copy_mem16x16/, "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride";
117specialize qw/vp8_copy_mem16x16 sse2 neon dspr2 msa mmi/;
118
119add_proto qw/void vp8_copy_mem8x8/, "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride";
120specialize qw/vp8_copy_mem8x8 mmx neon dspr2 msa mmi/;
121
122add_proto qw/void vp8_copy_mem8x4/, "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride";
123specialize qw/vp8_copy_mem8x4 mmx neon dspr2 msa mmi/;
124
125#
126# Postproc
127#
128if (vpx_config("CONFIG_POSTPROC") eq "yes") {
129
130    add_proto qw/void vp8_blend_mb_inner/, "unsigned char *y, unsigned char *u, unsigned char *v, int y_1, int u_1, int v_1, int alpha, int stride";
131
132    add_proto qw/void vp8_blend_mb_outer/, "unsigned char *y, unsigned char *u, unsigned char *v, int y_1, int u_1, int v_1, int alpha, int stride";
133
134    add_proto qw/void vp8_blend_b/, "unsigned char *y, unsigned char *u, unsigned char *v, int y_1, int u_1, int v_1, int alpha, int stride";
135
136    add_proto qw/void vp8_filter_by_weight16x16/, "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight";
137    specialize qw/vp8_filter_by_weight16x16 sse2 msa/;
138
139    add_proto qw/void vp8_filter_by_weight8x8/, "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight";
140    specialize qw/vp8_filter_by_weight8x8 sse2 msa/;
141
142    add_proto qw/void vp8_filter_by_weight4x4/, "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight";
143}
144
145#
146# Subpixel
147#
148add_proto qw/void vp8_sixtap_predict16x16/, "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch";
149specialize qw/vp8_sixtap_predict16x16 sse2 ssse3 neon dspr2 msa mmi/;
150
151add_proto qw/void vp8_sixtap_predict8x8/, "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch";
152specialize qw/vp8_sixtap_predict8x8 sse2 ssse3 neon dspr2 msa mmi/;
153
154add_proto qw/void vp8_sixtap_predict8x4/, "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch";
155specialize qw/vp8_sixtap_predict8x4 sse2 ssse3 neon dspr2 msa mmi/;
156
157add_proto qw/void vp8_sixtap_predict4x4/, "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch";
158specialize qw/vp8_sixtap_predict4x4 mmx ssse3 neon dspr2 msa mmi/;
159
160add_proto qw/void vp8_bilinear_predict16x16/, "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch";
161specialize qw/vp8_bilinear_predict16x16 sse2 ssse3 neon msa/;
162
163add_proto qw/void vp8_bilinear_predict8x8/, "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch";
164specialize qw/vp8_bilinear_predict8x8 sse2 ssse3 neon msa/;
165
166add_proto qw/void vp8_bilinear_predict8x4/, "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch";
167specialize qw/vp8_bilinear_predict8x4 sse2 neon msa/;
168
169add_proto qw/void vp8_bilinear_predict4x4/, "unsigned char *src_ptr, int src_pixels_per_line, int xoffset, int yoffset, unsigned char *dst_ptr, int dst_pitch";
170specialize qw/vp8_bilinear_predict4x4 sse2 neon msa/;
171
172#
173# Encoder functions below this point.
174#
175if (vpx_config("CONFIG_VP8_ENCODER") eq "yes") {
176
177#
178# Block copy
179#
180add_proto qw/void vp8_copy32xn/, "const unsigned char *src_ptr, int src_stride, unsigned char *dst_ptr, int dst_stride, int height";
181specialize qw/vp8_copy32xn sse2 sse3/;
182
183#
184# Forward DCT
185#
186add_proto qw/void vp8_short_fdct4x4/, "short *input, short *output, int pitch";
187specialize qw/vp8_short_fdct4x4 sse2 neon msa mmi/;
188
189add_proto qw/void vp8_short_fdct8x4/, "short *input, short *output, int pitch";
190specialize qw/vp8_short_fdct8x4 sse2 neon msa mmi/;
191
192add_proto qw/void vp8_short_walsh4x4/, "short *input, short *output, int pitch";
193specialize qw/vp8_short_walsh4x4 sse2 neon msa mmi/;
194
195#
196# Quantizer
197#
198add_proto qw/void vp8_regular_quantize_b/, "struct block *, struct blockd *";
199specialize qw/vp8_regular_quantize_b sse2 sse4_1 msa mmi/;
200
201add_proto qw/void vp8_fast_quantize_b/, "struct block *, struct blockd *";
202specialize qw/vp8_fast_quantize_b sse2 ssse3 neon msa mmi/;
203
204#
205# Block subtraction
206#
207add_proto qw/int vp8_block_error/, "short *coeff, short *dqcoeff";
208specialize qw/vp8_block_error sse2 msa/;
209
210add_proto qw/int vp8_mbblock_error/, "struct macroblock *mb, int dc";
211specialize qw/vp8_mbblock_error sse2 msa/;
212
213add_proto qw/int vp8_mbuverror/, "struct macroblock *mb";
214specialize qw/vp8_mbuverror sse2 msa/;
215
216#
217# Motion search
218#
219add_proto qw/int vp8_full_search_sad/, "struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int sad_per_bit, int distance, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv";
220specialize qw/vp8_full_search_sad sse3 sse4_1/;
221$vp8_full_search_sad_sse3=vp8_full_search_sadx3;
222$vp8_full_search_sad_sse4_1=vp8_full_search_sadx8;
223
224add_proto qw/int vp8_refining_search_sad/, "struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, int error_per_bit, int search_range, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv";
225specialize qw/vp8_refining_search_sad sse2 msa/;
226$vp8_refining_search_sad_sse2=vp8_refining_search_sadx4;
227$vp8_refining_search_sad_msa=vp8_refining_search_sadx4;
228
229add_proto qw/int vp8_diamond_search_sad/, "struct macroblock *x, struct block *b, struct blockd *d, union int_mv *ref_mv, union int_mv *best_mv, int search_param, int sad_per_bit, int *num00, struct variance_vtable *fn_ptr, int *mvcost[2], union int_mv *center_mv";
230specialize qw/vp8_diamond_search_sad sse2 msa/;
231$vp8_diamond_search_sad_sse2=vp8_diamond_search_sadx4;
232$vp8_diamond_search_sad_msa=vp8_diamond_search_sadx4;
233
234#
235# Alt-ref Noise Reduction (ARNR)
236#
237if (vpx_config("CONFIG_REALTIME_ONLY") ne "yes") {
238    add_proto qw/void vp8_temporal_filter_apply/, "unsigned char *frame1, unsigned int stride, unsigned char *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, unsigned short *count";
239    specialize qw/vp8_temporal_filter_apply sse2 msa/;
240}
241
242#
243# Denoiser filter
244#
245if (vpx_config("CONFIG_TEMPORAL_DENOISING") eq "yes") {
246    add_proto qw/int vp8_denoiser_filter/, "unsigned char *mc_running_avg_y, int mc_avg_y_stride, unsigned char *running_avg_y, int avg_y_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising";
247    specialize qw/vp8_denoiser_filter sse2 neon msa/;
248    add_proto qw/int vp8_denoiser_filter_uv/, "unsigned char *mc_running_avg, int mc_avg_stride, unsigned char *running_avg, int avg_stride, unsigned char *sig, int sig_stride, unsigned int motion_magnitude, int increase_denoising";
249    specialize qw/vp8_denoiser_filter_uv sse2 neon msa/;
250}
251
252# End of encoder only functions
253}
2541;
255