FFmpeg
Macros | Functions | Variables
yadif_common.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "internal.h"
#include "video.h"
#include "yadif.h"

Go to the source code of this file.

Macros

#define OFFSET(x)   offsetof(YADIFContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define CONST(name, help, val, unit)   { name, help, 0, AV_OPT_TYPE_CONST, {.i64=val}, INT_MIN, INT_MAX, FLAGS, unit }
 

Functions

static int return_frame (AVFilterContext *ctx, int is_second)
 
static int checkstride (YADIFContext *yadif, const AVFrame *a, const AVFrame *b)
 
static void fixstride (AVFilterLink *link, AVFrame *f)
 
int ff_yadif_filter_frame (AVFilterLink *link, AVFrame *frame)
 
int ff_yadif_request_frame (AVFilterLink *link)
 

Variables

const AVOption ff_yadif_options []
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 212 of file yadif_common.c.

◆ FLAGS

Definition at line 213 of file yadif_common.c.

◆ CONST

#define CONST (   name,
  help,
  val,
  unit 
)    { name, help, 0, AV_OPT_TYPE_CONST, {.i64=val}, INT_MIN, INT_MAX, FLAGS, unit }

Definition at line 215 of file yadif_common.c.

Function Documentation

◆ return_frame()

static int return_frame ( AVFilterContext ctx,
int  is_second 
)
static

Definition at line 28 of file yadif_common.c.

Referenced by ff_yadif_filter_frame(), and ff_yadif_request_frame().

◆ checkstride()

static int checkstride ( YADIFContext yadif,
const AVFrame a,
const AVFrame b 
)
static

Definition at line 77 of file yadif_common.c.

Referenced by ff_yadif_filter_frame().

◆ fixstride()

static void fixstride ( AVFilterLink link,
AVFrame f 
)
static

Definition at line 86 of file yadif_common.c.

Referenced by ff_yadif_filter_frame().

◆ ff_yadif_filter_frame()

int ff_yadif_filter_frame ( AVFilterLink link,
AVFrame frame 
)

Definition at line 100 of file yadif_common.c.

Referenced by ff_yadif_request_frame().

◆ ff_yadif_request_frame()

int ff_yadif_request_frame ( AVFilterLink link)

Definition at line 178 of file yadif_common.c.

Variable Documentation

◆ ff_yadif_options

const AVOption ff_yadif_options[]
Initial value:
= {
{ "mode", "specify the interlacing mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=YADIF_MODE_SEND_FRAME}, 0, 3, FLAGS, "mode"},
CONST("send_frame", "send one frame for each frame", YADIF_MODE_SEND_FRAME, "mode"),
CONST("send_field", "send one frame for each field", YADIF_MODE_SEND_FIELD, "mode"),
CONST("send_frame_nospatial", "send one frame for each frame, but skip spatial interlacing check", YADIF_MODE_SEND_FRAME_NOSPATIAL, "mode"),
CONST("send_field_nospatial", "send one frame for each field, but skip spatial interlacing check", YADIF_MODE_SEND_FIELD_NOSPATIAL, "mode"),
{ "parity", "specify the assumed picture field parity", OFFSET(parity), AV_OPT_TYPE_INT, {.i64=YADIF_PARITY_AUTO}, -1, 1, FLAGS, "parity" },
CONST("tff", "assume top field first", YADIF_PARITY_TFF, "parity"),
CONST("bff", "assume bottom field first", YADIF_PARITY_BFF, "parity"),
CONST("auto", "auto detect parity", YADIF_PARITY_AUTO, "parity"),
{ "deint", "specify which frames to deinterlace", OFFSET(deint), AV_OPT_TYPE_INT, {.i64=YADIF_DEINT_ALL}, 0, 1, FLAGS, "deint" },
CONST("all", "deinterlace all frames", YADIF_DEINT_ALL, "deint"),
CONST("interlaced", "only deinterlace frames marked as interlaced", YADIF_DEINT_INTERLACED, "deint"),
{ NULL }
}

Definition at line 217 of file yadif_common.c.

YADIF_MODE_SEND_FIELD
@ YADIF_MODE_SEND_FIELD
send 1 frame for each field
Definition: yadif.h:29
FLAGS
#define FLAGS
Definition: yadif_common.c:213
YADIF_MODE_SEND_FRAME
@ YADIF_MODE_SEND_FRAME
send 1 frame for each frame
Definition: yadif.h:28
YADIF_MODE_SEND_FIELD_NOSPATIAL
@ YADIF_MODE_SEND_FIELD_NOSPATIAL
send 1 frame for each field but skips spatial interlacing check
Definition: yadif.h:31
YADIF_PARITY_AUTO
@ YADIF_PARITY_AUTO
auto detection
Definition: yadif.h:37
YADIF_MODE_SEND_FRAME_NOSPATIAL
@ YADIF_MODE_SEND_FRAME_NOSPATIAL
send 1 frame for each frame but skips spatial interlacing check
Definition: yadif.h:30
NULL
#define NULL
Definition: coverity.c:32
CONST
#define CONST(name, help, val, unit)
Definition: yadif_common.c:215
parity
mcdeint parity
Definition: vf_mcdeint.c:281
OFFSET
#define OFFSET(x)
Definition: yadif_common.c:212
YADIF_DEINT_ALL
@ YADIF_DEINT_ALL
deinterlace all frames
Definition: yadif.h:41
mode
mode
Definition: ebur128.h:83
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
YADIF_DEINT_INTERLACED
@ YADIF_DEINT_INTERLACED
only deinterlace frames marked as interlaced
Definition: yadif.h:42
YADIF_PARITY_TFF
@ YADIF_PARITY_TFF
top field first
Definition: yadif.h:35
YADIF_PARITY_BFF
@ YADIF_PARITY_BFF
bottom field first
Definition: yadif.h:36