Further simplications to compute_mdcts()
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Sun, 24 Oct 2010 04:22:45 +0000 (00:22 -0400)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Sun, 24 Oct 2010 04:22:45 +0000 (00:22 -0400)
libcelt/celt.c

index e1191d4..e01dc93 100644 (file)
@@ -253,7 +253,6 @@ static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * rest
       int N = mode->shortMdctSize<<LM;
       int B = 1;
       int b, c;
-      VARDECL(celt_word32, x);
       VARDECL(celt_word32, tmp);
       SAVE_STACK;
       if (shortBlocks)
@@ -262,16 +261,13 @@ static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * rest
          N = mode->shortMdctSize;
          B = shortBlocks;
       }
-      ALLOC(x, N+overlap, celt_word32);
       ALLOC(tmp, N, celt_word32);
       for (c=0;c<C;c++)
       {
          for (b=0;b<B;b++)
          {
             int j;
-            for (j=0;j<N+overlap;j++)
-               x[j] = in[(b*N+j)+c*(B*N+overlap)];
-            clt_mdct_forward(&mode->mdct, x, tmp, mode->window, overlap, shortBlocks ? mode->maxLM : mode->maxLM-LM);
+            clt_mdct_forward(&mode->mdct, in+c*(B*N+overlap)+b*N, tmp, mode->window, overlap, shortBlocks ? mode->maxLM : mode->maxLM-LM);
             /* Interleaving the sub-frames */
             for (j=0;j<N;j++)
                out[(j*B+b)+c*N*B] = tmp[j];