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

Git pushed a commit to branch master
in repository ffmpeg.

commit 8e96400e8d6c4c424436e8f38268cf5cddb1c04b
Author:     Niklas Haas <[email protected]>
AuthorDate: Tue Nov 3 17:18:06 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Sun Nov 8 01:48:12 2026 +0000

    Revert "swscale/uops: pad the horizontal filter weights to whole blocks"
    
    This reverts commit 90ba80f81113d4f8e91c68c0f5207a9f6962e906.
    
    No longer needed after the previous commit, which already allocates
    extra padding.
    
    The condition has been lowered to a static_assert() instead.
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/uops_tmpl.c | 23 +++++------------------
 1 file changed, 5 insertions(+), 18 deletions(-)

diff --git a/libswscale/uops_tmpl.c b/libswscale/uops_tmpl.c
index 56e28749b1..15e41297b0 100644
--- a/libswscale/uops_tmpl.c
+++ b/libswscale/uops_tmpl.c
@@ -314,25 +314,12 @@ DECL_SETUP(setup_filter_h, params, out)
         return AVERROR(ENOTSUP);
 
     SwsFilterWeights *filter = params->uop->data.kernel;
-    out->priv.i32[2] = filter->filter_size;
-
-    /* The horizontal filter uop reads weights for a full SWS_BLOCK_SIZE
-     * outputs per block (see read_planar_fh), so the weights array must be
-     * padded up to the block-aligned output count. Pad the tail with zero
-     * weights, which contribute nothing to the accumulated sums. */
-    const size_t padded_w = FFALIGN(filter->dst_size, SWS_BLOCK_SIZE);
-    if (padded_w == filter->dst_size) {
-        out->priv.ptr = av_refstruct_ref(filter->weights);
-        out->free = ff_op_priv_unref;
-        return 0;
-    }
+    static_assert(SWS_FILTER_PAD_ROWS >= SWS_BLOCK_SIZE,
+                  "filter weights contain sufficient padding for block 
over-read");
 
-    int *weights = av_calloc(padded_w * filter->filter_size, sizeof(*weights));
-    if (!weights)
-        return AVERROR(ENOMEM);
-    memcpy(weights, filter->weights, filter->num_weights * sizeof(*weights));
-    out->priv.ptr = weights;
-    out->free = ff_op_priv_free;
+    out->priv.ptr = av_refstruct_ref(filter->weights);
+    out->priv.i32[2] = filter->filter_size;
+    out->free = ff_op_priv_unref;
     return 0;
 }
 

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