[FFmpeg-devel] [PATCH] Compile libswscale without MMX, MMX2 and 3DNOW code

Michael Niedermayer michaelni
Sun Jun 10 14:25:30 CEST 2007


Hi

On Sun, Jun 10, 2007 at 12:29:13PM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > Hi
> >
> > On Sun, Jun 10, 2007 at 09:50:15AM +0100, M?ns Rullg?rd wrote:
> >> Michael Niedermayer <michaelni at gmx.at> writes:
> >> 
> >> > Hi
> >> >
> >> > On Sun, Jun 10, 2007 at 12:48:46AM +0200, Carl Eugen Hoyos wrote:
> >> >> Hi!
> >> >> 
> >> >> Currently, libswscale is always compiled with MMX, MMX2 and 3DNOW
> >> >> support, even when they where deactivated during configure.
> >> >> 
> >> >> Attached patch tries to fix this by using COMPILE_MMX etc. as does
> >> >> libpostproc.
> >> >> 
> >> >> Please comment, Carl Eugen
> >> >
> >> > if we do want COMPILE_* defines they should mabybe be set at a
> >> > more central
> >> 
> >> What's wrong with HAVE_MMX and friends?  They are set by configure if
> >> the toolchain can build mmx code.
> >
> > the problem is code like
> >
> > #define HAVE_MMX
> > #undef HAVE_MMX2
> > ...
> > #include "foobar_template.h"
> >
> > #define HAVE_MMX
> > #define HAVE_MMX2
> > ...
> > #include "foobar_template.h"
> >
> > this cant be just put under #ifdef HAVE_MMX2 ...
> 
> Such code is conflicting with the intention of the HAVE_* macros.
> Temporary macros used with multiple inclusion of templates like this
> should use some other name.

the problem with this is RUNTIME_CPUDETECT
if RUNTIME_CPUDETECT where always true then it would work fine with
different names than HAVE_MMX* but
if its false then only a single version should be compiled, one matching
the current set of HAVE_ ...


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070610/10647a68/attachment.pgp>



More information about the ffmpeg-devel mailing list