[FFmpeg-cvslog] hvcodec/x86/hevcdsp: make macros more modular to support functions that are not sse4

plepere git at videolan.org
Fri May 9 00:15:16 CEST 2014


ffmpeg | branch: master | plepere <pierre-edouard.lepere at insa-rennes.fr> | Wed May  7 09:58:34 2014 +0200| [63832e01c3c7e60c7a95c5a40007525dd9a0d630] | committer: Michael Niedermayer

hvcodec/x86/hevcdsp: make macros more modular to support functions that are not sse4

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=63832e01c3c7e60c7a95c5a40007525dd9a0d630
---

 libavcodec/x86/hevcdsp.h      |  128 +++++------
 libavcodec/x86/hevcdsp_init.c |  476 ++++++++++++++++++++---------------------
 2 files changed, 302 insertions(+), 302 deletions(-)

diff --git a/libavcodec/x86/hevcdsp.h b/libavcodec/x86/hevcdsp.h
index f1c2ffb..601dede 100644
--- a/libavcodec/x86/hevcdsp.h
+++ b/libavcodec/x86/hevcdsp.h
@@ -25,96 +25,96 @@
 #ifndef AVCODEC_X86_HEVCDSP_H
 #define AVCODEC_X86_HEVCDSP_H
 
-#define PEL_LINK(dst, idx1, idx2, idx3, name, D) \
-dst[idx1][idx2][idx3] = ff_hevc_put_hevc_ ## name ## _ ## D ## _sse4; \
-dst ## _bi[idx1][idx2][idx3] = ff_hevc_put_hevc_bi_ ## name ## _ ## D ## _sse4; \
-dst ## _uni[idx1][idx2][idx3] = ff_hevc_put_hevc_uni_ ## name ## _ ## D ## _sse4; \
-dst ## _uni_w[idx1][idx2][idx3] = ff_hevc_put_hevc_uni_w_ ## name ## _ ## D ## _sse4; \
-dst ## _bi_w[idx1][idx2][idx3] = ff_hevc_put_hevc_bi_w_ ## name ## _ ## D ## _sse4
+#define PEL_LINK(dst, idx1, idx2, idx3, name, D, opt) \
+dst[idx1][idx2][idx3] = ff_hevc_put_hevc_ ## name ## _ ## D ## _##opt; \
+dst ## _bi[idx1][idx2][idx3] = ff_hevc_put_hevc_bi_ ## name ## _ ## D ## _##opt; \
+dst ## _uni[idx1][idx2][idx3] = ff_hevc_put_hevc_uni_ ## name ## _ ## D ## _##opt; \
+dst ## _uni_w[idx1][idx2][idx3] = ff_hevc_put_hevc_uni_w_ ## name ## _ ## D ## _##opt; \
+dst ## _bi_w[idx1][idx2][idx3] = ff_hevc_put_hevc_bi_w_ ## name ## _ ## D ## _##opt
 
 
-#define PEL_PROTOTYPE(name, D) \
-void ff_hevc_put_hevc_ ## name ## _ ## D ## _sse4(int16_t *dst, ptrdiff_t dststride,uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); \
-void ff_hevc_put_hevc_bi_ ## name ## _ ## D ## _sse4(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, ptrdiff_t src2stride, int height, intptr_t mx, intptr_t my, int width); \
-void ff_hevc_put_hevc_uni_ ## name ## _ ## D ## _sse4(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); \
-void ff_hevc_put_hevc_uni_w_ ## name ## _ ## D ## _sse4(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width); \
-void ff_hevc_put_hevc_bi_w_ ## name ## _ ## D ## _sse4(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, ptrdiff_t src2stride, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width)
+#define PEL_PROTOTYPE(name, D, opt) \
+void ff_hevc_put_hevc_ ## name ## _ ## D ## _##opt(int16_t *dst, ptrdiff_t dststride,uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my,int width); \
+void ff_hevc_put_hevc_bi_ ## name ## _ ## D ## _##opt(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, ptrdiff_t src2stride, int height, intptr_t mx, intptr_t my, int width); \
+void ff_hevc_put_hevc_uni_ ## name ## _ ## D ## _##opt(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int height, intptr_t mx, intptr_t my, int width); \
+void ff_hevc_put_hevc_uni_w_ ## name ## _ ## D ## _##opt(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int height, int denom, int wx, int ox, intptr_t mx, intptr_t my, int width); \
+void ff_hevc_put_hevc_bi_w_ ## name ## _ ## D ## _##opt(uint8_t *_dst, ptrdiff_t _dststride, uint8_t *_src, ptrdiff_t _srcstride, int16_t *src2, ptrdiff_t src2stride, int height, int denom, int wx0, int wx1, int ox0, int ox1, intptr_t mx, intptr_t my, int width)
 
 
 ///////////////////////////////////////////////////////////////////////////////
 // MC functions
 ///////////////////////////////////////////////////////////////////////////////
 
-#define EPEL_PROTOTYPES(fname, bitd) \
-        PEL_PROTOTYPE(fname##4,  bitd); \
-        PEL_PROTOTYPE(fname##6,  bitd); \
-        PEL_PROTOTYPE(fname##8,  bitd); \
-        PEL_PROTOTYPE(fname##12, bitd); \
-        PEL_PROTOTYPE(fname##16, bitd); \
-        PEL_PROTOTYPE(fname##24, bitd); \
-        PEL_PROTOTYPE(fname##32, bitd); \
-        PEL_PROTOTYPE(fname##48, bitd); \
-        PEL_PROTOTYPE(fname##64, bitd)
-
-#define QPEL_PROTOTYPES(fname, bitd) \
-        PEL_PROTOTYPE(fname##4,  bitd); \
-        PEL_PROTOTYPE(fname##8,  bitd); \
-        PEL_PROTOTYPE(fname##12, bitd); \
-        PEL_PROTOTYPE(fname##16, bitd); \
-        PEL_PROTOTYPE(fname##24, bitd); \
-        PEL_PROTOTYPE(fname##32, bitd); \
-        PEL_PROTOTYPE(fname##48, bitd); \
-        PEL_PROTOTYPE(fname##64, bitd)
-
-#define WEIGHTING_PROTOTYPE(width, bitd) \
-void ff_hevc_put_hevc_uni_w##width##_##bitd##_sse4(uint8_t *dst, ptrdiff_t dststride, int16_t *_src, ptrdiff_t _srcstride, int height, int denom,  int _wx, int _ox); \
-void ff_hevc_put_hevc_bi_w##width##_##bitd##_sse4(uint8_t *dst, ptrdiff_t dststride, int16_t *_src, ptrdiff_t _srcstride, int16_t *_src2, ptrdiff_t _src2stride, int height, int denom,  int _wx0,  int _wx1, int _ox0, int _ox1)
-
-#define WEIGHTING_PROTOTYPES(bitd) \
-        WEIGHTING_PROTOTYPE(2, bitd); \
-        WEIGHTING_PROTOTYPE(4, bitd); \
-        WEIGHTING_PROTOTYPE(6, bitd); \
-        WEIGHTING_PROTOTYPE(8, bitd); \
-        WEIGHTING_PROTOTYPE(12, bitd); \
-        WEIGHTING_PROTOTYPE(16, bitd); \
-        WEIGHTING_PROTOTYPE(24, bitd); \
-        WEIGHTING_PROTOTYPE(32, bitd); \
-        WEIGHTING_PROTOTYPE(48, bitd); \
-        WEIGHTING_PROTOTYPE(64, bitd)
+#define EPEL_PROTOTYPES(fname, bitd, opt) \
+        PEL_PROTOTYPE(fname##4,  bitd, opt); \
+        PEL_PROTOTYPE(fname##6,  bitd, opt); \
+        PEL_PROTOTYPE(fname##8,  bitd, opt); \
+        PEL_PROTOTYPE(fname##12, bitd, opt); \
+        PEL_PROTOTYPE(fname##16, bitd, opt); \
+        PEL_PROTOTYPE(fname##24, bitd, opt); \
+        PEL_PROTOTYPE(fname##32, bitd, opt); \
+        PEL_PROTOTYPE(fname##48, bitd, opt); \
+        PEL_PROTOTYPE(fname##64, bitd, opt)
+
+#define QPEL_PROTOTYPES(fname, bitd, opt) \
+        PEL_PROTOTYPE(fname##4,  bitd, opt); \
+        PEL_PROTOTYPE(fname##8,  bitd, opt); \
+        PEL_PROTOTYPE(fname##12, bitd, opt); \
+        PEL_PROTOTYPE(fname##16, bitd, opt); \
+        PEL_PROTOTYPE(fname##24, bitd, opt); \
+        PEL_PROTOTYPE(fname##32, bitd, opt); \
+        PEL_PROTOTYPE(fname##48, bitd, opt); \
+        PEL_PROTOTYPE(fname##64, bitd, opt)
+
+#define WEIGHTING_PROTOTYPE(width, bitd, opt) \
+void ff_hevc_put_hevc_uni_w##width##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dststride, int16_t *_src, ptrdiff_t _srcstride, int height, int denom,  int _wx, int _ox); \
+void ff_hevc_put_hevc_bi_w##width##_##bitd##_##opt(uint8_t *dst, ptrdiff_t dststride, int16_t *_src, ptrdiff_t _srcstride, int16_t *_src2, ptrdiff_t _src2stride, int height, int denom,  int _wx0,  int _wx1, int _ox0, int _ox1)
+
+#define WEIGHTING_PROTOTYPES(bitd, opt) \
+        WEIGHTING_PROTOTYPE(2, bitd, opt); \
+        WEIGHTING_PROTOTYPE(4, bitd, opt); \
+        WEIGHTING_PROTOTYPE(6, bitd, opt); \
+        WEIGHTING_PROTOTYPE(8, bitd, opt); \
+        WEIGHTING_PROTOTYPE(12, bitd, opt); \
+        WEIGHTING_PROTOTYPE(16, bitd, opt); \
+        WEIGHTING_PROTOTYPE(24, bitd, opt); \
+        WEIGHTING_PROTOTYPE(32, bitd, opt); \
+        WEIGHTING_PROTOTYPE(48, bitd, opt); \
+        WEIGHTING_PROTOTYPE(64, bitd, opt)
 
 
 ///////////////////////////////////////////////////////////////////////////////
 // QPEL_PIXELS EPEL_PIXELS
 ///////////////////////////////////////////////////////////////////////////////
-EPEL_PROTOTYPES(pel_pixels ,  8);
-EPEL_PROTOTYPES(pel_pixels , 10);
+EPEL_PROTOTYPES(pel_pixels ,  8, sse4);
+EPEL_PROTOTYPES(pel_pixels , 10, sse4);
 ///////////////////////////////////////////////////////////////////////////////
 // EPEL
 ///////////////////////////////////////////////////////////////////////////////
-EPEL_PROTOTYPES(epel_h ,  8);
-EPEL_PROTOTYPES(epel_h , 10);
+EPEL_PROTOTYPES(epel_h ,  8, sse4);
+EPEL_PROTOTYPES(epel_h , 10, sse4);
 
-EPEL_PROTOTYPES(epel_v ,  8);
-EPEL_PROTOTYPES(epel_v , 10);
+EPEL_PROTOTYPES(epel_v ,  8, sse4);
+EPEL_PROTOTYPES(epel_v , 10, sse4);
 
-EPEL_PROTOTYPES(epel_hv ,  8);
-EPEL_PROTOTYPES(epel_hv , 10);
+EPEL_PROTOTYPES(epel_hv ,  8, sse4);
+EPEL_PROTOTYPES(epel_hv , 10, sse4);
 
 ///////////////////////////////////////////////////////////////////////////////
 // QPEL
 ///////////////////////////////////////////////////////////////////////////////
-QPEL_PROTOTYPES(qpel_h ,  8);
-QPEL_PROTOTYPES(qpel_h , 10);
+QPEL_PROTOTYPES(qpel_h ,  8, sse4);
+QPEL_PROTOTYPES(qpel_h , 10, sse4);
 
-QPEL_PROTOTYPES(qpel_v,  8);
-QPEL_PROTOTYPES(qpel_v, 10);
+QPEL_PROTOTYPES(qpel_v,  8, sse4);
+QPEL_PROTOTYPES(qpel_v, 10, sse4);
 
-QPEL_PROTOTYPES(qpel_hv,  8);
-QPEL_PROTOTYPES(qpel_hv, 10);
+QPEL_PROTOTYPES(qpel_hv,  8, sse4);
+QPEL_PROTOTYPES(qpel_hv, 10, sse4);
 
 
-WEIGHTING_PROTOTYPES(8);
-WEIGHTING_PROTOTYPES(10);
+WEIGHTING_PROTOTYPES(8, sse4);
+WEIGHTING_PROTOTYPES(10, sse4);
 
 
 #endif // AVCODEC_X86_HEVCDSP_H
diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c
index fcdb05a..eaae58b 100644
--- a/libavcodec/x86/hevcdsp_init.c
+++ b/libavcodec/x86/hevcdsp_init.c
@@ -30,8 +30,8 @@
 
 #if ARCH_X86_64
 
-#define mc_rep_func(name, bitd, step, W) \
-void ff_hevc_put_hevc_##name##W##_##bitd##_sse4(int16_t *_dst, ptrdiff_t dststride,                             \
+#define mc_rep_func(name, bitd, step, W, opt) \
+void ff_hevc_put_hevc_##name##W##_##bitd##_##opt(int16_t *_dst, ptrdiff_t dststride,                            \
                                                 uint8_t *_src, ptrdiff_t _srcstride, int height,                \
                                                 intptr_t mx, intptr_t my, int width)                            \
 {                                                                                                               \
@@ -41,11 +41,11 @@ void ff_hevc_put_hevc_##name##W##_##bitd##_sse4(int16_t *_dst, ptrdiff_t dststri
     for (i = 0; i < W; i += step) {                                                                             \
         src  = _src + (i * ((bitd + 7) / 8));                                                                   \
         dst = _dst + i;                                                                                         \
-        ff_hevc_put_hevc_##name##step##_##bitd##_sse4(dst, dststride, src, _srcstride, height, mx, my, width);  \
+        ff_hevc_put_hevc_##name##step##_##bitd##_##opt(dst, dststride, src, _srcstride, height, mx, my, width); \
     }                                                                                                           \
 }
-#define mc_rep_uni_func(name, bitd, step, W) \
-void ff_hevc_put_hevc_uni_##name##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t dststride,                         \
+#define mc_rep_uni_func(name, bitd, step, W, opt) \
+void ff_hevc_put_hevc_uni_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride,                        \
                                                     uint8_t *_src, ptrdiff_t _srcstride, int height,            \
                                                     intptr_t mx, intptr_t my, int width)                        \
 {                                                                                                               \
@@ -55,12 +55,12 @@ void ff_hevc_put_hevc_uni_##name##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t dst
     for (i = 0; i < W; i += step) {                                                                             \
         src = _src + (i * ((bitd + 7) / 8));                                                                    \
         dst = _dst + (i * ((bitd + 7) / 8));                                                                    \
-        ff_hevc_put_hevc_uni_##name##step##_##bitd##_sse4(dst, dststride, src, _srcstride,                      \
+        ff_hevc_put_hevc_uni_##name##step##_##bitd##_##opt(dst, dststride, src, _srcstride,                     \
                                                           height, mx, my, width);                               \
     }                                                                                                           \
 }
-#define mc_rep_bi_func(name, bitd, step, W) \
-void ff_hevc_put_hevc_bi_##name##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t dststride, uint8_t *_src,           \
+#define mc_rep_bi_func(name, bitd, step, W, opt) \
+void ff_hevc_put_hevc_bi_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, uint8_t *_src,          \
                                                    ptrdiff_t _srcstride, int16_t* _src2, ptrdiff_t _src2stride, \
                                                    int height, intptr_t mx, intptr_t my, int width)             \
 {                                                                                                               \
@@ -72,97 +72,97 @@ void ff_hevc_put_hevc_bi_##name##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t dsts
         src  = _src + (i * ((bitd + 7) / 8));                                                                   \
         dst  = _dst + (i * ((bitd + 7) / 8));                                                                   \
         src2 = _src2 + i;                                                                                       \
-        ff_hevc_put_hevc_bi_##name##step##_##bitd##_sse4(dst, dststride, src, _srcstride, src2,                 \
+        ff_hevc_put_hevc_bi_##name##step##_##bitd##_##opt(dst, dststride, src, _srcstride, src2,                \
                                                          _src2stride, height, mx, my, width);                   \
     }                                                                                                           \
 }
 
-#define mc_rep_funcs(name, bitd, step, W)        \
-    mc_rep_func(name, bitd, step, W);            \
-    mc_rep_uni_func(name, bitd, step, W);        \
-    mc_rep_bi_func(name, bitd, step, W)
-
-
-mc_rep_funcs(pel_pixels, 8, 16, 64);
-mc_rep_funcs(pel_pixels, 8, 16, 48);
-mc_rep_funcs(pel_pixels, 8, 16, 32);
-mc_rep_funcs(pel_pixels, 8,  8, 24);
-
-mc_rep_funcs(pel_pixels,10,  8, 64);
-mc_rep_funcs(pel_pixels,10,  8, 48);
-mc_rep_funcs(pel_pixels,10,  8, 32);
-mc_rep_funcs(pel_pixels,10,  8, 24);
-mc_rep_funcs(pel_pixels,10,  8, 16);
-mc_rep_funcs(pel_pixels,10,  4, 12);
-
-mc_rep_funcs(epel_h, 8, 16, 64);
-mc_rep_funcs(epel_h, 8, 16, 48);
-mc_rep_funcs(epel_h, 8, 16, 32);
-mc_rep_funcs(epel_h, 8,  8, 24);
-mc_rep_funcs(epel_h,10,  8, 64);
-mc_rep_funcs(epel_h,10,  8, 48);
-mc_rep_funcs(epel_h,10,  8, 32);
-mc_rep_funcs(epel_h,10,  8, 24);
-mc_rep_funcs(epel_h,10,  8, 16);
-mc_rep_funcs(epel_h,10,  4, 12);
-mc_rep_funcs(epel_v, 8, 16, 64);
-mc_rep_funcs(epel_v, 8, 16, 48);
-mc_rep_funcs(epel_v, 8, 16, 32);
-mc_rep_funcs(epel_v, 8,  8, 24);
-mc_rep_funcs(epel_v,10,  8, 64);
-mc_rep_funcs(epel_v,10,  8, 48);
-mc_rep_funcs(epel_v,10,  8, 32);
-mc_rep_funcs(epel_v,10,  8, 24);
-mc_rep_funcs(epel_v,10,  8, 16);
-mc_rep_funcs(epel_v,10,  4, 12);
-mc_rep_funcs(epel_hv, 8,  8, 64);
-mc_rep_funcs(epel_hv, 8,  8, 48);
-mc_rep_funcs(epel_hv, 8,  8, 32);
-mc_rep_funcs(epel_hv, 8,  8, 24);
-mc_rep_funcs(epel_hv, 8,  8, 16);
-mc_rep_funcs(epel_hv, 8,  4, 12);
-mc_rep_funcs(epel_hv,10,  8, 64);
-mc_rep_funcs(epel_hv,10,  8, 48);
-mc_rep_funcs(epel_hv,10,  8, 32);
-mc_rep_funcs(epel_hv,10,  8, 24);
-mc_rep_funcs(epel_hv,10,  8, 16);
-mc_rep_funcs(epel_hv,10,  4, 12);
-
-mc_rep_funcs(qpel_h, 8, 16, 64);
-mc_rep_funcs(qpel_h, 8, 16, 48);
-mc_rep_funcs(qpel_h, 8, 16, 32);
-mc_rep_funcs(qpel_h, 8,  8, 24);
-mc_rep_funcs(qpel_h,10,  8, 64);
-mc_rep_funcs(qpel_h,10,  8, 48);
-mc_rep_funcs(qpel_h,10,  8, 32);
-mc_rep_funcs(qpel_h,10,  8, 24);
-mc_rep_funcs(qpel_h,10,  8, 16);
-mc_rep_funcs(qpel_h,10,  4, 12);
-mc_rep_funcs(qpel_v, 8, 16, 64);
-mc_rep_funcs(qpel_v, 8, 16, 48);
-mc_rep_funcs(qpel_v, 8, 16, 32);
-mc_rep_funcs(qpel_v, 8,  8, 24);
-mc_rep_funcs(qpel_v,10,  8, 64);
-mc_rep_funcs(qpel_v,10,  8, 48);
-mc_rep_funcs(qpel_v,10,  8, 32);
-mc_rep_funcs(qpel_v,10,  8, 24);
-mc_rep_funcs(qpel_v,10,  8, 16);
-mc_rep_funcs(qpel_v,10,  4, 12);
-mc_rep_funcs(qpel_hv, 8,  8, 64);
-mc_rep_funcs(qpel_hv, 8,  8, 48);
-mc_rep_funcs(qpel_hv, 8,  8, 32);
-mc_rep_funcs(qpel_hv, 8,  8, 24);
-mc_rep_funcs(qpel_hv, 8,  8, 16);
-mc_rep_funcs(qpel_hv, 8,  4, 12);
-mc_rep_funcs(qpel_hv,10,  8, 64);
-mc_rep_funcs(qpel_hv,10,  8, 48);
-mc_rep_funcs(qpel_hv,10,  8, 32);
-mc_rep_funcs(qpel_hv,10,  8, 24);
-mc_rep_funcs(qpel_hv,10,  8, 16);
-mc_rep_funcs(qpel_hv,10,  4, 12);
-
-#define mc_rep_uni_w(bitd, step, W) \
-void ff_hevc_put_hevc_uni_w##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t dststride, int16_t *_src, ptrdiff_t _srcstride, \
+#define mc_rep_funcs(name, bitd, step, W, opt)        \
+    mc_rep_func(name, bitd, step, W, opt);            \
+    mc_rep_uni_func(name, bitd, step, W, opt);        \
+    mc_rep_bi_func(name, bitd, step, W, opt)
+
+
+mc_rep_funcs(pel_pixels, 8, 16, 64, sse4);
+mc_rep_funcs(pel_pixels, 8, 16, 48, sse4);
+mc_rep_funcs(pel_pixels, 8, 16, 32, sse4);
+mc_rep_funcs(pel_pixels, 8,  8, 24, sse4);
+
+mc_rep_funcs(pel_pixels,10,  8, 64, sse4);
+mc_rep_funcs(pel_pixels,10,  8, 48, sse4);
+mc_rep_funcs(pel_pixels,10,  8, 32, sse4);
+mc_rep_funcs(pel_pixels,10,  8, 24, sse4);
+mc_rep_funcs(pel_pixels,10,  8, 16, sse4);
+mc_rep_funcs(pel_pixels,10,  4, 12, sse4);
+
+mc_rep_funcs(epel_h, 8, 16, 64, sse4);
+mc_rep_funcs(epel_h, 8, 16, 48, sse4);
+mc_rep_funcs(epel_h, 8, 16, 32, sse4);
+mc_rep_funcs(epel_h, 8,  8, 24, sse4);
+mc_rep_funcs(epel_h,10,  8, 64, sse4);
+mc_rep_funcs(epel_h,10,  8, 48, sse4);
+mc_rep_funcs(epel_h,10,  8, 32, sse4);
+mc_rep_funcs(epel_h,10,  8, 24, sse4);
+mc_rep_funcs(epel_h,10,  8, 16, sse4);
+mc_rep_funcs(epel_h,10,  4, 12, sse4);
+mc_rep_funcs(epel_v, 8, 16, 64, sse4);
+mc_rep_funcs(epel_v, 8, 16, 48, sse4);
+mc_rep_funcs(epel_v, 8, 16, 32, sse4);
+mc_rep_funcs(epel_v, 8,  8, 24, sse4);
+mc_rep_funcs(epel_v,10,  8, 64, sse4);
+mc_rep_funcs(epel_v,10,  8, 48, sse4);
+mc_rep_funcs(epel_v,10,  8, 32, sse4);
+mc_rep_funcs(epel_v,10,  8, 24, sse4);
+mc_rep_funcs(epel_v,10,  8, 16, sse4);
+mc_rep_funcs(epel_v,10,  4, 12, sse4);
+mc_rep_funcs(epel_hv, 8,  8, 64, sse4);
+mc_rep_funcs(epel_hv, 8,  8, 48, sse4);
+mc_rep_funcs(epel_hv, 8,  8, 32, sse4);
+mc_rep_funcs(epel_hv, 8,  8, 24, sse4);
+mc_rep_funcs(epel_hv, 8,  8, 16, sse4);
+mc_rep_funcs(epel_hv, 8,  4, 12, sse4);
+mc_rep_funcs(epel_hv,10,  8, 64, sse4);
+mc_rep_funcs(epel_hv,10,  8, 48, sse4);
+mc_rep_funcs(epel_hv,10,  8, 32, sse4);
+mc_rep_funcs(epel_hv,10,  8, 24, sse4);
+mc_rep_funcs(epel_hv,10,  8, 16, sse4);
+mc_rep_funcs(epel_hv,10,  4, 12, sse4);
+
+mc_rep_funcs(qpel_h, 8, 16, 64, sse4);
+mc_rep_funcs(qpel_h, 8, 16, 48, sse4);
+mc_rep_funcs(qpel_h, 8, 16, 32, sse4);
+mc_rep_funcs(qpel_h, 8,  8, 24, sse4);
+mc_rep_funcs(qpel_h,10,  8, 64, sse4);
+mc_rep_funcs(qpel_h,10,  8, 48, sse4);
+mc_rep_funcs(qpel_h,10,  8, 32, sse4);
+mc_rep_funcs(qpel_h,10,  8, 24, sse4);
+mc_rep_funcs(qpel_h,10,  8, 16, sse4);
+mc_rep_funcs(qpel_h,10,  4, 12, sse4);
+mc_rep_funcs(qpel_v, 8, 16, 64, sse4);
+mc_rep_funcs(qpel_v, 8, 16, 48, sse4);
+mc_rep_funcs(qpel_v, 8, 16, 32, sse4);
+mc_rep_funcs(qpel_v, 8,  8, 24, sse4);
+mc_rep_funcs(qpel_v,10,  8, 64, sse4);
+mc_rep_funcs(qpel_v,10,  8, 48, sse4);
+mc_rep_funcs(qpel_v,10,  8, 32, sse4);
+mc_rep_funcs(qpel_v,10,  8, 24, sse4);
+mc_rep_funcs(qpel_v,10,  8, 16, sse4);
+mc_rep_funcs(qpel_v,10,  4, 12, sse4);
+mc_rep_funcs(qpel_hv, 8,  8, 64, sse4);
+mc_rep_funcs(qpel_hv, 8,  8, 48, sse4);
+mc_rep_funcs(qpel_hv, 8,  8, 32, sse4);
+mc_rep_funcs(qpel_hv, 8,  8, 24, sse4);
+mc_rep_funcs(qpel_hv, 8,  8, 16, sse4);
+mc_rep_funcs(qpel_hv, 8,  4, 12, sse4);
+mc_rep_funcs(qpel_hv,10,  8, 64, sse4);
+mc_rep_funcs(qpel_hv,10,  8, 48, sse4);
+mc_rep_funcs(qpel_hv,10,  8, 32, sse4);
+mc_rep_funcs(qpel_hv,10,  8, 24, sse4);
+mc_rep_funcs(qpel_hv,10,  8, 16, sse4);
+mc_rep_funcs(qpel_hv,10,  4, 12, sse4);
+
+#define mc_rep_uni_w(bitd, step, W, opt) \
+void ff_hevc_put_hevc_uni_w##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, int16_t *_src, ptrdiff_t _srcstride,\
                                                int height, int denom,  int _wx, int _ox)                                \
 {                                                                                                                       \
     int i;                                                                                                              \
@@ -171,27 +171,27 @@ void ff_hevc_put_hevc_uni_w##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t dststrid
     for (i = 0; i < W; i += step) {                                                                                     \
         src= _src + i;                                                                                                  \
         dst= _dst + (i * ((bitd + 7) / 8));                                                                             \
-        ff_hevc_put_hevc_uni_w##step##_##bitd##_sse4(dst, dststride, src, _srcstride,                                   \
+        ff_hevc_put_hevc_uni_w##step##_##bitd##_##opt(dst, dststride, src, _srcstride,                                  \
                                                      height, denom, _wx, _ox);                                          \
     }                                                                                                                   \
 }
 
-mc_rep_uni_w(8, 6, 12);
-mc_rep_uni_w(8, 8, 16);
-mc_rep_uni_w(8, 8, 24);
-mc_rep_uni_w(8, 8, 32);
-mc_rep_uni_w(8, 8, 48);
-mc_rep_uni_w(8, 8, 64);
-
-mc_rep_uni_w(10, 6, 12);
-mc_rep_uni_w(10, 8, 16);
-mc_rep_uni_w(10, 8, 24);
-mc_rep_uni_w(10, 8, 32);
-mc_rep_uni_w(10, 8, 48);
-mc_rep_uni_w(10, 8, 64);
-
-#define mc_rep_bi_w(bitd, step, W) \
-void ff_hevc_put_hevc_bi_w##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t dststride, int16_t *_src, ptrdiff_t _srcstride,  \
+mc_rep_uni_w(8, 6, 12, sse4);
+mc_rep_uni_w(8, 8, 16, sse4);
+mc_rep_uni_w(8, 8, 24, sse4);
+mc_rep_uni_w(8, 8, 32, sse4);
+mc_rep_uni_w(8, 8, 48, sse4);
+mc_rep_uni_w(8, 8, 64, sse4);
+
+mc_rep_uni_w(10, 6, 12, sse4);
+mc_rep_uni_w(10, 8, 16, sse4);
+mc_rep_uni_w(10, 8, 24, sse4);
+mc_rep_uni_w(10, 8, 32, sse4);
+mc_rep_uni_w(10, 8, 48, sse4);
+mc_rep_uni_w(10, 8, 64, sse4);
+
+#define mc_rep_bi_w(bitd, step, W, opt) \
+void ff_hevc_put_hevc_bi_w##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t dststride, int16_t *_src, ptrdiff_t _srcstride, \
                                               int16_t *_src2, ptrdiff_t _src2stride, int height,                        \
                                               int denom,  int _wx0,  int _wx1, int _ox0, int _ox1)                      \
 {                                                                                                                       \
@@ -203,74 +203,74 @@ void ff_hevc_put_hevc_bi_w##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t dststride
         src  = _src  + i;                                                                                               \
         src2 = _src2 + i;                                                                                               \
         dst  = _dst  + (i * ((bitd + 7) / 8));                                                                          \
-        ff_hevc_put_hevc_bi_w##step##_##bitd##_sse4(dst, dststride, src, _srcstride, src2, _src2stride,                 \
+        ff_hevc_put_hevc_bi_w##step##_##bitd##_##opt(dst, dststride, src, _srcstride, src2, _src2stride,                \
                                                     height, denom, _wx0, _wx1, _ox0, _ox1);                             \
     }                                                                                                                   \
 }
 
-mc_rep_bi_w(8, 6, 12);
-mc_rep_bi_w(8, 8, 16);
-mc_rep_bi_w(8, 8, 24);
-mc_rep_bi_w(8, 8, 32);
-mc_rep_bi_w(8, 8, 48);
-mc_rep_bi_w(8, 8, 64);
-
-mc_rep_bi_w(10, 6, 12);
-mc_rep_bi_w(10, 8, 16);
-mc_rep_bi_w(10, 8, 24);
-mc_rep_bi_w(10, 8, 32);
-mc_rep_bi_w(10, 8, 48);
-mc_rep_bi_w(10, 8, 64);
-
-#define mc_uni_w_func(name, bitd, W) \
-void ff_hevc_put_hevc_uni_w_##name##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t _dststride,          \
+mc_rep_bi_w(8, 6, 12, sse4);
+mc_rep_bi_w(8, 8, 16, sse4);
+mc_rep_bi_w(8, 8, 24, sse4);
+mc_rep_bi_w(8, 8, 32, sse4);
+mc_rep_bi_w(8, 8, 48, sse4);
+mc_rep_bi_w(8, 8, 64, sse4);
+
+mc_rep_bi_w(10, 6, 12, sse4);
+mc_rep_bi_w(10, 8, 16, sse4);
+mc_rep_bi_w(10, 8, 24, sse4);
+mc_rep_bi_w(10, 8, 32, sse4);
+mc_rep_bi_w(10, 8, 48, sse4);
+mc_rep_bi_w(10, 8, 64, sse4);
+
+#define mc_uni_w_func(name, bitd, W, opt) \
+void ff_hevc_put_hevc_uni_w_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t _dststride,         \
                                                       uint8_t *_src, ptrdiff_t _srcstride,          \
                                                       int height, int denom,                        \
                                                       int _wx, int _ox,                             \
                                                       intptr_t mx, intptr_t my, int width)          \
 {                                                                                                   \
     LOCAL_ALIGNED_16(int16_t, temp, [71 * 64]);                                                     \
-    ff_hevc_put_hevc_##name##W##_##bitd##_sse4(temp, 64, _src, _srcstride, height, mx, my, width);  \
-    ff_hevc_put_hevc_uni_w##W##_##bitd##_sse4(_dst, _dststride, temp, 64, height, denom, _wx, _ox); \
+    ff_hevc_put_hevc_##name##W##_##bitd##_##opt(temp, 64, _src, _srcstride, height, mx, my, width); \
+    ff_hevc_put_hevc_uni_w##W##_##bitd##_##opt(_dst, _dststride, temp, 64, height, denom, _wx, _ox);\
 }
 
-#define mc_uni_w_funcs(name, bitd)       \
-        mc_uni_w_func(name, bitd, 4);    \
-        mc_uni_w_func(name, bitd, 8);    \
-        mc_uni_w_func(name, bitd, 12);   \
-        mc_uni_w_func(name, bitd, 16);   \
-        mc_uni_w_func(name, bitd, 24);   \
-        mc_uni_w_func(name, bitd, 32);   \
-        mc_uni_w_func(name, bitd, 48);   \
-        mc_uni_w_func(name, bitd, 64)
-
-mc_uni_w_funcs(pel_pixels, 8);
-mc_uni_w_func(pel_pixels, 8, 6);
-mc_uni_w_funcs(epel_h, 8);
-mc_uni_w_func(epel_h, 8, 6);
-mc_uni_w_funcs(epel_v, 8);
-mc_uni_w_func(epel_v, 8, 6);
-mc_uni_w_funcs(epel_hv, 8);
-mc_uni_w_func(epel_hv, 8, 6);
-mc_uni_w_funcs(qpel_h, 8);
-mc_uni_w_funcs(qpel_v, 8);
-mc_uni_w_funcs(qpel_hv, 8);
-
-mc_uni_w_funcs(pel_pixels, 10);
-mc_uni_w_func(pel_pixels, 10, 6);
-mc_uni_w_funcs(epel_h, 10);
-mc_uni_w_func(epel_h, 10, 6);
-mc_uni_w_funcs(epel_v, 10);
-mc_uni_w_func(epel_v, 10, 6);
-mc_uni_w_funcs(epel_hv, 10);
-mc_uni_w_func(epel_hv, 10, 6);
-mc_uni_w_funcs(qpel_h, 10);
-mc_uni_w_funcs(qpel_v, 10);
-mc_uni_w_funcs(qpel_hv, 10);
-
-
-#define mc_bi_w_func(name, bitd, W) \
-void ff_hevc_put_hevc_bi_w_##name##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t _dststride,            \
+#define mc_uni_w_funcs(name, bitd, opt)       \
+        mc_uni_w_func(name, bitd, 4, opt);    \
+        mc_uni_w_func(name, bitd, 8, opt);    \
+        mc_uni_w_func(name, bitd, 12, opt);   \
+        mc_uni_w_func(name, bitd, 16, opt);   \
+        mc_uni_w_func(name, bitd, 24, opt);   \
+        mc_uni_w_func(name, bitd, 32, opt);   \
+        mc_uni_w_func(name, bitd, 48, opt);   \
+        mc_uni_w_func(name, bitd, 64, opt)
+
+mc_uni_w_funcs(pel_pixels, 8, sse4);
+mc_uni_w_func(pel_pixels, 8, 6, sse4);
+mc_uni_w_funcs(epel_h, 8, sse4);
+mc_uni_w_func(epel_h, 8, 6, sse4);
+mc_uni_w_funcs(epel_v, 8, sse4);
+mc_uni_w_func(epel_v, 8, 6, sse4);
+mc_uni_w_funcs(epel_hv, 8, sse4);
+mc_uni_w_func(epel_hv, 8, 6, sse4);
+mc_uni_w_funcs(qpel_h, 8, sse4);
+mc_uni_w_funcs(qpel_v, 8, sse4);
+mc_uni_w_funcs(qpel_hv, 8, sse4);
+
+mc_uni_w_funcs(pel_pixels, 10, sse4);
+mc_uni_w_func(pel_pixels, 10, 6, sse4);
+mc_uni_w_funcs(epel_h, 10, sse4);
+mc_uni_w_func(epel_h, 10, 6, sse4);
+mc_uni_w_funcs(epel_v, 10, sse4);
+mc_uni_w_func(epel_v, 10, 6, sse4);
+mc_uni_w_funcs(epel_hv, 10, sse4);
+mc_uni_w_func(epel_hv, 10, 6, sse4);
+mc_uni_w_funcs(qpel_h, 10, sse4);
+mc_uni_w_funcs(qpel_v, 10, sse4);
+mc_uni_w_funcs(qpel_hv, 10, sse4);
+
+
+#define mc_bi_w_func(name, bitd, W, opt) \
+void ff_hevc_put_hevc_bi_w_##name##W##_##bitd##_##opt(uint8_t *_dst, ptrdiff_t _dststride,           \
                                                      uint8_t *_src, ptrdiff_t _srcstride,            \
                                                      int16_t *_src2, ptrdiff_t _src2stride,          \
                                                      int height, int denom,                          \
@@ -278,67 +278,67 @@ void ff_hevc_put_hevc_bi_w_##name##W##_##bitd##_sse4(uint8_t *_dst, ptrdiff_t _d
                                                      intptr_t mx, intptr_t my, int width)            \
 {                                                                                                    \
     LOCAL_ALIGNED_16(int16_t, temp, [71 * 64]);                                                      \
-    ff_hevc_put_hevc_##name##W##_##bitd##_sse4(temp, 64, _src, _srcstride, height, mx, my, width);   \
-    ff_hevc_put_hevc_bi_w##W##_##bitd##_sse4(_dst, _dststride, temp, 64, _src2, _src2stride,         \
+    ff_hevc_put_hevc_##name##W##_##bitd##_##opt(temp, 64, _src, _srcstride, height, mx, my, width);  \
+    ff_hevc_put_hevc_bi_w##W##_##bitd##_##opt(_dst, _dststride, temp, 64, _src2, _src2stride,        \
                                              height, denom, _wx0, _wx1, _ox0, _ox1);                 \
 }
 
-#define mc_bi_w_funcs(name, bitd)       \
-        mc_bi_w_func(name, bitd, 4);    \
-        mc_bi_w_func(name, bitd, 8);    \
-        mc_bi_w_func(name, bitd, 12);   \
-        mc_bi_w_func(name, bitd, 16);   \
-        mc_bi_w_func(name, bitd, 24);   \
-        mc_bi_w_func(name, bitd, 32);   \
-        mc_bi_w_func(name, bitd, 48);   \
-        mc_bi_w_func(name, bitd, 64)
-
-mc_bi_w_funcs(pel_pixels, 8);
-mc_bi_w_func(pel_pixels, 8, 6);
-mc_bi_w_funcs(epel_h, 8);
-mc_bi_w_func(epel_h, 8, 6);
-mc_bi_w_funcs(epel_v, 8);
-mc_bi_w_func(epel_v, 8, 6);
-mc_bi_w_funcs(epel_hv, 8);
-mc_bi_w_func(epel_hv, 8, 6);
-mc_bi_w_funcs(qpel_h, 8);
-mc_bi_w_funcs(qpel_v, 8);
-mc_bi_w_funcs(qpel_hv, 8);
-
-mc_bi_w_funcs(pel_pixels, 10);
-mc_bi_w_func(pel_pixels, 10, 6);
-mc_bi_w_funcs(epel_h, 10);
-mc_bi_w_func(epel_h, 10, 6);
-mc_bi_w_funcs(epel_v, 10);
-mc_bi_w_func(epel_v, 10, 6);
-mc_bi_w_funcs(epel_hv, 10);
-mc_bi_w_func(epel_hv, 10, 6);
-mc_bi_w_funcs(qpel_h, 10);
-mc_bi_w_funcs(qpel_v, 10);
-mc_bi_w_funcs(qpel_hv, 10);
+#define mc_bi_w_funcs(name, bitd, opt)       \
+        mc_bi_w_func(name, bitd, 4, opt);    \
+        mc_bi_w_func(name, bitd, 8, opt);    \
+        mc_bi_w_func(name, bitd, 12, opt);   \
+        mc_bi_w_func(name, bitd, 16, opt);   \
+        mc_bi_w_func(name, bitd, 24, opt);   \
+        mc_bi_w_func(name, bitd, 32, opt);   \
+        mc_bi_w_func(name, bitd, 48, opt);   \
+        mc_bi_w_func(name, bitd, 64, opt)
+
+mc_bi_w_funcs(pel_pixels, 8, sse4);
+mc_bi_w_func(pel_pixels, 8, 6, sse4);
+mc_bi_w_funcs(epel_h, 8, sse4);
+mc_bi_w_func(epel_h, 8, 6, sse4);
+mc_bi_w_funcs(epel_v, 8, sse4);
+mc_bi_w_func(epel_v, 8, 6, sse4);
+mc_bi_w_funcs(epel_hv, 8, sse4);
+mc_bi_w_func(epel_hv, 8, 6, sse4);
+mc_bi_w_funcs(qpel_h, 8, sse4);
+mc_bi_w_funcs(qpel_v, 8, sse4);
+mc_bi_w_funcs(qpel_hv, 8, sse4);
+
+mc_bi_w_funcs(pel_pixels, 10, sse4);
+mc_bi_w_func(pel_pixels, 10, 6, sse4);
+mc_bi_w_funcs(epel_h, 10, sse4);
+mc_bi_w_func(epel_h, 10, 6, sse4);
+mc_bi_w_funcs(epel_v, 10, sse4);
+mc_bi_w_func(epel_v, 10, 6, sse4);
+mc_bi_w_funcs(epel_hv, 10, sse4);
+mc_bi_w_func(epel_hv, 10, 6, sse4);
+mc_bi_w_funcs(qpel_h, 10, sse4);
+mc_bi_w_funcs(qpel_v, 10, sse4);
+mc_bi_w_funcs(qpel_hv, 10, sse4);
 
 #endif //ARCH_X86_64
 
 
-#define EPEL_LINKS(pointer, my, mx, fname, bitd)           \
-        PEL_LINK(pointer, 1, my , mx , fname##4 ,  bitd ); \
-        PEL_LINK(pointer, 2, my , mx , fname##6 ,  bitd ); \
-        PEL_LINK(pointer, 3, my , mx , fname##8 ,  bitd ); \
-        PEL_LINK(pointer, 4, my , mx , fname##12,  bitd ); \
-        PEL_LINK(pointer, 5, my , mx , fname##16,  bitd ); \
-        PEL_LINK(pointer, 6, my , mx , fname##24,  bitd ); \
-        PEL_LINK(pointer, 7, my , mx , fname##32,  bitd ); \
-        PEL_LINK(pointer, 8, my , mx , fname##48,  bitd ); \
-        PEL_LINK(pointer, 9, my , mx , fname##64,  bitd )
-#define QPEL_LINKS(pointer, my, mx, fname, bitd)           \
-        PEL_LINK(pointer, 1, my , mx , fname##4 ,  bitd ); \
-        PEL_LINK(pointer, 3, my , mx , fname##8 ,  bitd ); \
-        PEL_LINK(pointer, 4, my , mx , fname##12,  bitd ); \
-        PEL_LINK(pointer, 5, my , mx , fname##16,  bitd ); \
-        PEL_LINK(pointer, 6, my , mx , fname##24,  bitd ); \
-        PEL_LINK(pointer, 7, my , mx , fname##32,  bitd ); \
-        PEL_LINK(pointer, 8, my , mx , fname##48,  bitd ); \
-        PEL_LINK(pointer, 9, my , mx , fname##64,  bitd )
+#define EPEL_LINKS(pointer, my, mx, fname, bitd, opt )           \
+        PEL_LINK(pointer, 1, my , mx , fname##4 ,  bitd, sse4 ); \
+        PEL_LINK(pointer, 2, my , mx , fname##6 ,  bitd, sse4 ); \
+        PEL_LINK(pointer, 3, my , mx , fname##8 ,  bitd, sse4 ); \
+        PEL_LINK(pointer, 4, my , mx , fname##12,  bitd, sse4 ); \
+        PEL_LINK(pointer, 5, my , mx , fname##16,  bitd, sse4 ); \
+        PEL_LINK(pointer, 6, my , mx , fname##24,  bitd, sse4 ); \
+        PEL_LINK(pointer, 7, my , mx , fname##32,  bitd, sse4 ); \
+        PEL_LINK(pointer, 8, my , mx , fname##48,  bitd, sse4 ); \
+        PEL_LINK(pointer, 9, my , mx , fname##64,  bitd, sse4 )
+#define QPEL_LINKS(pointer, my, mx, fname, bitd, sse4)           \
+        PEL_LINK(pointer, 1, my , mx , fname##4 ,  bitd, sse4 ); \
+        PEL_LINK(pointer, 3, my , mx , fname##8 ,  bitd, sse4 ); \
+        PEL_LINK(pointer, 4, my , mx , fname##12,  bitd, sse4 ); \
+        PEL_LINK(pointer, 5, my , mx , fname##16,  bitd, sse4 ); \
+        PEL_LINK(pointer, 6, my , mx , fname##24,  bitd, sse4 ); \
+        PEL_LINK(pointer, 7, my , mx , fname##32,  bitd, sse4 ); \
+        PEL_LINK(pointer, 8, my , mx , fname##48,  bitd, sse4 ); \
+        PEL_LINK(pointer, 9, my , mx , fname##64,  bitd, sse4 )
 
 
 void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth)
@@ -348,29 +348,29 @@ void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth)
     if (bit_depth == 8) {
         if (EXTERNAL_SSE4(mm_flags) && ARCH_X86_64) {
 
-            EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels,  8);
-            EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h,      8);
-            EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v,      8);
-            EPEL_LINKS(c->put_hevc_epel, 1, 1, epel_hv,     8);
+            EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels,  8, sse4);
+            EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h,      8, sse4);
+            EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v,      8, sse4);
+            EPEL_LINKS(c->put_hevc_epel, 1, 1, epel_hv,     8, sse4);
 
-            QPEL_LINKS(c->put_hevc_qpel, 0, 0, pel_pixels, 8);
-            QPEL_LINKS(c->put_hevc_qpel, 0, 1, qpel_h,     8);
-            QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v,     8);
-            QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv,    8);
+            QPEL_LINKS(c->put_hevc_qpel, 0, 0, pel_pixels, 8, sse4);
+            QPEL_LINKS(c->put_hevc_qpel, 0, 1, qpel_h,     8, sse4);
+            QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v,     8, sse4);
+            QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv,    8, sse4);
 
         }
     } else if (bit_depth == 10) {
         if (EXTERNAL_SSE4(mm_flags) && ARCH_X86_64) {
 
-            EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 10);
-            EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h,     10);
-            EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v,     10);
-            EPEL_LINKS(c->put_hevc_epel, 1, 1, epel_hv,    10);
+            EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 10, sse4);
+            EPEL_LINKS(c->put_hevc_epel, 0, 1, epel_h,     10, sse4);
+            EPEL_LINKS(c->put_hevc_epel, 1, 0, epel_v,     10, sse4);
+            EPEL_LINKS(c->put_hevc_epel, 1, 1, epel_hv,    10, sse4);
 
-            QPEL_LINKS(c->put_hevc_qpel, 0, 0, pel_pixels, 10);
-            QPEL_LINKS(c->put_hevc_qpel, 0, 1, qpel_h,     10);
-            QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v,     10);
-            QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv,    10);
+            QPEL_LINKS(c->put_hevc_qpel, 0, 0, pel_pixels, 10, sse4);
+            QPEL_LINKS(c->put_hevc_qpel, 0, 1, qpel_h,     10, sse4);
+            QPEL_LINKS(c->put_hevc_qpel, 1, 0, qpel_v,     10, sse4);
+            QPEL_LINKS(c->put_hevc_qpel, 1, 1, qpel_hv,    10, sse4);
         }
     }
 }



More information about the ffmpeg-cvslog mailing list