3 * Copyright 2012 Samsung Electronics S.LSI Co. LTD
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file Exynos_OMX_Def.h
20 * @brief Exynos_OMX specific define
21 * @author SeungBeom Kim (sbcrux.kim@samsung.com)
27 #ifndef EXYNOS_OMX_DEF
28 #define EXYNOS_OMX_DEF
30 #include "OMX_Types.h"
31 #include "OMX_IVCommon.h"
33 #define VERSIONMAJOR_NUMBER 1
34 #define VERSIONMINOR_NUMBER 0
35 #define REVISION_NUMBER 0
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
46 #define MAX_TIMESTAMP 40
49 #define MAX_BUFFER_PLANE 3
51 #define EXYNOS_OMX_INSTALL_PATH "/system/lib/omx/"
53 typedef enum _EXYNOS_CODEC_TYPE
62 typedef struct _EXYNOS_OMX_PRIORITYMGMTTYPE
64 OMX_U32 nGroupPriority
; /* the value 0 represents the highest priority */
65 /* for a group of components */
67 } EXYNOS_OMX_PRIORITYMGMTTYPE
;
69 typedef enum _EXYNOS_OMX_INDEXTYPE
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,
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,
91 /* for Android PV OpenCore*/
92 OMX_COMPONENT_CAPABILITY_TYPE_INDEX
= 0xFF7A347
93 } EXYNOS_OMX_INDEXTYPE
;
95 typedef enum _EXYNOS_OMX_ERRORTYPE
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
;
108 typedef enum _EXYNOS_OMX_COMMANDTYPE
110 EXYNOS_OMX_CommandComponentDeInit
= 0x7F000001,
111 EXYNOS_OMX_CommandEmptyBuffer
,
112 EXYNOS_OMX_CommandFillBuffer
,
113 EXYNOS_OMX_CommandFakeBuffer
114 } EXYNOS_OMX_COMMANDTYPE
;
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
;
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,
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
139 }EXYNOS_OMX_COLOR_FORMATTYPE
;
141 typedef enum _EXYNOS_OMX_SUPPORTFORMAT_TYPE
143 supportFormat_0
= 0x00,
151 } EXYNOS_OMX_SUPPORTFORMAT_TYPE
;
153 typedef enum _EXYNOS_OMX_BUFFERPROCESS_TYPE
155 BUFFER_DEFAULT
= 0x00,
158 BUFFER_METADATA
= 0x04,
159 BUFFER_ANBSHARE
= 0x08
160 } EXYNOS_OMX_BUFFERPROCESS_TYPE
;
162 typedef struct _EXYNOS_OMX_VIDEO_PROFILELEVEL
166 } EXYNOS_OMX_VIDEO_PROFILELEVEL
;
168 #ifdef USE_S3D_SUPPORT
169 typedef enum _EXYNOS_OMX_FPARGMT_TYPE
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
;
181 typedef enum _EXYNOS_OMX_EVENTTYPE
183 OMX_EventVendorStart
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
184 #ifdef USE_S3D_SUPPORT
185 OMX_EventS3DInformation
,
187 } EXYNOS_OMX_EVENTTYPE
;
189 #ifdef USE_KHRONOS_OMX_HEADER
190 #define OMX_VIDEO_CodingVPX 0x09 /**< Google VPX, formerly known as On2 VP8 */
193 #ifndef __OMX_EXPORTS
194 #define __OMX_EXPORTS
195 #define EXYNOS_EXPORT_REF __attribute__((visibility("default")))
196 #define EXYNOS_IMPORT_REF __attribute__((visibility("default")))