31 static void int32_to_float_fmul_scalar_altivec(
float *dst,
const int32_t *
src,
39 vector
float src1, src2, dst1, dst2, mul_v,
zero;
41 zero = (vector float)vec_splat_u32(0);
43 mul_v = vec_splat(mul_u.v, 0);
45 for (i = 0; i <
len; i += 8) {
46 src1 = vec_ctf(vec_ld(0, src+i), 0);
47 src2 = vec_ctf(vec_ld(16, src+i), 0);
48 dst1 = vec_madd(src1, mul_v, zero);
49 dst2 = vec_madd(src2, mul_v, zero);
50 vec_st(dst1, 0, dst+i);
51 vec_st(dst2, 16, dst+i);
Memory handling functions.
Macro definitions for various function/variable attributes.
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
#define PPC_ALTIVEC(flags)
static float mul(float src0, float src1)
void(* int32_to_float_fmul_scalar)(float *dst, const int32_t *src, float mul, int len)
Convert an array of int32_t to float and multiply by a float value.
av_cold void ff_fmt_convert_init_ppc(FmtConvertContext *c, AVCodecContext *avctx)
main external API structure.
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Contains misc utility macros and inline functions.