Skip to content

Commit f175649

Browse files
ndufresneGStreamer Marge Bot
authored andcommitted
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2512>
1 parent 4cb935b commit f175649

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subprojects/gst-plugins-base/gst-libs/gst/video/video-info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ fill_planes (GstVideoInfo * info, gsize plane_size[GST_VIDEO_MAX_PLANES])
11291129
info->offset[1] =
11301130
GST_ROUND_UP_N (width, 1 << ws) * GST_ROUND_UP_N (height, 1 << hs);
11311131
info->size = info->offset[1] + GST_ROUND_UP_N (width, 1 << ws) *
1132-
GST_ROUND_UP_N (height, 1 << (hs - 1));
1132+
GST_ROUND_UP_N (height, 1 << hs) / 2;
11331133
break;
11341134
}
11351135
case GST_VIDEO_FORMAT_A420_10LE:

0 commit comments

Comments
 (0)