1 /*
2  * Copyright(c) 2019 Intel Corporation
3  * Copyright (c) 2016, Alliance for Open Media. All rights reserved
4  *
5  * This source code is subject to the terms of the BSD 2 Clause License and
6  * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
7  * was not distributed with this source code in the LICENSE file, you can
8  * obtain it at https://www.aomedia.org/license/software-license. If the Alliance for Open
9  * Media Patent License 1.0 was not distributed with this source code in the
10  * PATENTS file, you can obtain it at https://www.aomedia.org/license/patent-license.
11  */
12 
13 #ifndef EbSvtAv1Formats_h
14 #define EbSvtAv1Formats_h
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif // __cplusplus
19 
20 /*!\brief List of supported color primaries */
21 typedef enum EbColorPrimaries {
22     EB_CICP_CP_RESERVED_0   = 0, /**< For future use */
23     EB_CICP_CP_BT_709       = 1, /**< BT.709 */
24     EB_CICP_CP_UNSPECIFIED  = 2, /**< Unspecified */
25     EB_CICP_CP_RESERVED_3   = 3, /**< For future use */
26     EB_CICP_CP_BT_470_M     = 4, /**< BT.470 System M (historical) */
27     EB_CICP_CP_BT_470_B_G   = 5, /**< BT.470 System B, G (historical) */
28     EB_CICP_CP_BT_601       = 6, /**< BT.601 */
29     EB_CICP_CP_SMPTE_240    = 7, /**< SMPTE 240 */
30     EB_CICP_CP_GENERIC_FILM = 8, /**< Generic film (color filters using illuminant C) */
31     EB_CICP_CP_BT_2020      = 9, /**< BT.2020, BT.2100 */
32     EB_CICP_CP_XYZ          = 10, /**< SMPTE 428 (CIE 1921 XYZ) */
33     EB_CICP_CP_SMPTE_431    = 11, /**< SMPTE RP 431-2 */
34     EB_CICP_CP_SMPTE_432    = 12, /**< SMPTE EG 432-1  */
35     EB_CICP_CP_RESERVED_13  = 13, /**< For future use (values 13 - 21)  */
36     EB_CICP_CP_EBU_3213     = 22, /**< EBU Tech. 3213-E  */
37     EB_CICP_CP_RESERVED_23  = 23, /**< For future use (values 23 - 255)  */
38     EB_CICP_CP_RESERVED_24  = 24, /**< For future use (values 24 - 255)  */
39     EB_CICP_CP_RESERVED_25  = 25, /**< For future use (values 25 - 255)  */
40     EB_CICP_CP_RESERVED_26  = 26 /**< For future use (values 26 - 255)  */
41 } EbColorPrimaries; /**< alias for enum aom_color_primaries */
42 
43 /*!\brief List of supported transfer functions */
44 typedef enum EbTransferCharacteristics {
45     EB_CICP_TC_RESERVED_0     = 0, /**< For future use */
46     EB_CICP_TC_BT_709         = 1, /**< BT.709 */
47     EB_CICP_TC_UNSPECIFIED    = 2, /**< Unspecified */
48     EB_CICP_TC_RESERVED_3     = 3, /**< For future use */
49     EB_CICP_TC_BT_470_M       = 4, /**< BT.470 System M (historical)  */
50     EB_CICP_TC_BT_470_B_G     = 5, /**< BT.470 System B, G (historical) */
51     EB_CICP_TC_BT_601         = 6, /**< BT.601 */
52     EB_CICP_TC_SMPTE_240      = 7, /**< SMPTE 240 M */
53     EB_CICP_TC_LINEAR         = 8, /**< Linear */
54     EB_CICP_TC_LOG_100        = 9, /**< Logarithmic (100 : 1 range) */
55     EB_CICP_TC_LOG_100_SQRT10 = 10, /**< Logarithmic (100 * Sqrt(10) : 1 range) */
56     EB_CICP_TC_IEC_61966      = 11, /**< IEC 61966-2-4 */
57     EB_CICP_TC_BT_1361        = 12, /**< BT.1361 */
58     EB_CICP_TC_SRGB           = 13, /**< sRGB or sYCC*/
59     EB_CICP_TC_BT_2020_10_BIT = 14, /**< BT.2020 10-bit systems */
60     EB_CICP_TC_BT_2020_12_BIT = 15, /**< BT.2020 12-bit systems */
61     EB_CICP_TC_SMPTE_2084     = 16, /**< SMPTE ST 2084, ITU BT.2100 PQ */
62     EB_CICP_TC_SMPTE_428      = 17, /**< SMPTE ST 428 */
63     EB_CICP_TC_HLG            = 18, /**< BT.2100 HLG, ARIB STD-B67 */
64     EB_CICP_TC_RESERVED_19    = 19, /**< For future use (values 19-255) */
65     EB_CICP_TC_RESERVED_20    = 20, /**< For future use (values 20-255) */
66     EB_CICP_TC_RESERVED_21    = 21, /**< For future use (values 21-255) */
67     EB_CICP_TC_RESERVED_22    = 22, /**< For future use (values 22-255) */
68     EB_CICP_TC_RESERVED_23    = 23 /**< For future use (values 23-255) */
69 } EbTransferCharacteristics; /**< alias for enum aom_transfer_function */
70 
71 /*!\brief List of supported matrix coefficients */
72 typedef enum EbMatrixCoefficients {
73     EB_CICP_MC_IDENTITY    = 0, /**< Identity matrix */
74     EB_CICP_MC_BT_709      = 1, /**< BT.709 */
75     EB_CICP_MC_UNSPECIFIED = 2, /**< Unspecified */
76     EB_CICP_MC_RESERVED_3  = 3, /**< For future use */
77     EB_CICP_MC_FCC         = 4, /**< US FCC 73.628 */
78     EB_CICP_MC_BT_470_B_G  = 5, /**< BT.470 System B, G (historical) */
79     EB_CICP_MC_BT_601      = 6, /**< BT.601 */
80     EB_CICP_MC_SMPTE_240   = 7, /**< SMPTE 240 M */
81     EB_CICP_MC_SMPTE_YCGCO = 8, /**< YCgCo */
82     EB_CICP_MC_BT_2020_NCL = 9, /**< BT.2020 non-constant luminance, BT.2100 YCbCr  */
83     EB_CICP_MC_BT_2020_CL  = 10, /**< BT.2020 constant luminance */
84     EB_CICP_MC_SMPTE_2085  = 11, /**< SMPTE ST 2085 YDzDx */
85     EB_CICP_MC_CHROMAT_NCL = 12, /**< Chromaticity-derived non-constant luminance */
86     EB_CICP_MC_CHROMAT_CL  = 13, /**< Chromaticity-derived constant luminance */
87     EB_CICP_MC_ICTCP       = 14, /**< BT.2100 ICtCp */
88     EB_CICP_MC_RESERVED_15 = 15, /**< For future use (values 15-255)  */
89     EB_CICP_MC_RESERVED_16 = 16, /**< For future use (values 16-255)  */
90     EB_CICP_MC_RESERVED_17 = 17, /**< For future use (values 17-255)  */
91     EB_CICP_MC_RESERVED_18 = 18 /**< For future use (values 18-255)  */
92 } EbMatrixCoefficients;
93 
94 /*!\brief List of supported color range */
95 typedef enum EbColorRange {
96     EB_CR_STUDIO_RANGE = 0, /**< Y [16..235], UV [16..240] */
97     EB_CR_FULL_RANGE   = 1 /**< YUV/RGB [0..255] */
98 } EbColorRange; /**< alias for enum aom_color_range */
99 
100 /* AV1 bit depth */
101 typedef enum EbBitDepth { EB_EIGHT_BIT = 8, EB_TEN_BIT = 10, EB_TWELVE_BIT = 12 } EbBitDepth;
102 
103 /* AV1 Chroma Format */
104 typedef enum EbColorFormat { EB_YUV400, EB_YUV420, EB_YUV422, EB_YUV444 } EbColorFormat;
105 
106 /*!\brief List of chroma sample positions */
107 typedef enum EbChromaSamplePosition {
108     EB_CSP_UNKNOWN  = 0, /**< Unknown */
109     EB_CSP_VERTICAL = 1, /**< Horizontally co-located with luma(0, 0)*/
110     /**< sample, between two vertical samples */
111     EB_CSP_COLOCATED = 2, /**< Co-located with luma(0, 0) sample */
112     EB_CSP_RESERVED  = 3 /**< Reserved value */
113 } EbChromaSamplePosition; /**< alias for enum aom_transfer_function */
114 
115 #ifdef __cplusplus
116 }
117 #endif // __cplusplus
118 
119 #endif // EbSvtAv1Formats_h
120