[FFmpeg-devel] [PATCH 06/16] swscale/output: use isSemiPlanarYUV for NV12/21/24/42 case

rcombs rcombs at rcombs.me
Fri Dec 24 05:08:54 EET 2021


---
 libswscale/output.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libswscale/output.c b/libswscale/output.c
index 7cedb145aa..90f5efa16e 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -2632,8 +2632,7 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c,
     } else {
         *yuv2plane1 = yuv2plane1_8_c;
         *yuv2planeX = yuv2planeX_8_c;
-        if (dstFormat == AV_PIX_FMT_NV12 || dstFormat == AV_PIX_FMT_NV21 ||
-            dstFormat == AV_PIX_FMT_NV24 || dstFormat == AV_PIX_FMT_NV42)
+        if (isSemiPlanarYUV(dstFormat))
             *yuv2nv12cX = yuv2nv12cX_c;
     }
 
-- 
2.33.1



More information about the ffmpeg-devel mailing list