diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-08 23:02:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-08 23:59:09 +0200 |
commit | 7e22514d98ecd56cc4e55dac7c813551e2152b80 (patch) | |
tree | 13c47e1e1215525323177a008d5406a7d61a418a /libavutil/ppc/float_dsp_init.c | |
parent | e016e3c9d7ce1493b952bdd8232f7e03077469a3 (diff) | |
parent | 3b81a18ba30bf18bab78f56744d8f3e1e4060104 (diff) | |
download | ffmpeg-7e22514d98ecd56cc4e55dac7c813551e2152b80.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
float_dsp: ppc: add a separate header for Altivec function prototypes
ARM: fix float_dsp breakage from d5a7229
Add a float DSP framework to libavutil
PPC: Move types_altivec.h and util_altivec.h from libavcodec to libavutil
ARM: Move asm.S from libavcodec to libavutil
vc1dsp: mark put/avg_vc1_mspel_mc() always_inline
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 | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libavutil/ppc/float_dsp_init.c b/libavutil/ppc/float_dsp_init.c new file mode 100644 index 0000000000..d0ae788779 --- /dev/null +++ b/libavutil/ppc/float_dsp_init.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2006 Luca Barbato <lu_zero@gentoo.org> + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" +#include "libavutil/cpu.h" +#include "libavutil/float_dsp.h" +#include "float_dsp_altivec.h" + +void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int bit_exact) +{ +#if HAVE_ALTIVEC + int mm_flags = av_get_cpu_flags(); + + if (!(mm_flags & AV_CPU_FLAG_ALTIVEC)) + return; + + fdsp->vector_fmul = ff_vector_fmul_altivec; +#endif +} |