vf_fieldorder.c File Reference

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

#include <stdio.h>
#include <string.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"

Go to the source code of this file.

Data Structures

struct  FieldOrderContext
 

Functions

static av_cold int init (AVFilterContext *ctx, const char *args)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static AVFilterBufferRefget_video_buffer (AVFilterLink *inlink, int perms, int w, int h)
 
static int filter_frame (AVFilterLink *inlink, AVFilterBufferRef *frame)
 

Variables

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.

Function Documentation

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 98 of file vf_fieldorder.c.

static int filter_frame ( AVFilterLink inlink,
AVFilterBufferRef 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 124 of file vf_fieldorder.c.

static AVFilterBufferRef* get_video_buffer ( AVFilterLink inlink,
int  perms,
int  w,
int  h 
)
static

Definition at line 116 of file vf_fieldorder.c.

Referenced by ff_get_video_buffer().

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

Definition at line 45 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 71 of file vf_fieldorder.c.

Variable Documentation

AVFilter avfilter_vf_fieldorder
Initial value:
= {
.name = "fieldorder",
.description = NULL_IF_CONFIG_SMALL("Set the field order."),
.init = init,
.priv_size = sizeof(FieldOrderContext),
}
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:122
static int query_formats(AVFilterContext *ctx)
Definition: vf_fieldorder.c:71
static const AVFilterPad avfilter_vf_fieldorder_inputs[]
static av_cold int init(AVFilterContext *ctx, const char *args)
Definition: vf_fieldorder.c:45
#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 inputs[]
Definition: af_ashowinfo.c:110
static const AVFilterPad avfilter_vf_fieldorder_outputs[]

Definition at line 201 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,
.min_perms = AV_PERM_READ | AV_PERM_WRITE,
},
{ NULL }
}
#define AV_PERM_READ
can read from the buffer
Definition: avfilter.h:97
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *frame)
NULL
Definition: eval.c:52
#define AV_PERM_PRESERVE
nobody else can overwrite the buffer
Definition: avfilter.h:99
static AVFilterBufferRef * get_video_buffer(AVFilterLink *inlink, int perms, int w, int h)
#define AV_PERM_REUSE2
can output the buffer multiple times, modified each time
Definition: avfilter.h:101
static int config_input(AVFilterLink *inlink)
Definition: vf_fieldorder.c:98
#define AV_PERM_WRITE
can write to the buffer
Definition: avfilter.h:98

Definition at line 180 of file vf_fieldorder.c.

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

Definition at line 193 of file vf_fieldorder.c.