This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 2d9cf94283f5750f1f7deea73601f7ac4054a540 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Tue Feb 24 01:18:31 2026 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Tue Mar 10 13:52:19 2026 +0100 avfilter/vf_chromanr: Fix shadowing Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavfilter/vf_chromanr.c | 53 ++++++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/libavfilter/vf_chromanr.c b/libavfilter/vf_chromanr.c index ba2c57cdf4..fe138162f8 100644 --- a/libavfilter/vf_chromanr.c +++ b/libavfilter/vf_chromanr.c @@ -80,6 +80,27 @@ static int distance ## _slice##name(AVFilterContext *ctx, void *arg, ChromaNRContext *s = ctx->priv; \ AVFrame *in = arg; \ AVFrame *out = s->out; \ + \ + { \ + const int h = s->planeheight[0]; \ + const int slice_start = (h * jobnr) / nb_jobs; \ + const int slice_end = (h * (jobnr+1)) / nb_jobs; \ + \ + av_image_copy_plane(out->data[0] + slice_start * out->linesize[0], \ + out->linesize[0], \ + in->data[0] + slice_start * in->linesize[0], \ + in->linesize[0], \ + s->linesize[0], slice_end - slice_start); \ + \ + if (s->nb_planes == 4) { \ + av_image_copy_plane(out->data[3] + slice_start * out->linesize[3], \ + out->linesize[3], \ + in->data[3] + slice_start * in->linesize[3], \ + in->linesize[3], \ + s->linesize[3], slice_end - slice_start); \ + } \ + } \ + \ const int in_ylinesize = in->linesize[0]; \ const int in_ulinesize = in->linesize[1]; \ const int in_vlinesize = in->linesize[2]; \ @@ -102,26 +123,6 @@ static int distance ## _slice##name(AVFilterContext *ctx, void *arg, type *out_uptr = (type *)(out->data[1] + slice_start * out_ulinesize); \ type *out_vptr = (type *)(out->data[2] + slice_start * out_vlinesize); \ \ - { \ - const int h = s->planeheight[0]; \ - const int slice_start = (h * jobnr) / nb_jobs; \ - const int slice_end = (h * (jobnr+1)) / nb_jobs; \ - \ - av_image_copy_plane(out->data[0] + slice_start * out->linesize[0], \ - out->linesize[0], \ - in->data[0] + slice_start * in->linesize[0], \ - in->linesize[0], \ - s->linesize[0], slice_end - slice_start); \ - \ - if (s->nb_planes == 4) { \ - av_image_copy_plane(out->data[3] + slice_start * out->linesize[3], \ - out->linesize[3], \ - in->data[3] + slice_start * in->linesize[3], \ - in->linesize[3], \ - s->linesize[3], slice_end - slice_start); \ - } \ - } \ - \ for (int y = slice_start; y < slice_end; y++) { \ const type *in_yptr = (const type *)(in->data[0] + y * chroma_h * in_ylinesize); \ const type *in_uptr = (const type *)(in->data[1] + y * in_ulinesize); \ @@ -140,14 +141,14 @@ static int distance ## _slice##name(AVFilterContext *ctx, void *arg, int cn = 1; \ \ for (int yy = yystart; yy <= yystop; yy += steph) { \ - const type *in_yptr = (const type *)(in->data[0] + yy * chroma_h * in_ylinesize); \ - const type *in_uptr = (const type *)(in->data[1] + yy * in_ulinesize); \ - const type *in_vptr = (const type *)(in->data[2] + yy * in_vlinesize); \ + const type *in_y = (const type *)(in->data[0] + yy * chroma_h * in_ylinesize); \ + const type *in_u = (const type *)(in->data[1] + yy * in_ulinesize); \ + const type *in_v = (const type *)(in->data[2] + yy * in_vlinesize); \ \ for (int xx = xxstart; xx <= xxstop; xx += stepw) { \ - const ctype Y = in_yptr[xx * chroma_w]; \ - const ctype U = in_uptr[xx]; \ - const ctype V = in_vptr[xx]; \ + const ctype Y = in_y[xx * chroma_w]; \ + const ctype U = in_u[xx]; \ + const ctype V = in_v[xx]; \ const ctype cyY = FFABS(cy - Y); \ const ctype cuU = FFABS(cu - U); \ const ctype cvV = FFABS(cv - V); \ _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
