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 //#define PERFORMANCE_DEBUG
32 #include "OMX_Types.h"
33 #include "OMX_IVCommon.h"
34 #include "OMX_Video.h"
35 #include "OMX_VideoExt.h"
36 #include "OMX_IndexExt.h"
38 #define VERSIONMAJOR_NUMBER 1
39 #define VERSIONMINOR_NUMBER 1
40 #define REVISION_NUMBER 2
43 #define RESOURCE_VIDEO_DEC 16
44 #define RESOURCE_VIDEO_ENC 16
45 #define RESOURCE_AUDIO_DEC 10
47 #define MAX_OMX_COMPONENT_NUM 40
48 #define MAX_OMX_COMPONENT_ROLE_NUM 10
49 #define MAX_OMX_COMPONENT_NAME_SIZE OMX_MAX_STRINGNAME_SIZE
50 #define MAX_OMX_COMPONENT_ROLE_SIZE OMX_MAX_STRINGNAME_SIZE
51 #define MAX_OMX_COMPONENT_LIBNAME_SIZE OMX_MAX_STRINGNAME_SIZE * 2
52 #define MAX_OMX_MIMETYPE_SIZE OMX_MAX_STRINGNAME_SIZE
54 #define MAX_BUFFER_REF 40
55 #define MAX_TIMESTAMP MAX_BUFFER_REF
56 #define MAX_FLAGS MAX_BUFFER_REF
58 #define MAX_BUFFER_PLANE 3
60 #define INDEX_AFTER_EOS 0xE05
62 #define DEFAULT_TIMESTAMP_VAL (-1010101010)
63 #define RESET_TIMESTAMP_VAL (-1001001001)
65 // The largest metadata buffer size advertised
66 // when metadata buffer mode is used
67 #define MAX_METADATA_BUFFER_SIZE (64)
69 #define PREFIX_COMPONENT_NAME "OMX.Exynos."
70 #define IS_CUSTOM_COMPONENT(name) (((char)(name[((int)sizeof(PREFIX_COMPONENT_NAME))-1]) >= 0x61)? OMX_TRUE:OMX_FALSE)
72 #define IS_64BIT_OS (((sizeof(int) != sizeof(void *))? OMX_TRUE:OMX_FALSE))
73 #define EXYNOS_OMX_INSTALL_PATH "/system/lib/omx/"
74 #define EXYNOS_OMX64_INSTALL_PATH "/system/lib64/omx/"
76 typedef enum _EXYNOS_CODEC_TYPE
81 HW_VIDEO_DEC_SECURE_CODEC
,
82 HW_VIDEO_ENC_SECURE_CODEC
,
87 #define PLANE_MAX_NUM 3
88 typedef enum _PLANE_TYPE
{
89 PLANE_MULTIPLE
= 0x00,
91 PLANE_SINGLE_USER
= 0x12,
94 typedef enum _EXYNOS_OMX_INDEXTYPE
96 #define EXYNOS_INDEX_PARAM_THUMBNAIL "OMX.SEC.index.ThumbnailMode"
97 OMX_IndexVendorThumbnailMode
= 0x7F000001,
99 #define EXYNOS_INDEX_CONFIG_VIDEO_INTRAPERIOD "OMX.SEC.index.VideoIntraPeriod"
100 OMX_IndexConfigVideoIntraPeriod
= 0x7F000002,
102 #ifdef USE_S3D_SUPPORT
103 #define EXYNOS_INDEX_PARAM_GET_S3D "OMX.SEC.index.S3DMode"
104 OMX_IndexVendorS3DMode
= 0x7F000003,
107 #define EXYNOS_INDEX_PARAM_NEED_CONTIG_MEMORY "OMX.SEC.index.NeedContigMemory"
108 OMX_IndexVendorNeedContigMemory
= 0x7F000004,
110 #define EXYNOS_INDEX_CONFIG_GET_BUFFER_FD "OMX.SEC.index.GetBufferFD"
111 OMX_IndexVendorGetBufferFD
= 0x7F000005,
113 #define EXYNOS_INDEX_PARAM_SET_DTS_MODE "OMX.SEC.index.SetDTSMode"
114 OMX_IndexVendorSetDTSMode
= 0x7F000006,
116 #define EXYNOS_INDEX_CONFIG_SET_QOS_RATIO "OMX.SEC.index.SetQosRatio"
117 OMX_IndexVendorSetQosRatio
= 0x7F000007,
119 /* for Android Native Window */
120 #define EXYNOS_INDEX_PARAM_ENABLE_ANB "OMX.google.android.index.enableAndroidNativeBuffers"
121 OMX_IndexParamEnableAndroidBuffers
= 0x7F000011,
123 #define EXYNOS_INDEX_PARAM_GET_ANB "OMX.google.android.index.getAndroidNativeBufferUsage"
124 OMX_IndexParamGetAndroidNativeBuffer
= 0x7F000012,
126 #define EXYNOS_INDEX_PARAM_USE_ANB "OMX.google.android.index.useAndroidNativeBuffer"
127 OMX_IndexParamUseAndroidNativeBuffer
= 0x7F000013,
129 /* for Android Store Metadata Inbuffer */
130 #define EXYNOS_INDEX_PARAM_STORE_METADATA_BUFFER "OMX.google.android.index.storeMetaDataInBuffers"
131 OMX_IndexParamStoreMetaDataBuffer
= 0x7F000014,
133 /* prepend SPS/PPS to I/IDR for H.264 Encoder */
134 #define EXYNOS_INDEX_PARAM_PREPEND_SPSPPS_TO_IDR "OMX.google.android.index.prependSPSPPSToIDRFrames"
135 OMX_IndexParamPrependSPSPPSToIDR
= 0x7F000015,
138 #ifdef USE_HEVC_SUPPORT
139 #define EXYNOS_INDEX_PARAM_VIDEO_HEVC_TYPE "OMX.SEC.index.VideoHevcType"
140 #endif // USE_HEVC_SUPPORT
143 #define EXYNOS_INDEX_PARAM_ENABLE_THUMBNAIL "OMX.SEC.index.enableThumbnailMode"
144 OMX_IndexParamEnableThumbnailMode
= 0x7F000020,
146 /* Android Native Buffer */
147 #define EXYNOS_INDEX_PARAM_USE_ANB2 "OMX.google.android.index.useAndroidNativeBuffer2"
148 OMX_IndexParamUseAndroidNativeBuffer2
= 0x7F000021,
151 #define EXYNOS_INDEX_PARAM_VIDEO_QPRANGE_TYPE "OMX.SEC.indexParam.VideoQPRange"
152 OMX_IndexParamVideoQPRange
= 0x7F000022,
154 #define EXYNOS_INDEX_CONFIG_VIDEO_QPRANGE_TYPE "OMX.SEC.indexConfig.VideoQPRange"
155 OMX_IndexConfigVideoQPRange
= 0x7F000023,
157 #define EXYNOS_INDEX_PARAM_SLICE_SEGMENTS "OMX.SEC.index.SliceSegments"
160 #define EXYNOS_INDEX_CONFIG_VIDEO_TEMPORALSVC "OMX.SEC.index.TemporalSVC"
161 OMX_IndexConfigVideoTemporalSVC
= 0x7F000026,
163 #define EXYNOS_INDEX_PARAM_VIDEO_AVC_ENABLE_TEMPORALSVC "OMX.SEC.index.AVC.enableTemporalSVC"
164 OMX_IndexParamVideoAVCEnableTemporalSVC
= 0x7F000027,
167 #ifndef USE_KHRONOS_OMX_1_2
168 #define EXYNOS_INDEX_PARAM_VIDEO_VC1_TYPE "OMX.SEC.index.VideoVc1Type"
169 OMX_IndexParamVideoVC1
= 0x7F000028,
173 #ifdef USE_VP9_SUPPORT
174 #define EXYNOS_INDEX_PARAM_VIDEO_VP9_TYPE "OMX.SEC.index.VideoVp9Type"
176 #define EXYNOS_INDEX_CONFIG_VIDEO_VP9_REFERENCEFRAME "OMX.SEC.index.VideoVp9ReferenceFrame"
177 OMX_IndexConfigVideoVp9ReferenceFrame
= 0x7F000030,
179 #define EXYNOS_INDEX_CONFIG_VIDEO_VP9_REFERENCEFRAMETYPE "OMX.SEC.index.VideoVp9ReferenceFrameType"
180 OMX_IndexConfigVideoVp9ReferenceFrameType
= 0x7F000031,
182 #define EXYNOS_INDEX_PARAM_VIDEO_ANDROID_VP9_ENCODER "OMX.SEC.index.VideoAndroidVP9Encoder"
183 #endif // USE_VP9_SUPPORT
186 #define EXYNOS_INDEX_PARAM_ENABLE_BLUR_FILTER "OMX.SEC.indexParam.enableBlurFilter"
187 OMX_IndexParamEnableBlurFilter
= 0x7F000033,
188 #define EXYNOS_INDEX_CONFIG_BLUR_INFO "OMX.SEC.indexConfig.BlurInfo"
189 OMX_IndexConfigBlurInfo
= 0x7F000034,
191 #define EXYNOS_INDEX_PARAM_VIDEO_HEVC_ENABLE_TEMPORALSVC "OMX.SEC.index.Hevc.enableTemporalSVC"
192 OMX_IndexParamVideoHevcEnableTemporalSVC
= 0x7F000035,
194 /* ROI Information */
195 #define EXYNOS_INDEX_CONFIG_VIDEO_ROIINFO "OMX.SEC.index.RoiInfo"
196 OMX_IndexConfigVideoRoiInfo
= 0x7F000036,
197 #define EXYNOS_INDEX_PARAM_VIDEO_ENABLE_ROIINFO "OMX.SEC.index.enableRoiInfo"
198 OMX_IndexParamVideoEnableRoiInfo
= 0x7F000037,
200 /* rotation about encoder's input */
201 #define EXYNOS_INDEX_PARAM_ROATION_INFO "OMX.SEC.indexParam.RotationInfo"
202 OMX_IndexParamRotationInfo
= 0x7F000038,
204 #define EXYNOS_INDEX_CONFIG_OPERATING_RATE "OMX.SEC.index.OperatingRate"
206 /* for custom component(MSRND) */
207 OMX_IndexExynosStartUnused
= 0x7F050000, /* Reserved region for Exynos Extensions */
209 #define EXYNOS_CUSTOM_INDEX_CONFIG_PTS_MODE "OMX.SEC.CUSTOM.index.PTSMode"
210 OMX_IndexExynosConfigPTSMode
= 0x7F050001, /* to support PTS Video TimeStamp - OMX_BOOL */
211 #define EXYNOS_CUSTOM_INDEX_CONFIG_DISPLAY_DELAY "OMX.SEC.CUSTOM.index.DisplayDelay"
212 OMX_IndexExynosConfigDisplayDelay
= 0x7F050002, /* to support H264 DisplayDelay Setting - OMX_U32 */
213 /* Timestamp reorder */
214 #define EXYNOS_CUSTOM_INDEX_PARAM_REORDER_MODE "OMX.SEC.CUSTOM.index.ReorderMode"
215 OMX_IndexExynosParamReorderMode
= 0x7F050003,
216 #define EXYNOS_CUSTOM_INDEX_PARAM_CORRUPTEDHEADER "OMX.SEC.CUSTOM.index.CorruptedHeader"
217 OMX_IndexExynosParamCorruptedHeader
= 0x7F050004,
220 /* for Skype HD Common */
221 #define OMX_MS_SKYPE_PARAM_DRIVERVER "OMX.microsoft.skype.index.driverversion"
222 OMX_IndexSkypeParamDriverVersion
= 0x7F060001,
223 /* for Skype HD Decode */
224 #define OMX_MS_SKYPE_PARAM_DECODERSETTING "OMX.microsoft.skype.index.decodersetting"
225 OMX_IndexSkypeParamDecoderSetting
= 0x7F060002,
226 #define OMX_MS_SKYPE_PARAM_DECODERCAP "OMX.microsoft.skype.index.decodercapability"
227 OMX_IndexSkypeParamDecoderCapability
= 0x7F060003,
228 /* for Skype HD Encode */
229 #define OMX_MS_SKYPE_PARAM_ENCODERSETTING "OMX.microsoft.skype.index.encodersetting"
230 OMX_IndexSkypeParamEncoderSetting
= 0x7F060004,
231 #define OMX_MS_SKYPE_PARAM_ENCODERCAP "OMX.microsoft.skype.index.encodercapability"
232 OMX_IndexSkypeParamEncoderCapability
= 0x7F060005,
233 #define OMX_MS_SKYPE_CONFIG_MARKLTRFRAME "OMX.microsoft.skype.index.markltrframe"
234 OMX_IndexSkypeConfigMarkLTRFrame
= 0x7F060006,
235 #define OMX_MS_SKYPE_CONFIG_USELTRFRAME "OMX.microsoft.skype.index.useltrframe"
236 OMX_IndexSkypeConfigUseLTRFrame
= 0x7F060007,
237 #define OMX_MS_SKYPE_CONFIG_QP "OMX.microsoft.skype.index.qp"
238 OMX_IndexSkypeConfigQP
= 0x7F060008,
239 #define OMX_MS_SKYPE_CONFIG_TEMPORALLAYERCOUNT "OMX.microsoft.skype.index.temporallayercount"
240 OMX_IndexSkypeConfigTemporalLayerCount
= 0x7F060009,
241 #define OMX_MS_SKYPE_CONFIG_BASELAYERPID "OMX.microsoft.skype.index.basepid"
242 OMX_IndexSkypeConfigBasePid
= 0x7F06000a,
244 OMX_IndexExynosEndUnused
= 0x7F05FFFF,
245 } EXYNOS_OMX_INDEXTYPE
;
247 typedef enum _EXYNOS_OMX_ERRORTYPE
249 OMX_ErrorNoEOF
= (OMX_S32
) 0x90000001,
250 OMX_ErrorInputDataDecodeYet
= (OMX_S32
) 0x90000002,
251 OMX_ErrorInputDataEncodeYet
= (OMX_S32
) 0x90000003,
252 OMX_ErrorCodecInit
= (OMX_S32
) 0x90000004,
253 OMX_ErrorCodecDecode
= (OMX_S32
) 0x90000005,
254 OMX_ErrorCodecEncode
= (OMX_S32
) 0x90000006,
255 OMX_ErrorCodecFlush
= (OMX_S32
) 0x90000007,
256 OMX_ErrorOutputBufferUseYet
= (OMX_S32
) 0x90000008,
257 OMX_ErrorCorruptedFrame
= (OMX_S32
) 0x90000009,
258 OMX_ErrorNeedNextHeaderInfo
= (OMX_S32
) 0x90000010,
259 OMX_ErrorNoneSrcSetupFinish
= (OMX_S32
) 0x90000011,
260 OMX_ErrorCorruptedHeader
= (OMX_S32
) 0x90000012,
261 OMX_ErrorNoneExpiration
= (OMX_S32
) 0x90000013,
262 } EXYNOS_OMX_ERRORTYPE
;
264 typedef enum _EXYNOS_OMX_COMMANDTYPE
266 EXYNOS_OMX_CommandComponentDeInit
= 0x7F000001,
267 EXYNOS_OMX_CommandEmptyBuffer
,
268 EXYNOS_OMX_CommandFillBuffer
,
269 EXYNOS_OMX_CommandFakeBuffer
270 } EXYNOS_OMX_COMMANDTYPE
;
272 typedef enum _EXYNOS_OMX_TRANS_STATETYPE
{
273 EXYNOS_OMX_TransStateInvalid
,
274 EXYNOS_OMX_TransStateLoadedToIdle
,
275 EXYNOS_OMX_TransStateIdleToExecuting
,
276 EXYNOS_OMX_TransStateExecutingToIdle
,
277 EXYNOS_OMX_TransStateIdleToLoaded
,
278 EXYNOS_OMX_TransStateMax
= 0X7FFFFFFF
279 } EXYNOS_OMX_TRANS_STATETYPE
;
281 typedef enum _EXYNOS_OMX_COLOR_FORMATTYPE
{
282 OMX_SEC_COLOR_FormatNV12TPhysicalAddress
= 0x7F000001, /**< Reserved region for introducing Vendor Extensions */
283 OMX_SEC_COLOR_FormatNV12LPhysicalAddress
= 0x7F000002,
284 OMX_SEC_COLOR_FormatNV12LVirtualAddress
= 0x7F000003,
285 OMX_SEC_COLOR_FormatNV21LPhysicalAddress
= 0x7F000010,
286 OMX_SEC_COLOR_FormatNV21Linear
= 0x7F000011,
287 OMX_SEC_COLOR_FormatYVU420Planar
= 0x7F000012,
288 OMX_SEC_COLOR_Format32bitABGR8888
= 0x7F000013, /* unused */
289 OMX_SEC_COLOR_FormatYUV420SemiPlanarInterlace
= 0x7F000014,
290 OMX_SEC_COLOR_Format10bitYUV420SemiPlanar
= 0x7F000015,
292 /* to copy a encoded data for drm component using gsc or fimc */
293 OMX_SEC_COLOR_FormatEncodedData
= OMX_COLOR_FormatYCbYCr
,
294 }EXYNOS_OMX_COLOR_FORMATTYPE
;
296 typedef enum _EXYNOS_OMX_SUPPORTFORMAT_TYPE
298 supportFormat_0
= 0x00,
306 } EXYNOS_OMX_SUPPORTFORMAT_TYPE
;
308 typedef enum _EXYNOS_OMX_BUFFERPROCESS_TYPE
310 BUFFER_DEFAULT
= 0x00,
313 BUFFER_METADATA
= 0x04,
314 BUFFER_ANBSHARE
= 0x08,
315 } EXYNOS_OMX_BUFFERPROCESS_TYPE
;
317 #ifdef USE_S3D_SUPPORT
318 typedef enum _EXYNOS_OMX_FPARGMT_TYPE
320 OMX_SEC_FPARGMT_INVALID
= -1,
321 OMX_SEC_FPARGMT_CHECKERBRD_INTERL
= 0x00,
322 OMX_SEC_FPARGMT_COLUMN_INTERL
= 0x01,
323 OMX_SEC_FPARGMT_ROW_INTERL
= 0x02,
324 OMX_SEC_FPARGMT_SIDE_BY_SIDE
= 0x03,
325 OMX_SEC_FPARGMT_TOP_BOTTOM
= 0x04,
326 OMX_SEC_FPARGMT_TEMPORAL_INTERL
= 0x05,
327 OMX_SEC_FPARGMT_NONE
= 0x0A
328 } EXYNOS_OMX_FPARGMT_TYPE
;
331 typedef enum _EXYNOS_OMX_EVENTTYPE
333 OMX_EventVendorStart
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
334 #ifdef USE_S3D_SUPPORT
335 OMX_EventS3DInformation
,
337 } EXYNOS_OMX_EVENTTYPE
;
339 typedef enum _EXYNOS_ANB_TYPE
{
340 NATIVE_GRAPHIC_BUFFER1
,
341 NATIVE_GRAPHIC_BUFFER2
,
344 typedef enum _EXYNOS_OMX_VIDEO_CONTROLRATETYPE
{
345 OMX_Video_ControlRateVendorStart
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
346 OMX_Video_ControlRateConstantVTCall
= 0x7F000001,
347 } EXYNOS_OMX_VIDEO_CONTROLRATETYPE
;
349 typedef struct _EXYNOS_OMX_PRIORITYMGMTTYPE
351 OMX_U32 nGroupPriority
; /* the value 0 represents the highest priority */
352 /* for a group of components */
354 } EXYNOS_OMX_PRIORITYMGMTTYPE
;
356 typedef struct _EXYNOS_OMX_VIDEO_PROFILELEVEL
360 } EXYNOS_OMX_VIDEO_PROFILELEVEL
;
362 typedef struct _EXYNOS_OMX_VIDEO_THUMBNAILMODE
{
364 OMX_VERSIONTYPE nVersion
;
367 } EXYNOS_OMX_VIDEO_THUMBNAILMODE
;
369 typedef struct _EXYNOS_OMX_VIDEO_PARAM_PORTMEMTYPE
{
371 OMX_VERSIONTYPE nVersion
;
373 OMX_BOOL bNeedContigMem
;
374 } EXYNOS_OMX_VIDEO_PARAM_PORTMEMTYPE
;
376 typedef struct _EXYNOS_OMX_VIDEO_PARAM_DTSMODE
{
378 OMX_VERSIONTYPE nVersion
;
380 } EXYNOS_OMX_VIDEO_PARAM_DTSMODE
;
382 typedef struct _EXYNOS_OMX_VIDEO_PARAM_REORDERMODE
{
384 OMX_VERSIONTYPE nVersion
;
385 OMX_BOOL bReorderMode
;
386 } EXYNOS_OMX_VIDEO_PARAM_REORDERMODE
;
388 typedef struct _EXYNOS_OMX_VIDEO_PARAM_CORRUPTEDHEADER
{
390 OMX_VERSIONTYPE nVersion
;
391 OMX_BOOL bDiscardEvent
;
392 } EXYNOS_OMX_VIDEO_PARAM_CORRUPTEDHEADER
;
394 typedef struct _EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO
{
396 OMX_VERSIONTYPE nVersion
;
397 OMX_PTR OMX_IN pVirAddr
;
399 } EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO
;
401 typedef struct _EXYNOS_OMX_VIDEO_CONFIG_QOSINFO
{
403 OMX_VERSIONTYPE nVersion
;
405 } EXYNOS_OMX_VIDEO_CONFIG_QOSINFO
;
407 typedef struct OMX_VIDEO_QPRANGE
{
412 typedef struct OMX_VIDEO_QPRANGETYPE
{
414 OMX_VERSIONTYPE nVersion
;
416 OMX_VIDEO_QPRANGE qpRangeI
;
417 OMX_VIDEO_QPRANGE qpRangeP
;
418 OMX_VIDEO_QPRANGE qpRangeB
; /* H.264, HEVC, MPEG4 */
419 } OMX_VIDEO_QPRANGETYPE
;
422 /* Maximum number of temporal layers */
423 #define OMX_VIDEO_MAX_TEMPORAL_LAYERS 7
424 #define OMX_VIDEO_MAX_TEMPORAL_LAYERS_WITH_LTR 3
425 #define OMX_VIDEO_ANDROID_MAXAVCTEMPORALLAYERS 7
426 #define OMX_VIDEO_ANDROID_MAXHEVCTEMPORALLAYERS 7
428 typedef struct _EXYNOS_OMX_VIDEO_PARAM_ENABLE_TEMPORALSVC
{
430 OMX_VERSIONTYPE nVersion
;
432 OMX_BOOL bEnableTemporalSVC
;
433 } EXYNOS_OMX_VIDEO_PARAM_ENABLE_TEMPORALSVC
;
435 typedef struct _EXYNOS_OMX_VIDEO_CONFIG_TEMPORALSVC
{
437 OMX_VERSIONTYPE nVersion
;
439 OMX_U32 nKeyFrameInterval
;
440 OMX_U32 nTemporalLayerCount
;
441 OMX_U32 nTemporalLayerBitrateRatio
[OMX_VIDEO_MAX_TEMPORAL_LAYERS
];
442 OMX_U32 nMinQuantizer
;
443 OMX_U32 nMaxQuantizer
;
444 } EXYNOS_OMX_VIDEO_CONFIG_TEMPORALSVC
;
446 typedef enum _EXYNOS_OMX_BLUR_MODE
448 BLUR_MODE_NONE
= 0x00,
449 BLUR_MODE_DOWNUP
= 0x01,
450 BLUR_MODE_COEFFICIENT
= 0x02,
451 } EXYNOS_OMX_BLUR_MODE
;
453 typedef enum _EXYNOS_OMX_BLUR_RESOL
455 BLUR_RESOL_240
= 426 * 240, /* 426 x 240 */
456 BLUR_RESOL_480
= 854 * 480, /* 854 x 480 */
457 BLUR_RESOL_720
= 1280 * 720, /* 1280 x 720 */
458 BLUR_RESOL_1080
= 1920 * 1080, /* 1920 x 1080 */
459 } EXYNOS_OMX_BLUR_RESOL
;
461 typedef struct _EXYNOS_OMX_VIDEO_PARAM_ENABLE_BLURFILTER
{
463 OMX_VERSIONTYPE nVersion
;
465 OMX_BOOL bUseBlurFilter
;
466 } EXYNOS_OMX_VIDEO_PARAM_ENABLE_BLURFILTER
;
468 typedef struct _EXYNOS_OMX_VIDEO_CONFIG_BLURINFO
{
470 OMX_VERSIONTYPE nVersion
;
472 EXYNOS_OMX_BLUR_MODE eBlurMode
;
473 EXYNOS_OMX_BLUR_RESOL eTargetResol
;
474 } EXYNOS_OMX_VIDEO_CONFIG_BLURINFO
;
475 /* ROI Information */
477 typedef struct _EXYNOS_OMX_VIDEO_CONFIG_ROIINFO
{
479 OMX_VERSIONTYPE nVersion
;
481 OMX_S32 nUpperQpOffset
;
482 OMX_S32 nLowerQpOffset
;
483 OMX_BOOL bUseRoiInfo
;
484 OMX_S32 nRoiMBInfoSize
;
486 } EXYNOS_OMX_VIDEO_CONFIG_ROIINFO
;
488 typedef struct _EXYNOS_OMX_VIDEO_PARAM_ENABLE_ROIINFO
{
490 OMX_VERSIONTYPE nVersion
;
492 OMX_BOOL bEnableRoiInfo
;
493 } EXYNOS_OMX_VIDEO_PARAM_ENABLE_ROIINFO
;
496 typedef enum _EXYNOS_OMX_ROTATION_TYPE
502 } EXYNOS_OMX_ROTATION_TYPE
;
504 typedef struct _EXYNOS_OMX_VIDEO_PARAM_ROTATION_INFO
{
506 OMX_VERSIONTYPE nVersion
;
508 EXYNOS_OMX_ROTATION_TYPE eRotationType
;
509 } EXYNOS_OMX_VIDEO_PARAM_ROTATION_INFO
;
512 typedef enum EXYNOS_OMX_VIDEO_AVCPROFILETYPE
{
513 OMX_VIDEO_AVCProfileConstrainedBaseline
= 0x7F000001,
514 OMX_VIDEO_AVCProfileConstrainedHigh
= 0x7F000002,
515 } EXYNOS_OMX_VIDEO_AVCPROFILETYPE
;
518 typedef enum _EXYNOS_OMX_HIERARCHICAL_CODING_TYPE
520 EXYNOS_OMX_Hierarchical_P
= 0x00,
521 EXYNOS_OMX_Hierarchical_B
,
522 } EXYNOS_OMX_HIERARCHICAL_CODING_TYPE
;
524 #if defined(USE_VP8_SUPPORT) || defined(USE_VP9_SUPPORT)
525 /** VP8 temporal layer patterns */
526 typedef enum OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE
{
527 OMX_VIDEO_VPXTemporalLayerPatternNone
= 0,
528 OMX_VIDEO_VPXTemporalLayerPatternWebRTC
= 1,
529 OMX_VIDEO_VPXTemporalLayerPatternMax
= 0x7FFFFFFF
530 } OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE
;
534 #ifdef USE_VP8_SUPPORT
535 /** Maximum number of VP8 temporal layers */
536 #define OMX_VIDEO_ANDROID_MAXVP8TEMPORALLAYERS 3
539 typedef enum OMX_VIDEO_VP8PROFILETYPE
{
540 OMX_VIDEO_VP8ProfileMain
= 0x01,
541 OMX_VIDEO_VP8ProfileUnknown
= 0x6EFFFFFF,
542 OMX_VIDEO_VP8ProfileMax
= 0x7FFFFFFF
543 } OMX_VIDEO_VP8PROFILETYPE
;
546 typedef enum OMX_VIDEO_VP8LEVELTYPE
{
547 OMX_VIDEO_VP8Level_Version0
= 0x01,
548 OMX_VIDEO_VP8Level_Version1
= 0x02,
549 OMX_VIDEO_VP8Level_Version2
= 0x04,
550 OMX_VIDEO_VP8Level_Version3
= 0x08,
551 OMX_VIDEO_VP8LevelUnknown
= 0x6EFFFFFF,
552 OMX_VIDEO_VP8LevelMax
= 0x7FFFFFFF
553 } OMX_VIDEO_VP8LEVELTYPE
;
556 typedef struct OMX_VIDEO_PARAM_VP8TYPE
{
558 OMX_VERSIONTYPE nVersion
;
560 OMX_VIDEO_VP8PROFILETYPE eProfile
;
561 OMX_VIDEO_VP8LEVELTYPE eLevel
;
562 OMX_U32 nDCTPartitions
;
563 OMX_BOOL bErrorResilientMode
;
564 } OMX_VIDEO_PARAM_VP8TYPE
;
566 /** Structure for configuring VP8 reference frames */
567 typedef struct OMX_VIDEO_VP8REFERENCEFRAMETYPE
{
569 OMX_VERSIONTYPE nVersion
;
571 OMX_BOOL bPreviousFrameRefresh
;
572 OMX_BOOL bGoldenFrameRefresh
;
573 OMX_BOOL bAlternateFrameRefresh
;
574 OMX_BOOL bUsePreviousFrame
;
575 OMX_BOOL bUseGoldenFrame
;
576 OMX_BOOL bUseAlternateFrame
;
577 } OMX_VIDEO_VP8REFERENCEFRAMETYPE
;
579 /** Structure for querying VP8 reference frame type */
580 typedef struct OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE
{
582 OMX_VERSIONTYPE nVersion
;
584 OMX_BOOL bIsIntraFrame
;
585 OMX_BOOL bIsGoldenOrAlternateFrame
;
586 } OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE
;
589 * Android specific VP8 encoder params
592 * nSize : Size of the structure in bytes
593 * nVersion : OMX specification version information
594 * nPortIndex : Port that this structure applies to
595 * nKeyFrameInterval : Key frame interval in frames
596 * eTemporalPattern : Type of temporal layer pattern
597 * nTemporalLayerCount : Number of temporal coding layers
598 * nTemporalLayerBitrateRatio : Bitrate ratio allocation between temporal
599 * streams in percentage
600 * nMinQuantizer : Minimum (best quality) quantizer
601 * nMaxQuantizer : Maximum (worst quality) quantizer
603 typedef struct OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE
{
605 OMX_VERSIONTYPE nVersion
;
607 OMX_U32 nKeyFrameInterval
;
608 OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE eTemporalPattern
;
609 OMX_U32 nTemporalLayerCount
;
610 OMX_U32 nTemporalLayerBitrateRatio
[OMX_VIDEO_ANDROID_MAXVP8TEMPORALLAYERS
];
611 OMX_U32 nMinQuantizer
;
612 OMX_U32 nMaxQuantizer
;
613 } OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE
;
614 #endif // USE_VP8_SUPPORT
617 #ifdef USE_HEVC_SUPPORT
618 /** HEVC Profile enum type */
619 typedef enum OMX_VIDEO_HEVCPROFILETYPE
{
620 OMX_VIDEO_HEVCProfileUnknown
= 0x0,
621 OMX_VIDEO_HEVCProfileMain
= 0x01, /**< Main profile */
622 OMX_VIDEO_HEVCProfileMain10
= 0x02, /**< Main 10 profile */
623 OMX_VIDEO_HEVCProfileMainStillPicture
= 0x04, /**< Main Still Picture */
624 OMX_VIDEO_HEVCProfileKhronosExtensions
= 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
625 OMX_VIDEO_HEVCProfileVendorStartUnused
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
626 OMX_VIDEO_HEVCProfileMax
= 0x7FFFFFFF
627 } OMX_VIDEO_HEVCPROFILETYPE
;
629 /** HEVC Level enum type */
630 typedef enum OMX_VIDEO_HEVCLEVELTYPE
{
631 OMX_VIDEO_HEVCLevelUnknown
= 0x00000000,
632 OMX_VIDEO_HEVCMainTierLevel1
= 0x00000001, /**< Level 1 */
633 OMX_VIDEO_HEVCHighTierLevel1
= 0x00000002,
634 OMX_VIDEO_HEVCMainTierLevel2
= 0x00000004, /**< Level 2 */
635 OMX_VIDEO_HEVCHighTierLevel2
= 0x00000008,
636 OMX_VIDEO_HEVCMainTierLevel21
= 0x00000010, /**< Level 2.1 */
637 OMX_VIDEO_HEVCHighTierLevel21
= 0x00000020,
638 OMX_VIDEO_HEVCMainTierLevel3
= 0x00000040, /**< Level 3 */
639 OMX_VIDEO_HEVCHighTierLevel3
= 0x00000080,
640 OMX_VIDEO_HEVCMainTierLevel31
= 0x00000100, /**< Level 3.1 */
641 OMX_VIDEO_HEVCHighTierLevel31
= 0x00000200,
642 OMX_VIDEO_HEVCMainTierLevel4
= 0x00000400, /**< Level 4 */
643 OMX_VIDEO_HEVCHighTierLevel4
= 0x00000800,
644 OMX_VIDEO_HEVCMainTierLevel41
= 0x00001000, /**< Level 4.1 */
645 OMX_VIDEO_HEVCHighTierLevel41
= 0x00002000,
646 OMX_VIDEO_HEVCMainTierLevel5
= 0x00004000, /**< Level 5 */
647 OMX_VIDEO_HEVCHighTierLevel5
= 0x00008000,
648 OMX_VIDEO_HEVCMainTierLevel51
= 0x00010000, /**< Level 5.1 */
649 OMX_VIDEO_HEVCHighTierLevel51
= 0x00020000,
650 OMX_VIDEO_HEVCMainTierLevel52
= 0x00040000, /**< Level 5.2 */
651 OMX_VIDEO_HEVCHighTierLevel52
= 0x00080000,
652 OMX_VIDEO_HEVCMainTierLevel6
= 0x00100000, /**< Level 6 */
653 OMX_VIDEO_HEVCHighTierLevel6
= 0x00200000,
654 OMX_VIDEO_HEVCMainTierLevel61
= 0x00400000, /**< Level 6.1 */
655 OMX_VIDEO_HEVCHighTierLevel61
= 0x00800000,
656 OMX_VIDEO_HEVCMainTierLevel62
= 0x01000000, /**< Level 6.2 */
657 OMX_VIDEO_HEVCHighTierLevel62
= 0x02000000,
658 OMX_VIDEO_HEVCLevelKhronosExtensions
= 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
659 OMX_VIDEO_HEVCLevelVendorStartUnused
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
660 OMX_VIDEO_HEVCHighMAX
= 0x7FFFFFFF
661 } OMX_VIDEO_HEVCLEVELTYPE
;
663 /** Structure for controlling HEVC video encoding and decoding */
664 typedef struct OMX_VIDEO_PARAM_HEVCTYPE
{
666 OMX_VERSIONTYPE nVersion
;
668 OMX_VIDEO_HEVCPROFILETYPE eProfile
;
669 OMX_VIDEO_HEVCLEVELTYPE eLevel
;
670 } OMX_VIDEO_PARAM_HEVCTYPE
;
672 #endif // USE_HEVC_SUPPORT
674 /** Structure to define if dependent slice segments should be used */
675 typedef struct OMX_VIDEO_SLICESEGMENTSTYPE
{
677 OMX_VERSIONTYPE nVersion
;
679 OMX_BOOL bDepedentSegments
;
680 OMX_BOOL bEnableLoopFilterAcrossSlices
;
681 } OMX_VIDEO_SLICESEGMENTSTYPE
;
684 #ifdef USE_VP9_SUPPORT
686 typedef enum OMX_VIDEO_VP9PROFILETYPE
{
687 OMX_VIDEO_VP9ProfileMain
= 0x00000001,
688 OMX_VIDEO_VP9ProfileUnknown
= 0x6EFFFFFF,
689 OMX_VIDEO_VP9ProfileKhronosExtensions
= 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
690 OMX_VIDEO_VP9ProfileVendorStartUnused
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
691 OMX_VIDEO_VP9ProfileMax
= 0x7FFFFFFF
692 } OMX_VIDEO_VP9PROFILETYPE
;
695 typedef enum OMX_VIDEO_VP9LEVELTYPE
{
696 OMX_VIDEO_VP9Level_Version0
= 0x00000001,
697 OMX_VIDEO_VP9LevelUnknown
= 0x6EFFFFFF,
698 OMX_VIDEO_VP9LevelKhronosExtensions
= 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
699 OMX_VIDEO_VP9LevelVendorStartUnused
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
700 OMX_VIDEO_VP9LevelMax
= 0x7FFFFFFF
701 } OMX_VIDEO_VP9LEVELTYPE
;
704 typedef struct OMX_VIDEO_PARAM_VP9TYPE
{
706 OMX_VERSIONTYPE nVersion
;
708 OMX_VIDEO_VP9PROFILETYPE eProfile
;
709 OMX_VIDEO_VP9LEVELTYPE eLevel
;
710 OMX_BOOL bErrorResilientMode
;
711 } OMX_VIDEO_PARAM_VP9TYPE
;
713 /* VP9 reference frames */
714 typedef struct OMX_VIDEO_VP9REFERENCEFRAMETYPE
{
716 OMX_VERSIONTYPE nVersion
;
718 OMX_BOOL nPreviousFrameRefresh
;
719 OMX_BOOL bGoldenFrameRefresh
;
720 OMX_BOOL bAlternateFrameRefresh
;
721 OMX_BOOL bUsePreviousFrame
;
722 OMX_BOOL bUseGoldenFrame
;
723 OMX_BOOL bUseAlternateFrame
;
724 } OMX_VIDEO_VP9REFERENCEFRAMETYPE
;
726 /* VP9 reference frame type */
727 typedef struct OMX_VIDEO_VP9REFERENCEFRAMEINFOTYPE
{
729 OMX_VERSIONTYPE nVersion
;
731 OMX_BOOL bIsIntraFrame
;
732 OMX_BOOL bIsGoldenOrAlternateFrame
;
733 } OMX_VIDEO_VP9REFERENCEFRAMEINFOTYPE
;
735 /** Maximum number of VP9 temporal layers */
736 #define OMX_VIDEO_ANDROID_MAXVP9TEMPORALLAYERS 3
739 * Android specific VP9 encoder params
742 * nSize : Size of the structure in bytes
743 * nVersion : OMX specification version information
744 * nPortIndex : Port that this structure applies to
745 * nKeyFrameInterval : Key frame interval in frames
746 * eTemporalPattern : Type of temporal layer pattern
747 * nTemporalLayerCount : Number of temporal coding layers
748 * nTemporalLayerBitrateRatio : Bitrate ratio allocation between temporal
749 * streams in percentage
750 * nMinQuantizer : Minimum (best quality) quantizer
751 * nMaxQuantizer : Maximum (worst quality) quantizer
753 typedef struct OMX_VIDEO_PARAM_ANDROID_VP9ENCODERTYPE
{
755 OMX_VERSIONTYPE nVersion
;
757 OMX_U32 nKeyFrameInterval
;
758 OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE eTemporalPattern
;
759 OMX_U32 nTemporalLayerCount
;
760 OMX_U32 nTemporalLayerBitrateRatio
[OMX_VIDEO_ANDROID_MAXVP9TEMPORALLAYERS
];
761 OMX_U32 nMinQuantizer
;
762 OMX_U32 nMaxQuantizer
;
763 } OMX_VIDEO_PARAM_ANDROID_VP9ENCODERTYPE
;
764 #endif // USE_VP9_SUPPORT
766 #ifndef USE_KHRONOS_OMX_1_2
768 /** WMV Profile enum type */
769 typedef enum OMX_VIDEO_WMVPROFILETYPE
{
770 OMX_VIDEO_WMVProfileSimple
= 0,
771 OMX_VIDEO_WMVProfileMain
,
772 OMX_VIDEO_WMVProfileAdvanced
,
773 OMX_VIDEO_WMVProfileUnknown
= 0x6EFFFFFF,
774 OMX_VIDEO_WMVProfileKhronosExtensions
= 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
775 OMX_VIDEO_WMVProfileVendorStartUnused
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
776 } OMX_VIDEO_WMVPROFILETYPE
;
778 /** WMV Level enum type */
779 typedef enum OMX_VIDEO_WMVLEVELTYPE
{
780 OMX_VIDEO_WMVLevelLow
= 0,
781 OMX_VIDEO_WMVLevelMedium
,
782 OMX_VIDEO_WMVLevelHigh
,
783 OMX_VIDEO_WMVLevelL0
,
784 OMX_VIDEO_WMVLevelL1
,
785 OMX_VIDEO_WMVLevelL2
,
786 OMX_VIDEO_WMVLevelL3
,
787 OMX_VIDEO_WMVLevelL4
,
788 OMX_VIDEO_WMVLevelUnknown
= 0x6EFFFFFF,
789 OMX_VIDEO_WMVLevelKhronosExtensions
= 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
790 OMX_VIDEO_WMVLevelVendorStartUnused
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
791 } OMX_VIDEO_WMVLEVELTYPE
;
794 /** VC1 Profile enum type */
795 typedef enum OMX_VIDEO_VC1PROFILETYPE
{
796 OMX_VIDEO_VC1ProfileUnused
= 0,
797 OMX_VIDEO_VC1ProfileSimple
,
798 OMX_VIDEO_VC1ProfileMain
,
799 OMX_VIDEO_VC1ProfileAdvanced
,
800 OMX_VIDEO_VC1ProfileUnknown
= 0x6EFFFFFF,
801 OMX_VIDEO_VC1ProfileKhronosExtensions
= 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
802 OMX_VIDEO_VC1ProfileVendorStartUnused
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
803 OMX_VIDEO_VC1ProfileMax
804 } OMX_VIDEO_VC1PROFILETYPE
;
806 /** VC1 Level enum type */
807 typedef enum OMX_VIDEO_VC1LEVELTYPE
{
808 OMX_VIDEO_VC1LevelUnused
= 0,
809 OMX_VIDEO_VC1LevelLow
,
810 OMX_VIDEO_VC1LevelMedium
,
811 OMX_VIDEO_VC1LevelHigh
,
817 OMX_VIDEO_VC1LevelUnknown
= 0x6EFFFFFF,
818 OMX_VIDEO_VC1LevelKhronosExtensions
= 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
819 OMX_VIDEO_VC1LevelVendorStartUnused
= 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
820 OMX_VIDEO_VC1LevelMax
821 } OMX_VIDEO_VC1LEVELTYPE
;
823 /** Structure for controlling VC1 video encoding and decoding */
824 typedef struct OMX_VIDEO_PARAM_VC1TYPE
{
826 OMX_VERSIONTYPE nVersion
;
828 OMX_VIDEO_VC1PROFILETYPE eProfile
;
829 OMX_VIDEO_VC1LEVELTYPE eLevel
;
830 } OMX_VIDEO_PARAM_VC1TYPE
;
833 #ifndef __OMX_EXPORTS
834 #define __OMX_EXPORTS
835 #define EXYNOS_EXPORT_REF __attribute__((visibility("default")))
836 #define EXYNOS_IMPORT_REF __attribute__((visibility("default")))