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 = 0x7FA30C05,
    294     QOMX_VIDEO_CodingHevc = 0x7FA30C06,
    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 
    473 /**
    474  * Initial QP parameter.  This structure is used to enable
    475  * vendor specific extension to let client enable setting
    476  * initial QP values to I P B Frames
    477  *
    478  * STRUCT MEMBERS:
    479  *  nSize              : Size of Structure in bytes
    480  *  nVersion           : OpenMAX IL specification version information
    481  *  nPortIndex         : Index of the port to which this structure applies
    482  *  OMX_U32 nQpI       : First Iframe QP
    483  *  OMX_U32 nQpP       : First Pframe QP
    484  *  OMX_U32 nQpB       : First Bframe QP
    485  *  OMX_U32 bEnableInitQp : Bit field indicating which frame type(s) shall
    486  *                             use the specified initial QP.
    487  *                          Bit 0: Enable initial QP for I/IDR
    488  *                                 and use value specified in nInitQpI
    489  *                          Bit 1: Enable initial QP for P
    490  *                                 and use value specified in nInitQpP
    491  *                          Bit 2: Enable initial QP for B
    492  *                                 and use value specified in nInitQpB
    493  */
    494 
    495 typedef struct QOMX_EXTNINDEX_VIDEO_INITIALQP {
    496     OMX_U32 nSize;
    497     OMX_VERSIONTYPE nVersion;
    498     OMX_U32 nPortIndex;
    499     OMX_U32 nQpI;
    500     OMX_U32 nQpP;
    501     OMX_U32 nQpB;
    502     OMX_U32 bEnableInitQp;
    503 } QOMX_EXTNINDEX_VIDEO_INITIALQP;
    504 
    505 /**
    506  * Extension index parameter.  This structure is used to enable
    507  * vendor specific extension on input/output port and
    508  * to pass the required flags and data, if any.
    509  * The format of flags and data being passed is known to
    510  * the client and component apriori.
    511  *
    512  * STRUCT MEMBERS:
    513  *  nSize              : Size of Structure plus pData size
    514  *  nVersion           : OMX specification version information
    515  *  nPortIndex         : Indicates which port to set
    516  *  bEnable            : Extension index enable (1) or disable (0)
    517  *  nFlags             : Extension index flags, if any
    518  *  nDataSize          : Size of the extension index data to follow
    519  *  pData              : Extension index data, if present.
    520  */
    521 typedef struct QOMX_EXTNINDEX_PARAMTYPE {
    522     OMX_U32 nSize;
    523     OMX_VERSIONTYPE nVersion;
    524     OMX_U32 nPortIndex;
    525     OMX_BOOL bEnable;
    526     OMX_U32 nFlags;
    527     OMX_U32 nDataSize;
    528     OMX_PTR pData;
    529 } QOMX_EXTNINDEX_PARAMTYPE;
    530 
    531 /**
    532  * Range index parameter.  This structure is used to enable
    533  * vendor specific extension on input/output port and
    534  * to pass the required minimum and maximum values
    535  *
    536  * STRUCT MEMBERS:
    537  *  nSize              : Size of Structure in bytes
    538  *  nVersion           : OpenMAX IL specification version information
    539  *  nPortIndex         : Index of the port to which this structure applies
    540  *  nMin               : Minimum value
    541  *  nMax               : Maximum value
    542  *  nSteSize           : Step size
    543  */
    544 typedef struct QOMX_EXTNINDEX_RANGETYPE {
    545     OMX_U32 nSize;
    546     OMX_VERSIONTYPE nVersion;
    547     OMX_U32 nPortIndex;
    548     OMX_S32 nMin;
    549     OMX_S32 nMax;
    550     OMX_S32 nStepSize;
    551 } QOMX_EXTNINDEX_RANGETYPE;
    552 
    553 /**
    554  *   Specifies LTR mode types.
    555  */
    556 typedef enum QOMX_VIDEO_LTRMODETYPE
    557 {
    558     QOMX_VIDEO_LTRMode_Disable    = 0x0, /**< LTR encoding is disabled */
    559     QOMX_VIDEO_LTRMode_Manual     = 0x1, /**< In this mode, IL client configures
    560                                            **  the encoder the LTR count and manually
    561                                            **  controls the marking and use of LTR
    562                                            **  frames during video encoding.
    563                                            */
    564     QOMX_VIDEO_LTRMode_Auto       = 0x2, /**< In this mode, IL client configures
    565                                            **  the encoder the LTR count and LTR
    566                                            **  period. The encoder marks LTR frames
    567                                            **  automatically based on the LTR period
    568                                            **  during video encoding. IL client controls
    569                                            **  the use of LTR frames.
    570                                            */
    571     QOMX_VIDEO_LTRMode_MAX    = 0x7FFFFFFF /** Maximum LTR Mode type */
    572 } QOMX_VIDEO_LTRMODETYPE;
    573 
    574 /**
    575  * LTR mode index parameter.  This structure is used
    576  * to enable vendor specific extension on output port
    577  * to pass the LTR mode information.
    578  *
    579  * STRUCT MEMBERS:
    580  *  nSize              : Size of Structure in bytes
    581  *  nVersion           : OpenMAX IL specification version information
    582  *  nPortIndex         : Index of the port to which this structure applies
    583  *  eLTRMode           : Specifies the LTR mode used in encoder
    584  */
    585 typedef struct QOMX_VIDEO_PARAM_LTRMODE_TYPE {
    586     OMX_U32 nSize;
    587     OMX_VERSIONTYPE nVersion;
    588     OMX_U32 nPortIndex;
    589     QOMX_VIDEO_LTRMODETYPE eLTRMode;
    590 } QOMX_VIDEO_PARAM_LTRMODE_TYPE;
    591 
    592 /**
    593  * LTR count index parameter.  This structure is used
    594  * to enable vendor specific extension on output port
    595  * to pass the LTR count information.
    596  *
    597  * STRUCT MEMBERS:
    598  *  nSize              : Size of Structure in bytes
    599  *  nVersion           : OpenMAX IL specification version information
    600  *  nPortIndex         : Index of the port to which this structure applies
    601  *  nCount             : Specifies the number of LTR frames stored in the
    602  *                       encoder component
    603  */
    604 typedef struct QOMX_VIDEO_PARAM_LTRCOUNT_TYPE {
    605     OMX_U32 nSize;
    606     OMX_VERSIONTYPE nVersion;
    607     OMX_U32 nPortIndex;
    608     OMX_U32 nCount;
    609 } QOMX_VIDEO_PARAM_LTRCOUNT_TYPE;
    610 
    611 /**
    612  * LTR period index parameter.  This structure is used
    613  * to enable vendor specific extension on output port
    614  * to pass the LTR period information.
    615  *
    616  * STRUCT MEMBERS:
    617  *  nSize              : Size of Structure in bytes
    618  *  nVersion           : OpenMAX IL specification version information
    619  *  nPortIndex         : Index of the port to which this structure applies
    620  *  nFrames            : Specifies the number of frames between two consecutive
    621  *                       LTR frames.
    622  */
    623 typedef struct QOMX_VIDEO_CONFIG_LTRPERIOD_TYPE {
    624     OMX_U32 nSize;
    625     OMX_VERSIONTYPE nVersion;
    626     OMX_U32 nPortIndex;
    627     OMX_U32 nFrames;
    628 } QOMX_VIDEO_CONFIG_LTRPERIOD_TYPE;
    629 
    630 /**
    631  * Marks the next encoded frame as an LTR frame.
    632  * STRUCT MEMBERS:
    633  *  nSize              : Size of Structure in bytes
    634  *  nVersion           : OpenMAX IL specification version information
    635  *  nPortIndex         : Index of the port to which this structure applies
    636  */
    637 typedef struct QOMX_VIDEO_CONFIG_LTRMARK_TYPE {
    638     OMX_U32 nSize;
    639     OMX_VERSIONTYPE nVersion;
    640     OMX_U32 nPortIndex;
    641 } QOMX_VIDEO_CONFIG_LTRMARK_TYPE;
    642 
    643 /**
    644  * Specifies an LTR frame to encode subsequent frames.
    645  * STRUCT MEMBERS:
    646  *  nSize              : Size of Structure in bytes
    647  *  nVersion           : OpenMAX IL specification version information
    648  *  nPortIndex         : Index of the port to which this structure applies
    649  *  nID                : Specifies the identifier of the LTR frame to be used
    650                          as reference frame for encoding subsequent frames.
    651  *  nFrames            : Specifies the number of subsequent frames to be
    652                          encoded using the LTR frame with its identifier
    653                          nID as reference frame. Short-term reference frames
    654                          will be used thereafter. The value of 0xFFFFFFFF
    655                          indicates that all subsequent frames will be
    656                          encodedusing this LTR frame as reference frame.
    657  */
    658 typedef struct QOMX_VIDEO_CONFIG_LTRUSE_TYPE {
    659     OMX_U32 nSize;
    660     OMX_VERSIONTYPE nVersion;
    661     OMX_U32 nPortIndex;
    662     OMX_U32 nID;
    663     OMX_U32 nFrames;
    664 } QOMX_VIDEO_CONFIG_LTRUSE_TYPE;
    665 
    666 /**
    667  * Enumeration used to define the video encoder modes
    668  *
    669  * ENUMS:
    670  *  EncoderModeDefault : Default video recording mode.
    671  *                       All encoder settings made through
    672  *                       OMX_SetParameter/OMX_SetConfig are applied. No
    673  *                       parameter is overridden.
    674  *  EncoderModeMMS : Video recording mode for MMS (Multimedia Messaging
    675  *                   Service). This mode is similar to EncoderModeDefault
    676  *                   except that here the Rate control mode is overridden
    677  *                   internally and set as a variant of variable bitrate with
    678  *                   variable frame rate. After this mode is set if the IL
    679  *                   client tries to set OMX_VIDEO_CONTROLRATETYPE via
    680  *                   OMX_IndexParamVideoBitrate that would be rejected. For
    681  *                   this, client should set mode back to EncoderModeDefault
    682  *                   first and then change OMX_VIDEO_CONTROLRATETYPE.
    683  */
    684 typedef enum QOMX_VIDEO_ENCODERMODETYPE
    685 {
    686     QOMX_VIDEO_EncoderModeDefault        = 0x00,
    687     QOMX_VIDEO_EncoderModeMMS            = 0x01,
    688     QOMX_VIDEO_EncoderModeMax            = 0x7FFFFFFF
    689 } QOMX_VIDEO_ENCODERMODETYPE;
    690 
    691 /**
    692  * This structure is used to set the video encoder mode.
    693  *
    694  * STRUCT MEMBERS:
    695  *  nSize      : Size of the structure in bytes
    696  *  nVersion   : OMX specification version info
    697  *  nPortIndex : Port that this structure applies to
    698  *  nMode : defines the video encoder mode
    699  */
    700 typedef struct QOMX_VIDEO_PARAM_ENCODERMODETYPE {
    701     OMX_U32 nSize;
    702     OMX_VERSIONTYPE nVersion;
    703     OMX_U32 nPortIndex;
    704     QOMX_VIDEO_ENCODERMODETYPE nMode;
    705 } QOMX_VIDEO_PARAM_ENCODERMODETYPE;
    706 
    707 /**
    708  * This structure describes the parameters corresponding to the
    709  * QOMX_VIDEO_SYNTAXHDRTYPE extension. This parameter can be queried
    710  * during the loaded state.
    711  */
    712 
    713 typedef struct QOMX_VIDEO_SYNTAXHDRTYPE
    714 {
    715    OMX_U32 nSize;           /** Size of the structure in bytes */
    716    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    717    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    718    OMX_U32 nBytes;    	    /** The number of bytes filled in to the buffer */
    719    OMX_U8 data[1];          /** Buffer to store the header information */
    720 } QOMX_VIDEO_SYNTAXHDRTYPE;
    721 
    722 /**
    723  * This structure describes the parameters corresponding to the
    724  * QOMX_VIDEO_TEMPORALSPATIALTYPE extension. This parameter can be set
    725  * dynamically during any state except the state invalid.  This is primarily
    726  * used for setting MaxQP from the application.  This is set on the out port.
    727  */
    728 
    729 typedef struct QOMX_VIDEO_TEMPORALSPATIALTYPE
    730 {
    731    OMX_U32 nSize;           /** Size of the structure in bytes */
    732    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    733    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    734    OMX_U32 nTSFactor;       /** Temoral spatial tradeoff factor value in 0-100 */
    735 } QOMX_VIDEO_TEMPORALSPATIALTYPE;
    736 
    737 /**
    738  * This structure describes the parameters corresponding to the
    739  * OMX_QCOM_VIDEO_CONFIG_INTRAPERIODTYPE extension. This parameter can be set
    740  * dynamically during any state except the state invalid.  This is set on the out port.
    741  */
    742 
    743 typedef struct QOMX_VIDEO_INTRAPERIODTYPE
    744 {
    745    OMX_U32 nSize;           /** Size of the structure in bytes */
    746    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    747    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    748    OMX_U32 nIDRPeriod;      /** This specifies coding a frame as IDR after every nPFrames
    749 			        of intra frames. If this parameter is set to 0, only the
    750 				first frame of the encode session is an IDR frame. This
    751 				field is ignored for non-AVC codecs and is used only for
    752 				codecs that support IDR Period */
    753    OMX_U32 nPFrames;         /** The number of "P" frames between two "I" frames */
    754    OMX_U32 nBFrames;         /** The number of "B" frames between two "I" frames */
    755 } QOMX_VIDEO_INTRAPERIODTYPE;
    756 
    757 /**
    758  * This structure describes the parameters corresponding to the
    759  * OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE extension. This parameter can be set
    760  * dynamically during any state except the state invalid. This is used for the buffer negotiation
    761  * with other clients.  This is set on the out port.
    762  */
    763 typedef struct OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE
    764 {
    765    OMX_U32 nSize;            /** Size of the structure in bytes */
    766    OMX_VERSIONTYPE nVersion; /** OMX specification version information */
    767    OMX_U32 nPortIndex;       /** Portindex which is extended by this structure */
    768    OMX_U32 nBufferOccupancy; /** The number of bytes to be set for the buffer occupancy */
    769 } OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE;
    770 
    771 /**
    772  * This structure describes the parameters corresponding to the
    773  * OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE extension. This parameter can be set
    774  * dynamically during any state except the state invalid. This is primarily used for the dynamic/random
    775  * intrarefresh.  This is set on the out port.
    776  */
    777 typedef struct OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE
    778 {
    779    OMX_U32 nSize;           /** Size of the structure in bytes */
    780    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    781    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    782    OMX_U32 nRirMBs;         /** The number of MBs to be set for intrarefresh */
    783 } OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE;
    784 
    785 
    786 /**
    787  * This structure describes the parameters corresponding to the
    788  * OMX_QCOM_VIDEO_CONFIG_QPRANGE extension. This parameter can be set
    789  * dynamically during any state except the state invalid. This is primarily
    790  * used for the min/max QP to be set from the application.  This
    791  * is set on the out port.
    792  */
    793 typedef struct OMX_QCOM_VIDEO_CONFIG_QPRANGE
    794 {
    795    OMX_U32 nSize;           /** Size of the structure in bytes */
    796    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    797    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    798    OMX_U32 nMinQP;          /** The number for minimum quantization parameter */
    799    OMX_U32 nMaxQP;          /** The number for maximum quantization parameter */
    800 } OMX_QCOM_VIDEO_CONFIG_QPRANGE;
    801 
    802 /**
    803  * This structure describes the parameters for the
    804  * OMX_QcomIndexParamH264AUDelimiter extension.  It enables/disables
    805  * the AU delimiters in the H264 stream, which is used by WFD.
    806  */
    807 typedef struct OMX_QCOM_VIDEO_CONFIG_H264_AUD
    808 {
    809    OMX_U32 nSize;           /** Size of the structure in bytes */
    810    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    811    OMX_BOOL bEnable;        /** Enable/disable the setting */
    812 } OMX_QCOM_VIDEO_CONFIG_H264_AUD;
    813 
    814 typedef enum QOMX_VIDEO_PERF_LEVEL
    815 {
    816     OMX_QCOM_PerfLevelNominal,
    817     OMX_QCOM_PerfLevelTurbo
    818 } QOMX_VIDEO_PERF_LEVEL;
    819 
    820 /**
    821  * This structure describes the parameters corresponding
    822  * to OMX_QcomIndexParamPerfLevel extension. It will set
    823  * the performance mode specified as QOMX_VIDEO_PERF_LEVEL.
    824  */
    825 typedef struct OMX_QCOM_VIDEO_PARAM_PERF_LEVEL {
    826     OMX_U32 nSize;                      /** Size of the structure in bytes */
    827     OMX_VERSIONTYPE nVersion;           /** OMX specification version information */
    828     QOMX_VIDEO_PERF_LEVEL ePerfLevel;   /** Performance level */
    829 } OMX_QCOM_VIDEO_PARAM_PERF_LEVEL;
    830 
    831 /**
    832  * This structure describes the parameters corresponding
    833  * to OMX_QcomIndexParamH264VUITimingInfo extension. It
    834  * will enable/disable the VUI timing info.
    835  */
    836 typedef struct OMX_QCOM_VIDEO_PARAM_VUI_TIMING_INFO {
    837     OMX_U32 nSize;              /** Size of the structure in bytes */
    838     OMX_VERSIONTYPE nVersion;   /** OMX specification version information */
    839     OMX_BOOL bEnable;           /** Enable/disable the setting */
    840 } OMX_QCOM_VIDEO_PARAM_VUI_TIMING_INFO;
    841 
    842 /**
    843  * This structure describes the parameters corresponding
    844  * to OMX_QcomIndexParamPeakBitrate extension. It will
    845  * set the peak bitrate specified by nPeakBitrate.
    846  */
    847 typedef struct OMX_QCOM_VIDEO_PARAM_PEAK_BITRATE {
    848     OMX_U32 nSize;              /** Size of the structure in bytes */
    849     OMX_VERSIONTYPE nVersion;   /** OMX specification version information */
    850     OMX_U32 nPeakBitrate;       /** Peak bitrate value */
    851 } OMX_QCOM_VIDEO_PARAM_PEAK_BITRATE;
    852 
    853 typedef struct OMX_VENDOR_EXTRADATATYPE  {
    854     OMX_U32 nPortIndex;
    855     OMX_U32 nDataSize;
    856     OMX_U8  *pData;     // cdata (codec_data/extradata)
    857 } OMX_VENDOR_EXTRADATATYPE;
    858 
    859 /**
    860  * This structure describes the parameters corresponding to the
    861  * OMX_VENDOR_VIDEOFRAMERATE extension. This parameter can be set
    862  * dynamically during any state except the state invalid. This is
    863  * used for frame rate to be set from the application. This
    864  * is set on the in port.
    865  */
    866 typedef struct OMX_VENDOR_VIDEOFRAMERATE  {
    867    OMX_U32 nSize;           /** Size of the structure in bytes */
    868    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    869    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    870    OMX_U32 nFps;            /** Frame rate value */
    871    OMX_BOOL bEnabled;       /** Flag to enable or disable client's frame rate value */
    872 } OMX_VENDOR_VIDEOFRAMERATE;
    873 
    874 typedef enum OMX_INDEXVENDORTYPE {
    875     OMX_IndexVendorFileReadInputFilename = 0xFF000001,
    876     OMX_IndexVendorParser3gpInputFilename = 0xFF000002,
    877     OMX_IndexVendorVideoExtraData = 0xFF000003,
    878     OMX_IndexVendorAudioExtraData = 0xFF000004,
    879     OMX_IndexVendorVideoFrameRate = 0xFF000005,
    880 } OMX_INDEXVENDORTYPE;
    881 
    882 typedef enum OMX_QCOM_VC1RESOLUTIONTYPE
    883 {
    884    OMX_QCOM_VC1_PICTURE_RES_1x1,
    885    OMX_QCOM_VC1_PICTURE_RES_2x1,
    886    OMX_QCOM_VC1_PICTURE_RES_1x2,
    887    OMX_QCOM_VC1_PICTURE_RES_2x2
    888 } OMX_QCOM_VC1RESOLUTIONTYPE;
    889 
    890 typedef enum OMX_QCOM_INTERLACETYPE
    891 {
    892     OMX_QCOM_InterlaceFrameProgressive,
    893     OMX_QCOM_InterlaceInterleaveFrameTopFieldFirst,
    894     OMX_QCOM_InterlaceInterleaveFrameBottomFieldFirst,
    895     OMX_QCOM_InterlaceFrameTopFieldFirst,
    896     OMX_QCOM_InterlaceFrameBottomFieldFirst,
    897     OMX_QCOM_InterlaceFieldTop,
    898     OMX_QCOM_InterlaceFieldBottom
    899 }OMX_QCOM_INTERLACETYPE;
    900 
    901 typedef struct OMX_QCOM_PARAM_VIDEO_INTERLACETYPE
    902 {
    903     OMX_U32 nSize;           /** Size of the structure in bytes */
    904     OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    905     OMX_U32 nPortIndex;    /** Portindex which is extended by this structure */
    906     OMX_BOOL bInterlace;  /** Interlace content **/
    907 }OMX_QCOM_PARAM_VIDEO_INTERLACETYPE;
    908 
    909 typedef struct OMX_QCOM_CONFIG_INTERLACETYPE
    910 {
    911     OMX_U32 nSize;
    912     OMX_VERSIONTYPE nVersion;
    913     OMX_U32 nPortIndex;
    914     OMX_U32 nIndex;
    915     OMX_QCOM_INTERLACETYPE eInterlaceType;
    916 }OMX_QCOM_CONFIG_INTERLACETYPE;
    917 
    918 #define MAX_PAN_SCAN_WINDOWS 4
    919 
    920 typedef struct OMX_QCOM_PANSCAN
    921 {
    922    OMX_U32 numWindows;
    923    OMX_QCOMRectangle window[MAX_PAN_SCAN_WINDOWS];
    924 } OMX_QCOM_PANSCAN;
    925 
    926 typedef struct OMX_QCOM_ASPECT_RATIO
    927 {
    928    OMX_U32 aspectRatioX;
    929    OMX_U32 aspectRatioY;
    930 } OMX_QCOM_ASPECT_RATIO;
    931 
    932 typedef struct OMX_QCOM_DISPLAY_ASPECT_RATIO
    933 {
    934    OMX_U32 displayVerticalSize;
    935    OMX_U32 displayHorizontalSize;
    936 } OMX_QCOM_DISPLAY_ASPECT_RATIO;
    937 
    938 typedef struct OMX_QCOM_FRAME_PACK_ARRANGEMENT
    939 {
    940   OMX_U32 nSize;
    941   OMX_VERSIONTYPE nVersion;
    942   OMX_U32 nPortIndex;
    943   OMX_U32 id;
    944   OMX_U32 cancel_flag;
    945   OMX_U32 type;
    946   OMX_U32 quincunx_sampling_flag;
    947   OMX_U32 content_interpretation_type;
    948   OMX_U32 spatial_flipping_flag;
    949   OMX_U32 frame0_flipped_flag;
    950   OMX_U32 field_views_flag;
    951   OMX_U32 current_frame_is_frame0_flag;
    952   OMX_U32 frame0_self_contained_flag;
    953   OMX_U32 frame1_self_contained_flag;
    954   OMX_U32 frame0_grid_position_x;
    955   OMX_U32 frame0_grid_position_y;
    956   OMX_U32 frame1_grid_position_x;
    957   OMX_U32 frame1_grid_position_y;
    958   OMX_U32 reserved_byte;
    959   OMX_U32 repetition_period;
    960   OMX_U32 extension_flag;
    961 } OMX_QCOM_FRAME_PACK_ARRANGEMENT;
    962 
    963 typedef struct OMX_QCOM_EXTRADATA_QP
    964 {
    965    OMX_U32        nQP;
    966 } OMX_QCOM_EXTRADATA_QP;
    967 
    968 typedef struct OMX_QCOM_EXTRADATA_BITS_INFO
    969 {
    970    OMX_U32 header_bits;
    971    OMX_U32 frame_bits;
    972 } OMX_QCOM_EXTRADATA_BITS_INFO;
    973 
    974 typedef struct OMX_QCOM_EXTRADATA_USERDATA {
    975    OMX_U32 type;
    976    OMX_U32 data[1];
    977 } OMX_QCOM_EXTRADATA_USERDATA;
    978 
    979 typedef struct OMX_QCOM_EXTRADATA_FRAMEINFO
    980 {
    981    // common frame meta data. interlace related info removed
    982    OMX_VIDEO_PICTURETYPE  ePicType;
    983    OMX_QCOM_INTERLACETYPE interlaceType;
    984    OMX_QCOM_PANSCAN       panScan;
    985    OMX_QCOM_ASPECT_RATIO  aspectRatio;
    986    OMX_QCOM_DISPLAY_ASPECT_RATIO displayAspectRatio;
    987    OMX_U32                nConcealedMacroblocks;
    988    OMX_U32                nFrameRate;
    989    OMX_TICKS              nTimeStamp;
    990 } OMX_QCOM_EXTRADATA_FRAMEINFO;
    991 
    992 typedef struct OMX_QCOM_EXTRADATA_FRAMEDIMENSION
    993 {
    994    /** Frame Dimensions added to each YUV buffer */
    995    OMX_U32   nDecWidth;  /** Width  rounded to multiple of 16 */
    996    OMX_U32   nDecHeight; /** Height rounded to multiple of 16 */
    997    OMX_U32   nActualWidth; /** Actual Frame Width */
    998    OMX_U32   nActualHeight; /** Actual Frame Height */
    999 
   1000 }OMX_QCOM_EXTRADATA_FRAMEDIMENSION;
   1001 
   1002 typedef struct OMX_QCOM_H264EXTRADATA
   1003 {
   1004    OMX_U64 seiTimeStamp;
   1005 } OMX_QCOM_H264EXTRADATA;
   1006 
   1007 typedef struct OMX_QCOM_VC1EXTRADATA
   1008 {
   1009    OMX_U32                     nVC1RangeY;
   1010    OMX_U32                     nVC1RangeUV;
   1011    OMX_QCOM_VC1RESOLUTIONTYPE eVC1PicResolution;
   1012 } OMX_QCOM_VC1EXTRADATA;
   1013 
   1014 typedef union OMX_QCOM_EXTRADATA_CODEC_DATA
   1015 {
   1016    OMX_QCOM_H264EXTRADATA h264ExtraData;
   1017    OMX_QCOM_VC1EXTRADATA vc1ExtraData;
   1018 } OMX_QCOM_EXTRADATA_CODEC_DATA;
   1019 
   1020 typedef struct OMX_QCOM_EXTRADATA_MBINFO
   1021 {
   1022    OMX_U32 nFormat;
   1023    OMX_U32 nDataSize;
   1024    OMX_U8  data[0];
   1025 } OMX_QCOM_EXTRADATA_MBINFO;
   1026 
   1027 typedef enum OMX_QCOM_EXTRADATATYPE
   1028 {
   1029    OMX_ExtraDataFrameInfo = 0x7F000001,
   1030    OMX_ExtraDataH264 = 0x7F000002,
   1031    OMX_ExtraDataVC1 = 0x7F000003,
   1032    OMX_ExtraDataFrameDimension = 0x7F000004,
   1033    OMX_ExtraDataVideoEncoderSliceInfo = 0x7F000005,
   1034    OMX_ExtraDataConcealMB = 0x7F000006,
   1035    OMX_ExtraDataInterlaceFormat = 0x7F000007,
   1036    OMX_ExtraDataPortDef = 0x7F000008,
   1037    OMX_ExtraDataMP2ExtnData = 0x7F000009,
   1038    OMX_ExtraDataMP2UserData = 0x7F00000a,
   1039    OMX_ExtraDataVideoLTRInfo = 0x7F00000b,
   1040     OMX_ExtraDataFramePackingArrangement = 0x7F00000c,
   1041     OMX_ExtraDataQP =                      0x7F00000d,
   1042     OMX_ExtraDataInputBitsInfo =           0x7F00000e,
   1043     OMX_ExtraDataVideoEncoderMBInfo =      0x7F00000f,
   1044 } OMX_QCOM_EXTRADATATYPE;
   1045 
   1046 typedef struct  OMX_STREAMINTERLACEFORMATTYPE {
   1047     OMX_U32 nSize;
   1048     OMX_VERSIONTYPE nVersion;
   1049     OMX_U32 nPortIndex;
   1050     OMX_BOOL bInterlaceFormat;
   1051     OMX_U32 nInterlaceFormats;
   1052 } OMX_STREAMINTERLACEFORMAT;
   1053 
   1054 typedef enum OMX_INTERLACETYPE
   1055 {
   1056    OMX_InterlaceFrameProgressive,
   1057    OMX_InterlaceInterleaveFrameTopFieldFirst,
   1058    OMX_InterlaceInterleaveFrameBottomFieldFirst,
   1059    OMX_InterlaceFrameTopFieldFirst,
   1060    OMX_InterlaceFrameBottomFieldFirst
   1061 }OMX_INTERLACEs;
   1062 
   1063 
   1064 #define OMX_EXTRADATA_HEADER_SIZE 20
   1065 
   1066 /**
   1067  * AVC profile types, each profile indicates support for various
   1068  * performance bounds and different annexes.
   1069  */
   1070 typedef enum QOMX_VIDEO_AVCPROFILETYPE {
   1071     QOMX_VIDEO_AVCProfileBaseline      = OMX_VIDEO_AVCProfileBaseline,
   1072     QOMX_VIDEO_AVCProfileMain          = OMX_VIDEO_AVCProfileMain,
   1073     QOMX_VIDEO_AVCProfileExtended      = OMX_VIDEO_AVCProfileExtended,
   1074     QOMX_VIDEO_AVCProfileHigh          = OMX_VIDEO_AVCProfileHigh,
   1075     QOMX_VIDEO_AVCProfileHigh10        = OMX_VIDEO_AVCProfileHigh10,
   1076     QOMX_VIDEO_AVCProfileHigh422       = OMX_VIDEO_AVCProfileHigh422,
   1077     QOMX_VIDEO_AVCProfileHigh444       = OMX_VIDEO_AVCProfileHigh444,
   1078     /* QCom specific profile indexes */
   1079     QOMX_VIDEO_AVCProfileConstrainedBaseline   = OMX_VIDEO_AVCProfileVendorStartUnused + 1,
   1080 } QOMX_VIDEO_AVCPROFILETYPE;
   1081 
   1082 
   1083 /**
   1084  * H.264 MVC Profiles
   1085   */
   1086 typedef enum QOMX_VIDEO_MVCPROFILETYPE {
   1087     QOMX_VIDEO_MVCProfileStereoHigh = 0x1,
   1088     QOMX_VIDEO_MVCProfileMultiViewHigh = 0x2,
   1089     QOMX_VIDEO_MVCProfileKhronosExtensions = 0x6F000000,
   1090     QOMX_VIDEO_MVCProfileVendorStartUnused = 0x7F000000,
   1091     QOMX_VIDEO_MVCProfileMax = 0x7FFFFFFF
   1092 } QOMX_VIDEO_MVCPROFILETYPE;
   1093 
   1094 /**
   1095  * H.264 MVC Levels
   1096   */
   1097 typedef enum QOMX_VIDEO_MVCLEVELTYPE {
   1098     QOMX_VIDEO_MVCLevel1   = 0x01,     /**< Level 1 */
   1099     QOMX_VIDEO_MVCLevel1b  = 0x02,     /**< Level 1b */
   1100     QOMX_VIDEO_MVCLevel11  = 0x04,     /**< Level 1.1 */
   1101     QOMX_VIDEO_MVCLevel12  = 0x08,     /**< Level 1.2 */
   1102     QOMX_VIDEO_MVCLevel13  = 0x10,     /**< Level 1.3 */
   1103     QOMX_VIDEO_MVCLevel2   = 0x20,     /**< Level 2 */
   1104     QOMX_VIDEO_MVCLevel21  = 0x40,     /**< Level 2.1 */
   1105     QOMX_VIDEO_MVCLevel22  = 0x80,     /**< Level 2.2 */
   1106     QOMX_VIDEO_MVCLevel3   = 0x100,    /**< Level 3 */
   1107     QOMX_VIDEO_MVCLevel31  = 0x200,    /**< Level 3.1 */
   1108     QOMX_VIDEO_MVCLevel32  = 0x400,    /**< Level 3.2 */
   1109     QOMX_VIDEO_MVCLevel4   = 0x800,    /**< Level 4 */
   1110     QOMX_VIDEO_MVCLevel41  = 0x1000,   /**< Level 4.1 */
   1111     QOMX_VIDEO_MVCLevel42  = 0x2000,   /**< Level 4.2 */
   1112     QOMX_VIDEO_MVCLevel5   = 0x4000,   /**< Level 5 */
   1113     QOMX_VIDEO_MVCLevel51  = 0x8000,   /**< Level 5.1 */
   1114     QOMX_VIDEO_MVCLevelKhronosExtensions = 0x6F000000,
   1115     QOMX_VIDEO_MVCLevelVendorStartUnused = 0x7F000000,
   1116     QOMX_VIDEO_MVCLevelMax = 0x7FFFFFFF
   1117 } QOMX_VIDEO_MVCLEVELTYPE;
   1118 
   1119 /**
   1120  * DivX Versions
   1121  */
   1122 typedef enum  QOMX_VIDEO_DIVXFORMATTYPE {
   1123     QOMX_VIDEO_DIVXFormatUnused = 0x01, /**< Format unused or unknown */
   1124     QOMX_VIDEO_DIVXFormat311    = 0x02, /**< DivX 3.11 */
   1125     QOMX_VIDEO_DIVXFormat4      = 0x04, /**< DivX 4 */
   1126     QOMX_VIDEO_DIVXFormat5      = 0x08, /**< DivX 5 */
   1127     QOMX_VIDEO_DIVXFormat6      = 0x10, /**< DivX 6 */
   1128     QOMX_VIDEO_DIVXFormatKhronosExtensions = 0x6F000000,
   1129     QOMX_VIDEO_DIVXFormatVendorStartUnused = 0x7F000000,
   1130     QOMX_VIDEO_DIVXFormatMax = 0x7FFFFFFF
   1131 } QOMX_VIDEO_DIVXFORMATTYPE;
   1132 
   1133 /**
   1134  * DivX profile types, each profile indicates support for
   1135  * various performance bounds.
   1136  */
   1137 typedef enum QOMX_VIDEO_DIVXPROFILETYPE {
   1138     QOMX_VIDEO_DivXProfileqMobile = 0x01, /**< qMobile Profile */
   1139     QOMX_VIDEO_DivXProfileMobile  = 0x02, /**< Mobile Profile */
   1140     QOMX_VIDEO_DivXProfileMT      = 0x04, /**< Mobile Theatre Profile */
   1141     QOMX_VIDEO_DivXProfileHT      = 0x08, /**< Home Theatre Profile */
   1142     QOMX_VIDEO_DivXProfileHD      = 0x10, /**< High Definition Profile */
   1143     QOMX_VIDEO_DIVXProfileKhronosExtensions = 0x6F000000,
   1144     QOMX_VIDEO_DIVXProfileVendorStartUnused = 0x7F000000,
   1145     QOMX_VIDEO_DIVXProfileMax = 0x7FFFFFFF
   1146 } QOMX_VIDEO_DIVXPROFILETYPE;
   1147 
   1148 /**
   1149  * DivX Video Params
   1150  *
   1151  *  STRUCT MEMBERS:
   1152  *  nSize      : Size of the structure in bytes
   1153  *  nVersion   : OMX specification version information
   1154  *  nPortIndex : Port that this structure applies to
   1155  *  eFormat    : Version of DivX stream / data
   1156  *  eProfile   : Profile of DivX stream / data
   1157  */
   1158 typedef struct QOMX_VIDEO_PARAM_DIVXTYPE {
   1159     OMX_U32 nSize;
   1160     OMX_VERSIONTYPE nVersion;
   1161     OMX_U32 nPortIndex;
   1162     QOMX_VIDEO_DIVXFORMATTYPE eFormat;
   1163     QOMX_VIDEO_DIVXPROFILETYPE eProfile;
   1164 } QOMX_VIDEO_PARAM_DIVXTYPE;
   1165 
   1166 
   1167 
   1168 /**
   1169  *  VP Versions
   1170  */
   1171 typedef enum QOMX_VIDEO_VPFORMATTYPE {
   1172     QOMX_VIDEO_VPFormatUnused = 0x01, /**< Format unused or unknown */
   1173     QOMX_VIDEO_VPFormat6      = 0x02, /**< VP6 Video Format */
   1174     QOMX_VIDEO_VPFormat7      = 0x04, /**< VP7 Video Format */
   1175     QOMX_VIDEO_VPFormat8      = 0x08, /**< VP8 Video Format */
   1176     QOMX_VIDEO_VPFormatKhronosExtensions = 0x6F000000,
   1177     QOMX_VIDEO_VPFormatVendorStartUnused = 0x7F000000,
   1178     QOMX_VIDEO_VPFormatMax = 0x7FFFFFFF
   1179 } QOMX_VIDEO_VPFORMATTYPE;
   1180 
   1181 /**
   1182  * VP profile types, each profile indicates support for various
   1183  * encoding tools.
   1184  */
   1185 typedef enum QOMX_VIDEO_VPPROFILETYPE {
   1186     QOMX_VIDEO_VPProfileSimple   = 0x01, /**< Simple Profile, applies to VP6 only */
   1187     QOMX_VIDEO_VPProfileAdvanced = 0x02, /**< Advanced Profile, applies to VP6 only */
   1188     QOMX_VIDEO_VPProfileVersion0 = 0x04, /**< Version 0, applies to VP7 and VP8 */
   1189     QOMX_VIDEO_VPProfileVersion1 = 0x08, /**< Version 1, applies to VP7 and VP8 */
   1190     QOMX_VIDEO_VPProfileVersion2 = 0x10, /**< Version 2, applies to VP8 only */
   1191     QOMX_VIDEO_VPProfileVersion3 = 0x20, /**< Version 3, applies to VP8 only */
   1192     QOMX_VIDEO_VPProfileKhronosExtensions = 0x6F000000,
   1193     QOMX_VIDEO_VPProfileVendorStartUnused = 0x7F000000,
   1194     QOMX_VIDEO_VPProfileMax = 0x7FFFFFFF
   1195 } QOMX_VIDEO_VPPROFILETYPE;
   1196 
   1197 /**
   1198  * VP Video Params
   1199  *
   1200  *  STRUCT MEMBERS:
   1201  *  nSize      : Size of the structure in bytes
   1202  *  nVersion   : OMX specification version information
   1203  *  nPortIndex : Port that this structure applies to
   1204  *  eFormat    : Format of VP stream / data
   1205  *  eProfile   : Profile or Version of VP stream / data
   1206  */
   1207 typedef struct QOMX_VIDEO_PARAM_VPTYPE {
   1208     OMX_U32 nSize;
   1209     OMX_VERSIONTYPE nVersion;
   1210     OMX_U32 nPortIndex;
   1211     QOMX_VIDEO_VPFORMATTYPE eFormat;
   1212     QOMX_VIDEO_VPPROFILETYPE eProfile;
   1213 } QOMX_VIDEO_PARAM_VPTYPE;
   1214 
   1215 /**
   1216  * Spark Versions
   1217  */
   1218 typedef enum QOMX_VIDEO_SPARKFORMATTYPE {
   1219     QOMX_VIDEO_SparkFormatUnused = 0x01, /**< Format unused or unknown */
   1220     QOMX_VIDEO_SparkFormat0      = 0x02, /**< Video Format Version 0 */
   1221     QOMX_VIDEO_SparkFormat1      = 0x04, /**< Video Format Version 1 */
   1222     QOMX_VIDEO_SparkFormatKhronosExtensions = 0x6F000000,
   1223     QOMX_VIDEO_SparkFormatVendorStartUnused = 0x7F000000,
   1224     QOMX_VIDEO_SparkFormatMax = 0x7FFFFFFF
   1225 } QOMX_VIDEO_SPARKFORMATTYPE;
   1226 
   1227 /**
   1228  * Spark Video Params
   1229  *
   1230  *  STRUCT MEMBERS:
   1231  *  nSize      : Size of the structure in bytes
   1232  *  nVersion   : OMX specification version information
   1233  *  nPortIndex : Port that this structure applies to
   1234  *  eFormat    : Version of Spark stream / data
   1235  */
   1236 typedef struct QOMX_VIDEO_PARAM_SPARKTYPE {
   1237     OMX_U32 nSize;
   1238     OMX_VERSIONTYPE nVersion;
   1239     OMX_U32 nPortIndex;
   1240     QOMX_VIDEO_SPARKFORMATTYPE eFormat;
   1241 } QOMX_VIDEO_PARAM_SPARKTYPE;
   1242 
   1243 
   1244 typedef struct QOMX_VIDEO_QUERY_DECODER_INSTANCES {
   1245     OMX_U32 nSize;
   1246     OMX_VERSIONTYPE nVersion;
   1247     OMX_U32 nPortIndex;
   1248     OMX_U32 nNumOfInstances;
   1249 } QOMX_VIDEO_QUERY_DECODER_INSTANCES;
   1250 
   1251 typedef struct QOMX_ENABLETYPE {
   1252     OMX_BOOL bEnable;
   1253 } QOMX_ENABLETYPE;
   1254 
   1255 typedef enum QOMX_VIDEO_EVENTS {
   1256     OMX_EventIndexsettingChanged = OMX_EventVendorStartUnused
   1257 } QOMX_VIDEO_EVENTS;
   1258 
   1259 typedef enum QOMX_VIDEO_PICTURE_ORDER {
   1260     QOMX_VIDEO_DISPLAY_ORDER = 0x1,
   1261     QOMX_VIDEO_DECODE_ORDER = 0x2
   1262 } QOMX_VIDEO_PICTURE_ORDER;
   1263 
   1264 typedef struct QOMX_VIDEO_DECODER_PICTURE_ORDER {
   1265     OMX_U32 nSize;
   1266     OMX_VERSIONTYPE nVersion;
   1267     OMX_U32 nPortIndex;
   1268     QOMX_VIDEO_PICTURE_ORDER eOutputPictureOrder;
   1269 } QOMX_VIDEO_DECODER_PICTURE_ORDER;
   1270 
   1271 typedef struct QOMX_INDEXEXTRADATATYPE {
   1272     OMX_U32 nSize;
   1273     OMX_VERSIONTYPE nVersion;
   1274     OMX_U32 nPortIndex;
   1275     OMX_BOOL bEnabled;
   1276     OMX_INDEXTYPE nIndex;
   1277 } QOMX_INDEXEXTRADATATYPE;
   1278 
   1279 typedef struct QOMX_INDEXTIMESTAMPREORDER {
   1280 	OMX_U32 nSize;
   1281 	OMX_VERSIONTYPE nVersion;
   1282 	OMX_U32 nPortIndex;
   1283 	OMX_BOOL bEnable;
   1284 } QOMX_INDEXTIMESTAMPREORDER;
   1285 
   1286 typedef struct QOMX_INDEXDOWNSCALAR {
   1287         OMX_U32 nSize;
   1288         OMX_VERSIONTYPE nVersion;
   1289         OMX_U32 nPortIndex;
   1290         OMX_BOOL bEnable;
   1291 } QOMX_INDEXDOWNSCALAR;
   1292 
   1293 
   1294 #define OMX_QCOM_INDEX_PARAM_VIDEO_SYNCFRAMEDECODINGMODE "OMX.QCOM.index.param.video.SyncFrameDecodingMode"
   1295 #define OMX_QCOM_INDEX_PARAM_INDEXEXTRADATA "OMX.QCOM.index.param.IndexExtraData"
   1296 #define OMX_QCOM_INDEX_PARAM_VIDEO_SLICEDELIVERYMODE "OMX.QCOM.index.param.SliceDeliveryMode"
   1297 #define OMX_QCOM_INDEX_PARAM_VIDEO_FRAMEPACKING_EXTRADATA "OMX.QCOM.index.param.video.FramePackingExtradata"
   1298 #define OMX_QCOM_INDEX_PARAM_VIDEO_QP_EXTRADATA "OMX.QCOM.index.param.video.QPExtradata"
   1299 #define OMX_QCOM_INDEX_PARAM_VIDEO_INPUTBITSINFO_EXTRADATA "OMX.QCOM.index.param.video.InputBitsInfoExtradata"
   1300 #define OMX_QCOM_INDEX_PARAM_VIDEO_EXTNUSER_EXTRADATA "OMX.QCOM.index.param.video.ExtnUserExtraData"
   1301 #define OMX_QCOM_INDEX_CONFIG_VIDEO_FRAMEPACKING_INFO "OMX.QCOM.index.config.video.FramePackingInfo"
   1302 
   1303 typedef enum {
   1304     QOMX_VIDEO_FRAME_PACKING_CHECKERBOARD = 0,
   1305     QOMX_VIDEO_FRAME_PACKING_COLUMN_INTERLEAVE = 1,
   1306     QOMX_VIDEO_FRAME_PACKING_ROW_INTERLEAVE = 2,
   1307     QOMX_VIDEO_FRAME_PACKING_SIDE_BY_SIDE = 3,
   1308     QOMX_VIDEO_FRAME_PACKING_TOP_BOTTOM = 4,
   1309     QOMX_VIDEO_FRAME_PACKING_TEMPORAL = 5,
   1310 } QOMX_VIDEO_FRAME_PACKING_ARRANGEMENT;
   1311 
   1312 typedef enum {
   1313     QOMX_VIDEO_CONTENT_UNSPECIFIED = 0,
   1314     QOMX_VIDEO_CONTENT_LR_VIEW = 1,
   1315     QOMX_VIDEO_CONTENT_RL_VIEW = 2,
   1316 } QOMX_VIDEO_CONTENT_INTERPRETATION;
   1317 
   1318 // A pointer to this struct is passed to OMX_SetParameter when the extension
   1319 // index for the 'OMX.google.android.index.setVUIStreamRestrictFlag' extension
   1320 // is given.
   1321 typedef struct QOMX_VUI_BITSTREAM_RESTRICT {
   1322     OMX_U32 nSize;
   1323     OMX_VERSIONTYPE nVersion;
   1324     OMX_BOOL bEnable;
   1325 } QOMX_VUI_BITSTREAM_RESTRICT;
   1326 
   1327 /**
   1328  * Specifies the extended picture types. These values should be
   1329  * OR'd along with the types defined in OMX_VIDEO_PICTURETYPE to
   1330  * signal all pictures types which are allowed.
   1331  *
   1332  * ENUMS:
   1333  *  H.264 Specific Picture Types:   IDR
   1334  */
   1335 typedef enum QOMX_VIDEO_PICTURETYPE {
   1336     QOMX_VIDEO_PictureTypeIDR = OMX_VIDEO_PictureTypeVendorStartUnused + 0x1000
   1337 } QOMX_VIDEO_PICTURETYPE;
   1338 
   1339 #define OMX_QCOM_INDEX_CONFIG_ACTIVE_REGION_DETECTION           "OMX.QCOM.index.config.activeregiondetection"
   1340 #define OMX_QCOM_INDEX_CONFIG_ACTIVE_REGION_DETECTION_STATUS    "OMX.QCOM.index.config.activeregiondetectionstatus"
   1341 #define OMX_QCOM_INDEX_CONFIG_SCALING_MODE                      "OMX.QCOM.index.config.scalingmode"
   1342 #define OMX_QCOM_INDEX_CONFIG_NOISEREDUCTION                    "OMX.QCOM.index.config.noisereduction"
   1343 #define OMX_QCOM_INDEX_CONFIG_IMAGEENHANCEMENT                  "OMX.QCOM.index.config.imageenhancement"
   1344 #define OMX_QCOM_INDEX_PARAM_HELDBUFFERCOUNT                    "OMX.QCOM.index.param.HeldBufferCount" /**< reference: QOMX_HELDBUFFERCOUNTTYPE */
   1345 
   1346 
   1347 typedef struct QOMX_RECTTYPE {
   1348     OMX_S32 nLeft;
   1349     OMX_S32 nTop;
   1350     OMX_U32 nWidth;
   1351     OMX_U32 nHeight;
   1352 } QOMX_RECTTYPE;
   1353 
   1354 typedef struct QOMX_ACTIVEREGIONDETECTIONTYPE {
   1355     OMX_U32 nSize;
   1356     OMX_VERSIONTYPE nVersion;
   1357     OMX_U32 nPortIndex;
   1358     OMX_BOOL bEnable;
   1359     QOMX_RECTTYPE sROI;
   1360     OMX_U32 nNumExclusionRegions;
   1361     QOMX_RECTTYPE sExclusionRegions[1];
   1362 } QOMX_ACTIVEREGIONDETECTIONTYPE;
   1363 
   1364 typedef struct QOMX_ACTIVEREGIONDETECTION_STATUSTYPE {
   1365     OMX_U32 nSize;
   1366     OMX_VERSIONTYPE nVersion;
   1367     OMX_U32 nPortIndex;
   1368     OMX_BOOL bDetected;
   1369     QOMX_RECTTYPE sDetectedRegion;
   1370 } QOMX_ACTIVEREGIONDETECTION_STATUSTYPE;
   1371 
   1372 typedef enum QOMX_SCALE_MODETYPE {
   1373     QOMX_SCALE_MODE_Normal,
   1374     QOMX_SCALE_MODE_Anamorphic,
   1375     QOMX_SCALE_MODE_Max = 0x7FFFFFFF
   1376 } QOMX_SCALE_MODETYPE;
   1377 
   1378 typedef struct QOMX_SCALINGMODETYPE {
   1379     OMX_U32 nSize;
   1380     OMX_VERSIONTYPE nVersion;
   1381     QOMX_SCALE_MODETYPE  eScaleMode;
   1382 } QOMX_SCALINGMODETYPE;
   1383 
   1384 typedef struct QOMX_NOISEREDUCTIONTYPE {
   1385     OMX_U32 nSize;
   1386     OMX_VERSIONTYPE nVersion;
   1387     OMX_U32 nPortIndex;
   1388     OMX_BOOL bEnable;
   1389     OMX_BOOL bAutoMode;
   1390     OMX_S32 nNoiseReduction;
   1391 } QOMX_NOISEREDUCTIONTYPE;
   1392 
   1393 typedef struct QOMX_IMAGEENHANCEMENTTYPE {
   1394     OMX_U32 nSize;
   1395     OMX_VERSIONTYPE nVersion;
   1396     OMX_U32 nPortIndex;
   1397     OMX_BOOL bEnable;
   1398     OMX_BOOL bAutoMode;
   1399     OMX_S32 nImageEnhancement;
   1400 } QOMX_IMAGEENHANCEMENTTYPE;
   1401 
   1402 /*
   1403  * these are part of OMX1.2 but JB MR2 branch doesn't have them defined
   1404  * OMX_IndexParamInterlaceFormat
   1405  * OMX_INTERLACEFORMATTYPE
   1406  */
   1407 #ifndef OMX_IndexParamInterlaceFormat
   1408 #define OMX_IndexParamInterlaceFormat (0x7FF00000)
   1409 typedef struct OMX_INTERLACEFORMATTYPE {
   1410     OMX_U32 nSize;
   1411     OMX_VERSIONTYPE nVersion;
   1412     OMX_U32 nPortIndex;
   1413     OMX_U32 nFormat;
   1414     OMX_TICKS nTimeStamp;
   1415 } OMX_INTERLACEFORMATTYPE;
   1416 #endif
   1417 
   1418 /**
   1419  * This structure is used to indicate the maximum number of buffers
   1420  * that a port will hold during data flow.
   1421  *
   1422  * STRUCT MEMBERS:
   1423  *  nSize              : Size of the structure in bytes
   1424  *  nVersion           : OMX specification version info
   1425  *  nPortIndex         : Port that this structure applies to
   1426  *  nHeldBufferCount   : Read-only, maximum number of buffers that will be held
   1427  */
   1428 typedef struct QOMX_HELDBUFFERCOUNTTYPE {
   1429     OMX_U32 nSize;
   1430     OMX_VERSIONTYPE nVersion;
   1431     OMX_U32 nPortIndex;
   1432     OMX_U32 nHeldBufferCount;
   1433 } QOMX_HELDBUFFERCOUNTTYPE;
   1434 
   1435 typedef enum QOMX_VIDEO_HIERARCHICALCODINGTYPE {
   1436     QOMX_HIERARCHICALCODING_P = 0x01,
   1437     QOMX_HIERARCHICALCODING_B = 0x02,
   1438 } QOMX_VIDEO_HIERARCHICALCODINGTYPE;
   1439 
   1440 typedef struct QOMX_VIDEO_HIERARCHICALLAYERS {
   1441     OMX_U32 nSize;
   1442     OMX_VERSIONTYPE nVersion;
   1443     OMX_U32 nPortIndex;
   1444     OMX_U32 nNumLayers;
   1445     QOMX_VIDEO_HIERARCHICALCODINGTYPE eHierarchicalCodingType;
   1446 } QOMX_VIDEO_HIERARCHICALLAYERS;
   1447 
   1448 
   1449 #ifdef __cplusplus
   1450 }
   1451 #endif /* __cplusplus */
   1452 
   1453 #endif /* __OMX_QCOM_EXTENSIONS_H__ */
   1454