Structures

VkVideoDecodeH264PictureInfoKHR

Structure specifies H.264 decode picture parameters when decoding a picture

The VkVideoDecodeH264PictureInfoKHR structure is defined as:

typedef struct VkVideoDecodeH264PictureInfoKHR {
    VkStructureType sType;
    const void* pNext;
    const StdVideoDecodeH264PictureInfo* pStdPictureInfo;
    uint32_t sliceCount;
    const uint32_t* pSliceOffsets;
} VkVideoDecodeH264PictureInfoKHR;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • pStdPictureInfo is a pointer to a StdVideoDecodeH264PictureInfo structure specifying H.264 picture information.
  • sliceCount is the number of elements in pSliceOffsets.
  • pSliceOffsets is a pointer to an array of sliceCount offsets specifying the start offset of the slices of the picture within the video bitstream buffer range specified in VkVideoDecodeInfoKHR.

This structure is specified in the pNext chain of the VkVideoDecodeInfoKHR structure passed to vkCmdDecodeVideoKHR to specify the codec-specific picture information for an H.264 decode operation.

Decode Output Picture Information

When this structure is specified in the pNext chain of the VkVideoDecodeInfoKHR structure passed to vkCmdDecodeVideoKHR, the information related to the decode output picture is defined as follows:

  • If pStdPictureInfo→flags.field_pic_flag is not set, then the picture represents a frame.
  • If pStdPictureInfo→flags.field_pic_flag is set, then the picture represents a field. Specifically:
    • If pStdPictureInfo→flags.bottom_field_flag is not set, then the picture represents the top field of the frame.
    • If pStdPictureInfo→flags.bottom_field_flag is set, then the picture represents the bottom field of the frame.
  • The image subregion used is determined according to the H.264 Decode Picture Data Access section.
  • The decode output picture is associated with the H.264 picture information provided in pStdPictureInfo.
Std Picture Information

The members of the StdVideoDecodeH264PictureInfo structure pointed to by pStdPictureInfo are interpreted as follows:

  • reserved1 and reserved2 are used only for padding purposes and are otherwise ignored;
  • flags.is_intra as defined in section 3.73 of the ITU-T H.264 Specification;
  • flags.is_reference as defined in section 3.136 of the ITU-T H.264 Specification;
  • flags.complementary_field_pair as defined in section 3.35 of the ITU-T H.264 Specification;
  • seq_parameter_set_id and pic_parameter_set_id are used to identify the active parameter sets, as described below;
  • all other members are interpreted as defined in section 7.4.3 of the ITU-T H.264 Specification.

Reference picture setup is controlled by the value of StdVideoDecodeH264PictureInfo::flags.is_reference. If it is set and a reconstructed picture is specified, then the latter is used as the target of picture reconstruction to activate the DPB slot specified in pDecodeInfo→pSetupReferenceSlot→slotIndex. If StdVideoDecodeH264PictureInfo::flags.is_reference is not set, but a reconstructed picture is specified, then the corresponding picture reference associated with the DPB slot is invalidated, as described in the DPB Slot States section.

Active Parameter Sets

The members of the StdVideoDecodeH264PictureInfo structure pointed to by pStdPictureInfo are used to select the active parameter sets to use from the bound video session parameters object, as follows:

  • The active SPS is the SPS identified by the key specified in StdVideoDecodeH264PictureInfo::seq_parameter_set_id.
  • The active PPS is the PPS identified by the key specified by the pair constructed from StdVideoDecodeH264PictureInfo::seq_parameter_set_id and StdVideoDecodeH264PictureInfo::pic_parameter_set_id.

Valid Usage (Implicit)

VUID-VkVideoDecodeH264PictureInfoKHR-sType-sType

sType must be VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR

VUID-VkVideoDecodeH264PictureInfoKHR-pStdPictureInfo-parameter

pStdPictureInfo must be a valid pointer to a valid StdVideoDecodeH264PictureInfo value

VUID-VkVideoDecodeH264PictureInfoKHR-pSliceOffsets-parameter

pSliceOffsets must be a valid pointer to an array of sliceCount uint32_t values