Home | History | Annotate | Download | only in inc
      1 /*--------------------------------------------------------------------------
      2 Copyright (c) 2011 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 
     29 #ifndef __H_QOMX_VIDEOEXTENSIONS_H__
     30 #define __H_QOMX_VIDEOEXTENSIONS_H__
     31 
     32 /*========================================================================
     33 
     34 *//** @file QOMX_VideoExtensions.h
     35 
     36 @par FILE SERVICES:
     37       Qualcomm extensions API for OpenMax IL Video.
     38 
     39       This file contains the description of the Qualcomm OpenMax IL
     40       video extention interface, through which the IL client and OpenMax
     41       components can access additional video capabilities.
     42 
     43 *//*====================================================================== */
     44 
     45 
     46 /*========================================================================== */
     47 
     48 /*========================================================================
     49 
     50                      INCLUDE FILES FOR MODULE
     51 
     52 ========================================================================== */
     53 #include <OMX_Core.h>
     54 #include <OMX_Video.h>
     55 
     56 /*========================================================================
     57 
     58                       DEFINITIONS AND DECLARATIONS
     59 
     60 ========================================================================== */
     61 
     62 #if defined( __cplusplus )
     63 extern "C"
     64 {
     65 #endif /* end of macro __cplusplus */
     66 
     67 /* Video extension strings */
     68 #define OMX_QCOM_INDEX_PARAM_VIDEO_SYNTAXHDR                "OMX.QCOM.index.param.video.SyntaxHdr"
     69 #define OMX_QCOM_INDEX_PARAM_VIDEO_ENCODERMODE              "OMX.QCOM.index.param.video.EncoderMode"
     70 #define OMX_QCOM_INDEX_CONFIG_VIDEO_INTRAREFRESH            "OMX.QCOM.index.config.video.IntraRefresh"
     71 #define OMX_QCOM_INDEX_CONFIG_VIDEO_INTRAPERIOD             "OMX.QCOM.index.config.video.IntraPeriod"
     72 #define OMX_QCOM_INDEX_CONFIG_VIDEO_TEMPORALSPATIALTRADEOFF "OMX.QCOM.index.config.video.TemporalSpatialTradeOff"
     73 #define OMX_QCOM_INDEX_CONFIG_VIDEO_MBCONCEALMENTREPORTING  "OMX.QCOM.index.config.video.MBConcealmentReporting"
     74 #define OMX_QCOM_INDEX_PARAM_VIDEO_EXTRADATAMULTISLICEINFO  "OMX.QCOM.index.param.video.ExtraDataMultiSliceInfo" /**< reference: QOMX_ENABLETYPE */
     75 #define OMX_QCOM_INDEX_CONFIG_VIDEO_FLOWSTATUS              "OMX.QCOM.index.config.video.FlowStatus"             /**< reference: QOMX_FLOWSTATUSTYPE */
     76 #define OMX_QCOM_INDEX_PARAM_VIDEO_PICTURETYPEDECODE        "OMX.QCOM.index.param.video.PictureTypeDecode"       /**< reference: QOMX_VIDEO_DECODEPICTURETYPE */
     77 #define OMX_QCOM_INDEX_PARAM_VIDEO_SAMPLEASPECTRATIO        "OMX.QCOM.index.param.video.SampleAspectRatio"       /**< reference: QOMX_VIDEO_SAMPLEASPECTRATIO */
     78 #define OMX_QCOM_INDEX_PARAM_VIDEO_EXTRADATALTRINFO         "OMX.QCOM.index.param.video.ExtraDataLTRInfo"        /**< reference: QOMX_ENABLETYPE */
     79 
     80 /* Video coding types */
     81 #define OMX_QCOM_INDEX_PARAM_VIDEO_DIVX                     "OMX.QCOM.index.param.video.DivX"
     82 #define OMX_QCOM_INDEX_PARAM_VIDEO_VP                       "OMX.QCOM.index.param.video.VP"
     83 #define OMX_QCOM_INDEX_PARAM_VIDEO_SPARK                    "OMX.QCOM.index.param.video.Spark"
     84 #define OMX_QCOM_INDEX_PARAM_VIDEO_VC1                      "OMX.QCOM.index.param.video.VC1"
     85 
     86 /**
     87  * Enumeration used to define the extended video compression
     88  * codings, not present in the OpenMax IL 1.1.2 specification.
     89  * NOTE:  This essentially refers to file extensions. If the
     90  *        coding is being used to specify the ENCODE type, then
     91  *        additional work must be done to configure the exact
     92  *        flavor of the compression to be used.
     93  */
     94 typedef enum QOMX_VIDEO_CODINGTYPE
     95 {
     96     QOMX_VIDEO_CodingDivX   = 0x7F000001, /**< all versions of DivX */
     97     QOMX_VIDEO_CodingVP     = 0x7F000002, /**< all versions of On2 VP codec */
     98     QOMX_VIDEO_CodingSpark  = 0x7F000003, /**< Sorenson Spark */
     99     QOMX_VIDEO_CodingVC1    = 0x7F000004, /**< VC-1 */
    100     QOMX_VIDEO_MPEG1        = 0x7F000005  /**< MPEG-1 */
    101 } QOMX_VIDEO_CODINGTYPE;
    102 
    103 /**
    104  * DivX Versions
    105  */
    106 typedef enum QOMX_VIDEO_DIVXFORMATTYPE {
    107     QOMX_VIDEO_DIVXFormatUnused = 0x01, /**< Format unused or unknown */
    108     QOMX_VIDEO_DIVXFormat311    = 0x02, /**< DivX 3.11 */
    109     QOMX_VIDEO_DIVXFormat4      = 0x04, /**< DivX 4 */
    110     QOMX_VIDEO_DIVXFormat5      = 0x08, /**< DivX 5 */
    111     QOMX_VIDEO_DIVXFormat6      = 0x10, /**< DivX 6 */
    112     QOMX_VIDEO_DIVXFormatKhronosExtensions = 0x6F000000,
    113     QOMX_VIDEO_DIVXFormatVendorStartUnused = 0x7F000000,
    114     QOMX_VIDEO_DIVXFormatMax = 0x7FFFFFFF
    115 } QOMX_VIDEO_DIVXFORMATTYPE;
    116 
    117 /**
    118  * DivX profile types, each profile indicates support for
    119  * various performance bounds.
    120  */
    121 typedef enum QOMX_VIDEO_DIVXPROFILETYPE {
    122     QOMX_VIDEO_DivXProfileqMobile = 0x01, /**< qMobile Profile */
    123     QOMX_VIDEO_DivXProfileMobile  = 0x02, /**< Mobile Profile */
    124     QOMX_VIDEO_DivXProfileMT      = 0x04, /**< Mobile Theatre Profile */
    125     QOMX_VIDEO_DivXProfileHT      = 0x08, /**< Home Theatre Profile */
    126     QOMX_VIDEO_DivXProfileHD      = 0x10, /**< High Definition Profile */
    127     QOMX_VIDEO_DIVXProfileKhronosExtensions = 0x6F000000,
    128     QOMX_VIDEO_DIVXProfileVendorStartUnused = 0x7F000000,
    129     QOMX_VIDEO_DIVXProfileMax = 0x7FFFFFFF
    130 } QOMX_VIDEO_DIVXPROFILETYPE;
    131 
    132 /**
    133  * DivX Video Params
    134  *
    135  *  STRUCT MEMBERS:
    136  *  nSize      : Size of the structure in bytes
    137  *  nVersion   : OMX specification version information
    138  *  nPortIndex : Port that this structure applies to
    139  *  eFormat    : Version of DivX stream / data
    140  *  eProfile   : Profile of DivX stream / data
    141  */
    142 typedef struct QOMX_VIDEO_PARAM_DIVXTYPE {
    143     OMX_U32 nSize;
    144     OMX_VERSIONTYPE nVersion;
    145     OMX_U32 nPortIndex;
    146     QOMX_VIDEO_DIVXFORMATTYPE eFormat;
    147     QOMX_VIDEO_DIVXPROFILETYPE eProfile;
    148 } QOMX_VIDEO_PARAM_DIVXTYPE;
    149 
    150 /**
    151  * VP Versions
    152  */
    153 typedef enum QOMX_VIDEO_VPFORMATTYPE {
    154     QOMX_VIDEO_VPFormatUnused = 0x01, /**< Format unused or unknown */
    155     QOMX_VIDEO_VPFormat6      = 0x02, /**< VP6 Video Format */
    156     QOMX_VIDEO_VPFormat7      = 0x04, /**< VP7 Video Format */
    157     QOMX_VIDEO_VPFormat8      = 0x08, /**< VP8 Video Format */
    158     QOMX_VIDEO_VPFormatKhronosExtensions = 0x6F000000,
    159     QOMX_VIDEO_VPFormatVendorStartUnused = 0x7F000000,
    160     QOMX_VIDEO_VPFormatMax = 0x7FFFFFFF
    161 } QOMX_VIDEO_VPFORMATTYPE;
    162 
    163 /**
    164  * VP profile types, each profile indicates support for various
    165  * encoding tools.
    166  */
    167 typedef enum QOMX_VIDEO_VPPROFILETYPE {
    168     QOMX_VIDEO_VPProfileSimple   = 0x01, /**< Simple Profile, applies to VP6 only */
    169     QOMX_VIDEO_VPProfileAdvanced = 0x02, /**< Advanced Profile, applies to VP6 only */
    170     QOMX_VIDEO_VPProfileVersion0 = 0x04, /**< Version 0, applies to VP7 and VP8 */
    171     QOMX_VIDEO_VPProfileVersion1 = 0x08, /**< Version 1, applies to VP7 and VP8 */
    172     QOMX_VIDEO_VPProfileVersion2 = 0x10, /**< Version 2, applies to VP8 only */
    173     QOMX_VIDEO_VPProfileVersion3 = 0x20, /**< Version 3, applies to VP8 only */
    174     QOMX_VIDEO_VPProfileKhronosExtensions = 0x6F000000,
    175     QOMX_VIDEO_VPProfileVendorStartUnused = 0x7F000000,
    176     QOMX_VIDEO_VPProfileMax = 0x7FFFFFFF
    177 } QOMX_VIDEO_VPPROFILETYPE;
    178 
    179 /**
    180  * VP Video Params
    181  *
    182  *  STRUCT MEMBERS:
    183  *  nSize      : Size of the structure in bytes
    184  *  nVersion   : OMX specification version information
    185  *  nPortIndex : Port that this structure applies to
    186  *  eFormat    : Format of VP stream / data
    187  *  eProfile   : Profile or Version of VP stream / data
    188  */
    189 typedef struct QOMX_VIDEO_PARAM_VPTYPE {
    190     OMX_U32 nSize;
    191     OMX_VERSIONTYPE nVersion;
    192     OMX_U32 nPortIndex;
    193     QOMX_VIDEO_VPFORMATTYPE eFormat;
    194     QOMX_VIDEO_VPPROFILETYPE eProfile;
    195 } QOMX_VIDEO_PARAM_VPTYPE;
    196 
    197 /**
    198  * Spark Versions
    199  */
    200 typedef enum QOMX_VIDEO_SPARKFORMATTYPE {
    201     QOMX_VIDEO_SparkFormatUnused = 0x01, /**< Format unused or unknown */
    202     QOMX_VIDEO_SparkFormat0      = 0x02, /**< Video Format Version 0 */
    203     QOMX_VIDEO_SparkFormat1      = 0x04, /**< Video Format Version 1 */
    204     QOMX_VIDEO_SparkFormatKhronosExtensions = 0x6F000000,
    205     QOMX_VIDEO_SparkFormatVendorStartUnused = 0x7F000000,
    206     QOMX_VIDEO_SparkFormatMax = 0x7FFFFFFF
    207 } QOMX_VIDEO_SPARKFORMATTYPE;
    208 
    209 /**
    210  * Spark Video Params
    211  *
    212  *  STRUCT MEMBERS:
    213  *  nSize      : Size of the structure in bytes
    214  *  nVersion   : OMX specification version information
    215  *  nPortIndex : Port that this structure applies to
    216  *  eFormat    : Version of Spark stream / data
    217  */
    218 typedef struct QOMX_VIDEO_PARAM_SPARKTYPE {
    219     OMX_U32 nSize;
    220     OMX_VERSIONTYPE nVersion;
    221     OMX_U32 nPortIndex;
    222     QOMX_VIDEO_SPARKFORMATTYPE eFormat;
    223 } QOMX_VIDEO_PARAM_SPARKTYPE;
    224 
    225 /**
    226  * VC-1 profile types, each profile indicates support for
    227  * various encoding tools.
    228  */
    229 typedef enum QOMX_VIDEO_VC1PROFILETYPE {
    230     QOMX_VIDEO_VC1ProfileSimple   = 0x01, /**< Simple Profile */
    231     QOMX_VIDEO_VC1ProfileMain     = 0x02, /**< Main Profile */
    232     QOMX_VIDEO_VC1ProfileAdvanced = 0x04, /**< Advanced Profile */
    233     QOMX_VIDEO_VC1ProfileKhronosExtensions = 0x6F000000,
    234     QOMX_VIDEO_VC1ProfileVendorStartUnused = 0x7F000000,
    235     QOMX_VIDEO_VC1ProfileMax = 0x7FFFFFFF
    236 } QOMX_VIDEO_VC1PROFILETYPE;
    237 
    238 /**
    239  * VC-1 level types, each level indicates support for various
    240  * performance bounds.
    241  */
    242 typedef enum QOMX_VIDEO_VC1LEVELTYPE {
    243     QOMX_VIDEO_VC1LevelLow    = 0x01, /**< Low Level, applies to simple and main profiles*/
    244     QOMX_VIDEO_VC1LevelMedium = 0x02, /**< Medium Level, applies to simple and main profiles */
    245     QOMX_VIDEO_VC1LevelHigh   = 0x04, /**< High Level, applies to main profile only */
    246     QOMX_VIDEO_VC1Level0      = 0x08, /**< Level 0, applies to advanced profile only */
    247     QOMX_VIDEO_VC1Level1      = 0x10, /**< Level 1, applies to advanced profile only */
    248     QOMX_VIDEO_VC1Level2      = 0x20, /**< Level 2, applies to advanced profile only */
    249     QOMX_VIDEO_VC1Level3      = 0x40, /**< Level 3, applies to advanced profile only */
    250     QOMX_VIDEO_VC1Level4      = 0x80, /**< Level 4, applies to advanced profile only */
    251     QOMX_VIDEO_VC1LevelKhronosExtensions = 0x6F000000,
    252     QOMX_VIDEO_VC1LevelVendorStartUnused = 0x7F000000,
    253     QOMX_VIDEO_VC1LevelMax = 0x7FFFFFFF
    254 } QOMX_VIDEO_VC1LEVELTYPE;
    255 
    256 /**
    257  * VC-1 Video Params
    258  *
    259  *  STRUCT MEMBERS:
    260  *  nSize      : Size of the structure in bytes
    261  *  nVersion   : OMX specification version information
    262  *  nPortIndex : Port that this structure applies to
    263  *  eProfile   : Profile of VC-1 stream / data
    264  *  eLevel     : Level of VC-1 stream / data
    265  */
    266 typedef struct QOMX_VIDEO_PARAM_VC1TYPE {
    267     OMX_U32 nSize;
    268     OMX_VERSIONTYPE nVersion;
    269     OMX_U32 nPortIndex;
    270     QOMX_VIDEO_VC1PROFILETYPE eProfile;
    271     QOMX_VIDEO_VC1LEVELTYPE eLevel;
    272 } QOMX_VIDEO_PARAM_VC1TYPE;
    273 
    274 /**
    275  * Extended MPEG-4 level types not defined in the OpenMax IL
    276  * 1.1.2 specification, each level indicates support for various
    277  * frame sizes, bit rates, decoder frame rates.
    278  */
    279 typedef enum QOMX_VIDEO_MPEG4LEVELTYPE {
    280     QOMX_VIDEO_MPEG4Level6 = 0x7F000001, /**< Level 6 */
    281     QOMX_VIDEO_MPEG4Level7 = 0x7F000002, /**< Level 7 */
    282     QOMX_VIDEO_MPEG4Level8 = 0x7F000003, /**< Level 8 */
    283     QOMX_VIDEO_MPEG4Level9 = 0x7F000004, /**< Level 9 */
    284     QOMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF
    285 } QOMX_VIDEO_MPEG4LEVELTYPE;
    286 
    287 /**
    288  * This structure is used in retrieving the syntax header from a
    289  * video encoder component, or setting the out of band syntax
    290  * header configuration data on a video decoder component.
    291  *
    292  * STRUCT MEMBERS:
    293  *  nSize      : Size of the structure in bytes
    294  *  nVersion   : OMX specification version info
    295  *  nPortIndex : Port that this structure applies to
    296  *  nBytes     : When used with OMX_GetParameter for the encoder
    297  *               component, it is a read-write field. When
    298  *               QOMX_VIDEO_SYNTAXHDRTYPE is passed in
    299  *               OMX_GetParameter this is the size of the buffer
    300  *               array pointed by data field. When the
    301  *               OMX_GetParameter call returns this is the
    302  *               amount of data within the buffer array.
    303  *
    304  *               The IL client needs to allocate the buffer
    305  *               array and then request for the syntax header.
    306  *               If the size of buffer array to allocate is
    307  *               unknown to the IL client, then it can call
    308  *               OMX_GetParamter with nBytes set to 0. In this
    309  *               case, when OMX_GetParameter returns, the nBytes
    310  *               field will be set to the size of the syntax
    311  *               header. IL Client can then allocate a buffer of
    312  *               this size and call OMX_GetParamter again.
    313  *
    314  *               When used with OMX_SetParameter for the decoder
    315  *               component, it is a read-only field specifying
    316  *               the amount of data in the buffer array.
    317  *  data       : The syntax header data. The format of the
    318  *               syntax header is specific to the video codec,
    319  *               and is described below.
    320  *
    321  *   H.263      : N/A
    322  *   H.264      : The SPS and PPS parameter sets
    323  *   MPEG-4     : The VO, VOS, and VOL header
    324  *   WMV7       : The "Extra Data" info, in the ASF Stream
    325  *                Properties Object.
    326  *   WMV8       : The "Extra Data" info, in the ASF Stream
    327  *                Properties Object.
    328  *   WMV9 SP/MP : The STRUCT_C portion of the sequence layer
    329  *                meta data, defined in Table 263 of the VC-1
    330  *                specification.
    331  *   VC-1 SP/MP : The STRUCT_C portion of the sequence layer
    332  *                meta data, defined in Table 263 of the VC-1
    333  *                specification.
    334  *   VC-1 AP    : The sequence and entry point header
    335  *   DivX 3     : N/A
    336  *   DivX 4.x   : The VO, VOS, and VOL header
    337  *   DivX 5.x   : The VO, VOS, and VOL header
    338  *   DivX 6.x   : The VO, VOS, and VOL header
    339  *   VP6        : N/A
    340  *   Spark      : N/A
    341  */
    342 typedef struct QOMX_VIDEO_SYNTAXHDRTYPE {
    343     OMX_U32 nSize;
    344     OMX_VERSIONTYPE nVersion;
    345     OMX_U32 nPortIndex;
    346     OMX_U32 nBytes;
    347     OMX_U8  data[1];
    348 } QOMX_VIDEO_SYNTAXHDRTYPE;
    349 
    350 
    351 /**
    352  * Enumeration used to define the extended video intra refresh types, not
    353  * present in the OpenMax IL 1.1.2 specification.
    354  *
    355  * ENUMS:
    356  *  IntraRefreshRandom         : Random intra refresh mode.
    357  */
    358 typedef enum QOMX_VIDEO_INTRAREFRESHTYPE
    359 {
    360     QOMX_VIDEO_IntraRefreshRandom      = 0x7F100000
    361 } QOMX_VIDEO_INTRAREFRESHTYPE;
    362 
    363 
    364 /**
    365  * This structure is used to configure the intra periodicity for encoder.
    366  *
    367  * STRUCT MEMBERS:
    368  *  nSize      : Size of the structure in bytes
    369  *  nVersion   : OMX specification version info
    370  *  nPortIndex : Port that this structure applies to
    371  *  nIDRPeriod : Defines the periodicity of IDR occurrence. This specifies
    372  *               coding a frame as IDR after a specific number of intra
    373  *               frames. The periodicity of intra frame coding is specified by
    374  *               the nPFrames.  If nIDRPeriod is set to 0, only the first
    375  *               frame of the encode session is an IDR frame. This field is
    376  *               ignored for non-AVC codecs and is used only for codecs that
    377  *               support IDR Period.
    378  *  nPFrames : Specifies the number of P frames between each I Frame.
    379  *  nBFrames : Specifies the number of B frames between each I Frame.
    380  */
    381 typedef struct QOMX_VIDEO_INTRAPERIODTYPE  {
    382     OMX_U32 nSize;
    383     OMX_VERSIONTYPE nVersion;
    384     OMX_U32 nPortIndex;
    385     OMX_U32 nIDRPeriod;
    386     OMX_U32 nPFrames;
    387     OMX_U32 nBFrames;
    388 } QOMX_VIDEO_INTRAPERIODTYPE;
    389 
    390 
    391 /**
    392  * Enumeration used to define the extended video extra data payload types not
    393  * present in the OpenMax IL 1.1.2 specification.
    394  *
    395  * ENUMS:
    396  *  VideoMultiSliceInfo : Multi slice layout information
    397  *
    398  *  Slice information layout:
    399  *  First 4 bytes = Number of Slice Entries
    400  *
    401  *  Then individual slice entries: 8 bytes per entry.
    402  *  Slice1 information: offset (4 bytes), Length (4 bytes)
    403  *  Slice2 information: offset (4 bytes), Length (4 bytes)
    404  *  Slice3 information: offset (4 bytes), Length (4 bytes)
    405  *  ...................................
    406  *  ...................................
    407  *  SliceN information: offset (4 bytes), Length (4 bytes)
    408  *
    409  *
    410  *  VideoNumConcealedMB : Number of concealed MBs
    411  *
    412  *  The data array consists of an unsigned 32-bit size field
    413  *  indicating the number of concealed macroblocks in the
    414  *  uncompressed frame.
    415  *
    416  *
    417  *  QOMX_ExtraDataOMXIndex : Indicates that the data payload contains an
    418  *  OpenMax index and associated payload.
    419  *
    420  *  The data of the extra data payload shall contain the value of the
    421  *  OMX_INDEXTYPE corresponding to the requested operation as an unsigned
    422  *  32 bit number occupying the first four bytes of the payload. The index
    423  *  will be immediately followed by the associated structure. Padding bytes
    424  *  are appended to ensure 32 bit address alignment if needed.
    425  */
    426 typedef enum QOMX_VIDEO_EXTRADATATYPE
    427 {
    428    QOMX_ExtraDataVideoMultiSliceInfo = 0x7F100000,
    429    QOMX_ExtraDataVideoNumConcealedMB,
    430    QOMX_ExtraDataOMXIndex,
    431    QOMX_ExtraDataHDCPEncryptionInfo
    432 } QOMX_VIDEO_EXTRADATATYPE;
    433 
    434 
    435 /**
    436  * Enumeration used to define the video encoder modes
    437  *
    438  * ENUMS:
    439  *  EncoderModeDefault : Default video recording mode.
    440  *                       All encoder settings made through
    441  *                       OMX_SetParameter/OMX_SetConfig are applied. No
    442  *                       parameter is overridden.
    443  *  EncoderModeMMS : Video recording mode for MMS (Multimedia Messaging
    444  *                   Service). This mode is similar to EncoderModeDefault
    445  *                   except that here the Rate control mode is overridden
    446  *                   internally and set as a variant of variable bitrate with
    447  *                   variable frame rate. After this mode is set if the IL
    448  *                   client tries to set OMX_VIDEO_CONTROLRATETYPE via
    449  *                   OMX_IndexParamVideoBitrate that would be rejected. For
    450  *                   this, client should set mode back to EncoderModeDefault
    451  *                   first and then change OMX_VIDEO_CONTROLRATETYPE.
    452  */
    453 typedef enum QOMX_VIDEO_ENCODERMODETYPE
    454 {
    455     QOMX_VIDEO_EncoderModeDefault        = 0x01,
    456     QOMX_VIDEO_EncoderModeMMS            = 0x02,
    457     QOMX_VIDEO_EncoderModeMax            = 0x7FFFFFFF
    458 } QOMX_VIDEO_ENCODERMODETYPE;
    459 
    460 /**
    461  * This structure is used to set the video encoder mode.
    462  *
    463  * STRUCT MEMBERS:
    464  *  nSize      : Size of the structure in bytes
    465  *  nVersion   : OMX specification version info
    466  *  nPortIndex : Port that this structure applies to
    467  *  nMode : defines the video encoder mode
    468  */
    469 typedef struct QOMX_VIDEO_PARAM_ENCODERMODETYPE {
    470     OMX_U32 nSize;
    471     OMX_VERSIONTYPE nVersion;
    472     OMX_U32 nPortIndex;
    473     QOMX_VIDEO_ENCODERMODETYPE nMode;
    474 } QOMX_VIDEO_PARAM_ENCODERMODETYPE;
    475 
    476 
    477 /**
    478  * This structure is used to set the temporal (picture rate) - spatial
    479  * (picture quality) trade-off factor.
    480  * This setting is only valid when rate control is enabled and set to a mode
    481  * with variable frame rate. For all other rate control modes this setting is
    482  * ignored.
    483  *
    484  * STRUCT MEMBERS:
    485  *  nSize      : Size of the structure in bytes
    486  *  nVersion   : OMX specification version info
    487  *  nPortIndex : Port that this structure applies to
    488  *  nTSFactor : temporal-spatial tradeoff factor value in the range of 0-100.
    489  *              A factor of 0 won't emphasizes picture rate in rate
    490  *  control decisions at all i.e only picture quality is emphasized. For
    491  *  increasing values from 1 to 99 the emphasis of picture rate in rate
    492  *  control decisions increases. A factor of 100 emphasizes only picture rate
    493  *  in rate control decisions.
    494  */
    495 typedef struct QOMX_VIDEO_TEMPORALSPATIALTYPE {
    496     OMX_U32 nSize;
    497     OMX_VERSIONTYPE nVersion;
    498     OMX_U32 nPortIndex;
    499     OMX_U32 nTSFactor;
    500 } QOMX_VIDEO_TEMPORALSPATIALTYPE;
    501 
    502 /**
    503  * This structure is used to enable or disable the MB concealmenet reporting
    504  * for the uncompressed frames emitted from the port.
    505  *
    506  * STRUCT MEMBERS:
    507  *  nSize      : Size of the structure in bytes
    508  *  nVersion   : OMX specification version info
    509  *  nPortIndex : Port that this structure applies to
    510  *  bEnableMBConcealmentReporting : Flag indicating whether MB concealment
    511  *               reporting is enabled or disabled.
    512  *               OMX_TRUE: Enables MB concealment reporting
    513  *               OMX_FALSE: Disables MB concealment reporting
    514  */
    515 typedef struct QOMX_VIDEO_MBCONCEALMENTREPORTINGTYPE {
    516     OMX_U32 nSize;
    517     OMX_VERSIONTYPE nVersion;
    518     OMX_U32 nPortIndex;
    519     OMX_BOOL bEnableMBConcealmentReporting;
    520 } QOMX_VIDEO_MBCONCEALMENTREPORTINGTYPE;
    521 
    522 /**
    523  * Specifies the extended picture types. These values should be
    524  * OR'd along with the types defined in OMX_VIDEO_PICTURETYPE to
    525  * signal all pictures types which are allowed.
    526  *
    527  * ENUMS:
    528  *  H.264 Specific Picture Types:   IDR
    529  */
    530 typedef enum QOMX_VIDEO_PICTURETYPE {
    531     QOMX_VIDEO_PictureTypeIDR = OMX_VIDEO_PictureTypeVendorStartUnused + 0x1000
    532 } QOMX_VIDEO_PICTURETYPE;
    533 
    534 /**
    535  * This structure is used to configure the processing of
    536  * specific picture types.
    537  *
    538  * STRUCT MEMBERS:
    539  *  nSize         : Size of the structure in bytes
    540  *  nVersion      : OMX specification version info
    541  *  nPortIndex    : Port that this structure applies to
    542  *  nPictureTypes : Specifies the picture type(s)
    543  *                  that shall be processed. The value consists
    544  *                  of the desired picture types, defined by the
    545  *                  OMX_VIDEO_PICTURETYPE and
    546  *                  QOMX_VIDEO_PICTURETYPE enumerations, OR'd to
    547  *                  signal all the pictures types which are
    548  *                  allowed.
    549  */
    550 typedef struct QOMX_VIDEO_DECODEPICTURETYPE {
    551     OMX_U32 nSize;
    552     OMX_VERSIONTYPE nVersion;
    553     OMX_U32 nPortIndex;
    554     OMX_U32 nPictureTypes;
    555 } QOMX_VIDEO_DECODEPICTURETYPE;
    556 
    557 /**
    558  * This structure describes the sample aspect ratio information.
    559  *
    560  * STRUCT MEMBERS:
    561  *  nSize        : Size of the structure in bytes
    562  *  nVersion     : OMX specification version info
    563  *  nPortIndex   : Port that this structure applies to
    564  *  nWidth       : Specifies the horizontal aspect size of
    565  *                 the sample
    566  *  nHeight      : Specifies the vertical aspect size of the
    567  *                 sample
    568  */
    569 typedef struct QOMX_VIDEO_SAMPLEASPECTRATIO {
    570     OMX_U32 nSize;
    571     OMX_VERSIONTYPE nVersion;
    572     OMX_U32 nPortIndex;
    573     OMX_U16 nWidth;
    574     OMX_U16 nHeight;
    575 } QOMX_VIDEO_SAMPLEASPECTRATIO;
    576 
    577 #if defined( __cplusplus )
    578 }
    579 #endif /* end of macro __cplusplus */
    580 
    581 #endif /* end of macro __H_QOMX_VIDEOEXTENSIONS_H__ */
    582