mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
e913b4870a
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> |
||
---|---|---|
.. | ||
gst | ||
meson.build |