diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2015-05-11 02:44:10 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-05-31 12:07:11 +0200 |
commit | eecd29b3fd7fee221580798346d6582b75c7ade4 (patch) | |
tree | 00296f39437ffc7ce8e83ada870d634b7415b625 /libavutil/ppc/float_dsp_init.c | |
parent | 7d07ee5a9bd170a06d26fd967cf8de5d3b1ce331 (diff) | |
download | ffmpeg-eecd29b3fd7fee221580798346d6582b75c7ade4.tar.gz |
ppc: vsx: Implement float_dsp
Diffstat (limited to 'libavutil/ppc/float_dsp_init.c')
-rw-r--r-- | libavutil/ppc/float_dsp_init.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/libavutil/ppc/float_dsp_init.c b/libavutil/ppc/float_dsp_init.c index e81dc7a441..4407962d4d 100644 --- a/libavutil/ppc/float_dsp_init.c +++ b/libavutil/ppc/float_dsp_init.c @@ -24,18 +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 HAVE_BIGENDIAN - 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 (HAVE_BIGENDIAN && 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; - if (!bit_exact) { - fdsp->vector_fmul_window = ff_vector_fmul_window_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_vsx; + } } -#endif } |