diff --git a/libavcodec/ppc/float_altivec.c b/libavcodec/ppc/float_altivec.c index 298172554d..600ce2774e 100644 --- a/libavcodec/ppc/float_altivec.c +++ b/libavcodec/ppc/float_altivec.c @@ -186,11 +186,64 @@ void float_to_int16_altivec(int16_t *dst, const float *src, int len) } } +static void +float_to_int16_interleave_altivec(int16_t *dst, const float **src, + long len, int channels) +{ + int i; + vector signed short d0, d1, d2, c0, c1, t0, t1; + vector unsigned char align; + if(channels == 1) + float_to_int16_altivec(dst, src[0], len); + else + if (channels == 2) { + if(((long)dst)&15) + 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)) + if(!(avctx->flags & CODEC_FLAG_BITEXACT)) { c->float_to_int16 = float_to_int16_altivec; + c->float_to_int16_interleave = float_to_int16_interleave_altivec; + } }