FFmpeg
|
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_cuda_internal.h"
#include "libavutil/cuda_check.h"
#include "avfilter.h"
#include "framesync.h"
#include "internal.h"
Go to the source code of this file.
Data Structures | |
struct | OverlayCUDAContext |
OverlayCUDAContext. More... | |
Macros | |
#define | CHECK_CU(x) FF_CUDA_CHECK_DL(ctx, ctx->hwctx->internal->cuda_dl, x) |
#define | DIV_UP(a, b) ( ((a) + (b) - 1) / (b) ) |
#define | BLOCK_X 32 |
#define | BLOCK_Y 16 |
#define | OFFSET(x) offsetof(OverlayCUDAContext, x) |
#define | FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM) |
Functions | |
static int | format_is_supported (const enum AVPixelFormat formats[], enum AVPixelFormat fmt) |
Helper to find out if provided format is supported by filter. More... | |
static int | formats_match (const enum AVPixelFormat format_main, const enum AVPixelFormat format_overlay) |
Helper checks if we can process main and overlay pixel formats. More... | |
static int | overlay_cuda_call_kernel (OverlayCUDAContext *ctx, int x_position, int y_position, uint8_t *main_data, int main_linesize, int main_width, int main_height, uint8_t *overlay_data, int overlay_linesize, int overlay_width, int overlay_height, uint8_t *alpha_data, int alpha_linesize, int alpha_adj_x, int alpha_adj_y) |
Call overlay kernell for a plane. More... | |
static int | overlay_cuda_blend (FFFrameSync *fs) |
Perform blend overlay picture over main picture. More... | |
static av_cold int | overlay_cuda_init (AVFilterContext *avctx) |
Initialize overlay_cuda. More... | |
static av_cold void | overlay_cuda_uninit (AVFilterContext *avctx) |
Uninitialize overlay_cuda. More... | |
static int | overlay_cuda_activate (AVFilterContext *avctx) |
Activate overlay_cuda. More... | |
static int | overlay_cuda_query_formats (AVFilterContext *avctx) |
Query formats. More... | |
static int | overlay_cuda_config_output (AVFilterLink *outlink) |
Configure output. More... | |
FRAMESYNC_DEFINE_CLASS (overlay_cuda, OverlayCUDAContext, fs) | |
Variables | |
static enum AVPixelFormat | supported_main_formats [] |
static enum AVPixelFormat | supported_overlay_formats [] |
static const AVOption | overlay_cuda_options [] |
static const AVFilterPad | overlay_cuda_inputs [] |
static const AVFilterPad | overlay_cuda_outputs [] |
AVFilter | ff_vf_overlay_cuda |
Overlay one video on top of another using cuda hardware acceleration
Definition in file vf_overlay_cuda.c.
#define CHECK_CU | ( | x | ) | FF_CUDA_CHECK_DL(ctx, ctx->hwctx->internal->cuda_dl, x) |
Definition at line 38 of file vf_overlay_cuda.c.
#define BLOCK_X 32 |
Definition at line 41 of file vf_overlay_cuda.c.
#define BLOCK_Y 16 |
Definition at line 42 of file vf_overlay_cuda.c.
#define OFFSET | ( | x | ) | offsetof(OverlayCUDAContext, x) |
Definition at line 396 of file vf_overlay_cuda.c.
#define FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM) |
Definition at line 397 of file vf_overlay_cuda.c.
|
static |
Helper to find out if provided format is supported by filter.
Definition at line 84 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_config_output().
|
static |
Helper checks if we can process main and overlay pixel formats.
Definition at line 95 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_config_output().
|
static |
Call overlay kernell for a plane.
Definition at line 110 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_blend().
|
static |
Perform blend overlay picture over main picture.
Definition at line 141 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_init().
|
static |
Initialize overlay_cuda.
Definition at line 236 of file vf_overlay_cuda.c.
|
static |
Uninitialize overlay_cuda.
Definition at line 247 of file vf_overlay_cuda.c.
|
static |
Activate overlay_cuda.
Definition at line 268 of file vf_overlay_cuda.c.
|
static |
Query formats.
Definition at line 278 of file vf_overlay_cuda.c.
|
static |
Configure output.
Definition at line 292 of file vf_overlay_cuda.c.
FRAMESYNC_DEFINE_CLASS | ( | overlay_cuda | , |
OverlayCUDAContext | , | ||
fs | |||
) |
|
static |
Definition at line 44 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_config_output().
|
static |
Definition at line 50 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_config_output().
|
static |
Definition at line 399 of file vf_overlay_cuda.c.
|
static |
Definition at line 417 of file vf_overlay_cuda.c.
|
static |
Definition at line 429 of file vf_overlay_cuda.c.
AVFilter ff_vf_overlay_cuda |
Definition at line 438 of file vf_overlay_cuda.c.