Home | History | Annotate | Download | only in inc
      1 /**
      2  * Copyright (c) 2008 The Khronos Group Inc.
      3  *
      4  * Permission is hereby granted, free of charge, to any person obtaining
      5  * a copy of this software and associated documentation files (the
      6  * "Software"), to deal in the Software without restriction, including
      7  * without limitation the rights to use, copy, modify, merge, publish,
      8  * distribute, sublicense, and/or sell copies of the Software, and to
      9  * permit persons to whom the Software is furnished to do so, subject
     10  * to the following conditions:
     11  * The above copyright notice and this permission notice shall be included
     12  * in all copies or substantial portions of the Software.
     13  *
     14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
     15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
     17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
     18  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
     19  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
     20  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     21  *
     22  */
     23 
     24 /**
     25  *  @file OMX_Video.h - OpenMax IL version 1.1.2
     26  *  The structures is needed by Video components to exchange parameters
     27  *  and configuration data with OMX components.
     28  */
     29 #ifndef OMX_Video_h
     30 #define OMX_Video_h
     31 
     32 /** @defgroup video OpenMAX IL Video Domain
     33  * @ingroup iv
     34  * Structures for OpenMAX IL Video domain
     35  * @{
     36  */
     37 
     38 #ifdef __cplusplus
     39 extern "C" {
     40 #endif /* __cplusplus */
     41 
     42 
     43 /**
     44  * Each OMX header must include all required header files to allow the
     45  * header to compile without errors.  The includes below are required
     46  * for this header file to compile successfully
     47  */
     48 
     49 #include <OMX_IVCommon.h>
     50 
     51 
     52 /**
     53  * Enumeration used to define the possible video compression codings.
     54  * NOTE:  This essentially refers to file extensions. If the coding is
     55  *        being used to specify the ENCODE type, then additional work
     56  *        must be done to configure the exact flavor of the compression
     57  *        to be used.  For decode cases where the user application can
     58  *        not differentiate between MPEG-4 and H.264 bit streams, it is
     59  *        up to the codec to handle this.
     60  */
     61 typedef enum OMX_VIDEO_CODINGTYPE {
     62     OMX_VIDEO_CodingUnused,     /**< Value when coding is N/A */
     63     OMX_VIDEO_CodingAutoDetect, /**< Autodetection of coding type */
     64     OMX_VIDEO_CodingMPEG2,      /**< AKA: H.262 */
     65     OMX_VIDEO_CodingH263,       /**< H.263 */
     66     OMX_VIDEO_CodingMPEG4,      /**< MPEG-4 */
     67     OMX_VIDEO_CodingWMV,        /**< all versions of Windows Media Video */
     68     OMX_VIDEO_CodingRV,         /**< all versions of Real Video */
     69     OMX_VIDEO_CodingAVC,        /**< H.264/AVC */
     70     OMX_VIDEO_CodingMJPEG,      /**< Motion JPEG */
     71     OMX_VIDEO_CodingVP8,        /**< Google VP8, formerly known as On2 VP8 */
     72     OMX_VIDEO_CodingVP9,        /**< Google VP9 */
     73     OMX_VIDEO_CodingHEVC,       /**< HEVC */
     74     OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
     75     OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
     76     OMX_VIDEO_CodingMax = 0x7FFFFFFF
     77 } OMX_VIDEO_CODINGTYPE;
     78 
     79 
     80 /**
     81  * Data structure used to define a video path.  The number of Video paths for
     82  * input and output will vary by type of the Video component.
     83  *
     84  *    Input (aka Source) : zero Inputs, one Output,
     85  *    Splitter           : one Input, 2 or more Outputs,
     86  *    Processing Element : one Input, one output,
     87  *    Mixer              : 2 or more inputs, one output,
     88  *    Output (aka Sink)  : one Input, zero outputs.
     89  *
     90  * The PortDefinition structure is used to define all of the parameters
     91  * necessary for the compliant component to setup an input or an output video
     92  * path.  If additional vendor specific data is required, it should be
     93  * transmitted to the component using the CustomCommand function.  Compliant
     94  * components will prepopulate this structure with optimal values during the
     95  * GetDefaultInitParams command.
     96  *
     97  * STRUCT MEMBERS:
     98  *  cMIMEType             : MIME type of data for the port
     99  *  pNativeRender         : Platform specific reference for a display if a
    100  *                          sync, otherwise this field is 0
    101  *  nFrameWidth           : Width of frame to be used on channel if
    102  *                          uncompressed format is used.  Use 0 for unknown,
    103  *                          don't care or variable
    104  *  nFrameHeight          : Height of frame to be used on channel if
    105  *                          uncompressed format is used. Use 0 for unknown,
    106  *                          don't care or variable
    107  *  nStride               : Number of bytes per span of an image
    108  *                          (i.e. indicates the number of bytes to get
    109  *                          from span N to span N+1, where negative stride
    110  *                          indicates the image is bottom up
    111  *  nSliceHeight          : Height used when encoding in slices
    112  *  nBitrate              : Bit rate of frame to be used on channel if
    113  *                          compressed format is used. Use 0 for unknown,
    114  *                          don't care or variable
    115  *  xFramerate            : Frame rate to be used on channel if uncompressed
    116  *                          format is used. Use 0 for unknown, don't care or
    117  *                          variable.  Units are Q16 frames per second.
    118  *  bFlagErrorConcealment : Turns on error concealment if it is supported by
    119  *                          the OMX component
    120  *  eCompressionFormat    : Compression format used in this instance of the
    121  *                          component. When OMX_VIDEO_CodingUnused is
    122  *                          specified, eColorFormat is used
    123  *  eColorFormat : Decompressed format used by this component
    124  *  pNativeWindow : Platform specific reference for a window object if a
    125  *                          display sink , otherwise this field is 0x0.
    126  */
    127 typedef struct OMX_VIDEO_PORTDEFINITIONTYPE {
    128     OMX_STRING cMIMEType;
    129     OMX_NATIVE_DEVICETYPE pNativeRender;
    130     OMX_U32 nFrameWidth;
    131     OMX_U32 nFrameHeight;
    132     OMX_S32 nStride;
    133     OMX_U32 nSliceHeight;
    134     OMX_U32 nBitrate;
    135     OMX_U32 xFramerate;
    136     OMX_BOOL bFlagErrorConcealment;
    137     OMX_VIDEO_CODINGTYPE eCompressionFormat;
    138     OMX_COLOR_FORMATTYPE eColorFormat;
    139     OMX_NATIVE_WINDOWTYPE pNativeWindow;
    140 } OMX_VIDEO_PORTDEFINITIONTYPE;
    141 
    142 /**
    143  * Port format parameter.  This structure is used to enumerate the various
    144  * data input/output format supported by the port.
    145  *
    146  * STRUCT MEMBERS:
    147  *  nSize              : Size of the structure in bytes
    148  *  nVersion           : OMX specification version information
    149  *  nPortIndex         : Indicates which port to set
    150  *  nIndex             : Indicates the enumeration index for the format from
    151  *                       0x0 to N-1
    152  *  eCompressionFormat : Compression format used in this instance of the
    153  *                       component. When OMX_VIDEO_CodingUnused is specified,
    154  *                       eColorFormat is used
    155  *  eColorFormat       : Decompressed format used by this component
    156  *  xFrameRate         : Indicates the video frame rate in Q16 format
    157  */
    158 typedef struct OMX_VIDEO_PARAM_PORTFORMATTYPE {
    159     OMX_U32 nSize;
    160     OMX_VERSIONTYPE nVersion;
    161     OMX_U32 nPortIndex;
    162     OMX_U32 nIndex;
    163     OMX_VIDEO_CODINGTYPE eCompressionFormat;
    164     OMX_COLOR_FORMATTYPE eColorFormat;
    165     OMX_U32 xFramerate;
    166 } OMX_VIDEO_PARAM_PORTFORMATTYPE;
    167 
    168 
    169 /**
    170  * This is a structure for configuring video compression quantization
    171  * parameter values.  Codecs may support different QP values for different
    172  * frame types.
    173  *
    174  * STRUCT MEMBERS:
    175  *  nSize      : Size of the structure in bytes
    176  *  nVersion   : OMX specification version info
    177  *  nPortIndex : Port that this structure applies to
    178  *  nQpI       : QP value to use for index frames
    179  *  nQpP       : QP value to use for P frames
    180  *  nQpB       : QP values to use for bidirectional frames
    181  */
    182 typedef struct OMX_VIDEO_PARAM_QUANTIZATIONTYPE {
    183     OMX_U32 nSize;
    184     OMX_VERSIONTYPE nVersion;
    185     OMX_U32 nPortIndex;
    186     OMX_U32 nQpI;
    187     OMX_U32 nQpP;
    188     OMX_U32 nQpB;
    189 } OMX_VIDEO_PARAM_QUANTIZATIONTYPE;
    190 
    191 
    192 /**
    193  * Structure for configuration of video fast update parameters.
    194  *
    195  * STRUCT MEMBERS:
    196  *  nSize      : Size of the structure in bytes
    197  *  nVersion   : OMX specification version info
    198  *  nPortIndex : Port that this structure applies to
    199  *  bEnableVFU : Enable/Disable video fast update
    200  *  nFirstGOB  : Specifies the number of the first macroblock row
    201  *  nFirstMB   : specifies the first MB relative to the specified first GOB
    202  *  nNumMBs    : Specifies the number of MBs to be refreshed from nFirstGOB
    203  *               and nFirstMB
    204  */
    205 typedef struct OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE {
    206     OMX_U32 nSize;
    207     OMX_VERSIONTYPE nVersion;
    208     OMX_U32 nPortIndex;
    209     OMX_BOOL bEnableVFU;
    210     OMX_U32 nFirstGOB;
    211     OMX_U32 nFirstMB;
    212     OMX_U32 nNumMBs;
    213 } OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE;
    214 
    215 
    216 /**
    217  * Enumeration of possible bitrate control types
    218  */
    219 typedef enum OMX_VIDEO_CONTROLRATETYPE {
    220     OMX_Video_ControlRateDisable,
    221     OMX_Video_ControlRateVariable,
    222     OMX_Video_ControlRateConstant,
    223     OMX_Video_ControlRateVariableSkipFrames,
    224     OMX_Video_ControlRateConstantSkipFrames,
    225     OMX_Video_ControlRateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    226     OMX_Video_ControlRateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    227     OMX_Video_ControlRateMax = 0x7FFFFFFF
    228 } OMX_VIDEO_CONTROLRATETYPE;
    229 
    230 
    231 /**
    232  * Structure for configuring bitrate mode of a codec.
    233  *
    234  * STRUCT MEMBERS:
    235  *  nSize          : Size of the struct in bytes
    236  *  nVersion       : OMX spec version info
    237  *  nPortIndex     : Port that this struct applies to
    238  *  eControlRate   : Control rate type enum
    239  *  nTargetBitrate : Target bitrate to encode with
    240  */
    241 typedef struct OMX_VIDEO_PARAM_BITRATETYPE {
    242     OMX_U32 nSize;
    243     OMX_VERSIONTYPE nVersion;
    244     OMX_U32 nPortIndex;
    245     OMX_VIDEO_CONTROLRATETYPE eControlRate;
    246     OMX_U32 nTargetBitrate;
    247 } OMX_VIDEO_PARAM_BITRATETYPE;
    248 
    249 
    250 /**
    251  * Enumeration of possible motion vector (MV) types
    252  */
    253 typedef enum OMX_VIDEO_MOTIONVECTORTYPE {
    254     OMX_Video_MotionVectorPixel,
    255     OMX_Video_MotionVectorHalfPel,
    256     OMX_Video_MotionVectorQuarterPel,
    257     OMX_Video_MotionVectorEighthPel,
    258     OMX_Video_MotionVectorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    259     OMX_Video_MotionVectorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    260     OMX_Video_MotionVectorMax = 0x7FFFFFFF
    261 } OMX_VIDEO_MOTIONVECTORTYPE;
    262 
    263 
    264 /**
    265  * Structure for configuring the number of motion vectors used as well
    266  * as their accuracy.
    267  *
    268  * STRUCT MEMBERS:
    269  *  nSize            : Size of the struct in bytes
    270  *  nVersion         : OMX spec version info
    271  *  nPortIndex       : port that this structure applies to
    272  *  eAccuracy        : Enumerated MV accuracy
    273  *  bUnrestrictedMVs : Allow unrestricted MVs
    274  *  bFourMV          : Allow use of 4 MVs
    275  *  sXSearchRange    : Search range in horizontal direction for MVs
    276  *  sYSearchRange    : Search range in vertical direction for MVs
    277  */
    278 typedef struct OMX_VIDEO_PARAM_MOTIONVECTORTYPE {
    279     OMX_U32 nSize;
    280     OMX_VERSIONTYPE nVersion;
    281     OMX_U32 nPortIndex;
    282     OMX_VIDEO_MOTIONVECTORTYPE eAccuracy;
    283     OMX_BOOL bUnrestrictedMVs;
    284     OMX_BOOL bFourMV;
    285     OMX_S32 sXSearchRange;
    286     OMX_S32 sYSearchRange;
    287 } OMX_VIDEO_PARAM_MOTIONVECTORTYPE;
    288 
    289 
    290 /**
    291  * Enumeration of possible methods to use for Intra Refresh
    292  */
    293 typedef enum OMX_VIDEO_INTRAREFRESHTYPE {
    294     OMX_VIDEO_IntraRefreshCyclic,
    295     OMX_VIDEO_IntraRefreshAdaptive,
    296     OMX_VIDEO_IntraRefreshBoth,
    297     OMX_VIDEO_IntraRefreshKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    298     OMX_VIDEO_IntraRefreshVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    299     OMX_VIDEO_IntraRefreshRandom,
    300     OMX_VIDEO_IntraRefreshMax = 0x7FFFFFFF
    301 } OMX_VIDEO_INTRAREFRESHTYPE;
    302 
    303 
    304 /**
    305  * Structure for configuring intra refresh mode
    306  *
    307  * STRUCT MEMBERS:
    308  *  nSize        : Size of the structure in bytes
    309  *  nVersion     : OMX specification version information
    310  *  nPortIndex   : Port that this structure applies to
    311  *  eRefreshMode : Cyclic, Adaptive, or Both
    312  *  nAirMBs      : Number of intra macroblocks to refresh in a frame when
    313  *                 AIR is enabled
    314  *  nAirRef      : Number of times a motion marked macroblock has to be
    315  *                 intra coded
    316  *  nCirMBs      : Number of consecutive macroblocks to be coded as "intra"
    317  *                 when CIR is enabled
    318  */
    319 typedef struct OMX_VIDEO_PARAM_INTRAREFRESHTYPE {
    320     OMX_U32 nSize;
    321     OMX_VERSIONTYPE nVersion;
    322     OMX_U32 nPortIndex;
    323     OMX_VIDEO_INTRAREFRESHTYPE eRefreshMode;
    324     OMX_U32 nAirMBs;
    325     OMX_U32 nAirRef;
    326     OMX_U32 nCirMBs;
    327 } OMX_VIDEO_PARAM_INTRAREFRESHTYPE;
    328 
    329 
    330 /**
    331  * Structure for enabling various error correction methods for video
    332  * compression.
    333  *
    334  * STRUCT MEMBERS:
    335  *  nSize                   : Size of the structure in bytes
    336  *  nVersion                : OMX specification version information
    337  *  nPortIndex              : Port that this structure applies to
    338  *  bEnableHEC              : Enable/disable header extension codes (HEC)
    339  *  bEnableResync           : Enable/disable resynchronization markers
    340  *  nResynchMarkerSpacing   : Resynch markers interval (in bits) to be
    341  *                            applied in the stream
    342  *  bEnableDataPartitioning : Enable/disable data partitioning
    343  *  bEnableRVLC             : Enable/disable reversible variable length
    344  *                            coding
    345  */
    346 typedef struct OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE {
    347     OMX_U32 nSize;
    348     OMX_VERSIONTYPE nVersion;
    349     OMX_U32 nPortIndex;
    350     OMX_BOOL bEnableHEC;
    351     OMX_BOOL bEnableResync;
    352     OMX_U32  nResynchMarkerSpacing;
    353     OMX_BOOL bEnableDataPartitioning;
    354     OMX_BOOL bEnableRVLC;
    355 } OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE;
    356 
    357 
    358 /**
    359  * Configuration of variable block-size motion compensation (VBSMC)
    360  *
    361  * STRUCT MEMBERS:
    362  *  nSize      : Size of the structure in bytes
    363  *  nVersion   : OMX specification version information
    364  *  nPortIndex : Port that this structure applies to
    365  *  b16x16     : Enable inter block search 16x16
    366  *  b16x8      : Enable inter block search 16x8
    367  *  b8x16      : Enable inter block search 8x16
    368  *  b8x8       : Enable inter block search 8x8
    369  *  b8x4       : Enable inter block search 8x4
    370  *  b4x8       : Enable inter block search 4x8
    371  *  b4x4       : Enable inter block search 4x4
    372  */
    373 typedef struct OMX_VIDEO_PARAM_VBSMCTYPE {
    374     OMX_U32 nSize;
    375     OMX_VERSIONTYPE nVersion;
    376     OMX_U32 nPortIndex;
    377     OMX_BOOL b16x16;
    378     OMX_BOOL b16x8;
    379     OMX_BOOL b8x16;
    380     OMX_BOOL b8x8;
    381     OMX_BOOL b8x4;
    382     OMX_BOOL b4x8;
    383     OMX_BOOL b4x4;
    384 } OMX_VIDEO_PARAM_VBSMCTYPE;
    385 
    386 
    387 /**
    388  * H.263 profile types, each profile indicates support for various
    389  * performance bounds and different annexes.
    390  *
    391  * ENUMS:
    392  *  Baseline           : Baseline Profile: H.263 (V1), no optional modes
    393  *  H320 Coding        : H.320 Coding Efficiency Backward Compatibility
    394  *                       Profile: H.263+ (V2), includes annexes I, J, L.4
    395  *                       and T
    396  *  BackwardCompatible : Backward Compatibility Profile: H.263 (V1),
    397  *                       includes annex F
    398  *  ISWV2              : Interactive Streaming Wireless Profile: H.263+
    399  *                       (V2), includes annexes I, J, K and T
    400  *  ISWV3              : Interactive Streaming Wireless Profile: H.263++
    401  *                       (V3), includes profile 3 and annexes V and W.6.3.8
    402  *  HighCompression    : Conversational High Compression Profile: H.263++
    403  *                       (V3), includes profiles 1 & 2 and annexes D and U
    404  *  Internet           : Conversational Internet Profile: H.263++ (V3),
    405  *                       includes profile 5 and annex K
    406  *  Interlace          : Conversational Interlace Profile: H.263++ (V3),
    407  *                       includes profile 5 and annex W.6.3.11
    408  *  HighLatency        : High Latency Profile: H.263++ (V3), includes
    409  *                       profile 6 and annexes O.1 and P.5
    410  */
    411 typedef enum OMX_VIDEO_H263PROFILETYPE {
    412     OMX_VIDEO_H263ProfileBaseline            = 0x01,
    413     OMX_VIDEO_H263ProfileH320Coding          = 0x02,
    414     OMX_VIDEO_H263ProfileBackwardCompatible  = 0x04,
    415     OMX_VIDEO_H263ProfileISWV2               = 0x08,
    416     OMX_VIDEO_H263ProfileISWV3               = 0x10,
    417     OMX_VIDEO_H263ProfileHighCompression     = 0x20,
    418     OMX_VIDEO_H263ProfileInternet            = 0x40,
    419     OMX_VIDEO_H263ProfileInterlace           = 0x80,
    420     OMX_VIDEO_H263ProfileHighLatency         = 0x100,
    421     OMX_VIDEO_H263ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    422     OMX_VIDEO_H263ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    423     OMX_VIDEO_H263ProfileMax                 = 0x7FFFFFFF
    424 } OMX_VIDEO_H263PROFILETYPE;
    425 
    426 
    427 /**
    428  * H.263 level types, each level indicates support for various frame sizes,
    429  * bit rates, decoder frame rates.
    430  */
    431 typedef enum OMX_VIDEO_H263LEVELTYPE {
    432     OMX_VIDEO_H263Level10  = 0x01,
    433     OMX_VIDEO_H263Level20  = 0x02,
    434     OMX_VIDEO_H263Level30  = 0x04,
    435     OMX_VIDEO_H263Level40  = 0x08,
    436     OMX_VIDEO_H263Level45  = 0x10,
    437     OMX_VIDEO_H263Level50  = 0x20,
    438     OMX_VIDEO_H263Level60  = 0x40,
    439     OMX_VIDEO_H263Level70  = 0x80,
    440     OMX_VIDEO_H263LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    441     OMX_VIDEO_H263LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    442     OMX_VIDEO_H263LevelMax = 0x7FFFFFFF
    443 } OMX_VIDEO_H263LEVELTYPE;
    444 
    445 
    446 /**
    447  * Specifies the picture type. These values should be OR'd to signal all
    448  * pictures types which are allowed.
    449  *
    450  * ENUMS:
    451  *  Generic Picture Types:          I, P and B
    452  *  H.263 Specific Picture Types:   SI and SP
    453  *  H.264 Specific Picture Types:   EI and EP
    454  *  MPEG-4 Specific Picture Types:  S
    455  */
    456 typedef enum OMX_VIDEO_PICTURETYPE {
    457     OMX_VIDEO_PictureTypeI   = 0x01,
    458     OMX_VIDEO_PictureTypeP   = 0x02,
    459     OMX_VIDEO_PictureTypeB   = 0x04,
    460     OMX_VIDEO_PictureTypeSI  = 0x08,
    461     OMX_VIDEO_PictureTypeSP  = 0x10,
    462     OMX_VIDEO_PictureTypeEI  = 0x11,
    463     OMX_VIDEO_PictureTypeEP  = 0x12,
    464     OMX_VIDEO_PictureTypeS   = 0x14,
    465     OMX_VIDEO_PictureTypeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    466     OMX_VIDEO_PictureTypeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    467     OMX_VIDEO_PictureTypeMax = 0x7FFFFFFF
    468 } OMX_VIDEO_PICTURETYPE;
    469 
    470 
    471 /**
    472  * H.263 Params
    473  *
    474  * STRUCT MEMBERS:
    475  *  nSize                    : Size of the structure in bytes
    476  *  nVersion                 : OMX specification version information
    477  *  nPortIndex               : Port that this structure applies to
    478  *  nPFrames                 : Number of P frames between each I frame
    479  *  nBFrames                 : Number of B frames between each I frame
    480  *  eProfile                 : H.263 profile(s) to use
    481  *  eLevel                   : H.263 level(s) to use
    482  *  bPLUSPTYPEAllowed        : Indicating that it is allowed to use PLUSPTYPE
    483  *                             (specified in the 1998 version of H.263) to
    484  *                             indicate custom picture sizes or clock
    485  *                             frequencies
    486  *  nAllowedPictureTypes     : Specifies the picture types allowed in the
    487  *                             bitstream
    488  *  bForceRoundingTypeToZero : value of the RTYPE bit (bit 6 of MPPTYPE) is
    489  *                             not constrained. It is recommended to change
    490  *                             the value of the RTYPE bit for each reference
    491  *                             picture in error-free communication
    492  *  nPictureHeaderRepetition : Specifies the frequency of picture header
    493  *                             repetition
    494  *  nGOBHeaderInterval       : Specifies the interval of non-empty GOB
    495  *                             headers in units of GOBs
    496  */
    497 typedef struct OMX_VIDEO_PARAM_H263TYPE {
    498     OMX_U32 nSize;
    499     OMX_VERSIONTYPE nVersion;
    500     OMX_U32 nPortIndex;
    501     OMX_U32 nPFrames;
    502     OMX_U32 nBFrames;
    503     OMX_VIDEO_H263PROFILETYPE eProfile;
    504 	OMX_VIDEO_H263LEVELTYPE eLevel;
    505     OMX_BOOL bPLUSPTYPEAllowed;
    506     OMX_U32 nAllowedPictureTypes;
    507     OMX_BOOL bForceRoundingTypeToZero;
    508     OMX_U32 nPictureHeaderRepetition;
    509     OMX_U32 nGOBHeaderInterval;
    510 } OMX_VIDEO_PARAM_H263TYPE;
    511 
    512 
    513 /**
    514  * MPEG-2 profile types, each profile indicates support for various
    515  * performance bounds and different annexes.
    516  */
    517 typedef enum OMX_VIDEO_MPEG2PROFILETYPE {
    518     OMX_VIDEO_MPEG2ProfileSimple = 0,  /**< Simple Profile */
    519     OMX_VIDEO_MPEG2ProfileMain,        /**< Main Profile */
    520     OMX_VIDEO_MPEG2Profile422,         /**< 4:2:2 Profile */
    521     OMX_VIDEO_MPEG2ProfileSNR,         /**< SNR Profile */
    522     OMX_VIDEO_MPEG2ProfileSpatial,     /**< Spatial Profile */
    523     OMX_VIDEO_MPEG2ProfileHigh,        /**< High Profile */
    524     OMX_VIDEO_MPEG2ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    525     OMX_VIDEO_MPEG2ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    526     OMX_VIDEO_MPEG2ProfileMax = 0x7FFFFFFF
    527 } OMX_VIDEO_MPEG2PROFILETYPE;
    528 
    529 
    530 /**
    531  * MPEG-2 level types, each level indicates support for various frame
    532  * sizes, bit rates, decoder frame rates.  No need
    533  */
    534 typedef enum OMX_VIDEO_MPEG2LEVELTYPE {
    535     OMX_VIDEO_MPEG2LevelLL = 0,  /**< Low Level */
    536     OMX_VIDEO_MPEG2LevelML,      /**< Main Level */
    537     OMX_VIDEO_MPEG2LevelH14,     /**< High 1440 */
    538     OMX_VIDEO_MPEG2LevelHL,      /**< High Level */
    539     OMX_VIDEO_MPEG2LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    540     OMX_VIDEO_MPEG2LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    541     OMX_VIDEO_MPEG2LevelMax = 0x7FFFFFFF
    542 } OMX_VIDEO_MPEG2LEVELTYPE;
    543 
    544 
    545 /**
    546  * MPEG-2 params
    547  *
    548  * STRUCT MEMBERS:
    549  *  nSize      : Size of the structure in bytes
    550  *  nVersion   : OMX specification version information
    551  *  nPortIndex : Port that this structure applies to
    552  *  nPFrames   : Number of P frames between each I frame
    553  *  nBFrames   : Number of B frames between each I frame
    554  *  eProfile   : MPEG-2 profile(s) to use
    555  *  eLevel     : MPEG-2 levels(s) to use
    556  */
    557 typedef struct OMX_VIDEO_PARAM_MPEG2TYPE {
    558     OMX_U32 nSize;
    559     OMX_VERSIONTYPE nVersion;
    560     OMX_U32 nPortIndex;
    561     OMX_U32 nPFrames;
    562     OMX_U32 nBFrames;
    563     OMX_VIDEO_MPEG2PROFILETYPE eProfile;
    564 	OMX_VIDEO_MPEG2LEVELTYPE eLevel;
    565 } OMX_VIDEO_PARAM_MPEG2TYPE;
    566 
    567 
    568 /**
    569  * MPEG-4 profile types, each profile indicates support for various
    570  * performance bounds and different annexes.
    571  *
    572  * ENUMS:
    573  *  - Simple Profile, Levels 1-3
    574  *  - Simple Scalable Profile, Levels 1-2
    575  *  - Core Profile, Levels 1-2
    576  *  - Main Profile, Levels 2-4
    577  *  - N-bit Profile, Level 2
    578  *  - Scalable Texture Profile, Level 1
    579  *  - Simple Face Animation Profile, Levels 1-2
    580  *  - Simple Face and Body Animation (FBA) Profile, Levels 1-2
    581  *  - Basic Animated Texture Profile, Levels 1-2
    582  *  - Hybrid Profile, Levels 1-2
    583  *  - Advanced Real Time Simple Profiles, Levels 1-4
    584  *  - Core Scalable Profile, Levels 1-3
    585  *  - Advanced Coding Efficiency Profile, Levels 1-4
    586  *  - Advanced Core Profile, Levels 1-2
    587  *  - Advanced Scalable Texture, Levels 2-3
    588  */
    589 typedef enum OMX_VIDEO_MPEG4PROFILETYPE {
    590     OMX_VIDEO_MPEG4ProfileSimple           = 0x01,
    591     OMX_VIDEO_MPEG4ProfileSimpleScalable   = 0x02,
    592     OMX_VIDEO_MPEG4ProfileCore             = 0x04,
    593     OMX_VIDEO_MPEG4ProfileMain             = 0x08,
    594     OMX_VIDEO_MPEG4ProfileNbit             = 0x10,
    595     OMX_VIDEO_MPEG4ProfileScalableTexture  = 0x20,
    596     OMX_VIDEO_MPEG4ProfileSimpleFace       = 0x40,
    597     OMX_VIDEO_MPEG4ProfileSimpleFBA        = 0x80,
    598     OMX_VIDEO_MPEG4ProfileBasicAnimated    = 0x100,
    599     OMX_VIDEO_MPEG4ProfileHybrid           = 0x200,
    600     OMX_VIDEO_MPEG4ProfileAdvancedRealTime = 0x400,
    601     OMX_VIDEO_MPEG4ProfileCoreScalable     = 0x800,
    602     OMX_VIDEO_MPEG4ProfileAdvancedCoding   = 0x1000,
    603     OMX_VIDEO_MPEG4ProfileAdvancedCore     = 0x2000,
    604     OMX_VIDEO_MPEG4ProfileAdvancedScalable = 0x4000,
    605     OMX_VIDEO_MPEG4ProfileAdvancedSimple   = 0x8000,
    606     OMX_VIDEO_MPEG4ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    607     OMX_VIDEO_MPEG4ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    608     OMX_VIDEO_MPEG4ProfileMax              = 0x7FFFFFFF
    609 } OMX_VIDEO_MPEG4PROFILETYPE;
    610 
    611 
    612 /**
    613  * MPEG-4 level types, each level indicates support for various frame
    614  * sizes, bit rates, decoder frame rates.  No need
    615  */
    616 typedef enum OMX_VIDEO_MPEG4LEVELTYPE {
    617     OMX_VIDEO_MPEG4Level0  = 0x01,   /**< Level 0 */
    618     OMX_VIDEO_MPEG4Level0b = 0x02,   /**< Level 0b */
    619     OMX_VIDEO_MPEG4Level1  = 0x04,   /**< Level 1 */
    620     OMX_VIDEO_MPEG4Level2  = 0x08,   /**< Level 2 */
    621     OMX_VIDEO_MPEG4Level3  = 0x10,   /**< Level 3 */
    622     OMX_VIDEO_MPEG4Level4  = 0x20,   /**< Level 4 */
    623     OMX_VIDEO_MPEG4Level4a = 0x40,   /**< Level 4a */
    624     OMX_VIDEO_MPEG4Level5  = 0x80,   /**< Level 5 */
    625     OMX_VIDEO_MPEG4LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    626     OMX_VIDEO_MPEG4LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    627     OMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF
    628 } OMX_VIDEO_MPEG4LEVELTYPE;
    629 
    630 
    631 /**
    632  * MPEG-4 configuration.  This structure handles configuration options
    633  * which are specific to MPEG4 algorithms
    634  *
    635  * STRUCT MEMBERS:
    636  *  nSize                : Size of the structure in bytes
    637  *  nVersion             : OMX specification version information
    638  *  nPortIndex           : Port that this structure applies to
    639  *  nSliceHeaderSpacing  : Number of macroblocks between slice header (H263+
    640  *                         Annex K). Put zero if not used
    641  *  bSVH                 : Enable Short Video Header mode
    642  *  bGov                 : Flag to enable GOV
    643  *  nPFrames             : Number of P frames between each I frame (also called
    644  *                         GOV period)
    645  *  nBFrames             : Number of B frames between each I frame
    646  *  nIDCVLCThreshold     : Value of intra DC VLC threshold
    647  *  bACPred              : Flag to use ac prediction
    648  *  nMaxPacketSize       : Maximum size of packet in bytes.
    649  *  nTimeIncRes          : Used to pass VOP time increment resolution for MPEG4.
    650  *                         Interpreted as described in MPEG4 standard.
    651  *  eProfile             : MPEG-4 profile(s) to use.
    652  *  eLevel               : MPEG-4 level(s) to use.
    653  *  nAllowedPictureTypes : Specifies the picture types allowed in the bitstream
    654  *  nHeaderExtension     : Specifies the number of consecutive video packet
    655  *                         headers within a VOP
    656  *  bReversibleVLC       : Specifies whether reversible variable length coding
    657  *                         is in use
    658  */
    659 typedef struct OMX_VIDEO_PARAM_MPEG4TYPE {
    660     OMX_U32 nSize;
    661     OMX_VERSIONTYPE nVersion;
    662     OMX_U32 nPortIndex;
    663     OMX_U32 nSliceHeaderSpacing;
    664     OMX_BOOL bSVH;
    665     OMX_BOOL bGov;
    666     OMX_U32 nPFrames;
    667     OMX_U32 nBFrames;
    668     OMX_U32 nIDCVLCThreshold;
    669     OMX_BOOL bACPred;
    670     OMX_U32 nMaxPacketSize;
    671     OMX_U32 nTimeIncRes;
    672     OMX_VIDEO_MPEG4PROFILETYPE eProfile;
    673     OMX_VIDEO_MPEG4LEVELTYPE eLevel;
    674     OMX_U32 nAllowedPictureTypes;
    675     OMX_U32 nHeaderExtension;
    676     OMX_BOOL bReversibleVLC;
    677 } OMX_VIDEO_PARAM_MPEG4TYPE;
    678 
    679 
    680 /**
    681  * WMV Versions
    682  */
    683 typedef enum OMX_VIDEO_WMVFORMATTYPE {
    684     OMX_VIDEO_WMVFormatUnused = 0x01,   /**< Format unused or unknown */
    685     OMX_VIDEO_WMVFormat7      = 0x02,   /**< Windows Media Video format 7 */
    686     OMX_VIDEO_WMVFormat8      = 0x04,   /**< Windows Media Video format 8 */
    687     OMX_VIDEO_WMVFormat9      = 0x08,   /**< Windows Media Video format 9 */
    688     OMX_VIDEO_WMFFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    689     OMX_VIDEO_WMFFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    690     OMX_VIDEO_WMVFormatMax    = 0x7FFFFFFF
    691 } OMX_VIDEO_WMVFORMATTYPE;
    692 
    693 
    694 /**
    695  * WMV Params
    696  *
    697  * STRUCT MEMBERS:
    698  *  nSize      : Size of the structure in bytes
    699  *  nVersion   : OMX specification version information
    700  *  nPortIndex : Port that this structure applies to
    701  *  eFormat    : Version of WMV stream / data
    702  */
    703 typedef struct OMX_VIDEO_PARAM_WMVTYPE {
    704     OMX_U32 nSize;
    705     OMX_VERSIONTYPE nVersion;
    706     OMX_U32 nPortIndex;
    707     OMX_VIDEO_WMVFORMATTYPE eFormat;
    708 } OMX_VIDEO_PARAM_WMVTYPE;
    709 
    710 
    711 /**
    712  * Real Video Version
    713  */
    714 typedef enum OMX_VIDEO_RVFORMATTYPE {
    715     OMX_VIDEO_RVFormatUnused = 0, /**< Format unused or unknown */
    716     OMX_VIDEO_RVFormat8,          /**< Real Video format 8 */
    717     OMX_VIDEO_RVFormat9,          /**< Real Video format 9 */
    718     OMX_VIDEO_RVFormatG2,         /**< Real Video Format G2 */
    719     OMX_VIDEO_RVFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    720     OMX_VIDEO_RVFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    721     OMX_VIDEO_RVFormatMax = 0x7FFFFFFF
    722 } OMX_VIDEO_RVFORMATTYPE;
    723 
    724 
    725 /**
    726  * Real Video Params
    727  *
    728  * STUCT MEMBERS:
    729  *  nSize              : Size of the structure in bytes
    730  *  nVersion           : OMX specification version information
    731  *  nPortIndex         : Port that this structure applies to
    732  *  eFormat            : Version of RV stream / data
    733  *  nBitsPerPixel      : Bits per pixel coded in the frame
    734  *  nPaddedWidth       : Padded width in pixel of a video frame
    735  *  nPaddedHeight      : Padded Height in pixels of a video frame
    736  *  nFrameRate         : Rate of video in frames per second
    737  *  nBitstreamFlags    : Flags which internal information about the bitstream
    738  *  nBitstreamVersion  : Bitstream version
    739  *  nMaxEncodeFrameSize: Max encoded frame size
    740  *  bEnablePostFilter  : Turn on/off post filter
    741  *  bEnableTemporalInterpolation : Turn on/off temporal interpolation
    742  *  bEnableLatencyMode : When enabled, the decoder does not display a decoded
    743  *                       frame until it has detected that no enhancement layer
    744  *  					 frames or dependent B frames will be coming. This
    745  *  					 detection usually occurs when a subsequent non-B
    746  *  					 frame is encountered
    747  */
    748 typedef struct OMX_VIDEO_PARAM_RVTYPE {
    749     OMX_U32 nSize;
    750     OMX_VERSIONTYPE nVersion;
    751     OMX_U32 nPortIndex;
    752     OMX_VIDEO_RVFORMATTYPE eFormat;
    753     OMX_U16 nBitsPerPixel;
    754     OMX_U16 nPaddedWidth;
    755     OMX_U16 nPaddedHeight;
    756     OMX_U32 nFrameRate;
    757     OMX_U32 nBitstreamFlags;
    758     OMX_U32 nBitstreamVersion;
    759     OMX_U32 nMaxEncodeFrameSize;
    760     OMX_BOOL bEnablePostFilter;
    761     OMX_BOOL bEnableTemporalInterpolation;
    762     OMX_BOOL bEnableLatencyMode;
    763 } OMX_VIDEO_PARAM_RVTYPE;
    764 
    765 
    766 /**
    767  * AVC profile types, each profile indicates support for various
    768  * performance bounds and different annexes.
    769  */
    770 typedef enum OMX_VIDEO_AVCPROFILETYPE {
    771     OMX_VIDEO_AVCProfileBaseline = 0x01,   /**< Baseline profile */
    772     OMX_VIDEO_AVCProfileMain     = 0x02,   /**< Main profile */
    773     OMX_VIDEO_AVCProfileExtended = 0x04,   /**< Extended profile */
    774     OMX_VIDEO_AVCProfileHigh     = 0x08,   /**< High profile */
    775     OMX_VIDEO_AVCProfileHigh10   = 0x10,   /**< High 10 profile */
    776     OMX_VIDEO_AVCProfileHigh422  = 0x20,   /**< High 4:2:2 profile */
    777     OMX_VIDEO_AVCProfileHigh444  = 0x40,   /**< High 4:4:4 profile */
    778     OMX_VIDEO_AVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    779     OMX_VIDEO_AVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    780     OMX_VIDEO_AVCProfileMax      = 0x7FFFFFFF
    781 } OMX_VIDEO_AVCPROFILETYPE;
    782 
    783 
    784 /**
    785  * AVC level types, each level indicates support for various frame sizes,
    786  * bit rates, decoder frame rates.  No need
    787  */
    788 typedef enum OMX_VIDEO_AVCLEVELTYPE {
    789     OMX_VIDEO_AVCLevel1   = 0x01,     /**< Level 1 */
    790     OMX_VIDEO_AVCLevel1b  = 0x02,     /**< Level 1b */
    791     OMX_VIDEO_AVCLevel11  = 0x04,     /**< Level 1.1 */
    792     OMX_VIDEO_AVCLevel12  = 0x08,     /**< Level 1.2 */
    793     OMX_VIDEO_AVCLevel13  = 0x10,     /**< Level 1.3 */
    794     OMX_VIDEO_AVCLevel2   = 0x20,     /**< Level 2 */
    795     OMX_VIDEO_AVCLevel21  = 0x40,     /**< Level 2.1 */
    796     OMX_VIDEO_AVCLevel22  = 0x80,     /**< Level 2.2 */
    797     OMX_VIDEO_AVCLevel3   = 0x100,    /**< Level 3 */
    798     OMX_VIDEO_AVCLevel31  = 0x200,    /**< Level 3.1 */
    799     OMX_VIDEO_AVCLevel32  = 0x400,    /**< Level 3.2 */
    800     OMX_VIDEO_AVCLevel4   = 0x800,    /**< Level 4 */
    801     OMX_VIDEO_AVCLevel41  = 0x1000,   /**< Level 4.1 */
    802     OMX_VIDEO_AVCLevel42  = 0x2000,   /**< Level 4.2 */
    803     OMX_VIDEO_AVCLevel5   = 0x4000,   /**< Level 5 */
    804     OMX_VIDEO_AVCLevel51  = 0x8000,   /**< Level 5.1 */
    805     OMX_VIDEO_AVCLevel52  = 0x10000,   /**< Level 5.2 */
    806     OMX_VIDEO_AVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    807     OMX_VIDEO_AVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    808     OMX_VIDEO_AVCLevelMax = 0x7FFFFFFF
    809 } OMX_VIDEO_AVCLEVELTYPE;
    810 
    811 
    812 /**
    813  * AVC loop filter modes
    814  *
    815  * OMX_VIDEO_AVCLoopFilterEnable               : Enable
    816  * OMX_VIDEO_AVCLoopFilterDisable              : Disable
    817  * OMX_VIDEO_AVCLoopFilterDisableSliceBoundary : Disabled on slice boundaries
    818  */
    819 typedef enum OMX_VIDEO_AVCLOOPFILTERTYPE {
    820     OMX_VIDEO_AVCLoopFilterEnable = 0,
    821     OMX_VIDEO_AVCLoopFilterDisable,
    822     OMX_VIDEO_AVCLoopFilterDisableSliceBoundary,
    823     OMX_VIDEO_AVCLoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    824     OMX_VIDEO_AVCLoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    825     OMX_VIDEO_AVCLoopFilterMax = 0x7FFFFFFF
    826 } OMX_VIDEO_AVCLOOPFILTERTYPE;
    827 
    828 
    829 /**
    830  * AVC params
    831  *
    832  * STRUCT MEMBERS:
    833  *  nSize                     : Size of the structure in bytes
    834  *  nVersion                  : OMX specification version information
    835  *  nPortIndex                : Port that this structure applies to
    836  *  nSliceHeaderSpacing       : Number of macroblocks between slice header, put
    837  *                              zero if not used
    838  *  nPFrames                  : Number of P frames between each I frame
    839  *  nBFrames                  : Number of B frames between each I frame
    840  *  bUseHadamard              : Enable/disable Hadamard transform
    841  *  nRefFrames                : Max number of reference frames to use for inter
    842  *                              motion search (1-16)
    843  *  nRefIdxTrailing           : Pic param set ref frame index (index into ref
    844  *                              frame buffer of trailing frames list), B frame
    845  *                              support
    846  *  nRefIdxForward            : Pic param set ref frame index (index into ref
    847  *                              frame buffer of forward frames list), B frame
    848  *                              support
    849  *  bEnableUEP                : Enable/disable unequal error protection. This
    850  *                              is only valid of data partitioning is enabled.
    851  *  bEnableFMO                : Enable/disable flexible macroblock ordering
    852  *  bEnableASO                : Enable/disable arbitrary slice ordering
    853  *  bEnableRS                 : Enable/disable sending of redundant slices
    854  *  eProfile                  : AVC profile(s) to use
    855  *  eLevel                    : AVC level(s) to use
    856  *  nAllowedPictureTypes      : Specifies the picture types allowed in the
    857  *                              bitstream
    858  *  bFrameMBsOnly             : specifies that every coded picture of the
    859  *                              coded video sequence is a coded frame
    860  *                              containing only frame macroblocks
    861  *  bMBAFF                    : Enable/disable switching between frame and
    862  *                              field macroblocks within a picture
    863  *  bEntropyCodingCABAC       : Entropy decoding method to be applied for the
    864  *                              syntax elements for which two descriptors appear
    865  *                              in the syntax tables
    866  *  bWeightedPPrediction      : Enable/disable weighted prediction shall not
    867  *                              be applied to P and SP slices
    868  *  nWeightedBipredicitonMode : Default weighted prediction is applied to B
    869  *                              slices
    870  *  bconstIpred               : Enable/disable intra prediction
    871  *  bDirect8x8Inference       : Specifies the method used in the derivation
    872  *                              process for luma motion vectors for B_Skip,
    873  *                              B_Direct_16x16 and B_Direct_8x8 as specified
    874  *                              in subclause 8.4.1.2 of the AVC spec
    875  *  bDirectSpatialTemporal    : Flag indicating spatial or temporal direct
    876  *                              mode used in B slice coding (related to
    877  *                              bDirect8x8Inference) . Spatial direct mode is
    878  *                              more common and should be the default.
    879  *  nCabacInitIdx             : Index used to init CABAC contexts
    880  *  eLoopFilterMode           : Enable/disable loop filter
    881  */
    882 typedef struct OMX_VIDEO_PARAM_AVCTYPE {
    883     OMX_U32 nSize;
    884     OMX_VERSIONTYPE nVersion;
    885     OMX_U32 nPortIndex;
    886     OMX_U32 nSliceHeaderSpacing;
    887     OMX_U32 nPFrames;
    888     OMX_U32 nBFrames;
    889     OMX_BOOL bUseHadamard;
    890     OMX_U32 nRefFrames;
    891 	OMX_U32 nRefIdx10ActiveMinus1;
    892 	OMX_U32 nRefIdx11ActiveMinus1;
    893     OMX_BOOL bEnableUEP;
    894     OMX_BOOL bEnableFMO;
    895     OMX_BOOL bEnableASO;
    896     OMX_BOOL bEnableRS;
    897     OMX_VIDEO_AVCPROFILETYPE eProfile;
    898 	OMX_VIDEO_AVCLEVELTYPE eLevel;
    899     OMX_U32 nAllowedPictureTypes;
    900 	OMX_BOOL bFrameMBsOnly;
    901     OMX_BOOL bMBAFF;
    902     OMX_BOOL bEntropyCodingCABAC;
    903     OMX_BOOL bWeightedPPrediction;
    904     OMX_U32 nWeightedBipredicitonMode;
    905     OMX_BOOL bconstIpred ;
    906     OMX_BOOL bDirect8x8Inference;
    907 	OMX_BOOL bDirectSpatialTemporal;
    908 	OMX_U32 nCabacInitIdc;
    909 	OMX_VIDEO_AVCLOOPFILTERTYPE eLoopFilterMode;
    910 } OMX_VIDEO_PARAM_AVCTYPE;
    911 
    912 typedef struct OMX_VIDEO_PARAM_PROFILELEVELTYPE {
    913    OMX_U32 nSize;
    914    OMX_VERSIONTYPE nVersion;
    915    OMX_U32 nPortIndex;
    916    OMX_U32 eProfile;      /**< type is OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263PROFILETYPE,
    917                                  or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
    918    OMX_U32 eLevel;        /**< type is OMX_VIDEO_AVCLEVELTYPE, OMX_VIDEO_H263LEVELTYPE,
    919                                  or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
    920    OMX_U32 nProfileIndex; /**< Used to query for individual profile support information,
    921                                This parameter is valid only for
    922                                OMX_IndexParamVideoProfileLevelQuerySupported index,
    923                                For all other indices this parameter is to be ignored. */
    924 } OMX_VIDEO_PARAM_PROFILELEVELTYPE;
    925 
    926 /**
    927  * Structure for dynamically configuring bitrate mode of a codec.
    928  *
    929  * STRUCT MEMBERS:
    930  *  nSize          : Size of the struct in bytes
    931  *  nVersion       : OMX spec version info
    932  *  nPortIndex     : Port that this struct applies to
    933  *  nEncodeBitrate : Target average bitrate to be generated in bps
    934  */
    935 typedef struct OMX_VIDEO_CONFIG_BITRATETYPE {
    936     OMX_U32 nSize;
    937     OMX_VERSIONTYPE nVersion;
    938     OMX_U32 nPortIndex;
    939     OMX_U32 nEncodeBitrate;
    940 } OMX_VIDEO_CONFIG_BITRATETYPE;
    941 
    942 /**
    943  * Defines Encoder Frame Rate setting
    944  *
    945  * STRUCT MEMBERS:
    946  *  nSize            : Size of the structure in bytes
    947  *  nVersion         : OMX specification version information
    948  *  nPortIndex       : Port that this structure applies to
    949  *  xEncodeFramerate : Encoding framerate represented in Q16 format
    950  */
    951 typedef struct OMX_CONFIG_FRAMERATETYPE {
    952     OMX_U32 nSize;
    953     OMX_VERSIONTYPE nVersion;
    954     OMX_U32 nPortIndex;
    955     OMX_U32 xEncodeFramerate; /* Q16 format */
    956 } OMX_CONFIG_FRAMERATETYPE;
    957 
    958 typedef struct OMX_CONFIG_INTRAREFRESHVOPTYPE {
    959     OMX_U32 nSize;
    960     OMX_VERSIONTYPE nVersion;
    961     OMX_U32 nPortIndex;
    962     OMX_BOOL IntraRefreshVOP;
    963 } OMX_CONFIG_INTRAREFRESHVOPTYPE;
    964 
    965 typedef struct OMX_CONFIG_MACROBLOCKERRORMAPTYPE {
    966     OMX_U32 nSize;
    967     OMX_VERSIONTYPE nVersion;
    968     OMX_U32 nPortIndex;
    969     OMX_U32 nErrMapSize;           /* Size of the Error Map in bytes */
    970     OMX_U8  ErrMap[1];             /* Error map hint */
    971 } OMX_CONFIG_MACROBLOCKERRORMAPTYPE;
    972 
    973 typedef struct OMX_CONFIG_MBERRORREPORTINGTYPE {
    974     OMX_U32 nSize;
    975     OMX_VERSIONTYPE nVersion;
    976     OMX_U32 nPortIndex;
    977     OMX_BOOL bEnabled;
    978 } OMX_CONFIG_MBERRORREPORTINGTYPE;
    979 
    980 typedef struct OMX_PARAM_MACROBLOCKSTYPE {
    981     OMX_U32 nSize;
    982     OMX_VERSIONTYPE nVersion;
    983     OMX_U32 nPortIndex;
    984     OMX_U32 nMacroblocks;
    985 } OMX_PARAM_MACROBLOCKSTYPE;
    986 
    987 /**
    988  * AVC Slice Mode modes
    989  *
    990  * OMX_VIDEO_SLICEMODE_AVCDefault   : Normal frame encoding, one slice per frame
    991  * OMX_VIDEO_SLICEMODE_AVCMBSlice   : NAL mode, number of MBs per frame
    992  * OMX_VIDEO_SLICEMODE_AVCByteSlice : NAL mode, number of bytes per frame
    993  */
    994 typedef enum OMX_VIDEO_AVCSLICEMODETYPE {
    995     OMX_VIDEO_SLICEMODE_AVCDefault = 0,
    996     OMX_VIDEO_SLICEMODE_AVCMBSlice,
    997     OMX_VIDEO_SLICEMODE_AVCByteSlice,
    998     OMX_VIDEO_SLICEMODE_AVCKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    999     OMX_VIDEO_SLICEMODE_AVCVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
   1000     OMX_VIDEO_SLICEMODE_AVCLevelMax = 0x7FFFFFFF
   1001 } OMX_VIDEO_AVCSLICEMODETYPE;
   1002 
   1003 /**
   1004  * AVC FMO Slice Mode Params
   1005  *
   1006  * STRUCT MEMBERS:
   1007  *  nSize      : Size of the structure in bytes
   1008  *  nVersion   : OMX specification version information
   1009  *  nPortIndex : Port that this structure applies to
   1010  *  nNumSliceGroups : Specifies the number of slice groups
   1011  *  nSliceGroupMapType : Specifies the type of slice groups
   1012  *  eSliceMode : Specifies the type of slice
   1013  */
   1014 typedef struct OMX_VIDEO_PARAM_AVCSLICEFMO {
   1015     OMX_U32 nSize;
   1016     OMX_VERSIONTYPE nVersion;
   1017     OMX_U32 nPortIndex;
   1018     OMX_U8 nNumSliceGroups;
   1019     OMX_U8 nSliceGroupMapType;
   1020     OMX_VIDEO_AVCSLICEMODETYPE eSliceMode;
   1021 } OMX_VIDEO_PARAM_AVCSLICEFMO;
   1022 
   1023 /**
   1024  * AVC IDR Period Configs
   1025  *
   1026  * STRUCT MEMBERS:
   1027  *  nSize      : Size of the structure in bytes
   1028  *  nVersion   : OMX specification version information
   1029  *  nPortIndex : Port that this structure applies to
   1030  *  nIDRPeriod : Specifies periodicity of IDR frames
   1031  *  nPFrames : Specifies internal of coding Intra frames
   1032  */
   1033 typedef struct OMX_VIDEO_CONFIG_AVCINTRAPERIOD {
   1034     OMX_U32 nSize;
   1035     OMX_VERSIONTYPE nVersion;
   1036     OMX_U32 nPortIndex;
   1037     OMX_U32 nIDRPeriod;
   1038     OMX_U32 nPFrames;
   1039 } OMX_VIDEO_CONFIG_AVCINTRAPERIOD;
   1040 
   1041 /**
   1042  * AVC NAL Size Configs
   1043  *
   1044  * STRUCT MEMBERS:
   1045  *  nSize      : Size of the structure in bytes
   1046  *  nVersion   : OMX specification version information
   1047  *  nPortIndex : Port that this structure applies to
   1048  *  nNaluBytes : Specifies the NAL unit size
   1049  */
   1050 typedef struct OMX_VIDEO_CONFIG_NALSIZE {
   1051     OMX_U32 nSize;
   1052     OMX_VERSIONTYPE nVersion;
   1053     OMX_U32 nPortIndex;
   1054     OMX_U32 nNaluBytes;
   1055 } OMX_VIDEO_CONFIG_NALSIZE;
   1056 
   1057 
   1058 /**
   1059  * Deinterlace Config
   1060  *
   1061  * STRUCT MEMBERS:
   1062  *  nSize      : Size of the structure in bytes
   1063  *  nVersion   : OMX specification version information
   1064  *  nPortIndex : Port that this structure applies to
   1065  *  nEnable : Specifies to enable deinterlace
   1066  */
   1067 typedef struct OMX_VIDEO_CONFIG_DEINTERLACE {
   1068     OMX_U32 nSize;
   1069     OMX_VERSIONTYPE nVersion;
   1070     OMX_U32 nPortIndex;
   1071     OMX_U32 nEnable;
   1072 } OMX_VIDEO_CONFIG_DEINTERLACE;
   1073 
   1074 /** @} */
   1075 
   1076 #ifdef __cplusplus
   1077 }
   1078 #endif /* __cplusplus */
   1079 
   1080 #endif
   1081 /* File EOF */
   1082 
   1083