I need to compute the DCT of a signal (in fact its a image). As I already have the DFT of that signal, I wonder if there is any cheap way to obtain the DCT in terms of the DFT.
Note that I am not asking if the DCT can be computed via the FFT, which has been answered here. The answers in the cited question perform modifications in the time domain. I have the additional constrain of "The FFT has been already computed with the input signal".
Obviously the task is possible in O(N²) time, because both transforms are orthonormal bases, so a possible way could be computing the transform matrix from one base to the other. This could be improved with dct(ifft(x)), where both operations have O(n log(n)) complexity.
Therefore, the question is if there is any linear time complexity algorithm that obtains the DCT of a signal from the Discrete Fourier Transform of that signal.