FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
float_dsp.c File Reference
#include "config.h"
#include <float.h>
#include <math.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "compat/getopt.c"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
#include "libavutil/internal.h"
#include "libavutil/lfg.h"
#include "libavutil/log.h"
#include "libavutil/random_seed.h"
#include "libavutil/float_dsp.h"

Go to the source code of this file.

Macros

#define LEN   240
 
#define ARBITRARY_FMAC_SCALAR_CONST   0.005
 
#define ARBITRARY_FMUL_WINDOW_CONST   0.008
 
#define ARBITRARY_FMUL_ADD_CONST   0.005
 
#define ARBITRARY_SCALARPRODUCT_CONST   0.2
 

Functions

static void fill_float_array (AVLFG *lfg, float *a, int len)
 
static int compare_floats (const float *a, const float *b, int len, float max_diff)
 
static void fill_double_array (AVLFG *lfg, double *a, int len)
 
static int compare_doubles (const double *a, const double *b, int len, double max_diff)
 
static int test_vector_fmul (AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, const float *v2)
 
static int test_vector_fmac_scalar (AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, const float *src0, float scale)
 
static int test_vector_fmul_scalar (AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, float scale)
 
static int test_vector_dmul_scalar (AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const double *v1, double scale)
 
static int test_vector_fmul_window (AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, const float *v2, const float *v3)
 
static int test_vector_fmul_add (AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, const float *v2, const float *v3)
 
static int test_vector_fmul_reverse (AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, const float *v2)
 
static int test_butterflies_float (AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, const float *v2)
 
static int test_scalarproduct_float (AVFloatDSPContext *fdsp, AVFloatDSPContext *cdsp, const float *v1, const float *v2)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

#define LEN   240
#define ARBITRARY_FMAC_SCALAR_CONST   0.005

Definition at line 111 of file float_dsp.c.

Referenced by test_vector_fmac_scalar().

#define ARBITRARY_FMUL_WINDOW_CONST   0.008

Definition at line 163 of file float_dsp.c.

Referenced by test_vector_fmul_window().

#define ARBITRARY_FMUL_ADD_CONST   0.005

Definition at line 180 of file float_dsp.c.

Referenced by test_vector_fmul_add().

#define ARBITRARY_SCALARPRODUCT_CONST   0.2

Definition at line 237 of file float_dsp.c.

Referenced by test_scalarproduct_float().

Function Documentation

static void fill_float_array ( AVLFG lfg,
float *  a,
int  len 
)
static

Definition at line 43 of file float_dsp.c.

Referenced by main().

static int compare_floats ( const float *  a,
const float *  b,
int  len,
float  max_diff 
)
static
static void fill_double_array ( AVLFG lfg,
double *  a,
int  len 
)
static

Definition at line 68 of file float_dsp.c.

Referenced by main().

static int compare_doubles ( const double *  a,
const double *  b,
int  len,
double  max_diff 
)
static

Definition at line 80 of file float_dsp.c.

Referenced by test_vector_dmul_scalar().

static int test_vector_fmul ( AVFloatDSPContext fdsp,
AVFloatDSPContext cdsp,
const float *  v1,
const float *  v2 
)
static

Definition at line 95 of file float_dsp.c.

Referenced by main().

static int test_vector_fmac_scalar ( AVFloatDSPContext fdsp,
AVFloatDSPContext cdsp,
const float *  v1,
const float *  src0,
float  scale 
)
static

Definition at line 112 of file float_dsp.c.

Referenced by main().

static int test_vector_fmul_scalar ( AVFloatDSPContext fdsp,
AVFloatDSPContext cdsp,
const float *  v1,
float  scale 
)
static

Definition at line 131 of file float_dsp.c.

Referenced by main().

static int test_vector_dmul_scalar ( AVFloatDSPContext fdsp,
AVFloatDSPContext cdsp,
const double *  v1,
double  scale 
)
static

Definition at line 147 of file float_dsp.c.

Referenced by main().

static int test_vector_fmul_window ( AVFloatDSPContext fdsp,
AVFloatDSPContext cdsp,
const float *  v1,
const float *  v2,
const float *  v3 
)
static

Definition at line 164 of file float_dsp.c.

Referenced by main().

static int test_vector_fmul_add ( AVFloatDSPContext fdsp,
AVFloatDSPContext cdsp,
const float *  v1,
const float *  v2,
const float *  v3 
)
static

Definition at line 181 of file float_dsp.c.

Referenced by main().

static int test_vector_fmul_reverse ( AVFloatDSPContext fdsp,
AVFloatDSPContext cdsp,
const float *  v1,
const float *  v2 
)
static

Definition at line 197 of file float_dsp.c.

Referenced by main().

static int test_butterflies_float ( AVFloatDSPContext fdsp,
AVFloatDSPContext cdsp,
const float *  v1,
const float *  v2 
)
static

Definition at line 213 of file float_dsp.c.

Referenced by main().

static int test_scalarproduct_float ( AVFloatDSPContext fdsp,
AVFloatDSPContext cdsp,
const float *  v1,
const float *  v2 
)
static

Definition at line 238 of file float_dsp.c.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 253 of file float_dsp.c.