gstreamer/subprojects/gst-plugins-bad/tests
Víctor Manuel Jáquez Leal e913b4870a vkformat: try UNORM format first and decouple them from colorimetry
From the spec (chapter 34, v1.3.283):

````
UNORM: the components are unsigned normalized values in the range [0, 1]

SRGB: the R, G and B components are unsigned normalized value that represent
      values using sRGB nonlinear encoding, while the A component (if one
      exists) is a regular unsigned normalized value
```

The difference is the storage encoding, the first one is aimed for image
transfers, while the second is for shaders, mostly in the swapchain stage in the
pipeline, and it's done automatically if needed [1].

As far as I have checked, other frameworks (FFmpeg, GTK+), when import or export
images from/to Vulkan, use exclusively UNORM formats, while SRGB formats are
ignored.

My conclusion is that Vulkan formats are related on how bits are stored in
memory rather their transfer functions (colorimetry).

This patch does two interrelated changes:

1. It swaps certain color format maps to try first, in both
gst_vulkan_format_from_video_info() and gst_vulkan_format_from_video_info_2(),
the UNORM formats, when comparing its usage, and later check for SRGB.

2. It removes the code that check for colorimetry in
gst_vulkan_format_from_video_info_2(), since it not storage related.

1. https://community.khronos.org/t/noob-difference-between-unorm-and-srgb/106132/7

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6797>
2024-05-23 17:41:30 +00:00
..
check vkformat: try UNORM format first and decouple them from colorimetry 2024-05-23 17:41:30 +00:00
examples examples: va: add option for enabling alive stream 2024-05-16 14:54:40 +02:00
files pitch: add interactive test 2024-05-02 10:24:30 +02:00
interactive pitch: add interactive test 2024-05-02 10:24:30 +02:00
validate pitch: add validate tests 2024-05-02 13:26:09 +02:00
meson.build gstreamer-full: add full static support 2023-05-31 15:17:11 +00:00