[FFmpeg-devel] [PATCH 2/2] swscale/unscaled: allow semiplanar copies

Niklas Haas ffmpeg at haasn.xyz
Thu Dec 19 16:08:00 EET 2024


From: Niklas Haas <git at haasn.dev>

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 <git at haasn.dev>
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 ebc0fe33d2..957b02ef30 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -2665,7 +2665,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;
-- 
2.47.0



More information about the ffmpeg-devel mailing list