FFmpeg
Data Structures | Macros | Functions | Variables
vf_kerndeint.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "filters.h"
#include "video.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 []
 
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 50 of file vf_kerndeint.c.

◆ FLAGS

Definition at line 51 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 63 of file vf_kerndeint.c.

◆ config_props()

static int config_props ( AVFilterLink inlink)
static

Definition at line 80 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 101 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 52 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 289 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 299 of file vf_kerndeint.c.

FILTER_PIXFMTS_ARRAY
#define FILTER_PIXFMTS_ARRAY(array)
Definition: filters.h:242
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_kerndeint.c:63
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
kerndeint_inputs
static const AVFilterPad kerndeint_inputs[]
Definition: vf_kerndeint.c:289
AV_PIX_FMT_BGRA
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: pixfmt.h:102
KerndeintContext
Definition: vf_kerndeint.c:39
ff_video_default_filterpad
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
Definition: video.c:37
config_props
static int config_props(AVFilterLink *inlink)
Definition: vf_kerndeint.c:80
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:73
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
AV_PIX_FMT_RGBA
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:100
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:74
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: vf_kerndeint.c:70
AV_PIX_FMT_BGR0
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
Definition: pixfmt.h:265
AV_PIX_FMT_ABGR
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: pixfmt.h:101
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:94
AV_PIX_FMT_RGB0
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
Definition: pixfmt.h:263
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
Definition: vf_kerndeint.c:101
AV_PIX_FMT_ARGB
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: pixfmt.h:99
FLAGS
#define FLAGS
Definition: vf_kerndeint.c:51
AV_PIX_FMT_0BGR
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
Definition: pixfmt.h:264
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
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
Underlying C type is int.
Definition: opt.h:327
OFFSET
#define OFFSET(x)
Definition: vf_kerndeint.c:50
AV_PIX_FMT_0RGB
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
Definition: pixfmt.h:262