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