[FFmpeg-devel] [PATCH] swscale: Do not misuse HAVE_* flags.

Michael Niedermayer michaelni
Thu Apr 9 19:36:27 CEST 2009


On Thu, Apr 09, 2009 at 06:45:50PM +0200, Diego Biurrun wrote:
> On Sun, Apr 05, 2009 at 11:11:07PM +0200, Michael Niedermayer wrote:
> > On Sun, Apr 05, 2009 at 06:00:19PM -0300, Ramiro Polla wrote:
> > > Hi,
> > > 
> > > On Sun, Apr 5, 2009 at 5:51 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > > > On Sun, Apr 05, 2009 at 05:28:21PM -0300, Ramiro Polla wrote:
> > > >> On Sun, Apr 5, 2009 at 5:14 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > > >> > On Sun, Apr 05, 2009 at 02:14:15PM -0300, Ramiro Polla wrote:
> > > >> >> swscale: Do not misuse HAVE_* flags.
> > > >> >> Rename COMPILE_* to SWSCALE_COMPILE_*.
> > > >> >> Rename wrong uses of HAVE_* to COMPILE_*.
> > > >> >
> > > >> > [...]
> > > >> >> @@ -1594,7 +1592,7 @@ error:
> > > >> >> ? ? ?return ret;
> > > >> >> ?}
> > > >> >>
> > > >> >> -#if COMPILE_MMX2
> > > >> >> +#if SWSCALE_COMPILE_MMX2
> > > >> >> ?static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode, int16_t *filter, int32_t *filterPos, int numSplits)
> > > >> >> ?{
> > > >> >> ? ? ?uint8_t *fragmentA;
> > > >> >
> > > >> > this should be HAVE_MMX2 when HAVE* are not changed
> > > >>
> > > >> SWSCALE_COMPILE_MMX2 is HAVE_MMX2 && CONFIG_GPL. If CONFIG_GPL is not
> > > >> set, we shouldn't be compiling this. Besides, using SWSCALE_COMPILE_*
> > > >> makes it consistent with the rest of the file.
> > > >>
> > > >> Or am I missing something?
> > > >
> > > > #if CONFIG_GPL
> > > > # ? undef HAVE_MMX
> > > > ...
> > > > #endif
> > > 
> > > I don't think it's a good idea to fiddle around with HAVE_* flags, and
> > > this patch removes code that currently does it. Also if/when people
> > > start rewriting parts of the GPL code, we will end up with some GPL
> > > and some LGPL code. Keeping the HAVE_ flags intact is better to decide
> > > what to build.
> > 
> > iam currently maintainer of swscale and i prefer not to make
> > the #ifdeffery worse than what it already is.
> 
> May I protest?  IMO we should take every possible precaution to avoid
> compiling GPL code into LGPL builds by accident.

yes, undefing MMX/MMX2 should achive that

[..]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090409/9c27b5dd/attachment.pgp>



More information about the ffmpeg-devel mailing list