v4l2codecs: add wrappers for alpha decode
authorDaniel Almeida <daniel.almeida@collabora.com>
Sat, 22 May 2021 19:29:09 +0000 (16:29 -0300)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 27 May 2021 21:00:06 +0000 (17:00 -0400)
commit9e86ac4a22a365138072220e70961b341f43508c
treed99b237c54394134680b2f8c5961413bed968c0a
parentad70e0d5e8888d83f5d8d835d5c20c60cf358d01
v4l2codecs: add wrappers for alpha decode

codecalpha is a new plugin introduced to support VP8/VP9 alpha as
defined in the WebM and Matroska specifications. It splits the stream
into two streams, one for the alpha and one for the actual content,
then it decodes them separately with vpxdec and finally combine the
results as A420 or AV12 (i.e. YUV + an extra alpha plane).

The workflow above is setup by means of a bin, gstcodecalphabin.

This patch simulates the same workflow into the v4l2codecs namespace,
thus using the new v4l2 stateless decoders for hardware acceleration.

This is so we can register the new alpha decode elements only if the
hardware produces formats we support, i.e. I420 or NV12 for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2272>
sys/v4l2codecs/gstv4l2codecalphadecodebin.c [new file with mode: 0644]
sys/v4l2codecs/gstv4l2codecalphadecodebin.h [new file with mode: 0644]
sys/v4l2codecs/gstv4l2codech264dec.c
sys/v4l2codecs/gstv4l2codecvp8dec.c
sys/v4l2codecs/gstv4l2decoder.c
sys/v4l2codecs/gstv4l2decoder.h
sys/v4l2codecs/meson.build