h264_qpel.c 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. /*
  2. * Copyright (c) 2004-2005 Michael Niedermayer, Loren Merritt
  3. * Copyright (c) 2011 Daniel Kang
  4. *
  5. * This file is part of Libav.
  6. *
  7. * Libav is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * Libav is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with Libav; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #include "libavutil/attributes.h"
  22. #include "libavutil/cpu.h"
  23. #include "libavutil/x86/asm.h"
  24. #include "libavutil/x86/cpu.h"
  25. #include "libavcodec/h264dec.h"
  26. #include "libavcodec/h264qpel.h"
  27. #include "libavcodec/pixels.h"
  28. #include "fpel.h"
  29. #if HAVE_X86ASM
  30. void ff_put_pixels4_mmxext(uint8_t *block, const uint8_t *pixels,
  31. ptrdiff_t line_size, int h);
  32. void ff_avg_pixels4_mmxext(uint8_t *block, const uint8_t *pixels,
  33. ptrdiff_t line_size, int h);
  34. void ff_put_pixels4_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2,
  35. int dstStride, int src1Stride, int h);
  36. void ff_avg_pixels4_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2,
  37. int dstStride, int src1Stride, int h);
  38. void ff_put_pixels8_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2,
  39. int dstStride, int src1Stride, int h);
  40. void ff_avg_pixels8_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2,
  41. int dstStride, int src1Stride, int h);
  42. void ff_put_pixels16_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2,
  43. int dstStride, int src1Stride, int h);
  44. void ff_avg_pixels16_l2_mmxext(uint8_t *dst, const uint8_t *src1, const uint8_t *src2,
  45. int dstStride, int src1Stride, int h);
  46. #define ff_put_pixels8_l2_sse2 ff_put_pixels8_l2_mmxext
  47. #define ff_avg_pixels8_l2_sse2 ff_avg_pixels8_l2_mmxext
  48. #define ff_put_pixels16_l2_sse2 ff_put_pixels16_l2_mmxext
  49. #define ff_avg_pixels16_l2_sse2 ff_avg_pixels16_l2_mmxext
  50. CALL_2X_PIXELS(ff_avg_pixels16_mmxext, ff_avg_pixels8_mmxext, 8)
  51. CALL_2X_PIXELS(ff_put_pixels16_mmxext, ff_put_pixels8_mmxext, 8)
  52. #define DEF_QPEL(OPNAME)\
  53. void ff_ ## OPNAME ## _h264_qpel4_h_lowpass_mmxext(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride);\
  54. void ff_ ## OPNAME ## _h264_qpel8_h_lowpass_mmxext(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride);\
  55. void ff_ ## OPNAME ## _h264_qpel8_h_lowpass_ssse3(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride);\
  56. void ff_ ## OPNAME ## _h264_qpel4_h_lowpass_l2_mmxext(uint8_t *dst, const uint8_t *src, const uint8_t *src2, int dstStride, int src2Stride);\
  57. void ff_ ## OPNAME ## _h264_qpel8_h_lowpass_l2_mmxext(uint8_t *dst, const uint8_t *src, const uint8_t *src2, int dstStride, int src2Stride);\
  58. void ff_ ## OPNAME ## _h264_qpel8_h_lowpass_l2_ssse3(uint8_t *dst, const uint8_t *src, const uint8_t *src2, int dstStride, int src2Stride);\
  59. void ff_ ## OPNAME ## _h264_qpel4_v_lowpass_mmxext(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride);\
  60. void ff_ ## OPNAME ## _h264_qpel8or16_v_lowpass_op_mmxext(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride, int h);\
  61. void ff_ ## OPNAME ## _h264_qpel8or16_v_lowpass_sse2(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride, int h);\
  62. void ff_ ## OPNAME ## _h264_qpel4_hv_lowpass_v_mmxext(const uint8_t *src, int16_t *tmp, int srcStride);\
  63. void ff_ ## OPNAME ## _h264_qpel4_hv_lowpass_h_mmxext(int16_t *tmp, uint8_t *dst, int dstStride);\
  64. void ff_ ## OPNAME ## _h264_qpel8or16_hv1_lowpass_op_mmxext(const uint8_t *src, int16_t *tmp, int srcStride, int size);\
  65. void ff_ ## OPNAME ## _h264_qpel8or16_hv1_lowpass_op_sse2(const uint8_t *src, int16_t *tmp, int srcStride, int size);\
  66. void ff_ ## OPNAME ## _h264_qpel8or16_hv2_lowpass_op_mmxext(uint8_t *dst, int16_t *tmp, int dstStride, int unused, int h);\
  67. void ff_ ## OPNAME ## _h264_qpel8or16_hv2_lowpass_ssse3(uint8_t *dst, int16_t *tmp, int dstStride, int tmpStride, int size);\
  68. void ff_ ## OPNAME ## _pixels4_l2_shift5_mmxext(uint8_t *dst, const int16_t *src16, const uint8_t *src8, int dstStride, int src8Stride, int h);\
  69. void ff_ ## OPNAME ## _pixels8_l2_shift5_mmxext(uint8_t *dst, const int16_t *src16, const uint8_t *src8, int dstStride, int src8Stride, int h);
  70. DEF_QPEL(avg)
  71. DEF_QPEL(put)
  72. static av_always_inline void ff_put_h264_qpel8or16_hv1_lowpass_mmxext(int16_t *tmp, const uint8_t *src, int tmpStride, int srcStride, int size)
  73. {
  74. int w = (size + 8) >> 2;
  75. src -= 2 * srcStride + 2;
  76. while (w--) {
  77. ff_put_h264_qpel8or16_hv1_lowpass_op_mmxext(src, tmp, srcStride, size);
  78. tmp += 4;
  79. src += 4;
  80. }
  81. }
  82. #define QPEL_H264(OPNAME, OP, MMX)\
  83. static av_always_inline void ff_ ## OPNAME ## h264_qpel4_hv_lowpass_ ## MMX(uint8_t *dst, int16_t *tmp, const uint8_t *src, int dstStride, int tmpStride, int srcStride){\
  84. int w=3;\
  85. src -= 2*srcStride+2;\
  86. while(w--){\
  87. ff_ ## OPNAME ## h264_qpel4_hv_lowpass_v_mmxext(src, tmp, srcStride);\
  88. tmp += 4;\
  89. src += 4;\
  90. }\
  91. tmp -= 3*4;\
  92. ff_ ## OPNAME ## h264_qpel4_hv_lowpass_h_mmxext(tmp, dst, dstStride);\
  93. }\
  94. \
  95. static av_always_inline void ff_ ## OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride, int h){\
  96. src -= 2*srcStride;\
  97. ff_ ## OPNAME ## h264_qpel8or16_v_lowpass_op_mmxext(dst, src, dstStride, srcStride, h);\
  98. src += 4;\
  99. dst += 4;\
  100. ff_ ## OPNAME ## h264_qpel8or16_v_lowpass_op_mmxext(dst, src, dstStride, srcStride, h);\
  101. }\
  102. static av_always_inline void ff_ ## OPNAME ## h264_qpel8or16_hv2_lowpass_ ## MMX(uint8_t *dst, int16_t *tmp, int dstStride, int tmpStride, int size){\
  103. int w = size>>4;\
  104. do{\
  105. ff_ ## OPNAME ## h264_qpel8or16_hv2_lowpass_op_mmxext(dst, tmp, dstStride, 0, size);\
  106. tmp += 8;\
  107. dst += 8;\
  108. }while(w--);\
  109. }\
  110. \
  111. static av_always_inline void ff_ ## OPNAME ## h264_qpel8_v_lowpass_ ## MMX(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride){\
  112. ff_ ## OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(dst , src , dstStride, srcStride, 8);\
  113. }\
  114. static av_always_inline void ff_ ## OPNAME ## h264_qpel16_v_lowpass_ ## MMX(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride){\
  115. ff_ ## OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(dst , src , dstStride, srcStride, 16);\
  116. ff_ ## OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(dst+8, src+8, dstStride, srcStride, 16);\
  117. }\
  118. \
  119. static av_always_inline void ff_ ## OPNAME ## h264_qpel16_h_lowpass_ ## MMX(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride){\
  120. ff_ ## OPNAME ## h264_qpel8_h_lowpass_ ## MMX(dst , src , dstStride, srcStride);\
  121. ff_ ## OPNAME ## h264_qpel8_h_lowpass_ ## MMX(dst+8, src+8, dstStride, srcStride);\
  122. src += 8*srcStride;\
  123. dst += 8*dstStride;\
  124. ff_ ## OPNAME ## h264_qpel8_h_lowpass_ ## MMX(dst , src , dstStride, srcStride);\
  125. ff_ ## OPNAME ## h264_qpel8_h_lowpass_ ## MMX(dst+8, src+8, dstStride, srcStride);\
  126. }\
  127. \
  128. static av_always_inline void ff_ ## OPNAME ## h264_qpel16_h_lowpass_l2_ ## MMX(uint8_t *dst, const uint8_t *src, const uint8_t *src2, int dstStride, int src2Stride){\
  129. ff_ ## OPNAME ## h264_qpel8_h_lowpass_l2_ ## MMX(dst , src , src2 , dstStride, src2Stride);\
  130. ff_ ## OPNAME ## h264_qpel8_h_lowpass_l2_ ## MMX(dst+8, src+8, src2+8, dstStride, src2Stride);\
  131. src += 8*dstStride;\
  132. dst += 8*dstStride;\
  133. src2 += 8*src2Stride;\
  134. ff_ ## OPNAME ## h264_qpel8_h_lowpass_l2_ ## MMX(dst , src , src2 , dstStride, src2Stride);\
  135. ff_ ## OPNAME ## h264_qpel8_h_lowpass_l2_ ## MMX(dst+8, src+8, src2+8, dstStride, src2Stride);\
  136. }\
  137. \
  138. static av_always_inline void ff_ ## OPNAME ## h264_qpel8or16_hv_lowpass_ ## MMX(uint8_t *dst, int16_t *tmp, const uint8_t *src, int dstStride, int tmpStride, int srcStride, int size){\
  139. ff_put_h264_qpel8or16_hv1_lowpass_ ## MMX(tmp, src, tmpStride, srcStride, size);\
  140. ff_ ## OPNAME ## h264_qpel8or16_hv2_lowpass_ ## MMX(dst, tmp, dstStride, tmpStride, size);\
  141. }\
  142. static av_always_inline void ff_ ## OPNAME ## h264_qpel8_hv_lowpass_ ## MMX(uint8_t *dst, int16_t *tmp, const uint8_t *src, int dstStride, int tmpStride, int srcStride){\
  143. ff_ ## OPNAME ## h264_qpel8or16_hv_lowpass_ ## MMX(dst , tmp , src , dstStride, tmpStride, srcStride, 8);\
  144. }\
  145. \
  146. static av_always_inline void ff_ ## OPNAME ## h264_qpel16_hv_lowpass_ ## MMX(uint8_t *dst, int16_t *tmp, const uint8_t *src, int dstStride, int tmpStride, int srcStride){\
  147. ff_ ## OPNAME ## h264_qpel8or16_hv_lowpass_ ## MMX(dst , tmp , src , dstStride, tmpStride, srcStride, 16);\
  148. }\
  149. \
  150. static av_always_inline void ff_ ## OPNAME ## pixels16_l2_shift5_ ## MMX(uint8_t *dst, const int16_t *src16, const uint8_t *src8, int dstStride, int src8Stride, int h)\
  151. {\
  152. ff_ ## OPNAME ## pixels8_l2_shift5_ ## MMX(dst , src16 , src8 , dstStride, src8Stride, h);\
  153. ff_ ## OPNAME ## pixels8_l2_shift5_ ## MMX(dst+8, src16+8, src8+8, dstStride, src8Stride, h);\
  154. }\
  155. #if ARCH_X86_64
  156. #define QPEL_H264_H16_XMM(OPNAME, OP, MMX)\
  157. void ff_avg_h264_qpel16_h_lowpass_l2_ssse3(uint8_t *dst, const uint8_t *src, const uint8_t *src2, int dstStride, int src2Stride);
  158. void ff_put_h264_qpel16_h_lowpass_l2_ssse3(uint8_t *dst, const uint8_t *src, const uint8_t *src2, int dstStride, int src2Stride);
  159. #else // ARCH_X86_64
  160. #define QPEL_H264_H16_XMM(OPNAME, OP, MMX)\
  161. static av_always_inline void ff_ ## OPNAME ## h264_qpel16_h_lowpass_l2_ ## MMX(uint8_t *dst, const uint8_t *src, const uint8_t *src2, int dstStride, int src2Stride){\
  162. ff_ ## OPNAME ## h264_qpel8_h_lowpass_l2_ ## MMX(dst , src , src2 , dstStride, src2Stride);\
  163. ff_ ## OPNAME ## h264_qpel8_h_lowpass_l2_ ## MMX(dst+8, src+8, src2+8, dstStride, src2Stride);\
  164. src += 8*dstStride;\
  165. dst += 8*dstStride;\
  166. src2 += 8*src2Stride;\
  167. ff_ ## OPNAME ## h264_qpel8_h_lowpass_l2_ ## MMX(dst , src , src2 , dstStride, src2Stride);\
  168. ff_ ## OPNAME ## h264_qpel8_h_lowpass_l2_ ## MMX(dst+8, src+8, src2+8, dstStride, src2Stride);\
  169. }
  170. #endif // ARCH_X86_64
  171. #define QPEL_H264_H_XMM(OPNAME, OP, MMX)\
  172. QPEL_H264_H16_XMM(OPNAME, OP, MMX)\
  173. static av_always_inline void ff_ ## OPNAME ## h264_qpel16_h_lowpass_ ## MMX(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride){\
  174. ff_ ## OPNAME ## h264_qpel8_h_lowpass_ ## MMX(dst , src , dstStride, srcStride);\
  175. ff_ ## OPNAME ## h264_qpel8_h_lowpass_ ## MMX(dst+8, src+8, dstStride, srcStride);\
  176. src += 8*srcStride;\
  177. dst += 8*dstStride;\
  178. ff_ ## OPNAME ## h264_qpel8_h_lowpass_ ## MMX(dst , src , dstStride, srcStride);\
  179. ff_ ## OPNAME ## h264_qpel8_h_lowpass_ ## MMX(dst+8, src+8, dstStride, srcStride);\
  180. }\
  181. #define QPEL_H264_V_XMM(OPNAME, OP, MMX)\
  182. static av_always_inline void ff_ ## OPNAME ## h264_qpel8_v_lowpass_ ## MMX(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride){\
  183. ff_ ## OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(dst , src , dstStride, srcStride, 8);\
  184. }\
  185. static av_always_inline void ff_ ## OPNAME ## h264_qpel16_v_lowpass_ ## MMX(uint8_t *dst, const uint8_t *src, int dstStride, int srcStride){\
  186. ff_ ## OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(dst , src , dstStride, srcStride, 16);\
  187. ff_ ## OPNAME ## h264_qpel8or16_v_lowpass_ ## MMX(dst+8, src+8, dstStride, srcStride, 16);\
  188. }
  189. static av_always_inline void put_h264_qpel8or16_hv1_lowpass_sse2(int16_t *tmp,
  190. const uint8_t *src,
  191. int tmpStride,
  192. int srcStride,
  193. int size)
  194. {
  195. int w = (size+8)>>3;
  196. src -= 2*srcStride+2;
  197. while(w--){
  198. ff_put_h264_qpel8or16_hv1_lowpass_op_sse2(src, tmp, srcStride, size);
  199. tmp += 8;
  200. src += 8;
  201. }
  202. }
  203. #define QPEL_H264_HV_XMM(OPNAME, OP, MMX)\
  204. static av_always_inline void ff_ ## OPNAME ## h264_qpel8or16_hv_lowpass_ ## MMX(uint8_t *dst, int16_t *tmp, const uint8_t *src, int dstStride, int tmpStride, int srcStride, int size){\
  205. put_h264_qpel8or16_hv1_lowpass_sse2(tmp, src, tmpStride, srcStride, size);\
  206. ff_ ## OPNAME ## h264_qpel8or16_hv2_lowpass_ ## MMX(dst, tmp, dstStride, tmpStride, size);\
  207. }\
  208. static av_always_inline void ff_ ## OPNAME ## h264_qpel8_hv_lowpass_ ## MMX(uint8_t *dst, int16_t *tmp, const uint8_t *src, int dstStride, int tmpStride, int srcStride){\
  209. ff_ ## OPNAME ## h264_qpel8or16_hv_lowpass_ ## MMX(dst, tmp, src, dstStride, tmpStride, srcStride, 8);\
  210. }\
  211. static av_always_inline void ff_ ## OPNAME ## h264_qpel16_hv_lowpass_ ## MMX(uint8_t *dst, int16_t *tmp, const uint8_t *src, int dstStride, int tmpStride, int srcStride){\
  212. ff_ ## OPNAME ## h264_qpel8or16_hv_lowpass_ ## MMX(dst, tmp, src, dstStride, tmpStride, srcStride, 16);\
  213. }\
  214. #define ff_put_h264_qpel8_h_lowpass_l2_sse2 ff_put_h264_qpel8_h_lowpass_l2_mmxext
  215. #define ff_avg_h264_qpel8_h_lowpass_l2_sse2 ff_avg_h264_qpel8_h_lowpass_l2_mmxext
  216. #define ff_put_h264_qpel16_h_lowpass_l2_sse2 ff_put_h264_qpel16_h_lowpass_l2_mmxext
  217. #define ff_avg_h264_qpel16_h_lowpass_l2_sse2 ff_avg_h264_qpel16_h_lowpass_l2_mmxext
  218. #define ff_put_h264_qpel8_v_lowpass_ssse3 ff_put_h264_qpel8_v_lowpass_sse2
  219. #define ff_avg_h264_qpel8_v_lowpass_ssse3 ff_avg_h264_qpel8_v_lowpass_sse2
  220. #define ff_put_h264_qpel16_v_lowpass_ssse3 ff_put_h264_qpel16_v_lowpass_sse2
  221. #define ff_avg_h264_qpel16_v_lowpass_ssse3 ff_avg_h264_qpel16_v_lowpass_sse2
  222. #define ff_put_h264_qpel8or16_hv2_lowpass_sse2 ff_put_h264_qpel8or16_hv2_lowpass_mmxext
  223. #define ff_avg_h264_qpel8or16_hv2_lowpass_sse2 ff_avg_h264_qpel8or16_hv2_lowpass_mmxext
  224. #define H264_MC(OPNAME, SIZE, MMX, ALIGN) \
  225. H264_MC_C(OPNAME, SIZE, MMX, ALIGN)\
  226. H264_MC_V(OPNAME, SIZE, MMX, ALIGN)\
  227. H264_MC_H(OPNAME, SIZE, MMX, ALIGN)\
  228. H264_MC_HV(OPNAME, SIZE, MMX, ALIGN)\
  229. static void put_h264_qpel16_mc00_sse2 (uint8_t *dst, const uint8_t *src,
  230. ptrdiff_t stride)
  231. {
  232. ff_put_pixels16_sse2(dst, src, stride, 16);
  233. }
  234. static void avg_h264_qpel16_mc00_sse2 (uint8_t *dst, const uint8_t *src,
  235. ptrdiff_t stride)
  236. {
  237. ff_avg_pixels16_sse2(dst, src, stride, 16);
  238. }
  239. #define put_h264_qpel8_mc00_sse2 put_h264_qpel8_mc00_mmxext
  240. #define avg_h264_qpel8_mc00_sse2 avg_h264_qpel8_mc00_mmxext
  241. #define H264_MC_C(OPNAME, SIZE, MMX, ALIGN) \
  242. static void OPNAME ## h264_qpel ## SIZE ## _mc00_ ## MMX (uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  243. {\
  244. ff_ ## OPNAME ## pixels ## SIZE ## _ ## MMX(dst, src, stride, SIZE);\
  245. }\
  246. #define H264_MC_H(OPNAME, SIZE, MMX, ALIGN) \
  247. static void OPNAME ## h264_qpel ## SIZE ## _mc10_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  248. {\
  249. ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src, src, stride, stride);\
  250. }\
  251. \
  252. static void OPNAME ## h264_qpel ## SIZE ## _mc20_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  253. {\
  254. ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_ ## MMX(dst, src, stride, stride);\
  255. }\
  256. \
  257. static void OPNAME ## h264_qpel ## SIZE ## _mc30_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  258. {\
  259. ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src, src+1, stride, stride);\
  260. }\
  261. #define H264_MC_V(OPNAME, SIZE, MMX, ALIGN) \
  262. static void OPNAME ## h264_qpel ## SIZE ## _mc01_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  263. {\
  264. DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\
  265. ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src, SIZE, stride);\
  266. ff_ ## OPNAME ## pixels ## SIZE ## _l2_ ## MMX(dst, src, temp, stride, stride, SIZE);\
  267. }\
  268. \
  269. static void OPNAME ## h264_qpel ## SIZE ## _mc02_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  270. {\
  271. ff_ ## OPNAME ## h264_qpel ## SIZE ## _v_lowpass_ ## MMX(dst, src, stride, stride);\
  272. }\
  273. \
  274. static void OPNAME ## h264_qpel ## SIZE ## _mc03_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  275. {\
  276. DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\
  277. ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src, SIZE, stride);\
  278. ff_ ## OPNAME ## pixels ## SIZE ## _l2_ ## MMX(dst, src+stride, temp, stride, stride, SIZE);\
  279. }\
  280. #define H264_MC_HV(OPNAME, SIZE, MMX, ALIGN) \
  281. static void OPNAME ## h264_qpel ## SIZE ## _mc11_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  282. {\
  283. DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\
  284. ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src, SIZE, stride);\
  285. ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src, temp, stride, SIZE);\
  286. }\
  287. \
  288. static void OPNAME ## h264_qpel ## SIZE ## _mc31_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  289. {\
  290. DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\
  291. ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src+1, SIZE, stride);\
  292. ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src, temp, stride, SIZE);\
  293. }\
  294. \
  295. static void OPNAME ## h264_qpel ## SIZE ## _mc13_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  296. {\
  297. DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\
  298. ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src, SIZE, stride);\
  299. ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src+stride, temp, stride, SIZE);\
  300. }\
  301. \
  302. static void OPNAME ## h264_qpel ## SIZE ## _mc33_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  303. {\
  304. DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*SIZE];\
  305. ff_put_h264_qpel ## SIZE ## _v_lowpass_ ## MMX(temp, src+1, SIZE, stride);\
  306. ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src+stride, temp, stride, SIZE);\
  307. }\
  308. \
  309. static void OPNAME ## h264_qpel ## SIZE ## _mc22_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  310. {\
  311. DECLARE_ALIGNED(ALIGN, uint16_t, temp)[SIZE*(SIZE<8?12:24)];\
  312. ff_ ## OPNAME ## h264_qpel ## SIZE ## _hv_lowpass_ ## MMX(dst, temp, src, stride, SIZE, stride);\
  313. }\
  314. \
  315. static void OPNAME ## h264_qpel ## SIZE ## _mc21_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  316. {\
  317. DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*(SIZE<8?12:24)*2 + SIZE*SIZE];\
  318. uint8_t * const halfHV= temp;\
  319. int16_t * const halfV= (int16_t*)(temp + SIZE*SIZE);\
  320. assert(((int)temp & 7) == 0);\
  321. ff_put_h264_qpel ## SIZE ## _hv_lowpass_ ## MMX(halfHV, halfV, src, SIZE, SIZE, stride);\
  322. ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src, halfHV, stride, SIZE);\
  323. }\
  324. \
  325. static void OPNAME ## h264_qpel ## SIZE ## _mc23_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  326. {\
  327. DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*(SIZE<8?12:24)*2 + SIZE*SIZE];\
  328. uint8_t * const halfHV= temp;\
  329. int16_t * const halfV= (int16_t*)(temp + SIZE*SIZE);\
  330. assert(((int)temp & 7) == 0);\
  331. ff_put_h264_qpel ## SIZE ## _hv_lowpass_ ## MMX(halfHV, halfV, src, SIZE, SIZE, stride);\
  332. ff_ ## OPNAME ## h264_qpel ## SIZE ## _h_lowpass_l2_ ## MMX(dst, src+stride, halfHV, stride, SIZE);\
  333. }\
  334. \
  335. static void OPNAME ## h264_qpel ## SIZE ## _mc12_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  336. {\
  337. DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*(SIZE<8?12:24)*2 + SIZE*SIZE];\
  338. uint8_t * const halfHV= temp;\
  339. int16_t * const halfV= (int16_t*)(temp + SIZE*SIZE);\
  340. assert(((int)temp & 7) == 0);\
  341. ff_put_h264_qpel ## SIZE ## _hv_lowpass_ ## MMX(halfHV, halfV, src, SIZE, SIZE, stride);\
  342. ff_ ## OPNAME ## pixels ## SIZE ## _l2_shift5_mmxext(dst, halfV+2, halfHV, stride, SIZE, SIZE);\
  343. }\
  344. \
  345. static void OPNAME ## h264_qpel ## SIZE ## _mc32_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\
  346. {\
  347. DECLARE_ALIGNED(ALIGN, uint8_t, temp)[SIZE*(SIZE<8?12:24)*2 + SIZE*SIZE];\
  348. uint8_t * const halfHV= temp;\
  349. int16_t * const halfV= (int16_t*)(temp + SIZE*SIZE);\
  350. assert(((int)temp & 7) == 0);\
  351. ff_put_h264_qpel ## SIZE ## _hv_lowpass_ ## MMX(halfHV, halfV, src, SIZE, SIZE, stride);\
  352. ff_ ## OPNAME ## pixels ## SIZE ## _l2_shift5_mmxext(dst, halfV+3, halfHV, stride, SIZE, SIZE);\
  353. }\
  354. #define H264_MC_4816(MMX)\
  355. H264_MC(put_, 4, MMX, 8)\
  356. H264_MC(put_, 8, MMX, 8)\
  357. H264_MC(put_, 16,MMX, 8)\
  358. H264_MC(avg_, 4, MMX, 8)\
  359. H264_MC(avg_, 8, MMX, 8)\
  360. H264_MC(avg_, 16,MMX, 8)\
  361. #define H264_MC_816(QPEL, XMM)\
  362. QPEL(put_, 8, XMM, 16)\
  363. QPEL(put_, 16,XMM, 16)\
  364. QPEL(avg_, 8, XMM, 16)\
  365. QPEL(avg_, 16,XMM, 16)\
  366. QPEL_H264(put_, PUT_OP, mmxext)
  367. QPEL_H264(avg_, AVG_MMXEXT_OP, mmxext)
  368. QPEL_H264_V_XMM(put_, PUT_OP, sse2)
  369. QPEL_H264_V_XMM(avg_,AVG_MMXEXT_OP, sse2)
  370. QPEL_H264_HV_XMM(put_, PUT_OP, sse2)
  371. QPEL_H264_HV_XMM(avg_,AVG_MMXEXT_OP, sse2)
  372. QPEL_H264_H_XMM(put_, PUT_OP, ssse3)
  373. QPEL_H264_H_XMM(avg_,AVG_MMXEXT_OP, ssse3)
  374. QPEL_H264_HV_XMM(put_, PUT_OP, ssse3)
  375. QPEL_H264_HV_XMM(avg_,AVG_MMXEXT_OP, ssse3)
  376. H264_MC_4816(mmxext)
  377. H264_MC_816(H264_MC_V, sse2)
  378. H264_MC_816(H264_MC_HV, sse2)
  379. H264_MC_816(H264_MC_H, ssse3)
  380. H264_MC_816(H264_MC_HV, ssse3)
  381. //10bit
  382. #define LUMA_MC_OP(OP, NUM, DEPTH, TYPE, OPT) \
  383. void ff_ ## OP ## _h264_qpel ## NUM ## _ ## TYPE ## _ ## DEPTH ## _ ## OPT \
  384. (uint8_t *dst, const uint8_t *src, ptrdiff_t stride);
  385. #define LUMA_MC_ALL(DEPTH, TYPE, OPT) \
  386. LUMA_MC_OP(put, 4, DEPTH, TYPE, OPT) \
  387. LUMA_MC_OP(avg, 4, DEPTH, TYPE, OPT) \
  388. LUMA_MC_OP(put, 8, DEPTH, TYPE, OPT) \
  389. LUMA_MC_OP(avg, 8, DEPTH, TYPE, OPT) \
  390. LUMA_MC_OP(put, 16, DEPTH, TYPE, OPT) \
  391. LUMA_MC_OP(avg, 16, DEPTH, TYPE, OPT)
  392. #define LUMA_MC_816(DEPTH, TYPE, OPT) \
  393. LUMA_MC_OP(put, 8, DEPTH, TYPE, OPT) \
  394. LUMA_MC_OP(avg, 8, DEPTH, TYPE, OPT) \
  395. LUMA_MC_OP(put, 16, DEPTH, TYPE, OPT) \
  396. LUMA_MC_OP(avg, 16, DEPTH, TYPE, OPT)
  397. LUMA_MC_ALL(10, mc00, mmxext)
  398. LUMA_MC_ALL(10, mc10, mmxext)
  399. LUMA_MC_ALL(10, mc20, mmxext)
  400. LUMA_MC_ALL(10, mc30, mmxext)
  401. LUMA_MC_ALL(10, mc01, mmxext)
  402. LUMA_MC_ALL(10, mc11, mmxext)
  403. LUMA_MC_ALL(10, mc21, mmxext)
  404. LUMA_MC_ALL(10, mc31, mmxext)
  405. LUMA_MC_ALL(10, mc02, mmxext)
  406. LUMA_MC_ALL(10, mc12, mmxext)
  407. LUMA_MC_ALL(10, mc22, mmxext)
  408. LUMA_MC_ALL(10, mc32, mmxext)
  409. LUMA_MC_ALL(10, mc03, mmxext)
  410. LUMA_MC_ALL(10, mc13, mmxext)
  411. LUMA_MC_ALL(10, mc23, mmxext)
  412. LUMA_MC_ALL(10, mc33, mmxext)
  413. LUMA_MC_816(10, mc00, sse2)
  414. LUMA_MC_816(10, mc10, sse2)
  415. LUMA_MC_816(10, mc10, sse2_cache64)
  416. LUMA_MC_816(10, mc10, ssse3_cache64)
  417. LUMA_MC_816(10, mc20, sse2)
  418. LUMA_MC_816(10, mc20, sse2_cache64)
  419. LUMA_MC_816(10, mc20, ssse3_cache64)
  420. LUMA_MC_816(10, mc30, sse2)
  421. LUMA_MC_816(10, mc30, sse2_cache64)
  422. LUMA_MC_816(10, mc30, ssse3_cache64)
  423. LUMA_MC_816(10, mc01, sse2)
  424. LUMA_MC_816(10, mc11, sse2)
  425. LUMA_MC_816(10, mc21, sse2)
  426. LUMA_MC_816(10, mc31, sse2)
  427. LUMA_MC_816(10, mc02, sse2)
  428. LUMA_MC_816(10, mc12, sse2)
  429. LUMA_MC_816(10, mc22, sse2)
  430. LUMA_MC_816(10, mc32, sse2)
  431. LUMA_MC_816(10, mc03, sse2)
  432. LUMA_MC_816(10, mc13, sse2)
  433. LUMA_MC_816(10, mc23, sse2)
  434. LUMA_MC_816(10, mc33, sse2)
  435. #define QPEL16_OPMC(OP, MC, MMX)\
  436. void ff_ ## OP ## _h264_qpel16_ ## MC ## _10_ ## MMX(uint8_t *dst, const uint8_t *src, ptrdiff_t stride){\
  437. ff_ ## OP ## _h264_qpel8_ ## MC ## _10_ ## MMX(dst , src , stride);\
  438. ff_ ## OP ## _h264_qpel8_ ## MC ## _10_ ## MMX(dst+16, src+16, stride);\
  439. src += 8*stride;\
  440. dst += 8*stride;\
  441. ff_ ## OP ## _h264_qpel8_ ## MC ## _10_ ## MMX(dst , src , stride);\
  442. ff_ ## OP ## _h264_qpel8_ ## MC ## _10_ ## MMX(dst+16, src+16, stride);\
  443. }
  444. #define QPEL16_OP(MC, MMX)\
  445. QPEL16_OPMC(put, MC, MMX)\
  446. QPEL16_OPMC(avg, MC, MMX)
  447. #define QPEL16(MMX)\
  448. QPEL16_OP(mc00, MMX)\
  449. QPEL16_OP(mc01, MMX)\
  450. QPEL16_OP(mc02, MMX)\
  451. QPEL16_OP(mc03, MMX)\
  452. QPEL16_OP(mc10, MMX)\
  453. QPEL16_OP(mc11, MMX)\
  454. QPEL16_OP(mc12, MMX)\
  455. QPEL16_OP(mc13, MMX)\
  456. QPEL16_OP(mc20, MMX)\
  457. QPEL16_OP(mc21, MMX)\
  458. QPEL16_OP(mc22, MMX)\
  459. QPEL16_OP(mc23, MMX)\
  460. QPEL16_OP(mc30, MMX)\
  461. QPEL16_OP(mc31, MMX)\
  462. QPEL16_OP(mc32, MMX)\
  463. QPEL16_OP(mc33, MMX)
  464. #if ARCH_X86_32 // ARCH_X86_64 implies SSE2+
  465. QPEL16(mmxext)
  466. #endif
  467. #endif /* HAVE_X86ASM */
  468. #define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU, PREFIX) \
  469. do { \
  470. c->PFX ## _pixels_tab[IDX][ 0] = PREFIX ## PFX ## SIZE ## _mc00_ ## CPU; \
  471. c->PFX ## _pixels_tab[IDX][ 1] = PREFIX ## PFX ## SIZE ## _mc10_ ## CPU; \
  472. c->PFX ## _pixels_tab[IDX][ 2] = PREFIX ## PFX ## SIZE ## _mc20_ ## CPU; \
  473. c->PFX ## _pixels_tab[IDX][ 3] = PREFIX ## PFX ## SIZE ## _mc30_ ## CPU; \
  474. c->PFX ## _pixels_tab[IDX][ 4] = PREFIX ## PFX ## SIZE ## _mc01_ ## CPU; \
  475. c->PFX ## _pixels_tab[IDX][ 5] = PREFIX ## PFX ## SIZE ## _mc11_ ## CPU; \
  476. c->PFX ## _pixels_tab[IDX][ 6] = PREFIX ## PFX ## SIZE ## _mc21_ ## CPU; \
  477. c->PFX ## _pixels_tab[IDX][ 7] = PREFIX ## PFX ## SIZE ## _mc31_ ## CPU; \
  478. c->PFX ## _pixels_tab[IDX][ 8] = PREFIX ## PFX ## SIZE ## _mc02_ ## CPU; \
  479. c->PFX ## _pixels_tab[IDX][ 9] = PREFIX ## PFX ## SIZE ## _mc12_ ## CPU; \
  480. c->PFX ## _pixels_tab[IDX][10] = PREFIX ## PFX ## SIZE ## _mc22_ ## CPU; \
  481. c->PFX ## _pixels_tab[IDX][11] = PREFIX ## PFX ## SIZE ## _mc32_ ## CPU; \
  482. c->PFX ## _pixels_tab[IDX][12] = PREFIX ## PFX ## SIZE ## _mc03_ ## CPU; \
  483. c->PFX ## _pixels_tab[IDX][13] = PREFIX ## PFX ## SIZE ## _mc13_ ## CPU; \
  484. c->PFX ## _pixels_tab[IDX][14] = PREFIX ## PFX ## SIZE ## _mc23_ ## CPU; \
  485. c->PFX ## _pixels_tab[IDX][15] = PREFIX ## PFX ## SIZE ## _mc33_ ## CPU; \
  486. } while (0)
  487. #define H264_QPEL_FUNCS(x, y, CPU) \
  488. do { \
  489. c->put_h264_qpel_pixels_tab[0][x + y * 4] = put_h264_qpel16_mc ## x ## y ## _ ## CPU; \
  490. c->put_h264_qpel_pixels_tab[1][x + y * 4] = put_h264_qpel8_mc ## x ## y ## _ ## CPU; \
  491. c->avg_h264_qpel_pixels_tab[0][x + y * 4] = avg_h264_qpel16_mc ## x ## y ## _ ## CPU; \
  492. c->avg_h264_qpel_pixels_tab[1][x + y * 4] = avg_h264_qpel8_mc ## x ## y ## _ ## CPU; \
  493. } while (0)
  494. #define H264_QPEL_FUNCS_10(x, y, CPU) \
  495. do { \
  496. c->put_h264_qpel_pixels_tab[0][x + y * 4] = ff_put_h264_qpel16_mc ## x ## y ## _10_ ## CPU; \
  497. c->put_h264_qpel_pixels_tab[1][x + y * 4] = ff_put_h264_qpel8_mc ## x ## y ## _10_ ## CPU; \
  498. c->avg_h264_qpel_pixels_tab[0][x + y * 4] = ff_avg_h264_qpel16_mc ## x ## y ## _10_ ## CPU; \
  499. c->avg_h264_qpel_pixels_tab[1][x + y * 4] = ff_avg_h264_qpel8_mc ## x ## y ## _10_ ## CPU; \
  500. } while (0)
  501. av_cold void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth)
  502. {
  503. #if HAVE_X86ASM
  504. int high_bit_depth = bit_depth > 8;
  505. int cpu_flags = av_get_cpu_flags();
  506. if (EXTERNAL_MMXEXT(cpu_flags)) {
  507. if (!high_bit_depth) {
  508. SET_QPEL_FUNCS(put_h264_qpel, 0, 16, mmxext, );
  509. SET_QPEL_FUNCS(put_h264_qpel, 1, 8, mmxext, );
  510. SET_QPEL_FUNCS(put_h264_qpel, 2, 4, mmxext, );
  511. SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, mmxext, );
  512. SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, mmxext, );
  513. SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, mmxext, );
  514. } else if (bit_depth == 10) {
  515. #if ARCH_X86_32
  516. SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_mmxext, ff_);
  517. SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_mmxext, ff_);
  518. SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_mmxext, ff_);
  519. SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_mmxext, ff_);
  520. #endif
  521. SET_QPEL_FUNCS(put_h264_qpel, 2, 4, 10_mmxext, ff_);
  522. SET_QPEL_FUNCS(avg_h264_qpel, 2, 4, 10_mmxext, ff_);
  523. }
  524. }
  525. if (EXTERNAL_SSE2(cpu_flags)) {
  526. if (!high_bit_depth) {
  527. H264_QPEL_FUNCS(0, 1, sse2);
  528. H264_QPEL_FUNCS(0, 2, sse2);
  529. H264_QPEL_FUNCS(0, 3, sse2);
  530. H264_QPEL_FUNCS(1, 1, sse2);
  531. H264_QPEL_FUNCS(1, 2, sse2);
  532. H264_QPEL_FUNCS(1, 3, sse2);
  533. H264_QPEL_FUNCS(2, 1, sse2);
  534. H264_QPEL_FUNCS(2, 2, sse2);
  535. H264_QPEL_FUNCS(2, 3, sse2);
  536. H264_QPEL_FUNCS(3, 1, sse2);
  537. H264_QPEL_FUNCS(3, 2, sse2);
  538. H264_QPEL_FUNCS(3, 3, sse2);
  539. }
  540. if (bit_depth == 10) {
  541. SET_QPEL_FUNCS(put_h264_qpel, 0, 16, 10_sse2, ff_);
  542. SET_QPEL_FUNCS(put_h264_qpel, 1, 8, 10_sse2, ff_);
  543. SET_QPEL_FUNCS(avg_h264_qpel, 0, 16, 10_sse2, ff_);
  544. SET_QPEL_FUNCS(avg_h264_qpel, 1, 8, 10_sse2, ff_);
  545. H264_QPEL_FUNCS_10(1, 0, sse2_cache64);
  546. H264_QPEL_FUNCS_10(2, 0, sse2_cache64);
  547. H264_QPEL_FUNCS_10(3, 0, sse2_cache64);
  548. }
  549. }
  550. if (EXTERNAL_SSE2_FAST(cpu_flags)) {
  551. if (!high_bit_depth) {
  552. H264_QPEL_FUNCS(0, 0, sse2);
  553. }
  554. }
  555. if (EXTERNAL_SSSE3(cpu_flags)) {
  556. if (!high_bit_depth) {
  557. H264_QPEL_FUNCS(1, 0, ssse3);
  558. H264_QPEL_FUNCS(1, 1, ssse3);
  559. H264_QPEL_FUNCS(1, 2, ssse3);
  560. H264_QPEL_FUNCS(1, 3, ssse3);
  561. H264_QPEL_FUNCS(2, 0, ssse3);
  562. H264_QPEL_FUNCS(2, 1, ssse3);
  563. H264_QPEL_FUNCS(2, 2, ssse3);
  564. H264_QPEL_FUNCS(2, 3, ssse3);
  565. H264_QPEL_FUNCS(3, 0, ssse3);
  566. H264_QPEL_FUNCS(3, 1, ssse3);
  567. H264_QPEL_FUNCS(3, 2, ssse3);
  568. H264_QPEL_FUNCS(3, 3, ssse3);
  569. }
  570. if (bit_depth == 10) {
  571. H264_QPEL_FUNCS_10(1, 0, ssse3_cache64);
  572. H264_QPEL_FUNCS_10(2, 0, ssse3_cache64);
  573. H264_QPEL_FUNCS_10(3, 0, ssse3_cache64);
  574. }
  575. }
  576. if (EXTERNAL_AVX(cpu_flags)) {
  577. /* AVX implies 64 byte cache lines without the need to avoid unaligned
  578. * memory accesses that cross the boundary between two cache lines.
  579. * TODO: Port X264_CPU_CACHELINE_32/64 detection from x264 to avoid
  580. * having to treat SSE2 functions with such properties as AVX. */
  581. if (bit_depth == 10) {
  582. H264_QPEL_FUNCS_10(1, 0, sse2);
  583. H264_QPEL_FUNCS_10(2, 0, sse2);
  584. H264_QPEL_FUNCS_10(3, 0, sse2);
  585. }
  586. }
  587. #endif
  588. }