DataSpace
public
final
class
DataSpace
extends Object
java.lang.Object | |
↳ | android.hardware.DataSpace |
DataSpace identifies three components of colors - standard (primaries), transfer and range.
A DataSpace describes how buffer data, such as from an Image
or a HardwareBuffer
should be interpreted by both applications and typical hardware.
As buffer information is not guaranteed to be representative of color information, while DataSpace is typically used to describe three aspects of interpreting colors, some DataSpaces may describe other typical interpretations of buffer data such as depth information.
Note that while ColorSpace
and DataSpace
are similar concepts, they are not equivalent. Not all ColorSpaces,
such as ColorSpace.Named.ACES
,
are able to be understood by typical hardware blocks so they cannot be DataSpaces.
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.
Transfer aspect
Transfer characteristics are the opto-electronic transfer characteristic at the source as a function of linear optical intensity (luminance).
For digital signals, E corresponds to the recorded value. Normally, the transfer function is applied in RGB space to each of the R, G and B components independently. This may result in color shift that can be minized by applying the transfer function in Lab space only for the L component. Implementation may apply the transfer function in RGB space for all pixel formats if desired.
Range aspect
Defines the range of values corresponding to the unit range of 0-1
.
Summary
Constants | |
---|---|
int |
DATASPACE_ADOBE_RGB
Adobe RGB encoding. |
int |
DATASPACE_BT2020
ITU-R Recommendation 2020 (BT.2020) Ultra High-definition television. |
int |
DATASPACE_BT2020_HLG
Hybrid Log Gamma encoding. |
int |
DATASPACE_BT2020_PQ
Perceptual Quantizer encoding. |
int |
DATASPACE_BT601_525
ITU-R Recommendation 709 (BT.709) High-definition television. |
int |
DATASPACE_BT601_625
ITU-R Recommendation 601 (BT.601) - 525-line Standard-definition television, 525 Lines (NTSC). |
int |
DATASPACE_BT709
ITU-R Recommendation 709 (BT.709) High-definition television. |
int |
DATASPACE_DCI_P3
SMPTE EG 432-1 and SMPTE RP 431-2 Digital Cinema DCI-P3. |
int |
DATASPACE_DEPTH
Depth. |
int |
DATASPACE_DISPLAY_P3
Display P3 encoding. |
int |
DATASPACE_DYNAMIC_DEPTH
ISO 16684-1:2011(E) Dynamic Depth. |
int |
DATASPACE_HEIF
High Efficiency Image File Format (HEIF). |
int |
DATASPACE_JFIF
JPEG File Interchange Format (JFIF). |
int |
DATASPACE_JPEG_R
ISO/IEC TBD JPEG image with embedded recovery map following the Jpeg/R specification. |
int |
DATASPACE_SCRGB
scRGB gamma encoding. |
int |
DATASPACE_SCRGB_LINEAR
scRGB linear encoding. |
int |
DATASPACE_SRGB
sRGB gamma encoding. |
int |
DATASPACE_SRGB_LINEAR
sRGB linear encoding. |
int |
DATASPACE_UNKNOWN
Default-assumption data space, when not explicitly specified. |
int |
RANGE_EXTENDED
Extended range can be used in combination with FP16 to communicate scRGB or with
|
int |
RANGE_FULL
Full range uses all values for Y, Cb and Cr from
|
int |
RANGE_LIMITED
Limited range uses values |
int |
RANGE_UNSPECIFIED
Range characteristics are unknown or are determined by the application. |
int |
STANDARD_ADOBE_RGB
Adobe RGB primaries. |
int |
STANDARD_BT2020
Use the unadjusted |
int |
STANDARD_BT2020_CONSTANT_LUMINANCE
Use the unadjusted |
int |
STANDARD_BT470M
Use the unadjusted |
int |
STANDARD_BT601_525
Use the adjusted |
int |
STANDARD_BT601_525_UNADJUSTED
Use the unadjusted |
int |
STANDARD_BT601_625
Use the adjusted |
int |
STANDARD_BT601_625_UNADJUSTED
Use the unadjusted |
int |
STANDARD_BT709
Use the unadjusted |
int |
STANDARD_DCI_P3
SMPTE EG 432-1 and SMPTE RP 431-2. |
int |
STANDARD_FILM
Use the unadjusted |
int |
STANDARD_UNSPECIFIED
Chromacity coordinates are unknown or are determined by the application. |
int |
TRANSFER_GAMMA2_2
Display gamma 2.2. |
int |
TRANSFER_GAMMA2_6
Display gamma 2.6. |
int |
TRANSFER_GAMMA2_8
Display gamma 2.8. |
int |
TRANSFER_HLG
ARIB STD-B67 Hybrid Log Gamma. |
int |
TRANSFER_LINEAR
Linear transfer. |
int |
TRANSFER_SMPTE_170M
SMPTE 170M transfer. |
int |
TRANSFER_SRGB
sRGB transfer. |
int |
TRANSFER_ST2084
SMPTE ST 2084 (Dolby Perceptual Quantizer). |
int |
TRANSFER_UNSPECIFIED
Transfer characteristics are unknown or are determined by the application. |
Public methods | |
---|---|
static
int
|
getRange(int dataSpace)
Unpack the range field value from the packed dataSpace value |
static
int
|
getStandard(int dataSpace)
Unpack the standard field value from the packed dataSpace value. |
static
int
|
getTransfer(int dataSpace)
Unpack the transfer field value from the packed dataSpace value |
static
int
|
pack(int standard, int transfer, int range)
Pack the dataSpace value using standard, transfer and range field value. |
Inherited methods | |
---|---|
Constants
DATASPACE_ADOBE_RGB
public static final int DATASPACE_ADOBE_RGB
Adobe RGB encoding.
Composed of the following -
Primaries: STANDARD_ADOBE_RGB Transfer: TRANSFER_GAMMA2_2 Range: RANGE_FULLNote: Application is responsible for gamma encoding the data.
Constant Value: 151715840 (0x090b0000)
DATASPACE_BT2020
public static final int DATASPACE_BT2020
ITU-R Recommendation 2020 (BT.2020) Ultra High-definition television.
Composed of the following -
Primaries: STANDARD_BT2020 Transfer: TRANSFER_SMPTE_170M Range: RANGE_FULL
Constant Value: 147193856 (0x08c60000)
DATASPACE_BT2020_HLG
public static final int DATASPACE_BT2020_HLG
Hybrid Log Gamma encoding.
Composed of the following -
Primaries: STANDARD_BT2020 Transfer: TRANSFER_HLG Range: RANGE_FULL
Constant Value: 168165376 (0x0a060000)
DATASPACE_BT2020_PQ
public static final int DATASPACE_BT2020_PQ
Perceptual Quantizer encoding.
Composed of the following -
Primaries: STANDARD_BT2020 Transfer: TRANSFER_ST2084 Range: RANGE_FULL
Constant Value: 163971072 (0x09c60000)
DATASPACE_BT601_525
public static final int DATASPACE_BT601_525
ITU-R Recommendation 709 (BT.709) High-definition television.
Composed of the following -
Primaries: STANDARD_BT601_525 Transfer: TRANSFER_SMPTE_170M Range: RANGE_LIMITED
Constant Value: 281280512 (0x10c40000)
DATASPACE_BT601_625
public static final int DATASPACE_BT601_625
ITU-R Recommendation 601 (BT.601) - 525-line Standard-definition television, 525 Lines (NTSC).
Composed of the following -
Primaries: STANDARD_BT601_625 Transfer: TRANSFER_SMPTE_170M Range: RANGE_LIMITED
Constant Value: 281149440 (0x10c20000)
DATASPACE_BT709
public static final int DATASPACE_BT709
ITU-R Recommendation 709 (BT.709) High-definition television.
Composed of the following -
Primaries: STANDARD_BT709 Transfer: TRANSFER_SMPTE_170M Range: RANGE_LIMITED
Constant Value: 281083904 (0x10c10000)
DATASPACE_DCI_P3
public static final int DATASPACE_DCI_P3
SMPTE EG 432-1 and SMPTE RP 431-2 Digital Cinema DCI-P3.
Composed of the following -
Primaries: STANDARD_DCI_P3 Transfer: TRANSFER_GAMMA2_6 Range: RANGE_FULLNote: Application is responsible for gamma encoding the data as a 2.6 gamma encoding is not supported in HW.
Constant Value: 155844608 (0x094a0000)
DATASPACE_DEPTH
public static final int DATASPACE_DEPTH
Depth. This value is valid with formats HAL_PIXEL_FORMAT_Y16 and HAL_PIXEL_FORMAT_BLOB.
Constant Value: 4096 (0x00001000)
DATASPACE_DISPLAY_P3
public static final int DATASPACE_DISPLAY_P3
Display P3 encoding.
Composed of the following -
Primaries: STANDARD_DCI_P3 Transfer: TRANSFER_SRGB Range: RANGE_FULL
Constant Value: 143261696 (0x088a0000)
DATASPACE_DYNAMIC_DEPTH
public static final int DATASPACE_DYNAMIC_DEPTH
ISO 16684-1:2011(E) Dynamic Depth. Embedded depth metadata following the dynamic depth specification.
Constant Value: 4098 (0x00001002)
DATASPACE_HEIF
public static final int DATASPACE_HEIF
High Efficiency Image File Format (HEIF).
This value is valid with HardwareBuffer.BLOB
format. The combination is an HEIC image encoded by HEIC or HEVC encoder according to
ISO/IEC 23008-12.
Constant Value: 4100 (0x00001004)
DATASPACE_JFIF
public static final int DATASPACE_JFIF
JPEG File Interchange Format (JFIF).
Composed of the following -
Primaries: STANDARD_BT601_625 Transfer: TRANSFER_SMPTE_170M Range: RANGE_FULLSame model as BT.601-625, but all values (Y, Cb, Cr) range from
0
to 255
Constant Value: 146931712 (0x08c20000)
DATASPACE_JPEG_R
public static final int DATASPACE_JPEG_R
ISO/IEC TBD JPEG image with embedded recovery map following the Jpeg/R specification.
This value must always remain aligned with the public ImageFormat Jpeg/R definition and is valid with formats: HAL_PIXEL_FORMAT_BLOB: JPEG image encoded by Jpeg/R encoder according to ISO/IEC TBD. The image contains a standard SDR JPEG and a recovery map. Jpeg/R decoders can use the map to recover the input image.
Constant Value: 4101 (0x00001005)
DATASPACE_SCRGB
public static final int DATASPACE_SCRGB
scRGB gamma encoding.
Composed of the following -
Primaries: STANDARD_BT709 Transfer: TRANSFER_SRGB Range: RANGE_EXTENDEDThe values are floating point. A pixel value of 1.0, 1.0, 1.0 corresponds to sRGB white (D65) at 80 nits. Values beyond the range [0.0 - 1.0] would correspond to other colors spaces and/or HDR content.
Constant Value: 411107328 (0x18810000)
DATASPACE_SCRGB_LINEAR
public static final int DATASPACE_SCRGB_LINEAR
scRGB linear encoding.
Composed of the following -
Primaries: STANDARD_BT709 Transfer: TRANSFER_LINEAR Range: RANGE_EXTENDEDThe values are floating point. A pixel value of 1.0, 1.0, 1.0 corresponds to sRGB white (D65) at 80 nits. Values beyond the range [0.0 - 1.0] would correspond to other colors spaces and/or HDR content.
Constant Value: 406913024 (0x18410000)
DATASPACE_SRGB
public static final int DATASPACE_SRGB
sRGB gamma encoding.
Composed of the following -
Primaries: STANDARD_BT709 Transfer: TRANSFER_SRGB Range: RANGE_FULLWhen written, the inverse transformation is performed. The alpha component, if present, is always stored in linear space and is left unmodified when read or written.
Constant Value: 142671872 (0x08810000)
DATASPACE_SRGB_LINEAR
public static final int DATASPACE_SRGB_LINEAR
sRGB linear encoding.
Composed of the following -
Primaries: STANDARD_BT709 Transfer: TRANSFER_LINEAR Range: RANGE_FULLThe values are encoded using the full range ([0,255] for 8-bit) for all components.
Constant Value: 138477568 (0x08410000)
DATASPACE_UNKNOWN
public static final int DATASPACE_UNKNOWN
Default-assumption data space, when not explicitly specified.
It is safest to assume a buffer is an image with sRGB primaries and encoding ranges, but the consumer and/or the producer of the data may simply be using defaults. No automatic gamma transform should be expected, except for a possible display gamma transform when drawn to a screen.
Constant Value: 0 (0x00000000)
RANGE_EXTENDED
public static final int RANGE_EXTENDED
Extended range can be used in combination with FP16 to communicate scRGB or with
SurfaceControl.Transaction.setExtendedRangeBrightness(SurfaceControl, float, float)
to indicate an HDR range.
When used with floating point pixel formats and #STANDARD_BT709 then [0.0 - 1.0] is the standard sRGB space and values outside the range [0.0 - 1.0] can encode color outside the sRGB gamut. [-0.5, 7.5] is the standard scRGB range. Used to blend/merge multiple dataspaces on a single display.
As of Build.VERSION_CODES.UPSIDE_DOWN_CAKE
this may be combined with
SurfaceControl.Transaction.setExtendedRangeBrightness(SurfaceControl, float, float)
and other formats such as HardwareBuffer#RGBA_8888
or
HardwareBuffer#RGBA_1010102
to communicate a variable HDR brightness range
Constant Value: 402653184 (0x18000000)
RANGE_FULL
public static final int RANGE_FULL
Full range uses all values for Y, Cb and Cr from
0
to 2^b-1
, where b is the bit depth of the color format.
Constant Value: 134217728 (0x08000000)
RANGE_LIMITED
public static final int RANGE_LIMITED
Limited range uses values 16/256*2^b
to 235/256*2^b
for Y, and
1/16*2^b
to 15/16*2^b
for Cb, Cr, R, G and B, where b is the bit depth of
the color format.
E.g. For 8-bit-depth formats: Luma (Y) samples should range from 16 to 235, inclusive Chroma (Cb, Cr) samples should range from 16 to 240, inclusive For 10-bit-depth formats: Luma (Y) samples should range from 64 to 940, inclusive Chroma (Cb, Cr) samples should range from 64 to 960, inclusive.
Constant Value: 268435456 (0x10000000)
RANGE_UNSPECIFIED
public static final int RANGE_UNSPECIFIED
Range characteristics are unknown or are determined by the application.
Constant Value: 0 (0x00000000)
STANDARD_ADOBE_RGB
public static final int STANDARD_ADOBE_RGB
Adobe RGB primaries.
Primaries: x y green 0.210 0.710 blue 0.150 0.060 red 0.640 0.330 white (D65) 0.3127 0.3290
Constant Value: 720896 (0x000b0000)
STANDARD_BT2020
public static final int STANDARD_BT2020
Use the unadjusted KR = 0.2627
, KB = 0.0593
luminance interpretation
for RGB conversion.
Primaries: x y green 0.170 0.797 blue 0.131 0.046 red 0.708 0.292 white (D65) 0.3127 0.3290
Constant Value: 393216 (0x00060000)
STANDARD_BT2020_CONSTANT_LUMINANCE
public static final int STANDARD_BT2020_CONSTANT_LUMINANCE
Use the unadjusted KR = 0.2627
, KB = 0.0593
luminance interpretation
for RGB conversion using the linear domain.
Primaries: x y green 0.170 0.797 blue 0.131 0.046 red 0.708 0.292 white (D65) 0.3127 0.3290
Constant Value: 458752 (0x00070000)
STANDARD_BT470M
public static final int STANDARD_BT470M
Use the unadjusted KR = 0.30
, KB = 0.11
luminance interpretation
for RGB conversion.
Primaries: x y green 0.21 0.71 blue 0.14 0.08 red 0.67 0.33 white (C) 0.310 0.316
Constant Value: 524288 (0x00080000)
STANDARD_BT601_525
public static final int STANDARD_BT601_525
Use the adjusted KR = 0.299
, KB = 0.114
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.
Primaries: x y green 0.310 0.595 blue 0.155 0.070 red 0.630 0.340 white (D65) 0.3127 0.3290
Constant Value: 262144 (0x00040000)
STANDARD_BT601_525_UNADJUSTED
public static final int STANDARD_BT601_525_UNADJUSTED
Use the unadjusted KR = 0.212
, KB = 0.087
luminance interpretation
for RGB conversion (as in SMPTE 240M).
Primaries: x y green 0.310 0.595 blue 0.155 0.070 red 0.630 0.340 white (D65) 0.3127 0.3290
Constant Value: 327680 (0x00050000)
STANDARD_BT601_625
public static final int STANDARD_BT601_625
Use the adjusted KR = 0.299
, KB = 0.114
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.
Primaries: x y green 0.290 0.600 blue 0.150 0.060 red 0.640 0.330 white (D65) 0.3127 0.3290
Constant Value: 131072 (0x00020000)
STANDARD_BT601_625_UNADJUSTED
public static final int STANDARD_BT601_625_UNADJUSTED
Use the unadjusted KR = 0.222
, KB = 0.071
luminance interpretation
for RGB conversion.
Primaries: x y green 0.290 0.600 blue 0.150 0.060 red 0.640 0.330 white (D65) 0.3127 0.3290
Constant Value: 196608 (0x00030000)
STANDARD_BT709
public static final int STANDARD_BT709
Use the unadjusted KR = 0.2126
, KB = 0.0722
luminance interpretation
for RGB conversion.
Primaries: x y green 0.300 0.600 blue 0.150 0.060 red 0.640 0.330 white (D65) 0.3127 0.3290
Constant Value: 65536 (0x00010000)
STANDARD_DCI_P3
public static final int STANDARD_DCI_P3
SMPTE EG 432-1 and SMPTE RP 431-2.
Primaries: x y green 0.265 0.690 blue 0.150 0.060 red 0.680 0.320 white (D65) 0.3127 0.3290
Constant Value: 655360 (0x000a0000)
STANDARD_FILM
public static final int STANDARD_FILM
Use the unadjusted KR = 0.254
, KB = 0.068
luminance interpretation
for RGB conversion.
Primaries: x y green 0.243 0.692 blue 0.145 0.049 red 0.681 0.319 white (C) 0.310 0.316
Constant Value: 589824 (0x00090000)
STANDARD_UNSPECIFIED
public static final int STANDARD_UNSPECIFIED
Chromacity coordinates are unknown or are determined by the application.
Constant Value: 0 (0x00000000)
TRANSFER_GAMMA2_2
public static final int TRANSFER_GAMMA2_2
Display gamma 2.2.
Transfer characteristic curve:
E = L ^ (1/2.2)
L - luminance of image 0 <= L <= 1 for conventional colorimetry
E - corresponding electrical signal
Constant Value: 16777216 (0x01000000)
TRANSFER_GAMMA2_6
public static final int TRANSFER_GAMMA2_6
Display gamma 2.6.
Transfer characteristic curve:
E = L ^ (1/2.6)
L - luminance of image 0 <= L <= 1 for conventional colorimetry
E - corresponding electrical signal
Constant Value: 20971520 (0x01400000)
TRANSFER_GAMMA2_8
public static final int TRANSFER_GAMMA2_8
Display gamma 2.8.
Transfer characteristic curve:
E = L ^ (1/2.8)
L - luminance of image 0 <= L <= 1 for conventional colorimetry
E - corresponding electrical signal
Constant Value: 25165824 (0x01800000)
TRANSFER_HLG
public static final int TRANSFER_HLG
ARIB STD-B67 Hybrid Log Gamma.
Transfer characteristic curve:
E = r * L^0.5 for 0 <= L <= 1
= a * ln(L - b) + c for 1 < L
a = 0.17883277
b = 0.28466892
c = 0.55991073
r = 0.5
L - luminance of image 0 <= L for HDR colorimetry. L = 1 corresponds
to reference white level of 100 cd/m2
E - corresponding electrical signal
Constant Value: 33554432 (0x02000000)
TRANSFER_LINEAR
public static final int TRANSFER_LINEAR
Linear transfer.
Transfer characteristic curve:
E = L
L - luminance of image 0 <= L <= 1 for conventional colorimetry
E - corresponding electrical signal
Constant Value: 4194304 (0x00400000)
TRANSFER_SMPTE_170M
public static final int TRANSFER_SMPTE_170M
SMPTE 170M transfer.
Transfer characteristic curve:
E = 1.099 * L ^ 0.45 - 0.099 for 0.018 <= L <= 1
= 4.500 * L for 0 <= L < 0.018
L - luminance of image 0 <= L <= 1 for conventional colorimetry
E - corresponding electrical signal
Use for YCbCr formats.
Constant Value: 12582912 (0x00c00000)
TRANSFER_SRGB
public static final int TRANSFER_SRGB
sRGB transfer.
Transfer characteristic curve:
E = 1.055 * L^(1/2.4) - 0.055 for 0.0031308 <= L <= 1
= 12.92 * L for 0 <= L < 0.0031308
L - luminance of image 0 <= L <= 1 for conventional colorimetry
E - corresponding electrical signal
Use for RGB formats.
Constant Value: 8388608 (0x00800000)
TRANSFER_ST2084
public static final int TRANSFER_ST2084
SMPTE ST 2084 (Dolby Perceptual Quantizer).
Transfer characteristic curve:
E = ((c1 + c2 * L^n) / (1 + c3 * L^n)) ^ m
c1 = c3 - c2 + 1 = 3424 / 4096 = 0.8359375
c2 = 32 * 2413 / 4096 = 18.8515625
c3 = 32 * 2392 / 4096 = 18.6875
m = 128 * 2523 / 4096 = 78.84375
n = 0.25 * 2610 / 4096 = 0.1593017578125
L - luminance of image 0 <= L <= 1 for HDR colorimetry.
L = 1 corresponds to 10000 cd/m2
E - corresponding electrical signal
Constant Value: 29360128 (0x01c00000)
TRANSFER_UNSPECIFIED
public static final int TRANSFER_UNSPECIFIED
Transfer characteristics are unknown or are determined by the application.
Constant Value: 0 (0x00000000)
Public methods
getRange
public static int getRange (int dataSpace)
Unpack the range field value from the packed dataSpace value
Parameters | |
---|---|
dataSpace |
int : The packed dataspace value
Value is either 0 or a combination of DATASPACE_UNKNOWN , DATASPACE_SCRGB_LINEAR , DATASPACE_SRGB , DATASPACE_SCRGB , DATASPACE_DISPLAY_P3 , DATASPACE_BT2020_HLG , DATASPACE_BT2020_PQ , DATASPACE_ADOBE_RGB , DATASPACE_JFIF , DATASPACE_BT601_625 , DATASPACE_BT601_525 , DATASPACE_BT2020 , DATASPACE_BT709 , DATASPACE_DCI_P3 , and DATASPACE_SRGB_LINEAR |
Returns | |
---|---|
int |
The range aspect
Value is either 0 or a combination of RANGE_UNSPECIFIED , RANGE_FULL , RANGE_LIMITED , and RANGE_EXTENDED |
getStandard
public static int getStandard (int dataSpace)
Unpack the standard field value from the packed dataSpace value.
Parameters | |
---|---|
dataSpace |
int : The packed dataspace value
Value is either 0 or a combination of DATASPACE_UNKNOWN , DATASPACE_SCRGB_LINEAR , DATASPACE_SRGB , DATASPACE_SCRGB , DATASPACE_DISPLAY_P3 , DATASPACE_BT2020_HLG , DATASPACE_BT2020_PQ , DATASPACE_ADOBE_RGB , DATASPACE_JFIF , DATASPACE_BT601_625 , DATASPACE_BT601_525 , DATASPACE_BT2020 , DATASPACE_BT709 , DATASPACE_DCI_P3 , and DATASPACE_SRGB_LINEAR |
Returns | |
---|---|
int |
The standard aspect
Value is either 0 or a combination of STANDARD_UNSPECIFIED , STANDARD_BT709 , STANDARD_BT601_625 , STANDARD_BT601_625_UNADJUSTED , STANDARD_BT601_525 , STANDARD_BT601_525_UNADJUSTED , STANDARD_BT2020 , STANDARD_BT2020_CONSTANT_LUMINANCE , STANDARD_BT470M , STANDARD_FILM , STANDARD_DCI_P3 , and STANDARD_ADOBE_RGB |
getTransfer
public static int getTransfer (int dataSpace)
Unpack the transfer field value from the packed dataSpace value
Parameters | |
---|---|
dataSpace |
int : The packed dataspace value
Value is either 0 or a combination of DATASPACE_UNKNOWN , DATASPACE_SCRGB_LINEAR , DATASPACE_SRGB , DATASPACE_SCRGB , DATASPACE_DISPLAY_P3 , DATASPACE_BT2020_HLG , DATASPACE_BT2020_PQ , DATASPACE_ADOBE_RGB , DATASPACE_JFIF , DATASPACE_BT601_625 , DATASPACE_BT601_525 , DATASPACE_BT2020 , DATASPACE_BT709 , DATASPACE_DCI_P3 , and DATASPACE_SRGB_LINEAR |
Returns | |
---|---|
int |
The transfer aspect
Value is either 0 or a combination of TRANSFER_UNSPECIFIED , TRANSFER_LINEAR , TRANSFER_SRGB , TRANSFER_SMPTE_170M , TRANSFER_GAMMA2_2 , TRANSFER_GAMMA2_6 , TRANSFER_GAMMA2_8 , TRANSFER_ST2084 , and TRANSFER_HLG |
pack
public static int pack (int standard, int transfer, int range)
Pack the dataSpace value using standard, transfer and range field value. Field values should be in the correct bits place.
Parameters | |
---|---|
standard |
int : Chromaticity coordinates of source primaries
Value is either 0 or a combination of STANDARD_UNSPECIFIED , STANDARD_BT709 , STANDARD_BT601_625 , STANDARD_BT601_625_UNADJUSTED , STANDARD_BT601_525 , STANDARD_BT601_525_UNADJUSTED , STANDARD_BT2020 , STANDARD_BT2020_CONSTANT_LUMINANCE , STANDARD_BT470M , STANDARD_FILM , STANDARD_DCI_P3 , and STANDARD_ADOBE_RGB |
transfer |
int : Opto-electronic transfer characteristic at the source
Value is either 0 or a combination of TRANSFER_UNSPECIFIED , TRANSFER_LINEAR , TRANSFER_SRGB , TRANSFER_SMPTE_170M , TRANSFER_GAMMA2_2 , TRANSFER_GAMMA2_6 , TRANSFER_GAMMA2_8 , TRANSFER_ST2084 , and TRANSFER_HLG |
range |
int : The range of values
Value is either 0 or a combination of RANGE_UNSPECIFIED , RANGE_FULL , RANGE_LIMITED , and RANGE_EXTENDED |
Returns | |
---|---|
int |
The int dataspace packed by standard, transfer and range value
Value is either 0 or a combination of DATASPACE_UNKNOWN , DATASPACE_SCRGB_LINEAR , DATASPACE_SRGB , DATASPACE_SCRGB , DATASPACE_DISPLAY_P3 , DATASPACE_BT2020_HLG , DATASPACE_BT2020_PQ , DATASPACE_ADOBE_RGB , DATASPACE_JFIF , DATASPACE_BT601_625 , DATASPACE_BT601_525 , DATASPACE_BT2020 , DATASPACE_BT709 , DATASPACE_DCI_P3 , and DATASPACE_SRGB_LINEAR |