shithub: opus

Download patch

ref: 083883e6c0748dd4dbe9f842f261c1a3637547bc
parent: dc663473ca9dde45c5b5404833e998d6d677d608
author: Gregory Maxwell <[email protected]>
date: Wed Jun 3 16:02:53 EDT 2009

Fixes for the tests in pseudo-stack mode.

--- a/tests/cwrs32-test.c
+++ b/tests/cwrs32-test.c
@@ -5,6 +5,8 @@
 #include <stdio.h>
 #include <string.h>
 
+#define CELT_C 
+#include "../libcelt/stack_alloc.h"
 #include "../libcelt/rangeenc.c"
 #include "../libcelt/rangedec.c"
 #include "../libcelt/entenc.c"
@@ -24,6 +26,7 @@
 
 int main(int _argc,char **_argv){
   int n;
+  ALLOC_STACK;
   for(n=2;n<=NMAX;n++){
     int dk;
     int k;
--- a/tests/dft-test.c
+++ b/tests/dft-test.c
@@ -5,6 +5,8 @@
 #include <stdio.h>
 #include "kiss_fft.h"
 
+#define CELT_C 
+#include "../libcelt/stack_alloc.h"
 #include "../libcelt/kiss_fft.c"
 
 
@@ -102,6 +104,7 @@
 
 int main(int argc,char ** argv)
 {
+    ALLOC_STACK;
     if (argc>1) {
         int k;
         for (k=1;k<argc;++k) {
--- a/tests/laplace-test.c
+++ b/tests/laplace-test.c
@@ -5,7 +5,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "laplace.h"
-#include "stack_alloc.h"
+#define CELT_C 
+#include "../libcelt/stack_alloc.h"
 
 #include "../libcelt/rangeenc.c"
 #include "../libcelt/rangedec.c"
--- a/tests/mdct-test.c
+++ b/tests/mdct-test.c
@@ -4,7 +4,8 @@
 
 #include <stdio.h>
 #include "mdct.h"
-#include "stack_alloc.h"
+#define CELT_C 
+#include "../libcelt/stack_alloc.h"
 
 #include "../libcelt/kiss_fft.c"
 #include "../libcelt/mdct.c"
--- a/tests/real-fft-test.c
+++ b/tests/real-fft-test.c
@@ -7,6 +7,8 @@
 #include <stdio.h>
 #include <string.h>
 
+#define CELT_C 
+#include "../libcelt/stack_alloc.h"
 #include "../libcelt/kiss_fft.c"
 #include "../libcelt/kiss_fftr.c"
 
@@ -86,6 +88,7 @@
     kiss_fft_scalar rin[NFFT+2];
     kiss_fft_scalar rout[NFFT+2];
     kiss_fft_scalar zero;
+    ALLOC_STACK;
     memset(&zero,0,sizeof(zero) ); // ugly way of setting short,int,float,double, or __m128 to zero
 
     for (i=0;i<NFFT;++i) {