Home | History | Annotate | Download | only in inc
      1 /*--------------------------------------------------------------------------
      2 Copyright (c) 2009-2014, 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 /**
     50  * This extension is used to register mapping of a virtual
     51  * address to a physical address. This extension is a parameter
     52  * which can be set using the OMX_SetParameter macro. The data
     53  * pointer corresponding to this extension is
     54  * OMX_QCOM_MemMapEntry. This parameter is a 'write only'
     55  * parameter (Current value cannot be queried using
     56  * OMX_GetParameter macro).
     57  */
     58 #define OMX_QCOM_EXTN_REGISTER_MMAP     "OMX.QCOM.index.param.register_mmap"
     59 
     60 /**
     61  * This structure describes the data pointer corresponding to
     62  * the OMX_QCOM_MMAP_REGISTER_EXTN extension. This parameter
     63  * must be set only 'after' populating a port with a buffer
     64  * using OMX_UseBuffer, wherein the data pointer of the buffer
     65  * corresponds to the virtual address as specified in this
     66  * structure.
     67  */
     68 struct OMX_QCOM_PARAM_MEMMAPENTRYTYPE
     69 {
     70     OMX_U32 nSize;              /** Size of the structure in bytes */
     71     OMX_VERSIONTYPE nVersion;   /**< OMX specification version information */
     72     OMX_U32 nPortIndex;         /**< Port number the structure applies to */
     73 
     74     /**
     75      * The virtual address of memory block
     76      */
     77     OMX_U64 nVirtualAddress;
     78 
     79     /**
     80      * The physical address corresponding to the virtual address. The physical
     81      * address is contiguous for the entire valid range of the virtual
     82      * address.
     83      */
     84     OMX_U64 nPhysicalAddress;
     85 };
     86 
     87 #define QOMX_VIDEO_IntraRefreshRandom (OMX_VIDEO_IntraRefreshVendorStartUnused + 0)
     88 
     89 /* This error event is used for H.264 long-term reference (LTR) encoding.
     90  * When IL client specifies an LTR frame with its identifier via
     91  * OMX_QCOM_INDEX_CONFIG_VIDEO_LTRUSE to the encoder, if the specified
     92  * LTR frame can not be located by the encoder in its LTR list, the encoder
     93  * issues this error event to IL client to notify the failure of LTRUse config.
     94  */
     95 #define QOMX_ErrorLTRUseFailed        (OMX_ErrorVendorStartUnused + 1)
     96 
     97 #define QOMX_VIDEO_BUFFERFLAG_BFRAME 0x00100000
     98 
     99 #define QOMX_VIDEO_BUFFERFLAG_EOSEQ  0x00200000
    100 
    101 #define QOMX_VIDEO_BUFFERFLAG_MBAFF  0x00400000
    102 
    103 #define OMX_QCOM_PORTDEFN_EXTN   "OMX.QCOM.index.param.portdefn"
    104 /* Allowed APIs on the above Index: OMX_GetParameter() and OMX_SetParameter() */
    105 
    106 typedef enum OMX_QCOMMemoryRegion
    107 {
    108     OMX_QCOM_MemRegionInvalid,
    109     OMX_QCOM_MemRegionEBI1,
    110     OMX_QCOM_MemRegionSMI,
    111     OMX_QCOM_MemRegionMax = 0X7FFFFFFF
    112 } OMX_QCOMMemoryRegion;
    113 
    114 typedef enum OMX_QCOMCacheAttr
    115 {
    116     OMX_QCOM_CacheAttrNone,
    117     OMX_QCOM_CacheAttrWriteBack,
    118     OMX_QCOM_CacheAttrWriteThrough,
    119     OMX_QCOM_CacheAttrMAX = 0X7FFFFFFF
    120 } OMX_QCOMCacheAttr;
    121 
    122 typedef struct OMX_QCOMRectangle
    123 {
    124    OMX_S32 x;
    125    OMX_S32 y;
    126    OMX_S32 dx;
    127    OMX_S32 dy;
    128 } OMX_QCOMRectangle;
    129 
    130 /** OMX_QCOMFramePackingFormat
    131   * Input or output buffer format
    132   */
    133 typedef enum OMX_QCOMFramePackingFormat
    134 {
    135   /* 0 - unspecified
    136    */
    137   OMX_QCOM_FramePacking_Unspecified,
    138 
    139   /*  1 - Partial frames may be present OMX IL 1.1.1 Figure 2-10:
    140    *  Case 1??Each Buffer Filled In Whole or In Part
    141    */
    142   OMX_QCOM_FramePacking_Arbitrary,
    143 
    144   /*  2 - Multiple complete frames per buffer (integer number)
    145    *  OMX IL 1.1.1 Figure 2-11: Case 2Each Buffer Filled with
    146    *  Only Complete Frames of Data
    147    */
    148   OMX_QCOM_FramePacking_CompleteFrames,
    149 
    150   /*  3 - Only one complete frame per buffer, no partial frame
    151    *  OMX IL 1.1.1 Figure 2-12: Case 3Each Buffer Filled with
    152    *  Only One Frame of Compressed Data. Usually at least one
    153    *  complete unit of data will be delivered in a buffer for
    154    *  uncompressed data formats.
    155    */
    156   OMX_QCOM_FramePacking_OnlyOneCompleteFrame,
    157 
    158   /*  4 - Only one complete subframe per buffer, no partial subframe
    159    *  Example: In H264, one complete NAL per buffer, where one frame
    160    *  can contatin multiple NAL
    161    */
    162   OMX_QCOM_FramePacking_OnlyOneCompleteSubFrame,
    163 
    164   OMX_QCOM_FramePacking_MAX = 0X7FFFFFFF
    165 } OMX_QCOMFramePackingFormat;
    166 
    167 typedef struct OMX_QCOM_PARAM_PORTDEFINITIONTYPE {
    168  OMX_U32 nSize;           /** Size of the structure in bytes */
    169  OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    170  OMX_U32 nPortIndex;    /** Portindex which is extended by this structure */
    171 
    172  /** Platform specific memory region EBI1, SMI, etc.,*/
    173  OMX_QCOMMemoryRegion nMemRegion;
    174 
    175  OMX_QCOMCacheAttr nCacheAttr; /** Cache attributes */
    176 
    177  /** Input or output buffer format */
    178  OMX_U32 nFramePackingFormat;
    179 
    180 } OMX_QCOM_PARAM_PORTDEFINITIONTYPE;
    181 
    182 typedef struct OMX_QCOM_VIDEO_PARAM_QPRANGETYPE {
    183     OMX_U32 nSize;
    184     OMX_VERSIONTYPE nVersion;
    185     OMX_U32 nPortIndex;
    186     OMX_U32 minQP;
    187     OMX_U32 maxQP;
    188 } OMX_QCOM_VIDEO_PARAM_QPRANGETYPE;
    189 
    190 #define OMX_QCOM_PLATFORMPVT_EXTN   "OMX.QCOM.index.param.platformprivate"
    191 /** Allowed APIs on the above Index: OMX_SetParameter() */
    192 
    193 typedef enum OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE
    194 {
    195     /** Enum for PMEM information */
    196     OMX_QCOM_PLATFORM_PRIVATE_PMEM = 0x1
    197 } OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE;
    198 
    199 /** IL client will set the following structure. A failure
    200  *  code will be returned if component does not support the
    201  *  value provided for 'type'.
    202  */
    203 struct OMX_QCOM_PLATFORMPRIVATE_EXTN
    204 {
    205     OMX_U32 nSize;        /** Size of the structure in bytes */
    206     OMX_VERSIONTYPE nVersion; /** OMX spec version information */
    207     OMX_U32 nPortIndex;  /** Port number on which usebuffer extn is applied */
    208 
    209     /** Type of extensions should match an entry from
    210      OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE
    211     */
    212     OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE type;
    213 };
    214 
    215 typedef struct OMX_QCOM_PLATFORM_PRIVATE_PMEM_INFO
    216 {
    217     /** pmem file descriptor */
    218     unsigned long pmem_fd;
    219     /** Offset from pmem device base address */
    220     OMX_U32 offset;
    221     OMX_U32 size;
    222     OMX_U32 mapped_size;
    223     OMX_PTR buffer;
    224 }OMX_QCOM_PLATFORM_PRIVATE_PMEM_INFO;
    225 
    226 typedef struct OMX_QCOM_PLATFORM_PRIVATE_ENTRY
    227 {
    228     /** Entry type */
    229     OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE type;
    230 
    231     /** Pointer to platform specific entry */
    232     void* entry;
    233 }OMX_QCOM_PLATFORM_PRIVATE_ENTRY;
    234 
    235 typedef struct OMX_QCOM_PLATFORM_PRIVATE_LIST
    236 {
    237     /** Number of entries */
    238     OMX_U32 nEntries;
    239 
    240     /** Pointer to array of platform specific entries *
    241      * Contiguous block of OMX_QCOM_PLATFORM_PRIVATE_ENTRY element
    242     */
    243     OMX_QCOM_PLATFORM_PRIVATE_ENTRY* entryList;
    244 }OMX_QCOM_PLATFORM_PRIVATE_LIST;
    245 
    246 #define OMX_QCOM_FRAME_PACKING_FORMAT   "OMX.QCOM.index.param.framepackfmt"
    247 /* Allowed API call: OMX_GetParameter() */
    248 /* IL client can use this index to rerieve the list of frame formats *
    249  * supported by the component */
    250 
    251 typedef struct OMX_QCOM_FRAME_PACKINGFORMAT_TYPE {
    252     OMX_U32 nSize;
    253     OMX_VERSIONTYPE nVersion;
    254     OMX_U32 nPortIndex;
    255     OMX_U32 nIndex;
    256     OMX_QCOMFramePackingFormat eframePackingFormat;
    257 } OMX_QCOM_FRAME_PACKINGFORMAT_TYPE;
    258 
    259 
    260 /**
    261  * Following is the enum for color formats supported on Qualcomm
    262  * MSMs YVU420SemiPlanar color format is not defined in OpenMAX
    263  * 1.1.1 and prior versions of OpenMAX specification.
    264  */
    265 
    266 enum OMX_QCOM_COLOR_FORMATTYPE
    267 {
    268 
    269 /** YVU420SemiPlanar: YVU planar format, organized with a first
    270  *  plane containing Y pixels, and a second plane containing
    271  *  interleaved V and U pixels. V and U pixels are sub-sampled
    272  *  by a factor of two both horizontally and vertically.
    273  */
    274     QOMX_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00,
    275     QOMX_COLOR_FormatYVU420PackedSemiPlanar32m4ka,
    276     QOMX_COLOR_FormatYUV420PackedSemiPlanar16m2ka,
    277     QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka,
    278     QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m,
    279     QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mMultiView,
    280     QOMX_COLOR_FormatAndroidOpaque = (OMX_COLOR_FORMATTYPE) OMX_COLOR_FormatVendorStartUnused  + 0x789,
    281 };
    282 
    283 enum OMX_QCOM_VIDEO_CODINGTYPE
    284 {
    285 /** Codecs support by qualcomm which are not listed in OMX 1.1.x
    286  *  spec
    287  *   */
    288     OMX_QCOM_VIDEO_CodingVC1  = 0x7FA30C00 ,
    289     OMX_QCOM_VIDEO_CodingWMV9 = 0x7FA30C01,
    290     QOMX_VIDEO_CodingDivx = 0x7FA30C02,     /**< Value when coding is Divx */
    291     QOMX_VIDEO_CodingSpark = 0x7FA30C03,     /**< Value when coding is Sorenson Spark */
    292     QOMX_VIDEO_CodingVp = 0x7FA30C04,
    293     QOMX_VIDEO_CodingVp8 = OMX_VIDEO_CodingVP8,   /**< keeping old enum for backwards compatibility*/
    294     QOMX_VIDEO_CodingHevc = OMX_VIDEO_CodingHEVC, /**< keeping old enum for backwards compatibility*/
    295     QOMX_VIDEO_CodingMVC = 0x7FA30C07,
    296 };
    297 
    298 enum OMX_QCOM_EXTN_INDEXTYPE
    299 {
    300     /** Qcom proprietary extension index list */
    301 
    302     /* "OMX.QCOM.index.param.register_mmap" */
    303     OMX_QcomIndexRegmmap = 0x7F000000,
    304 
    305     /* "OMX.QCOM.index.param.platformprivate" */
    306     OMX_QcomIndexPlatformPvt = 0x7F000001,
    307 
    308     /* "OMX.QCOM.index.param.portdefn" */
    309     OMX_QcomIndexPortDefn = 0x7F000002,
    310 
    311     /* "OMX.QCOM.index.param.framepackingformat" */
    312     OMX_QcomIndexPortFramePackFmt = 0x7F000003,
    313 
    314     /*"OMX.QCOM.index.param.Interlaced */
    315     OMX_QcomIndexParamInterlaced = 0x7F000004,
    316 
    317     /*"OMX.QCOM.index.config.interlaceformat */
    318     OMX_QcomIndexConfigInterlaced = 0x7F000005,
    319 
    320     /*"OMX.QCOM.index.param.syntaxhdr" */
    321     QOMX_IndexParamVideoSyntaxHdr = 0x7F000006,
    322 
    323     /*"OMX.QCOM.index.config.intraperiod" */
    324     QOMX_IndexConfigVideoIntraperiod = 0x7F000007,
    325 
    326     /*"OMX.QCOM.index.config.randomIntrarefresh" */
    327     QOMX_IndexConfigVideoIntraRefresh = 0x7F000008,
    328 
    329     /*"OMX.QCOM.index.config.video.TemporalSpatialTradeOff" */
    330     QOMX_IndexConfigVideoTemporalSpatialTradeOff = 0x7F000009,
    331 
    332     /*"OMX.QCOM.index.param.video.EncoderMode" */
    333     QOMX_IndexParamVideoEncoderMode = 0x7F00000A,
    334 
    335     /*"OMX.QCOM.index.param.Divxtype */
    336     OMX_QcomIndexParamVideoDivx = 0x7F00000B,
    337 
    338     /*"OMX.QCOM.index.param.Sparktype */
    339     OMX_QcomIndexParamVideoSpark = 0x7F00000C,
    340 
    341     /*"OMX.QCOM.index.param.Vptype */
    342     OMX_QcomIndexParamVideoVp = 0x7F00000D,
    343 
    344     OMX_QcomIndexQueryNumberOfVideoDecInstance = 0x7F00000E,
    345 
    346     OMX_QcomIndexParamVideoSyncFrameDecodingMode = 0x7F00000F,
    347 
    348     OMX_QcomIndexParamVideoDecoderPictureOrder = 0x7F000010,
    349 
    350     /* "OMX.QCOM.index.config.video.FramePackingInfo" */
    351     OMX_QcomIndexConfigVideoFramePackingArrangement = 0x7F000011,
    352 
    353     OMX_QcomIndexParamConcealMBMapExtraData = 0x7F000012,
    354 
    355     OMX_QcomIndexParamFrameInfoExtraData = 0x7F000013,
    356 
    357     OMX_QcomIndexParamInterlaceExtraData = 0x7F000014,
    358 
    359     OMX_QcomIndexParamH264TimeInfo = 0x7F000015,
    360 
    361     OMX_QcomIndexParamIndexExtraDataType = 0x7F000016,
    362 
    363     OMX_GoogleAndroidIndexEnableAndroidNativeBuffers = 0x7F000017,
    364 
    365     OMX_GoogleAndroidIndexUseAndroidNativeBuffer = 0x7F000018,
    366 
    367     OMX_GoogleAndroidIndexGetAndroidNativeBufferUsage = 0x7F000019,
    368 
    369     /*"OMX.QCOM.index.config.video.QPRange" */
    370     OMX_QcomIndexConfigVideoQPRange = 0x7F00001A,
    371 
    372     /*"OMX.QCOM.index.param.EnableTimeStampReoder"*/
    373     OMX_QcomIndexParamEnableTimeStampReorder = 0x7F00001B,
    374 
    375     /*"OMX.google.android.index.storeMetaDataInBuffers"*/
    376     OMX_QcomIndexParamVideoMetaBufferMode = 0x7F00001C,
    377 
    378     /*"OMX.google.android.index.useAndroidNativeBuffer2"*/
    379     OMX_GoogleAndroidIndexUseAndroidNativeBuffer2 = 0x7F00001D,
    380 
    381     /*"OMX.QCOM.index.param.VideoMaxAllowedBitrateCheck"*/
    382     OMX_QcomIndexParamVideoMaxAllowedBitrateCheck = 0x7F00001E,
    383 
    384     OMX_QcomIndexEnableSliceDeliveryMode = 0x7F00001F,
    385 
    386     /* "OMX.QCOM.index.param.video.ExtnUserExtraData" */
    387     OMX_QcomIndexEnableExtnUserData = 0x7F000020,
    388 
    389     /*"OMX.QCOM.index.param.video.EnableSmoothStreaming"*/
    390     OMX_QcomIndexParamEnableSmoothStreaming = 0x7F000021,
    391 
    392     /*"OMX.QCOM.index.param.video.QPRange" */
    393     OMX_QcomIndexParamVideoQPRange = 0x7F000022,
    394 
    395     OMX_QcomIndexEnableH263PlusPType = 0x7F000023,
    396 
    397     /*"OMX.QCOM.index.param.video.LTRCountRangeSupported"*/
    398     QOMX_IndexParamVideoLTRCountRangeSupported = 0x7F000024,
    399 
    400     /*"OMX.QCOM.index.param.video.LTRMode"*/
    401     QOMX_IndexParamVideoLTRMode = 0x7F000025,
    402 
    403     /*"OMX.QCOM.index.param.video.LTRCount"*/
    404     QOMX_IndexParamVideoLTRCount = 0x7F000026,
    405 
    406     /*"OMX.QCOM.index.config.video.LTRPeriod"*/
    407     QOMX_IndexConfigVideoLTRPeriod = 0x7F000027,
    408 
    409     /*"OMX.QCOM.index.config.video.LTRUse"*/
    410     QOMX_IndexConfigVideoLTRUse = 0x7F000028,
    411 
    412     /*"OMX.QCOM.index.config.video.LTRMark"*/
    413     QOMX_IndexConfigVideoLTRMark = 0x7F000029,
    414 
    415     /* OMX.google.android.index.prependSPSPPSToIDRFrames */
    416     OMX_QcomIndexParamSequenceHeaderWithIDR = 0x7F00002A,
    417 
    418     /* backwards compatibility */
    419     OMX_QcomIndexParamEnableVUIStreamRestrictFlag = 0x7F10002B,
    420 
    421     OMX_QcomIndexParamH264AUDelimiter = 0x7F00002B,
    422 
    423     OMX_QcomIndexParamVideoDownScalar = 0x7F00002C,
    424 
    425     /* "OMX.QCOM.index.param.video.FramePackingExtradata" */
    426     OMX_QcomIndexParamVideoFramePackingExtradata = 0x7F00002D,
    427 
    428     /* "OMX.QCOM.index.config.activeregiondetection" */
    429     OMX_QcomIndexConfigActiveRegionDetection = 0x7F00002E,
    430 
    431     /* "OMX.QCOM.index.config.activeregiondetectionstatus" */
    432     OMX_QcomIndexConfigActiveRegionDetectionStatus = 0x7F00002F,
    433 
    434     /* "OMX.QCOM.index.config.scalingmode" */
    435     OMX_QcomIndexConfigScalingMode = 0x7F000030,
    436 
    437     /* "OMX.QCOM.index.config.noisereduction" */
    438     OMX_QcomIndexConfigNoiseReduction = 0x7F000031,
    439 
    440     /* "OMX.QCOM.index.config.imageenhancement" */
    441     OMX_QcomIndexConfigImageEnhancement = 0x7F000032,
    442 
    443     /* google smooth-streaming support */
    444     OMX_QcomIndexParamVideoAdaptivePlaybackMode = 0x7F000033,
    445 
    446     /* H.264 MVC codec index */
    447     QOMX_IndexParamVideoMvc = 0x7F000034,
    448 
    449     /* "OMX.QCOM.index.param.video.QPExtradata" */
    450     OMX_QcomIndexParamVideoQPExtraData = 0x7F000035,
    451 
    452     /* "OMX.QCOM.index.param.video.InputBitsInfoExtradata" */
    453     OMX_QcomIndexParamVideoInputBitsInfoExtraData = 0x7F000036,
    454 
    455     /* VP8 Hierarchical P support */
    456     OMX_QcomIndexHierarchicalStructure = 0x7F000037,
    457 
    458     OMX_QcomIndexParamPerfLevel = 0x7F000038,
    459 
    460     OMX_QcomIndexParamH264VUITimingInfo = 0x7F000039,
    461 
    462     OMX_QcomIndexParamPeakBitrate = 0x7F00003A,
    463 
    464     /*"OMX.QCOM.index.config.video.LTRMark"*/
    465     OMX_QcomIndexConfigVideoLTRMark = QOMX_IndexConfigVideoLTRMark,
    466 
    467     /* Enable InitialQP index */
    468     QOMX_IndexParamVideoInitialQp = 0x7F00003B,
    469 
    470     OMX_QcomIndexParamSetMVSearchrange = 0x7F00003C,
    471 
    472     OMX_QcomIndexFlexibleYUVDescription = 0x7F00003D,
    473 };
    474 
    475 /**
    476  * Initial QP parameter.  This structure is used to enable
    477  * vendor specific extension to let client enable setting
    478  * initial QP values to I P B Frames
    479  *
    480  * STRUCT MEMBERS:
    481  *  nSize              : Size of Structure in bytes
    482  *  nVersion           : OpenMAX IL specification version information
    483  *  nPortIndex         : Index of the port to which this structure applies
    484  *  OMX_U32 nQpI       : First Iframe QP
    485  *  OMX_U32 nQpP       : First Pframe QP
    486  *  OMX_U32 nQpB       : First Bframe QP
    487  *  OMX_U32 bEnableInitQp : Bit field indicating which frame type(s) shall
    488  *                             use the specified initial QP.
    489  *                          Bit 0: Enable initial QP for I/IDR
    490  *                                 and use value specified in nInitQpI
    491  *                          Bit 1: Enable initial QP for P
    492  *                                 and use value specified in nInitQpP
    493  *                          Bit 2: Enable initial QP for B
    494  *                                 and use value specified in nInitQpB
    495  */
    496 
    497 typedef struct QOMX_EXTNINDEX_VIDEO_INITIALQP {
    498     OMX_U32 nSize;
    499     OMX_VERSIONTYPE nVersion;
    500     OMX_U32 nPortIndex;
    501     OMX_U32 nQpI;
    502     OMX_U32 nQpP;
    503     OMX_U32 nQpB;
    504     OMX_U32 bEnableInitQp;
    505 } QOMX_EXTNINDEX_VIDEO_INITIALQP;
    506 
    507 /**
    508  * Extension index parameter.  This structure is used to enable
    509  * vendor specific extension on input/output port and
    510  * to pass the required flags and data, if any.
    511  * The format of flags and data being passed is known to
    512  * the client and component apriori.
    513  *
    514  * STRUCT MEMBERS:
    515  *  nSize              : Size of Structure plus pData size
    516  *  nVersion           : OMX specification version information
    517  *  nPortIndex         : Indicates which port to set
    518  *  bEnable            : Extension index enable (1) or disable (0)
    519  *  nFlags             : Extension index flags, if any
    520  *  nDataSize          : Size of the extension index data to follow
    521  *  pData              : Extension index data, if present.
    522  */
    523 typedef struct QOMX_EXTNINDEX_PARAMTYPE {
    524     OMX_U32 nSize;
    525     OMX_VERSIONTYPE nVersion;
    526     OMX_U32 nPortIndex;
    527     OMX_BOOL bEnable;
    528     OMX_U32 nFlags;
    529     OMX_U32 nDataSize;
    530     OMX_PTR pData;
    531 } QOMX_EXTNINDEX_PARAMTYPE;
    532 
    533 /**
    534  * Range index parameter.  This structure is used to enable
    535  * vendor specific extension on input/output port and
    536  * to pass the required minimum and maximum values
    537  *
    538  * STRUCT MEMBERS:
    539  *  nSize              : Size of Structure in bytes
    540  *  nVersion           : OpenMAX IL specification version information
    541  *  nPortIndex         : Index of the port to which this structure applies
    542  *  nMin               : Minimum value
    543  *  nMax               : Maximum value
    544  *  nSteSize           : Step size
    545  */
    546 typedef struct QOMX_EXTNINDEX_RANGETYPE {
    547     OMX_U32 nSize;
    548     OMX_VERSIONTYPE nVersion;
    549     OMX_U32 nPortIndex;
    550     OMX_S32 nMin;
    551     OMX_S32 nMax;
    552     OMX_S32 nStepSize;
    553 } QOMX_EXTNINDEX_RANGETYPE;
    554 
    555 /**
    556  *   Specifies LTR mode types.
    557  */
    558 typedef enum QOMX_VIDEO_LTRMODETYPE
    559 {
    560     QOMX_VIDEO_LTRMode_Disable    = 0x0, /**< LTR encoding is disabled */
    561     QOMX_VIDEO_LTRMode_Manual     = 0x1, /**< In this mode, IL client configures
    562                                            **  the encoder the LTR count and manually
    563                                            **  controls the marking and use of LTR
    564                                            **  frames during video encoding.
    565                                            */
    566     QOMX_VIDEO_LTRMode_Auto       = 0x2, /**< In this mode, IL client configures
    567                                            **  the encoder the LTR count and LTR
    568                                            **  period. The encoder marks LTR frames
    569                                            **  automatically based on the LTR period
    570                                            **  during video encoding. IL client controls
    571                                            **  the use of LTR frames.
    572                                            */
    573     QOMX_VIDEO_LTRMode_MAX    = 0x7FFFFFFF /** Maximum LTR Mode type */
    574 } QOMX_VIDEO_LTRMODETYPE;
    575 
    576 /**
    577  * LTR mode index parameter.  This structure is used
    578  * to enable vendor specific extension on output port
    579  * to pass the LTR mode information.
    580  *
    581  * STRUCT MEMBERS:
    582  *  nSize              : Size of Structure in bytes
    583  *  nVersion           : OpenMAX IL specification version information
    584  *  nPortIndex         : Index of the port to which this structure applies
    585  *  eLTRMode           : Specifies the LTR mode used in encoder
    586  */
    587 typedef struct QOMX_VIDEO_PARAM_LTRMODE_TYPE {
    588     OMX_U32 nSize;
    589     OMX_VERSIONTYPE nVersion;
    590     OMX_U32 nPortIndex;
    591     QOMX_VIDEO_LTRMODETYPE eLTRMode;
    592 } QOMX_VIDEO_PARAM_LTRMODE_TYPE;
    593 
    594 /**
    595  * LTR count index parameter.  This structure is used
    596  * to enable vendor specific extension on output port
    597  * to pass the LTR count information.
    598  *
    599  * STRUCT MEMBERS:
    600  *  nSize              : Size of Structure in bytes
    601  *  nVersion           : OpenMAX IL specification version information
    602  *  nPortIndex         : Index of the port to which this structure applies
    603  *  nCount             : Specifies the number of LTR frames stored in the
    604  *                       encoder component
    605  */
    606 typedef struct QOMX_VIDEO_PARAM_LTRCOUNT_TYPE {
    607     OMX_U32 nSize;
    608     OMX_VERSIONTYPE nVersion;
    609     OMX_U32 nPortIndex;
    610     OMX_U32 nCount;
    611 } QOMX_VIDEO_PARAM_LTRCOUNT_TYPE;
    612 
    613 /**
    614  * LTR period index parameter.  This structure is used
    615  * to enable vendor specific extension on output port
    616  * to pass the LTR period information.
    617  *
    618  * STRUCT MEMBERS:
    619  *  nSize              : Size of Structure in bytes
    620  *  nVersion           : OpenMAX IL specification version information
    621  *  nPortIndex         : Index of the port to which this structure applies
    622  *  nFrames            : Specifies the number of frames between two consecutive
    623  *                       LTR frames.
    624  */
    625 typedef struct QOMX_VIDEO_CONFIG_LTRPERIOD_TYPE {
    626     OMX_U32 nSize;
    627     OMX_VERSIONTYPE nVersion;
    628     OMX_U32 nPortIndex;
    629     OMX_U32 nFrames;
    630 } QOMX_VIDEO_CONFIG_LTRPERIOD_TYPE;
    631 
    632 /**
    633  * Marks the next encoded frame as an LTR frame.
    634  * STRUCT MEMBERS:
    635  *  nSize              : Size of Structure in bytes
    636  *  nVersion           : OpenMAX IL specification version information
    637  *  nPortIndex         : Index of the port to which this structure applies
    638  */
    639 typedef struct QOMX_VIDEO_CONFIG_LTRMARK_TYPE {
    640     OMX_U32 nSize;
    641     OMX_VERSIONTYPE nVersion;
    642     OMX_U32 nPortIndex;
    643 } QOMX_VIDEO_CONFIG_LTRMARK_TYPE;
    644 
    645 /**
    646  * Specifies an LTR frame to encode subsequent frames.
    647  * STRUCT MEMBERS:
    648  *  nSize              : Size of Structure in bytes
    649  *  nVersion           : OpenMAX IL specification version information
    650  *  nPortIndex         : Index of the port to which this structure applies
    651  *  nID                : Specifies the identifier of the LTR frame to be used
    652                          as reference frame for encoding subsequent frames.
    653  *  nFrames            : Specifies the number of subsequent frames to be
    654                          encoded using the LTR frame with its identifier
    655                          nID as reference frame. Short-term reference frames
    656                          will be used thereafter. The value of 0xFFFFFFFF
    657                          indicates that all subsequent frames will be
    658                          encodedusing this LTR frame as reference frame.
    659  */
    660 typedef struct QOMX_VIDEO_CONFIG_LTRUSE_TYPE {
    661     OMX_U32 nSize;
    662     OMX_VERSIONTYPE nVersion;
    663     OMX_U32 nPortIndex;
    664     OMX_U32 nID;
    665     OMX_U32 nFrames;
    666 } QOMX_VIDEO_CONFIG_LTRUSE_TYPE;
    667 
    668 /**
    669  * Enumeration used to define the video encoder modes
    670  *
    671  * ENUMS:
    672  *  EncoderModeDefault : Default video recording mode.
    673  *                       All encoder settings made through
    674  *                       OMX_SetParameter/OMX_SetConfig are applied. No
    675  *                       parameter is overridden.
    676  *  EncoderModeMMS : Video recording mode for MMS (Multimedia Messaging
    677  *                   Service). This mode is similar to EncoderModeDefault
    678  *                   except that here the Rate control mode is overridden
    679  *                   internally and set as a variant of variable bitrate with
    680  *                   variable frame rate. After this mode is set if the IL
    681  *                   client tries to set OMX_VIDEO_CONTROLRATETYPE via
    682  *                   OMX_IndexParamVideoBitrate that would be rejected. For
    683  *                   this, client should set mode back to EncoderModeDefault
    684  *                   first and then change OMX_VIDEO_CONTROLRATETYPE.
    685  */
    686 typedef enum QOMX_VIDEO_ENCODERMODETYPE
    687 {
    688     QOMX_VIDEO_EncoderModeDefault        = 0x00,
    689     QOMX_VIDEO_EncoderModeMMS            = 0x01,
    690     QOMX_VIDEO_EncoderModeMax            = 0x7FFFFFFF
    691 } QOMX_VIDEO_ENCODERMODETYPE;
    692 
    693 /**
    694  * This structure is used to set the video encoder mode.
    695  *
    696  * STRUCT MEMBERS:
    697  *  nSize      : Size of the structure in bytes
    698  *  nVersion   : OMX specification version info
    699  *  nPortIndex : Port that this structure applies to
    700  *  nMode : defines the video encoder mode
    701  */
    702 typedef struct QOMX_VIDEO_PARAM_ENCODERMODETYPE {
    703     OMX_U32 nSize;
    704     OMX_VERSIONTYPE nVersion;
    705     OMX_U32 nPortIndex;
    706     QOMX_VIDEO_ENCODERMODETYPE nMode;
    707 } QOMX_VIDEO_PARAM_ENCODERMODETYPE;
    708 
    709 /**
    710  * This structure describes the parameters corresponding to the
    711  * QOMX_VIDEO_SYNTAXHDRTYPE extension. This parameter can be queried
    712  * during the loaded state.
    713  */
    714 
    715 typedef struct QOMX_VIDEO_SYNTAXHDRTYPE
    716 {
    717    OMX_U32 nSize;           /** Size of the structure in bytes */
    718    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    719    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    720    OMX_U32 nBytes;    	    /** The number of bytes filled in to the buffer */
    721    OMX_U8 data[1];          /** Buffer to store the header information */
    722 } QOMX_VIDEO_SYNTAXHDRTYPE;
    723 
    724 /**
    725  * This structure describes the parameters corresponding to the
    726  * QOMX_VIDEO_TEMPORALSPATIALTYPE extension. This parameter can be set
    727  * dynamically during any state except the state invalid.  This is primarily
    728  * used for setting MaxQP from the application.  This is set on the out port.
    729  */
    730 
    731 typedef struct QOMX_VIDEO_TEMPORALSPATIALTYPE
    732 {
    733    OMX_U32 nSize;           /** Size of the structure in bytes */
    734    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    735    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    736    OMX_U32 nTSFactor;       /** Temoral spatial tradeoff factor value in 0-100 */
    737 } QOMX_VIDEO_TEMPORALSPATIALTYPE;
    738 
    739 /**
    740  * This structure describes the parameters corresponding to the
    741  * OMX_QCOM_VIDEO_CONFIG_INTRAPERIODTYPE extension. This parameter can be set
    742  * dynamically during any state except the state invalid.  This is set on the out port.
    743  */
    744 
    745 typedef struct QOMX_VIDEO_INTRAPERIODTYPE
    746 {
    747    OMX_U32 nSize;           /** Size of the structure in bytes */
    748    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    749    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    750    OMX_U32 nIDRPeriod;      /** This specifies coding a frame as IDR after every nPFrames
    751 			        of intra frames. If this parameter is set to 0, only the
    752 				first frame of the encode session is an IDR frame. This
    753 				field is ignored for non-AVC codecs and is used only for
    754 				codecs that support IDR Period */
    755    OMX_U32 nPFrames;         /** The number of "P" frames between two "I" frames */
    756    OMX_U32 nBFrames;         /** The number of "B" frames between two "I" frames */
    757 } QOMX_VIDEO_INTRAPERIODTYPE;
    758 
    759 /**
    760  * This structure describes the parameters corresponding to the
    761  * OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE extension. This parameter can be set
    762  * dynamically during any state except the state invalid. This is used for the buffer negotiation
    763  * with other clients.  This is set on the out port.
    764  */
    765 typedef struct OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE
    766 {
    767    OMX_U32 nSize;            /** Size of the structure in bytes */
    768    OMX_VERSIONTYPE nVersion; /** OMX specification version information */
    769    OMX_U32 nPortIndex;       /** Portindex which is extended by this structure */
    770    OMX_U32 nBufferOccupancy; /** The number of bytes to be set for the buffer occupancy */
    771 } OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE;
    772 
    773 /**
    774  * This structure describes the parameters corresponding to the
    775  * OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE extension. This parameter can be set
    776  * dynamically during any state except the state invalid. This is primarily used for the dynamic/random
    777  * intrarefresh.  This is set on the out port.
    778  */
    779 typedef struct OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE
    780 {
    781    OMX_U32 nSize;           /** Size of the structure in bytes */
    782    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    783    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    784    OMX_U32 nRirMBs;         /** The number of MBs to be set for intrarefresh */
    785 } OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE;
    786 
    787 
    788 /**
    789  * This structure describes the parameters corresponding to the
    790  * OMX_QCOM_VIDEO_CONFIG_QPRANGE extension. This parameter can be set
    791  * dynamically during any state except the state invalid. This is primarily
    792  * used for the min/max QP to be set from the application.  This
    793  * is set on the out port.
    794  */
    795 typedef struct OMX_QCOM_VIDEO_CONFIG_QPRANGE
    796 {
    797    OMX_U32 nSize;           /** Size of the structure in bytes */
    798    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    799    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    800    OMX_U32 nMinQP;          /** The number for minimum quantization parameter */
    801    OMX_U32 nMaxQP;          /** The number for maximum quantization parameter */
    802 } OMX_QCOM_VIDEO_CONFIG_QPRANGE;
    803 
    804 /**
    805  * This structure describes the parameters for the
    806  * OMX_QcomIndexParamH264AUDelimiter extension.  It enables/disables
    807  * the AU delimiters in the H264 stream, which is used by WFD.
    808  */
    809 typedef struct OMX_QCOM_VIDEO_CONFIG_H264_AUD
    810 {
    811    OMX_U32 nSize;           /** Size of the structure in bytes */
    812    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    813    OMX_BOOL bEnable;        /** Enable/disable the setting */
    814 } OMX_QCOM_VIDEO_CONFIG_H264_AUD;
    815 
    816 typedef enum QOMX_VIDEO_PERF_LEVEL
    817 {
    818     OMX_QCOM_PerfLevelNominal,
    819     OMX_QCOM_PerfLevelTurbo
    820 } QOMX_VIDEO_PERF_LEVEL;
    821 
    822 /**
    823  * This structure describes the parameters corresponding
    824  * to OMX_QcomIndexParamPerfLevel extension. It will set
    825  * the performance mode specified as QOMX_VIDEO_PERF_LEVEL.
    826  */
    827 typedef struct OMX_QCOM_VIDEO_PARAM_PERF_LEVEL {
    828     OMX_U32 nSize;                      /** Size of the structure in bytes */
    829     OMX_VERSIONTYPE nVersion;           /** OMX specification version information */
    830     QOMX_VIDEO_PERF_LEVEL ePerfLevel;   /** Performance level */
    831 } OMX_QCOM_VIDEO_PARAM_PERF_LEVEL;
    832 
    833 /**
    834  * This structure describes the parameters corresponding
    835  * to OMX_QcomIndexParamH264VUITimingInfo extension. It
    836  * will enable/disable the VUI timing info.
    837  */
    838 typedef struct OMX_QCOM_VIDEO_PARAM_VUI_TIMING_INFO {
    839     OMX_U32 nSize;              /** Size of the structure in bytes */
    840     OMX_VERSIONTYPE nVersion;   /** OMX specification version information */
    841     OMX_BOOL bEnable;           /** Enable/disable the setting */
    842 } OMX_QCOM_VIDEO_PARAM_VUI_TIMING_INFO;
    843 
    844 /**
    845  * This structure describes the parameters corresponding
    846  * to OMX_QcomIndexParamPeakBitrate extension. It will
    847  * set the peak bitrate specified by nPeakBitrate.
    848  */
    849 typedef struct OMX_QCOM_VIDEO_PARAM_PEAK_BITRATE {
    850     OMX_U32 nSize;              /** Size of the structure in bytes */
    851     OMX_VERSIONTYPE nVersion;   /** OMX specification version information */
    852     OMX_U32 nPeakBitrate;       /** Peak bitrate value */
    853 } OMX_QCOM_VIDEO_PARAM_PEAK_BITRATE;
    854 
    855 typedef struct OMX_VENDOR_EXTRADATATYPE  {
    856     OMX_U32 nPortIndex;
    857     OMX_U32 nDataSize;
    858     OMX_U8  *pData;     // cdata (codec_data/extradata)
    859 } OMX_VENDOR_EXTRADATATYPE;
    860 
    861 /**
    862  * This structure describes the parameters corresponding to the
    863  * OMX_VENDOR_VIDEOFRAMERATE extension. This parameter can be set
    864  * dynamically during any state except the state invalid. This is
    865  * used for frame rate to be set from the application. This
    866  * is set on the in port.
    867  */
    868 typedef struct OMX_VENDOR_VIDEOFRAMERATE  {
    869    OMX_U32 nSize;           /** Size of the structure in bytes */
    870    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    871    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    872    OMX_U32 nFps;            /** Frame rate value */
    873    OMX_BOOL bEnabled;       /** Flag to enable or disable client's frame rate value */
    874 } OMX_VENDOR_VIDEOFRAMERATE;
    875 
    876 typedef enum OMX_INDEXVENDORTYPE {
    877     OMX_IndexVendorFileReadInputFilename = 0xFF000001,
    878     OMX_IndexVendorParser3gpInputFilename = 0xFF000002,
    879     OMX_IndexVendorVideoExtraData = 0xFF000003,
    880     OMX_IndexVendorAudioExtraData = 0xFF000004,
    881     OMX_IndexVendorVideoFrameRate = 0xFF000005,
    882 } OMX_INDEXVENDORTYPE;
    883 
    884 typedef enum OMX_QCOM_VC1RESOLUTIONTYPE
    885 {
    886    OMX_QCOM_VC1_PICTURE_RES_1x1,
    887    OMX_QCOM_VC1_PICTURE_RES_2x1,
    888    OMX_QCOM_VC1_PICTURE_RES_1x2,
    889    OMX_QCOM_VC1_PICTURE_RES_2x2
    890 } OMX_QCOM_VC1RESOLUTIONTYPE;
    891 
    892 typedef enum OMX_QCOM_INTERLACETYPE
    893 {
    894     OMX_QCOM_InterlaceFrameProgressive,
    895     OMX_QCOM_InterlaceInterleaveFrameTopFieldFirst,
    896     OMX_QCOM_InterlaceInterleaveFrameBottomFieldFirst,
    897     OMX_QCOM_InterlaceFrameTopFieldFirst,
    898     OMX_QCOM_InterlaceFrameBottomFieldFirst,
    899     OMX_QCOM_InterlaceFieldTop,
    900     OMX_QCOM_InterlaceFieldBottom
    901 }OMX_QCOM_INTERLACETYPE;
    902 
    903 typedef struct OMX_QCOM_PARAM_VIDEO_INTERLACETYPE
    904 {
    905     OMX_U32 nSize;           /** Size of the structure in bytes */
    906     OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    907     OMX_U32 nPortIndex;    /** Portindex which is extended by this structure */
    908     OMX_BOOL bInterlace;  /** Interlace content **/
    909 }OMX_QCOM_PARAM_VIDEO_INTERLACETYPE;
    910 
    911 typedef struct OMX_QCOM_CONFIG_INTERLACETYPE
    912 {
    913     OMX_U32 nSize;
    914     OMX_VERSIONTYPE nVersion;
    915     OMX_U32 nPortIndex;
    916     OMX_U32 nIndex;
    917     OMX_QCOM_INTERLACETYPE eInterlaceType;
    918 }OMX_QCOM_CONFIG_INTERLACETYPE;
    919 
    920 #define MAX_PAN_SCAN_WINDOWS 4
    921 
    922 typedef struct OMX_QCOM_PANSCAN
    923 {
    924    OMX_U32 numWindows;
    925    OMX_QCOMRectangle window[MAX_PAN_SCAN_WINDOWS];
    926 } OMX_QCOM_PANSCAN;
    927 
    928 typedef struct OMX_QCOM_ASPECT_RATIO
    929 {
    930    OMX_U32 aspectRatioX;
    931    OMX_U32 aspectRatioY;
    932 } OMX_QCOM_ASPECT_RATIO;
    933 
    934 typedef struct OMX_QCOM_DISPLAY_ASPECT_RATIO
    935 {
    936    OMX_U32 displayVerticalSize;
    937    OMX_U32 displayHorizontalSize;
    938 } OMX_QCOM_DISPLAY_ASPECT_RATIO;
    939 
    940 typedef struct OMX_QCOM_FRAME_PACK_ARRANGEMENT
    941 {
    942   OMX_U32 nSize;
    943   OMX_VERSIONTYPE nVersion;
    944   OMX_U32 nPortIndex;
    945   OMX_U32 id;
    946   OMX_U32 cancel_flag;
    947   OMX_U32 type;
    948   OMX_U32 quincunx_sampling_flag;
    949   OMX_U32 content_interpretation_type;
    950   OMX_U32 spatial_flipping_flag;
    951   OMX_U32 frame0_flipped_flag;
    952   OMX_U32 field_views_flag;
    953   OMX_U32 current_frame_is_frame0_flag;
    954   OMX_U32 frame0_self_contained_flag;
    955   OMX_U32 frame1_self_contained_flag;
    956   OMX_U32 frame0_grid_position_x;
    957   OMX_U32 frame0_grid_position_y;
    958   OMX_U32 frame1_grid_position_x;
    959   OMX_U32 frame1_grid_position_y;
    960   OMX_U32 reserved_byte;
    961   OMX_U32 repetition_period;
    962   OMX_U32 extension_flag;
    963 } OMX_QCOM_FRAME_PACK_ARRANGEMENT;
    964 
    965 typedef struct OMX_QCOM_EXTRADATA_QP
    966 {
    967    OMX_U32        nQP;
    968 } OMX_QCOM_EXTRADATA_QP;
    969 
    970 typedef struct OMX_QCOM_EXTRADATA_BITS_INFO
    971 {
    972    OMX_U32 header_bits;
    973    OMX_U32 frame_bits;
    974 } OMX_QCOM_EXTRADATA_BITS_INFO;
    975 
    976 typedef struct OMX_QCOM_EXTRADATA_USERDATA {
    977    OMX_U32 type;
    978    OMX_U32 data[1];
    979 } OMX_QCOM_EXTRADATA_USERDATA;
    980 
    981 typedef struct OMX_QCOM_EXTRADATA_FRAMEINFO
    982 {
    983    // common frame meta data. interlace related info removed
    984    OMX_VIDEO_PICTURETYPE  ePicType;
    985    OMX_QCOM_INTERLACETYPE interlaceType;
    986    OMX_QCOM_PANSCAN       panScan;
    987    OMX_QCOM_ASPECT_RATIO  aspectRatio;
    988    OMX_QCOM_DISPLAY_ASPECT_RATIO displayAspectRatio;
    989    OMX_U32                nConcealedMacroblocks;
    990    OMX_U32                nFrameRate;
    991    OMX_TICKS              nTimeStamp;
    992 } OMX_QCOM_EXTRADATA_FRAMEINFO;
    993 
    994 typedef struct OMX_QCOM_EXTRADATA_FRAMEDIMENSION
    995 {
    996    /** Frame Dimensions added to each YUV buffer */
    997    OMX_U32   nDecWidth;  /** Width  rounded to multiple of 16 */
    998    OMX_U32   nDecHeight; /** Height rounded to multiple of 16 */
    999    OMX_U32   nActualWidth; /** Actual Frame Width */
   1000    OMX_U32   nActualHeight; /** Actual Frame Height */
   1001 
   1002 }OMX_QCOM_EXTRADATA_FRAMEDIMENSION;
   1003 
   1004 typedef struct OMX_QCOM_H264EXTRADATA
   1005 {
   1006    OMX_U64 seiTimeStamp;
   1007 } OMX_QCOM_H264EXTRADATA;
   1008 
   1009 typedef struct OMX_QCOM_VC1EXTRADATA
   1010 {
   1011    OMX_U32                     nVC1RangeY;
   1012    OMX_U32                     nVC1RangeUV;
   1013    OMX_QCOM_VC1RESOLUTIONTYPE eVC1PicResolution;
   1014 } OMX_QCOM_VC1EXTRADATA;
   1015 
   1016 typedef union OMX_QCOM_EXTRADATA_CODEC_DATA
   1017 {
   1018    OMX_QCOM_H264EXTRADATA h264ExtraData;
   1019    OMX_QCOM_VC1EXTRADATA vc1ExtraData;
   1020 } OMX_QCOM_EXTRADATA_CODEC_DATA;
   1021 
   1022 typedef struct OMX_QCOM_EXTRADATA_MBINFO
   1023 {
   1024    OMX_U32 nFormat;
   1025    OMX_U32 nDataSize;
   1026    OMX_U8  data[0];
   1027 } OMX_QCOM_EXTRADATA_MBINFO;
   1028 
   1029 typedef enum OMX_QCOM_EXTRADATATYPE
   1030 {
   1031    OMX_ExtraDataFrameInfo = 0x7F000001,
   1032    OMX_ExtraDataH264 = 0x7F000002,
   1033    OMX_ExtraDataVC1 = 0x7F000003,
   1034    OMX_ExtraDataFrameDimension = 0x7F000004,
   1035    OMX_ExtraDataVideoEncoderSliceInfo = 0x7F000005,
   1036    OMX_ExtraDataConcealMB = 0x7F000006,
   1037    OMX_ExtraDataInterlaceFormat = 0x7F000007,
   1038    OMX_ExtraDataPortDef = 0x7F000008,
   1039    OMX_ExtraDataMP2ExtnData = 0x7F000009,
   1040    OMX_ExtraDataMP2UserData = 0x7F00000a,
   1041    OMX_ExtraDataVideoLTRInfo = 0x7F00000b,
   1042     OMX_ExtraDataFramePackingArrangement = 0x7F00000c,
   1043     OMX_ExtraDataQP =                      0x7F00000d,
   1044     OMX_ExtraDataInputBitsInfo =           0x7F00000e,
   1045     OMX_ExtraDataVideoEncoderMBInfo =      0x7F00000f,
   1046 } OMX_QCOM_EXTRADATATYPE;
   1047 
   1048 typedef struct  OMX_STREAMINTERLACEFORMATTYPE {
   1049     OMX_U32 nSize;
   1050     OMX_VERSIONTYPE nVersion;
   1051     OMX_U32 nPortIndex;
   1052     OMX_BOOL bInterlaceFormat;
   1053     OMX_U32 nInterlaceFormats;
   1054 } OMX_STREAMINTERLACEFORMAT;
   1055 
   1056 typedef enum OMX_INTERLACETYPE
   1057 {
   1058    OMX_InterlaceFrameProgressive,
   1059    OMX_InterlaceInterleaveFrameTopFieldFirst,
   1060    OMX_InterlaceInterleaveFrameBottomFieldFirst,
   1061    OMX_InterlaceFrameTopFieldFirst,
   1062    OMX_InterlaceFrameBottomFieldFirst
   1063 }OMX_INTERLACEs;
   1064 
   1065 
   1066 #define OMX_EXTRADATA_HEADER_SIZE 20
   1067 
   1068 /**
   1069  * AVC profile types, each profile indicates support for various
   1070  * performance bounds and different annexes.
   1071  */
   1072 typedef enum QOMX_VIDEO_AVCPROFILETYPE {
   1073     QOMX_VIDEO_AVCProfileBaseline      = OMX_VIDEO_AVCProfileBaseline,
   1074     QOMX_VIDEO_AVCProfileMain          = OMX_VIDEO_AVCProfileMain,
   1075     QOMX_VIDEO_AVCProfileExtended      = OMX_VIDEO_AVCProfileExtended,
   1076     QOMX_VIDEO_AVCProfileHigh          = OMX_VIDEO_AVCProfileHigh,
   1077     QOMX_VIDEO_AVCProfileHigh10        = OMX_VIDEO_AVCProfileHigh10,
   1078     QOMX_VIDEO_AVCProfileHigh422       = OMX_VIDEO_AVCProfileHigh422,
   1079     QOMX_VIDEO_AVCProfileHigh444       = OMX_VIDEO_AVCProfileHigh444,
   1080     /* QCom specific profile indexes */
   1081     QOMX_VIDEO_AVCProfileConstrainedBaseline   = OMX_VIDEO_AVCProfileVendorStartUnused + 1,
   1082 } QOMX_VIDEO_AVCPROFILETYPE;
   1083 
   1084 
   1085 /**
   1086  * H.264 MVC Profiles
   1087   */
   1088 typedef enum QOMX_VIDEO_MVCPROFILETYPE {
   1089     QOMX_VIDEO_MVCProfileStereoHigh = 0x1,
   1090     QOMX_VIDEO_MVCProfileMultiViewHigh = 0x2,
   1091     QOMX_VIDEO_MVCProfileKhronosExtensions = 0x6F000000,
   1092     QOMX_VIDEO_MVCProfileVendorStartUnused = 0x7F000000,
   1093     QOMX_VIDEO_MVCProfileMax = 0x7FFFFFFF
   1094 } QOMX_VIDEO_MVCPROFILETYPE;
   1095 
   1096 /**
   1097  * H.264 MVC Levels
   1098   */
   1099 typedef enum QOMX_VIDEO_MVCLEVELTYPE {
   1100     QOMX_VIDEO_MVCLevel1   = 0x01,     /**< Level 1 */
   1101     QOMX_VIDEO_MVCLevel1b  = 0x02,     /**< Level 1b */
   1102     QOMX_VIDEO_MVCLevel11  = 0x04,     /**< Level 1.1 */
   1103     QOMX_VIDEO_MVCLevel12  = 0x08,     /**< Level 1.2 */
   1104     QOMX_VIDEO_MVCLevel13  = 0x10,     /**< Level 1.3 */
   1105     QOMX_VIDEO_MVCLevel2   = 0x20,     /**< Level 2 */
   1106     QOMX_VIDEO_MVCLevel21  = 0x40,     /**< Level 2.1 */
   1107     QOMX_VIDEO_MVCLevel22  = 0x80,     /**< Level 2.2 */
   1108     QOMX_VIDEO_MVCLevel3   = 0x100,    /**< Level 3 */
   1109     QOMX_VIDEO_MVCLevel31  = 0x200,    /**< Level 3.1 */
   1110     QOMX_VIDEO_MVCLevel32  = 0x400,    /**< Level 3.2 */
   1111     QOMX_VIDEO_MVCLevel4   = 0x800,    /**< Level 4 */
   1112     QOMX_VIDEO_MVCLevel41  = 0x1000,   /**< Level 4.1 */
   1113     QOMX_VIDEO_MVCLevel42  = 0x2000,   /**< Level 4.2 */
   1114     QOMX_VIDEO_MVCLevel5   = 0x4000,   /**< Level 5 */
   1115     QOMX_VIDEO_MVCLevel51  = 0x8000,   /**< Level 5.1 */
   1116     QOMX_VIDEO_MVCLevelKhronosExtensions = 0x6F000000,
   1117     QOMX_VIDEO_MVCLevelVendorStartUnused = 0x7F000000,
   1118     QOMX_VIDEO_MVCLevelMax = 0x7FFFFFFF
   1119 } QOMX_VIDEO_MVCLEVELTYPE;
   1120 
   1121 /**
   1122  * DivX Versions
   1123  */
   1124 typedef enum  QOMX_VIDEO_DIVXFORMATTYPE {
   1125     QOMX_VIDEO_DIVXFormatUnused = 0x01, /**< Format unused or unknown */
   1126     QOMX_VIDEO_DIVXFormat311    = 0x02, /**< DivX 3.11 */
   1127     QOMX_VIDEO_DIVXFormat4      = 0x04, /**< DivX 4 */
   1128     QOMX_VIDEO_DIVXFormat5      = 0x08, /**< DivX 5 */
   1129     QOMX_VIDEO_DIVXFormat6      = 0x10, /**< DivX 6 */
   1130     QOMX_VIDEO_DIVXFormatKhronosExtensions = 0x6F000000,
   1131     QOMX_VIDEO_DIVXFormatVendorStartUnused = 0x7F000000,
   1132     QOMX_VIDEO_DIVXFormatMax = 0x7FFFFFFF
   1133 } QOMX_VIDEO_DIVXFORMATTYPE;
   1134 
   1135 /**
   1136  * DivX profile types, each profile indicates support for
   1137  * various performance bounds.
   1138  */
   1139 typedef enum QOMX_VIDEO_DIVXPROFILETYPE {
   1140     QOMX_VIDEO_DivXProfileqMobile = 0x01, /**< qMobile Profile */
   1141     QOMX_VIDEO_DivXProfileMobile  = 0x02, /**< Mobile Profile */
   1142     QOMX_VIDEO_DivXProfileMT      = 0x04, /**< Mobile Theatre Profile */
   1143     QOMX_VIDEO_DivXProfileHT      = 0x08, /**< Home Theatre Profile */
   1144     QOMX_VIDEO_DivXProfileHD      = 0x10, /**< High Definition Profile */
   1145     QOMX_VIDEO_DIVXProfileKhronosExtensions = 0x6F000000,
   1146     QOMX_VIDEO_DIVXProfileVendorStartUnused = 0x7F000000,
   1147     QOMX_VIDEO_DIVXProfileMax = 0x7FFFFFFF
   1148 } QOMX_VIDEO_DIVXPROFILETYPE;
   1149 
   1150 /**
   1151  * DivX Video Params
   1152  *
   1153  *  STRUCT MEMBERS:
   1154  *  nSize      : Size of the structure in bytes
   1155  *  nVersion   : OMX specification version information
   1156  *  nPortIndex : Port that this structure applies to
   1157  *  eFormat    : Version of DivX stream / data
   1158  *  eProfile   : Profile of DivX stream / data
   1159  */
   1160 typedef struct QOMX_VIDEO_PARAM_DIVXTYPE {
   1161     OMX_U32 nSize;
   1162     OMX_VERSIONTYPE nVersion;
   1163     OMX_U32 nPortIndex;
   1164     QOMX_VIDEO_DIVXFORMATTYPE eFormat;
   1165     QOMX_VIDEO_DIVXPROFILETYPE eProfile;
   1166 } QOMX_VIDEO_PARAM_DIVXTYPE;
   1167 
   1168 
   1169 
   1170 /**
   1171  *  VP Versions
   1172  */
   1173 typedef enum QOMX_VIDEO_VPFORMATTYPE {
   1174     QOMX_VIDEO_VPFormatUnused = 0x01, /**< Format unused or unknown */
   1175     QOMX_VIDEO_VPFormat6      = 0x02, /**< VP6 Video Format */
   1176     QOMX_VIDEO_VPFormat7      = 0x04, /**< VP7 Video Format */
   1177     QOMX_VIDEO_VPFormat8      = 0x08, /**< VP8 Video Format */
   1178     QOMX_VIDEO_VPFormatKhronosExtensions = 0x6F000000,
   1179     QOMX_VIDEO_VPFormatVendorStartUnused = 0x7F000000,
   1180     QOMX_VIDEO_VPFormatMax = 0x7FFFFFFF
   1181 } QOMX_VIDEO_VPFORMATTYPE;
   1182 
   1183 /**
   1184  * VP profile types, each profile indicates support for various
   1185  * encoding tools.
   1186  */
   1187 typedef enum QOMX_VIDEO_VPPROFILETYPE {
   1188     QOMX_VIDEO_VPProfileSimple   = 0x01, /**< Simple Profile, applies to VP6 only */
   1189     QOMX_VIDEO_VPProfileAdvanced = 0x02, /**< Advanced Profile, applies to VP6 only */
   1190     QOMX_VIDEO_VPProfileVersion0 = 0x04, /**< Version 0, applies to VP7 and VP8 */
   1191     QOMX_VIDEO_VPProfileVersion1 = 0x08, /**< Version 1, applies to VP7 and VP8 */
   1192     QOMX_VIDEO_VPProfileVersion2 = 0x10, /**< Version 2, applies to VP8 only */
   1193     QOMX_VIDEO_VPProfileVersion3 = 0x20, /**< Version 3, applies to VP8 only */
   1194     QOMX_VIDEO_VPProfileKhronosExtensions = 0x6F000000,
   1195     QOMX_VIDEO_VPProfileVendorStartUnused = 0x7F000000,
   1196     QOMX_VIDEO_VPProfileMax = 0x7FFFFFFF
   1197 } QOMX_VIDEO_VPPROFILETYPE;
   1198 
   1199 /**
   1200  * VP Video Params
   1201  *
   1202  *  STRUCT MEMBERS:
   1203  *  nSize      : Size of the structure in bytes
   1204  *  nVersion   : OMX specification version information
   1205  *  nPortIndex : Port that this structure applies to
   1206  *  eFormat    : Format of VP stream / data
   1207  *  eProfile   : Profile or Version of VP stream / data
   1208  */
   1209 typedef struct QOMX_VIDEO_PARAM_VPTYPE {
   1210     OMX_U32 nSize;
   1211     OMX_VERSIONTYPE nVersion;
   1212     OMX_U32 nPortIndex;
   1213     QOMX_VIDEO_VPFORMATTYPE eFormat;
   1214     QOMX_VIDEO_VPPROFILETYPE eProfile;
   1215 } QOMX_VIDEO_PARAM_VPTYPE;
   1216 
   1217 /**
   1218  * Spark Versions
   1219  */
   1220 typedef enum QOMX_VIDEO_SPARKFORMATTYPE {
   1221     QOMX_VIDEO_SparkFormatUnused = 0x01, /**< Format unused or unknown */
   1222     QOMX_VIDEO_SparkFormat0      = 0x02, /**< Video Format Version 0 */
   1223     QOMX_VIDEO_SparkFormat1      = 0x04, /**< Video Format Version 1 */
   1224     QOMX_VIDEO_SparkFormatKhronosExtensions = 0x6F000000,
   1225     QOMX_VIDEO_SparkFormatVendorStartUnused = 0x7F000000,
   1226     QOMX_VIDEO_SparkFormatMax = 0x7FFFFFFF
   1227 } QOMX_VIDEO_SPARKFORMATTYPE;
   1228 
   1229 /**
   1230  * Spark Video Params
   1231  *
   1232  *  STRUCT MEMBERS:
   1233  *  nSize      : Size of the structure in bytes
   1234  *  nVersion   : OMX specification version information
   1235  *  nPortIndex : Port that this structure applies to
   1236  *  eFormat    : Version of Spark stream / data
   1237  */
   1238 typedef struct QOMX_VIDEO_PARAM_SPARKTYPE {
   1239     OMX_U32 nSize;
   1240     OMX_VERSIONTYPE nVersion;
   1241     OMX_U32 nPortIndex;
   1242     QOMX_VIDEO_SPARKFORMATTYPE eFormat;
   1243 } QOMX_VIDEO_PARAM_SPARKTYPE;
   1244 
   1245 
   1246 typedef struct QOMX_VIDEO_QUERY_DECODER_INSTANCES {
   1247     OMX_U32 nSize;
   1248     OMX_VERSIONTYPE nVersion;
   1249     OMX_U32 nPortIndex;
   1250     OMX_U32 nNumOfInstances;
   1251 } QOMX_VIDEO_QUERY_DECODER_INSTANCES;
   1252 
   1253 typedef struct QOMX_ENABLETYPE {
   1254     OMX_BOOL bEnable;
   1255 } QOMX_ENABLETYPE;
   1256 
   1257 typedef enum QOMX_VIDEO_EVENTS {
   1258     OMX_EventIndexsettingChanged = OMX_EventVendorStartUnused
   1259 } QOMX_VIDEO_EVENTS;
   1260 
   1261 typedef enum QOMX_VIDEO_PICTURE_ORDER {
   1262     QOMX_VIDEO_DISPLAY_ORDER = 0x1,
   1263     QOMX_VIDEO_DECODE_ORDER = 0x2
   1264 } QOMX_VIDEO_PICTURE_ORDER;
   1265 
   1266 typedef struct QOMX_VIDEO_DECODER_PICTURE_ORDER {
   1267     OMX_U32 nSize;
   1268     OMX_VERSIONTYPE nVersion;
   1269     OMX_U32 nPortIndex;
   1270     QOMX_VIDEO_PICTURE_ORDER eOutputPictureOrder;
   1271 } QOMX_VIDEO_DECODER_PICTURE_ORDER;
   1272 
   1273 typedef struct QOMX_INDEXEXTRADATATYPE {
   1274     OMX_U32 nSize;
   1275     OMX_VERSIONTYPE nVersion;
   1276     OMX_U32 nPortIndex;
   1277     OMX_BOOL bEnabled;
   1278     OMX_INDEXTYPE nIndex;
   1279 } QOMX_INDEXEXTRADATATYPE;
   1280 
   1281 typedef struct QOMX_INDEXTIMESTAMPREORDER {
   1282 	OMX_U32 nSize;
   1283 	OMX_VERSIONTYPE nVersion;
   1284 	OMX_U32 nPortIndex;
   1285 	OMX_BOOL bEnable;
   1286 } QOMX_INDEXTIMESTAMPREORDER;
   1287 
   1288 typedef struct QOMX_INDEXDOWNSCALAR {
   1289         OMX_U32 nSize;
   1290         OMX_VERSIONTYPE nVersion;
   1291         OMX_U32 nPortIndex;
   1292         OMX_BOOL bEnable;
   1293 } QOMX_INDEXDOWNSCALAR;
   1294 
   1295 
   1296 #define OMX_QCOM_INDEX_PARAM_VIDEO_SYNCFRAMEDECODINGMODE "OMX.QCOM.index.param.video.SyncFrameDecodingMode"
   1297 #define OMX_QCOM_INDEX_PARAM_INDEXEXTRADATA "OMX.QCOM.index.param.IndexExtraData"
   1298 #define OMX_QCOM_INDEX_PARAM_VIDEO_SLICEDELIVERYMODE "OMX.QCOM.index.param.SliceDeliveryMode"
   1299 #define OMX_QCOM_INDEX_PARAM_VIDEO_FRAMEPACKING_EXTRADATA "OMX.QCOM.index.param.video.FramePackingExtradata"
   1300 #define OMX_QCOM_INDEX_PARAM_VIDEO_QP_EXTRADATA "OMX.QCOM.index.param.video.QPExtradata"
   1301 #define OMX_QCOM_INDEX_PARAM_VIDEO_INPUTBITSINFO_EXTRADATA "OMX.QCOM.index.param.video.InputBitsInfoExtradata"
   1302 #define OMX_QCOM_INDEX_PARAM_VIDEO_EXTNUSER_EXTRADATA "OMX.QCOM.index.param.video.ExtnUserExtraData"
   1303 #define OMX_QCOM_INDEX_CONFIG_VIDEO_FRAMEPACKING_INFO "OMX.QCOM.index.config.video.FramePackingInfo"
   1304 
   1305 typedef enum {
   1306     QOMX_VIDEO_FRAME_PACKING_CHECKERBOARD = 0,
   1307     QOMX_VIDEO_FRAME_PACKING_COLUMN_INTERLEAVE = 1,
   1308     QOMX_VIDEO_FRAME_PACKING_ROW_INTERLEAVE = 2,
   1309     QOMX_VIDEO_FRAME_PACKING_SIDE_BY_SIDE = 3,
   1310     QOMX_VIDEO_FRAME_PACKING_TOP_BOTTOM = 4,
   1311     QOMX_VIDEO_FRAME_PACKING_TEMPORAL = 5,
   1312 } QOMX_VIDEO_FRAME_PACKING_ARRANGEMENT;
   1313 
   1314 typedef enum {
   1315     QOMX_VIDEO_CONTENT_UNSPECIFIED = 0,
   1316     QOMX_VIDEO_CONTENT_LR_VIEW = 1,
   1317     QOMX_VIDEO_CONTENT_RL_VIEW = 2,
   1318 } QOMX_VIDEO_CONTENT_INTERPRETATION;
   1319 
   1320 // A pointer to this struct is passed to OMX_SetParameter when the extension
   1321 // index for the 'OMX.google.android.index.setVUIStreamRestrictFlag' extension
   1322 // is given.
   1323 typedef struct QOMX_VUI_BITSTREAM_RESTRICT {
   1324     OMX_U32 nSize;
   1325     OMX_VERSIONTYPE nVersion;
   1326     OMX_BOOL bEnable;
   1327 } QOMX_VUI_BITSTREAM_RESTRICT;
   1328 
   1329 /**
   1330  * Specifies the extended picture types. These values should be
   1331  * OR'd along with the types defined in OMX_VIDEO_PICTURETYPE to
   1332  * signal all pictures types which are allowed.
   1333  *
   1334  * ENUMS:
   1335  *  H.264 Specific Picture Types:   IDR
   1336  */
   1337 typedef enum QOMX_VIDEO_PICTURETYPE {
   1338     QOMX_VIDEO_PictureTypeIDR = OMX_VIDEO_PictureTypeVendorStartUnused + 0x1000
   1339 } QOMX_VIDEO_PICTURETYPE;
   1340 
   1341 #define OMX_QCOM_INDEX_CONFIG_ACTIVE_REGION_DETECTION           "OMX.QCOM.index.config.activeregiondetection"
   1342 #define OMX_QCOM_INDEX_CONFIG_ACTIVE_REGION_DETECTION_STATUS    "OMX.QCOM.index.config.activeregiondetectionstatus"
   1343 #define OMX_QCOM_INDEX_CONFIG_SCALING_MODE                      "OMX.QCOM.index.config.scalingmode"
   1344 #define OMX_QCOM_INDEX_CONFIG_NOISEREDUCTION                    "OMX.QCOM.index.config.noisereduction"
   1345 #define OMX_QCOM_INDEX_CONFIG_IMAGEENHANCEMENT                  "OMX.QCOM.index.config.imageenhancement"
   1346 #define OMX_QCOM_INDEX_PARAM_HELDBUFFERCOUNT                    "OMX.QCOM.index.param.HeldBufferCount" /**< reference: QOMX_HELDBUFFERCOUNTTYPE */
   1347 
   1348 
   1349 typedef struct QOMX_RECTTYPE {
   1350     OMX_S32 nLeft;
   1351     OMX_S32 nTop;
   1352     OMX_U32 nWidth;
   1353     OMX_U32 nHeight;
   1354 } QOMX_RECTTYPE;
   1355 
   1356 typedef struct QOMX_ACTIVEREGIONDETECTIONTYPE {
   1357     OMX_U32 nSize;
   1358     OMX_VERSIONTYPE nVersion;
   1359     OMX_U32 nPortIndex;
   1360     OMX_BOOL bEnable;
   1361     QOMX_RECTTYPE sROI;
   1362     OMX_U32 nNumExclusionRegions;
   1363     QOMX_RECTTYPE sExclusionRegions[1];
   1364 } QOMX_ACTIVEREGIONDETECTIONTYPE;
   1365 
   1366 typedef struct QOMX_ACTIVEREGIONDETECTION_STATUSTYPE {
   1367     OMX_U32 nSize;
   1368     OMX_VERSIONTYPE nVersion;
   1369     OMX_U32 nPortIndex;
   1370     OMX_BOOL bDetected;
   1371     QOMX_RECTTYPE sDetectedRegion;
   1372 } QOMX_ACTIVEREGIONDETECTION_STATUSTYPE;
   1373 
   1374 typedef enum QOMX_SCALE_MODETYPE {
   1375     QOMX_SCALE_MODE_Normal,
   1376     QOMX_SCALE_MODE_Anamorphic,
   1377     QOMX_SCALE_MODE_Max = 0x7FFFFFFF
   1378 } QOMX_SCALE_MODETYPE;
   1379 
   1380 typedef struct QOMX_SCALINGMODETYPE {
   1381     OMX_U32 nSize;
   1382     OMX_VERSIONTYPE nVersion;
   1383     QOMX_SCALE_MODETYPE  eScaleMode;
   1384 } QOMX_SCALINGMODETYPE;
   1385 
   1386 typedef struct QOMX_NOISEREDUCTIONTYPE {
   1387     OMX_U32 nSize;
   1388     OMX_VERSIONTYPE nVersion;
   1389     OMX_U32 nPortIndex;
   1390     OMX_BOOL bEnable;
   1391     OMX_BOOL bAutoMode;
   1392     OMX_S32 nNoiseReduction;
   1393 } QOMX_NOISEREDUCTIONTYPE;
   1394 
   1395 typedef struct QOMX_IMAGEENHANCEMENTTYPE {
   1396     OMX_U32 nSize;
   1397     OMX_VERSIONTYPE nVersion;
   1398     OMX_U32 nPortIndex;
   1399     OMX_BOOL bEnable;
   1400     OMX_BOOL bAutoMode;
   1401     OMX_S32 nImageEnhancement;
   1402 } QOMX_IMAGEENHANCEMENTTYPE;
   1403 
   1404 /*
   1405  * these are part of OMX1.2 but JB MR2 branch doesn't have them defined
   1406  * OMX_IndexParamInterlaceFormat
   1407  * OMX_INTERLACEFORMATTYPE
   1408  */
   1409 #ifndef OMX_IndexParamInterlaceFormat
   1410 #define OMX_IndexParamInterlaceFormat (0x7FF00000)
   1411 typedef struct OMX_INTERLACEFORMATTYPE {
   1412     OMX_U32 nSize;
   1413     OMX_VERSIONTYPE nVersion;
   1414     OMX_U32 nPortIndex;
   1415     OMX_U32 nFormat;
   1416     OMX_TICKS nTimeStamp;
   1417 } OMX_INTERLACEFORMATTYPE;
   1418 #endif
   1419 
   1420 /**
   1421  * This structure is used to indicate the maximum number of buffers
   1422  * that a port will hold during data flow.
   1423  *
   1424  * STRUCT MEMBERS:
   1425  *  nSize              : Size of the structure in bytes
   1426  *  nVersion           : OMX specification version info
   1427  *  nPortIndex         : Port that this structure applies to
   1428  *  nHeldBufferCount   : Read-only, maximum number of buffers that will be held
   1429  */
   1430 typedef struct QOMX_HELDBUFFERCOUNTTYPE {
   1431     OMX_U32 nSize;
   1432     OMX_VERSIONTYPE nVersion;
   1433     OMX_U32 nPortIndex;
   1434     OMX_U32 nHeldBufferCount;
   1435 } QOMX_HELDBUFFERCOUNTTYPE;
   1436 
   1437 typedef enum QOMX_VIDEO_HIERARCHICALCODINGTYPE {
   1438     QOMX_HIERARCHICALCODING_P = 0x01,
   1439     QOMX_HIERARCHICALCODING_B = 0x02,
   1440 } QOMX_VIDEO_HIERARCHICALCODINGTYPE;
   1441 
   1442 typedef struct QOMX_VIDEO_HIERARCHICALLAYERS {
   1443     OMX_U32 nSize;
   1444     OMX_VERSIONTYPE nVersion;
   1445     OMX_U32 nPortIndex;
   1446     OMX_U32 nNumLayers;
   1447     QOMX_VIDEO_HIERARCHICALCODINGTYPE eHierarchicalCodingType;
   1448 } QOMX_VIDEO_HIERARCHICALLAYERS;
   1449 
   1450 
   1451 #ifdef __cplusplus
   1452 }
   1453 #endif /* __cplusplus */
   1454 
   1455 #endif /* __OMX_QCOM_EXTENSIONS_H__ */
   1456