rtcd_defs.pl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. sub vp8_common_forward_decls() {
  2. print <<EOF
  3. /*
  4. * VP8
  5. */
  6. struct blockd;
  7. struct macroblockd;
  8. struct loop_filter_info;
  9. /* Encoder forward decls */
  10. struct block;
  11. struct macroblock;
  12. struct variance_vtable;
  13. union int_mv;
  14. struct yv12_buffer_config;
  15. EOF
  16. }
  17. forward_decls qw/vp8_common_forward_decls/;
  18. #
  19. # Dequant
  20. #
  21. add_proto qw/void vp8_dequantize_b/, "struct blockd*, short *dqc";
  22. specialize qw/vp8_dequantize_b mmx neon msa mmi/;
  23. add_proto qw/void vp8_dequant_idct_add/, "short *input, short *dq, unsigned char *output, int stride";
  24. specialize qw/vp8_dequant_idct_add mmx neon dspr2 msa mmi/;
  25. add_proto qw/void vp8_dequant_idct_add_y_block/, "short *q, short *dq, unsigned char *dst, int stride, char *eobs";
  26. specialize qw/vp8_dequant_idct_add_y_block sse2 neon dspr2 msa/;
  27. add_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";
  28. specialize qw/vp8_dequant_idct_add_uv_block sse2 neon dspr2 msa/;
  29. #
  30. # Loopfilter
  31. #
  32. add_proto qw/void vp8_loop_filter_mbv/, "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi";
  33. specialize qw/vp8_loop_filter_mbv sse2 neon dspr2 msa mmi/;
  34. add_proto qw/void vp8_loop_filter_bv/, "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi";
  35. specialize qw/vp8_loop_filter_bv sse2 neon dspr2 msa mmi/;
  36. add_proto qw/void vp8_loop_filter_mbh/, "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi";
  37. specialize qw/vp8_loop_filter_mbh sse2 neon dspr2 msa mmi/;
  38. add_proto qw/void vp8_loop_filter_bh/, "unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi";
  39. specialize qw/vp8_loop_filter_bh sse2 neon dspr2 msa mmi/;
  40. add_proto qw/void vp8_loop_filter_simple_mbv/, "unsigned char *y, int ystride, const unsigned char *blimit";
  41. specialize qw/vp8_loop_filter_simple_mbv sse2 neon msa mmi/;
  42. $vp8_loop_filter_simple_mbv_c=vp8_loop_filter_simple_vertical_edge_c;
  43. $vp8_loop_filter_simple_mbv_sse2=vp8_loop_filter_simple_vertical_edge_sse2;
  44. $vp8_loop_filter_simple_mbv_neon=vp8_loop_filter_mbvs_neon;
  45. $vp8_loop_filter_simple_mbv_msa=vp8_loop_filter_simple_vertical_edge_msa;
  46. $vp8_loop_filter_simple_mbv_mmi=vp8_loop_filter_simple_vertical_edge_mmi;
  47. add_proto qw/void vp8_loop_filter_simple_mbh/, "unsigned char *y, int ystride, const unsigned char *blimit";
  48. specialize qw/vp8_loop_filter_simple_mbh sse2 neon msa mmi/;
  49. $vp8_loop_filter_simple_mbh_c=vp8_loop_filter_simple_horizontal_edge_c;
  50. $vp8_loop_filter_simple_mbh_sse2=vp8_loop_filter_simple_horizontal_edge_sse2;
  51. $vp8_loop_filter_simple_mbh_neon=vp8_loop_filter_mbhs_neon;
  52. $vp8_loop_filter_simple_mbh_msa=vp8_loop_filter_simple_horizontal_edge_msa;
  53. $vp8_loop_filter_simple_mbh_mmi=vp8_loop_filter_simple_horizontal_edge_mmi;
  54. add_proto qw/void vp8_loop_filter_simple_bv/, "unsigned char *y, int ystride, const unsigned char *blimit";
  55. specialize qw/vp8_loop_filter_simple_bv sse2 neon msa mmi/;
  56. $vp8_loop_filter_simple_bv_c=vp8_loop_filter_bvs_c;
  57. $vp8_loop_filter_simple_bv_sse2=vp8_loop_filter_bvs_sse2;
  58. $vp8_loop_filter_simple_bv_neon=vp8_loop_filter_bvs_neon;
  59. $vp8_loop_filter_simple_bv_msa=vp8_loop_filter_bvs_msa;
  60. $vp8_loop_filter_simple_bv_mmi=vp8_loop_filter_bvs_mmi;
  61. add_proto qw/void vp8_loop_filter_simple_bh/, "unsigned char *y, int ystride, const unsigned char *blimit";
  62. specialize qw/vp8_loop_filter_simple_bh sse2 neon msa mmi/;
  63. $vp8_loop_filter_simple_bh_c=vp8_loop_filter_bhs_c;
  64. $vp8_loop_filter_simple_bh_sse2=vp8_loop_filter_bhs_sse2;
  65. $vp8_loop_filter_simple_bh_neon=vp8_loop_filter_bhs_neon;
  66. $vp8_loop_filter_simple_bh_msa=vp8_loop_filter_bhs_msa;
  67. $vp8_loop_filter_simple_bh_mmi=vp8_loop_filter_bhs_mmi;
  68. #
  69. # IDCT
  70. #
  71. #idct16
  72. add_proto qw/void vp8_short_idct4x4llm/, "short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride";
  73. specialize qw/vp8_short_idct4x4llm mmx neon dspr2 msa mmi/;
  74. #iwalsh1
  75. add_proto qw/void vp8_short_inv_walsh4x4_1/, "short *input, short *output";
  76. specialize qw/vp8_short_inv_walsh4x4_1 dspr2/;
  77. #iwalsh16
  78. add_proto qw/void vp8_short_inv_walsh4x4/, "short *input, short *output";
  79. specialize qw/vp8_short_inv_walsh4x4 sse2 neon dspr2 msa mmi/;
  80. #idct1_scalar_add
  81. add_proto qw/void vp8_dc_only_idct_add/, "short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride";
  82. specialize qw/vp8_dc_only_idct_add mmx neon dspr2 msa mmi/;
  83. #
  84. # RECON
  85. #
  86. add_proto qw/void vp8_copy_mem16x16/, "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch";
  87. specialize qw/vp8_copy_mem16x16 sse2 neon dspr2 msa/;
  88. add_proto qw/void vp8_copy_mem8x8/, "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch";
  89. specialize qw/vp8_copy_mem8x8 mmx neon dspr2 msa/;
  90. add_proto qw/void vp8_copy_mem8x4/, "unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch";
  91. specialize qw/vp8_copy_mem8x4 mmx neon dspr2 msa/;
  92. #
  93. # Postproc
  94. #
  95. if (vpx_config("CONFIG_POSTPROC") eq "yes") {
  96. add_proto qw/void vp8_blend_mb_inner/, "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride";
  97. add_proto qw/void vp8_blend_mb_outer/, "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride";
  98. add_proto qw/void vp8_blend_b/, "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride";
  99. add_proto qw/void vp8_filter_by_weight16x16/, "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight";
  100. specialize qw/vp8_filter_by_weight16x16 sse2 msa/;
  101. add_proto qw/void vp8_filter_by_weight8x8/, "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight";
  102. specialize qw/vp8_filter_by_weight8x8 sse2 msa/;
  103. add_proto qw/void vp8_filter_by_weight4x4/, "unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight";
  104. }
  105. #
  106. # Subpixel
  107. #
  108. add_proto qw/void vp8_sixtap_predict16x16/, "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch";
  109. specialize qw/vp8_sixtap_predict16x16 sse2 ssse3 neon dspr2 msa mmi/;
  110. add_proto qw/void vp8_sixtap_predict8x8/, "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch";
  111. specialize qw/vp8_sixtap_predict8x8 sse2 ssse3 neon dspr2 msa mmi/;
  112. add_proto qw/void vp8_sixtap_predict8x4/, "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch";
  113. specialize qw/vp8_sixtap_predict8x4 sse2 ssse3 neon dspr2 msa mmi/;
  114. add_proto qw/void vp8_sixtap_predict4x4/, "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch";
  115. specialize qw/vp8_sixtap_predict4x4 mmx ssse3 neon dspr2 msa mmi/;
  116. add_proto qw/void vp8_bilinear_predict16x16/, "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch";
  117. specialize qw/vp8_bilinear_predict16x16 sse2 ssse3 neon msa/;
  118. add_proto qw/void vp8_bilinear_predict8x8/, "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch";
  119. specialize qw/vp8_bilinear_predict8x8 sse2 ssse3 neon msa/;
  120. add_proto qw/void vp8_bilinear_predict8x4/, "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch";
  121. specialize qw/vp8_bilinear_predict8x4 mmx neon msa/;
  122. add_proto qw/void vp8_bilinear_predict4x4/, "unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch";
  123. specialize qw/vp8_bilinear_predict4x4 mmx neon msa/;
  124. #
  125. # Encoder functions below this point.
  126. #
  127. if (vpx_config("CONFIG_VP8_ENCODER") eq "yes") {
  128. #
  129. # Block copy
  130. #
  131. if ($opts{arch} =~ /x86/) {
  132. add_proto qw/void vp8_copy32xn/, "const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n";
  133. specialize qw/vp8_copy32xn sse2 sse3/;
  134. }
  135. #
  136. # Forward DCT
  137. #
  138. add_proto qw/void vp8_short_fdct4x4/, "short *input, short *output, int pitch";
  139. specialize qw/vp8_short_fdct4x4 sse2 neon msa/;
  140. add_proto qw/void vp8_short_fdct8x4/, "short *input, short *output, int pitch";
  141. specialize qw/vp8_short_fdct8x4 sse2 neon msa/;
  142. add_proto qw/void vp8_short_walsh4x4/, "short *input, short *output, int pitch";
  143. specialize qw/vp8_short_walsh4x4 sse2 neon msa/;
  144. #
  145. # Quantizer
  146. #
  147. add_proto qw/void vp8_regular_quantize_b/, "struct block *, struct blockd *";
  148. specialize qw/vp8_regular_quantize_b sse2 sse4_1 msa/;
  149. add_proto qw/void vp8_fast_quantize_b/, "struct block *, struct blockd *";
  150. specialize qw/vp8_fast_quantize_b sse2 ssse3 neon msa/;
  151. #
  152. # Block subtraction
  153. #
  154. add_proto qw/int vp8_block_error/, "short *coeff, short *dqcoeff";
  155. specialize qw/vp8_block_error sse2 msa/;
  156. add_proto qw/int vp8_mbblock_error/, "struct macroblock *mb, int dc";
  157. specialize qw/vp8_mbblock_error sse2 msa/;
  158. add_proto qw/int vp8_mbuverror/, "struct macroblock *mb";
  159. specialize qw/vp8_mbuverror sse2 msa/;
  160. #
  161. # Motion search
  162. #
  163. add_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";
  164. specialize qw/vp8_full_search_sad sse3 sse4_1/;
  165. $vp8_full_search_sad_sse3=vp8_full_search_sadx3;
  166. $vp8_full_search_sad_sse4_1=vp8_full_search_sadx8;
  167. add_proto qw/int vp8_refining_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";
  168. specialize qw/vp8_refining_search_sad sse2 msa/;
  169. $vp8_refining_search_sad_sse2=vp8_refining_search_sadx4;
  170. $vp8_refining_search_sad_msa=vp8_refining_search_sadx4;
  171. add_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";
  172. specialize qw/vp8_diamond_search_sad sse2 msa/;
  173. $vp8_diamond_search_sad_sse2=vp8_diamond_search_sadx4;
  174. $vp8_diamond_search_sad_msa=vp8_diamond_search_sadx4;
  175. #
  176. # Alt-ref Noise Reduction (ARNR)
  177. #
  178. if (vpx_config("CONFIG_REALTIME_ONLY") ne "yes") {
  179. 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";
  180. specialize qw/vp8_temporal_filter_apply sse2 msa/;
  181. }
  182. #
  183. # Denoiser filter
  184. #
  185. if (vpx_config("CONFIG_TEMPORAL_DENOISING") eq "yes") {
  186. 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";
  187. specialize qw/vp8_denoiser_filter sse2 neon msa/;
  188. 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";
  189. specialize qw/vp8_denoiser_filter_uv sse2 neon msa/;
  190. }
  191. # End of encoder only functions
  192. }
  193. 1;