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