C Specification
The VkSamplerYcbcrConversionCreateInfo
structure is defined as:
// Provided by VK_VERSION_1_1
typedef struct VkSamplerYcbcrConversionCreateInfo {
VkStructureType sType;
const void* pNext;
VkFormat format;
VkSamplerYcbcrModelConversion ycbcrModel;
VkSamplerYcbcrRange ycbcrRange;
VkComponentMapping components;
VkChromaLocation xChromaOffset;
VkChromaLocation yChromaOffset;
VkFilter chromaFilter;
VkBool32 forceExplicitReconstruction;
} VkSamplerYcbcrConversionCreateInfo;
or the equivalent
// Provided by VK_KHR_sampler_ycbcr_conversion
typedef VkSamplerYcbcrConversionCreateInfo VkSamplerYcbcrConversionCreateInfoKHR;
Members
-
sType
is the type of this structure. -
pNext
isNULL
or a pointer to a structure extending this structure. -
format
is 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 components in the x dimension.xChromaOffset
has no effect for formats in which chroma components are not downsampled horizontally. -
yChromaOffset
describes the sample location associated with downsampled chroma components in the y dimension.yChromaOffset
has no effect for formats in which the chroma components are not downsampled vertically. -
chromaFilter
is the filter for chroma reconstruction. -
forceExplicitReconstruction
can be used to ensure that reconstruction is done explicitly, if supported.
Description
Note
Setting If |
If the pNext
chain includes a VkExternalFormatANDROID structure
with non-zero externalFormat
member, the sampler Y′CBCR conversion
object represents an external format conversion, and format
must be
VK_FORMAT_UNDEFINED
.
Such conversions must only be used to sample image views with a matching
external
format.
When creating an external format conversion, the value of components
is ignored.
If chromaFilter
is VK_FILTER_NEAREST
, chroma samples are
reconstructed to luma component 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.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.