Home | History | Annotate | Download | only in openmax
      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_TI_COLOR_FormatYUV420PackedSemiPlanar = 0x7F000100,
    161     OMX_QCOM_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00,
    162     OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka = 0x7FA30C03,
    163     OMX_SEC_COLOR_FormatNV12Tiled = 0x7FC00002,
    164     OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m = 0x7FA30C04,
    165     OMX_COLOR_FormatMax = 0x7FFFFFFF
    166 } OMX_COLOR_FORMATTYPE;
    167 
    168 
    169 /**
    170  * Defines the matrix for conversion from RGB to YUV or vice versa.
    171  * iColorMatrix should be initialized with the fixed point values
    172  * used in converting between formats.
    173  */
    174 typedef struct OMX_CONFIG_COLORCONVERSIONTYPE {
    175     OMX_U32 nSize;              /**< Size of the structure in bytes */
    176     OMX_VERSIONTYPE nVersion;   /**< OMX specification version info */
    177     OMX_U32 nPortIndex;         /**< Port that this struct applies to */
    178     OMX_S32 xColorMatrix[3][3]; /**< Stored in signed Q16 format */
    179     OMX_S32 xColorOffset[4];    /**< Stored in signed Q16 format */
    180 }OMX_CONFIG_COLORCONVERSIONTYPE;
    181 
    182 
    183 /**
    184  * Structure defining percent to scale each frame dimension.  For example:
    185  * To make the width 50% larger, use fWidth = 1.5 and to make the width
    186  * 1/2 the original size, use fWidth = 0.5
    187  */
    188 typedef struct OMX_CONFIG_SCALEFACTORTYPE {
    189     OMX_U32 nSize;            /**< Size of the structure in bytes */
    190     OMX_VERSIONTYPE nVersion; /**< OMX specification version info */
    191     OMX_U32 nPortIndex;       /**< Port that this struct applies to */
    192     OMX_S32 xWidth;           /**< Fixed point value stored as Q16 */
    193     OMX_S32 xHeight;          /**< Fixed point value stored as Q16 */
    194 }OMX_CONFIG_SCALEFACTORTYPE;
    195 
    196 
    197 /**
    198  * Enumeration of possible image filter types
    199  */
    200 typedef enum OMX_IMAGEFILTERTYPE {
    201     OMX_ImageFilterNone,
    202     OMX_ImageFilterNoise,
    203     OMX_ImageFilterEmboss,
    204     OMX_ImageFilterNegative,
    205     OMX_ImageFilterSketch,
    206     OMX_ImageFilterOilPaint,
    207     OMX_ImageFilterHatch,
    208     OMX_ImageFilterGpen,
    209     OMX_ImageFilterAntialias,
    210     OMX_ImageFilterDeRing,
    211     OMX_ImageFilterSolarize,
    212     OMX_ImageFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    213     OMX_ImageFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    214     OMX_ImageFilterMax = 0x7FFFFFFF
    215 } OMX_IMAGEFILTERTYPE;
    216 
    217 
    218 /**
    219  * Image filter configuration
    220  *
    221  * STRUCT MEMBERS:
    222  *  nSize        : Size of the structure in bytes
    223  *  nVersion     : OMX specification version information
    224  *  nPortIndex   : Port that this structure applies to
    225  *  eImageFilter : Image filter type enumeration
    226  */
    227 typedef struct OMX_CONFIG_IMAGEFILTERTYPE {
    228     OMX_U32 nSize;
    229     OMX_VERSIONTYPE nVersion;
    230     OMX_U32 nPortIndex;
    231     OMX_IMAGEFILTERTYPE eImageFilter;
    232 } OMX_CONFIG_IMAGEFILTERTYPE;
    233 
    234 
    235 /**
    236  * Customized U and V for color enhancement
    237  *
    238  * STRUCT MEMBERS:
    239  *  nSize             : Size of the structure in bytes
    240  *  nVersion          : OMX specification version information
    241  *  nPortIndex        : Port that this structure applies to
    242  *  bColorEnhancement : Enable/disable color enhancement
    243  *  nCustomizedU      : Practical values: 16-240, range: 0-255, value set for
    244  *                      U component
    245  *  nCustomizedV      : Practical values: 16-240, range: 0-255, value set for
    246  *                      V component
    247  */
    248 typedef struct OMX_CONFIG_COLORENHANCEMENTTYPE {
    249     OMX_U32 nSize;
    250     OMX_VERSIONTYPE nVersion;
    251     OMX_U32 nPortIndex;
    252     OMX_BOOL bColorEnhancement;
    253     OMX_U8 nCustomizedU;
    254     OMX_U8 nCustomizedV;
    255 } OMX_CONFIG_COLORENHANCEMENTTYPE;
    256 
    257 
    258 /**
    259  * Define color key and color key mask
    260  *
    261  * STRUCT MEMBERS:
    262  *  nSize      : Size of the structure in bytes
    263  *  nVersion   : OMX specification version information
    264  *  nPortIndex : Port that this structure applies to
    265  *  nARGBColor : 32bit Alpha, Red, Green, Blue Color
    266  *  nARGBMask  : 32bit Mask for Alpha, Red, Green, Blue channels
    267  */
    268 typedef struct OMX_CONFIG_COLORKEYTYPE {
    269     OMX_U32 nSize;
    270     OMX_VERSIONTYPE nVersion;
    271     OMX_U32 nPortIndex;
    272     OMX_U32 nARGBColor;
    273     OMX_U32 nARGBMask;
    274 } OMX_CONFIG_COLORKEYTYPE;
    275 
    276 
    277 /**
    278  * List of color blend types for pre/post processing
    279  *
    280  * ENUMS:
    281  *  None          : No color blending present
    282  *  AlphaConstant : Function is (alpha_constant * src) +
    283  *                  (1 - alpha_constant) * dst)
    284  *  AlphaPerPixel : Function is (alpha * src) + (1 - alpha) * dst)
    285  *  Alternate     : Function is alternating pixels from src and dst
    286  *  And           : Function is (src & dst)
    287  *  Or            : Function is (src | dst)
    288  *  Invert        : Function is ~src
    289  */
    290 typedef enum OMX_COLORBLENDTYPE {
    291     OMX_ColorBlendNone,
    292     OMX_ColorBlendAlphaConstant,
    293     OMX_ColorBlendAlphaPerPixel,
    294     OMX_ColorBlendAlternate,
    295     OMX_ColorBlendAnd,
    296     OMX_ColorBlendOr,
    297     OMX_ColorBlendInvert,
    298     OMX_ColorBlendKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    299     OMX_ColorBlendVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    300     OMX_ColorBlendMax = 0x7FFFFFFF
    301 } OMX_COLORBLENDTYPE;
    302 
    303 
    304 /**
    305  * Color blend configuration
    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  *  nRGBAlphaConstant : Constant global alpha values when global alpha is used
    312  *  eColorBlend       : Color blend type enumeration
    313  */
    314 typedef struct OMX_CONFIG_COLORBLENDTYPE {
    315     OMX_U32 nSize;
    316     OMX_VERSIONTYPE nVersion;
    317     OMX_U32 nPortIndex;
    318     OMX_U32 nRGBAlphaConstant;
    319     OMX_COLORBLENDTYPE  eColorBlend;
    320 } OMX_CONFIG_COLORBLENDTYPE;
    321 
    322 
    323 /**
    324  * Hold frame dimension
    325  *
    326  * STRUCT MEMBERS:
    327  *  nSize      : Size of the structure in bytes
    328  *  nVersion   : OMX specification version information
    329  *  nPortIndex : Port that this structure applies to
    330  *  nWidth     : Frame width in pixels
    331  *  nHeight    : Frame height in pixels
    332  */
    333 typedef struct OMX_FRAMESIZETYPE {
    334     OMX_U32 nSize;
    335     OMX_VERSIONTYPE nVersion;
    336     OMX_U32 nPortIndex;
    337     OMX_U32 nWidth;
    338     OMX_U32 nHeight;
    339 } OMX_FRAMESIZETYPE;
    340 
    341 
    342 /**
    343  * Rotation configuration
    344  *
    345  * STRUCT MEMBERS:
    346  *  nSize      : Size of the structure in bytes
    347  *  nVersion   : OMX specification version information
    348  *  nPortIndex : Port that this structure applies to
    349  *  nRotation  : +/- integer rotation value
    350  */
    351 typedef struct OMX_CONFIG_ROTATIONTYPE {
    352     OMX_U32 nSize;
    353     OMX_VERSIONTYPE nVersion;
    354     OMX_U32 nPortIndex;
    355     OMX_S32 nRotation;
    356 } OMX_CONFIG_ROTATIONTYPE;
    357 
    358 
    359 /**
    360  * Possible mirroring directions for pre/post processing
    361  *
    362  * ENUMS:
    363  *  None       : No mirroring
    364  *  Vertical   : Vertical mirroring, flip on X axis
    365  *  Horizontal : Horizontal mirroring, flip on Y axis
    366  *  Both       : Both vertical and horizontal mirroring
    367  */
    368 typedef enum OMX_MIRRORTYPE {
    369     OMX_MirrorNone = 0,
    370     OMX_MirrorVertical,
    371     OMX_MirrorHorizontal,
    372     OMX_MirrorBoth,
    373     OMX_MirrorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    374     OMX_MirrorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    375     OMX_MirrorMax = 0x7FFFFFFF
    376 } OMX_MIRRORTYPE;
    377 
    378 
    379 /**
    380  * Mirroring configuration
    381  *
    382  * STRUCT MEMBERS:
    383  *  nSize      : Size of the structure in bytes
    384  *  nVersion   : OMX specification version information
    385  *  nPortIndex : Port that this structure applies to
    386  *  eMirror    : Mirror type enumeration
    387  */
    388 typedef struct OMX_CONFIG_MIRRORTYPE {
    389     OMX_U32 nSize;
    390     OMX_VERSIONTYPE nVersion;
    391     OMX_U32 nPortIndex;
    392     OMX_MIRRORTYPE  eMirror;
    393 } OMX_CONFIG_MIRRORTYPE;
    394 
    395 
    396 /**
    397  * Position information only
    398  *
    399  * STRUCT MEMBERS:
    400  *  nSize      : Size of the structure in bytes
    401  *  nVersion   : OMX specification version information
    402  *  nPortIndex : Port that this structure applies to
    403  *  nX         : X coordinate for the point
    404  *  nY         : Y coordinate for the point
    405  */
    406 typedef struct OMX_CONFIG_POINTTYPE {
    407     OMX_U32 nSize;
    408     OMX_VERSIONTYPE nVersion;
    409     OMX_U32 nPortIndex;
    410     OMX_S32 nX;
    411     OMX_S32 nY;
    412 } OMX_CONFIG_POINTTYPE;
    413 
    414 
    415 /**
    416  * Frame size plus position
    417  *
    418  * STRUCT MEMBERS:
    419  *  nSize      : Size of the structure in bytes
    420  *  nVersion   : OMX specification version information
    421  *  nPortIndex : Port that this structure applies to
    422  *  nLeft      : X Coordinate of the top left corner of the rectangle
    423  *  nTop       : Y Coordinate of the top left corner of the rectangle
    424  *  nWidth     : Width of the rectangle
    425  *  nHeight    : Height of the rectangle
    426  */
    427 typedef struct OMX_CONFIG_RECTTYPE {
    428     OMX_U32 nSize;
    429     OMX_VERSIONTYPE nVersion;
    430     OMX_U32 nPortIndex;
    431     OMX_S32 nLeft;
    432     OMX_S32 nTop;
    433     OMX_U32 nWidth;
    434     OMX_U32 nHeight;
    435 } OMX_CONFIG_RECTTYPE;
    436 
    437 
    438 /**
    439  * Deblocking state; it is required to be set up before starting the codec
    440  *
    441  * STRUCT MEMBERS:
    442  *  nSize       : Size of the structure in bytes
    443  *  nVersion    : OMX specification version information
    444  *  nPortIndex  : Port that this structure applies to
    445  *  bDeblocking : Enable/disable deblocking mode
    446  */
    447 typedef struct OMX_PARAM_DEBLOCKINGTYPE {
    448     OMX_U32 nSize;
    449     OMX_VERSIONTYPE nVersion;
    450     OMX_U32 nPortIndex;
    451     OMX_BOOL bDeblocking;
    452 } OMX_PARAM_DEBLOCKINGTYPE;
    453 
    454 
    455 /**
    456  * Stabilization state
    457  *
    458  * STRUCT MEMBERS:
    459  *  nSize      : Size of the structure in bytes
    460  *  nVersion   : OMX specification version information
    461  *  nPortIndex : Port that this structure applies to
    462  *  bStab      : Enable/disable frame stabilization state
    463  */
    464 typedef struct OMX_CONFIG_FRAMESTABTYPE {
    465     OMX_U32 nSize;
    466     OMX_VERSIONTYPE nVersion;
    467     OMX_U32 nPortIndex;
    468     OMX_BOOL bStab;
    469 } OMX_CONFIG_FRAMESTABTYPE;
    470 
    471 
    472 /**
    473  * White Balance control type
    474  *
    475  * STRUCT MEMBERS:
    476  *  SunLight : Referenced in JSR-234
    477  *  Flash    : Optimal for device's integrated flash
    478  */
    479 typedef enum OMX_WHITEBALCONTROLTYPE {
    480     OMX_WhiteBalControlOff = 0,
    481     OMX_WhiteBalControlAuto,
    482     OMX_WhiteBalControlSunLight,
    483     OMX_WhiteBalControlCloudy,
    484     OMX_WhiteBalControlShade,
    485     OMX_WhiteBalControlTungsten,
    486     OMX_WhiteBalControlFluorescent,
    487     OMX_WhiteBalControlIncandescent,
    488     OMX_WhiteBalControlFlash,
    489     OMX_WhiteBalControlHorizon,
    490     OMX_WhiteBalControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    491     OMX_WhiteBalControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    492     OMX_WhiteBalControlMax = 0x7FFFFFFF
    493 } OMX_WHITEBALCONTROLTYPE;
    494 
    495 
    496 /**
    497  * White Balance control configuration
    498  *
    499  * STRUCT MEMBERS:
    500  *  nSize            : Size of the structure in bytes
    501  *  nVersion         : OMX specification version information
    502  *  nPortIndex       : Port that this structure applies to
    503  *  eWhiteBalControl : White balance enumeration
    504  */
    505 typedef struct OMX_CONFIG_WHITEBALCONTROLTYPE {
    506     OMX_U32 nSize;
    507     OMX_VERSIONTYPE nVersion;
    508     OMX_U32 nPortIndex;
    509     OMX_WHITEBALCONTROLTYPE eWhiteBalControl;
    510 } OMX_CONFIG_WHITEBALCONTROLTYPE;
    511 
    512 
    513 /**
    514  * Exposure control type
    515  */
    516 typedef enum OMX_EXPOSURECONTROLTYPE {
    517     OMX_ExposureControlOff = 0,
    518     OMX_ExposureControlAuto,
    519     OMX_ExposureControlNight,
    520     OMX_ExposureControlBackLight,
    521     OMX_ExposureControlSpotLight,
    522     OMX_ExposureControlSports,
    523     OMX_ExposureControlSnow,
    524     OMX_ExposureControlBeach,
    525     OMX_ExposureControlLargeAperture,
    526     OMX_ExposureControlSmallApperture,
    527     OMX_ExposureControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    528     OMX_ExposureControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    529     OMX_ExposureControlMax = 0x7FFFFFFF
    530 } OMX_EXPOSURECONTROLTYPE;
    531 
    532 
    533 /**
    534  * White Balance control configuration
    535  *
    536  * STRUCT MEMBERS:
    537  *  nSize            : Size of the structure in bytes
    538  *  nVersion         : OMX specification version information
    539  *  nPortIndex       : Port that this structure applies to
    540  *  eExposureControl : Exposure control enumeration
    541  */
    542 typedef struct OMX_CONFIG_EXPOSURECONTROLTYPE {
    543     OMX_U32 nSize;
    544     OMX_VERSIONTYPE nVersion;
    545     OMX_U32 nPortIndex;
    546     OMX_EXPOSURECONTROLTYPE eExposureControl;
    547 } OMX_CONFIG_EXPOSURECONTROLTYPE;
    548 
    549 
    550 /**
    551  * Defines sensor supported mode.
    552  *
    553  * STRUCT MEMBERS:
    554  *  nSize      : Size of the structure in bytes
    555  *  nVersion   : OMX specification version information
    556  *  nPortIndex : Port that this structure applies to
    557  *  nFrameRate : Single shot mode is indicated by a 0
    558  *  bOneShot   : Enable for single shot, disable for streaming
    559  *  sFrameSize : Framesize
    560  */
    561 typedef struct OMX_PARAM_SENSORMODETYPE {
    562     OMX_U32 nSize;
    563     OMX_VERSIONTYPE nVersion;
    564     OMX_U32 nPortIndex;
    565     OMX_U32 nFrameRate;
    566     OMX_BOOL bOneShot;
    567     OMX_FRAMESIZETYPE sFrameSize;
    568 } OMX_PARAM_SENSORMODETYPE;
    569 
    570 
    571 /**
    572  * Defines contrast level
    573  *
    574  * STRUCT MEMBERS:
    575  *  nSize      : Size of the structure in bytes
    576  *  nVersion   : OMX specification version information
    577  *  nPortIndex : Port that this structure applies to
    578  *  nContrast  : Values allowed for contrast -100 to 100, zero means no change
    579  */
    580 typedef struct OMX_CONFIG_CONTRASTTYPE {
    581     OMX_U32 nSize;
    582     OMX_VERSIONTYPE nVersion;
    583     OMX_U32 nPortIndex;
    584     OMX_S32 nContrast;
    585 } OMX_CONFIG_CONTRASTTYPE;
    586 
    587 
    588 /**
    589  * Defines brightness level
    590  *
    591  * STRUCT MEMBERS:
    592  *  nSize       : Size of the structure in bytes
    593  *  nVersion    : OMX specification version information
    594  *  nPortIndex  : Port that this structure applies to
    595  *  nBrightness : 0-100%
    596  */
    597 typedef struct OMX_CONFIG_BRIGHTNESSTYPE {
    598     OMX_U32 nSize;
    599     OMX_VERSIONTYPE nVersion;
    600     OMX_U32 nPortIndex;
    601     OMX_U32 nBrightness;
    602 } OMX_CONFIG_BRIGHTNESSTYPE;
    603 
    604 
    605 /**
    606  * Defines backlight level configuration for a video sink, e.g. LCD panel
    607  *
    608  * STRUCT MEMBERS:
    609  *  nSize      : Size of the structure in bytes
    610  *  nVersion   : OMX specification version information
    611  *  nPortIndex : Port that this structure applies to
    612  *  nBacklight : Values allowed for backlight 0-100%
    613  *  nTimeout   : Number of milliseconds before backlight automatically turns
    614  *               off.  A value of 0x0 disables backight timeout
    615  */
    616 typedef struct OMX_CONFIG_BACKLIGHTTYPE {
    617     OMX_U32 nSize;
    618     OMX_VERSIONTYPE nVersion;
    619     OMX_U32 nPortIndex;
    620     OMX_U32 nBacklight;
    621     OMX_U32 nTimeout;
    622 } OMX_CONFIG_BACKLIGHTTYPE;
    623 
    624 
    625 /**
    626  * Defines setting for Gamma
    627  *
    628  * STRUCT MEMBERS:
    629  *  nSize      : Size of the structure in bytes
    630  *  nVersion   : OMX specification version information
    631  *  nPortIndex : Port that this structure applies to
    632  *  nGamma     : Values allowed for gamma -100 to 100, zero means no change
    633  */
    634 typedef struct OMX_CONFIG_GAMMATYPE {
    635     OMX_U32 nSize;
    636     OMX_VERSIONTYPE nVersion;
    637     OMX_U32 nPortIndex;
    638     OMX_S32 nGamma;
    639 } OMX_CONFIG_GAMMATYPE;
    640 
    641 
    642 /**
    643  * Define for setting saturation
    644  *
    645  * STRUCT MEMBERS:
    646  *  nSize       : Size of the structure in bytes
    647  *  nVersion    : OMX specification version information
    648  *  nPortIndex  : Port that this structure applies to
    649  *  nSaturation : Values allowed for saturation -100 to 100, zero means
    650  *                no change
    651  */
    652 typedef struct OMX_CONFIG_SATURATIONTYPE {
    653     OMX_U32 nSize;
    654     OMX_VERSIONTYPE nVersion;
    655     OMX_U32 nPortIndex;
    656     OMX_S32 nSaturation;
    657 } OMX_CONFIG_SATURATIONTYPE;
    658 
    659 
    660 /**
    661  * Define for setting Lightness
    662  *
    663  * STRUCT MEMBERS:
    664  *  nSize      : Size of the structure in bytes
    665  *  nVersion   : OMX specification version information
    666  *  nPortIndex : Port that this structure applies to
    667  *  nLightness : Values allowed for lightness -100 to 100, zero means no
    668  *               change
    669  */
    670 typedef struct OMX_CONFIG_LIGHTNESSTYPE {
    671     OMX_U32 nSize;
    672     OMX_VERSIONTYPE nVersion;
    673     OMX_U32 nPortIndex;
    674     OMX_S32 nLightness;
    675 } OMX_CONFIG_LIGHTNESSTYPE;
    676 
    677 
    678 /**
    679  * Plane blend configuration
    680  *
    681  * STRUCT MEMBERS:
    682  *  nSize      : Size of the structure in bytes
    683  *  nVersion   : OMX specification version information
    684  *  nPortIndex : Index of input port associated with the plane.
    685  *  nDepth     : Depth of the plane in relation to the screen. Higher
    686  *               numbered depths are "behind" lower number depths.
    687  *               This number defaults to the Port Index number.
    688  *  nAlpha     : Transparency blending component for the entire plane.
    689  *               See blending modes for more detail.
    690  */
    691 typedef struct OMX_CONFIG_PLANEBLENDTYPE {
    692     OMX_U32 nSize;
    693     OMX_VERSIONTYPE nVersion;
    694     OMX_U32 nPortIndex;
    695     OMX_U32 nDepth;
    696     OMX_U32 nAlpha;
    697 } OMX_CONFIG_PLANEBLENDTYPE;
    698 
    699 
    700 /**
    701  * Define interlace type
    702  *
    703  * STRUCT MEMBERS:
    704  *  nSize                 : Size of the structure in bytes
    705  *  nVersion              : OMX specification version information
    706  *  nPortIndex            : Port that this structure applies to
    707  *  bEnable               : Enable control variable for this functionality
    708  *                          (see below)
    709  *  nInterleavePortIndex  : Index of input or output port associated with
    710  *                          the interleaved plane.
    711  *  pPlanarPortIndexes[4] : Index of input or output planar ports.
    712  */
    713 typedef struct OMX_PARAM_INTERLEAVETYPE {
    714     OMX_U32 nSize;
    715     OMX_VERSIONTYPE nVersion;
    716     OMX_U32 nPortIndex;
    717     OMX_BOOL bEnable;
    718     OMX_U32 nInterleavePortIndex;
    719 } OMX_PARAM_INTERLEAVETYPE;
    720 
    721 
    722 /**
    723  * Defines the picture effect used for an input picture
    724  */
    725 typedef enum OMX_TRANSITIONEFFECTTYPE {
    726     OMX_EffectNone,
    727     OMX_EffectFadeFromBlack,
    728     OMX_EffectFadeToBlack,
    729     OMX_EffectUnspecifiedThroughConstantColor,
    730     OMX_EffectDissolve,
    731     OMX_EffectWipe,
    732     OMX_EffectUnspecifiedMixOfTwoScenes,
    733     OMX_EffectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    734     OMX_EffectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    735     OMX_EffectMax = 0x7FFFFFFF
    736 } OMX_TRANSITIONEFFECTTYPE;
    737 
    738 
    739 /**
    740  * Structure used to configure current transition effect
    741  *
    742  * STRUCT MEMBERS:
    743  * nSize      : Size of the structure in bytes
    744  * nVersion   : OMX specification version information
    745  * nPortIndex : Port that this structure applies to
    746  * eEffect    : Effect to enable
    747  */
    748 typedef struct OMX_CONFIG_TRANSITIONEFFECTTYPE {
    749     OMX_U32 nSize;
    750     OMX_VERSIONTYPE nVersion;
    751     OMX_U32 nPortIndex;
    752     OMX_TRANSITIONEFFECTTYPE eEffect;
    753 } OMX_CONFIG_TRANSITIONEFFECTTYPE;
    754 
    755 
    756 /**
    757  * Defines possible data unit types for encoded video data. The data unit
    758  * types are used both for encoded video input for playback as well as
    759  * encoded video output from recording.
    760  */
    761 typedef enum OMX_DATAUNITTYPE {
    762     OMX_DataUnitCodedPicture,
    763     OMX_DataUnitVideoSegment,
    764     OMX_DataUnitSeveralSegments,
    765     OMX_DataUnitArbitraryStreamSection,
    766     OMX_DataUnitKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    767     OMX_DataUnitVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    768     OMX_DataUnitMax = 0x7FFFFFFF
    769 } OMX_DATAUNITTYPE;
    770 
    771 
    772 /**
    773  * Defines possible encapsulation types for coded video data unit. The
    774  * encapsulation information is used both for encoded video input for
    775  * playback as well as encoded video output from recording.
    776  */
    777 typedef enum OMX_DATAUNITENCAPSULATIONTYPE {
    778     OMX_DataEncapsulationElementaryStream,
    779     OMX_DataEncapsulationGenericPayload,
    780     OMX_DataEncapsulationRtpPayload,
    781     OMX_DataEncapsulationKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    782     OMX_DataEncapsulationVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    783     OMX_DataEncapsulationMax = 0x7FFFFFFF
    784 } OMX_DATAUNITENCAPSULATIONTYPE;
    785 
    786 
    787 /**
    788  * Structure used to configure the type of being decoded/encoded
    789  */
    790 typedef struct OMX_PARAM_DATAUNITTYPE {
    791     OMX_U32 nSize;            /**< Size of the structure in bytes */
    792     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
    793     OMX_U32 nPortIndex;       /**< Port that this structure applies to */
    794     OMX_DATAUNITTYPE eUnitType;
    795     OMX_DATAUNITENCAPSULATIONTYPE eEncapsulationType;
    796 } OMX_PARAM_DATAUNITTYPE;
    797 
    798 
    799 /**
    800  * Defines dither types
    801  */
    802 typedef enum OMX_DITHERTYPE {
    803     OMX_DitherNone,
    804     OMX_DitherOrdered,
    805     OMX_DitherErrorDiffusion,
    806     OMX_DitherOther,
    807     OMX_DitherKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    808     OMX_DitherVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    809     OMX_DitherMax = 0x7FFFFFFF
    810 } OMX_DITHERTYPE;
    811 
    812 
    813 /**
    814  * Structure used to configure current type of dithering
    815  */
    816 typedef struct OMX_CONFIG_DITHERTYPE {
    817     OMX_U32 nSize;            /**< Size of the structure in bytes */
    818     OMX_VERSIONTYPE nVersion; /**< OMX specification version information */
    819     OMX_U32 nPortIndex;       /**< Port that this structure applies to */
    820     OMX_DITHERTYPE eDither;   /**< Type of dithering to use */
    821 } OMX_CONFIG_DITHERTYPE;
    822 
    823 typedef struct OMX_CONFIG_CAPTUREMODETYPE {
    824     OMX_U32 nSize;
    825     OMX_VERSIONTYPE nVersion;
    826     OMX_U32 nPortIndex;     /**< Port that this structure applies to */
    827     OMX_BOOL bContinuous;   /**< If true then ignore frame rate and emit capture
    828                              *   data as fast as possible (otherwise obey port's frame rate). */
    829     OMX_BOOL bFrameLimited; /**< If true then terminate capture after the port emits the
    830                              *   specified number of frames (otherwise the port does not
    831                              *   terminate the capture until instructed to do so by the client).
    832                              *   Even if set, the client may manually terminate the capture prior
    833                              *   to reaching the limit. */
    834     OMX_U32 nFrameLimit;      /**< Limit on number of frames emitted during a capture (only
    835                                *   valid if bFrameLimited is set). */
    836 } OMX_CONFIG_CAPTUREMODETYPE;
    837 
    838 typedef enum OMX_METERINGTYPE {
    839 
    840     OMX_MeteringModeAverage,     /**< Center-weighted average metering. */
    841     OMX_MeteringModeSpot,  	      /**< Spot (partial) metering. */
    842     OMX_MeteringModeMatrix,      /**< Matrix or evaluative metering. */
    843 
    844     OMX_MeteringKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    845     OMX_MeteringVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    846     OMX_EVModeMax = 0x7fffffff
    847 } OMX_METERINGTYPE;
    848 
    849 typedef struct OMX_CONFIG_EXPOSUREVALUETYPE {
    850     OMX_U32 nSize;
    851     OMX_VERSIONTYPE nVersion;
    852     OMX_U32 nPortIndex;
    853     OMX_METERINGTYPE eMetering;
    854     OMX_S32 xEVCompensation;      /**< Fixed point value stored as Q16 */
    855     OMX_U32 nApertureFNumber;     /**< e.g. nApertureFNumber = 2 implies "f/2" - Q16 format */
    856     OMX_BOOL bAutoAperture;		/**< Whether aperture number is defined automatically */
    857     OMX_U32 nShutterSpeedMsec;    /**< Shutterspeed in milliseconds */
    858     OMX_BOOL bAutoShutterSpeed;	/**< Whether shutter speed is defined automatically */
    859     OMX_U32 nSensitivity;         /**< e.g. nSensitivity = 100 implies "ISO 100" */
    860     OMX_BOOL bAutoSensitivity;	/**< Whether sensitivity is defined automatically */
    861 } OMX_CONFIG_EXPOSUREVALUETYPE;
    862 
    863 /**
    864  * Focus region configuration
    865  *
    866  * STRUCT MEMBERS:
    867  *  nSize           : Size of the structure in bytes
    868  *  nVersion        : OMX specification version information
    869  *  nPortIndex      : Port that this structure applies to
    870  *  bCenter         : Use center region as focus region of interest
    871  *  bLeft           : Use left region as focus region of interest
    872  *  bRight          : Use right region as focus region of interest
    873  *  bTop            : Use top region as focus region of interest
    874  *  bBottom         : Use bottom region as focus region of interest
    875  *  bTopLeft        : Use top left region as focus region of interest
    876  *  bTopRight       : Use top right region as focus region of interest
    877  *  bBottomLeft     : Use bottom left region as focus region of interest
    878  *  bBottomRight    : Use bottom right region as focus region of interest
    879  */
    880 typedef struct OMX_CONFIG_FOCUSREGIONTYPE {
    881     OMX_U32 nSize;
    882     OMX_VERSIONTYPE nVersion;
    883     OMX_U32 nPortIndex;
    884     OMX_BOOL bCenter;
    885     OMX_BOOL bLeft;
    886     OMX_BOOL bRight;
    887     OMX_BOOL bTop;
    888     OMX_BOOL bBottom;
    889     OMX_BOOL bTopLeft;
    890     OMX_BOOL bTopRight;
    891     OMX_BOOL bBottomLeft;
    892     OMX_BOOL bBottomRight;
    893 } OMX_CONFIG_FOCUSREGIONTYPE;
    894 
    895 /**
    896  * Focus Status type
    897  */
    898 typedef enum OMX_FOCUSSTATUSTYPE {
    899     OMX_FocusStatusOff = 0,
    900     OMX_FocusStatusRequest,
    901     OMX_FocusStatusReached,
    902     OMX_FocusStatusUnableToReach,
    903     OMX_FocusStatusLost,
    904     OMX_FocusStatusKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
    905     OMX_FocusStatusVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
    906     OMX_FocusStatusMax = 0x7FFFFFFF
    907 } OMX_FOCUSSTATUSTYPE;
    908 
    909 /**
    910  * Focus status configuration
    911  *
    912  * STRUCT MEMBERS:
    913  *  nSize               : Size of the structure in bytes
    914  *  nVersion            : OMX specification version information
    915  *  nPortIndex          : Port that this structure applies to
    916  *  eFocusStatus        : Specifies the focus status
    917  *  bCenterStatus       : Use center region as focus region of interest
    918  *  bLeftStatus         : Use left region as focus region of interest
    919  *  bRightStatus        : Use right region as focus region of interest
    920  *  bTopStatus          : Use top region as focus region of interest
    921  *  bBottomStatus       : Use bottom region as focus region of interest
    922  *  bTopLeftStatus      : Use top left region as focus region of interest
    923  *  bTopRightStatus     : Use top right region as focus region of interest
    924  *  bBottomLeftStatus   : Use bottom left region as focus region of interest
    925  *  bBottomRightStatus  : Use bottom right region as focus region of interest
    926  */
    927 typedef struct OMX_PARAM_FOCUSSTATUSTYPE {
    928     OMX_U32 nSize;
    929     OMX_VERSIONTYPE nVersion;
    930     OMX_U32 nPortIndex;
    931     OMX_FOCUSSTATUSTYPE eFocusStatus;
    932     OMX_BOOL bCenterStatus;
    933     OMX_BOOL bLeftStatus;
    934     OMX_BOOL bRightStatus;
    935     OMX_BOOL bTopStatus;
    936     OMX_BOOL bBottomStatus;
    937     OMX_BOOL bTopLeftStatus;
    938     OMX_BOOL bTopRightStatus;
    939     OMX_BOOL bBottomLeftStatus;
    940     OMX_BOOL bBottomRightStatus;
    941 } OMX_PARAM_FOCUSSTATUSTYPE;
    942 
    943 /** @} */
    944 
    945 #ifdef __cplusplus
    946 }
    947 #endif /* __cplusplus */
    948 
    949 #endif
    950 /* File EOF */
    951