FFmpeg
|
overlay one video on top of another More...
#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 "internal.h"
#include "dualinput.h"
#include "drawutils.h"
#include "video.h"
Go to the source code of this file.
Data Structures | |
struct | OverlayContext |
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 | OFFSET(x) offsetof(OverlayContext, x) |
#define | FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_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 (AVFilterContext *ctx) |
static int | config_input_overlay (AVFilterLink *inlink) |
static int | config_output (AVFilterLink *outlink) |
static void | blend_image_packed_rgb (AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int x, int y) |
Blend image in src to destination buffer dst at position (x, y). More... | |
static av_always_inline void | blend_plane (AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int src_w, int src_h, int dst_w, int dst_h, int i, int hsub, int vsub, int x, int y, int main_has_alpha) |
static void | alpha_composite (const AVFrame *src, const AVFrame *dst, int src_w, int src_h, int dst_w, int dst_h, int x, int y) |
static av_always_inline void | blend_image_yuv (AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int hsub, int vsub, int main_has_alpha, int x, int y) |
static void | blend_image_yuv420 (AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int x, int y) |
static void | blend_image_yuv422 (AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int x, int y) |
static void | blend_image_yuv444 (AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, int x, int y) |
static int | config_input_main (AVFilterLink *inlink) |
static AVFrame * | do_blend (AVFilterContext *ctx, AVFrame *mainpic, const AVFrame *second) |
static int | filter_frame (AVFilterLink *inlink, AVFrame *inpicref) |
static int | request_frame (AVFilterLink *outlink) |
static av_cold int | init (AVFilterContext *ctx) |
AVFILTER_DEFINE_CLASS (overlay) | |
Variables | |
static const char *const | var_names [] |
static const char *const | eof_action_str [] |
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 [] |
AVFilter | ff_vf_overlay |
overlay one video on top of another
Definition in file vf_overlay.c.
#define MAIN 0 |
Definition at line 83 of file vf_overlay.c.
Referenced by config_input_overlay(), config_output(), and query_formats().
#define OVERLAY 1 |
Definition at line 84 of file vf_overlay.c.
Referenced by config_input_overlay(), and query_formats().
#define R 0 |
Definition at line 86 of file vf_overlay.c.
Referenced by blend_image_packed_rgb().
#define G 1 |
Definition at line 87 of file vf_overlay.c.
Referenced by blend_image_packed_rgb().
#define B 2 |
Definition at line 88 of file vf_overlay.c.
Referenced by blend_image_packed_rgb().
#define A 3 |
Definition at line 89 of file vf_overlay.c.
Referenced by blend_image_packed_rgb().
#define Y 0 |
Definition at line 91 of file vf_overlay.c.
#define U 1 |
Definition at line 92 of file vf_overlay.c.
#define V 2 |
Definition at line 93 of file vf_overlay.c.
#define FAST_DIV255 | ( | x | ) | ((((x) + 128) * 257) >> 16) |
Definition at line 375 of file vf_overlay.c.
Referenced by alpha_composite(), blend_image_packed_rgb(), and blend_plane().
#define UNPREMULTIPLY_ALPHA | ( | x, | |
y | |||
) | ((((x) << 16) - ((x) << 9) + (x)) / ((((x) + (y)) << 8) - ((x) + (y)) - (y) * (x))) |
Definition at line 381 of file vf_overlay.c.
Referenced by alpha_composite(), blend_image_packed_rgb(), and blend_plane().
#define OFFSET | ( | x | ) | offsetof(OverlayContext, x) |
Definition at line 716 of file vf_overlay.c.
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 717 of file vf_overlay.c.
enum var_name |
Definition at line 58 of file vf_overlay.c.
enum EOFAction |
Enumerator | |
---|---|
EOF_ACTION_REPEAT | |
EOF_ACTION_ENDALL | |
EOF_ACTION_PASS |
Definition at line 73 of file vf_overlay.c.
enum EvalMode |
Definition at line 95 of file vf_overlay.c.
enum OverlayFormat |
Enumerator | |
---|---|
OVERLAY_FORMAT_YUV420 | |
OVERLAY_FORMAT_YUV422 | |
OVERLAY_FORMAT_YUV444 | |
OVERLAY_FORMAT_RGB | |
OVERLAY_FORMAT_NB |
Definition at line 101 of file vf_overlay.c.
|
static |
Definition at line 139 of file vf_overlay.c.
|
inlinestatic |
Definition at line 148 of file vf_overlay.c.
Referenced by eval_expr().
|
static |
Definition at line 155 of file vf_overlay.c.
Referenced by config_input_overlay(), do_blend(), and process_command().
|
static |
Definition at line 166 of file vf_overlay.c.
Referenced by config_input_overlay(), and process_command().
|
static |
Definition at line 187 of file vf_overlay.c.
|
static |
Definition at line 212 of file vf_overlay.c.
|
static |
Definition at line 309 of file vf_overlay.c.
|
static |
Definition at line 357 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 387 of file vf_overlay.c.
Referenced by config_input_main().
|
static |
Definition at line 465 of file vf_overlay.c.
Referenced by blend_image_yuv().
|
inlinestatic |
< the amount of overlay to blend on to main
Definition at line 537 of file vf_overlay.c.
Referenced by blend_image_yuv().
|
static |
Definition at line 579 of file vf_overlay.c.
Referenced by blend_image_yuv420(), blend_image_yuv422(), and blend_image_yuv444().
|
static |
Definition at line 598 of file vf_overlay.c.
Referenced by config_input_main().
|
static |
Definition at line 605 of file vf_overlay.c.
Referenced by config_input_main().
|
static |
Definition at line 612 of file vf_overlay.c.
Referenced by config_input_main().
|
static |
Definition at line 619 of file vf_overlay.c.
|
static |
Definition at line 649 of file vf_overlay.c.
Referenced by init().
|
static |
Definition at line 681 of file vf_overlay.c.
|
static |
Definition at line 688 of file vf_overlay.c.
|
static |
Definition at line 694 of file vf_overlay.c.
AVFILTER_DEFINE_CLASS | ( | overlay | ) |
|
static |
Definition at line 43 of file vf_overlay.c.
Referenced by set_expr().
|
static |
Definition at line 79 of file vf_overlay.c.
Referenced by config_input_overlay().
|
static |
Definition at line 303 of file vf_overlay.c.
Referenced by config_input_main(), and config_input_overlay().
|
static |
Definition at line 719 of file vf_overlay.c.
|
static |
Definition at line 744 of file vf_overlay.c.
|
static |
Definition at line 761 of file vf_overlay.c.
AVFilter ff_vf_overlay |
Definition at line 771 of file vf_overlay.c.