// // Programmer: Craig Stuart Sapp // Creation Date: Fri Feb 7 00:44:33 PST 1997 // Last Modified: Thu Dec 18 18:45:13 GMT-0800 1997 // Last Modified: Sun Jun 11 12:55:07 PDT 2000 (improved memory management) // Filename: ...sig/maint/code/utilities/transforms/transforms.h // Web Address: http://sig.sapp.org/include/sig/transforms.h // Syntax: C++ // // Description: Basic signal <-> frequency transforms. // #ifndef _TRANSFORMS_H_INCLUDED #define _TRANSFORMS_H_INCLUDED #include "Block.h" #include "ComplexD.h" ////////////////////////////// // // DirectDFT -- Direct Discrete Fourier Transform O(N^2). // Returns the complex spectrum of the given complex input signal. // Quickly becomes slower than the FFT if the length of the input // block is greater than about 100. // Block& DirectDFT(Block& outputSpectrum, const Block& inputSignal); ////////////////////////////// // // FFT -- Fast Fourier Transform O(N Log N). // Returns the complex spectrum of the given complex input signal. // Length of Block must be a power of 2. // Block& FFT(Block& outputSpectrum, const Block& inputSignal); ////////////////////////////// // // DFT -- Selects the DirectDFT or the FFT as appropriate. // Block& DFT(Block& outputSpectrum, const Block& inputSignal); ////////////////////////////// // // DirectIDFT -- Direct Inverse Discrete Fourier Transform O(N^2). // Returns the complex spectrum of the given complex input signal. // Quickly becomes slower than the IFFT if the length of the input // block is greater than about 100. // Block& DirectIDFT(Block& outputSignal, const Block& inputSpectrum); ////////////////////////////// // // IFFT -- Inverse Fast Fourier Transform O(N Log N). // Returns the complex signal of the given complex input spectrum. // Length of Block must be a power of 2. // Block& IFFT(Block& outputSignal, const Block& inputSpectrum); ////////////////////////////// // // IDFT -- Selects the DirectIDFT or the IFFT as appropriate. // Block& IDFT(Block& outputSignal, const Block& inputSpectrum); ////////////////////////////// // // RealFFT -- Calculates the complex spectrum of a real signal. // Uses a N/2 length FFT and therfore more efficient // than the plain FFT for purely real signals. Can accept // Block or Block. Input signal length must // be a power of 2. // template Block& RealFFT(Block& outputSpectrum, const Block& realSignal); ////////////////////////////// // // DirectMDCT -- Modified Discrete Cosine Transform O(N^2). // Can handle Block and Block as input. // template Block& DirectMDCT(Block& outputSignal, const Block& inputSignal); ////////////////////////////// // // FastMDCT -- Modified Discrete Cosine Transform (N Log N). // Can handle Block and Block as input. // template Block& FastMDCT(Block& outputSpectrum, const Block& inputSignal); ////////////////////////////// // // MDCT -- Selects the FastMDCT or DirectMDCT as appropriate. // template Block& MDCT(Block& outputSpectrum, const Block& inputSignal); ////////////////////////////// // // DirectIMDCT -- Inverse Modified Discrete Cosine Transform O(N^2). // Can handle Block and Block as input. // template Block& DirectIMDCT(Block& outputSignal, const Block& inputSpectrum); ////////////////////////////// // // FastIMDCT -- Inverse Modified Discrete Cosine Transform O(N Log N). // Can handle Block and Block as input. // template Block& FastIMDCT(Block& outputSignal, const Block& inputSpectrum); ////////////////////////////// // // IMDCT -- Selects the DirectIMDCT or FastIMDCT as apprpriate. // template Block& IMDCT(Block& outputSignal, const Block& inputSpectrum); #include "transforms-templates.cpp" #endif /* _TRANSFORMS_H_INCLUDED */ // md5sum: 4a6c794cb513a24f473b5f0b913110b0 transforms.h [20010708]