Class VkVideoEncodeCapabilitiesKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkVideoEncodeCapabilitiesKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkVideoEncodeCapabilitiesKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying encode capabilities.Description
The input content and encode resolution (specified in
VkVideoEncodeInfoKHR::codedExtent) may not be aligned with the codec-specific coding block size. For example, the input content may be 1920x1080 and the coding block size may be 16x16 pixel blocks. In this example, the content is horizontally aligned with the coding block size, but not vertically aligned with the coding block size. Encoding of the last row of blocks may be impacted by contents of the input image in pixel rows 1081 to 1088 (the next vertical alignment with the coding block size). In general, to ensure efficient encoding for the last row/column of blocks, and/or to ensure consistent encoding results between repeated encoding of the same input content, these extra pixel rows/columns should be filled to known values up to the coding block size alignment before encoding operations are performed. Some implementations support performing auto-fill of unaligned pixels beyond a specific alignment, which is reported ininputImageDataFillAlignment. For example, if an implementation reports 1x1 ininputImageDataFillAlignment, then the implementation will perform auto-fill for any unaligned pixels beyond the encode resolution up to the next coding block size. For a coding block size of 16x16, if the implementation reports 16x16 ininputImageDataFillAlignment, then it is the application’s responsibility to fill any unaligned pixels, if desired. If not, it may impact the encoding efficiency, but it will not affect the validity of the generated bitstream. If the implementation reports 8x8 ininputImageDataFillAlignment, then for the 1920x1080 example, since the content is aligned to 8 pixels vertically, the implementation will auto-fill pixel rows 1081 to 1088 (up to the 16x16 coding block size in the example). The auto-fill value(s) are implementation-specific. The auto-fill value(s) are not written to the input image memory, but are used as part of the encoding operation on the input image.Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHRrateControlModesmust be a valid combination ofVkVideoEncodeRateControlModeFlagBitsKHRvaluesrateControlModesmust not be 0
See Also
Layout
struct VkVideoEncodeCapabilitiesKHR { VkStructureTypesType(); void const *pNext(); VkVideoEncodeCapabilityFlagsKHRflags(); VkVideoEncodeRateControlModeFlagsKHRrateControlModes(); uint8_trateControlLayerCount(); uint8_tqualityLevelCount();VkExtent2DinputImageDataFillAlignment(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkVideoEncodeCapabilitiesKHR.BufferAn array ofVkVideoEncodeCapabilitiesKHRstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intFLAGS
INPUTIMAGEDATAFILLALIGNMENT
PNEXT
QUALITYLEVELCOUNT
RATECONTROLLAYERCOUNT
RATECONTROLMODESThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkVideoEncodeCapabilitiesKHR(java.nio.ByteBuffer container)Creates aVkVideoEncodeCapabilitiesKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkVideoEncodeCapabilitiesKHRcalloc()Returns a newVkVideoEncodeCapabilitiesKHRinstance allocated withmemCalloc.static VkVideoEncodeCapabilitiesKHR.Buffercalloc(int capacity)Returns a newVkVideoEncodeCapabilitiesKHR.Bufferinstance allocated withmemCalloc.static VkVideoEncodeCapabilitiesKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeCapabilitiesKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkVideoEncodeCapabilitiesKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeCapabilitiesKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkVideoEncodeCapabilitiesKHRcreate()Returns a newVkVideoEncodeCapabilitiesKHRinstance allocated withBufferUtils.static VkVideoEncodeCapabilitiesKHR.Buffercreate(int capacity)Returns a newVkVideoEncodeCapabilitiesKHR.Bufferinstance allocated withBufferUtils.static VkVideoEncodeCapabilitiesKHRcreate(long address)Returns a newVkVideoEncodeCapabilitiesKHRinstance for the specified memory address.static VkVideoEncodeCapabilitiesKHR.Buffercreate(long address, int capacity)Create aVkVideoEncodeCapabilitiesKHR.Bufferinstance at the specified memory.static VkVideoEncodeCapabilitiesKHRcreateSafe(long address)static VkVideoEncodeCapabilitiesKHR.BuffercreateSafe(long address, int capacity)intflags()a bitmask ofVkVideoEncodeCapabilityFlagBitsKHRdescribing supported encoding features.VkVideoEncodeCapabilitiesKHRflags(int value)Sets the specified value to theflags()field.VkExtent2DinputImageDataFillAlignment()reports alignment of data that should be filled in the input image horizontally and vertically in pixels before encode operations are performed on the input image.VkVideoEncodeCapabilitiesKHRinputImageDataFillAlignment(java.util.function.Consumer<VkExtent2D> consumer)Passes theinputImageDataFillAlignment()field to the specifiedConsumer.VkVideoEncodeCapabilitiesKHRinputImageDataFillAlignment(VkExtent2D value)Copies the specifiedVkExtent2Dto theinputImageDataFillAlignment()field.static VkVideoEncodeCapabilitiesKHRmalloc()Returns a newVkVideoEncodeCapabilitiesKHRinstance allocated withmemAlloc.static VkVideoEncodeCapabilitiesKHR.Buffermalloc(int capacity)Returns a newVkVideoEncodeCapabilitiesKHR.Bufferinstance allocated withmemAlloc.static VkVideoEncodeCapabilitiesKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeCapabilitiesKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkVideoEncodeCapabilitiesKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeCapabilitiesKHRinstance allocated on the specifiedMemoryStack.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static VkExtent2DninputImageDataFillAlignment(long struct)Unsafe version ofinputImageDataFillAlignment().static voidninputImageDataFillAlignment(long struct, VkExtent2D value)Unsafe version ofinputImageDataFillAlignment.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static bytenqualityLevelCount(long struct)Unsafe version ofqualityLevelCount().static voidnqualityLevelCount(long struct, byte value)Unsafe version ofqualityLevelCount.static bytenrateControlLayerCount(long struct)Unsafe version ofrateControlLayerCount().static voidnrateControlLayerCount(long struct, byte value)Unsafe version ofrateControlLayerCount.static intnrateControlModes(long struct)Unsafe version ofrateControlModes().static voidnrateControlModes(long struct, int value)Unsafe version ofrateControlModes.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.longpNext()NULLor a pointer to a structure extending this structure.VkVideoEncodeCapabilitiesKHRpNext(long value)Sets the specified value to thepNext()field.VkVideoEncodeCapabilitiesKHRpNext(VkVideoEncodeH264CapabilitiesEXT value)Prepends the specifiedVkVideoEncodeH264CapabilitiesEXTvalue to thepNextchain.VkVideoEncodeCapabilitiesKHRpNext(VkVideoEncodeH265CapabilitiesEXT value)Prepends the specifiedVkVideoEncodeH265CapabilitiesEXTvalue to thepNextchain.bytequalityLevelCount()the number of discrete quality levels supported.VkVideoEncodeCapabilitiesKHRqualityLevelCount(byte value)Sets the specified value to thequalityLevelCount()field.byterateControlLayerCount()reports the maximum number of rate control layers supported.VkVideoEncodeCapabilitiesKHRrateControlLayerCount(byte value)Sets the specified value to therateControlLayerCount()field.intrateControlModes()a bitmask ofVkVideoEncodeRateControlModeFlagBitsKHRdescribing supported rate control modes.VkVideoEncodeCapabilitiesKHRrateControlModes(int value)Sets the specified value to therateControlModes()field.VkVideoEncodeCapabilitiesKHRset(int sType, long pNext, int flags, int rateControlModes, byte rateControlLayerCount, byte qualityLevelCount, VkExtent2D inputImageDataFillAlignment)Initializes this struct with the specified values.VkVideoEncodeCapabilitiesKHRset(VkVideoEncodeCapabilitiesKHR src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkVideoEncodeCapabilitiesKHRsType(int value)Sets the specified value to thesType()field.VkVideoEncodeCapabilitiesKHRsType$Default()Sets theSTRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHRvalue to thesType()field.
-
-
-
Constructor Detail
-
VkVideoEncodeCapabilitiesKHR
public VkVideoEncodeCapabilitiesKHR(java.nio.ByteBuffer container)
Creates aVkVideoEncodeCapabilitiesKHRinstance 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.
-
flags
public int flags()
a bitmask ofVkVideoEncodeCapabilityFlagBitsKHRdescribing supported encoding features.
-
rateControlModes
public int rateControlModes()
a bitmask ofVkVideoEncodeRateControlModeFlagBitsKHRdescribing supported rate control modes. All implementations must supportVIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHR.
-
rateControlLayerCount
public byte rateControlLayerCount()
reports the maximum number of rate control layers supported. Implementations must report at least 1.
-
qualityLevelCount
public byte qualityLevelCount()
the number of discrete quality levels supported. Implementations must report at least 1.
-
inputImageDataFillAlignment
public VkExtent2D inputImageDataFillAlignment()
reports alignment of data that should be filled in the input image horizontally and vertically in pixels before encode operations are performed on the input image.
-
sType
public VkVideoEncodeCapabilitiesKHR sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkVideoEncodeCapabilitiesKHR sType$Default()
Sets theSTRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHRvalue to thesType()field.
-
pNext
public VkVideoEncodeCapabilitiesKHR pNext(long value)
Sets the specified value to thepNext()field.
-
pNext
public VkVideoEncodeCapabilitiesKHR pNext(VkVideoEncodeH264CapabilitiesEXT value)
Prepends the specifiedVkVideoEncodeH264CapabilitiesEXTvalue to thepNextchain.
-
pNext
public VkVideoEncodeCapabilitiesKHR pNext(VkVideoEncodeH265CapabilitiesEXT value)
Prepends the specifiedVkVideoEncodeH265CapabilitiesEXTvalue to thepNextchain.
-
flags
public VkVideoEncodeCapabilitiesKHR flags(int value)
Sets the specified value to theflags()field.
-
rateControlModes
public VkVideoEncodeCapabilitiesKHR rateControlModes(int value)
Sets the specified value to therateControlModes()field.
-
rateControlLayerCount
public VkVideoEncodeCapabilitiesKHR rateControlLayerCount(byte value)
Sets the specified value to therateControlLayerCount()field.
-
qualityLevelCount
public VkVideoEncodeCapabilitiesKHR qualityLevelCount(byte value)
Sets the specified value to thequalityLevelCount()field.
-
inputImageDataFillAlignment
public VkVideoEncodeCapabilitiesKHR inputImageDataFillAlignment(VkExtent2D value)
Copies the specifiedVkExtent2Dto theinputImageDataFillAlignment()field.
-
inputImageDataFillAlignment
public VkVideoEncodeCapabilitiesKHR inputImageDataFillAlignment(java.util.function.Consumer<VkExtent2D> consumer)
Passes theinputImageDataFillAlignment()field to the specifiedConsumer.
-
set
public VkVideoEncodeCapabilitiesKHR set(int sType, long pNext, int flags, int rateControlModes, byte rateControlLayerCount, byte qualityLevelCount, VkExtent2D inputImageDataFillAlignment)
Initializes this struct with the specified values.
-
set
public VkVideoEncodeCapabilitiesKHR set(VkVideoEncodeCapabilitiesKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkVideoEncodeCapabilitiesKHR malloc()
Returns a newVkVideoEncodeCapabilitiesKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkVideoEncodeCapabilitiesKHR calloc()
Returns a newVkVideoEncodeCapabilitiesKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkVideoEncodeCapabilitiesKHR create()
Returns a newVkVideoEncodeCapabilitiesKHRinstance allocated withBufferUtils.
-
create
public static VkVideoEncodeCapabilitiesKHR create(long address)
Returns a newVkVideoEncodeCapabilitiesKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkVideoEncodeCapabilitiesKHR createSafe(long address)
-
malloc
public static VkVideoEncodeCapabilitiesKHR.Buffer malloc(int capacity)
Returns a newVkVideoEncodeCapabilitiesKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkVideoEncodeCapabilitiesKHR.Buffer calloc(int capacity)
Returns a newVkVideoEncodeCapabilitiesKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkVideoEncodeCapabilitiesKHR.Buffer create(int capacity)
Returns a newVkVideoEncodeCapabilitiesKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkVideoEncodeCapabilitiesKHR.Buffer create(long address, int capacity)
Create aVkVideoEncodeCapabilitiesKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkVideoEncodeCapabilitiesKHR.Buffer createSafe(long address, int capacity)
-
malloc
public static VkVideoEncodeCapabilitiesKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeCapabilitiesKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkVideoEncodeCapabilitiesKHR calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeCapabilitiesKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkVideoEncodeCapabilitiesKHR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeCapabilitiesKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkVideoEncodeCapabilitiesKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeCapabilitiesKHR.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().
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
nrateControlModes
public static int nrateControlModes(long struct)
Unsafe version ofrateControlModes().
-
nrateControlLayerCount
public static byte nrateControlLayerCount(long struct)
Unsafe version ofrateControlLayerCount().
-
nqualityLevelCount
public static byte nqualityLevelCount(long struct)
Unsafe version ofqualityLevelCount().
-
ninputImageDataFillAlignment
public static VkExtent2D ninputImageDataFillAlignment(long struct)
Unsafe version ofinputImageDataFillAlignment().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nflags
public static void nflags(long struct, int value)Unsafe version offlags.
-
nrateControlModes
public static void nrateControlModes(long struct, int value)Unsafe version ofrateControlModes.
-
nrateControlLayerCount
public static void nrateControlLayerCount(long struct, byte value)Unsafe version ofrateControlLayerCount.
-
nqualityLevelCount
public static void nqualityLevelCount(long struct, byte value)Unsafe version ofqualityLevelCount.
-
ninputImageDataFillAlignment
public static void ninputImageDataFillAlignment(long struct, VkExtent2D value)Unsafe version ofinputImageDataFillAlignment.
-
-