diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-15 15:23:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-15 15:23:20 +0100 |
commit | cfc40a6aff8d35627469ef960531264c2f66a74e (patch) | |
tree | 8b153d939fe63d808438c444b464be66c81c4ae2 /libavutil/x86/x86util.asm | |
parent | 24d06cb2089fbe74912e82d613b8c166be1386a8 (diff) | |
parent | d8c772de53d29afb1bada88afa859fce8489c668 (diff) | |
download | ffmpeg-cfc40a6aff8d35627469ef960531264c2f66a74e.tar.gz |
Merge commit 'd8c772de53d29afb1bada88afa859fce8489c668'
* commit 'd8c772de53d29afb1bada88afa859fce8489c668':
nutdec: Always return a value from nut_read_timestamp()
configure: Make warnings from -Wreturn-type fatal errors
x86: ABS2: port to cpuflags
vdpau: Remove av_unused attribute from function declaration
h264: fix ff_generate_sliding_window_mmcos() prototype.
Conflicts:
configure
libavformat/nutdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/x86/x86util.asm')
-rw-r--r-- | libavutil/x86/x86util.asm | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 2cc8470d21..6768dec595 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -187,7 +187,18 @@ %endif %endmacro -%macro ABS2_MMX 4 ; a, b, tmp0, tmp1 +%macro ABS2 4 +%if cpuflag(ssse3) + pabsw %1, %1 + pabsw %2, %2 +%elif cpuflag(mmxext) ; a, b, tmp0, tmp1 + pxor %3, %3 + pxor %4, %4 + psubw %3, %1 + psubw %4, %2 + pmaxsw %1, %3 + pmaxsw %2, %4 +%else ; a, b, tmp0, tmp1 pxor %3, %3 pxor %4, %4 pcmpgtw %3, %1 @@ -196,20 +207,7 @@ pxor %2, %4 psubw %1, %3 psubw %2, %4 -%endmacro - -%macro ABS2_MMXEXT 4 ; a, b, tmp0, tmp1 - pxor %3, %3 - pxor %4, %4 - psubw %3, %1 - psubw %4, %2 - pmaxsw %1, %3 - pmaxsw %2, %4 -%endmacro - -%macro ABS2_SSSE3 4 - pabsw %1, %1 - pabsw %2, %2 +%endif %endmacro %macro ABSB_MMX 2 @@ -252,7 +250,6 @@ ABS2 %3, %4, %5, %6 %endmacro -%define ABS2 ABS2_MMX %define ABSB ABSB_MMX %define ABSB2 ABSB2_MMX |