[FFmpeg-cvslog] x86: PMINUB: port to cpuflags

Diego Biurrun git at videolan.org
Sat Nov 3 14:18:22 CET 2012


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Sun Jul 15 17:43:50 2012 +0200| [26f01bd106f62ffe501a9baf609c476051d919da] | committer: Diego Biurrun

x86: PMINUB: port to cpuflags

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

 libavcodec/x86/ac3dsp.asm |    3 ---
 libavutil/x86/x86util.asm |   10 +++++-----
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm
index 9d66fda..2c453c5 100644
--- a/libavcodec/x86/ac3dsp.asm
+++ b/libavcodec/x86/ac3dsp.asm
@@ -63,12 +63,10 @@ cglobal ac3_exponent_min, 3, 4, 2, exp, reuse_blks, expn, offset
     REP_RET
 %endmacro
 
-%define PMINUB PMINUB_MMX
 %define LOOP_ALIGN
 INIT_MMX mmx
 AC3_EXPONENT_MIN
 %if HAVE_MMXEXT
-%define PMINUB PMINUB_MMXEXT
 %define LOOP_ALIGN ALIGN 16
 INIT_MMX mmxext
 AC3_EXPONENT_MIN
@@ -77,7 +75,6 @@ AC3_EXPONENT_MIN
 INIT_XMM sse2
 AC3_EXPONENT_MIN
 %endif
-%undef PMINUB
 %undef LOOP_ALIGN
 
 ;-----------------------------------------------------------------------------
diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm
index 761cea0..ca0041a 100644
--- a/libavutil/x86/x86util.asm
+++ b/libavutil/x86/x86util.asm
@@ -530,14 +530,14 @@
     movh  [%7+%8], %4
 %endmacro
 
-%macro PMINUB_MMX 3 ; dst, src, tmp
+%macro PMINUB 3 ; dst, src, ignored
+%if cpuflag(mmxext)
+    pminub   %1, %2
+%else ; dst, src, tmp
     mova     %3, %1
     psubusb  %3, %2
     psubb    %1, %3
-%endmacro
-
-%macro PMINUB_MMXEXT 3 ; dst, src, ignored
-    pminub   %1, %2
+%endif
 %endmacro
 
 %macro SPLATW 2-3 0



More information about the ffmpeg-cvslog mailing list