---
 libavcodec/x86/h264_intrapred.asm       |   27 ---------------------------
 libavcodec/x86/h264_intrapred_10bit.asm |   16 ----------------
 libavcodec/x86/h264_qpel_10bit.asm      |    4 ----
 libavutil/x86/x86util.asm               |   16 ++++++++--------
 libswscale/x86/output.asm               |    4 +---
 5 files changed, 9 insertions(+), 58 deletions(-)

diff --git a/libavcodec/x86/h264_intrapred.asm 
b/libavcodec/x86/h264_intrapred.asm
index 928734e..5a587d0 100644
--- a/libavcodec/x86/h264_intrapred.asm
+++ b/libavcodec/x86/h264_intrapred.asm
@@ -1064,10 +1064,8 @@ cglobal pred8x8l_top_dc, 4, 4
 %endmacro
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_TOP_DC
 INIT_MMX ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_TOP_DC
 
 ;-----------------------------------------------------------------------------
@@ -1169,10 +1167,8 @@ cglobal pred8x8l_dc, 4, 5
 %endmacro
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_DC
 INIT_MMX ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_DC
 
 ;-----------------------------------------------------------------------------
@@ -1242,10 +1238,8 @@ cglobal pred8x8l_horizontal, 4, 4
 %endmacro
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_HORIZONTAL
 INIT_MMX ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_HORIZONTAL
 
 ;-----------------------------------------------------------------------------
@@ -1294,10 +1288,8 @@ cglobal pred8x8l_vertical, 4, 4
 %endmacro
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_VERTICAL
 INIT_MMX ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_VERTICAL
 
 ;-----------------------------------------------------------------------------
@@ -1305,7 +1297,6 @@ PRED8x8L_VERTICAL
 ;-----------------------------------------------------------------------------
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 cglobal pred8x8l_down_left, 4, 5
     sub          r0, r3
     movq        mm0, [r0-8]
@@ -1497,10 +1488,8 @@ INIT_XMM cpuname
 %endmacro
 
 INIT_MMX sse2
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_DOWN_LEFT
 INIT_MMX ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_DOWN_LEFT
 
 ;-----------------------------------------------------------------------------
@@ -1508,7 +1497,6 @@ PRED8x8L_DOWN_LEFT
 ;-----------------------------------------------------------------------------
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 cglobal pred8x8l_down_right, 4, 5
     sub          r0, r3
     lea          r4, [r0+r3*2]
@@ -1751,10 +1739,8 @@ INIT_XMM cpuname
 %endmacro
 
 INIT_MMX sse2
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_DOWN_RIGHT
 INIT_MMX ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_DOWN_RIGHT
 
 ;-----------------------------------------------------------------------------
@@ -1762,7 +1748,6 @@ PRED8x8L_DOWN_RIGHT
 ;-----------------------------------------------------------------------------
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 cglobal pred8x8l_vertical_right, 4, 5
     sub          r0, r3
     lea          r4, [r0+r3*2]
@@ -1981,10 +1966,8 @@ INIT_XMM cpuname
 %endmacro
 
 INIT_MMX sse2
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_VERTICAL_RIGHT
 INIT_MMX ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_VERTICAL_RIGHT
 
 ;-----------------------------------------------------------------------------
@@ -2072,10 +2055,8 @@ INIT_XMM cpuname
 %endmacro
 
 INIT_MMX sse2
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_VERTICAL_LEFT
 INIT_MMX ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_VERTICAL_LEFT
 
 ;-----------------------------------------------------------------------------
@@ -2161,10 +2142,8 @@ cglobal pred8x8l_horizontal_up, 4, 4
 %endmacro
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_HORIZONTAL_UP
 INIT_MMX ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_HORIZONTAL_UP
 
 ;-----------------------------------------------------------------------------
@@ -2172,7 +2151,6 @@ PRED8x8L_HORIZONTAL_UP
 ;-----------------------------------------------------------------------------
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 cglobal pred8x8l_horizontal_down, 4, 5
     sub          r0, r3
     lea          r4, [r0+r3*2]
@@ -2412,10 +2390,8 @@ INIT_XMM cpuname
 %endmacro
 
 INIT_MMX sse2
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_HORIZONTAL_DOWN
 INIT_MMX ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_HORIZONTAL_DOWN
 
 ;-----------------------------------------------------------------------------
@@ -2638,7 +2614,6 @@ cglobal pred4x4_horizontal_up, 3, 3
 ;-----------------------------------------------------------------------------
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 cglobal pred4x4_horizontal_down, 3, 3
     sub       r0, r2
     lea       r1, [r0+r2*2]
@@ -2674,7 +2649,6 @@ cglobal pred4x4_horizontal_down, 3, 3
 ;-----------------------------------------------------------------------------
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 cglobal pred4x4_vertical_right, 3, 3
     sub     r0, r2
     lea     r1, [r0+r2*2]
@@ -2705,7 +2679,6 @@ cglobal pred4x4_vertical_right, 3, 3
 ;-----------------------------------------------------------------------------
 
 INIT_MMX mmxext
-%define PALIGNR PALIGNR_MMX
 cglobal pred4x4_down_right, 3, 3
     sub       r0, r2
     lea       r1, [r0+r2*2]
diff --git a/libavcodec/x86/h264_intrapred_10bit.asm 
b/libavcodec/x86/h264_intrapred_10bit.asm
index b98bf17..56006e3 100644
--- a/libavcodec/x86/h264_intrapred_10bit.asm
+++ b/libavcodec/x86/h264_intrapred_10bit.asm
@@ -79,9 +79,7 @@ cglobal pred4x4_down_right_10, 3, 3
 %endmacro
 
 INIT_XMM sse2
-%define PALIGNR PALIGNR_MMX
 PRED4x4_DR
-%define PALIGNR PALIGNR_SSSE3
 INIT_XMM ssse3
 PRED4x4_DR
 %if HAVE_AVX
@@ -120,9 +118,7 @@ cglobal pred4x4_vertical_right_10, 3, 3, 6
 %endmacro
 
 INIT_XMM sse2
-%define PALIGNR PALIGNR_MMX
 PRED4x4_VR
-%define PALIGNR PALIGNR_SSSE3
 INIT_XMM ssse3
 PRED4x4_VR
 %if HAVE_AVX
@@ -164,9 +160,7 @@ cglobal pred4x4_horizontal_down_10, 3, 3
 %endmacro
 
 INIT_XMM sse2
-%define PALIGNR PALIGNR_MMX
 PRED4x4_HD
-%define PALIGNR PALIGNR_SSSE3
 INIT_XMM ssse3
 PRED4x4_HD
 %if HAVE_AVX
@@ -727,10 +721,8 @@ cglobal pred8x8l_horizontal_10, 4, 4, 5
 %endmacro
 
 INIT_XMM sse2
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_HORIZONTAL
 INIT_XMM ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_HORIZONTAL
 %if HAVE_AVX
 INIT_XMM avx
@@ -797,10 +789,8 @@ cglobal pred8x8l_down_left_10, 4, 4, 7
 %endmacro
 
 INIT_XMM sse2
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_DOWN_LEFT
 INIT_XMM ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_DOWN_LEFT
 %if HAVE_AVX
 INIT_XMM avx
@@ -873,10 +863,8 @@ cglobal pred8x8l_down_right_10, 4, 5, 8
 %endmacro
 
 INIT_XMM sse2
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_DOWN_RIGHT
 INIT_XMM ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_DOWN_RIGHT
 %if HAVE_AVX
 INIT_XMM avx
@@ -945,10 +933,8 @@ cglobal pred8x8l_vertical_right_10, 4, 5, 7
 %endmacro
 
 INIT_XMM sse2
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_VERTICAL_RIGHT
 INIT_XMM ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_VERTICAL_RIGHT
 %if HAVE_AVX
 INIT_XMM avx
@@ -1008,10 +994,8 @@ cglobal pred8x8l_horizontal_up_10, 4, 4, 6
 %endmacro
 
 INIT_XMM sse2
-%define PALIGNR PALIGNR_MMX
 PRED8x8L_HORIZONTAL_UP
 INIT_XMM ssse3
-%define PALIGNR PALIGNR_SSSE3
 PRED8x8L_HORIZONTAL_UP
 %if HAVE_AVX
 INIT_XMM avx
diff --git a/libavcodec/x86/h264_qpel_10bit.asm 
b/libavcodec/x86/h264_qpel_10bit.asm
index 3ad47d1..1420c4a 100644
--- a/libavcodec/x86/h264_qpel_10bit.asm
+++ b/libavcodec/x86/h264_qpel_10bit.asm
@@ -233,25 +233,21 @@ MC00 avg
 ;-----------------------------------------------------------------------------
 %macro MC_CACHE 1
 %define OP_MOV mova
-%define PALIGNR PALIGNR_MMX
 INIT_MMX mmxext
 %1 put, 4
 INIT_XMM sse2, cache64
 %1 put, 8
 INIT_XMM ssse3, cache64
-%define PALIGNR PALIGNR_SSSE3
 %1 put, 8
 INIT_XMM sse2
 %1 put, 8
 
 %define OP_MOV AVG_MOV
-%define PALIGNR PALIGNR_MMX
 INIT_MMX mmxext
 %1 avg, 4
 INIT_XMM sse2, cache64
 %1 avg, 8
 INIT_XMM ssse3, cache64
-%define PALIGNR PALIGNR_SSSE3
 %1 avg, 8
 INIT_XMM sse2
 %1 avg, 8
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
index 27eca3a..fbf677d 100644
--- a/libavutil/x86/x86util.asm
+++ b/libavutil/x86/x86util.asm
@@ -280,7 +280,14 @@
 %endif
 %endmacro
 
-%macro PALIGNR_MMX 4-5 ; [dst,] src1, src2, imm, tmp
+%macro PALIGNR 4-5 ; [dst,] src1, src2, imm, tmp
+%if cpuflag(ssse3)
+%if %0==5
+    palignr %1, %2, %3, %4
+%else
+    palignr %1, %2, %3
+%endif
+%else
     %define %%dst %1
 %if %0==5
 %ifnidn %1, %2
@@ -299,13 +306,6 @@
     psrldq  %4, %3
 %endif
     por     %%dst, %4
-%endmacro
-
-%macro PALIGNR_SSSE3 4-5
-%if %0==5
-    palignr %1, %2, %3, %4
-%else
-    palignr %1, %2, %3
 %endif
 %endmacro
 
diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm
index 2f3305c..d137e6e 100644
--- a/libswscale/x86/output.asm
+++ b/libswscale/x86/output.asm
@@ -246,7 +246,6 @@ cglobal yuv2planeX_%1, %3, 8, %2, filter, fltsize, src, 
dst, w, dither, offset
 %endif ; %1 == 8/9/10/16
 %endmacro
 
-%define PALIGNR PALIGNR_MMX
 %if ARCH_X86_32
 INIT_MMX mmxext
 yuv2planeX_fn  8,  0, 7
@@ -259,7 +258,6 @@ yuv2planeX_fn  8, 10, 7
 yuv2planeX_fn  9,  7, 5
 yuv2planeX_fn 10,  7, 5
 
-%define PALIGNR PALIGNR_SSSE3
 INIT_XMM sse4
 yuv2planeX_fn  8, 10, 7
 yuv2planeX_fn  9,  7, 5
@@ -344,7 +342,7 @@ cglobal yuv2plane1_%1, %3, %3, %2, src, dst, w, dither, 
offset
 %if mmsize == 16
     punpcklqdq      m3, m3
 %endif ; mmsize == 16
-    PALIGNR_MMX     m3, m3, 3, m2
+    PALIGNR         m3, m3, 3, m2
 .no_rot:
 %if mmsize == 8
     mova            m2, m3
-- 
1.7.2.5

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to