[FFmpeg-devel] [PATCH] swscale C code and the GPL

Diego Biurrun diego
Fri Jun 26 01:01:15 CEST 2009


On Thu, Jun 25, 2009 at 10:53:55PM +0200, Michael Niedermayer wrote:
> On Thu, Jun 25, 2009 at 10:06:13PM +0200, Diego Biurrun wrote:
> > On Thu, Jun 25, 2009 at 07:50:15PM +0200, Michael Niedermayer wrote:
> > > On Thu, Jun 25, 2009 at 05:16:59PM +0200, Diego Biurrun wrote:
> > > > Here is a patch that fixes a false dependency of the C code in swscale
> > > > on the GPL.  I'm not 100% sure about the last hunk, the rest should be
> > > > correct.
> > > > 
> > > >  swscale.c |   10 +++++-----
> > > >  1 file changed, 5 insertions(+), 5 deletions(-)
> > > > 063e24e6798072a6a3955b963e820e1dc5583f77  swscale_gpl.diff
> > 
> > Where did this come from, it's not in my patch..
> 
> magic :)

Teach me :)

> > > > @@ -1972,10 +1972,10 @@
> > > >  
> > > >  static SwsFunc getSwsFunc(SwsContext *c)
> > > >  {
> > > > -#if CONFIG_RUNTIME_CPUDETECT && CONFIG_GPL
> > > > +#if CONFIG_RUNTIME_CPUDETECT
> > > >      int flags = c->flags;
> > > >  
> > > > -#if ARCH_X86
> > > > +#if ARCH_X86 && CONFIG_GPL
> > > >      // ordered per speed fastest first
> > > >      if (flags & SWS_CPU_CAPS_MMX2) {
> > > >          sws_init_swScale_MMX2(c);
> > > 
> > > redundant
> > 
> > I beg to differ.  Without the CONFIG_GPL, x86 optimizations would get
> > enabled.
> 
> I really doubt that CONFIG_GPL can be false in a
> #if CONFIG_RUNTIME_CPUDETECT && CONFIG_GPL
> making the second check redundant

I change it from

  #if CONFIG_RUNTIME_CPUDETECT && CONFIG_GPL

to

  #if CONFIG_RUNTIME_CPUDETECT

So the CONFIG_GPL gets moved, not added.

Diego



More information about the ffmpeg-devel mailing list