From a71c115b776285c2906393dec3beb2345fe8cf2f Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Tue, 24 Feb 2026 11:51:18 +0100 Subject: [PATCH] swscale/x86/ops: allow matching planar rw against 1-element packed fmt Otherwise, the x86 backend fails to serve e.g. rgb565le. For -src rgb565le: Before: Overall speedup=2.210x faster, min=0.256x max=60.465x After: Overall speedup=4.929x faster, min=0.638x max=181.260x Signed-off-by: Niklas Haas --- libswscale/x86/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/x86/ops.c b/libswscale/x86/ops.c index 251d47e0ac..ba8d987fc2 100644 --- a/libswscale/x86/ops.c +++ b/libswscale/x86/ops.c @@ -552,7 +552,7 @@ static bool op_is_type_invariant(const SwsOp *op) switch (op->op) { case SWS_OP_READ: case SWS_OP_WRITE: - return !op->rw.packed && !op->rw.frac; + return !(op->rw.elems > 1 && op->rw.packed) && !op->rw.frac; case SWS_OP_SWIZZLE: case SWS_OP_CLEAR: return true;