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

Git pushed a commit to branch master
in repository ffmpeg.

commit 82b0659fea53da8912d8d5924ae1f0ae4a1a77e9
Author:     Niklas Haas <[email protected]>
AuthorDate: Sun Nov 8 03:12:45 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Tue Nov 10 14:57:29 2026 +0000

    swscale/filters: exclude integer boundaries from start/stop
    
    ceil(pos) gives pos when pos is exactly aligned with the filter edge,
    where the weight is 0 (or SWS_MAX_REDUCE_CUTOFF). Using floor(pos) + 1
    excludes this case instead. Ditto for the upper bound.
    
    Mainly useful for the following commit.
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/filters.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libswscale/filters.c b/libswscale/filters.c
index ddc4db8770..3f8d8d1f86 100644
--- a/libswscale/filters.c
+++ b/libswscale/filters.c
@@ -84,8 +84,8 @@ static void compute_row(SwsFilterWeights *f, const 
SwsFilterFunction *fun,
     }
 
     /* First and last pixels that are actually within the filter envelope */
-    const int start   = ceil (src_pos - radius);
-    const int stop    = floor(src_pos + radius);
+    const int start   = floor(src_pos - radius) + 1;
+    const int stop    = ceil (src_pos + radius) - 1;
     const int clamped = av_clip(start, 0, f->src_size - f->filter_size);
     *pos = clamped;
 

-- 
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