FFmpeg
Loading...
Searching...
No Matches
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 "filters.h"

Go to the source code of this file.

Data Structures

struct  FieldContext
 

Macros

#define OFFSET(x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Enumerations

enum  FieldType { FIELD_TYPE_TOP = 0 , FIELD_TYPE_BOTTOM }
 

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 []
 
const FFFilter ff_vf_field
 

Detailed Description

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

Definition in file vf_field.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 40 of file vf_field.c.

◆ FLAGS

Definition at line 41 of file vf_field.c.

Enumeration Type Documentation

◆ FieldType

enum FieldType
Enumerator
FIELD_TYPE_TOP 
FIELD_TYPE_BOTTOM 

Definition at line 32 of file vf_field.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( field )

◆ config_props_output()

static int config_props_output ( AVFilterLink * outlink)
static

Definition at line 52 of file vf_field.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink * inlink,
AVFrame * inpicref )
static

Definition at line 69 of file vf_field.c.

Variable Documentation

◆ field_options

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, .unit = "field_type" },
{"top", "select top field", 0, AV_OPT_TYPE_CONST, {.i64=FIELD_TYPE_TOP}, INT_MIN, INT_MAX, FLAGS, .unit = "field_type"},
{"bottom", "select bottom field", 0, AV_OPT_TYPE_CONST, {.i64=FIELD_TYPE_BOTTOM}, INT_MIN, INT_MAX, FLAGS, .unit = "field_type"},
{NULL}
}
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
cl_device_type type
@ FIELD_TYPE_BOTTOM
Definition vf_field.c:32
@ FIELD_TYPE_TOP
Definition vf_field.c:32

Definition at line 43 of file vf_field.c.

◆ field_inputs

const AVFilterPad field_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
}
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
Definition dolby_e.c:1067
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200

Definition at line 86 of file vf_field.c.

◆ field_outputs

const AVFilterPad field_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_props_output,
},
}
static int config_props_output(AVFilterLink *outlink)

Definition at line 94 of file vf_field.c.

◆ ff_vf_field

const FFFilter ff_vf_field
Initial value:
= {
.p.name = "field",
.p.description = NULL_IF_CONFIG_SMALL("Extract a field from the input video."),
.p.priv_class = &field_class,
.priv_size = sizeof(FieldContext),
}
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
static const AVFilterPad field_outputs[]
Definition vf_field.c:94
static const AVFilterPad field_inputs[]
Definition vf_field.c:86

Definition at line 102 of file vf_field.c.