FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
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"

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 }
 

Functions

 AVFILTER_DEFINE_CLASS (field)
 
static av_cold int init (AVFilterContext *ctx, const char *args)
 
static int config_props_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFilterBufferRef *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

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

Definition at line 40 of file vf_field.c.

Definition at line 41 of file vf_field.c.

Enumeration Type Documentation

enum FieldType
Enumerator:
FIELD_TYPE_TOP 
FIELD_TYPE_BOTTOM 

Definition at line 32 of file vf_field.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( field  )
static av_cold int init ( AVFilterContext ctx,
const char *  args 
)
static

Definition at line 53 of file vf_field.c.

static int config_props_output ( AVFilterLink outlink)
static

Definition at line 64 of file vf_field.c.

static int filter_frame ( AVFilterLink inlink,
AVFilterBufferRef inpicref 
)
static

Definition at line 85 of file vf_field.c.

Variable Documentation

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}
}

Definition at line 43 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 }
}

Definition at line 102 of file vf_field.c.

const AVFilterPad field_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_props_output,
},
{ NULL }
}

Definition at line 112 of file vf_field.c.

AVFilter avfilter_vf_field
Initial value:
= {
.name = "field",
.description = NULL_IF_CONFIG_SMALL("Extract a field from the input video."),
.priv_size = sizeof(FieldContext),
.init = init,
.priv_class = &field_class,
}

Definition at line 121 of file vf_field.c.