Mercurial > libavcodec.hg
diff avfft.h @ 11535:f468aac92300 libavcodec
Implement the discrete sine/cosine transforms DCT-I and DST-I
author | vitor |
---|---|
date | Tue, 23 Mar 2010 19:48:16 +0000 |
parents | 384d803faff4 |
children | fdafbcef52f5 |
line wrap: on
line diff
--- a/avfft.h Tue Mar 23 17:58:39 2010 +0000 +++ b/avfft.h Tue Mar 23 19:48:16 2010 +0000 @@ -77,12 +77,22 @@ 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);