[FFmpeg-devel] FFmpeg code Attribution
Alex Beregszaszi
alex at rtfs.hu
Thu Mar 24 13:23:06 CET 2016
On Wed, Mar 23, 2016 at 10:35 PM, Aaron Boxer <boxerab at gmail.com> 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)];
> }
>
>
> ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
>
> I will post more later.
>
Not having seen the specification I do have a question: Is it possible this
code piece is in the spec? Many specs contain sample code or a description
leading to very similar implementations.
I think this is important to double check and try to stay not biased.
Best,
Alex
More information about the ffmpeg-devel
mailing list