src/fourier.c File Reference

#include <it/types.h>
#include <it/fourier.h>
#include <it/io.h>
#include <it/math.h>

Go to the source code of this file.

Defines

#define CACHE_SIZE   128*1024
#define DFT_LAST   16
#define FDFT_FORW   0
#define FDFT_BACK   1

Functions

static int intlog2 (int n)
void fft_init (void)
static void cplx_array_bitrev_permute (cplx *v, int n)
static void __fft_dif (cplx *v, int log2n)
static void __ifft_dit (cplx *v, int log2n)
static void _fft (cplx *v, int log2n)
static void _ifft (cplx *v, int log2n)
static void _fft_demangle (cplx *v, int log2n)
static void _ifft_mangle (cplx *v, int log2n)
cvec it_fft (cvec v)
cvec it_ifft (cvec v)
cvec cvec_fft_conv (cvec a, cvec b)
cvec cvec_fft_corr (cvec a, cvec b)
cvec cvec_fft_autocorr (cvec a)
cvec it_fzt (cvec v, cplx z)
static cvec it_fdft (cvec v, int inv)
static cvec it_sdft (cvec v)
static cvec it_sidft (cvec v)
cvec it_dft (cvec v)
cvec it_idft (cvec v)
cvec it_dft_real (vec v)
vec it_idft_real (cvec cv)

Variables

static unsigned int cache_size = CACHE_SIZE
static int fft_init_done = 0
static int fft_log2size
static cvec dft_roots [DFT_LAST]
static cvec fft_roots
static ivec fft_perm


Define Documentation

#define CACHE_SIZE   128*1024

Definition at line 48 of file fourier.c.

#define DFT_LAST   16

Definition at line 49 of file fourier.c.

Referenced by fft_init(), it_dft(), it_idft(), it_sdft(), and it_sidft().

#define FDFT_BACK   1

Definition at line 643 of file fourier.c.

Referenced by it_idft().

#define FDFT_FORW   0

Definition at line 642 of file fourier.c.

Referenced by it_dft().


Function Documentation

static void __fft_dif ( cplx v,
int  log2n 
) [static]

Definition at line 137 of file fourier.c.

References cadd(), cmul(), csub(), and fft_log2size.

Referenced by _fft().

static void __ifft_dit ( cplx v,
int  log2n 
) [static]

Definition at line 168 of file fourier.c.

References cadd(), cmul(), csub(), and fft_log2size.

Referenced by _ifft().

static void _fft ( cplx v,
int  log2n 
) [static]

static void _fft_demangle ( cplx v,
int  log2n 
) [static]

Definition at line 347 of file fourier.c.

References cplx_array_bitrev_permute(), and fft_log2size.

Referenced by it_fft().

static void _ifft ( cplx v,
int  log2n 
) [static]

static void _ifft_mangle ( cplx v,
int  log2n 
) [static]

Definition at line 383 of file fourier.c.

References cplx_array_bitrev_permute(), and fft_log2size.

Referenced by it_ifft().

static void cplx_array_bitrev_permute ( cplx v,
int  n 
) [inline, static]

Definition at line 108 of file fourier.c.

References cplx_swap.

Referenced by _fft_demangle(), and _ifft_mangle().

static int intlog2 ( int  n  )  [inline, static]

static cvec it_fdft ( cvec  v,
int  inv 
) [static]

static cvec it_sdft ( cvec  v  )  [static]

Definition at line 719 of file fourier.c.

References cadd(), cmul(), cplx_0, cvec_length(), cvec_new(), DFT_LAST, fft_init(), and N.

Referenced by it_dft().

static cvec it_sidft ( cvec  v  )  [static]

Definition at line 745 of file fourier.c.

References cadd(), cmul(), cplx_0, cvec_div_by_real(), cvec_length(), cvec_new(), DFT_LAST, fft_init(), and N.

Referenced by it_idft().


Variable Documentation

unsigned int cache_size = CACHE_SIZE [static]

Definition at line 51 of file fourier.c.

Referenced by fft_init().

cvec dft_roots[DFT_LAST] [static]

Definition at line 56 of file fourier.c.

int fft_init_done = 0 [static]

Definition at line 54 of file fourier.c.

Referenced by fft_init().

int fft_log2size [static]

Definition at line 55 of file fourier.c.

Referenced by __fft_dif(), __ifft_dit(), _fft(), _fft_demangle(), _ifft(), _ifft_mangle(), and fft_init().

ivec fft_perm [static]

Definition at line 58 of file fourier.c.

Referenced by _fft(), _ifft(), and fft_init().

cvec fft_roots [static]

Definition at line 57 of file fourier.c.


Hosted by
Copyright (C) 2005-2006 Hervé Jégou
Vivien Chappelier
Francois Cayre
libit logo courtesy of Jonathan Delhumeau