v4l2codecs: format: Fix tiled stride with modifiers

After a bit of back and forth, we figure-out that for backward
compatibility we need to set the tile stride the way GStreamer
defines it. Sinks such as glimagesink/waylandsink translate it
back to the number of bytes representation used by Linux.

The change in !7355 when the other way around, breaking tiled
playback through waylandsink and glimagesink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7892>
This commit is contained in:
Nicolas Dufresne 2025-01-29 09:31:54 -05:00 committed by GStreamer Marge Bot
parent 902f0eb9ea
commit d327b576fd

View File

@ -141,8 +141,7 @@ set_stride (GstVideoInfoDmaDrm * info, gint plane, gint stride)
{
const GstVideoFormatInfo *finfo = info->vinfo.finfo;
if (GST_VIDEO_FORMAT_INFO_IS_TILED (finfo) &&
info->drm_modifier == DRM_FORMAT_MOD_INVALID) {
if (GST_VIDEO_FORMAT_INFO_IS_TILED (finfo)) {
guint x_tiles, y_tiles, tile_height, padded_height;
tile_height = GST_VIDEO_FORMAT_INFO_TILE_HEIGHT (finfo, plane);