rtcd_defs.pl 12 KB

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