Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2017-01-21 Thread Michael Niedermayer
On Sat, Sep 03, 2016 at 03:45:17PM -0700, Jonathan Campbell wrote: > On 09/03/2016 07:07 AM, James Almer wrote: > > On 9/3/2016 7:50 AM, Jonathan Campbell wrote: > >> +int av_lfg_init_from_data(AVLFG *c, const uint8_t *data, unsigned int > >> length) { > >> +unsigned int beg, end, segm; > >> +

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-03 Thread Jonathan Campbell
On 09/03/2016 07:07 AM, James Almer wrote: > On 9/3/2016 7:50 AM, Jonathan Campbell wrote: >> +int av_lfg_init_from_data(AVLFG *c, const uint8_t *data, unsigned int >> length) { >> +unsigned int beg, end, segm; >> +const AVCRC *avcrc; >> +uint32_t crc = 1; >> + >> +c->index = 0; >

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-03 Thread Jonathan Campbell
On 09/03/2016 01:32 PM, Rostislav Pehlivanov wrote: > On 2 September 2016 at 02:59, Jonathan Campbell < > jonat...@impactstudiopro.com> wrote: > >> I finished the consistent noise generation patch for AC-3 decoding. >> >> Set AVOption "cons_noisegen" to 1 (true) to enable it. >> >> Git repository:

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-03 Thread Carl Eugen Hoyos
Hi! 2016-09-03 18:27 GMT+02:00 Jonathan Campbell : > Do you understand now why this is useful for NLE software, Of course. > but should not be enabled by default? Only if I completely underestimate the additional cpu usage. Thank you, Carl Eugen ___

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-03 Thread James Almer
On 9/3/2016 11:07 AM, James Almer wrote: >> > + >> > +/* avoid integer overflow in the loop below. */ >> > +if (length > (UINT_MAX / 128U)) return AVERROR(EINVAL); >> > + >> > +/* across 64 segments of the incoming data, >> > + * do a running crc of each segment and store the crc as

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-03 Thread Rostislav Pehlivanov
On 2 September 2016 at 02:59, Jonathan Campbell < jonat...@impactstudiopro.com> wrote: > I finished the consistent noise generation patch for AC-3 decoding. > > Set AVOption "cons_noisegen" to 1 (true) to enable it. > > Git repository: > https://github.com/joncampbell123/FFmpeg.git > > commit dbd0

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-03 Thread Jonathan Campbell
On 09/03/2016 04:09 AM, Carl Eugen Hoyos wrote: > Hi! > > 2016-09-03 12:50 GMT+02:00 Jonathan Campbell : > >> Here you go (as attachments). > > The changes to lfg and the version bump must be one patch. > >> +{ "cons_noisegen", "enable consistent noise generation", >> OFFSET(consistent_noi

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-03 Thread James Almer
On 9/3/2016 7:50 AM, Jonathan Campbell wrote: > +int av_lfg_init_from_data(AVLFG *c, const uint8_t *data, unsigned int > length) { > +unsigned int beg, end, segm; > +const AVCRC *avcrc; > +uint32_t crc = 1; > + > +c->index = 0; The AVLFG struct should IMO remain untouched if init

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-03 Thread James Almer
On 9/3/2016 8:09 AM, Carl Eugen Hoyos wrote: > The changes to lfg and the version bump must be one patch. They will be squashed. See https://ffmpeg.org/pipermail/ffmpeg-devel/2016-August/198446.html https://ffmpeg.org/pipermail/ffmpeg-devel/2016-August/198448.html https://ffmpeg.org/pipermail/ffm

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-03 Thread Carl Eugen Hoyos
Hi! 2016-09-03 12:50 GMT+02:00 Jonathan Campbell : > Here you go (as attachments). The changes to lfg and the version bump must be one patch. > +{ "cons_noisegen", "enable consistent noise generation", > OFFSET(consistent_noise_generation), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, PAR > }, I

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-03 Thread Jonathan Campbell
On 09/02/2016 05:35 PM, Michael Niedermayer wrote: > On Fri, Sep 02, 2016 at 05:31:35PM -0700, Jonathan Campbell wrote: >>> should be in a different patch >>> also needs minor version bump and APIChanges update >>> >>> also please generate patches with git format-patch or git send-email >>> see the

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread James Almer
On 9/2/2016 9:31 PM, Jonathan Campbell wrote: >> should be in a different patch >> also needs minor version bump and APIChanges update >> >> also please generate patches with git format-patch or git send-email >> see the respective man pages >> (otherwise they woul be lacking commit messages) >> >>

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Michael Niedermayer
On Fri, Sep 02, 2016 at 05:31:35PM -0700, Jonathan Campbell wrote: > >should be in a different patch > >also needs minor version bump and APIChanges update > > > >also please generate patches with git format-patch or git send-email > >see the respective man pages > >(otherwise they woul be lacking

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread James Almer
On 9/2/2016 8:49 PM, Jonathan Campbell wrote: > diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c > index fac189b..18a674b 100644 > --- a/libavcodec/ac3dec.c > +++ b/libavcodec/ac3dec.c > @@ -1419,6 +1419,13 @@ static int ac3_decode_frame(AVCodecContext * avctx, > void *data, >

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Jonathan Campbell
should be in a different patch also needs minor version bump and APIChanges update also please generate patches with git format-patch or git send-email see the respective man pages (otherwise they woul be lacking commit messages) thx [...] ___ ffmp

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Michael Niedermayer
On Fri, Sep 02, 2016 at 04:49:54PM -0700, Jonathan Campbell wrote: > > On 09/02/2016 04:37 PM, Michael Niedermayer wrote: > >On Fri, Sep 02, 2016 at 04:05:44PM -0700, Jonathan Campbell wrote: > >>On 09/02/2016 01:56 PM, Michael Niedermayer wrote: > >>>On Fri, Sep 02, 2016 at 01:13:33PM -0700, Jona

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Jonathan Campbell
On 09/02/2016 04:37 PM, Michael Niedermayer wrote: On Fri, Sep 02, 2016 at 04:05:44PM -0700, Jonathan Campbell wrote: On 09/02/2016 01:56 PM, Michael Niedermayer wrote: On Fri, Sep 02, 2016 at 01:13:33PM -0700, Jonathan Campbell wrote: On 09/02/2016 01:01 PM, Michael Niedermayer wrote: On Fr

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Michael Niedermayer
On Fri, Sep 02, 2016 at 04:05:44PM -0700, Jonathan Campbell wrote: > > On 09/02/2016 01:56 PM, Michael Niedermayer wrote: > >On Fri, Sep 02, 2016 at 01:13:33PM -0700, Jonathan Campbell wrote: > >>On 09/02/2016 01:01 PM, Michael Niedermayer wrote: > >>>On Fri, Sep 02, 2016 at 10:19:23AM -0700, Jona

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Jonathan Campbell
On 09/02/2016 01:56 PM, Michael Niedermayer wrote: On Fri, Sep 02, 2016 at 01:13:33PM -0700, Jonathan Campbell wrote: On 09/02/2016 01:01 PM, Michael Niedermayer wrote: On Fri, Sep 02, 2016 at 10:19:23AM -0700, Jonathan Campbell wrote: [...] CRC computation isn't fast enough? What should I us

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Michael Niedermayer
On Fri, Sep 02, 2016 at 01:13:33PM -0700, Jonathan Campbell wrote: > > On 09/02/2016 01:01 PM, Michael Niedermayer wrote: > >On Fri, Sep 02, 2016 at 10:19:23AM -0700, Jonathan Campbell wrote: > >[...] > >>CRC computation isn't fast enough? What should I use then? A sum of > >>byte values? > >av_lf

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Jonathan Campbell
On 09/02/2016 01:01 PM, Michael Niedermayer wrote: On Fri, Sep 02, 2016 at 10:19:23AM -0700, Jonathan Campbell wrote: [...] CRC computation isn't fast enough? What should I use then? A sum of byte values? av_lfg_init() calls av_md5_sum() av_md5_sum() is too slow to be called per ac3 frame [..

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Michael Niedermayer
On Fri, Sep 02, 2016 at 10:19:23AM -0700, Jonathan Campbell wrote: [...] > CRC computation isn't fast enough? What should I use then? A sum of > byte values? av_lfg_init() calls av_md5_sum() av_md5_sum() is too slow to be called per ac3 frame [...] -- Michael GnuPG fingerprint: 9FF2128B147EF

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Jonathan Campbell
On 09/02/2016 04:50 AM, Michael Niedermayer wrote: On Thu, Sep 01, 2016 at 06:59:46PM -0700, Jonathan Campbell wrote: I finished the consistent noise generation patch for AC-3 decoding. Set AVOption "cons_noisegen" to 1 (true) to enable it. Git repository: https://github.com/joncampbell123/FF

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Jonathan Campbell
CRC computation isn't fast enough? What should I use then? A sum of byte values? Jonathan Campbell CASTUS On 09/02/2016 04:50 AM, Michael Niedermayer wrote: On Thu, Sep 01, 2016 at 06:59:46PM -0700, Jonathan Campbell wrote: I finished the consistent noise generation patch for AC-3 decoding.

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-02 Thread Michael Niedermayer
On Thu, Sep 01, 2016 at 06:59:46PM -0700, Jonathan Campbell wrote: > I finished the consistent noise generation patch for AC-3 decoding. > > Set AVOption "cons_noisegen" to 1 (true) to enable it. > > Git repository: > https://github.com/joncampbell123/FFmpeg.git > > commit dbd086586f0ad1591ea201

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-01 Thread Jonathan Campbell
On 09/01/2016 07:13 PM, Michael Niedermayer wrote: On Thu, Sep 01, 2016 at 06:59:46PM -0700, Jonathan Campbell wrote: I finished the consistent noise generation patch for AC-3 decoding. Set AVOption "cons_noisegen" to 1 (true) to enable it. Git repository: https://github.com/joncampbell123/FF

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-01 Thread Jonathan Campbell
On 09/01/2016 07:13 PM, Michael Niedermayer wrote: On Thu, Sep 01, 2016 at 06:59:46PM -0700, Jonathan Campbell wrote: I finished the consistent noise generation patch for AC-3 decoding. Set AVOption "cons_noisegen" to 1 (true) to enable it. Git repository: https://github.com/joncampbell123/FF

Re: [FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-01 Thread Michael Niedermayer
On Thu, Sep 01, 2016 at 06:59:46PM -0700, Jonathan Campbell wrote: > I finished the consistent noise generation patch for AC-3 decoding. > > Set AVOption "cons_noisegen" to 1 (true) to enable it. > > Git repository: > https://github.com/joncampbell123/FFmpeg.git > > commit dbd086586f0ad1591ea201

[FFmpeg-devel] CNG (consistent noise generation) patch for AC-3 decoder

2016-09-01 Thread Jonathan Campbell
I finished the consistent noise generation patch for AC-3 decoding. Set AVOption "cons_noisegen" to 1 (true) to enable it. Git repository: https://github.com/joncampbell123/FFmpeg.git commit dbd086586f0ad1591ea2013293bbb6e4dbfd0455 Author: Jonathan Campbell Date: Thu Sep 1 18:46:16 2016 -070