vp9dsp_init.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. /*
  2. * VP9 SIMD optimizations
  3. *
  4. * Copyright (c) 2013 Ronald S. Bultje <rsbultje gmail com>
  5. *
  6. * This file is part of FFmpeg.
  7. *
  8. * FFmpeg is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU Lesser General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2.1 of the License, or (at your option) any later version.
  12. *
  13. * FFmpeg is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * Lesser General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with FFmpeg; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. #include "libavutil/attributes.h"
  23. #include "libavutil/cpu.h"
  24. #include "libavutil/mem.h"
  25. #include "libavutil/x86/cpu.h"
  26. #include "libavcodec/vp9dsp.h"
  27. #include "libavcodec/x86/vp9dsp_init.h"
  28. #if HAVE_X86ASM
  29. decl_fpel_func(put, 4, , mmx);
  30. decl_fpel_func(put, 8, , mmx);
  31. decl_fpel_func(put, 16, , sse);
  32. decl_fpel_func(put, 32, , sse);
  33. decl_fpel_func(put, 64, , sse);
  34. decl_fpel_func(avg, 4, _8, mmxext);
  35. decl_fpel_func(avg, 8, _8, mmxext);
  36. decl_fpel_func(avg, 16, _8, sse2);
  37. decl_fpel_func(avg, 32, _8, sse2);
  38. decl_fpel_func(avg, 64, _8, sse2);
  39. decl_fpel_func(put, 32, , avx);
  40. decl_fpel_func(put, 64, , avx);
  41. decl_fpel_func(avg, 32, _8, avx2);
  42. decl_fpel_func(avg, 64, _8, avx2);
  43. decl_mc_funcs(4, mmxext, int16_t, 8, 8);
  44. decl_mc_funcs(8, sse2, int16_t, 8, 8);
  45. decl_mc_funcs(4, ssse3, int8_t, 32, 8);
  46. decl_mc_funcs(8, ssse3, int8_t, 32, 8);
  47. #if ARCH_X86_64
  48. decl_mc_funcs(16, ssse3, int8_t, 32, 8);
  49. decl_mc_funcs(32, avx2, int8_t, 32, 8);
  50. #endif
  51. mc_rep_funcs(16, 8, 8, sse2, int16_t, 8, 8)
  52. #if ARCH_X86_32
  53. mc_rep_funcs(16, 8, 8, ssse3, int8_t, 32, 8)
  54. #endif
  55. mc_rep_funcs(32, 16, 16, sse2, int16_t, 8, 8)
  56. mc_rep_funcs(32, 16, 16, ssse3, int8_t, 32, 8)
  57. mc_rep_funcs(64, 32, 32, sse2, int16_t, 8, 8)
  58. mc_rep_funcs(64, 32, 32, ssse3, int8_t, 32, 8)
  59. #if ARCH_X86_64 && HAVE_AVX2_EXTERNAL
  60. mc_rep_funcs(64, 32, 32, avx2, int8_t, 32, 8)
  61. #endif
  62. extern const int8_t ff_filters_ssse3[3][15][4][32];
  63. extern const int16_t ff_filters_sse2[3][15][8][8];
  64. filters_8tap_2d_fn2(put, 16, 8, 1, mmxext, sse2, sse2)
  65. filters_8tap_2d_fn2(avg, 16, 8, 1, mmxext, sse2, sse2)
  66. filters_8tap_2d_fn2(put, 16, 8, 1, ssse3, ssse3, ssse3)
  67. filters_8tap_2d_fn2(avg, 16, 8, 1, ssse3, ssse3, ssse3)
  68. #if ARCH_X86_64 && HAVE_AVX2_EXTERNAL
  69. filters_8tap_2d_fn(put, 64, 32, 8, 1, avx2, ssse3)
  70. filters_8tap_2d_fn(put, 32, 32, 8, 1, avx2, ssse3)
  71. filters_8tap_2d_fn(avg, 64, 32, 8, 1, avx2, ssse3)
  72. filters_8tap_2d_fn(avg, 32, 32, 8, 1, avx2, ssse3)
  73. #endif
  74. filters_8tap_1d_fn3(put, 8, mmxext, sse2, sse2)
  75. filters_8tap_1d_fn3(avg, 8, mmxext, sse2, sse2)
  76. filters_8tap_1d_fn3(put, 8, ssse3, ssse3, ssse3)
  77. filters_8tap_1d_fn3(avg, 8, ssse3, ssse3, ssse3)
  78. #if ARCH_X86_64 && HAVE_AVX2_EXTERNAL
  79. filters_8tap_1d_fn2(put, 64, 8, avx2, ssse3)
  80. filters_8tap_1d_fn2(put, 32, 8, avx2, ssse3)
  81. filters_8tap_1d_fn2(avg, 64, 8, avx2, ssse3)
  82. filters_8tap_1d_fn2(avg, 32, 8, avx2, ssse3)
  83. #endif
  84. #define itxfm_func(typea, typeb, size, opt) \
  85. void ff_vp9_##typea##_##typeb##_##size##x##size##_add_##opt(uint8_t *dst, ptrdiff_t stride, \
  86. int16_t *block, int eob)
  87. #define itxfm_funcs(size, opt) \
  88. itxfm_func(idct, idct, size, opt); \
  89. itxfm_func(iadst, idct, size, opt); \
  90. itxfm_func(idct, iadst, size, opt); \
  91. itxfm_func(iadst, iadst, size, opt)
  92. itxfm_func(idct, idct, 4, mmxext);
  93. itxfm_func(idct, iadst, 4, sse2);
  94. itxfm_func(iadst, idct, 4, sse2);
  95. itxfm_func(iadst, iadst, 4, sse2);
  96. itxfm_funcs(4, ssse3);
  97. itxfm_funcs(8, sse2);
  98. itxfm_funcs(8, ssse3);
  99. itxfm_funcs(8, avx);
  100. itxfm_funcs(16, sse2);
  101. itxfm_funcs(16, ssse3);
  102. itxfm_funcs(16, avx);
  103. itxfm_func(idct, idct, 32, sse2);
  104. itxfm_func(idct, idct, 32, ssse3);
  105. itxfm_func(idct, idct, 32, avx);
  106. itxfm_func(iwht, iwht, 4, mmx);
  107. itxfm_funcs(16, avx2);
  108. itxfm_func(idct, idct, 32, avx2);
  109. #undef itxfm_func
  110. #undef itxfm_funcs
  111. #define lpf_funcs(size1, size2, opt) \
  112. void ff_vp9_loop_filter_v_##size1##_##size2##_##opt(uint8_t *dst, ptrdiff_t stride, \
  113. int E, int I, int H); \
  114. void ff_vp9_loop_filter_h_##size1##_##size2##_##opt(uint8_t *dst, ptrdiff_t stride, \
  115. int E, int I, int H)
  116. lpf_funcs(4, 8, mmxext);
  117. lpf_funcs(8, 8, mmxext);
  118. lpf_funcs(16, 16, sse2);
  119. lpf_funcs(16, 16, ssse3);
  120. lpf_funcs(16, 16, avx);
  121. lpf_funcs(44, 16, sse2);
  122. lpf_funcs(44, 16, ssse3);
  123. lpf_funcs(44, 16, avx);
  124. lpf_funcs(84, 16, sse2);
  125. lpf_funcs(84, 16, ssse3);
  126. lpf_funcs(84, 16, avx);
  127. lpf_funcs(48, 16, sse2);
  128. lpf_funcs(48, 16, ssse3);
  129. lpf_funcs(48, 16, avx);
  130. lpf_funcs(88, 16, sse2);
  131. lpf_funcs(88, 16, ssse3);
  132. lpf_funcs(88, 16, avx);
  133. #undef lpf_funcs
  134. #define ipred_func(size, type, opt) \
  135. void ff_vp9_ipred_##type##_##size##x##size##_##opt(uint8_t *dst, ptrdiff_t stride, \
  136. const uint8_t *l, const uint8_t *a)
  137. ipred_func(8, v, mmx);
  138. #define ipred_dc_funcs(size, opt) \
  139. ipred_func(size, dc, opt); \
  140. ipred_func(size, dc_left, opt); \
  141. ipred_func(size, dc_top, opt)
  142. ipred_dc_funcs(4, mmxext);
  143. ipred_dc_funcs(8, mmxext);
  144. #define ipred_dir_tm_funcs(size, opt) \
  145. ipred_func(size, tm, opt); \
  146. ipred_func(size, dl, opt); \
  147. ipred_func(size, dr, opt); \
  148. ipred_func(size, hd, opt); \
  149. ipred_func(size, hu, opt); \
  150. ipred_func(size, vl, opt); \
  151. ipred_func(size, vr, opt)
  152. ipred_dir_tm_funcs(4, mmxext);
  153. ipred_func(16, v, sse);
  154. ipred_func(32, v, sse);
  155. ipred_dc_funcs(16, sse2);
  156. ipred_dc_funcs(32, sse2);
  157. #define ipred_dir_tm_h_funcs(size, opt) \
  158. ipred_dir_tm_funcs(size, opt); \
  159. ipred_func(size, h, opt)
  160. ipred_dir_tm_h_funcs(8, sse2);
  161. ipred_dir_tm_h_funcs(16, sse2);
  162. ipred_dir_tm_h_funcs(32, sse2);
  163. ipred_func(4, h, sse2);
  164. #define ipred_all_funcs(size, opt) \
  165. ipred_dc_funcs(size, opt); \
  166. ipred_dir_tm_h_funcs(size, opt)
  167. // FIXME hd/vl_4x4_ssse3 does not exist
  168. ipred_all_funcs(4, ssse3);
  169. ipred_all_funcs(8, ssse3);
  170. ipred_all_funcs(16, ssse3);
  171. ipred_all_funcs(32, ssse3);
  172. ipred_dir_tm_h_funcs(8, avx);
  173. ipred_dir_tm_h_funcs(16, avx);
  174. ipred_dir_tm_h_funcs(32, avx);
  175. ipred_func(32, v, avx);
  176. ipred_dc_funcs(32, avx2);
  177. ipred_func(32, h, avx2);
  178. ipred_func(32, tm, avx2);
  179. #undef ipred_func
  180. #undef ipred_dir_tm_h_funcs
  181. #undef ipred_dir_tm_funcs
  182. #undef ipred_dc_funcs
  183. #endif /* HAVE_X86ASM */
  184. av_cold void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int bpp, int bitexact)
  185. {
  186. #if HAVE_X86ASM
  187. int cpu_flags;
  188. if (bpp == 10) {
  189. ff_vp9dsp_init_10bpp_x86(dsp, bitexact);
  190. return;
  191. } else if (bpp == 12) {
  192. ff_vp9dsp_init_12bpp_x86(dsp, bitexact);
  193. return;
  194. }
  195. cpu_flags = av_get_cpu_flags();
  196. #define init_lpf(opt) do { \
  197. dsp->loop_filter_16[0] = ff_vp9_loop_filter_h_16_16_##opt; \
  198. dsp->loop_filter_16[1] = ff_vp9_loop_filter_v_16_16_##opt; \
  199. dsp->loop_filter_mix2[0][0][0] = ff_vp9_loop_filter_h_44_16_##opt; \
  200. dsp->loop_filter_mix2[0][0][1] = ff_vp9_loop_filter_v_44_16_##opt; \
  201. dsp->loop_filter_mix2[0][1][0] = ff_vp9_loop_filter_h_48_16_##opt; \
  202. dsp->loop_filter_mix2[0][1][1] = ff_vp9_loop_filter_v_48_16_##opt; \
  203. dsp->loop_filter_mix2[1][0][0] = ff_vp9_loop_filter_h_84_16_##opt; \
  204. dsp->loop_filter_mix2[1][0][1] = ff_vp9_loop_filter_v_84_16_##opt; \
  205. dsp->loop_filter_mix2[1][1][0] = ff_vp9_loop_filter_h_88_16_##opt; \
  206. dsp->loop_filter_mix2[1][1][1] = ff_vp9_loop_filter_v_88_16_##opt; \
  207. } while (0)
  208. #define init_ipred(sz, opt, t, e) \
  209. dsp->intra_pred[TX_##sz##X##sz][e##_PRED] = ff_vp9_ipred_##t##_##sz##x##sz##_##opt
  210. #define ff_vp9_ipred_hd_4x4_ssse3 ff_vp9_ipred_hd_4x4_mmxext
  211. #define ff_vp9_ipred_vl_4x4_ssse3 ff_vp9_ipred_vl_4x4_mmxext
  212. #define init_dir_tm_ipred(sz, opt) do { \
  213. init_ipred(sz, opt, dl, DIAG_DOWN_LEFT); \
  214. init_ipred(sz, opt, dr, DIAG_DOWN_RIGHT); \
  215. init_ipred(sz, opt, hd, HOR_DOWN); \
  216. init_ipred(sz, opt, vl, VERT_LEFT); \
  217. init_ipred(sz, opt, hu, HOR_UP); \
  218. init_ipred(sz, opt, tm, TM_VP8); \
  219. init_ipred(sz, opt, vr, VERT_RIGHT); \
  220. } while (0)
  221. #define init_dir_tm_h_ipred(sz, opt) do { \
  222. init_dir_tm_ipred(sz, opt); \
  223. init_ipred(sz, opt, h, HOR); \
  224. } while (0)
  225. #define init_dc_ipred(sz, opt) do { \
  226. init_ipred(sz, opt, dc, DC); \
  227. init_ipred(sz, opt, dc_left, LEFT_DC); \
  228. init_ipred(sz, opt, dc_top, TOP_DC); \
  229. } while (0)
  230. #define init_all_ipred(sz, opt) do { \
  231. init_dc_ipred(sz, opt); \
  232. init_dir_tm_h_ipred(sz, opt); \
  233. } while (0)
  234. if (EXTERNAL_MMX(cpu_flags)) {
  235. init_fpel_func(4, 0, 4, put, , mmx);
  236. init_fpel_func(3, 0, 8, put, , mmx);
  237. if (!bitexact) {
  238. dsp->itxfm_add[4 /* lossless */][DCT_DCT] =
  239. dsp->itxfm_add[4 /* lossless */][ADST_DCT] =
  240. dsp->itxfm_add[4 /* lossless */][DCT_ADST] =
  241. dsp->itxfm_add[4 /* lossless */][ADST_ADST] = ff_vp9_iwht_iwht_4x4_add_mmx;
  242. }
  243. init_ipred(8, mmx, v, VERT);
  244. }
  245. if (EXTERNAL_MMXEXT(cpu_flags)) {
  246. dsp->loop_filter_8[0][0] = ff_vp9_loop_filter_h_4_8_mmxext;
  247. dsp->loop_filter_8[0][1] = ff_vp9_loop_filter_v_4_8_mmxext;
  248. dsp->loop_filter_8[1][0] = ff_vp9_loop_filter_h_8_8_mmxext;
  249. dsp->loop_filter_8[1][1] = ff_vp9_loop_filter_v_8_8_mmxext;
  250. init_subpel2(4, 0, 4, put, 8, mmxext);
  251. init_subpel2(4, 1, 4, avg, 8, mmxext);
  252. init_fpel_func(4, 1, 4, avg, _8, mmxext);
  253. init_fpel_func(3, 1, 8, avg, _8, mmxext);
  254. dsp->itxfm_add[TX_4X4][DCT_DCT] = ff_vp9_idct_idct_4x4_add_mmxext;
  255. init_dc_ipred(4, mmxext);
  256. init_dc_ipred(8, mmxext);
  257. init_dir_tm_ipred(4, mmxext);
  258. }
  259. if (EXTERNAL_SSE(cpu_flags)) {
  260. init_fpel_func(2, 0, 16, put, , sse);
  261. init_fpel_func(1, 0, 32, put, , sse);
  262. init_fpel_func(0, 0, 64, put, , sse);
  263. init_ipred(16, sse, v, VERT);
  264. init_ipred(32, sse, v, VERT);
  265. }
  266. if (EXTERNAL_SSE2(cpu_flags)) {
  267. init_subpel3_8to64(0, put, 8, sse2);
  268. init_subpel3_8to64(1, avg, 8, sse2);
  269. init_fpel_func(2, 1, 16, avg, _8, sse2);
  270. init_fpel_func(1, 1, 32, avg, _8, sse2);
  271. init_fpel_func(0, 1, 64, avg, _8, sse2);
  272. init_lpf(sse2);
  273. dsp->itxfm_add[TX_4X4][ADST_DCT] = ff_vp9_idct_iadst_4x4_add_sse2;
  274. dsp->itxfm_add[TX_4X4][DCT_ADST] = ff_vp9_iadst_idct_4x4_add_sse2;
  275. dsp->itxfm_add[TX_4X4][ADST_ADST] = ff_vp9_iadst_iadst_4x4_add_sse2;
  276. dsp->itxfm_add[TX_8X8][DCT_DCT] = ff_vp9_idct_idct_8x8_add_sse2;
  277. dsp->itxfm_add[TX_8X8][ADST_DCT] = ff_vp9_idct_iadst_8x8_add_sse2;
  278. dsp->itxfm_add[TX_8X8][DCT_ADST] = ff_vp9_iadst_idct_8x8_add_sse2;
  279. dsp->itxfm_add[TX_8X8][ADST_ADST] = ff_vp9_iadst_iadst_8x8_add_sse2;
  280. dsp->itxfm_add[TX_16X16][DCT_DCT] = ff_vp9_idct_idct_16x16_add_sse2;
  281. dsp->itxfm_add[TX_16X16][ADST_DCT] = ff_vp9_idct_iadst_16x16_add_sse2;
  282. dsp->itxfm_add[TX_16X16][DCT_ADST] = ff_vp9_iadst_idct_16x16_add_sse2;
  283. dsp->itxfm_add[TX_16X16][ADST_ADST] = ff_vp9_iadst_iadst_16x16_add_sse2;
  284. dsp->itxfm_add[TX_32X32][ADST_ADST] =
  285. dsp->itxfm_add[TX_32X32][ADST_DCT] =
  286. dsp->itxfm_add[TX_32X32][DCT_ADST] =
  287. dsp->itxfm_add[TX_32X32][DCT_DCT] = ff_vp9_idct_idct_32x32_add_sse2;
  288. init_dc_ipred(16, sse2);
  289. init_dc_ipred(32, sse2);
  290. init_dir_tm_h_ipred(8, sse2);
  291. init_dir_tm_h_ipred(16, sse2);
  292. init_dir_tm_h_ipred(32, sse2);
  293. init_ipred(4, sse2, h, HOR);
  294. }
  295. if (EXTERNAL_SSSE3(cpu_flags)) {
  296. init_subpel3(0, put, 8, ssse3);
  297. init_subpel3(1, avg, 8, ssse3);
  298. dsp->itxfm_add[TX_4X4][DCT_DCT] = ff_vp9_idct_idct_4x4_add_ssse3;
  299. dsp->itxfm_add[TX_4X4][ADST_DCT] = ff_vp9_idct_iadst_4x4_add_ssse3;
  300. dsp->itxfm_add[TX_4X4][DCT_ADST] = ff_vp9_iadst_idct_4x4_add_ssse3;
  301. dsp->itxfm_add[TX_4X4][ADST_ADST] = ff_vp9_iadst_iadst_4x4_add_ssse3;
  302. dsp->itxfm_add[TX_8X8][DCT_DCT] = ff_vp9_idct_idct_8x8_add_ssse3;
  303. dsp->itxfm_add[TX_8X8][ADST_DCT] = ff_vp9_idct_iadst_8x8_add_ssse3;
  304. dsp->itxfm_add[TX_8X8][DCT_ADST] = ff_vp9_iadst_idct_8x8_add_ssse3;
  305. dsp->itxfm_add[TX_8X8][ADST_ADST] = ff_vp9_iadst_iadst_8x8_add_ssse3;
  306. dsp->itxfm_add[TX_16X16][DCT_DCT] = ff_vp9_idct_idct_16x16_add_ssse3;
  307. dsp->itxfm_add[TX_16X16][ADST_DCT] = ff_vp9_idct_iadst_16x16_add_ssse3;
  308. dsp->itxfm_add[TX_16X16][DCT_ADST] = ff_vp9_iadst_idct_16x16_add_ssse3;
  309. dsp->itxfm_add[TX_16X16][ADST_ADST] = ff_vp9_iadst_iadst_16x16_add_ssse3;
  310. dsp->itxfm_add[TX_32X32][ADST_ADST] =
  311. dsp->itxfm_add[TX_32X32][ADST_DCT] =
  312. dsp->itxfm_add[TX_32X32][DCT_ADST] =
  313. dsp->itxfm_add[TX_32X32][DCT_DCT] = ff_vp9_idct_idct_32x32_add_ssse3;
  314. init_lpf(ssse3);
  315. init_all_ipred(4, ssse3);
  316. init_all_ipred(8, ssse3);
  317. init_all_ipred(16, ssse3);
  318. init_all_ipred(32, ssse3);
  319. }
  320. if (EXTERNAL_AVX(cpu_flags)) {
  321. dsp->itxfm_add[TX_8X8][DCT_DCT] = ff_vp9_idct_idct_8x8_add_avx;
  322. dsp->itxfm_add[TX_8X8][ADST_DCT] = ff_vp9_idct_iadst_8x8_add_avx;
  323. dsp->itxfm_add[TX_8X8][DCT_ADST] = ff_vp9_iadst_idct_8x8_add_avx;
  324. dsp->itxfm_add[TX_8X8][ADST_ADST] = ff_vp9_iadst_iadst_8x8_add_avx;
  325. dsp->itxfm_add[TX_16X16][DCT_DCT] = ff_vp9_idct_idct_16x16_add_avx;
  326. dsp->itxfm_add[TX_16X16][ADST_DCT] = ff_vp9_idct_iadst_16x16_add_avx;
  327. dsp->itxfm_add[TX_16X16][DCT_ADST] = ff_vp9_iadst_idct_16x16_add_avx;
  328. dsp->itxfm_add[TX_16X16][ADST_ADST] = ff_vp9_iadst_iadst_16x16_add_avx;
  329. dsp->itxfm_add[TX_32X32][ADST_ADST] =
  330. dsp->itxfm_add[TX_32X32][ADST_DCT] =
  331. dsp->itxfm_add[TX_32X32][DCT_ADST] =
  332. dsp->itxfm_add[TX_32X32][DCT_DCT] = ff_vp9_idct_idct_32x32_add_avx;
  333. init_lpf(avx);
  334. init_dir_tm_h_ipred(8, avx);
  335. init_dir_tm_h_ipred(16, avx);
  336. init_dir_tm_h_ipred(32, avx);
  337. }
  338. if (EXTERNAL_AVX_FAST(cpu_flags)) {
  339. init_fpel_func(1, 0, 32, put, , avx);
  340. init_fpel_func(0, 0, 64, put, , avx);
  341. init_ipred(32, avx, v, VERT);
  342. }
  343. if (EXTERNAL_AVX2_FAST(cpu_flags)) {
  344. init_fpel_func(1, 1, 32, avg, _8, avx2);
  345. init_fpel_func(0, 1, 64, avg, _8, avx2);
  346. if (ARCH_X86_64) {
  347. #if ARCH_X86_64 && HAVE_AVX2_EXTERNAL
  348. dsp->itxfm_add[TX_16X16][DCT_DCT] = ff_vp9_idct_idct_16x16_add_avx2;
  349. dsp->itxfm_add[TX_16X16][ADST_DCT] = ff_vp9_idct_iadst_16x16_add_avx2;
  350. dsp->itxfm_add[TX_16X16][DCT_ADST] = ff_vp9_iadst_idct_16x16_add_avx2;
  351. dsp->itxfm_add[TX_16X16][ADST_ADST] = ff_vp9_iadst_iadst_16x16_add_avx2;
  352. dsp->itxfm_add[TX_32X32][ADST_ADST] =
  353. dsp->itxfm_add[TX_32X32][ADST_DCT] =
  354. dsp->itxfm_add[TX_32X32][DCT_ADST] =
  355. dsp->itxfm_add[TX_32X32][DCT_DCT] = ff_vp9_idct_idct_32x32_add_avx2;
  356. init_subpel3_32_64(0, put, 8, avx2);
  357. init_subpel3_32_64(1, avg, 8, avx2);
  358. #endif
  359. }
  360. init_dc_ipred(32, avx2);
  361. init_ipred(32, avx2, h, HOR);
  362. init_ipred(32, avx2, tm, TM_VP8);
  363. }
  364. #undef init_fpel
  365. #undef init_subpel1
  366. #undef init_subpel2
  367. #undef init_subpel3
  368. #endif /* HAVE_X86ASM */
  369. }