Browse code

Move FFT parts from dsputil.h to fft.h

Originally committed as revision 22235 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2010/03/06 23:34:46
Showing 27 changed files
... ...
@@ -30,7 +30,7 @@
30 30
 #include "libavcodec/audioconvert.h"
31 31
 #include "libavcodec/colorspace.h"
32 32
 #include "libavcodec/opt.h"
33
-#include "libavcodec/dsputil.h"
33
+#include "libavcodec/fft.h"
34 34
 
35 35
 #if CONFIG_AVFILTER
36 36
 # include "libavfilter/avfilter.h"
... ...
@@ -80,6 +80,7 @@
80 80
 #include "internal.h"
81 81
 #include "get_bits.h"
82 82
 #include "dsputil.h"
83
+#include "fft.h"
83 84
 #include "lpc.h"
84 85
 
85 86
 #include "aac.h"
... ...
@@ -32,6 +32,7 @@
32 32
 
33 33
 #include "avcodec.h"
34 34
 #include "dsputil.h"
35
+#include "fft.h"
35 36
 #include "mpeg4audio.h"
36 37
 
37 38
 #include <stdint.h>
... ...
@@ -31,6 +31,7 @@
31 31
 #include "ac3.h"
32 32
 #include "get_bits.h"
33 33
 #include "dsputil.h"
34
+#include "fft.h"
34 35
 
35 36
 /* override ac3.h to include coupling channel */
36 37
 #undef AC3_MAX_CHANNELS
... ...
@@ -18,7 +18,7 @@
18 18
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 19
  */
20 20
 
21
-#include "libavcodec/dsputil.h"
21
+#include "libavcodec/fft.h"
22 22
 
23 23
 void ff_fft_permute_neon(FFTContext *s, FFTComplex *z);
24 24
 void ff_fft_calc_neon(FFTContext *s, FFTComplex *z);
... ...
@@ -35,6 +35,7 @@
35 35
 #include "avcodec.h"
36 36
 #include "get_bits.h"
37 37
 #include "dsputil.h"
38
+#include "fft.h"
38 39
 
39 40
 #include "atrac.h"
40 41
 #include "atrac1data.h"
... ...
@@ -40,6 +40,7 @@
40 40
 #include "get_bits.h"
41 41
 #include "dsputil.h"
42 42
 #include "bytestream.h"
43
+#include "fft.h"
43 44
 
44 45
 #include "atrac.h"
45 46
 #include "atrac3data.h"
... ...
@@ -32,6 +32,8 @@
32 32
 #define ALT_BITSTREAM_READER_LE
33 33
 #include "get_bits.h"
34 34
 #include "dsputil.h"
35
+#include "fft.h"
36
+
35 37
 extern const uint16_t ff_wma_critical_freqs[25];
36 38
 
37 39
 #define MAX_CHANNELS 2
... ...
@@ -52,6 +52,7 @@
52 52
 #include "get_bits.h"
53 53
 #include "dsputil.h"
54 54
 #include "bytestream.h"
55
+#include "fft.h"
55 56
 
56 57
 #include "cookdata.h"
57 58
 
... ...
@@ -32,6 +32,7 @@
32 32
 
33 33
 #include "avcodec.h"
34 34
 #include "dsputil.h"
35
+#include "fft.h"
35 36
 #include "get_bits.h"
36 37
 #include "put_bits.h"
37 38
 #include "dcadata.h"
... ...
@@ -28,7 +28,8 @@
28 28
  */
29 29
 
30 30
 #include <math.h>
31
-#include "dsputil.h"
31
+#include "libavutil/mathematics.h"
32
+#include "fft.h"
32 33
 
33 34
 av_cold int ff_dct_init(DCTContext *s, int nbits, int inverse)
34 35
 {
... ...
@@ -725,220 +725,6 @@ void get_psnr(uint8_t *orig_image[3], uint8_t *coded_image[3],
725 725
               int orig_linesize[3], int coded_linesize,
726 726
               AVCodecContext *avctx);
727 727
 
728
-/* FFT computation */
729
-
730
-/* NOTE: soon integer code will be added, so you must use the
731
-   FFTSample type */
732
-typedef float FFTSample;
733
-
734
-typedef struct FFTComplex {
735
-    FFTSample re, im;
736
-} FFTComplex;
737
-
738
-typedef struct FFTContext {
739
-    int nbits;
740
-    int inverse;
741
-    uint16_t *revtab;
742
-    FFTComplex *exptab;
743
-    FFTComplex *exptab1; /* only used by SSE code */
744
-    FFTComplex *tmp_buf;
745
-    int mdct_size; /* size of MDCT (i.e. number of input data * 2) */
746
-    int mdct_bits; /* n = 2^nbits */
747
-    /* pre/post rotation tables */
748
-    FFTSample *tcos;
749
-    FFTSample *tsin;
750
-    void (*fft_permute)(struct FFTContext *s, FFTComplex *z);
751
-    void (*fft_calc)(struct FFTContext *s, FFTComplex *z);
752
-    void (*imdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
753
-    void (*imdct_half)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
754
-    void (*mdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
755
-    int split_radix;
756
-    int permutation;
757
-#define FF_MDCT_PERM_NONE       0
758
-#define FF_MDCT_PERM_INTERLEAVE 1
759
-} FFTContext;
760
-
761
-#if CONFIG_HARDCODED_TABLES
762
-#define COSTABLE_CONST const
763
-#define SINTABLE_CONST const
764
-#define SINETABLE_CONST const
765
-#else
766
-#define COSTABLE_CONST
767
-#define SINTABLE_CONST
768
-#define SINETABLE_CONST
769
-#endif
770
-
771
-#define COSTABLE(size) \
772
-    COSTABLE_CONST DECLARE_ALIGNED(16, FFTSample, ff_cos_##size)[size/2]
773
-#define SINTABLE(size) \
774
-    SINTABLE_CONST DECLARE_ALIGNED(16, FFTSample, ff_sin_##size)[size/2]
775
-#define SINETABLE(size) \
776
-    SINETABLE_CONST DECLARE_ALIGNED(16, float, ff_sine_##size)[size]
777
-extern COSTABLE(16);
778
-extern COSTABLE(32);
779
-extern COSTABLE(64);
780
-extern COSTABLE(128);
781
-extern COSTABLE(256);
782
-extern COSTABLE(512);
783
-extern COSTABLE(1024);
784
-extern COSTABLE(2048);
785
-extern COSTABLE(4096);
786
-extern COSTABLE(8192);
787
-extern COSTABLE(16384);
788
-extern COSTABLE(32768);
789
-extern COSTABLE(65536);
790
-extern COSTABLE_CONST FFTSample* const ff_cos_tabs[17];
791
-
792
-/**
793
- * Initializes the cosine table in ff_cos_tabs[index]
794
- * \param index index in ff_cos_tabs array of the table to initialize
795
- */
796
-void ff_init_ff_cos_tabs(int index);
797
-
798
-extern SINTABLE(16);
799
-extern SINTABLE(32);
800
-extern SINTABLE(64);
801
-extern SINTABLE(128);
802
-extern SINTABLE(256);
803
-extern SINTABLE(512);
804
-extern SINTABLE(1024);
805
-extern SINTABLE(2048);
806
-extern SINTABLE(4096);
807
-extern SINTABLE(8192);
808
-extern SINTABLE(16384);
809
-extern SINTABLE(32768);
810
-extern SINTABLE(65536);
811
-
812
-/**
813
- * Sets up a complex FFT.
814
- * @param nbits           log2 of the length of the input array
815
- * @param inverse         if 0 perform the forward transform, if 1 perform the inverse
816
- */
817
-int ff_fft_init(FFTContext *s, int nbits, int inverse);
818
-void ff_fft_permute_c(FFTContext *s, FFTComplex *z);
819
-void ff_fft_calc_c(FFTContext *s, FFTComplex *z);
820
-
821
-void ff_fft_init_altivec(FFTContext *s);
822
-void ff_fft_init_mmx(FFTContext *s);
823
-void ff_fft_init_arm(FFTContext *s);
824
-
825
-/**
826
- * Do the permutation needed BEFORE calling ff_fft_calc().
827
- */
828
-static inline void ff_fft_permute(FFTContext *s, FFTComplex *z)
829
-{
830
-    s->fft_permute(s, z);
831
-}
832
-/**
833
- * Do a complex FFT with the parameters defined in ff_fft_init(). The
834
- * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
835
- */
836
-static inline void ff_fft_calc(FFTContext *s, FFTComplex *z)
837
-{
838
-    s->fft_calc(s, z);
839
-}
840
-void ff_fft_end(FFTContext *s);
841
-
842
-/* MDCT computation */
843
-
844
-static inline void ff_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input)
845
-{
846
-    s->imdct_calc(s, output, input);
847
-}
848
-static inline void ff_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input)
849
-{
850
-    s->imdct_half(s, output, input);
851
-}
852
-
853
-static inline void ff_mdct_calc(FFTContext *s, FFTSample *output,
854
-                                const FFTSample *input)
855
-{
856
-    s->mdct_calc(s, output, input);
857
-}
858
-
859
-/**
860
- * Generate a Kaiser-Bessel Derived Window.
861
- * @param   window  pointer to half window
862
- * @param   alpha   determines window shape
863
- * @param   n       size of half window
864
- */
865
-void ff_kbd_window_init(float *window, float alpha, int n);
866
-
867
-/**
868
- * Generate a sine window.
869
- * @param   window  pointer to half window
870
- * @param   n       size of half window
871
- */
872
-void ff_sine_window_init(float *window, int n);
873
-/**
874
- * initialize the specified entry of ff_sine_windows
875
- */
876
-void ff_init_ff_sine_windows(int index);
877
-extern SINETABLE(  32);
878
-extern SINETABLE(  64);
879
-extern SINETABLE( 128);
880
-extern SINETABLE( 256);
881
-extern SINETABLE( 512);
882
-extern SINETABLE(1024);
883
-extern SINETABLE(2048);
884
-extern SINETABLE(4096);
885
-extern SINETABLE_CONST float * const ff_sine_windows[13];
886
-
887
-int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale);
888
-void ff_imdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input);
889
-void ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input);
890
-void ff_mdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input);
891
-void ff_mdct_end(FFTContext *s);
892
-
893
-/* Real Discrete Fourier Transform */
894
-
895
-enum RDFTransformType {
896
-    RDFT,
897
-    IRDFT,
898
-    RIDFT,
899
-    IRIDFT,
900
-};
901
-
902
-typedef struct {
903
-    int nbits;
904
-    int inverse;
905
-    int sign_convention;
906
-
907
-    /* pre/post rotation tables */
908
-    const FFTSample *tcos;
909
-    SINTABLE_CONST FFTSample *tsin;
910
-    FFTContext fft;
911
-} RDFTContext;
912
-
913
-/**
914
- * Sets up a real FFT.
915
- * @param nbits           log2 of the length of the input array
916
- * @param trans           the type of transform
917
- */
918
-int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans);
919
-void ff_rdft_calc(RDFTContext *s, FFTSample *data);
920
-void ff_rdft_end(RDFTContext *s);
921
-
922
-/* Discrete Cosine Transform */
923
-
924
-typedef struct {
925
-    int nbits;
926
-    int inverse;
927
-    FFTSample *data;
928
-    RDFTContext rdft;
929
-    const float *costab;
930
-    FFTSample *csc2;
931
-} DCTContext;
932
-
933
-/**
934
- * Sets up (Inverse)DCT.
935
- * @param nbits           log2 of the length of the input array
936
- * @param inverse         >0 forward transform, <0 inverse transform
937
- */
938
-int  ff_dct_init(DCTContext *s, int nbits, int inverse);
939
-void ff_dct_calc(DCTContext *s, FFTSample *data);
940
-void ff_dct_end (DCTContext *s);
941
-
942 728
 #define WRAPPER8_16(name8, name16)\
943 729
 static int name16(void /*MpegEncContext*/ *s, uint8_t *dst, uint8_t *src, int stride, int h){\
944 730
     return name8(s, dst           , src           , stride, h)\
... ...
@@ -26,7 +26,8 @@
26 26
  * FFT/IFFT transforms.
27 27
  */
28 28
 
29
-#include "dsputil.h"
29
+#include "libavutil/mathematics.h"
30
+#include "fft.h"
30 31
 
31 32
 /* cos(2*pi*x/n) for 0<=x<=n/4, followed by its reverse */
32 33
 #if !CONFIG_HARDCODED_TABLES
33 34
new file mode 100644
... ...
@@ -0,0 +1,244 @@
0
+/*
1
+ * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
2
+ * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
3
+ *
4
+ * This file is part of FFmpeg.
5
+ *
6
+ * FFmpeg is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * FFmpeg is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with FFmpeg; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
+ */
20
+
21
+#ifndef AVCODEC_FFT_H
22
+#define AVCODEC_FFT_H
23
+
24
+#include <stdint.h>
25
+#include "config.h"
26
+#include "libavutil/mem.h"
27
+
28
+/* FFT computation */
29
+
30
+/* NOTE: soon integer code will be added, so you must use the
31
+   FFTSample type */
32
+typedef float FFTSample;
33
+
34
+typedef struct FFTComplex {
35
+    FFTSample re, im;
36
+} FFTComplex;
37
+
38
+typedef struct FFTContext {
39
+    int nbits;
40
+    int inverse;
41
+    uint16_t *revtab;
42
+    FFTComplex *exptab;
43
+    FFTComplex *exptab1; /* only used by SSE code */
44
+    FFTComplex *tmp_buf;
45
+    int mdct_size; /* size of MDCT (i.e. number of input data * 2) */
46
+    int mdct_bits; /* n = 2^nbits */
47
+    /* pre/post rotation tables */
48
+    FFTSample *tcos;
49
+    FFTSample *tsin;
50
+    void (*fft_permute)(struct FFTContext *s, FFTComplex *z);
51
+    void (*fft_calc)(struct FFTContext *s, FFTComplex *z);
52
+    void (*imdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
53
+    void (*imdct_half)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
54
+    void (*mdct_calc)(struct FFTContext *s, FFTSample *output, const FFTSample *input);
55
+    int split_radix;
56
+    int permutation;
57
+#define FF_MDCT_PERM_NONE       0
58
+#define FF_MDCT_PERM_INTERLEAVE 1
59
+} FFTContext;
60
+
61
+#if CONFIG_HARDCODED_TABLES
62
+#define COSTABLE_CONST const
63
+#define SINTABLE_CONST const
64
+#define SINETABLE_CONST const
65
+#else
66
+#define COSTABLE_CONST
67
+#define SINTABLE_CONST
68
+#define SINETABLE_CONST
69
+#endif
70
+
71
+#define COSTABLE(size) \
72
+    COSTABLE_CONST DECLARE_ALIGNED(16, FFTSample, ff_cos_##size)[size/2]
73
+#define SINTABLE(size) \
74
+    SINTABLE_CONST DECLARE_ALIGNED(16, FFTSample, ff_sin_##size)[size/2]
75
+#define SINETABLE(size) \
76
+    SINETABLE_CONST DECLARE_ALIGNED(16, float, ff_sine_##size)[size]
77
+extern COSTABLE(16);
78
+extern COSTABLE(32);
79
+extern COSTABLE(64);
80
+extern COSTABLE(128);
81
+extern COSTABLE(256);
82
+extern COSTABLE(512);
83
+extern COSTABLE(1024);
84
+extern COSTABLE(2048);
85
+extern COSTABLE(4096);
86
+extern COSTABLE(8192);
87
+extern COSTABLE(16384);
88
+extern COSTABLE(32768);
89
+extern COSTABLE(65536);
90
+extern COSTABLE_CONST FFTSample* const ff_cos_tabs[17];
91
+
92
+/**
93
+ * Initializes the cosine table in ff_cos_tabs[index]
94
+ * \param index index in ff_cos_tabs array of the table to initialize
95
+ */
96
+void ff_init_ff_cos_tabs(int index);
97
+
98
+extern SINTABLE(16);
99
+extern SINTABLE(32);
100
+extern SINTABLE(64);
101
+extern SINTABLE(128);
102
+extern SINTABLE(256);
103
+extern SINTABLE(512);
104
+extern SINTABLE(1024);
105
+extern SINTABLE(2048);
106
+extern SINTABLE(4096);
107
+extern SINTABLE(8192);
108
+extern SINTABLE(16384);
109
+extern SINTABLE(32768);
110
+extern SINTABLE(65536);
111
+
112
+/**
113
+ * Sets up a complex FFT.
114
+ * @param nbits           log2 of the length of the input array
115
+ * @param inverse         if 0 perform the forward transform, if 1 perform the inverse
116
+ */
117
+int ff_fft_init(FFTContext *s, int nbits, int inverse);
118
+void ff_fft_permute_c(FFTContext *s, FFTComplex *z);
119
+void ff_fft_calc_c(FFTContext *s, FFTComplex *z);
120
+
121
+void ff_fft_init_altivec(FFTContext *s);
122
+void ff_fft_init_mmx(FFTContext *s);
123
+void ff_fft_init_arm(FFTContext *s);
124
+
125
+/**
126
+ * Do the permutation needed BEFORE calling ff_fft_calc().
127
+ */
128
+static inline void ff_fft_permute(FFTContext *s, FFTComplex *z)
129
+{
130
+    s->fft_permute(s, z);
131
+}
132
+/**
133
+ * Do a complex FFT with the parameters defined in ff_fft_init(). The
134
+ * input data must be permuted before. No 1.0/sqrt(n) normalization is done.
135
+ */
136
+static inline void ff_fft_calc(FFTContext *s, FFTComplex *z)
137
+{
138
+    s->fft_calc(s, z);
139
+}
140
+void ff_fft_end(FFTContext *s);
141
+
142
+/* MDCT computation */
143
+
144
+static inline void ff_imdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input)
145
+{
146
+    s->imdct_calc(s, output, input);
147
+}
148
+static inline void ff_imdct_half(FFTContext *s, FFTSample *output, const FFTSample *input)
149
+{
150
+    s->imdct_half(s, output, input);
151
+}
152
+
153
+static inline void ff_mdct_calc(FFTContext *s, FFTSample *output,
154
+                                const FFTSample *input)
155
+{
156
+    s->mdct_calc(s, output, input);
157
+}
158
+
159
+/**
160
+ * Generate a Kaiser-Bessel Derived Window.
161
+ * @param   window  pointer to half window
162
+ * @param   alpha   determines window shape
163
+ * @param   n       size of half window
164
+ */
165
+void ff_kbd_window_init(float *window, float alpha, int n);
166
+
167
+/**
168
+ * Generate a sine window.
169
+ * @param   window  pointer to half window
170
+ * @param   n       size of half window
171
+ */
172
+void ff_sine_window_init(float *window, int n);
173
+
174
+/**
175
+ * initialize the specified entry of ff_sine_windows
176
+ */
177
+void ff_init_ff_sine_windows(int index);
178
+extern SINETABLE(  32);
179
+extern SINETABLE(  64);
180
+extern SINETABLE( 128);
181
+extern SINETABLE( 256);
182
+extern SINETABLE( 512);
183
+extern SINETABLE(1024);
184
+extern SINETABLE(2048);
185
+extern SINETABLE(4096);
186
+extern SINETABLE_CONST float * const ff_sine_windows[13];
187
+
188
+int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale);
189
+void ff_imdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input);
190
+void ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input);
191
+void ff_mdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input);
192
+void ff_mdct_end(FFTContext *s);
193
+
194
+/* Real Discrete Fourier Transform */
195
+
196
+enum RDFTransformType {
197
+    RDFT,
198
+    IRDFT,
199
+    RIDFT,
200
+    IRIDFT,
201
+};
202
+
203
+typedef struct {
204
+    int nbits;
205
+    int inverse;
206
+    int sign_convention;
207
+
208
+    /* pre/post rotation tables */
209
+    const FFTSample *tcos;
210
+    SINTABLE_CONST FFTSample *tsin;
211
+    FFTContext fft;
212
+} RDFTContext;
213
+
214
+/**
215
+ * Sets up a real FFT.
216
+ * @param nbits           log2 of the length of the input array
217
+ * @param trans           the type of transform
218
+ */
219
+int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans);
220
+void ff_rdft_calc(RDFTContext *s, FFTSample *data);
221
+void ff_rdft_end(RDFTContext *s);
222
+
223
+/* Discrete Cosine Transform */
224
+
225
+typedef struct {
226
+    int nbits;
227
+    int inverse;
228
+    FFTSample *data;
229
+    RDFTContext rdft;
230
+    const float *costab;
231
+    FFTSample *csc2;
232
+} DCTContext;
233
+
234
+/**
235
+ * Sets up (Inverse)DCT.
236
+ * @param nbits           log2 of the length of the input array
237
+ * @param inverse         >0 forward transform, <0 inverse transform
238
+ */
239
+int  ff_dct_init(DCTContext *s, int nbits, int inverse);
240
+void ff_dct_calc(DCTContext *s, FFTSample *data);
241
+void ff_dct_end (DCTContext *s);
242
+
243
+#endif /* AVCODEC_FFT_H */
... ...
@@ -38,6 +38,7 @@
38 38
 #include "avcodec.h"
39 39
 #include "get_bits.h"
40 40
 #include "dsputil.h"
41
+#include "fft.h"
41 42
 
42 43
 #include "imcdata.h"
43 44
 
... ...
@@ -18,7 +18,9 @@
18 18
  * License along with FFmpeg; if not, write to the Free Software
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21
-#include "dsputil.h"
21
+
22
+#include "libavutil/mathematics.h"
23
+#include "fft.h"
22 24
 
23 25
 /**
24 26
  * @file libavcodec/mdct.c
... ...
@@ -36,6 +36,7 @@
36 36
 #include "libavutil/random_seed.h"
37 37
 #include "avcodec.h"
38 38
 #include "dsputil.h"
39
+#include "fft.h"
39 40
 
40 41
 #define ALT_BITSTREAM_READER_LE
41 42
 #include "get_bits.h"
... ...
@@ -38,6 +38,7 @@
38 38
 #include "nellymoser.h"
39 39
 #include "avcodec.h"
40 40
 #include "dsputil.h"
41
+#include "fft.h"
41 42
 
42 43
 #define BITSTREAM_WRITER_LE
43 44
 #include "put_bits.h"
... ...
@@ -20,7 +20,7 @@
20 20
  * License along with FFmpeg; if not, write to the Free Software
21 21
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 22
  */
23
-#include "libavcodec/dsputil.h"
23
+#include "libavcodec/fft.h"
24 24
 #include "dsputil_ppc.h"
25 25
 #include "util_altivec.h"
26 26
 /**
... ...
@@ -38,6 +38,7 @@
38 38
 #include "avcodec.h"
39 39
 #include "get_bits.h"
40 40
 #include "dsputil.h"
41
+#include "fft.h"
41 42
 #include "mpegaudio.h"
42 43
 
43 44
 #include "qdm2data.h"
... ...
@@ -19,7 +19,8 @@
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21 21
 #include <math.h>
22
-#include "dsputil.h"
22
+#include "libavutil/mathematics.h"
23
+#include "fft.h"
23 24
 
24 25
 /**
25 26
  * @file libavcodec/rdft.c
... ...
@@ -18,6 +18,7 @@
18 18
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 19
  */
20 20
 
21
+#include "fft.h"
21 22
 #include "synth_filter.h"
22 23
 
23 24
 void ff_synth_filter_float(FFTContext *imdct,
... ...
@@ -22,6 +22,7 @@
22 22
 #include "avcodec.h"
23 23
 #include "get_bits.h"
24 24
 #include "dsputil.h"
25
+#include "fft.h"
25 26
 #include "lsp.h"
26 27
 
27 28
 #include <math.h>
... ...
@@ -30,6 +30,7 @@
30 30
 #include "avcodec.h"
31 31
 #include "get_bits.h"
32 32
 #include "dsputil.h"
33
+#include "fft.h"
33 34
 
34 35
 #include "vorbis.h"
35 36
 #include "xiph.h"
... ...
@@ -27,6 +27,7 @@
27 27
 #include <float.h>
28 28
 #include "avcodec.h"
29 29
 #include "dsputil.h"
30
+#include "fft.h"
30 31
 #include "vorbis.h"
31 32
 #include "vorbis_enc_data.h"
32 33
 
... ...
@@ -25,6 +25,7 @@
25 25
 #include "get_bits.h"
26 26
 #include "put_bits.h"
27 27
 #include "dsputil.h"
28
+#include "fft.h"
28 29
 
29 30
 /* size of blocks */
30 31
 #define BLOCK_MIN_BITS 7
... ...
@@ -19,7 +19,7 @@
19 19
 #ifndef AVCODEC_X86_FFT_H
20 20
 #define AVCODEC_X86_FFT_H
21 21
 
22
-#include "libavcodec/dsputil.h"
22
+#include "libavcodec/fft.h"
23 23
 
24 24
 void ff_fft_permute_sse(FFTContext *s, FFTComplex *z);
25 25
 void ff_fft_calc_sse(FFTContext *s, FFTComplex *z);