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