[FFmpeg-devel] Deterministic Noise Generation option for audio codecs that involve noise generation (RNG)
michaelni at gmx.at
Sat Sep 7 20:58:37 CEST 2013
On Sat, Sep 07, 2013 at 01:21:16AM -0700, Jonathan Campbell wrote:
> I'm writing a program to provide "random access" decoding for
> various file formats including those involving MP3 or AC-3 and I
> want to bring up something that might help improve the FFMPEG ABI.
> I found that I can provide sample-level random access for MP3 if,
> when non-sequential access is needed, I just step back about 8-16
> MP3 frames (compensating for the bit reservoir and MDCT window) and
> decode up to the one I need. The problem is AC-3 and it's noise
> coding. If I try the same trick with AC-3, stepping back 2-3 frames
> so that the MDCT window can build up, no matter how precisely I do
> it there are discontinuities between the previous decode and the
> decode I started again from the same bitstream.
> I had written a hack for FFMPEG 1.0.1 where by setting a flag, if
> noise bands are present, the codec seeds the RNG with a checksum of
> the AC-3 or AAC frame and then proceeds to decode as normal. Then,
> decoding the same AC-3 frames always results in the same PCM output,
> and the same trick I used with MP3 then works correctly. It can be
> set for programs that want this behavior while existing code can
> leave it unset and maintain existing decode behavior.
> Open source video editing projects could benefit from that feature
> when allowing the user to edit from formats and containers involving
> these codecs.
> If I rewrite that patch for FFMPEG 1.2.2 and FFMPEG 2.0, would any
> of you be interested in incorporating it upstream?
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel