diff options
author | Måns Rullgård <mans@mansr.com> | 2009-09-27 16:51:54 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2009-09-27 16:51:54 +0000 |
commit | 952e87219815b0d8a698e0c098e4fb7984f8b19d (patch) | |
tree | c1cd595004f4e6f151c13e5c85cf33c01a736c04 /libavcodec/ppc | |
parent | 7f5c14210b3184d6c4330bf63af9512808c37379 (diff) | |
download | ffmpeg-952e87219815b0d8a698e0c098e4fb7984f8b19d.tar.gz |
Drop unused args from vector_fmul_add_add, simpify code, and rename
The src3 and step arguments to vector_fmul_add_add() are always zero
and one, respectively. This removes these arguments from the function,
simplifies the code accordingly, and renames the function to better
match the new operation.
Originally committed as revision 20061 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ppc')
-rw-r--r-- | libavcodec/ppc/float_altivec.c | 66 |
1 files changed, 4 insertions, 62 deletions
diff --git a/libavcodec/ppc/float_altivec.c b/libavcodec/ppc/float_altivec.c index 096f75f8b9..48d093cd15 100644 --- a/libavcodec/ppc/float_altivec.c +++ b/libavcodec/ppc/float_altivec.c @@ -66,71 +66,15 @@ static void vector_fmul_reverse_altivec(float *dst, const float *src0, } } -static void vector_fmul_add_add_altivec(float *dst, const float *src0, - const float *src1, const float *src2, - int src3, int len, int step) +static void vector_fmul_add_altivec(float *dst, const float *src0, + const float *src1, const float *src2, + int len) { int i; vector float d, s0, s1, s2, t0, t1, edges; vector unsigned char align = vec_lvsr(0,dst), mask = vec_lvsl(0, dst); -#if 0 //FIXME: there is still something wrong - if (step == 2) { - int y; - vector float d0, d1, s3, t2; - vector unsigned int sel = - vec_mergeh(vec_splat_u32(-1), vec_splat_u32(0)); - t1 = vec_ld(16, dst); - for (i=0,y=0; i<len-3; i+=4,y+=8) { - - s0 = vec_ld(0,src0+i); - s1 = vec_ld(0,src1+i); - s2 = vec_ld(0,src2+i); - -// t0 = vec_ld(0, dst+y); //[x x x|a] -// t1 = vec_ld(16, dst+y); //[b c d|e] - t2 = vec_ld(31, dst+y); //[f g h|x] - - d = vec_madd(s0,s1,s2); // [A B C D] - - // [A A B B] - - // [C C D D] - - d0 = vec_perm(t0, t1, mask); // [a b c d] - - d0 = vec_sel(vec_mergeh(d, d), d0, sel); // [A b B d] - - edges = vec_perm(t1, t0, mask); - - t0 = vec_perm(edges, d0, align); // [x x x|A] - - t1 = vec_perm(d0, edges, align); // [b B d|e] - - vec_stl(t0, 0, dst+y); - - d1 = vec_perm(t1, t2, mask); // [e f g h] - - d1 = vec_sel(vec_mergel(d, d), d1, sel); // [C f D h] - - edges = vec_perm(t2, t1, mask); - - t1 = vec_perm(edges, d1, align); // [b B d|C] - - t2 = vec_perm(d1, edges, align); // [f D h|x] - - vec_stl(t1, 16, dst+y); - - t0 = t1; - - vec_stl(t2, 31, dst+y); - - t1 = t2; - } - } else - #endif - if (step == 1 && src3 == 0) for (i=0; i<len-3; i+=4) { t0 = vec_ld(0, dst+i); t1 = vec_ld(15, dst+i); @@ -144,8 +88,6 @@ static void vector_fmul_add_add_altivec(float *dst, const float *src0, vec_st(t1, 15, dst+i); vec_st(t0, 0, dst+i); } - else - ff_vector_fmul_add_add_c(dst, src0, src1, src2, src3, len, step); } static void vector_fmul_window_altivec(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len) @@ -299,7 +241,7 @@ void float_init_altivec(DSPContext* c, AVCodecContext *avctx) { c->vector_fmul = vector_fmul_altivec; c->vector_fmul_reverse = vector_fmul_reverse_altivec; - c->vector_fmul_add_add = vector_fmul_add_add_altivec; + c->vector_fmul_add = vector_fmul_add_altivec; c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_altivec; if(!(avctx->flags & CODEC_FLAG_BITEXACT)) { c->vector_fmul_window = vector_fmul_window_altivec; |