Exynos_OMX_Def: Remove duplicate VP9 defs
[GitHub/LineageOS/android_hardware_samsung_slsi_openmax.git] / include / exynos / Exynos_OMX_Def.h
CommitLineData
a9bdc01e
T
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//#define PERFORMANCE_DEBUG
31
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"
37
38#define VERSIONMAJOR_NUMBER 1
39#define VERSIONMINOR_NUMBER 1
40#define REVISION_NUMBER 2
41#define STEP_NUMBER 0
42
43#define RESOURCE_VIDEO_DEC 16
44#define RESOURCE_VIDEO_ENC 16
45#define RESOURCE_AUDIO_DEC 10
46
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
53
54#define MAX_BUFFER_REF 40
55#define MAX_TIMESTAMP MAX_BUFFER_REF
56#define MAX_FLAGS MAX_BUFFER_REF
57
58#define MAX_BUFFER_PLANE 3
59
60#define INDEX_AFTER_EOS 0xE05
61
62#define DEFAULT_TIMESTAMP_VAL (-1010101010)
63#define RESET_TIMESTAMP_VAL (-1001001001)
64
65// The largest metadata buffer size advertised
66// when metadata buffer mode is used
67#define MAX_METADATA_BUFFER_SIZE (64)
68
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)
71
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/"
75
76typedef enum _EXYNOS_CODEC_TYPE
77{
78 SW_CODEC,
79 HW_VIDEO_DEC_CODEC,
80 HW_VIDEO_ENC_CODEC,
81 HW_VIDEO_DEC_SECURE_CODEC,
82 HW_VIDEO_ENC_SECURE_CODEC,
83 HW_AUDIO_DEC_CODEC,
84 HW_AUDIO_ENC_CODEC
85} EXYNOS_CODEC_TYPE;
86
87#define PLANE_MAX_NUM 3
88typedef enum _PLANE_TYPE {
89 PLANE_MULTIPLE = 0x00,
90 PLANE_SINGLE = 0x11,
91 PLANE_SINGLE_USER = 0x12,
92} PLANE_TYPE;
93
94typedef enum _EXYNOS_OMX_INDEXTYPE
95{
96#define EXYNOS_INDEX_PARAM_THUMBNAIL "OMX.SEC.index.ThumbnailMode"
97 OMX_IndexVendorThumbnailMode = 0x7F000001,
98
99#define EXYNOS_INDEX_CONFIG_VIDEO_INTRAPERIOD "OMX.SEC.index.VideoIntraPeriod"
100 OMX_IndexConfigVideoIntraPeriod = 0x7F000002,
101
102#ifdef USE_S3D_SUPPORT
103#define EXYNOS_INDEX_PARAM_GET_S3D "OMX.SEC.index.S3DMode"
104 OMX_IndexVendorS3DMode = 0x7F000003,
105#endif
106
107#define EXYNOS_INDEX_PARAM_NEED_CONTIG_MEMORY "OMX.SEC.index.NeedContigMemory"
108 OMX_IndexVendorNeedContigMemory = 0x7F000004,
109
110#define EXYNOS_INDEX_CONFIG_GET_BUFFER_FD "OMX.SEC.index.GetBufferFD"
111 OMX_IndexVendorGetBufferFD = 0x7F000005,
112
113#define EXYNOS_INDEX_PARAM_SET_DTS_MODE "OMX.SEC.index.SetDTSMode"
114 OMX_IndexVendorSetDTSMode = 0x7F000006,
115
116#define EXYNOS_INDEX_CONFIG_SET_QOS_RATIO "OMX.SEC.index.SetQosRatio"
117 OMX_IndexVendorSetQosRatio = 0x7F000007,
118
119 /* for Android Native Window */
120#define EXYNOS_INDEX_PARAM_ENABLE_ANB "OMX.google.android.index.enableAndroidNativeBuffers"
121 OMX_IndexParamEnableAndroidBuffers = 0x7F000011,
122
123#define EXYNOS_INDEX_PARAM_GET_ANB "OMX.google.android.index.getAndroidNativeBufferUsage"
124 OMX_IndexParamGetAndroidNativeBuffer = 0x7F000012,
125
126#define EXYNOS_INDEX_PARAM_USE_ANB "OMX.google.android.index.useAndroidNativeBuffer"
127 OMX_IndexParamUseAndroidNativeBuffer = 0x7F000013,
128
129 /* for Android Store Metadata Inbuffer */
130#define EXYNOS_INDEX_PARAM_STORE_METADATA_BUFFER "OMX.google.android.index.storeMetaDataInBuffers"
131 OMX_IndexParamStoreMetaDataBuffer = 0x7F000014,
132
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,
136
a9bdc01e
T
137 /* HEVC Codec */
138#ifdef USE_HEVC_SUPPORT
139#define EXYNOS_INDEX_PARAM_VIDEO_HEVC_TYPE "OMX.SEC.index.VideoHevcType"
a9bdc01e
T
140#endif // USE_HEVC_SUPPORT
141
a9bdc01e
T
142 /* Thumbnail */
143#define EXYNOS_INDEX_PARAM_ENABLE_THUMBNAIL "OMX.SEC.index.enableThumbnailMode"
144 OMX_IndexParamEnableThumbnailMode = 0x7F000020,
145
146 /* Android Native Buffer */
147#define EXYNOS_INDEX_PARAM_USE_ANB2 "OMX.google.android.index.useAndroidNativeBuffer2"
148 OMX_IndexParamUseAndroidNativeBuffer2 = 0x7F000021,
149
150 /* QP control */
151#define EXYNOS_INDEX_PARAM_VIDEO_QPRANGE_TYPE "OMX.SEC.indexParam.VideoQPRange"
152 OMX_IndexParamVideoQPRange = 0x7F000022,
153
154#define EXYNOS_INDEX_CONFIG_VIDEO_QPRANGE_TYPE "OMX.SEC.indexConfig.VideoQPRange"
155 OMX_IndexConfigVideoQPRange = 0x7F000023,
156
a9bdc01e 157#define EXYNOS_INDEX_PARAM_SLICE_SEGMENTS "OMX.SEC.index.SliceSegments"
a9bdc01e
T
158
159 /* Temporal SVC */
160#define EXYNOS_INDEX_CONFIG_VIDEO_TEMPORALSVC "OMX.SEC.index.TemporalSVC"
161 OMX_IndexConfigVideoTemporalSVC = 0x7F000026,
162
163#define EXYNOS_INDEX_PARAM_VIDEO_AVC_ENABLE_TEMPORALSVC "OMX.SEC.index.AVC.enableTemporalSVC"
164 OMX_IndexParamVideoAVCEnableTemporalSVC = 0x7F000027,
165
166 /* VC1 Codec */
167#ifndef USE_KHRONOS_OMX_1_2
168#define EXYNOS_INDEX_PARAM_VIDEO_VC1_TYPE "OMX.SEC.index.VideoVc1Type"
169 OMX_IndexParamVideoVC1 = 0x7F000028,
170#endif
171
a9bdc01e
T
172 /* VP9 Codec */
173#ifdef USE_VP9_SUPPORT
174#define EXYNOS_INDEX_PARAM_VIDEO_VP9_TYPE "OMX.SEC.index.VideoVp9Type"
a9bdc01e
T
175
176#define EXYNOS_INDEX_CONFIG_VIDEO_VP9_REFERENCEFRAME "OMX.SEC.index.VideoVp9ReferenceFrame"
177 OMX_IndexConfigVideoVp9ReferenceFrame = 0x7F000030,
178
179#define EXYNOS_INDEX_CONFIG_VIDEO_VP9_REFERENCEFRAMETYPE "OMX.SEC.index.VideoVp9ReferenceFrameType"
180 OMX_IndexConfigVideoVp9ReferenceFrameType = 0x7F000031,
181
182#define EXYNOS_INDEX_PARAM_VIDEO_ANDROID_VP9_ENCODER "OMX.SEC.index.VideoAndroidVP9Encoder"
a9bdc01e 183#endif // USE_VP9_SUPPORT
a9bdc01e
T
184
185 /* blur filtering */
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,
190
191#define EXYNOS_INDEX_PARAM_VIDEO_HEVC_ENABLE_TEMPORALSVC "OMX.SEC.index.Hevc.enableTemporalSVC"
192 OMX_IndexParamVideoHevcEnableTemporalSVC = 0x7F000035,
193
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,
199
200 /* rotation about encoder's input */
201#define EXYNOS_INDEX_PARAM_ROATION_INFO "OMX.SEC.indexParam.RotationInfo"
202 OMX_IndexParamRotationInfo = 0x7F000038,
203
204#define EXYNOS_INDEX_CONFIG_OPERATING_RATE "OMX.SEC.index.OperatingRate"
a9bdc01e
T
205
206 /* for custom component(MSRND) */
207 OMX_IndexExynosStartUnused = 0x7F050000, /* Reserved region for Exynos Extensions */
208
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,
218
219
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,
243
244 OMX_IndexExynosEndUnused = 0x7F05FFFF,
245} EXYNOS_OMX_INDEXTYPE;
246
247typedef enum _EXYNOS_OMX_ERRORTYPE
248{
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;
263
264typedef enum _EXYNOS_OMX_COMMANDTYPE
265{
266 EXYNOS_OMX_CommandComponentDeInit = 0x7F000001,
267 EXYNOS_OMX_CommandEmptyBuffer,
268 EXYNOS_OMX_CommandFillBuffer,
269 EXYNOS_OMX_CommandFakeBuffer
270} EXYNOS_OMX_COMMANDTYPE;
271
272typedef 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;
280
281typedef 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,
a9bdc01e
T
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,
291
292 /* to copy a encoded data for drm component using gsc or fimc */
293 OMX_SEC_COLOR_FormatEncodedData = OMX_COLOR_FormatYCbYCr,
a9bdc01e
T
294}EXYNOS_OMX_COLOR_FORMATTYPE;
295
296typedef enum _EXYNOS_OMX_SUPPORTFORMAT_TYPE
297{
298 supportFormat_0 = 0x00,
299 supportFormat_1,
300 supportFormat_2,
301 supportFormat_3,
302 supportFormat_4,
303 supportFormat_5,
304 supportFormat_6,
305 supportFormat_7,
306} EXYNOS_OMX_SUPPORTFORMAT_TYPE;
307
308typedef enum _EXYNOS_OMX_BUFFERPROCESS_TYPE
309{
310 BUFFER_DEFAULT = 0x00,
311 BUFFER_COPY = 0x01,
312 BUFFER_SHARE = 0x02,
313 BUFFER_METADATA = 0x04,
314 BUFFER_ANBSHARE = 0x08,
315} EXYNOS_OMX_BUFFERPROCESS_TYPE;
316
317#ifdef USE_S3D_SUPPORT
318typedef enum _EXYNOS_OMX_FPARGMT_TYPE
319{
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;
329#endif
330
331typedef enum _EXYNOS_OMX_EVENTTYPE
332{
333 OMX_EventVendorStart = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
334#ifdef USE_S3D_SUPPORT
335 OMX_EventS3DInformation,
336#endif
337} EXYNOS_OMX_EVENTTYPE;
338
339typedef enum _EXYNOS_ANB_TYPE {
340 NATIVE_GRAPHIC_BUFFER1,
341 NATIVE_GRAPHIC_BUFFER2,
342} EXYNOS_ANB_TYPE;
343
344typedef 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;
348
349typedef struct _EXYNOS_OMX_PRIORITYMGMTTYPE
350{
351 OMX_U32 nGroupPriority; /* the value 0 represents the highest priority */
352 /* for a group of components */
353 OMX_U32 nGroupID;
354} EXYNOS_OMX_PRIORITYMGMTTYPE;
355
356typedef struct _EXYNOS_OMX_VIDEO_PROFILELEVEL
357{
358 OMX_S32 profile;
359 OMX_S32 level;
360} EXYNOS_OMX_VIDEO_PROFILELEVEL;
361
362typedef struct _EXYNOS_OMX_VIDEO_THUMBNAILMODE {
363 OMX_U32 nSize;
364 OMX_VERSIONTYPE nVersion;
365 OMX_U32 nPortIndex;
366 OMX_BOOL bEnable;
367} EXYNOS_OMX_VIDEO_THUMBNAILMODE;
368
369typedef struct _EXYNOS_OMX_VIDEO_PARAM_PORTMEMTYPE {
370 OMX_U32 nSize;
371 OMX_VERSIONTYPE nVersion;
372 OMX_U32 nPortIndex;
373 OMX_BOOL bNeedContigMem;
374} EXYNOS_OMX_VIDEO_PARAM_PORTMEMTYPE;
375
376typedef struct _EXYNOS_OMX_VIDEO_PARAM_DTSMODE {
377 OMX_U32 nSize;
378 OMX_VERSIONTYPE nVersion;
379 OMX_BOOL bDTSMode;
380} EXYNOS_OMX_VIDEO_PARAM_DTSMODE;
381
382typedef struct _EXYNOS_OMX_VIDEO_PARAM_REORDERMODE {
383 OMX_U32 nSize;
384 OMX_VERSIONTYPE nVersion;
385 OMX_BOOL bReorderMode;
386} EXYNOS_OMX_VIDEO_PARAM_REORDERMODE;
387
388typedef struct _EXYNOS_OMX_VIDEO_PARAM_CORRUPTEDHEADER {
389 OMX_U32 nSize;
390 OMX_VERSIONTYPE nVersion;
391 OMX_BOOL bDiscardEvent;
392} EXYNOS_OMX_VIDEO_PARAM_CORRUPTEDHEADER;
393
394typedef struct _EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO {
395 OMX_U32 nSize;
396 OMX_VERSIONTYPE nVersion;
397 OMX_PTR OMX_IN pVirAddr;
398 OMX_S32 OMX_OUT fd;
399} EXYNOS_OMX_VIDEO_CONFIG_BUFFERINFO;
400
401typedef struct _EXYNOS_OMX_VIDEO_CONFIG_QOSINFO {
402 OMX_U32 nSize;
403 OMX_VERSIONTYPE nVersion;
404 OMX_U32 nQosRatio;
405} EXYNOS_OMX_VIDEO_CONFIG_QOSINFO;
406
407typedef struct OMX_VIDEO_QPRANGE {
408 OMX_U32 nMinQP;
409 OMX_U32 nMaxQP;
410} OMX_VIDEO_QPRANGE;
411
412typedef struct OMX_VIDEO_QPRANGETYPE {
413 OMX_U32 nSize;
414 OMX_VERSIONTYPE nVersion;
415 OMX_U32 nPortIndex;
416 OMX_VIDEO_QPRANGE qpRangeI;
417 OMX_VIDEO_QPRANGE qpRangeP;
418 OMX_VIDEO_QPRANGE qpRangeB; /* H.264, HEVC, MPEG4 */
419} OMX_VIDEO_QPRANGETYPE;
420
421/* Temporal SVC */
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
427
428typedef struct _EXYNOS_OMX_VIDEO_PARAM_ENABLE_TEMPORALSVC {
429 OMX_U32 nSize;
430 OMX_VERSIONTYPE nVersion;
431 OMX_U32 nPortIndex;
432 OMX_BOOL bEnableTemporalSVC;
433} EXYNOS_OMX_VIDEO_PARAM_ENABLE_TEMPORALSVC;
434
435typedef struct _EXYNOS_OMX_VIDEO_CONFIG_TEMPORALSVC {
436 OMX_U32 nSize;
437 OMX_VERSIONTYPE nVersion;
438 OMX_U32 nPortIndex;
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;
445
446typedef enum _EXYNOS_OMX_BLUR_MODE
447{
448 BLUR_MODE_NONE = 0x00,
449 BLUR_MODE_DOWNUP = 0x01,
450 BLUR_MODE_COEFFICIENT = 0x02,
451} EXYNOS_OMX_BLUR_MODE;
452
453typedef enum _EXYNOS_OMX_BLUR_RESOL
454{
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;
460
461typedef struct _EXYNOS_OMX_VIDEO_PARAM_ENABLE_BLURFILTER {
462 OMX_U32 nSize;
463 OMX_VERSIONTYPE nVersion;
464 OMX_U32 nPortIndex;
465 OMX_BOOL bUseBlurFilter;
466} EXYNOS_OMX_VIDEO_PARAM_ENABLE_BLURFILTER;
467
468typedef struct _EXYNOS_OMX_VIDEO_CONFIG_BLURINFO {
469 OMX_U32 nSize;
470 OMX_VERSIONTYPE nVersion;
471 OMX_U32 nPortIndex;
472 EXYNOS_OMX_BLUR_MODE eBlurMode;
473 EXYNOS_OMX_BLUR_RESOL eTargetResol;
474} EXYNOS_OMX_VIDEO_CONFIG_BLURINFO;
475/* ROI Information */
476
477typedef struct _EXYNOS_OMX_VIDEO_CONFIG_ROIINFO {
478 OMX_U32 nSize;
479 OMX_VERSIONTYPE nVersion;
480 OMX_U32 nPortIndex;
481 OMX_S32 nUpperQpOffset;
482 OMX_S32 nLowerQpOffset;
483 OMX_BOOL bUseRoiInfo;
484 OMX_S32 nRoiMBInfoSize;
485 OMX_PTR pRoiMBInfo;
486} EXYNOS_OMX_VIDEO_CONFIG_ROIINFO;
487
488typedef struct _EXYNOS_OMX_VIDEO_PARAM_ENABLE_ROIINFO {
489 OMX_U32 nSize;
490 OMX_VERSIONTYPE nVersion;
491 OMX_U32 nPortIndex;
492 OMX_BOOL bEnableRoiInfo;
493} EXYNOS_OMX_VIDEO_PARAM_ENABLE_ROIINFO;
494
495
496typedef enum _EXYNOS_OMX_ROTATION_TYPE
497{
498 ROTATE_0 = 0,
499 ROTATE_90 = 90,
500 ROTATE_180 = 180,
501 ROTATE_270 = 270,
502} EXYNOS_OMX_ROTATION_TYPE;
503
504typedef struct _EXYNOS_OMX_VIDEO_PARAM_ROTATION_INFO {
505 OMX_U32 nSize;
506 OMX_VERSIONTYPE nVersion;
507 OMX_U32 nPortIndex;
508 EXYNOS_OMX_ROTATION_TYPE eRotationType;
509} EXYNOS_OMX_VIDEO_PARAM_ROTATION_INFO;
510
511/* for AVC */
512typedef enum EXYNOS_OMX_VIDEO_AVCPROFILETYPE {
513 OMX_VIDEO_AVCProfileConstrainedBaseline = 0x7F000001,
514 OMX_VIDEO_AVCProfileConstrainedHigh = 0x7F000002,
515} EXYNOS_OMX_VIDEO_AVCPROFILETYPE;
516
a9bdc01e
T
517
518typedef enum _EXYNOS_OMX_HIERARCHICAL_CODING_TYPE
519{
520 EXYNOS_OMX_Hierarchical_P = 0x00,
521 EXYNOS_OMX_Hierarchical_B,
522} EXYNOS_OMX_HIERARCHICAL_CODING_TYPE;
523
a9bdc01e
T
524#if defined(USE_VP8_SUPPORT) || defined(USE_VP9_SUPPORT)
525/** VP8 temporal layer patterns */
526typedef 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;
531#endif
532
533 /* VP8 Codec */
534#ifdef USE_VP8_SUPPORT
535/** Maximum number of VP8 temporal layers */
536#define OMX_VIDEO_ANDROID_MAXVP8TEMPORALLAYERS 3
537
538/**
539 * Android specific VP8 encoder params
540 *
541 * STRUCT MEMBERS:
542 * nSize : Size of the structure in bytes
543 * nVersion : OMX specification version information
544 * nPortIndex : Port that this structure applies to
545 * nKeyFrameInterval : Key frame interval in frames
546 * eTemporalPattern : Type of temporal layer pattern
547 * nTemporalLayerCount : Number of temporal coding layers
548 * nTemporalLayerBitrateRatio : Bitrate ratio allocation between temporal
549 * streams in percentage
550 * nMinQuantizer : Minimum (best quality) quantizer
551 * nMaxQuantizer : Maximum (worst quality) quantizer
552 */
553typedef struct OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE {
554 OMX_U32 nSize;
555 OMX_VERSIONTYPE nVersion;
556 OMX_U32 nPortIndex;
557 OMX_U32 nKeyFrameInterval;
558 OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE eTemporalPattern;
559 OMX_U32 nTemporalLayerCount;
560 OMX_U32 nTemporalLayerBitrateRatio[OMX_VIDEO_ANDROID_MAXVP8TEMPORALLAYERS];
561 OMX_U32 nMinQuantizer;
562 OMX_U32 nMaxQuantizer;
563} OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE;
564#endif // USE_VP8_SUPPORT
565
566 /* HEVC codec */
567#ifdef USE_HEVC_SUPPORT
568/** HEVC Profile enum type */
569typedef enum OMX_VIDEO_HEVCPROFILETYPE {
570 OMX_VIDEO_HEVCProfileUnknown = 0x0,
571 OMX_VIDEO_HEVCProfileMain = 0x01, /**< Main profile */
572 OMX_VIDEO_HEVCProfileMain10 = 0x02, /**< Main 10 profile */
573 OMX_VIDEO_HEVCProfileMainStillPicture = 0x04, /**< Main Still Picture */
574 OMX_VIDEO_HEVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
575 OMX_VIDEO_HEVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
576 OMX_VIDEO_HEVCProfileMax = 0x7FFFFFFF
577} OMX_VIDEO_HEVCPROFILETYPE;
578
579/** HEVC Level enum type */
580typedef enum OMX_VIDEO_HEVCLEVELTYPE {
581 OMX_VIDEO_HEVCLevelUnknown = 0x00000000,
582 OMX_VIDEO_HEVCMainTierLevel1 = 0x00000001, /**< Level 1 */
583 OMX_VIDEO_HEVCHighTierLevel1 = 0x00000002,
584 OMX_VIDEO_HEVCMainTierLevel2 = 0x00000004, /**< Level 2 */
585 OMX_VIDEO_HEVCHighTierLevel2 = 0x00000008,
586 OMX_VIDEO_HEVCMainTierLevel21 = 0x00000010, /**< Level 2.1 */
587 OMX_VIDEO_HEVCHighTierLevel21 = 0x00000020,
588 OMX_VIDEO_HEVCMainTierLevel3 = 0x00000040, /**< Level 3 */
589 OMX_VIDEO_HEVCHighTierLevel3 = 0x00000080,
590 OMX_VIDEO_HEVCMainTierLevel31 = 0x00000100, /**< Level 3.1 */
591 OMX_VIDEO_HEVCHighTierLevel31 = 0x00000200,
592 OMX_VIDEO_HEVCMainTierLevel4 = 0x00000400, /**< Level 4 */
593 OMX_VIDEO_HEVCHighTierLevel4 = 0x00000800,
594 OMX_VIDEO_HEVCMainTierLevel41 = 0x00001000, /**< Level 4.1 */
595 OMX_VIDEO_HEVCHighTierLevel41 = 0x00002000,
596 OMX_VIDEO_HEVCMainTierLevel5 = 0x00004000, /**< Level 5 */
597 OMX_VIDEO_HEVCHighTierLevel5 = 0x00008000,
598 OMX_VIDEO_HEVCMainTierLevel51 = 0x00010000, /**< Level 5.1 */
599 OMX_VIDEO_HEVCHighTierLevel51 = 0x00020000,
600 OMX_VIDEO_HEVCMainTierLevel52 = 0x00040000, /**< Level 5.2 */
601 OMX_VIDEO_HEVCHighTierLevel52 = 0x00080000,
602 OMX_VIDEO_HEVCMainTierLevel6 = 0x00100000, /**< Level 6 */
603 OMX_VIDEO_HEVCHighTierLevel6 = 0x00200000,
604 OMX_VIDEO_HEVCMainTierLevel61 = 0x00400000, /**< Level 6.1 */
605 OMX_VIDEO_HEVCHighTierLevel61 = 0x00800000,
606 OMX_VIDEO_HEVCMainTierLevel62 = 0x01000000, /**< Level 6.2 */
607 OMX_VIDEO_HEVCHighTierLevel62 = 0x02000000,
608 OMX_VIDEO_HEVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
609 OMX_VIDEO_HEVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
610 OMX_VIDEO_HEVCHighMAX = 0x7FFFFFFF
611} OMX_VIDEO_HEVCLEVELTYPE;
612
613/** Structure for controlling HEVC video encoding and decoding */
614typedef struct OMX_VIDEO_PARAM_HEVCTYPE {
615 OMX_U32 nSize;
616 OMX_VERSIONTYPE nVersion;
617 OMX_U32 nPortIndex;
618 OMX_VIDEO_HEVCPROFILETYPE eProfile;
619 OMX_VIDEO_HEVCLEVELTYPE eLevel;
620} OMX_VIDEO_PARAM_HEVCTYPE;
621
622#endif // USE_HEVC_SUPPORT
623
624/** Structure to define if dependent slice segments should be used */
625typedef struct OMX_VIDEO_SLICESEGMENTSTYPE {
626 OMX_U32 nSize;
627 OMX_VERSIONTYPE nVersion;
628 OMX_U32 nPortIndex;
629 OMX_BOOL bDepedentSegments;
630 OMX_BOOL bEnableLoopFilterAcrossSlices;
631} OMX_VIDEO_SLICESEGMENTSTYPE;
632
a9bdc01e
T
633 /* VP9 Codec */
634#ifdef USE_VP9_SUPPORT
635 /* VP9 profiles */
636typedef enum OMX_VIDEO_VP9PROFILETYPE {
637 OMX_VIDEO_VP9ProfileMain = 0x00000001,
638 OMX_VIDEO_VP9ProfileUnknown = 0x6EFFFFFF,
639 OMX_VIDEO_VP9ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
640 OMX_VIDEO_VP9ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
641 OMX_VIDEO_VP9ProfileMax = 0x7FFFFFFF
642} OMX_VIDEO_VP9PROFILETYPE;
643
644 /* VP9 levels */
645typedef enum OMX_VIDEO_VP9LEVELTYPE {
646 OMX_VIDEO_VP9Level_Version0 = 0x00000001,
647 OMX_VIDEO_VP9LevelUnknown = 0x6EFFFFFF,
648 OMX_VIDEO_VP9LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
649 OMX_VIDEO_VP9LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
650 OMX_VIDEO_VP9LevelMax = 0x7FFFFFFF
651} OMX_VIDEO_VP9LEVELTYPE;
652
653 /* VP9 param */
654typedef struct OMX_VIDEO_PARAM_VP9TYPE {
655 OMX_U32 nSize;
656 OMX_VERSIONTYPE nVersion;
657 OMX_U32 nPortIndex;
658 OMX_VIDEO_VP9PROFILETYPE eProfile;
659 OMX_VIDEO_VP9LEVELTYPE eLevel;
660 OMX_BOOL bErrorResilientMode;
661} OMX_VIDEO_PARAM_VP9TYPE;
662
663 /* VP9 reference frames */
664typedef struct OMX_VIDEO_VP9REFERENCEFRAMETYPE {
665 OMX_U32 nSize;
666 OMX_VERSIONTYPE nVersion;
667 OMX_U32 nPortIndex;
668 OMX_BOOL nPreviousFrameRefresh;
669 OMX_BOOL bGoldenFrameRefresh;
670 OMX_BOOL bAlternateFrameRefresh;
671 OMX_BOOL bUsePreviousFrame;
672 OMX_BOOL bUseGoldenFrame;
673 OMX_BOOL bUseAlternateFrame;
674} OMX_VIDEO_VP9REFERENCEFRAMETYPE;
675
676 /* VP9 reference frame type */
677typedef struct OMX_VIDEO_VP9REFERENCEFRAMEINFOTYPE {
678 OMX_U32 nSize;
679 OMX_VERSIONTYPE nVersion;
680 OMX_U32 nPortIndex;
681 OMX_BOOL bIsIntraFrame;
682 OMX_BOOL bIsGoldenOrAlternateFrame;
683} OMX_VIDEO_VP9REFERENCEFRAMEINFOTYPE;
684
685/** Maximum number of VP9 temporal layers */
686#define OMX_VIDEO_ANDROID_MAXVP9TEMPORALLAYERS 3
687
688/**
689 * Android specific VP9 encoder params
690 *
691 * STRUCT MEMBERS:
692 * nSize : Size of the structure in bytes
693 * nVersion : OMX specification version information
694 * nPortIndex : Port that this structure applies to
695 * nKeyFrameInterval : Key frame interval in frames
696 * eTemporalPattern : Type of temporal layer pattern
697 * nTemporalLayerCount : Number of temporal coding layers
698 * nTemporalLayerBitrateRatio : Bitrate ratio allocation between temporal
699 * streams in percentage
700 * nMinQuantizer : Minimum (best quality) quantizer
701 * nMaxQuantizer : Maximum (worst quality) quantizer
702 */
703typedef struct OMX_VIDEO_PARAM_ANDROID_VP9ENCODERTYPE {
704 OMX_U32 nSize;
705 OMX_VERSIONTYPE nVersion;
706 OMX_U32 nPortIndex;
707 OMX_U32 nKeyFrameInterval;
708 OMX_VIDEO_ANDROID_VPXTEMPORALLAYERPATTERNTYPE eTemporalPattern;
709 OMX_U32 nTemporalLayerCount;
710 OMX_U32 nTemporalLayerBitrateRatio[OMX_VIDEO_ANDROID_MAXVP9TEMPORALLAYERS];
711 OMX_U32 nMinQuantizer;
712 OMX_U32 nMaxQuantizer;
713} OMX_VIDEO_PARAM_ANDROID_VP9ENCODERTYPE;
714#endif // USE_VP9_SUPPORT
a9bdc01e
T
715
716#ifndef USE_KHRONOS_OMX_1_2
717/* WMV codec */
718/** WMV Profile enum type */
719typedef enum OMX_VIDEO_WMVPROFILETYPE {
720 OMX_VIDEO_WMVProfileSimple = 0,
721 OMX_VIDEO_WMVProfileMain,
722 OMX_VIDEO_WMVProfileAdvanced,
723 OMX_VIDEO_WMVProfileUnknown = 0x6EFFFFFF,
724 OMX_VIDEO_WMVProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
725 OMX_VIDEO_WMVProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
726} OMX_VIDEO_WMVPROFILETYPE;
727
728/** WMV Level enum type */
729typedef enum OMX_VIDEO_WMVLEVELTYPE {
730 OMX_VIDEO_WMVLevelLow = 0,
731 OMX_VIDEO_WMVLevelMedium,
732 OMX_VIDEO_WMVLevelHigh,
733 OMX_VIDEO_WMVLevelL0,
734 OMX_VIDEO_WMVLevelL1,
735 OMX_VIDEO_WMVLevelL2,
736 OMX_VIDEO_WMVLevelL3,
737 OMX_VIDEO_WMVLevelL4,
738 OMX_VIDEO_WMVLevelUnknown = 0x6EFFFFFF,
739 OMX_VIDEO_WMVLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
740 OMX_VIDEO_WMVLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
741} OMX_VIDEO_WMVLEVELTYPE;
742
743/* VC1 codec */
744/** VC1 Profile enum type */
745typedef enum OMX_VIDEO_VC1PROFILETYPE {
746 OMX_VIDEO_VC1ProfileUnused = 0,
747 OMX_VIDEO_VC1ProfileSimple,
748 OMX_VIDEO_VC1ProfileMain,
749 OMX_VIDEO_VC1ProfileAdvanced,
750 OMX_VIDEO_VC1ProfileUnknown = 0x6EFFFFFF,
751 OMX_VIDEO_VC1ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
752 OMX_VIDEO_VC1ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
753 OMX_VIDEO_VC1ProfileMax
754} OMX_VIDEO_VC1PROFILETYPE;
755
756/** VC1 Level enum type */
757typedef enum OMX_VIDEO_VC1LEVELTYPE {
758 OMX_VIDEO_VC1LevelUnused = 0,
759 OMX_VIDEO_VC1LevelLow,
760 OMX_VIDEO_VC1LevelMedium,
761 OMX_VIDEO_VC1LevelHigh,
762 OMX_VIDEO_VC1Level0,
763 OMX_VIDEO_VC1Level1,
764 OMX_VIDEO_VC1Level2,
765 OMX_VIDEO_VC1Level3,
766 OMX_VIDEO_VC1Level4,
767 OMX_VIDEO_VC1LevelUnknown = 0x6EFFFFFF,
768 OMX_VIDEO_VC1LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
769 OMX_VIDEO_VC1LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
770 OMX_VIDEO_VC1LevelMax
771} OMX_VIDEO_VC1LEVELTYPE;
772
773/** Structure for controlling VC1 video encoding and decoding */
774typedef struct OMX_VIDEO_PARAM_VC1TYPE {
775 OMX_U32 nSize;
776 OMX_VERSIONTYPE nVersion;
777 OMX_U32 nPortIndex;
778 OMX_VIDEO_VC1PROFILETYPE eProfile;
779 OMX_VIDEO_VC1LEVELTYPE eLevel;
780} OMX_VIDEO_PARAM_VC1TYPE;
781#endif
782
783#ifndef __OMX_EXPORTS
784#define __OMX_EXPORTS
785#define EXYNOS_EXPORT_REF __attribute__((visibility("default")))
786#define EXYNOS_IMPORT_REF __attribute__((visibility("default")))
787#endif
788
789#endif