]> granicus.if.org Git - libvpx/blob - vp10/common/vp10_rtcd_defs.pl
Merge "build: modify default ARFLAGS / .a target"
[libvpx] / vp10 / common / vp10_rtcd_defs.pl
1 sub vp10_common_forward_decls() {
2 print <<EOF
3 /*
4  * VP10
5  */
6
7 #include "vpx/vpx_integer.h"
8 #include "vp10/common/common.h"
9 #include "vp10/common/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/vp10_common_forward_decls/;
23
24 # x86inc.asm had specific constraints. break it out so it's easy to disable.
25 # zero all the variables to avoid tricky else conditions.
26 $mmx_x86inc = $sse_x86inc = $sse2_x86inc = $ssse3_x86inc = $avx_x86inc =
27   $avx2_x86inc = '';
28 $mmx_x86_64_x86inc = $sse_x86_64_x86inc = $sse2_x86_64_x86inc =
29   $ssse3_x86_64_x86inc = $avx_x86_64_x86inc = $avx2_x86_64_x86inc = '';
30 if (vpx_config("CONFIG_USE_X86INC") eq "yes") {
31   $mmx_x86inc = 'mmx';
32   $sse_x86inc = 'sse';
33   $sse2_x86inc = 'sse2';
34   $ssse3_x86inc = 'ssse3';
35   $avx_x86inc = 'avx';
36   $avx2_x86inc = 'avx2';
37   if ($opts{arch} eq "x86_64") {
38     $mmx_x86_64_x86inc = 'mmx';
39     $sse_x86_64_x86inc = 'sse';
40     $sse2_x86_64_x86inc = 'sse2';
41     $ssse3_x86_64_x86inc = 'ssse3';
42     $avx_x86_64_x86inc = 'avx';
43     $avx2_x86_64_x86inc = 'avx2';
44   }
45 }
46
47 # functions that are 64 bit only.
48 $mmx_x86_64 = $sse2_x86_64 = $ssse3_x86_64 = $avx_x86_64 = $avx2_x86_64 = '';
49 if ($opts{arch} eq "x86_64") {
50   $mmx_x86_64 = 'mmx';
51   $sse2_x86_64 = 'sse2';
52   $ssse3_x86_64 = 'ssse3';
53   $avx_x86_64 = 'avx';
54   $avx2_x86_64 = 'avx2';
55 }
56
57 #
58 # post proc
59 #
60 if (vpx_config("CONFIG_VP9_POSTPROC") eq "yes") {
61 add_proto qw/void vp10_mbpost_proc_down/, "uint8_t *dst, int pitch, int rows, int cols, int flimit";
62 specialize qw/vp10_mbpost_proc_down sse2/;
63 $vp10_mbpost_proc_down_sse2=vp10_mbpost_proc_down_xmm;
64
65 add_proto qw/void vp10_mbpost_proc_across_ip/, "uint8_t *src, int pitch, int rows, int cols, int flimit";
66 specialize qw/vp10_mbpost_proc_across_ip sse2/;
67 $vp10_mbpost_proc_across_ip_sse2=vp10_mbpost_proc_across_ip_xmm;
68
69 add_proto qw/void vp10_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";
70 specialize qw/vp10_post_proc_down_and_across sse2/;
71 $vp10_post_proc_down_and_across_sse2=vp10_post_proc_down_and_across_xmm;
72
73 add_proto qw/void vp10_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";
74 specialize qw/vp10_plane_add_noise sse2/;
75 $vp10_plane_add_noise_sse2=vp10_plane_add_noise_wmt;
76
77 add_proto qw/void vp10_filter_by_weight16x16/, "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight";
78 specialize qw/vp10_filter_by_weight16x16 sse2 msa/;
79
80 add_proto qw/void vp10_filter_by_weight8x8/, "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight";
81 specialize qw/vp10_filter_by_weight8x8 sse2 msa/;
82 }
83
84 #
85 # dct
86 #
87 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
88   # Note as optimized versions of these functions are added we need to add a check to ensure
89   # that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only.
90   add_proto qw/void vp10_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
91   specialize qw/vp10_iht4x4_16_add/;
92
93   add_proto qw/void vp10_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
94   specialize qw/vp10_iht8x8_64_add/;
95
96   add_proto qw/void vp10_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type";
97   specialize qw/vp10_iht16x16_256_add/;
98
99   add_proto qw/void vp10_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride";
100   specialize qw/vp10_fdct4x4 sse2/;
101
102   add_proto qw/void vp10_fdct4x4_1/, "const int16_t *input, tran_low_t *output, int stride";
103   specialize qw/vp10_fdct4x4_1 sse2/;
104
105   add_proto qw/void vp10_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride";
106   specialize qw/vp10_fdct8x8 sse2/;
107
108   add_proto qw/void vp10_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride";
109   specialize qw/vp10_fdct8x8_1 sse2/;
110
111   add_proto qw/void vp10_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride";
112   specialize qw/vp10_fdct16x16 sse2/;
113
114   add_proto qw/void vp10_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride";
115   specialize qw/vp10_fdct16x16_1 sse2/;
116
117   add_proto qw/void vp10_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride";
118   specialize qw/vp10_fdct32x32 sse2/;
119
120   add_proto qw/void vp10_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride";
121   specialize qw/vp10_fdct32x32_rd sse2/;
122
123   add_proto qw/void vp10_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride";
124   specialize qw/vp10_fdct32x32_1 sse2/;
125
126   add_proto qw/void vp10_highbd_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride";
127   specialize qw/vp10_highbd_fdct4x4 sse2/;
128
129   add_proto qw/void vp10_highbd_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride";
130   specialize qw/vp10_highbd_fdct8x8 sse2/;
131
132   add_proto qw/void vp10_highbd_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride";
133   specialize qw/vp10_highbd_fdct8x8_1/;
134
135   add_proto qw/void vp10_highbd_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride";
136   specialize qw/vp10_highbd_fdct16x16 sse2/;
137
138   add_proto qw/void vp10_highbd_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride";
139   specialize qw/vp10_highbd_fdct16x16_1/;
140
141   add_proto qw/void vp10_highbd_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride";
142   specialize qw/vp10_highbd_fdct32x32 sse2/;
143
144   add_proto qw/void vp10_highbd_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride";
145   specialize qw/vp10_highbd_fdct32x32_rd sse2/;
146
147   add_proto qw/void vp10_highbd_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride";
148   specialize qw/vp10_highbd_fdct32x32_1/;
149 } else {
150   # Force C versions if CONFIG_EMULATE_HARDWARE is 1
151   if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") {
152     add_proto qw/void vp10_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
153     specialize qw/vp10_iht4x4_16_add/;
154
155     add_proto qw/void vp10_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
156     specialize qw/vp10_iht8x8_64_add/;
157
158     add_proto qw/void vp10_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type";
159     specialize qw/vp10_iht16x16_256_add/;
160
161     add_proto qw/void vp10_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride";
162     specialize qw/vp10_fdct4x4/;
163
164     add_proto qw/void vp10_fdct4x4_1/, "const int16_t *input, tran_low_t *output, int stride";
165     specialize qw/vp10_fdct4x4_1/;
166
167     add_proto qw/void vp10_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride";
168     specialize qw/vp10_fdct8x8/;
169
170     add_proto qw/void vp10_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride";
171     specialize qw/vp10_fdct8x8_1/;
172
173     add_proto qw/void vp10_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride";
174     specialize qw/vp10_fdct16x16/;
175
176     add_proto qw/void vp10_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride";
177     specialize qw/vp10_fdct16x16_1/;
178
179     add_proto qw/void vp10_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride";
180     specialize qw/vp10_fdct32x32/;
181
182     add_proto qw/void vp10_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride";
183     specialize qw/vp10_fdct32x32_rd/;
184
185     add_proto qw/void vp10_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride";
186     specialize qw/vp10_fdct32x32_1/;
187   } else {
188     add_proto qw/void vp10_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
189     specialize qw/vp10_iht4x4_16_add sse2 neon dspr2 msa/;
190
191     add_proto qw/void vp10_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type";
192     specialize qw/vp10_iht8x8_64_add sse2 neon dspr2 msa/;
193
194     add_proto qw/void vp10_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type";
195     specialize qw/vp10_iht16x16_256_add sse2 dspr2 msa/;
196
197     add_proto qw/void vp10_fdct4x4/, "const int16_t *input, tran_low_t *output, int stride";
198     specialize qw/vp10_fdct4x4 sse2/;
199
200     add_proto qw/void vp10_fdct4x4_1/, "const int16_t *input, tran_low_t *output, int stride";
201     specialize qw/vp10_fdct4x4_1 sse2/;
202
203     add_proto qw/void vp10_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride";
204     specialize qw/vp10_fdct8x8 sse2/;
205
206     add_proto qw/void vp10_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride";
207     specialize qw/vp10_fdct8x8_1 sse2/;
208
209     add_proto qw/void vp10_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride";
210     specialize qw/vp10_fdct16x16 sse2/;
211
212     add_proto qw/void vp10_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride";
213     specialize qw/vp10_fdct16x16_1 sse2/;
214
215     add_proto qw/void vp10_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride";
216     specialize qw/vp10_fdct32x32 sse2/;
217
218     add_proto qw/void vp10_fdct32x32_rd/, "const int16_t *input, tran_low_t *output, int stride";
219     specialize qw/vp10_fdct32x32_rd sse2/;
220
221     add_proto qw/void vp10_fdct32x32_1/, "const int16_t *input, tran_low_t *output, int stride";
222     specialize qw/vp10_fdct32x32_1 sse2/;
223   }
224 }
225
226 # High bitdepth functions
227 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
228   #
229   # Sub Pixel Filters
230   #
231   add_proto qw/void vp10_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";
232   specialize qw/vp10_highbd_convolve_copy/;
233
234   add_proto qw/void vp10_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";
235   specialize qw/vp10_highbd_convolve_avg/;
236
237   add_proto qw/void vp10_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";
238   specialize qw/vp10_highbd_convolve8/, "$sse2_x86_64";
239
240   add_proto qw/void vp10_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";
241   specialize qw/vp10_highbd_convolve8_horiz/, "$sse2_x86_64";
242
243   add_proto qw/void vp10_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";
244   specialize qw/vp10_highbd_convolve8_vert/, "$sse2_x86_64";
245
246   add_proto qw/void vp10_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";
247   specialize qw/vp10_highbd_convolve8_avg/, "$sse2_x86_64";
248
249   add_proto qw/void vp10_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";
250   specialize qw/vp10_highbd_convolve8_avg_horiz/, "$sse2_x86_64";
251
252   add_proto qw/void vp10_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";
253   specialize qw/vp10_highbd_convolve8_avg_vert/, "$sse2_x86_64";
254
255   #
256   # post proc
257   #
258   if (vpx_config("CONFIG_VP9_POSTPROC") eq "yes") {
259     add_proto qw/void vp10_highbd_mbpost_proc_down/, "uint16_t *dst, int pitch, int rows, int cols, int flimit";
260     specialize qw/vp10_highbd_mbpost_proc_down/;
261
262     add_proto qw/void vp10_highbd_mbpost_proc_across_ip/, "uint16_t *src, int pitch, int rows, int cols, int flimit";
263     specialize qw/vp10_highbd_mbpost_proc_across_ip/;
264
265     add_proto qw/void vp10_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";
266     specialize qw/vp10_highbd_post_proc_down_and_across/;
267
268     add_proto qw/void vp10_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";
269     specialize qw/vp10_highbd_plane_add_noise/;
270   }
271
272   #
273   # dct
274   #
275   # Note as optimized versions of these functions are added we need to add a check to ensure
276   # that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only.
277   add_proto qw/void vp10_highbd_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type, int bd";
278   specialize qw/vp10_highbd_iht4x4_16_add/;
279
280   add_proto qw/void vp10_highbd_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int tx_type, int bd";
281   specialize qw/vp10_highbd_iht8x8_64_add/;
282
283   add_proto qw/void vp10_highbd_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd";
284   specialize qw/vp10_highbd_iht16x16_256_add/;
285 }
286
287 #
288 # Encoder functions below this point.
289 #
290 if (vpx_config("CONFIG_VP10_ENCODER") eq "yes") {
291
292 add_proto qw/unsigned int vp10_avg_8x8/, "const uint8_t *, int p";
293 specialize qw/vp10_avg_8x8 sse2 neon msa/;
294
295 add_proto qw/unsigned int vp10_avg_4x4/, "const uint8_t *, int p";
296 specialize qw/vp10_avg_4x4 sse2 msa/;
297
298 add_proto qw/void vp10_minmax_8x8/, "const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max";
299 specialize qw/vp10_minmax_8x8 sse2/;
300
301 add_proto qw/void vp10_hadamard_8x8/, "int16_t const *src_diff, int src_stride, int16_t *coeff";
302 specialize qw/vp10_hadamard_8x8 sse2/, "$ssse3_x86_64_x86inc";
303
304 add_proto qw/void vp10_hadamard_16x16/, "int16_t const *src_diff, int src_stride, int16_t *coeff";
305 specialize qw/vp10_hadamard_16x16 sse2/;
306
307 add_proto qw/int16_t vp10_satd/, "const int16_t *coeff, int length";
308 specialize qw/vp10_satd sse2/;
309
310 add_proto qw/void vp10_int_pro_row/, "int16_t *hbuf, uint8_t const *ref, const int ref_stride, const int height";
311 specialize qw/vp10_int_pro_row sse2 neon/;
312
313 add_proto qw/int16_t vp10_int_pro_col/, "uint8_t const *ref, const int width";
314 specialize qw/vp10_int_pro_col sse2 neon/;
315
316 add_proto qw/int vp10_vector_var/, "int16_t const *ref, int16_t const *src, const int bwl";
317 specialize qw/vp10_vector_var neon sse2/;
318
319 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
320   add_proto qw/unsigned int vp10_highbd_avg_8x8/, "const uint8_t *, int p";
321   specialize qw/vp10_highbd_avg_8x8/;
322   add_proto qw/unsigned int vp10_highbd_avg_4x4/, "const uint8_t *, int p";
323   specialize qw/vp10_highbd_avg_4x4/;
324   add_proto qw/void vp10_highbd_minmax_8x8/, "const uint8_t *s, int p, const uint8_t *d, int dp, int *min, int *max";
325   specialize qw/vp10_highbd_minmax_8x8/;
326 }
327
328 # ENCODEMB INVOKE
329
330 #
331 # Denoiser
332 #
333 if (vpx_config("CONFIG_VP9_TEMPORAL_DENOISING") eq "yes") {
334   add_proto qw/int vp10_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";
335   specialize qw/vp10_denoiser_filter sse2/;
336 }
337
338 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
339 # the transform coefficients are held in 32-bit
340 # values, so the assembler code for  vp10_block_error can no longer be used.
341   add_proto qw/int64_t vp10_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz";
342   specialize qw/vp10_block_error/;
343
344   add_proto qw/void vp10_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";
345   specialize qw/vp10_quantize_fp/;
346
347   add_proto qw/void vp10_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";
348   specialize qw/vp10_quantize_fp_32x32/;
349
350   add_proto qw/void vp10_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";
351   specialize qw/vp10_fdct8x8_quant/;
352 } else {
353   add_proto qw/int64_t vp10_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz";
354   specialize qw/vp10_block_error avx2 msa/, "$sse2_x86inc";
355
356   add_proto qw/int64_t vp10_block_error_fp/, "const int16_t *coeff, const int16_t *dqcoeff, int block_size";
357   specialize qw/vp10_block_error_fp neon/, "$sse2_x86inc";
358
359   add_proto qw/void vp10_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";
360   specialize qw/vp10_quantize_fp neon sse2/, "$ssse3_x86_64_x86inc";
361
362   add_proto qw/void vp10_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";
363   specialize qw/vp10_quantize_fp_32x32/, "$ssse3_x86_64_x86inc";
364
365   add_proto qw/void vp10_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";
366   specialize qw/vp10_fdct8x8_quant sse2 ssse3 neon/;
367 }
368
369 # fdct functions
370
371 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
372   add_proto qw/void vp10_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
373   specialize qw/vp10_fht4x4 sse2/;
374
375   add_proto qw/void vp10_fht8x8/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
376   specialize qw/vp10_fht8x8 sse2/;
377
378   add_proto qw/void vp10_fht16x16/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
379   specialize qw/vp10_fht16x16 sse2/;
380
381   add_proto qw/void vp10_fwht4x4/, "const int16_t *input, tran_low_t *output, int stride";
382   specialize qw/vp10_fwht4x4/, "$mmx_x86inc";
383 } else {
384   add_proto qw/void vp10_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
385   specialize qw/vp10_fht4x4 sse2 msa/;
386
387   add_proto qw/void vp10_fht8x8/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
388   specialize qw/vp10_fht8x8 sse2 msa/;
389
390   add_proto qw/void vp10_fht16x16/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
391   specialize qw/vp10_fht16x16 sse2 msa/;
392
393   add_proto qw/void vp10_fwht4x4/, "const int16_t *input, tran_low_t *output, int stride";
394   specialize qw/vp10_fwht4x4 msa/, "$mmx_x86inc";
395 }
396
397 # Inverse transform
398 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
399   # Note as optimized versions of these functions are added we need to add a check to ensure
400   # that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only.
401   add_proto qw/void vp10_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
402   specialize qw/vp10_idct4x4_1_add/;
403
404   add_proto qw/void vp10_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
405   specialize qw/vp10_idct4x4_16_add/;
406
407   add_proto qw/void vp10_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
408   specialize qw/vp10_idct8x8_1_add/;
409
410   add_proto qw/void vp10_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
411   specialize qw/vp10_idct8x8_64_add/;
412
413   add_proto qw/void vp10_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
414   specialize qw/vp10_idct8x8_12_add/;
415
416   add_proto qw/void vp10_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
417   specialize qw/vp10_idct16x16_1_add/;
418
419   add_proto qw/void vp10_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
420   specialize qw/vp10_idct16x16_256_add/;
421
422   add_proto qw/void vp10_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
423   specialize qw/vp10_idct16x16_10_add/;
424
425   add_proto qw/void vp10_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
426   specialize qw/vp10_idct32x32_1024_add/;
427
428   add_proto qw/void vp10_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
429   specialize qw/vp10_idct32x32_34_add/;
430
431   add_proto qw/void vp10_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
432   specialize qw/vp10_idct32x32_1_add/;
433
434   add_proto qw/void vp10_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
435   specialize qw/vp10_iwht4x4_1_add/;
436
437   add_proto qw/void vp10_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
438   specialize qw/vp10_iwht4x4_16_add/;
439
440   add_proto qw/void vp10_highbd_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
441   specialize qw/vp10_highbd_idct4x4_1_add/;
442
443   add_proto qw/void vp10_highbd_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
444   specialize qw/vp10_highbd_idct8x8_1_add/;
445
446   add_proto qw/void vp10_highbd_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
447   specialize qw/vp10_highbd_idct16x16_1_add/;
448
449   add_proto qw/void vp10_highbd_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
450   specialize qw/vp10_highbd_idct32x32_1024_add/;
451
452   add_proto qw/void vp10_highbd_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
453   specialize qw/vp10_highbd_idct32x32_34_add/;
454
455   add_proto qw/void vp10_highbd_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
456   specialize qw/vp10_highbd_idct32x32_1_add/;
457
458   add_proto qw/void vp10_highbd_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
459   specialize qw/vp10_highbd_iwht4x4_1_add/;
460
461   add_proto qw/void vp10_highbd_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
462   specialize qw/vp10_highbd_iwht4x4_16_add/;
463
464   # Force C versions if CONFIG_EMULATE_HARDWARE is 1
465   if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") {
466     add_proto qw/void vp10_highbd_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
467     specialize qw/vp10_highbd_idct4x4_16_add/;
468
469     add_proto qw/void vp10_highbd_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
470     specialize qw/vp10_highbd_idct8x8_64_add/;
471
472     add_proto qw/void vp10_highbd_idct8x8_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
473     specialize qw/vp10_highbd_idct8x8_10_add/;
474
475     add_proto qw/void vp10_highbd_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
476     specialize qw/vp10_highbd_idct16x16_256_add/;
477
478     add_proto qw/void vp10_highbd_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
479     specialize qw/vp10_highbd_idct16x16_10_add/;
480   } else {
481     add_proto qw/void vp10_highbd_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
482     specialize qw/vp10_highbd_idct4x4_16_add sse2/;
483
484     add_proto qw/void vp10_highbd_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
485     specialize qw/vp10_highbd_idct8x8_64_add sse2/;
486
487     add_proto qw/void vp10_highbd_idct8x8_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
488     specialize qw/vp10_highbd_idct8x8_10_add sse2/;
489
490     add_proto qw/void vp10_highbd_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
491     specialize qw/vp10_highbd_idct16x16_256_add sse2/;
492
493     add_proto qw/void vp10_highbd_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride, int bd";
494     specialize qw/vp10_highbd_idct16x16_10_add sse2/;
495   }  # CONFIG_EMULATE_HARDWARE
496 } else {
497   # Force C versions if CONFIG_EMULATE_HARDWARE is 1
498   if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") {
499     add_proto qw/void vp10_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
500     specialize qw/vp10_idct4x4_1_add/;
501
502     add_proto qw/void vp10_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
503     specialize qw/vp10_idct4x4_16_add/;
504
505     add_proto qw/void vp10_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
506     specialize qw/vp10_idct8x8_1_add/;
507
508     add_proto qw/void vp10_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
509     specialize qw/vp10_idct8x8_64_add/;
510
511     add_proto qw/void vp10_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
512     specialize qw/vp10_idct8x8_12_add/;
513
514     add_proto qw/void vp10_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
515     specialize qw/vp10_idct16x16_1_add/;
516
517     add_proto qw/void vp10_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
518     specialize qw/vp10_idct16x16_256_add/;
519
520     add_proto qw/void vp10_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
521     specialize qw/vp10_idct16x16_10_add/;
522
523     add_proto qw/void vp10_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
524     specialize qw/vp10_idct32x32_1024_add/;
525
526     add_proto qw/void vp10_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
527     specialize qw/vp10_idct32x32_34_add/;
528
529     add_proto qw/void vp10_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
530     specialize qw/vp10_idct32x32_1_add/;
531
532     add_proto qw/void vp10_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
533     specialize qw/vp10_iwht4x4_1_add/;
534
535     add_proto qw/void vp10_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
536     specialize qw/vp10_iwht4x4_16_add/;
537   } else {
538     add_proto qw/void vp10_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
539     specialize qw/vp10_idct4x4_1_add sse2/;
540
541     add_proto qw/void vp10_idct4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
542     specialize qw/vp10_idct4x4_16_add sse2/;
543
544     add_proto qw/void vp10_idct8x8_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
545     specialize qw/vp10_idct8x8_1_add sse2/;
546
547     add_proto qw/void vp10_idct8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
548     specialize qw/vp10_idct8x8_64_add sse2/;
549
550     add_proto qw/void vp10_idct8x8_12_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
551     specialize qw/vp10_idct8x8_12_add sse2/;
552
553     add_proto qw/void vp10_idct16x16_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
554     specialize qw/vp10_idct16x16_1_add sse2/;
555
556     add_proto qw/void vp10_idct16x16_256_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
557     specialize qw/vp10_idct16x16_256_add sse2/;
558
559     add_proto qw/void vp10_idct16x16_10_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
560     specialize qw/vp10_idct16x16_10_add sse2/;
561
562     add_proto qw/void vp10_idct32x32_1024_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
563     specialize qw/vp10_idct32x32_1024_add sse2/;
564
565     add_proto qw/void vp10_idct32x32_34_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
566     specialize qw/vp10_idct32x32_34_add sse2/;
567
568     add_proto qw/void vp10_idct32x32_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
569     specialize qw/vp10_idct32x32_1_add sse2/;
570
571     add_proto qw/void vp10_iwht4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
572     specialize qw/vp10_iwht4x4_1_add/;
573
574     add_proto qw/void vp10_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
575     specialize qw/vp10_iwht4x4_16_add/;
576   }  # CONFIG_EMULATE_HARDWARE
577 }  # CONFIG_VP9_HIGHBITDEPTH
578
579 #
580 # Motion search
581 #
582 add_proto qw/int vp10_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";
583 specialize qw/vp10_full_search_sad sse3 sse4_1/;
584 $vp10_full_search_sad_sse3=vp10_full_search_sadx3;
585 $vp10_full_search_sad_sse4_1=vp10_full_search_sadx8;
586
587 add_proto qw/int vp10_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";
588 specialize qw/vp10_diamond_search_sad/;
589
590 add_proto qw/int vp10_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";
591 specialize qw/vp10_full_range_search/;
592
593 add_proto qw/void vp10_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";
594 specialize qw/vp10_temporal_filter_apply sse2 msa/;
595
596 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
597
598   # ENCODEMB INVOKE
599
600   add_proto qw/int64_t vp10_highbd_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bd";
601   specialize qw/vp10_highbd_block_error sse2/;
602
603   add_proto qw/void vp10_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";
604   specialize qw/vp10_highbd_quantize_fp/;
605
606   add_proto qw/void vp10_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";
607   specialize qw/vp10_highbd_quantize_fp_32x32/;
608
609   # fdct functions
610   add_proto qw/void vp10_highbd_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
611   specialize qw/vp10_highbd_fht4x4/;
612
613   add_proto qw/void vp10_highbd_fht8x8/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
614   specialize qw/vp10_highbd_fht8x8/;
615
616   add_proto qw/void vp10_highbd_fht16x16/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
617   specialize qw/vp10_highbd_fht16x16/;
618
619   add_proto qw/void vp10_highbd_fwht4x4/, "const int16_t *input, tran_low_t *output, int stride";
620   specialize qw/vp10_highbd_fwht4x4/;
621
622   add_proto qw/void vp10_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";
623   specialize qw/vp10_highbd_temporal_filter_apply/;
624
625 }
626 # End vp10_high encoder functions
627
628 }
629 # end encoder functions
630 1;