gstreamer/subprojects/gst-plugins-bad/tests/check/libs
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
..
analyticsmeta.c analytics: add test for OD confidence level retrieval 2024-01-31 14:40:56 +00:00
av1bitwriter.c test: Correct the API return type of {h264,h265,av1}bitwriter 2024-03-13 18:49:13 +08:00
av1parser.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
cudamemory.c tests: cuda: Add buffer pool test 2024-02-29 11:57:50 +00:00
d3d11device.cpp Revert "tests/d3d11: add concurrency test for gstd3d11device" 2024-05-23 15:16:02 +00:00
d3d11memory.c tests: d3d11: Add buffer pool test 2024-02-29 11:57:50 +00:00
d3d12device.cpp d3d12device: Add device-removed-reason property 2024-04-21 12:06:03 +00:00
gstlibscpp.cc tests: add check to make sure -bad lib headers are C++ compiler clean 2024-03-26 14:21:34 +00:00
h264bitwriter.c test: Correct the API return type of {h264,h265,av1}bitwriter 2024-03-13 18:49:13 +08:00
h264parser.c h264parser: Add gst_h264_parser_identify_and_split_nalu_avc() method 2024-01-17 14:57:57 +00:00
h265bitwriter.c test: Correct the API return type of {h264,h265,av1}bitwriter 2024-03-13 18:49:13 +08:00
h265parser.c h265parser: Write Unregistered User Data 2023-07-25 18:28:26 +00:00
insertbin.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
isoff.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
isoff.h Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
mpegts.c mpegts: Handle when iconv doesn't support ISO 6937 2022-12-12 10:17:26 +00:00
mpegvideoparser.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
mse.c bad: Added W3C Media Source Extensions library 2023-11-19 13:48:43 +00:00
nalutils.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
planaraudioadapter.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
play.c gst-plugins-bad: re-indent with GNU indent 2.2.12 2023-03-17 03:18:54 +00:00
vc1parser.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
vkcodecparams_h264.c tests: add Vulkan H.264 encode 2024-05-03 19:40:16 +00:00
vkcodecparams_h265.c tests: add Vulkan H.264 encode 2024-05-03 19:40:16 +00:00
vkcommandpool.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
vkdevice.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
vkformat.c vkformat: try UNORM format first and decouple them from colorimetry 2024-05-23 17:41:30 +00:00
vkimage.c tests: vkimage: add VK_IMAGE_USAGE_SAMPLED_BIT usage bit 2023-03-30 00:03:04 +00:00
vkimagebufferpool.c test: vkimagebufferpool: fix queue leak 2024-02-21 04:50:47 +00:00
vkinstance.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
vkmemory.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
vkvideodecode.c tests: add Vulkan H.264 encode 2024-05-03 19:40:16 +00:00
vkvideoh264encode.c tests: add Vulkan H.264 encode 2024-05-03 19:40:16 +00:00
vkvideoh265encode.c tests: add vulkan H.265 encode 2024-05-03 19:40:17 +00:00
vkwindow.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
vp8parser.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00
vp9bitwriter.c test: Fix several code style issues in vp9bitwriter test 2024-03-27 10:17:51 +08:00
vp9parser.c Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir 2021-09-24 16:14:36 -03:00