FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
yadif.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (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 GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 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/opt.h"
23 #include "libavutil/pixdesc.h"
24 #include "avfilter.h"
25 
26 enum YADIFMode {
27  YADIF_MODE_SEND_FRAME = 0, ///< send 1 frame for each frame
28  YADIF_MODE_SEND_FIELD = 1, ///< send 1 frame for each field
29  YADIF_MODE_SEND_FRAME_NOSPATIAL = 2, ///< send 1 frame for each frame but skips spatial interlacing check
30  YADIF_MODE_SEND_FIELD_NOSPATIAL = 3, ///< send 1 frame for each field but skips spatial interlacing check
31 };
32 
34  YADIF_PARITY_TFF = 0, ///< top field first
35  YADIF_PARITY_BFF = 1, ///< bottom field first
36  YADIF_PARITY_AUTO = -1, ///< auto detection
37 };
38 
39 enum YADIFDeint {
40  YADIF_DEINT_ALL = 0, ///< deinterlace all frames
41  YADIF_DEINT_INTERLACED = 1, ///< only deinterlace frames marked as interlaced
42 };
43 
44 typedef struct YADIFContext {
45  const AVClass *class;
46 
47  int mode; ///< YADIFMode
48  int parity; ///< YADIFParity
49  int deint; ///< YADIFDeint
50 
52 
57 
58  void (*filter)(AVFilterContext *ctx, AVFrame *dstpic, int parity, int tff);
59 
60  /**
61  * Required alignment for filter_line
62  */
63  void (*filter_line)(void *dst,
64  void *prev, void *cur, void *next,
65  int w, int prefs, int mrefs, int parity, int mode);
66  void (*filter_edges)(void *dst, void *prev, void *cur, void *next,
67  int w, int prefs, int mrefs, int parity, int mode);
68 
70  int eof;
73 } YADIFContext;
74 
75 void ff_yadif_init_x86(YADIFContext *yadif);
76 
78 
80 
81 extern const AVOption ff_yadif_options[];
82 
83 #endif /* AVFILTER_YADIF_H */
void(* filter_edges)(void *dst, void *prev, void *cur, void *next, int w, int prefs, int mrefs, int parity, int mode)
Definition: yadif.h:66
This structure describes decoded (raw) audio or video data.
Definition: frame.h:226
AVOption.
Definition: opt.h:246
Main libavfilter public API header.
int ff_yadif_request_frame(AVFilterLink *link)
Definition: yadif_common.c:154
send 1 frame for each frame but skips spatial interlacing check
Definition: yadif.h:29
int frame_pending
Definition: yadif.h:51
uint8_t * temp_line
Definition: yadif.h:71
void ff_yadif_init_x86(YADIFContext *yadif)
Definition: vf_yadif_init.c:60
AVFrame * cur
Definition: yadif.h:53
uint8_t
AVOptions.
AVFrame * next
Definition: yadif.h:54
static AVFrame * frame
bottom field first
Definition: yadif.h:35
void(* filter_line)(void *dst, void *prev, void *cur, void *next, int w, int prefs, int mrefs, int parity, int mode)
Required alignment for filter_line.
Definition: yadif.h:63
send 1 frame for each field
Definition: yadif.h:28
AVFrame * prev
Definition: yadif.h:55
YADIFDeint
Definition: yadif.h:39
auto detection
Definition: yadif.h:36
int deint
YADIFDeint.
Definition: yadif.h:49
uint8_t w
Definition: llviddspenc.c:38
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
YADIFParity
Definition: yadif.h:33
AVFormatContext * ctx
Definition: movenc.c:48
void(* filter)(AVFilterContext *ctx, AVFrame *dstpic, int parity, int tff)
Definition: yadif.h:58
int eof
Definition: yadif.h:70
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:81
AVFrame * out
Definition: yadif.h:56
Describe the class of an AVClass context structure.
Definition: log.h:67
int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame)
Definition: yadif_common.c:90
int parity
YADIFParity.
Definition: yadif.h:48
send 1 frame for each field but skips spatial interlacing check
Definition: yadif.h:30
YADIFMode
Definition: yadif.h:26
const AVPixFmtDescriptor * csp
Definition: yadif.h:69
const AVOption ff_yadif_options[]
Definition: yadif_common.c:192
deinterlace all frames
Definition: yadif.h:40
send 1 frame for each frame
Definition: yadif.h:27
An instance of a filter.
Definition: avfilter.h:338
int temp_line_size
Definition: yadif.h:72
only deinterlace frames marked as interlaced
Definition: yadif.h:41
top field first
Definition: yadif.h:34
int mode
YADIFMode.
Definition: yadif.h:47