1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avfilter: add comments for duplicate line

comment about the looks like a duplicate line.
but that is used to reason x is expressed from y

Suggested-by: Paul B Mahol
Suggested-by: Michael Niedermayer
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
Steven Liu 2018-02-01 10:55:19 +08:00
parent 61a4ee8ab4
commit 27fe8930e0
3 changed files with 3 additions and 0 deletions

View File

@ -262,6 +262,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
NAN : frame->pkt_pos;
s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, NULL);
s->var_values[VAR_Y] = av_expr_eval(s->y_pexpr, s->var_values, NULL);
/* It is necessary if x is expressed from y */
s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, NULL);
normalize_double(&s->x, s->var_values[VAR_X]);

View File

@ -1390,6 +1390,7 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame,
s->x = s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, &s->prng);
s->y = s->var_values[VAR_Y] = av_expr_eval(s->y_pexpr, s->var_values, &s->prng);
/* It is necessary if x is expressed from y */
s->x = s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, &s->prng);
update_alpha(s);

View File

@ -149,6 +149,7 @@ static void eval_expr(AVFilterContext *ctx)
s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, NULL);
s->var_values[VAR_Y] = av_expr_eval(s->y_pexpr, s->var_values, NULL);
/* It is necessary if x is expressed from y */
s->var_values[VAR_X] = av_expr_eval(s->x_pexpr, s->var_values, NULL);
s->x = normalize_xy(s->var_values[VAR_X], s->hsub);
s->y = normalize_xy(s->var_values[VAR_Y], s->vsub);