diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-31 23:23:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-31 23:42:36 +0200 |
commit | da9a6f4a2b9a3d0ab2224923b2e8f984d928791e (patch) | |
tree | 7664bfa461bc7dc1d371f022f419c1271c4ef275 /libavutil/ppc/float_dsp_init.c | |
parent | 1aff90504aa65f1a53304d041ceef940f8b41c9d (diff) | |
parent | eecd29b3fd7fee221580798346d6582b75c7ade4 (diff) | |
download | ffmpeg-da9a6f4a2b9a3d0ab2224923b2e8f984d928791e.tar.gz |
Merge commit 'eecd29b3fd7fee221580798346d6582b75c7ade4'
* commit 'eecd29b3fd7fee221580798346d6582b75c7ade4':
ppc: vsx: Implement float_dsp
Conflicts:
libavutil/ppc/float_dsp_init.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/ppc/float_dsp_init.c')
-rw-r--r-- | libavutil/ppc/float_dsp_init.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/libavutil/ppc/float_dsp_init.c b/libavutil/ppc/float_dsp_init.c index 9dd2072b7a..c10d7fb281 100644 --- a/libavutil/ppc/float_dsp_init.c +++ b/libavutil/ppc/float_dsp_init.c @@ -24,17 +24,26 @@ #include "libavutil/float_dsp.h" #include "libavutil/ppc/cpu.h" #include "float_dsp_altivec.h" +#include "float_dsp_vsx.h" av_cold void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int bit_exact) { - if (!PPC_ALTIVEC(av_get_cpu_flags())) - return; + if (PPC_ALTIVEC(av_get_cpu_flags())) { + fdsp->vector_fmul = ff_vector_fmul_altivec; + fdsp->vector_fmul_add = ff_vector_fmul_add_altivec; + fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_altivec; - fdsp->vector_fmul = ff_vector_fmul_altivec; - fdsp->vector_fmul_add = ff_vector_fmul_add_altivec; - fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_altivec; + if (!bit_exact) { + fdsp->vector_fmul_window = ff_vector_fmul_window_altivec; + } + } + if (PPC_VSX(av_get_cpu_flags())) { + fdsp->vector_fmul = ff_vector_fmul_vsx; + fdsp->vector_fmul_add = ff_vector_fmul_add_vsx; + fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_vsx; - if (!bit_exact) { - fdsp->vector_fmul_window = ff_vector_fmul_window_altivec; + if (!bit_exact) { + fdsp->vector_fmul_window = ff_vector_fmul_window_vsx; + } } } |