mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
vkformat: also use the correct srgb vs unorm when using older
gst_video_info_from_video_info() Fixes sRGB colorspace chosen by GstVulkanSwapper and therefore used for display. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5316>
This commit is contained in:
parent
3438b7a880
commit
d20d94cc48
1 changed files with 7 additions and 4 deletions
|
@ -493,10 +493,13 @@ gst_vulkan_format_from_video_info (GstVideoInfo * v_info, guint plane)
|
|||
if (vk_formats_map[i].format != GST_VIDEO_INFO_FORMAT (v_info))
|
||||
continue;
|
||||
|
||||
if (GST_VIDEO_INFO_IS_RGB (v_info) &&
|
||||
(GST_VIDEO_INFO_COLORIMETRY (v_info).transfer ==
|
||||
GST_VIDEO_TRANSFER_SRGB)) {
|
||||
return vk_formats_map[i].vkfrmts[0];
|
||||
if (GST_VIDEO_INFO_IS_RGB (v_info)) {
|
||||
if (GST_VIDEO_INFO_COLORIMETRY (v_info).transfer ==
|
||||
GST_VIDEO_TRANSFER_SRGB) {
|
||||
return vk_formats_map[i].vkfrmt;
|
||||
} else {
|
||||
return vk_formats_map[i].vkfrmts[0];
|
||||
}
|
||||
} else if (GST_VIDEO_INFO_IS_YUV (v_info) &&
|
||||
GST_VIDEO_INFO_N_PLANES (v_info) > plane) {
|
||||
return vk_formats_map[i].vkfrmts[plane];
|
||||
|
|
Loading…
Reference in a new issue