FFmpeg
|
#include "avfilter.h"
#include "formats.h"
#include "libavutil/common.h"
#include "libavutil/eval.h"
#include "libavutil/avstring.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/timestamp.h"
#include "filters.h"
#include "drawutils.h"
#include "framesync.h"
#include "video.h"
#include "vf_overlay.h"
Go to the source code of this file.
Data Structures | |
struct | ThreadData |
Used for passing data between threads. More... | |
Macros | |
#define | MAIN 0 |
#define | OVERLAY 1 |
#define | R 0 |
#define | G 1 |
#define | B 2 |
#define | A 3 |
#define | Y 0 |
#define | U 1 |
#define | V 2 |
#define | FAST_DIV255(x) ((((x) + 128) * 257) >> 16) |
#define | UNPREMULTIPLY_ALPHA(x, y) ((((x) << 16) - ((x) << 9) + (x)) / ((((x) + (y)) << 8) - ((x) + (y)) - (y) * (x))) |
#define | PTR_ADD(TYPE, ptr, byte_addend) ((TYPE*)((uint8_t*)ptr + (byte_addend))) |
#define | CPTR_ADD(TYPE, ptr, byte_addend) ((const TYPE*)((const uint8_t*)ptr + (byte_addend))) |
#define | DEFINE_BLEND_PLANE(depth, T, nbits) |
#define | DEFINE_ALPHA_COMPOSITE(depth, T, nbits) |
#define | DEFINE_BLEND_SLICE_YUV(depth, nbits) |
#define | DEFINE_BLEND_SLICE_PLANAR_FMT_(format_, blend_slice_fn_suffix_, hsub_, vsub_, main_straight_, overlay_straight_) |
#define | DEFINE_BLEND_SLICE_PLANAR_FMT(format_, blend_slice_fn_suffix_, hsub_, vsub_) |
#define | DEFINE_BLEND_SLICE_PACKED_FMT(format_, blend_slice_fn_suffix_, main_has_alpha_, main_straight_, overlay_straight_) |
#define | ASSIGN_BLEND_SLICE(format_) |
#define | OFFSET(x) offsetof(OverlayContext, x) |
#define | FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
#define | TFLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM |
Functions | |
static av_cold void | uninit (AVFilterContext *ctx) |
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 | process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags) |
static int | query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out) |
static int | config_input_overlay (AVFilterLink *inlink) |
static int | config_output (AVFilterLink *outlink) |
static av_always_inline void | blend_slice_packed_rgb (AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int main_has_alpha, int x, int y, int overlay_straight, int main_straight, int jobnr, int nb_jobs) |
Blend image in src to destination buffer dst at position (x, y). More... | |
static av_always_inline void | blend_slice_planar_rgb (AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int hsub, int vsub, int main_straight, int x, int y, int overlay_straight, int jobnr, int nb_jobs) |
static int | config_input_main (AVFilterLink *inlink) |
static int | init_slice_fn (AVFilterContext *ctx) |
static int | do_blend (FFFrameSync *fs) |
static av_cold int | init (AVFilterContext *ctx) |
static int | activate (AVFilterContext *ctx) |
FRAMESYNC_DEFINE_CLASS (overlay, OverlayContext, fs) | |
Variables | |
static const char *const | var_names [] |
static enum AVPixelFormat | alpha_pix_fmts [] |
static const AVOption | overlay_options [] |
static const AVFilterPad | avfilter_vf_overlay_inputs [] |
static const AVFilterPad | avfilter_vf_overlay_outputs [] |
const FFFilter | ff_vf_overlay |
overlay one video on top of another
Definition in file vf_overlay.c.
#define MAIN 0 |
Definition at line 62 of file vf_overlay.c.
#define OVERLAY 1 |
Definition at line 63 of file vf_overlay.c.
#define R 0 |
Definition at line 65 of file vf_overlay.c.
#define G 1 |
Definition at line 66 of file vf_overlay.c.
#define B 2 |
Definition at line 67 of file vf_overlay.c.
#define A 3 |
Definition at line 68 of file vf_overlay.c.
#define Y 0 |
Definition at line 70 of file vf_overlay.c.
#define U 1 |
Definition at line 71 of file vf_overlay.c.
#define V 2 |
Definition at line 72 of file vf_overlay.c.
#define FAST_DIV255 | ( | x | ) | ((((x) + 128) * 257) >> 16) |
Definition at line 355 of file vf_overlay.c.
#define UNPREMULTIPLY_ALPHA | ( | x, | |
y | |||
) | ((((x) << 16) - ((x) << 9) + (x)) / ((((x) + (y)) << 8) - ((x) + (y)) - (y) * (x))) |
Definition at line 362 of file vf_overlay.c.
Definition at line 364 of file vf_overlay.c.
Definition at line 365 of file vf_overlay.c.
#define DEFINE_BLEND_PLANE | ( | depth, | |
T, | |||
nbits | |||
) |
Definition at line 459 of file vf_overlay.c.
#define DEFINE_ALPHA_COMPOSITE | ( | depth, | |
T, | |||
nbits | |||
) |
Definition at line 585 of file vf_overlay.c.
#define DEFINE_BLEND_SLICE_YUV | ( | depth, | |
nbits | |||
) |
Definition at line 632 of file vf_overlay.c.
#define DEFINE_BLEND_SLICE_PLANAR_FMT_ | ( | format_, | |
blend_slice_fn_suffix_, | |||
hsub_, | |||
vsub_, | |||
main_straight_, | |||
overlay_straight_ | |||
) |
Definition at line 693 of file vf_overlay.c.
#define DEFINE_BLEND_SLICE_PLANAR_FMT | ( | format_, | |
blend_slice_fn_suffix_, | |||
hsub_, | |||
vsub_ | |||
) |
Definition at line 705 of file vf_overlay.c.
#define DEFINE_BLEND_SLICE_PACKED_FMT | ( | format_, | |
blend_slice_fn_suffix_, | |||
main_has_alpha_, | |||
main_straight_, | |||
overlay_straight_ | |||
) |
Definition at line 720 of file vf_overlay.c.
#define ASSIGN_BLEND_SLICE | ( | format_ | ) |
#define OFFSET | ( | x | ) | offsetof(OverlayContext, x) |
Definition at line 906 of file vf_overlay.c.
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 907 of file vf_overlay.c.
Definition at line 908 of file vf_overlay.c.
enum EvalMode |
Definition at line 74 of file vf_overlay.c.
|
static |
Definition at line 80 of file vf_overlay.c.
|
inlinestatic |
Definition at line 89 of file vf_overlay.c.
Referenced by eval_expr().
|
static |
Definition at line 96 of file vf_overlay.c.
Referenced by config_input_overlay(), do_blend(), and process_command().
|
static |
Definition at line 108 of file vf_overlay.c.
Referenced by config_input_overlay(), and process_command().
|
static |
Definition at line 129 of file vf_overlay.c.
|
static |
Definition at line 161 of file vf_overlay.c.
|
static |
Definition at line 291 of file vf_overlay.c.
|
static |
Definition at line 337 of file vf_overlay.c.
|
static |
Blend image in src to destination buffer dst at position (x, y).
< the amount of overlay to blend on to main
Definition at line 371 of file vf_overlay.c.
|
static |
Definition at line 664 of file vf_overlay.c.
|
static |
Definition at line 742 of file vf_overlay.c.
|
static |
Definition at line 760 of file vf_overlay.c.
Referenced by do_blend().
|
static |
Definition at line 845 of file vf_overlay.c.
Referenced by init().
|
static |
Definition at line 892 of file vf_overlay.c.
|
static |
Definition at line 900 of file vf_overlay.c.
FRAMESYNC_DEFINE_CLASS | ( | overlay | , |
OverlayContext | , | ||
fs | |||
) |
|
static |
Definition at line 48 of file vf_overlay.c.
Referenced by set_expr().
|
static |
Definition at line 154 of file vf_overlay.c.
Referenced by config_input_main(), config_input_overlay(), and query_formats().
|
static |
Definition at line 910 of file vf_overlay.c.
|
static |
Definition at line 944 of file vf_overlay.c.
|
static |
Definition at line 957 of file vf_overlay.c.
const FFFilter ff_vf_overlay |
Definition at line 965 of file vf_overlay.c.