Originally committed as revision 22235 to svn://svn.ffmpeg.org/ffmpeg/trunk
Måns Rullgård authored on 2010/03/06 23:34:46... | ... |
@@ -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); |
... | ... |
@@ -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)\ |
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 */ |
... | ... |
@@ -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 |
... | ... |
@@ -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 |
/** |