Making VBR slightly exceed the budget rather than fail
[opus.git] / tests / mdct-test.c
index d1e5c25..eb03333 100644 (file)
@@ -2,6 +2,12 @@
 #include "config.h"
 #endif
 
+#define SKIP_CONFIG_H
+
+#ifdef STATIC_MODES
+#undef STATIC_MODES
+#endif
+
 #include <stdio.h>
 #include "mdct.h"
 #define CELT_C 
@@ -9,6 +15,8 @@
 
 #include "../libcelt/kiss_fft.c"
 #include "../libcelt/mdct.c"
+#include "../libcelt/mathops.c"
+#include "../libcelt/entcode.c"
 
 #ifndef M_PI
 #define M_PI 3.141592653
@@ -89,7 +97,7 @@ void test1d(int nfft,int isinverse)
     celt_word16  * window= (celt_word16*)malloc(sizeof(celt_word16)*nfft/2);
     int k;
 
-    clt_mdct_init(&cfg, nfft);
+    clt_mdct_init(&cfg, nfft, 0);
     for (k=0;k<nfft;++k) {
         in[k] = (rand() % 32768) - 16384;
     }
@@ -116,10 +124,10 @@ void test1d(int nfft,int isinverse)
     {
        for (k=0;k<nfft;++k)
           out[k] = 0;
-       clt_mdct_backward(&cfg,in,out, window, nfft/2);
+       clt_mdct_backward(&cfg,in,out, window, nfft/2, 0);
        check_inv(in,out,nfft,isinverse);
     } else {
-       clt_mdct_forward(&cfg,in,out,window, nfft/2);
+       clt_mdct_forward(&cfg,in,out,window, nfft/2, 0);
        check(in,out,nfft,isinverse);
     }
     /*for (k=0;k<nfft;++k) printf("%d %d ", out[k].r, out[k].i);printf("\n");*/
@@ -149,8 +157,6 @@ int main(int argc,char ** argv)
 #ifndef RADIX_TWO_ONLY
         test1d(40,0);
         test1d(40,1);
-        test1d(56,0);
-        test1d(56,1);
         test1d(120,0);
         test1d(120,1);
         test1d(240,0);