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