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);
773 VK_QUEUE_VIDEO_ENCODE_BIT_KHR,
787 ctx->usage_info = (VkVideoEncodeUsageInfoKHR) {
788 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR,
789 .videoUsageHints =
ctx->opts.usage,
790 .videoContentHints =
ctx->opts.content,
791 .tuningMode =
ctx->opts.tune,
795 ctx->profile.sType = VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR;
796 ctx->profile.pNext = &
ctx->usage_info;
800 ctx->profile.chromaBitDepth =
ctx->profile.lumaBitDepth;
807 ctx->profile_list.sType = VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR;
808 ctx->profile_list.profileCount = 1;
809 ctx->profile_list.pProfiles = &
ctx->profile;
812 ctx->enc_caps.sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR;
813 ctx->enc_caps.pNext = codec_caps;
814 ctx->caps.sType = VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR;
815 ctx->caps.pNext = &
ctx->enc_caps;
817 ret = vk->GetPhysicalDeviceVideoCapabilitiesKHR(
s->hwctx->phys_dev,
820 if (
ret == VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR) {
822 "%s profile \"%s\" not supported!\n",
826 }
else if (
ret == VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR) {
828 "format (%s) not supported!\n",
831 }
else if (
ret == VK_ERROR_FEATURE_NOT_PRESENT ||
832 ret == VK_ERROR_FORMAT_NOT_SUPPORTED) {
834 }
else if (
ret != VK_SUCCESS) {
843 query_create = (VkQueryPoolVideoEncodeFeedbackCreateInfoKHR) {
844 .sType = VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR,
845 .pNext = &
ctx->profile,
846 .encodeFeedbackFlags =
ctx->enc_caps.supportedEncodeFeedbackFlags &
847 (~VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR),
850 1, VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, 0,
855 if (
ctx->opts.quality >
ctx->enc_caps.maxQualityLevels) {
858 ctx->opts.quality,
ctx->enc_caps.maxQualityLevels);
863 quality_info = (VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR) {
864 .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR,
865 .pVideoProfile = &
ctx->profile,
866 .qualityLevel =
ctx->opts.quality,
868 ctx->quality_props = (VkVideoEncodeQualityLevelPropertiesKHR) {
869 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR,
870 .pNext = quality_pnext,
872 ret = vk->GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(
s->hwctx->phys_dev,
874 &
ctx->quality_props);
875 if (
ret != VK_SUCCESS)
883 ctx->caps.minCodedExtent.width,
ctx->caps.maxCodedExtent.width);
885 ctx->caps.minCodedExtent.height,
ctx->caps.maxCodedExtent.height);
887 ctx->caps.pictureAccessGranularity.width);
889 ctx->caps.pictureAccessGranularity.height);
891 ctx->caps.minBitstreamBufferOffsetAlignment);
893 ctx->caps.minBitstreamBufferSizeAlignment);
895 ctx->caps.maxDpbSlots);
897 ctx->caps.maxActiveReferencePictures);
898 av_log(avctx,
AV_LOG_VERBOSE,
" Codec header version: %i.%i.%i (driver), %i.%i.%i (compiled)\n",
902 ctx->enc_caps.maxQualityLevels);
904 ctx->enc_caps.encodeInputPictureGranularity.width);
906 ctx->enc_caps.encodeInputPictureGranularity.height);
910 ctx->caps.
flags & VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR ?
912 ctx->caps.
flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR ?
913 " separate_references" :
"");
917 FFALIGN(avctx->
width,
ctx->enc_caps.encodeInputPictureGranularity.width);
930 av_log(avctx,
AV_LOG_ERROR,
"Input of %ix%i too large for encoder limits: %ix%i max\n",
932 ctx->caps.minCodedExtent.width,
ctx->caps.minCodedExtent.height);
936 fmt_info.imageUsage = VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR |
937 VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR;
939 ctx->common.layered_dpb = !(
ctx->caps.
flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR);
942 ret = vk->GetPhysicalDeviceVideoFormatPropertiesKHR(
s->hwctx->phys_dev,
945 if (
ret == VK_ERROR_FORMAT_NOT_SUPPORTED ||
946 (!nb_out_fmts &&
ret == VK_SUCCESS)) {
948 }
else if (
ret != VK_SUCCESS) {
954 ret_info =
av_mallocz(
sizeof(*ret_info)*nb_out_fmts);
958 for (
int i = 0;
i < nb_out_fmts;
i++)
959 ret_info[
i].sType = VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR;
961 ret = vk->GetPhysicalDeviceVideoFormatPropertiesKHR(
s->hwctx->phys_dev,
963 &nb_out_fmts, ret_info);
964 if (
ret == VK_ERROR_FORMAT_NOT_SUPPORTED ||
965 (!nb_out_fmts &&
ret == VK_SUCCESS)) {
968 }
else if (
ret != VK_SUCCESS) {
976 for (
i = 0;
i < nb_out_fmts;
i++)
979 for (
i = 0;
i < nb_out_fmts;
i++) {
981 ctx->pic_format = ret_info[
i].format;
988 if (
i == nb_out_fmts) {
995 session_create.pVideoProfile = &
ctx->profile;
996 session_create.
flags = 0x0;
997 session_create.queueFamilyIndex =
ctx->qf_enc.queue_family;
998 session_create.maxCodedExtent =
ctx->caps.maxCodedExtent;
999 session_create.maxDpbSlots =
ctx->caps.maxDpbSlots;
1000 session_create.maxActiveReferencePictures =
ctx->caps.maxActiveReferencePictures;
1001 session_create.pictureFormat =
ctx->pic_format;
1002 session_create.referencePictureFormat = session_create.pictureFormat;
1003 session_create.pStdHeaderVersion = &vk_desc->
ext_props;
1027 void *codec_params_pnext)
1033 VkVideoEncodeQualityLevelInfoKHR q_info;
1034 VkVideoSessionParametersCreateInfoKHR session_params_create;
1036 q_info = (VkVideoEncodeQualityLevelInfoKHR) {
1037 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR,
1038 .pNext = codec_params_pnext,
1039 .qualityLevel =
ctx->opts.quality,
1041 session_params_create = (VkVideoSessionParametersCreateInfoKHR) {
1042 .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
1044 .videoSession =
ctx->common.session,
1045 .videoSessionParametersTemplate = VK_NULL_HANDLE,
1049 ret = vk->CreateVideoSessionParametersKHR(
s->hwctx->act_dev, &session_params_create,
1050 s->hwctx->alloc, &
ctx->session_params);
1051 if (
ret != VK_SUCCESS) {
1052 av_log(avctx,
AV_LOG_ERROR,
"Unable to create Vulkan video session parameters: %s!\n",