summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/fft.h
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg/libavcodec/fft.h')
-rw-r--r--ffmpeg/libavcodec/fft.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/ffmpeg/libavcodec/fft.h b/ffmpeg/libavcodec/fft.h
index 9d92b2c..217090c 100644
--- a/ffmpeg/libavcodec/fft.h
+++ b/ffmpeg/libavcodec/fft.h
@@ -26,6 +26,10 @@
#define CONFIG_FFT_FLOAT 1
#endif
+#ifndef CONFIG_FFT_FIXED_32
+#define CONFIG_FFT_FIXED_32 0
+#endif
+
#include <stdint.h>
#include "config.h"
#include "libavutil/mem.h"
@@ -40,15 +44,26 @@ typedef float FFTDouble;
#else
+#if CONFIG_FFT_FIXED_32
+
+#define Q31(x) (int)((x)*2147483648.0 + 0.5)
+#define FFT_NAME(x) x ## _fixed_32
+
+typedef int32_t FFTSample;
+
+#else /* CONFIG_FFT_FIXED_32 */
+
#define FFT_NAME(x) x ## _fixed
typedef int16_t FFTSample;
-typedef int FFTDouble;
+
+#endif /* CONFIG_FFT_FIXED_32 */
typedef struct FFTComplex {
- int16_t re, im;
+ FFTSample re, im;
} FFTComplex;
+typedef int FFTDouble;
typedef struct FFTContext FFTContext;
#endif /* CONFIG_FFT_FLOAT */
@@ -133,14 +148,12 @@ void ff_init_ff_cos_tabs(int index);
*/
int ff_fft_init(FFTContext *s, int nbits, int inverse);
-#if CONFIG_FFT_FLOAT
-void ff_fft_init_altivec(FFTContext *s);
void ff_fft_init_x86(FFTContext *s);
void ff_fft_init_arm(FFTContext *s);
void ff_fft_init_mips(FFTContext *s);
-#else
+void ff_fft_init_ppc(FFTContext *s);
+
void ff_fft_fixed_init_arm(FFTContext *s);
-#endif
void ff_fft_end(FFTContext *s);