[Ffmpeg-devel] Compilation broken in last 24 hours due to 3DNow changes

Guillaume POIRIER poirierg
Tue May 16 08:17:21 CEST 2006


Hi,

On 5/16/06, Diamond Software <diamondsw at mac.com> wrote:
> Sorry, I'm still getting 3DNow as "yes" from configure, even with CVS
> pulled a few minutes ago:

This is normal: FFmpeg compiles all that it can compile, but only
selects supported optimized routines at runtime.

Please try the attached patch. I believe it's finally the right fix,
though there is some room for improvement as this will restrict
intrinsincs to 3dnowext cpu...

TODO: test 3dnow and 3dnowext separately.

Guillaume
-- 
An Israeli man's life was saved when he was given a Palestinian man's
heart in a heart transplant operation. The guy is doing fine, but the
bad news is, he can't stop throwing rocks at himself.
  -- Jay Leno
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v
retrieving revision 1.271
diff -u -r1.271 configure
--- configure	15 May 2006 19:53:55 -0000	1.271
+++ configure	16 May 2006 06:12:27 -0000
@@ -1110,13 +1110,19 @@
 cat > $TMPC << EOF
 #include <mm3dnow.h>
 int main(void) {
+__m64 b1;
+b1 = _m_pswapd(b1);
 _m_femms();
 return 0;
 }
 EOF
 
 mm3dnow=no
-if $cc -m3dnow -o $TMPO $TMPC 2> /dev/null ; then
+march=athlon
+if test "$cpu" = "x86_64"; then
+  march=k8
+fi
+if $cc -march=$march -o $TMPO $TMPC 2> /dev/null ; then
   mm3dnow=yes
 fi
 
Index: libavcodec/Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v
retrieving revision 1.261
diff -u -r1.261 Makefile
--- libavcodec/Makefile	14 May 2006 22:00:03 -0000	1.261
+++ libavcodec/Makefile	16 May 2006 06:12:27 -0000
@@ -350,7 +350,12 @@
 endif
 ifdef TARGET_BUILTIN_3DNOW
 i386/fft_3dn.o: CFLAGS+= -m3dnow
-i386/fft_3dn2.o: CFLAGS+= -m3dnow
+ifeq ($(TARGET_ARCH_X86),yes)
+i386/fft_3dn2.o: CFLAGS+= -march=athlon
+endif
+ifeq ($(TARGET_ARCH_X86_64),yes)
+i386/fft_3dn2.o: CFLAGS+= -march=k8
+endif
 endif
 endif
 




More information about the ffmpeg-devel mailing list