|
| 1 | +# Copyright (c) 2026, Mark Callow |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +from enum import IntEnum |
| 5 | + |
| 6 | +class KhrDfModel(IntEnum): |
| 7 | + """Model in which the color coordinate space is defined.""" |
| 8 | + |
| 9 | + UNSPECIFIED = 0 |
| 10 | + """No interpretation of color channels defined.""" |
| 11 | + |
| 12 | + RGBSDA = 1 |
| 13 | + """Color primaries (red, green, blue) + alpha, depth and stencil.""" |
| 14 | + |
| 15 | + YUVSDA = 2 |
| 16 | + """Color differences (Y', Cb, Cr) + alpha, depth and stencil.""" |
| 17 | + |
| 18 | + YIQSDA = 3 |
| 19 | + """Color differences (Y', I, Q) + alpha, depth and stencil.""" |
| 20 | + |
| 21 | + LABSDA = 4 |
| 22 | + """Perceptual color (CIE L*a*b*) + alpha, depth and stencil.""" |
| 23 | + |
| 24 | + CMYKA = 5 |
| 25 | + """Subtractive colors (cyan, magenta, yellow, black) + alpha.""" |
| 26 | + |
| 27 | + XYZW = 6 |
| 28 | + """Non-color coordinate data (X, Y, Z, W).""" |
| 29 | + |
| 30 | + HSVA_ANG = 7 |
| 31 | + """Hue, saturation, value, hue angle on color circle, plus alpha.""" |
| 32 | + |
| 33 | + HSLA_ANG = 8 |
| 34 | + """Hue, saturation, lightness, hue angle on color circle, plus alpha.""" |
| 35 | + |
| 36 | + HSVA_HEX = 9 |
| 37 | + """Hue, saturation, value, hue on color hexagon, plus alpha.""" |
| 38 | + |
| 39 | + HSLA_HEX = 10 |
| 40 | + """Hue, saturation, lightness, hue on color hexagon, plus alpha.""" |
| 41 | + |
| 42 | + YCGCOA = 11 |
| 43 | + """Lightweight approximate color difference (luma, orange, green).""" |
| 44 | + |
| 45 | + YCCBCCRC = 12 |
| 46 | + """ITU BT.2020 constant luminance YcCbcCrc.""" |
| 47 | + |
| 48 | + ICTCP = 13 |
| 49 | + """ITU BT.2100 constant intensity ICtCp.""" |
| 50 | + |
| 51 | + CIEXYZ = 14 |
| 52 | + """CIE 1931 XYZ color coordinates (X, Y, Z).""" |
| 53 | + |
| 54 | + CIEXYY = 15 |
| 55 | + """CIE 1931 xyY color coordinates (X, Y, Y).""" |
| 56 | + |
| 57 | + |
| 58 | + DXT1A = 128 |
| 59 | + BC1A = 128 |
| 60 | + """Compressed formats start at 128.""" |
| 61 | + """ |
| 62 | + Direct3D (and S3) compressed formats. |
| 63 | + DXT1 "channels" are RGB (0), Alpha (1). |
| 64 | + DXT1/BC1 with one channel is opaque. |
| 65 | + DXT1/BC1 with a cosited alpha sample is transparent. |
| 66 | + """ |
| 67 | + |
| 68 | + DXT2 = 129 |
| 69 | + DXT3 = 129 |
| 70 | + BC2 = 129 |
| 71 | + """DXT2/DXT3/BC2, with explicit 4-bit alpha.""" |
| 72 | + |
| 73 | + DXT4 = 130 |
| 74 | + DXT5 = 130 |
| 75 | + BC3 = 130 |
| 76 | + """DXT4/DXT5/BC3, with interpolated alpha.""" |
| 77 | + |
| 78 | + ATI1N = 131 |
| 79 | + DXT5A = 131 |
| 80 | + BC4 = 131 |
| 81 | + """ATI1n/DXT5A/BC4 - single channel interpolated 8-bit data. |
| 82 | + (The UNORM/SNORM variation is recorded in the channel data).""" |
| 83 | + |
| 84 | + ATI2N_XY = 132 |
| 85 | + DXN = 132 |
| 86 | + BC5 = 132 |
| 87 | + """ATI2n_XY/DXN/BC5 - two channel interpolated 8-bit data. |
| 88 | + (The UNORM/SNORM variation is recorded in the channel data).""" |
| 89 | + |
| 90 | + BC6H = 133 |
| 91 | + """BC6H - DX11 format for 16-bit float channels.""" |
| 92 | + |
| 93 | + BC7 = 134 |
| 94 | + """BC7 - DX11 format.""" |
| 95 | + |
| 96 | + ETC1 = 160 |
| 97 | + """A format of ETC1 indicates that the format shall be decodable |
| 98 | + by an ETC1-compliant decoder and not rely on ETC2 features.""" |
| 99 | + |
| 100 | + ETC2 = 161 |
| 101 | + """A format of ETC2 is permitted to use ETC2 encodings on top of |
| 102 | + the baseline ETC1 specification. |
| 103 | + The ETC2 format has channels "red", "green", "RGB" and "alpha", |
| 104 | + which should be cosited samples. |
| 105 | + Punch-through alpha can be distinguished from full alpha by |
| 106 | + the plane size in bytes required for the texel block.""" |
| 107 | + |
| 108 | + ASTC = 162 |
| 109 | + """Adaptive Scalable Texture Compression.""" |
| 110 | + """ASTC HDR vs LDR is determined by the float flag in the channel.""" |
| 111 | + """ASTC block size can be distinguished by texel block size.""" |
| 112 | + |
| 113 | + ETC1S = 163 |
| 114 | + """ETC1S is a simplified subset of ETC1.""" |
| 115 | + |
| 116 | + PVRTC = 164 |
| 117 | + PVRTC2 = 165 |
| 118 | + """PowerVR Texture Compression.""" |
| 119 | + |
| 120 | + UASTC = 166 |
| 121 | + UASTC_LDR_4x4 = 166 |
| 122 | + UASTC_HDR_4x4 = 167 |
| 123 | + UASTC_HDR_6x6 = 168 |
| 124 | + """UASTC for BASIS supercompression.""" |
| 125 | + |
| 126 | + MAX = 0xFF |
0 commit comments