FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dct.h
Go to the documentation of this file.
1 /*
2  * (I)DCT Transforms
3  * Copyright (c) 2009 Peter Ross <pross@xvid.org>
4  * Copyright (c) 2010 Alex Converse <alex.converse@gmail.com>
5  * Copyright (c) 2010 Vitor Sessak
6  *
7  * This file is part of FFmpeg.
8  *
9  * FFmpeg is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * FFmpeg is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with FFmpeg; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22  */
23 
24 #ifndef AVCODEC_DCT_H
25 #define AVCODEC_DCT_H
26 
27 #include <stdint.h>
28 
29 #include "rdft.h"
30 
31 struct DCTContext {
32  int nbits;
33  int inverse;
35  const float *costab;
39 };
40 
41 /**
42  * Set up DCT.
43  * @param nbits size of the input array:
44  * (1 << nbits) for DCT-II, DCT-III and DST-I
45  * (1 << nbits) + 1 for DCT-I
46  *
47  * @note the first element of the input of DST-I is ignored
48  */
49 int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType type);
50 void ff_dct_end (DCTContext *s);
51 
53 
54 void ff_fdct_ifast(int16_t *data);
55 void ff_fdct_ifast248(int16_t *data);
56 void ff_jpeg_fdct_islow_8(int16_t *data);
57 void ff_jpeg_fdct_islow_10(int16_t *data);
58 void ff_fdct248_islow_8(int16_t *data);
59 void ff_fdct248_islow_10(int16_t *data);
60 
61 void ff_j_rev_dct(int16_t *data);
62 void ff_j_rev_dct4(int16_t *data);
63 void ff_j_rev_dct2(int16_t *data);
64 void ff_j_rev_dct1(int16_t *data);
65 
66 void ff_fdct_mmx(int16_t *block);
67 void ff_fdct_mmxext(int16_t *block);
68 void ff_fdct_sse2(int16_t *block);
69 
70 #endif /* AVCODEC_DCT_H */