dct/rdft: Remove duplicate typedefs for context structs
authorDiego Biurrun <diego@biurrun.de>
Wed, 23 Jul 2014 14:36:19 +0000 (07:36 -0700)
committerDiego Biurrun <diego@biurrun.de>
Fri, 25 Jul 2014 09:02:15 +0000 (02:02 -0700)
The typedefs also exist in the avfft.h header and since typedefs cannot be
legally redefined in C, the code fails to compile with some compilers.

This reverts commits 11c7155cce and 57f1b1dcc7.

libavcodec/dct.h
libavcodec/fft-test.c
libavcodec/rdft.h

index 24926a7..3fd4e27 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "rdft.h"
 
-typedef struct DCTContext {
+struct DCTContext {
     int nbits;
     int inverse;
     RDFTContext rdft;
@@ -36,7 +36,7 @@ typedef struct DCTContext {
     FFTSample *csc2;
     void (*dct_calc)(struct DCTContext *s, FFTSample *data);
     void (*dct32)(FFTSample *out, const FFTSample *in);
-} DCTContext;
+};
 
 /**
  * Set up DCT.
index 2adde93..063f8b1 100644 (file)
 #include "libavutil/mathematics.h"
 #include "libavutil/time.h"
 
-#include "dct.h"
 #include "fft.h"
+#if FFT_FLOAT
+#include "dct.h"
 #include "rdft.h"
+#endif
 
 /* reference fft */
 
index f9a23ff..8ff620f 100644 (file)
@@ -48,7 +48,7 @@ extern SINTABLE(16384);
 extern SINTABLE(32768);
 extern SINTABLE(65536);
 
-typedef struct RDFTContext {
+struct RDFTContext {
     int nbits;
     int inverse;
     int sign_convention;
@@ -58,7 +58,7 @@ typedef struct RDFTContext {
     SINTABLE_CONST FFTSample *tsin;
     FFTContext fft;
     void (*rdft_calc)(struct RDFTContext *s, FFTSample *z);
-} RDFTContext;
+};
 
 /**
  * Set up a real FFT.