1// Copyright 2023 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_QCOM_ycbcr_degamma.adoc[] 6 7=== Other Extension Metadata 8 9*Last Modified Date*:: 10 2023-07-31 11*IP Status*:: 12 No known IP claims. 13*Interactions and External Dependencies*:: 14 None 15*Contributors*:: 16 - Jeff Leger, Qualcomm 17 - Jonathan Wicks, Qualcomm 18 19=== Description 20 21This extension allows implementations to expose support for "`sRGB EOTF`" 22also known as "`sRGB degamma`", used in combination with images using 8-bit 23{YCbCr} formats. 24In addition, the degamma can be selectively applied to the Y (luma) or CrCb 25(chroma). 26 27`apiext:VK_KHR_sampler_ycbcr_conversion` adds support for {YCbCr} 28conversion, but allows texture sampling in a non-linear space which can 29cause artifacts. 30This extension allows implementations to expose sRGB degamma for {YCbCr} 31formats, which is performed during texture filtering, allowing texture 32filtering to operate in a linear space. 33 34include::{generated}/interfaces/VK_QCOM_ycbcr_degamma.adoc[] 35 36=== Issues 37 381) Which {YCbCr} formats support the degamma feature? 39 40*RESOLVED*: For implementations that support the extension, each format that 41contains 8-bit R, G, and B components and supports either 42ename:VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT or 43ename:VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT must support degamma. 44 45Since non-compressed Vulkan sRGB formats are already limited to 8-bit 46components, and since Adreno supports degamma for all 8bit {YCbCr} formats, 47this extension does not introduce a new VK_FORMAT_FEATURE* bit for the 48degamma feature. 49 502) On which {YCbCr} components is the degamma applied? 51 52*RESOLVED*: While degamma is expected to be applied to only the Y (luma) 53component, the extension provides the ability to selectively enable degamma 54for both the Y (luma) and/or CbCr (chroma) components. 55 563) Should degamma be enabled for the sampler object or for the image view 57object? 58 59*RESOLVED*: Both. 60This extension extends slink:VkSamplerYcbcrConversionCreateInfo and the 61specification already requires that both sampler and view objects must be 62created with an _identical_ slink:VkSamplerYcbcrConversionCreateInfo in 63their pNext chains. 64 654) Why apply the "`sRGB`" transfer function directly to {YCbCr} data when it 66would be more correct to use the "`ITU transfer function`", and do so only 67after the values have been converted into non-linear R'G'B'? 68 69*RESOLVED*: {YCbCr} is frequently stored according to standards (e.g. BT.601 70and BT.709) that specify that the conversion between linear and non-linear 71should use the ITU Transfer function. 72The ITU transfer function is mathematically different from the sRGB transfer 73function and while sRGB and ITU define similar curves, the difference is 74significant. 75Performing the "`sRGB degamma`" prior to range expansion can introduce 76artifacts if the content uses ename:VK_SAMPLER_YCBCR_RANGE_ITU_NARROW 77encoding. 78Nevertheless, using sRGB can make sense for certain use-cases where camera 79YCbCr images are known to be encoded with sRGB (or a pure gamma 2.2) 80transfer function and are known to use full-range encoding. 81 82For those use-cases, this extension leverages the GPU ability to enable sRGB 83degamma at little cost, and can improve quality because texture filtering is 84able to occur in linear space. 85 86=== Version History 87 88 * Revision 1, 2023-07-31 (Jeff Leger) 89