[Ffmpeg-devel] (L)GPLed yuv2rgb code
Luca Abeni
lucabe72
Fri Dec 22 16:19:18 CET 2006
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...)
Unless someone proves me wrong again, I'll remove yuv2rgb_init.c from
the subversion repository in few days.
Sorry,
Luca
More information about the ffmpeg-devel
mailing list