Go to the documentation of this file.
38 #define randomize_input() \
41 for (i = 0; i < BUF_SIZE; i++) { \
42 float f = (float)rnd() / (UINT_MAX >> 5) - 16.0f; \
69 int i, offset0 = 0, offset1 = 0, offset_b = 0;
72 float[32],
const float[512],
float[32],
float[32],
float,
av_tx_fn);
74 memset(buf2_0, 0,
sizeof(*buf2_0) *
BUF_SIZE);
75 memset(buf2_1, 0,
sizeof(*buf2_1) *
BUF_SIZE);
76 memset(buf2_b, 0,
sizeof(*buf2_b) *
BUF_SIZE);
77 memset(buf0, 0,
sizeof(*buf2_0) * 512);
78 memset(buf1, 0,
sizeof(*buf2_1) * 512);
79 memset(buf_b, 0,
sizeof(*buf2_b) * 512);
82 for (
i = 0;
i < 20;
i++) {
86 memset(out0, 0,
sizeof(*out0) *
BUF_SIZE);
87 memset(out1, 0,
sizeof(*out1) *
BUF_SIZE);
88 memset(out_b, 0,
sizeof(*out_b) *
BUF_SIZE);
93 out0, in,
scale, imdct_fn);
95 out1, in,
scale, imdct_fn);
97 if (offset0 != offset1) {
99 fprintf(stderr,
"offsets do not match: %d, %d", offset0, offset1);
109 o0.
f = out0[j]; o1.
f = out1[j];
110 b0.f = buf2_0[j],
b1.f = buf2_1[j];
111 fprintf(stderr,
"out: %11g (0x%08x); %11g (0x%08x); abs diff %11g\n",
113 fprintf(stderr,
"buf2: %11g (0x%08x); %11g (0x%08x); abs diff %11g\n",
120 out_b, in,
scale, imdct_fn);
#define check_func(func,...)
av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
Initialize a transform context with the given configuration (i)MDCTs with an odd length are currently...
av_cold void ff_synth_filter_init(SynthFilterContext *c)
static SDL_Window * window
#define randomize_input()
static double b1(void *priv, double x, double y)
const float ff_dca_fir_32bands_nonperfect[512]
int float_near_abs_eps_ulp(float a, float b, float eps, unsigned max_ulp)
static av_always_inline float scale(float x, float s)
static __device__ float fabsf(float a)
void checkasm_check_synth_filter(void)
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
#define LOCAL_ALIGNED(a, t, v,...)
@ AV_TX_FLOAT_MDCT
Standard MDCT with a sample data type of float, double or int32_t, respecively.
av_cold void av_tx_uninit(AVTXContext **ctx)
Frees a context and sets *ctx to NULL, does nothing when *ctx == NULL.
#define i(width, name, range_min, range_max)
#define declare_func(ret,...)
const float ff_dca_fir_32bands_perfect[512]
void(* synth_filter_float)(AVTXContext *imdct, float *synth_buf_ptr, int *synth_buf_offset, float synth_buf2[32], const float window[512], float out[32], float in[32], float scale, av_tx_fn imdct_fn)
static double b0(void *priv, double x, double y)