Class VkVideoEncodeH264PictureInfoKHR
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
This structure is specified in the pNext chain of the VkVideoEncodeInfoKHR structure passed to CmdEncodeVideoKHR to specify the codec-specific picture information for an H.264 encode operation.
- Encode Input Picture Information
- 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
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 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.
- The active SPS is the SPS identified by the key specified in
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
naluSliceEntryCountmust be between 1 andVkVideoEncodeH264CapabilitiesKHR::maxSliceCount, inclusive, as returned byGetPhysicalDeviceVideoCapabilitiesKHRfor the used video profile- If
VkVideoEncodeH264CapabilitiesKHR::flags, as returned byGetPhysicalDeviceVideoCapabilitiesKHRfor the used video profile, does not includeVIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR, thengeneratePrefixNalumust beFALSE - If
VkVideoEncodeH264CapabilitiesKHR::flags, as returned byGetPhysicalDeviceVideoCapabilitiesKHRfor the used video profile, does not includeVIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHRand the slice corresponding to any element ofpNaluSliceEntriesuses explicit weighted sample prediction, thenVkVideoEncodeH264NaluSliceInfoKHR::pStdSliceHeader→pWeightTablemust not beNULLfor that element ofpNaluSliceEntries - If
VkVideoEncodeH264CapabilitiesKHR::flags, as returned byGetPhysicalDeviceVideoCapabilitiesKHRfor the used video profile, does not includeVIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR, thenVkVideoEncodeH264NaluSliceInfoKHR::pStdSliceHeader→slice_typemust be identical for all elements ofpNaluSliceEntries
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHRpNaluSliceEntriesmust be a valid pointer to an array ofnaluSliceEntryCountvalidVkVideoEncodeH264NaluSliceInfoKHRstructurespStdPictureInfomust be a valid pointer to a validStdVideoEncodeH264PictureInfovaluenaluSliceEntryCountmust be greater than 0
See Also
VkVideoEncodeH264NaluSliceInfoKHR
Layout
struct VkVideoEncodeH264PictureInfoKHR {
VkStructureType sType();
void const * pNext();
uint32_t naluSliceEntryCount();
VkVideoEncodeH264NaluSliceInfoKHR const * pNaluSliceEntries();
StdVideoEncodeH264PictureInfo const * pStdPictureInfo();
VkBool32 generatePrefixNalu();
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofVkVideoEncodeH264PictureInfoKHRstructs.Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkVideoEncodeH264PictureInfoKHR(ByteBuffer container) Creates aVkVideoEncodeH264PictureInfoKHRinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioncalloc()Returns a newVkVideoEncodeH264PictureInfoKHRinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkVideoEncodeH264PictureInfoKHR.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkVideoEncodeH264PictureInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newVkVideoEncodeH264PictureInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.create()Returns a newVkVideoEncodeH264PictureInfoKHRinstance allocated withBufferUtils.create(int capacity) Returns a newVkVideoEncodeH264PictureInfoKHR.Bufferinstance allocated withBufferUtils.create(long address) Returns a newVkVideoEncodeH264PictureInfoKHRinstance for the specified memory address.create(long address, int capacity) Create aVkVideoEncodeH264PictureInfoKHR.Bufferinstance at the specified memory.static @Nullable VkVideoEncodeH264PictureInfoKHRcreateSafe(long address) static @Nullable VkVideoEncodeH264PictureInfoKHR.BuffercreateSafe(long address, int capacity) booleancontrols 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.generatePrefixNalu(boolean value) Sets the specified value to thegeneratePrefixNalu()field.malloc()Returns a newVkVideoEncodeH264PictureInfoKHRinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkVideoEncodeH264PictureInfoKHR.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkVideoEncodeH264PictureInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.malloc(org.lwjgl.system.MemoryStack stack) Returns a newVkVideoEncodeH264PictureInfoKHRinstance allocated on the specifiedMemoryStack.intthe number of elements inpNaluSliceEntries.static intngeneratePrefixNalu(long struct) Unsafe version ofgeneratePrefixNalu().static voidngeneratePrefixNalu(long struct, int value) Unsafe version ofgeneratePrefixNalu.static intnnaluSliceEntryCount(long struct) Unsafe version ofnaluSliceEntryCount().static voidnnaluSliceEntryCount(long struct, int value) Sets the specified value to thenaluSliceEntryCountfield of the specifiedstruct.npNaluSliceEntries(long struct) Unsafe version ofpNaluSliceEntries().static voidnpNaluSliceEntries(long struct, VkVideoEncodeH264NaluSliceInfoKHR.Buffer value) Unsafe version ofpNaluSliceEntries.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.npStdPictureInfo(long struct) Unsafe version ofpStdPictureInfo().static voidnpStdPictureInfo(long struct, StdVideoEncodeH264PictureInfo value) Unsafe version ofpStdPictureInfo.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.a pointer to an array ofnaluSliceEntryCountVkVideoEncodeH264NaluSliceInfoKHRstructures specifying the parameters of the individual H.264 slices to encode for the input picture.Sets the address of the specifiedVkVideoEncodeH264NaluSliceInfoKHR.Bufferto thepNaluSliceEntries()field.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.a pointer to aStdVideoEncodeH264PictureInfostructure specifying H.264 picture information.Sets the address of the specifiedStdVideoEncodeH264PictureInfoto thepStdPictureInfo()field.set(int sType, long pNext, VkVideoEncodeH264NaluSliceInfoKHR.Buffer pNaluSliceEntries, StdVideoEncodeH264PictureInfo pStdPictureInfo, boolean generatePrefixNalu) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHRvalue to thesType()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
NALUSLICEENTRYCOUNT
public static final int NALUSLICEENTRYCOUNTThe struct member offsets. -
PNALUSLICEENTRIES
public static final int PNALUSLICEENTRIESThe struct member offsets. -
PSTDPICTUREINFO
public static final int PSTDPICTUREINFOThe struct member offsets. -
GENERATEPREFIXNALU
public static final int GENERATEPREFIXNALUThe struct member offsets.
-
-
Constructor Details
-
VkVideoEncodeH264PictureInfoKHR
Creates aVkVideoEncodeH264PictureInfoKHRinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkVideoEncodeH264PictureInfoKHR>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
naluSliceEntryCount
public int naluSliceEntryCount()the number of elements inpNaluSliceEntries. -
pNaluSliceEntries
a pointer to an array ofnaluSliceEntryCountVkVideoEncodeH264NaluSliceInfoKHRstructures specifying the parameters of the individual H.264 slices to encode for the input picture. -
pStdPictureInfo
a pointer to aStdVideoEncodeH264PictureInfostructure specifying H.264 picture information. -
generatePrefixNalu
public boolean generatePrefixNalu()controls 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. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHRvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNaluSliceEntries
public VkVideoEncodeH264PictureInfoKHR pNaluSliceEntries(VkVideoEncodeH264NaluSliceInfoKHR.Buffer value) Sets the address of the specifiedVkVideoEncodeH264NaluSliceInfoKHR.Bufferto thepNaluSliceEntries()field. -
pStdPictureInfo
Sets the address of the specifiedStdVideoEncodeH264PictureInfoto thepStdPictureInfo()field. -
generatePrefixNalu
Sets the specified value to thegeneratePrefixNalu()field. -
set
public VkVideoEncodeH264PictureInfoKHR set(int sType, long pNext, VkVideoEncodeH264NaluSliceInfoKHR.Buffer pNaluSliceEntries, StdVideoEncodeH264PictureInfo pStdPictureInfo, boolean generatePrefixNalu) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkVideoEncodeH264PictureInfoKHRinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkVideoEncodeH264PictureInfoKHRinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkVideoEncodeH264PictureInfoKHRinstance allocated withBufferUtils. -
create
Returns a newVkVideoEncodeH264PictureInfoKHRinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkVideoEncodeH264PictureInfoKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkVideoEncodeH264PictureInfoKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkVideoEncodeH264PictureInfoKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkVideoEncodeH264PictureInfoKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
public static @Nullable VkVideoEncodeH264PictureInfoKHR.Buffer createSafe(long address, int capacity) -
malloc
Returns a newVkVideoEncodeH264PictureInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkVideoEncodeH264PictureInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkVideoEncodeH264PictureInfoKHR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkVideoEncodeH264PictureInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkVideoEncodeH264PictureInfoKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkVideoEncodeH264PictureInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nnaluSliceEntryCount
public static int nnaluSliceEntryCount(long struct) Unsafe version ofnaluSliceEntryCount(). -
npNaluSliceEntries
Unsafe version ofpNaluSliceEntries(). -
npStdPictureInfo
Unsafe version ofpStdPictureInfo(). -
ngeneratePrefixNalu
public static int ngeneratePrefixNalu(long struct) Unsafe version ofgeneratePrefixNalu(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nnaluSliceEntryCount
public static void nnaluSliceEntryCount(long struct, int value) Sets the specified value to thenaluSliceEntryCountfield of the specifiedstruct. -
npNaluSliceEntries
Unsafe version ofpNaluSliceEntries. -
npStdPictureInfo
Unsafe version ofpStdPictureInfo. -
ngeneratePrefixNalu
public static void ngeneratePrefixNalu(long struct, int value) Unsafe version ofgeneratePrefixNalu. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-