Home | History | Annotate | Download | only in inc
      1 /* ------------------------------------------------------------------
      2  * Copyright (C) 1998-2009 PacketVideo
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
     13  * express or implied.
     14  * See the License for the specific language governing permissions
     15  * and limitations under the License.
     16  * -------------------------------------------------------------------
     17  */
     18 /**
     19  * Copyright (c) 2008 The Khronos Group Inc.
     20  *
     21  * Permission is hereby granted, free of charge, to any person obtaining
     22  * a copy of this software and associated documentation files (the
     23  * "Software"), to deal in the Software without restriction, including
     24  * without limitation the rights to use, copy, modify, merge, publish,
     25  * distribute, sublicense, and/or sell copies of the Software, and to
     26  * permit persons to whom the Software is furnished to do so, subject
     27  * to the following conditions:
     28  * The above copyright notice and this permission notice shall be included
     29  * in all copies or substantial portions of the Software.
     30  *
     31  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
     32  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     33  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
     34  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
     35  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
     36  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
     37  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     38  *
     39  */
     40 
     41 /**
     42  * @file OMX_IVCommon.h - OpenMax IL version 1.1.2
     43  *  The structures needed by Video and Image components to exchange
     44  *  parameters and configuration data with the components.
     45  */
     46 #ifndef OMX_IVCommon_h
     47 #define OMX_IVCommon_h
     48 
     49 #ifdef __cplusplus
     50 extern "C" {
     51 #endif /* __cplusplus */
     52 
     53 /**
     54  * Each OMX header must include all required header files to allow the header
     55  * to compile without errors.  The includes below are required for this header
     56  * file to compile successfully
     57  */
     58 
     59 #include <OMX_Core.h>
     60 
     61 /** @defgroup iv OpenMAX IL Imaging and Video Domain
     62  * Common structures for OpenMAX IL Imaging and Video domains
     63  * @{
     64  */
     65 
     66 
     67 /**
     68  * Enumeration defining possible uncompressed image/video formats.
     69  *
     70  * ENUMS:
     71  *  Unused                 : Placeholder value when format is N/A
     72  *  Monochrome             : black and white
     73  *  8bitRGB332             : Red 7:5, Green 4:2, Blue 1:0
     74  *  12bitRGB444            : Red 11:8, Green 7:4, Blue 3:0
     75  *  16bitARGB4444          : Alpha 15:12, Red 11:8, Green 7:4, Blue 3:0
     76  *  16bitARGB1555          : Alpha 15, Red 14:10, Green 9:5, Blue 4:0
     77  *  16bitRGB565            : Red 15:11, Green 10:5, Blue 4:0
     78  *  16bitBGR565            : Blue 15:11, Green 10:5, Red 4:0
     79  *  18bitRGB666            : Red 17:12, Green 11:6, Blue 5:0
     80  *  18bitARGB1665          : Alpha 17, Red 16:11, Green 10:5, Blue 4:0
     81  *  19bitARGB1666          : Alpha 18, Red 17:12, Green 11:6, Blue 5:0
     82  *  24bitRGB888            : Red 24:16, Green 15:8, Blue 7:0
     83  *  24bitBGR888            : Blue 24:16, Green 15:8, Red 7:0
     84  *  24bitARGB1887          : Alpha 23, Red 22:15, Green 14:7, Blue 6:0
     85  *  25bitARGB1888          : Alpha 24, Red 23:16, Green 15:8, Blue 7:0
     86  *  32bitBGRA8888          : Blue 31:24, Green 23:16, Red 15:8, Alpha 7:0
     87  *  32bitARGB8888          : Alpha 31:24, Red 23:16, Green 15:8, Blue 7:0
     88  *  YUV411Planar           : U,Y are subsampled by a factor of 4 horizontally
     89  *  YUV411PackedPlanar     : packed per payload in planar slices
     90  *  YUV420Planar           : Three arrays Y,U,V.
     91  *  YUV420PackedPlanar     : packed per payload in planar slices
     92  *  YUV420SemiPlanar       : Two arrays, one is all Y, the other is U and V
     93  *  YUV422Planar           : Three arrays Y,U,V.
     94  *  YUV422PackedPlanar     : packed per payload in planar slices
     95  *  YUV422SemiPlanar       : Two arrays, one is all Y, the other is U and V
     96  *  YCbYCr                 : Organized as 16bit YUYV (i.e. YCbYCr)
     97  *  YCrYCb                 : Organized as 16bit YVYU (i.e. YCrYCb)
     98  *  CbYCrY                 : Organized as 16bit UYVY (i.e. CbYCrY)
     99  *  CrYCbY                 : Organized as 16bit VYUY (i.e. CrYCbY)
    100  *  YUV444Interleaved      : Each pixel contains equal parts YUV
    101  *  RawBayer8bit           : SMIA camera output format
    102  *  RawBayer10bit          : SMIA camera output format
    103  *  RawBayer8bitcompressed : SMIA camera output format
    104  */
    105 typedef enum OMX_COLOR_FORMATTYPE {
    106     OMX_COLOR_FormatUnused,
    107     OMX_COLOR_FormatMonochrome,
    108     OMX_COLOR_Format8bitRGB332,
    109     OMX_COLOR_Format12bitRGB444,
    110     OMX_COLOR_Format16bitARGB4444,
    111     OMX_COLOR_Format16bitARGB1555,
    112     OMX_COLOR_Format16bitRGB565,
    113     OMX_COLOR_Format16bitBGR565,
    114     OMX_COLOR_Format18bitRGB666,
    115     OMX_COLOR_Format18bitARGB1665,
    116     OMX_COLOR_Format19bitARGB1666,
    117     OMX_COLOR_Format24bitRGB888,
    118     OMX_COLOR_Format24bitBGR888,
    119     OMX_COLOR_Format24bitARGB1887,
    120     OMX_COLOR_Format25bitARGB1888,
    121     OMX_COLOR_Format32bitBGRA8888,
    122     OMX_COLOR_Format32bitARGB8888,
    123     OMX_COLOR_FormatYUV411Planar,
    124     OMX_COLOR_FormatYUV411PackedPlanar,
    125     OMX_COLOR_FormatYUV420Planar,
    126     OMX_COLOR_FormatYUV420PackedPlanar,
    127     OMX_COLOR_FormatYUV420SemiPlanar,
    128     OMX_COLOR_FormatYUV422Planar,
    129     OMX_COLOR_FormatYUV422PackedPlanar,
    130     OMX_COLOR_FormatYUV422SemiPlanar,
    131     OMX_COLOR_FormatYCbYCr,
    132     OMX_COLOR_FormatYCrYCb,
    133     OMX_COLOR_FormatCbYCrY,
    134     OMX_COLOR_FormatCrYCbY,
    135     OMX_COLOR_FormatYUV444Interleaved,
    136     OMX_COLOR_FormatRawBayer8bit,
    137     OMX_COLOR_FormatRawBayer10bit,
    138     OMX_COLOR_FormatRawBayer8bitcompressed,
    139     OMX_COLOR_FormatL2,
    140     OMX_COLOR_FormatL4,
    141     OMX_COLOR_FormatL8,
    142     OMX_COLOR_FormatL16,
    143     OMX_COLOR_FormatL24,
    144     OMX_COLOR_FormatL32,
    145     OMX_COLOR_FormatYUV420PackedSemiPlanar,
    146     OMX_COLOR_FormatYUV422PackedSemiPlanar,
    147     OMX_COLOR_Format18BitBGR666,
    148     OMX_COLOR_Format24BitARGB6666,
    149     OMX_COLOR_Format24BitABGR6666,
    150     OMX_COLOR_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    151     OMX_COLOR_FormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    152     /**<Reserved android opaque colorformat. Tells the encoder that
    153      * the actual colorformat will be  relayed by the
    154      * Gralloc Buffers.
    155      * FIXME: In the process of reserving some enum values for
    156      * Android-specific OMX IL colorformats. Change this enum to
    157      * an acceptable range once that is done.
    158      * */
    159     OMX_COLOR_FormatAndroidOpaque = 0x7F000789,
    160     OMX_QCOM_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00,
    161     OMX_COLOR_FormatMax = 0x7FFFFFFF
    162 } OMX_COLOR_FORMATTYPE;
    163 
    164 
    165 /**
    166  * Defines the matrix for conversion from RGB to YUV or vice versa.
    167  * iColorMatrix should be initialized with the fixed point values
    168  * used in converting between formats.
    169  */
    170 typedef struct OMX_CONFIG_COLORCONVERSIONTYPE {
    171     OMX_U32 nSize;              /**< Size of the structure in bytes */
    172     OMX_VERSIONTYPE nVersion;   /**< OMX specification version info */
    173     OMX_U32 nPortIndex;         /**< Port that this struct applies to */
    174     OMX_S32 xColorMatrix[3][3]; /**< Stored in signed Q16 format */
    175     OMX_S32 xColorOffset[4];    /**< Stored in signed Q16 format */
    176 }OMX_CONFIG_COLORCONVERSIONTYPE;
    177 
    178 
    179 /**
    180  * Structure defining percent to scale each frame dimension.  For example:
    181  * To make the width 50% larger, use fWidth = 1.5 and to make the width
    182  * 1/2 the original size, use fWidth = 0.5
    183  */
    184 typedef struct OMX_CONFIG_SCALEFACTORTYPE {
    185     OMX_U32 nSize;            /**< Size of the structure in bytes */
    186     OMX_VERSIONTYPE nVersion; /**< OMX specification version info */
    187     OMX_U32 nPortIndex;       /**< Port that this struct applies to */
    188     OMX_S32 xWidth;           /**< Fixed point value stored as Q16 */
    189     OMX_S32 xHeight;          /**< Fixed point value stored as Q16 */
    190 }OMX_CONFIG_SCALEFACTORTYPE;
    191 
    192 
    193 /**
    194  * Enumeration of possible image filter types
    195  */
    196 typedef enum OMX_IMAGEFILTERTYPE {
    197     OMX_ImageFilterNone,
    198     OMX_ImageFilterNoise,
    199     OMX_ImageFilterEmboss,
    200     OMX_ImageFilterNegative,
    201     OMX_ImageFilterSketch,
    202     OMX_ImageFilterOilPaint,
    203     OMX_ImageFilterHatch,
    204     OMX_ImageFilterGpen,
    205     OMX_ImageFilterAntialias,
    206     OMX_ImageFilterDeRing,
    207     OMX_ImageFilterSolarize,
    208     OMX_ImageFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    209     OMX_ImageFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    210     OMX_ImageFilterMax = 0x7FFFFFFF
    211 } OMX_IMAGEFILTERTYPE;
    212 
    213 
    214 /**
    215  * Image filter configuration
    216  *
    217  * STRUCT MEMBERS:
    218  *  nSize        : Size of the structure in bytes
    219  *  nVersion     : OMX specification version information
    220  *  nPortIndex   : Port that this structure applies to
    221  *  eImageFilter : Image filter type enumeration
    222  */
    223 typedef struct OMX_CONFIG_IMAGEFILTERTYPE {
    224     OMX_U32 nSize;
    225     OMX_VERSIONTYPE nVersion;
    226     OMX_U32 nPortIndex;
    227     OMX_IMAGEFILTERTYPE eImageFilter;
    228 } OMX_CONFIG_IMAGEFILTERTYPE;
    229 
    230 
    231 /**
    232  * Customized U and V for color enhancement
    233  *
    234  * STRUCT MEMBERS:
    235  *  nSize             : Size of the structure in bytes
    236  *  nVersion          : OMX specification version information
    237  *  nPortIndex        : Port that this structure applies to
    238  *  bColorEnhancement : Enable/disable color enhancement
    239  *  nCustomizedU      : Practical values: 16-240, range: 0-255, value set for
    240  *                      U component
    241  *  nCustomizedV      : Practical values: 16-240, range: 0-255, value set for
    242  *                      V component
    243  */
    244 typedef struct OMX_CONFIG_COLORENHANCEMENTTYPE {
    245     OMX_U32 nSize;
    246     OMX_VERSIONTYPE nVersion;
    247     OMX_U32 nPortIndex;
    248     OMX_BOOL bColorEnhancement;
    249     OMX_U8 nCustomizedU;
    250     OMX_U8 nCustomizedV;
    251 } OMX_CONFIG_COLORENHANCEMENTTYPE;
    252 
    253 
    254 /**
    255  * Define color key and color key mask
    256  *
    257  * STRUCT MEMBERS:
    258  *  nSize      : Size of the structure in bytes
    259  *  nVersion   : OMX specification version information
    260  *  nPortIndex : Port that this structure applies to
    261  *  nARGBColor : 32bit Alpha, Red, Green, Blue Color
    262  *  nARGBMask  : 32bit Mask for Alpha, Red, Green, Blue channels
    263  */
    264 typedef struct OMX_CONFIG_COLORKEYTYPE {
    265     OMX_U32 nSize;
    266     OMX_VERSIONTYPE nVersion;
    267     OMX_U32 nPortIndex;
    268     OMX_U32 nARGBColor;
    269     OMX_U32 nARGBMask;
    270 } OMX_CONFIG_COLORKEYTYPE;
    271 
    272 
    273 /**
    274  * List of color blend types for pre/post processing
    275  *
    276  * ENUMS:
    277  *  None          : No color blending present
    278  *  AlphaConstant : Function is (alpha_constant * src) +
    279  *                  (1 - alpha_constant) * dst)
    280  *  AlphaPerPixel : Function is (alpha * src) + (1 - alpha) * dst)
    281  *  Alternate     : Function is alternating pixels from src and dst
    282  *  And           : Function is (src & dst)
    283  *  Or            : Function is (src | dst)
    284  *  Invert        : Function is ~src
    285  */
    286 typedef enum OMX_COLORBLENDTYPE {
    287     OMX_ColorBlendNone,
    288     OMX_ColorBlendAlphaConstant,
    289     OMX_ColorBlendAlphaPerPixel,
    290     OMX_ColorBlendAlternate,
    291     OMX_ColorBlendAnd,
    292     OMX_ColorBlendOr,
    293     OMX_ColorBlendInvert,
    294     OMX_ColorBlendKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    295     OMX_ColorBlendVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    296     OMX_ColorBlendMax = 0x7FFFFFFF
    297 } OMX_COLORBLENDTYPE;
    298 
    299 
    300 /**
    301  * Color blend configuration
    302  *
    303  * STRUCT MEMBERS:
    304  *  nSize             : Size of the structure in bytes
    305  *  nVersion          : OMX specification version information
    306  *  nPortIndex        : Port that this structure applies to
    307  *  nRGBAlphaConstant : Constant global alpha values when global alpha is used
    308  *  eColorBlend       : Color blend type enumeration
    309  */
    310 typedef struct OMX_CONFIG_COLORBLENDTYPE {
    311     OMX_U32 nSize;
    312     OMX_VERSIONTYPE nVersion;
    313     OMX_U32 nPortIndex;
    314     OMX_U32 nRGBAlphaConstant;
    315     OMX_COLORBLENDTYPE  eColorBlend;
    316 } OMX_CONFIG_COLORBLENDTYPE;
    317 
    318 
    319 /**
    320  * Hold frame dimension
    321  *
    322  * STRUCT MEMBERS:
    323  *  nSize      : Size of the structure in bytes
    324  *  nVersion   : OMX specification version information
    325  *  nPortIndex : Port that this structure applies to
    326  *  nWidth     : Frame width in pixels
    327  *  nHeight    : Frame height in pixels
    328  */
    329 typedef struct OMX_FRAMESIZETYPE {
    330     OMX_U32 nSize;
    331     OMX_VERSIONTYPE nVersion;
    332     OMX_U32 nPortIndex;
    333     OMX_U32 nWidth;
    334     OMX_U32 nHeight;
    335 } OMX_FRAMESIZETYPE;
    336 
    337 
    338 /**
    339  * Rotation configuration
    340  *
    341  * STRUCT MEMBERS:
    342  *  nSize      : Size of the structure in bytes
    343  *  nVersion   : OMX specification version information
    344  *  nPortIndex : Port that this structure applies to
    345  *  nRotation  : +/- integer rotation value
    346  */
    347 typedef struct OMX_CONFIG_ROTATIONTYPE {
    348     OMX_U32 nSize;
    349     OMX_VERSIONTYPE nVersion;
    350     OMX_U32 nPortIndex;
    351     OMX_S32 nRotation;
    352 } OMX_CONFIG_ROTATIONTYPE;
    353 
    354 
    355 /**
    356  * Possible mirroring directions for pre/post processing
    357  *
    358  * ENUMS:
    359  *  None       : No mirroring
    360  *  Vertical   : Vertical mirroring, flip on X axis
    361  *  Horizontal : Horizontal mirroring, flip on Y axis
    362  *  Both       : Both vertical and horizontal mirroring
    363  */
    364 typedef enum OMX_MIRRORTYPE {
    365     OMX_MirrorNone = 0,
    366     OMX_MirrorVertical,
    367     OMX_MirrorHorizontal,
    368     OMX_MirrorBoth,
    369     OMX_MirrorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    370     OMX_MirrorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    371     OMX_MirrorMax = 0x7FFFFFFF
    372 } OMX_MIRRORTYPE;
    373 
    374 
    375 /**
    376  * Mirroring configuration
    377  *
    378  * STRUCT MEMBERS:
    379  *  nSize      : Size of the structure in bytes
    380  *  nVersion   : OMX specification version information
    381  *  nPortIndex : Port that this structure applies to
    382  *  eMirror    : Mirror type enumeration
    383  */
    384 typedef struct OMX_CONFIG_MIRRORTYPE {
    385     OMX_U32 nSize;
    386     OMX_VERSIONTYPE nVersion;
    387     OMX_U32 nPortIndex;
    388     OMX_MIRRORTYPE  eMirror;
    389 } OMX_CONFIG_MIRRORTYPE;
    390 
    391 
    392 /**
    393  * Position information only
    394  *
    395  * STRUCT MEMBERS:
    396  *  nSize      : Size of the structure in bytes
    397  *  nVersion   : OMX specification version information
    398  *  nPortIndex : Port that this structure applies to
    399  *  nX         : X coordinate for the point
    400  *  nY         : Y coordinate for the point
    401  */
    402 typedef struct OMX_CONFIG_POINTTYPE {
    403     OMX_U32 nSize;
    404     OMX_VERSIONTYPE nVersion;
    405     OMX_U32 nPortIndex;
    406     OMX_S32 nX;
    407     OMX_S32 nY;
    408 } OMX_CONFIG_POINTTYPE;
    409 
    410 
    411 /**
    412  * Frame size plus position
    413  *
    414  * STRUCT MEMBERS:
    415  *  nSize      : Size of the structure in bytes
    416  *  nVersion   : OMX specification version information
    417  *  nPortIndex : Port that this structure applies to
    418  *  nLeft      : X Coordinate of the top left corner of the rectangle
    419  *  nTop       : Y Coordinate of the top left corner of the rectangle
    420  *  nWidth     : Width of the rectangle
    421  *  nHeight    : Height of the rectangle
    422  */
    423 typedef struct OMX_CONFIG_RECTTYPE {
    424     OMX_U32 nSize;
    425     OMX_VERSIONTYPE nVersion;
    426     OMX_U32 nPortIndex;
    427     OMX_S32 nLeft;
    428     OMX_S32 nTop;
    429     OMX_U32 nWidth;
    430     OMX_U32 nHeight;
    431 } OMX_CONFIG_RECTTYPE;
    432 
    433 
    434 /**
    435  * Deblocking state; it is required to be set up before starting the codec
    436  *
    437  * STRUCT MEMBERS:
    438  *  nSize       : Size of the structure in bytes
    439  *  nVersion    : OMX specification version information
    440  *  nPortIndex  : Port that this structure applies to
    441  *  bDeblocking : Enable/disable deblocking mode
    442  */
    443 typedef struct OMX_PARAM_DEBLOCKINGTYPE {
    444     OMX_U32 nSize;
    445     OMX_VERSIONTYPE nVersion;
    446     OMX_U32 nPortIndex;
    447     OMX_BOOL bDeblocking;
    448 } OMX_PARAM_DEBLOCKINGTYPE;
    449 
    450 
    451 /**
    452  * Stabilization state
    453  *
    454  * STRUCT MEMBERS:
    455  *  nSize      : Size of the structure in bytes
    456  *  nVersion   : OMX specification version information
    457  *  nPortIndex : Port that this structure applies to
    458  *  bStab      : Enable/disable frame stabilization state
    459  */
    460 typedef struct OMX_CONFIG_FRAMESTABTYPE {
    461     OMX_U32 nSize;
    462     OMX_VERSIONTYPE nVersion;
    463     OMX_U32 nPortIndex;
    464     OMX_BOOL bStab;
    465 } OMX_CONFIG_FRAMESTABTYPE;
    466 
    467 
    468 /**
    469  * White Balance control type
    470  *
    471  * STRUCT MEMBERS:
    472  *  SunLight : Referenced in JSR-234
    473  *  Flash    : Optimal for device's integrated flash
    474  */
    475 typedef enum OMX_WHITEBALCONTROLTYPE {
    476     OMX_WhiteBalControlOff = 0,
    477     OMX_WhiteBalControlAuto,
    478     OMX_WhiteBalControlSunLight,
    479     OMX_WhiteBalControlCloudy,
    480     OMX_WhiteBalControlShade,
    481     OMX_WhiteBalControlTungsten,
    482     OMX_WhiteBalControlFluorescent,
    483     OMX_WhiteBalControlIncandescent,
    484     OMX_WhiteBalControlFlash,
    485     OMX_WhiteBalControlHorizon,
    486     OMX_WhiteBalControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    487     OMX_WhiteBalControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    488     OMX_WhiteBalControlMax = 0x7FFFFFFF
    489 } OMX_WHITEBALCONTROLTYPE;
    490 
    491 
    492 /**
    493  * White Balance control configuration
    494  *
    495  * STRUCT MEMBERS:
    496  *  nSize            : Size of the structure in bytes
    497  *  nVersion         : OMX specification version information
    498  *  nPortIndex       : Port that this structure applies to
    499  *  eWhiteBalControl : White balance enumeration
    500  */
    501 typedef struct OMX_CONFIG_WHITEBALCONTROLTYPE {
    502     OMX_U32 nSize;
    503     OMX_VERSIONTYPE nVersion;
    504     OMX_U32 nPortIndex;
    505     OMX_WHITEBALCONTROLTYPE eWhiteBalControl;
    506 } OMX_CONFIG_WHITEBALCONTROLTYPE;
    507 
    508 
    509 /**
    510  * Exposure control type
    511  */
    512 typedef enum OMX_EXPOSURECONTROLTYPE {
    513     OMX_ExposureControlOff = 0,
    514     OMX_ExposureControlAuto,
    515     OMX_ExposureControlNight,
    516     OMX_ExposureControlBackLight,
    517     OMX_ExposureControlSpotLight,
    518     OMX_ExposureControlSports,
    519     OMX_ExposureControlSnow,
    520     OMX_ExposureControlBeach,
    521     OMX_ExposureControlLargeAperture,
    522     OMX_ExposureControlSmallApperture,
    523     OMX_ExposureControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    524     OMX_ExposureControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    525     OMX_ExposureControlMax = 0x7FFFFFFF
    526 } OMX_EXPOSURECONTROLTYPE;
    527 
    528 
    529 /**
    530  * White Balance control configuration
    531  *
    532  * STRUCT MEMBERS:
    533  *  nSize            : Size of the structure in bytes
    534  *  nVersion         : OMX specification version information
    535  *  nPortIndex       : Port that this structure applies to
    536  *  eExposureControl : Exposure control enumeration
    537  */
    538 typedef struct OMX_CONFIG_EXPOSURECONTROLTYPE {
    539     OMX_U32 nSize;
    540     OMX_VERSIONTYPE nVersion;
    541     OMX_U32 nPortIndex;
    542     OMX_EXPOSURECONTROLTYPE eExposureControl;
    543 } OMX_CONFIG_EXPOSURECONTROLTYPE;
    544 
    545 
    546 /**
    547  * Defines sensor supported mode.
    548  *
    549  * STRUCT MEMBERS:
    550  *  nSize      : Size of the structure in bytes
    551  *  nVersion   : OMX specification version information
    552  *  nPortIndex : Port that this structure applies to
    553  *  nFrameRate : Single shot mode is indicated by a 0
    554  *  bOneShot   : Enable for single shot, disable for streaming
    555  *  sFrameSize : Framesize
    556  */
    557 typedef struct OMX_PARAM_SENSORMODETYPE {
    558     OMX_U32 nSize;
    559     OMX_VERSIONTYPE nVersion;
    560     OMX_U32 nPortIndex;
    561     OMX_U32 nFrameRate;
    562     OMX_BOOL bOneShot;
    563     OMX_FRAMESIZETYPE sFrameSize;
    564 } OMX_PARAM_SENSORMODETYPE;
    565 
    566 
    567 /**
    568  * Defines contrast level
    569  *
    570  * STRUCT MEMBERS:
    571  *  nSize      : Size of the structure in bytes
    572  *  nVersion   : OMX specification version information
    573  *  nPortIndex : Port that this structure applies to
    574  *  nContrast  : Values allowed for contrast -100 to 100, zero means no change
    575  */
    576 typedef struct OMX_CONFIG_CONTRASTTYPE {
    577     OMX_U32 nSize;
    578     OMX_VERSIONTYPE nVersion;
    579     OMX_U32 nPortIndex;
    580     OMX_S32 nContrast;
    581 } OMX_CONFIG_CONTRASTTYPE;
    582 
    583 
    584 /**
    585  * Defines brightness level
    586  *
    587  * STRUCT MEMBERS:
    588  *  nSize       : Size of the structure in bytes
    589  *  nVersion    : OMX specification version information
    590  *  nPortIndex  : Port that this structure applies to
    591  *  nBrightness : 0-100%
    592  */
    593 typedef struct OMX_CONFIG_BRIGHTNESSTYPE {
    594     OMX_U32 nSize;
    595     OMX_VERSIONTYPE nVersion;
    596     OMX_U32 nPortIndex;
    597     OMX_U32 nBrightness;
    598 } OMX_CONFIG_BRIGHTNESSTYPE;
    599 
    600 
    601 /**
    602  * Defines backlight level configuration for a video sink, e.g. LCD panel
    603  *
    604  * STRUCT MEMBERS:
    605  *  nSize      : Size of the structure in bytes
    606  *  nVersion   : OMX specification version information
    607  *  nPortIndex : Port that this structure applies to
    608  *  nBacklight : Values allowed for backlight 0-100%
    609  *  nTimeout   : Number of milliseconds before backlight automatically turns
    610  *               off.  A value of 0x0 disables backight timeout
    611  */
    612 typedef struct OMX_CONFIG_BACKLIGHTTYPE {
    613     OMX_U32 nSize;
    614     OMX_VERSIONTYPE nVersion;
    615     OMX_U32 nPortIndex;
    616     OMX_U32 nBacklight;
    617     OMX_U32 nTimeout;
    618 } OMX_CONFIG_BACKLIGHTTYPE;
    619 
    620 
    621 /**
    622  * Defines setting for Gamma
    623  *
    624  * STRUCT MEMBERS:
    625  *  nSize      : Size of the structure in bytes
    626  *  nVersion   : OMX specification version information
    627  *  nPortIndex : Port that this structure applies to
    628  *  nGamma     : Values allowed for gamma -100 to 100, zero means no change
    629  */
    630 typedef struct OMX_CONFIG_GAMMATYPE {
    631     OMX_U32 nSize;
    632     OMX_VERSIONTYPE nVersion;
    633     OMX_U32 nPortIndex;
    634     OMX_S32 nGamma;
    635 } OMX_CONFIG_GAMMATYPE;
    636 
    637 
    638 /**
    639  * Define for setting saturation
    640  *
    641  * STRUCT MEMBERS:
    642  *  nSize       : Size of the structure in bytes
    643  *  nVersion    : OMX specification version information
    644  *  nPortIndex  : Port that this structure applies to
    645  *  nSaturation : Values allowed for saturation -100 to 100, zero means
    646  *                no change
    647  */
    648 typedef struct OMX_CONFIG_SATURATIONTYPE {
    649     OMX_U32 nSize;
    650     OMX_VERSIONTYPE nVersion;
    651     OMX_U32 nPortIndex;
    652     OMX_S32 nSaturation;
    653 } OMX_CONFIG_SATURATIONTYPE;
    654 
    655 
    656 /**
    657  * Define for setting Lightness
    658  *
    659  * STRUCT MEMBERS:
    660  *  nSize      : Size of the structure in bytes
    661  *  nVersion   : OMX specification version information
    662  *  nPortIndex : Port that this structure applies to
    663  *  nLightness : Values allowed for lightness -100 to 100, zero means no
    664  *               change
    665  */
    666 typedef struct OMX_CONFIG_LIGHTNESSTYPE {
    667     OMX_U32 nSize;
    668     OMX_VERSIONTYPE nVersion;
    669     OMX_U32 nPortIndex;
    670     OMX_S32 nLightness;
    671 } OMX_CONFIG_LIGHTNESSTYPE;
    672 
    673 
    674 /**
    675  * Plane blend configuration
    676  *
    677  * STRUCT MEMBERS:
    678  *  nSize      : Size of the structure in bytes
    679  *  nVersion   : OMX specification version information
    680  *  nPortIndex : Index of input port associated with the plane.
    681  *  nDepth     : Depth of the plane in relation to the screen. Higher
    682  *               numbered depths are "behind" lower number depths.
    683  *               This number defaults to the Port Index number.
    684  *  nAlpha     : Transparency blending component for the entire plane.
    685  *               See blending modes for more detail.
    686  */
    687 typedef struct OMX_CONFIG_PLANEBLENDTYPE {
    688     OMX_U32 nSize;
    689     OMX_VERSIONTYPE nVersion;
    690     OMX_U32 nPortIndex;
    691     OMX_U32 nDepth;
    692     OMX_U32 nAlpha;
    693 } OMX_CONFIG_PLANEBLENDTYPE;
    694 
    695 
    696 /**
    697  * Define interlace type
    698  *
    699  * STRUCT MEMBERS:
    700  *  nSize                 : Size of the structure in bytes
    701  *  nVersion              : OMX specification version information
    702  *  nPortIndex            : Port that this structure applies to
    703  *  bEnable               : Enable control variable for this functionality
    704  *                          (see below)
    705  *  nInterleavePortIndex  : Index of input or output port associated with
    706  *                          the interleaved plane.
    707  *  pPlanarPortIndexes[4] : Index of input or output planar ports.
    708  */
    709 typedef struct OMX_PARAM_INTERLEAVETYPE {
    710     OMX_U32 nSize;
    711     OMX_VERSIONTYPE nVersion;
    712     OMX_U32 nPortIndex;
    713     OMX_BOOL bEnable;
    714     OMX_U32 nInterleavePortIndex;
    715 } OMX_PARAM_INTERLEAVETYPE;
    716 
    717 
    718 /**
    719  * Defines the picture effect used for an input picture
    720  */
    721 typedef enum OMX_TRANSITIONEFFECTTYPE {
    722     OMX_EffectNone,
    723     OMX_EffectFadeFromBlack,
    724     OMX_EffectFadeToBlack,
    725     OMX_EffectUnspecifiedThroughConstantColor,
    726     OMX_EffectDissolve,
    727     OMX_EffectWipe,
    728     OMX_EffectUnspecifiedMixOfTwoScenes,
    729     OMX_EffectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    730     OMX_EffectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    731     OMX_EffectMax = 0x7FFFFFFF
    732 } OMX_TRANSITIONEFFECTTYPE;
    733 
    734 
    735 /**
    736  * Structure used to configure current transition effect
    737  *
    738  * STRUCT MEMBERS:
    739  * nSize      : Size of the structure in bytes
    740  * nVersion   : OMX specification version information
    741  * nPortIndex : Port that this structure applies to
    742  * eEffect    : Effect to enable
    743  */
    744 typedef struct OMX_CONFIG_TRANSITIONEFFECTTYPE {
    745     OMX_U32 nSize;
    746     OMX_VERSIONTYPE nVersion;
    747     OMX_U32 nPortIndex;
    748     OMX_TRANSITIONEFFECTTYPE eEffect;
    749 } OMX_CONFIG_TRANSITIONEFFECTTYPE;
    750 
    751 
    752 /**
    753  * Defines possible data unit types for encoded video data. The data unit
    754  * types are used both for encoded video input for playback as well as
    755  * encoded video output from recording.
    756  */
    757 typedef enum OMX_DATAUNITTYPE {
    758     OMX_DataUnitCodedPicture,
    759     OMX_DataUnitVideoSegment,
    760     OMX_DataUnitSeveralSegments,
    761     OMX_DataUnitArbitraryStreamSection,
    762     OMX_DataUnitKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    763     OMX_DataUnitVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    764     OMX_DataUnitMax = 0x7FFFFFFF
    765 } OMX_DATAUNITTYPE;
    766 
    767 
    768 /**
    769  * Defines possible encapsulation types for coded video data unit. The
    770  * encapsulation information is used both for encoded video input for
    771  * playback as well as encoded video output from recording.
    772  */
    773 typedef enum OMX_DATAUNITENCAPSULATIONTYPE {
    774     OMX_DataEncapsulationElementaryStream,
    775     OMX_DataEncapsulationGenericPayload,
    776     OMX_DataEncapsulationRtpPayload,
    777     OMX_DataEncapsulationKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    778     OMX_DataEncapsulationVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    779     OMX_DataEncapsulationMax = 0x7FFFFFFF
    780 } OMX_DATAUNITENCAPSULATIONTYPE;
    781 
    782 
    783 /**
    784  * Structure used to configure the type of being decoded/encoded
    785  */
    786 typedef struct OMX_PARAM_DATAUNITTYPE {
    787     OMX_U32 nSize;            /**< Size of the structure in bytes */
    788     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
    789     OMX_U32 nPortIndex;       /**< Port that this structure applies to */
    790     OMX_DATAUNITTYPE eUnitType;
    791     OMX_DATAUNITENCAPSULATIONTYPE eEncapsulationType;
    792 } OMX_PARAM_DATAUNITTYPE;
    793 
    794 
    795 /**
    796  * Defines dither types
    797  */
    798 typedef enum OMX_DITHERTYPE {
    799     OMX_DitherNone,
    800     OMX_DitherOrdered,
    801     OMX_DitherErrorDiffusion,
    802     OMX_DitherOther,
    803     OMX_DitherKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    804     OMX_DitherVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    805     OMX_DitherMax = 0x7FFFFFFF
    806 } OMX_DITHERTYPE;
    807 
    808 
    809 /**
    810  * Structure used to configure current type of dithering
    811  */
    812 typedef struct OMX_CONFIG_DITHERTYPE {
    813     OMX_U32 nSize;            /**< Size of the structure in bytes */
    814     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
    815     OMX_U32 nPortIndex;       /**< Port that this structure applies to */
    816     OMX_DITHERTYPE eDither;   /**< Type of dithering to use */
    817 } OMX_CONFIG_DITHERTYPE;
    818 
    819 typedef struct OMX_CONFIG_CAPTUREMODETYPE {
    820     OMX_U32 nSize;
    821     OMX_VERSIONTYPE nVersion;
    822     OMX_U32 nPortIndex;     /**< Port that this structure applies to */
    823     OMX_BOOL bContinuous;   /**< If true then ignore frame rate and emit capture
    824                              *   data as fast as possible (otherwise obey port's frame rate). */
    825     OMX_BOOL bFrameLimited; /**< If true then terminate capture after the port emits the
    826                              *   specified number of frames (otherwise the port does not
    827                              *   terminate the capture until instructed to do so by the client).
    828                              *   Even if set, the client may manually terminate the capture prior
    829                              *   to reaching the limit. */
    830     OMX_U32 nFrameLimit;      /**< Limit on number of frames emitted during a capture (only
    831                                *   valid if bFrameLimited is set). */
    832 } OMX_CONFIG_CAPTUREMODETYPE;
    833 
    834 typedef enum OMX_METERINGTYPE {
    835 
    836     OMX_MeteringModeAverage,     /**< Center-weighted average metering. */
    837     OMX_MeteringModeSpot,  	      /**< Spot (partial) metering. */
    838     OMX_MeteringModeMatrix,      /**< Matrix or evaluative metering. */
    839 
    840     OMX_MeteringKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    841     OMX_MeteringVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    842     OMX_EVModeMax = 0x7fffffff
    843 } OMX_METERINGTYPE;
    844 
    845 typedef struct OMX_CONFIG_EXPOSUREVALUETYPE {
    846     OMX_U32 nSize;
    847     OMX_VERSIONTYPE nVersion;
    848     OMX_U32 nPortIndex;
    849     OMX_METERINGTYPE eMetering;
    850     OMX_S32 xEVCompensation;      /**< Fixed point value stored as Q16 */
    851     OMX_U32 nApertureFNumber;     /**< e.g. nApertureFNumber = 2 implies "f/2" - Q16 format */
    852     OMX_BOOL bAutoAperture;		/**< Whether aperture number is defined automatically */
    853     OMX_U32 nShutterSpeedMsec;    /**< Shutterspeed in milliseconds */
    854     OMX_BOOL bAutoShutterSpeed;	/**< Whether shutter speed is defined automatically */
    855     OMX_U32 nSensitivity;         /**< e.g. nSensitivity = 100 implies "ISO 100" */
    856     OMX_BOOL bAutoSensitivity;	/**< Whether sensitivity is defined automatically */
    857 } OMX_CONFIG_EXPOSUREVALUETYPE;
    858 
    859 /**
    860  * Focus region configuration
    861  *
    862  * STRUCT MEMBERS:
    863  *  nSize           : Size of the structure in bytes
    864  *  nVersion        : OMX specification version information
    865  *  nPortIndex      : Port that this structure applies to
    866  *  bCenter         : Use center region as focus region of interest
    867  *  bLeft           : Use left region as focus region of interest
    868  *  bRight          : Use right region as focus region of interest
    869  *  bTop            : Use top region as focus region of interest
    870  *  bBottom         : Use bottom region as focus region of interest
    871  *  bTopLeft        : Use top left region as focus region of interest
    872  *  bTopRight       : Use top right region as focus region of interest
    873  *  bBottomLeft     : Use bottom left region as focus region of interest
    874  *  bBottomRight    : Use bottom right region as focus region of interest
    875  */
    876 typedef struct OMX_CONFIG_FOCUSREGIONTYPE {
    877     OMX_U32 nSize;
    878     OMX_VERSIONTYPE nVersion;
    879     OMX_U32 nPortIndex;
    880     OMX_BOOL bCenter;
    881     OMX_BOOL bLeft;
    882     OMX_BOOL bRight;
    883     OMX_BOOL bTop;
    884     OMX_BOOL bBottom;
    885     OMX_BOOL bTopLeft;
    886     OMX_BOOL bTopRight;
    887     OMX_BOOL bBottomLeft;
    888     OMX_BOOL bBottomRight;
    889 } OMX_CONFIG_FOCUSREGIONTYPE;
    890 
    891 /**
    892  * Focus Status type
    893  */
    894 typedef enum OMX_FOCUSSTATUSTYPE {
    895     OMX_FocusStatusOff = 0,
    896     OMX_FocusStatusRequest,
    897     OMX_FocusStatusReached,
    898     OMX_FocusStatusUnableToReach,
    899     OMX_FocusStatusLost,
    900     OMX_FocusStatusKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    901     OMX_FocusStatusVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    902     OMX_FocusStatusMax = 0x7FFFFFFF
    903 } OMX_FOCUSSTATUSTYPE;
    904 
    905 /**
    906  * Focus status configuration
    907  *
    908  * STRUCT MEMBERS:
    909  *  nSize               : Size of the structure in bytes
    910  *  nVersion            : OMX specification version information
    911  *  nPortIndex          : Port that this structure applies to
    912  *  eFocusStatus        : Specifies the focus status
    913  *  bCenterStatus       : Use center region as focus region of interest
    914  *  bLeftStatus         : Use left region as focus region of interest
    915  *  bRightStatus        : Use right region as focus region of interest
    916  *  bTopStatus          : Use top region as focus region of interest
    917  *  bBottomStatus       : Use bottom region as focus region of interest
    918  *  bTopLeftStatus      : Use top left region as focus region of interest
    919  *  bTopRightStatus     : Use top right region as focus region of interest
    920  *  bBottomLeftStatus   : Use bottom left region as focus region of interest
    921  *  bBottomRightStatus  : Use bottom right region as focus region of interest
    922  */
    923 typedef struct OMX_PARAM_FOCUSSTATUSTYPE {
    924     OMX_U32 nSize;
    925     OMX_VERSIONTYPE nVersion;
    926     OMX_U32 nPortIndex;
    927     OMX_FOCUSSTATUSTYPE eFocusStatus;
    928     OMX_BOOL bCenterStatus;
    929     OMX_BOOL bLeftStatus;
    930     OMX_BOOL bRightStatus;
    931     OMX_BOOL bTopStatus;
    932     OMX_BOOL bBottomStatus;
    933     OMX_BOOL bTopLeftStatus;
    934     OMX_BOOL bTopRightStatus;
    935     OMX_BOOL bBottomLeftStatus;
    936     OMX_BOOL bBottomRightStatus;
    937 } OMX_PARAM_FOCUSSTATUSTYPE;
    938 
    939 /** @} */
    940 
    941 #ifdef __cplusplus
    942 }
    943 #endif /* __cplusplus */
    944 
    945 #endif
    946 /* File EOF */
    947