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

Git pushed a commit to branch master
in repository ffmpeg.

commit 00907e1244ef3de9eb602eb5f0b2ae05de53f5d9
Author:     Lynne <[email protected]>
AuthorDate: Mon Feb 23 22:29:22 2026 +0100
Commit:     Lynne <[email protected]>
CommitDate: Thu Feb 26 14:10:21 2026 +0100

    swscale/ops: realign after adding slice_align
    
    This is a separate commit since it makes it easier to see the changes.
    
    Sponsored-by: Sovereign Tech Fund
---
 libswscale/ops.c          |  6 ++++--
 libswscale/ops_backend.c  |  8 ++++----
 libswscale/ops_internal.h |  8 ++++----
 libswscale/ops_memcpy.c   |  2 +-
 libswscale/x86/ops.c      | 16 ++++++++--------
 5 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/libswscale/ops.c b/libswscale/ops.c
index b56f75863c..e78d09ae0b 100644
--- a/libswscale/ops.c
+++ b/libswscale/ops.c
@@ -976,7 +976,8 @@ static void op_pass_setup(const SwsImg *out_base, const 
SwsImg *in_base,
         const int plane_w    = (aligned_w + sub_x) >> sub_x;
         const int plane_pad  = (comp->over_read + sub_x) >> sub_x;
         const int plane_size = plane_w * p->pixel_bits_in >> 3;
-        p->memcpy_in |= plane_size + plane_pad > in.linesize[i];
+        if (comp->slice_align)
+            p->memcpy_in |= plane_size + plane_pad > in.linesize[i];
         exec->in_stride[i] = in.linesize[i];
     }
 
@@ -986,7 +987,8 @@ static void op_pass_setup(const SwsImg *out_base, const 
SwsImg *in_base,
         const int plane_w    = (aligned_w + sub_x) >> sub_x;
         const int plane_pad  = (comp->over_write + sub_x) >> sub_x;
         const int plane_size = plane_w * p->pixel_bits_out >> 3;
-        p->memcpy_out |= plane_size + plane_pad > out.linesize[i];
+        if (comp->slice_align)
+            p->memcpy_out |= plane_size + plane_pad > out.linesize[i];
         exec->out_stride[i] = out.linesize[i];
     }
 
diff --git a/libswscale/ops_backend.c b/libswscale/ops_backend.c
index 3725f07644..f9e54020ba 100644
--- a/libswscale/ops_backend.c
+++ b/libswscale/ops_backend.c
@@ -77,10 +77,10 @@ static int compile(SwsContext *ctx, SwsOpList *ops, 
SwsCompiledOp *out)
 
     *out = (SwsCompiledOp) {
         .slice_align = 1,
-        .block_size = SWS_BLOCK_SIZE,
-        .cpu_flags  = chain->cpu_flags,
-        .priv       = chain,
-        .free       = ff_sws_op_chain_free_cb,
+        .block_size  = SWS_BLOCK_SIZE,
+        .cpu_flags   = chain->cpu_flags,
+        .priv        = chain,
+        .free        = ff_sws_op_chain_free_cb,
     };
 
     switch (read_type) {
diff --git a/libswscale/ops_internal.h b/libswscale/ops_internal.h
index 8f36a83415..a5a156f728 100644
--- a/libswscale/ops_internal.h
+++ b/libswscale/ops_internal.h
@@ -95,10 +95,10 @@ typedef struct SwsCompiledOp {
     SwsOpFunc func;
 
     int slice_align; /* slice height alignment */
-    int block_size; /* number of pixels processed per iteration */
-    int over_read;  /* implementation over-reads input by this many bytes */
-    int over_write; /* implementation over-writes output by this many bytes */
-    int cpu_flags;  /* active set of CPU flags (informative) */
+    int block_size;  /* number of pixels processed per iteration */
+    int over_read;   /* implementation over-reads input by this many bytes */
+    int over_write;  /* implementation over-writes output by this many bytes */
+    int cpu_flags;   /* active set of CPU flags (informative) */
 
     /* Arbitrary private data */
     void *priv;
diff --git a/libswscale/ops_memcpy.c b/libswscale/ops_memcpy.c
index 692bb9a797..7213b7a497 100644
--- a/libswscale/ops_memcpy.c
+++ b/libswscale/ops_memcpy.c
@@ -119,7 +119,7 @@ static int compile(SwsContext *ctx, SwsOpList *ops, 
SwsCompiledOp *out)
 
     *out = (SwsCompiledOp) {
         .slice_align = 1,
-        .block_size = 1,
+        .block_size  = 1,
         .func = process,
         .priv = av_memdup(&p, sizeof(p)),
         .free = av_free,
diff --git a/libswscale/x86/ops.c b/libswscale/x86/ops.c
index 6b58785cbc..8ac417acae 100644
--- a/libswscale/x86/ops.c
+++ b/libswscale/x86/ops.c
@@ -596,15 +596,15 @@ static int solve_shuffle(const SwsOpList *ops, int 
mmsize, SwsCompiledOp *out)
                           mmsize;             /* movu */
 
     *out = (SwsCompiledOp) {
-        .priv       = av_memdup(shuffle, sizeof(shuffle)),
-        .free       = av_free,
+        .priv        = av_memdup(shuffle, sizeof(shuffle)),
+        .free        = av_free,
         .slice_align = 1,
-        .block_size = pixels * num_lanes,
-        .over_read  = read_size - in_total,
-        .over_write = mmsize - out_total,
-        .cpu_flags  = mmsize > 32 ? AV_CPU_FLAG_AVX512 :
-                      mmsize > 16 ? AV_CPU_FLAG_AVX2 :
-                                    AV_CPU_FLAG_SSE4,
+        .block_size  = pixels * num_lanes,
+        .over_read   = read_size - in_total,
+        .over_write  = mmsize - out_total,
+        .cpu_flags   = mmsize > 32 ? AV_CPU_FLAG_AVX512 :
+                       mmsize > 16 ? AV_CPU_FLAG_AVX2 :
+                                     AV_CPU_FLAG_SSE4,
     };
 
     if (!out->priv)

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

Reply via email to