FFmpeg
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 #if !defined(AVCODEC_DCT_H) && (!defined(FFT_FLOAT) || FFT_FLOAT)
25 #define AVCODEC_DCT_H
26 
27 #include <stddef.h>
28 #include <stdint.h>
29 
30 #include "rdft.h"
31 
32 struct DCTContext {
33  int nbits;
34  int inverse;
36  const float *costab;
38  void (*dct_calc)(struct DCTContext *s, FFTSample *data);
39  void (*dct32)(FFTSample *out, const FFTSample *in);
40 };
41 
42 /**
43  * Set up DCT.
44  * @param nbits size of the input array:
45  * (1 << nbits) for DCT-II, DCT-III and DST-I
46  * (1 << nbits) + 1 for DCT-I
47  *
48  * @note the first element of the input of DST-I is ignored
49  */
51 void ff_dct_end (DCTContext *s);
52 
54 
55 void ff_fdct_ifast(int16_t *data);
56 void ff_fdct_ifast248(int16_t *data);
57 void ff_jpeg_fdct_islow_8(int16_t *data);
58 void ff_jpeg_fdct_islow_10(int16_t *data);
59 void ff_fdct248_islow_8(int16_t *data);
60 void ff_fdct248_islow_10(int16_t *data);
61 
62 void ff_j_rev_dct(int16_t *data);
63 void ff_j_rev_dct4(int16_t *data);
64 void ff_j_rev_dct2(int16_t *data);
65 void ff_j_rev_dct1(int16_t *data);
66 void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
67 void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block);
68 
69 #endif /* AVCODEC_DCT_H */
DCTContext::dct_calc
void(* dct_calc)(struct DCTContext *s, FFTSample *data)
Definition: dct.h:38
out
FILE * out
Definition: movenc.c:54
rdft.h
DCTContext::costab
const float * costab
Definition: dct.h:36
ff_fdct248_islow_8
void ff_fdct248_islow_8(int16_t *data)
data
const char data[16]
Definition: mxf.c:143
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
s
#define s(width, name)
Definition: cbs_vp9.c:256
ff_fdct_ifast248
void ff_fdct_ifast248(int16_t *data)
Definition: jfdctfst.c:273
DCTContext::inverse
int inverse
Definition: dct.h:34
ff_fdct_ifast
void ff_fdct_ifast(int16_t *data)
Definition: jfdctfst.c:207
ff_jref_idct_put
void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
Definition: jrevdct.c:1162
FFTSample
float FFTSample
Definition: avfft.h:35
ff_jpeg_fdct_islow_8
void ff_jpeg_fdct_islow_8(int16_t *data)
ff_fdct248_islow_10
void ff_fdct248_islow_10(int16_t *data)
ff_jpeg_fdct_islow_10
void ff_jpeg_fdct_islow_10(int16_t *data)
ff_dct_init_x86
void ff_dct_init_x86(DCTContext *s)
Definition: dct_init.c:28
ff_dct_init
int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType type)
Set up DCT.
Definition: dct.c:179
ff_j_rev_dct1
void ff_j_rev_dct1(int16_t *data)
DCTContext::nbits
int nbits
Definition: dct.h:33
ff_j_rev_dct2
void ff_j_rev_dct2(int16_t *data)
DCTContext::rdft
RDFTContext rdft
Definition: dct.h:35
RDFTContext
Definition: rdft.h:28
DCTContext::dct32
void(* dct32)(FFTSample *out, const FFTSample *in)
Definition: dct.h:39
DCTContext
Definition: dct.h:32
ff_j_rev_dct
void ff_j_rev_dct(int16_t *data)
ff_jref_idct_add
void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
Definition: jrevdct.c:1168
DCTContext::csc2
FFTSample * csc2
Definition: dct.h:37
ff_dct_end
void ff_dct_end(DCTContext *s)
Definition: dct.c:224
ff_j_rev_dct4
void ff_j_rev_dct4(int16_t *data)
block
The exact code depends on how similar the blocks are and how related they are to the block
Definition: filter_design.txt:207
DCTTransformType
DCTTransformType
Definition: avfft.h:93