vf_fieldorder.c File Reference

video field order filter, heavily influenced by vf_pad.c More...

#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
Include dependency graph for vf_fieldorder.c:

Go to the source code of this file.

Data Structures

struct  FieldOrderContext
 

Macros

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

Functions

static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static AVFrameget_video_buffer (AVFilterLink *inlink, int w, int h)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)
 
 AVFILTER_DEFINE_CLASS (fieldorder)
 

Variables

static const AVOption fieldorder_options []
 
static const AVFilterPad avfilter_vf_fieldorder_inputs []
 
static const AVFilterPad avfilter_vf_fieldorder_outputs []
 
AVFilter avfilter_vf_fieldorder
 

Detailed Description

video field order filter, heavily influenced by vf_pad.c

Definition in file vf_fieldorder.c.

Macro Definition Documentation

Definition at line 152 of file vf_fieldorder.c.

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

Definition at line 151 of file vf_fieldorder.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( fieldorder  )
static int config_input ( AVFilterLink inlink)
static

full an array with the number of bytes that the video data occupies per line for each plane of the input video

Definition at line 69 of file vf_fieldorder.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Move every line up one line, working from the top to the bottom of the frame. The original top line is lost. The new last line is created as a copy of the penultimate line from that field.

Move every line down one line, working from the bottom to the top of the frame. The original bottom line is lost. The new first line is created as a copy of the second line from that field.

Definition at line 95 of file vf_fieldorder.c.

static AVFrame* get_video_buffer ( AVFilterLink inlink,
int  w,
int  h 
)
static

Definition at line 87 of file vf_fieldorder.c.

static int query_formats ( AVFilterContext ctx)
static

accept any input pixel format that is not hardware accelerated, not a bitstream format, and does not have vertically sub-sampled chroma

Definition at line 42 of file vf_fieldorder.c.

Variable Documentation

AVFilter avfilter_vf_fieldorder
Initial value:
= {
.name = "fieldorder",
.description = NULL_IF_CONFIG_SMALL("Set the field order."),
.priv_size = sizeof(FieldOrderContext),
.priv_class = &fieldorder_class,
}
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:117
static int query_formats(AVFilterContext *ctx)
Definition: vf_fieldorder.c:42
static const AVFilterPad avfilter_vf_fieldorder_inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVFilterPad avfilter_vf_fieldorder_outputs[]
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 183 of file vf_fieldorder.c.

const AVFilterPad avfilter_vf_fieldorder_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
.get_video_buffer = get_video_buffer,
.filter_frame = filter_frame,
.needs_writable = 1,
},
{ NULL }
}
static AVFrame * get_video_buffer(AVFilterLink *inlink, int w, int h)
Definition: vf_fieldorder.c:87
NULL
Definition: eval.c:55
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: vf_fieldorder.c:95
static int config_input(AVFilterLink *inlink)
Definition: vf_fieldorder.c:69

Definition at line 163 of file vf_fieldorder.c.

const AVFilterPad avfilter_vf_fieldorder_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
NULL
Definition: eval.c:55

Definition at line 175 of file vf_fieldorder.c.

const AVOption fieldorder_options[]
static
Initial value:
= {
{ "order", "output field order", OFFSET(dst_tff), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, FLAGS, "order" },
{ "bff", "bottom field first", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, .flags=FLAGS, .unit = "order" },
{ "tff", "top field first", 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, .flags=FLAGS, .unit = "order" },
{ NULL },
}
#define FLAGS
#define OFFSET(x)
NULL
Definition: eval.c:55

Definition at line 154 of file vf_fieldorder.c.