From ab839f3642079a3ad02de8e07abf09fe2a12a93d Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Tue, 12 Apr 2022 12:17:09 -0400 Subject: [PATCH] v4l2codecs: Port to the new tile size helper This will complete the scaling of width/height shift scaling as only a partial implementation was made. Part-of: --- subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2format.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2format.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2format.c index 39b64a9..0f5fa30 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2format.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2format.c @@ -79,14 +79,9 @@ set_stride (GstVideoInfo * info, gint plane, gint stride) const GstVideoFormatInfo *finfo = info->finfo; if (GST_VIDEO_FORMAT_INFO_IS_TILED (finfo)) { - gint x_tiles, y_tiles, ws, hs, padded_height; + guint x_tiles, y_tiles, ws, hs, padded_height; - ws = GST_VIDEO_FORMAT_INFO_TILE_WS (finfo); - hs = GST_VIDEO_FORMAT_INFO_TILE_HS (finfo); - - /* this only works for what we support, NV12 subsampled tiles */ - if (GST_VIDEO_FORMAT_INFO_HAS_SUBTILES (finfo) && plane == 1) - hs -= 1; + gst_video_format_info_get_tile_sizes (finfo, plane, &ws, &hs); padded_height = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (finfo, plane, info->height); -- 2.7.4