Go to the documentation of this file.
32 #define randomize_buffer(buf) \
35 double bmg[2], stddev = 10.0, mean = 0.0; \
37 for (i = 0; i < LEN; i += 2) { \
38 av_bmg_get(&checkasm_lfg, bmg); \
39 buf[i] = bmg[0] * stddev + mean; \
40 buf[i + 1] = bmg[1] * stddev + mean; \
55 for (
i = 0;
i <
LEN;
i++) {
58 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
59 i, cdst[
i], odst[
i], cdst[
i] - odst[
i]);
78 for (
i = 0;
i <
LEN;
i++) {
81 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
82 i, cdst[
i], odst[
i], cdst[
i] - odst[
i]);
90 #define ARBITRARY_FMUL_ADD_CONST 0.005
98 const float *src2,
int len);
102 for (
i = 0;
i <
LEN;
i++) {
104 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
105 i, cdst[
i], odst[
i], cdst[
i] - odst[
i]);
123 for (
i = 0;
i <
LEN;
i++) {
126 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
127 i, cdst[
i], odst[
i], cdst[
i] - odst[
i]);
135 #define ARBITRARY_FMUL_WINDOW_CONST 0.008
143 const float *
win,
int len);
147 for (
i = 0;
i <
LEN;
i++) {
149 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
150 i, cdst[
i], odst[
i], cdst[
i] - odst[
i]);
158 #define ARBITRARY_FMAC_SCALAR_CONST 0.005
167 memcpy(cdst, src2,
LEN *
sizeof(*src2));
168 memcpy(odst, src2,
LEN *
sizeof(*src2));
172 for (
i = 0;
i <
LEN;
i++) {
174 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
175 i, cdst[
i], odst[
i], cdst[
i] - odst[
i]);
180 memcpy(odst, src2,
LEN *
sizeof(*src2));
194 for (
i = 0;
i <
LEN;
i++) {
197 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
i,
198 cdst[
i], odst[
i], cdst[
i] - odst[
i]);
206 #define ARBITRARY_DMAC_SCALAR_CONST 0.005
215 memcpy(cdst, src2,
LEN *
sizeof(*src2));
216 memcpy(odst, src2,
LEN *
sizeof(*src2));
219 for (
i = 0;
i <
LEN;
i++) {
221 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
222 i, cdst[
i], odst[
i], cdst[
i] - odst[
i]);
227 memcpy(odst, src2,
LEN *
sizeof(*src2));
249 for (
i = 0;
i <
LEN;
i++) {
252 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
253 i, cdst[
i], odst[
i], cdst[
i] - odst[
i]);
254 fprintf(stderr,
"%d: %- .12f - %- .12f = % .12g\n",
255 i, cdst1[
i], odst1[
i], cdst1[
i] - odst1[
i]);
265 #define ARBITRARY_SCALARPRODUCT_CONST 0.2
275 fprintf(stderr,
"%- .12f - %- .12f = % .12g\n",
276 cprod, oprod, cprod - oprod);
296 fprintf(stderr,
"floatdsp: Out of memory error\n");
334 report(
"butterflies_float");
337 report(
"scalarproduct_float");
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...
#define randomize_buffer(buf)
int float_near_abs_eps(float a, float b, float eps)
#define check_func(func,...)
#define declare_func_float(ret,...)
static void test_vector_dmac_scalar(const double *src0, const double *src1, const double *src2)
void(* vector_dmul)(double *dst, const double *src0, const double *src1, int len)
Calculate the entry wise product of two vectors of doubles and store the result in a vector of double...
void(* butterflies_float)(float *av_restrict v1, float *av_restrict v2, int len)
Calculate the sum and difference of two vectors of floats.
static float win(SuperEqualizerContext *s, float n, int N)
#define ARBITRARY_FMUL_ADD_CONST
int double_near_abs_eps(double a, double b, double eps)
void checkasm_check_float_dsp(void)
float(* scalarproduct_float)(const float *v1, const float *v2, int len)
Calculate the scalar product of two vectors of floats.
static void test_butterflies_float(const float *src0, const float *src1)
static void test_vector_fmul_scalar(const float *src0, const float *src1)
#define LOCAL_ALIGNED_16(t, v,...)
static float mul(float src0, float src1)
static __device__ float fabs(float a)
#define LOCAL_ALIGNED_32(t, v,...)
static void test_vector_fmul(const float *src0, const float *src1)
void(* vector_fmul_scalar)(float *dst, const float *src, float mul, int len)
Multiply a vector of floats by a scalar float.
#define ARBITRARY_FMAC_SCALAR_CONST
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 ARBITRARY_FMUL_WINDOW_CONST
static void test_vector_dmul_scalar(const double *src0, const double *src1)
static void test_vector_fmul_add(const float *src0, const float *src1, const float *src2)
#define ARBITRARY_SCALARPRODUCT_CONST
#define i(width, name, range_min, range_max)
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.
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 ARBITRARY_DMAC_SCALAR_CONST
static void test_vector_fmul_window(const float *src0, const float *src1, const float *win)
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_scalarproduct_float(const float *src0, const float *src1)
void(* vector_fmul_window)(float *dst, const float *src0, const float *src1, const float *win, int len)
Overlap/add with window function.
#define declare_func(ret,...)
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float DSP context.
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.
static void test_vector_dmul(const double *src0, const double *src1)
static void test_vector_fmac_scalar(const float *src0, const float *src1, const float *src2)