aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/x86/yadif-16.asm
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-06-15 01:05:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-15 13:19:27 +0200
commit91076128185e96725af18e1b532c6060e7f0c150 (patch)
tree066a5bfac549b5b6d7e90358593e18041282b232 /libavfilter/x86/yadif-16.asm
parent2a1158ff3b29461f944ee358963105de4d98d63c (diff)
downloadffmpeg-91076128185e96725af18e1b532c6060e7f0c150.tar.gz
x86util: add and use RSHIFT/LSHIFT macros
Those macros take a byte number as shift argument, as this argument differs between MMX and SSE2 instructions. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/x86/yadif-16.asm')
-rw-r--r--libavfilter/x86/yadif-16.asm38
1 files changed, 4 insertions, 34 deletions
diff --git a/libavfilter/x86/yadif-16.asm b/libavfilter/x86/yadif-16.asm
index d6dcd3a403..a65da8902e 100644
--- a/libavfilter/x86/yadif-16.asm
+++ b/libavfilter/x86/yadif-16.asm
@@ -33,22 +33,6 @@ pd_8000: times 4 dd 0x8000
SECTION .text
-%macro PIXSHIFT1 1
-%if cpuflag(sse2)
- psrldq %1, 2
-%else
- psrlq %1, 16
-%endif
-%endmacro
-
-%macro PIXSHIFT2 1
-%if cpuflag(sse2)
- psrldq %1, 4
-%else
- psrlq %1, 32
-%endif
-%endmacro
-
%macro PABS 2
%if cpuflag(ssse3)
pabsd %1, %1
@@ -112,11 +96,7 @@ SECTION .text
pavgw m5, m3
pand m4, [pw_1]
psubusw m5, m4
-%if mmsize == 16
- psrldq m5, 2
-%else
- psrlq m5, 16
-%endif
+ RSHIFT m5, 2
punpcklwd m5, m7
mova m4, m2
psubusw m2, m3
@@ -124,13 +104,8 @@ SECTION .text
PMAXUW m2, m3
mova m3, m2
mova m4, m2
-%if mmsize == 16
- psrldq m3, 2
- psrldq m4, 4
-%else
- psrlq m3, 16
- psrlq m4, 32
-%endif
+ RSHIFT m3, 2
+ RSHIFT m4, 4
punpcklwd m2, m7
punpcklwd m3, m7
punpcklwd m4, m7
@@ -234,13 +209,8 @@ SECTION .text
psubusw m2, m3
psubusw m3, m4
PMAXUW m2, m3
-%if mmsize == 16
mova m3, m2
- psrldq m3, 4
-%else
- mova m3, m2
- psrlq m3, 32
-%endif
+ RSHIFT m3, 4
punpcklwd m2, m7
punpcklwd m3, m7
paddd m0, m2