MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / get_video_profile

Function get_video_profile

libavcodec/vulkan_decode.c:107–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107static const VkVideoProfileInfoKHR *get_video_profile(FFVulkanDecodeShared *ctx, enum AVCodecID codec_id)
108{
109 const VkVideoProfileListInfoKHR *profile_list;
110
111 VkStructureType profile_struct_type =
112 codec_id == AV_CODEC_ID_H264 ? VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR :
113 codec_id == AV_CODEC_ID_HEVC ? VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR :
114#if CONFIG_VP9_VULKAN_HWACCEL
115 codec_id == AV_CODEC_ID_VP9 ? VK_STRUCTURE_TYPE_VIDEO_DECODE_VP9_PROFILE_INFO_KHR :
116#endif
117 codec_id == AV_CODEC_ID_AV1 ? VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR :
118 VK_STRUCTURE_TYPE_MAX_ENUM;
119 if (profile_struct_type == VK_STRUCTURE_TYPE_MAX_ENUM)
120 return NULL;
121
122 profile_list = ff_vk_find_struct(ctx->s.hwfc->create_pnext,
123 VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR);
124 if (!profile_list)
125 return NULL;
126
127 for (int i = 0; i < profile_list->profileCount; i++)
128 if (ff_vk_find_struct(profile_list->pProfiles[i].pNext, profile_struct_type))
129 return &profile_list->pProfiles[i];
130
131 return NULL;
132}
133
134int ff_vk_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
135{

Callers 1

ff_vk_decode_initFunction · 0.85

Calls 1

ff_vk_find_structFunction · 0.85

Tested by

no test coverage detected