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