summaryrefslogtreecommitdiff
path: root/libavutil/x86
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-05 22:36:05 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-05 22:36:05 +0100
commite859339e7af52210c6fe84a8e6412f0c30d1c4da (patch)
treefdbafa085fef7b4de237574f072aca9fbefe6cc5 /libavutil/x86
parentf0615557e03518b2fdc6d036ba29031a90646011 (diff)
parent930e26a3ea9d223e04bac4cdde13697cec770031 (diff)
Merge commit '930e26a3ea9d223e04bac4cdde13697cec770031'
* commit '930e26a3ea9d223e04bac4cdde13697cec770031': x86: h264qpel: Only define mmxext QPEL functions if H264QPEL is enabled x86: PABSW: port to cpuflags x86: vc1dsp: port to cpuflags rtmp: Use av_strlcat instead of strncat Conflicts: libavcodec/x86/h264_qpel.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/x86')
-rw-r--r--libavutil/x86/x86util.asm22
1 files changed, 10 insertions, 12 deletions
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
index df2ceccdce..02edd70e4f 100644
--- a/libavutil/x86/x86util.asm
+++ b/libavutil/x86/x86util.asm
@@ -145,13 +145,21 @@
%endif
%endmacro
-; PABSW macros assume %1 != %2, while ABS1/2 macros work in-place
-%macro PABSW_MMX 2
+; PABSW macro assumes %1 != %2, while ABS1/2 macros work in-place
+%macro PABSW 2
+%if cpuflag(ssse3)
+ pabsw %1, %2
+%elif cpuflag(mmxext)
+ pxor %1, %1
+ psubw %1, %2
+ pmaxsw %1, %2
+%else
pxor %1, %1
pcmpgtw %1, %2
pxor %2, %1
psubw %2, %1
SWAP %1, %2
+%endif
%endmacro
%macro PSIGNW_MMX 2
@@ -159,16 +167,6 @@
psubw %1, %2
%endmacro
-%macro PABSW_MMXEXT 2
- pxor %1, %1
- psubw %1, %2
- pmaxsw %1, %2
-%endmacro
-
-%macro PABSW_SSSE3 2
- pabsw %1, %2
-%endmacro
-
%macro PSIGNW_SSSE3 2
psignw %1, %2
%endmacro