1 /*--------------------------------------------------------------------------
2 Copyright (c) 2009-2016, The Linux Foundation. All rights reserved.
3 
4 Redistribution and use in source and binary forms, with or without
5 modification, are permitted provided that the following conditions are met:
6     * Redistributions of source code must retain the above copyright
7       notice, this list of conditions and the following disclaimer.
8     * Redistributions in binary form must reproduce the above copyright
9       notice, this list of conditions and the following disclaimer in the
10       documentation and/or other materials provided with the distribution.
11     * Neither the name of The Linux Foundation nor
12       the names of its contributors may be used to endorse or promote
13       products derived from this software without specific prior written
14       permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 --------------------------------------------------------------------------*/
28 #ifndef __OMX_QCOM_EXTENSIONS_H__
29 #define __OMX_QCOM_EXTENSIONS_H__
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34 
35 /*============================================================================
36 *//** @file OMX_QCOMExtns.h
37   This header contains constants and type definitions that specify the
38   extensions added to the OpenMAX Vendor specific APIs.
39 
40 *//*========================================================================*/
41 
42 
43 ///////////////////////////////////////////////////////////////////////////////
44 //                             Include Files
45 ///////////////////////////////////////////////////////////////////////////////
46 #include "OMX_Core.h"
47 #include "OMX_Video.h"
48 
49 #define OMX_VIDEO_MAX_HP_LAYERS 6
50 /**
51  * This extension is used to register mapping of a virtual
52  * address to a physical address. This extension is a parameter
53  * which can be set using the OMX_SetParameter macro. The data
54  * pointer corresponding to this extension is
55  * OMX_QCOM_MemMapEntry. This parameter is a 'write only'
56  * parameter (Current value cannot be queried using
57  * OMX_GetParameter macro).
58  */
59 #define OMX_QCOM_EXTN_REGISTER_MMAP     "OMX.QCOM.index.param.register_mmap"
60 
61 /**
62  * This structure describes the data pointer corresponding to
63  * the OMX_QCOM_MMAP_REGISTER_EXTN extension. This parameter
64  * must be set only 'after' populating a port with a buffer
65  * using OMX_UseBuffer, wherein the data pointer of the buffer
66  * corresponds to the virtual address as specified in this
67  * structure.
68  */
69 struct OMX_QCOM_PARAM_MEMMAPENTRYTYPE
70 {
71     OMX_U32 nSize;              /** Size of the structure in bytes */
72     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
73     OMX_U32 nPortIndex;         /**< Port number the structure applies to */
74 
75     /**
76      * The virtual address of memory block
77      */
78     OMX_U64 nVirtualAddress;
79 
80     /**
81      * The physical address corresponding to the virtual address. The physical
82      * address is contiguous for the entire valid range of the virtual
83      * address.
84      */
85     OMX_U64 nPhysicalAddress;
86 };
87 
88 #define QOMX_VIDEO_IntraRefreshRandom (OMX_VIDEO_IntraRefreshVendorStartUnused + 0)
89 
90 /* This error event is used for H.264 long-term reference (LTR) encoding.
91  * When IL client specifies an LTR frame with its identifier via
92  * OMX_QCOM_INDEX_CONFIG_VIDEO_LTRUSE to the encoder, if the specified
93  * LTR frame can not be located by the encoder in its LTR list, the encoder
94  * issues this error event to IL client to notify the failure of LTRUse config.
95  */
96 #define QOMX_ErrorLTRUseFailed        (OMX_ErrorVendorStartUnused + 1)
97 
98 #define QOMX_VIDEO_BUFFERFLAG_BFRAME 0x00100000
99 
100 #define QOMX_VIDEO_BUFFERFLAG_EOSEQ  0x00200000
101 
102 #define QOMX_VIDEO_BUFFERFLAG_MBAFF  0x00400000
103 
104 #define QOMX_VIDEO_BUFFERFLAG_CANCEL 0x00800000
105 
106 #define OMX_QCOM_PORTDEFN_EXTN   "OMX.QCOM.index.param.portdefn"
107 /* Allowed APIs on the above Index: OMX_GetParameter() and OMX_SetParameter() */
108 
109 typedef enum OMX_QCOMMemoryRegion
110 {
111     OMX_QCOM_MemRegionInvalid,
112     OMX_QCOM_MemRegionEBI1,
113     OMX_QCOM_MemRegionSMI,
114     OMX_QCOM_MemRegionMax = 0X7FFFFFFF
115 } OMX_QCOMMemoryRegion;
116 
117 typedef enum OMX_QCOMCacheAttr
118 {
119     OMX_QCOM_CacheAttrNone,
120     OMX_QCOM_CacheAttrWriteBack,
121     OMX_QCOM_CacheAttrWriteThrough,
122     OMX_QCOM_CacheAttrMAX = 0X7FFFFFFF
123 } OMX_QCOMCacheAttr;
124 
125 typedef struct OMX_QCOMRectangle
126 {
127    OMX_S32 x;
128    OMX_S32 y;
129    OMX_S32 dx;
130    OMX_S32 dy;
131 } OMX_QCOMRectangle;
132 
133 /** OMX_QCOMFramePackingFormat
134   * Input or output buffer format
135   */
136 typedef enum OMX_QCOMFramePackingFormat
137 {
138   /* 0 - unspecified
139    */
140   OMX_QCOM_FramePacking_Unspecified,
141 
142   /*  1 - Partial frames may be present OMX IL 1.1.1 Figure 2-10:
143    *  Case 1??Each Buffer Filled In Whole or In Part
144    */
145   OMX_QCOM_FramePacking_Arbitrary,
146 
147   /*  2 - Multiple complete frames per buffer (integer number)
148    *  OMX IL 1.1.1 Figure 2-11: Case 2�Each Buffer Filled with
149    *  Only Complete Frames of Data
150    */
151   OMX_QCOM_FramePacking_CompleteFrames,
152 
153   /*  3 - Only one complete frame per buffer, no partial frame
154    *  OMX IL 1.1.1 Figure 2-12: Case 3�Each Buffer Filled with
155    *  Only One Frame of Compressed Data. Usually at least one
156    *  complete unit of data will be delivered in a buffer for
157    *  uncompressed data formats.
158    */
159   OMX_QCOM_FramePacking_OnlyOneCompleteFrame,
160 
161   /*  4 - Only one complete subframe per buffer, no partial subframe
162    *  Example: In H264, one complete NAL per buffer, where one frame
163    *  can contatin multiple NAL
164    */
165   OMX_QCOM_FramePacking_OnlyOneCompleteSubFrame,
166 
167   OMX_QCOM_FramePacking_MAX = 0X7FFFFFFF
168 } OMX_QCOMFramePackingFormat;
169 
170 typedef struct OMX_QCOM_PARAM_PORTDEFINITIONTYPE {
171  OMX_U32 nSize;           /** Size of the structure in bytes */
172  OMX_VERSIONTYPE nVersion;/** OMX specification version information */
173  OMX_U32 nPortIndex;    /** Portindex which is extended by this structure */
174 
175  /** Platform specific memory region EBI1, SMI, etc.,*/
176  OMX_QCOMMemoryRegion nMemRegion;
177 
178  OMX_QCOMCacheAttr nCacheAttr; /** Cache attributes */
179 
180  /** Input or output buffer format */
181  OMX_U32 nFramePackingFormat;
182 
183 } OMX_QCOM_PARAM_PORTDEFINITIONTYPE;
184 
185 typedef struct OMX_QCOM_VIDEO_PARAM_QPRANGETYPE {
186     OMX_U32 nSize;
187     OMX_VERSIONTYPE nVersion;
188     OMX_U32 nPortIndex;
189     OMX_U32 minQP;
190     OMX_U32 maxQP;
191 } OMX_QCOM_VIDEO_PARAM_QPRANGETYPE;
192 
193 #define OMX_QCOM_PLATFORMPVT_EXTN   "OMX.QCOM.index.param.platformprivate"
194 /** Allowed APIs on the above Index: OMX_SetParameter() */
195 
196 typedef enum OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE
197 {
198     /** Enum for PMEM information */
199     OMX_QCOM_PLATFORM_PRIVATE_PMEM = 0x1
200 } OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE;
201 
202 /** IL client will set the following structure. A failure
203  *  code will be returned if component does not support the
204  *  value provided for 'type'.
205  */
206 struct OMX_QCOM_PLATFORMPRIVATE_EXTN
207 {
208     OMX_U32 nSize;        /** Size of the structure in bytes */
209     OMX_VERSIONTYPE nVersion; /** OMX spec version information */
210     OMX_U32 nPortIndex;  /** Port number on which usebuffer extn is applied */
211 
212     /** Type of extensions should match an entry from
213      OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE
214     */
215     OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE type;
216 };
217 
218 typedef struct OMX_QCOM_PLATFORM_PRIVATE_PMEM_INFO
219 {
220     /** pmem file descriptor */
221     unsigned long pmem_fd;
222     /** Offset from pmem device base address */
223     OMX_U32 offset;
224     OMX_U32 size;
225     OMX_U32 mapped_size;
226     OMX_PTR buffer;
227 }OMX_QCOM_PLATFORM_PRIVATE_PMEM_INFO;
228 
229 typedef struct OMX_QCOM_PLATFORM_PRIVATE_ENTRY
230 {
231     /** Entry type */
232     OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE type;
233 
234     /** Pointer to platform specific entry */
235     OMX_PTR entry;
236 }OMX_QCOM_PLATFORM_PRIVATE_ENTRY;
237 
238 typedef struct OMX_QCOM_PLATFORM_PRIVATE_LIST
239 {
240     /** Number of entries */
241     OMX_U32 nEntries;
242 
243     /** Pointer to array of platform specific entries *
244      * Contiguous block of OMX_QCOM_PLATFORM_PRIVATE_ENTRY element
245     */
246     OMX_QCOM_PLATFORM_PRIVATE_ENTRY* entryList;
247 }OMX_QCOM_PLATFORM_PRIVATE_LIST;
248 
249 #define OMX_QCOM_FRAME_PACKING_FORMAT   "OMX.QCOM.index.param.framepackfmt"
250 /* Allowed API call: OMX_GetParameter() */
251 /* IL client can use this index to rerieve the list of frame formats *
252  * supported by the component */
253 
254 typedef struct OMX_QCOM_FRAME_PACKINGFORMAT_TYPE {
255     OMX_U32 nSize;
256     OMX_VERSIONTYPE nVersion;
257     OMX_U32 nPortIndex;
258     OMX_U32 nIndex;
259     OMX_QCOMFramePackingFormat eframePackingFormat;
260 } OMX_QCOM_FRAME_PACKINGFORMAT_TYPE;
261 
262 
263 /**
264  * Following is the enum for color formats supported on Qualcomm
265  * MSMs YVU420SemiPlanar color format is not defined in OpenMAX
266  * 1.1.1 and prior versions of OpenMAX specification.
267  */
268 
269 enum OMX_QCOM_COLOR_FORMATTYPE
270 {
271 
272 /** YVU420SemiPlanar: YVU planar format, organized with a first
273  *  plane containing Y pixels, and a second plane containing
274  *  interleaved V and U pixels. V and U pixels are sub-sampled
275  *  by a factor of two both horizontally and vertically.
276  */
277     QOMX_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00,
278     QOMX_COLOR_FormatYVU420PackedSemiPlanar32m4ka,
279     QOMX_COLOR_FormatYUV420PackedSemiPlanar16m2ka,
280     QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka,
281     QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m,
282     QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mMultiView,
283     QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mCompressed,
284     QOMX_COLOR_Format32bitRGBA8888,
285     QOMX_COLOR_Format32bitRGBA8888Compressed,
286     QOMX_COLOR_FormatAndroidOpaque = (OMX_COLOR_FORMATTYPE) OMX_COLOR_FormatVendorStartUnused  + 0x789,
287 };
288 
289 enum OMX_QCOM_VIDEO_CODINGTYPE
290 {
291 /** Codecs support by qualcomm which are not listed in OMX 1.1.x
292  *  spec
293  *   */
294     OMX_QCOM_VIDEO_CodingVC1  = 0x7FA30C00 ,
295     OMX_QCOM_VIDEO_CodingWMV9 = 0x7FA30C01,
296     QOMX_VIDEO_CodingDivx = 0x7FA30C02,     /**< Value when coding is Divx */
297     QOMX_VIDEO_CodingSpark = 0x7FA30C03,     /**< Value when coding is Sorenson Spark */
298     QOMX_VIDEO_CodingVp = 0x7FA30C04,
299     QOMX_VIDEO_CodingVp8 = OMX_VIDEO_CodingVP8,   /**< keeping old enum for backwards compatibility*/
300     QOMX_VIDEO_CodingHevc = OMX_VIDEO_CodingHEVC, /**< keeping old enum for backwards compatibility*/
301     QOMX_VIDEO_CodingMVC = 0x7FA30C07,
302     QOMX_VIDEO_CodingVp9 = OMX_VIDEO_CodingVP9,   /**< keeping old enum for backwards compatibility*/
303 };
304 
305 enum OMX_QCOM_EXTN_INDEXTYPE
306 {
307     /** Qcom proprietary extension index list */
308 
309     /* "OMX.QCOM.index.param.register_mmap" */
310     OMX_QcomIndexRegmmap = 0x7F000000,
311 
312     /* "OMX.QCOM.index.param.platformprivate" */
313     OMX_QcomIndexPlatformPvt = 0x7F000001,
314 
315     /* "OMX.QCOM.index.param.portdefn" */
316     OMX_QcomIndexPortDefn = 0x7F000002,
317 
318     /* "OMX.QCOM.index.param.framepackingformat" */
319     OMX_QcomIndexPortFramePackFmt = 0x7F000003,
320 
321     /*"OMX.QCOM.index.param.Interlaced */
322     OMX_QcomIndexParamInterlaced = 0x7F000004,
323 
324     /*"OMX.QCOM.index.config.interlaceformat */
325     OMX_QcomIndexConfigInterlaced = 0x7F000005,
326 
327     /*"OMX.QCOM.index.param.syntaxhdr" */
328     QOMX_IndexParamVideoSyntaxHdr = 0x7F000006,
329 
330     /*"OMX.QCOM.index.config.intraperiod" */
331     QOMX_IndexConfigVideoIntraperiod = 0x7F000007,
332 
333     /*"OMX.QCOM.index.config.randomIntrarefresh" */
334     QOMX_IndexConfigVideoIntraRefresh = 0x7F000008,
335 
336     /*"OMX.QCOM.index.config.video.TemporalSpatialTradeOff" */
337     QOMX_IndexConfigVideoTemporalSpatialTradeOff = 0x7F000009,
338 
339     /*"OMX.QCOM.index.param.video.EncoderMode" */
340     QOMX_IndexParamVideoEncoderMode = 0x7F00000A,
341 
342     /*"OMX.QCOM.index.param.Divxtype */
343     OMX_QcomIndexParamVideoDivx = 0x7F00000B,
344 
345     /*"OMX.QCOM.index.param.Sparktype */
346     OMX_QcomIndexParamVideoSpark = 0x7F00000C,
347 
348     /*"OMX.QCOM.index.param.Vptype */
349     OMX_QcomIndexParamVideoVp = 0x7F00000D,
350 
351     OMX_QcomIndexQueryNumberOfVideoDecInstance = 0x7F00000E,
352 
353     OMX_QcomIndexParamVideoSyncFrameDecodingMode = 0x7F00000F,
354 
355     OMX_QcomIndexParamVideoDecoderPictureOrder = 0x7F000010,
356 
357     /* "OMX.QCOM.index.config.video.FramePackingInfo" */
358     OMX_QcomIndexConfigVideoFramePackingArrangement = 0x7F000011,
359 
360     OMX_QcomIndexParamConcealMBMapExtraData = 0x7F000012,
361 
362     OMX_QcomIndexParamFrameInfoExtraData = 0x7F000013,
363 
364     OMX_QcomIndexParamInterlaceExtraData = 0x7F000014,
365 
366     OMX_QcomIndexParamH264TimeInfo = 0x7F000015,
367 
368     OMX_QcomIndexParamIndexExtraDataType = 0x7F000016,
369 
370     OMX_GoogleAndroidIndexEnableAndroidNativeBuffers = 0x7F000017,
371 
372     OMX_GoogleAndroidIndexUseAndroidNativeBuffer = 0x7F000018,
373 
374     OMX_GoogleAndroidIndexGetAndroidNativeBufferUsage = 0x7F000019,
375 
376     /*"OMX.QCOM.index.config.video.QPRange" */
377     OMX_QcomIndexConfigVideoQPRange = 0x7F00001A,
378 
379     /*"OMX.QCOM.index.param.EnableTimeStampReoder"*/
380     OMX_QcomIndexParamEnableTimeStampReorder = 0x7F00001B,
381 
382     /*"OMX.google.android.index.storeMetaDataInBuffers"*/
383     OMX_QcomIndexParamVideoMetaBufferMode = 0x7F00001C,
384 
385     /*"OMX.google.android.index.useAndroidNativeBuffer2"*/
386     OMX_GoogleAndroidIndexUseAndroidNativeBuffer2 = 0x7F00001D,
387 
388     /*"OMX.QCOM.index.param.VideoMaxAllowedBitrateCheck"*/
389     OMX_QcomIndexParamVideoMaxAllowedBitrateCheck = 0x7F00001E,
390 
391     OMX_QcomIndexEnableSliceDeliveryMode = 0x7F00001F,
392 
393     /* "OMX.QCOM.index.param.video.ExtnUserExtraData" */
394     OMX_QcomIndexEnableExtnUserData = 0x7F000020,
395 
396     /*"OMX.QCOM.index.param.video.EnableSmoothStreaming"*/
397     OMX_QcomIndexParamEnableSmoothStreaming = 0x7F000021,
398 
399     /*"OMX.QCOM.index.param.video.QPRange" */
400     OMX_QcomIndexParamVideoQPRange = 0x7F000022,
401 
402     OMX_QcomIndexEnableH263PlusPType = 0x7F000023,
403 
404     /*"OMX.QCOM.index.param.video.LTRCountRangeSupported"*/
405     QOMX_IndexParamVideoLTRCountRangeSupported = 0x7F000024,
406 
407     /*"OMX.QCOM.index.param.video.LTRMode"*/
408     QOMX_IndexParamVideoLTRMode = 0x7F000025,
409 
410     /*"OMX.QCOM.index.param.video.LTRCount"*/
411     QOMX_IndexParamVideoLTRCount = 0x7F000026,
412 
413     /*"OMX.QCOM.index.config.video.LTRPeriod"*/
414     QOMX_IndexConfigVideoLTRPeriod = 0x7F000027,
415 
416     /*"OMX.QCOM.index.config.video.LTRUse"*/
417     QOMX_IndexConfigVideoLTRUse = 0x7F000028,
418 
419     /*"OMX.QCOM.index.config.video.LTRMark"*/
420     QOMX_IndexConfigVideoLTRMark = 0x7F000029,
421 
422     /* OMX.google.android.index.prependSPSPPSToIDRFrames */
423     OMX_QcomIndexParamSequenceHeaderWithIDR = 0x7F00002A,
424 
425     OMX_QcomIndexParamH264AUDelimiter = 0x7F00002B,
426 
427     OMX_QcomIndexParamVideoDownScalar = 0x7F00002C,
428 
429     /* "OMX.QCOM.index.param.video.FramePackingExtradata" */
430     OMX_QcomIndexParamVideoFramePackingExtradata = 0x7F00002D,
431 
432     /* "OMX.QCOM.index.config.activeregiondetection" */
433     OMX_QcomIndexConfigActiveRegionDetection = 0x7F00002E,
434 
435     /* "OMX.QCOM.index.config.activeregiondetectionstatus" */
436     OMX_QcomIndexConfigActiveRegionDetectionStatus = 0x7F00002F,
437 
438     /* "OMX.QCOM.index.config.scalingmode" */
439     OMX_QcomIndexConfigScalingMode = 0x7F000030,
440 
441     /* "OMX.QCOM.index.config.noisereduction" */
442     OMX_QcomIndexConfigNoiseReduction = 0x7F000031,
443 
444     /* "OMX.QCOM.index.config.imageenhancement" */
445     OMX_QcomIndexConfigImageEnhancement = 0x7F000032,
446 
447     /* google smooth-streaming support */
448     OMX_QcomIndexParamVideoAdaptivePlaybackMode = 0x7F000033,
449 
450     /* H.264 MVC codec index */
451     QOMX_IndexParamVideoMvc = 0x7F000034,
452 
453     /* "OMX.QCOM.index.param.video.QPExtradata" */
454     OMX_QcomIndexParamVideoQPExtraData = 0x7F000035,
455 
456     /* "OMX.QCOM.index.param.video.InputBitsInfoExtradata" */
457     OMX_QcomIndexParamVideoInputBitsInfoExtraData = 0x7F000036,
458 
459     /* VP8 Hierarchical P support */
460     OMX_QcomIndexHierarchicalStructure = 0x7F000037,
461 
462     OMX_QcomIndexParamPerfLevel = 0x7F000038,
463 
464     OMX_QcomIndexParamH264VUITimingInfo = 0x7F000039,
465 
466     OMX_QcomIndexParamPeakBitrate = 0x7F00003A,
467 
468     /* Enable InitialQP index */
469     QOMX_IndexParamVideoInitialQp = 0x7F00003B,
470 
471     OMX_QcomIndexParamSetMVSearchrange = 0x7F00003C,
472 
473     OMX_QcomIndexConfigPerfLevel = 0x7F00003D,
474 
475     /*"OMX.QCOM.index.param.video.LTRCount"*/
476     OMX_QcomIndexParamVideoLTRCount = QOMX_IndexParamVideoLTRCount,
477 
478     /*"OMX.QCOM.index.config.video.LTRUse"*/
479     OMX_QcomIndexConfigVideoLTRUse = QOMX_IndexConfigVideoLTRUse,
480 
481     /*"OMX.QCOM.index.config.video.LTRMark"*/
482     OMX_QcomIndexConfigVideoLTRMark = QOMX_IndexConfigVideoLTRMark,
483 
484     /*"OMX.QCOM.index.param.video.CustomBufferSize"*/
485     OMX_QcomIndexParamVideoCustomBufferSize = 0x7F00003E,
486 
487     /* Max Hierarchical P layers */
488     OMX_QcomIndexMaxHierarchicallayers = 0x7F000041,
489 
490     /* Set Encoder Performance Index */
491     OMX_QcomIndexConfigVideoVencPerfMode = 0x7F000042,
492 
493     /* Set Hybrid Hier-p layers */
494     OMX_QcomIndexParamVideoHybridHierpMode = 0x7F000043,
495 
496     OMX_QcomIndexFlexibleYUVDescription = 0x7F000044,
497 
498     /* Vpp Hqv Control Type */
499     OMX_QcomIndexParamVppHqvControl = 0x7F000045,
500 
501     /* Enable VPP */
502     OMX_QcomIndexParamEnableVpp = 0x7F000046,
503 
504     /* MBI statistics mode */
505     OMX_QcomIndexParamMBIStatisticsMode = 0x7F000047,
506 
507     /* Set PictureTypeDecode */
508     OMX_QcomIndexConfigPictureTypeDecode = 0x7F000048,
509 
510     OMX_QcomIndexConfigH264EntropyCodingCabac = 0x7F000049,
511 
512     /* "OMX.QCOM.index.param.video.InputBatch" */
513     OMX_QcomIndexParamBatchSize = 0x7F00004A,
514 
515     OMX_QcomIndexConfigNumHierPLayers = 0x7F00004B,
516 
517     OMX_QcomIndexConfigRectType = 0x7F00004C,
518 
519     OMX_QcomIndexConfigBaseLayerId = 0x7F00004E,
520 
521     OMX_QcomIndexParamDriverVersion = 0x7F00004F,
522 
523     OMX_QcomIndexConfigQp = 0x7F000050,
524 
525     OMX_QcomIndexParamVencAspectRatio = 0x7F000051,
526 
527     OMX_QTIIndexParamVQZipSEIExtraData = 0x7F000052,
528 
529     /* Enable VQZIP SEI NAL type */
530     OMX_QTIIndexParamVQZIPSEIType = 0x7F000053,
531 
532     OMX_QTIIndexParamPassInputBufferFd = 0x7F000054,
533 
534     /* Set Prefer-adaptive playback*/
535     /* "OMX.QTI.index.param.video.PreferAdaptivePlayback" */
536     OMX_QTIIndexParamVideoPreferAdaptivePlayback = 0x7F000055,
537 
538     /* Set time params */
539     OMX_QTIIndexConfigSetTimeData = 0x7F000056,
540     /* Force Compressed format for DPB when resolution <=1080p
541      * and OPB is cpu_access */
542     /* OMX.QTI.index.param.video.ForceCompressedForDPB */
543     OMX_QTIIndexParamForceCompressedForDPB = 0x7F000057,
544 
545     /* Enable ROI info */
546     OMX_QTIIndexParamVideoEnableRoiInfo = 0x7F000058,
547 
548     /* Configure ROI info */
549     OMX_QTIIndexConfigVideoRoiInfo = 0x7F000059,
550 
551     /* Force OPB to UnCompressed mode */
552     OMX_QTIIndexParamForceUnCompressedForOPB = 0x7F00005A,
553 
554     /*"OMX.google.android.index.allocateNativeHandle"*/
555     OMX_GoogleAndroidIndexAllocateNativeHandle = 0x7F00005B,
556 
557     /*"OMX.google.android.index.describeColorAspects"*/
558     OMX_QTIIndexConfigDescribeColorAspects = 0x7F00005E,
559 
560     OMX_QTIIndexParamVUIExtraDataExtraData = 0x7F00005F,
561 
562     OMX_QTIIndexParamMPEG2SeqDispExtraData = 0x7F000060,
563 
564     OMX_QTIIndexParamVC1SeqDispExtraData = 0x7F000061,
565 
566     OMX_QTIIndexParamVPXColorSpaceExtraData = 0x7F000062,
567 
568     OMX_QTIIndexParamEnableAVTimerTimestamps = 0x7F000063,
569 };
570 
571 /**
572 * This is custom extension to configure Encoder Aspect Ratio.
573 *
574 * STRUCT MEMBERS
575 *
576 * nSize         : Size of Structure in bytes
577 * nVersion      : OpenMAX IL specification version information
578 * nSARWidth     : Horizontal aspect size
579 * nSARHeight    : Vertical aspect size
580 */
581 
582 typedef struct QOMX_EXTNINDEX_VIDEO_VENC_SAR
583 {
584    OMX_U32 nSize;
585    OMX_U32 nVersion;
586    OMX_U32 nSARWidth;
587    OMX_U32 nSARHeight;
588 } QOMX_EXTNINDEX_VIDEO_VENC_SAR;
589 
590 /**
591 * This is custom extension to configure Hier-p layers.
592 * This mode configures Hier-p layers dynamically.
593 *
594 * STRUCT MEMBERS
595 *
596 * nSize         : Size of Structure in bytes
597 * nVersion      : OpenMAX IL specification version information
598 * nNumHierLayers: Set the number of Hier-p layers for the session
599 *                  - This should be less than the MAX Hier-P
600 *                    layers set for the session.
601 */
602 
603 typedef struct QOMX_EXTNINDEX_VIDEO_HIER_P_LAYERS {
604    OMX_U32 nSize;
605    OMX_VERSIONTYPE nVersion;
606    OMX_U32 nNumHierLayers;
607 } QOMX_EXTNINDEX_VIDEO_HIER_P_LAYERS;
608 
609 
610 /**
611 * This is custom extension to configure Hybrid Hier-p settings.
612 * This mode is different from enabling Hier-p mode. This
613 * property enables Hier-p encoding with LTR referencing in each
614 * sub-GOP.
615 *
616 * STRUCT MEMBERS
617 *
618 * nSize         : Size of Structure in bytes
619 * nVersion      : OpenMAX IL specification version information
620 * nKeyFrameInterval : Indicates the I frame interval
621 * nHpLayers     : Set the number of Hier-p layers for the session
622 *                  - This should be <= 6. (1 Base layer +
623 *                    5 Enhancement layers)
624 * nTemporalLayerBitrateRatio[OMX_VIDEO_MAX_HP_LAYERS] : Bitrate to
625 *                    be set for each enhancement layer
626 * nMinQuantizer  : minimum session QP
627 * nMaxQuantizer  : Maximun session QP
628 */
629 
630 typedef struct QOMX_EXTNINDEX_VIDEO_HYBRID_HP_MODE {
631    OMX_U32 nSize;
632    OMX_VERSIONTYPE nVersion;
633    OMX_U32 nKeyFrameInterval;
634    OMX_U32 nTemporalLayerBitrateRatio[OMX_VIDEO_MAX_HP_LAYERS];
635    OMX_U32 nMinQuantizer;
636    OMX_U32 nMaxQuantizer;
637    OMX_U32 nHpLayers;
638 } QOMX_EXTNINDEX_VIDEO_HYBRID_HP_MODE;
639 
640 /**
641  * Encoder Performance Mode.  This structure is used to set
642  * performance mode or power save mode when encoding. The search
643  * range is modified to save power or improve quality.
644  *
645  * STRUCT MEMBERS:
646  * OMX_U32 nPerfMode  : Performance mode:
647  *                                      1: MAX_QUALITY
648  *                                      2: POWER_SAVE
649  */
650 
651 typedef struct QOMX_EXTNINDEX_VIDEO_PERFMODE {
652     OMX_U32 nSize;
653     OMX_VERSIONTYPE nVersion;
654     OMX_U32 nPerfMode;
655 } QOMX_EXTNINDEX_VIDEO_PERFMODE;
656 
657 /**
658  * Initial QP parameter.  This structure is used to enable
659  * vendor specific extension to let client enable setting
660  * initial QP values to I P B Frames
661  *
662  * STRUCT MEMBERS:
663  *  nSize              : Size of Structure in bytes
664  *  nVersion           : OpenMAX IL specification version information
665  *  nPortIndex         : Index of the port to which this structure applies
666  *  OMX_U32 nQpI       : First Iframe QP
667  *  OMX_U32 nQpP       : First Pframe QP
668  *  OMX_U32 nQpB       : First Bframe QP
669  *  OMX_U32 bEnableInitQp : Bit field indicating which frame type(s) shall
670  *                             use the specified initial QP.
671  *                          Bit 0: Enable initial QP for I/IDR
672  *                                 and use value specified in nInitQpI
673  *                          Bit 1: Enable initial QP for P
674  *                                 and use value specified in nInitQpP
675  *                          Bit 2: Enable initial QP for B
676  *                                 and use value specified in nInitQpB
677  */
678 
679 typedef struct QOMX_EXTNINDEX_VIDEO_INITIALQP {
680     OMX_U32 nSize;
681     OMX_VERSIONTYPE nVersion;
682     OMX_U32 nPortIndex;
683     OMX_U32 nQpI;
684     OMX_U32 nQpP;
685     OMX_U32 nQpB;
686     OMX_U32 bEnableInitQp;
687 } QOMX_EXTNINDEX_VIDEO_INITIALQP;
688 
689 /**
690  * Extension index parameter.  This structure is used to enable
691  * vendor specific extension on input/output port and
692  * to pass the required flags and data, if any.
693  * The format of flags and data being passed is known to
694  * the client and component apriori.
695  *
696  * STRUCT MEMBERS:
697  *  nSize              : Size of Structure plus pData size
698  *  nVersion           : OMX specification version information
699  *  nPortIndex         : Indicates which port to set
700  *  bEnable            : Extension index enable (1) or disable (0)
701  *  nFlags             : Extension index flags, if any
702  *  nDataSize          : Size of the extension index data to follow
703  *  pData              : Extension index data, if present.
704  */
705 typedef struct QOMX_EXTNINDEX_PARAMTYPE {
706     OMX_U32 nSize;
707     OMX_VERSIONTYPE nVersion;
708     OMX_U32 nPortIndex;
709     OMX_BOOL bEnable;
710     OMX_U32 nFlags;
711     OMX_U32 nDataSize;
712     OMX_PTR pData;
713 } QOMX_EXTNINDEX_PARAMTYPE;
714 
715 /**
716  * Range index parameter.  This structure is used to enable
717  * vendor specific extension on input/output port and
718  * to pass the required minimum and maximum values
719  *
720  * STRUCT MEMBERS:
721  *  nSize              : Size of Structure in bytes
722  *  nVersion           : OpenMAX IL specification version information
723  *  nPortIndex         : Index of the port to which this structure applies
724  *  nMin               : Minimum value
725  *  nMax               : Maximum value
726  *  nSteSize           : Step size
727  */
728 typedef struct QOMX_EXTNINDEX_RANGETYPE {
729     OMX_U32 nSize;
730     OMX_VERSIONTYPE nVersion;
731     OMX_U32 nPortIndex;
732     OMX_S32 nMin;
733     OMX_S32 nMax;
734     OMX_S32 nStepSize;
735 } QOMX_EXTNINDEX_RANGETYPE;
736 
737 /**
738  *   Specifies LTR mode types.
739  */
740 typedef enum QOMX_VIDEO_LTRMODETYPE
741 {
742     QOMX_VIDEO_LTRMode_Disable    = 0x0, /**< LTR encoding is disabled */
743     QOMX_VIDEO_LTRMode_Manual     = 0x1, /**< In this mode, IL client configures
744                                            **  the encoder the LTR count and manually
745                                            **  controls the marking and use of LTR
746                                            **  frames during video encoding.
747                                            */
748     QOMX_VIDEO_LTRMode_Auto       = 0x2, /**< In this mode, IL client configures
749                                            **  the encoder the LTR count and LTR
750                                            **  period. The encoder marks LTR frames
751                                            **  automatically based on the LTR period
752                                            **  during video encoding. IL client controls
753                                            **  the use of LTR frames.
754                                            */
755     QOMX_VIDEO_LTRMode_MAX    = 0x7FFFFFFF /** Maximum LTR Mode type */
756 } QOMX_VIDEO_LTRMODETYPE;
757 
758 /**
759  * LTR mode index parameter.  This structure is used
760  * to enable vendor specific extension on output port
761  * to pass the LTR mode information.
762  *
763  * STRUCT MEMBERS:
764  *  nSize              : Size of Structure in bytes
765  *  nVersion           : OpenMAX IL specification version information
766  *  nPortIndex         : Index of the port to which this structure applies
767  *  eLTRMode           : Specifies the LTR mode used in encoder
768  */
769 typedef struct QOMX_VIDEO_PARAM_LTRMODE_TYPE {
770     OMX_U32 nSize;
771     OMX_VERSIONTYPE nVersion;
772     OMX_U32 nPortIndex;
773     QOMX_VIDEO_LTRMODETYPE eLTRMode;
774 } QOMX_VIDEO_PARAM_LTRMODE_TYPE;
775 
776 /**
777  * LTR count index parameter.  This structure is used
778  * to enable vendor specific extension on output port
779  * to pass the LTR count information.
780  *
781  * STRUCT MEMBERS:
782  *  nSize              : Size of Structure in bytes
783  *  nVersion           : OpenMAX IL specification version information
784  *  nPortIndex         : Index of the port to which this structure applies
785  *  nCount             : Specifies the number of LTR frames stored in the
786  *                       encoder component
787  */
788 typedef struct QOMX_VIDEO_PARAM_LTRCOUNT_TYPE {
789     OMX_U32 nSize;
790     OMX_VERSIONTYPE nVersion;
791     OMX_U32 nPortIndex;
792     OMX_U32 nCount;
793 } QOMX_VIDEO_PARAM_LTRCOUNT_TYPE;
794 
795 
796 /**
797  * This should be used with OMX_QcomIndexParamVideoLTRCount extension.
798  */
799 typedef QOMX_VIDEO_PARAM_LTRCOUNT_TYPE OMX_QCOM_VIDEO_PARAM_LTRCOUNT_TYPE;
800 
801 /**
802  * LTR period index parameter.  This structure is used
803  * to enable vendor specific extension on output port
804  * to pass the LTR period information.
805  *
806  * STRUCT MEMBERS:
807  *  nSize              : Size of Structure in bytes
808  *  nVersion           : OpenMAX IL specification version information
809  *  nPortIndex         : Index of the port to which this structure applies
810  *  nFrames            : Specifies the number of frames between two consecutive
811  *                       LTR frames.
812  */
813 typedef struct QOMX_VIDEO_CONFIG_LTRPERIOD_TYPE {
814     OMX_U32 nSize;
815     OMX_VERSIONTYPE nVersion;
816     OMX_U32 nPortIndex;
817     OMX_U32 nFrames;
818 } QOMX_VIDEO_CONFIG_LTRPERIOD_TYPE;
819 
820 /**
821  * Marks the next encoded frame as an LTR frame.
822  * STRUCT MEMBERS:
823  *  nSize              : Size of Structure in bytes
824  *  nVersion           : OpenMAX IL specification version information
825  *  nPortIndex         : Index of the port to which this structure applies
826  *  nID                : Specifies the identifier of the LTR frame to be marked
827  *                       as reference frame for encoding subsequent frames.
828  */
829 typedef struct QOMX_VIDEO_CONFIG_LTRMARK_TYPE {
830     OMX_U32 nSize;
831     OMX_VERSIONTYPE nVersion;
832     OMX_U32 nPortIndex;
833     OMX_U32 nID;
834 } QOMX_VIDEO_CONFIG_LTRMARK_TYPE;
835 
836 /**
837  * This should be used with OMX_QcomIndexConfigVideoLTRMark extension.
838  */
839 typedef QOMX_VIDEO_CONFIG_LTRMARK_TYPE OMX_QCOM_VIDEO_CONFIG_LTRMARK_TYPE;
840 
841 /**
842  * Specifies an LTR frame to encode subsequent frames.
843  * STRUCT MEMBERS:
844  *  nSize              : Size of Structure in bytes
845  *  nVersion           : OpenMAX IL specification version information
846  *  nPortIndex         : Index of the port to which this structure applies
847  *  nID                : Specifies the identifier of the LTR frame to be used
848                          as reference frame for encoding subsequent frames.
849  *  nFrames            : Specifies the number of subsequent frames to be
850                          encoded using the LTR frame with its identifier
851                          nID as reference frame. Short-term reference frames
852                          will be used thereafter. The value of 0xFFFFFFFF
853                          indicates that all subsequent frames will be
854                          encodedusing this LTR frame as reference frame.
855  */
856 typedef struct QOMX_VIDEO_CONFIG_LTRUSE_TYPE {
857     OMX_U32 nSize;
858     OMX_VERSIONTYPE nVersion;
859     OMX_U32 nPortIndex;
860     OMX_U32 nID;
861     OMX_U32 nFrames;
862 } QOMX_VIDEO_CONFIG_LTRUSE_TYPE;
863 
864 /**
865  * This should be used with OMX_QcomIndexConfigVideoLTRUse extension.
866  */
867 typedef QOMX_VIDEO_CONFIG_LTRUSE_TYPE OMX_QCOM_VIDEO_CONFIG_LTRUSE_TYPE;
868 
869 /**
870  * Enumeration used to define the video encoder modes
871  *
872  * ENUMS:
873  *  EncoderModeDefault : Default video recording mode.
874  *                       All encoder settings made through
875  *                       OMX_SetParameter/OMX_SetConfig are applied. No
876  *                       parameter is overridden.
877  *  EncoderModeMMS : Video recording mode for MMS (Multimedia Messaging
878  *                   Service). This mode is similar to EncoderModeDefault
879  *                   except that here the Rate control mode is overridden
880  *                   internally and set as a variant of variable bitrate with
881  *                   variable frame rate. After this mode is set if the IL
882  *                   client tries to set OMX_VIDEO_CONTROLRATETYPE via
883  *                   OMX_IndexParamVideoBitrate that would be rejected. For
884  *                   this, client should set mode back to EncoderModeDefault
885  *                   first and then change OMX_VIDEO_CONTROLRATETYPE.
886  */
887 typedef enum QOMX_VIDEO_ENCODERMODETYPE
888 {
889     QOMX_VIDEO_EncoderModeDefault        = 0x00,
890     QOMX_VIDEO_EncoderModeMMS            = 0x01,
891     QOMX_VIDEO_EncoderModeMax            = 0x7FFFFFFF
892 } QOMX_VIDEO_ENCODERMODETYPE;
893 
894 /**
895  * This structure is used to set the video encoder mode.
896  *
897  * STRUCT MEMBERS:
898  *  nSize      : Size of the structure in bytes
899  *  nVersion   : OMX specification version info
900  *  nPortIndex : Port that this structure applies to
901  *  nMode : defines the video encoder mode
902  */
903 typedef struct QOMX_VIDEO_PARAM_ENCODERMODETYPE {
904     OMX_U32 nSize;
905     OMX_VERSIONTYPE nVersion;
906     OMX_U32 nPortIndex;
907     QOMX_VIDEO_ENCODERMODETYPE nMode;
908 } QOMX_VIDEO_PARAM_ENCODERMODETYPE;
909 
910 /**
911  * This structure describes the parameters corresponding to the
912  * QOMX_VIDEO_SYNTAXHDRTYPE extension. This parameter can be queried
913  * during the loaded state.
914  */
915 
916 typedef struct QOMX_VIDEO_SYNTAXHDRTYPE
917 {
918    OMX_U32 nSize;           /** Size of the structure in bytes */
919    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
920    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
921    OMX_U32 nBytes;          /** The number of bytes filled in to the buffer */
922    OMX_U8 data[1];          /** Buffer to store the header information */
923 } QOMX_VIDEO_SYNTAXHDRTYPE;
924 
925 /**
926  * This structure describes the parameters corresponding to the
927  * QOMX_VIDEO_TEMPORALSPATIALTYPE extension. This parameter can be set
928  * dynamically during any state except the state invalid.  This is primarily
929  * used for setting MaxQP from the application.  This is set on the out port.
930  */
931 
932 typedef struct QOMX_VIDEO_TEMPORALSPATIALTYPE
933 {
934    OMX_U32 nSize;           /** Size of the structure in bytes */
935    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
936    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
937    OMX_U32 nTSFactor;       /** Temoral spatial tradeoff factor value in 0-100 */
938 } QOMX_VIDEO_TEMPORALSPATIALTYPE;
939 
940 /**
941  * This structure describes the parameters corresponding to the
942  * OMX_QCOM_VIDEO_CONFIG_INTRAPERIODTYPE extension. This parameter can be set
943  * dynamically during any state except the state invalid.  This is set on the out port.
944  */
945 
946 typedef struct QOMX_VIDEO_INTRAPERIODTYPE
947 {
948    OMX_U32 nSize;           /** Size of the structure in bytes */
949    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
950    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
951    OMX_U32 nIDRPeriod;      /** This specifies coding a frame as IDR after every nPFrames
952                                 of intra frames. If this parameter is set to 0, only the
953                                 first frame of the encode session is an IDR frame. This
954                                 field is ignored for non-AVC codecs and is used only for
955                                 codecs that support IDR Period */
956    OMX_U32 nPFrames;         /** The number of "P" frames between two "I" frames */
957    OMX_U32 nBFrames;         /** The number of "B" frames between two "I" frames */
958 } QOMX_VIDEO_INTRAPERIODTYPE;
959 
960 /**
961  * This structure describes the parameters corresponding to the
962  * OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE extension. This parameter can be set
963  * dynamically during any state except the state invalid. This is used for the buffer negotiation
964  * with other clients.  This is set on the out port.
965  */
966 typedef struct OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE
967 {
968    OMX_U32 nSize;            /** Size of the structure in bytes */
969    OMX_VERSIONTYPE nVersion; /** OMX specification version information */
970    OMX_U32 nPortIndex;       /** Portindex which is extended by this structure */
971    OMX_U32 nBufferOccupancy; /** The number of bytes to be set for the buffer occupancy */
972 } OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE;
973 
974 /**
975  * This structure describes the parameters corresponding to the
976  * OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE extension. This parameter can be set
977  * dynamically during any state except the state invalid. This is primarily used for the dynamic/random
978  * intrarefresh.  This is set on the out port.
979  */
980 typedef struct OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE
981 {
982    OMX_U32 nSize;           /** Size of the structure in bytes */
983    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
984    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
985    OMX_U32 nRirMBs;         /** The number of MBs to be set for intrarefresh */
986 } OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE;
987 
988 
989 /**
990  * This structure describes the parameters corresponding to the
991  * OMX_QCOM_VIDEO_CONFIG_QPRANGE extension. This parameter can be set
992  * dynamically during any state except the state invalid. This is primarily
993  * used for the min/max QP to be set from the application.  This
994  * is set on the out port.
995  */
996 typedef struct OMX_QCOM_VIDEO_CONFIG_QPRANGE
997 {
998    OMX_U32 nSize;           /** Size of the structure in bytes */
999    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
1000    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
1001    OMX_U32 nMinQP;          /** The number for minimum quantization parameter */
1002    OMX_U32 nMaxQP;          /** The number for maximum quantization parameter */
1003 } OMX_QCOM_VIDEO_CONFIG_QPRANGE;
1004 
1005 /**
1006  * This structure describes the parameters for the
1007  * OMX_QcomIndexParamH264AUDelimiter extension.  It enables/disables
1008  * the AU delimiters in the H264 stream, which is used by WFD.
1009  */
1010 typedef struct OMX_QCOM_VIDEO_CONFIG_H264_AUD
1011 {
1012    OMX_U32 nSize;           /** Size of the structure in bytes */
1013    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
1014    OMX_BOOL bEnable;        /** Enable/disable the setting */
1015 } OMX_QCOM_VIDEO_CONFIG_H264_AUD;
1016 
1017 typedef enum QOMX_VIDEO_PERF_LEVEL
1018 {
1019     OMX_QCOM_PerfLevelNominal,
1020     OMX_QCOM_PerfLevelTurbo
1021 } QOMX_VIDEO_PERF_LEVEL;
1022 
1023 /**
1024  * This structure describes the parameters corresponding
1025  * to OMX_QcomIndexParamPerfLevel extension. It will set
1026  * the performance mode specified as QOMX_VIDEO_PERF_LEVEL.
1027  */
1028 typedef struct OMX_QCOM_VIDEO_PARAM_PERF_LEVEL {
1029     OMX_U32 nSize;                      /** Size of the structure in bytes */
1030     OMX_VERSIONTYPE nVersion;           /** OMX specification version information */
1031     QOMX_VIDEO_PERF_LEVEL ePerfLevel;   /** Performance level */
1032 } OMX_QCOM_VIDEO_PARAM_PERF_LEVEL;
1033 
1034 /**
1035  * This structure describes the parameters corresponding
1036  * to OMX_QcomIndexConfigPerfLevel extension. It will set
1037  * the performance mode specified as QOMX_VIDEO_PERF_LEVEL.
1038  */
1039 typedef struct OMX_QCOM_VIDEO_CONFIG_PERF_LEVEL {
1040     OMX_U32 nSize;                      /** Size of the structure in bytes */
1041     OMX_VERSIONTYPE nVersion;           /** OMX specification version information */
1042     QOMX_VIDEO_PERF_LEVEL ePerfLevel;   /** Performance level */
1043 } OMX_QCOM_VIDEO_CONFIG_PERF_LEVEL;
1044 
1045 typedef enum QOMX_VIDEO_PICTURE_TYPE_DECODE
1046 {
1047     OMX_QCOM_PictypeDecode_IPB,
1048     OMX_QCOM_PictypeDecode_I
1049 } QOMX_VIDEO_PICTURE_TYPE_DECODE;
1050 
1051 /**
1052  * This structure describes the parameters corresponding
1053  * to OMX_QcomIndexConfigPictureTypeDecode extension. It
1054  * will set the picture type decode specified by eDecodeType.
1055  */
1056 typedef struct OMX_QCOM_VIDEO_CONFIG_PICTURE_TYPE_DECODE {
1057     OMX_U32 nSize;                      /** Size of the structure in bytes */
1058     OMX_VERSIONTYPE nVersion;           /** OMX specification version information */
1059     QOMX_VIDEO_PICTURE_TYPE_DECODE eDecodeType;   /** Decode type */
1060 } OMX_QCOM_VIDEO_CONFIG_PICTURE_TYPE_DECODE;
1061 
1062 /**
1063  * This structure describes the parameters corresponding
1064  * to OMX_QcomIndexParamH264VUITimingInfo extension. It
1065  * will enable/disable the VUI timing info.
1066  */
1067 typedef struct OMX_QCOM_VIDEO_PARAM_VUI_TIMING_INFO {
1068     OMX_U32 nSize;              /** Size of the structure in bytes */
1069     OMX_VERSIONTYPE nVersion;   /** OMX specification version information */
1070     OMX_BOOL bEnable;           /** Enable/disable the setting */
1071 } OMX_QCOM_VIDEO_PARAM_VUI_TIMING_INFO;
1072 
1073 /**
1074  * This structure describes the parameters corresponding
1075  * to OMX_QcomIndexParamVQZIPSEIType extension. It
1076  * will enable/disable the VQZIP SEI info.
1077  */
1078 typedef struct OMX_QTI_VIDEO_PARAM_VQZIP_SEI_TYPE {
1079     OMX_U32 nSize;              /** Size of the structure in bytes */
1080     OMX_VERSIONTYPE nVersion;   /** OMX specification version information */
1081     OMX_BOOL bEnable;           /** Enable/disable the setting */
1082 } OMX_QTI_VIDEO_PARAM_VQZIP_SEI_TYPE;
1083 
1084 /**
1085  * This structure describes the parameters corresponding
1086  * to OMX_QcomIndexParamPeakBitrate extension. It will
1087  * set the peak bitrate specified by nPeakBitrate.
1088  */
1089 typedef struct OMX_QCOM_VIDEO_PARAM_PEAK_BITRATE {
1090     OMX_U32 nSize;              /** Size of the structure in bytes */
1091     OMX_VERSIONTYPE nVersion;   /** OMX specification version information */
1092     OMX_U32 nPeakBitrate;       /** Peak bitrate value */
1093 } OMX_QCOM_VIDEO_PARAM_PEAK_BITRATE;
1094 
1095 /**
1096  * This structure describes the parameters corresponding
1097  * to OMX_QTIIndexParamForceCompressedForDPB extension. Enabling
1098  * this extension will force the split mode DPB(compressed)/OPB(Linear)
1099  * for all resolutions.On some chipsets preferred mode would be combined
1100  * Linear for both DPB/OPB to save memory. For example on 8996 preferred mode
1101  * would be combined linear for resolutions <= 1080p .
1102  * Enabling this might save power but with the cost
1103  * of increased memory i.e almost double the number on output YUV buffers.
1104  */
1105 typedef struct OMX_QTI_VIDEO_PARAM_FORCE_COMPRESSED_FOR_DPB_TYPE {
1106     OMX_U32 nSize;              /** Size of the structure in bytes */
1107     OMX_VERSIONTYPE nVersion;   /** OMX specification version information */
1108     OMX_BOOL bEnable;           /** Enable/disable the setting */
1109 } OMX_QTI_VIDEO_PARAM_FORCE_COMPRESSED_FOR_DPB_TYPE;
1110 
1111 /**
1112  * This structure describes the parameters corresponding
1113  * to OMX_QTIIndexParamForceUnCompressedForOPB extension. Enabling this
1114  * extension will force the OPB to be linear for the current video session.
1115  * If this property is not set, then the OPB will be set to linear or compressed
1116  * based on resolution selected and/or if cpu access is requested on the
1117  * OPB buffer.
1118  */
1119 typedef struct OMX_QTI_VIDEO_PARAM_FORCE_UNCOMPRESSED_FOR_OPB_TYPE {
1120     OMX_U32 nSize;              /** Sizeo f the structure in bytes */
1121     OMX_VERSIONTYPE nVersion;   /** OMX specification version information */
1122     OMX_BOOL bEnable;           /** Enable/disable the setting */
1123 } OMX_QTI_VIDEO_PARAM_FORCE_UNCOMPRESSED_FOR_OPB_TYPE;
1124 
1125 typedef struct OMX_VENDOR_EXTRADATATYPE  {
1126     OMX_U32 nPortIndex;
1127     OMX_U32 nDataSize;
1128     OMX_U8  *pData;     // cdata (codec_data/extradata)
1129 } OMX_VENDOR_EXTRADATATYPE;
1130 
1131 /**
1132  * This structure describes the parameters corresponding to the
1133  * OMX_VENDOR_VIDEOFRAMERATE extension. This parameter can be set
1134  * dynamically during any state except the state invalid. This is
1135  * used for frame rate to be set from the application. This
1136  * is set on the in port.
1137  */
1138 typedef struct OMX_VENDOR_VIDEOFRAMERATE  {
1139    OMX_U32 nSize;           /** Size of the structure in bytes */
1140    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
1141    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
1142    OMX_U32 nFps;            /** Frame rate value */
1143    OMX_BOOL bEnabled;       /** Flag to enable or disable client's frame rate value */
1144 } OMX_VENDOR_VIDEOFRAMERATE;
1145 
1146 typedef enum OMX_INDEXVENDORTYPE {
1147     OMX_IndexVendorFileReadInputFilename = 0xFF000001,
1148     OMX_IndexVendorParser3gpInputFilename = 0xFF000002,
1149     OMX_IndexVendorVideoExtraData = 0xFF000003,
1150     OMX_IndexVendorAudioExtraData = 0xFF000004,
1151     OMX_IndexVendorVideoFrameRate = 0xFF000005,
1152 } OMX_INDEXVENDORTYPE;
1153 
1154 typedef enum OMX_QCOM_VC1RESOLUTIONTYPE
1155 {
1156    OMX_QCOM_VC1_PICTURE_RES_1x1,
1157    OMX_QCOM_VC1_PICTURE_RES_2x1,
1158    OMX_QCOM_VC1_PICTURE_RES_1x2,
1159    OMX_QCOM_VC1_PICTURE_RES_2x2
1160 } OMX_QCOM_VC1RESOLUTIONTYPE;
1161 
1162 typedef enum OMX_QCOM_INTERLACETYPE
1163 {
1164     OMX_QCOM_InterlaceFrameProgressive,
1165     OMX_QCOM_InterlaceInterleaveFrameTopFieldFirst,
1166     OMX_QCOM_InterlaceInterleaveFrameBottomFieldFirst,
1167     OMX_QCOM_InterlaceFrameTopFieldFirst,
1168     OMX_QCOM_InterlaceFrameBottomFieldFirst,
1169     OMX_QCOM_InterlaceFieldTop,
1170     OMX_QCOM_InterlaceFieldBottom
1171 }OMX_QCOM_INTERLACETYPE;
1172 
1173 typedef struct OMX_QCOM_PARAM_VIDEO_INTERLACETYPE
1174 {
1175     OMX_U32 nSize;           /** Size of the structure in bytes */
1176     OMX_VERSIONTYPE nVersion;/** OMX specification version information */
1177     OMX_U32 nPortIndex;    /** Portindex which is extended by this structure */
1178     OMX_BOOL bInterlace;  /** Interlace content **/
1179 }OMX_QCOM_PARAM_VIDEO_INTERLACETYPE;
1180 
1181 typedef struct OMX_QCOM_CONFIG_INTERLACETYPE
1182 {
1183     OMX_U32 nSize;
1184     OMX_VERSIONTYPE nVersion;
1185     OMX_U32 nPortIndex;
1186     OMX_U32 nIndex;
1187     OMX_QCOM_INTERLACETYPE eInterlaceType;
1188 }OMX_QCOM_CONFIG_INTERLACETYPE;
1189 
1190 #define MAX_PAN_SCAN_WINDOWS 4
1191 
1192 typedef struct OMX_QCOM_PANSCAN
1193 {
1194    OMX_U32 numWindows;
1195    OMX_QCOMRectangle window[MAX_PAN_SCAN_WINDOWS];
1196 } OMX_QCOM_PANSCAN;
1197 
1198 typedef struct OMX_QCOM_ASPECT_RATIO
1199 {
1200    OMX_U32 aspectRatioX;
1201    OMX_U32 aspectRatioY;
1202 } OMX_QCOM_ASPECT_RATIO;
1203 
1204 typedef struct OMX_QCOM_DISPLAY_ASPECT_RATIO
1205 {
1206    OMX_U32 displayVerticalSize;
1207    OMX_U32 displayHorizontalSize;
1208 } OMX_QCOM_DISPLAY_ASPECT_RATIO;
1209 
1210 typedef struct OMX_QCOM_FRAME_PACK_ARRANGEMENT
1211 {
1212   OMX_U32 nSize;
1213   OMX_VERSIONTYPE nVersion;
1214   OMX_U32 nPortIndex;
1215   OMX_U32 id;
1216   OMX_U32 cancel_flag;
1217   OMX_U32 type;
1218   OMX_U32 quincunx_sampling_flag;
1219   OMX_U32 content_interpretation_type;
1220   OMX_U32 spatial_flipping_flag;
1221   OMX_U32 frame0_flipped_flag;
1222   OMX_U32 field_views_flag;
1223   OMX_U32 current_frame_is_frame0_flag;
1224   OMX_U32 frame0_self_contained_flag;
1225   OMX_U32 frame1_self_contained_flag;
1226   OMX_U32 frame0_grid_position_x;
1227   OMX_U32 frame0_grid_position_y;
1228   OMX_U32 frame1_grid_position_x;
1229   OMX_U32 frame1_grid_position_y;
1230   OMX_U32 reserved_byte;
1231   OMX_U32 repetition_period;
1232   OMX_U32 extension_flag;
1233 } OMX_QCOM_FRAME_PACK_ARRANGEMENT;
1234 
1235 typedef struct OMX_QCOM_EXTRADATA_QP
1236 {
1237    OMX_U32        nQP;
1238 } OMX_QCOM_EXTRADATA_QP;
1239 
1240 typedef struct OMX_QCOM_EXTRADATA_BITS_INFO
1241 {
1242    OMX_U32 header_bits;
1243    OMX_U32 frame_bits;
1244 } OMX_QCOM_EXTRADATA_BITS_INFO;
1245 
1246 typedef struct OMX_QCOM_EXTRADATA_USERDATA {
1247    OMX_U32 type;
1248    OMX_U32 data[1];
1249 } OMX_QCOM_EXTRADATA_USERDATA;
1250 
1251 typedef struct OMX_QCOM_EXTRADATA_FRAMEINFO
1252 {
1253    // common frame meta data. interlace related info removed
1254    OMX_VIDEO_PICTURETYPE  ePicType;
1255    OMX_QCOM_INTERLACETYPE interlaceType;
1256    OMX_QCOM_PANSCAN       panScan;
1257    OMX_QCOM_ASPECT_RATIO  aspectRatio;
1258    OMX_QCOM_DISPLAY_ASPECT_RATIO displayAspectRatio;
1259    OMX_U32                nConcealedMacroblocks;
1260    OMX_U32                nFrameRate;
1261    OMX_TICKS              nTimeStamp;
1262 } OMX_QCOM_EXTRADATA_FRAMEINFO;
1263 
1264 typedef struct OMX_QCOM_EXTRADATA_FRAMEDIMENSION
1265 {
1266    /** Frame Dimensions added to each YUV buffer */
1267    OMX_U32   nDecWidth;  /** Width  rounded to multiple of 16 */
1268    OMX_U32   nDecHeight; /** Height rounded to multiple of 16 */
1269    OMX_U32   nActualWidth; /** Actual Frame Width */
1270    OMX_U32   nActualHeight; /** Actual Frame Height */
1271 
1272 } OMX_QCOM_EXTRADATA_FRAMEDIMENSION;
1273 
1274 typedef struct OMX_QCOM_H264EXTRADATA
1275 {
1276    OMX_U64 seiTimeStamp;
1277 } OMX_QCOM_H264EXTRADATA;
1278 
1279 typedef struct OMX_QCOM_VC1EXTRADATA
1280 {
1281    OMX_U32                     nVC1RangeY;
1282    OMX_U32                     nVC1RangeUV;
1283    OMX_QCOM_VC1RESOLUTIONTYPE eVC1PicResolution;
1284 } OMX_QCOM_VC1EXTRADATA;
1285 
1286 typedef union OMX_QCOM_EXTRADATA_CODEC_DATA
1287 {
1288    OMX_QCOM_H264EXTRADATA h264ExtraData;
1289    OMX_QCOM_VC1EXTRADATA vc1ExtraData;
1290 } OMX_QCOM_EXTRADATA_CODEC_DATA;
1291 
1292 typedef struct OMX_QCOM_EXTRADATA_MBINFO
1293 {
1294    OMX_U32 nFormat;
1295    OMX_U32 nDataSize;
1296    OMX_U8  data[0];
1297 } OMX_QCOM_EXTRADATA_MBINFO;
1298 
1299 typedef struct OMX_QCOM_EXTRADATA_VQZIPSEI {
1300     OMX_U32 nSize;
1301     OMX_U8 data[0];
1302 } OMX_QCOM_EXTRADATA_VQZIPSEI;
1303 
1304 typedef struct OMX_QTI_VIDEO_PARAM_ENABLE_ROIINFO {
1305     OMX_U32         nSize;
1306     OMX_VERSIONTYPE nVersion;
1307     OMX_U32         nPortIndex;
1308     OMX_BOOL        bEnableRoiInfo;
1309 } OMX_QTI_VIDEO_PARAM_ENABLE_ROIINFO;
1310 
1311 typedef struct OMX_QTI_VIDEO_CONFIG_ROIINFO {
1312     OMX_U32         nSize;
1313     OMX_VERSIONTYPE nVersion;
1314     OMX_U32         nPortIndex;
1315     OMX_S32         nUpperQpOffset;
1316     OMX_S32         nLowerQpOffset;
1317     OMX_BOOL        bUseRoiInfo;
1318     OMX_S32         nRoiMBInfoSize;
1319     OMX_PTR         pRoiMBInfo;
1320 } OMX_QTI_VIDEO_CONFIG_ROIINFO;
1321 
1322 typedef enum OMX_QCOM_EXTRADATATYPE
1323 {
1324     OMX_ExtraDataFrameInfo =               0x7F000001,
1325     OMX_ExtraDataH264 =                    0x7F000002,
1326     OMX_ExtraDataVC1 =                     0x7F000003,
1327     OMX_ExtraDataFrameDimension =          0x7F000004,
1328     OMX_ExtraDataVideoEncoderSliceInfo =   0x7F000005,
1329     OMX_ExtraDataConcealMB =               0x7F000006,
1330     OMX_ExtraDataInterlaceFormat =         0x7F000007,
1331     OMX_ExtraDataPortDef =                 0x7F000008,
1332     OMX_ExtraDataMP2ExtnData =             0x7F000009,
1333     OMX_ExtraDataMP2UserData =             0x7F00000a,
1334     OMX_ExtraDataVideoLTRInfo =            0x7F00000b,
1335     OMX_ExtraDataFramePackingArrangement = 0x7F00000c,
1336     OMX_ExtraDataQP =                      0x7F00000d,
1337     OMX_ExtraDataInputBitsInfo =           0x7F00000e,
1338     OMX_ExtraDataVideoEncoderMBInfo =      0x7F00000f,
1339     OMX_ExtraDataVQZipSEI  =               0x7F000010,
1340 } OMX_QCOM_EXTRADATATYPE;
1341 
1342 typedef struct  OMX_STREAMINTERLACEFORMATTYPE {
1343     OMX_U32 nSize;
1344     OMX_VERSIONTYPE nVersion;
1345     OMX_U32 nPortIndex;
1346     OMX_BOOL bInterlaceFormat;
1347     OMX_U32 nInterlaceFormats;
1348 } OMX_STREAMINTERLACEFORMAT;
1349 
1350 typedef enum OMX_INTERLACETYPE
1351 {
1352    OMX_InterlaceFrameProgressive,
1353    OMX_InterlaceInterleaveFrameTopFieldFirst,
1354    OMX_InterlaceInterleaveFrameBottomFieldFirst,
1355    OMX_InterlaceFrameTopFieldFirst,
1356    OMX_InterlaceFrameBottomFieldFirst
1357 } OMX_INTERLACES;
1358 
1359 
1360 #define OMX_EXTRADATA_HEADER_SIZE 20
1361 
1362 /**
1363  * AVC profile types, each profile indicates support for various
1364  * performance bounds and different annexes.
1365  */
1366 typedef enum QOMX_VIDEO_AVCPROFILETYPE {
1367     QOMX_VIDEO_AVCProfileBaseline      = OMX_VIDEO_AVCProfileBaseline,
1368     QOMX_VIDEO_AVCProfileMain          = OMX_VIDEO_AVCProfileMain,
1369     QOMX_VIDEO_AVCProfileExtended      = OMX_VIDEO_AVCProfileExtended,
1370     QOMX_VIDEO_AVCProfileHigh          = OMX_VIDEO_AVCProfileHigh,
1371     QOMX_VIDEO_AVCProfileHigh10        = OMX_VIDEO_AVCProfileHigh10,
1372     QOMX_VIDEO_AVCProfileHigh422       = OMX_VIDEO_AVCProfileHigh422,
1373     QOMX_VIDEO_AVCProfileHigh444       = OMX_VIDEO_AVCProfileHigh444,
1374     /* QCom specific profile indexes */
1375     QOMX_VIDEO_AVCProfileConstrained           = OMX_VIDEO_AVCProfileVendorStartUnused,
1376     QOMX_VIDEO_AVCProfileConstrainedBaseline,
1377     QOMX_VIDEO_AVCProfileConstrainedHigh,
1378 } QOMX_VIDEO_AVCPROFILETYPE;
1379 
1380 
1381 /**
1382  * H.264 MVC Profiles
1383   */
1384 typedef enum QOMX_VIDEO_MVCPROFILETYPE {
1385     QOMX_VIDEO_MVCProfileStereoHigh = 0x1,
1386     QOMX_VIDEO_MVCProfileMultiViewHigh = 0x2,
1387     QOMX_VIDEO_MVCProfileKhronosExtensions = 0x6F000000,
1388     QOMX_VIDEO_MVCProfileVendorStartUnused = 0x7F000000,
1389     QOMX_VIDEO_MVCProfileMax = 0x7FFFFFFF
1390 } QOMX_VIDEO_MVCPROFILETYPE;
1391 
1392 /**
1393  * H.264 MVC Levels
1394   */
1395 typedef enum QOMX_VIDEO_MVCLEVELTYPE {
1396     QOMX_VIDEO_MVCLevel1   = 0x01,     /**< Level 1 */
1397     QOMX_VIDEO_MVCLevel1b  = 0x02,     /**< Level 1b */
1398     QOMX_VIDEO_MVCLevel11  = 0x04,     /**< Level 1.1 */
1399     QOMX_VIDEO_MVCLevel12  = 0x08,     /**< Level 1.2 */
1400     QOMX_VIDEO_MVCLevel13  = 0x10,     /**< Level 1.3 */
1401     QOMX_VIDEO_MVCLevel2   = 0x20,     /**< Level 2 */
1402     QOMX_VIDEO_MVCLevel21  = 0x40,     /**< Level 2.1 */
1403     QOMX_VIDEO_MVCLevel22  = 0x80,     /**< Level 2.2 */
1404     QOMX_VIDEO_MVCLevel3   = 0x100,    /**< Level 3 */
1405     QOMX_VIDEO_MVCLevel31  = 0x200,    /**< Level 3.1 */
1406     QOMX_VIDEO_MVCLevel32  = 0x400,    /**< Level 3.2 */
1407     QOMX_VIDEO_MVCLevel4   = 0x800,    /**< Level 4 */
1408     QOMX_VIDEO_MVCLevel41  = 0x1000,   /**< Level 4.1 */
1409     QOMX_VIDEO_MVCLevel42  = 0x2000,   /**< Level 4.2 */
1410     QOMX_VIDEO_MVCLevel5   = 0x4000,   /**< Level 5 */
1411     QOMX_VIDEO_MVCLevel51  = 0x8000,   /**< Level 5.1 */
1412     QOMX_VIDEO_MVCLevelKhronosExtensions = 0x6F000000,
1413     QOMX_VIDEO_MVCLevelVendorStartUnused = 0x7F000000,
1414     QOMX_VIDEO_MVCLevelMax = 0x7FFFFFFF
1415 } QOMX_VIDEO_MVCLEVELTYPE;
1416 
1417 /**
1418  * DivX Versions
1419  */
1420 typedef enum  QOMX_VIDEO_DIVXFORMATTYPE {
1421     QOMX_VIDEO_DIVXFormatUnused = 0x01, /**< Format unused or unknown */
1422     QOMX_VIDEO_DIVXFormat311    = 0x02, /**< DivX 3.11 */
1423     QOMX_VIDEO_DIVXFormat4      = 0x04, /**< DivX 4 */
1424     QOMX_VIDEO_DIVXFormat5      = 0x08, /**< DivX 5 */
1425     QOMX_VIDEO_DIVXFormat6      = 0x10, /**< DivX 6 */
1426     QOMX_VIDEO_DIVXFormatKhronosExtensions = 0x6F000000,
1427     QOMX_VIDEO_DIVXFormatVendorStartUnused = 0x7F000000,
1428     QOMX_VIDEO_DIVXFormatMax = 0x7FFFFFFF
1429 } QOMX_VIDEO_DIVXFORMATTYPE;
1430 
1431 /**
1432  * DivX profile types, each profile indicates support for
1433  * various performance bounds.
1434  */
1435 typedef enum QOMX_VIDEO_DIVXPROFILETYPE {
1436     QOMX_VIDEO_DivXProfileqMobile = 0x01, /**< qMobile Profile */
1437     QOMX_VIDEO_DivXProfileMobile  = 0x02, /**< Mobile Profile */
1438     QOMX_VIDEO_DivXProfileMT      = 0x04, /**< Mobile Theatre Profile */
1439     QOMX_VIDEO_DivXProfileHT      = 0x08, /**< Home Theatre Profile */
1440     QOMX_VIDEO_DivXProfileHD      = 0x10, /**< High Definition Profile */
1441     QOMX_VIDEO_DIVXProfileKhronosExtensions = 0x6F000000,
1442     QOMX_VIDEO_DIVXProfileVendorStartUnused = 0x7F000000,
1443     QOMX_VIDEO_DIVXProfileMax = 0x7FFFFFFF
1444 } QOMX_VIDEO_DIVXPROFILETYPE;
1445 
1446 /**
1447  * DivX Video Params
1448  *
1449  *  STRUCT MEMBERS:
1450  *  nSize      : Size of the structure in bytes
1451  *  nVersion   : OMX specification version information
1452  *  nPortIndex : Port that this structure applies to
1453  *  eFormat    : Version of DivX stream / data
1454  *  eProfile   : Profile of DivX stream / data
1455  */
1456 typedef struct QOMX_VIDEO_PARAM_DIVXTYPE {
1457     OMX_U32 nSize;
1458     OMX_VERSIONTYPE nVersion;
1459     OMX_U32 nPortIndex;
1460     QOMX_VIDEO_DIVXFORMATTYPE eFormat;
1461     QOMX_VIDEO_DIVXPROFILETYPE eProfile;
1462 } QOMX_VIDEO_PARAM_DIVXTYPE;
1463 
1464 
1465 
1466 /**
1467  *  VP Versions
1468  */
1469 typedef enum QOMX_VIDEO_VPFORMATTYPE {
1470     QOMX_VIDEO_VPFormatUnused = 0x01, /**< Format unused or unknown */
1471     QOMX_VIDEO_VPFormat6      = 0x02, /**< VP6 Video Format */
1472     QOMX_VIDEO_VPFormat7      = 0x04, /**< VP7 Video Format */
1473     QOMX_VIDEO_VPFormat8      = 0x08, /**< VP8 Video Format */
1474     QOMX_VIDEO_VPFormat9      = 0x10, /**< VP9 Video Format */
1475     QOMX_VIDEO_VPFormatKhronosExtensions = 0x6F000000,
1476     QOMX_VIDEO_VPFormatVendorStartUnused = 0x7F000000,
1477     QOMX_VIDEO_VPFormatMax = 0x7FFFFFFF
1478 } QOMX_VIDEO_VPFORMATTYPE;
1479 
1480 /**
1481  * VP profile types, each profile indicates support for various
1482  * encoding tools.
1483  */
1484 typedef enum QOMX_VIDEO_VPPROFILETYPE {
1485     QOMX_VIDEO_VPProfileSimple   = 0x01, /**< Simple Profile, applies to VP6 only */
1486     QOMX_VIDEO_VPProfileAdvanced = 0x02, /**< Advanced Profile, applies to VP6 only */
1487     QOMX_VIDEO_VPProfileVersion0 = 0x04, /**< Version 0, applies to VP7 and VP8 */
1488     QOMX_VIDEO_VPProfileVersion1 = 0x08, /**< Version 1, applies to VP7 and VP8 */
1489     QOMX_VIDEO_VPProfileVersion2 = 0x10, /**< Version 2, applies to VP8 only */
1490     QOMX_VIDEO_VPProfileVersion3 = 0x20, /**< Version 3, applies to VP8 only */
1491     QOMX_VIDEO_VPProfileKhronosExtensions = 0x6F000000,
1492     QOMX_VIDEO_VPProfileVendorStartUnused = 0x7F000000,
1493     QOMX_VIDEO_VPProfileMax = 0x7FFFFFFF
1494 } QOMX_VIDEO_VPPROFILETYPE;
1495 
1496 /**
1497  * VP Video Params
1498  *
1499  *  STRUCT MEMBERS:
1500  *  nSize      : Size of the structure in bytes
1501  *  nVersion   : OMX specification version information
1502  *  nPortIndex : Port that this structure applies to
1503  *  eFormat    : Format of VP stream / data
1504  *  eProfile   : Profile or Version of VP stream / data
1505  */
1506 typedef struct QOMX_VIDEO_PARAM_VPTYPE {
1507     OMX_U32 nSize;
1508     OMX_VERSIONTYPE nVersion;
1509     OMX_U32 nPortIndex;
1510     QOMX_VIDEO_VPFORMATTYPE eFormat;
1511     QOMX_VIDEO_VPPROFILETYPE eProfile;
1512 } QOMX_VIDEO_PARAM_VPTYPE;
1513 
1514 /**
1515  * Spark Versions
1516  */
1517 typedef enum QOMX_VIDEO_SPARKFORMATTYPE {
1518     QOMX_VIDEO_SparkFormatUnused = 0x01, /**< Format unused or unknown */
1519     QOMX_VIDEO_SparkFormat0      = 0x02, /**< Video Format Version 0 */
1520     QOMX_VIDEO_SparkFormat1      = 0x04, /**< Video Format Version 1 */
1521     QOMX_VIDEO_SparkFormatKhronosExtensions = 0x6F000000,
1522     QOMX_VIDEO_SparkFormatVendorStartUnused = 0x7F000000,
1523     QOMX_VIDEO_SparkFormatMax = 0x7FFFFFFF
1524 } QOMX_VIDEO_SPARKFORMATTYPE;
1525 
1526 /**
1527  * Spark Video Params
1528  *
1529  *  STRUCT MEMBERS:
1530  *  nSize      : Size of the structure in bytes
1531  *  nVersion   : OMX specification version information
1532  *  nPortIndex : Port that this structure applies to
1533  *  eFormat    : Version of Spark stream / data
1534  */
1535 typedef struct QOMX_VIDEO_PARAM_SPARKTYPE {
1536     OMX_U32 nSize;
1537     OMX_VERSIONTYPE nVersion;
1538     OMX_U32 nPortIndex;
1539     QOMX_VIDEO_SPARKFORMATTYPE eFormat;
1540 } QOMX_VIDEO_PARAM_SPARKTYPE;
1541 
1542 
1543 typedef struct QOMX_VIDEO_QUERY_DECODER_INSTANCES {
1544     OMX_U32 nSize;
1545     OMX_VERSIONTYPE nVersion;
1546     OMX_U32 nPortIndex;
1547     OMX_U32 nNumOfInstances;
1548 } QOMX_VIDEO_QUERY_DECODER_INSTANCES;
1549 
1550 typedef struct QOMX_ENABLETYPE {
1551     OMX_U32 nSize;
1552     OMX_VERSIONTYPE nVersion;
1553     OMX_BOOL bEnable;
1554 } QOMX_ENABLETYPE;
1555 
1556 typedef enum QOMX_VIDEO_EVENTS {
1557     OMX_EventIndexsettingChanged = OMX_EventVendorStartUnused
1558 } QOMX_VIDEO_EVENTS;
1559 
1560 typedef enum QOMX_VIDEO_PICTURE_ORDER {
1561     QOMX_VIDEO_DISPLAY_ORDER = 0x1,
1562     QOMX_VIDEO_DECODE_ORDER = 0x2
1563 } QOMX_VIDEO_PICTURE_ORDER;
1564 
1565 typedef struct QOMX_VIDEO_DECODER_PICTURE_ORDER {
1566     OMX_U32 nSize;
1567     OMX_VERSIONTYPE nVersion;
1568     OMX_U32 nPortIndex;
1569     QOMX_VIDEO_PICTURE_ORDER eOutputPictureOrder;
1570 } QOMX_VIDEO_DECODER_PICTURE_ORDER;
1571 
1572 typedef struct QOMX_INDEXEXTRADATATYPE {
1573     OMX_U32 nSize;
1574     OMX_VERSIONTYPE nVersion;
1575     OMX_U32 nPortIndex;
1576     OMX_BOOL bEnabled;
1577     OMX_INDEXTYPE nIndex;
1578 } QOMX_INDEXEXTRADATATYPE;
1579 
1580 typedef struct QOMX_INDEXTIMESTAMPREORDER {
1581     OMX_U32 nSize;
1582     OMX_VERSIONTYPE nVersion;
1583     OMX_U32 nPortIndex;
1584     OMX_BOOL bEnable;
1585 } QOMX_INDEXTIMESTAMPREORDER;
1586 
1587 typedef struct QOMX_INDEXDOWNSCALAR {
1588         OMX_U32 nSize;
1589         OMX_VERSIONTYPE nVersion;
1590         OMX_U32 nPortIndex;
1591         OMX_BOOL bEnable;
1592 } QOMX_INDEXDOWNSCALAR;
1593 
1594 typedef struct QOMX_VIDEO_CUSTOM_BUFFERSIZE {
1595         OMX_U32 nSize;
1596         OMX_VERSIONTYPE nVersion;
1597         OMX_U32 nPortIndex;
1598         OMX_U32 nBufferSize;
1599 } QOMX_VIDEO_CUSTOM_BUFFERSIZE;
1600 
1601 #define OMX_QCOM_INDEX_PARAM_VIDEO_SYNCFRAMEDECODINGMODE "OMX.QCOM.index.param.video.SyncFrameDecodingMode"
1602 #define OMX_QCOM_INDEX_PARAM_INDEXEXTRADATA "OMX.QCOM.index.param.IndexExtraData"
1603 #define OMX_QCOM_INDEX_PARAM_VIDEO_SLICEDELIVERYMODE "OMX.QCOM.index.param.SliceDeliveryMode"
1604 #define OMX_QCOM_INDEX_PARAM_VIDEO_FRAMEPACKING_EXTRADATA "OMX.QCOM.index.param.video.FramePackingExtradata"
1605 #define OMX_QCOM_INDEX_PARAM_VIDEO_QP_EXTRADATA "OMX.QCOM.index.param.video.QPExtradata"
1606 #define OMX_QCOM_INDEX_PARAM_VIDEO_INPUTBITSINFO_EXTRADATA "OMX.QCOM.index.param.video.InputBitsInfoExtradata"
1607 #define OMX_QCOM_INDEX_PARAM_VIDEO_EXTNUSER_EXTRADATA "OMX.QCOM.index.param.video.ExtnUserExtraData"
1608 #define OMX_QCOM_INDEX_CONFIG_VIDEO_FRAMEPACKING_INFO "OMX.QCOM.index.config.video.FramePackingInfo"
1609 #define OMX_QCOM_INDEX_PARAM_VIDEO_MPEG2SEQDISP_EXTRADATA "OMX.QCOM.index.param.video.Mpeg2SeqDispExtraData"
1610 
1611 
1612 #define OMX_QCOM_INDEX_PARAM_VIDEO_HIERSTRUCTURE "OMX.QCOM.index.param.video.HierStructure"
1613 #define OMX_QCOM_INDEX_PARAM_VIDEO_LTRCOUNT "OMX.QCOM.index.param.video.LTRCount"
1614 #define OMX_QCOM_INDEX_PARAM_VIDEO_LTRPERIOD "OMX.QCOM.index.param.video.LTRPeriod"
1615 #define OMX_QCOM_INDEX_CONFIG_VIDEO_LTRUSE "OMX.QCOM.index.config.video.LTRUse"
1616 #define OMX_QCOM_INDEX_CONFIG_VIDEO_LTRMARK "OMX.QCOM.index.config.video.LTRMark"
1617 #define OMX_QCOM_INDEX_CONFIG_RECTANGLE_TYPE "OMX.QCOM.index.config.video.rectangle"
1618 #define OMX_QCOM_INDEX_PARAM_VIDEO_BASE_LAYER_ID "OMX.QCOM.index.param.video.baselayerid"
1619 #define OMX_QCOM_INDEX_PARAM_VIDEO_DRIVERVERSION "OMX.QCOM.index.param.video.FramePackingInfo"
1620 #define OMX_QCOM_INDEX_CONFIG_VIDEO_QP "OMX.QCOM.index.config.video.qp"
1621 #define OMX_QCOM_INDEX_PARAM_VIDEO_SAR "OMX.QCOM.index.param.video.sar"
1622 
1623 
1624 #define OMX_QCOM_INDEX_PARAM_VIDEO_HIERSTRUCTURE "OMX.QCOM.index.param.video.HierStructure"
1625 #define OMX_QCOM_INDEX_PARAM_VIDEO_LTRCOUNT "OMX.QCOM.index.param.video.LTRCount"
1626 #define OMX_QCOM_INDEX_PARAM_VIDEO_LTRPERIOD "OMX.QCOM.index.param.video.LTRPeriod"
1627 #define OMX_QCOM_INDEX_CONFIG_VIDEO_LTRUSE "OMX.QCOM.index.config.video.LTRUse"
1628 #define OMX_QCOM_INDEX_CONFIG_VIDEO_LTRMARK "OMX.QCOM.index.config.video.LTRMark"
1629 #define OMX_QCOM_INDEX_CONFIG_VIDEO_HIER_P_LAYERS "OMX.QCOM.index.config.video.hierplayers"
1630 #define OMX_QCOM_INDEX_CONFIG_RECTANGLE_TYPE "OMX.QCOM.index.config.video.rectangle"
1631 #define OMX_QCOM_INDEX_PARAM_VIDEO_BASE_LAYER_ID "OMX.QCOM.index.param.video.baselayerid"
1632 #define OMX_QCOM_INDEX_CONFIG_VIDEO_QP "OMX.QCOM.index.config.video.qp"
1633 #define OMX_QCOM_INDEX_PARAM_VIDEO_SAR "OMX.QCOM.index.param.video.sar"
1634 
1635 #define OMX_QCOM_INDEX_PARAM_VIDEO_PASSINPUTBUFFERFD "OMX.QCOM.index.param.video.PassInputBufferFd"
1636 #define OMX_QTI_INDEX_PARAM_VIDEO_PREFER_ADAPTIVE_PLAYBACK "OMX.QTI.index.param.video.PreferAdaptivePlayback"
1637 #define OMX_QTI_INDEX_CONFIG_VIDEO_SETTIMEDATA "OMX.QTI.index.config.video.settimedata"
1638 #define OMX_QTI_INDEX_PARAM_VIDEO_FORCE_COMPRESSED_FOR_DPB "OMX.QTI.index.param.video.ForceCompressedForDPB"
1639 #define OMX_QTI_INDEX_PARAM_VIDEO_ENABLE_ROIINFO "OMX.QTI.index.param.enableRoiInfo"
1640 #define OMX_QTI_INDEX_CONFIG_VIDEO_ROIINFO "OMX.QTI.index.config.RoiInfo"
1641 
1642 typedef enum {
1643     QOMX_VIDEO_FRAME_PACKING_CHECKERBOARD = 0,
1644     QOMX_VIDEO_FRAME_PACKING_COLUMN_INTERLEAVE = 1,
1645     QOMX_VIDEO_FRAME_PACKING_ROW_INTERLEAVE = 2,
1646     QOMX_VIDEO_FRAME_PACKING_SIDE_BY_SIDE = 3,
1647     QOMX_VIDEO_FRAME_PACKING_TOP_BOTTOM = 4,
1648     QOMX_VIDEO_FRAME_PACKING_TEMPORAL = 5,
1649 } QOMX_VIDEO_FRAME_PACKING_ARRANGEMENT;
1650 
1651 typedef enum {
1652     QOMX_VIDEO_CONTENT_UNSPECIFIED = 0,
1653     QOMX_VIDEO_CONTENT_LR_VIEW = 1,
1654     QOMX_VIDEO_CONTENT_RL_VIEW = 2,
1655 } QOMX_VIDEO_CONTENT_INTERPRETATION;
1656 
1657 /**
1658  * Specifies the extended picture types. These values should be
1659  * OR'd along with the types defined in OMX_VIDEO_PICTURETYPE to
1660  * signal all pictures types which are allowed.
1661  *
1662  * ENUMS:
1663  *  H.264 Specific Picture Types:   IDR
1664  */
1665 typedef enum QOMX_VIDEO_PICTURETYPE {
1666     QOMX_VIDEO_PictureTypeIDR = OMX_VIDEO_PictureTypeVendorStartUnused + 0x1000
1667 } QOMX_VIDEO_PICTURETYPE;
1668 
1669 #define OMX_QCOM_INDEX_CONFIG_ACTIVE_REGION_DETECTION           "OMX.QCOM.index.config.activeregiondetection"
1670 #define OMX_QCOM_INDEX_CONFIG_ACTIVE_REGION_DETECTION_STATUS    "OMX.QCOM.index.config.activeregiondetectionstatus"
1671 #define OMX_QCOM_INDEX_CONFIG_SCALING_MODE                      "OMX.QCOM.index.config.scalingmode"
1672 #define OMX_QCOM_INDEX_CONFIG_NOISEREDUCTION                    "OMX.QCOM.index.config.noisereduction"
1673 #define OMX_QCOM_INDEX_CONFIG_IMAGEENHANCEMENT                  "OMX.QCOM.index.config.imageenhancement"
1674 #define OMX_QCOM_INDEX_PARAM_HELDBUFFERCOUNT                    "OMX.QCOM.index.param.HeldBufferCount" /**< reference: QOMX_HELDBUFFERCOUNTTYPE */
1675 
1676 
1677 typedef struct QOMX_RECTTYPE {
1678     OMX_U32 nSize;
1679     OMX_VERSIONTYPE nVersion;
1680     OMX_S32 nLeft;
1681     OMX_S32 nTop;
1682     OMX_U32 nWidth;
1683     OMX_U32 nHeight;
1684 } QOMX_RECTTYPE;
1685 
1686 typedef struct QOMX_ACTIVEREGIONDETECTIONTYPE {
1687     OMX_U32 nSize;
1688     OMX_VERSIONTYPE nVersion;
1689     OMX_U32 nPortIndex;
1690     OMX_BOOL bEnable;
1691     QOMX_RECTTYPE sROI;
1692     OMX_U32 nNumExclusionRegions;
1693     QOMX_RECTTYPE sExclusionRegions[1];
1694 } QOMX_ACTIVEREGIONDETECTIONTYPE;
1695 
1696 typedef struct QOMX_ACTIVEREGIONDETECTION_STATUSTYPE {
1697     OMX_U32 nSize;
1698     OMX_VERSIONTYPE nVersion;
1699     OMX_U32 nPortIndex;
1700     OMX_BOOL bDetected;
1701     QOMX_RECTTYPE sDetectedRegion;
1702 } QOMX_ACTIVEREGIONDETECTION_STATUSTYPE;
1703 
1704 typedef enum QOMX_SCALE_MODETYPE {
1705     QOMX_SCALE_MODE_Normal,
1706     QOMX_SCALE_MODE_Anamorphic,
1707     QOMX_SCALE_MODE_Max = 0x7FFFFFFF
1708 } QOMX_SCALE_MODETYPE;
1709 
1710 typedef struct QOMX_SCALINGMODETYPE {
1711     OMX_U32 nSize;
1712     OMX_VERSIONTYPE nVersion;
1713     QOMX_SCALE_MODETYPE  eScaleMode;
1714 } QOMX_SCALINGMODETYPE;
1715 
1716 typedef struct QOMX_NOISEREDUCTIONTYPE {
1717     OMX_U32 nSize;
1718     OMX_VERSIONTYPE nVersion;
1719     OMX_U32 nPortIndex;
1720     OMX_BOOL bEnable;
1721     OMX_BOOL bAutoMode;
1722     OMX_S32 nNoiseReduction;
1723 } QOMX_NOISEREDUCTIONTYPE;
1724 
1725 typedef struct QOMX_IMAGEENHANCEMENTTYPE {
1726     OMX_U32 nSize;
1727     OMX_VERSIONTYPE nVersion;
1728     OMX_U32 nPortIndex;
1729     OMX_BOOL bEnable;
1730     OMX_BOOL bAutoMode;
1731     OMX_S32 nImageEnhancement;
1732 } QOMX_IMAGEENHANCEMENTTYPE;
1733 
1734 /*
1735  * these are part of OMX1.2 but JB MR2 branch doesn't have them defined
1736  * OMX_IndexParamInterlaceFormat
1737  * OMX_INTERLACEFORMATTYPE
1738  */
1739 #ifndef OMX_IndexParamInterlaceFormat
1740 #define OMX_IndexParamInterlaceFormat (0x7FF00000)
1741 typedef struct OMX_INTERLACEFORMATTYPE {
1742     OMX_U32 nSize;
1743     OMX_VERSIONTYPE nVersion;
1744     OMX_U32 nPortIndex;
1745     OMX_U32 nFormat;
1746     OMX_TICKS nTimeStamp;
1747 } OMX_INTERLACEFORMATTYPE;
1748 #endif
1749 
1750 /**
1751  * This structure is used to indicate the maximum number of buffers
1752  * that a port will hold during data flow.
1753  *
1754  * STRUCT MEMBERS:
1755  *  nSize              : Size of the structure in bytes
1756  *  nVersion           : OMX specification version info
1757  *  nPortIndex         : Port that this structure applies to
1758  *  nHeldBufferCount   : Read-only, maximum number of buffers that will be held
1759  */
1760 typedef struct QOMX_HELDBUFFERCOUNTTYPE {
1761     OMX_U32 nSize;
1762     OMX_VERSIONTYPE nVersion;
1763     OMX_U32 nPortIndex;
1764     OMX_U32 nHeldBufferCount;
1765 } QOMX_HELDBUFFERCOUNTTYPE;
1766 
1767 typedef enum QOMX_VIDEO_HIERARCHICALCODINGTYPE {
1768     QOMX_HIERARCHICALCODING_P = 0x01,
1769     QOMX_HIERARCHICALCODING_B = 0x02,
1770 } QOMX_VIDEO_HIERARCHICALCODINGTYPE;
1771 
1772 typedef struct QOMX_VIDEO_HIERARCHICALLAYERS {
1773     OMX_U32 nSize;
1774     OMX_VERSIONTYPE nVersion;
1775     OMX_U32 nPortIndex;
1776     OMX_U32 nNumLayers;
1777     QOMX_VIDEO_HIERARCHICALCODINGTYPE eHierarchicalCodingType;
1778 } QOMX_VIDEO_HIERARCHICALLAYERS;
1779 
1780 typedef struct QOMX_VIDEO_H264ENTROPYCODINGTYPE {
1781    OMX_U32 nSize;
1782    OMX_VERSIONTYPE nVersion;
1783    OMX_BOOL bCabac;
1784    OMX_U32 nCabacInitIdc;
1785 } QOMX_VIDEO_H264ENTROPYCODINGTYPE;
1786 
1787 
1788 /* VIDEO POSTPROCESSING CTRLS AND ENUMS */
1789 #define QOMX_VPP_HQV_CUSTOMPAYLOAD_SZ 256
1790 #define VPP_HQV_CONTROL_GLOBAL_START (VPP_HQV_CONTROL_CUST + 1)
1791 
1792 typedef enum QOMX_VPP_HQV_MODE {
1793     VPP_HQV_MODE_OFF,
1794     VPP_HQV_MODE_AUTO,
1795     VPP_HQV_MODE_MANUAL,
1796     VPP_HQV_MODE_MAX
1797 } QOMX_VPP_HQV_MODE;
1798 
1799 typedef enum QOMX_VPP_HQVCONTROLTYPE {
1800     VPP_HQV_CONTROL_CADE = 0x1,
1801     VPP_HQV_CONTROL_CNR = 0x04,
1802     VPP_HQV_CONTROL_AIE = 0x05,
1803     VPP_HQV_CONTROL_FRC = 0x06,
1804     VPP_HQV_CONTROL_CUST = 0x07,
1805     VPP_HQV_CONTROL_GLOBAL_DEMO = VPP_HQV_CONTROL_GLOBAL_START,
1806     VPP_HQV_CONTROL_MAX,
1807 } QOMX_VPP_HQVCONTROLTYPE;
1808 
1809 typedef enum QOMX_VPP_HQV_HUE_MODE {
1810     VPP_HQV_HUE_MODE_OFF,
1811     VPP_HQV_HUE_MODE_ON,
1812     VPP_HQV_HUE_MODE_MAX,
1813 } QOMX_VPP_HQV_HUE_MODE;
1814 
1815 typedef enum QOMX_VPP_HQV_FRC_MODE {
1816    VPP_HQV_FRC_MODE_OFF,
1817    VPP_HQV_FRC_MODE_LOW,
1818    VPP_HQV_FRC_MODE_MED,
1819    VPP_HQV_FRC_MODE_HIGH,
1820    VPP_HQV_FRC_MODE_MAX,
1821 } QOMX_VPP_HQV_FRC_MODE;
1822 
1823 
1824 typedef struct QOMX_VPP_HQVCTRL_CADE {
1825     OMX_U32 nSize;
1826     OMX_VERSIONTYPE nVersion;
1827     QOMX_VPP_HQV_MODE mode;
1828     OMX_U32 level;
1829     OMX_S32 contrast;
1830     OMX_S32 saturation;
1831 } QOMX_VPP_HQVCTRL_CADE;
1832 
1833 typedef struct QOMX_VPP_HQVCTRL_CNR {
1834     OMX_U32 nSize;
1835     OMX_VERSIONTYPE nVersion;
1836     QOMX_VPP_HQV_MODE mode;
1837     OMX_U32 level;
1838 } QOMX_VPP_HQVCTRL_CNR;
1839 
1840 typedef struct QOMX_VPP_HQVCTRL_AIE {
1841     OMX_U32 nSize;
1842     OMX_VERSIONTYPE nVersion;
1843     QOMX_VPP_HQV_MODE mode;
1844     QOMX_VPP_HQV_HUE_MODE hue_mode;
1845     OMX_U32 cade_level;
1846     OMX_U32 ltm_level;
1847 } QOMX_VPP_HQVCTRL_AIE;
1848 
1849 typedef struct QOMX_VPP_HQVCTRL_CUSTOM {
1850     OMX_U32 nSize;
1851     OMX_VERSIONTYPE nVersion;
1852     OMX_U32 id;
1853     OMX_U32 len;
1854     OMX_U8 data[QOMX_VPP_HQV_CUSTOMPAYLOAD_SZ];
1855 } QOMX_VPP_HQVCTRL_CUSTOM;
1856 
1857 typedef struct QOMX_VPP_HQVCTRL_GLOBAL_DEMO {
1858     OMX_U32 nSize;
1859     OMX_VERSIONTYPE nVersion;
1860     OMX_U32 process_percent;
1861 } QOMX_VPP_HQVCTRL_GLOBAL_DEMO;
1862 
1863 typedef struct QOMX_VPP_HQVCTRL_FRC {
1864     OMX_U32 nSize;
1865     OMX_VERSIONTYPE nVersion;
1866     QOMX_VPP_HQV_FRC_MODE mode;
1867 } QOMX_VPP_HQVCTRL_FRC;
1868 
1869 typedef struct QOMX_VPP_HQVCONTROL {
1870     OMX_U32 nSize;
1871     OMX_VERSIONTYPE nVersion;
1872     QOMX_VPP_HQV_MODE mode;
1873     QOMX_VPP_HQVCONTROLTYPE ctrl_type;
1874     union {
1875         QOMX_VPP_HQVCTRL_CADE cade;
1876         QOMX_VPP_HQVCTRL_CNR cnr;
1877         QOMX_VPP_HQVCTRL_AIE aie;
1878         QOMX_VPP_HQVCTRL_CUSTOM custom;
1879         QOMX_VPP_HQVCTRL_GLOBAL_DEMO global_demo;
1880         QOMX_VPP_HQVCTRL_FRC frc;
1881     };
1882 } QOMX_VPP_HQVCONTROL;
1883 
1884 /* STRUCTURE TO TURN VPP ON */
1885 typedef struct QOMX_VPP_ENABLE {
1886     OMX_U32 nSize;
1887     OMX_VERSIONTYPE nVersion;
1888     OMX_BOOL enable_vpp;
1889 } QOMX_VPP_ENABLE;
1890 
1891 typedef enum OMX_QOMX_VIDEO_MBISTATISTICSTYPE {
1892     QOMX_MBI_STATISTICS_MODE_DEFAULT = 0,
1893     QOMX_MBI_STATISTICS_MODE_1 = 0x01,
1894     QOMX_MBI_STATISTICS_MODE_2 = 0x02,
1895 } OMX_QOMX_VIDEO_MBISTATISTICSTYPE;
1896 
1897 typedef struct OMX_QOMX_VIDEO_MBI_STATISTICS {
1898     OMX_U32 nSize;
1899     OMX_VERSIONTYPE nVersion;
1900     OMX_U32 nPortIndex;
1901     OMX_QOMX_VIDEO_MBISTATISTICSTYPE eMBIStatisticsType;
1902 } OMX_QOMX_VIDEO_MBI_STATISTICS;
1903 
1904 typedef struct QOMX_VIDEO_BATCHSIZETYPE {
1905     OMX_U32 nSize;
1906     OMX_VERSIONTYPE nVersion;
1907     OMX_U32 nPortIndex;
1908     OMX_U32 nBatchSize;
1909 } QOMX_VIDEO_BATCHSIZETYPE;
1910 
1911 #ifdef __cplusplus
1912 }
1913 #endif /* __cplusplus */
1914 
1915 #endif /* __OMX_QCOM_EXTENSIONS_H__ */
1916