FFmpeg
Data Structures | Enumerations | Functions | Variables
vf_alphamerge.c File Reference
#include <string.h>
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixfmt.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "filters.h"
#include "framesync.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  AlphaMergeContext
 

Enumerations

enum  { Y, U, V, A }
 

Functions

static int do_alphamerge (FFFrameSync *fs)
 
static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static int config_input_main (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 FRAMESYNC_DEFINE_CLASS (alphamerge, AlphaMergeContext, fs)
 

Variables

static const AVFilterPad alphamerge_inputs []
 
static const AVFilterPad alphamerge_outputs []
 
static const AVOption alphamerge_options []
 
const AVFilter ff_vf_alphamerge
 

Detailed Description

copy an alpha component from another video's luma

Definition in file vf_alphamerge.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator

Definition at line 38 of file vf_alphamerge.c.

Function Documentation

◆ do_alphamerge()

static int do_alphamerge ( FFFrameSync fs)
static

Definition at line 49 of file vf_alphamerge.c.

Referenced by init().

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 91 of file vf_alphamerge.c.

◆ query_formats()

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

Definition at line 99 of file vf_alphamerge.c.

◆ config_input_main()

static int config_input_main ( AVFilterLink inlink)
static

Definition at line 124 of file vf_alphamerge.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 133 of file vf_alphamerge.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 163 of file vf_alphamerge.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 169 of file vf_alphamerge.c.

◆ FRAMESYNC_DEFINE_CLASS()

FRAMESYNC_DEFINE_CLASS ( alphamerge  ,
AlphaMergeContext  ,
fs   
)

Variable Documentation

◆ alphamerge_inputs

const AVFilterPad alphamerge_inputs[]
static
Initial value:
= {
{
.name = "main",
.config_props = config_input_main,
},{
.name = "alpha",
},
}

Definition at line 176 of file vf_alphamerge.c.

◆ alphamerge_outputs

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

Definition at line 187 of file vf_alphamerge.c.

◆ alphamerge_options

const AVOption alphamerge_options[]
static
Initial value:
= {
{ NULL }
}

Definition at line 195 of file vf_alphamerge.c.

◆ ff_vf_alphamerge

const AVFilter ff_vf_alphamerge
Initial value:
= {
.name = "alphamerge",
.description = NULL_IF_CONFIG_SMALL("Copy the luma value of the second "
"input into the alpha channel of the first input."),
.preinit = alphamerge_framesync_preinit,
.priv_size = sizeof(AlphaMergeContext),
.priv_class = &alphamerge_class,
.init = init,
.uninit = uninit,
.activate = activate,
}

Definition at line 201 of file vf_alphamerge.c.

AlphaMergeContext
Definition: vf_alphamerge.c:40
alphamerge_inputs
static const AVFilterPad alphamerge_inputs[]
Definition: vf_alphamerge.c:176
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
alphamerge_outputs
static const AVFilterPad alphamerge_outputs[]
Definition: vf_alphamerge.c:187
config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_alphamerge.c:133
config_input_main
static int config_input_main(AVFilterLink *inlink)
Definition: vf_alphamerge.c:124
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_alphamerge.c:91
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_alphamerge.c:169
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:94
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:190
query_formats
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: vf_alphamerge.c:99
activate
static int activate(AVFilterContext *ctx)
Definition: vf_alphamerge.c:163