8
$\begingroup$

Karlheinz Brandenburg depicts a MP3 encoder like this:

Block diagram of a MP3 encoder

Source: MP3 and AAC Explained

I marked the FFT as I'm not quite sure why it is actually necessary to perform one. Why can't the psychoacoustic model be applyed to the so called lines after the modified discrete cosine transform (MDCT) without performing a FFT?

I have some literature here, saying the frequency resolution is not accurate enough. Does this mean, dividing the original signal into 576 lines (like the filterbank and the MDCT do) is not accurate enough for the psychoacoustic model to work properly? Is the FFT more accurate?

$\endgroup$
  • $\begingroup$ The filterbank and MDCT channel is the source of error that the Psycho-acoustic model is trying to minimize, ie the upper channel is lossy. From the numbers that looks about right -- 1024 frequency components in the true signal compared with 576 in the compression pipeline. $\endgroup$ – KWillets May 20 '16 at 21:36
8
$\begingroup$

I would suggest a more detailed explanation of mp3 codec.

FFT is applied on the time domain signal, so in fact it does not use the result from the MDCT. The input to the psychoacoustic models is in the frequency domain, hence the FFT.

There at least several reasons to do it. MDCT with filterbanks operates on very short overlapping chunks, maximizing the compression – the FFT uses longer samples and has better spectral resolution. (It is hard to compare since MDCT operates as short-term transform; if this is of big importance to you I will have to make that comparison.)

You can think of filterbank MDCT in the same way as JPEG quantization (it is a very good analogy, since both use DCT) and FFT to detect DCT artifacts from compression. Then, the psychoacoustic model smooths the errors to fall under the "hearable" threshold, but in order to do that, the time domain samples (here PCM – Pulse Code Modulation is not enough, because sudden frequency shifts are heard as cracks) - so it uses the frequency domain to detect such discontinuities and then smooth it in time domain.

Two things are not explained in articles but are crucial. When PCM differences, are high the speaker has more distance to travel, so there is time delay and depending on speaker abilities it might just cause additional vibrations, which are quite distinct noises from speaker. The second part is between lines, the quantized version of signal is transformed back to compare it with original sound and check how much it deviates.

Based on the masking type of windows (based on comparison of FFT and inverted MDCT) is chosen to compensate better for audible deviations from the original.

Humans perceive frequency shifts better than amplitude changes, so the filter operates in the both domains at once, and the quantized signal is reversed and smoothing is done back in time domain.

Yes, the resolution of MDCT with filterbanks is not enough, but this is the part where a fair share of the compression happens, and then it is masked. But the psychoacoustic model has spectral resolution as given in the paper.

Yes, FFT is more accurate because it gets longer samples, so it has better resolution between bins.

Footnote
The (M)DCT is commonly implemented by performing FFT, so this has nothing to do with transform used. MDCT can be seen as a bit-modified Short-Term Fourier Transform with a specially chosen filter (the filterbanks resemble Mel scale for speech recognition).

FFT is used longer, provides easier algorithms for pitch shifting and is easier to apply on sound. (M)DCT minimizes the number of components, meaning that we can cut more data from the result than from FFT.

But in the case of sound those components are not stable, cutting always e.g. two bins out will give bigger disortion between consecutive frames than doing equivalent operation on FFT results. So, the connection between FFT and what we hear is bigger than (M)DCT and what we hear, but available compression is the other way around.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.