ci: Include enough Android headers to let us compile test EGL
[mesa.git] / include / android_stub / android / hdr_metadata.h
1 /*
2 * Copyright 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /**
18 * @file hdr_metadata.h
19 */
20
21 #ifndef ANDROID_HDR_METADATA_H
22 #define ANDROID_HDR_METADATA_H
23
24 #include <inttypes.h>
25
26 #include <sys/cdefs.h>
27
28 __BEGIN_DECLS
29
30 /**
31 * These structures are used to define the display's capabilities for HDR content.
32 * They can be used to better tone map content to user's display.
33 */
34
35 /**
36 * HDR metadata standards that are supported by Android.
37 */
38 enum AHdrMetadataType : uint32_t {
39 HDR10_SMPTE2086 = 1,
40 HDR10_CTA861_3 = 2,
41 HDR10PLUS_SEI = 3,
42 };
43
44 /**
45 * Color is defined in CIE XYZ coordinates.
46 */
47 struct AColor_xy {
48 float x;
49 float y;
50 };
51
52 /**
53 * SMPTE ST 2086 "Mastering Display Color Volume" static metadata
54 */
55 struct AHdrMetadata_smpte2086 {
56 struct AColor_xy displayPrimaryRed;
57 struct AColor_xy displayPrimaryGreen;
58 struct AColor_xy displayPrimaryBlue;
59 struct AColor_xy whitePoint;
60 float maxLuminance;
61 float minLuminance;
62 };
63
64 /**
65 * CTA 861.3 "HDR Static Metadata Extension" static metadata
66 */
67 struct AHdrMetadata_cta861_3 {
68 float maxContentLightLevel;
69 float maxFrameAverageLightLevel;
70 };
71
72 __END_DECLS
73
74 #endif // ANDROID_HDR_METADATA_H