#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.
|
static uint8_t | do_chromakey_pixel (ChromakeyContext *ctx, uint8_t u[9], uint8_t v[9]) |
|
static av_always_inline void | get_pixel_uv (AVFrame *frame, int hsub_log2, int vsub_log2, int x, int y, uint8_t *u, uint8_t *v) |
|
static int | do_chromakey_slice (AVFilterContext *avctx, void *arg, int jobnr, int nb_jobs) |
|
static int | filter_frame (AVFilterLink *link, AVFrame *frame) |
|
static av_cold int | initialize_chromakey (AVFilterContext *avctx) |
|
static av_cold int | query_formats (AVFilterContext *avctx) |
|
static av_cold int | config_input (AVFilterLink *inlink) |
|
| AVFILTER_DEFINE_CLASS (chromakey) |
|
#define FIXNUM |
( |
|
x | ) |
lrint((x) * (1 << 10)) |
#define RGB_TO_U |
( |
|
rgb | ) |
(((- FIXNUM(0.16874) * rgb[0] - FIXNUM(0.33126) * rgb[1] + FIXNUM(0.50000) * rgb[2] + (1 << 9) - 1) >> 10) + 128) |
#define RGB_TO_V |
( |
|
rgb | ) |
((( FIXNUM(0.50000) * rgb[0] - FIXNUM(0.41869) * rgb[1] - FIXNUM(0.08131) * rgb[2] + (1 << 9) - 1) >> 10) + 128) |
AVFILTER_DEFINE_CLASS |
( |
chromakey |
| ) |
|
Initial value:= {
{
.name = "default",
.needs_writable = 1,
},
}
static int filter_frame(AVFilterLink *link, AVFrame *frame)
static av_cold int config_input(AVFilterLink *inlink)
Definition at line 166 of file vf_chromakey.c.
Initial value:= {
{
.name = "default",
},
}
Definition at line 177 of file vf_chromakey.c.
Initial value:= {
.name = "chromakey",
.description =
NULL_IF_CONFIG_SMALL(
"Turns a certain color into transparency. Operates on YUV colors."),
.priv_class = &chromakey_class,
}
static av_cold int init(AVCodecContext *avctx)
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
static const AVFilterPad chromakey_outputs[]
static av_cold int initialize_chromakey(AVFilterContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
static const AVFilterPad outputs[]
static const AVFilterPad inputs[]
static av_cold int query_formats(AVFilterContext *avctx)
static const AVFilterPad chromakey_inputs[]
Definition at line 198 of file vf_chromakey.c.