h264dec/include: support S3D
[GitHub/LineageOS/android_hardware_samsung_slsi_openmax.git] / include / exynos / Exynos_OMX_Def.h
1 /*
2 *
3 * Copyright 2012 Samsung Electronics S.LSI Co. LTD
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 /*
19 * @file Exynos_OMX_Def.h
20 * @brief Exynos_OMX specific define
21 * @author SeungBeom Kim (sbcrux.kim@samsung.com)
22 * @version 2.0.0
23 * @history
24 * 2012.02.20 : Create
25 */
26
27 #ifndef EXYNOS_OMX_DEF
28 #define EXYNOS_OMX_DEF
29
30 #include "OMX_Types.h"
31 #include "OMX_IVCommon.h"
32
33 #define VERSIONMAJOR_NUMBER 1
34 #define VERSIONMINOR_NUMBER 0
35 #define REVISION_NUMBER 0
36 #define STEP_NUMBER 0
37
38
39 #define MAX_OMX_COMPONENT_NUM 20
40 #define MAX_OMX_COMPONENT_ROLE_NUM 10
41 #define MAX_OMX_COMPONENT_NAME_SIZE OMX_MAX_STRINGNAME_SIZE
42 #define MAX_OMX_COMPONENT_ROLE_SIZE OMX_MAX_STRINGNAME_SIZE
43 #define MAX_OMX_COMPONENT_LIBNAME_SIZE OMX_MAX_STRINGNAME_SIZE * 2
44 #define MAX_OMX_MIMETYPE_SIZE OMX_MAX_STRINGNAME_SIZE
45
46 #define MAX_TIMESTAMP 40
47 #define MAX_FLAGS 40
48
49 #define MAX_BUFFER_PLANE 3
50
51 #define EXYNOS_OMX_INSTALL_PATH "/system/lib/omx/"
52
53 typedef enum _EXYNOS_CODEC_TYPE
54 {
55 SW_CODEC,
56 HW_VIDEO_DEC_CODEC,
57 HW_VIDEO_ENC_CODEC,
58 HW_AUDIO_DEC_CODEC,
59 HW_AUDIO_ENC_CODEC
60 } EXYNOS_CODEC_TYPE;
61
62 typedef struct _EXYNOS_OMX_PRIORITYMGMTTYPE
63 {
64 OMX_U32 nGroupPriority; /* the value 0 represents the highest priority */
65 /* for a group of components */
66 OMX_U32 nGroupID;
67 } EXYNOS_OMX_PRIORITYMGMTTYPE;
68
69 typedef enum _EXYNOS_OMX_INDEXTYPE
70 {
71 #define EXYNOS_INDEX_PARAM_ENABLE_THUMBNAIL "OMX.SEC.index.ThumbnailMode"
72 OMX_IndexVendorThumbnailMode = 0x7F000001,
73 #define EXYNOS_INDEX_CONFIG_VIDEO_INTRAPERIOD "OMX.SEC.index.VideoIntraPeriod"
74 OMX_IndexConfigVideoIntraPeriod = 0x7F000002,
75 #ifdef USE_S3D_SUPPORT
76 #define EXYNOS_INDEX_PARAM_GET_S3D "OMX.SEC.index.S3DMode"
77 OMX_IndexVendorS3DMode = 0x7F000003,
78 #endif
79
80 /* for Android Native Window */
81 #define EXYNOS_INDEX_PARAM_ENABLE_ANB "OMX.google.android.index.enableAndroidNativeBuffers"
82 OMX_IndexParamEnableAndroidBuffers = 0x7F000011,
83 #define EXYNOS_INDEX_PARAM_GET_ANB "OMX.google.android.index.getAndroidNativeBufferUsage"
84 OMX_IndexParamGetAndroidNativeBuffer = 0x7F000012,
85 #define EXYNOS_INDEX_PARAM_USE_ANB "OMX.google.android.index.useAndroidNativeBuffer"
86 OMX_IndexParamUseAndroidNativeBuffer = 0x7F000013,
87 /* for Android Store Metadata Inbuffer */
88 #define EXYNOS_INDEX_PARAM_STORE_METADATA_BUFFER "OMX.google.android.index.storeMetaDataInBuffers"
89 OMX_IndexParamStoreMetaDataBuffer = 0x7F000014,
90
91 /* for Android PV OpenCore*/
92 OMX_COMPONENT_CAPABILITY_TYPE_INDEX = 0xFF7A347
93 } EXYNOS_OMX_INDEXTYPE;
94
95 typedef enum _EXYNOS_OMX_ERRORTYPE
96 {
97 OMX_ErrorNoEOF = (OMX_S32) 0x90000001,
98 OMX_ErrorInputDataDecodeYet = (OMX_S32) 0x90000002,
99 OMX_ErrorInputDataEncodeYet = (OMX_S32) 0x90000003,
100 OMX_ErrorCodecInit = (OMX_S32) 0x90000004,
101 OMX_ErrorCodecDecode = (OMX_S32) 0x90000005,
102 OMX_ErrorCodecEncode = (OMX_S32) 0x90000006,
103 OMX_ErrorCodecFlush = (OMX_S32) 0x90000007,
104 OMX_ErrorOutputBufferUseYet = (OMX_S32) 0x90000008,
105 OMX_ErrorCorruptedFrame = (OMX_S32) 0x90000009
106 } EXYNOS_OMX_ERRORTYPE;
107
108 typedef enum _EXYNOS_OMX_COMMANDTYPE
109 {
110 EXYNOS_OMX_CommandComponentDeInit = 0x7F000001,
111 EXYNOS_OMX_CommandEmptyBuffer,
112 EXYNOS_OMX_CommandFillBuffer,
113 EXYNOS_OMX_CommandFakeBuffer
114 } EXYNOS_OMX_COMMANDTYPE;
115
116 typedef enum _EXYNOS_OMX_TRANS_STATETYPE {
117 EXYNOS_OMX_TransStateInvalid,
118 EXYNOS_OMX_TransStateLoadedToIdle,
119 EXYNOS_OMX_TransStateIdleToExecuting,
120 EXYNOS_OMX_TransStateExecutingToIdle,
121 EXYNOS_OMX_TransStateIdleToLoaded,
122 EXYNOS_OMX_TransStateMax = 0X7FFFFFFF
123 } EXYNOS_OMX_TRANS_STATETYPE;
124
125 typedef enum _EXYNOS_OMX_COLOR_FORMATTYPE {
126 OMX_SEC_COLOR_FormatNV12TPhysicalAddress = 0x7F000001, /**< Reserved region for introducing Vendor Extensions */
127 OMX_SEC_COLOR_FormatNV12LPhysicalAddress = 0x7F000002,
128 OMX_SEC_COLOR_FormatNV12LVirtualAddress = 0x7F000003,
129 OMX_SEC_COLOR_FormatNV12Tiled = 0x7FC00002, /* 0x7FC00002 */
130 OMX_SEC_COLOR_FormatNV21LPhysicalAddress = 0x7F000010,
131 OMX_SEC_COLOR_FormatNV21Linear = 0x7F000011,
132
133 /* to copy a encoded data for drm component using gsc or fimc */
134 OMX_SEC_COLOR_FormatEncodedData = OMX_COLOR_FormatYCbYCr,
135 #ifdef USE_KHRONOS_OMX_HEADER
136 /* for Android SurfaceMediaSource*/
137 OMX_COLOR_FormatAndroidOpaque = 0x7F000789
138 #endif
139 }EXYNOS_OMX_COLOR_FORMATTYPE;
140
141 typedef enum _EXYNOS_OMX_SUPPORTFORMAT_TYPE
142 {
143 supportFormat_0 = 0x00,
144 supportFormat_1,
145 supportFormat_2,
146 supportFormat_3,
147 supportFormat_4,
148 supportFormat_5,
149 supportFormat_6,
150 supportFormat_7
151 } EXYNOS_OMX_SUPPORTFORMAT_TYPE;
152
153 typedef enum _EXYNOS_OMX_BUFFERPROCESS_TYPE
154 {
155 BUFFER_DEFAULT = 0x00,
156 BUFFER_COPY = 0x01,
157 BUFFER_SHARE = 0x02,
158 BUFFER_METADATA = 0x04,
159 BUFFER_ANBSHARE = 0x08
160 } EXYNOS_OMX_BUFFERPROCESS_TYPE;
161
162 typedef struct _EXYNOS_OMX_VIDEO_PROFILELEVEL
163 {
164 OMX_S32 profile;
165 OMX_S32 level;
166 } EXYNOS_OMX_VIDEO_PROFILELEVEL;
167
168 #ifdef USE_S3D_SUPPORT
169 typedef enum _EXYNOS_OMX_FPARGMT_TYPE
170 {
171 OMX_SEC_FPARGMT_CHECKERBRD_INTERL = 0x00,
172 OMX_SEC_FPARGMT_COLUMN_INTERL = 0x01,
173 OMX_SEC_FPARGMT_ROW_INTERL = 0x02,
174 OMX_SEC_FPARGMT_SIDE_BY_SIDE = 0x03,
175 OMX_SEC_FPARGMT_TOP_BOTTOM = 0x04,
176 OMX_SEC_FPARGMT_TEMPORAL_INTERL = 0x05,
177 OMX_SEC_FPARGMT_NONE = 0x0A
178 } EXYNOS_OMX_FPARGMT_TYPE;
179 #endif
180
181 typedef enum _EXYNOS_OMX_EVENTTYPE
182 {
183 OMX_EventVendorStart = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
184 #ifdef USE_S3D_SUPPORT
185 OMX_EventS3DInformation,
186 #endif
187 } EXYNOS_OMX_EVENTTYPE;
188
189 #ifdef USE_KHRONOS_OMX_HEADER
190 #define OMX_VIDEO_CodingVPX 0x09 /**< Google VPX, formerly known as On2 VP8 */
191 #endif
192
193 #ifndef __OMX_EXPORTS
194 #define __OMX_EXPORTS
195 #define EXYNOS_EXPORT_REF __attribute__((visibility("default")))
196 #define EXYNOS_IMPORT_REF __attribute__((visibility("default")))
197 #endif
198
199 #endif