ref: 884916fb27a60b56a2701d1eb3d9e3fb2430dc72
parent: f11d6f49f951a4eda8915f3918a96701cee1dc93
author: Jean-Marc Valin <[email protected]>
date: Sat Apr 19 08:53:43 EDT 2008
better mdct_backward() indexing
--- a/libcelt/mdct.c
+++ b/libcelt/mdct.c
@@ -194,6 +194,8 @@
/* Post-rotate */
{
kiss_fft_scalar * restrict fp = f;
+ kiss_fft_scalar *t = &l->trig[0];
+
for(i=0;i<N4;i++)
{
kiss_fft_scalar re, im;
@@ -200,9 +202,9 @@
re = fp[0];
im = fp[1];
/* We'd scale up by 2 here, but instead it's done when mixing the windows */
- fp[0] = S_MUL(re,l->trig[i]) + S_MUL(im,l->trig[i+N4]);
- fp[1] = S_MUL(im,l->trig[i]) - S_MUL(re,l->trig[i+N4]);
- fp += 2;
+ *fp++ = S_MUL(re,*t) + S_MUL(im,t[N4]);
+ *fp++ = S_MUL(im,*t) - S_MUL(re,t[N4]);
+ t++;
}
}
/* De-shuffle the components for the middle of the window only */