30 #define randomize_buffer(buf)                 \ 
   33     double bmg[2], stddev = 10.0, mean = 0.0; \ 
   35     for (i = 0; i < LEN; i += 2) {            \ 
   36         av_bmg_get(&checkasm_lfg, bmg);       \ 
   37         buf[i]     = bmg[0] * stddev + mean;  \ 
   38         buf[i + 1] = bmg[1] * stddev + mean;  \ 
   48     declare_func(
void, 
float *dst, 
const float *src0, 
const float *src1,
 
   53     for (i = 0; i < 
LEN; i++) {
 
   55             fprintf(stderr, 
"%d: %- .12f - %- .12f = % .12g\n",
 
   56                     i, cdst[i], odst[i], cdst[i] - odst[i]);
 
   64 #define ARBITRARY_FMUL_ADD_CONST 0.005 
   71     declare_func(
void, 
float *dst, 
const float *src0, 
const float *src1,
 
   72                      const float *src2, 
int len);
 
   76     for (i = 0; i < 
LEN; i++) {
 
   78             fprintf(stderr, 
"%d: %- .12f - %- .12f = % .12g\n",
 
   79                     i, cdst[i], odst[i], cdst[i] - odst[i]);
 
   97         for (i = 0; i < 
LEN; i++) {
 
   99                 fprintf(stderr, 
"%d: %- .12f - %- .12f = % .12g\n",
 
  100                         i, cdst[i], odst[i], cdst[i] - odst[i]);
 
  108 #define ARBITRARY_FMUL_WINDOW_CONST 0.008 
  115     declare_func(
void, 
float *dst, 
const float *src0, 
const float *src1,
 
  116                  const float *win, 
int len);
 
  120     for (i = 0; i < 
LEN; i++) {
 
  122             fprintf(stderr, 
"%d: %- .12f - %- .12f = % .12g\n",
 
  123                     i, cdst[i], odst[i], cdst[i] - odst[i]);
 
  128     bench_new(odst, src0, src1, win, LEN / 2);
 
  131 #define ARBITRARY_FMAC_SCALAR_CONST 0.005 
  140     memcpy(cdst, src2, 
LEN * 
sizeof(*src2));
 
  141     memcpy(odst, src2, 
LEN * 
sizeof(*src2));
 
  145     for (i = 0; i < 
LEN; i++) {
 
  147             fprintf(stderr, 
"%d: %- .12f - %- .12f = % .12g\n",
 
  148                     i, cdst[i], odst[i], cdst[i] - odst[i]);
 
  153     memcpy(odst, src2, LEN * 
sizeof(*src2));
 
  167     for (i = 0; i < 
LEN; i++) {
 
  169             fprintf(stderr, 
"%d: %- .12f - %- .12f = % .12g\n", i,
 
  170                     cdst[i], odst[i], cdst[i] - odst[i]);
 
  178 #define ARBITRARY_DMAC_SCALAR_CONST 0.005 
  187     memcpy(cdst, src2, 
LEN * 
sizeof(*src2));
 
  188     memcpy(odst, src2, 
LEN * 
sizeof(*src2));
 
  191     for (i = 0; i < 
LEN; i++) {
 
  193             fprintf(stderr, 
"%d: %- .12f - %- .12f = % .12g\n",
 
  194                     i, cdst[i], odst[i], cdst[i] - odst[i]);
 
  199     memcpy(odst, src2, LEN * 
sizeof(*src2));
 
  211     declare_func(
void, 
float *av_restrict src0, 
float *av_restrict src1,
 
  214     memcpy(cdst,  src0, 
LEN * 
sizeof(*src0));
 
  215     memcpy(cdst1, src1, 
LEN * 
sizeof(*src1));
 
  216     memcpy(odst,  src0, 
LEN * 
sizeof(*src0));
 
  217     memcpy(odst1, src1, 
LEN * 
sizeof(*src1));
 
  221     for (i = 0; i < 
LEN; i++) {
 
  224             fprintf(stderr, 
"%d: %- .12f - %- .12f = % .12g\n",
 
  225                     i, cdst[i], odst[i], cdst[i] - odst[i]);
 
  226             fprintf(stderr, 
"%d: %- .12f - %- .12f = % .12g\n",
 
  227                     i, cdst1[i], odst1[i], cdst1[i] - odst1[i]);
 
  232     memcpy(odst,  src0, LEN * 
sizeof(*src0));
 
  233     memcpy(odst1, src1, LEN * 
sizeof(*src1));
 
  237 #define ARBITRARY_SCALARPRODUCT_CONST 0.2 
  247         fprintf(stderr, 
"%- .12f - %- .12f = % .12g\n",
 
  248                 cprod, oprod, cprod - oprod);
 
  268         fprintf(stderr, 
"floatdsp: Out of memory error\n");
 
  304     report(
"butterflies_float");
 
  307     report(
"scalarproduct_float");
 
static void test_vector_dmac_scalar(const double *src0, const double *src1, const double *src2)
static void test_vector_fmul_scalar(const float *src0, const float *src1)
static float win(SuperEqualizerContext *s, float n, int N)
#define ARBITRARY_FMUL_ADD_CONST
float(* scalarproduct_float)(const float *v1, const float *v2, int len)
Calculate the scalar product of two vectors of floats. 
static void test_vector_fmul(const float *src0, const float *src1)
void(* vector_fmul_reverse)(float *dst, const float *src0, const float *src1, int len)
Calculate the entry wise product of two vectors of floats, and store the result in a vector of floats...
void(* vector_fmac_scalar)(float *dst, const float *src, float mul, int len)
Multiply a vector of floats by a scalar float and add to destination vector. 
int float_near_abs_eps(float a, float b, float eps)
void checkasm_check_float_dsp(void)
void(* vector_fmul_window)(float *dst, const float *src0, const float *src1, const float *win, int len)
Overlap/add with window function. 
#define ARBITRARY_DMAC_SCALAR_CONST
void(* vector_dmac_scalar)(double *dst, const double *src, double mul, int len)
Multiply a vector of doubles by a scalar double and add to destination vector. 
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float DSP context. 
void(* vector_fmul)(float *dst, const float *src0, const float *src1, int len)
Calculate the entry wise product of two vectors of floats and store the result in a vector of floats...
#define declare_func(ret,...)
void(* butterflies_float)(float *av_restrict v1, float *av_restrict v2, int len)
Calculate the sum and difference of two vectors of floats. 
void(* vector_dmul_scalar)(double *dst, const double *src, double mul, int len)
Multiply a vector of double by a scalar double. 
static void test_vector_fmul_window(const float *src0, const float *src1, const float *win)
common internal API header 
void(* vector_fmul_scalar)(float *dst, const float *src, float mul, int len)
Multiply a vector of floats by a scalar float. 
int double_near_abs_eps(double a, double b, double eps)
#define randomize_buffer(buf)
#define declare_func_float(ret,...)
#define ARBITRARY_FMUL_WINDOW_CONST
static void test_vector_dmul_scalar(const double *src0, const double *src1)
static void test_butterflies_float(const float *src0, const float *src1)
static void test_vector_fmac_scalar(const float *src0, const float *src1, const float *src2)
void(* vector_fmul_add)(float *dst, const float *src0, const float *src1, const float *src2, int len)
Calculate the entry wise product of two vectors of floats, add a third vector of floats and store the...
#define check_func(func,...)
static void test_scalarproduct_float(const float *src0, const float *src1)
#define ARBITRARY_FMAC_SCALAR_CONST
#define LOCAL_ALIGNED_32(t, v,...)
#define ARBITRARY_SCALARPRODUCT_CONST
#define LOCAL_ALIGNED_16(t, v,...)
static void test_vector_fmul_add(const float *src0, const float *src1, const float *src2)