VkVideoEncodeH264PictureInfoKHR
The VkVideoEncodeH264PictureInfoKHR structure is defined as:
typedef struct VkVideoEncodeH264PictureInfoKHR {
VkStructureType sType;
const void* pNext;
uint32_t naluSliceEntryCount;
const VkVideoEncodeH264NaluSliceInfoKHR* pNaluSliceEntries;
const StdVideoEncodeH264PictureInfo* pStdPictureInfo;
VkBool32 generatePrefixNalu;
} VkVideoEncodeH264PictureInfoKHR;
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.
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 pNext chain 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 StdVideoEncodeH264PictureInfo structure pointed to
by pStdPictureInfo are 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 indicateno 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 StdVideoEncodeH264PictureInfo 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
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.
Valid Usage
VUID-VkVideoEncodeH264PictureInfoKHR-naluSliceEntryCount-08301
naluSliceEntryCount must be between 1 and
VkVideoEncodeH264CapabilitiesKHR::maxSliceCount, inclusive,
as returned by vkGetPhysicalDeviceVideoCapabilitiesKHR for the
used video profile
VUID-VkVideoEncodeH264PictureInfoKHR-flags-08304
If VkVideoEncodeH264CapabilitiesKHR::flags, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video
profile, does not include
VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR, then
generatePrefixNalu must be VK_FALSE
VUID-VkVideoEncodeH264PictureInfoKHR-flags-08314
If VkVideoEncodeH264CapabilitiesKHR::flags, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video
profile, does not include
VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR
and the slice corresponding to any element of pNaluSliceEntries
uses explicit weighted sample prediction,
then
VkVideoEncodeH264NaluSliceInfoKHR::pStdSliceHeader→pWeightTablemust not be NULL for that element of pNaluSliceEntries
VUID-VkVideoEncodeH264PictureInfoKHR-flags-08315
If VkVideoEncodeH264CapabilitiesKHR::flags, as returned by
vkGetPhysicalDeviceVideoCapabilitiesKHR for the used video
profile, does not include
VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR, then
VkVideoEncodeH264NaluSliceInfoKHR::pStdSliceHeader→slice_typemust be identical for all elements of pNaluSliceEntries
Valid Usage (Implicit)
VUID-VkVideoEncodeH264PictureInfoKHR-sType-sType
sType must be VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR
VUID-VkVideoEncodeH264PictureInfoKHR-pNaluSliceEntries-parameter
pNaluSliceEntries must be a valid pointer to an array of naluSliceEntryCount valid VkVideoEncodeH264NaluSliceInfoKHR structures
VUID-VkVideoEncodeH264PictureInfoKHR-pStdPictureInfo-parameter
pStdPictureInfo must be a valid pointer to a valid StdVideoEncodeH264PictureInfo value
VUID-VkVideoEncodeH264PictureInfoKHR-naluSliceEntryCount-arraylength
naluSliceEntryCount must be greater than 0