diff --git a/apps/codecs/lib/mdct.c b/apps/codecs/lib/mdct.c index 03baa4db4a..3c9fe41f20 100644 --- a/apps/codecs/lib/mdct.c +++ b/apps/codecs/lib/mdct.c @@ -139,10 +139,10 @@ void ff_imdct_half(unsigned int nbits, fixed32 *output, const fixed32 *input) fixed32 r0,i0,r1,i1; XNPROD31_R(z1[1], z1[0], T[0], T[1], r0, i1 ); T+=newstep; XNPROD31_R(z2[1], z2[0], T[1], T[0], r1, i0 ); T+=newstep; - z1[0] = r0; - z1[1] = i0; - z2[0] = r1; - z2[1] = i1; + z1[0] = -r0; + z1[1] = -i0; + z2[0] = -r1; + z2[1] = -i1; z1+=2; z2-=2; } @@ -171,10 +171,10 @@ void ff_imdct_half(unsigned int nbits, fixed32 *output, const fixed32 *input) v0 += (t0 = (T[0]>>1)); v1 += (t1 = (T[1]>>1)); XNPROD31_R(z2[1], z2[0], v1, v0, r1, i0 ); - z1[0] = r0; - z1[1] = i0; - z2[0] = r1; - z2[1] = i1; + z1[0] = -r0; + z1[1] = -i0; + z2[0] = -r1; + z2[1] = -i1; z1+=2; z2-=2; V+=2; @@ -205,10 +205,10 @@ void ff_imdct_half(unsigned int nbits, fixed32 *output, const fixed32 *input) t0 = v0-q0; t1 = v1-q1; XNPROD31_R(z2[1], z2[0], t1, t0, r1, i0 ); - z1[0] = r0; - z1[1] = i0; - z2[0] = r1; - z2[1] = i1; + z1[0] = -r0; + z1[1] = -i0; + z2[0] = -r1; + z2[1] = -i1; z1+=2; z2-=2; T+=2; @@ -220,10 +220,10 @@ void ff_imdct_half(unsigned int nbits, fixed32 *output, const fixed32 *input) v0 = t0-q0; v1 = t1-q1; XNPROD31_R(z2[1], z2[0], v1, v0, r1, i0 ); - z1[0] = r0; - z1[1] = i0; - z2[0] = r1; - z2[1] = i1; + z1[0] = -r0; + z1[1] = -i0; + z2[0] = -r1; + z2[1] = -i1; z1+=2; z2-=2; V+=2;