[FFmpeg-devel] [PATCH 1/2] opus_pvq: add resynth support and band encoding cost function

Carl Eugen Hoyos ceffmpeg at gmail.com
Fri Apr 14 15:30:28 EEST 2017


2017-04-14 13:11 GMT+02:00 Rostislav Pehlivanov <atomnuker at gmail.com>:
> On 14 April 2017 at 05:50, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>
>> 2017-04-13 9:51 GMT+02:00 Rostislav Pehlivanov <atomnuker at gmail.com>:
>> > On 13 April 2017 at 07:13, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>> >
>> >> 2017-04-13 4:02 GMT+02:00 Rostislav Pehlivanov <atomnuker at gmail.com>:
>> >> > On 12 April 2017 at 23:50, Carl Eugen Hoyos <ceffmpeg at gmail.com>
>> wrote:
>> >> >
>> >> >> 2017-04-13 0:26 GMT+02:00 Rostislav Pehlivanov <atomnuker at gmail.com
>> >:
>> >> >>
>> >> >> > +        /* Undo the sample reorganization going from time
>> >> >> > order to frequency order */
>> >> >> > +        if (B0 > 1)
>> >> >> > +            celt_interleave_hadamard(f->scratch, X,
>> >> >> > N_B >> recombine,
>> >> >> > +                                     B0<<recombine, longblocks);
>> >> >>
>> >> >> Is this the same code as in opus/celt/bands.c?
>> >> >> Who wrote it?
>> >> >
>> >> > This exact line is also on line 1206 of the same file for PVQ
>> decoding .
>> >> > Most of the PVQ encoder is copied from our decoder since they're very
>> >> > similar. This commit just copies more.
>> >>
>> >> > The reason why you can find the same string in libopus is because that
>> >> > decoder was cut down, modified and ported as our native decoder.
>> >>
>> >> Then I suggest you add the missing copyright notices to the decoder
>> >> and the encoder.
>>
>> > There's nothing to do:
>> >> * Copyright (c) 2012 Andrew D'Addesio
>> >> * Copyright (c) 2013-2014 Mozilla Corporation
>> >> * Copyright (c) 2017 Rostislav Pehlivanov <atomnuker at gmail.com>
>> >
>> > Mozilla relicensed the decoder to LGPL when it was ported.
>>
>> Sorry, I don't understand:
>> You write above that FFmpeg's opus decoder is based on libopus,
>> this also explains the similar code I saw (above). libopus is - afaict -
>> copyright Xiph.Org Foundation.
>> I suggested to add this copyright to our codec and your answer
>> is that there is nothing to do but I don't see Xiph mentioned: What
>> am I missing?
>> You then continue that the code was relicensed to LGPL: How is
>> that related to the missing copyright notice?

> Point is, I have used only code from libavcodec/opus_pvq.c from
> the FFmpeg project. I don't have to do anything as all credit has
> been given where due.

I don't understand:
The file opus_pvq.c contains copyright notices from Andrew
D'Addesio and Mozilla. If you have used code from opus_pvq.c,
shouldn't you add these copyright notices to the opus encoder?

> If libavcodec/opus_pvq.c's license header is wrong, it's not and
> wasn't my problem, the code's been in libavcodec for 4 years now.

This is (of course!) true, it is the problem of all FFmpeg developers
(including the two of us who realized it first).

> You'll have to submit a separate patch if you believe that's the case.

Since you explained above who the actual authors of opus_pvq.c are,
I was hoping you would fix the copyright notice: I don't know who
wrote it (but from a very quick look, your analysis that it was written
by the libopus authors is correct and makes sense).
Why don't you want to fix it?

> And I advise you to contact all the authors as well as libav from
> whom this code was merged first.

We know that the avconv developers are violating the
copyright of many people, we fix that in the FFmpeg code as
soon as we are aware of it, there are many examples in gitlog.
I don't see how this case would be different.

> As I see no technical issues not license issues I've pushed the patch.

I am not sure that this was such a good idea (esp. as you have
explained the issue) but fortunately, this the license issues can still
be fixed.

Carl Eugen


More information about the ffmpeg-devel mailing list