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);
471 uint32_t *query_data;
476 if (
ret == VK_NOT_READY) {
482 if (
ret != VK_NOT_READY &&
ret != VK_SUCCESS) {
488 if (query_data[2] != VK_QUERY_RESULT_STATUS_COMPLETE_KHR) {
494 if (!(sd_buf->
flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) {
496 VkMappedMemoryRange invalidate_buf;
502 if (
ctx->s.props.properties.limits.nonCoherentAtomSize >
503 ctx->caps.minBitstreamBufferOffsetAlignment && offs &&
504 (
FFALIGN(offs,
ctx->s.props.properties.limits.nonCoherentAtomSize) != offs)) {
505 offs -=
ctx->s.props.properties.limits.nonCoherentAtomSize;
506 offs =
FFALIGN(
FFMAX(offs, 0),
ctx->s.props.properties.limits.nonCoherentAtomSize);
509 invalidate_buf = (VkMappedMemoryRange) {
510 .sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE,
511 .memory = sd_buf->
mem,
513 .size = VK_WHOLE_SIZE,
516 vk->FlushMappedMemoryRanges(
ctx->s.hwctx->act_dev, 1, &invalidate_buf);
521 size_t prev_buf_size = vp->
slices_offset + query_data[0] + query_data[1];
523 ctx->prev_buf_size = prev_buf_size;
538 if (
ctx->prev_buf_ref) {
540 size_t prev_size =
ctx->prev_buf_size;
611 hwfc->
tiling = VK_IMAGE_TILING_OPTIMAL;
612 hwfc->
usage = VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR;
614 if (
ctx->common.layered_dpb)
624 if (
ctx->common.layered_dpb) {
626 if (!
ctx->common.layered_frame)
630 ctx->common.layered_frame, 0);
635 &
ctx->common.layered_view,
636 &
ctx->common.layered_aspect,
651 ctx->explicit_qp =
ctx->opts.qp;
660 if (
ctx->explicit_qp >= 0) {
661 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR;
667 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR;
669 if (
ctx->enc_caps.rateControlModes & VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR)
670 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR;
671 else if (
ctx->enc_caps.rateControlModes & VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR)
672 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR;
674 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR;
676 ctx->explicit_qp = 18;
677 ctx->opts.rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR;
681 }
else if (
ctx->opts.rc_mode != VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR &&
687 if (
ctx->opts.rc_mode && !(
ctx->enc_caps.rateControlModes &
ctx->opts.rc_mode)) {
688 static const char *rc_modes[] = {
689 [VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR] =
"default",
690 [VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR] =
"cqp",
691 [VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR] =
"cbr",
692 [VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR] =
"vbr",
697 for (
int i = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR;
698 i <= VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR;
i <<= 1) {
699 if (!(
ctx->enc_caps.rateControlModes &
i))
717 size_t data_len =
sizeof(
data);
719 err =
ctx->codec->write_sequence_headers(avctx,
NULL,
data, &data_len);
722 "for extradata: %d.\n", err);
742 void *codec_caps,
void *quality_pnext)
752 VkVideoFormatPropertiesKHR *ret_info;
753 uint32_t nb_out_fmts = 0;
755 VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR quality_info;
757 VkQueryPoolVideoEncodeFeedbackCreateInfoKHR query_create;
759 VkVideoSessionCreateInfoKHR session_create = {
760 .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_CREATE_INFO_KHR,
762 VkPhysicalDeviceVideoFormatInfoKHR fmt_info = {
763 .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_FORMAT_INFO_KHR,
764 .pNext = &
ctx->profile_list,
769 "required to associate the encoding device.\n");
778 s->hwfc =
s->frames->hwctx;
781 s->hwctx =
s->device->hwctx;
788 s->hwctx->nb_enabled_dev_extensions);
792 VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME);
796 VK_KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME);
823 ctx->usage_info = (VkVideoEncodeUsageInfoKHR) {
824 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR,
825 .videoUsageHints =
ctx->opts.usage,
826 .videoContentHints =
ctx->opts.content,
827 .tuningMode =
ctx->opts.tune,
831 ctx->profile.sType = VK_STRUCTURE_TYPE_VIDEO_PROFILE_INFO_KHR;
832 ctx->profile.pNext = &
ctx->usage_info;
836 ctx->profile.chromaBitDepth =
ctx->profile.lumaBitDepth;
843 ctx->profile_list.sType = VK_STRUCTURE_TYPE_VIDEO_PROFILE_LIST_INFO_KHR;
844 ctx->profile_list.profileCount = 1;
845 ctx->profile_list.pProfiles = &
ctx->profile;
848 ctx->enc_caps.sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR;
849 ctx->enc_caps.pNext = codec_caps;
850 ctx->caps.sType = VK_STRUCTURE_TYPE_VIDEO_CAPABILITIES_KHR;
851 ctx->caps.pNext = &
ctx->enc_caps;
853 ret = vk->GetPhysicalDeviceVideoCapabilitiesKHR(
s->hwctx->phys_dev,
856 if (
ret == VK_ERROR_VIDEO_PROFILE_OPERATION_NOT_SUPPORTED_KHR) {
858 "%s profile \"%s\" not supported!\n",
862 }
else if (
ret == VK_ERROR_VIDEO_PROFILE_FORMAT_NOT_SUPPORTED_KHR) {
864 "format (%s) not supported!\n",
867 }
else if (
ret == VK_ERROR_FEATURE_NOT_PRESENT ||
868 ret == VK_ERROR_FORMAT_NOT_SUPPORTED) {
870 }
else if (
ret != VK_SUCCESS) {
879 query_create = (VkQueryPoolVideoEncodeFeedbackCreateInfoKHR) {
880 .sType = VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR,
881 .pNext = &
ctx->profile,
882 .encodeFeedbackFlags =
ctx->enc_caps.supportedEncodeFeedbackFlags &
883 (~VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR),
886 1, VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR, 0,
891 if (
ctx->opts.quality >
ctx->enc_caps.maxQualityLevels) {
894 ctx->opts.quality,
ctx->enc_caps.maxQualityLevels);
899 quality_info = (VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR) {
900 .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR,
901 .pVideoProfile = &
ctx->profile,
902 .qualityLevel =
ctx->opts.quality,
904 ctx->quality_props = (VkVideoEncodeQualityLevelPropertiesKHR) {
905 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR,
906 .pNext = quality_pnext,
908 ret = vk->GetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR(
s->hwctx->phys_dev,
910 &
ctx->quality_props);
911 if (
ret != VK_SUCCESS)
919 ctx->caps.minCodedExtent.width,
ctx->caps.maxCodedExtent.width);
921 ctx->caps.minCodedExtent.height,
ctx->caps.maxCodedExtent.height);
923 ctx->caps.pictureAccessGranularity.width);
925 ctx->caps.pictureAccessGranularity.height);
927 ctx->caps.minBitstreamBufferOffsetAlignment);
929 ctx->caps.minBitstreamBufferSizeAlignment);
931 ctx->caps.maxDpbSlots);
933 ctx->caps.maxActiveReferencePictures);
934 av_log(avctx,
AV_LOG_VERBOSE,
" Codec header version: %i.%i.%i (driver), %i.%i.%i (compiled)\n",
938 ctx->enc_caps.maxQualityLevels);
940 ctx->enc_caps.encodeInputPictureGranularity.width);
942 ctx->enc_caps.encodeInputPictureGranularity.height);
946 ctx->caps.
flags & VK_VIDEO_CAPABILITY_PROTECTED_CONTENT_BIT_KHR ?
948 ctx->caps.
flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR ?
949 " separate_references" :
"");
953 FFALIGN(avctx->
width,
ctx->enc_caps.encodeInputPictureGranularity.width);
966 av_log(avctx,
AV_LOG_ERROR,
"Input of %ix%i too large for encoder limits: %ix%i max\n",
968 ctx->caps.minCodedExtent.width,
ctx->caps.minCodedExtent.height);
972 fmt_info.imageUsage = VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR;
974 ctx->common.layered_dpb = !(
ctx->caps.
flags & VK_VIDEO_CAPABILITY_SEPARATE_REFERENCE_IMAGES_BIT_KHR);
977 ret = vk->GetPhysicalDeviceVideoFormatPropertiesKHR(
s->hwctx->phys_dev,
980 if (
ret == VK_ERROR_FORMAT_NOT_SUPPORTED ||
981 (!nb_out_fmts &&
ret == VK_SUCCESS)) {
983 }
else if (
ret != VK_SUCCESS) {
989 ret_info =
av_mallocz(
sizeof(*ret_info)*nb_out_fmts);
993 for (
int i = 0;
i < nb_out_fmts;
i++)
994 ret_info[
i].sType = VK_STRUCTURE_TYPE_VIDEO_FORMAT_PROPERTIES_KHR;
996 ret = vk->GetPhysicalDeviceVideoFormatPropertiesKHR(
s->hwctx->phys_dev,
998 &nb_out_fmts, ret_info);
999 if (
ret == VK_ERROR_FORMAT_NOT_SUPPORTED ||
1000 (!nb_out_fmts &&
ret == VK_SUCCESS)) {
1003 }
else if (
ret != VK_SUCCESS) {
1011 for (
i = 0;
i < nb_out_fmts;
i++)
1014 for (
i = 0;
i < nb_out_fmts;
i++) {
1016 ctx->pic_format = ret_info[
i].format;
1023 if (
i == nb_out_fmts) {
1030 session_create.pVideoProfile = &
ctx->profile;
1031 session_create.
flags = 0x0;
1032 session_create.queueFamilyIndex =
ctx->qf_enc->idx;
1033 session_create.maxCodedExtent =
ctx->caps.maxCodedExtent;
1034 session_create.maxDpbSlots =
ctx->caps.maxDpbSlots;
1035 session_create.maxActiveReferencePictures =
ctx->caps.maxActiveReferencePictures;
1036 session_create.pictureFormat =
ctx->pic_format;
1037 session_create.referencePictureFormat = session_create.pictureFormat;
1038 session_create.pStdHeaderVersion = &vk_desc->
ext_props;
1062 void *codec_params_pnext)
1068 VkVideoEncodeQualityLevelInfoKHR q_info;
1069 VkVideoSessionParametersCreateInfoKHR session_params_create;
1071 q_info = (VkVideoEncodeQualityLevelInfoKHR) {
1072 .sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR,
1073 .pNext = codec_params_pnext,
1074 .qualityLevel =
ctx->opts.quality,
1076 session_params_create = (VkVideoSessionParametersCreateInfoKHR) {
1077 .sType = VK_STRUCTURE_TYPE_VIDEO_SESSION_PARAMETERS_CREATE_INFO_KHR,
1079 .videoSession =
ctx->common.session,
1080 .videoSessionParametersTemplate = VK_NULL_HANDLE,
1084 ret = vk->CreateVideoSessionParametersKHR(
s->hwctx->act_dev, &session_params_create,
1085 s->hwctx->alloc, &
ctx->session_params);
1086 if (
ret != VK_SUCCESS) {
1087 av_log(avctx,
AV_LOG_ERROR,
"Unable to create Vulkan video session parameters: %s!\n",