The MDCT can be calculated using FFT. The naive approach, though, requires
a 2n length FFT for a length n block, because of the odd
transform. There are faster approaches though [10]. The MDCT can
be rewritten as an odd-time odd-frequency discrete Fourier transform
(O DFT)
[10] presents a fast algorithm for calculating
as
where
Thus, the MDCT can be calculated using only one n/4 point FFT and some pre- and post-rotation of the sample points. The IMDCT can be calculated in a similar way. See the code for a more detailed description.