FFmpeg  4.0
Data Structures | Macros | Functions | Variables
vf_overlay_opencl.c File Reference
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "framesync.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  OverlayOpenCLContext
 

Macros

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

Functions

static int overlay_opencl_load (AVFilterContext *avctx, enum AVPixelFormat main_format, enum AVPixelFormat overlay_format)
 
static int overlay_opencl_blend (FFFrameSync *fs)
 
static int overlay_opencl_config_output (AVFilterLink *outlink)
 
static av_cold int overlay_opencl_init (AVFilterContext *avctx)
 
static int overlay_opencl_activate (AVFilterContext *avctx)
 
static av_cold void overlay_opencl_uninit (AVFilterContext *avctx)
 
 AVFILTER_DEFINE_CLASS (overlay_opencl)
 

Variables

static const AVOption overlay_opencl_options []
 
static const AVFilterPad overlay_opencl_inputs []
 
static const AVFilterPad overlay_opencl_outputs []
 
AVFilter ff_vf_overlay_opencl
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 310 of file vf_overlay_opencl.c.

◆ FLAGS

Definition at line 311 of file vf_overlay_opencl.c.

Function Documentation

◆ overlay_opencl_load()

static int overlay_opencl_load ( AVFilterContext avctx,
enum AVPixelFormat  main_format,
enum AVPixelFormat  overlay_format 
)
static

Definition at line 49 of file vf_overlay_opencl.c.

Referenced by overlay_opencl_blend().

◆ overlay_opencl_blend()

static int overlay_opencl_blend ( FFFrameSync fs)
static

Definition at line 128 of file vf_overlay_opencl.c.

Referenced by overlay_opencl_init().

◆ overlay_opencl_config_output()

static int overlay_opencl_config_output ( AVFilterLink outlink)
static

Definition at line 253 of file vf_overlay_opencl.c.

◆ overlay_opencl_init()

static av_cold int overlay_opencl_init ( AVFilterContext avctx)
static

Definition at line 270 of file vf_overlay_opencl.c.

◆ overlay_opencl_activate()

static int overlay_opencl_activate ( AVFilterContext avctx)
static

Definition at line 279 of file vf_overlay_opencl.c.

◆ overlay_opencl_uninit()

static av_cold void overlay_opencl_uninit ( AVFilterContext avctx)
static

Definition at line 286 of file vf_overlay_opencl.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( overlay_opencl  )

Variable Documentation

◆ overlay_opencl_options

const AVOption overlay_opencl_options[]
static
Initial value:
= {
{ "x", "Overlay x position",
OFFSET(x_position), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = FLAGS },
{ "y", "Overlay y position",
OFFSET(y_position), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = FLAGS },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
#define FLAGS

Definition at line 312 of file vf_overlay_opencl.c.

◆ overlay_opencl_inputs

const AVFilterPad overlay_opencl_inputs[]
static
Initial value:
= {
{
.name = "main",
},
{
.name = "overlay",
},
{ 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:63

Definition at line 322 of file vf_overlay_opencl.c.

◆ overlay_opencl_outputs

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

Definition at line 336 of file vf_overlay_opencl.c.

◆ ff_vf_overlay_opencl

AVFilter ff_vf_overlay_opencl
Initial value:
= {
.name = "overlay_opencl",
.description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another"),
.priv_size = sizeof(OverlayOpenCLContext),
.priv_class = &overlay_opencl_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: internal.h:385
static const AVFilterPad overlay_opencl_outputs[]
int ff_opencl_filter_query_formats(AVFilterContext *avctx)
Return that all inputs and outputs support only AV_PIX_FMT_OPENCL.
Definition: opencl.c:31
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static int overlay_opencl_activate(AVFilterContext *avctx)
static int activate(AVFilterContext *ctx)
Definition: af_amix.c:421
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
static av_cold int overlay_opencl_init(AVFilterContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad overlay_opencl_inputs[]
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static av_cold void overlay_opencl_uninit(AVFilterContext *avctx)
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244

Definition at line 345 of file vf_overlay_opencl.c.