don't use av_vkfmt_from_pixfmt

This commit is contained in:
Patrick Nicolas
2022-11-13 20:48:27 +01:00
committed by Guillaume Meunier
parent deab10801c
commit 2dbade5c8f
+1 -6
View File
@@ -19,6 +19,7 @@
#include "ffmpeg_helper.h" #include "ffmpeg_helper.h"
#include <libdrm/drm_fourcc.h> #include <libdrm/drm_fourcc.h>
#include <vulkan/vulkan.h>
extern "C" extern "C"
{ {
@@ -65,12 +66,6 @@ vk_format_to_av_format(VkFormat vk_fmt)
default: default:
break; break;
} }
for (int f = AV_PIX_FMT_NONE; f < AV_PIX_FMT_NB; ++f)
{
auto current_fmt = av_vkfmt_from_pixfmt(AVPixelFormat(f));
if (current_fmt and *current_fmt == (VkFormat)vk_fmt)
return AVPixelFormat(f);
}
throw std::runtime_error("unsupported vulkan pixel format " + std::to_string((VkFormat)vk_fmt)); throw std::runtime_error("unsupported vulkan pixel format " + std::to_string((VkFormat)vk_fmt));
} }