diff options
author | Diego Biurrun <diego@biurrun.de> | 2012-07-15 17:59:26 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-11-05 14:51:10 +0100 |
commit | dbb37e77117466edfc146f9f0df4c70bef6239d6 (patch) | |
tree | 070f9fe54543fcfeb415b2ba484e4e85e1e0ac47 /libavutil/x86 | |
parent | 6c104826bd6e46ff5a02a3f1dcbd6e0b6bf8743a (diff) | |
download | ffmpeg-dbb37e77117466edfc146f9f0df4c70bef6239d6.tar.gz |
x86: PABSW: port to cpuflags
Diffstat (limited to 'libavutil/x86')
-rw-r--r-- | libavutil/x86/x86util.asm | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 9183d38595..b35d5945d8 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 |