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