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