VkVideoEncodeRgbRangeCompressionFlagBitsVALVE(3)

# VkVideoEncodeRgbRangeCompressionFlagBitsVALVE(3) Manual Page

## Name

VkVideoEncodeRgbRangeCompressionFlagBitsVALVE - Range compression operation to perform for encode rgb conversion

Loading… please wait.

## 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_VALVE specifies the following transformations are applied:

  Y′C B​C R​​=C r g ba′​[G]=C r g ba′​[B]−(2 n)−1 2(n−1)​=C r g ba′​[R]−(2 n)−1 2(n−1)​​

  Note | These 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_VALVE specifies the following transformations are applied:

  Y′C B​C R​​=219×2 n−8 C r g ba′​[G]×(2 n−1)−16×2 n−8​=224×2 n−8 C r g ba′​[B]×(2 n−1)−128×2 n−8​=224×2 n−8 C r g ba′​[R]×(2 n−1)−128×2 n−8​​

  Note | These 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.

## See Also

VK_VALVE_video_encode_rgb_conversion, VkVideoEncodeRgbRangeCompressionFlagsVALVE, VkVideoEncodeSessionRgbConversionCreateInfoVALVE

## 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.

## Copyright

Copyright 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0