Go to the documentation of this file.
26 uint32_t maxi, uint32_t maxisign)
32 else if ((ai ^ (1
U << 31)) > maxisign)
44 uint32_t maxisign = maxi ^ (1
U << 31);
46 for (
i = 0;
i <
len;
i += 8) {
63 if (min < 0 && max > 0) {
66 for (
i = 0;
i <
len;
i += 8) {
static void vector_clipf_c_opposite_sign(float *dst, const float *src, float min, float max, int len)
void ff_audiodsp_init_x86(AudioDSPContext *c)
av_cold void ff_audiodsp_init(AudioDSPContext *c)
av_cold void ff_audiodsp_init_ppc(AudioDSPContext *c)
static av_always_inline uint32_t av_float2int(float f)
Reinterpret a float as a 32-bit integer.
static av_always_inline float av_int2float(uint32_t i)
Reinterpret a 32-bit integer as a float.
static void vector_clipf_c(float *dst, const float *src, int len, float min, float max)
av_cold void ff_audiodsp_init_arm(AudioDSPContext *c)
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
static void vector_clip_int32_c(int32_t *dst, const int32_t *src, int32_t min, int32_t max, unsigned int len)
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
#define i(width, name, range_min, range_max)
static int32_t scalarproduct_int16_c(const int16_t *v1, const int16_t *v2, int order)
static float clipf_c_one(float a, uint32_t mini, uint32_t maxi, uint32_t maxisign)
void ff_audiodsp_init_riscv(AudioDSPContext *c)