FFmpeg
Data Structures | Macros | Functions | Variables
vf_weave.c File Reference
#include "libavutil/imgutils.h"
#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  WeaveContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define OFFSET(x)   offsetof(WeaveContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define doubleweave_options   weave_options
 

Functions

 AVFILTER_DEFINE_CLASS (weave)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_props_output (AVFilterLink *outlink)
 
static int weave_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static av_cold int init (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (doubleweave)
 

Variables

static const AVOption weave_options []
 
static const AVFilterPad weave_inputs []
 
static const AVFilterPad weave_outputs []
 
const AVFilter ff_vf_weave
 
const AVFilter ff_vf_doubleweave
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 38 of file vf_weave.c.

◆ FLAGS

Definition at line 39 of file vf_weave.c.

◆ doubleweave_options

#define doubleweave_options   weave_options

Definition at line 215 of file vf_weave.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS() [1/2]

AVFILTER_DEFINE_CLASS ( weave  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 52 of file vf_weave.c.

◆ config_props_output()

static int config_props_output ( AVFilterLink outlink)
static

Definition at line 65 of file vf_weave.c.

◆ weave_slice()

static int weave_slice ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 97 of file vf_weave.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 131 of file vf_weave.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 168 of file vf_weave.c.

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 205 of file vf_weave.c.

◆ AVFILTER_DEFINE_CLASS() [2/2]

AVFILTER_DEFINE_CLASS ( doubleweave  )

Variable Documentation

◆ weave_options

const AVOption weave_options[]
static
Initial value:
= {
{ "first_field", "set first field", OFFSET(first_field), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, FLAGS, "field"},
{ "top", "set top field first", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, "field"},
{ "t", "set top field first", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, "field"},
{ "bottom", "set bottom field first", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "field"},
{ "b", "set bottom field first", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "field"},
{ NULL }
}

Definition at line 41 of file vf_weave.c.

◆ weave_inputs

const AVFilterPad weave_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}

Definition at line 175 of file vf_weave.c.

◆ weave_outputs

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

Definition at line 184 of file vf_weave.c.

◆ ff_vf_weave

const AVFilter ff_vf_weave
Initial value:
= {
.name = "weave",
.description = NULL_IF_CONFIG_SMALL("Weave input video fields into frames."),
.priv_size = sizeof(WeaveContext),
.priv_class = &weave_class,
}

Definition at line 193 of file vf_weave.c.

◆ ff_vf_doubleweave

const AVFilter ff_vf_doubleweave
Initial value:
= {
.name = "doubleweave",
.description = NULL_IF_CONFIG_SMALL("Weave input video fields into double number of frames."),
.priv_size = sizeof(WeaveContext),
.priv_class = &doubleweave_class,
.init = init,
}

Definition at line 218 of file vf_weave.c.

weave_outputs
static const AVFilterPad weave_outputs[]
Definition: vf_weave.c:184
weave_inputs
static const AVFilterPad weave_inputs[]
Definition: vf_weave.c:175
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_weave.c:168
inputs
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: filter_design.txt:243
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
NULL
#define NULL
Definition: coverity.c:32
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:116
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_weave.c:52
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_weave.c:131
WeaveContext
Definition: vf_weave.c:27
config_props_output
static int config_props_output(AVFilterLink *outlink)
Definition: vf_weave.c:65
OFFSET
#define OFFSET(x)
Definition: vf_weave.c:38
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FLAGS
#define FLAGS
Definition: vf_weave.c:39
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
first_field
static int first_field(const struct video_data *s)
Definition: v4l2.c:236
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:233
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_weave.c:205