[FFmpeg-devel] [PATCH] Coremake support - ffmpeg_nommx.patch (1/1) - ffmpeg-nommx.patch (1/1) - ff-cputest-noavconfig.patch (1/1)

Ronald S. Bultje rbultje
Thu Jun 7 14:57:46 CEST 2007


Hi,

In article <20070522090914.GT16391 at MichaelsNB>,
 Michael Niedermayer <michaelni at gmx.at> wrote:

> Hi
> 
> On Tue, May 22, 2007 at 12:59:36AM -0400, Ronald S. Bultje wrote:
> > Hi,
> > 
> > In article <20070521171340.GK16391 at MichaelsNB>,
> >  Michael Niedermayer <michaelni at gmx.at> wrote:
> > > On Mon, May 21, 2007 at 09:40:19AM -0400, Ronald S. Bultje wrote:
> > > > dsptest in tests/ and cputest in lavc/i386/ can't be compiled, since 
> > > > they use internaly API (dsptest is about ten pages of warnings, so 
> > > > nevermind there), cputest is below:
> > > > 
> > > > cputest.c: In function 'mm_support':
> > > > cputest.c:83: error: 'MM_MMX' undeclared (first use in this function)
> > > > cputest.c:83: error: (Each undeclared identifier is reported only once
> > > > cputest.c:83: error: for each function it appears in.)
> > > > cputest.c:85: error: 'MM_MMXEXT' undeclared (first use in this function)
> > > > cputest.c:85: error: 'MM_SSE' undeclared (first use in this function)
> > > > cputest.c:87: error: 'MM_SSE2' undeclared (first use in this function)
> > > > cputest.c:89: error: 'MM_SSE3' undeclared (first use in this function)
> > > > cputest.c:91: error: 'MM_SSSE3' undeclared (first use in this function)
> > > > cputest.c:99: error: 'MM_3DNOW' undeclared (first use in this function)
> > > > cputest.c:101: error: 'MM_3DNOWEXT' undeclared (first use in this 
> > > > function)
> > > 
> > > this should be useing FF_MM_MMX and similar
> > 
> > There's a small problem there, avcodec.h defines those if HAVE_MMX is 
> 
> this is wrong they should always be defined, they are needed to set
> AVCodecContext.dsp_mask

Patch attached to fix it. Now, cputest compiles w/o HAVE_AV_CONFIG_H 
fine.

Ronald
Index: avcodec.h
===================================================================
--- avcodec.h	(revision 9221)
+++ avcodec.h	(working copy)
@@ -1305,17 +1305,15 @@
     unsigned dsp_mask;
 #define FF_MM_FORCE    0x80000000 /* Force usage of selected flags (OR) */
     /* lower 16 bits - CPU features */
-#ifdef HAVE_MMX
 #define FF_MM_MMX      0x0001 /* standard MMX */
 #define FF_MM_3DNOW    0x0004 /* AMD 3DNOW */
 #define FF_MM_MMXEXT   0x0002 /* SSE integer functions or AMD MMX ext */
 #define FF_MM_SSE      0x0008 /* SSE functions */
 #define FF_MM_SSE2     0x0010 /* PIV SSE2 functions */
 #define FF_MM_3DNOWEXT 0x0020 /* AMD 3DNowExt */
-#endif /* HAVE_MMX */
-#ifdef HAVE_IWMMXT
+#define FF_MM_SSE3     0x0040 /* Prescott SSE3 functions */
+#define FF_MM_SSSE3    0x0080 /* Conroe SSSE3 functions */
 #define FF_MM_IWMMXT   0x0100 /* XScale IWMMXT */
-#endif /* HAVE_IWMMXT */
 
     /**
      * bits per sample/pixel from the demuxer (needed for huffyuv).
Index: i386/cputest.c
===================================================================
--- i386/cputest.c	(revision 9221)
+++ i386/cputest.c	(working copy)
@@ -80,15 +80,15 @@
     if(max_std_level >= 1){
         cpuid(1, eax, ebx, ecx, std_caps);
         if (std_caps & (1<<23))
-            rval |= MM_MMX;
+            rval |= FF_MM_MMX;
         if (std_caps & (1<<25))
-            rval |= MM_MMXEXT | MM_SSE;
+            rval |= FF_MM_MMXEXT | FF_MM_SSE;
         if (std_caps & (1<<26))
-            rval |= MM_SSE2;
+            rval |= FF_MM_SSE2;
         if (ecx & 1)
-            rval |= MM_SSE3;
+            rval |= FF_MM_SSE3;
         if (ecx & 0x00000200 )
-            rval |= MM_SSSE3;
+            rval |= FF_MM_SSSE3;
     }
 
     cpuid(0x80000000, max_ext_level, ebx, ecx, edx);
@@ -96,25 +96,25 @@
     if(max_ext_level >= 0x80000001){
         cpuid(0x80000001, eax, ebx, ecx, ext_caps);
         if (ext_caps & (1<<31))
-            rval |= MM_3DNOW;
+            rval |= FF_MM_3DNOW;
         if (ext_caps & (1<<30))
-            rval |= MM_3DNOWEXT;
+            rval |= FF_MM_3DNOWEXT;
         if (ext_caps & (1<<23))
-            rval |= MM_MMX;
+            rval |= FF_MM_MMX;
         if (ext_caps & (1<<22))
-            rval |= MM_MMXEXT;
+            rval |= FF_MM_MMXEXT;
     }
 
 #if 0
     av_log(NULL, AV_LOG_DEBUG, "%s%s%s%s%s%s%s%s\n",
-        (rval&MM_MMX) ? "MMX ":"",
-        (rval&MM_MMXEXT) ? "MMX2 ":"",
-        (rval&MM_SSE) ? "SSE ":"",
-        (rval&MM_SSE2) ? "SSE2 ":"",
-        (rval&MM_SSE3) ? "SSE3 ":"",
-        (rval&MM_SSSE3) ? "SSSE3 ":"",
-        (rval&MM_3DNOW) ? "3DNow ":"",
-        (rval&MM_3DNOWEXT) ? "3DNowExt ":"");
+        (rval&FF_MM_MMX) ? "MMX ":"",
+        (rval&FF_MM_MMXEXT) ? "MMX2 ":"",
+        (rval&FF_MM_SSE) ? "SSE ":"",
+        (rval&FF_MM_SSE2) ? "SSE2 ":"",
+        (rval&FF_MM_SSE3) ? "SSE3 ":"",
+        (rval&FF_MM_SSSE3) ? "SSSE3 ":"",
+        (rval&FF_MM_3DNOW) ? "3DNow ":"",
+        (rval&FF_MM_3DNOWEXT) ? "3DNowExt ":"");
 #endif
     return rval;
 }




More information about the ffmpeg-devel mailing list