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

Git pushed a commit to branch master
in repository ffmpeg.

commit 5e6d663c94936db16fcb381f709524b07373e53d
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Sun Jul 26 19:12:40 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Sat Aug 8 21:46:08 2026 +0000

    avfilter/vf_bwdif: fix line boundary checks for >8 bits content
    
    The mrefs/prefs boundary conditions scaled the y limits by the number of
    bytes per sample, even though the ref offsets are already expressed in
    elements. For content deeper than 8 bits this clamped perfectly valid
    in-bounds line taps.
    
    Found by validating the libplacebo GPU port against this filter, which
    matches exactly on 16-bit content everywhere except these lines.
    
    This changes the output for >8 bit content on the affected lines.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 libavfilter/vf_bwdif.c        | 16 ++++++------
 tests/ref/fate/filter-bwdif10 | 60 +++++++++++++++++++++----------------------
 2 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c
index dbe35a029b..a34f1906dd 100644
--- a/libavfilter/vf_bwdif.c
+++ b/libavfilter/vf_bwdif.c
@@ -79,22 +79,22 @@ static int filter_slice(AVFilterContext *ctx, void *arg, 
int jobnr, int nb_jobs)
             if (yadif->current_field == YADIF_FIELD_END) {
                 if ((y < 3) || ((y + 3) >= td->h)) {
                     s->dsp.filter_edge(dst, prev, cur, next, td->w,
-                                   (y + df) < td->h ? refs : -refs,
-                                   y > (df - 1) ? -refs : refs,
+                                   (y + 1) < td->h ? refs : -refs,
+                                   y > 0 ? -refs : refs,
                                    refs << 1, -(refs << 1),
                                    td->parity ^ td->tff, clip_max,
                                    (y < 2) || ((y + 3) > td->h) ? 0 : 1);
                 } else {
-                    s->dsp.filter_intra(dst, cur, td->w, (y + df) < td->h ? 
refs : -refs,
-                                    y > (df - 1) ? -refs : refs,
-                                    (y + 3*df) < td->h ? 3 * refs : -refs,
-                                    y > (3*df - 1) ? -3 * refs : refs,
+                    s->dsp.filter_intra(dst, cur, td->w, (y + 1) < td->h ? 
refs : -refs,
+                                    y > 0 ? -refs : refs,
+                                    (y + 3) < td->h ? 3 * refs : -refs,
+                                    y > 2 ? -3 * refs : refs,
                                     td->parity ^ td->tff, clip_max);
                 }
             } else if ((y < 4) || ((y + 5) > td->h)) {
                 s->dsp.filter_edge(dst, prev, cur, next, td->w,
-                               (y + df) < td->h ? refs : -refs,
-                               y > (df - 1) ? -refs : refs,
+                               (y + 1) < td->h ? refs : -refs,
+                               y > 0 ? -refs : refs,
                                refs << 1, -(refs << 1),
                                td->parity ^ td->tff, clip_max,
                                (y < 2) || ((y + 3) > td->h) ? 0 : 1);
diff --git a/tests/ref/fate/filter-bwdif10 b/tests/ref/fate/filter-bwdif10
index d97acea991..70a7f9d3ed 100644
--- a/tests/ref/fate/filter-bwdif10
+++ b/tests/ref/fate/filter-bwdif10
@@ -3,33 +3,33 @@
 #codec_id 0: rawvideo
 #dimensions 0: 720x576
 #sar 0: 16/15
-0,          9,          9,        1,  1244160, 0x4f0e6e1c
-0,         10,         10,        1,  1244160, 0x57152296
-0,         11,         11,        1,  1244160, 0x0074598b
-0,         12,         12,        1,  1244160, 0x44537bb8
-0,         13,         13,        1,  1244160, 0x6f27ab9c
-0,         14,         14,        1,  1244160, 0x1f195e10
-0,         15,         15,        1,  1244160, 0xc5644298
-0,         16,         16,        1,  1244160, 0x24c1230e
-0,         17,         17,        1,  1244160, 0x2651b213
-0,         18,         18,        1,  1244160, 0x88efe863
-0,         19,         19,        1,  1244160, 0x8bf0ada1
-0,         20,         20,        1,  1244160, 0x8b6c013a
-0,         21,         21,        1,  1244160, 0x69ebc579
-0,         22,         22,        1,  1244160, 0xa45d0f0c
-0,         23,         23,        1,  1244160, 0x272162e4
-0,         24,         24,        1,  1244160, 0x8c456817
-0,         25,         25,        1,  1244160, 0x872c58ee
-0,         26,         26,        1,  1244160, 0x9318cb95
-0,         27,         27,        1,  1244160, 0xcaec95f1
-0,         28,         28,        1,  1244160, 0x8b01a105
-0,         29,         29,        1,  1244160, 0x956de85e
-0,         30,         30,        1,  1244160, 0xa2998ab9
-0,         31,         31,        1,  1244160, 0xa56b5621
-0,         32,         32,        1,  1244160, 0x7bd6b161
-0,         33,         33,        1,  1244160, 0xbcb75d7a
-0,         34,         34,        1,  1244160, 0xe5e94727
-0,         35,         35,        1,  1244160, 0xf3145c67
-0,         36,         36,        1,  1244160, 0xcf63df5a
-0,         37,         37,        1,  1244160, 0x77d08ec8
-0,         38,         38,        1,  1244160, 0xc99d2eb2
+0,          9,          9,        1,  1244160, 0xee7d128d
+0,         10,         10,        1,  1244160, 0x6c25ebe8
+0,         11,         11,        1,  1244160, 0xae8e297d
+0,         12,         12,        1,  1244160, 0x20284ad0
+0,         13,         13,        1,  1244160, 0x95c57238
+0,         14,         14,        1,  1244160, 0x5ae32569
+0,         15,         15,        1,  1244160, 0x92401342
+0,         16,         16,        1,  1244160, 0x95ed0c85
+0,         17,         17,        1,  1244160, 0xb79398df
+0,         18,         18,        1,  1244160, 0x66a0dda3
+0,         19,         19,        1,  1244160, 0x906596c3
+0,         20,         20,        1,  1244160, 0x26f1da33
+0,         21,         21,        1,  1244160, 0xe317ad64
+0,         22,         22,        1,  1244160, 0x2f5fe488
+0,         23,         23,        1,  1244160, 0x7bd64c7b
+0,         24,         24,        1,  1244160, 0x7470479e
+0,         25,         25,        1,  1244160, 0x61653bee
+0,         26,         26,        1,  1244160, 0xb249a6cc
+0,         27,         27,        1,  1244160, 0x2cce6f74
+0,         28,         28,        1,  1244160, 0x711d7631
+0,         29,         29,        1,  1244160, 0xa304c119
+0,         30,         30,        1,  1244160, 0x3fb66044
+0,         31,         31,        1,  1244160, 0x97c11ba5
+0,         32,         32,        1,  1244160, 0xd8f37fed
+0,         33,         33,        1,  1244160, 0x33d541e7
+0,         34,         34,        1,  1244160, 0x2e2e2535
+0,         35,         35,        1,  1244160, 0xe26132bd
+0,         36,         36,        1,  1244160, 0x13b9b37b
+0,         37,         37,        1,  1244160, 0x05825e47
+0,         38,         38,        1,  1244160, 0x44f6f505

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to