[Ffmpeg-devel] Re: r5954 broke fft on AMD cpus without sse and without mm3dnow.h
Hervé W.
H.O.W.aka.V+ffmpeg
Wed Aug 9 13:41:24 CEST 2006
On 09/08/06, Herv? W. <H.O.W.aka.V+ffmpeg at gmail.com> wrote:
> I think r5954 undid what was fixed in r5570 when this change was made:
I forgot to mention the filename. libavcodec/fft.c
> > #if defined(HAVE_MMX)
> > -#ifdef HAVE_MM3DNOW
> > has_vectors = mm_support() & (MM_3DNOW | MM_3DNOWEXT | MM_SSE | MM_SSE2);
> > -#else
> > - has_vectors = mm_support() & (MM_SSE | MM_SSE2);
> > -#endif
> > #endif
> > #if defined(HAVE_ALTIVEC) && !defined(ALTIVEC_USE_REFERENCE_C_CODE)
> > has_vectors = mm_support() & MM_ALTIVEC;
>
> HAVE_MM3DNOW is the result of a test for the header mm3dnow.h (which
> was introduced in a gcc 4.x.y, I dont know which).
> I didn't see a different solution introduced in the same patch.
Attached is a patch to fix it (again).
-V
-------------- next part --------------
Index: libavcodec/fft.c
===================================================================
--- libavcodec/fft.c (revision 5967)
+++ libavcodec/fft.c (working copy)
@@ -63,7 +63,11 @@
int has_vectors = 0;
#if defined(HAVE_MMX)
+# ifdef HAVE_MM3DNOW
has_vectors = mm_support() & (MM_3DNOW | MM_3DNOWEXT | MM_SSE | MM_SSE2);
+# else
+ has_vectors = mm_support() & (MM_SSE | MM_SSE2);
+# endif
#endif
#if defined(HAVE_ALTIVEC) && !defined(ALTIVEC_USE_REFERENCE_C_CODE)
has_vectors = mm_support() & MM_ALTIVEC;
More information about the ffmpeg-devel
mailing list