public class VkSamplerYcbcrConversionCreateInfo
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Setting forceExplicitReconstruction to TRUE may 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.
format must not be FORMAT_UNDEFINEDformat must support FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT or FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BITFORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT, xChromaOffset and yChromaOffset must not be CHROMA_LOCATION_COSITED_EVENFORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT, xChromaOffset and yChromaOffset must not be CHROMA_LOCATION_MIDPOINTformat must represent unsigned normalized values (i.e. the format must be a UNORM format)_422 or _420 suffix, then components.g must be COMPONENT_SWIZZLE_IDENTITY_422 or _420 suffix, then components.a must be COMPONENT_SWIZZLE_IDENTITY, COMPONENT_SWIZZLE_ONE, or COMPONENT_SWIZZLE_ZERO_422 or _420 suffix, then components.r must be COMPONENT_SWIZZLE_IDENTITY or COMPONENT_SWIZZLE_B_422 or _420 suffix, then components.b must be COMPONENT_SWIZZLE_IDENTITY or COMPONENT_SWIZZLE_R_422 or _420 suffix, and if either components.r or components.b is COMPONENT_SWIZZLE_IDENTITY, both values must be COMPONENT_SWIZZLE_IDENTITYycbcrModel is not SAMPLER_YCBCR_MODEL_CONVERSION_RGB_IDENTITY, then components.r, components.g, and components.b must correspond to channels of the format; that is, components.r, components.g, and components.b must not be COMPONENT_SWIZZLE_ZERO or COMPONENT_SWIZZLE_ONE, and must not correspond to a channel which contains zero or one as a consequence of conversion to RGBAycbcrRange is SAMPLER_YCBCR_RANGE_ITU_NARROW then the R, G and B channels obtained by applying the component swizzle to format must each have a bit-depth greater than or equal to 8.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT, forceExplicitReconstruction must be FALSEFORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT, chromaFilter must be FILTER_NEARESTsType must be STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFOpNext must be NULLformat must be a valid VkFormat valueycbcrModel must be a valid VkSamplerYcbcrModelConversion valueycbcrRange must be a valid VkSamplerYcbcrRange valuecomponents must be a valid VkComponentMapping structurexChromaOffset must be a valid VkChromaLocation valueyChromaOffset must be a valid VkChromaLocation valuechromaFilter must be a valid VkFilter valueIf chromaFilter is FILTER_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.
VkComponentMapping, CreateSamplerYcbcrConversion, CreateSamplerYcbcrConversionKHR
sType – the type of this structure.pNext – NULL or 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 on VkComponentSwizzle enums prior to range expansion and color model conversion.xChromaOffset – describes the sample location associated with downsampled chroma channels in the x dimension. xChromaOffset has 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. yChromaOffset has 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.
struct VkSamplerYcbcrConversionCreateInfo {
VkStructureType sType;
void const * pNext;
VkFormat format;
VkSamplerYcbcrModelConversion ycbcrModel;
VkSamplerYcbcrRange ycbcrRange;
VkComponentMapping components;
VkChromaLocation xChromaOffset;
VkChromaLocation yChromaOffset;
VkFilter chromaFilter;
VkBool32 forceExplicitReconstruction;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkSamplerYcbcrConversionCreateInfo.Buffer
An array of
VkSamplerYcbcrConversionCreateInfo structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
CHROMAFILTER
The struct member offsets.
|
static int |
COMPONENTS
The struct member offsets.
|
static int |
FORCEEXPLICITRECONSTRUCTION
The struct member offsets.
|
static int |
FORMAT
The struct member offsets.
|
static int |
PNEXT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STYPE
The struct member offsets.
|
static int |
XCHROMAOFFSET
The struct member offsets.
|
static int |
YCBCRMODEL
The struct member offsets.
|
static int |
YCBCRRANGE
The struct member offsets.
|
static int |
YCHROMAOFFSET
The struct member offsets.
|
| Constructor and Description |
|---|
VkSamplerYcbcrConversionCreateInfo(java.nio.ByteBuffer container)
Creates a
VkSamplerYcbcrConversionCreateInfo instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkSamplerYcbcrConversionCreateInfo |
calloc()
Returns a new
VkSamplerYcbcrConversionCreateInfo instance allocated with memCalloc. |
static VkSamplerYcbcrConversionCreateInfo.Buffer |
calloc(int capacity)
Returns a new
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated with memCalloc. |
static VkSamplerYcbcrConversionCreateInfo |
callocStack()
Returns a new
VkSamplerYcbcrConversionCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkSamplerYcbcrConversionCreateInfo.Buffer |
callocStack(int capacity)
Returns a new
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkSamplerYcbcrConversionCreateInfo.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkSamplerYcbcrConversionCreateInfo |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkSamplerYcbcrConversionCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero. |
int |
chromaFilter()
Returns the value of the
chromaFilter field. |
VkSamplerYcbcrConversionCreateInfo |
chromaFilter(int value)
Sets the specified value to the
chromaFilter field. |
VkComponentMapping |
components()
Returns a
VkComponentMapping view of the components field. |
VkSamplerYcbcrConversionCreateInfo |
components(java.util.function.Consumer<VkComponentMapping> consumer)
Passes the
components field to the specified Consumer. |
VkSamplerYcbcrConversionCreateInfo |
components(VkComponentMapping value)
Copies the specified
VkComponentMapping to the components field. |
static VkSamplerYcbcrConversionCreateInfo |
create()
Returns a new
VkSamplerYcbcrConversionCreateInfo instance allocated with BufferUtils. |
static VkSamplerYcbcrConversionCreateInfo.Buffer |
create(int capacity)
Returns a new
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated with BufferUtils. |
static VkSamplerYcbcrConversionCreateInfo |
create(long address)
Returns a new
VkSamplerYcbcrConversionCreateInfo instance for the specified memory address. |
static VkSamplerYcbcrConversionCreateInfo.Buffer |
create(long address,
int capacity)
Create a
VkSamplerYcbcrConversionCreateInfo.Buffer instance at the specified memory. |
static VkSamplerYcbcrConversionCreateInfo |
createSafe(long address)
|
static VkSamplerYcbcrConversionCreateInfo.Buffer |
createSafe(long address,
int capacity)
|
boolean |
forceExplicitReconstruction()
Returns the value of the
forceExplicitReconstruction field. |
VkSamplerYcbcrConversionCreateInfo |
forceExplicitReconstruction(boolean value)
Sets the specified value to the
forceExplicitReconstruction field. |
int |
format()
Returns the value of the
format field. |
VkSamplerYcbcrConversionCreateInfo |
format(int value)
Sets the specified value to the
format field. |
static VkSamplerYcbcrConversionCreateInfo |
malloc()
Returns a new
VkSamplerYcbcrConversionCreateInfo instance allocated with memAlloc. |
static VkSamplerYcbcrConversionCreateInfo.Buffer |
malloc(int capacity)
Returns a new
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated with memAlloc. |
static VkSamplerYcbcrConversionCreateInfo |
mallocStack()
Returns a new
VkSamplerYcbcrConversionCreateInfo instance allocated on the thread-local MemoryStack. |
static VkSamplerYcbcrConversionCreateInfo.Buffer |
mallocStack(int capacity)
Returns a new
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated on the thread-local MemoryStack. |
static VkSamplerYcbcrConversionCreateInfo.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated on the specified MemoryStack. |
static VkSamplerYcbcrConversionCreateInfo |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkSamplerYcbcrConversionCreateInfo instance allocated on the specified MemoryStack. |
static int |
nchromaFilter(long struct)
Unsafe version of
chromaFilter(). |
static void |
nchromaFilter(long struct,
int value)
Unsafe version of
chromaFilter. |
static VkComponentMapping |
ncomponents(long struct)
Unsafe version of
components(). |
static void |
ncomponents(long struct,
VkComponentMapping value)
Unsafe version of
components. |
static int |
nforceExplicitReconstruction(long struct)
Unsafe version of
forceExplicitReconstruction(). |
static void |
nforceExplicitReconstruction(long struct,
int value)
Unsafe version of
forceExplicitReconstruction. |
static int |
nformat(long struct)
Unsafe version of
format(). |
static void |
nformat(long struct,
int value)
Unsafe version of
format. |
static long |
npNext(long struct)
Unsafe version of
pNext(). |
static void |
npNext(long struct,
long value)
Unsafe version of
pNext. |
static int |
nsType(long struct)
Unsafe version of
sType(). |
static void |
nsType(long struct,
int value)
Unsafe version of
sType. |
static int |
nxChromaOffset(long struct)
Unsafe version of
xChromaOffset(). |
static void |
nxChromaOffset(long struct,
int value)
Unsafe version of
xChromaOffset. |
static int |
nycbcrModel(long struct)
Unsafe version of
ycbcrModel(). |
static void |
nycbcrModel(long struct,
int value)
Unsafe version of
ycbcrModel. |
static int |
nycbcrRange(long struct)
Unsafe version of
ycbcrRange(). |
static void |
nycbcrRange(long struct,
int value)
Unsafe version of
ycbcrRange. |
static int |
nyChromaOffset(long struct)
Unsafe version of
yChromaOffset(). |
static void |
nyChromaOffset(long struct,
int value)
Unsafe version of
yChromaOffset. |
long |
pNext()
Returns the value of the
pNext field. |
VkSamplerYcbcrConversionCreateInfo |
pNext(long value)
Sets the specified value to the
pNext field. |
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.
|
VkSamplerYcbcrConversionCreateInfo |
set(VkSamplerYcbcrConversionCreateInfo src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
sType()
Returns the value of the
sType field. |
VkSamplerYcbcrConversionCreateInfo |
sType(int value)
Sets the specified value to the
sType field. |
int |
xChromaOffset()
Returns the value of the
xChromaOffset field. |
VkSamplerYcbcrConversionCreateInfo |
xChromaOffset(int value)
Sets the specified value to the
xChromaOffset field. |
int |
ycbcrModel()
Returns the value of the
ycbcrModel field. |
VkSamplerYcbcrConversionCreateInfo |
ycbcrModel(int value)
Sets the specified value to the
ycbcrModel field. |
int |
ycbcrRange()
Returns the value of the
ycbcrRange field. |
VkSamplerYcbcrConversionCreateInfo |
ycbcrRange(int value)
Sets the specified value to the
ycbcrRange field. |
int |
yChromaOffset()
Returns the value of the
yChromaOffset field. |
VkSamplerYcbcrConversionCreateInfo |
yChromaOffset(int value)
Sets the specified value to the
yChromaOffset field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int STYPE
public static final int PNEXT
public static final int FORMAT
public static final int YCBCRMODEL
public static final int YCBCRRANGE
public static final int COMPONENTS
public static final int XCHROMAOFFSET
public static final int YCHROMAOFFSET
public static final int CHROMAFILTER
public static final int FORCEEXPLICITRECONSTRUCTION
public VkSamplerYcbcrConversionCreateInfo(java.nio.ByteBuffer container)
VkSamplerYcbcrConversionCreateInfo instance at the current position of the specified ByteBuffer container. 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int sType()
sType field.public long pNext()
pNext field.public int format()
format field.public int ycbcrModel()
ycbcrModel field.public int ycbcrRange()
ycbcrRange field.public VkComponentMapping components()
VkComponentMapping view of the components field.public int xChromaOffset()
xChromaOffset field.public int yChromaOffset()
yChromaOffset field.public int chromaFilter()
chromaFilter field.public boolean forceExplicitReconstruction()
forceExplicitReconstruction field.public VkSamplerYcbcrConversionCreateInfo sType(int value)
sType field.public VkSamplerYcbcrConversionCreateInfo pNext(long value)
pNext field.public VkSamplerYcbcrConversionCreateInfo format(int value)
format field.public VkSamplerYcbcrConversionCreateInfo ycbcrModel(int value)
ycbcrModel field.public VkSamplerYcbcrConversionCreateInfo ycbcrRange(int value)
ycbcrRange field.public VkSamplerYcbcrConversionCreateInfo components(VkComponentMapping value)
VkComponentMapping to the components field.public VkSamplerYcbcrConversionCreateInfo components(java.util.function.Consumer<VkComponentMapping> consumer)
components field to the specified Consumer.public VkSamplerYcbcrConversionCreateInfo xChromaOffset(int value)
xChromaOffset field.public VkSamplerYcbcrConversionCreateInfo yChromaOffset(int value)
yChromaOffset field.public VkSamplerYcbcrConversionCreateInfo chromaFilter(int value)
chromaFilter field.public VkSamplerYcbcrConversionCreateInfo forceExplicitReconstruction(boolean value)
forceExplicitReconstruction field.public VkSamplerYcbcrConversionCreateInfo set(int sType, long pNext, int format, int ycbcrModel, int ycbcrRange, VkComponentMapping components, int xChromaOffset, int yChromaOffset, int chromaFilter, boolean forceExplicitReconstruction)
public VkSamplerYcbcrConversionCreateInfo set(VkSamplerYcbcrConversionCreateInfo src)
src - the source structpublic static VkSamplerYcbcrConversionCreateInfo malloc()
VkSamplerYcbcrConversionCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.public static VkSamplerYcbcrConversionCreateInfo calloc()
VkSamplerYcbcrConversionCreateInfo instance allocated with memCalloc. The instance must be explicitly freed.public static VkSamplerYcbcrConversionCreateInfo create()
VkSamplerYcbcrConversionCreateInfo instance allocated with BufferUtils.public static VkSamplerYcbcrConversionCreateInfo create(long address)
VkSamplerYcbcrConversionCreateInfo instance for the specified memory address.@Nullable public static VkSamplerYcbcrConversionCreateInfo createSafe(long address)
public static VkSamplerYcbcrConversionCreateInfo.Buffer malloc(int capacity)
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkSamplerYcbcrConversionCreateInfo.Buffer calloc(int capacity)
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkSamplerYcbcrConversionCreateInfo.Buffer create(int capacity)
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkSamplerYcbcrConversionCreateInfo.Buffer create(long address, int capacity)
VkSamplerYcbcrConversionCreateInfo.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkSamplerYcbcrConversionCreateInfo.Buffer createSafe(long address, int capacity)
public static VkSamplerYcbcrConversionCreateInfo mallocStack()
VkSamplerYcbcrConversionCreateInfo instance allocated on the thread-local MemoryStack.public static VkSamplerYcbcrConversionCreateInfo callocStack()
VkSamplerYcbcrConversionCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkSamplerYcbcrConversionCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
VkSamplerYcbcrConversionCreateInfo instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkSamplerYcbcrConversionCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
VkSamplerYcbcrConversionCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkSamplerYcbcrConversionCreateInfo.Buffer mallocStack(int capacity)
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkSamplerYcbcrConversionCreateInfo.Buffer callocStack(int capacity)
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkSamplerYcbcrConversionCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkSamplerYcbcrConversionCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkSamplerYcbcrConversionCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nsType(long struct)
sType().public static long npNext(long struct)
pNext().public static int nformat(long struct)
format().public static int nycbcrModel(long struct)
ycbcrModel().public static int nycbcrRange(long struct)
ycbcrRange().public static VkComponentMapping ncomponents(long struct)
components().public static int nxChromaOffset(long struct)
xChromaOffset().public static int nyChromaOffset(long struct)
yChromaOffset().public static int nchromaFilter(long struct)
chromaFilter().public static int nforceExplicitReconstruction(long struct)
forceExplicitReconstruction().public static void nsType(long struct,
int value)
sType.public static void npNext(long struct,
long value)
pNext.public static void nformat(long struct,
int value)
format.public static void nycbcrModel(long struct,
int value)
ycbcrModel.public static void nycbcrRange(long struct,
int value)
ycbcrRange.public static void ncomponents(long struct,
VkComponentMapping value)
components.public static void nxChromaOffset(long struct,
int value)
xChromaOffset.public static void nyChromaOffset(long struct,
int value)
yChromaOffset.public static void nchromaFilter(long struct,
int value)
chromaFilter.public static void nforceExplicitReconstruction(long struct,
int value)
forceExplicitReconstruction.Copyright LWJGL. All Rights Reserved. License terms.