hvirtual/quicktime/ffmpeg/libavcodec/fft.c File Reference

#include "dsputil.h"

Include dependency graph for fft.c:

Go to the source code of this file.

Defines

#define BF(pre, pim, qre, qim, pre1, pim1, qre1, qim1)
#define MUL16(a, b)   ((a) * (b))
#define CMUL(pre, pim, are, aim, bre, bim)

Functions

int ff_fft_init (FFTContext *s, int nbits, int inverse)
void ff_fft_calc_c (FFTContext *s, FFTComplex *z)
void ff_fft_permute (FFTContext *s, FFTComplex *z)
void ff_fft_end (FFTContext *s)


Define Documentation

#define BF ( pre,
pim,
qre,
qim,
pre1,
pim1,
qre1,
qim1   ) 

Value:

{\
  FFTSample ax, ay, bx, by;\
  bx=pre1;\
  by=pim1;\
  ax=qre1;\
  ay=qim1;\
  pre = (bx + ax);\
  pim = (by + ay);\
  qre = (bx - ax);\
  qim = (by - ay);\
}

Definition at line 123 of file fft.c.

#define CMUL ( pre,
pim,
are,
aim,
bre,
bim   ) 

Value:

{\
   pre = (MUL16(are, bre) - MUL16(aim, bim));\
   pim = (MUL16(are, bim) + MUL16(bre, aim));\
}

Definition at line 138 of file fft.c.

#define MUL16 ( a,
b   )     ((a) * (b))

Definition at line 136 of file fft.c.


Function Documentation

void ff_fft_calc_c ( FFTContext s,
FFTComplex z 
)

Do a complex FFT with the parameters defined in ff_fft_init(). The input data must be permuted before with s->revtab table. No 1.0/sqrt(n) normalization is done.

Definition at line 149 of file fft.c.

References BF, CMUL, FFTContext::exptab, exptab, FFTComplex::im, FFTContext::inverse, FFTContext::nbits, and FFTComplex::re.

Referenced by ff_fft_init().

void ff_fft_end ( FFTContext s  ) 

Definition at line 244 of file fft.c.

References av_freep(), FFTContext::exptab, FFTContext::exptab1, and FFTContext::revtab.

Referenced by ff_mdct_end(), and main().

Here is the call graph for this function:

int ff_fft_init ( FFTContext s,
int  nbits,
int  inverse 
)

The size of the FFT is 2^nbits. If inverse is TRUE, inverse FFT is done

Definition at line 31 of file fft.c.

References av_freep(), av_malloc(), c1, FFTContext::exptab, FFTContext::exptab1, ff_fft_calc_altivec(), ff_fft_calc_c(), ff_fft_calc_sse(), FFTContext::fft_calc, FFTComplex::im, FFTContext::inverse, M_PI, mm_support(), FFTContext::nbits, NULL, FFTComplex::re, FFTContext::revtab, s1, and s2.

Referenced by ff_mdct_init(), and main().

Here is the call graph for this function:

void ff_fft_permute ( FFTContext s,
FFTComplex z 
)

Do the permutation needed BEFORE calling ff_fft_calc()

Definition at line 226 of file fft.c.

References FFTContext::nbits, and FFTContext::revtab.

Referenced by main().


Generated on Mon Apr 28 14:03:57 2008 for Cinelerra by  doxygen 1.5.5