From ae035a540bb682740dc365bcc5558601a77d2857 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Wed, 25 Aug 2010 22:41:00 -0400 Subject: [PATCH] Fixes an off-by-one bug in the static mode's MDCT twiddles --- libcelt/dump_modes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcelt/dump_modes.c b/libcelt/dump_modes.c index fcd23ff5..512b7aa0 100644 --- a/libcelt/dump_modes.c +++ b/libcelt/dump_modes.c @@ -186,8 +186,8 @@ void dump_modes(FILE *file, CELTMode **modes, int nb_modes) fprintf(file, "#ifndef MDCT_TWIDDLES%d_%d\n", mode->Fs, mdctSize); fprintf(file, "#define MDCT_TWIDDLES%d_%d\n", mode->Fs, mdctSize); fprintf (file, "static const celt_word16 mdct_twiddles%d_%d[%d] = {\n", - mode->Fs, mdctSize, mode->mdct.n/4); - for (j=0;jmdct.n/4;j++) + mode->Fs, mdctSize, mode->mdct.n/4+1); + for (j=0;j<=mode->mdct.n/4;j++) fprintf (file, WORD16 ", ", mode->mdct.trig[j]); fprintf (file, "};\n");