gstgl: Fix handling of padded tile formats
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 8 Nov 2022 17:47:10 +0000 (17:47 +0000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 9 Nov 2022 17:15:32 +0000 (17:15 +0000)
commitaaa01ac30a97f549b14b2f915858c0ccfad28a1d
treec821e1c0e0f64a8a9ef6eaf49ededddabdb9aef4
parente3637e3207d87c61c4a419f0149f5426b71b5b8a
gstgl: Fix handling of padded tile formats

When a tile format is padded and imported as DMABuf, the stride
contains the information about the actual width and height in
number of tiles. This information is needed by the detiling shader
in order accuratly calculate the location of pixels. To fix that,
we also copy the offset and strides into the otuput format and
the converter will ensure that the shader is recompiled whenever
the stride changes.

This fixes video corruptions observed when decoding on MT8195
with videos that aren't not aligned to 64bytes in width.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3365>
subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c
subprojects/gst-plugins-base/gst-libs/gst/gl/gstglupload.c