From e1484ebed6d7a7e193d27e5d5fdf1ee585127081 Mon Sep 17 00:00:00 2001 From: Vitor Sessak Date: Tue, 23 Mar 2010 19:48:16 +0000 Subject: Implement the discrete sine/cosine transforms DCT-I and DST-I Originally committed as revision 22649 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/avfft.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'libavcodec/avfft.h') diff --git a/libavcodec/avfft.h b/libavcodec/avfft.h index d0babc0909..623f0a33b5 100644 --- a/libavcodec/avfft.h +++ b/libavcodec/avfft.h @@ -77,12 +77,22 @@ void av_rdft_end(RDFTContext *s); typedef struct DCTContext DCTContext; +enum DCTTransformType { + DCT_II = 0, + DCT_III, + DCT_I, + DST_I, +}; + /** - * Set up (Inverse)DCT. - * @param nbits log2 of the length of the input array - * @param inverse >0 forward transform, <0 inverse transform + * Sets up DCT. + * @param nbits size of the input array: + * (1 << nbits) for DCT-II, DCT-III and DST-I + * (1 << nbits) + 1 for DCT-I + * + * @note the first element of the input of DST-I is ignored */ -DCTContext *av_dct_init(int nbits, int inverse); +DCTContext *av_dct_init(int nbits, enum DCTTransformType type); void av_dct_calc(DCTContext *s, FFTSample *data); void av_dct_end (DCTContext *s); -- cgit v1.2.3