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