aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dsputil.h
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2010-01-20 00:39:47 +0000
committerVitor Sessak <vitor1001@gmail.com>2010-01-20 00:39:47 +0000
commit7f3f5f46c224c95673e85cdc06d5ac9d6a08701f (patch)
tree464ce2ef7a017c07272074916674e56d470c3e1c /libavcodec/dsputil.h
parentc4f2b6dce306933e6d8fa82022f24a11ea1d29f0 (diff)
downloadffmpeg-7f3f5f46c224c95673e85cdc06d5ac9d6a08701f.tar.gz
Floating point discrete cosine transform
Originally committed as revision 21338 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.h')
-rw-r--r--libavcodec/dsputil.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 1476ae7ba3..65088c11ca 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -899,6 +899,26 @@ 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);
+/* Discrete Cosine Transform */
+
+typedef struct {
+ int nbits;
+ int inverse;
+ FFTSample *data;
+ RDFTContext rdft;
+ const float *costab;
+ FFTSample *csc2;
+} DCTContext;
+
+/**
+ * Sets up (Inverse)DCT.
+ * @param nbits log2 of the length of the input array
+ * @param inverse >0 forward transform, <0 inverse transform
+ */
+int ff_dct_init(DCTContext *s, int nbits, int inverse);
+void ff_dct_calc(DCTContext *s, FFTSample *data);
+void ff_dct_end (DCTContext *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)\