swscale/output: use isSemiPlanarYUV for NV12/21/24/42 case

This commit is contained in:
rcombs 2021-12-23 03:52:11 -06:00
parent f8e284be69
commit cb3a6cc082
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}