vf_field.c File Reference

field filter, based on libmpcodecs/vf_field.c by Rich Felker More...

#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "internal.h"
Include dependency graph for vf_field.c:

Go to the source code of this file.

Data Structures

struct  FieldContext
 

Macros

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

Enumerations

enum  FieldType { FIELD_TYPE_TOP = 0, FIELD_TYPE_BOTTOM, FIELD_UPPER = 0, FIELD_LOWER = 1 }
 

Functions

 AVFILTER_DEFINE_CLASS (field)
 
static int config_props_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *inpicref)
 

Variables

static const AVOption field_options []
 
static const AVFilterPad field_inputs []
 
static const AVFilterPad field_outputs []
 
AVFilter avfilter_vf_field
 

Detailed Description

field filter, based on libmpcodecs/vf_field.c by Rich Felker

Definition in file vf_field.c.

Macro Definition Documentation

Definition at line 41 of file vf_field.c.

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

Definition at line 40 of file vf_field.c.

Enumeration Type Documentation

enum FieldType
Enumerator
FIELD_TYPE_TOP 
FIELD_TYPE_BOTTOM 
FIELD_UPPER 
FIELD_LOWER 

Definition at line 32 of file vf_field.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( field  )
static int config_props_output ( AVFilterLink outlink)
static

Definition at line 53 of file vf_field.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame inpicref 
)
static

Definition at line 74 of file vf_field.c.

Variable Documentation

AVFilter avfilter_vf_field
Initial value:
= {
.name = "field",
.description = NULL_IF_CONFIG_SMALL("Extract a field from the input video."),
.priv_size = sizeof(FieldContext),
.priv_class = &field_class,
}
static const AVFilterPad field_inputs[]
Definition: vf_field.c:91
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:117
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVFilterPad field_outputs[]
Definition: vf_field.c:101
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs

Definition at line 110 of file vf_field.c.

const AVFilterPad field_inputs[]
static
Initial value:
= {
{
.name = "default",
.get_video_buffer = ff_null_get_video_buffer,
.filter_frame = filter_frame,
},
{ NULL }
}
static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
Definition: vf_field.c:74
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
Definition: video.c:35
NULL
Definition: eval.c:55

Definition at line 91 of file vf_field.c.

const AVOption field_options[]
static
Initial value:
= {
{"type", "set field type (top or bottom)", OFFSET(type), AV_OPT_TYPE_INT, {.i64=FIELD_TYPE_TOP}, 0, 1, FLAGS, "field_type" },
{"top", "select top field", 0, AV_OPT_TYPE_CONST, {.i64=FIELD_TYPE_TOP}, INT_MIN, INT_MAX, FLAGS, "field_type"},
{"bottom", "select bottom field", 0, AV_OPT_TYPE_CONST, {.i64=FIELD_TYPE_BOTTOM}, INT_MIN, INT_MAX, FLAGS, "field_type"},
{NULL}
}
#define FLAGS
Definition: vf_field.c:41
#define OFFSET(x)
Definition: vf_field.c:40
NULL
Definition: eval.c:55
#define type

Definition at line 43 of file vf_field.c.

const AVFilterPad field_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_props_output,
},
{ NULL }
}
NULL
Definition: eval.c:55
static int config_props_output(AVFilterLink *outlink)
Definition: vf_field.c:53

Definition at line 101 of file vf_field.c.