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 "internal.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 query_formats (AVFilterContext *ctx)
 
static int config_input_main (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static void draw_frame (AVFilterContext *ctx, AVFrame *main_buf, AVFrame *alpha_buf)
 
static int activate (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (alphamerge)
 

Variables

static const AVFilterPad alphamerge_inputs []
 
static const AVFilterPad alphamerge_outputs []
 
static const AVOption alphamerge_options []
 
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

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 49 of file vf_alphamerge.c.

◆ config_input_main()

static int config_input_main ( AVFilterLink inlink)
static

Definition at line 69 of file vf_alphamerge.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 78 of file vf_alphamerge.c.

◆ draw_frame()

static void draw_frame ( AVFilterContext ctx,
AVFrame main_buf,
AVFrame alpha_buf 
)
static

Definition at line 99 of file vf_alphamerge.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 127 of file vf_alphamerge.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( alphamerge  )

Variable Documentation

◆ alphamerge_inputs

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

Definition at line 176 of file vf_alphamerge.c.

◆ alphamerge_outputs

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

Definition at line 189 of file vf_alphamerge.c.

◆ alphamerge_options

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

Definition at line 198 of file vf_alphamerge.c.

◆ ff_vf_alphamerge

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."),
.priv_size = sizeof(AlphaMergeContext),
.priv_class = &alphamerge_class,
}

Definition at line 204 of file vf_alphamerge.c.

AlphaMergeContext
Definition: vf_alphamerge.c:40
alphamerge_inputs
static const AVFilterPad alphamerge_inputs[]
Definition: vf_alphamerge.c:176
alphamerge_outputs
static const AVFilterPad alphamerge_outputs[]
Definition: vf_alphamerge.c:189
config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_alphamerge.c:78
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_alphamerge.c:49
config_input_main
static int config_input_main(AVFilterLink *inlink)
Definition: vf_alphamerge.c:69
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
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:188
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:133
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
activate
static int activate(AVFilterContext *ctx)
Definition: vf_alphamerge.c:127