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.

402 lines
19KB

  1. /*
  2. * VP8 DSP functions x86-optimized
  3. * Copyright (c) 2010 Ronald S. Bultje <rsbultje@gmail.com>
  4. * Copyright (c) 2010 Jason Garrett-Glaser <darkshikari@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/x86_cpu.h"
  23. #include "libavcodec/vp8dsp.h"
  24. #if HAVE_YASM
  25. /*
  26. * MC functions
  27. */
  28. extern void ff_put_vp8_epel4_h4_mmxext(uint8_t *dst, int dststride,
  29. uint8_t *src, int srcstride,
  30. int height, int mx, int my);
  31. extern void ff_put_vp8_epel4_h6_mmxext(uint8_t *dst, int dststride,
  32. uint8_t *src, int srcstride,
  33. int height, int mx, int my);
  34. extern void ff_put_vp8_epel4_v4_mmxext(uint8_t *dst, int dststride,
  35. uint8_t *src, int srcstride,
  36. int height, int mx, int my);
  37. extern void ff_put_vp8_epel4_v6_mmxext(uint8_t *dst, int dststride,
  38. uint8_t *src, int srcstride,
  39. int height, int mx, int my);
  40. extern void ff_put_vp8_epel8_h4_sse2 (uint8_t *dst, int dststride,
  41. uint8_t *src, int srcstride,
  42. int height, int mx, int my);
  43. extern void ff_put_vp8_epel8_h6_sse2 (uint8_t *dst, int dststride,
  44. uint8_t *src, int srcstride,
  45. int height, int mx, int my);
  46. extern void ff_put_vp8_epel8_v4_sse2 (uint8_t *dst, int dststride,
  47. uint8_t *src, int srcstride,
  48. int height, int mx, int my);
  49. extern void ff_put_vp8_epel8_v6_sse2 (uint8_t *dst, int dststride,
  50. uint8_t *src, int srcstride,
  51. int height, int mx, int my);
  52. extern void ff_put_vp8_epel4_h4_ssse3 (uint8_t *dst, int dststride,
  53. uint8_t *src, int srcstride,
  54. int height, int mx, int my);
  55. extern void ff_put_vp8_epel4_h6_ssse3 (uint8_t *dst, int dststride,
  56. uint8_t *src, int srcstride,
  57. int height, int mx, int my);
  58. extern void ff_put_vp8_epel4_v4_ssse3 (uint8_t *dst, int dststride,
  59. uint8_t *src, int srcstride,
  60. int height, int mx, int my);
  61. extern void ff_put_vp8_epel4_v6_ssse3 (uint8_t *dst, int dststride,
  62. uint8_t *src, int srcstride,
  63. int height, int mx, int my);
  64. extern void ff_put_vp8_epel8_h4_ssse3 (uint8_t *dst, int dststride,
  65. uint8_t *src, int srcstride,
  66. int height, int mx, int my);
  67. extern void ff_put_vp8_epel8_h6_ssse3 (uint8_t *dst, int dststride,
  68. uint8_t *src, int srcstride,
  69. int height, int mx, int my);
  70. extern void ff_put_vp8_epel8_v4_ssse3 (uint8_t *dst, int dststride,
  71. uint8_t *src, int srcstride,
  72. int height, int mx, int my);
  73. extern void ff_put_vp8_epel8_v6_ssse3 (uint8_t *dst, int dststride,
  74. uint8_t *src, int srcstride,
  75. int height, int mx, int my);
  76. extern void ff_put_vp8_bilinear4_h_mmxext(uint8_t *dst, int dststride,
  77. uint8_t *src, int srcstride,
  78. int height, int mx, int my);
  79. extern void ff_put_vp8_bilinear8_h_sse2 (uint8_t *dst, int dststride,
  80. uint8_t *src, int srcstride,
  81. int height, int mx, int my);
  82. extern void ff_put_vp8_bilinear4_h_ssse3 (uint8_t *dst, int dststride,
  83. uint8_t *src, int srcstride,
  84. int height, int mx, int my);
  85. extern void ff_put_vp8_bilinear8_h_ssse3 (uint8_t *dst, int dststride,
  86. uint8_t *src, int srcstride,
  87. int height, int mx, int my);
  88. extern void ff_put_vp8_bilinear4_v_mmxext(uint8_t *dst, int dststride,
  89. uint8_t *src, int srcstride,
  90. int height, int mx, int my);
  91. extern void ff_put_vp8_bilinear8_v_sse2 (uint8_t *dst, int dststride,
  92. uint8_t *src, int srcstride,
  93. int height, int mx, int my);
  94. extern void ff_put_vp8_bilinear4_v_ssse3 (uint8_t *dst, int dststride,
  95. uint8_t *src, int srcstride,
  96. int height, int mx, int my);
  97. extern void ff_put_vp8_bilinear8_v_ssse3 (uint8_t *dst, int dststride,
  98. uint8_t *src, int srcstride,
  99. int height, int mx, int my);
  100. extern void ff_put_vp8_pixels8_mmx (uint8_t *dst, int dststride,
  101. uint8_t *src, int srcstride,
  102. int height, int mx, int my);
  103. extern void ff_put_vp8_pixels16_mmx(uint8_t *dst, int dststride,
  104. uint8_t *src, int srcstride,
  105. int height, int mx, int my);
  106. extern void ff_put_vp8_pixels16_sse(uint8_t *dst, int dststride,
  107. uint8_t *src, int srcstride,
  108. int height, int mx, int my);
  109. #define TAP_W16(OPT, FILTERTYPE, TAPTYPE) \
  110. static void ff_put_vp8_ ## FILTERTYPE ## 16_ ## TAPTYPE ## _ ## OPT( \
  111. uint8_t *dst, int dststride, uint8_t *src, \
  112. int srcstride, int height, int mx, int my) \
  113. { \
  114. ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \
  115. dst, dststride, src, srcstride, height, mx, my); \
  116. ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \
  117. dst + 8, dststride, src + 8, srcstride, height, mx, my); \
  118. }
  119. #define TAP_W8(OPT, FILTERTYPE, TAPTYPE) \
  120. static void ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \
  121. uint8_t *dst, int dststride, uint8_t *src, \
  122. int srcstride, int height, int mx, int my) \
  123. { \
  124. ff_put_vp8_ ## FILTERTYPE ## 4_ ## TAPTYPE ## _ ## OPT( \
  125. dst, dststride, src, srcstride, height, mx, my); \
  126. ff_put_vp8_ ## FILTERTYPE ## 4_ ## TAPTYPE ## _ ## OPT( \
  127. dst + 4, dststride, src + 4, srcstride, height, mx, my); \
  128. }
  129. TAP_W8 (mmxext, epel, h4)
  130. TAP_W8 (mmxext, epel, h6)
  131. TAP_W16(mmxext, epel, h6)
  132. TAP_W8 (mmxext, epel, v4)
  133. TAP_W8 (mmxext, epel, v6)
  134. TAP_W16(mmxext, epel, v6)
  135. TAP_W8 (mmxext, bilinear, h)
  136. TAP_W16(mmxext, bilinear, h)
  137. TAP_W8 (mmxext, bilinear, v)
  138. TAP_W16(mmxext, bilinear, v)
  139. TAP_W16(sse2, epel, h6)
  140. TAP_W16(sse2, epel, v6)
  141. TAP_W16(sse2, bilinear, h)
  142. TAP_W16(sse2, bilinear, v)
  143. TAP_W16(ssse3, epel, h6)
  144. TAP_W16(ssse3, epel, v6)
  145. TAP_W16(ssse3, bilinear, h)
  146. TAP_W16(ssse3, bilinear, v)
  147. #define HVTAP(OPT, ALIGN, TAPNUMX, TAPNUMY, SIZE, MAXHEIGHT) \
  148. static void ff_put_vp8_epel ## SIZE ## _h ## TAPNUMX ## v ## TAPNUMY ## _ ## OPT( \
  149. uint8_t *dst, int dststride, uint8_t *src, \
  150. int srcstride, int height, int mx, int my) \
  151. { \
  152. DECLARE_ALIGNED(ALIGN, uint8_t, tmp)[SIZE * (MAXHEIGHT + TAPNUMY - 1)]; \
  153. uint8_t *tmpptr = tmp + SIZE * (TAPNUMY / 2 - 1); \
  154. src -= srcstride * (TAPNUMY / 2 - 1); \
  155. ff_put_vp8_epel ## SIZE ## _h ## TAPNUMX ## _ ## OPT( \
  156. tmp, SIZE, src, srcstride, height + TAPNUMY - 1, mx, my); \
  157. ff_put_vp8_epel ## SIZE ## _v ## TAPNUMY ## _ ## OPT( \
  158. dst, dststride, tmpptr, SIZE, height, mx, my); \
  159. }
  160. #define HVTAPMMX(x, y) \
  161. HVTAP(mmxext, 8, x, y, 4, 8) \
  162. HVTAP(mmxext, 8, x, y, 8, 16)
  163. HVTAPMMX(4, 4)
  164. HVTAPMMX(4, 6)
  165. HVTAPMMX(6, 4)
  166. HVTAPMMX(6, 6)
  167. HVTAP(mmxext, 8, 6, 6, 16, 16)
  168. #define HVTAPSSE2(x, y, w) \
  169. HVTAP(sse2, 16, x, y, w, 16) \
  170. HVTAP(ssse3, 16, x, y, w, 16)
  171. HVTAPSSE2(4, 4, 8)
  172. HVTAPSSE2(4, 6, 8)
  173. HVTAPSSE2(6, 4, 8)
  174. HVTAPSSE2(6, 6, 8)
  175. HVTAPSSE2(6, 6, 16)
  176. HVTAP(ssse3, 16, 4, 4, 4, 8)
  177. HVTAP(ssse3, 16, 4, 6, 4, 8)
  178. HVTAP(ssse3, 16, 6, 4, 4, 8)
  179. HVTAP(ssse3, 16, 6, 6, 4, 8)
  180. #define HVBILIN(OPT, ALIGN, SIZE, MAXHEIGHT) \
  181. static void ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT( \
  182. uint8_t *dst, int dststride, uint8_t *src, \
  183. int srcstride, int height, int mx, int my) \
  184. { \
  185. DECLARE_ALIGNED(ALIGN, uint8_t, tmp)[SIZE * (MAXHEIGHT + 2)]; \
  186. ff_put_vp8_bilinear ## SIZE ## _h_ ## OPT( \
  187. tmp, SIZE, src, srcstride, height + 1, mx, my); \
  188. ff_put_vp8_bilinear ## SIZE ## _v_ ## OPT( \
  189. dst, dststride, tmp, SIZE, height, mx, my); \
  190. }
  191. HVBILIN(mmxext, 8, 4, 8)
  192. HVBILIN(mmxext, 8, 8, 16)
  193. HVBILIN(mmxext, 8, 16, 16)
  194. HVBILIN(sse2, 8, 8, 16)
  195. HVBILIN(sse2, 8, 16, 16)
  196. HVBILIN(ssse3, 8, 4, 8)
  197. HVBILIN(ssse3, 8, 8, 16)
  198. HVBILIN(ssse3, 8, 16, 16)
  199. extern void ff_vp8_idct_dc_add_mmx(uint8_t *dst, DCTELEM block[16], int stride);
  200. extern void ff_vp8_idct_dc_add_sse4(uint8_t *dst, DCTELEM block[16], int stride);
  201. extern void ff_vp8_idct_dc_add4y_mmx(uint8_t *dst, DCTELEM block[4][16], int stride);
  202. extern void ff_vp8_idct_dc_add4y_sse2(uint8_t *dst, DCTELEM block[4][16], int stride);
  203. extern void ff_vp8_idct_dc_add4uv_mmx(uint8_t *dst, DCTELEM block[2][16], int stride);
  204. extern void ff_vp8_luma_dc_wht_mmx(DCTELEM block[4][4][16], DCTELEM dc[16]);
  205. extern void ff_vp8_luma_dc_wht_sse(DCTELEM block[4][4][16], DCTELEM dc[16]);
  206. extern void ff_vp8_idct_add_mmx(uint8_t *dst, DCTELEM block[16], int stride);
  207. extern void ff_vp8_idct_add_sse(uint8_t *dst, DCTELEM block[16], int stride);
  208. #define DECLARE_LOOP_FILTER(NAME)\
  209. extern void ff_vp8_v_loop_filter_simple_ ## NAME(uint8_t *dst, int stride, int flim);\
  210. extern void ff_vp8_h_loop_filter_simple_ ## NAME(uint8_t *dst, int stride, int flim);\
  211. extern void ff_vp8_v_loop_filter16y_inner_ ## NAME (uint8_t *dst, int stride,\
  212. int e, int i, int hvt);\
  213. extern void ff_vp8_h_loop_filter16y_inner_ ## NAME (uint8_t *dst, int stride,\
  214. int e, int i, int hvt);\
  215. extern void ff_vp8_v_loop_filter8uv_inner_ ## NAME (uint8_t *dstU, uint8_t *dstV,\
  216. int s, int e, int i, int hvt);\
  217. extern void ff_vp8_h_loop_filter8uv_inner_ ## NAME (uint8_t *dstU, uint8_t *dstV,\
  218. int s, int e, int i, int hvt);\
  219. extern void ff_vp8_v_loop_filter16y_mbedge_ ## NAME(uint8_t *dst, int stride,\
  220. int e, int i, int hvt);\
  221. extern void ff_vp8_h_loop_filter16y_mbedge_ ## NAME(uint8_t *dst, int stride,\
  222. int e, int i, int hvt);\
  223. extern void ff_vp8_v_loop_filter8uv_mbedge_ ## NAME(uint8_t *dstU, uint8_t *dstV,\
  224. int s, int e, int i, int hvt);\
  225. extern void ff_vp8_h_loop_filter8uv_mbedge_ ## NAME(uint8_t *dstU, uint8_t *dstV,\
  226. int s, int e, int i, int hvt);
  227. DECLARE_LOOP_FILTER(mmx)
  228. DECLARE_LOOP_FILTER(mmxext)
  229. DECLARE_LOOP_FILTER(sse2)
  230. DECLARE_LOOP_FILTER(ssse3)
  231. DECLARE_LOOP_FILTER(sse4)
  232. #endif
  233. #define VP8_LUMA_MC_FUNC(IDX, SIZE, OPT) \
  234. c->put_vp8_epel_pixels_tab[IDX][0][2] = ff_put_vp8_epel ## SIZE ## _h6_ ## OPT; \
  235. c->put_vp8_epel_pixels_tab[IDX][2][0] = ff_put_vp8_epel ## SIZE ## _v6_ ## OPT; \
  236. c->put_vp8_epel_pixels_tab[IDX][2][2] = ff_put_vp8_epel ## SIZE ## _h6v6_ ## OPT
  237. #define VP8_MC_FUNC(IDX, SIZE, OPT) \
  238. c->put_vp8_epel_pixels_tab[IDX][0][1] = ff_put_vp8_epel ## SIZE ## _h4_ ## OPT; \
  239. c->put_vp8_epel_pixels_tab[IDX][1][0] = ff_put_vp8_epel ## SIZE ## _v4_ ## OPT; \
  240. c->put_vp8_epel_pixels_tab[IDX][1][1] = ff_put_vp8_epel ## SIZE ## _h4v4_ ## OPT; \
  241. c->put_vp8_epel_pixels_tab[IDX][1][2] = ff_put_vp8_epel ## SIZE ## _h6v4_ ## OPT; \
  242. c->put_vp8_epel_pixels_tab[IDX][2][1] = ff_put_vp8_epel ## SIZE ## _h4v6_ ## OPT; \
  243. VP8_LUMA_MC_FUNC(IDX, SIZE, OPT)
  244. #define VP8_BILINEAR_MC_FUNC(IDX, SIZE, OPT) \
  245. c->put_vp8_bilinear_pixels_tab[IDX][0][1] = ff_put_vp8_bilinear ## SIZE ## _h_ ## OPT; \
  246. c->put_vp8_bilinear_pixels_tab[IDX][0][2] = ff_put_vp8_bilinear ## SIZE ## _h_ ## OPT; \
  247. c->put_vp8_bilinear_pixels_tab[IDX][1][0] = ff_put_vp8_bilinear ## SIZE ## _v_ ## OPT; \
  248. c->put_vp8_bilinear_pixels_tab[IDX][1][1] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT; \
  249. c->put_vp8_bilinear_pixels_tab[IDX][1][2] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT; \
  250. c->put_vp8_bilinear_pixels_tab[IDX][2][0] = ff_put_vp8_bilinear ## SIZE ## _v_ ## OPT; \
  251. c->put_vp8_bilinear_pixels_tab[IDX][2][1] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT; \
  252. c->put_vp8_bilinear_pixels_tab[IDX][2][2] = ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT
  253. av_cold void ff_vp8dsp_init_x86(VP8DSPContext* c)
  254. {
  255. int mm_flags = mm_support();
  256. #if HAVE_YASM
  257. if (mm_flags & FF_MM_MMX) {
  258. c->vp8_idct_dc_add = ff_vp8_idct_dc_add_mmx;
  259. c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_mmx;
  260. c->vp8_idct_dc_add4uv = ff_vp8_idct_dc_add4uv_mmx;
  261. c->vp8_idct_add = ff_vp8_idct_add_mmx;
  262. c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_mmx;
  263. c->put_vp8_epel_pixels_tab[0][0][0] =
  264. c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_mmx;
  265. c->put_vp8_epel_pixels_tab[1][0][0] =
  266. c->put_vp8_bilinear_pixels_tab[1][0][0] = ff_put_vp8_pixels8_mmx;
  267. c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_mmx;
  268. c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_mmx;
  269. c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_mmx;
  270. c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_mmx;
  271. c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_mmx;
  272. c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_mmx;
  273. c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_mmx;
  274. c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_mmx;
  275. c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_mmx;
  276. c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_mmx;
  277. }
  278. /* note that 4-tap width=16 functions are missing because w=16
  279. * is only used for luma, and luma is always a copy or sixtap. */
  280. if (mm_flags & FF_MM_MMX2) {
  281. VP8_LUMA_MC_FUNC(0, 16, mmxext);
  282. VP8_MC_FUNC(1, 8, mmxext);
  283. VP8_MC_FUNC(2, 4, mmxext);
  284. VP8_BILINEAR_MC_FUNC(0, 16, mmxext);
  285. VP8_BILINEAR_MC_FUNC(1, 8, mmxext);
  286. VP8_BILINEAR_MC_FUNC(2, 4, mmxext);
  287. c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_mmxext;
  288. c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_mmxext;
  289. c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_mmxext;
  290. c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_mmxext;
  291. c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_mmxext;
  292. c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_mmxext;
  293. c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_mmxext;
  294. c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_mmxext;
  295. c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_mmxext;
  296. c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_mmxext;
  297. }
  298. if (mm_flags & FF_MM_SSE) {
  299. c->vp8_idct_add = ff_vp8_idct_add_sse;
  300. c->vp8_luma_dc_wht = ff_vp8_luma_dc_wht_sse;
  301. c->put_vp8_epel_pixels_tab[0][0][0] =
  302. c->put_vp8_bilinear_pixels_tab[0][0][0] = ff_put_vp8_pixels16_sse;
  303. }
  304. if (mm_flags & (FF_MM_SSE2|FF_MM_SSE2SLOW)) {
  305. VP8_LUMA_MC_FUNC(0, 16, sse2);
  306. VP8_MC_FUNC(1, 8, sse2);
  307. VP8_BILINEAR_MC_FUNC(0, 16, sse2);
  308. VP8_BILINEAR_MC_FUNC(1, 8, sse2);
  309. c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_sse2;
  310. c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_sse2;
  311. c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_sse2;
  312. c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_sse2;
  313. c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_sse2;
  314. }
  315. if (mm_flags & FF_MM_SSE2) {
  316. c->vp8_idct_dc_add4y = ff_vp8_idct_dc_add4y_sse2;
  317. c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse2;
  318. c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_sse2;
  319. c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_sse2;
  320. c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_sse2;
  321. c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_sse2;
  322. }
  323. if (mm_flags & FF_MM_SSSE3) {
  324. VP8_LUMA_MC_FUNC(0, 16, ssse3);
  325. VP8_MC_FUNC(1, 8, ssse3);
  326. VP8_MC_FUNC(2, 4, ssse3);
  327. VP8_BILINEAR_MC_FUNC(0, 16, ssse3);
  328. VP8_BILINEAR_MC_FUNC(1, 8, ssse3);
  329. VP8_BILINEAR_MC_FUNC(2, 4, ssse3);
  330. c->vp8_v_loop_filter_simple = ff_vp8_v_loop_filter_simple_ssse3;
  331. c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_ssse3;
  332. c->vp8_v_loop_filter16y_inner = ff_vp8_v_loop_filter16y_inner_ssse3;
  333. c->vp8_h_loop_filter16y_inner = ff_vp8_h_loop_filter16y_inner_ssse3;
  334. c->vp8_v_loop_filter8uv_inner = ff_vp8_v_loop_filter8uv_inner_ssse3;
  335. c->vp8_h_loop_filter8uv_inner = ff_vp8_h_loop_filter8uv_inner_ssse3;
  336. c->vp8_v_loop_filter16y = ff_vp8_v_loop_filter16y_mbedge_ssse3;
  337. c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_ssse3;
  338. c->vp8_v_loop_filter8uv = ff_vp8_v_loop_filter8uv_mbedge_ssse3;
  339. c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_ssse3;
  340. }
  341. if (mm_flags & FF_MM_SSE4) {
  342. c->vp8_idct_dc_add = ff_vp8_idct_dc_add_sse4;
  343. c->vp8_h_loop_filter_simple = ff_vp8_h_loop_filter_simple_sse4;
  344. c->vp8_h_loop_filter16y = ff_vp8_h_loop_filter16y_mbedge_sse4;
  345. c->vp8_h_loop_filter8uv = ff_vp8_h_loop_filter8uv_mbedge_sse4;
  346. }
  347. #endif
  348. }