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

Git pushed a commit to branch master
in repository ffmpeg.

commit 01c007ec4dfa435085a0391060630dc406bc9515
Author:     Niklas Haas <[email protected]>
AuthorDate: Tue May 19 12:20:40 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Thu Jun 11 16:27:47 2026 +0000

    swscale/ops_memcpy: simplify plane count check
    
    Instead of testing for this condition indirectly via packed and rw.elems,
    we can now express the relevant condition directly. The memcpy backend works
    if and only if each component lives on a separate plane.
    
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/ops_memcpy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libswscale/ops_memcpy.c b/libswscale/ops_memcpy.c
index 26634049dd..2cbe8f314b 100644
--- a/libswscale/ops_memcpy.c
+++ b/libswscale/ops_memcpy.c
@@ -78,7 +78,7 @@ static int compile(SwsContext *ctx, const SwsOpList *ops, 
SwsCompiledOp *out)
         const SwsOp *op = &ops->ops[n];
         switch (op->op) {
         case SWS_OP_READ:
-            if ((op->rw.packed && op->rw.elems != 1) || op->rw.frac || 
op->rw.filter.op)
+            if (ff_sws_rw_op_planes(op) != op->rw.elems || op->rw.frac || 
op->rw.filter.op)
                 return AVERROR(ENOTSUP);
             for (int i = 0; i < op->rw.elems; i++)
                 p.index[i] = i;
@@ -121,7 +121,7 @@ static int compile(SwsContext *ctx, const SwsOpList *ops, 
SwsCompiledOp *out)
             break;
 
         case SWS_OP_WRITE:
-            if ((op->rw.packed && op->rw.elems != 1) || op->rw.frac || 
op->rw.filter.op)
+            if (ff_sws_rw_op_planes(op) != op->rw.elems || op->rw.frac || 
op->rw.filter.op)
                 return AVERROR(ENOTSUP);
             p.num_planes = op->rw.elems;
             break;

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

Reply via email to