FFmpeg
Loading...
Searching...
No Matches
vf_overlay_opencl.c File Reference
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "filters.h"
#include "framesync.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)
 
#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 []
 
const FFFilter ff_vf_overlay_opencl
 

Macro Definition Documentation

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 280 of file vf_overlay_opencl.c.

◆ FLAGS

Definition at line 281 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 48 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 119 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 223 of file vf_overlay_opencl.c.

◆ overlay_opencl_init()

static av_cold int overlay_opencl_init ( AVFilterContext * avctx)
static

Definition at line 240 of file vf_overlay_opencl.c.

◆ overlay_opencl_activate()

static int overlay_opencl_activate ( AVFilterContext * avctx)
static

Definition at line 249 of file vf_overlay_opencl.c.

◆ overlay_opencl_uninit()

static av_cold void overlay_opencl_uninit ( AVFilterContext * avctx)
static

Definition at line 256 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 FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258

Definition at line 282 of file vf_overlay_opencl.c.

◆ overlay_opencl_inputs

const AVFilterPad overlay_opencl_inputs[]
static
Initial value:
= {
{
.name = "main",
},
{
.name = "overlay",
},
}
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
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:46

Definition at line 292 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,
},
}
static int overlay_opencl_config_output(AVFilterLink *outlink)

Definition at line 305 of file vf_overlay_opencl.c.

◆ ff_vf_overlay_opencl

const FFFilter ff_vf_overlay_opencl
Initial value:
= {
.p.name = "overlay_opencl",
.p.description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another"),
.p.priv_class = &overlay_opencl_class,
.priv_size = sizeof(OverlayOpenCLContext),
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#define AVFILTER_FLAG_HWDEVICE
The filter can create hardware frames using AVFilterContext.hw_device_ctx.
Definition avfilter.h:187
static av_cold void uninit(AVBitStreamFilterContext *ctx)
static int activate(AVBitStreamFilterContext *ctx)
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition filters.h:208
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition filters.h:254
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
@ AV_PIX_FMT_OPENCL
Hardware surfaces for OpenCL.
Definition pixfmt.h:358
static av_cold int overlay_opencl_init(AVFilterContext *avctx)
static int overlay_opencl_activate(AVFilterContext *avctx)
static const AVFilterPad overlay_opencl_outputs[]
static av_cold void overlay_opencl_uninit(AVFilterContext *avctx)
static const AVFilterPad overlay_opencl_inputs[]

Definition at line 313 of file vf_overlay_opencl.c.