mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-09 12:05:05 +00:00
Add final Vulkan AV1 ext and VVC support
Fixes https://github.com/libsdl-org/SDL/issues/9464
This commit is contained in:
@@ -478,6 +478,14 @@ static AVCodecContext *OpenVideoStream(AVFormatContext *ic, int stream, const AV
|
||||
/* Allow supported hardware accelerated pixel formats */
|
||||
context->get_format = GetSupportedPixelFormat;
|
||||
|
||||
if (codecpar->codec_id == AV_CODEC_ID_VVC) {
|
||||
context->strict_std_compliance = -2;
|
||||
|
||||
/* Enable threaded decoding, VVC decode is slow */
|
||||
context->thread_count = SDL_GetCPUCount();
|
||||
context->thread_type = (FF_THREAD_FRAME | FF_THREAD_SLICE);
|
||||
}
|
||||
|
||||
result = avcodec_open2(context, codec, NULL);
|
||||
if (result < 0) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open codec %s: %s", avcodec_get_name(context->codec_id), av_err2str(result));
|
||||
|
||||
@@ -561,7 +561,7 @@ static int createDevice(VulkanVideoContext *context)
|
||||
VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME,
|
||||
VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME,
|
||||
VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME,
|
||||
"VK_MESA_video_decode_av1"
|
||||
VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME
|
||||
};
|
||||
VkDeviceCreateInfo deviceCreateInfo = { 0 };
|
||||
VkDeviceQueueCreateInfo *queueCreateInfos = NULL;
|
||||
|
||||
Reference in New Issue
Block a user