[FFmpeg-cvslog] Move clipd macros to x86util.asm.

Ronald S. Bultje git at videolan.org
Thu Aug 18 11:48:06 CEST 2011


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Tue Aug 16 21:23:53 2011 -0700| [38e06c2969184b5b55ec41d0c053b2480ab52846] | committer: Ronald S. Bultje

Move clipd macros to x86util.asm.

This allows sharing them between multiple .asm files.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38e06c2969184b5b55ec41d0c053b2480ab52846
---

 libavcodec/x86/dsputil_yasm.asm |   34 +---------------------------------
 libavutil/x86/x86util.asm       |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/libavcodec/x86/dsputil_yasm.asm b/libavcodec/x86/dsputil_yasm.asm
index 4e1ec24..2a21084 100644
--- a/libavcodec/x86/dsputil_yasm.asm
+++ b/libavcodec/x86/dsputil_yasm.asm
@@ -20,6 +20,7 @@
 ;******************************************************************************
 
 %include "x86inc.asm"
+%include "x86util.asm"
 
 SECTION_RODATA
 pb_f: times 16 db 15
@@ -1054,39 +1055,6 @@ emu_edge mmx
 ;                           int32_t max, unsigned int len)
 ;-----------------------------------------------------------------------------
 
-%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
-
 %macro SPLATD_MMX 1
     punpckldq  %1, %1
 %endmacro
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
index 5f39107..7e16c15 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



More information about the ffmpeg-cvslog mailing list