00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "config.h"
00020
00021 #include "libavutil/cpu.h"
00022 #include "libavutil/float_dsp.h"
00023 #include "cpu.h"
00024
00025 extern void ff_vector_fmul_sse(float *dst, const float *src0, const float *src1,
00026 int len);
00027 extern void ff_vector_fmul_avx(float *dst, const float *src0, const float *src1,
00028 int len);
00029
00030 extern void ff_vector_fmac_scalar_sse(float *dst, const float *src, float mul,
00031 int len);
00032 extern void ff_vector_fmac_scalar_avx(float *dst, const float *src, float mul,
00033 int len);
00034
00035 void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp)
00036 {
00037 int mm_flags = av_get_cpu_flags();
00038
00039 if (EXTERNAL_SSE(mm_flags)) {
00040 fdsp->vector_fmul = ff_vector_fmul_sse;
00041 fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse;
00042 }
00043 if (EXTERNAL_AVX(mm_flags)) {
00044 fdsp->vector_fmul = ff_vector_fmul_avx;
00045 fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx;
00046 }
00047 }