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/FFmpeg.git

commit dbd086586f0ad1591ea2013293bbb6e4dbfd0455
Author: Jonathan Campbell <jonat...@castus.tv>
Date:   Thu Sep 1 18:46:16 2016 -0700

     AC-3 consistent noise generation: avopt -cons_noisegen <number>

     When -cons_noisegen 1, the linear feedback generator used for AC-3
     dithering is seeded with the contents of the AC-3 frame. Seeding from
     the AC-3 frame ensures the dithering noise comes out exactly the same
     when given the same AC-3 frame data, which can then be used by
     non-linear editing software to reliably decode discontinuous
segments of
     an AC-3 bitstream without gaps or discontinuities.

Jonathan Campbell

Patch follows, hope Thunderbird doesn't garble it:

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index fac189b..28048d7 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1419,6 +1419,19 @@ static int ac3_decode_frame(AVCodecContext *
avctx, void *data,
                              (const uint16_t *) buf, cnt);
      } else
          memcpy(s->input_buffer, buf, FFMIN(buf_size,
AC3_FRAME_BUFFER_SIZE));
patch looks newline garbled

[...]


_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Yeah, figured that would happen.

Can you accept patches directly from Github?

https://github.com/joncampbell123/FFmpeg/commit/dbd086586f0ad1591ea2013293bbb6e4dbfd0455.patch

Jonathan Campbell

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

Reply via email to