This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 169d516b35100af815275f3fa0f3311fbf4f833e
Author:     romainhedouin <[email protected]>
AuthorDate: Fri Oct 16 16:35:47 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sun Nov 1 04:00:54 2026 +0000

    avfilter/vf_nnedi: fix stale prescreener flags after pscrn=none
    
    The prescreener flags are only written when a prescreener is used. If
    pscrn is changed to none at runtime, the flags of the previous frames
    stayed in the buffer, so the predictor skipped those pixels and the
    output was wrong. Clear the flags when pscrn is none.
    
    Checked by switching pscrn with sendcmd: the frames after the switch
    now match a run that started with pscrn=none.
    
    Found during a code review sweep of ffmpeg using an LLM.
    
    Signed-off-by: romainhedouin <[email protected]>
---
 libavfilter/vf_nnedi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/vf_nnedi.c b/libavfilter/vf_nnedi.c
index 5c4b47e0a2..dff5915e21 100644
--- a/libavfilter/vf_nnedi.c
+++ b/libavfilter/vf_nnedi.c
@@ -631,6 +631,9 @@ static int filter_slice(AVFilterContext *ctx, void *arg, 
int jobnr, int nb_jobs)
                 src_linesize * 2, srcbuf_stride,
                 width, 1, in_scale);
 
+        if (!s->pscrn)
+            memset(prescreen_buf, 0, width);
+
         for (int y = 0; y < slice_end - slice_start; y += 2) {
             if (s->pscrn > 0)
                 s->prescreen[s->pscrn > 1](ctx, srcbuf + (y / 2) * 
srcbuf_stride + 32,

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to