C Specification
To begin a video coding scope, call:
// Provided by VK_KHR_video_queue
void vkCmdBeginVideoCodingKHR(
VkCommandBuffer commandBuffer,
const VkVideoBeginCodingInfoKHR* pBeginInfo);
Parameters
-
commandBuffer
is the command buffer in which to record the command. -
pBeginInfo
is a pointer to a VkVideoBeginCodingInfoKHR structure specifying the parameters of the video coding scope, including the video session and video session parameters object to use.
Description
After beginning a video coding scope, the video session object specified in
pBeginInfo->videoSession
is bound to the command buffer, and the
command buffer is ready to record video coding operations.
Similarly, if pBeginInfo->videoSessionParameters
is not
VK_NULL_HANDLE
, it is also bound to the command buffer, and video
coding operations can refer to the codec-specific parameters stored in it.
This command also establishes the set of bound reference picture resources that can be used as reconstructed pictures or reference pictures within the video coding scope. Each element of this set consists of a video picture resource and the DPB slot index associated with it, if there is one.
The set of bound reference picture resources is immutable within a video coding scope, however, the DPB slot index associated with any of the bound reference picture resources can change during the video coding scope in response to video coding operations.
The VkVideoReferenceSlotInfoKHR structures provided as the elements of
pBeginInfo->pReferenceSlots
are interpreted by this command as
follows:
-
If
slotIndex
is non-negative andpPictureResource
is notNULL
, then the video picture resource defined by the VkVideoPictureResourceInfoKHR structure pointed to bypPictureResource
is added to the set of bound reference picture resources and is associated with the DPB slot index specified inslotIndex
. -
If
slotIndex
is non-negative andpPictureResource
isNULL
, then the DPB slot with indexslotIndex
is deactivated by this command. -
If
slotIndex
is negative andpPictureResource
is notNULL
, then the video picture resource defined by the VkVideoPictureResourceInfoKHR structure pointed to bypPictureResource
is added to the set of bound reference picture resources without an associated DPB slot. Such a picture resource can be subsequently used as a reconstructed picture to associate it with a DPB slot. -
If
slotIndex
is negative andpPictureResource
isNULL
, then the element is ignored.
Note:
It is possible for multiple bound reference picture resources to be associated with the same DPB slot index, or for a single bound reference picture to refer to multiple separate reference pictures. For example, in case of an H.264 decode profile with interlaced frame support a single DPB slot can refer to two separate pictures for the top and bottom fields. Depending on the picture layout used by the H.264 decode profile, the following special cases may arise:
|
All non-negative slotIndex
values specified in the elements of
pBeginInfo->pReferenceSlots
must identify DPB slots of the video
session that are in the active state at the time this
command is executed on the device.
Note:
The application does not have to specify an entry in
|
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.