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/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/mathematics.h"
#include "libavutil/timestamp.h"
#include "internal.h"
#include "bufferqueue.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 | OFFSET(x) offsetof(OverlayContext, x) |
#define | FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
#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))) |
Functions | |
AVFILTER_DEFINE_CLASS (overlay) | |
static av_cold int | init (AVFilterContext *ctx, const char *args) |
static av_cold void | uninit (AVFilterContext *ctx) |
static int | query_formats (AVFilterContext *ctx) |
static int | config_input_main (AVFilterLink *inlink) |
static int | config_input_overlay (AVFilterLink *inlink) |
static int | config_output (AVFilterLink *outlink) |
static void | blend_image (AVFilterContext *ctx, AVFilterBufferRef *dst, AVFilterBufferRef *src, int x, int y) |
Blend image in src to destination buffer dst at position (x, y). | |
static int | try_filter_frame (AVFilterContext *ctx, AVFilterBufferRef *mainpic) |
static int | try_filter_next_frame (AVFilterContext *ctx) |
static int | flush_frames (AVFilterContext *ctx) |
static int | filter_frame_main (AVFilterLink *inlink, AVFilterBufferRef *inpicref) |
static int | filter_frame_over (AVFilterLink *inlink, AVFilterBufferRef *inpicref) |
static int | request_frame (AVFilterLink *outlink) |
Variables | |
static const char *const | var_names [] |
static const AVOption | overlay_options [] |
static enum AVPixelFormat | alpha_pix_fmts [] |
static const AVFilterPad | avfilter_vf_overlay_inputs [] |
static const AVFilterPad | avfilter_vf_overlay_outputs [] |
AVFilter | avfilter_vf_overlay |
overlay one video on top of another
Definition in file vf_overlay.c.
#define MAIN 0 |
Definition at line 61 of file vf_overlay.c.
Referenced by config_input_overlay(), config_output(), Faac_encode_init(), query_formats(), request_frame(), and try_filter_frame().
#define OVERLAY 1 |
Definition at line 62 of file vf_overlay.c.
Referenced by avfilter_register_all(), config_input_overlay(), query_formats(), request_frame(), and try_filter_frame().
#define R 0 |
Definition at line 64 of file vf_overlay.c.
Referenced by blend_image().
#define G 1 |
Definition at line 65 of file vf_overlay.c.
Referenced by blend_image().
#define B 2 |
Definition at line 66 of file vf_overlay.c.
Referenced by blend_image().
#define A 3 |
Definition at line 67 of file vf_overlay.c.
#define Y 0 |
Definition at line 69 of file vf_overlay.c.
#define U 1 |
Definition at line 70 of file vf_overlay.c.
#define V 2 |
Definition at line 71 of file vf_overlay.c.
#define OFFSET | ( | x | ) | offsetof(OverlayContext, x) |
Definition at line 100 of file vf_overlay.c.
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 101 of file vf_overlay.c.
#define FAST_DIV255 | ( | x | ) | ((((x) + 128) * 257) >> 16) |
Definition at line 307 of file vf_overlay.c.
Referenced by blend_image().
#define UNPREMULTIPLY_ALPHA | ( | x, | |
y | |||
) | ((((x) << 16) - ((x) << 9) + (x)) / ((((x) + (y)) << 8) - ((x) + (y)) - (y) * (x))) |
Definition at line 313 of file vf_overlay.c.
Referenced by blend_image().
enum var_name |
Definition at line 53 of file vf_overlay.c.
AVFILTER_DEFINE_CLASS | ( | overlay | ) |
|
static |
Definition at line 119 of file vf_overlay.c.
|
static |
Definition at line 140 of file vf_overlay.c.
|
static |
Definition at line 151 of file vf_overlay.c.
|
static |
Definition at line 215 of file vf_overlay.c.
|
static |
Definition at line 231 of file vf_overlay.c.
|
static |
Definition at line 294 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
< the amount of overlay to blend on to main
Definition at line 318 of file vf_overlay.c.
Referenced by try_filter_frame().
|
static |
Definition at line 506 of file vf_overlay.c.
Referenced by filter_frame_main(), and try_filter_next_frame().
|
static |
Definition at line 549 of file vf_overlay.c.
Referenced by filter_frame_over(), flush_frames(), and request_frame().
|
static |
Definition at line 563 of file vf_overlay.c.
Referenced by filter_frame_main(), and filter_frame_over().
|
static |
Definition at line 571 of file vf_overlay.c.
|
static |
Definition at line 592 of file vf_overlay.c.
|
static |
Definition at line 605 of file vf_overlay.c.
|
static |
Definition at line 45 of file vf_overlay.c.
Referenced by config_input_overlay().
|
static |
Definition at line 103 of file vf_overlay.c.
|
static |
Definition at line 209 of file vf_overlay.c.
Referenced by config_input_main(), and config_input_overlay().
|
static |
Definition at line 635 of file vf_overlay.c.
|
static |
Definition at line 654 of file vf_overlay.c.
AVFilter avfilter_vf_overlay |
Definition at line 665 of file vf_overlay.c.