1 /*
2                                     __
3                                    / _|
4   __ _ _   _ _ __ ___  _ __ __ _  | |_ ___  ___ ___
5  / _` | | | | '__/ _ \| '__/ _` | |  _/ _ \/ __/ __|
6 | (_| | |_| | | | (_) | | | (_| | | || (_) \__ \__ \
7  \__,_|\__,_|_|  \___/|_|  \__,_| |_| \___/|___/___/
8 
9 Copyright (C) 2018 The Android Open Source Project.
10 Copyright (C) 2018-2019 Aurora Free Open Source Software.
11 
12 This file is part of the Aurora Free Open Source Software. This
13 organization promote free and open source software that you can
14 redistribute and/or modify under the terms of the GNU Lesser General
15 Public License Version 3 as published by the Free Software Foundation or
16 (at your option) any later version approved by the Aurora Free Open Source
17 Software Organization. The license is available in the package root path
18 as 'LICENSE' file. Please review the following information to ensure the
19 GNU Lesser General Public License version 3 requirements will be met:
20 https://www.gnu.org/licenses/lgpl.html .
21 
22 Alternatively, this file may be used under the terms of the GNU General
23 Public License version 3 or later as published by the Free Software
24 Foundation. Please review the following information to ensure the GNU
25 General Public License requirements will be met:
26 https://www.gnu.org/licenses/gpl-3.0.html.
27 
28 NOTE: All products, services or anything associated to trademarks and
29 service marks used or referenced on this file are the property of their
30 respective companies/owners or its subsidiaries. Other names and brands
31 may be claimed as the property of others.
32 
33 For more info about intellectual property visit: aurorafoss.org or
34 directly send an email to: contact (at) aurorafoss.org .
35 
36 This file has bindings for an existing code, part of The Android Open Source
37 Project implementation. Check it out at android.googlesource.com .
38 */
39 
40 module aurorafw.android.platform.data_space;
41 
42 /**
43  * @file aurorafw/android/platform/data_space.d
44  */
45 
46 version (Android):
47 extern (C):
48 @system:
49 nothrow:
50 @nogc:
51 
52 /**
53  * ADataSpace.
54  */
55 enum ADataSpace
56 {
57     /**
58      * Default-assumption data space, when not explicitly specified.
59      *
60      * It is safest to assume the buffer is an image with sRGB primaries and
61      * encoding ranges, but the consumer and/or the producer of the data may
62      * simply be using defaults. No automatic gamma transform should be
63      * expected, except for a possible display gamma transform when drawn to a
64      * screen.
65      */
66     ADATASPACE_UNKNOWN = 0,
67 
68     /**
69      * scRGB linear encoding:
70      *
71      * The red, green, and blue components are stored in extended sRGB space,
72      * but are linear, not gamma-encoded.
73      * The RGB primaries and the white point are the same as BT.709.
74      *
75      * The values are floating point.
76      * A pixel value of 1.0, 1.0, 1.0 corresponds to sRGB white (D65) at 80 nits.
77      * Values beyond the range [0.0 - 1.0] would correspond to other colors
78      * spaces and/or HDR content.
79      */
80     ADATASPACE_SCRGB_LINEAR = 406913024, // STANDARD_BT709 | TRANSFER_LINEAR | RANGE_EXTENDED
81 
82     /**
83      * sRGB gamma encoding:
84      *
85      * The red, green and blue components are stored in sRGB space, and
86      * converted to linear space when read, using the SRGB transfer function
87      * for each of the R, G and B components. When written, the inverse
88      * transformation is performed.
89      *
90      * The alpha component, if present, is always stored in linear space and
91      * is left unmodified when read or written.
92      *
93      * Use full range and BT.709 standard.
94      */
95     ADATASPACE_SRGB = 142671872, // STANDARD_BT709 | TRANSFER_SRGB | RANGE_FULL
96 
97     /**
98      * scRGB:
99      *
100      * The red, green, and blue components are stored in extended sRGB space,
101      * but are linear, not gamma-encoded.
102      * The RGB primaries and the white point are the same as BT.709.
103      *
104      * The values are floating point.
105      * A pixel value of 1.0, 1.0, 1.0 corresponds to sRGB white (D65) at 80 nits.
106      * Values beyond the range [0.0 - 1.0] would correspond to other colors
107      * spaces and/or HDR content.
108      */
109     ADATASPACE_SCRGB = 411107328, // STANDARD_BT709 | TRANSFER_SRGB | RANGE_EXTENDED
110 
111     /**
112      * Display P3
113      *
114      * Use same primaries and white-point as DCI-P3
115      * but sRGB transfer function.
116      */
117     ADATASPACE_DISPLAY_P3 = 143261696, // STANDARD_DCI_P3 | TRANSFER_SRGB | RANGE_FULL
118 
119     /**
120      * ITU-R Recommendation 2020 (BT.2020)
121      *
122      * Ultra High-definition television
123      *
124      * Use full range, SMPTE 2084 (PQ) transfer and BT2020 standard
125      */
126     ADATASPACE_BT2020_PQ = 163971072 // STANDARD_BT2020 | TRANSFER_ST2084 | RANGE_FULL
127 }
128 
129 // ANDROID_DATA_SPACE_H