[FFmpeg-devel] FFmpeg code Attribution

Aaron Boxer boxerab at gmail.com
Wed Mar 23 23:35:20 CET 2016


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.

But, this example alone requires that the attribution to OpenJPEG be
mentioned somewhere, as per the BSD license:



 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *


What we seem to have is: an FFmpeg codec that was copied partially from
OpenJPEG, but
has fewer features than the original: encoding is poor,  as a few have
mentioned.

Back to my original point, what is the reasoning not to just switch to
OpenJPEG?

Of course it is your absolute right to create your own, but it seems like a
waste of precious
open source resources.

Yes, the same logic could be applied to my own project, but it is a little
more complicated in my case.

HTH,
Aaron












> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list