]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/fft-test.c
build: Add missing directories to DIRS declarations.
[ffmpeg] / libavcodec / fft-test.c
index 0112c6fcbb2abd2be26b09d2a6380e6c22702e44..f890de61aaddf924d40e0da7e8e8c45c0c0bfe0f 100644 (file)
@@ -37,8 +37,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#undef exit
-
 /* reference fft */
 
 #define MUL16(a,b) ((a) * (b))
@@ -228,7 +226,6 @@ static void help(void)
            "-n b   set the transform size to 2^b\n"
            "-f x   set scale factor for output data of (I)MDCT to x\n"
            );
-    exit(1);
 }
 
 enum tf_transform {
@@ -252,8 +249,9 @@ int main(int argc, char **argv)
 #if CONFIG_FFT_FLOAT
     RDFTContext r1, *r = &r1;
     DCTContext d1, *d = &d1;
+    int fft_size_2;
 #endif
-    int fft_nbits, fft_size, fft_size_2;
+    int fft_nbits, fft_size;
     double scale = 1.0;
     AVLFG prng;
     av_lfg_init(&prng, 1);
@@ -266,7 +264,7 @@ int main(int argc, char **argv)
         switch(c) {
         case 'h':
             help();
-            break;
+            return 1;
         case 's':
             do_speed = 1;
             break;
@@ -292,7 +290,6 @@ int main(int argc, char **argv)
     }
 
     fft_size = 1 << fft_nbits;
-    fft_size_2 = fft_size >> 1;
     tab = av_malloc(fft_size * sizeof(FFTComplex));
     tab1 = av_malloc(fft_size * sizeof(FFTComplex));
     tab_ref = av_malloc(fft_size * sizeof(FFTComplex));
@@ -372,6 +369,7 @@ int main(int argc, char **argv)
         break;
 #if CONFIG_FFT_FLOAT
     case TRANSFORM_RDFT:
+        fft_size_2 = fft_size >> 1;
         if (do_inverse) {
             tab1[         0].im = 0;
             tab1[fft_size_2].im = 0;