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 <git@haasn.dev>
This commit is contained in:
Niklas Haas
2026-02-24 11:51:18 +01:00
committed by Niklas Haas
parent 83af1a2977
commit a71c115b77

View File

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