FFmpeg
Data Structures | Macros | Functions | Variables
vf_kerndeint.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  KerndeintContext
 

Macros

#define OFFSET(x)   offsetof(KerndeintContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (kerndeint)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int config_props (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *inpic)
 

Variables

static const AVOption kerndeint_options []
 
static enum AVPixelFormat pix_fmts []
 
static const AVFilterPad kerndeint_inputs []
 
static const AVFilterPad kerndeint_outputs []
 
const AVFilter ff_vf_kerndeint
 

Detailed Description

Kernel Deinterlacer Ported from MPlayer libmpcodecs/vf_kerndeint.c.

Definition in file vf_kerndeint.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(KerndeintContext, x)

Definition at line 49 of file vf_kerndeint.c.

◆ FLAGS

Definition at line 50 of file vf_kerndeint.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( kerndeint  )

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 62 of file vf_kerndeint.c.

◆ config_props()

static int config_props ( AVFilterLink inlink)
static

Definition at line 79 of file vf_kerndeint.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame inpic 
)
static

< Previous field's pixel line number n

< Previous field's pixel line number (n - 1)

< Previous field's pixel line number (n + 1)

< Previous field's pixel line number (n - 2)

< Previous field's pixel line number (n + 2)

< Previous field's pixel line number (n - 4)

< Previous field's pixel line number (n + 4)

< Current field's pixel line number n

< Current field's pixel line number (n - 1)

< Current field's pixel line number (n + 1)

< Current field's pixel line number (n - 2)

< Current field's pixel line number (n + 2)

< Current field's pixel line number (n - 3)

< Current field's pixel line number (n + 3)

< Current field's pixel line number (n - 4)

< Current field's pixel line number (n + 4)

Definition at line 100 of file vf_kerndeint.c.

Variable Documentation

◆ kerndeint_options

const AVOption kerndeint_options[]
static
Initial value:
= {
{ "thresh", "set the threshold", OFFSET(thresh), AV_OPT_TYPE_INT, {.i64=10}, 0, 255, FLAGS },
{ "map", "set the map", OFFSET(map), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
{ "order", "set the order", OFFSET(order), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
{ "sharp", "set sharpening", OFFSET(sharp), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
{ "twoway", "set twoway", OFFSET(twoway), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
{ NULL }
}

Definition at line 51 of file vf_kerndeint.c.

◆ pix_fmts

enum AVPixelFormat pix_fmts[]
static

◆ kerndeint_inputs

const AVFilterPad kerndeint_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_props,
},
}

Definition at line 283 of file vf_kerndeint.c.

◆ kerndeint_outputs

const AVFilterPad kerndeint_outputs[]
static
Initial value:
= {
{
.name = "default",
},
}

Definition at line 292 of file vf_kerndeint.c.

◆ ff_vf_kerndeint

const AVFilter ff_vf_kerndeint
Initial value:
= {
.name = "kerndeint",
.description = NULL_IF_CONFIG_SMALL("Apply kernel deinterlacing to the input."),
.priv_size = sizeof(KerndeintContext),
.priv_class = &kerndeint_class,
}

Definition at line 300 of file vf_kerndeint.c.

uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_kerndeint.c:62
FILTER_PIXFMTS_ARRAY
#define FILTER_PIXFMTS_ARRAY(array)
Definition: internal.h:170
kerndeint_inputs
static const AVFilterPad kerndeint_inputs[]
Definition: vf_kerndeint.c:283
AV_PIX_FMT_BGRA
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:95
KerndeintContext
Definition: vf_kerndeint.c:38
config_props
static int config_props(AVFilterLink *inlink)
Definition: vf_kerndeint.c:79
kerndeint_outputs
static const AVFilterPad kerndeint_outputs[]
Definition: vf_kerndeint.c:292
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:66
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:190
AV_PIX_FMT_RGBA
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:93
NULL
#define NULL
Definition: coverity.c:32
AV_PIX_FMT_YUYV422
@ AV_PIX_FMT_YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition: pixfmt.h:67
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: vf_kerndeint.c:69
AV_PIX_FMT_BGR0
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
Definition: pixfmt.h:230
AV_PIX_FMT_ABGR
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: pixfmt.h:94
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_PIX_FMT_RGB0
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
Definition: pixfmt.h:228
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
Definition: vf_kerndeint.c:100
AV_PIX_FMT_ARGB
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:92
FLAGS
#define FLAGS
Definition: vf_kerndeint.c:50
AV_PIX_FMT_0BGR
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
Definition: pixfmt.h:229
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
map
const VDPAUPixFmtMap * map
Definition: hwcontext_vdpau.c:71
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:244
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:191
OFFSET
#define OFFSET(x)
Definition: vf_kerndeint.c:49
AV_PIX_FMT_0RGB
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
Definition: pixfmt.h:227