[FFmpeg-cvslog] avfilter: add comments for duplicate line

Steven Liu git at videolan.org
Thu Feb 1 04:58:06 EET 2018


ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Thu Feb  1 10:55:19 2018 +0800| [27fe8930e0b9e7881e61eb9ed0b8b526f718abfe] | committer: Steven Liu

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 at chinaffmpeg.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=27fe8930e0b9e7881e61eb9ed0b8b526f718abfe
---

 libavfilter/vf_crop.c     | 1 +
 libavfilter/vf_drawtext.c | 1 +
 libavfilter/vf_overlay.c  | 1 +
 3 files changed, 3 insertions(+)

diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
index 7c31c1665d..0fdc4949e3 100644
--- a/libavfilter/vf_crop.c
+++ b/libavfilter/vf_crop.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]);
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index f97a741b50..e8905a40d3 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -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);
diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index aa5835ae3a..c6a6ac82f3 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -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);



More information about the ffmpeg-cvslog mailing list