Edit

GRVkYcbcrConversionInfo Struct

Definition

Describes the parameters for Vulkan YCbCr sampler conversion.

public struct GRVkYcbcrConversionInfo : IEquatable<SkiaSharp.GRVkYcbcrConversionInfo>
Inheritance
GRVkYcbcrConversionInfo
Implements

Examples

Creating a basic YCbCr conversion info for a Vulkan YUV420 image:

var conversionInfo = new GRVkYcbcrConversionInfo
{
    Format = 1000156003, // VK_FORMAT_G8_B8R8_2PLANE_420_UNORM
    ExternalFormat = 0,
    YcbcrModel = 1,      // VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709
    YcbcrRange = 0,      // VK_SAMPLER_YCBCR_RANGE_ITU_FULL
    ChromaFilter = 1,    // VK_FILTER_LINEAR
    XChromaOffset = 0,
    YChromaOffset = 0,
    ForceExplicitReconstruction = 0,
};

Remarks

`GRVkYcbcrConversionInfo` provides the Vulkan-specific parameters required to create a `VkSamplerYcbcrConversion` object. It is used when creating GPU-backed surfaces or images that use a YCbCr color model, such as Android hardware buffers with YUV formats.

The properties map directly to fields in `VkSamplerYcbcrConversionCreateInfo`.

Properties

Name Description
ChromaFilter

Gets or sets the chroma filter used when reconstructing YCbCr chroma values.

Components

Gets or sets the component mapping for this YCbCr conversion.

ExternalFormat

Gets or sets the Vulkan external format for this YCbCr conversion.

ForceExplicitReconstruction

Gets or sets whether explicit chroma reconstruction is required.

Format

Gets or sets the Vulkan image format for this YCbCr conversion.

SamplerFilterMustMatchChromaFilter

Gets or sets whether the sampler filter must match the chroma reconstruction filter.

SupportsLinearFilter

Gets or sets whether linear filtering is supported for this YCbCr conversion.

XChromaOffset

Gets or sets the horizontal chroma sample location offset.

YcbcrModel

Gets or sets the YCbCr color model conversion.

YcbcrRange

Gets or sets the quantization range of the encoded YCbCr values.

YChromaOffset

Gets or sets the vertical chroma sample location offset.

Methods

Name Description
Equals(GRVkYcbcrConversionInfo)

Indicates whether this conversion info is equal to another GRVkYcbcrConversionInfo.

Equals(Object)

Indicates whether this conversion info is equal to the specified object.

GetHashCode()

Returns a hash code for this conversion info.

Operators

Name Description
Equality(GRVkYcbcrConversionInfo, GRVkYcbcrConversionInfo)

Determines whether two GRVkYcbcrConversionInfo values are equal.

Inequality(GRVkYcbcrConversionInfo, GRVkYcbcrConversionInfo)

Determines whether two GRVkYcbcrConversionInfo values are not equal.

Applies to