From b57135e09c6da79266c680e669e6e092bd340f11 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 10 Nov 2022 09:49:41 -0500 Subject: [PATCH] rawvideoparse: Fix support for sub-sampled tile This element was missed as it does not use the new helpers to calculate the plane size. The code is relatively simple though, so adding support for subsample tiles was easy enough. Part-of: --- subprojects/gst-plugins-base/gst/rawparse/gstrawvideoparse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-base/gst/rawparse/gstrawvideoparse.c b/subprojects/gst-plugins-base/gst/rawparse/gstrawvideoparse.c index ab0fa651d5..043af01b85 100644 --- a/subprojects/gst-plugins-base/gst/rawparse/gstrawvideoparse.c +++ b/subprojects/gst-plugins-base/gst/rawparse/gstrawvideoparse.c @@ -1163,6 +1163,10 @@ gst_raw_video_parse_update_info (GstRawVideoParseConfig * config) gint y_tiles = GST_VIDEO_TILE_Y_TILES (stride); gint tile_width = 1 << GST_VIDEO_FORMAT_INFO_TILE_WS (info->finfo); gint tile_height = 1 << GST_VIDEO_FORMAT_INFO_TILE_HS (info->finfo); + + if (GST_VIDEO_FORMAT_INFO_HAS_SUBTILES (info->finfo)) + tile_height /= 2; + last_plane_size = x_tiles * y_tiles * tile_width * tile_height; } else { gint comp[GST_VIDEO_MAX_COMPONENTS];