C Specification
To create a video session parameters object, call:
// Provided by VK_KHR_video_queue
VkResult vkCreateVideoSessionParametersKHR(
VkDevice device,
const VkVideoSessionParametersCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkVideoSessionParametersKHR* pVideoSessionParameters);
Parameters
-
device
is the logical device that creates the video session parameters object. -
pCreateInfo
is a pointer to VkVideoSessionParametersCreateInfoKHR structure containing parameters to be used to create the video session parameters object. -
pAllocator
controls host memory allocation as described in the Memory Allocation chapter. -
pVideoSessionParameters
is a pointer to a VkVideoSessionParametersKHR handle in which the resulting video session parameters object is returned.
Description
The resulting video session parameters object is said to be created with the
video codec operation pCreateInfo->videoSession
was created with.
If pCreateInfo->videoSessionParametersTemplate
is not
VK_NULL_HANDLE
, then it will be used as a template for constructing
the new video session parameters object.
This happens by first adding any parameters according to the additional
creation parameters provided in the pCreateInfo->pNext
chain, followed
by adding any parameters from the template object that have a key that does
not match the key of any of the already added parameters.
If pCreateInfo->videoSession
was created with the video codec
operation VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR
, then the
created video session parameters object will initially contain the following
sets of parameter entries:
-
StdVideoH264SequenceParameterSet
structures representing H.264 SPS entries, as follows:-
If the
pParametersAddInfo
member of the VkVideoDecodeH264SessionParametersCreateInfoKHR structure provided in thepCreateInfo->pNext
chain is notNULL
, then the set ofStdVideoH264SequenceParameterSet
entries specified inpParametersAddInfo->pStdSPSs
are added first; -
If
pCreateInfo->videoSessionParametersTemplate
is notVK_NULL_HANDLE
, then eachStdVideoH264SequenceParameterSet
entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the sameseq_parameter_set_id
.
-
-
StdVideoH264PictureParameterSet
structures representing H.264 PPS entries, as follows:-
If the
pParametersAddInfo
member of the VkVideoDecodeH264SessionParametersCreateInfoKHR structure provided in thepCreateInfo->pNext
chain is notNULL
, then the set ofStdVideoH264PictureParameterSet
entries specified inpParametersAddInfo->pStdPPSs
are added first; -
If
pCreateInfo->videoSessionParametersTemplate
is notVK_NULL_HANDLE
, then eachStdVideoH264PictureParameterSet
entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the sameseq_parameter_set_id
andpic_parameter_set_id
.
-
If pCreateInfo->videoSession
was created with the video codec
operation VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR
, then the
created video session parameters object will initially contain the following
sets of parameter entries:
-
StdVideoH265VideoParameterSet
structures representing H.264 VPS entries, as follows:-
If the
pParametersAddInfo
member of the VkVideoDecodeH265SessionParametersCreateInfoKHR structure provided in thepCreateInfo->pNext
chain is notNULL
, then the set ofStdVideoH265VideoParameterSet
entries specified inpParametersAddInfo->pStdVPSs
are added first; -
If
pCreateInfo->videoSessionParametersTemplate
is notVK_NULL_HANDLE
, then eachStdVideoH265VideoParameterSet
entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the samevps_video_parameter_set_id
.
-
-
StdVideoH265SequenceParameterSet
structures representing H.265 SPS entries, as follows:-
If the
pParametersAddInfo
member of the VkVideoDecodeH265SessionParametersCreateInfoKHR structure provided in thepCreateInfo->pNext
chain is notNULL
, then the set ofStdVideoH265SequenceParameterSet
entries specified inpParametersAddInfo->pStdSPSs
are added first; -
If
pCreateInfo->videoSessionParametersTemplate
is notVK_NULL_HANDLE
, then eachStdVideoH265SequenceParameterSet
entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the samesps_video_parameter_set_id
andsps_seq_parameter_set_id
.
-
-
StdVideoH265PictureParameterSet
structures representing H.265 PPS entries, as follows:-
If the
pParametersAddInfo
member of the VkVideoDecodeH265SessionParametersCreateInfoKHR structure provided in thepCreateInfo->pNext
chain is notNULL
, then the set ofStdVideoH265PictureParameterSet
entries specified inpParametersAddInfo->pStdPPSs
are added first; -
If
pCreateInfo->videoSessionParametersTemplate
is notVK_NULL_HANDLE
, then eachStdVideoH265PictureParameterSet
entry stored in it is copied to the created video session parameters object if the created object does not already contain such an entry with the samesps_video_parameter_set_id
,pps_seq_parameter_set_id
, andpps_pic_parameter_set_id
.
-
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.