FFmpeg  4.0
Data Structures | Enumerations | Functions | Variables
vf_alphamerge.c File Reference

copy an alpha component from another video's luma More...

#include <string.h>
#include "libavutil/imgutils.h"
#include "libavutil/pixfmt.h"
#include "avfilter.h"
#include "bufferqueue.h"
#include "drawutils.h"
#include "formats.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 av_cold void uninit (AVFilterContext *ctx)
 
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 filter_frame (AVFilterLink *inlink, AVFrame *buf)
 
static int request_frame (AVFilterLink *outlink)
 

Variables

static const AVFilterPad alphamerge_inputs []
 
static const AVFilterPad alphamerge_outputs []
 
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 37 of file vf_alphamerge.c.

Function Documentation

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 46 of file vf_alphamerge.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 53 of file vf_alphamerge.c.

◆ config_input_main()

static int config_input_main ( AVFilterLink inlink)
static

Definition at line 85 of file vf_alphamerge.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 94 of file vf_alphamerge.c.

◆ draw_frame()

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

Definition at line 115 of file vf_alphamerge.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 143 of file vf_alphamerge.c.

◆ request_frame()

static int request_frame ( AVFilterLink outlink)
static

Definition at line 170 of file vf_alphamerge.c.

Variable Documentation

◆ alphamerge_inputs

const AVFilterPad alphamerge_inputs[]
static
Initial value:
= {
{
.name = "main",
.config_props = config_input_main,
.filter_frame = filter_frame,
.needs_writable = 1,
},{
.name = "alpha",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input_main(AVFilterLink *inlink)
Definition: vf_alphamerge.c:85
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)

Definition at line 183 of file vf_alphamerge.c.

◆ alphamerge_outputs

const AVFilterPad alphamerge_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
.request_frame = request_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_output(AVFilterLink *outlink)
Definition: vf_alphamerge.c:94
static int request_frame(AVFilterLink *outlink)

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."),
.uninit = uninit,
.priv_size = sizeof(AlphaMergeContext),
}
static const AVFilterPad alphamerge_inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int query_formats(AVFilterContext *ctx)
Definition: vf_alphamerge.c:53
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_alphamerge.c:46
static const AVFilterPad alphamerge_outputs[]
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203

Definition at line 208 of file vf_alphamerge.c.