va: videoformats: Fix RGB32 mapping between VA and GStreamer.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 31 Mar 2021 07:50:46 +0000 (09:50 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 7 Apr 2021 11:06:59 +0000 (11:06 +0000)
commitd932dcf6be5800567c69cf34f9f1eae283216307
treea9acd24563371accf221f560f882457f96e2305a
parentdbff4c6f06b85e3af11fcb286cd2e1839405f9d2
va: videoformats: Fix RGB32 mapping between VA and GStreamer.

Different VA drives might have different definitions for RGB32 color
formats because different bit interpretation. Sadly the specification
doesn't clarify these interpretations. So VA users have to figure out
what's the correct mapping with it's rendering color format
definition.

This patch aims to fix the static map structure after the
VAImageFormats are queried. There is another static map with the
different interpretations of the RGB32 formats, and compare them with
the given VAImageFormat, then with the GStreamer color format, update
the mapping table.

Finally, some RGB32 color formats were added.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2129>
sys/va/gstvadisplay.c
sys/va/gstvavideoformat.c
sys/va/gstvavideoformat.h