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 <git@haasn.dev>
This commit is contained in:
Niklas Haas
2026-04-02 14:03:51 +02:00
parent df4fe85ae3
commit 18cc71fc8e

View File

@@ -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++) {