The MDCT (Modified Discrete Cosine Transform) is the mathematical engine at the core of almost every lossy audio codec — MP3, AAC, Opus's CELT layer, AC-3, Vorbis. It converts short overlapping blocks of samples from the time domain into a frequency-domain representation, where the psychoacoustic model can decide how many bits each frequency band deserves and where masked detail can be quantized away. Its defining feature is the overlap: consecutive blocks share half their samples and cancel each other's edge artefacts on reconstruction (time-domain aliasing cancellation), avoiding the clicks a naive block transform would create. Window-length switching lets it use long blocks for steady tones and short ones for sharp transients.

Book cover: Audio for Video, Volume 4 of the Fora Soft Video Engineering Handbook

The book · Volume 4 of 7

Audio for Video: A Complete Guide to Sound in Video Products: From PCM and Codecs to Loudness, Accessibility, and Real-Time Voice Processing

The MDCT is the transform inside AAC, Opus, MP3 and AC-3, so its window and block choices shape what every lossy codec sounds like. Volume 4 explains the MDCT with the codecs built on it: overlapping windows, pre-echo, psychoacoustic models and bit allocation. Written by Nikolay Sapunov, CEO at Fora Soft.

Read it on Amazon →Kindle & paperback · Fora Soft Video Engineering Handbook

Chasing pre-echo or smearing in encoded audio and suspect the MDCT settings?

We will analyse your encodes and point to the MDCT window, block size or bitrate choice behind the artifact, with settings to fix it. 250+ video products shipped since 2005.

Book a 30-min call →WhatsApp →Email us →