FFmpeg
tinterlace.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011 Stefano Sabatini
3  * Copyright (c) 2010 Baptiste Coudurier
4  * Copyright (c) 2003 Michael Zucchi <notzed@ximian.com>
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with FFmpeg; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 /**
24  * @file
25  * temporal field interlace filter, ported from MPlayer/libmpcodecs
26  */
27 #ifndef AVFILTER_TINTERLACE_H
28 #define AVFILTER_TINTERLACE_H
29 
30 #include "libavutil/bswap.h"
31 #include "libavutil/opt.h"
32 #include "libavutil/pixdesc.h"
33 #include "drawutils.h"
34 #include "avfilter.h"
35 #include "ccfifo.h"
36 
37 #define TINTERLACE_FLAG_VLPF 01
38 #define TINTERLACE_FLAG_CVLPF 2
39 #define TINTERLACE_FLAG_EXACT_TB 4
40 #define TINTERLACE_FLAG_BYPASS_IL 8
41 
42 enum VLPFilter {
43  VLPF_OFF = 0,
44  VLPF_LIN = 1,
45  VLPF_CMP = 2,
46 };
47 
58 };
59 
61  MODE_TFF = 0,
63 };
64 
65 typedef struct TInterlaceContext {
66  const AVClass *class;
67  int mode; ///< TInterlaceMode, interlace mode selected
69  int flags; ///< flags affecting interlacing algorithm
70  int lowpass; ///< legacy interlace filter lowpass mode
71  int vsub; ///< chroma vertical subsampling
74  uint8_t *black_data[2][4]; ///< buffer used to fill padded lines (limited/full)
79  void (*lowpass_line)(uint8_t *dstp, ptrdiff_t width, const uint8_t *srcp,
80  ptrdiff_t mref, ptrdiff_t pref, int clip_max);
83 
85 
86 #endif /* AVFILTER_TINTERLACE_H */
MODE_MERGE
@ MODE_MERGE
Definition: tinterlace.h:49
FFDrawColor
Definition: drawutils.h:51
opt.h
TInterlaceContext::lowpass_line
void(* lowpass_line)(uint8_t *dstp, ptrdiff_t width, const uint8_t *srcp, ptrdiff_t mref, ptrdiff_t pref, int clip_max)
Definition: tinterlace.h:79
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:403
pixdesc.h
TInterlaceContext
Definition: tinterlace.h:65
TInterlaceContext::color
FFDrawColor color
Definition: tinterlace.h:77
TInterlaceContext::black_linesize
int black_linesize[4]
Definition: tinterlace.h:75
VLPF_LIN
@ VLPF_LIN
Definition: tinterlace.h:44
MODE_INTERLEAVE_TOP
@ MODE_INTERLEAVE_TOP
Definition: tinterlace.h:53
TInterlaceContext::vsub
int vsub
chroma vertical subsampling
Definition: tinterlace.h:71
TInterlaceContext::preout_time_base
AVRational preout_time_base
Definition: tinterlace.h:68
InterlaceScanMode
InterlaceScanMode
Definition: tinterlace.h:60
MODE_MERGEX2
@ MODE_MERGEX2
Definition: tinterlace.h:56
MODE_NB
@ MODE_NB
Definition: tinterlace.h:57
TInterlaceContext::flags
int flags
flags affecting interlacing algorithm
Definition: tinterlace.h:69
TInterlaceContext::csp
const AVPixFmtDescriptor * csp
Definition: tinterlace.h:78
TInterlaceContext::cur
AVFrame * cur
Definition: tinterlace.h:72
VLPF_CMP
@ VLPF_CMP
Definition: tinterlace.h:45
TInterlaceContext::next
AVFrame * next
Definition: tinterlace.h:73
TInterlaceContext::black_data
uint8_t * black_data[2][4]
buffer used to fill padded lines (limited/full)
Definition: tinterlace.h:74
ff_tinterlace_init_x86
void ff_tinterlace_init_x86(TInterlaceContext *interlace)
Definition: vf_tinterlace_init.c:57
TInterlaceContext::cc_fifo
CCFifo cc_fifo
Definition: tinterlace.h:81
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:75
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
TInterlaceContext::mode
int mode
TInterlaceMode, interlace mode selected.
Definition: tinterlace.h:67
MODE_DROP_EVEN
@ MODE_DROP_EVEN
Definition: tinterlace.h:50
CCFifo
Definition: ccfifo.h:40
TInterlaceMode
TInterlaceMode
Definition: tinterlace.h:48
MODE_INTERLEAVE_BOTTOM
@ MODE_INTERLEAVE_BOTTOM
Definition: tinterlace.h:54
VLPFilter
VLPFilter
Definition: tinterlace.h:42
MODE_BFF
@ MODE_BFF
Definition: tinterlace.h:62
FFDrawContext
Definition: drawutils.h:36
TInterlaceContext::lowpass
int lowpass
legacy interlace filter lowpass mode
Definition: tinterlace.h:70
bswap.h
MODE_PAD
@ MODE_PAD
Definition: tinterlace.h:52
avfilter.h
TInterlaceContext::draw
FFDrawContext draw
Definition: tinterlace.h:76
MODE_INTERLACEX2
@ MODE_INTERLACEX2
Definition: tinterlace.h:55
VLPF_OFF
@ VLPF_OFF
Definition: tinterlace.h:43
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:69
MODE_TFF
@ MODE_TFF
Definition: tinterlace.h:61
ccfifo.h
width
#define width
Definition: dsp.h:85
drawutils.h
MODE_DROP_ODD
@ MODE_DROP_ODD
Definition: tinterlace.h:51