vp8_rtcd_x86_64-linux-gcc.h 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. #ifndef VP8_RTCD_H_
  2. #define VP8_RTCD_H_
  3. #ifdef RTCD_C
  4. #define RTCD_EXTERN
  5. #else
  6. #define RTCD_EXTERN extern
  7. #endif
  8. /*
  9. * VP8
  10. */
  11. struct blockd;
  12. struct macroblockd;
  13. struct loop_filter_info;
  14. /* Encoder forward decls */
  15. struct block;
  16. struct macroblock;
  17. struct variance_vtable;
  18. union int_mv;
  19. struct yv12_buffer_config;
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  24. void vp8_bilinear_predict16x16_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  25. void vp8_bilinear_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  26. void vp8_bilinear_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  27. RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  28. void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  29. void vp8_bilinear_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  30. #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_mmx
  31. void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  32. void vp8_bilinear_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  33. #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_mmx
  34. void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  35. void vp8_bilinear_predict8x8_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  36. void vp8_bilinear_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  37. void vp8_bilinear_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  38. RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  39. void vp8_blend_b_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride);
  40. #define vp8_blend_b vp8_blend_b_c
  41. void vp8_blend_mb_inner_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride);
  42. #define vp8_blend_mb_inner vp8_blend_mb_inner_c
  43. void vp8_blend_mb_outer_c(unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride);
  44. #define vp8_blend_mb_outer vp8_blend_mb_outer_c
  45. int vp8_block_error_c(short *coeff, short *dqcoeff);
  46. int vp8_block_error_mmx(short *coeff, short *dqcoeff);
  47. int vp8_block_error_xmm(short *coeff, short *dqcoeff);
  48. #define vp8_block_error vp8_block_error_xmm
  49. void vp8_build_intra_predictors_mbuv_s_c(struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row, unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride);
  50. void vp8_build_intra_predictors_mbuv_s_sse2(struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row, unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride);
  51. void vp8_build_intra_predictors_mbuv_s_ssse3(struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row, unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride);
  52. RTCD_EXTERN void (*vp8_build_intra_predictors_mbuv_s)(struct macroblockd *x, unsigned char * uabove_row, unsigned char * vabove_row, unsigned char *uleft, unsigned char *vleft, int left_stride, unsigned char * upred_ptr, unsigned char * vpred_ptr, int pred_stride);
  53. void vp8_build_intra_predictors_mby_s_c(struct macroblockd *x, unsigned char * yabove_row, unsigned char * yleft, int left_stride, unsigned char * ypred_ptr, int y_stride);
  54. void vp8_build_intra_predictors_mby_s_sse2(struct macroblockd *x, unsigned char * yabove_row, unsigned char * yleft, int left_stride, unsigned char * ypred_ptr, int y_stride);
  55. void vp8_build_intra_predictors_mby_s_ssse3(struct macroblockd *x, unsigned char * yabove_row, unsigned char * yleft, int left_stride, unsigned char * ypred_ptr, int y_stride);
  56. RTCD_EXTERN void (*vp8_build_intra_predictors_mby_s)(struct macroblockd *x, unsigned char * yabove_row, unsigned char * yleft, int left_stride, unsigned char * ypred_ptr, int y_stride);
  57. void vp8_clear_system_state_c();
  58. void vpx_reset_mmx_state();
  59. #define vp8_clear_system_state vpx_reset_mmx_state
  60. void vp8_copy32xn_c(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n);
  61. void vp8_copy32xn_sse2(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n);
  62. void vp8_copy32xn_sse3(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n);
  63. RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char *src_ptr, int source_stride, unsigned char *dst_ptr, int dst_stride, int n);
  64. void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  65. void vp8_copy_mem16x16_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  66. void vp8_copy_mem16x16_sse2(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  67. #define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2
  68. void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  69. void vp8_copy_mem8x4_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  70. #define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx
  71. void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  72. void vp8_copy_mem8x8_mmx(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  73. #define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx
  74. void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride);
  75. void vp8_dc_only_idct_add_mmx(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride);
  76. #define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx
  77. int vp8_denoiser_filter_c(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);
  78. int vp8_denoiser_filter_sse2(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);
  79. #define vp8_denoiser_filter vp8_denoiser_filter_sse2
  80. int vp8_denoiser_filter_uv_c(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);
  81. int vp8_denoiser_filter_uv_sse2(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);
  82. #define vp8_denoiser_filter_uv vp8_denoiser_filter_uv_sse2
  83. void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride);
  84. void vp8_dequant_idct_add_mmx(short *input, short *dq, unsigned char *output, int stride);
  85. #define vp8_dequant_idct_add vp8_dequant_idct_add_mmx
  86. void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
  87. void vp8_dequant_idct_add_uv_block_mmx(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
  88. void vp8_dequant_idct_add_uv_block_sse2(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
  89. #define vp8_dequant_idct_add_uv_block vp8_dequant_idct_add_uv_block_sse2
  90. void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
  91. void vp8_dequant_idct_add_y_block_mmx(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
  92. void vp8_dequant_idct_add_y_block_sse2(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
  93. #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
  94. void vp8_dequantize_b_c(struct blockd*, short *dqc);
  95. void vp8_dequantize_b_mmx(struct blockd*, short *dqc);
  96. #define vp8_dequantize_b vp8_dequantize_b_mmx
  97. int vp8_diamond_search_sad_c(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);
  98. int vp8_diamond_search_sadx4(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);
  99. RTCD_EXTERN 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);
  100. void vp8_fast_quantize_b_c(struct block *, struct blockd *);
  101. void vp8_fast_quantize_b_sse2(struct block *, struct blockd *);
  102. void vp8_fast_quantize_b_ssse3(struct block *, struct blockd *);
  103. RTCD_EXTERN void (*vp8_fast_quantize_b)(struct block *, struct blockd *);
  104. void vp8_filter_by_weight16x16_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
  105. void vp8_filter_by_weight16x16_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
  106. #define vp8_filter_by_weight16x16 vp8_filter_by_weight16x16_sse2
  107. void vp8_filter_by_weight4x4_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
  108. #define vp8_filter_by_weight4x4 vp8_filter_by_weight4x4_c
  109. void vp8_filter_by_weight8x8_c(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
  110. void vp8_filter_by_weight8x8_sse2(unsigned char *src, int src_stride, unsigned char *dst, int dst_stride, int src_weight);
  111. #define vp8_filter_by_weight8x8 vp8_filter_by_weight8x8_sse2
  112. int vp8_full_search_sad_c(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);
  113. int vp8_full_search_sadx3(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);
  114. int vp8_full_search_sadx8(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);
  115. RTCD_EXTERN 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);
  116. void vp8_intra4x4_predict_c(unsigned char *Above, unsigned char *yleft, int left_stride, int b_mode, unsigned char *dst, int dst_stride, unsigned char top_left);
  117. #define vp8_intra4x4_predict vp8_intra4x4_predict_c
  118. void vp8_loop_filter_bh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  119. void vp8_loop_filter_bh_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  120. void vp8_loop_filter_bh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  121. #define vp8_loop_filter_bh vp8_loop_filter_bh_sse2
  122. void vp8_loop_filter_bv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  123. void vp8_loop_filter_bv_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  124. void vp8_loop_filter_bv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  125. #define vp8_loop_filter_bv vp8_loop_filter_bv_sse2
  126. void vp8_loop_filter_mbh_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  127. void vp8_loop_filter_mbh_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  128. void vp8_loop_filter_mbh_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  129. #define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2
  130. void vp8_loop_filter_mbv_c(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  131. void vp8_loop_filter_mbv_mmx(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  132. void vp8_loop_filter_mbv_sse2(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  133. #define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2
  134. void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit);
  135. void vp8_loop_filter_bhs_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
  136. void vp8_loop_filter_bhs_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
  137. #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2
  138. void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit);
  139. void vp8_loop_filter_bvs_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
  140. void vp8_loop_filter_bvs_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
  141. #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2
  142. void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit);
  143. void vp8_loop_filter_simple_horizontal_edge_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
  144. void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
  145. #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2
  146. void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit);
  147. void vp8_loop_filter_simple_vertical_edge_mmx(unsigned char *y, int ystride, const unsigned char *blimit);
  148. void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char *y, int ystride, const unsigned char *blimit);
  149. #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2
  150. int vp8_mbblock_error_c(struct macroblock *mb, int dc);
  151. int vp8_mbblock_error_mmx(struct macroblock *mb, int dc);
  152. int vp8_mbblock_error_xmm(struct macroblock *mb, int dc);
  153. #define vp8_mbblock_error vp8_mbblock_error_xmm
  154. void vp8_mbpost_proc_across_ip_c(unsigned char *dst, int pitch, int rows, int cols,int flimit);
  155. void vp8_mbpost_proc_across_ip_xmm(unsigned char *dst, int pitch, int rows, int cols,int flimit);
  156. #define vp8_mbpost_proc_across_ip vp8_mbpost_proc_across_ip_xmm
  157. void vp8_mbpost_proc_down_c(unsigned char *dst, int pitch, int rows, int cols,int flimit);
  158. void vp8_mbpost_proc_down_mmx(unsigned char *dst, int pitch, int rows, int cols,int flimit);
  159. void vp8_mbpost_proc_down_xmm(unsigned char *dst, int pitch, int rows, int cols,int flimit);
  160. #define vp8_mbpost_proc_down vp8_mbpost_proc_down_xmm
  161. int vp8_mbuverror_c(struct macroblock *mb);
  162. int vp8_mbuverror_mmx(struct macroblock *mb);
  163. int vp8_mbuverror_xmm(struct macroblock *mb);
  164. #define vp8_mbuverror vp8_mbuverror_xmm
  165. void vp8_plane_add_noise_c(unsigned char *s, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int w, unsigned int h, int pitch);
  166. void vp8_plane_add_noise_mmx(unsigned char *s, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int w, unsigned int h, int pitch);
  167. void vp8_plane_add_noise_wmt(unsigned char *s, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int w, unsigned int h, int pitch);
  168. #define vp8_plane_add_noise vp8_plane_add_noise_wmt
  169. void vp8_post_proc_down_and_across_mb_row_c(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size);
  170. void vp8_post_proc_down_and_across_mb_row_sse2(unsigned char *src, unsigned char *dst, int src_pitch, int dst_pitch, int cols, unsigned char *flimits, int size);
  171. #define vp8_post_proc_down_and_across_mb_row vp8_post_proc_down_and_across_mb_row_sse2
  172. int vp8_refining_search_sad_c(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);
  173. int vp8_refining_search_sadx4(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);
  174. RTCD_EXTERN 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);
  175. void vp8_regular_quantize_b_c(struct block *, struct blockd *);
  176. void vp8_regular_quantize_b_sse2(struct block *, struct blockd *);
  177. void vp8_regular_quantize_b_sse4_1(struct block *, struct blockd *);
  178. RTCD_EXTERN void (*vp8_regular_quantize_b)(struct block *, struct blockd *);
  179. void vp8_short_fdct4x4_c(short *input, short *output, int pitch);
  180. void vp8_short_fdct4x4_mmx(short *input, short *output, int pitch);
  181. void vp8_short_fdct4x4_sse2(short *input, short *output, int pitch);
  182. #define vp8_short_fdct4x4 vp8_short_fdct4x4_sse2
  183. void vp8_short_fdct8x4_c(short *input, short *output, int pitch);
  184. void vp8_short_fdct8x4_mmx(short *input, short *output, int pitch);
  185. void vp8_short_fdct8x4_sse2(short *input, short *output, int pitch);
  186. #define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2
  187. void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride);
  188. void vp8_short_idct4x4llm_mmx(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride);
  189. #define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx
  190. void vp8_short_inv_walsh4x4_c(short *input, short *output);
  191. void vp8_short_inv_walsh4x4_mmx(short *input, short *output);
  192. void vp8_short_inv_walsh4x4_sse2(short *input, short *output);
  193. #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2
  194. void vp8_short_inv_walsh4x4_1_c(short *input, short *output);
  195. #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
  196. void vp8_short_walsh4x4_c(short *input, short *output, int pitch);
  197. void vp8_short_walsh4x4_sse2(short *input, short *output, int pitch);
  198. #define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2
  199. void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  200. void vp8_sixtap_predict16x16_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  201. void vp8_sixtap_predict16x16_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  202. void vp8_sixtap_predict16x16_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  203. RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  204. void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  205. void vp8_sixtap_predict4x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  206. void vp8_sixtap_predict4x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  207. RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  208. void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  209. void vp8_sixtap_predict8x4_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  210. void vp8_sixtap_predict8x4_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  211. void vp8_sixtap_predict8x4_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  212. RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  213. void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  214. void vp8_sixtap_predict8x8_mmx(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  215. void vp8_sixtap_predict8x8_sse2(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  216. void vp8_sixtap_predict8x8_ssse3(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  217. RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  218. unsigned int vp8_sub_pixel_variance16x16_c(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  219. unsigned int vp8_sub_pixel_variance16x16_mmx(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  220. unsigned int vp8_sub_pixel_variance16x16_wmt(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  221. unsigned int vp8_sub_pixel_variance16x16_ssse3(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  222. RTCD_EXTERN unsigned int (*vp8_sub_pixel_variance16x16)(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  223. unsigned int vp8_sub_pixel_variance16x8_c(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  224. unsigned int vp8_sub_pixel_variance16x8_mmx(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  225. unsigned int vp8_sub_pixel_variance16x8_wmt(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  226. unsigned int vp8_sub_pixel_variance16x8_ssse3(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  227. RTCD_EXTERN unsigned int (*vp8_sub_pixel_variance16x8)(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  228. unsigned int vp8_sub_pixel_variance4x4_c(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  229. unsigned int vp8_sub_pixel_variance4x4_mmx(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  230. unsigned int vp8_sub_pixel_variance4x4_wmt(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  231. #define vp8_sub_pixel_variance4x4 vp8_sub_pixel_variance4x4_wmt
  232. unsigned int vp8_sub_pixel_variance8x16_c(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  233. unsigned int vp8_sub_pixel_variance8x16_mmx(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  234. unsigned int vp8_sub_pixel_variance8x16_wmt(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  235. #define vp8_sub_pixel_variance8x16 vp8_sub_pixel_variance8x16_wmt
  236. unsigned int vp8_sub_pixel_variance8x8_c(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  237. unsigned int vp8_sub_pixel_variance8x8_mmx(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  238. unsigned int vp8_sub_pixel_variance8x8_wmt(const unsigned char *src_ptr, int source_stride, int xoffset, int yoffset, const unsigned char *ref_ptr, int Refstride, unsigned int *sse);
  239. #define vp8_sub_pixel_variance8x8 vp8_sub_pixel_variance8x8_wmt
  240. void vp8_subtract_b_c(struct block *be, struct blockd *bd, int pitch);
  241. void vp8_subtract_b_mmx(struct block *be, struct blockd *bd, int pitch);
  242. void vp8_subtract_b_sse2(struct block *be, struct blockd *bd, int pitch);
  243. #define vp8_subtract_b vp8_subtract_b_sse2
  244. void vp8_subtract_mbuv_c(short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride, unsigned char *upred, unsigned char *vpred, int pred_stride);
  245. void vp8_subtract_mbuv_mmx(short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride, unsigned char *upred, unsigned char *vpred, int pred_stride);
  246. void vp8_subtract_mbuv_sse2(short *diff, unsigned char *usrc, unsigned char *vsrc, int src_stride, unsigned char *upred, unsigned char *vpred, int pred_stride);
  247. #define vp8_subtract_mbuv vp8_subtract_mbuv_sse2
  248. void vp8_subtract_mby_c(short *diff, unsigned char *src, int src_stride, unsigned char *pred, int pred_stride);
  249. void vp8_subtract_mby_mmx(short *diff, unsigned char *src, int src_stride, unsigned char *pred, int pred_stride);
  250. void vp8_subtract_mby_sse2(short *diff, unsigned char *src, int src_stride, unsigned char *pred, int pred_stride);
  251. #define vp8_subtract_mby vp8_subtract_mby_sse2
  252. void vp8_temporal_filter_apply_c(unsigned char *frame1, unsigned int stride, unsigned char *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, unsigned short *count);
  253. void vp8_temporal_filter_apply_sse2(unsigned char *frame1, unsigned int stride, unsigned char *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, unsigned short *count);
  254. #define vp8_temporal_filter_apply vp8_temporal_filter_apply_sse2
  255. unsigned int vp8_variance_halfpixvar16x16_h_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse);
  256. unsigned int vp8_variance_halfpixvar16x16_h_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse);
  257. unsigned int vp8_variance_halfpixvar16x16_h_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse);
  258. #define vp8_variance_halfpixvar16x16_h vp8_variance_halfpixvar16x16_h_wmt
  259. unsigned int vp8_variance_halfpixvar16x16_hv_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse);
  260. unsigned int vp8_variance_halfpixvar16x16_hv_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse);
  261. unsigned int vp8_variance_halfpixvar16x16_hv_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse);
  262. #define vp8_variance_halfpixvar16x16_hv vp8_variance_halfpixvar16x16_hv_wmt
  263. unsigned int vp8_variance_halfpixvar16x16_v_c(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse);
  264. unsigned int vp8_variance_halfpixvar16x16_v_mmx(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse);
  265. unsigned int vp8_variance_halfpixvar16x16_v_wmt(const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride, unsigned int *sse);
  266. #define vp8_variance_halfpixvar16x16_v vp8_variance_halfpixvar16x16_v_wmt
  267. void vp8_rtcd(void);
  268. #ifdef RTCD_C
  269. #include "vpx_ports/x86.h"
  270. static void setup_rtcd_internal(void)
  271. {
  272. int flags = x86_simd_caps();
  273. (void)flags;
  274. vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_sse2;
  275. if (flags & HAS_SSSE3) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_ssse3;
  276. vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_sse2;
  277. if (flags & HAS_SSSE3) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_ssse3;
  278. vp8_build_intra_predictors_mbuv_s = vp8_build_intra_predictors_mbuv_s_sse2;
  279. if (flags & HAS_SSSE3) vp8_build_intra_predictors_mbuv_s = vp8_build_intra_predictors_mbuv_s_ssse3;
  280. vp8_build_intra_predictors_mby_s = vp8_build_intra_predictors_mby_s_sse2;
  281. if (flags & HAS_SSSE3) vp8_build_intra_predictors_mby_s = vp8_build_intra_predictors_mby_s_ssse3;
  282. vp8_copy32xn = vp8_copy32xn_sse2;
  283. if (flags & HAS_SSE3) vp8_copy32xn = vp8_copy32xn_sse3;
  284. vp8_diamond_search_sad = vp8_diamond_search_sad_c;
  285. if (flags & HAS_SSE3) vp8_diamond_search_sad = vp8_diamond_search_sadx4;
  286. vp8_fast_quantize_b = vp8_fast_quantize_b_sse2;
  287. if (flags & HAS_SSSE3) vp8_fast_quantize_b = vp8_fast_quantize_b_ssse3;
  288. vp8_full_search_sad = vp8_full_search_sad_c;
  289. if (flags & HAS_SSE3) vp8_full_search_sad = vp8_full_search_sadx3;
  290. if (flags & HAS_SSE4_1) vp8_full_search_sad = vp8_full_search_sadx8;
  291. vp8_refining_search_sad = vp8_refining_search_sad_c;
  292. if (flags & HAS_SSE3) vp8_refining_search_sad = vp8_refining_search_sadx4;
  293. vp8_regular_quantize_b = vp8_regular_quantize_b_sse2;
  294. if (flags & HAS_SSE4_1) vp8_regular_quantize_b = vp8_regular_quantize_b_sse4_1;
  295. vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_sse2;
  296. if (flags & HAS_SSSE3) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_ssse3;
  297. vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_mmx;
  298. if (flags & HAS_SSSE3) vp8_sixtap_predict4x4 = vp8_sixtap_predict4x4_ssse3;
  299. vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_sse2;
  300. if (flags & HAS_SSSE3) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_ssse3;
  301. vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_sse2;
  302. if (flags & HAS_SSSE3) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_ssse3;
  303. vp8_sub_pixel_variance16x16 = vp8_sub_pixel_variance16x16_wmt;
  304. if (flags & HAS_SSSE3) vp8_sub_pixel_variance16x16 = vp8_sub_pixel_variance16x16_ssse3;
  305. vp8_sub_pixel_variance16x8 = vp8_sub_pixel_variance16x8_wmt;
  306. if (flags & HAS_SSSE3) vp8_sub_pixel_variance16x8 = vp8_sub_pixel_variance16x8_ssse3;
  307. }
  308. #endif
  309. #ifdef __cplusplus
  310. } // extern "C"
  311. #endif
  312. #endif