C Specification
The VkVideoEncodeH264PictureInfoKHR structure is defined as:
// Provided by VK_KHR_video_encode_h264
typedef struct VkVideoEncodeH264PictureInfoKHR {
    VkStructureType                             sType;
    const void*                                 pNext;
    uint32_t                                    naluSliceEntryCount;
    const VkVideoEncodeH264NaluSliceInfoKHR*    pNaluSliceEntries;
    const StdVideoEncodeH264PictureInfo*        pStdPictureInfo;
    VkBool32                                    generatePrefixNalu;
} VkVideoEncodeH264PictureInfoKHR;Members
- 
sTypeis a VkStructureType value identifying this structure.
- 
pNextisNULLor a pointer to a structure extending this structure.
- 
naluSliceEntryCountis the number of elements inpNaluSliceEntries.
- 
pNaluSliceEntriesis a pointer to an array ofnaluSliceEntryCountVkVideoEncodeH264NaluSliceInfoKHR structures specifying the parameters of the individual H.264 slices to encode for the input picture.
- 
pStdPictureInfois a pointer to aStdVideoEncodeH264PictureInfostructure specifying H.264 picture information.
- 
generatePrefixNalucontrols whether prefix NALUs are generated before slice NALUs into the target bitstream, as defined in sections 7.3.2.12 and 7.4.2.12 of the ITU-T H.264 Specification.
Description
This structure is specified in the pNext chain of the
VkVideoEncodeInfoKHR structure passed to vkCmdEncodeVideoKHR to
specify the codec-specific picture information for an H.264
encode operation.
- Encode Input Picture Information
- 
When this structure is specified in the pNextchain of the VkVideoEncodeInfoKHR structure passed to vkCmdEncodeVideoKHR, the information related to the encode input picture is defined as follows:- 
The image subregion used is determined according to the H.264 Encode Picture Data Access section. 
- 
The encode input picture is associated with the H.264 picture information provided in pStdPictureInfo.
 
- 
- Std Picture Information
- 
The members of the StdVideoEncodeH264PictureInfostructure pointed to bypStdPictureInfoare interpreted as follows:- 
flags.reservedandreserved1are used only for padding purposes and are otherwise ignored;
- 
flags.IdrPicFlagas defined in section 7.4.1 of the ITU-T H.264 Specification;
- 
flags.is_referenceas defined in section 3.136 of the ITU-T H.264 Specification;
- 
seq_parameter_set_idandpic_parameter_set_idare used to identify the active parameter sets, as described below;
- 
primary_pic_typeas defined in section 7.4.2 of the ITU-T H.264 Specification;
- 
PicOrderCntas defined in section 8.2 of the ITU-T H.264 Specification;
- 
temporal_idas defined in section G.7.4.1.1 of the ITU-T H.264 Specification;
- 
if pRefListsis notNULL, then it is a pointer to aStdVideoEncodeH264ReferenceListsInfostructure that is interpreted as follows:- 
flags.reservedis used only for padding purposes and is otherwise ignored;
- 
ref_pic_list_modification_flag_l0andref_pic_list_modification_flag_l1as defined in section 7.4.3.1 of the ITU-T H.264 Specification;
- 
num_ref_idx_l0_active_minus1andnum_ref_idx_l1_active_minus1as defined in section 7.4.3 of the ITU-T H.264 Specification;
- 
RefPicList0andRefPicList1as defined in section 8.2.4 of the ITU-T H.264 Specification where each element of these arrays either identifies an active reference picture using its DPB slot index or contains the valueSTD_VIDEO_H264_NO_REFERENCE_PICTUREto indicate “no reference picture”;
- 
if refList0ModOpCountis not zero, thenpRefList0ModOperationsis a pointer to an array ofrefList0ModOpCountnumber ofStdVideoEncodeH264RefListModEntrystructures specifying the modification parameters for the reference list L0 as defined in section 7.4.3.1 of the ITU-T H.264 Specification;
- 
if refList1ModOpCountis not zero, thenpRefList1ModOperationsis a pointer to an array ofrefList1ModOpCountnumber ofStdVideoEncodeH264RefListModEntrystructures specifying the modification parameters for the reference list L1 as defined in section 7.4.3.1 of the ITU-T H.264 Specification;
- 
if refPicMarkingOpCountis not zero, thenrefPicMarkingOperationsis a pointer to an array ofrefPicMarkingOpCountnumber ofStdVideoEncodeH264RefPicMarkingEntrystructures specifying the reference picture marking parameters as defined in section 7.4.3.3 of the ITU-T H.264 Specification;
 
- 
- 
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
StdVideoEncodeH264PictureInfo::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 pEncodeInfo->pSetupReferenceSlot->slotIndex.
If StdVideoEncodeH264PictureInfo::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 StdVideoEncodeH264PictureInfostructure pointed to bypStdPictureInfoare 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 StdVideoEncodeH264PictureInfo::seq_parameter_set_id.
- 
The active PPS is the PPS identified by the key specified by the pair constructed from StdVideoEncodeH264PictureInfo::seq_parameter_set_idandStdVideoEncodeH264PictureInfo::pic_parameter_set_id.
 
- 
H.264 encoding uses explicit weighted sample prediction for a slice, as
defined in section 8.4.2.3 of the ITU-T H.264 Specification,
if any of the following conditions are true for the active
PPS and the pStdSliceHeader member of the
corresponding element of pNaluSliceEntries:
- 
pStdSliceHeader->slice_typeisSTD_VIDEO_H264_SLICE_TYPE_Pandweighted_pred_flagis enabled in the active PPS.
- 
pStdSliceHeader->slice_typeisSTD_VIDEO_H264_SLICE_TYPE_Bandweighted_bipred_idcin the active PPS equalsSTD_VIDEO_H264_WEIGHTED_BIPRED_IDC_EXPLICIT.
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.