FFmpeg
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 "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)
 

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
Enumerator

Definition at line 37 of file vf_alphamerge.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 46 of file vf_alphamerge.c.

static int config_input_main ( AVFilterLink inlink)
static

Definition at line 78 of file vf_alphamerge.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 87 of file vf_alphamerge.c.

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

Definition at line 108 of file vf_alphamerge.c.

Referenced by activate().

static int activate ( AVFilterContext ctx)
static

Definition at line 136 of file vf_alphamerge.c.

Variable Documentation

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

Definition at line 184 of file vf_alphamerge.c.

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

Definition at line 197 of file vf_alphamerge.c.

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),
}
static const AVFilterPad alphamerge_inputs[]
static int activate(AVFilterContext *ctx)
#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:46
static const AVFilterPad alphamerge_outputs[]
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
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 at line 206 of file vf_alphamerge.c.