[FFmpeg-devel] Deterministic Noise Generation option for audio codecs that involve noise generation (RNG)

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Sep 7 11:30:06 CEST 2013


On Sat, Sep 07, 2013 at 01:21:16AM -0700, Jonathan Campbell wrote:
> 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,

The way I understand this, this means that a file that contains
the same AC-3 data over and over will then generate a constantly
repeating noise pattern.
That sounds like it might be worse than just switching of noise
generation, at least in some cases.
If possible it should at least get a frame number as input, then
it is at least possible to avoid that two consecutive frames generate
exactly the same noise, though admittedly an application might have a hard
time always knowing the exact frame number.

> On a related note, can anyone tell me if a similar hack can be made
> for video codecs that use noise coding (are there any)?

No. There are noise filters and dithering algorithms though where this
might be potentially relevant.


More information about the ffmpeg-devel mailing list