Enum ndk::data_space::DataSpaceStandard
source · #[non_exhaustive]#[repr(u32)]pub enum DataSpaceStandard {
Unspecified = 0,
Bt709 = 65_536,
Bt601_625 = 131_072,
Bt601_625Unadjusted = 196_608,
Bt601_525 = 262_144,
Bt601_525Unadjusted = 327_680,
Bt2020 = 393_216,
Bt2020ConstantLuminance = 458_752,
Bt470M = 524_288,
Film = 589_824,
DciP3 = 655_360,
AdobeRgb = 720_896,
}
api-level-28
only.Expand description
Color-description aspects.
The following aspects define various characteristics of the color specification. These represent
bitfields, so that a data space value can specify each of them independently. Standard aspect
defines the chromaticity coordinates of the source primaries in terms of the CIE 1931 definition
of x
and y
specified in ISO 11664-1.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unspecified = 0
Chromacity coordinates are unknown or are determined by the application. Implementations shall use the following suggested standards:
All YCbCr
formats: BT.709
if size is 720p
or larger (since most video content is
letterboxed this corresponds to width is 1280
or greater, or height
is 720 or greater). BT.601_625
if size is smaller than 720p
or
is JPEG
.
All RGB
formats: BT.709
.
For all other formats the standard is undefined, and implementations should use an appropriate standard for the data represented.
Bt709 = 65_536
Primaries | x | y |
---|---|---|
green | 0.300 | 0.600 |
blue | 0.150 | 0.060 |
red | 0.640 | 0.330 |
white (D65) | 0.3127 | 0.3290 |
Use the unadjusted KR = 0.2126
, KB = 0.0722
luminance interpretation for RGB
conversion.
Bt601_625 = 131_072
Primaries | x | y |
---|---|---|
green | 0.290 | 0.600 |
blue | 0.150 | 0.060 |
red | 0.640 | 0.330 |
white (D65) | 0.3127 | 0.3290 |
KR = 0.299
, KB = 0.114
. This adjusts the luminance interpretation for RGB
conversion
from the one purely determined by the primaries to minimize the color shift into RGB
space that uses BT.709
primaries.
Bt601_625Unadjusted = 196_608
Primaries | x | y |
---|---|---|
green | 0.290 | 0.600 |
blue | 0.150 | 0.060 |
red | 0.640 | 0.330 |
white (D65) | 0.3127 | 0.3290 |
Use the unadjusted KR = 0.222
, KB = 0.071
luminance interpretation for RGB
conversion.
Bt601_525 = 262_144
Primaries | x | y |
---|---|---|
green | 0.310 | 0.595 |
blue | 0.155 | 0.070 |
red | 0.630 | 0.340 |
white (D65) | 0.3127 | 0.3290 |
KR = 0.299
, KB = 0.114
. This adjusts the luminance interpretation for RGB
conversion
from the one purely determined by the primaries to minimize the color shift into RGB
space
that uses BT.709
primaries.
Bt601_525Unadjusted = 327_680
Primaries | x | y |
---|---|---|
green | 0.310 | 0.595 |
blue | 0.155 | 0.070 |
red | 0.630 | 0.340 |
white (D65) | 0.3127 | 0.3290 |
Use the unadjusted KR = 0.212
, KB = 0.087
luminance interpretation
for RGB
conversion (as in SMPTE 240M
).
Bt2020 = 393_216
Primaries | x | y |
---|---|---|
green | 0.170 | 0.797 |
blue | 0.131 | 0.046 |
red | 0.708 | 0.292 |
white (D65) | 0.3127 | 0.3290 |
Use the unadjusted KR = 0.2627
, KB = 0.0593
luminance interpretation for RGB
conversion.
Bt2020ConstantLuminance = 458_752
Primaries | x | y |
---|---|---|
green | 0.170 | 0.797 |
blue | 0.131 | 0.046 |
red | 0.708 | 0.292 |
white (D65) | 0.3127 | 0.3290 |
Use the unadjusted KR = 0.2627
, KB = 0.0593
luminance interpretation for RGB
conversion using the linear domain.
Bt470M = 524_288
Primaries | x | y |
---|---|---|
green | 0.21 | 0.71 |
blue | 0.14 | 0.08 |
red | 0.67 | 0.33 |
white (C) | 0.310 | 0.316 |
Use the unadjusted KR = 0.30
, KB = 0.11
luminance interpretation for RGB
conversion.
Film = 589_824
Primaries | x | y |
---|---|---|
green | 0.243 | 0.692 |
blue | 0.145 | 0.049 |
red | 0.681 | 0.319 |
white (C) | 0.310 | 0.316 |
Use the unadjusted KR = 0.254
, KB = 0.068
luminance interpretation for RGB
conversion.
DciP3 = 655_360
SMPTE EG 432-1
and SMPTE RP 431-2
. (DCI-P3
)
Primaries | x | y |
---|---|---|
green | 0.265 | 0.690 |
blue | 0.150 | 0.060 |
red | 0.680 | 0.320 |
white (D65) | 0.3127 | 0.3290 |
AdobeRgb = 720_896
Adobe RGB
Primaries | x | y |
---|---|---|
green | 0.210 | 0.710 |
blue | 0.150 | 0.060 |
red | 0.640 | 0.330 |
white (D65) | 0.3127 | 0.3290 |
Trait Implementations§
source§impl Clone for DataSpaceStandard
impl Clone for DataSpaceStandard
source§fn clone(&self) -> DataSpaceStandard
fn clone(&self) -> DataSpaceStandard
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DataSpaceStandard
impl Debug for DataSpaceStandard
source§impl From<DataSpaceStandard> for u32
impl From<DataSpaceStandard> for u32
source§fn from(enum_value: DataSpaceStandard) -> Self
fn from(enum_value: DataSpaceStandard) -> Self
source§impl Hash for DataSpaceStandard
impl Hash for DataSpaceStandard
source§impl PartialEq for DataSpaceStandard
impl PartialEq for DataSpaceStandard
source§fn eq(&self, other: &DataSpaceStandard) -> bool
fn eq(&self, other: &DataSpaceStandard) -> bool
self
and other
values to be equal, and is used
by ==
.