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