[Ffmpeg-devel] (L)GPLed yuv2rgb code

Michel Lespinasse walken
Fri Dec 22 10:30:20 CET 2006


On Fri, Dec 15, 2006 at 04:05:27PM +0100, Luca Abeni wrote:
> Ok; I hope I addressed all the issues. The new version of the is
> attached; I post it again so that everyone can have a look, and someone
> expert in legal stuff can say if this is still derived work, or it can
> be licensed under LGPL (I think I rewrote all the parts that are not by
> Michael, but IANAL, so...).
> 
> If so, I'll add the LGPL license header (with "Copyright (C) 2001-2006
> Michael Niedermayer" and "Copyright (C) 2006 Luca Abeni").

FYI, the code you attached (quoted below) looks very much like stuff
I wrote around 1998/1999 under a GPL licence and which can be currently\
found on the videolan svn server at
https://trac.videolan.org/libmpeg2/browser/trunk/mpeg2dec-livid/libvo/yuv2rgb.c?rev=70

sure, a small number of variables have been renamed such as
table_Y -> ytable... but is this seriously what you would call
'not a derived version' ?

Please keep this code under the GPL. Thanks.

>             *table_r = table + 198 * entry_size;
>             *table_b = table + (198 + 452 + 133 + 387 + 233) * entry_size;
>             *table_g = table + (198 + 452 + 133) * entry_size;
>
>     crv = inv_table[0];
>     cbu = inv_table[1];
>     cgu = inv_table[2];
>     cgv = inv_table[3];
>
>             for (i = -198; i < 256 + 197; i++) {
>                 value = ytable[i + YTABLE_MIN] >> 3;
>                 if (isBGR(c->dstFormat)) {
>                     value <<= ((fmt_depth(c->dstFormat) == 16) ? 11 : 10);
>                 }
>                 ((uint16_t *)table_r)[i] = value;
>             }
>             for (i = -133; i < 256 + 132; i++) {
>                 value = ytable[i + YTABLE_MIN];
>                 value >>= ((fmt_depth(c->dstFormat) == 16) ? 2 : 3);
>                 ((uint16_t *)table_g)[i] = value << 5;
>             }
>             for (i = -233; i < 256 + 232; i++) {
>                 value = ytable[i + YTABLE_MIN] >> 3;
>                 if (!isBGR(c->dstFormat)) {
>                     value <<= ((fmt_depth(c->dstFormat) == 16) ? 11 : 10);
>                 }
>                 ((uint16_t *)table_b)[i] = value;
>             }
>             break;
>
>     for (i = 0; i < 256; i++) {
>         c->table_rV[i] = table_r +
>                          entry_size * ROUNDED_DIV(crv * (i - 128), 76309);
>         c->table_gU[i] = table_g +
>                          entry_size * ROUNDED_DIV(cgu * (i - 128), 76309);
>         c->table_gV[i] = entry_size * ROUNDED_DIV(cgv * (i - 128), 76309);
>         c->table_bU[i] = table_b +
>                          entry_size * ROUNDED_DIV(cbu * (i - 128), 76309);
>     }

-- 
Michel "Walken" Lespinasse
"Bill Gates is a monocle and a Persian cat away from being the villain
in a James Bond movie." -- Dennis Miller




More information about the ffmpeg-devel mailing list