FFmpeg
Loading...
Searching...
No Matches
vf_weave.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "video.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)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS_EXT (weave, "(double)weave", weave_options)
 
static int query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
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)
 

Variables

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

Macro Definition Documentation

◆ OFFSET

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

Definition at line 41 of file vf_weave.c.

◆ FLAGS

Definition at line 42 of file vf_weave.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS_EXT()

AVFILTER_DEFINE_CLASS_EXT ( weave ,
"(double)weave" ,
weave_options  )

◆ query_formats()

static int query_formats ( const AVFilterContext * ctx,
AVFilterFormatsConfig ** cfg_in,
AVFilterFormatsConfig ** cfg_out )
static

Definition at line 55 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 102 of file vf_weave.c.

Referenced by filter_frame().

◆ filter_frame()

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

Definition at line 138 of file vf_weave.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext * ctx)
static

Definition at line 178 of file vf_weave.c.

◆ init()

static av_cold int init ( AVFilterContext * ctx)
static

Definition at line 213 of file vf_weave.c.

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, .unit = "field"},
{ "top", "set top field first", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, .unit = "field"},
{ "t", "set top field first", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, .unit = "field"},
{ "bottom", "set bottom field first", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, .unit = "field"},
{ "b", "set bottom field first", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, .unit = "field"},
{ 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
static int first_field(const struct video_data *s)
Definition v4l2.c:260

Definition at line 44 of file vf_weave.c.

Referenced by AVFILTER_DEFINE_CLASS_EXT().

◆ weave_inputs

const AVFilterPad weave_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 185 of file vf_weave.c.

◆ weave_outputs

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

Definition at line 193 of file vf_weave.c.

◆ ff_vf_weave

const FFFilter ff_vf_weave
Initial value:
= {
.p.name = "weave",
.p.description = NULL_IF_CONFIG_SMALL("Weave input video fields into frames."),
.p.priv_class = &weave_class,
.priv_size = sizeof(WeaveContext),
}
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition aeval.c:246
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition avfilter.h:166
static av_cold void uninit(AVBitStreamFilterContext *ctx)
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define FILTER_QUERY_FUNC2(func)
Definition filters.h:241
#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 weave_outputs[]
Definition vf_weave.c:193
static const AVFilterPad weave_inputs[]
Definition vf_weave.c:185

Definition at line 201 of file vf_weave.c.

◆ ff_vf_doubleweave

const FFFilter ff_vf_doubleweave
Initial value:
= {
.p.name = "doubleweave",
.p.description = NULL_IF_CONFIG_SMALL("Weave input video fields into double number of frames."),
.p.priv_class = &weave_class,
.priv_size = sizeof(WeaveContext),
.init = init,
}
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608

Definition at line 223 of file vf_weave.c.