diff options
author | Paul B Mahol <onemda@gmail.com> | 2013-04-04 15:29:01 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2013-04-04 15:30:06 +0000 |
commit | b1dea2c0d8946bfebd84984df359915667eb2ff3 (patch) | |
tree | 83b39474b68c3550d51d354f28cf01b7dfe76c3c /libavfilter/vf_blend.c | |
parent | 6a08ccd61da040955ed24c0eb3d24ab4e860852a (diff) | |
download | ffmpeg-b1dea2c0d8946bfebd84984df359915667eb2ff3.tar.gz |
lavfi/blend: add N variable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_blend.c')
-rw-r--r-- | libavfilter/vf_blend.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c index 429956db5d..1a88db1ce7 100644 --- a/libavfilter/vf_blend.c +++ b/libavfilter/vf_blend.c @@ -60,8 +60,8 @@ enum BlendMode { BLEND_NB }; -static const char *const var_names[] = { "X", "Y", "W", "H", "SW", "SH", "T", "A", "B", "TOP", "BOTTOM", NULL }; -enum { VAR_X, VAR_Y, VAR_W, VAR_H, VAR_SW, VAR_SH, VAR_T, VAR_A, VAR_B, VAR_TOP, VAR_BOTTOM, VAR_VARS_NB }; +static const char *const var_names[] = { "X", "Y", "W", "H", "SW", "SH", "T", "N", "A", "B", "TOP", "BOTTOM", NULL }; +enum { VAR_X, VAR_Y, VAR_W, VAR_H, VAR_SW, VAR_SH, VAR_T, VAR_N, VAR_A, VAR_B, VAR_TOP, VAR_BOTTOM, VAR_VARS_NB }; typedef struct FilterParams { enum BlendMode mode; @@ -81,6 +81,7 @@ typedef struct { struct FFBufQueue queue_bottom; int hsub, vsub; ///< chroma subsampling values int frame_requested; + int framenum; char *all_expr; enum BlendMode all_mode; double all_opacity; @@ -387,6 +388,7 @@ static void blend_frame(AVFilterContext *ctx, uint8_t *bottom = bottom_buf->data[plane]; param = &b->params[plane]; + param->values[VAR_N] = b->framenum++; param->values[VAR_T] = dst_buf->pts == AV_NOPTS_VALUE ? NAN : dst_buf->pts * av_q2d(inlink->time_base); param->values[VAR_W] = outw; param->values[VAR_H] = outh; |