FFmpeg
Loading...
Searching...
No Matches
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#include "ccfifo.h"
26
28 YADIF_MODE_SEND_FRAME = 0, ///< send 1 frame for each frame
29 YADIF_MODE_SEND_FIELD = 1, ///< send 1 frame for each field
30 YADIF_MODE_SEND_FRAME_NOSPATIAL = 2, ///< send 1 frame for each frame but skips spatial interlacing check
31 YADIF_MODE_SEND_FIELD_NOSPATIAL = 3, ///< send 1 frame for each field but skips spatial interlacing check
32};
33
35 YADIF_PARITY_TFF = 0, ///< top field first
36 YADIF_PARITY_BFF = 1, ///< bottom field first
37 YADIF_PARITY_AUTO = -1, ///< auto detection
38};
39
41 YADIF_DEINT_ALL = 0, ///< deinterlace all frames
42 YADIF_DEINT_INTERLACED = 1, ///< only deinterlace frames marked as interlaced
43};
44
46 YADIF_FIELD_BACK_END = -1, ///< The last frame in a sequence
47 YADIF_FIELD_END = 0, ///< The first or last field in a sequence
48 YADIF_FIELD_NORMAL = 1, ///< A normal field in the middle of a sequence
49};
50
51typedef struct YADIFContext {
52 const AVClass *class;
53
54 int mode; ///< YADIFMode
55 int parity; ///< YADIFParity
56 int deint; ///< YADIFDeint
57
59
64
65 void (*filter)(AVFilterContext *ctx, AVFrame *dstpic, int parity, int tff);
66
67 /**
68 * Required alignment for filter_line
69 */
70 void (*filter_line)(void *dst,
71 void *prev, void *cur, void *next,
72 int w, int prefs, int mrefs, int parity, int mode);
73 void (*filter_edges)(void *dst, void *prev, void *cur, void *next,
74 int w, int prefs, int mrefs, int parity, int mode);
75
77 int eof;
78 uint8_t *temp_line;
81
82 /*
83 * An algorithm that treats first and/or last fields in a sequence
84 * differently can use this to detect those cases. It is the algorithm's
85 * responsibility to set the value to YADIF_FIELD_NORMAL after processing
86 * the first field.
87 */
88 int current_field; ///< YADIFCurrentField
89
92
94
96
98
100
102
103extern const AVOption ff_yadif_options[];
104
105#endif /* AVFILTER_YADIF_H */
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition dsp.h:87
Main libavfilter public API header.
CC FIFO Buffer.
static AVFrame * frame
uint8_t w
Definition llvidencdsp.c:39
AVOptions.
Describe the class of an AVClass context structure.
Definition log.h:76
An instance of a filter.
Definition avfilter.h:273
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
AVOption.
Definition opt.h:428
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition pixdesc.h:69
AVFrame * prev
Definition yadif.h:62
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:70
int deint
YADIFDeint.
Definition yadif.h:56
AVFrame * cur
Definition yadif.h:60
AVFrame * next
Definition yadif.h:61
void(* filter_edges)(void *dst, void *prev, void *cur, void *next, int w, int prefs, int mrefs, int parity, int mode)
Definition yadif.h:73
void(* filter)(AVFilterContext *ctx, AVFrame *dstpic, int parity, int tff)
Definition yadif.h:65
int mode
YADIFMode.
Definition yadif.h:54
int pts_multiplier
Definition yadif.h:90
int current_field
YADIFCurrentField.
Definition yadif.h:88
const AVPixFmtDescriptor * csp
Definition yadif.h:76
int frame_pending
Definition yadif.h:58
int eof
Definition yadif.h:77
AVFrame * out
Definition yadif.h:63
CCFifo cc_fifo
Definition yadif.h:80
int temp_line_size
Definition yadif.h:79
int parity
YADIFParity.
Definition yadif.h:55
uint8_t * temp_line
Definition yadif.h:78
static AVFormatContext * ctx
Definition movenc.c:49
YADIFDeint
Definition yadif.h:40
@ YADIF_DEINT_INTERLACED
only deinterlace frames marked as interlaced
Definition yadif.h:42
@ YADIF_DEINT_ALL
deinterlace all frames
Definition yadif.h:41
YADIFParity
Definition yadif.h:34
@ YADIF_PARITY_TFF
top field first
Definition yadif.h:35
@ YADIF_PARITY_BFF
bottom field first
Definition yadif.h:36
@ YADIF_PARITY_AUTO
auto detection
Definition yadif.h:37
void ff_yadif_init_x86(YADIFContext *yadif)
YADIFCurrentField
Definition yadif.h:45
@ YADIF_FIELD_NORMAL
A normal field in the middle of a sequence.
Definition yadif.h:48
@ YADIF_FIELD_BACK_END
The last frame in a sequence.
Definition yadif.h:46
@ YADIF_FIELD_END
The first or last field in a sequence.
Definition yadif.h:47
int ff_yadif_filter_frame(AVFilterLink *link, AVFrame *frame)
YADIFMode
Definition yadif.h:27
@ YADIF_MODE_SEND_FIELD_NOSPATIAL
send 1 frame for each field but skips spatial interlacing check
Definition yadif.h:31
@ YADIF_MODE_SEND_FIELD
send 1 frame for each field
Definition yadif.h:29
@ YADIF_MODE_SEND_FRAME_NOSPATIAL
send 1 frame for each frame but skips spatial interlacing check
Definition yadif.h:30
@ YADIF_MODE_SEND_FRAME
send 1 frame for each frame
Definition yadif.h:28
int ff_yadif_request_frame(AVFilterLink *link)
const AVOption ff_yadif_options[]
void ff_yadif_uninit(AVFilterContext *ctx)
int ff_yadif_config_output_common(AVFilterLink *outlink)