diff options
author | D G Turner | 2012-04-16 21:05:21 +0100 |
---|---|---|
committer | D G Turner | 2012-04-16 21:05:21 +0100 |
commit | 422334da5a29ec56261c51827ee31378e07a04f3 (patch) | |
tree | 67f40390c906325e1c8241b473f131e3c4fc8e26 /common/fft.h | |
parent | d04717f3232403e1a1f1eff2b1dcfb3189203769 (diff) | |
download | scummvm-rg350-422334da5a29ec56261c51827ee31378e07a04f3.tar.gz scummvm-rg350-422334da5a29ec56261c51827ee31378e07a04f3.tar.bz2 scummvm-rg350-422334da5a29ec56261c51827ee31378e07a04f3.zip |
COMMON: Refactoring of FFT class, removing Cosine Table Reallocations.
The cosine tables are now allocated once on object construction.
Also, only the tables necessary (less than or equal to _bits) are
created.
Diffstat (limited to 'common/fft.h')
-rw-r--r-- | common/fft.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/common/fft.h b/common/fft.h index 318e1d2f97..d510e51d9c 100644 --- a/common/fft.h +++ b/common/fft.h @@ -34,6 +34,8 @@ namespace Common { +class CosineTable; + /** * (Inverse) Fast Fourier Transform. * @@ -68,6 +70,24 @@ private: int _permutation; static int splitRadixPermutation(int i, int n, int inverse); + + CosineTable *_cosTables[13]; + + void fft4(Complex *z); + void fft8(Complex *z); + void fft16(Complex *z); + void fft32(Complex *z); + void fft64(Complex *z); + void fft128(Complex *z); + void fft256(Complex *z); + void fft512(Complex *z); + void fft1024(Complex *z); + void fft2048(Complex *z); + void fft4096(Complex *z); + void fft8192(Complex *z); + void fft16384(Complex *z); + void fft32768(Complex *z); + void fft65536(Complex *z); }; } // End of namespace Common |