libavcodec/fft-test.c File Reference

FFT and MDCT tests. More...

#include "libavutil/mathematics.h"
#include "libavutil/lfg.h"
#include "libavutil/log.h"
#include "fft.h"
#include <math.h>
#include <unistd.h>
#include <sys/time.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Defines

#define MUL16(a, b)   ((a) * (b))
#define CMAC(pre, pim, are, aim, bre, bim)

Enumerations

enum  tf_transform { TRANSFORM_FFT, TRANSFORM_MDCT, TRANSFORM_RDFT, TRANSFORM_DCT }

Functions

static void fft_ref_init (int nbits, int inverse)
static void fft_ref (FFTComplex *tabr, FFTComplex *tab, int nbits)
static void imdct_ref (float *out, float *in, int nbits)
static void mdct_ref (float *output, float *input, int nbits)
static void idct_ref (float *output, float *input, int nbits)
static void dct_ref (float *output, float *input, int nbits)
static float frandom (AVLFG *prng)
static int64_t gettime (void)
static void check_diff (float *tab1, float *tab2, int n, double scale)
static void help (void)
int main (int argc, char **argv)

Variables

FFTComplexexptab


Detailed Description

FFT and MDCT tests.

Definition in file fft-test.c.


Define Documentation

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

Value:

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

Definition at line 42 of file fft-test.c.

Referenced by fft_ref().

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

Definition at line 40 of file fft-test.c.


Enumeration Type Documentation

Enumerator:
TRANSFORM_FFT 
TRANSFORM_MDCT 
TRANSFORM_RDFT 
TRANSFORM_DCT 

Definition at line 213 of file fft-test.c.


Function Documentation

static void check_diff ( float *  tab1,
float *  tab2,
int  n,
double  scale 
) [static]

Definition at line 179 of file fft-test.c.

Referenced by main().

static void dct_ref ( float *  output,
float *  input,
int  nbits 
) [static]

Definition at line 149 of file fft-test.c.

Referenced by main().

static void fft_ref ( FFTComplex tabr,
FFTComplex tab,
int  nbits 
) [static]

Definition at line 69 of file fft-test.c.

Referenced by main().

static void fft_ref_init ( int  nbits,
int  inverse 
) [static]

Definition at line 50 of file fft-test.c.

Referenced by main().

static float frandom ( AVLFG prng  )  [static]

Definition at line 167 of file fft-test.c.

Referenced by main().

static int64_t gettime ( void   )  [static]

Definition at line 172 of file fft-test.c.

static void help ( void   )  [static]

Definition at line 198 of file fft-test.c.

static void idct_ref ( float *  output,
float *  input,
int  nbits 
) [static]

Definition at line 133 of file fft-test.c.

Referenced by main().

static void imdct_ref ( float *  out,
float *  in,
int  nbits 
) [static]

Definition at line 98 of file fft-test.c.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 220 of file fft-test.c.

static void mdct_ref ( float *  output,
float *  input,
int  nbits 
) [static]

Definition at line 116 of file fft-test.c.

Referenced by main().


Variable Documentation

Definition at line 48 of file fft-test.c.


Generated on Fri Oct 26 02:36:51 2012 for FFmpeg by  doxygen 1.5.8