General Purpose FFT (Fast Fourier/Cosine/Sine Transform) Package


1-dim DFT / DCT / DST

Description

This is a package to calculate Discrete Fourier/Cosine/Sine Transforms of 1-dimensional sequences of length 2^N. This package contains C and Fortran FFT codes.

Package

Files in the Package

fft4g.c : FFT Package in C - Fast Version (radix 4, 2)
fft4g.f : FFT Package in Fortran - Fast Version (radix 4, 2)
fft4g_h.c : FFT Package in C - Simple Version (radix 4, 2)
fft8g.c : FFT Package in C - Fast Version (radix 8, 4, 2)
fft8g.f : FFT Package in Fortran - Fast Version (radix 8, 4, 2)
fft8g_h.c : FFT Package in C - Simple Version (radix 8, 4, 2)
fftsg.c : FFT Package in C - Fast Version (Split-Radix)
fftsg.f : FFT Package in Fortran - Fast Version (Split-Radix)
fftsg_h.c : FFT Package in C - Simple Version (Split-Radix)
readme.txt : readme file
sample1/ : Sample Program 1 - for test
Makefile : Makefile (for gcc, cc)
Makefile.f77 : Makefile (for Fortran)
testxg.c : Test Program for "fft*g.c"
testxg.f : Test Program for "fft*g.f"
testxg_h.c : Test Program for "fft*g_h.c"
sample2/ : Sample Program 2 - for benchmarks
Makefile : Makefile (for gcc, cc)
Makefile.pth : Makefile (for multi-threads)
pi_fft.c : PI(= 3.1415926535897932384626...) Calculation Program
- a Benchmark Test for "fft*g.c"

Difference of the Files

The same routines are in each C and Fortran file. Simple versions use no work area, but fast versions use work areas. Fast versions have the same specification.

Routines in "fft*.*"

cdft() : Complex Discrete Fourier Transform
rdft() : Real Discrete Fourier Transform
ddct() : Discrete Cosine Transform
ddst() : Discrete Sine Transform
dfct() : Cosine Transform of RDFT (Real Symmetric DFT)
dfst() : Sine Transform of RDFT (Real Anti-symmetric DFT)

Usage

Brief explanations are in block comments of each packages. The examples are given in the test programs.


2-dim/3-dim DFT / DCT / DST

Description

This is a package to calculate Discrete Fourier/Cosine/Sine Transforms of 2,3-dimensional sequences of length 2^N.

Package

Files in the Package

alloc.c : 2D,3D-array Allocation Code
fft4f2d.c : 2D FFT Package in C - Version I
fft4f2d.f : 2D FFT Package in Fortran - Version I
fftsg.c : 1D FFT Package in C - Split-Radix Version
fftsg.f : 1D FFT Package in Fortran - Split-Radix Version
fftsg2d.c : 2D FFT Package in C - Version II
fftsg2d.f : 2D FFT Package in Fortran - Version II
fftsg3d.c : 3D FFT Package in C
fftsg3d.f : 3D FFT Package in Fortran
shrtdct.c : 8x8, 16x16 DCT Package - faster than ddct2d()
readme2d.txt : readme file
sample2d/ : Sample Program - for test
Makefile : Makefile (for gcc, cc)
Makefile.f77 : Makefile (for Fortran)
Makefile.pth : Makefile (for multi-threads)
fft4f2dt.c : Test Program for "fft4f2d.c"
fft4f2dt.f : Test Program for "fft4f2d.f"
fftsg2dt.c : Test Program for "fftsg2d.c"
fftsg2dt.f : Test Program for "fftsg2d.f"
fftsg3dt.c : Test Program for "fftsg3d.c"
fftsg3dt.f : Test Program for "fftsg3d.f"
shrtdctt.c : Test Program for "shrtdct.c"

Difference of the Files

Version I routines perform the 2D FFTs directly, but version II routines use 1D FFT routines. Version II is usually faster than version I.

Routines in "fft**2d.*"

cdft2d() : 2-dim Complex Discrete Fourier Transform
rdft2d() : 2-dim Real Discrete Fourier Transform
ddct2d() : 2-dim Discrete Cosine Transform
ddst2d() : 2-dim Discrete Sine Transform

Routines in "fftsg3d.*"

cdft3d() : 3-dim Complex Discrete Fourier Transform
rdft3d() : 3-dim Real Discrete Fourier Transform
ddct3d() : 3-dim Discrete Cosine Transform
ddst3d() : 3-dim Discrete Sine Transform

License

Copyright Takuya OOURA, 1996-2001

You may use, copy, modify and distribute this code for any purpose (include commercial use) and without fee. Please refer to this package when you modify this code.

Performance of this Package

FFT Links


Main Page