|
FFmpeg
|
Overlay one video on top of another using cuda hardware acceleration. More...
#include "libavutil/log.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 "libavutil/eval.h"#include "avfilter.h"#include "filters.h"#include "framesync.h"#include "cuda/load_helper.h"Go to the source code of this file.
Data Structures | |
| struct | OverlayCUDAContext |
| OverlayCUDAContext. More... | |
Macros | |
| #define | CHECK_CU(x) |
| #define | DIV_UP(a, b) |
| #define | BLOCK_X 32 |
| #define | BLOCK_Y 16 |
| #define | MAIN 0 |
| #define | OVERLAY 1 |
| #define | OFFSET(x) |
| #define | FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM) |
Enumerations | |
| enum | var_name { VAR_MAIN_W , VAR_MW , VAR_MAIN_H , VAR_MH , VAR_OVERLAY_W , VAR_OW , VAR_OVERLAY_H , VAR_OH , VAR_X , VAR_Y , VAR_N , VAR_T , VAR_VARS_NB } |
| enum | EvalMode { EVAL_MODE_INIT , EVAL_MODE_FRAME , EVAL_MODE_NB } |
Functions | |
| static int | format_is_supported (const enum AVPixelFormat formats[], enum AVPixelFormat fmt) |
| Helper to find out if provided format is supported by filter. | |
| static int | normalize_xy (double d, int chroma_sub) |
| static void | eval_expr (AVFilterContext *ctx) |
| static int | set_expr (AVExpr **pexpr, const char *expr, const char *option, void *log_ctx) |
| 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. | |
| 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. | |
| static int | overlay_cuda_blend (FFFrameSync *fs) |
| Perform blend overlay picture over main picture. | |
| static int | config_input_overlay (AVFilterLink *inlink) |
| static av_cold int | overlay_cuda_init (AVFilterContext *avctx) |
| Initialize overlay_cuda. | |
| static av_cold void | overlay_cuda_uninit (AVFilterContext *avctx) |
| Uninitialize overlay_cuda. | |
| static int | overlay_cuda_activate (AVFilterContext *avctx) |
| Activate overlay_cuda. | |
| static int | overlay_cuda_config_output (AVFilterLink *outlink) |
| Configure output. | |
| FRAMESYNC_DEFINE_CLASS (overlay_cuda, OverlayCUDAContext, fs) | |
Variables | |
| static enum AVPixelFormat | supported_main_formats [] |
| static enum AVPixelFormat | supported_overlay_formats [] |
| static const char *const | var_names [] |
| static const AVOption | overlay_cuda_options [] |
| static const AVFilterPad | overlay_cuda_inputs [] |
| static const AVFilterPad | overlay_cuda_outputs [] |
| const FFFilter | 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 | ) |
Definition at line 40 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_blend(), overlay_cuda_call_kernel(), overlay_cuda_config_output(), and overlay_cuda_uninit().
Definition at line 41 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_call_kernel().
| #define BLOCK_X 32 |
Definition at line 43 of file vf_overlay_cuda.c.
| #define BLOCK_Y 16 |
Definition at line 44 of file vf_overlay_cuda.c.
| #define MAIN 0 |
Definition at line 46 of file vf_overlay_cuda.c.
| #define OVERLAY 1 |
Definition at line 47 of file vf_overlay_cuda.c.
| #define OFFSET | ( | x | ) |
Definition at line 522 of file vf_overlay_cuda.c.
| #define FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM) |
Definition at line 523 of file vf_overlay_cuda.c.
| enum var_name |
| Enumerator | |
|---|---|
| VAR_MAIN_W | |
| VAR_MW | |
| VAR_MAIN_H | |
| VAR_MH | |
| VAR_OVERLAY_W | |
| VAR_OW | |
| VAR_OVERLAY_H | |
| VAR_OH | |
| VAR_X | |
| VAR_Y | |
| VAR_N | |
| VAR_T | |
| VAR_VARS_NB | |
Definition at line 62 of file vf_overlay_cuda.c.
| enum EvalMode |
| Enumerator | |
|---|---|
| EVAL_MODE_INIT | |
| EVAL_MODE_FRAME | |
| EVAL_MODE_NB | |
Definition at line 74 of file vf_overlay_cuda.c.
|
static |
Helper to find out if provided format is supported by filter.
Definition at line 124 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_config_output().
|
inlinestatic |
Definition at line 132 of file vf_overlay_cuda.c.
Referenced by eval_expr().
|
static |
Definition at line 139 of file vf_overlay_cuda.c.
Referenced by config_input_overlay(), and overlay_cuda_blend().
|
static |
Definition at line 154 of file vf_overlay_cuda.c.
Referenced by config_input_overlay().
|
static |
Helper checks if we can process main and overlay pixel formats.
Definition at line 178 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_config_output().
|
static |
Call overlay kernell for a plane.
Definition at line 193 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_blend().
|
static |
Perform blend overlay picture over main picture.
Definition at line 224 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_init().
|
static |
Definition at line 336 of file vf_overlay_cuda.c.
|
static |
Initialize overlay_cuda.
Definition at line 371 of file vf_overlay_cuda.c.
|
static |
Uninitialize overlay_cuda.
Definition at line 382 of file vf_overlay_cuda.c.
|
static |
Activate overlay_cuda.
Definition at line 405 of file vf_overlay_cuda.c.
|
static |
Configure output.
Definition at line 415 of file vf_overlay_cuda.c.
| FRAMESYNC_DEFINE_CLASS | ( | overlay_cuda | , |
| OverlayCUDAContext | , | ||
| fs | ) |
|
static |
Definition at line 49 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_config_output().
|
static |
Definition at line 55 of file vf_overlay_cuda.c.
Referenced by overlay_cuda_config_output().
|
static |
Definition at line 80 of file vf_overlay_cuda.c.
|
static |
Definition at line 525 of file vf_overlay_cuda.c.
|
static |
Definition at line 544 of file vf_overlay_cuda.c.
|
static |
Definition at line 556 of file vf_overlay_cuda.c.
| const FFFilter ff_vf_overlay_cuda |
Definition at line 564 of file vf_overlay_cuda.c.