gl: add support for A420 conversion
authorDaniel Almeida <daniel.almeida@collabora.com>
Thu, 6 May 2021 20:26:50 +0000 (17:26 -0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 20 May 2021 15:06:26 +0000 (15:06 +0000)
commit195981767cd340bbcf9746a69bfb55a748f4925e
treea346b5c0b67c815e5e541164433c8c7092519592
parent34ef2b275907c484f4a8c3349a91dc32ba29b957
gl: add support for A420 conversion

A420 is a four planar format similar to I420 but with an extra buffer
for alpha values.

A common use of the gl stack is for GPU format conversions using
shaders, in which case one can use glupload, glcolorconvert and
gldownload elements to upload their buffer to the GPU context, perform
the conversion on the GPU itself and then retrieve the data to CPU
context.

A420 was not supported. This patch adds said support mainly by adding
the corresponding shader to perform the conversion and updating the
supported caps.

Both A420->RGBA and RGBA->A420 conversions are supported.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1153>
docs/plugins/gst_plugins_cache.json
gst-libs/gst/gl/gstglcolorconvert.c
gst-libs/gst/gl/gstglcolorconvert.h
gst-libs/gst/gl/gstglformat.c
gst-libs/gst/gl/gstglmemory.h