Go to the documentation of this file.
32 #define randomize_exp(buf, len) \
35 for (i = 0; i < len; i++) { \
36 buf[i] = (uint8_t)rnd(); \
40 #define randomize_i24(buf, len) \
43 for (i = 0; i < len; i++) { \
44 int32_t v = (int32_t)rnd(); \
45 int32_t u = (v & 0xFFFFFF); \
46 buf[i] = (v < 0) ? -u : u; \
50 #define randomize_float(buf, len) \
53 for (i = 0; i < len; i++) { \
54 float f = (float)rnd() / (UINT_MAX >> 5) - 16.0f; \
62 #define EXP_SIZE (MAX_CTXT * MAX_COEFS)
72 if (
check_func(
c->ac3_exponent_min,
"ac3_exponent_min_reuse%d", n)) {
88 report(
"ac3_exponent_min");
100 for (n = 512; n <=
MAX_EXPS; n += 256) {
101 if (
check_func(
c->extract_exponents,
"ac3_extract_exponents_n%d", n)) {
107 if (memcmp(v1, v2, n) != 0)
114 report(
"ac3_extract_exponents");
118 #define BUF_SIZE 1024
125 if (
check_func(
c->float_to_fixed24,
"float_to_fixed24")) {
139 report(
"float_to_fixed24");
155 "ac3_sum_square_bufferfly_int32")) {
159 if (memcmp(v1, v2,
sizeof(
int64_t[4])) != 0)
165 report(
"ac3_sum_square_butterfly_int32");
174 declare_func(
void,
float[4],
const float *,
const float *,
int);
180 "ac3_sum_square_bufferfly_float")) {
190 report(
"ac3_sum_square_butterfly_float");
static void check_ac3_exponent_min(AC3DSPContext *c)
#define check_func(func,...)
static void check_ac3_extract_exponents(AC3DSPContext *c)
static void check_ac3_sum_square_butterfly_float(AC3DSPContext *c)
av_cold void ff_ac3dsp_init(AC3DSPContext *c)
static void check_ac3_sum_square_butterfly_int32(AC3DSPContext *c)
#define LOCAL_ALIGNED_16(t, v,...)
#define randomize_exp(buf, len)
#define LOCAL_ALIGNED_32(t, v,...)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define randomize_i24(buf, len)
void checkasm_check_ac3dsp(void)
static void check_float_to_fixed24(AC3DSPContext *c)
int float_near_ulp_array(const float *a, const float *b, unsigned max_ulp, unsigned len)
#define randomize_float(buf, len)
#define declare_func(ret,...)