[Ffmpeg-devel] (L)GPLed yuv2rgb code

Måns Rullgård mru
Fri Dec 22 16:49:02 CET 2006


Luca Abeni <lucabe72 at email.it> writes:

> Hi all,
>
> so, I disabled the compilation of libswscale under LGPL.
>
> At this point, I do not think there is anything to do: if a table must
> map i in (cy*(((i - YTABLE_MIN)<<16) - oy) + (1<<31))>>32, I can rewrite
> the code 100 times, but I will alway end up writing
> value = (cy*(((i - YTABLE_MIN)<<16) - oy) + (1<<31))>>32;
> or an equivalent expression.
> Idem, if table_b[i] must contain a value shifted right by 3 and then
> shifted left by 11 if bpp=16 or by 10 if bpp=15, I will always end up by
> writing something equivalent to
> value = ytable[i + YTABLE_MIN] >> 3;
> if (!isBGR(c->dstFormat)) {
>     value <<= ((fmt_depth(c->dstFormat) == 16) ? 11 : 10);
> }
> ((uint16_t *)table_b)[i] = value;
>
> So, at this point I think libswscale cannot be LGPLed (I would have
> preferred knowing this from the beginning, before spending too much time
> on this, but...)

It is my understanding that if there is only one way to do something,
this cannot be protected by copyright.  This is where patents enter
the picture, but they are not relevant here.

IANAL, so I could of course be all wrong.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list