[Ffmpeg-devel] moving non-SIMD parts of libswscale to LGPL
Mon Dec 4 13:31:19 CET 2006
On Mon, Dec 04, 2006 at 11:53:07AM +0100, Luca Abeni wrote:
> Anyway, I had to copy all the "197 + 2*682 + 256 + 132", "256 + 2 *
> 232", and similar values from the original version. So I do not know if
> my rewriting is derived work or not...
117579*255/76309 = 392.91... = /2 = 196.455...
138453*255/76309 = 462.665...= /2 = 231.33...
(25675+53279)*255/76309 = 263.83... = /2 = 131.91...
256 + 2 *232 = y range + max chroma table range
393+463+264+256*3 = 1888
197 + 2*682 + 256 + 132 = 1949
so it seems this table is larger then needed ...
i suggest that you simply check which index in the table the max/min yuv
values would reach and then use that to allocate the table and set the index
of each "subtable"
> > > Finally, I do not understand how the values in the dither_* tables are
> > > computed.
> > i _think_ i wrote them (i definitly wrote some, dunno if i wrote all)
> > if so they are under LGPL and you can use them
> > they are bayer ordered dither matrixes with some manual changes by me to
> > improve the subjective quality
> Ok. So, if I get it right such tables are either written by you or taken
> >from a paper by Bayer... Can they be reused in LGPLed code? (I would say
> yes, because they are by you or from a previous - non GPLed - work. But
> IANAL, so I am asking :)
the ones i wrote yes, if there are any i did not write then it depends on
the tables and their source, use svn-log
> 3) The values in Inverse_Table_6_9 have been quickly computed based on
> the tables sent by Michael - I inverted the rgb ---> yuv matrix with
> octave. I do not know if octave somehow truncated / approximated some
> results. If needed, I can redo the computation with a higher accuracy
i suggest you calculate the exact matrix (iam assuming that the values in
the spec are exact), if octave cant then use pencil and paper or write a
1 page program which uses AVRational to do the calculation
(this of course can be done later after swscale is default ...)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel