vp8_rtcd_arm.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  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 loop_filter_info;
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. void vp8_bilinear_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  17. void vp8_bilinear_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  18. RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  19. void vp8_bilinear_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  20. #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c
  21. void vp8_bilinear_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  22. void vp8_bilinear_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  23. RTCD_EXTERN void (*vp8_bilinear_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  24. void vp8_bilinear_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  25. void vp8_bilinear_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  26. RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  27. void vp8_clear_system_state_c();
  28. #define vp8_clear_system_state vp8_clear_system_state_c
  29. void vp8_copy_mem16x16_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  30. void vp8_copy_mem16x16_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  31. RTCD_EXTERN void (*vp8_copy_mem16x16)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  32. void vp8_copy_mem8x4_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  33. void vp8_copy_mem8x4_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  34. RTCD_EXTERN void (*vp8_copy_mem8x4)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  35. void vp8_copy_mem8x8_c(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  36. void vp8_copy_mem8x8_neon(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  37. RTCD_EXTERN void (*vp8_copy_mem8x8)(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch);
  38. void vp8_dc_only_idct_add_c(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride);
  39. void vp8_dc_only_idct_add_neon(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride);
  40. RTCD_EXTERN void (*vp8_dc_only_idct_add)(short input, unsigned char *pred, int pred_stride, unsigned char *dst, int dst_stride);
  41. void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *output, int stride);
  42. void vp8_dequant_idct_add_neon(short *input, short *dq, unsigned char *output, int stride);
  43. RTCD_EXTERN void (*vp8_dequant_idct_add)(short *input, short *dq, unsigned char *output, int stride);
  44. void vp8_dequant_idct_add_uv_block_c(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
  45. void vp8_dequant_idct_add_uv_block_neon(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
  46. RTCD_EXTERN void (*vp8_dequant_idct_add_uv_block)(short *q, short *dq, unsigned char *dst_u, unsigned char *dst_v, int stride, char *eobs);
  47. void vp8_dequant_idct_add_y_block_c(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
  48. void vp8_dequant_idct_add_y_block_neon(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
  49. RTCD_EXTERN void (*vp8_dequant_idct_add_y_block)(short *q, short *dq, unsigned char *dst, int stride, char *eobs);
  50. void vp8_dequantize_b_c(struct blockd*, short *dqc);
  51. void vp8_dequantize_b_neon(struct blockd*, short *dqc);
  52. RTCD_EXTERN void (*vp8_dequantize_b)(struct blockd*, short *dqc);
  53. 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);
  54. void vp8_loop_filter_bh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  55. RTCD_EXTERN void (*vp8_loop_filter_bh)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  56. 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);
  57. void vp8_loop_filter_bv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  58. RTCD_EXTERN void (*vp8_loop_filter_bv)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  59. 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);
  60. void vp8_loop_filter_mbh_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  61. RTCD_EXTERN void (*vp8_loop_filter_mbh)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  62. 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);
  63. void vp8_loop_filter_mbv_neon(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  64. RTCD_EXTERN void (*vp8_loop_filter_mbv)(unsigned char *y, unsigned char *u, unsigned char *v, int ystride, int uv_stride, struct loop_filter_info *lfi);
  65. void vp8_loop_filter_bhs_c(unsigned char *y, int ystride, const unsigned char *blimit);
  66. void vp8_loop_filter_bhs_neon(unsigned char *y, int ystride, const unsigned char *blimit);
  67. RTCD_EXTERN void (*vp8_loop_filter_simple_bh)(unsigned char *y, int ystride, const unsigned char *blimit);
  68. void vp8_loop_filter_bvs_c(unsigned char *y, int ystride, const unsigned char *blimit);
  69. void vp8_loop_filter_bvs_neon(unsigned char *y, int ystride, const unsigned char *blimit);
  70. RTCD_EXTERN void (*vp8_loop_filter_simple_bv)(unsigned char *y, int ystride, const unsigned char *blimit);
  71. void vp8_loop_filter_simple_horizontal_edge_c(unsigned char *y, int ystride, const unsigned char *blimit);
  72. void vp8_loop_filter_mbhs_neon(unsigned char *y, int ystride, const unsigned char *blimit);
  73. RTCD_EXTERN void (*vp8_loop_filter_simple_mbh)(unsigned char *y, int ystride, const unsigned char *blimit);
  74. void vp8_loop_filter_simple_vertical_edge_c(unsigned char *y, int ystride, const unsigned char *blimit);
  75. void vp8_loop_filter_mbvs_neon(unsigned char *y, int ystride, const unsigned char *blimit);
  76. RTCD_EXTERN void (*vp8_loop_filter_simple_mbv)(unsigned char *y, int ystride, const unsigned char *blimit);
  77. void vp8_short_idct4x4llm_c(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride);
  78. void vp8_short_idct4x4llm_neon(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride);
  79. RTCD_EXTERN void (*vp8_short_idct4x4llm)(short *input, unsigned char *pred, int pitch, unsigned char *dst, int dst_stride);
  80. void vp8_short_inv_walsh4x4_c(short *input, short *output);
  81. void vp8_short_inv_walsh4x4_neon(short *input, short *output);
  82. RTCD_EXTERN void (*vp8_short_inv_walsh4x4)(short *input, short *output);
  83. void vp8_short_inv_walsh4x4_1_c(short *input, short *output);
  84. #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
  85. void vp8_sixtap_predict16x16_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  86. void vp8_sixtap_predict16x16_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  87. RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  88. void vp8_sixtap_predict4x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  89. #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c
  90. void vp8_sixtap_predict8x4_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  91. void vp8_sixtap_predict8x4_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  92. RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  93. void vp8_sixtap_predict8x8_c(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  94. void vp8_sixtap_predict8x8_neon(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  95. RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char *src, int src_pitch, int xofst, int yofst, unsigned char *dst, int dst_pitch);
  96. void vp8_rtcd(void);
  97. #ifdef RTCD_C
  98. #include "vpx_ports/arm.h"
  99. static void setup_rtcd_internal(void)
  100. {
  101. int flags = arm_cpu_caps();
  102. vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_c;
  103. #if HAVE_NEON
  104. if (flags & HAS_NEON) vp8_bilinear_predict16x16 = vp8_bilinear_predict16x16_neon;
  105. #endif
  106. vp8_bilinear_predict8x4 = vp8_bilinear_predict8x4_c;
  107. #if HAVE_NEON
  108. if (flags & HAS_NEON) vp8_bilinear_predict8x4 = vp8_bilinear_predict8x4_neon;
  109. #endif
  110. vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_c;
  111. #if HAVE_NEON
  112. if (flags & HAS_NEON) vp8_bilinear_predict8x8 = vp8_bilinear_predict8x8_neon;
  113. #endif
  114. vp8_copy_mem16x16 = vp8_copy_mem16x16_c;
  115. #if HAVE_NEON
  116. if (flags & HAS_NEON) vp8_copy_mem16x16 = vp8_copy_mem16x16_neon;
  117. #endif
  118. vp8_copy_mem8x4 = vp8_copy_mem8x4_c;
  119. #if HAVE_NEON
  120. if (flags & HAS_NEON) vp8_copy_mem8x4 = vp8_copy_mem8x4_neon;
  121. #endif
  122. vp8_copy_mem8x8 = vp8_copy_mem8x8_c;
  123. #if HAVE_NEON
  124. if (flags & HAS_NEON) vp8_copy_mem8x8 = vp8_copy_mem8x8_neon;
  125. #endif
  126. vp8_dc_only_idct_add = vp8_dc_only_idct_add_c;
  127. #if HAVE_NEON
  128. if (flags & HAS_NEON) vp8_dc_only_idct_add = vp8_dc_only_idct_add_neon;
  129. #endif
  130. vp8_dequant_idct_add = vp8_dequant_idct_add_c;
  131. #if HAVE_NEON
  132. if (flags & HAS_NEON) vp8_dequant_idct_add = vp8_dequant_idct_add_neon;
  133. #endif
  134. vp8_dequant_idct_add_uv_block = vp8_dequant_idct_add_uv_block_c;
  135. #if HAVE_NEON
  136. if (flags & HAS_NEON) vp8_dequant_idct_add_uv_block = vp8_dequant_idct_add_uv_block_neon;
  137. #endif
  138. vp8_dequant_idct_add_y_block = vp8_dequant_idct_add_y_block_c;
  139. #if HAVE_NEON
  140. if (flags & HAS_NEON) vp8_dequant_idct_add_y_block = vp8_dequant_idct_add_y_block_neon;
  141. #endif
  142. vp8_dequantize_b = vp8_dequantize_b_c;
  143. #if HAVE_NEON
  144. if (flags & HAS_NEON) vp8_dequantize_b = vp8_dequantize_b_neon;
  145. #endif
  146. vp8_loop_filter_bh = vp8_loop_filter_bh_c;
  147. #if HAVE_NEON
  148. if (flags & HAS_NEON) vp8_loop_filter_bh = vp8_loop_filter_bh_neon;
  149. #endif
  150. vp8_loop_filter_bv = vp8_loop_filter_bv_c;
  151. #if HAVE_NEON
  152. if (flags & HAS_NEON) vp8_loop_filter_bv = vp8_loop_filter_bv_neon;
  153. #endif
  154. vp8_loop_filter_mbh = vp8_loop_filter_mbh_c;
  155. #if HAVE_NEON
  156. if (flags & HAS_NEON) vp8_loop_filter_mbh = vp8_loop_filter_mbh_neon;
  157. #endif
  158. vp8_loop_filter_mbv = vp8_loop_filter_mbv_c;
  159. #if HAVE_NEON
  160. if (flags & HAS_NEON) vp8_loop_filter_mbv = vp8_loop_filter_mbv_neon;
  161. #endif
  162. vp8_loop_filter_simple_bh = vp8_loop_filter_bhs_c;
  163. #if HAVE_NEON
  164. if (flags & HAS_NEON) vp8_loop_filter_simple_bh = vp8_loop_filter_bhs_neon;
  165. #endif
  166. vp8_loop_filter_simple_bv = vp8_loop_filter_bvs_c;
  167. #if HAVE_NEON
  168. if (flags & HAS_NEON) vp8_loop_filter_simple_bv = vp8_loop_filter_bvs_neon;
  169. #endif
  170. vp8_loop_filter_simple_mbh = vp8_loop_filter_simple_horizontal_edge_c;
  171. #if HAVE_NEON
  172. if (flags & HAS_NEON) vp8_loop_filter_simple_mbh = vp8_loop_filter_mbhs_neon;
  173. #endif
  174. vp8_loop_filter_simple_mbv = vp8_loop_filter_simple_vertical_edge_c;
  175. #if HAVE_NEON
  176. if (flags & HAS_NEON) vp8_loop_filter_simple_mbv = vp8_loop_filter_mbvs_neon;
  177. #endif
  178. vp8_short_idct4x4llm = vp8_short_idct4x4llm_c;
  179. #if HAVE_NEON
  180. if (flags & HAS_NEON) vp8_short_idct4x4llm = vp8_short_idct4x4llm_neon;
  181. #endif
  182. vp8_short_inv_walsh4x4 = vp8_short_inv_walsh4x4_c;
  183. #if HAVE_NEON
  184. if (flags & HAS_NEON) vp8_short_inv_walsh4x4 = vp8_short_inv_walsh4x4_neon;
  185. #endif
  186. vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_c;
  187. #if HAVE_NEON
  188. if (flags & HAS_NEON) vp8_sixtap_predict16x16 = vp8_sixtap_predict16x16_neon;
  189. #endif
  190. vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_c;
  191. #if HAVE_NEON
  192. if (flags & HAS_NEON) vp8_sixtap_predict8x4 = vp8_sixtap_predict8x4_neon;
  193. #endif
  194. vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_c;
  195. #if HAVE_NEON
  196. if (flags & HAS_NEON) vp8_sixtap_predict8x8 = vp8_sixtap_predict8x8_neon;
  197. #endif
  198. }
  199. #endif
  200. #ifdef __cplusplus
  201. } // extern "C"
  202. #endif
  203. #endif