From 6c9218d748e06da019b6d15c37e5849d8a69bb07 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 19 Dec 2024 15:05:19 +0100 Subject: [PATCH] swscale/unscaled: allow semiplanar copies As fixed in the previous commit, this enables semipacked range and bit depth conversions. Previously these would go through the general purpose path. Signed-off-by: Niklas Haas Sponsored-by: Sovereign Tech Fund --- libswscale/swscale_unscaled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index a4d18bf63e..907c1600c5 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -2588,7 +2588,7 @@ void ff_get_unscaled_swscale(SwsInternal *c) (isPlanarYUV(srcFormat) && isPlanarYUV(dstFormat) && c->chrDstHSubSample == c->chrSrcHSubSample && c->chrDstVSubSample == c->chrSrcVSubSample && - !isSemiPlanarYUV(srcFormat) && !isSemiPlanarYUV(dstFormat)))) + isSemiPlanarYUV(srcFormat) == isSemiPlanarYUV(dstFormat)))) { if (isPacked(c->opts.src_format)) c->convert_unscaled = packedCopyWrapper;