1 sub vp9_common_forward_decls() {
7 #include "vpx/vpx_integer.h"
8 #include "vp9/common/vp9_common.h"
9 #include "vp9/common/vp9_enums.h"
13 /* Encoder forward decls */
15 struct vp9_variance_vtable;
16 struct search_site_config;
19 struct yv12_buffer_config;
22 forward_decls qw/vp9_common_forward_decls/;
24 # functions that are 64 bit only.
25 $mmx_x86_64 = $sse2_x86_64 = $ssse3_x86_64 = $avx_x86_64 = $avx2_x86_64 = '';
26 if ($opts{arch} eq "x86_64") {
28 $sse2_x86_64 = 'sse2';
29 $ssse3_x86_64 = 'ssse3';
31 $avx2_x86_64 = 'avx2';
37 if (vpx_config("CONFIG_VP9_POSTPROC") eq "yes") {
38 add_proto qw/void vp9_filter_by_weight16x16/, "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight";
39 specialize qw/vp9_filter_by_weight16x16 sse2 msa/;
41 add_proto qw/void vp9_filter_by_weight8x8/, "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int src_weight";
42 specialize qw/vp9_filter_by_weight8x8 sse2 msa/;
48 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
49 # Force C versions if CONFIG_EMULATE_HARDWARE is 1
50 if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") {
51 add_proto qw/void vp9_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int stride, int tx_type";
53 add_proto qw/void vp9_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int stride, int tx_type";
55 add_proto qw/void vp9_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type";
57 add_proto qw/void vp9_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int stride, int tx_type";
58 specialize qw/vp9_iht4x4_16_add sse2/;
60 add_proto qw/void vp9_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int stride, int tx_type";
61 specialize qw/vp9_iht8x8_64_add sse2/;
63 add_proto qw/void vp9_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type";
64 specialize qw/vp9_iht16x16_256_add sse2/;
67 # Force C versions if CONFIG_EMULATE_HARDWARE is 1
68 if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") {
69 add_proto qw/void vp9_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int stride, int tx_type";
71 add_proto qw/void vp9_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int stride, int tx_type";
73 add_proto qw/void vp9_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type";
75 add_proto qw/void vp9_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int stride, int tx_type";
76 specialize qw/vp9_iht4x4_16_add sse2 neon dspr2 msa/;
78 add_proto qw/void vp9_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int stride, int tx_type";
79 specialize qw/vp9_iht8x8_64_add sse2 neon dspr2 msa/;
81 add_proto qw/void vp9_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type";
82 specialize qw/vp9_iht16x16_256_add sse2 dspr2 msa/;
86 # High bitdepth functions
87 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
91 if (vpx_config("CONFIG_VP9_POSTPROC") eq "yes") {
92 add_proto qw/void vp9_highbd_mbpost_proc_down/, "uint16_t *dst, int pitch, int rows, int cols, int flimit";
94 add_proto qw/void vp9_highbd_mbpost_proc_across_ip/, "uint16_t *src, int pitch, int rows, int cols, int flimit";
96 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";
102 # Note as optimized versions of these functions are added we need to add a check to ensure
103 # that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only.
104 add_proto qw/void vp9_highbd_iht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd";
106 add_proto qw/void vp9_highbd_iht8x8_64_add/, "const tran_low_t *input, uint8_t *dest, int stride, int tx_type, int bd";
108 add_proto qw/void vp9_highbd_iht16x16_256_add/, "const tran_low_t *input, uint8_t *output, int pitch, int tx_type, int bd";
112 # Encoder functions below this point.
114 if (vpx_config("CONFIG_VP9_ENCODER") eq "yes") {
121 if (vpx_config("CONFIG_VP9_TEMPORAL_DENOISING") eq "yes") {
122 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";
123 specialize qw/vp9_denoiser_filter sse2/;
126 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
127 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";
128 specialize qw/vp9_block_error avx2 sse2/;
130 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";
131 specialize qw/vp9_highbd_block_error sse2/;
133 add_proto qw/int64_t vp9_block_error_fp/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, int block_size";
134 specialize qw/vp9_block_error_fp sse2/;
136 add_proto qw/void vp9_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t *quant_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";
137 specialize qw/vp9_quantize_fp neon sse2/, "$ssse3_x86_64";
139 add_proto qw/void vp9_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t *quant_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";
140 specialize qw/vp9_quantize_fp_32x32/, "$ssse3_x86_64";
142 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 *round_ptr, const int16_t *quant_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";
143 specialize qw/vp9_fdct8x8_quant neon ssse3/;
145 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";
146 specialize qw/vp9_block_error avx2 msa sse2/;
148 add_proto qw/int64_t vp9_block_error_fp/, "const int16_t *coeff, const int16_t *dqcoeff, int block_size";
149 specialize qw/vp9_block_error_fp neon sse2/;
151 add_proto qw/void vp9_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t *quant_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";
152 specialize qw/vp9_quantize_fp neon sse2/, "$ssse3_x86_64";
154 add_proto qw/void vp9_quantize_fp_32x32/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t *quant_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";
155 specialize qw/vp9_quantize_fp_32x32/, "$ssse3_x86_64";
157 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 *round_ptr, const int16_t *quant_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";
158 specialize qw/vp9_fdct8x8_quant sse2 ssse3 neon/;
163 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
164 add_proto qw/void vp9_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
165 specialize qw/vp9_fht4x4 sse2/;
167 add_proto qw/void vp9_fht8x8/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
168 specialize qw/vp9_fht8x8 sse2/;
170 add_proto qw/void vp9_fht16x16/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
171 specialize qw/vp9_fht16x16 sse2/;
173 add_proto qw/void vp9_fwht4x4/, "const int16_t *input, tran_low_t *output, int stride";
174 specialize qw/vp9_fwht4x4 sse2/;
176 add_proto qw/void vp9_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
177 specialize qw/vp9_fht4x4 sse2 msa/;
179 add_proto qw/void vp9_fht8x8/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
180 specialize qw/vp9_fht8x8 sse2 msa/;
182 add_proto qw/void vp9_fht16x16/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
183 specialize qw/vp9_fht16x16 sse2 msa/;
185 add_proto qw/void vp9_fwht4x4/, "const int16_t *input, tran_low_t *output, int stride";
186 specialize qw/vp9_fwht4x4 msa sse2/;
192 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";
193 specialize qw/vp9_full_search_sad sse3 sse4_1/;
194 $vp9_full_search_sad_sse3=vp9_full_search_sadx3;
195 $vp9_full_search_sad_sse4_1=vp9_full_search_sadx8;
197 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";
198 specialize qw/vp9_diamond_search_sad avx/;
200 add_proto qw/void vp9_temporal_filter_apply/, "const uint8_t *frame1, unsigned int stride, const uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, uint32_t *accumulator, uint16_t *count";
201 specialize qw/vp9_temporal_filter_apply sse4_1/;
203 if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
207 add_proto qw/void vp9_highbd_quantize_fp/, "const tran_low_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *round_ptr, const int16_t *quant_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";
209 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 *round_ptr, const int16_t *quant_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" ;
212 add_proto qw/void vp9_highbd_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
214 add_proto qw/void vp9_highbd_fht8x8/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
216 add_proto qw/void vp9_highbd_fht16x16/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
218 add_proto qw/void vp9_highbd_fwht4x4/, "const int16_t *input, tran_low_t *output, int stride";
220 add_proto qw/void vp9_highbd_temporal_filter_apply/, "const uint8_t *frame1, unsigned int stride, const uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, uint32_t *accumulator, uint16_t *count";
223 # End vp9_high encoder functions
228 add_proto qw/void vp9_scale_and_extend_frame/, "const struct yv12_buffer_config *src, struct yv12_buffer_config *dst, int phase_scaler";
229 specialize qw/vp9_scale_and_extend_frame ssse3/;
232 # end encoder functions