You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

404 lines
18KB

  1. /*
  2. * Copyright (c) 2010 Fiona Glaser <fiona@x264.com>
  3. *
  4. * This file is part of Libav.
  5. *
  6. * Libav is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * Libav is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with Libav; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #include "libavutil/attributes.h"
  21. #include "libavutil/cpu.h"
  22. #include "libavutil/x86/cpu.h"
  23. #include "libavcodec/avcodec.h"
  24. #include "libavcodec/h264pred.h"
  25. #define PRED4x4(TYPE, DEPTH, OPT) \
  26. void ff_pred4x4_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
  27. const uint8_t *topright, \
  28. ptrdiff_t stride);
  29. PRED4x4(dc, 10, mmxext)
  30. PRED4x4(down_left, 10, sse2)
  31. PRED4x4(down_left, 10, avx)
  32. PRED4x4(down_right, 10, sse2)
  33. PRED4x4(down_right, 10, ssse3)
  34. PRED4x4(down_right, 10, avx)
  35. PRED4x4(vertical_left, 10, sse2)
  36. PRED4x4(vertical_left, 10, avx)
  37. PRED4x4(vertical_right, 10, sse2)
  38. PRED4x4(vertical_right, 10, ssse3)
  39. PRED4x4(vertical_right, 10, avx)
  40. PRED4x4(horizontal_up, 10, mmxext)
  41. PRED4x4(horizontal_down, 10, sse2)
  42. PRED4x4(horizontal_down, 10, ssse3)
  43. PRED4x4(horizontal_down, 10, avx)
  44. #define PRED8x8(TYPE, DEPTH, OPT) \
  45. void ff_pred8x8_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
  46. ptrdiff_t stride);
  47. PRED8x8(dc, 10, mmxext)
  48. PRED8x8(dc, 10, sse2)
  49. PRED8x8(top_dc, 10, sse2)
  50. PRED8x8(plane, 10, sse2)
  51. PRED8x8(vertical, 10, sse2)
  52. PRED8x8(horizontal, 10, sse2)
  53. #define PRED8x8L(TYPE, DEPTH, OPT)\
  54. void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
  55. int has_topleft, \
  56. int has_topright, \
  57. ptrdiff_t stride);
  58. PRED8x8L(dc, 10, sse2)
  59. PRED8x8L(dc, 10, avx)
  60. PRED8x8L(128_dc, 10, mmxext)
  61. PRED8x8L(128_dc, 10, sse2)
  62. PRED8x8L(top_dc, 10, sse2)
  63. PRED8x8L(top_dc, 10, avx)
  64. PRED8x8L(vertical, 10, sse2)
  65. PRED8x8L(vertical, 10, avx)
  66. PRED8x8L(horizontal, 10, sse2)
  67. PRED8x8L(horizontal, 10, ssse3)
  68. PRED8x8L(horizontal, 10, avx)
  69. PRED8x8L(down_left, 10, sse2)
  70. PRED8x8L(down_left, 10, ssse3)
  71. PRED8x8L(down_left, 10, avx)
  72. PRED8x8L(down_right, 10, sse2)
  73. PRED8x8L(down_right, 10, ssse3)
  74. PRED8x8L(down_right, 10, avx)
  75. PRED8x8L(vertical_right, 10, sse2)
  76. PRED8x8L(vertical_right, 10, ssse3)
  77. PRED8x8L(vertical_right, 10, avx)
  78. PRED8x8L(horizontal_up, 10, sse2)
  79. PRED8x8L(horizontal_up, 10, ssse3)
  80. PRED8x8L(horizontal_up, 10, avx)
  81. #define PRED16x16(TYPE, DEPTH, OPT)\
  82. void ff_pred16x16_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \
  83. ptrdiff_t stride);
  84. PRED16x16(dc, 10, mmxext)
  85. PRED16x16(dc, 10, sse2)
  86. PRED16x16(top_dc, 10, mmxext)
  87. PRED16x16(top_dc, 10, sse2)
  88. PRED16x16(128_dc, 10, mmxext)
  89. PRED16x16(128_dc, 10, sse2)
  90. PRED16x16(left_dc, 10, mmxext)
  91. PRED16x16(left_dc, 10, sse2)
  92. PRED16x16(vertical, 10, mmxext)
  93. PRED16x16(vertical, 10, sse2)
  94. PRED16x16(horizontal, 10, mmxext)
  95. PRED16x16(horizontal, 10, sse2)
  96. /* 8-bit versions */
  97. PRED16x16(vertical, 8, mmx)
  98. PRED16x16(vertical, 8, sse)
  99. PRED16x16(horizontal, 8, mmx)
  100. PRED16x16(horizontal, 8, mmxext)
  101. PRED16x16(horizontal, 8, ssse3)
  102. PRED16x16(dc, 8, mmxext)
  103. PRED16x16(dc, 8, sse2)
  104. PRED16x16(dc, 8, ssse3)
  105. PRED16x16(plane_h264, 8, mmx)
  106. PRED16x16(plane_h264, 8, mmxext)
  107. PRED16x16(plane_h264, 8, sse2)
  108. PRED16x16(plane_h264, 8, ssse3)
  109. PRED16x16(plane_rv40, 8, mmx)
  110. PRED16x16(plane_rv40, 8, mmxext)
  111. PRED16x16(plane_rv40, 8, sse2)
  112. PRED16x16(plane_rv40, 8, ssse3)
  113. PRED16x16(plane_svq3, 8, mmx)
  114. PRED16x16(plane_svq3, 8, mmxext)
  115. PRED16x16(plane_svq3, 8, sse2)
  116. PRED16x16(plane_svq3, 8, ssse3)
  117. PRED16x16(tm_vp8, 8, mmx)
  118. PRED16x16(tm_vp8, 8, mmxext)
  119. PRED16x16(tm_vp8, 8, sse2)
  120. PRED8x8(top_dc, 8, mmxext)
  121. PRED8x8(dc_rv40, 8, mmxext)
  122. PRED8x8(dc, 8, mmxext)
  123. PRED8x8(vertical, 8, mmx)
  124. PRED8x8(horizontal, 8, mmx)
  125. PRED8x8(horizontal, 8, mmxext)
  126. PRED8x8(horizontal, 8, ssse3)
  127. PRED8x8(plane, 8, mmx)
  128. PRED8x8(plane, 8, mmxext)
  129. PRED8x8(plane, 8, sse2)
  130. PRED8x8(plane, 8, ssse3)
  131. PRED8x8(tm_vp8, 8, mmx)
  132. PRED8x8(tm_vp8, 8, mmxext)
  133. PRED8x8(tm_vp8, 8, sse2)
  134. PRED8x8(tm_vp8, 8, ssse3)
  135. PRED8x8L(top_dc, 8, mmxext)
  136. PRED8x8L(top_dc, 8, ssse3)
  137. PRED8x8L(dc, 8, mmxext)
  138. PRED8x8L(dc, 8, ssse3)
  139. PRED8x8L(horizontal, 8, mmxext)
  140. PRED8x8L(horizontal, 8, ssse3)
  141. PRED8x8L(vertical, 8, mmxext)
  142. PRED8x8L(vertical, 8, ssse3)
  143. PRED8x8L(down_left, 8, mmxext)
  144. PRED8x8L(down_left, 8, sse2)
  145. PRED8x8L(down_left, 8, ssse3)
  146. PRED8x8L(down_right, 8, mmxext)
  147. PRED8x8L(down_right, 8, sse2)
  148. PRED8x8L(down_right, 8, ssse3)
  149. PRED8x8L(vertical_right, 8, mmxext)
  150. PRED8x8L(vertical_right, 8, sse2)
  151. PRED8x8L(vertical_right, 8, ssse3)
  152. PRED8x8L(vertical_left, 8, sse2)
  153. PRED8x8L(vertical_left, 8, ssse3)
  154. PRED8x8L(horizontal_up, 8, mmxext)
  155. PRED8x8L(horizontal_up, 8, ssse3)
  156. PRED8x8L(horizontal_down, 8, mmxext)
  157. PRED8x8L(horizontal_down, 8, sse2)
  158. PRED8x8L(horizontal_down, 8, ssse3)
  159. PRED4x4(dc, 8, mmxext)
  160. PRED4x4(down_left, 8, mmxext)
  161. PRED4x4(down_right, 8, mmxext)
  162. PRED4x4(vertical_left, 8, mmxext)
  163. PRED4x4(vertical_right, 8, mmxext)
  164. PRED4x4(horizontal_up, 8, mmxext)
  165. PRED4x4(horizontal_down, 8, mmxext)
  166. PRED4x4(tm_vp8, 8, mmx)
  167. PRED4x4(tm_vp8, 8, mmxext)
  168. PRED4x4(tm_vp8, 8, ssse3)
  169. PRED4x4(vertical_vp8, 8, mmxext)
  170. av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id,
  171. const int bit_depth,
  172. const int chroma_format_idc)
  173. {
  174. int cpu_flags = av_get_cpu_flags();
  175. if (bit_depth == 8) {
  176. if (EXTERNAL_MMX(cpu_flags)) {
  177. h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_8_mmx;
  178. h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmx;
  179. if (chroma_format_idc <= 1) {
  180. h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_8_mmx;
  181. h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmx;
  182. }
  183. if (codec_id == AV_CODEC_ID_VP7 || codec_id == AV_CODEC_ID_VP8) {
  184. h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_8_mmx;
  185. h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_mmx;
  186. h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmx;
  187. } else {
  188. if (chroma_format_idc <= 1)
  189. h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmx;
  190. if (codec_id == AV_CODEC_ID_SVQ3) {
  191. if (cpu_flags & AV_CPU_FLAG_CMOV)
  192. h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_mmx;
  193. } else if (codec_id == AV_CODEC_ID_RV40) {
  194. h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_8_mmx;
  195. } else {
  196. h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_8_mmx;
  197. }
  198. }
  199. }
  200. if (EXTERNAL_MMXEXT(cpu_flags)) {
  201. h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_mmxext;
  202. h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_mmxext;
  203. if (chroma_format_idc <= 1)
  204. h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_mmxext;
  205. h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_mmxext;
  206. h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_mmxext;
  207. h->pred8x8l [HOR_PRED ] = ff_pred8x8l_horizontal_8_mmxext;
  208. h->pred8x8l [VERT_PRED ] = ff_pred8x8l_vertical_8_mmxext;
  209. h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_8_mmxext;
  210. h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_8_mmxext;
  211. h->pred8x8l [HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_8_mmxext;
  212. h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_8_mmxext;
  213. h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_8_mmxext;
  214. h->pred4x4 [DIAG_DOWN_RIGHT_PRED ] = ff_pred4x4_down_right_8_mmxext;
  215. h->pred4x4 [VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_8_mmxext;
  216. h->pred4x4 [HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_8_mmxext;
  217. h->pred4x4 [DC_PRED ] = ff_pred4x4_dc_8_mmxext;
  218. if (codec_id == AV_CODEC_ID_VP7 || codec_id == AV_CODEC_ID_VP8 ||
  219. codec_id == AV_CODEC_ID_H264) {
  220. h->pred4x4 [DIAG_DOWN_LEFT_PRED] = ff_pred4x4_down_left_8_mmxext;
  221. }
  222. if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) {
  223. h->pred4x4 [VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_8_mmxext;
  224. }
  225. if (codec_id != AV_CODEC_ID_RV40) {
  226. h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_8_mmxext;
  227. }
  228. if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) {
  229. if (chroma_format_idc <= 1) {
  230. h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_8_mmxext;
  231. h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_8_mmxext;
  232. }
  233. }
  234. if (codec_id == AV_CODEC_ID_VP7 || codec_id == AV_CODEC_ID_VP8) {
  235. h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_8_mmxext;
  236. h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_rv40_8_mmxext;
  237. h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_mmxext;
  238. h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmxext;
  239. h->pred4x4 [VERT_PRED ] = ff_pred4x4_vertical_vp8_8_mmxext;
  240. } else {
  241. if (chroma_format_idc <= 1)
  242. h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_mmxext;
  243. if (codec_id == AV_CODEC_ID_SVQ3) {
  244. h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_8_mmxext;
  245. } else if (codec_id == AV_CODEC_ID_RV40) {
  246. h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_rv40_8_mmxext;
  247. } else {
  248. h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_h264_8_mmxext;
  249. }
  250. }
  251. }
  252. if (EXTERNAL_SSE(cpu_flags)) {
  253. h->pred16x16[VERT_PRED8x8] = ff_pred16x16_vertical_8_sse;
  254. }
  255. if (EXTERNAL_SSE2(cpu_flags)) {
  256. h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_sse2;
  257. h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_8_sse2;
  258. h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_8_sse2;
  259. h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_8_sse2;
  260. h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_8_sse2;
  261. h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_8_sse2;
  262. if (codec_id == AV_CODEC_ID_VP7 || codec_id == AV_CODEC_ID_VP8) {
  263. h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_8_sse2;
  264. h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_sse2;
  265. } else {
  266. if (chroma_format_idc <= 1)
  267. h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_sse2;
  268. if (codec_id == AV_CODEC_ID_SVQ3) {
  269. h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_sse2;
  270. } else if (codec_id == AV_CODEC_ID_RV40) {
  271. h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_8_sse2;
  272. } else {
  273. h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_8_sse2;
  274. }
  275. }
  276. }
  277. if (EXTERNAL_SSSE3(cpu_flags)) {
  278. h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_8_ssse3;
  279. h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_8_ssse3;
  280. if (chroma_format_idc <= 1)
  281. h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_8_ssse3;
  282. h->pred8x8l [TOP_DC_PRED ] = ff_pred8x8l_top_dc_8_ssse3;
  283. h->pred8x8l [DC_PRED ] = ff_pred8x8l_dc_8_ssse3;
  284. h->pred8x8l [HOR_PRED ] = ff_pred8x8l_horizontal_8_ssse3;
  285. h->pred8x8l [VERT_PRED ] = ff_pred8x8l_vertical_8_ssse3;
  286. h->pred8x8l [DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_8_ssse3;
  287. h->pred8x8l [DIAG_DOWN_RIGHT_PRED ] = ff_pred8x8l_down_right_8_ssse3;
  288. h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_8_ssse3;
  289. h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_8_ssse3;
  290. h->pred8x8l [HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_8_ssse3;
  291. h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_8_ssse3;
  292. if (codec_id == AV_CODEC_ID_VP7 || codec_id == AV_CODEC_ID_VP8) {
  293. h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_ssse3;
  294. h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_ssse3;
  295. } else {
  296. if (chroma_format_idc <= 1)
  297. h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_ssse3;
  298. if (codec_id == AV_CODEC_ID_SVQ3) {
  299. h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_8_ssse3;
  300. } else if (codec_id == AV_CODEC_ID_RV40) {
  301. h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_8_ssse3;
  302. } else {
  303. h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_8_ssse3;
  304. }
  305. }
  306. }
  307. } else if (bit_depth == 10) {
  308. if (EXTERNAL_MMXEXT(cpu_flags)) {
  309. h->pred4x4[DC_PRED ] = ff_pred4x4_dc_10_mmxext;
  310. h->pred4x4[HOR_UP_PRED ] = ff_pred4x4_horizontal_up_10_mmxext;
  311. if (chroma_format_idc <= 1)
  312. h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_mmxext;
  313. h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_mmxext;
  314. h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_10_mmxext;
  315. h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_10_mmxext;
  316. h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_10_mmxext;
  317. h->pred16x16[LEFT_DC_PRED8x8 ] = ff_pred16x16_left_dc_10_mmxext;
  318. h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_mmxext;
  319. h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_mmxext;
  320. }
  321. if (EXTERNAL_SSE2(cpu_flags)) {
  322. h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_sse2;
  323. h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_sse2;
  324. h->pred4x4[VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_10_sse2;
  325. h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_sse2;
  326. h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_sse2;
  327. if (chroma_format_idc <= 1) {
  328. h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_10_sse2;
  329. h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_10_sse2;
  330. h->pred8x8[PLANE_PRED8x8 ] = ff_pred8x8_plane_10_sse2;
  331. h->pred8x8[VERT_PRED8x8 ] = ff_pred8x8_vertical_10_sse2;
  332. h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_horizontal_10_sse2;
  333. }
  334. h->pred8x8l[VERT_PRED ] = ff_pred8x8l_vertical_10_sse2;
  335. h->pred8x8l[HOR_PRED ] = ff_pred8x8l_horizontal_10_sse2;
  336. h->pred8x8l[DC_PRED ] = ff_pred8x8l_dc_10_sse2;
  337. h->pred8x8l[DC_128_PRED ] = ff_pred8x8l_128_dc_10_sse2;
  338. h->pred8x8l[TOP_DC_PRED ] = ff_pred8x8l_top_dc_10_sse2;
  339. h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_sse2;
  340. h->pred8x8l[DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_10_sse2;
  341. h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_sse2;
  342. h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_sse2;
  343. h->pred16x16[DC_PRED8x8 ] = ff_pred16x16_dc_10_sse2;
  344. h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_10_sse2;
  345. h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_10_sse2;
  346. h->pred16x16[LEFT_DC_PRED8x8 ] = ff_pred16x16_left_dc_10_sse2;
  347. h->pred16x16[VERT_PRED8x8 ] = ff_pred16x16_vertical_10_sse2;
  348. h->pred16x16[HOR_PRED8x8 ] = ff_pred16x16_horizontal_10_sse2;
  349. }
  350. if (EXTERNAL_SSSE3(cpu_flags)) {
  351. h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_ssse3;
  352. h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_ssse3;
  353. h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_ssse3;
  354. h->pred8x8l[HOR_PRED ] = ff_pred8x8l_horizontal_10_ssse3;
  355. h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_ssse3;
  356. h->pred8x8l[DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_10_ssse3;
  357. h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_ssse3;
  358. h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_ssse3;
  359. }
  360. if (EXTERNAL_AVX(cpu_flags)) {
  361. h->pred4x4[DIAG_DOWN_LEFT_PRED ] = ff_pred4x4_down_left_10_avx;
  362. h->pred4x4[DIAG_DOWN_RIGHT_PRED] = ff_pred4x4_down_right_10_avx;
  363. h->pred4x4[VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_10_avx;
  364. h->pred4x4[VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_10_avx;
  365. h->pred4x4[HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_10_avx;
  366. h->pred8x8l[VERT_PRED ] = ff_pred8x8l_vertical_10_avx;
  367. h->pred8x8l[HOR_PRED ] = ff_pred8x8l_horizontal_10_avx;
  368. h->pred8x8l[DC_PRED ] = ff_pred8x8l_dc_10_avx;
  369. h->pred8x8l[TOP_DC_PRED ] = ff_pred8x8l_top_dc_10_avx;
  370. h->pred8x8l[DIAG_DOWN_RIGHT_PRED] = ff_pred8x8l_down_right_10_avx;
  371. h->pred8x8l[DIAG_DOWN_LEFT_PRED ] = ff_pred8x8l_down_left_10_avx;
  372. h->pred8x8l[VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_10_avx;
  373. h->pred8x8l[HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_10_avx;
  374. }
  375. }
  376. }