40 if (
ctx->session_params)
41 vk->DestroyVideoSessionParametersKHR(
s->hwctx->act_dev,
65 if (
ctx->codec->picture_priv_data_size > 0) {
74 vkf, vkfc->format[0], 0);
79 if (!
ctx->common.layered_dpb) {
84 rvkf,
ctx->pic_format, 1);
103 vk->DestroyImageView(
ctx->s.hwctx->act_dev, vp->
in.
view,
104 ctx->s.hwctx->alloc);
107 vk->DestroyImageView(
ctx->s.hwctx->act_dev, vp->
dpb.
view,
108 ctx->s.hwctx->alloc);
116 VkVideoEncodeRateControlInfoKHR *rc_info,
117 VkVideoEncodeRateControlLayerInfoKHR *rc_layer )
121 *rc_info = (VkVideoEncodeRateControlInfoKHR) {
122 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR,
123 .rateControlMode =
ctx->opts.rc_mode,
126 if (
ctx->opts.rc_mode > VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR) {
127 *rc_layer = (VkVideoEncodeRateControlLayerInfoKHR) {
128 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR,
134 rc_info->layerCount++;
135 rc_info->pLayers = rc_layer;
138 return ctx->codec->init_pic_rc(avctx, pic, rc_info, rc_layer);
147 const size_t size_align =
ctx->caps.minBitstreamBufferSizeAlignment;
153 int err, max_pkt_size;
159 VkCommandBuffer cmd_buf;
160 VkImageMemoryBarrier2 img_bar[37];
164 VkVideoBeginCodingInfoKHR encode_start;
166 .sType = VK_STRUCTURE_TYPE_VIDEO_END_CODING_INFO_KHR,
169 VkVideoEncodeRateControlLayerInfoKHR rc_layer;
170 VkVideoEncodeRateControlInfoKHR rc_info;
171 VkVideoEncodeQualityLevelInfoKHR q_info;
172 VkVideoCodingControlInfoKHR encode_ctrl;
174 VkVideoReferenceSlotInfoKHR ref_slot[37];
175 VkVideoEncodeInfoKHR encode_info;
178 max_pkt_size =
FFALIGN(3 *
ctx->base.surface_width *
ctx->base.surface_height + (1 << 16),
179 ctx->caps.minBitstreamBufferSizeAlignment);
182 VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR,
183 &
ctx->profile_list, max_pkt_size,
184 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
185 VK_MEMORY_PROPERTY_HOST_CACHED_BIT);
192 err =
init_pic_rc(avctx, base_pic, &rc_info, &rc_layer);
196 q_info = (VkVideoEncodeQualityLevelInfoKHR) {
197 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR,
199 .qualityLevel =
ctx->opts.quality,
201 encode_ctrl = (VkVideoCodingControlInfoKHR) {
202 .sType = VK_STRUCTURE_TYPE_VIDEO_CODING_CONTROL_INFO_KHR,
204 .
flags = VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR |
205 VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR |
206 VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR,
209 for (
int i = 0;
i <
ctx->caps.maxDpbSlots;
i++) {
212 ctx->slots[
i] = base_pic;
219 vp->
dpb_res = (VkVideoPictureResourceInfoKHR) {
220 .sType = VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR,
222 .codedOffset = { 0 },
223 .codedExtent = (VkExtent2D){ avctx->
width, avctx->
height },
224 .baseArrayLayer =
ctx->common.layered_dpb ? slot_index : 0,
225 .imageViewBinding = vp->
dpb.
view,
228 vp->
dpb_slot = (VkVideoReferenceSlotInfoKHR) {
229 .sType = VK_STRUCTURE_TYPE_VIDEO_REFERENCE_SLOT_INFO_KHR,
231 .slotIndex = slot_index,
232 .pPictureResource = &vp->
dpb_res,
235 encode_info = (VkVideoEncodeInfoKHR) {
236 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR,
239 .srcPictureResource = (VkVideoPictureResourceInfoKHR) {
240 .sType = VK_STRUCTURE_TYPE_VIDEO_PICTURE_RESOURCE_INFO_KHR,
242 .codedOffset = { 0, 0 },
246 .imageViewBinding = vp->
in.
view,
248 .pSetupReferenceSlot = &vp->
dpb_slot,
249 .referenceSlotCount = 0,
250 .pReferenceSlots = ref_slot,
251 .dstBuffer = sd_buf->
buf,
252 .dstBufferOffset = 0,
253 .dstBufferRange = sd_buf->
size,
254 .precedingExternallyEncodedBytes = 0,
258 for (
int j = 0; j < base_pic->
nb_refs[
i]; j++) {
261 ref_slot[encode_info.referenceSlotCount++] = rvp->
dpb_slot;
267 ref_slot[encode_info.referenceSlotCount] = vp->
dpb_slot;
268 ref_slot[encode_info.referenceSlotCount].slotIndex = -1;
271 err =
ctx->codec->init_pic_params(avctx, base_pic,
276 encode_start = (VkVideoBeginCodingInfoKHR) {
277 .sType = VK_STRUCTURE_TYPE_VIDEO_BEGIN_CODING_INFO_KHR,
279 .videoSession =
ctx->common.session,
280 .videoSessionParameters =
ctx->session_params,
281 .referenceSlotCount = encode_info.referenceSlotCount + 1,
282 .pReferenceSlots = ref_slot,
287 uint8_t *hdr_dst = sd_buf->
mapped_mem + encode_info.dstBufferOffset;
288 size_t data_size = encode_info.dstBufferRange;
289 err =
ctx->codec->write_sequence_headers(avctx, base_pic, hdr_dst, &data_size);
292 encode_info.dstBufferOffset += data_size;
293 encode_info.dstBufferRange -= data_size;
297 if (
ctx->codec->write_extra_headers) {
298 uint8_t *hdr_dst = sd_buf->
mapped_mem + encode_info.dstBufferOffset;
299 size_t data_size = encode_info.dstBufferRange;
300 err =
ctx->codec->write_extra_headers(avctx, base_pic, hdr_dst, &data_size);
303 encode_info.dstBufferOffset += data_size;
304 encode_info.dstBufferRange -= data_size;
308 if (
ctx->codec->write_filler) {
309 uint8_t *hdr_dst = sd_buf->
mapped_mem + encode_info.dstBufferOffset;
310 size_t data_size = encode_info.dstBufferRange;
312 uint32_t
offset = encode_info.dstBufferOffset;
313 size_t offset_align =
ctx->caps.minBitstreamBufferOffsetAlignment;
318 while (filler_data < ctx->codec->filler_header_size)
319 filler_data += offset_align;
321 filler_data -=
ctx->codec->filler_header_size;
323 err =
ctx->codec->write_filler(avctx, filler_data,
324 hdr_dst, &data_size);
328 encode_info.dstBufferOffset += data_size;
329 encode_info.dstBufferRange -= data_size;
336 encode_info.dstBufferRange -= size_align;
337 encode_info.dstBufferRange =
FFALIGN(encode_info.dstBufferRange,
352 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
353 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR);
358 img_bar[nb_img_bar] = (VkImageMemoryBarrier2) {
359 .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER_2,
361 .srcStageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
362 .srcAccessMask = vkf->access[0],
363 .dstStageMask = VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR,
364 .dstAccessMask = VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR,
365 .oldLayout = vkf->layout[0],
366 .newLayout = VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR,
367 .srcQueueFamilyIndex = vkf->queue_family[0],
368 .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED,
369 .image = vkf->img[0],
370 .subresourceRange = (VkImageSubresourceRange) {
377 &img_bar[nb_img_bar], &nb_img_bar);
379 if (!
ctx->common.layered_dpb) {
384 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
385 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR);
391 for (
int j = 0; j < base_pic->
nb_refs[
i]; j++) {
394 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT,
395 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR);
402 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR,
403 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR);
409 vk->CmdPipelineBarrier2(cmd_buf, &(VkDependencyInfo) {
410 .sType = VK_STRUCTURE_TYPE_DEPENDENCY_INFO,
411 .pImageMemoryBarriers = img_bar,
412 .imageMemoryBarrierCount = nb_img_bar,
416 vk->CmdBeginVideoCodingKHR(cmd_buf, &encode_start);
419 if (!
ctx->session_reset) {
420 vk->CmdControlVideoCodingKHR(cmd_buf, &encode_ctrl);
421 ctx->session_reset++;
425 vk->CmdBeginQuery(cmd_buf,
ctx->enc_pool.query_pool, exec->
query_idx + 0, 0);
426 vk->CmdEncodeVideoKHR(cmd_buf, &encode_info);
427 vk->CmdEndQuery(cmd_buf,
ctx->enc_pool.query_pool, exec->
query_idx + 0);
430 vk->CmdEndVideoCodingKHR(cmd_buf, &
encode_end);
468 uint32_t *query_data;
473 if (
ret == VK_NOT_READY) {
479 if (
ret != VK_NOT_READY &&
ret != VK_SUCCESS) {
485 if (query_data[2] != VK_QUERY_RESULT_STATUS_COMPLETE_KHR) {
491 if (!(sd_buf->
flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) {
493 VkMappedMemoryRange invalidate_buf;
499 if (
ctx->s.props.properties.limits.nonCoherentAtomSize >
500 ctx->caps.minBitstreamBufferOffsetAlignment && offs &&
501 (
FFALIGN(offs,
ctx->s.props.properties.limits.nonCoherentAtomSize) != offs)) {
502 offs -=
ctx->s.props.properties.limits.nonCoherentAtomSize;
503 offs =
FFALIGN(
FFMAX(offs, 0),
ctx->s.props.properties.limits.nonCoherentAtomSize);
506 invalidate_buf = (VkMappedMemoryRange) {
507 .sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE,
508 .memory = sd_buf->
mem,
510 .size = VK_WHOLE_SIZE,
513 vk->FlushMappedMemoryRanges(
ctx->s.hwctx->act_dev, 1, &invalidate_buf);
572 hwfc->
tiling = VK_IMAGE_TILING_OPTIMAL;
573 hwfc->
usage = VK_IMAGE_USAGE_SAMPLED_BIT |
574 VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR;
576 if (
ctx->common.layered_dpb)
586 if (
ctx->common.layered_dpb) {
588 if (!
ctx->common.layered_frame)
592 ctx->common.layered_frame, 0);
597 &
ctx->common.layered_view,
598 &
ctx->common.layered_aspect,
613 ctx->explicit_qp =
ctx->opts.qp;
622 if (
ctx->explicit_qp >= 0) {
623 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR;
629 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR;
631 if (
ctx->enc_caps.rateControlModes & VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR)
632 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR;
633 else if (
ctx->enc_caps.rateControlModes & VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR)
634 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR;
636 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR;
638 ctx->explicit_qp = 18;
639 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR;
643 }
else if (
ctx->opts.rc_mode != VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR &&
649 if (
ctx->opts.rc_mode && !(
ctx->enc_caps.rateControlModes &
ctx->opts.rc_mode)) {
650 static const char *rc_modes[] = {
651 [VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR] =
"default",
652 [VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR] =
"cqp",
653 [VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR] =
"cbr",
654 [VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR] =
"vbr",
659 for (
int i = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR;
660 i <= VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR;
i <<= 1) {
661 if (!(
ctx->enc_caps.rateControlModes &
i))
679 size_t data_len =
sizeof(
data);
681 err =
ctx->codec->write_sequence_headers(avctx,
NULL,
data, &data_len);
684 "for extradata: %d.\n", err);
704 void *codec_caps,
void *quality_pnext)
714 VkVideoFormatPropertiesKHR *ret_info;
715 uint32_t nb_out_fmts = 0;
717 VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR quality_info;
719 VkQueryPoolVideoEncodeFeedbackCreateInfoKHR query_create;
721 VkVideoSessionCreateInfoKHR session_create = {
722 .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR,
724 VkPhysicalDeviceVideoFormatInfoKHR fmt_info = {
725 .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR,
726 .pNext = &
ctx->profile_list,
731 "required to associate the encoding device.\n");
740 s->hwfc =
s->frames->hwctx;
743 s->hwctx =
s->device->hwctx;
750 s->hwctx->nb_enabled_dev_extensions);
754 VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME);
758 VK_KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME);
785 ctx->usage_info = (VkVideoEncodeUsageInfoKHR) {
786 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR,
787 .videoUsageHints =
ctx->opts.usage,
788 .videoContentHints =
ctx->opts.content,
789 .tuningMode =
ctx->opts.tune,
793 ctx->profile.sType = VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR;
794 ctx->profile.pNext = &
ctx->usage_info;
798 ctx->profile.chromaBitDepth =
ctx->profile.lumaBitDepth;
805 ctx->profile_list.sType = VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR;
806 ctx->profile_list.profileCount = 1;
807 ctx->profile_list.pProfiles = &
ctx->profile;
810 ctx->enc_caps.sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR;
811 ctx->enc_caps.pNext = codec_caps;
812 ctx->caps.sType = VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR;
813 ctx->caps.pNext = &
ctx->enc_caps;
815 ret = vk->GetPhysicalDeviceVideoCapabilitiesKHR(
s->hwctx->phys_dev,
818 if (
ret == VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR) {
820 "%s profile \"%s\" not supported!\n",
824 }
else if (
ret == VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR) {
826 "format (%s) not supported!\n",
829 }
else if (
ret == VK_ERROR_FEATURE_NOT_PRESENT ||
830 ret == VK_ERROR_FORMAT_NOT_SUPPORTED) {
832 }
else if (
ret != VK_SUCCESS) {
841 query_create = (VkQueryPoolVideoEncodeFeedbackCreateInfoKHR) {
842 .sType = VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR,
843 .pNext = &
ctx->profile,
844 .encodeFeedbackFlags =
ctx->enc_caps.supportedEncodeFeedbackFlags &
845 (~VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR),
848 1, VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, 0,
853 if (
ctx->opts.quality >
ctx->enc_caps.maxQualityLevels) {
856 ctx->opts.quality,
ctx->enc_caps.maxQualityLevels);
861 quality_info = (VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR) {
862 .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR,
863 .pVideoProfile = &
ctx->profile,
864 .qualityLevel =
ctx->opts.quality,
866 ctx->quality_props = (VkVideoEncodeQualityLevelPropertiesKHR) {
867 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR,
868 .pNext = quality_pnext,
870 ret = vk->GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(
s->hwctx->phys_dev,
872 &
ctx->quality_props);
873 if (
ret != VK_SUCCESS)
881 ctx->caps.minCodedExtent.width,
ctx->caps.maxCodedExtent.width);
883 ctx->caps.minCodedExtent.height,
ctx->caps.maxCodedExtent.height);
885 ctx->caps.pictureAccessGranularity.width);
887 ctx->caps.pictureAccessGranularity.height);
889 ctx->caps.minBitstreamBufferOffsetAlignment);
891 ctx->caps.minBitstreamBufferSizeAlignment);
893 ctx->caps.maxDpbSlots);
895 ctx->caps.maxActiveReferencePictures);
896 av_log(avctx,
AV_LOG_VERBOSE,
" Codec header version: %i.%i.%i (driver), %i.%i.%i (compiled)\n",
900 ctx->enc_caps.maxQualityLevels);
902 ctx->enc_caps.encodeInputPictureGranularity.width);
904 ctx->enc_caps.encodeInputPictureGranularity.height);
908 ctx->caps.
flags & VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR ?
910 ctx->caps.
flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR ?
911 " separate_references" :
"");
915 FFALIGN(avctx->
width,
ctx->enc_caps.encodeInputPictureGranularity.width);
928 av_log(avctx,
AV_LOG_ERROR,
"Input of %ix%i too large for encoder limits: %ix%i max\n",
930 ctx->caps.minCodedExtent.width,
ctx->caps.minCodedExtent.height);
934 fmt_info.imageUsage = VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR |
935 VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR;
937 ctx->common.layered_dpb = !(
ctx->caps.
flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR);
940 ret = vk->GetPhysicalDeviceVideoFormatPropertiesKHR(
s->hwctx->phys_dev,
943 if (
ret == VK_ERROR_FORMAT_NOT_SUPPORTED ||
944 (!nb_out_fmts &&
ret == VK_SUCCESS)) {
946 }
else if (
ret != VK_SUCCESS) {
952 ret_info =
av_mallocz(
sizeof(*ret_info)*nb_out_fmts);
956 for (
int i = 0;
i < nb_out_fmts;
i++)
957 ret_info[
i].sType = VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR;
959 ret = vk->GetPhysicalDeviceVideoFormatPropertiesKHR(
s->hwctx->phys_dev,
961 &nb_out_fmts, ret_info);
962 if (
ret == VK_ERROR_FORMAT_NOT_SUPPORTED ||
963 (!nb_out_fmts &&
ret == VK_SUCCESS)) {
966 }
else if (
ret != VK_SUCCESS) {
974 for (
i = 0;
i < nb_out_fmts;
i++)
977 for (
i = 0;
i < nb_out_fmts;
i++) {
979 ctx->pic_format = ret_info[
i].format;
986 if (
i == nb_out_fmts) {
993 session_create.pVideoProfile = &
ctx->profile;
994 session_create.
flags = 0x0;
995 session_create.queueFamilyIndex =
ctx->qf_enc->idx;
996 session_create.maxCodedExtent =
ctx->caps.maxCodedExtent;
997 session_create.maxDpbSlots =
ctx->caps.maxDpbSlots;
998 session_create.maxActiveReferencePictures =
ctx->caps.maxActiveReferencePictures;
999 session_create.pictureFormat =
ctx->pic_format;
1000 session_create.referencePictureFormat = session_create.pictureFormat;
1001 session_create.pStdHeaderVersion = &vk_desc->
ext_props;
1025 void *codec_params_pnext)
1031 VkVideoEncodeQualityLevelInfoKHR q_info;
1032 VkVideoSessionParametersCreateInfoKHR session_params_create;
1034 q_info = (VkVideoEncodeQualityLevelInfoKHR) {
1035 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR,
1036 .pNext = codec_params_pnext,
1037 .qualityLevel =
ctx->opts.quality,
1039 session_params_create = (VkVideoSessionParametersCreateInfoKHR) {
1040 .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
1042 .videoSession =
ctx->common.session,
1043 .videoSessionParametersTemplate = VK_NULL_HANDLE,
1047 ret = vk->CreateVideoSessionParametersKHR(
s->hwctx->act_dev, &session_params_create,
1048 s->hwctx->alloc, &
ctx->session_params);
1049 if (
ret != VK_SUCCESS) {
1050 av_log(avctx,
AV_LOG_ERROR,
"Unable to create Vulkan video session parameters: %s!\n",