FFmpeg
Loading...
Searching...
No Matches
vf_overlay.h
Go to the documentation of this file.
1/*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef AVFILTER_OVERLAY_H
20#define AVFILTER_OVERLAY_H
21
22#include "libavutil/eval.h"
23#include "libavutil/pixdesc.h"
24#include "framesync.h"
25#include "avfilter.h"
26
40
53
54typedef struct OverlayContext {
55 const AVClass *class;
56 int x, y; ///< position of overlaid picture
57
59 uint8_t main_rgba_map[4];
62 uint8_t overlay_rgba_map[4];
64 int format; ///< OverlayFormat
66 int eval_mode; ///< EvalMode
67
69
70 int main_pix_step[4]; ///< steps per pixel for each plane of the main output
71 int overlay_pix_step[4]; ///< steps per pixel for each plane of the overlay
72 int hsub, vsub; ///< chroma subsampling values
73 const AVPixFmtDescriptor *main_desc; ///< format descriptor for main input
74
76 char *x_expr, *y_expr;
77
79
80 int (*blend_row[4])(uint8_t *d, uint8_t *da, uint8_t *s, uint8_t *a, int w,
81 ptrdiff_t alinesize);
82 int (*blend_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
84
86
87#endif /* AVFILTER_OVERLAY_H */
@ VAR_T
Definition aeval.c:53
static AVFormatContext * ctx
Main libavfilter public API header.
@ VAR_VSUB
Definition boxblur.c:42
@ VAR_HSUB
Definition boxblur.c:41
#define s(width, name)
Definition cbs_vp9.c:198
simple arithmetic expression evaluator
int a
const char * arg
Definition jacosubdec.c:65
@ VAR_X
Definition vf_blend.c:55
@ VAR_Y
Definition vf_blend.c:55
uint8_t w
Definition llvidencdsp.c:39
var_name
Definition noise.c:46
@ VAR_N
Definition noise.c:47
@ VAR_VARS_NB
Definition noise.c:59
@ VAR_OH
Definition scale_eval.c:47
@ VAR_OW
Definition scale_eval.c:46
Describe the class of an AVClass context structure.
Definition log.h:76
Definition eval.c:171
An instance of a filter.
Definition avfilter.h:273
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition pixdesc.h:69
Frame sync structure.
Definition framesync.h:168
uint8_t main_is_packed_rgb
Definition vf_overlay.h:58
uint8_t overlay_is_packed_rgb
Definition vf_overlay.h:61
uint8_t main_has_alpha
Definition vf_overlay.h:60
AVExpr * y_pexpr
Definition vf_overlay.h:78
double var_values[VAR_VARS_NB]
Definition vf_overlay.h:75
uint8_t overlay_has_alpha
Definition vf_overlay.h:63
int(* blend_row[4])(uint8_t *d, uint8_t *da, uint8_t *s, uint8_t *a, int w, ptrdiff_t alinesize)
Definition vf_overlay.h:80
int y
position of overlaid picture
Definition vf_overlay.h:56
const AVPixFmtDescriptor * main_desc
format descriptor for main input
Definition vf_overlay.h:73
AVExpr * x_pexpr
Definition vf_overlay.h:78
FFFrameSync fs
Definition vf_overlay.h:68
int eval_mode
EvalMode.
Definition vf_overlay.h:66
int format
OverlayFormat.
Definition vf_overlay.h:64
int vsub
chroma subsampling values
Definition vf_overlay.h:72
int main_pix_step[4]
steps per pixel for each plane of the main output
Definition vf_overlay.h:70
uint8_t main_rgba_map[4]
Definition vf_overlay.h:59
int(* blend_slice)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition vf_overlay.h:82
uint8_t overlay_rgba_map[4]
Definition vf_overlay.h:62
int overlay_pix_step[4]
steps per pixel for each plane of the overlay
Definition vf_overlay.h:71
@ VAR_MAIN_H
@ VAR_MAIN_W
void ff_overlay_init_x86(AVFilterContext *ctx)
@ VAR_OVERLAY_H
Definition vf_overlay.h:31
@ VAR_MW
Definition vf_overlay.h:28
@ VAR_VARS_NB
Definition vf_overlay.h:38
@ VAR_MH
Definition vf_overlay.h:29
@ VAR_OVERLAY_W
Definition vf_overlay.h:30
OverlayFormat
Definition vf_overlay.h:41
@ OVERLAY_FORMAT_YUV420
Definition vf_overlay.h:42
@ OVERLAY_FORMAT_YUV444
Definition vf_overlay.h:46
@ OVERLAY_FORMAT_NB
Definition vf_overlay.h:51
@ OVERLAY_FORMAT_YUV422
Definition vf_overlay.h:44
@ OVERLAY_FORMAT_YUV420P10
Definition vf_overlay.h:43
@ OVERLAY_FORMAT_RGB
Definition vf_overlay.h:48
@ OVERLAY_FORMAT_AUTO
Definition vf_overlay.h:50
@ OVERLAY_FORMAT_YUV422P10
Definition vf_overlay.h:45
@ OVERLAY_FORMAT_GBRP
Definition vf_overlay.h:49
@ OVERLAY_FORMAT_YUV444P10
Definition vf_overlay.h:47