gstreamer/subprojects/gst-plugins-bad/gst-libs/gst
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
..
adaptivedemux plugins: Fix wrong enum usage 2023-03-20 11:40:30 +00:00
analytics analyticsmeta: fix g-ir-scanner warnings 2024-04-10 00:46:42 +00:00
audio gir: Checkout all .gir files and check that they are updated on the CI 2023-04-22 09:32:32 -04:00
basecamerabinsrc meson: Add CameraBin and Va girs 2023-04-25 02:57:55 +00:00
codecparsers h264parser: maintain API changes 2024-04-07 15:25:23 +00:00
codecs gst: Move GstQueueArray as GstVecDeque to core 2024-05-06 18:25:42 +00:00
cuda cudamemory: Fix offset of subsampled planar formats 2024-05-23 11:47:16 +00:00
d3d11 Revert "d3d11device: protect device_lock vs device_new" 2024-05-23 15:16:02 +00:00
d3d12 gst: Move GstQueueArray as GstVecDeque to core 2024-05-06 18:25:42 +00:00
d3dshader d3dshader: Fix gamma and primaries conversion pixel shader 2024-05-04 19:57:33 +09:00
dxva dxvavp8decoder: Fix reference frame setting 2024-02-10 21:18:44 +09:00
insertbin insertbin/doc: add "Since" markers to pass CI 2023-11-17 01:09:49 +01:00
interfaces meson: Namespace the plugins_doc_dep/libraries variables 2022-09-01 21:17:35 +00:00
isoff gst-plugins-bad: define G_LOG_DOMAIN for all libraries 2021-10-19 00:12:25 +00:00
mpegts mpegst: Fix ownership of return value 2024-02-20 11:33:33 +02:00
mse mse: Add logging init for mediasource sample map 2024-02-21 18:11:25 +00:00
opencv build: opencv: disable opencv deps if it's not installed 2023-10-26 20:43:14 +00:00
play play: Mention that gst_play_new() also initialized GStreamer 2024-05-09 09:56:39 +00:00
player play: Mention that gst_play_new() also initialized GStreamer 2024-05-09 09:56:39 +00:00
sctp meson: Namespace the plugins_doc_dep/libraries variables 2022-09-01 21:17:35 +00:00
transcoder gir: Checkout all .gir files and check that they are updated on the CI 2023-04-22 09:32:32 -04:00
uridownloader meson: Namespace the plugins_doc_dep/libraries variables 2022-09-01 21:17:35 +00:00
va va: libs: Use va_check_surface_has_status() to implement va_check_surface() 2024-05-16 14:54:39 +02:00
vulkan vkformat: try UNORM format first and decouple them from colorimetry 2024-05-23 17:41:30 +00:00
wayland wayland: Use wl_display_create_queue_with_name 2024-05-23 13:38:01 +00:00
webrtc nice: resolve result should go to nice helper thread 2024-02-06 09:12:13 +00:00
winrt gst-plugins-bad: define G_LOG_DOMAIN for all libraries 2021-10-19 00:12:25 +00:00
glib-compat-private.h Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
meson.build d3d12: Move core part to gst-libs 2024-04-01 10:37:50 +00:00