21 #include "libavutil/attributes.h"
22 #include "libavutil/cpu.h"
46 const float *src2,
int len);
48 const float *src2,
int len);
51 const float *src1,
int len);
53 const float *src1,
int len);
59 #if HAVE_6REGS && HAVE_INLINE_ASM
60 static void vector_fmul_window_3dnowext(
float *dst,
const float *src0,
61 const float *src1,
const float *win,
68 "pswapd (%5, %1), %%mm1 \n"
69 "movq (%5, %0), %%mm0 \n"
70 "pswapd (%4, %1), %%mm5 \n"
71 "movq (%3, %0), %%mm4 \n"
72 "movq %%mm0, %%mm2 \n"
73 "movq %%mm1, %%mm3 \n"
74 "pfmul %%mm4, %%mm2 \n"
75 "pfmul %%mm5, %%mm3 \n"
76 "pfmul %%mm4, %%mm1 \n"
77 "pfmul %%mm5, %%mm0 \n"
78 "pfadd %%mm3, %%mm2 \n"
79 "pfsub %%mm0, %%mm1 \n"
80 "pswapd %%mm2, %%mm2 \n"
81 "movq %%mm1, (%2, %0) \n"
82 "movq %%mm2, (%2, %1) \n"
88 :
"r"(dst +
len),
"r"(src0 + len),
"r"(src1),
"r"(win + len)
92 static void vector_fmul_window_sse(
float *dst,
const float *src0,
93 const float *src1,
const float *win,
int len)
99 "movaps (%5, %1), %%xmm1 \n"
100 "movaps (%5, %0), %%xmm0 \n"
101 "movaps (%4, %1), %%xmm5 \n"
102 "movaps (%3, %0), %%xmm4 \n"
103 "shufps $0x1b, %%xmm1, %%xmm1 \n"
104 "shufps $0x1b, %%xmm5, %%xmm5 \n"
105 "movaps %%xmm0, %%xmm2 \n"
106 "movaps %%xmm1, %%xmm3 \n"
107 "mulps %%xmm4, %%xmm2 \n"
108 "mulps %%xmm5, %%xmm3 \n"
109 "mulps %%xmm4, %%xmm1 \n"
110 "mulps %%xmm5, %%xmm0 \n"
111 "addps %%xmm3, %%xmm2 \n"
112 "subps %%xmm0, %%xmm1 \n"
113 "shufps $0x1b, %%xmm2, %%xmm2 \n"
114 "movaps %%xmm1, (%2, %0) \n"
115 "movaps %%xmm2, (%2, %1) \n"
120 :
"r"(dst +
len),
"r"(src0 + len),
"r"(src1),
"r"(win + len)
129 #if HAVE_6REGS && HAVE_INLINE_ASM
float(* scalarproduct_float)(const float *v1, const float *v2, int len)
Calculate the scalar product of two vectors of floats.
#define EXTERNAL_SSE(flags)
void(* vector_fmac_scalar)(float *dst, const float *src, float mul, int len)
Multiply a vector of floats by a scalar float and add to destination vector.
void ff_vector_fmul_reverse_avx(float *dst, const float *src0, const float *src1, int len)
void(* vector_fmul)(float *dst, const float *src0, const float *src1, int len)
Calculate the product of two vectors of floats and store the result in a vector of floats...
av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
float ff_scalarproduct_float_sse(const float *v1, const float *v2, int order)
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
void(* vector_fmul_window)(float *dst, const float *src0, const float *src1, const float *win, int len)
Overlap/add with window function.
void(* vector_dmul_scalar)(double *dst, const double *src, double mul, int len)
Multiply a vector of double by a scalar double.
void ff_vector_fmul_add_avx(float *dst, const float *src0, const float *src1, const float *src2, int len)
#define INLINE_AMD3DNOWEXT(flags)
#define EXTERNAL_AVX(flags)
void ff_vector_fmac_scalar_avx(float *dst, const float *src, float mul, int len)
void ff_vector_dmul_scalar_sse2(double *dst, const double *src, double mul, int len)
void ff_butterflies_float_sse(float *src0, float *src1, int len)
void ff_vector_dmul_scalar_avx(double *dst, const double *src, double mul, int len)
void(* vector_fmul_scalar)(float *dst, const float *src, float mul, int len)
Multiply a vector of floats by a scalar float.
void ff_vector_fmul_sse(float *dst, const float *src0, const float *src1, int len)
void ff_vector_fmac_scalar_sse(float *dst, const float *src, float mul, int len)
#define EXTERNAL_SSE2(flags)
void ff_vector_fmul_scalar_sse(float *dst, const float *src, float mul, int len)
void ff_vector_fmul_reverse_sse(float *dst, const float *src0, const float *src1, int len)
void(* vector_fmul_add)(float *dst, const float *src0, const float *src1, const float *src2, int len)
Calculate the product of two vectors of floats, add a third vector of floats and store the result in ...
void ff_vector_fmul_add_sse(float *dst, const float *src0, const float *src1, const float *src2, int len)
void(* butterflies_float)(float *restrict v1, float *restrict v2, int len)
Calculate the sum and difference of two vectors of floats.
void ff_vector_fmul_avx(float *dst, const float *src0, const float *src1, int len)
#define INLINE_SSE(flags)
void(* vector_fmul_reverse)(float *dst, const float *src0, const float *src1, int len)
Calculate the product of two vectors of floats, and store the result in a vector of floats...