C Specification
The video encode R′G′B′ range compression to be applied to color
component values of the encode input picture before
video coding is defined by the rgbRange member of the
VkVideoEncodeSessionRgbConversionCreateInfoVALVE structure.
The VkVideoEncodeRgbRangeCompressionFlagBitsVALVE enum describes whether color components are encoded using the full range of numerical values or whether values are reserved for headroom and foot room:
// Provided by VK_VALVE_video_encode_rgb_conversion
typedef enum VkVideoEncodeRgbRangeCompressionFlagBitsVALVE {
VK_VIDEO_ENCODE_RGB_RANGE_COMPRESSION_FULL_RANGE_BIT_VALVE = 0x00000001,
VK_VIDEO_ENCODE_RGB_RANGE_COMPRESSION_NARROW_RANGE_BIT_VALVE = 0x00000002,
} VkVideoEncodeRgbRangeCompressionFlagBitsVALVE;
Description
-
VK_VIDEO_ENCODE_RGB_RANGE_COMPRESSION_FULL_RANGE_BIT_VALVEspecifies the following transformations are applied:NoteThese formulae correspond to the “full range” encoding in the “Quantization schemes” chapter of the Khronos Data Format Specification.
Should any future amendments be made to the ITU specifications from which these equations are derived, the formulae used by Vulkan may also be updated to maintain parity.
-
VK_VIDEO_ENCODE_RGB_RANGE_COMPRESSION_NARROW_RANGE_BIT_VALVEspecifies the following transformations are applied:NoteThese formulae correspond to the “narrow range” encoding in the “Quantization schemes” chapter of the Khronos Data Format Specification.
Unlike sampler Y′CBCR range expansion, no precision guarantees are made for video encode R′G′B′ range compression.
-
n is the bit-depth of the components in the bound video session’s
pictureFormat.
|
Note
|
Video encode R′G′B′ range compression transformations have the inverse definition of the sampler Y′CBCR range expansion transformations. |
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.