This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit f186c50cf53aec20e9a29059cb22ca3f2d59201c Author: Michael Niedermayer <[email protected]> AuthorDate: Sun Jul 12 03:27:47 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Mon Jul 13 17:14:54 2026 +0000 avfilter/vf_floodfill: remove unneeded variables Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/vf_floodfill.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/libavfilter/vf_floodfill.c b/libavfilter/vf_floodfill.c index e569d5f586..9bc72e2a78 100644 --- a/libavfilter/vf_floodfill.c +++ b/libavfilter/vf_floodfill.c @@ -39,7 +39,6 @@ typedef struct FloodfillContext { int d[4]; int nb_planes; - int back, front; Points *points; unsigned int points_size; @@ -271,8 +270,6 @@ static int config_input(AVFilterLink *inlink) } } - s->front = s->back = 0; - return 0; } @@ -292,6 +289,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) const int h = frame->height; size_t nb_points, points_size; int i, ret; + int front = 0; if (w > UINT16_MAX + 1 || h > UINT16_MAX + 1 || av_size_mult(w, h, &nb_points) < 0 || @@ -305,7 +303,6 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) av_frame_free(&frame); return AVERROR(ENOMEM); } - s->front = s->back = 0; if (is_inside(s->x, s->y, w, h)) { s->pick_pixel(frame, s->x, s->y, &s0, &s1, &s2, &s3); @@ -323,9 +320,9 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) goto end; if (s->is_same(frame, s->x, s->y, s0, s1, s2, s3)) { - s->points[s->front].x = s->x; - s->points[s->front].y = s->y; - s->front++; + s->points[front].x = s->x; + s->points[front].y = s->y; + front++; } if (ret = ff_inlink_make_frame_writable(link, &frame)) { @@ -333,34 +330,34 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) return ret; } - while (s->front > s->back) { + while (front > 0) { int x, y; - s->front--; - x = s->points[s->front].x; - y = s->points[s->front].y; + front--; + x = s->points[front].x; + y = s->points[front].y; if (s->is_same(frame, x, y, s0, s1, s2, s3)) { s->set_pixel(frame, x, y, d0, d1, d2, d3); if (is_inside(x + 1, y, w, h)) { - s->points[s->front] .x = x + 1; - s->points[s->front++].y = y; + s->points[front] .x = x + 1; + s->points[front++].y = y; } if (is_inside(x - 1, y, w, h)) { - s->points[s->front] .x = x - 1; - s->points[s->front++].y = y; + s->points[front] .x = x - 1; + s->points[front++].y = y; } if (is_inside(x, y + 1, w, h)) { - s->points[s->front] .x = x; - s->points[s->front++].y = y + 1; + s->points[front] .x = x; + s->points[front++].y = y + 1; } if (is_inside(x, y - 1, w, h)) { - s->points[s->front] .x = x; - s->points[s->front++].y = y - 1; + s->points[front] .x = x; + s->points[front++].y = y - 1; } } } _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
