Home | History | Annotate | Download | only in inc
      1 /*--------------------------------------------------------------------------
      2 Copyright (c) 2009-2013, 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 OMX_QCOM_PORTDEFN_EXTN   "OMX.QCOM.index.param.portdefn"
    102 /* Allowed APIs on the above Index: OMX_GetParameter() and OMX_SetParameter() */
    103 
    104 typedef enum OMX_QCOMMemoryRegion
    105 {
    106     OMX_QCOM_MemRegionInvalid,
    107     OMX_QCOM_MemRegionEBI1,
    108     OMX_QCOM_MemRegionSMI,
    109     OMX_QCOM_MemRegionMax = 0X7FFFFFFF
    110 } OMX_QCOMMemoryRegion;
    111 
    112 typedef enum OMX_QCOMCacheAttr
    113 {
    114     OMX_QCOM_CacheAttrNone,
    115     OMX_QCOM_CacheAttrWriteBack,
    116     OMX_QCOM_CacheAttrWriteThrough,
    117     OMX_QCOM_CacheAttrMAX = 0X7FFFFFFF
    118 } OMX_QCOMCacheAttr;
    119 
    120 typedef struct OMX_QCOMRectangle
    121 {
    122    OMX_S32 x;
    123    OMX_S32 y;
    124    OMX_S32 dx;
    125    OMX_S32 dy;
    126 } OMX_QCOMRectangle;
    127 
    128 /** OMX_QCOMFramePackingFormat
    129   * Input or output buffer format
    130   */
    131 typedef enum OMX_QCOMFramePackingFormat
    132 {
    133   /* 0 - unspecified
    134    */
    135   OMX_QCOM_FramePacking_Unspecified,
    136 
    137   /*  1 - Partial frames may be present OMX IL 1.1.1 Figure 2-10:
    138    *  Case 1??Each Buffer Filled In Whole or In Part
    139    */
    140   OMX_QCOM_FramePacking_Arbitrary,
    141 
    142   /*  2 - Multiple complete frames per buffer (integer number)
    143    *  OMX IL 1.1.1 Figure 2-11: Case 2Each Buffer Filled with
    144    *  Only Complete Frames of Data
    145    */
    146   OMX_QCOM_FramePacking_CompleteFrames,
    147 
    148   /*  3 - Only one complete frame per buffer, no partial frame
    149    *  OMX IL 1.1.1 Figure 2-12: Case 3Each Buffer Filled with
    150    *  Only One Frame of Compressed Data. Usually at least one
    151    *  complete unit of data will be delivered in a buffer for
    152    *  uncompressed data formats.
    153    */
    154   OMX_QCOM_FramePacking_OnlyOneCompleteFrame,
    155 
    156   /*  4 - Only one complete subframe per buffer, no partial subframe
    157    *  Example: In H264, one complete NAL per buffer, where one frame
    158    *  can contatin multiple NAL
    159    */
    160   OMX_QCOM_FramePacking_OnlyOneCompleteSubFrame,
    161 
    162   OMX_QCOM_FramePacking_MAX = 0X7FFFFFFF
    163 } OMX_QCOMFramePackingFormat;
    164 
    165 typedef struct OMX_QCOM_PARAM_PORTDEFINITIONTYPE {
    166  OMX_U32 nSize;           /** Size of the structure in bytes */
    167  OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    168  OMX_U32 nPortIndex;    /** Portindex which is extended by this structure */
    169 
    170  /** Platform specific memory region EBI1, SMI, etc.,*/
    171  OMX_QCOMMemoryRegion nMemRegion;
    172 
    173  OMX_QCOMCacheAttr nCacheAttr; /** Cache attributes */
    174 
    175  /** Input or output buffer format */
    176  OMX_U32 nFramePackingFormat;
    177 
    178 } OMX_QCOM_PARAM_PORTDEFINITIONTYPE;
    179 
    180 typedef struct OMX_QCOM_VIDEO_PARAM_QPRANGETYPE {
    181     OMX_U32 nSize;
    182     OMX_VERSIONTYPE nVersion;
    183     OMX_U32 nPortIndex;
    184     OMX_U32 minQP;
    185     OMX_U32 maxQP;
    186 } OMX_QCOM_VIDEO_PARAM_QPRANGETYPE;
    187 
    188 #define OMX_QCOM_PLATFORMPVT_EXTN   "OMX.QCOM.index.param.platformprivate"
    189 /** Allowed APIs on the above Index: OMX_SetParameter() */
    190 
    191 typedef enum OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE
    192 {
    193     /** Enum for PMEM information */
    194     OMX_QCOM_PLATFORM_PRIVATE_PMEM = 0x1
    195 } OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE;
    196 
    197 /** IL client will set the following structure. A failure
    198  *  code will be returned if component does not support the
    199  *  value provided for 'type'.
    200  */
    201 struct OMX_QCOM_PLATFORMPRIVATE_EXTN
    202 {
    203     OMX_U32 nSize;        /** Size of the structure in bytes */
    204     OMX_VERSIONTYPE nVersion; /** OMX spec version information */
    205     OMX_U32 nPortIndex;  /** Port number on which usebuffer extn is applied */
    206 
    207     /** Type of extensions should match an entry from
    208      OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE
    209     */
    210     OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE type;
    211 };
    212 
    213 typedef struct OMX_QCOM_PLATFORM_PRIVATE_PMEM_INFO
    214 {
    215     /** pmem file descriptor */
    216     OMX_U32 pmem_fd;
    217     /** Offset from pmem device base address */
    218     OMX_U32 offset;
    219 }OMX_QCOM_PLATFORM_PRIVATE_PMEM_INFO;
    220 
    221 typedef struct OMX_QCOM_PLATFORM_PRIVATE_ENTRY
    222 {
    223     /** Entry type */
    224     OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE type;
    225 
    226     /** Pointer to platform specific entry */
    227     void* entry;
    228 }OMX_QCOM_PLATFORM_PRIVATE_ENTRY;
    229 
    230 typedef struct OMX_QCOM_PLATFORM_PRIVATE_LIST
    231 {
    232     /** Number of entries */
    233     OMX_U32 nEntries;
    234 
    235     /** Pointer to array of platform specific entries *
    236      * Contiguous block of OMX_QCOM_PLATFORM_PRIVATE_ENTRY element
    237     */
    238     OMX_QCOM_PLATFORM_PRIVATE_ENTRY* entryList;
    239 }OMX_QCOM_PLATFORM_PRIVATE_LIST;
    240 
    241 #define OMX_QCOM_FRAME_PACKING_FORMAT   "OMX.QCOM.index.param.framepackfmt"
    242 /* Allowed API call: OMX_GetParameter() */
    243 /* IL client can use this index to rerieve the list of frame formats *
    244  * supported by the component */
    245 
    246 typedef struct OMX_QCOM_FRAME_PACKINGFORMAT_TYPE {
    247     OMX_U32 nSize;
    248     OMX_VERSIONTYPE nVersion;
    249     OMX_U32 nPortIndex;
    250     OMX_U32 nIndex;
    251     OMX_QCOMFramePackingFormat eframePackingFormat;
    252 } OMX_QCOM_FRAME_PACKINGFORMAT_TYPE;
    253 
    254 
    255 /**
    256  * Following is the enum for color formats supported on Qualcomm
    257  * MSMs YVU420SemiPlanar color format is not defined in OpenMAX
    258  * 1.1.1 and prior versions of OpenMAX specification.
    259  */
    260 
    261 enum OMX_QCOM_COLOR_FORMATTYPE
    262 {
    263 
    264 /** YVU420SemiPlanar: YVU planar format, organized with a first
    265  *  plane containing Y pixels, and a second plane containing
    266  *  interleaved V and U pixels. V and U pixels are sub-sampled
    267  *  by a factor of two both horizontally and vertically.
    268  */
    269     QOMX_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00,
    270     QOMX_COLOR_FormatYVU420PackedSemiPlanar32m4ka,
    271     QOMX_COLOR_FormatYUV420PackedSemiPlanar16m2ka,
    272     QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka,
    273     QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m,
    274     QOMX_COLOR_FormatAndroidOpaque = (OMX_COLOR_FORMATTYPE) OMX_COLOR_FormatVendorStartUnused  + 0x789,
    275 };
    276 
    277 enum OMX_QCOM_VIDEO_CODINGTYPE
    278 {
    279 /** Codecs support by qualcomm which are not listed in OMX 1.1.x
    280  *  spec
    281  *   */
    282     OMX_QCOM_VIDEO_CodingVC1  = 0x7FA30C00 ,
    283     OMX_QCOM_VIDEO_CodingWMV9 = 0x7FA30C01,
    284     QOMX_VIDEO_CodingDivx = 0x7FA30C02,     /**< Value when coding is Divx */
    285     QOMX_VIDEO_CodingSpark = 0x7FA30C03,     /**< Value when coding is Sorenson Spark */
    286     QOMX_VIDEO_CodingVp = 0x7FA30C04,
    287     QOMX_VIDEO_CodingVp8 = 0x7FA30C05,
    288     QOMX_VIDEO_CodingHevc = 0x7FA30C06
    289 };
    290 
    291 enum OMX_QCOM_EXTN_INDEXTYPE
    292 {
    293     /** Qcom proprietary extension index list */
    294 
    295     /* "OMX.QCOM.index.param.register_mmap" */
    296     OMX_QcomIndexRegmmap = 0x7F000000,
    297 
    298     /* "OMX.QCOM.index.param.platformprivate" */
    299     OMX_QcomIndexPlatformPvt = 0x7F000001,
    300 
    301     /* "OMX.QCOM.index.param.portdefn" */
    302     OMX_QcomIndexPortDefn = 0x7F000002,
    303 
    304     /* "OMX.QCOM.index.param.framepackingformat" */
    305     OMX_QcomIndexPortFramePackFmt = 0x7F000003,
    306 
    307     /*"OMX.QCOM.index.param.Interlaced */
    308     OMX_QcomIndexParamInterlaced = 0x7F000004,
    309 
    310     /*"OMX.QCOM.index.config.interlaceformat */
    311     OMX_QcomIndexConfigInterlaced = 0x7F000005,
    312 
    313     /*"OMX.QCOM.index.param.syntaxhdr" */
    314     QOMX_IndexParamVideoSyntaxHdr = 0x7F000006,
    315 
    316     /*"OMX.QCOM.index.config.intraperiod" */
    317     QOMX_IndexConfigVideoIntraperiod = 0x7F000007,
    318 
    319     /*"OMX.QCOM.index.config.randomIntrarefresh" */
    320     QOMX_IndexConfigVideoIntraRefresh = 0x7F000008,
    321 
    322     /*"OMX.QCOM.index.config.video.TemporalSpatialTradeOff" */
    323     QOMX_IndexConfigVideoTemporalSpatialTradeOff = 0x7F000009,
    324 
    325     /*"OMX.QCOM.index.param.video.EncoderMode" */
    326     QOMX_IndexParamVideoEncoderMode = 0x7F00000A,
    327 
    328     /*"OMX.QCOM.index.param.Divxtype */
    329     OMX_QcomIndexParamVideoDivx = 0x7F00000B,
    330 
    331     /*"OMX.QCOM.index.param.Sparktype */
    332     OMX_QcomIndexParamVideoSpark = 0x7F00000C,
    333 
    334     /*"OMX.QCOM.index.param.Vptype */
    335     OMX_QcomIndexParamVideoVp = 0x7F00000D,
    336 
    337     OMX_QcomIndexQueryNumberOfVideoDecInstance = 0x7F00000E,
    338 
    339     OMX_QcomIndexParamVideoSyncFrameDecodingMode = 0x7F00000F,
    340 
    341     OMX_QcomIndexParamVideoDecoderPictureOrder = 0x7F000010,
    342 
    343     OMX_QcomIndexConfigVideoFramePackingArrangement = 0x7F000011,
    344 
    345     OMX_QcomIndexParamConcealMBMapExtraData = 0x7F000012,
    346 
    347     OMX_QcomIndexParamFrameInfoExtraData = 0x7F000013,
    348 
    349     OMX_QcomIndexParamInterlaceExtraData = 0x7F000014,
    350 
    351     OMX_QcomIndexParamH264TimeInfo = 0x7F000015,
    352 
    353     OMX_QcomIndexParamIndexExtraDataType = 0x7F000016,
    354 
    355     OMX_GoogleAndroidIndexEnableAndroidNativeBuffers = 0x7F000017,
    356 
    357     OMX_GoogleAndroidIndexUseAndroidNativeBuffer = 0x7F000018,
    358 
    359     OMX_GoogleAndroidIndexGetAndroidNativeBufferUsage = 0x7F000019,
    360 
    361     /*"OMX.QCOM.index.config.video.QPRange" */
    362     OMX_QcomIndexConfigVideoQPRange = 0x7F00001A,
    363 
    364     /*"OMX.QCOM.index.param.EnableTimeStampReoder"*/
    365     OMX_QcomIndexParamEnableTimeStampReorder = 0x7F00001B,
    366 
    367     /*"OMX.google.android.index.storeMetaDataInBuffers"*/
    368     OMX_QcomIndexParamVideoMetaBufferMode = 0x7F00001C,
    369 
    370     /*"OMX.google.android.index.useAndroidNativeBuffer2"*/
    371     OMX_GoogleAndroidIndexUseAndroidNativeBuffer2 = 0x7F00001D,
    372 
    373     /*"OMX.QCOM.index.param.VideoMaxAllowedBitrateCheck"*/
    374     OMX_QcomIndexParamVideoMaxAllowedBitrateCheck = 0x7F00001E,
    375 
    376     OMX_QcomIndexEnableSliceDeliveryMode = 0x7F00001F,
    377 
    378     OMX_QcomIndexEnableExtnUserData = 0x7F000020,
    379 
    380     /*"OMX.QCOM.index.param.video.EnableSmoothStreaming"*/
    381     OMX_QcomIndexParamEnableSmoothStreaming = 0x7F000021,
    382 
    383     /*"OMX.QCOM.index.param.video.QPRange" */
    384     OMX_QcomIndexParamVideoQPRange = 0x7F000022,
    385 
    386     OMX_QcomIndexEnableH263PlusPType = 0x7F000023,
    387 
    388     /*"OMX.QCOM.index.param.video.LTRCountRangeSupported"*/
    389     QOMX_IndexParamVideoLTRCountRangeSupported = 0x7F000024,
    390 
    391     /*"OMX.QCOM.index.param.video.LTRMode"*/
    392     QOMX_IndexParamVideoLTRMode = 0x7F000025,
    393 
    394     /*"OMX.QCOM.index.param.video.LTRCount"*/
    395     QOMX_IndexParamVideoLTRCount = 0x7F000026,
    396 
    397     /*"OMX.QCOM.index.config.video.LTRPeriod"*/
    398     QOMX_IndexConfigVideoLTRPeriod = 0x7F000027,
    399 
    400     /*"OMX.QCOM.index.config.video.LTRUse"*/
    401     QOMX_IndexConfigVideoLTRUse = 0x7F000028,
    402 
    403     /*"OMX.QCOM.index.config.video.LTRMark"*/
    404     QOMX_IndexConfigVideoLTRMark = 0x7F000029,
    405 
    406     OMX_QcomIndexParamSequenceHeaderWithIDR = 0x7F00002A,
    407 
    408     OMX_QcomIndexParamEnableVUIStreamRestrictFlag = 0x7F00002B,
    409 
    410     OMX_GoogleAndroidIndexPrepareForAdaptivePlayback = 0x7F00002C,
    411 };
    412 
    413 /**
    414  * Extension index parameter.  This structure is used to enable
    415  * vendor specific extension on input/output port and
    416  * to pass the required flags and data, if any.
    417  * The format of flags and data being passed is known to
    418  * the client and component apriori.
    419  *
    420  * STRUCT MEMBERS:
    421  *  nSize              : Size of Structure plus pData size
    422  *  nVersion           : OMX specification version information
    423  *  nPortIndex         : Indicates which port to set
    424  *  bEnable            : Extension index enable (1) or disable (0)
    425  *  nFlags             : Extension index flags, if any
    426  *  nDataSize          : Size of the extension index data to follow
    427  *  pData              : Extension index data, if present.
    428  */
    429 typedef struct QOMX_EXTNINDEX_PARAMTYPE {
    430     OMX_U32 nSize;
    431     OMX_VERSIONTYPE nVersion;
    432     OMX_U32 nPortIndex;
    433     OMX_BOOL bEnable;
    434     OMX_U32 nFlags;
    435     OMX_U32 nDataSize;
    436     OMX_PTR pData;
    437 } QOMX_EXTNINDEX_PARAMTYPE;
    438 
    439 /**
    440  * Range index parameter.  This structure is used to enable
    441  * vendor specific extension on input/output port and
    442  * to pass the required minimum and maximum values
    443  *
    444  * STRUCT MEMBERS:
    445  *  nSize              : Size of Structure in bytes
    446  *  nVersion           : OpenMAX IL specification version information
    447  *  nPortIndex         : Index of the port to which this structure applies
    448  *  nMin               : Minimum value
    449  *  nMax               : Maximum value
    450  *  nSteSize           : Step size
    451  */
    452 typedef struct QOMX_EXTNINDEX_RANGETYPE {
    453     OMX_U32 nSize;
    454     OMX_VERSIONTYPE nVersion;
    455     OMX_U32 nPortIndex;
    456     OMX_S32 nMin;
    457     OMX_S32 nMax;
    458     OMX_S32 nStepSize;
    459 } QOMX_EXTNINDEX_RANGETYPE;
    460 
    461 /**
    462  *   Specifies LTR mode types.
    463  */
    464 typedef enum QOMX_VIDEO_LTRMODETYPE
    465 {
    466     QOMX_VIDEO_LTRMode_Disable    = 0x0, /**< LTR encoding is disabled */
    467     QOMX_VIDEO_LTRMode_Manual     = 0x1, /**< In this mode, IL client configures
    468                                            **  the encoder the LTR count and manually
    469                                            **  controls the marking and use of LTR
    470                                            **  frames during video encoding.
    471                                            */
    472     QOMX_VIDEO_LTRMode_Auto       = 0x2, /**< In this mode, IL client configures
    473                                            **  the encoder the LTR count and LTR
    474                                            **  period. The encoder marks LTR frames
    475                                            **  automatically based on the LTR period
    476                                            **  during video encoding. IL client controls
    477                                            **  the use of LTR frames.
    478                                            */
    479     QOMX_VIDEO_LTRMode_MAX    = 0x7FFFFFFF /** Maximum LTR Mode type */
    480 } QOMX_VIDEO_LTRMODETYPE;
    481 
    482 /**
    483  * LTR mode index parameter.  This structure is used
    484  * to enable vendor specific extension on output port
    485  * to pass the LTR mode information.
    486  *
    487  * STRUCT MEMBERS:
    488  *  nSize              : Size of Structure in bytes
    489  *  nVersion           : OpenMAX IL specification version information
    490  *  nPortIndex         : Index of the port to which this structure applies
    491  *  eLTRMode           : Specifies the LTR mode used in encoder
    492  */
    493 typedef struct QOMX_VIDEO_PARAM_LTRMODE_TYPE {
    494     OMX_U32 nSize;
    495     OMX_VERSIONTYPE nVersion;
    496     OMX_U32 nPortIndex;
    497     QOMX_VIDEO_LTRMODETYPE eLTRMode;
    498 } QOMX_VIDEO_PARAM_LTRMODE_TYPE;
    499 
    500 /**
    501  * LTR count index parameter.  This structure is used
    502  * to enable vendor specific extension on output port
    503  * to pass the LTR count information.
    504  *
    505  * STRUCT MEMBERS:
    506  *  nSize              : Size of Structure in bytes
    507  *  nVersion           : OpenMAX IL specification version information
    508  *  nPortIndex         : Index of the port to which this structure applies
    509  *  nCount             : Specifies the number of LTR frames stored in the
    510  *                       encoder component
    511  */
    512 typedef struct QOMX_VIDEO_PARAM_LTRCOUNT_TYPE {
    513     OMX_U32 nSize;
    514     OMX_VERSIONTYPE nVersion;
    515     OMX_U32 nPortIndex;
    516     OMX_U32 nCount;
    517 } QOMX_VIDEO_PARAM_LTRCOUNT_TYPE;
    518 
    519 /**
    520  * LTR period index parameter.  This structure is used
    521  * to enable vendor specific extension on output port
    522  * to pass the LTR period information.
    523  *
    524  * STRUCT MEMBERS:
    525  *  nSize              : Size of Structure in bytes
    526  *  nVersion           : OpenMAX IL specification version information
    527  *  nPortIndex         : Index of the port to which this structure applies
    528  *  nFrames            : Specifies the number of frames between two consecutive
    529  *                       LTR frames.
    530  */
    531 typedef struct QOMX_VIDEO_CONFIG_LTRPERIOD_TYPE {
    532     OMX_U32 nSize;
    533     OMX_VERSIONTYPE nVersion;
    534     OMX_U32 nPortIndex;
    535     OMX_U32 nFrames;
    536 } QOMX_VIDEO_CONFIG_LTRPERIOD_TYPE;
    537 
    538 /**
    539  * Marks the next encoded frame as an LTR frame.
    540  * STRUCT MEMBERS:
    541  *  nSize              : Size of Structure in bytes
    542  *  nVersion           : OpenMAX IL specification version information
    543  *  nPortIndex         : Index of the port to which this structure applies
    544  */
    545 typedef struct QOMX_VIDEO_CONFIG_LTRMARK_TYPE {
    546     OMX_U32 nSize;
    547     OMX_VERSIONTYPE nVersion;
    548     OMX_U32 nPortIndex;
    549 } QOMX_VIDEO_CONFIG_LTRMARK_TYPE;
    550 
    551 /**
    552  * Specifies an LTR frame to encode subsequent frames.
    553  * STRUCT MEMBERS:
    554  *  nSize              : Size of Structure in bytes
    555  *  nVersion           : OpenMAX IL specification version information
    556  *  nPortIndex         : Index of the port to which this structure applies
    557  *  nID                : Specifies the identifier of the LTR frame to be used
    558                          as reference frame for encoding subsequent frames.
    559  *  nFrames            : Specifies the number of subsequent frames to be
    560                          encoded using the LTR frame with its identifier
    561                          nID as reference frame. Short-term reference frames
    562                          will be used thereafter. The value of 0xFFFFFFFF
    563                          indicates that all subsequent frames will be
    564                          encodedusing this LTR frame as reference frame.
    565  */
    566 typedef struct QOMX_VIDEO_CONFIG_LTRUSE_TYPE {
    567     OMX_U32 nSize;
    568     OMX_VERSIONTYPE nVersion;
    569     OMX_U32 nPortIndex;
    570     OMX_U32 nID;
    571     OMX_U32 nFrames;
    572 } QOMX_VIDEO_CONFIG_LTRUSE_TYPE;
    573 
    574 /**
    575  * Enumeration used to define the video encoder modes
    576  *
    577  * ENUMS:
    578  *  EncoderModeDefault : Default video recording mode.
    579  *                       All encoder settings made through
    580  *                       OMX_SetParameter/OMX_SetConfig are applied. No
    581  *                       parameter is overridden.
    582  *  EncoderModeMMS : Video recording mode for MMS (Multimedia Messaging
    583  *                   Service). This mode is similar to EncoderModeDefault
    584  *                   except that here the Rate control mode is overridden
    585  *                   internally and set as a variant of variable bitrate with
    586  *                   variable frame rate. After this mode is set if the IL
    587  *                   client tries to set OMX_VIDEO_CONTROLRATETYPE via
    588  *                   OMX_IndexParamVideoBitrate that would be rejected. For
    589  *                   this, client should set mode back to EncoderModeDefault
    590  *                   first and then change OMX_VIDEO_CONTROLRATETYPE.
    591  */
    592 typedef enum QOMX_VIDEO_ENCODERMODETYPE
    593 {
    594     QOMX_VIDEO_EncoderModeDefault        = 0x00,
    595     QOMX_VIDEO_EncoderModeMMS            = 0x01,
    596     QOMX_VIDEO_EncoderModeMax            = 0x7FFFFFFF
    597 } QOMX_VIDEO_ENCODERMODETYPE;
    598 
    599 /**
    600  * This structure is used to set the video encoder mode.
    601  *
    602  * STRUCT MEMBERS:
    603  *  nSize      : Size of the structure in bytes
    604  *  nVersion   : OMX specification version info
    605  *  nPortIndex : Port that this structure applies to
    606  *  nMode : defines the video encoder mode
    607  */
    608 typedef struct QOMX_VIDEO_PARAM_ENCODERMODETYPE {
    609     OMX_U32 nSize;
    610     OMX_VERSIONTYPE nVersion;
    611     OMX_U32 nPortIndex;
    612     QOMX_VIDEO_ENCODERMODETYPE nMode;
    613 } QOMX_VIDEO_PARAM_ENCODERMODETYPE;
    614 
    615 /**
    616  * This structure describes the parameters corresponding to the
    617  * QOMX_VIDEO_SYNTAXHDRTYPE extension. This parameter can be queried
    618  * during the loaded state.
    619  */
    620 
    621 typedef struct QOMX_VIDEO_SYNTAXHDRTYPE
    622 {
    623    OMX_U32 nSize;           /** Size of the structure in bytes */
    624    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    625    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    626    OMX_U32 nBytes;    	    /** The number of bytes filled in to the buffer */
    627    OMX_U8 data[1];          /** Buffer to store the header information */
    628 } QOMX_VIDEO_SYNTAXHDRTYPE;
    629 
    630 /**
    631  * This structure describes the parameters corresponding to the
    632  * QOMX_VIDEO_TEMPORALSPATIALTYPE extension. This parameter can be set
    633  * dynamically during any state except the state invalid.  This is primarily
    634  * used for setting MaxQP from the application.  This is set on the out port.
    635  */
    636 
    637 typedef struct QOMX_VIDEO_TEMPORALSPATIALTYPE
    638 {
    639    OMX_U32 nSize;           /** Size of the structure in bytes */
    640    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    641    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    642    OMX_U32 nTSFactor;       /** Temoral spatial tradeoff factor value in 0-100 */
    643 } QOMX_VIDEO_TEMPORALSPATIALTYPE;
    644 
    645 /**
    646  * This structure describes the parameters corresponding to the
    647  * OMX_QCOM_VIDEO_CONFIG_INTRAPERIODTYPE extension. This parameter can be set
    648  * dynamically during any state except the state invalid.  This is set on the out port.
    649  */
    650 
    651 typedef struct QOMX_VIDEO_INTRAPERIODTYPE
    652 {
    653    OMX_U32 nSize;           /** Size of the structure in bytes */
    654    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    655    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    656    OMX_U32 nIDRPeriod;      /** This specifies coding a frame as IDR after every nPFrames
    657 			        of intra frames. If this parameter is set to 0, only the
    658 				first frame of the encode session is an IDR frame. This
    659 				field is ignored for non-AVC codecs and is used only for
    660 				codecs that support IDR Period */
    661    OMX_U32 nPFrames;         /** The number of "P" frames between two "I" frames */
    662    OMX_U32 nBFrames;         /** The number of "B" frames between two "I" frames */
    663 } QOMX_VIDEO_INTRAPERIODTYPE;
    664 
    665 /**
    666  * This structure describes the parameters corresponding to the
    667  * OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE extension. This parameter can be set
    668  * dynamically during any state except the state invalid. This is used for the buffer negotiation
    669  * with other clients.  This is set on the out port.
    670  */
    671 typedef struct OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE
    672 {
    673    OMX_U32 nSize;            /** Size of the structure in bytes */
    674    OMX_VERSIONTYPE nVersion; /** OMX specification version information */
    675    OMX_U32 nPortIndex;       /** Portindex which is extended by this structure */
    676    OMX_U32 nBufferOccupancy; /** The number of bytes to be set for the buffer occupancy */
    677 } OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE;
    678 
    679 /**
    680  * This structure describes the parameters corresponding to the
    681  * OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE extension. This parameter can be set
    682  * dynamically during any state except the state invalid. This is primarily used for the dynamic/random
    683  * intrarefresh.  This is set on the out port.
    684  */
    685 typedef struct OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE
    686 {
    687    OMX_U32 nSize;           /** Size of the structure in bytes */
    688    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    689    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    690    OMX_U32 nRirMBs;         /** The number of MBs to be set for intrarefresh */
    691 } OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE;
    692 
    693 
    694 /**
    695  * This structure describes the parameters corresponding to the
    696  * OMX_QCOM_VIDEO_CONFIG_QPRANGE extension. This parameter can be set
    697  * dynamically during any state except the state invalid. This is primarily
    698  * used for the min/max QP to be set from the application.  This
    699  * is set on the out port.
    700  */
    701 typedef struct OMX_QCOM_VIDEO_CONFIG_QPRANGE
    702 {
    703    OMX_U32 nSize;           /** Size of the structure in bytes */
    704    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    705    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    706    OMX_U32 nMinQP;          /** The number for minimum quantization parameter */
    707    OMX_U32 nMaxQP;          /** The number for maximum quantization parameter */
    708 } OMX_QCOM_VIDEO_CONFIG_QPRANGE;
    709 
    710 
    711 typedef struct OMX_VENDOR_EXTRADATATYPE  {
    712     OMX_U32 nPortIndex;
    713     OMX_U32 nDataSize;
    714     OMX_U8  *pData;     // cdata (codec_data/extradata)
    715 } OMX_VENDOR_EXTRADATATYPE;
    716 
    717 /**
    718  * This structure describes the parameters corresponding to the
    719  * OMX_VENDOR_VIDEOFRAMERATE extension. This parameter can be set
    720  * dynamically during any state except the state invalid. This is
    721  * used for frame rate to be set from the application. This
    722  * is set on the in port.
    723  */
    724 typedef struct OMX_VENDOR_VIDEOFRAMERATE  {
    725    OMX_U32 nSize;           /** Size of the structure in bytes */
    726    OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    727    OMX_U32 nPortIndex;      /** Portindex which is extended by this structure */
    728    OMX_U32 nFps;            /** Frame rate value */
    729    OMX_BOOL bEnabled;       /** Flag to enable or disable client's frame rate value */
    730 } OMX_VENDOR_VIDEOFRAMERATE;
    731 
    732 typedef enum OMX_INDEXVENDORTYPE {
    733     OMX_IndexVendorFileReadInputFilename = 0xFF000001,
    734     OMX_IndexVendorParser3gpInputFilename = 0xFF000002,
    735     OMX_IndexVendorVideoExtraData = 0xFF000003,
    736     OMX_IndexVendorAudioExtraData = 0xFF000004,
    737     OMX_IndexVendorVideoFrameRate = 0xFF000005,
    738 } OMX_INDEXVENDORTYPE;
    739 
    740 typedef enum OMX_QCOM_VC1RESOLUTIONTYPE
    741 {
    742    OMX_QCOM_VC1_PICTURE_RES_1x1,
    743    OMX_QCOM_VC1_PICTURE_RES_2x1,
    744    OMX_QCOM_VC1_PICTURE_RES_1x2,
    745    OMX_QCOM_VC1_PICTURE_RES_2x2
    746 } OMX_QCOM_VC1RESOLUTIONTYPE;
    747 
    748 typedef enum OMX_QCOM_INTERLACETYPE
    749 {
    750     OMX_QCOM_InterlaceFrameProgressive,
    751     OMX_QCOM_InterlaceInterleaveFrameTopFieldFirst,
    752     OMX_QCOM_InterlaceInterleaveFrameBottomFieldFirst,
    753     OMX_QCOM_InterlaceFrameTopFieldFirst,
    754     OMX_QCOM_InterlaceFrameBottomFieldFirst,
    755     OMX_QCOM_InterlaceFieldTop,
    756     OMX_QCOM_InterlaceFieldBottom
    757 }OMX_QCOM_INTERLACETYPE;
    758 
    759 typedef struct OMX_QCOM_PARAM_VIDEO_INTERLACETYPE
    760 {
    761     OMX_U32 nSize;           /** Size of the structure in bytes */
    762     OMX_VERSIONTYPE nVersion;/** OMX specification version information */
    763     OMX_U32 nPortIndex;    /** Portindex which is extended by this structure */
    764     OMX_BOOL bInterlace;  /** Interlace content **/
    765 }OMX_QCOM_PARAM_VIDEO_INTERLACETYPE;
    766 
    767 typedef struct OMX_QCOM_CONFIG_INTERLACETYPE
    768 {
    769     OMX_U32 nSize;
    770     OMX_VERSIONTYPE nVersion;
    771     OMX_U32 nPortIndex;
    772     OMX_U32 nIndex;
    773     OMX_QCOM_INTERLACETYPE eInterlaceType;
    774 }OMX_QCOM_CONFIG_INTERLACETYPE;
    775 
    776 #define MAX_PAN_SCAN_WINDOWS 4
    777 
    778 typedef struct OMX_QCOM_PANSCAN
    779 {
    780    OMX_U32 numWindows;
    781    OMX_QCOMRectangle window[MAX_PAN_SCAN_WINDOWS];
    782 } OMX_QCOM_PANSCAN;
    783 
    784 typedef struct OMX_QCOM_ASPECT_RATIO
    785 {
    786    OMX_U32 aspectRatioX;
    787    OMX_U32 aspectRatioY;
    788 } OMX_QCOM_ASPECT_RATIO;
    789 
    790 typedef struct OMX_QCOM_DISPLAY_ASPECT_RATIO
    791 {
    792    OMX_U32 displayVerticalSize;
    793    OMX_U32 displayHorizontalSize;
    794 } OMX_QCOM_DISPLAY_ASPECT_RATIO;
    795 
    796 typedef struct OMX_QCOM_FRAME_PACK_ARRANGEMENT
    797 {
    798   OMX_U32 nSize;
    799   OMX_VERSIONTYPE nVersion;
    800   OMX_U32 nPortIndex;
    801   OMX_U32 id;
    802   OMX_U32 cancel_flag;
    803   OMX_U32 type;
    804   OMX_U32 quincunx_sampling_flag;
    805   OMX_U32 content_interpretation_type;
    806   OMX_U32 spatial_flipping_flag;
    807   OMX_U32 frame0_flipped_flag;
    808   OMX_U32 field_views_flag;
    809   OMX_U32 current_frame_is_frame0_flag;
    810   OMX_U32 frame0_self_contained_flag;
    811   OMX_U32 frame1_self_contained_flag;
    812   OMX_U32 frame0_grid_position_x;
    813   OMX_U32 frame0_grid_position_y;
    814   OMX_U32 frame1_grid_position_x;
    815   OMX_U32 frame1_grid_position_y;
    816   OMX_U32 reserved_byte;
    817   OMX_U32 repetition_period;
    818   OMX_U32 extension_flag;
    819 } OMX_QCOM_FRAME_PACK_ARRANGEMENT;
    820 
    821 typedef struct OMX_QCOM_EXTRADATA_FRAMEINFO
    822 {
    823    // common frame meta data. interlace related info removed
    824    OMX_VIDEO_PICTURETYPE  ePicType;
    825    OMX_QCOM_INTERLACETYPE interlaceType;
    826    OMX_QCOM_PANSCAN       panScan;
    827    OMX_QCOM_ASPECT_RATIO  aspectRatio;
    828    OMX_QCOM_DISPLAY_ASPECT_RATIO displayAspectRatio;
    829    OMX_U32                nConcealedMacroblocks;
    830    OMX_U32                nFrameRate;
    831 } OMX_QCOM_EXTRADATA_FRAMEINFO;
    832 
    833 typedef struct OMX_QCOM_EXTRADATA_FRAMEDIMENSION
    834 {
    835    /** Frame Dimensions added to each YUV buffer */
    836    OMX_U32   nDecWidth;  /** Width  rounded to multiple of 16 */
    837    OMX_U32   nDecHeight; /** Height rounded to multiple of 16 */
    838    OMX_U32   nActualWidth; /** Actual Frame Width */
    839    OMX_U32   nActualHeight; /** Actual Frame Height */
    840 
    841 }OMX_QCOM_EXTRADATA_FRAMEDIMENSION;
    842 
    843 typedef struct OMX_QCOM_H264EXTRADATA
    844 {
    845    OMX_U64 seiTimeStamp;
    846 } OMX_QCOM_H264EXTRADATA;
    847 
    848 typedef struct OMX_QCOM_VC1EXTRADATA
    849 {
    850    OMX_U32                     nVC1RangeY;
    851    OMX_U32                     nVC1RangeUV;
    852    OMX_QCOM_VC1RESOLUTIONTYPE eVC1PicResolution;
    853 } OMX_QCOM_VC1EXTRADATA;
    854 
    855 typedef union OMX_QCOM_EXTRADATA_CODEC_DATA
    856 {
    857    OMX_QCOM_H264EXTRADATA h264ExtraData;
    858    OMX_QCOM_VC1EXTRADATA vc1ExtraData;
    859 } OMX_QCOM_EXTRADATA_CODEC_DATA;
    860 
    861 typedef enum OMX_QCOM_EXTRADATATYPE
    862 {
    863    OMX_ExtraDataFrameInfo = 0x7F000001,
    864    OMX_ExtraDataH264 = 0x7F000002,
    865    OMX_ExtraDataVC1 = 0x7F000003,
    866    OMX_ExtraDataFrameDimension = 0x7F000004,
    867    OMX_ExtraDataVideoEncoderSliceInfo = 0x7F000005,
    868    OMX_ExtraDataConcealMB = 0x7F000006,
    869    OMX_ExtraDataInterlaceFormat = 0x7F000007,
    870    OMX_ExtraDataPortDef = 0x7F000008,
    871    OMX_ExtraDataMP2ExtnData = 0x7F000009,
    872    OMX_ExtraDataMP2UserData = 0x7F00000a,
    873    OMX_ExtraDataVideoLTRInfo = 0x7F00000b,
    874 } OMX_QCOM_EXTRADATATYPE;
    875 
    876 typedef struct  OMX_STREAMINTERLACEFORMATTYPE {
    877     OMX_U32 nSize;
    878     OMX_VERSIONTYPE nVersion;
    879     OMX_U32 nPortIndex;
    880     OMX_BOOL bInterlaceFormat;
    881     OMX_U32 nInterlaceFormats;
    882 } OMX_STREAMINTERLACEFORMAT;
    883 
    884 typedef enum OMX_INTERLACETYPE
    885 {
    886    OMX_InterlaceFrameProgressive,
    887    OMX_InterlaceInterleaveFrameTopFieldFirst,
    888    OMX_InterlaceInterleaveFrameBottomFieldFirst,
    889    OMX_InterlaceFrameTopFieldFirst,
    890    OMX_InterlaceFrameBottomFieldFirst
    891 }OMX_INTERLACEs;
    892 
    893 
    894 #define OMX_EXTRADATA_HEADER_SIZE 20
    895 
    896 /**
    897  * DivX Versions
    898  */
    899 typedef enum  QOMX_VIDEO_DIVXFORMATTYPE {
    900     QOMX_VIDEO_DIVXFormatUnused = 0x01, /**< Format unused or unknown */
    901     QOMX_VIDEO_DIVXFormat311    = 0x02, /**< DivX 3.11 */
    902     QOMX_VIDEO_DIVXFormat4      = 0x04, /**< DivX 4 */
    903     QOMX_VIDEO_DIVXFormat5      = 0x08, /**< DivX 5 */
    904     QOMX_VIDEO_DIVXFormat6      = 0x10, /**< DivX 6 */
    905     QOMX_VIDEO_DIVXFormatKhronosExtensions = 0x6F000000,
    906     QOMX_VIDEO_DIVXFormatVendorStartUnused = 0x7F000000,
    907     QOMX_VIDEO_DIVXFormatMax = 0x7FFFFFFF
    908 } QOMX_VIDEO_DIVXFORMATTYPE;
    909 
    910 /**
    911  * DivX profile types, each profile indicates support for
    912  * various performance bounds.
    913  */
    914 typedef enum QOMX_VIDEO_DIVXPROFILETYPE {
    915     QOMX_VIDEO_DivXProfileqMobile = 0x01, /**< qMobile Profile */
    916     QOMX_VIDEO_DivXProfileMobile  = 0x02, /**< Mobile Profile */
    917     QOMX_VIDEO_DivXProfileMT      = 0x04, /**< Mobile Theatre Profile */
    918     QOMX_VIDEO_DivXProfileHT      = 0x08, /**< Home Theatre Profile */
    919     QOMX_VIDEO_DivXProfileHD      = 0x10, /**< High Definition Profile */
    920     QOMX_VIDEO_DIVXProfileKhronosExtensions = 0x6F000000,
    921     QOMX_VIDEO_DIVXProfileVendorStartUnused = 0x7F000000,
    922     QOMX_VIDEO_DIVXProfileMax = 0x7FFFFFFF
    923 } QOMX_VIDEO_DIVXPROFILETYPE;
    924 
    925 /**
    926  * DivX Video Params
    927  *
    928  *  STRUCT MEMBERS:
    929  *  nSize      : Size of the structure in bytes
    930  *  nVersion   : OMX specification version information
    931  *  nPortIndex : Port that this structure applies to
    932  *  eFormat    : Version of DivX stream / data
    933  *  eProfile   : Profile of DivX stream / data
    934  */
    935 typedef struct QOMX_VIDEO_PARAM_DIVXTYPE {
    936     OMX_U32 nSize;
    937     OMX_VERSIONTYPE nVersion;
    938     OMX_U32 nPortIndex;
    939     QOMX_VIDEO_DIVXFORMATTYPE eFormat;
    940     QOMX_VIDEO_DIVXPROFILETYPE eProfile;
    941 } QOMX_VIDEO_PARAM_DIVXTYPE;
    942 
    943 
    944 
    945 /**
    946  *  VP Versions
    947  */
    948 typedef enum QOMX_VIDEO_VPFORMATTYPE {
    949     QOMX_VIDEO_VPFormatUnused = 0x01, /**< Format unused or unknown */
    950     QOMX_VIDEO_VPFormat6      = 0x02, /**< VP6 Video Format */
    951     QOMX_VIDEO_VPFormat7      = 0x04, /**< VP7 Video Format */
    952     QOMX_VIDEO_VPFormat8      = 0x08, /**< VP8 Video Format */
    953     QOMX_VIDEO_VPFormatKhronosExtensions = 0x6F000000,
    954     QOMX_VIDEO_VPFormatVendorStartUnused = 0x7F000000,
    955     QOMX_VIDEO_VPFormatMax = 0x7FFFFFFF
    956 } QOMX_VIDEO_VPFORMATTYPE;
    957 
    958 /**
    959  * VP profile types, each profile indicates support for various
    960  * encoding tools.
    961  */
    962 typedef enum QOMX_VIDEO_VPPROFILETYPE {
    963     QOMX_VIDEO_VPProfileSimple   = 0x01, /**< Simple Profile, applies to VP6 only */
    964     QOMX_VIDEO_VPProfileAdvanced = 0x02, /**< Advanced Profile, applies to VP6 only */
    965     QOMX_VIDEO_VPProfileVersion0 = 0x04, /**< Version 0, applies to VP7 and VP8 */
    966     QOMX_VIDEO_VPProfileVersion1 = 0x08, /**< Version 1, applies to VP7 and VP8 */
    967     QOMX_VIDEO_VPProfileVersion2 = 0x10, /**< Version 2, applies to VP8 only */
    968     QOMX_VIDEO_VPProfileVersion3 = 0x20, /**< Version 3, applies to VP8 only */
    969     QOMX_VIDEO_VPProfileKhronosExtensions = 0x6F000000,
    970     QOMX_VIDEO_VPProfileVendorStartUnused = 0x7F000000,
    971     QOMX_VIDEO_VPProfileMax = 0x7FFFFFFF
    972 } QOMX_VIDEO_VPPROFILETYPE;
    973 
    974 /**
    975  * VP Video Params
    976  *
    977  *  STRUCT MEMBERS:
    978  *  nSize      : Size of the structure in bytes
    979  *  nVersion   : OMX specification version information
    980  *  nPortIndex : Port that this structure applies to
    981  *  eFormat    : Format of VP stream / data
    982  *  eProfile   : Profile or Version of VP stream / data
    983  */
    984 typedef struct QOMX_VIDEO_PARAM_VPTYPE {
    985     OMX_U32 nSize;
    986     OMX_VERSIONTYPE nVersion;
    987     OMX_U32 nPortIndex;
    988     QOMX_VIDEO_VPFORMATTYPE eFormat;
    989     QOMX_VIDEO_VPPROFILETYPE eProfile;
    990 } QOMX_VIDEO_PARAM_VPTYPE;
    991 
    992 /**
    993  * Spark Versions
    994  */
    995 typedef enum QOMX_VIDEO_SPARKFORMATTYPE {
    996     QOMX_VIDEO_SparkFormatUnused = 0x01, /**< Format unused or unknown */
    997     QOMX_VIDEO_SparkFormat0      = 0x02, /**< Video Format Version 0 */
    998     QOMX_VIDEO_SparkFormat1      = 0x04, /**< Video Format Version 1 */
    999     QOMX_VIDEO_SparkFormatKhronosExtensions = 0x6F000000,
   1000     QOMX_VIDEO_SparkFormatVendorStartUnused = 0x7F000000,
   1001     QOMX_VIDEO_SparkFormatMax = 0x7FFFFFFF
   1002 } QOMX_VIDEO_SPARKFORMATTYPE;
   1003 
   1004 /**
   1005  * Spark Video Params
   1006  *
   1007  *  STRUCT MEMBERS:
   1008  *  nSize      : Size of the structure in bytes
   1009  *  nVersion   : OMX specification version information
   1010  *  nPortIndex : Port that this structure applies to
   1011  *  eFormat    : Version of Spark stream / data
   1012  */
   1013 typedef struct QOMX_VIDEO_PARAM_SPARKTYPE {
   1014     OMX_U32 nSize;
   1015     OMX_VERSIONTYPE nVersion;
   1016     OMX_U32 nPortIndex;
   1017     QOMX_VIDEO_SPARKFORMATTYPE eFormat;
   1018 } QOMX_VIDEO_PARAM_SPARKTYPE;
   1019 
   1020 
   1021 typedef struct QOMX_VIDEO_QUERY_DECODER_INSTANCES {
   1022     OMX_U32 nSize;
   1023     OMX_VERSIONTYPE nVersion;
   1024     OMX_U32 nPortIndex;
   1025     OMX_U32 nNumOfInstances;
   1026 } QOMX_VIDEO_QUERY_DECODER_INSTANCES;
   1027 
   1028 typedef struct QOMX_ENABLETYPE {
   1029     OMX_BOOL bEnable;
   1030 } QOMX_ENABLETYPE;
   1031 
   1032 typedef enum QOMX_VIDEO_EVENTS {
   1033     OMX_EventIndexsettingChanged = OMX_EventVendorStartUnused
   1034 } QOMX_VIDEO_EVENTS;
   1035 
   1036 typedef enum QOMX_VIDEO_PICTURE_ORDER {
   1037     QOMX_VIDEO_DISPLAY_ORDER = 0x1,
   1038     QOMX_VIDEO_DECODE_ORDER = 0x2
   1039 } QOMX_VIDEO_PICTURE_ORDER;
   1040 
   1041 typedef struct QOMX_VIDEO_DECODER_PICTURE_ORDER {
   1042     OMX_U32 nSize;
   1043     OMX_VERSIONTYPE nVersion;
   1044     OMX_U32 nPortIndex;
   1045     QOMX_VIDEO_PICTURE_ORDER eOutputPictureOrder;
   1046 } QOMX_VIDEO_DECODER_PICTURE_ORDER;
   1047 
   1048 typedef struct QOMX_INDEXEXTRADATATYPE {
   1049     OMX_U32 nSize;
   1050     OMX_VERSIONTYPE nVersion;
   1051     OMX_U32 nPortIndex;
   1052     OMX_BOOL bEnabled;
   1053     OMX_INDEXTYPE nIndex;
   1054 } QOMX_INDEXEXTRADATATYPE;
   1055 
   1056 typedef struct QOMX_INDEXTIMESTAMPREORDER {
   1057 	OMX_U32 nSize;
   1058 	OMX_VERSIONTYPE nVersion;
   1059 	OMX_U32 nPortIndex;
   1060 	OMX_BOOL bEnable;
   1061 } QOMX_INDEXTIMESTAMPREORDER;
   1062 
   1063 #define OMX_QCOM_INDEX_PARAM_VIDEO_SYNCFRAMEDECODINGMODE "OMX.QCOM.index.param.video.SyncFrameDecodingMode"
   1064 #define OMX_QCOM_INDEX_PARAM_INDEXEXTRADATA "OMX.QCOM.index.param.IndexExtraData"
   1065 #define OMX_QCOM_INDEX_PARAM_VIDEO_SLICEDELIVERYMODE "OMX.QCOM.index.param.SliceDeliveryMode"
   1066 
   1067 typedef enum {
   1068     QOMX_VIDEO_FRAME_PACKING_CHECKERBOARD = 0,
   1069     QOMX_VIDEO_FRAME_PACKING_COLUMN_INTERLEAVE = 1,
   1070     QOMX_VIDEO_FRAME_PACKING_ROW_INTERLEAVE = 2,
   1071     QOMX_VIDEO_FRAME_PACKING_SIDE_BY_SIDE = 3,
   1072     QOMX_VIDEO_FRAME_PACKING_TOP_BOTTOM = 4,
   1073     QOMX_VIDEO_FRAME_PACKING_TEMPORAL = 5,
   1074 } QOMX_VIDEO_FRAME_PACKING_ARRANGEMENT;
   1075 
   1076 typedef enum {
   1077     QOMX_VIDEO_CONTENT_UNSPECIFIED = 0,
   1078     QOMX_VIDEO_CONTENT_LR_VIEW = 1,
   1079     QOMX_VIDEO_CONTENT_RL_VIEW = 2,
   1080 } QOMX_VIDEO_CONTENT_INTERPRETATION;
   1081 
   1082 // A pointer to this struct is passed to OMX_SetParameter when the extension
   1083 // index for the 'OMX.google.android.index.setVUIStreamRestrictFlag' extension
   1084 // is given.
   1085 typedef struct QOMX_VUI_BITSTREAM_RESTRICT {
   1086     OMX_U32 nSize;
   1087     OMX_VERSIONTYPE nVersion;
   1088     OMX_BOOL bEnable;
   1089 } QOMX_VUI_BITSTREAM_RESTRICT;
   1090 
   1091 /**
   1092  * Specifies the extended picture types. These values should be
   1093  * OR'd along with the types defined in OMX_VIDEO_PICTURETYPE to
   1094  * signal all pictures types which are allowed.
   1095  *
   1096  * ENUMS:
   1097  *  H.264 Specific Picture Types:   IDR
   1098  */
   1099 typedef enum QOMX_VIDEO_PICTURETYPE {
   1100     QOMX_VIDEO_PictureTypeIDR = OMX_VIDEO_PictureTypeVendorStartUnused + 0x1000
   1101 } QOMX_VIDEO_PICTURETYPE;
   1102 
   1103 #ifdef __cplusplus
   1104 }
   1105 #endif /* __cplusplus */
   1106 
   1107 #endif /* __OMX_QCOM_EXTENSIONS_H__ */
   1108