summaryrefslogtreecommitdiff
path: root/libavcodec/fft.h
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-03-07 21:56:45 +0000
committerMåns Rullgård <mans@mansr.com>2010-03-07 21:56:45 +0000
commitc70948315b2108d5d082cafe580cb6317edb82be (patch)
tree37e8528e5dabc3c43fd9063cbdeaa021a467750a /libavcodec/fft.h
parent41ea18fb0db3c22943458e23d604158f2c95d4ca (diff)
Create a public API for FFT family of functions
Originally committed as revision 22291 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/fft.h')
-rw-r--r--libavcodec/fft.h28
1 files changed, 7 insertions, 21 deletions
diff --git a/libavcodec/fft.h b/libavcodec/fft.h
index 9c2345a0bd..636f76b824 100644
--- a/libavcodec/fft.h
+++ b/libavcodec/fft.h
@@ -25,18 +25,11 @@
#include <stdint.h>
#include "config.h"
#include "libavutil/mem.h"
+#include "avfft.h"
/* FFT computation */
-/* NOTE: soon integer code will be added, so you must use the
- FFTSample type */
-typedef float FFTSample;
-
-typedef struct FFTComplex {
- FFTSample re, im;
-} FFTComplex;
-
-typedef struct FFTContext {
+struct FFTContext {
int nbits;
int inverse;
uint16_t *revtab;
@@ -57,7 +50,7 @@ typedef struct FFTContext {
int permutation;
#define FF_MDCT_PERM_NONE 0
#define FF_MDCT_PERM_INTERLEAVE 1
-} FFTContext;
+};
#if CONFIG_HARDCODED_TABLES
#define COSTABLE_CONST const
@@ -194,14 +187,7 @@ void ff_mdct_end(FFTContext *s);
/* Real Discrete Fourier Transform */
-enum RDFTransformType {
- DFT_R2C,
- IDFT_C2R,
- IDFT_R2C,
- DFT_C2R,
-};
-
-typedef struct {
+struct RDFTContext {
int nbits;
int inverse;
int sign_convention;
@@ -210,7 +196,7 @@ typedef struct {
const FFTSample *tcos;
SINTABLE_CONST FFTSample *tsin;
FFTContext fft;
-} RDFTContext;
+};
/**
* Sets up a real FFT.
@@ -223,14 +209,14 @@ void ff_rdft_end(RDFTContext *s);
/* Discrete Cosine Transform */
-typedef struct {
+struct DCTContext {
int nbits;
int inverse;
FFTSample *data;
RDFTContext rdft;
const float *costab;
FFTSample *csc2;
-} DCTContext;
+};
/**
* Sets up (Inverse)DCT.