predict.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. /*****************************************************************************
  2. * predict.h: x86 intra prediction
  3. *****************************************************************************
  4. * Copyright (C) 2003-2018 x264 project
  5. *
  6. * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  7. * Loren Merritt <lorenm@u.washington.edu>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
  22. *
  23. * This program is also available under a commercial proprietary license.
  24. * For more information, contact us at licensing@x264.com.
  25. *****************************************************************************/
  26. #ifndef X264_X86_PREDICT_H
  27. #define X264_X86_PREDICT_H
  28. #define x264_predict_16x16_init_mmx x264_template(predict_16x16_init_mmx)
  29. void x264_predict_16x16_init_mmx( int cpu, x264_predict_t pf[7] );
  30. #define x264_predict_8x16c_init_mmx x264_template(predict_8x16c_init_mmx)
  31. void x264_predict_8x16c_init_mmx( int cpu, x264_predict_t pf[7] );
  32. #define x264_predict_8x8c_init_mmx x264_template(predict_8x8c_init_mmx)
  33. void x264_predict_8x8c_init_mmx ( int cpu, x264_predict_t pf[7] );
  34. #define x264_predict_4x4_init_mmx x264_template(predict_4x4_init_mmx)
  35. void x264_predict_4x4_init_mmx ( int cpu, x264_predict_t pf[12] );
  36. #define x264_predict_8x8_init_mmx x264_template(predict_8x8_init_mmx)
  37. void x264_predict_8x8_init_mmx ( int cpu, x264_predict8x8_t pf[12], x264_predict_8x8_filter_t *predict_8x8_filter );
  38. #define x264_predict_16x16_v_mmx2 x264_template(predict_16x16_v_mmx2)
  39. void x264_predict_16x16_v_mmx2( pixel *src );
  40. #define x264_predict_16x16_v_sse x264_template(predict_16x16_v_sse)
  41. void x264_predict_16x16_v_sse ( pixel *src );
  42. #define x264_predict_16x16_v_avx x264_template(predict_16x16_v_avx)
  43. void x264_predict_16x16_v_avx ( uint16_t *src );
  44. #define x264_predict_16x16_h_mmx2 x264_template(predict_16x16_h_mmx2)
  45. void x264_predict_16x16_h_mmx2( pixel *src );
  46. #define x264_predict_16x16_h_sse2 x264_template(predict_16x16_h_sse2)
  47. void x264_predict_16x16_h_sse2( uint16_t *src );
  48. #define x264_predict_16x16_h_ssse3 x264_template(predict_16x16_h_ssse3)
  49. void x264_predict_16x16_h_ssse3( uint8_t *src );
  50. #define x264_predict_16x16_h_avx2 x264_template(predict_16x16_h_avx2)
  51. void x264_predict_16x16_h_avx2( uint16_t *src );
  52. #define x264_predict_16x16_dc_sse2 x264_template(predict_16x16_dc_sse2)
  53. void x264_predict_16x16_dc_sse2( pixel *src );
  54. #define x264_predict_16x16_dc_avx2 x264_template(predict_16x16_dc_avx2)
  55. void x264_predict_16x16_dc_avx2( pixel *src );
  56. #define x264_predict_16x16_dc_left_sse2 x264_template(predict_16x16_dc_left_sse2)
  57. void x264_predict_16x16_dc_left_sse2( pixel *src );
  58. #define x264_predict_16x16_dc_left_avx2 x264_template(predict_16x16_dc_left_avx2)
  59. void x264_predict_16x16_dc_left_avx2( pixel *src );
  60. #define x264_predict_16x16_dc_top_sse2 x264_template(predict_16x16_dc_top_sse2)
  61. void x264_predict_16x16_dc_top_sse2( pixel *src );
  62. #define x264_predict_16x16_dc_top_avx2 x264_template(predict_16x16_dc_top_avx2)
  63. void x264_predict_16x16_dc_top_avx2( pixel *src );
  64. #define x264_predict_16x16_p_core_mmx2 x264_template(predict_16x16_p_core_mmx2)
  65. void x264_predict_16x16_p_core_mmx2( uint8_t *src, int i00, int b, int c );
  66. #define x264_predict_16x16_p_core_sse2 x264_template(predict_16x16_p_core_sse2)
  67. void x264_predict_16x16_p_core_sse2( pixel *src, int i00, int b, int c );
  68. #define x264_predict_16x16_p_core_avx x264_template(predict_16x16_p_core_avx)
  69. void x264_predict_16x16_p_core_avx( pixel *src, int i00, int b, int c );
  70. #define x264_predict_16x16_p_core_avx2 x264_template(predict_16x16_p_core_avx2)
  71. void x264_predict_16x16_p_core_avx2( pixel *src, int i00, int b, int c );
  72. #define x264_predict_8x16c_dc_mmx2 x264_template(predict_8x16c_dc_mmx2)
  73. void x264_predict_8x16c_dc_mmx2( pixel *src );
  74. #define x264_predict_8x16c_dc_sse2 x264_template(predict_8x16c_dc_sse2)
  75. void x264_predict_8x16c_dc_sse2( uint16_t *src );
  76. #define x264_predict_8x16c_dc_top_mmx2 x264_template(predict_8x16c_dc_top_mmx2)
  77. void x264_predict_8x16c_dc_top_mmx2( uint8_t *src );
  78. #define x264_predict_8x16c_dc_top_sse2 x264_template(predict_8x16c_dc_top_sse2)
  79. void x264_predict_8x16c_dc_top_sse2( uint16_t *src );
  80. #define x264_predict_8x16c_v_mmx x264_template(predict_8x16c_v_mmx)
  81. void x264_predict_8x16c_v_mmx( uint8_t *src );
  82. #define x264_predict_8x16c_v_sse x264_template(predict_8x16c_v_sse)
  83. void x264_predict_8x16c_v_sse( uint16_t *src );
  84. #define x264_predict_8x16c_h_mmx2 x264_template(predict_8x16c_h_mmx2)
  85. void x264_predict_8x16c_h_mmx2( pixel *src );
  86. #define x264_predict_8x16c_h_sse2 x264_template(predict_8x16c_h_sse2)
  87. void x264_predict_8x16c_h_sse2( uint16_t *src );
  88. #define x264_predict_8x16c_h_ssse3 x264_template(predict_8x16c_h_ssse3)
  89. void x264_predict_8x16c_h_ssse3( uint8_t *src );
  90. #define x264_predict_8x16c_h_avx2 x264_template(predict_8x16c_h_avx2)
  91. void x264_predict_8x16c_h_avx2( uint16_t *src );
  92. #define x264_predict_8x16c_p_core_mmx2 x264_template(predict_8x16c_p_core_mmx2)
  93. void x264_predict_8x16c_p_core_mmx2( uint8_t *src, int i00, int b, int c );
  94. #define x264_predict_8x16c_p_core_sse2 x264_template(predict_8x16c_p_core_sse2)
  95. void x264_predict_8x16c_p_core_sse2( pixel *src, int i00, int b, int c );
  96. #define x264_predict_8x16c_p_core_avx x264_template(predict_8x16c_p_core_avx)
  97. void x264_predict_8x16c_p_core_avx ( pixel *src, int i00, int b, int c );
  98. #define x264_predict_8x16c_p_core_avx2 x264_template(predict_8x16c_p_core_avx2)
  99. void x264_predict_8x16c_p_core_avx2( pixel *src, int i00, int b, int c );
  100. #define x264_predict_8x8c_p_core_mmx2 x264_template(predict_8x8c_p_core_mmx2)
  101. void x264_predict_8x8c_p_core_mmx2( uint8_t *src, int i00, int b, int c );
  102. #define x264_predict_8x8c_p_core_sse2 x264_template(predict_8x8c_p_core_sse2)
  103. void x264_predict_8x8c_p_core_sse2( pixel *src, int i00, int b, int c );
  104. #define x264_predict_8x8c_p_core_avx x264_template(predict_8x8c_p_core_avx)
  105. void x264_predict_8x8c_p_core_avx ( pixel *src, int i00, int b, int c );
  106. #define x264_predict_8x8c_p_core_avx2 x264_template(predict_8x8c_p_core_avx2)
  107. void x264_predict_8x8c_p_core_avx2( pixel *src, int i00, int b, int c );
  108. #define x264_predict_8x8c_dc_mmx2 x264_template(predict_8x8c_dc_mmx2)
  109. void x264_predict_8x8c_dc_mmx2( pixel *src );
  110. #define x264_predict_8x8c_dc_sse2 x264_template(predict_8x8c_dc_sse2)
  111. void x264_predict_8x8c_dc_sse2( uint16_t *src );
  112. #define x264_predict_8x8c_dc_top_mmx2 x264_template(predict_8x8c_dc_top_mmx2)
  113. void x264_predict_8x8c_dc_top_mmx2( uint8_t *src );
  114. #define x264_predict_8x8c_dc_top_sse2 x264_template(predict_8x8c_dc_top_sse2)
  115. void x264_predict_8x8c_dc_top_sse2( uint16_t *src );
  116. #define x264_predict_8x8c_v_mmx x264_template(predict_8x8c_v_mmx)
  117. void x264_predict_8x8c_v_mmx( pixel *src );
  118. #define x264_predict_8x8c_v_sse x264_template(predict_8x8c_v_sse)
  119. void x264_predict_8x8c_v_sse( uint16_t *src );
  120. #define x264_predict_8x8c_h_mmx2 x264_template(predict_8x8c_h_mmx2)
  121. void x264_predict_8x8c_h_mmx2( pixel *src );
  122. #define x264_predict_8x8c_h_sse2 x264_template(predict_8x8c_h_sse2)
  123. void x264_predict_8x8c_h_sse2( uint16_t *src );
  124. #define x264_predict_8x8c_h_ssse3 x264_template(predict_8x8c_h_ssse3)
  125. void x264_predict_8x8c_h_ssse3( uint8_t *src );
  126. #define x264_predict_8x8c_h_avx2 x264_template(predict_8x8c_h_avx2)
  127. void x264_predict_8x8c_h_avx2( uint16_t *src );
  128. #define x264_predict_8x8_v_mmx2 x264_template(predict_8x8_v_mmx2)
  129. void x264_predict_8x8_v_mmx2( uint8_t *src, uint8_t edge[36] );
  130. #define x264_predict_8x8_v_sse x264_template(predict_8x8_v_sse)
  131. void x264_predict_8x8_v_sse ( uint16_t *src, uint16_t edge[36] );
  132. #define x264_predict_8x8_h_mmx2 x264_template(predict_8x8_h_mmx2)
  133. void x264_predict_8x8_h_mmx2( uint8_t *src, uint8_t edge[36] );
  134. #define x264_predict_8x8_h_sse2 x264_template(predict_8x8_h_sse2)
  135. void x264_predict_8x8_h_sse2( uint16_t *src, uint16_t edge[36] );
  136. #define x264_predict_8x8_hd_mmx2 x264_template(predict_8x8_hd_mmx2)
  137. void x264_predict_8x8_hd_mmx2( uint8_t *src, uint8_t edge[36] );
  138. #define x264_predict_8x8_hu_mmx2 x264_template(predict_8x8_hu_mmx2)
  139. void x264_predict_8x8_hu_mmx2( uint8_t *src, uint8_t edge[36] );
  140. #define x264_predict_8x8_dc_mmx2 x264_template(predict_8x8_dc_mmx2)
  141. void x264_predict_8x8_dc_mmx2( uint8_t *src, uint8_t edge[36] );
  142. #define x264_predict_8x8_dc_sse2 x264_template(predict_8x8_dc_sse2)
  143. void x264_predict_8x8_dc_sse2( uint16_t *src, uint16_t edge[36] );
  144. #define x264_predict_8x8_dc_top_mmx2 x264_template(predict_8x8_dc_top_mmx2)
  145. void x264_predict_8x8_dc_top_mmx2( uint8_t *src, uint8_t edge[36] );
  146. #define x264_predict_8x8_dc_top_sse2 x264_template(predict_8x8_dc_top_sse2)
  147. void x264_predict_8x8_dc_top_sse2( uint16_t *src, uint16_t edge[36] );
  148. #define x264_predict_8x8_dc_left_mmx2 x264_template(predict_8x8_dc_left_mmx2)
  149. void x264_predict_8x8_dc_left_mmx2( uint8_t *src, uint8_t edge[36] );
  150. #define x264_predict_8x8_dc_left_sse2 x264_template(predict_8x8_dc_left_sse2)
  151. void x264_predict_8x8_dc_left_sse2( uint16_t *src, uint16_t edge[36] );
  152. #define x264_predict_8x8_ddl_mmx2 x264_template(predict_8x8_ddl_mmx2)
  153. void x264_predict_8x8_ddl_mmx2( uint8_t *src, uint8_t edge[36] );
  154. #define x264_predict_8x8_ddl_sse2 x264_template(predict_8x8_ddl_sse2)
  155. void x264_predict_8x8_ddl_sse2( pixel *src, pixel edge[36] );
  156. #define x264_predict_8x8_ddl_ssse3 x264_template(predict_8x8_ddl_ssse3)
  157. void x264_predict_8x8_ddl_ssse3( pixel *src, pixel edge[36] );
  158. #define x264_predict_8x8_ddl_cache64_ssse3 x264_template(predict_8x8_ddl_cache64_ssse3)
  159. void x264_predict_8x8_ddl_cache64_ssse3( pixel *src, pixel edge[36] );
  160. #define x264_predict_8x8_ddl_avx x264_template(predict_8x8_ddl_avx)
  161. void x264_predict_8x8_ddl_avx( pixel *src, pixel edge[36] );
  162. #define x264_predict_8x8_ddr_mmx2 x264_template(predict_8x8_ddr_mmx2)
  163. void x264_predict_8x8_ddr_mmx2( uint8_t *src, uint8_t edge[36] );
  164. #define x264_predict_8x8_ddr_sse2 x264_template(predict_8x8_ddr_sse2)
  165. void x264_predict_8x8_ddr_sse2( pixel *src, pixel edge[36] );
  166. #define x264_predict_8x8_ddr_ssse3 x264_template(predict_8x8_ddr_ssse3)
  167. void x264_predict_8x8_ddr_ssse3( pixel *src, pixel edge[36] );
  168. #define x264_predict_8x8_ddr_cache64_ssse3 x264_template(predict_8x8_ddr_cache64_ssse3)
  169. void x264_predict_8x8_ddr_cache64_ssse3( pixel *src, pixel edge[36] );
  170. #define x264_predict_8x8_ddr_avx x264_template(predict_8x8_ddr_avx)
  171. void x264_predict_8x8_ddr_avx( pixel *src, pixel edge[36] );
  172. #define x264_predict_8x8_vl_sse2 x264_template(predict_8x8_vl_sse2)
  173. void x264_predict_8x8_vl_sse2( pixel *src, pixel edge[36] );
  174. #define x264_predict_8x8_vl_ssse3 x264_template(predict_8x8_vl_ssse3)
  175. void x264_predict_8x8_vl_ssse3( pixel *src, pixel edge[36] );
  176. #define x264_predict_8x8_vl_avx x264_template(predict_8x8_vl_avx)
  177. void x264_predict_8x8_vl_avx( pixel *src, pixel edge[36] );
  178. #define x264_predict_8x8_vl_mmx2 x264_template(predict_8x8_vl_mmx2)
  179. void x264_predict_8x8_vl_mmx2( uint8_t *src, uint8_t edge[36] );
  180. #define x264_predict_8x8_vr_mmx2 x264_template(predict_8x8_vr_mmx2)
  181. void x264_predict_8x8_vr_mmx2( uint8_t *src, uint8_t edge[36] );
  182. #define x264_predict_8x8_vr_sse2 x264_template(predict_8x8_vr_sse2)
  183. void x264_predict_8x8_vr_sse2( pixel *src, pixel edge[36] );
  184. #define x264_predict_8x8_vr_ssse3 x264_template(predict_8x8_vr_ssse3)
  185. void x264_predict_8x8_vr_ssse3( pixel *src, pixel edge[36] );
  186. #define x264_predict_8x8_vr_avx x264_template(predict_8x8_vr_avx)
  187. void x264_predict_8x8_vr_avx( pixel *src, pixel edge[36] );
  188. #define x264_predict_8x8_hu_sse2 x264_template(predict_8x8_hu_sse2)
  189. void x264_predict_8x8_hu_sse2( pixel *src, pixel edge[36] );
  190. #define x264_predict_8x8_hu_ssse3 x264_template(predict_8x8_hu_ssse3)
  191. void x264_predict_8x8_hu_ssse3( pixel *src, pixel edge[36] );
  192. #define x264_predict_8x8_hu_avx x264_template(predict_8x8_hu_avx)
  193. void x264_predict_8x8_hu_avx( pixel *src, pixel edge[36] );
  194. #define x264_predict_8x8_hd_sse2 x264_template(predict_8x8_hd_sse2)
  195. void x264_predict_8x8_hd_sse2( pixel *src, pixel edge[36] );
  196. #define x264_predict_8x8_hd_ssse3 x264_template(predict_8x8_hd_ssse3)
  197. void x264_predict_8x8_hd_ssse3( pixel *src, pixel edge[36] );
  198. #define x264_predict_8x8_hd_avx x264_template(predict_8x8_hd_avx)
  199. void x264_predict_8x8_hd_avx( pixel *src, pixel edge[36] );
  200. #define x264_predict_8x8_filter_mmx2 x264_template(predict_8x8_filter_mmx2)
  201. void x264_predict_8x8_filter_mmx2( uint8_t *src, uint8_t edge[36], int i_neighbor, int i_filters );
  202. #define x264_predict_8x8_filter_sse2 x264_template(predict_8x8_filter_sse2)
  203. void x264_predict_8x8_filter_sse2( uint16_t *src, uint16_t edge[36], int i_neighbor, int i_filters );
  204. #define x264_predict_8x8_filter_ssse3 x264_template(predict_8x8_filter_ssse3)
  205. void x264_predict_8x8_filter_ssse3( pixel *src, pixel edge[36], int i_neighbor, int i_filters );
  206. #define x264_predict_8x8_filter_avx x264_template(predict_8x8_filter_avx)
  207. void x264_predict_8x8_filter_avx( uint16_t *src, uint16_t edge[36], int i_neighbor, int i_filters );
  208. #define x264_predict_4x4_h_avx2 x264_template(predict_4x4_h_avx2)
  209. void x264_predict_4x4_h_avx2( uint16_t *src );
  210. #define x264_predict_4x4_ddl_mmx2 x264_template(predict_4x4_ddl_mmx2)
  211. void x264_predict_4x4_ddl_mmx2( pixel *src );
  212. #define x264_predict_4x4_ddl_sse2 x264_template(predict_4x4_ddl_sse2)
  213. void x264_predict_4x4_ddl_sse2( uint16_t *src );
  214. #define x264_predict_4x4_ddl_avx x264_template(predict_4x4_ddl_avx)
  215. void x264_predict_4x4_ddl_avx( uint16_t *src );
  216. #define x264_predict_4x4_ddr_mmx2 x264_template(predict_4x4_ddr_mmx2)
  217. void x264_predict_4x4_ddr_mmx2( pixel *src );
  218. #define x264_predict_4x4_vl_mmx2 x264_template(predict_4x4_vl_mmx2)
  219. void x264_predict_4x4_vl_mmx2( pixel *src );
  220. #define x264_predict_4x4_vl_sse2 x264_template(predict_4x4_vl_sse2)
  221. void x264_predict_4x4_vl_sse2( uint16_t *src );
  222. #define x264_predict_4x4_vl_avx x264_template(predict_4x4_vl_avx)
  223. void x264_predict_4x4_vl_avx( uint16_t *src );
  224. #define x264_predict_4x4_vr_mmx2 x264_template(predict_4x4_vr_mmx2)
  225. void x264_predict_4x4_vr_mmx2( uint8_t *src );
  226. #define x264_predict_4x4_vr_sse2 x264_template(predict_4x4_vr_sse2)
  227. void x264_predict_4x4_vr_sse2( uint16_t *src );
  228. #define x264_predict_4x4_vr_ssse3 x264_template(predict_4x4_vr_ssse3)
  229. void x264_predict_4x4_vr_ssse3( pixel *src );
  230. #define x264_predict_4x4_vr_cache64_ssse3 x264_template(predict_4x4_vr_cache64_ssse3)
  231. void x264_predict_4x4_vr_cache64_ssse3( uint8_t *src );
  232. #define x264_predict_4x4_vr_avx x264_template(predict_4x4_vr_avx)
  233. void x264_predict_4x4_vr_avx( uint16_t *src );
  234. #define x264_predict_4x4_hd_mmx2 x264_template(predict_4x4_hd_mmx2)
  235. void x264_predict_4x4_hd_mmx2( pixel *src );
  236. #define x264_predict_4x4_hd_sse2 x264_template(predict_4x4_hd_sse2)
  237. void x264_predict_4x4_hd_sse2( uint16_t *src );
  238. #define x264_predict_4x4_hd_ssse3 x264_template(predict_4x4_hd_ssse3)
  239. void x264_predict_4x4_hd_ssse3( pixel *src );
  240. #define x264_predict_4x4_hd_avx x264_template(predict_4x4_hd_avx)
  241. void x264_predict_4x4_hd_avx( uint16_t *src );
  242. #define x264_predict_4x4_dc_mmx2 x264_template(predict_4x4_dc_mmx2)
  243. void x264_predict_4x4_dc_mmx2( pixel *src );
  244. #define x264_predict_4x4_ddr_sse2 x264_template(predict_4x4_ddr_sse2)
  245. void x264_predict_4x4_ddr_sse2( uint16_t *src );
  246. #define x264_predict_4x4_ddr_ssse3 x264_template(predict_4x4_ddr_ssse3)
  247. void x264_predict_4x4_ddr_ssse3( pixel *src );
  248. #define x264_predict_4x4_ddr_avx x264_template(predict_4x4_ddr_avx)
  249. void x264_predict_4x4_ddr_avx( uint16_t *src );
  250. #define x264_predict_4x4_hu_mmx2 x264_template(predict_4x4_hu_mmx2)
  251. void x264_predict_4x4_hu_mmx2( pixel *src );
  252. #endif