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 . The MDCT can be rewritten as an odd-time odd-frequency discrete Fourier transform (O DFT)
 presents a fast algorithm for calculating
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.