summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2012-10-16 21:03:22 +0200
committerNils Wallménius <nils@rockbox.org>2012-10-16 21:03:22 +0200
commitaa55bc29f0d95767f2f89eb2496bb643d3f77f04 (patch)
tree2a81348d48479c4f78d0e788a61dde2693aa91f2 /lib/rbcodec/codecs
parent091619b4a5cd3458e5f1a8f81d78f4234c461fcb (diff)
opus: don't rely on stride being 1<<shift
Change-Id: I2d64fb20b2526d912eb665df0df4e87459676a92
Diffstat (limited to 'lib/rbcodec/codecs')
-rw-r--r--lib/rbcodec/codecs/libopus/celt/mdct.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/mdct.c b/lib/rbcodec/codecs/libopus/celt/mdct.c
index 877366361d..0df77fd5ec 100644
--- a/lib/rbcodec/codecs/libopus/celt/mdct.c
+++ b/lib/rbcodec/codecs/libopus/celt/mdct.c
@@ -215,6 +215,7 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala
{
int i;
int N, N2, N4;
+ int tstride = 1<<shift;
kiss_twiddle_scalar sine;
VARDECL(kiss_fft_scalar, f);
VARDECL(kiss_fft_scalar, f2);
@@ -261,8 +262,8 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala
*yp++ = yi + S_MUL(yr,sine);
xp1+=2*stride;
xp2-=2*stride;
- t0 += stride;
- t1 -= stride;
+ t0 += tstride;
+ t1 -= tstride;
}
}
@@ -285,8 +286,8 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala
/* works because the cos is nearly one */
*fp++ = yr - S_MUL(yi,sine);
*fp++ = yi + S_MUL(yr,sine);
- t0 += stride;
- t1 -= stride;
+ t0 += tstride;
+ t1 -= tstride;
}
}
/* De-shuffle the components for the middle of the window only */