]> git.sesse.net Git - ffmpeg/blob - libavfilter/vf_spp.h
Merge commit 'cf280ed004b5c618560f8f43d14ff264bd1e4c3d'
[ffmpeg] / libavfilter / vf_spp.h
1 /*
2  * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
3  * Copyright (c) 2013 Clément Bœsch
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21
22 #ifndef AVFILTER_SPP_H
23 #define AVFILTER_SPP_H
24
25 #include "libavcodec/avcodec.h"
26 #include "libavcodec/dsputil.h"
27 #include "libavcodec/idctdsp.h"
28 #include "libavcodec/fdctdsp.h"
29 #include "avfilter.h"
30
31 #define MAX_LEVEL 6 /* quality levels */
32
33 typedef struct {
34     const AVClass *av_class;
35
36     int log2_count;
37     int qp;
38     int mode;
39     int qscale_type;
40     int temp_linesize;
41     uint8_t *src;
42     int16_t *temp;
43     AVCodecContext *avctx;
44     DSPContext dsp;
45     IDCTDSPContext idsp;
46     FDCTDSPContext fdsp;
47     int8_t *non_b_qp_table;
48     int non_b_qp_alloc_size;
49     int use_bframe_qp;
50     int hsub, vsub;
51
52     void (*store_slice)(uint8_t *dst, const int16_t *src,
53                         int dst_stride, int src_stride,
54                         int width, int height, int log2_scale,
55                         const uint8_t dither[8][8]);
56
57     void (*requantize)(int16_t dst[64], const int16_t src[64],
58                        int qp, const uint8_t *permutation);
59 } SPPContext;
60
61 void ff_spp_init_x86(SPPContext *s);
62
63 #endif /* AVFILTER_SPP_H */