diff options
author | Nils Wallménius <nils@rockbox.org> | 2012-10-16 21:03:22 +0200 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2012-10-16 21:03:22 +0200 |
commit | aa55bc29f0d95767f2f89eb2496bb643d3f77f04 (patch) | |
tree | 2a81348d48479c4f78d0e788a61dde2693aa91f2 | |
parent | 091619b4a5cd3458e5f1a8f81d78f4234c461fcb (diff) | |
download | rockbox-aa55bc29f0d95767f2f89eb2496bb643d3f77f04.tar.gz rockbox-aa55bc29f0d95767f2f89eb2496bb643d3f77f04.zip |
opus: don't rely on stride being 1<<shift
Change-Id: I2d64fb20b2526d912eb665df0df4e87459676a92
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/mdct.c | 9 |
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 | |||
215 | { | 215 | { |
216 | int i; | 216 | int i; |
217 | int N, N2, N4; | 217 | int N, N2, N4; |
218 | int tstride = 1<<shift; | ||
218 | kiss_twiddle_scalar sine; | 219 | kiss_twiddle_scalar sine; |
219 | VARDECL(kiss_fft_scalar, f); | 220 | VARDECL(kiss_fft_scalar, f); |
220 | VARDECL(kiss_fft_scalar, f2); | 221 | VARDECL(kiss_fft_scalar, f2); |
@@ -261,8 +262,8 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala | |||
261 | *yp++ = yi + S_MUL(yr,sine); | 262 | *yp++ = yi + S_MUL(yr,sine); |
262 | xp1+=2*stride; | 263 | xp1+=2*stride; |
263 | xp2-=2*stride; | 264 | xp2-=2*stride; |
264 | t0 += stride; | 265 | t0 += tstride; |
265 | t1 -= stride; | 266 | t1 -= tstride; |
266 | } | 267 | } |
267 | } | 268 | } |
268 | 269 | ||
@@ -285,8 +286,8 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala | |||
285 | /* works because the cos is nearly one */ | 286 | /* works because the cos is nearly one */ |
286 | *fp++ = yr - S_MUL(yi,sine); | 287 | *fp++ = yr - S_MUL(yi,sine); |
287 | *fp++ = yi + S_MUL(yr,sine); | 288 | *fp++ = yi + S_MUL(yr,sine); |
288 | t0 += stride; | 289 | t0 += tstride; |
289 | t1 -= stride; | 290 | t1 -= tstride; |
290 | } | 291 | } |
291 | } | 292 | } |
292 | /* De-shuffle the components for the middle of the window only */ | 293 | /* De-shuffle the components for the middle of the window only */ |