summaryrefslogtreecommitdiff
path: root/libavcodec/dsputil.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dsputil.h')
-rw-r--r--libavcodec/dsputil.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 165aef7a09..66557138bf 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -674,6 +674,8 @@ typedef struct FFTContext {
void (*imdct_half)(struct MDCTContext *s, FFTSample *output, const FFTSample *input);
} FFTContext;
+extern FFTSample* ff_cos_tabs[13];
+
/**
* Sets up a complex FFT.
* @param nbits log2 of the length of the input array
@@ -759,6 +761,35 @@ void ff_imdct_half_sse(MDCTContext *s, FFTSample *output, const FFTSample *input
void ff_mdct_calc(MDCTContext *s, FFTSample *out, const FFTSample *input);
void ff_mdct_end(MDCTContext *s);
+/* Real Discrete Fourier Transform */
+
+enum RDFTransformType {
+ RDFT,
+ IRDFT,
+ RIDFT,
+ IRIDFT,
+};
+
+typedef struct {
+ int nbits;
+ int inverse;
+ int sign_convention;
+
+ /* pre/post rotation tables */
+ FFTSample *tcos;
+ FFTSample *tsin;
+ FFTContext fft;
+} RDFTContext;
+
+/**
+ * Sets up a real FFT.
+ * @param nbits log2 of the length of the input array
+ * @param trans the type of transform
+ */
+int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans);
+void ff_rdft_calc(RDFTContext *s, FFTSample *data);
+void ff_rdft_end(RDFTContext *s);
+
#define WRAPPER8_16(name8, name16)\
static int name16(void /*MpegEncContext*/ *s, uint8_t *dst, uint8_t *src, int stride, int h){\
return name8(s, dst , src , stride, h)\