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

Go to the source code of this file.

Data Structures

struct  ColorkeyOpenCLContext


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


static int colorkey_opencl_init (AVFilterContext *avctx)
static int filter_frame (AVFilterLink *link, AVFrame *input_frame)
static av_cold void colorkey_opencl_uninit (AVFilterContext *avctx)
 AVFILTER_DEFINE_CLASS (colorkey_opencl)


static const AVFilterPad colorkey_opencl_inputs []
static const AVFilterPad colorkey_opencl_outputs []
static const AVOption colorkey_opencl_options []
AVFilter ff_vf_colorkey_opencl

Macro Definition Documentation

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

Definition at line 221 of file vf_colorkey_opencl.c.

Definition at line 222 of file vf_colorkey_opencl.c.

Function Documentation

static int colorkey_opencl_init ( AVFilterContext avctx)

Definition at line 49 of file vf_colorkey_opencl.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink link,
AVFrame input_frame 

Definition at line 91 of file vf_colorkey_opencl.c.

static av_cold void colorkey_opencl_uninit ( AVFilterContext avctx)

Definition at line 180 of file vf_colorkey_opencl.c.

AVFILTER_DEFINE_CLASS ( colorkey_opencl  )

Variable Documentation

const AVFilterPad colorkey_opencl_inputs[]
Initial value:
= {
.name = "default",
.filter_frame = filter_frame,
{ NULL }
#define NULL
Definition: coverity.c:32
int ff_opencl_filter_config_input(AVFilterLink *inlink)
Check that the input link contains a suitable hardware frames context and extract the device from it...
Definition: opencl.c:60
static int filter_frame(AVFilterLink *link, AVFrame *input_frame)

Definition at line 202 of file vf_colorkey_opencl.c.

const AVFilterPad colorkey_opencl_outputs[]
Initial value:
= {
.name = "default",
{ NULL }
#define NULL
Definition: coverity.c:32
int ff_opencl_filter_config_output(AVFilterLink *outlink)
Create a suitable hardware frames context for the output.
Definition: opencl.c:96

Definition at line 212 of file vf_colorkey_opencl.c.

const AVOption colorkey_opencl_options[]
Initial value:
= {
{ "color", "set the colorkey key color", OFFSET(colorkey_rgba), AV_OPT_TYPE_COLOR, { .str = "black" }, 0, 0, FLAGS },
{ "similarity", "set the colorkey similarity value", OFFSET(similarity), AV_OPT_TYPE_FLOAT, { .dbl = 0.01 }, 0.01, 1.0, FLAGS },
{ "blend", "set the colorkey key blend value", OFFSET(blend), AV_OPT_TYPE_FLOAT, { .dbl = 0.0 }, 0.0, 1.0, FLAGS },
{ NULL }
#define NULL
Definition: coverity.c:32
#define FLAGS
#define OFFSET(x)

Definition at line 224 of file vf_colorkey_opencl.c.

AVFilter ff_vf_colorkey_opencl
Initial value:
= {
.name = "colorkey_opencl",
.description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on RGB colors."),
.priv_size = sizeof(ColorkeyOpenCLContext),
.priv_class = &colorkey_opencl_class,
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: internal.h:369
int ff_opencl_filter_query_formats(AVFilterContext *avctx)
Return that all inputs and outputs support only AV_PIX_FMT_OPENCL.
Definition: opencl.c:28
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static const AVFilterPad colorkey_opencl_inputs[]
int ff_opencl_filter_init(AVFilterContext *avctx)
Initialise an OpenCL filter context.
Definition: opencl.c:147
static const AVFilterPad colorkey_opencl_outputs[]
static av_cold void colorkey_opencl_uninit(AVFilterContext *avctx)
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153
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
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244

Definition at line 233 of file vf_colorkey_opencl.c.