BRL-CAD
libfft (Fast Fourier Transform)

The Fast-Fourier Transform library is a signal processing library for performing FFTs or inverse FFTs efficiently. More...

Files

file  fft.h
 

Data Structures

struct  COMPLEX
 

Functions

void splitdit (int N, int M)
 
void ditsplit (int n, int m)
 
void rfft (double *X, int N)
 Real valued, split-radix, decimation in time FFT. More...
 
void irfft (double *X, int n)
 Split Radix, Decimation in Frequency, Inverse Real-valued FFT. More...
 
void cfft (COMPLEX *dat, int num)
 Forward Complex Fourier Transform. More...
 
void icfft (COMPLEX *dat, int num)
 
void cdiv (COMPLEX *result, COMPLEX *val1, COMPLEX *val2)
 
void rfft256 (register double X[])
 
void irfft256 (register double X[])
 

Detailed Description

The Fast-Fourier Transform library is a signal processing library for performing FFTs or inverse FFTs efficiently.

Function Documentation

◆ splitdit()

void splitdit ( int  N,
int  M 
)

Generates Real Split Radix Decimation in Time source files

◆ ditsplit()

void ditsplit ( int  n,
int  m 
)

Generates Real Split Radix Decimation in Freq Inverse FFT source files

Parameters
n[in] length
m[in] n = 2^m

◆ rfft()

void rfft ( double *  X,
int  N 
)

Real valued, split-radix, decimation in time FFT.

Data comes out as: [ Re(0), Re(1), ..., Re(N/2), Im(N/2-1), ..., Im(1) ]

◆ irfft()

void irfft ( double *  X,
int  n 
)

Split Radix, Decimation in Frequency, Inverse Real-valued FFT.

Input order: [ Re(0), Re(1), ..., Re(N/2), Im(N/2-1), ..., Im(1) ]

Parameters
X[in] ?
n[in] length

◆ cfft()

void cfft ( COMPLEX dat,
int  num 
)

Forward Complex Fourier Transform.

"Fast" Version - Function calls to complex math routines removed. Uses pre-computed sine/cosine tables.

The FFT is:

         N-1
 Xf(k) = Sum x(n)(cos(2PI(nk/N)) - isin(2PI(nk/N)))
         n=0

◆ icfft()

void icfft ( COMPLEX dat,
int  num 
)

Inverse Complex Fourier Transform

◆ cdiv()

void cdiv ( COMPLEX result,
COMPLEX val1,
COMPLEX val2 
)

Complex divide (why is this public API when none of the other complex math routines are?)

◆ rfft256()

void rfft256 ( register double  X[])

◆ irfft256()

void irfft256 ( register double  X[])