# HG changeset patch # User lu_zero # Date 1219525786 0 # Node ID ad4bf45b9b63ee2f5a43244c06ba2db577b91547 # Parent e1876d3200eedb544fd289b3dd708c151b1f385d Introduce float_to_int16_interleave_altivec, tested with vorbis diff -r e1876d3200ee -r ad4bf45b9b63 ppc/float_altivec.c --- a/ppc/float_altivec.c Sat Aug 23 21:02:30 2008 +0000 +++ b/ppc/float_altivec.c Sat Aug 23 21:09:46 2008 +0000 @@ -186,11 +186,64 @@ } } +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; + } }