diff options
author | Rong Yan <rongyan236@gmail.com> | 2014-09-11 09:07:40 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-11 18:36:34 +0200 |
commit | 8e8db16a2cf54c95158e59b281b424cc8ff4e931 (patch) | |
tree | c967f80338a71a65a04c1827a574e872d4264d8e /libavutil | |
parent | 4a203b773702ea1989b1ad89eaeaf96a291873d8 (diff) | |
download | ffmpeg-streaming-8e8db16a2cf54c95158e59b281b424cc8ff4e931.zip ffmpeg-streaming-8e8db16a2cf54c95158e59b281b424cc8ff4e931.tar.gz |
avutil/ppc/float_dsp_altivec: ppc: Fix bug in ff_vector_fmul_add_altivec() affecting little endian environments on POWER8
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/ppc/float_dsp_altivec.c | 18 |
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); } |