diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-08-16 21:23:53 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-08-17 20:56:06 -0700 |
commit | 38e06c2969184b5b55ec41d0c053b2480ab52846 (patch) | |
tree | 07a9265ab9ef6a92292c016238009dbb8bfdbecd /libavutil | |
parent | 45f861283e307c17df303d37c41bc3b2026d5ad0 (diff) | |
download | ffmpeg-38e06c2969184b5b55ec41d0c053b2480ab52846.tar.gz |
Move clipd macros to x86util.asm.
This allows sharing them between multiple .asm files.
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/x86/x86util.asm | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 5f39107379..7e16c15db2 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -540,3 +540,36 @@ pmaxsw %1, %2 pminsw %1, %3 %endmacro + +%macro PMINSD_MMX 3 ; dst, src, tmp + mova %3, %2 + pcmpgtd %3, %1 + pxor %1, %2 + pand %1, %3 + pxor %1, %2 +%endmacro + +%macro PMAXSD_MMX 3 ; dst, src, tmp + mova %3, %1 + pcmpgtd %3, %2 + pand %1, %3 + pandn %3, %2 + por %1, %3 +%endmacro + +%macro CLIPD_MMX 3-4 ; src/dst, min, max, tmp + PMINSD_MMX %1, %3, %4 + PMAXSD_MMX %1, %2, %4 +%endmacro + +%macro CLIPD_SSE2 3-4 ; src/dst, min (float), max (float), unused + cvtdq2ps %1, %1 + minps %1, %3 + maxps %1, %2 + cvtps2dq %1, %1 +%endmacro + +%macro CLIPD_SSE41 3-4 ; src/dst, min, max, unused + pminsd %1, %3 + pmaxsd %1, %2 +%endmacro |