swscale/unscaled: fix planarCopyWrapper for float formats with same endianness

This commit is contained in:
Ramiro Polla
2026-03-06 22:04:49 +01:00
parent 32b42dfd9b
commit 4792440ab8

View File

@@ -2355,6 +2355,8 @@ static int planarCopyWrapper(SwsInternal *c, const uint8_t *const src[],
} else {
if (is16BPS(c->opts.src_format) && is16BPS(c->opts.dst_format))
length *= 2;
else if (isFloat(c->opts.src_format) && isFloat(c->opts.dst_format))
length *= 4;
else if (desc_src->comp[0].depth == 1)
length >>= 3; // monowhite/black
for (i = 0; i < height; i++) {