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