FFmpeg
Data Structures | Macros | Functions | Variables
vf_colorkey.c File Reference
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  ColorkeyContext
 

Macros

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

Functions

static uint8_t do_colorkey_pixel (ColorkeyContext *ctx, uint8_t r, uint8_t g, uint8_t b)
 
static int do_colorkey_slice (AVFilterContext *avctx, void *arg, int jobnr, int nb_jobs)
 
static int do_colorhold_slice (AVFilterContext *avctx, void *arg, int jobnr, int nb_jobs)
 
static av_cold int init_filter (AVFilterContext *avctx)
 
static int filter_frame (AVFilterLink *link, AVFrame *frame)
 
static av_cold int config_output (AVFilterLink *outlink)
 
static av_cold int query_formats (AVFilterContext *avctx)
 

Variables

static const AVFilterPad colorkey_inputs []
 
static const AVFilterPad colorkey_outputs []
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 201 of file vf_colorkey.c.

◆ FLAGS

Definition at line 202 of file vf_colorkey.c.

Function Documentation

◆ do_colorkey_pixel()

static uint8_t do_colorkey_pixel ( ColorkeyContext ctx,
uint8_t  r,
uint8_t  g,
uint8_t  b 
)
static

Definition at line 42 of file vf_colorkey.c.

Referenced by do_colorhold_slice(), and do_colorkey_slice().

◆ do_colorkey_slice()

static int do_colorkey_slice ( AVFilterContext avctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 57 of file vf_colorkey.c.

Referenced by init_filter().

◆ do_colorhold_slice()

static int do_colorhold_slice ( AVFilterContext avctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 83 of file vf_colorkey.c.

Referenced by init_filter().

◆ init_filter()

static av_cold int init_filter ( AVFilterContext avctx)
static

Definition at line 119 of file vf_colorkey.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink link,
AVFrame frame 
)
static

Definition at line 132 of file vf_colorkey.c.

◆ config_output()

static av_cold int config_output ( AVFilterLink outlink)
static

Definition at line 147 of file vf_colorkey.c.

◆ query_formats()

static av_cold int query_formats ( AVFilterContext avctx)
static

Definition at line 164 of file vf_colorkey.c.

Variable Documentation

◆ colorkey_inputs

const AVFilterPad colorkey_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}

Definition at line 183 of file vf_colorkey.c.

◆ colorkey_outputs

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

Definition at line 192 of file vf_colorkey.c.

filter_frame
static int filter_frame(AVFilterLink *link, AVFrame *frame)
Definition: vf_colorkey.c:132
NULL
#define NULL
Definition: coverity.c:32
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
config_output
static av_cold int config_output(AVFilterLink *outlink)
Definition: vf_colorkey.c:147