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.

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