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