Personal tools

AC3 overflows in movies

From AC3Filter
Jump to: navigation, search

I have explored a set of ac3 tracks from different movies and found that much of them contain overflows. It is not AC3Filter’s issue; other decoders also show overflows. Here we will consider AC3Filter configuration questions connected with this problem.


[edit] AGC

If AGC is enabled, it applies correction gain to avoid overflows. This decreases the RMS level of bangs with overflow (peak level stays the same 0dB). Therefore, if we have good loudspeakers and want bangs to be as loud as possible, we should disable AGC. This will increase the maximum RMS level.

Of course, with AGC disabled overflow produces distortions. But overflow happens with very loud and rough sounds like bangs and therefore overflow distortions are not too noticeable.

On other hand, if we have no big and powerful acoustics (headphones, small loudspeakers, etc) that is not too loud, we have no need to make bangs a little louder. Therefore, we should not disable AGC in this case.

[edit] Master gain

Another (more correct) way to handle these overflows is to decrease Master gain below the maximum overflow level, and increase gain on your amplifier. In this case, overflow does not occur at all and you have full loudness dynamics without any distortions.

Maximum overflow level I observe is about 7dB. But it is extreme case. In most cases overflow is less than 2dB (see measurement data). Therefore, -3dB gain is enough in most cases.

[edit] Downmixing

Note that overflow may disappear completely in case of downmixing. For example, if you have only stereo setup, then extremely high +7dB overflow may disappear. Less extreme +1dB...+3dB overflow may disappear even with downmix to 5 channels.

This happens because not all channels contain high-level signal at the same time and downmixing procedure applies normalization gain. But this applies only to normalized downmix (i.e. Normalize matrix option must be enabled). De-normalized downmix does not apply normalization gain and increases the probability of overflow.

[edit] Measurement data