From f1756493d26e5268d60eeeeaa2a9be2e4f43ed8c Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Fri, 27 May 2022 14:18:30 -0400 Subject: [PATCH] video: Fix NV12_16L32 size calculation The subsampling of the second plane was not taken into account, resulting in a 16bit per pixel buffers instead of 12. Part-of: --- subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c index ea961f1..b3d25d3 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c @@ -1129,7 +1129,7 @@ fill_planes (GstVideoInfo * info, gsize plane_size[GST_VIDEO_MAX_PLANES]) info->offset[1] = GST_ROUND_UP_N (width, 1 << ws) * GST_ROUND_UP_N (height, 1 << hs); info->size = info->offset[1] + GST_ROUND_UP_N (width, 1 << ws) * - GST_ROUND_UP_N (height, 1 << (hs - 1)); + GST_ROUND_UP_N (height, 1 << hs) / 2; break; } case GST_VIDEO_FORMAT_A420_10LE: -- 2.7.4