From 18cc71fc8eb76a541117cfa57b188a7adc0bd980 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 2 Apr 2026 14:03:51 +0200 Subject: [PATCH] swscale/aarch64/ops: fix SWS_OP_LINEAR mask check The implementation of AARCH64_SWS_OP_LINEAR loops over elements of this mask to determine which *output* rows to compute. However, it is being set by this loop to `op->comps.unused`, which is a mask of unused *input* rows. As such, it should be looking at `next->comps.unused` instead. This did not result in problems in practice, because none of the linear matrices happened to trigger this case (more input columns than output rows). Signed-off-by: Niklas Haas --- libswscale/aarch64/ops_impl_conv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/aarch64/ops_impl_conv.c b/libswscale/aarch64/ops_impl_conv.c index 8f37af0101..19dcf9e3c9 100644 --- a/libswscale/aarch64/ops_impl_conv.c +++ b/libswscale/aarch64/ops_impl_conv.c @@ -205,7 +205,7 @@ static int convert_to_aarch64_impl(SwsContext *ctx, const SwsOpList *ops, int n, out->mask = 0; for (int i = 0; i < 4; i++) { /* Skip unused or identity rows */ - if (op->comps.unused[i] || !(op->lin.mask & SWS_MASK_ROW(i))) + if (next->comps.unused[i] || !(op->lin.mask & SWS_MASK_ROW(i))) continue; MASK_SET(out->mask, i, 1); for (int j = 0; j < 5; j++) {