aboutsummaryrefslogtreecommitdiff
path: root/lib/ffmpeg/libavcodec/x86/x86util.asm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ffmpeg/libavcodec/x86/x86util.asm')
-rw-r--r--lib/ffmpeg/libavcodec/x86/x86util.asm20
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/ffmpeg/libavcodec/x86/x86util.asm b/lib/ffmpeg/libavcodec/x86/x86util.asm
index 5dd65dca5c..7cabc70b31 100644
--- a/lib/ffmpeg/libavcodec/x86/x86util.asm
+++ b/lib/ffmpeg/libavcodec/x86/x86util.asm
@@ -148,12 +148,30 @@
%endmacro
%macro ABS1_MMX 2 ; a, tmp
+ pxor %2, %2
+ pcmpgtw %2, %1
+ pxor %1, %2
+ psubw %1, %2
+%endmacro
+
+%macro ABS2_MMX 4 ; a, b, tmp0, tmp1
+ pxor %3, %3
+ pxor %4, %4
+ pcmpgtw %3, %1
+ pcmpgtw %4, %2
+ pxor %1, %3
+ pxor %2, %4
+ psubw %1, %3
+ psubw %2, %4
+%endmacro
+
+%macro ABS1_MMX2 2 ; a, tmp
pxor %2, %2
psubw %2, %1
pmaxsw %1, %2
%endmacro
-%macro ABS2_MMX 4 ; a, b, tmp0, tmp1
+%macro ABS2_MMX2 4 ; a, b, tmp0, tmp1
pxor %3, %3
pxor %4, %4
psubw %3, %1