FFmpeg
Data Structures | Macros | Functions | Variables
vf_overlay_vaapi.c File Reference
#include <string.h>
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "framesync.h"
#include "formats.h"
#include "internal.h"
#include "vaapi_vpp.h"

Go to the source code of this file.

Data Structures

struct  OverlayVAAPIContext
 

Macros

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

Functions

static int overlay_vaapi_query_formats (AVFilterContext *ctx)
 
static int overlay_vaapi_build_filter_params (AVFilterContext *avctx)
 
static int overlay_vaapi_render_picture (AVFilterContext *avctx, VAProcPipelineParameterBuffer *params, VAProcPipelineParameterBuffer *subpic_params, AVFrame *output_frame)
 
static int overlay_vaapi_blend (FFFrameSync *fs)
 
static int overlay_vaapi_init_framesync (AVFilterContext *avctx)
 
static int overlay_vaapi_config_output (AVFilterLink *outlink)
 
static av_cold int overlay_vaapi_init (AVFilterContext *avctx)
 
static int overlay_vaapi_activate (AVFilterContext *avctx)
 
static av_cold void overlay_vaapi_uninit (AVFilterContext *avctx)
 
 AVFILTER_DEFINE_CLASS (overlay_vaapi)
 

Variables

static const AVOption overlay_vaapi_options []
 
static const AVFilterPad overlay_vaapi_inputs []
 
static const AVFilterPad overlay_vaapi_outputs []
 
const AVFilter ff_vf_overlay_vaapi
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 371 of file vf_overlay_vaapi.c.

◆ FLAGS

Definition at line 372 of file vf_overlay_vaapi.c.

Function Documentation

◆ overlay_vaapi_query_formats()

static int overlay_vaapi_query_formats ( AVFilterContext ctx)
static

Definition at line 41 of file vf_overlay_vaapi.c.

◆ overlay_vaapi_build_filter_params()

static int overlay_vaapi_build_filter_params ( AVFilterContext avctx)
static

Definition at line 69 of file vf_overlay_vaapi.c.

Referenced by overlay_vaapi_blend().

◆ overlay_vaapi_render_picture()

static int overlay_vaapi_render_picture ( AVFilterContext avctx,
VAProcPipelineParameterBuffer *  params,
VAProcPipelineParameterBuffer *  subpic_params,
AVFrame output_frame 
)
static

Definition at line 101 of file vf_overlay_vaapi.c.

Referenced by overlay_vaapi_blend().

◆ overlay_vaapi_blend()

static int overlay_vaapi_blend ( FFFrameSync fs)
static

< Blend State

Definition at line 199 of file vf_overlay_vaapi.c.

Referenced by overlay_vaapi_init_framesync().

◆ overlay_vaapi_init_framesync()

static int overlay_vaapi_init_framesync ( AVFilterContext avctx)
static

Definition at line 300 of file vf_overlay_vaapi.c.

Referenced by overlay_vaapi_config_output().

◆ overlay_vaapi_config_output()

static int overlay_vaapi_config_output ( AVFilterLink outlink)
static

Definition at line 322 of file vf_overlay_vaapi.c.

◆ overlay_vaapi_init()

static av_cold int overlay_vaapi_init ( AVFilterContext avctx)
static

Definition at line 347 of file vf_overlay_vaapi.c.

◆ overlay_vaapi_activate()

static int overlay_vaapi_activate ( AVFilterContext avctx)
static

Definition at line 357 of file vf_overlay_vaapi.c.

◆ overlay_vaapi_uninit()

static av_cold void overlay_vaapi_uninit ( AVFilterContext avctx)
static

Definition at line 364 of file vf_overlay_vaapi.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( overlay_vaapi  )

Variable Documentation

◆ overlay_vaapi_options

const AVOption overlay_vaapi_options[]
static
Initial value:
= {
{ "x", "Overlay x position",
OFFSET(overlay_ox), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = FLAGS },
{ "y", "Overlay y position",
OFFSET(overlay_oy), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = FLAGS },
{ "w", "Overlay width",
OFFSET(overlay_ow), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = FLAGS },
{ "h", "Overlay height",
OFFSET(overlay_oh), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, .flags = FLAGS },
{ "alpha", "Overlay global alpha",
OFFSET(alpha), AV_OPT_TYPE_FLOAT, { .dbl = 0.0}, 0.0, 1.0, .flags = FLAGS},
{ NULL },
}

Definition at line 373 of file vf_overlay_vaapi.c.

◆ overlay_vaapi_inputs

const AVFilterPad overlay_vaapi_inputs[]
static
Initial value:
= {
{
.name = "main",
.get_buffer.video = ff_default_get_video_buffer,
.config_props = &ff_vaapi_vpp_config_input,
},
{
.name = "overlay",
.get_buffer.video = ff_default_get_video_buffer,
},
}

Definition at line 389 of file vf_overlay_vaapi.c.

◆ overlay_vaapi_outputs

const AVFilterPad overlay_vaapi_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = &overlay_vaapi_config_output,
},
}

Definition at line 403 of file vf_overlay_vaapi.c.

◆ ff_vf_overlay_vaapi

const AVFilter ff_vf_overlay_vaapi
Initial value:
= {
.name = "overlay_vaapi",
.description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another"),
.priv_size = sizeof(OverlayVAAPIContext),
.priv_class = &overlay_vaapi_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 411 of file vf_overlay_vaapi.c.

OFFSET
#define OFFSET(x)
Definition: vf_overlay_vaapi.c:371
FLAGS
#define FLAGS
Definition: vf_overlay_vaapi.c:372
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:370
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:167
overlay_vaapi_outputs
static const AVFilterPad overlay_vaapi_outputs[]
Definition: vf_overlay_vaapi.c:403
init
static int init
Definition: av_tx.c:47
ff_default_get_video_buffer
AVFrame * ff_default_get_video_buffer(AVFilterLink *link, int w, int h)
Definition: video.c:96
overlay_vaapi_query_formats
static int overlay_vaapi_query_formats(AVFilterContext *ctx)
Definition: vf_overlay_vaapi.c:41
overlay_vaapi_init
static av_cold int overlay_vaapi_init(AVFilterContext *avctx)
Definition: vf_overlay_vaapi.c:347
overlay_vaapi_inputs
static const AVFilterPad overlay_vaapi_inputs[]
Definition: vf_overlay_vaapi.c:389
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:190
overlay_vaapi_config_output
static int overlay_vaapi_config_output(AVFilterLink *outlink)
Definition: vf_overlay_vaapi.c:322
NULL
#define NULL
Definition: coverity.c:32
activate
filter_frame For filters that do not use the activate() callback
ff_vaapi_vpp_config_input
int ff_vaapi_vpp_config_input(AVFilterLink *inlink)
Definition: vaapi_vpp.c:70
OverlayVAAPIContext
Definition: vf_overlay_vaapi.c:31
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
overlay_vaapi_uninit
static av_cold void overlay_vaapi_uninit(AVFilterContext *avctx)
Definition: vf_overlay_vaapi.c:364
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
overlay_vaapi_activate
static int overlay_vaapi_activate(AVFilterContext *avctx)
Definition: vf_overlay_vaapi.c:357
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
alpha
static const int16_t alpha[]
Definition: ilbcdata.h:55
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:191
uninit
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:285