Commit 3d4e3e56 authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Diego Biurrun
Browse files

Use FFmpeg-specific CPU feature definitions.

taken from a patch by Ronald S. Bultje, rbultje ronald.bitfreak net
Date: Thu, 07 Jun 2007 08:57:46 -0400
Subject: Re: [FFmpeg-devel] [PATCH] Coremake support - ffmpeg_nommx.patch (1/1)
 - ffmpeg-nommx.patch (1/1) - ff-cputest-noavconfig.patch (1/1)

Originally committed as revision 9250 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ac237a2f
......@@ -80,15 +80,15 @@ int mm_support(void)
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 @@ int mm_support(void)
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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment