don't use av_vkfmt_from_pixfmt
This commit is contained in:
committed by
Guillaume Meunier
parent
deab10801c
commit
2dbade5c8f
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "ffmpeg_helper.h"
|
||||
#include <libdrm/drm_fourcc.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -65,12 +66,6 @@ vk_format_to_av_format(VkFormat vk_fmt)
|
||||
default:
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user