[FFmpeg-devel] FFmpeg code Attribution

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Mar 24 05:44:42 CET 2016


On Wed, Mar 23, 2016 at 06:35:20PM -0400, Aaron Boxer wrote:
> On Wed, Mar 23, 2016 at 3:59 PM, Michael Bradshaw <mjbshaw at gmail.com> wrote:
> 
> > On Wed, Mar 23, 2016 at 12:24 PM, Aaron Boxer <boxerab at gmail.com> wrote:
> > > Hello Again,
> > >
> > > I took a look at the FFmpeg j2k code. Now, I've worked with OpenJPEG for
> > > many years, and I would say at least 20% of the code in FFmpeg was either
> > > directly copied from OpenJPEG, or is very similar to OpenJPEG code.
> > >
> > > I think the people who did the work on the FFmpeg codec would readily
> > admit
> > > that they copied a certain amount directly from the other project.
> > >
> > > So, I think that the OpenJPEG BSD license should appear on those files
> > with
> > > copied code from OpenJPEG, to comply with the BSD license. I can list
> > some
> > > of the files (there aren't many) if people are interested.
> >
> > Go ahead and list the files and sections of code you're concerned
> > about (or the commits that introduced the code). Chances are that's
> > going to come up in the thread anyway, so might as well do it from the
> > get-go.
> >
> 
> Here is the most obvious example:
> 
> j2kenc.c (from FFmpeg)
> 
> static int getnmsedec_sig(int x, int bpno)
> {
>     if (bpno > NMSEDEC_FRACBITS)
>         return lut_nmsedec_sig[(x >> (bpno - NMSEDEC_FRACBITS)) & ((1 <<
> NMSEDEC_BITS) - 1)];
>     return lut_nmsedec_sig0[x & ((1 << NMSEDEC_BITS) - 1)];
> }
> 
> static int getnmsedec_ref(int x, int bpno)
> {
>     if (bpno > NMSEDEC_FRACBITS)
>         return lut_nmsedec_ref[(x >> (bpno - NMSEDEC_FRACBITS)) & ((1 <<
> NMSEDEC_BITS) - 1)];
>     return lut_nmsedec_ref0[x & ((1 << NMSEDEC_BITS) - 1)];
> }
> 
> //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
> 
> t1.c (from OpenJPEG)
> 
> int16_t opj_t1_getnmsedec_sig(uint32_t x, uint32_t bitpos)
> {
>     if (bitpos > 0) {
>         return lut_nmsedec_sig[(x >> (bitpos)) & ((1 << T1_NMSEDEC_BITS) -
> 1)];
>     }
> 
>     return lut_nmsedec_sig0[x & ((1 << T1_NMSEDEC_BITS) - 1)];
> }
> 
> int16_t opj_t1_getnmsedec_ref(uint32_t x, uint32_t bitpos)
> {
>     if (bitpos > 0) {
>         return lut_nmsedec_ref[(x >> (bitpos)) & ((1 << T1_NMSEDEC_BITS) -
> 1)];
>     }
> 
>     return lut_nmsedec_ref0[x & ((1 << T1_NMSEDEC_BITS) - 1)];
> }
> 
> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Hmm..
Looks a lot more convincing if comparing against the 2007 version
of OpenJPEG, which also then gives a more precise attribution
list to use:
http://ghostscript.com/~tor/gs-browse/gs/openjpeg/libopenjpeg/t1.c


More information about the ffmpeg-devel mailing list