Index: libavcodec/ppc/float_altivec.c =================================================================== --- libavcodec/ppc/float_altivec.c (revision 0) +++ libavcodec/ppc/float_altivec.c (revision 0) @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2006 Luca Barbato + * + * This library 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 of the License, or (at your option) any later version. + * + * This library 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 this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "../dsputil.h" + +#include "gcc_fixes.h" + +#include "dsputil_altivec.h" + +static void vector_fmul_altivec(float *dst, const float *src, int len) +{ + int i; + vector float d0, d1, s, zero = (vector float)vec_splat_u32(0); + for(i=0; ivector_fmul = vector_fmul_altivec; + c->vector_fmul_reverse = vector_fmul_reverse_altivec; + c->vector_fmul_add_add = vector_fmul_add_add_altivec; + if(!(avctx->flags & CODEC_FLAG_BITEXACT)) + c->float_to_int16 = float_to_int16_altivec; +} + Index: libavcodec/ppc/dsputil_ppc.c =================================================================== --- libavcodec/ppc/dsputil_ppc.c (revision 5990) +++ libavcodec/ppc/dsputil_ppc.c (working copy) @@ -36,6 +36,7 @@ void dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx); void vc1dsp_init_altivec(DSPContext* c, AVCodecContext *avctx); void snow_init_altivec(DSPContext* c, AVCodecContext *avctx); +void float_init_altivec(DSPContext* c, AVCodecContext *avctx); #endif @@ -270,7 +271,7 @@ dsputil_init_altivec(c, avctx); snow_init_altivec(c, avctx); vc1dsp_init_altivec(c, avctx); - + float_init_altivec(c, avctx); c->gmc1 = gmc1_altivec; #ifdef CONFIG_ENCODERS Index: libavcodec/Makefile =================================================================== --- libavcodec/Makefile (revision 5990) +++ libavcodec/Makefile (working copy) @@ -351,7 +351,8 @@ ppc/fdct_altivec.o \ ppc/dsputil_h264_altivec.o \ ppc/dsputil_snow_altivec.o \ - ppc/vc1dsp_altivec.o + ppc/vc1dsp_altivec.o \ + ppc/float_altivec.o CFLAGS += $(CFLAGS-yes) OBJS += $(OBJS-yes)