summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libavutil/ppc/float_dsp_altivec.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/libavutil/ppc/float_dsp_altivec.c b/libavutil/ppc/float_dsp_altivec.c
index 8cee82c..49af9f9 100644
--- a/libavutil/ppc/float_dsp_altivec.c
+++ b/libavutil/ppc/float_dsp_altivec.c
@@ -75,20 +75,18 @@ void ff_vector_fmul_add_altivec(float *dst, const float *src0,
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);
+ vector float d, ss0, ss1, ss2, t0, t1, edges;
for (i = 0; i < len - 3; i += 4) {
t0 = vec_ld(0, dst + i);
t1 = vec_ld(15, dst + i);
- s0 = vec_ld(0, src0 + i);
- s1 = vec_ld(0, src1 + i);
- s2 = vec_ld(0, src2 + i);
- edges = vec_perm(t1, t0, mask);
- d = vec_madd(s0, s1, s2);
- t1 = vec_perm(d, edges, align);
- t0 = vec_perm(edges, d, align);
+ ss0 = vec_ld(0, src0 + i);
+ ss1 = vec_ld(0, src1 + i);
+ ss2 = vec_ld(0, src2 + i);
+ edges = vec_perm(t1, t0, vcprm(0, 1, 2, 3));
+ d = vec_madd(ss0, ss1, ss2);
+ t1 = vec_perm(d, edges, vcprm(s0,s1,s2,s3));
+ t0 = vec_perm(edges, d, vcprm(s0,s1,s2,s3));
vec_st(t1, 15, dst + i);
vec_st(t0, 0, dst + i);
}
OpenPOWER on IntegriCloud