FFmpeg
Data Structures | Macros | Functions | Variables
vf_mergeplanes.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "internal.h"
#include "framesync.h"

Go to the source code of this file.

Data Structures

struct  Mapping
 
struct  InputParam
 
struct  MergePlanesContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (mergeplanes)
 
static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int process_frame (FFFrameSync *fs)
 
static int config_output (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption mergeplanes_options []
 
static const AVFilterPad mergeplanes_outputs []
 
const AVFilter ff_vf_mergeplanes
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 56 of file vf_mergeplanes.c.

◆ FLAGS

Definition at line 57 of file vf_mergeplanes.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( mergeplanes  )

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 74 of file vf_mergeplanes.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 121 of file vf_mergeplanes.c.

◆ process_frame()

static int process_frame ( FFFrameSync fs)
static

Definition at line 149 of file vf_mergeplanes.c.

Referenced by config_output().

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 180 of file vf_mergeplanes.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 286 of file vf_mergeplanes.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 292 of file vf_mergeplanes.c.

Variable Documentation

◆ mergeplanes_options

const AVOption mergeplanes_options[]
static
Initial value:
= {
{ "mapping", "set input to output plane mapping", OFFSET(mapping), AV_OPT_TYPE_INT, {.i64=-1}, -1, 0x33333333, FLAGS|AV_OPT_FLAG_DEPRECATED },
{ "format", "set output pixel format", OFFSET(out_fmt), AV_OPT_TYPE_PIXEL_FMT, {.i64=AV_PIX_FMT_YUVA444P}, 0, INT_MAX, .flags=FLAGS },
{ "map0s", "set 1st input to output stream mapping", OFFSET(map[0].input), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS },
{ "map0p", "set 1st input to output plane mapping", OFFSET(map[0].plane), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS },
{ "map1s", "set 2nd input to output stream mapping", OFFSET(map[1].input), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS },
{ "map1p", "set 2nd input to output plane mapping", OFFSET(map[1].plane), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS },
{ "map2s", "set 3rd input to output stream mapping", OFFSET(map[2].input), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS },
{ "map2p", "set 3rd input to output plane mapping", OFFSET(map[2].plane), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS },
{ "map3s", "set 4th input to output stream mapping", OFFSET(map[3].input), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS },
{ "map3p", "set 4th input to output plane mapping", OFFSET(map[3].plane), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS },
{ NULL }
}

Definition at line 58 of file vf_mergeplanes.c.

◆ mergeplanes_outputs

const AVFilterPad mergeplanes_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
}

Definition at line 299 of file vf_mergeplanes.c.

◆ ff_vf_mergeplanes

const AVFilter ff_vf_mergeplanes
Initial value:
= {
.name = "mergeplanes",
.description = NULL_IF_CONFIG_SMALL("Merge planes."),
.priv_size = sizeof(MergePlanesContext),
.priv_class = &mergeplanes_class,
.init = init,
}

Definition at line 307 of file vf_mergeplanes.c.

FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:167
MergePlanesContext
Definition: vf_mergeplanes.c:42
AVFILTER_FLAG_DYNAMIC_INPUTS
#define AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
Definition: avfilter.h:116
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_mergeplanes.c:121
OFFSET
#define OFFSET(x)
Definition: vf_mergeplanes.c:56
config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_mergeplanes.c:180
mergeplanes_outputs
static const AVFilterPad mergeplanes_outputs[]
Definition: vf_mergeplanes.c:299
activate
static int activate(AVFilterContext *ctx)
Definition: vf_mergeplanes.c:286
NULL
#define NULL
Definition: coverity.c:32
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
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:115
FLAGS
#define FLAGS
Definition: vf_mergeplanes.c:57
AV_PIX_FMT_YUVA444P
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:167
input
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
Definition: filter_design.txt:172
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_mergeplanes.c:74
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
AV_OPT_TYPE_PIXEL_FMT
@ AV_OPT_TYPE_PIXEL_FMT
Definition: opt.h:236
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
map
const VDPAUPixFmtMap * map
Definition: hwcontext_vdpau.c:71
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:191
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_mergeplanes.c:292
AV_OPT_FLAG_DEPRECATED
#define AV_OPT_FLAG_DEPRECATED
set if option is deprecated, users should refer to AVOption.help text for more information
Definition: opt.h:298