31 #define MAX_SIZE (32 * 128)
33 #define randomize_float(buf, len) \
36 for (i = 0; i < len; i++) { \
37 float f = (float)rnd() / (UINT_MAX >> 5) - 16.0f; \
42 #define randomize_int(buf, len, size, bits) \
45 for (i = 0; i < len; i++) { \
46 uint ## size ## _t r = rnd() & ((1LL << bits) - 1); \
47 AV_WN ## size ## A(buf + i, -(1LL << (bits - 1)) + r); \
60 unsigned int len_bits_minus4, v1_bits, v2_bits,
len;
66 len_bits_minus4 =
rnd() % 8;
67 len =
rnd() & ((1 << len_bits_minus4) - 1);
68 len = 16 *
FFMAX(len, 1);
72 v1_bits = 1 +
rnd() % 15;
73 v2_bits =
FFMIN(32 - (len_bits_minus4 + 4) - v1_bits - 1, 15);
96 val1 =
FFSIGN(val1) * (val1 & ((1 << 24) - 1));
98 val2 =
FFSIGN(val2) * (val2 & ((1 << 24) - 1));
100 min =
FFMIN(val1, val2);
101 max =
FFMAX(val1, val2);
106 len = 32 *
FFMAX(len, 1);
110 if (memcmp(dst0, dst1, len *
sizeof(*dst0)))
119 float val1, val2,
min, max;
123 int len,
float min,
float max);
125 val1 = (float)
rnd() / (UINT_MAX >> 1) - 1.0
f;
126 val2 = (float)
rnd() / (UINT_MAX >> 1) - 1.0
f;
128 min =
FFMIN(val1, val2);
129 max =
FFMAX(val1, val2);
134 len = 16 *
FFMAX(len, 1);
138 for (i = 0; i <
len; i++) {
void(* vector_clip_int32)(int32_t *dst, const int32_t *src, int32_t min, int32_t max, unsigned int len)
Clip each element in an array of int32_t to a given minimum and maximum value.
int32_t(* scalarproduct_int16)(const int16_t *v1, const int16_t *v2, int len)
Calculate scalar product of two vectors.
#define randomize_int(buf, len, size, bits)
av_cold void ff_audiodsp_init(AudioDSPContext *c)
void checkasm_check_audiodsp(void)
#define randomize_float(buf, len)
#define declare_func_emms(cpu_flags, ret,...)
int float_near_ulp_array(const float *a, const float *b, unsigned max_ulp, unsigned len)
#define AV_CPU_FLAG_MMX
standard MMX
#define check_func(func,...)
void(* vector_clipf)(float *dst, const float *src, int len, float min, float max)
common internal and external API header
#define LOCAL_ALIGNED(a, t, v,...)