Package org.lwjgl.vulkan
Class VkSamplerYcbcrConversionCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkSamplerYcbcrConversionCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkSamplerYcbcrConversionCreateInfoKHR
public class VkSamplerYcbcrConversionCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying the parameters of the newly created conversion.Description
Note
Setting
forceExplicitReconstructiontoTRUEmay have a performance penalty on implementations where explicit reconstruction is not the default mode of operation.Sampler Y'CBCR conversion objects do not support external format conversion without additional extensions defining external formats.
Valid Usage
formatmust not beFORMAT_UNDEFINEDformatmust supportFORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BITorFORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT- If the format does not support
FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT,xChromaOffsetandyChromaOffsetmust not beCHROMA_LOCATION_COSITED_EVEN - If the format does not support
FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT,xChromaOffsetandyChromaOffsetmust not beCHROMA_LOCATION_MIDPOINT formatmust represent unsigned normalized values (i.e. the format must be aUNORMformat)- If the format has a
_422or_420suffix, thencomponents.gmust beCOMPONENT_SWIZZLE_IDENTITY - If the format has a
_422or_420suffix, thencomponents.amust beCOMPONENT_SWIZZLE_IDENTITY,COMPONENT_SWIZZLE_ONE, orCOMPONENT_SWIZZLE_ZERO - If the format has a
_422or_420suffix, thencomponents.rmust beCOMPONENT_SWIZZLE_IDENTITYorCOMPONENT_SWIZZLE_B - If the format has a
_422or_420suffix, thencomponents.bmust beCOMPONENT_SWIZZLE_IDENTITYorCOMPONENT_SWIZZLE_R - If the format has a
_422or_420suffix, and if eithercomponents.rorcomponents.bisCOMPONENT_SWIZZLE_IDENTITY, both values must beCOMPONENT_SWIZZLE_IDENTITY - If
ycbcrModelis notSAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, thencomponents.r,components.g, andcomponents.bmust correspond to channels of theformat; that is,components.r,components.g, andcomponents.bmust not beCOMPONENT_SWIZZLE_ZEROorCOMPONENT_SWIZZLE_ONE, and must not correspond to a channel which contains zero or one as a consequence of conversion to RGBA - If
ycbcrRangeisSAMPLER_YCBCR_RANGE_ITU_NARROWthen the R, G and B channels obtained by applying thecomponentswizzle toformatmust each have a bit-depth greater than or equal to 8. - If the format does not support
FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT,forceExplicitReconstructionmust be FALSE - If the format does not support
FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT,chromaFiltermust beFILTER_NEAREST
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFOpNextmust beNULLformatmust be a validVkFormatvalueycbcrModelmust be a validVkSamplerYcbcrModelConversionvalueycbcrRangemust be a validVkSamplerYcbcrRangevaluecomponentsmust be a validVkComponentMappingstructurexChromaOffsetmust be a validVkChromaLocationvalueyChromaOffsetmust be a validVkChromaLocationvaluechromaFiltermust be a validVkFiltervalue
If
chromaFilterisFILTER_NEAREST, chroma samples are reconstructed to luma channel resolution using nearest-neighbour sampling. Otherwise, chroma samples are reconstructed using interpolation. More details can be found in the description of sampler Y'CBCR conversion in the Image Operations chapter.See Also
VkComponentMapping,CreateSamplerYcbcrConversion,CreateSamplerYcbcrConversionKHRMember documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.format– the format of the image from which color information will be retrieved.ycbcrModel– describes the color matrix for conversion between color models.ycbcrRange– describes whether the encoded values have headroom and foot room, or whether the encoding uses the full numerical range.components– applies a swizzle based onVkComponentSwizzleenums prior to range expansion and color model conversion.xChromaOffset– describes the sample location associated with downsampled chroma channels in the x dimension.xChromaOffsethas no effect for formats in which chroma channels are the same resolution as the luma channel.yChromaOffset– describes the sample location associated with downsampled chroma channels in the y dimension.yChromaOffsethas no effect for formats in which the chroma channels are not downsampled vertically.chromaFilter– the filter for chroma reconstruction.forceExplicitReconstruction– can be used to ensure that reconstruction is done explicitly, if supported.
Layout
struct VkSamplerYcbcrConversionCreateInfo { VkStructureType sType; void const * pNext; VkFormat format; VkSamplerYcbcrModelConversion ycbcrModel; VkSamplerYcbcrRange ycbcrRange;VkComponentMappingcomponents; VkChromaLocation xChromaOffset; VkChromaLocation yChromaOffset; VkFilter chromaFilter; VkBool32 forceExplicitReconstruction; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkSamplerYcbcrConversionCreateInfo.BufferAn array ofVkSamplerYcbcrConversionCreateInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCHROMAFILTER
COMPONENTS
FORCEEXPLICITRECONSTRUCTION
FORMAT
PNEXTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPE
XCHROMAOFFSET
YCBCRMODEL
YCBCRRANGE
YCHROMAOFFSETThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkSamplerYcbcrConversionCreateInfo(java.nio.ByteBuffer container)Creates aVkSamplerYcbcrConversionCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkSamplerYcbcrConversionCreateInfocalloc()Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated withmemCalloc.static VkSamplerYcbcrConversionCreateInfo.Buffercalloc(int capacity)Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated withmemCalloc.static VkSamplerYcbcrConversionCreateInfocallocStack()Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSamplerYcbcrConversionCreateInfo.BuffercallocStack(int capacity)Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSamplerYcbcrConversionCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSamplerYcbcrConversionCreateInfocallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intchromaFilter()Returns the value of thechromaFilterfield.VkSamplerYcbcrConversionCreateInfochromaFilter(int value)Sets the specified value to thechromaFilterfield.VkComponentMappingcomponents()Returns aVkComponentMappingview of thecomponentsfield.VkSamplerYcbcrConversionCreateInfocomponents(java.util.function.Consumer<VkComponentMapping> consumer)Passes thecomponentsfield to the specifiedConsumer.VkSamplerYcbcrConversionCreateInfocomponents(VkComponentMapping value)Copies the specifiedVkComponentMappingto thecomponentsfield.static VkSamplerYcbcrConversionCreateInfocreate()Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated withBufferUtils.static VkSamplerYcbcrConversionCreateInfo.Buffercreate(int capacity)Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated withBufferUtils.static VkSamplerYcbcrConversionCreateInfocreate(long address)Returns a newVkSamplerYcbcrConversionCreateInfoinstance for the specified memory address.static VkSamplerYcbcrConversionCreateInfo.Buffercreate(long address, int capacity)Create aVkSamplerYcbcrConversionCreateInfo.Bufferinstance at the specified memory.static VkSamplerYcbcrConversionCreateInfocreateSafe(long address)static VkSamplerYcbcrConversionCreateInfo.BuffercreateSafe(long address, int capacity)booleanforceExplicitReconstruction()Returns the value of theforceExplicitReconstructionfield.VkSamplerYcbcrConversionCreateInfoforceExplicitReconstruction(boolean value)Sets the specified value to theforceExplicitReconstructionfield.intformat()Returns the value of theformatfield.VkSamplerYcbcrConversionCreateInfoformat(int value)Sets the specified value to theformatfield.static VkSamplerYcbcrConversionCreateInfomalloc()Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated withmemAlloc.static VkSamplerYcbcrConversionCreateInfo.Buffermalloc(int capacity)Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated withmemAlloc.static VkSamplerYcbcrConversionCreateInfomallocStack()Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated on the thread-localMemoryStack.static VkSamplerYcbcrConversionCreateInfo.BuffermallocStack(int capacity)Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkSamplerYcbcrConversionCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkSamplerYcbcrConversionCreateInfomallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated on the specifiedMemoryStack.static intnchromaFilter(long struct)Unsafe version ofchromaFilter().static voidnchromaFilter(long struct, int value)Unsafe version ofchromaFilter.static VkComponentMappingncomponents(long struct)Unsafe version ofcomponents().static voidncomponents(long struct, VkComponentMapping value)Unsafe version ofcomponents.static intnforceExplicitReconstruction(long struct)Unsafe version offorceExplicitReconstruction().static voidnforceExplicitReconstruction(long struct, int value)Unsafe version offorceExplicitReconstruction.static intnformat(long struct)Unsafe version offormat().static voidnformat(long struct, int value)Unsafe version offormat.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.static intnxChromaOffset(long struct)Unsafe version ofxChromaOffset().static voidnxChromaOffset(long struct, int value)Unsafe version ofxChromaOffset.static intnycbcrModel(long struct)Unsafe version ofycbcrModel().static voidnycbcrModel(long struct, int value)Unsafe version ofycbcrModel.static intnycbcrRange(long struct)Unsafe version ofycbcrRange().static voidnycbcrRange(long struct, int value)Unsafe version ofycbcrRange.static intnyChromaOffset(long struct)Unsafe version ofyChromaOffset().static voidnyChromaOffset(long struct, int value)Unsafe version ofyChromaOffset.longpNext()Returns the value of thepNextfield.VkSamplerYcbcrConversionCreateInfopNext(long value)Sets the specified value to thepNextfield.VkSamplerYcbcrConversionCreateInfoset(int sType, long pNext, int format, int ycbcrModel, int ycbcrRange, VkComponentMapping components, int xChromaOffset, int yChromaOffset, int chromaFilter, boolean forceExplicitReconstruction)Initializes this struct with the specified values.VkSamplerYcbcrConversionCreateInfoset(VkSamplerYcbcrConversionCreateInfo src)Copies the specified struct data to this struct.intsizeof()intsType()Returns the value of thesTypefield.VkSamplerYcbcrConversionCreateInfosType(int value)Sets the specified value to thesTypefield.intxChromaOffset()Returns the value of thexChromaOffsetfield.VkSamplerYcbcrConversionCreateInfoxChromaOffset(int value)Sets the specified value to thexChromaOffsetfield.intycbcrModel()Returns the value of theycbcrModelfield.VkSamplerYcbcrConversionCreateInfoycbcrModel(int value)Sets the specified value to theycbcrModelfield.intycbcrRange()Returns the value of theycbcrRangefield.VkSamplerYcbcrConversionCreateInfoycbcrRange(int value)Sets the specified value to theycbcrRangefield.intyChromaOffset()Returns the value of theyChromaOffsetfield.VkSamplerYcbcrConversionCreateInfoyChromaOffset(int value)Sets the specified value to theyChromaOffsetfield.
-
-
-
Constructor Detail
-
VkSamplerYcbcrConversionCreateInfo
public VkSamplerYcbcrConversionCreateInfo(java.nio.ByteBuffer container)
Creates aVkSamplerYcbcrConversionCreateInfoinstance 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()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
format
public int format()
Returns the value of theformatfield.
-
ycbcrModel
public int ycbcrModel()
Returns the value of theycbcrModelfield.
-
ycbcrRange
public int ycbcrRange()
Returns the value of theycbcrRangefield.
-
components
public VkComponentMapping components()
Returns aVkComponentMappingview of thecomponentsfield.
-
xChromaOffset
public int xChromaOffset()
Returns the value of thexChromaOffsetfield.
-
yChromaOffset
public int yChromaOffset()
Returns the value of theyChromaOffsetfield.
-
chromaFilter
public int chromaFilter()
Returns the value of thechromaFilterfield.
-
forceExplicitReconstruction
public boolean forceExplicitReconstruction()
Returns the value of theforceExplicitReconstructionfield.
-
sType
public VkSamplerYcbcrConversionCreateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkSamplerYcbcrConversionCreateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
format
public VkSamplerYcbcrConversionCreateInfo format(int value)
Sets the specified value to theformatfield.
-
ycbcrModel
public VkSamplerYcbcrConversionCreateInfo ycbcrModel(int value)
Sets the specified value to theycbcrModelfield.
-
ycbcrRange
public VkSamplerYcbcrConversionCreateInfo ycbcrRange(int value)
Sets the specified value to theycbcrRangefield.
-
components
public VkSamplerYcbcrConversionCreateInfo components(VkComponentMapping value)
Copies the specifiedVkComponentMappingto thecomponentsfield.
-
components
public VkSamplerYcbcrConversionCreateInfo components(java.util.function.Consumer<VkComponentMapping> consumer)
Passes thecomponentsfield to the specifiedConsumer.
-
xChromaOffset
public VkSamplerYcbcrConversionCreateInfo xChromaOffset(int value)
Sets the specified value to thexChromaOffsetfield.
-
yChromaOffset
public VkSamplerYcbcrConversionCreateInfo yChromaOffset(int value)
Sets the specified value to theyChromaOffsetfield.
-
chromaFilter
public VkSamplerYcbcrConversionCreateInfo chromaFilter(int value)
Sets the specified value to thechromaFilterfield.
-
forceExplicitReconstruction
public VkSamplerYcbcrConversionCreateInfo forceExplicitReconstruction(boolean value)
Sets the specified value to theforceExplicitReconstructionfield.
-
set
public VkSamplerYcbcrConversionCreateInfo set(int sType, long pNext, int format, int ycbcrModel, int ycbcrRange, VkComponentMapping components, int xChromaOffset, int yChromaOffset, int chromaFilter, boolean forceExplicitReconstruction)
Initializes this struct with the specified values.
-
set
public VkSamplerYcbcrConversionCreateInfo set(VkSamplerYcbcrConversionCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkSamplerYcbcrConversionCreateInfo malloc()
Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSamplerYcbcrConversionCreateInfo calloc()
Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSamplerYcbcrConversionCreateInfo create()
Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated withBufferUtils.
-
create
public static VkSamplerYcbcrConversionCreateInfo create(long address)
Returns a newVkSamplerYcbcrConversionCreateInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkSamplerYcbcrConversionCreateInfo createSafe(long address)
-
malloc
public static VkSamplerYcbcrConversionCreateInfo.Buffer malloc(int capacity)
Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSamplerYcbcrConversionCreateInfo.Buffer calloc(int capacity)
Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSamplerYcbcrConversionCreateInfo.Buffer create(int capacity)
Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSamplerYcbcrConversionCreateInfo.Buffer create(long address, int capacity)
Create aVkSamplerYcbcrConversionCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkSamplerYcbcrConversionCreateInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkSamplerYcbcrConversionCreateInfo mallocStack()
Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkSamplerYcbcrConversionCreateInfo callocStack()
Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkSamplerYcbcrConversionCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkSamplerYcbcrConversionCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSamplerYcbcrConversionCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkSamplerYcbcrConversionCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkSamplerYcbcrConversionCreateInfo.Buffer callocStack(int capacity)
Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkSamplerYcbcrConversionCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSamplerYcbcrConversionCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkSamplerYcbcrConversionCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSamplerYcbcrConversionCreateInfo.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().
-
nformat
public static int nformat(long struct)
Unsafe version offormat().
-
nycbcrModel
public static int nycbcrModel(long struct)
Unsafe version ofycbcrModel().
-
nycbcrRange
public static int nycbcrRange(long struct)
Unsafe version ofycbcrRange().
-
ncomponents
public static VkComponentMapping ncomponents(long struct)
Unsafe version ofcomponents().
-
nxChromaOffset
public static int nxChromaOffset(long struct)
Unsafe version ofxChromaOffset().
-
nyChromaOffset
public static int nyChromaOffset(long struct)
Unsafe version ofyChromaOffset().
-
nchromaFilter
public static int nchromaFilter(long struct)
Unsafe version ofchromaFilter().
-
nforceExplicitReconstruction
public static int nforceExplicitReconstruction(long struct)
Unsafe version offorceExplicitReconstruction().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nformat
public static void nformat(long struct, int value)Unsafe version offormat.
-
nycbcrModel
public static void nycbcrModel(long struct, int value)Unsafe version ofycbcrModel.
-
nycbcrRange
public static void nycbcrRange(long struct, int value)Unsafe version ofycbcrRange.
-
ncomponents
public static void ncomponents(long struct, VkComponentMapping value)Unsafe version ofcomponents.
-
nxChromaOffset
public static void nxChromaOffset(long struct, int value)Unsafe version ofxChromaOffset.
-
nyChromaOffset
public static void nyChromaOffset(long struct, int value)Unsafe version ofyChromaOffset.
-
nchromaFilter
public static void nchromaFilter(long struct, int value)Unsafe version ofchromaFilter.
-
nforceExplicitReconstruction
public static void nforceExplicitReconstruction(long struct, int value)Unsafe version offorceExplicitReconstruction.
-
-