]> git.sesse.net Git - ffmpeg/blob - libavfilter/yadif.h
lavfi/blackdetect: switch to new ff_filter_frame() API
[ffmpeg] / libavfilter / yadif.h
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18
19 #ifndef AVFILTER_YADIF_H
20 #define AVFILTER_YADIF_H
21
22 #include "libavutil/pixdesc.h"
23 #include "avfilter.h"
24
25 typedef struct YADIFContext {
26     /**
27      * 0: send 1 frame for each frame
28      * 1: send 1 frame for each field
29      * 2: like 0 but skips spatial interlacing check
30      * 3: like 1 but skips spatial interlacing check
31      */
32     int mode;
33
34     /**
35      *  0: top field first
36      *  1: bottom field first
37      * -1: auto-detection
38      */
39     int parity;
40
41     int frame_pending;
42
43     /**
44      *  0: deinterlace all frames
45      *  1: only deinterlace frames marked as interlaced
46      */
47     int auto_enable;
48
49     AVFilterBufferRef *cur;
50     AVFilterBufferRef *next;
51     AVFilterBufferRef *prev;
52     AVFilterBufferRef *out;
53     void (*filter_line)(uint8_t *dst,
54                         uint8_t *prev, uint8_t *cur, uint8_t *next,
55                         int w, int prefs, int mrefs, int parity, int mode);
56
57     const AVPixFmtDescriptor *csp;
58     int eof;
59     uint8_t *temp_line;
60     int temp_line_size;
61 } YADIFContext;
62
63 void ff_yadif_init_x86(YADIFContext *yadif);
64
65 #endif /* AVFILTER_YADIF_H */