libktx Reference 4.3.2
Libraries and tools to create and read KTX image texture files.
Loading...
Searching...
No Matches
khr_df.h File Reference

Data Format enums and macros. More...

Typedefs

typedef enum _khr_df_model_e khr_df_model_e
 Model in which the color coordinate space is defined. There is no requirement that a color format use all the channel types that are defined in the color model.
 
typedef enum _khr_df_primaries_e khr_df_primaries_e
 Definition of the primary colors in color coordinates. This is implicitly responsible for defining the conversion between RGB an YUV color spaces. LAB and related absolute color models should use KHR_DF_PRIMARIES_CIEXYZ.
 
typedef enum _khr_df_transfer_e khr_df_transfer_e
 Definition of the optical to digital transfer function ("gamma correction"). Most transfer functions are not a pure power function and also include a linear element. LAB and related absolute color representations should use KHR_DF_TRANSFER_UNSPECIFIED.
 

Enumerations

enum  _khr_df_model_e {
  KHR_DF_MODEL_UNSPECIFIED = 0U , KHR_DF_MODEL_RGBSDA = 1U , KHR_DF_MODEL_YUVSDA = 2U , KHR_DF_MODEL_YIQSDA = 3U ,
  KHR_DF_MODEL_LABSDA = 4U , KHR_DF_MODEL_CMYKA = 5U , KHR_DF_MODEL_XYZW = 6U , KHR_DF_MODEL_HSVA_ANG = 7U ,
  KHR_DF_MODEL_HSLA_ANG = 8U , KHR_DF_MODEL_HSVA_HEX = 9U , KHR_DF_MODEL_HSLA_HEX = 10U , KHR_DF_MODEL_YCGCOA = 11U ,
  KHR_DF_MODEL_YCCBCCRC = 12U , KHR_DF_MODEL_ICTCP = 13U , KHR_DF_MODEL_CIEXYZ = 14U , KHR_DF_MODEL_CIEXYY = 15U ,
  KHR_DF_MODEL_DXT1A = 128U , KHR_DF_MODEL_BC1A = 128U , KHR_DF_MODEL_DXT2 = 129U , KHR_DF_MODEL_DXT3 = 129U ,
  KHR_DF_MODEL_BC2 = 129U , KHR_DF_MODEL_DXT4 = 130U , KHR_DF_MODEL_DXT5 = 130U , KHR_DF_MODEL_BC3 = 130U ,
  KHR_DF_MODEL_BC4 = 131U , KHR_DF_MODEL_BC5 = 132U , KHR_DF_MODEL_BC6H = 133U , KHR_DF_MODEL_BC7 = 134U ,
  KHR_DF_MODEL_ETC1 = 160U , KHR_DF_MODEL_ETC2 = 161U , KHR_DF_MODEL_ASTC = 162U , KHR_DF_MODEL_ETC1S = 163U ,
  KHR_DF_MODEL_PVRTC = 164U , KHR_DF_MODEL_PVRTC2 = 165U , KHR_DF_MODEL_UASTC = 166U , KHR_DF_MODEL_MAX = 0xFFU
}
 Model in which the color coordinate space is defined. There is no requirement that a color format use all the channel types that are defined in the color model. More...
 
enum  _khr_df_primaries_e {
  KHR_DF_PRIMARIES_UNSPECIFIED = 0U , KHR_DF_PRIMARIES_BT709 = 1U , KHR_DF_PRIMARIES_SRGB = 1U , KHR_DF_PRIMARIES_BT601_EBU = 2U ,
  KHR_DF_PRIMARIES_BT601_SMPTE = 3U , KHR_DF_PRIMARIES_BT2020 = 4U , KHR_DF_PRIMARIES_CIEXYZ = 5U , KHR_DF_PRIMARIES_ACES = 6U ,
  KHR_DF_PRIMARIES_ACESCC = 7U , KHR_DF_PRIMARIES_NTSC1953 = 8U , KHR_DF_PRIMARIES_PAL525 = 9U , KHR_DF_PRIMARIES_DISPLAYP3 = 10U ,
  KHR_DF_PRIMARIES_ADOBERGB = 11U , KHR_DF_PRIMARIES_MAX = 0xFFU
}
 Definition of the primary colors in color coordinates. This is implicitly responsible for defining the conversion between RGB an YUV color spaces. LAB and related absolute color models should use KHR_DF_PRIMARIES_CIEXYZ. More...
 
enum  _khr_df_transfer_e {
  KHR_DF_TRANSFER_UNSPECIFIED = 0U , KHR_DF_TRANSFER_LINEAR = 1U , KHR_DF_TRANSFER_SRGB = 2U , KHR_DF_TRANSFER_ITU = 3U ,
  KHR_DF_TRANSFER_SMTPE170M = 3U , KHR_DF_TRANSFER_NTSC = 4U , KHR_DF_TRANSFER_SLOG = 5U , KHR_DF_TRANSFER_SLOG2 = 6U ,
  KHR_DF_TRANSFER_BT1886 = 7U , KHR_DF_TRANSFER_HLG_OETF = 8U , KHR_DF_TRANSFER_HLG_EOTF = 9U , KHR_DF_TRANSFER_PQ_EOTF = 10U ,
  KHR_DF_TRANSFER_PQ_OETF = 11U , KHR_DF_TRANSFER_DCIP3 = 12U , KHR_DF_TRANSFER_PAL_OETF = 13U , KHR_DF_TRANSFER_PAL625_EOTF = 14U ,
  KHR_DF_TRANSFER_ST240 = 15U , KHR_DF_TRANSFER_ACESCC = 16U , KHR_DF_TRANSFER_ACESCCT = 17U , KHR_DF_TRANSFER_ADOBERGB = 18U ,
  KHR_DF_TRANSFER_MAX = 0xFFU
}
 Definition of the optical to digital transfer function ("gamma correction"). Most transfer functions are not a pure power function and also include a linear element. LAB and related absolute color representations should use KHR_DF_TRANSFER_UNSPECIFIED. More...
 

Detailed Description

Data Format enums and macros.

Enumeration Type Documentation

◆ _khr_df_model_e

Model in which the color coordinate space is defined. There is no requirement that a color format use all the channel types that are defined in the color model.

Enumerator
KHR_DF_MODEL_UNSPECIFIED 

No interpretation of color channels defined

KHR_DF_MODEL_RGBSDA 

Color primaries (red, green, blue) + alpha, depth and stencil

KHR_DF_MODEL_YUVSDA 

Color differences (Y', Cb, Cr) + alpha, depth and stencil

KHR_DF_MODEL_YIQSDA 

Color differences (Y', I, Q) + alpha, depth and stencil

KHR_DF_MODEL_LABSDA 

Perceptual color (CIE L*a*b*) + alpha, depth and stencil

KHR_DF_MODEL_CMYKA 

Subtractive colors (cyan, magenta, yellow, black) + alpha

KHR_DF_MODEL_XYZW 

Non-color coordinate data (X, Y, Z, W)

KHR_DF_MODEL_HSVA_ANG 

Hue, saturation, value, hue angle on color circle, plus alpha

KHR_DF_MODEL_HSLA_ANG 

Hue, saturation, lightness, hue angle on color circle, plus alpha

KHR_DF_MODEL_HSVA_HEX 

Hue, saturation, value, hue on color hexagon, plus alpha

KHR_DF_MODEL_HSLA_HEX 

Hue, saturation, lightness, hue on color hexagon, plus alpha

KHR_DF_MODEL_YCGCOA 

Lightweight approximate color difference (luma, orange, green)

KHR_DF_MODEL_YCCBCCRC 

ITU BT.2020 constant luminance YcCbcCrc

KHR_DF_MODEL_ICTCP 

ITU BT.2100 constant intensity ICtCp

KHR_DF_MODEL_CIEXYZ 

CIE 1931 XYZ color coordinates (X, Y, Z)

KHR_DF_MODEL_CIEXYY 

CIE 1931 xyY color coordinates (X, Y, Y)

KHR_DF_MODEL_DXT1A 

DXT1 "channels" are RGB (0), Alpha (1) DXT1/BC1 with one channel is opaque DXT1/BC1 with a cosited alpha sample is transparent

KHR_DF_MODEL_DXT2 

DXT2/DXT3/BC2, with explicit 4-bit alpha

KHR_DF_MODEL_DXT4 

DXT4/DXT5/BC3, with interpolated alpha

KHR_DF_MODEL_BC4 

BC4 - single channel interpolated 8-bit data (The UNORM/SNORM variation is recorded in the channel data)

KHR_DF_MODEL_BC5 

BC5 - two channel interpolated 8-bit data (The UNORM/SNORM variation is recorded in the channel data)

KHR_DF_MODEL_BC6H 

BC6H - DX11 format for 16-bit float channels

KHR_DF_MODEL_BC7 

BC7 - DX11 format

KHR_DF_MODEL_ETC1 

A format of ETC1 indicates that the format shall be decodable by an ETC1-compliant decoder and not rely on ETC2 features

KHR_DF_MODEL_ETC2 

A format of ETC2 is permitted to use ETC2 encodings on top of the baseline ETC1 specification. The ETC2 format has channels "red", "green", "RGB" and "alpha", which should be cosited samples. Punch-through alpha can be distinguished from full alpha by the plane size in bytes required for the texel block

KHR_DF_MODEL_ASTC 

Adaptive Scalable Texture Compression ASTC HDR vs LDR is determined by the float flag in the channel ASTC block size can be distinguished by texel block size

KHR_DF_MODEL_ETC1S 

ETC1S is a simplified subset of ETC1

KHR_DF_MODEL_PVRTC 

PowerVR Texture Compression v1

KHR_DF_MODEL_PVRTC2 

PowerVR Texture Compression v2

KHR_DF_MODEL_UASTC 

UASTC is a transcodable subset of ASTC with additions to support the transcoding.

◆ _khr_df_primaries_e

Definition of the primary colors in color coordinates. This is implicitly responsible for defining the conversion between RGB an YUV color spaces. LAB and related absolute color models should use KHR_DF_PRIMARIES_CIEXYZ.

Enumerator
KHR_DF_PRIMARIES_UNSPECIFIED 

No color primaries defined

KHR_DF_PRIMARIES_BT709 

Color primaries of ITU-R BT.709 and sRGB

KHR_DF_PRIMARIES_SRGB 

Synonym for KHR_DF_PRIMARIES_BT709

KHR_DF_PRIMARIES_BT601_EBU 

Color primaries of ITU-R BT.601 (625-line EBU variant)

KHR_DF_PRIMARIES_BT601_SMPTE 

Color primaries of ITU-R BT.601 (525-line SMPTE C variant)

KHR_DF_PRIMARIES_BT2020 

Color primaries of ITU-R BT.2020

KHR_DF_PRIMARIES_CIEXYZ 

CIE theoretical color coordinate space

KHR_DF_PRIMARIES_ACES 

Academy Color Encoding System primaries

KHR_DF_PRIMARIES_ACESCC 

Color primaries of ACEScc

KHR_DF_PRIMARIES_NTSC1953 

Legacy NTSC 1953 primaries

KHR_DF_PRIMARIES_PAL525 

Legacy PAL 525-line primaries

KHR_DF_PRIMARIES_DISPLAYP3 

Color primaries of Display P3

KHR_DF_PRIMARIES_ADOBERGB 

Color primaries of Adobe RGB (1998)

◆ _khr_df_transfer_e

Definition of the optical to digital transfer function ("gamma correction"). Most transfer functions are not a pure power function and also include a linear element. LAB and related absolute color representations should use KHR_DF_TRANSFER_UNSPECIFIED.

Enumerator
KHR_DF_TRANSFER_UNSPECIFIED 

No transfer function defined

KHR_DF_TRANSFER_LINEAR 

Linear transfer function (value proportional to intensity)

KHR_DF_TRANSFER_SRGB 

Perceptually-linear transfer function of sRGH (~2.4)

KHR_DF_TRANSFER_ITU 

Perceptually-linear transfer function of ITU BT.601, BT.709 and BT.2020 (~1/.45)

KHR_DF_TRANSFER_SMTPE170M 

SMTPE170M (digital NTSC) defines an alias for the ITU transfer function (~1/.45)

KHR_DF_TRANSFER_NTSC 

Perceptually-linear gamma function of original NTSC (simple 2.2 gamma)

KHR_DF_TRANSFER_SLOG 

Sony S-log used by Sony video cameras

KHR_DF_TRANSFER_SLOG2 

Sony S-log 2 used by Sony video cameras

KHR_DF_TRANSFER_BT1886 

ITU BT.1886 EOTF

KHR_DF_TRANSFER_HLG_OETF 

ITU BT.2100 HLG OETF

KHR_DF_TRANSFER_HLG_EOTF 

ITU BT.2100 HLG EOTF

KHR_DF_TRANSFER_PQ_EOTF 

ITU BT.2100 PQ EOTF

KHR_DF_TRANSFER_PQ_OETF 

ITU BT.2100 PQ OETF

KHR_DF_TRANSFER_DCIP3 

DCI P3 transfer function

KHR_DF_TRANSFER_PAL_OETF 

Legacy PAL OETF

KHR_DF_TRANSFER_PAL625_EOTF 

Legacy PAL 625-line EOTF

KHR_DF_TRANSFER_ST240 

Legacy ST240 transfer function

KHR_DF_TRANSFER_ACESCC 

ACEScc transfer function

KHR_DF_TRANSFER_ACESCCT 

ACEScct transfer function

KHR_DF_TRANSFER_ADOBERGB 

Adobe RGB (1998) transfer function