This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit ef4e16ed50aa72a8db84f7a193236f230d61c991 Author: Niklas Haas <[email protected]> AuthorDate: Tue Jan 13 11:31:12 2026 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Thu Feb 19 19:44:46 2026 +0000 swscale/x86/ops: make the presence of a read op optional Allows this backend to process op lists without a read, e.g. for pure clear operations. I decided to change `write` to a pointer as well for symmetry. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <[email protected]> --- libswscale/x86/ops.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libswscale/x86/ops.c b/libswscale/x86/ops.c index bc61266588..44dbe05b35 100644 --- a/libswscale/x86/ops.c +++ b/libswscale/x86/ops.c @@ -657,8 +657,8 @@ static int compile(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out) return mmsize; av_assert1(ops->num_ops > 0); - const SwsOp read = ops->ops[0]; - const SwsOp write = ops->ops[ops->num_ops - 1]; + const SwsOp *read = ops->ops[0].op == SWS_OP_READ ? &ops->ops[0] : NULL; + const SwsOp *write = &ops->ops[ops->num_ops - 1]; int ret; /* Special fast path for in-place packed shuffle */ @@ -679,9 +679,9 @@ static int compile(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out) }; /* 3-component reads/writes process one extra garbage word */ - if (read.rw.packed && read.rw.elems == 3) + if (read && read->rw.packed && read->rw.elems == 3) out->over_read = sizeof(uint32_t); - if (write.rw.packed && write.rw.elems == 3) + if (write->rw.packed && write->rw.elems == 3) out->over_write = sizeof(uint32_t); static const SwsOpTable *const tables[] = { @@ -722,8 +722,8 @@ static int compile(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out) out->func = NAME; \ } while (0) - const int read_planes = read.rw.packed ? 1 : read.rw.elems; - const int write_planes = write.rw.packed ? 1 : write.rw.elems; + const int read_planes = read ? (read->rw.packed ? 1 : read->rw.elems) : 0; + const int write_planes = write->rw.packed ? 1 : write->rw.elems; switch (FFMAX(read_planes, write_planes)) { case 1: ASSIGN_PROCESS_FUNC(ff_sws_process1_x86); break; case 2: ASSIGN_PROCESS_FUNC(ff_sws_process2_x86); break; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
