gstreamer/gst-libs
Víctor Manuel Jáquez Leal 21dd66b5e4 libs: context: select vaCreateSurfaces version according attributes
This commit tries to centralize the selection of vaCreateSurfaces
version, instead of having fallbacks everywhere.

These fallbacks are hacks, added because new drivers use the latest
version of vaCreateSurfaces (with surface attributes) [1], meanwhile
old drivers (or profiles as JPEG decoder in i965) might rather use the
old version.

In order to select which method, there's detected hack: each config
context has a list of valid formats, in the case of JPEG decoder the
list only contains "rare" 4:2:2 formats (ICM3, GRAY8) which aren't
handled correctly by the current gstreamer-vaapi code [2].

The hack consist in identify if the format list contains an arbitrary
preferred format (which is suposedly well supported by
gstreamer-vaapi, mostly NV12). If no prefered colour format is found,
the the old version of vaCreateSurfaces is used, and the surfaces wil
be mapped into a image with their own color format.

1. https://bugzilla.gnome.org/show_bug.cgi?id=797143
2. https://bugzilla.gnome.org/show_bug.cgi?id=797222
2020-01-23 21:24:28 +01:00
..
gst libs: context: select vaCreateSurfaces version according attributes 2020-01-23 21:24:28 +01:00
meson.build vaapi: add meson build 2017-02-09 11:27:44 +01:00