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>
pull/277/head
Steven Liu 7 years ago
parent 61a4ee8ab4
commit 27fe8930e0
  1. 1
      libavfilter/vf_crop.c
  2. 1
      libavfilter/vf_drawtext.c
  3. 1
      libavfilter/vf_overlay.c

@ -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]);

@ -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);

@ -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);

Loading…
Cancel
Save