Class VkVideoEncodeH264RateControlInfoEXT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkVideoEncodeH264RateControlInfoEXT
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkVideoEncodeH264RateControlInfoEXT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure describing H.264 stream rate control parameters.Description
In order to provide H.264-specific stream rate control parameters, add a
VkVideoEncodeH264RateControlInfoEXTstructure to thepNextchain of theVkVideoEncodeRateControlInfoKHRstructure in thepNextchain of theVkVideoCodingControlInfoKHRstructure passed to theCmdControlVideoCodingKHRcommand.The parameters from this structure act as a guidance for implementations to apply various rate control heuristics.
It is possible to infer the picture type to be used when encoding a frame, on the basis of the values provided for
consecutiveBFrameCount,idrPeriod, andgopFrameCount, but this inferred picture type will not be used by implementations to override the picture type provided inCmdEncodeVideoKHR. Additionally, it is not required for the video session to be reset if the inferred picture type does not match the actual picture type.Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXTrateControlStructuremust be a validVkVideoEncodeH264RateControlStructureFlagBitsEXTvalue
Layout
struct VkVideoEncodeH264RateControlInfoEXT { VkStructureTypesType(); void const *pNext(); uint32_tgopFrameCount(); uint32_tidrPeriod(); uint32_tconsecutiveBFrameCount(); VkVideoEncodeH264RateControlStructureFlagBitsEXTrateControlStructure(); uint8_ttemporalLayerCount(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkVideoEncodeH264RateControlInfoEXT.BufferAn array ofVkVideoEncodeH264RateControlInfoEXTstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCONSECUTIVEBFRAMECOUNT
GOPFRAMECOUNT
IDRPERIOD
PNEXT
RATECONTROLSTRUCTUREThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPE
TEMPORALLAYERCOUNTThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkVideoEncodeH264RateControlInfoEXT(java.nio.ByteBuffer container)Creates aVkVideoEncodeH264RateControlInfoEXTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkVideoEncodeH264RateControlInfoEXTcalloc()Returns a newVkVideoEncodeH264RateControlInfoEXTinstance allocated withmemCalloc.static VkVideoEncodeH264RateControlInfoEXT.Buffercalloc(int capacity)Returns a newVkVideoEncodeH264RateControlInfoEXT.Bufferinstance allocated withmemCalloc.static VkVideoEncodeH264RateControlInfoEXT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeH264RateControlInfoEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkVideoEncodeH264RateControlInfoEXTcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeH264RateControlInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intconsecutiveBFrameCount()the number of consecutive B-frames between I- and/or P-frames within the GOP.VkVideoEncodeH264RateControlInfoEXTconsecutiveBFrameCount(int value)Sets the specified value to theconsecutiveBFrameCount()field.static VkVideoEncodeH264RateControlInfoEXTcreate()Returns a newVkVideoEncodeH264RateControlInfoEXTinstance allocated withBufferUtils.static VkVideoEncodeH264RateControlInfoEXT.Buffercreate(int capacity)Returns a newVkVideoEncodeH264RateControlInfoEXT.Bufferinstance allocated withBufferUtils.static VkVideoEncodeH264RateControlInfoEXTcreate(long address)Returns a newVkVideoEncodeH264RateControlInfoEXTinstance for the specified memory address.static VkVideoEncodeH264RateControlInfoEXT.Buffercreate(long address, int capacity)Create aVkVideoEncodeH264RateControlInfoEXT.Bufferinstance at the specified memory.static VkVideoEncodeH264RateControlInfoEXTcreateSafe(long address)static VkVideoEncodeH264RateControlInfoEXT.BuffercreateSafe(long address, int capacity)intgopFrameCount()the number of frames contained within the group of pictures (GOP), starting from an intra frame and until the next intra frame.VkVideoEncodeH264RateControlInfoEXTgopFrameCount(int value)Sets the specified value to thegopFrameCount()field.intidrPeriod()the interval, in terms of number of frames, between two IDR frames.VkVideoEncodeH264RateControlInfoEXTidrPeriod(int value)Sets the specified value to theidrPeriod()field.static VkVideoEncodeH264RateControlInfoEXTmalloc()Returns a newVkVideoEncodeH264RateControlInfoEXTinstance allocated withmemAlloc.static VkVideoEncodeH264RateControlInfoEXT.Buffermalloc(int capacity)Returns a newVkVideoEncodeH264RateControlInfoEXT.Bufferinstance allocated withmemAlloc.static VkVideoEncodeH264RateControlInfoEXT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeH264RateControlInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.static VkVideoEncodeH264RateControlInfoEXTmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeH264RateControlInfoEXTinstance allocated on the specifiedMemoryStack.static intnconsecutiveBFrameCount(long struct)Unsafe version ofconsecutiveBFrameCount().static voidnconsecutiveBFrameCount(long struct, int value)Unsafe version ofconsecutiveBFrameCount.static intngopFrameCount(long struct)Unsafe version ofgopFrameCount().static voidngopFrameCount(long struct, int value)Unsafe version ofgopFrameCount.static intnidrPeriod(long struct)Unsafe version ofidrPeriod().static voidnidrPeriod(long struct, int value)Unsafe version ofidrPeriod.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static intnrateControlStructure(long struct)Unsafe version ofrateControlStructure().static voidnrateControlStructure(long struct, int value)Unsafe version ofrateControlStructure.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.static bytentemporalLayerCount(long struct)Unsafe version oftemporalLayerCount().static voidntemporalLayerCount(long struct, byte value)Unsafe version oftemporalLayerCount.longpNext()NULLor a pointer to a structure extending this structure.VkVideoEncodeH264RateControlInfoEXTpNext(long value)Sets the specified value to thepNext()field.intrateControlStructure()aVkVideoEncodeH264RateControlStructureFlagBitsEXTvalue specifying the expected encode stream reference structure, to aid in rate control calculations.VkVideoEncodeH264RateControlInfoEXTrateControlStructure(int value)Sets the specified value to therateControlStructure()field.VkVideoEncodeH264RateControlInfoEXTset(int sType, long pNext, int gopFrameCount, int idrPeriod, int consecutiveBFrameCount, int rateControlStructure, byte temporalLayerCount)Initializes this struct with the specified values.VkVideoEncodeH264RateControlInfoEXTset(VkVideoEncodeH264RateControlInfoEXT src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkVideoEncodeH264RateControlInfoEXTsType(int value)Sets the specified value to thesType()field.VkVideoEncodeH264RateControlInfoEXTsType$Default()Sets theSTRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXTvalue to thesType()field.bytetemporalLayerCount()specifies the number of temporal layers enabled in the stream.VkVideoEncodeH264RateControlInfoEXTtemporalLayerCount(byte value)Sets the specified value to thetemporalLayerCount()field.
-
-
-
Constructor Detail
-
VkVideoEncodeH264RateControlInfoEXT
public VkVideoEncodeH264RateControlInfoEXT(java.nio.ByteBuffer container)
Creates aVkVideoEncodeH264RateControlInfoEXTinstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
gopFrameCount
public int gopFrameCount()
the number of frames contained within the group of pictures (GOP), starting from an intra frame and until the next intra frame. If it is set to 0, the implementation chooses a suitable value. If it is set toUINT32_MAX, the GOP length is treated as infinite.
-
idrPeriod
public int idrPeriod()
the interval, in terms of number of frames, between two IDR frames. If it is set to 0, the implementation chooses a suitable value. If it is set toUINT32_MAX, the IDR period is treated as infinite.
-
consecutiveBFrameCount
public int consecutiveBFrameCount()
the number of consecutive B-frames between I- and/or P-frames within the GOP.
-
rateControlStructure
public int rateControlStructure()
aVkVideoEncodeH264RateControlStructureFlagBitsEXTvalue specifying the expected encode stream reference structure, to aid in rate control calculations.
-
temporalLayerCount
public byte temporalLayerCount()
specifies the number of temporal layers enabled in the stream.
-
sType
public VkVideoEncodeH264RateControlInfoEXT sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkVideoEncodeH264RateControlInfoEXT sType$Default()
Sets theSTRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXTvalue to thesType()field.
-
pNext
public VkVideoEncodeH264RateControlInfoEXT pNext(long value)
Sets the specified value to thepNext()field.
-
gopFrameCount
public VkVideoEncodeH264RateControlInfoEXT gopFrameCount(int value)
Sets the specified value to thegopFrameCount()field.
-
idrPeriod
public VkVideoEncodeH264RateControlInfoEXT idrPeriod(int value)
Sets the specified value to theidrPeriod()field.
-
consecutiveBFrameCount
public VkVideoEncodeH264RateControlInfoEXT consecutiveBFrameCount(int value)
Sets the specified value to theconsecutiveBFrameCount()field.
-
rateControlStructure
public VkVideoEncodeH264RateControlInfoEXT rateControlStructure(int value)
Sets the specified value to therateControlStructure()field.
-
temporalLayerCount
public VkVideoEncodeH264RateControlInfoEXT temporalLayerCount(byte value)
Sets the specified value to thetemporalLayerCount()field.
-
set
public VkVideoEncodeH264RateControlInfoEXT set(int sType, long pNext, int gopFrameCount, int idrPeriod, int consecutiveBFrameCount, int rateControlStructure, byte temporalLayerCount)
Initializes this struct with the specified values.
-
set
public VkVideoEncodeH264RateControlInfoEXT set(VkVideoEncodeH264RateControlInfoEXT src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkVideoEncodeH264RateControlInfoEXT malloc()
Returns a newVkVideoEncodeH264RateControlInfoEXTinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkVideoEncodeH264RateControlInfoEXT calloc()
Returns a newVkVideoEncodeH264RateControlInfoEXTinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkVideoEncodeH264RateControlInfoEXT create()
Returns a newVkVideoEncodeH264RateControlInfoEXTinstance allocated withBufferUtils.
-
create
public static VkVideoEncodeH264RateControlInfoEXT create(long address)
Returns a newVkVideoEncodeH264RateControlInfoEXTinstance for the specified memory address.
-
createSafe
@Nullable public static VkVideoEncodeH264RateControlInfoEXT createSafe(long address)
-
malloc
public static VkVideoEncodeH264RateControlInfoEXT.Buffer malloc(int capacity)
Returns a newVkVideoEncodeH264RateControlInfoEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkVideoEncodeH264RateControlInfoEXT.Buffer calloc(int capacity)
Returns a newVkVideoEncodeH264RateControlInfoEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkVideoEncodeH264RateControlInfoEXT.Buffer create(int capacity)
Returns a newVkVideoEncodeH264RateControlInfoEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkVideoEncodeH264RateControlInfoEXT.Buffer create(long address, int capacity)
Create aVkVideoEncodeH264RateControlInfoEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkVideoEncodeH264RateControlInfoEXT.Buffer createSafe(long address, int capacity)
-
malloc
public static VkVideoEncodeH264RateControlInfoEXT malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeH264RateControlInfoEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkVideoEncodeH264RateControlInfoEXT calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeH264RateControlInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkVideoEncodeH264RateControlInfoEXT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeH264RateControlInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkVideoEncodeH264RateControlInfoEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeH264RateControlInfoEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType().
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext().
-
ngopFrameCount
public static int ngopFrameCount(long struct)
Unsafe version ofgopFrameCount().
-
nidrPeriod
public static int nidrPeriod(long struct)
Unsafe version ofidrPeriod().
-
nconsecutiveBFrameCount
public static int nconsecutiveBFrameCount(long struct)
Unsafe version ofconsecutiveBFrameCount().
-
nrateControlStructure
public static int nrateControlStructure(long struct)
Unsafe version ofrateControlStructure().
-
ntemporalLayerCount
public static byte ntemporalLayerCount(long struct)
Unsafe version oftemporalLayerCount().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
ngopFrameCount
public static void ngopFrameCount(long struct, int value)Unsafe version ofgopFrameCount.
-
nidrPeriod
public static void nidrPeriod(long struct, int value)Unsafe version ofidrPeriod.
-
nconsecutiveBFrameCount
public static void nconsecutiveBFrameCount(long struct, int value)Unsafe version ofconsecutiveBFrameCount.
-
nrateControlStructure
public static void nrateControlStructure(long struct, int value)Unsafe version ofrateControlStructure.
-
ntemporalLayerCount
public static void ntemporalLayerCount(long struct, byte value)Unsafe version oftemporalLayerCount.
-
-