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;
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;
BlendContext *b = ctx->priv;
int ret, plane;
- b->class = &blend_class;
- av_opt_set_defaults(b);
-
- if ((ret = av_set_options_string(b, args, "=", ":")) < 0)
- return ret;
-
for (plane = 0; plane < FF_ARRAY_ELEMS(b->params); plane++) {
FilterParams *param = &b->params[plane];
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;
{ NULL }
};
+static const char *const shorthand[] = { NULL };
+
AVFilter avfilter_vf_blend = {
.name = "blend",
.description = NULL_IF_CONFIG_SMALL("Blend two video frames into each other."),
.inputs = blend_inputs,
.outputs = blend_outputs,
.priv_class = &blend_class,
+ .shorthand = shorthand,
};