1 /*
2  * Copyright (c) 2010, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * *  Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  * *  Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * *  Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 /* -------------------------------------------------------------------------- *
34  *
35  * @file:OMX_TI_IVCommon.h
36  * This header defines the structures specific to the config indices of msp_VPPM.
37  *
38  * @path ..\OMAPSW_SysDev\multimedia\omx\khronos1_1\omx_core\inc
39  *
40  * -------------------------------------------------------------------------- */
41 
42 /* ======================================================================== *!
43  *! Revision History
44  *! ==================================================================== */
45 
46 #ifndef OMX_TI_IVCommon_H
47 #define OMX_TI_IVCommon_H
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif /* __cplusplus */
52 
53 #include <OMX_IVCommon.h>
54 #include <OMX_Image.h>
55 
56 
57 #define MAX_URI_LENGTH      (OMX_MAX_STRINGNAME_SIZE)
58 #define MAX_ALGOAREAS       (35)
59 
60 /*======================================================================= */
61 /* Enumerated values for operation mode for compressed image
62  *
63  * ENUMS:
64  * Chunk         : Chunk based operation
65  * NonChunk    : Non-chunk based operation
66  */
67  /* ======================================================================= */
68 typedef enum OMX_JPEG_COMPRESSEDMODETYPE {
69     OMX_JPEG_ModeChunk = 0,
70     OMX_JPEG_ModeNonChunk
71 }OMX_JPEG_COMPRESSEDMODETYPE ;
72 
73 
74 /*======================================================================= */
75 /* Enumerated values for operation mode for uncompressed image
76  *
77  * ENUMS:
78  * Frame   :  Frame based operation
79  * Slice   : Slice based operation
80  * Stitch  : For stitching between image frames
81  * Burst   :  For stitching between image frames
82  */
83  /* ======================================================================= */
84 typedef enum OMX_JPEG_UNCOMPRESSEDMODETYPE {
85     OMX_JPEG_UncompressedModeFrame = 0,
86     OMX_JPEG_UncompressedModeSlice,
87     OMX_JPEG_UncompressedModeStitch,
88     OMX_JPEG_UncompressedModeBurst
89 }OMX_JPEG_UNCOMPRESSEDMODETYPE;
90 
91 
92 
93 /*======================================================================= */
94 /* Configuration structure for compressed image
95  *
96  * STRUCT MEMBERS:
97  *  nSize                 : Size of the structure in bytes
98  *  nVersion              : OMX specification version information
99  *  nPortIndex            : Port that this structure applies to
100  *  eCompressedImageMode  : Operating mode enumeration for compressed image
101  */
102  /*======================================================================= */
103 typedef struct OMX_JPEG_PARAM_COMPRESSEDMODETYPE{
104     OMX_U32 nSize;
105     OMX_VERSIONTYPE nVersion;
106     OMX_U32 nPortIndex;
107     OMX_JPEG_COMPRESSEDMODETYPE eCompressedImageMode;
108 }OMX_JPEG_PARAM_COMPRESSEDMODETYPE;
109 
110 
111 
112 /*======================================================================= */
113 /* Uncompressed image Operating mode configuration structure
114  *
115  * STRUCT MEMBERS:
116  * nSize                     : Size of the structure in bytes
117  * nVersion                  : OMX specification version information
118  * nPortIndex                : Port that this structure applies to
119  * nBurstLength              : No of frames to be dumped in burst mode
120  * eUncompressedImageMode    : uncompressed image mode information
121  * eSourceType               : Image encode souce info
122  * tRotationInfo             : Rotation related information
123  */
124  /*======================================================================= */
125 typedef struct OMX_JPEG_PARAM_UNCOMPRESSEDMODETYPE{
126     OMX_U32 nSize;
127     OMX_VERSIONTYPE nVersion;
128     OMX_U32 nPortIndex;
129     OMX_U32 nBurstLength;
130     OMX_JPEG_UNCOMPRESSEDMODETYPE eUncompressedImageMode;
131 }OMX_JPEG_PARAM_UNCOMPRESSEDMODETYPE;
132 
133 
134 /*======================================================================= */
135 /* Subregion Decode Parameter configuration structure
136  *
137  * STRUCT MEMBERS:
138  * nSize                     : Size of the structure in bytes
139  * nVersion                  : OMX specification version information
140  * nXOrg                     : Sectional decoding X origin
141  * nYOrg                     : Sectional decoding Y origin
142  * nXLength                  : Sectional decoding X length
143  * nYLength                  : Sectional decoding Y length
144  */
145  /*======================================================================= */
146 typedef struct OMX_IMAGE_PARAM_DECODE_SUBREGION{
147     OMX_U32 nSize;
148     OMX_VERSIONTYPE nVersion;
149     OMX_U32 nXOrg;
150     OMX_U32 nYOrg;
151     OMX_U32 nXLength;
152     OMX_U32 nYLength;
153 }OMX_IMAGE_PARAM_DECODE_SUBREGION;
154 
155 
156 /**
157  * sensor select  types
158  */
159 typedef enum OMX_SENSORSELECT{
160         OMX_PrimarySensor = 0,
161         OMX_SecondarySensor,
162         OMX_TI_StereoSensor,
163         OMX_SensorTypeMax = 0x7fffffff
164 }OMX_SENSORSELECT;
165 
166 /**
167  *
168  * Sensor Select
169  */
170 typedef  struct OMX_CONFIG_SENSORSELECTTYPE {
171 OMX_U32  nSize; /**< Size of the structure in bytes */
172 OMX_VERSIONTYPE nVersion; /**< OMX specification version info */
173 OMX_U32 nPortIndex; /**< Port that this struct applies to */
174 OMX_SENSORSELECT eSensor; /**< sensor select */
175 } OMX_CONFIG_SENSORSELECTTYPE;
176 
177 /**
178  * Flicker cancellation types
179  */
180 typedef enum OMX_COMMONFLICKERCANCELTYPE{
181         OMX_FlickerCancelOff = 0,
182         OMX_FlickerCancelAuto,
183         OMX_FlickerCancel50,
184         OMX_FlickerCancel60,
185         OMX_FlickerCancel100,
186         OMX_FlickerCancel120,
187         OMX_FlickerCancelMax = 0x7fffffff
188 }OMX_COMMONFLICKERCANCELTYPE;
189 
190 typedef struct OMX_CONFIG_FLICKERCANCELTYPE {
191    OMX_U32 nSize;
192    OMX_VERSIONTYPE nVersion;
193    OMX_U32 nPortIndex;
194    OMX_COMMONFLICKERCANCELTYPE eFlickerCancel;
195 } OMX_CONFIG_FLICKERCANCELTYPE;
196 
197 
198 /**
199  * Sensor caleberation types
200  */
201 typedef enum OMX_SENSORCALTYPE{
202         OMX_SensorCalFull = 0,
203         OMX_SensorCalQuick,
204         OMX_SensorCalMax = 0x7fffffff
205 }OMX_SENSORCALTYPE;
206 
207 typedef struct OMX_CONFIG_SENSORCALTYPE {
208    OMX_U32 nSize;
209    OMX_VERSIONTYPE nVersion;
210    OMX_U32 nPortIndex;
211    OMX_SENSORCALTYPE eSensorCal;
212 } OMX_CONFIG_SENSORCALTYPE;
213 
214 /**
215  * Scene mode types
216  */
217 typedef enum OMX_SCENEMODETYPE{
218 
219         OMX_Manual = 0,
220         OMX_Closeup,
221         OMX_Portrait,
222         OMX_Landscape,
223         OMX_Underwater,
224         OMX_Sport,
225         OMX_SnowBeach,
226         OMX_Mood,
227         OMX_NightPortrait,
228         OMX_NightIndoor,
229         OMX_Fireworks,
230         OMX_Document, /**< for still image */
231         OMX_Barcode, /**< for still image */
232         OMX_SuperNight, /**< for video */
233         OMX_Cine, /**< for video */
234         OMX_OldFilm, /**< for video */
235         OMX_TI_Action,
236         OMX_TI_Beach,
237         OMX_TI_Candlelight,
238         OMX_TI_Night,
239         OMX_TI_Party,
240         OMX_TI_Portrait,
241         OMX_TI_Snow,
242         OMX_TI_Steadyphoto,
243         OMX_TI_Sunset,
244         OMX_TI_Theatre,
245         OMX_SceneModeMax = 0x7fffffff
246 }OMX_SCENEMODETYPE;
247 
248 typedef struct OMX_CONFIG_SCENEMODETYPE {
249    OMX_U32 nSize;
250    OMX_VERSIONTYPE nVersion;
251    OMX_U32 nPortIndex;
252    OMX_SCENEMODETYPE eSceneMode;
253 } OMX_CONFIG_SCENEMODETYPE;
254 
255  /**
256  * Port specific capture trigger
257  * useful for the usecases with multiple capture ports.
258  *
259  * STRUCT MEMBERS:
260  *  nSize      : Size of the structure in bytes
261  *  nVersion   : OMX specification version information
262  *  nPortIndex : Port that this structure applies to
263  *  bExtCapturing : Start Captre at the specified port. Can be queried to know the status of a specific port.
264  */
265 typedef struct OMX_CONFIG_EXTCAPTURING {
266     OMX_U32 nSize;
267     OMX_VERSIONTYPE nVersion;
268     OMX_U32 nPortIndex;
269     OMX_BOOL bExtCapturing;
270 } OMX_CONFIG_EXTCAPTURING;
271 
272 
273  /**
274  * Digital Zoom Speed
275  *
276  * STRUCT MEMBERS:
277  *  nSize      : Size of the structure in bytes
278  *  nVersion   : OMX specification version information
279  *  nPortIndex : Port that this structure applies to
280  *  nDigitalZoomSpeed      :  Optical zoom speed level. Special values:
281  *      0 - stop current movement
282  *      values from 1 to 254 are mapped proportionally to supported zoom speeds inside optical zoom driver.
283  *      So 1 is slowest available optical zoom speed and 254 is fastest available optical zoom speed
284  *      255 - default optical zoom speed value
285  */
286 typedef struct OMX_CONFIG_DIGITALZOOMSPEEDTYPE {
287    OMX_U32 nSize;
288    OMX_VERSIONTYPE nVersion;
289    OMX_U32 nPortIndex;
290    OMX_U8 nDigitalZoomSpeed;
291 } OMX_CONFIG_DIGITALZOOMSPEEDTYPE;
292 
293 
294  /**
295  * Digital Zoom Target
296  *
297  * STRUCT MEMBERS:
298  *  nSize      : Size of the structure in bytes
299  *  nVersion   : OMX specification version information
300  *  nPortIndex : Port that this structure applies to
301  *  nDigitalZoomTarget      :  Default and minimum is 0. Maximum is determined by the current supported range
302  */
303 
304 typedef struct OMX_CONFIG_DIGITALZOOMTARGETTYPE {
305    OMX_U32 nSize;
306    OMX_VERSIONTYPE nVersion;
307    OMX_U32 nPortIndex;
308    OMX_U32 nDigitalZoomTarget;
309 } OMX_CONFIG_DIGITALZOOMTARGETTYPE;
310 
311 
312 /**
313 * Scale quality enums
314 */
315 typedef enum OMX_SCALEQUALITY{
316         OMX_DefaultScaling = 0, /** <default scaling if nothing is specified > */
317         OMX_BetterScaling,   /** <better scaling> */
318         OMX_BestScaling,  /** <best  scaling> */
319         OMX_AutoScalingQuality,  /** <auto scaling quality> */
320         OMX_FastScaling,   /** <fast scaling, prioritizes speed> */
321         OMX_ScaleQualityMax = 0x7fffffff
322 }OMX_SCALEQUALITY;
323 
324 /**
325 * Scaling Quality Mode
326 */
327 typedef enum OMX_SCALEQUALITYMODE{
328         OMX_SingleFrameScalingMode = 0, /** <default > */
329         OMX_MultiFrameScalingMode,   /** <better scaling> */
330         OMX_AutoScalingMode,  /** <best  scaling> */
331         OMX_ScaleModeMax = 0x7fffffff
332 }OMX_SCALEQUALITYMODE;
333 
334  /**
335  * Rescale quality control type
336  *
337  * STRUCT MEMBERS:
338  *  nSize      : Size of the structure in bytes
339  *  nVersion   : OMX specification version information
340  *  eScaleQuality : controls the quality level.
341  *  eScaleQualityMode      :  controls the scaling algo types
342  */
343 typedef struct OMX_CONFIG_SCALEQUALITYTYPE {
344     OMX_U32 nSize;
345     OMX_VERSIONTYPE nVersion;
346     OMX_U32 nPortIndex;
347     OMX_SCALEQUALITY eScaleQuality;
348     OMX_SCALEQUALITYMODE eScaleQualityMode;
349 } OMX_CONFIG_SCALEQUALITYTYPE;
350 
351 /**
352 * Smooth Zoom mode enum
353 * Starts or stops the Smooth Zoom.  Selecting INCREASE will cause an increasing digital zoom factor (increased cropping),
354 * with a shrinking viewable area and crop height percentage.  Selecting DECREASE will cause a decreasing digital zoom (decreased cropping),
355 * with a growing viewable area and crop height percentage.  The CaptureCropHeight will continue to update based on the SmoothZoomRate until
356 * the SmoothZoomMin or SmoothZoomMax zoom step is reached, the framework minimum zoom step is reached, the SmoothZoomRate becomes 0,
357 * or the SmoothZoomMode is set to OFF.
358 * NOTE: The message payload includes all parts of the message that is NOT part of the message header as listed for the CAM_SEND_DATA message.
359 */
360 typedef enum OMX_SMOOTHZOOMMODE{
361     OMX_Off=0, /**< default OFF */
362     OMX_Increase,
363     OMX_Decrease
364 }OMX_SMOOTHZOOMMODE;
365 
366 
367  /**
368  * Rescale quality control type
369  *
370  * STRUCT MEMBERS:
371  *  nSize      : Size of the structure in bytes
372  *  nVersion   : OMX specification version information
373  *  eSmoothZoomMode : controls the smooth zoom feature.
374  *  nSmoothZoomRate      :  Values from 0 to 65535 which represents percentage to increase per second, where 65535 = 100%, and 0 = 0%.
375  *  nSmoothZoomQuantize:
376  *  nSmoothZoomThresh
377  *  nSmoothZoomMin
378  *  nSmoothZoomMax
379  */
380 typedef struct OMX_CONFIG_SMOOTHZOOMTYPE {
381     OMX_U32 nSize;
382     OMX_VERSIONTYPE nVersion;
383     OMX_U32 nPortIndex;
384     OMX_SMOOTHZOOMMODE eSmoothZoomMode;
385     OMX_U32 nSmoothZoomRate;
386     OMX_U32 nSmoothZoomQuantize;
387     OMX_U32 nSmoothZoomThresh;
388     OMX_U32 nSmoothZoomMin;
389     OMX_U32 nSmoothZoomMax;
390 } OMX_CONFIG_SMOOTHZOOMTYPE;
391 
392 /**
393  * Enumeration of possible Extended image filter types for OMX_CONFIG_IMAGEFILTERTYPE
394  */
395 typedef enum OMX_EXTIMAGEFILTERTYPE {
396     OMX_ImageFilterSepia = 0x7F000001,
397     OMX_ImageFilterGrayScale,
398     OMX_ImageFilterNatural,
399     OMX_ImageFilterVivid,
400     OMX_ImageFilterColourSwap,
401     OMX_ImageFilterOutOfFocus,
402     OMX_ImageFilterWaterColour,
403     OMX_ImageFilterPastel,
404     OMX_ImageFilterFilm,
405     OMX_TI_ImageFilterBlackWhite,
406     OMX_TI_ImageFilterWhiteBoard,
407     OMX_TI_ImageFilterBlackBoard,
408     OMX_TI_ImageFilterAqua,
409     OMX_TI_ImageFilterPosterize
410 } OMX_EXTIMAGEFILTERTYPE;
411 
412 
413 /**
414  * Image filter configuration extended
415  *
416  * STRUCT MEMBERS:
417  *  nSize        : Size of the structure in bytes
418  *  nVersion     : OMX specification version information
419  *  nPortIndex   : Port that this structure applies to
420  *  bBlemish : Enable/Disable Blemish correction
421  */
422 typedef struct OMX_CONFIG_BLEMISHTYPE {
423     OMX_U32 nSize;
424     OMX_VERSIONTYPE nVersion;
425     OMX_U32 nPortIndex;
426     OMX_BOOL bBlemish;
427 } OMX_CONFIG_BLEMISHTYPE;
428 
429 /**
430  * Enumeration of Bracket types
431  * OMX_BracketExposureRelativeInEV:
432  *      Exposure value is changed relative to the value set by automatic exposure.
433  *      nBracketStartValue and nBracketStep are in Q16. Increment is additive.
434  * OMX_BracketExposureAbsoluteMs:
435  *      Exposure value is changed in absolute value in ms.
436  *      nBracketStartValue and nBracketStep are in Q16. Increment is multiplicative.
437  * OMX_BracketFocusRelative:
438  *      Focus is adjusted relative to the focus set by auto focus.
439  *      The value is S32 integer, and is the same as adjusting nFocusSteps of OMX_IMAGE_CONFIG_FOCUSCONTROLTYPE relatively.
440  *      Increment is additive.
441  * OMX_BracketFocusAbsolute:
442  *      Focus position is adjusted absolutely. It is the same as setting nFocusSteps of
443  *      OMX_IMAGE_CONFIG_FOCUSCONTROLTYPE relatively for each captures.
444  *      The value should be interpreted as U32 value.  Increment is additive.
445  * OMX_BracketFlashPower:
446  *      Power of flash is adjusted relative to the automatic level. Increment is multiplicative.
447  * OMX_BracketAperture:
448  *      Aperture number relative to the automatic setting. Data in Q16 format. Increment is multiplicative.
449  * OMX_BracketTemporal:
450  *      To suppport temporal bracketing.
451  */
452 typedef enum OMX_BRACKETMODETYPE {
453     OMX_BracketExposureRelativeInEV = 0,
454     OMX_BracketExposureAbsoluteMs,
455     OMX_BracketFocusRelative,
456     OMX_BracketFocusAbsolute,
457     OMX_BracketFlashPower,
458     OMX_BracketAperture,
459     OMX_BracketTemporal,
460     OMX_BrackerTypeKhronosExtensions = 0x6f000000,
461     OMX_BrackerTypeVendorStartUnused = 0x7f000000,
462     OMX_BracketTypeMax = 0x7FFFFFFF
463 } OMX_BRACKETMODETYPE;
464 
465 typedef struct OMX_CONFIG_BRACKETINGTYPE {
466     OMX_U32 nSize;
467     OMX_VERSIONTYPE nVersion;
468     OMX_U32 nPortIndex;
469     OMX_BRACKETMODETYPE eBracketMode;
470     OMX_U32 nNbrBracketingValues;
471     OMX_S32 nBracketValues[10]; /**< 10 can be assumed */
472 } OMX_CONFIG_BRACKETINGTYPE;
473 
474 
475 /**
476  * Capture mode types
477  * Note: this list could get extended modified based on the type of interenal use-case pipelines implemented within the camera component.
478  *
479  *       OMX_CaptureImageHighSpeedBurst = 0,
480  *       OMX_CaptureImageHighSpeedTemporalBracketing,
481  *       OMX_CaptureImageProfileBase(Base):
482  *       	Base one almost same as Highspeed one.
483  *       OMX_CaptureImageProfileLowLight1(LL1):
484  *       	Includes NSF2 in addition to Base processing
485  *       OMX_CaptureImageProfileLowLight2(LL2):
486  *       	Includes NSF2 and LBCE in addition to Base processing.
487  *       OMX_CaptureImageProfileOpticalCorr1(OC1):
488  *       	Includes LDC in addition to Base processing.
489  *       OMX_CaptureImageProfileOpticalCorr2(OC2):
490  *       	Includes LDC and CAC in addition to Base processing.
491  *       OMX_CaptureImageProfileExtended1(Ext1):
492  *       	Includes NSF2, LBCE, LDC, and CAC in addition to Base
493  *       OMX_CaptureStereoImageCapture:
494  *       	Stereo image capture use-case.
495  *       OMX_CaptureImageMemoryInput:
496  *       	need to take sensor input from INPUT port.
497  *       OMX_CaptureVideo:
498  *       OMX_CaptureHighSpeedVideo:
499  *       OMX_CaptureVideoMemoryInput:
500  *
501  */
502 typedef enum OMX_CAMOPERATINGMODETYPE {
503         OMX_CaptureImageHighSpeedBurst = 0,
504         OMX_CaptureImageHighSpeedTemporalBracketing,
505         OMX_CaptureImageProfileBase,
506         OMX_CaptureImageProfileLowLight1,
507         OMX_CaptureImageProfileLowLight2,
508         OMX_CaptureImageProfileOpticalCorr1,
509         OMX_CaptureImageProfileOpticalCorr2,
510         OMX_CaptureImageProfileExtended1,
511 	OMX_CaptureStereoImageCapture,
512         OMX_CaptureImageMemoryInput,
513         OMX_CaptureVideo,
514         OMX_CaptureHighSpeedVideo,
515         OMX_CaptureVideoMemoryInput,
516         OMX_TI_CaptureDummy,
517         OMX_TI_CaptureGestureRecognition,
518         OMX_TI_CaptureImageProfileZeroShutterLag,
519         OMX_CamOperatingModeMax = 0x7fffffff
520 } OMX_CAMOPERATINGMODETYPE;
521 /**
522  * Capture mode setting: applicable to multi shot capture also including bracketing.
523  *
524  * STRUCT MEMBERS:
525  *  nSize        : Size of the structure in bytes
526  *  nVersion     : OMX specification version information
527  *  nPortIndex   : Port that this structure applies to
528  *  eCamOperatingMode : specifies the camera operating mode.
529  */
530 typedef struct OMX_CONFIG_CAMOPERATINGMODETYPE {
531    OMX_U32 nSize;
532    OMX_VERSIONTYPE nVersion;
533    OMX_CAMOPERATINGMODETYPE eCamOperatingMode;
534 } OMX_CONFIG_CAMOPERATINGMODETYPE;
535 
536 
537 /**
538  * Capture mode setting: applicable to multi shot capture also including bracketing.
539  *
540  * STRUCT MEMBERS:
541  *  nSize        : Size of the structure in bytes
542  *  nVersion     : OMX specification version information
543  *  nPortIndex   : Port that this structure applies to
544  *  nFrameRate   : when bContinuous is FALSE, need to define the frame rate of the muti-shot scenario. Since this would be applicable to IMAGE domain port, there is no port specific frame rate.
545  *  nFrameBefore :
546  * 	is specifying how many frames before the capture trigger shall be used.
547  * 	It is implementation dependent how many is supported. This shall only be supported for images and not for video frames.
548  * bPrepareCapture :
549  *	should be set to true when nFrameBefore is greater than zero and before capturing of before-frames should start.
550  *	The component is not allowed to deliver buffers until capturing starts. This shall only be supported for images and not for video frames.
551  * bEnableBracketing :
552  *	should be enabled when bracketing is used. In bracketing mode, one parameter can be changed per each capture.
553  * tBracketConfigType :
554  *	specifies bracket mode to use. Valid only when bEnableBracketing is set.
555  */
556 typedef struct OMX_CONFIG_EXTCAPTUREMODETYPE {
557     OMX_U32 nSize;
558     OMX_VERSIONTYPE nVersion;
559     OMX_U32 nPortIndex;
560     OMX_U32 nFrameRate;
561     OMX_U32 nFrameBefore;
562     OMX_BOOL bPrepareCapture;
563     OMX_BOOL bEnableBracketing;
564     OMX_CONFIG_BRACKETINGTYPE tBracketConfigType;
565 } OMX_CONFIG_EXTCAPTUREMODETYPE;
566 
567 /**
568  * For Extended Focus region Type -
569  */
570 typedef struct OMX_CONFIG_EXTFOCUSREGIONTYPE {
571     OMX_U32 nSize;
572     OMX_VERSIONTYPE nVersion;
573     OMX_U32 nPortIndex;
574     OMX_U32 nRefPortIndex;
575     OMX_S32 nLeft;
576     OMX_S32 nTop;
577     OMX_U32 nWidth;
578     OMX_U32 nHeight;
579 } OMX_CONFIG_EXTFOCUSREGIONTYPE;
580 
581 /**
582  * Digital Flash Control
583  * STRUCT MEMBERS:
584  *  nSize        : Size of the structure in bytes
585  *  nVersion     : OMX specification version information
586  *  nPortIndex   : Port that this structure applies to
587  *  bDigitalFlash : Digital flash type Enable/Disable -
588  * Specifies whether the digital flash algorithm is enabled or disabled. This overrides the contrast and brightness settings.
589  */
590 typedef struct OMX_CONFIG_DIGITALFLASHTYPE {
591     OMX_U32 nSize;
592     OMX_VERSIONTYPE nVersion;
593     OMX_U32 nPortIndex;
594     OMX_BOOL bDigitalFlash;
595 } OMX_CONFIG_DIGITALFLASHTYPE;
596 
597 
598 
599 /**
600  * Privacy Indicator Enable/Disable
601  * STRUCT MEMBERS:
602  *  nSize        : Size of the structure in bytes
603  *  nVersion     : OMX specification version information
604  *  nPortIndex   : Port that this structure applies to
605  *  bPrivacyIndicator :
606  *        Specifies whether the flash should be used to indicate image or video capture. When flash is not used for exposure,
607  *        flash will be activated after exposure to indicate image capture.
608  *        If video light is not used, the flash can be blinking or constant at low intensity to indicate capture but not affect exposure.
609  *        Specifies whether the digital flash algorithm is enabled or disabled. This overrides the contrast and brightness settings.
610  */
611 typedef struct OMX_CONFIG_PRIVACYINDICATOR {
612     OMX_U32 nSize;
613     OMX_VERSIONTYPE nVersion;
614     OMX_U32 nPortIndex;
615     OMX_BOOL bPrivacyIndicator;
616 } OMX_CONFIG_PRIVACYINDICATOR;
617 
618 
619 /**
620  * Privacy Indicator Enable/Disable
621  * STRUCT MEMBERS:
622  *  nSize        : Size of the structure in bytes
623  *  nVersion     : OMX specification version information
624  *  nPortIndex   : Port that this structure applies to
625  *  bTorchMode :
626  *        Enable/Disable
627  *      nIntensityLevel : relative intensity from 0 - 100
628  *      nDuration : duration in msec
629  */
630 typedef struct OMX_CONFIG_TORCHMODETYPE {
631     OMX_U32 nSize;
632     OMX_VERSIONTYPE nVersion;
633     OMX_U32 nPortIndex;
634     OMX_BOOL bTorchMode;
635     OMX_U32 nIntensityLevel;
636     OMX_U32 nDuration;
637 } OMX_CONFIG_TORCHMODETYPE;
638 
639 
640 
641 /**
642  * Privacy Indicator Enable/Disable
643  * DISABLE - Fire the xenon flash in the usual manner
644  * ENABLE - Reduce the light intensity of the main flash (ex 1EV)
645  *
646  * STRUCT MEMBERS:
647  *  nSize        : Size of the structure in bytes
648  *  nVersion     : OMX specification version information
649  *  nPortIndex   : Port that this structure applies to
650  *  bSlowSync :
651  *        Enable - OMX_TRUE/Disable - OMX_FALSE
652  */
653 typedef struct OMX_CONFIG_SLOWSYNCTYPE {
654     OMX_U32 nSize;
655     OMX_VERSIONTYPE nVersion;
656     OMX_U32 nPortIndex;
657     OMX_BOOL bSlowSync;
658 } OMX_CONFIG_SLOWSYNCTYPE;
659 
660 
661 /**
662  * Focus control extended enums. use this along with OMX_IMAGE_CONFIG_FOCUSCONTROLTYPE
663  */
664 typedef enum OMX_IMAGE_EXTFOCUSCONTROLTYPE {
665     OMX_IMAGE_FocusControlAutoMacro = 0x7F000001, /**< Reserved region for introducing Vendor Extensions */
666     OMX_IMAGE_FocusControlAutoInfinity,
667     OMX_IMAGE_FocusControlHyperfocal,
668     OMX_IMAGE_FocusControlPortrait, /**< from Xena */
669     OMX_IMAGE_FocusControlExtended, /**< from Xena */
670     OMX_IMAGE_FocusControlContinousNormal, /**< from Xena */
671     OMX_IMAGE_FocusControlContinousExtended /**< from Xena */
672 } OMX_IMAGE_EXTFOCUSCONTROLTYPE;
673 
674 
675 
676 /**
677  * Specifies whether the LED can be used to assist in autofocus, due to low lighting conditions.
678  * ENABLE means use as determined by the auto exposure algorithm.
679  *
680  * STRUCT MEMBERS:
681  *  nSize        : Size of the structure in bytes
682  *  nVersion     : OMX specification version information
683  *  nPortIndex   : Port that this structure applies to
684  *  bFocusAssist :
685  *        Enable - OMX_TRUE/Disable - OMX_FALSE
686  */
687 typedef struct OMX_CONFIG_FOCUSASSISTTYPE {
688     OMX_U32 nSize;
689     OMX_VERSIONTYPE nVersion;
690     OMX_U32 nPortIndex;
691     OMX_BOOL bFocusAssist;
692 } OMX_CONFIG_FOCUSASSISTTYPE;
693 
694 
695 
696 /**
697  *for locking the focus
698  *
699  * STRUCT MEMBERS:
700  *  nSize        : Size of the structure in bytes
701  *  nVersion     : OMX specification version information
702  *  nPortIndex   : Port that this structure applies to
703  *  bFocusLock :
704  *        Enable - OMX_TRUE/Disable - OMX_FALSE
705  */
706 typedef struct OMX_CONFIG_FOCUSLOCKTYPE {
707     OMX_U32 nSize;
708     OMX_VERSIONTYPE nVersion;
709     OMX_U32 nPortIndex;
710     OMX_BOOL bFocusLock;
711 } OMX_CONFIG_FOCUSLOCKTYPE;
712 
713 
714 /**
715  *for locking the White balance
716  *
717  * STRUCT MEMBERS:
718  *  nSize        : Size of the structure in bytes
719  *  nVersion     : OMX specification version information
720  *  nPortIndex   : Port that this structure applies to
721  *  bWhiteBalanceLock :
722  *        Enable - OMX_TRUE/Disable - OMX_FALSE
723  */
724 typedef struct OMX_CONFIG_WHITEBALANCELOCKTYPE {
725     OMX_U32 nSize;
726     OMX_VERSIONTYPE nVersion;
727     OMX_U32 nPortIndex;
728     OMX_BOOL bWhiteBalanceLock;
729 } OMX_CONFIG_WHITEBALANCELOCKTYPE;
730 
731 /**
732  *for locking the Exposure
733  *
734  * STRUCT MEMBERS:
735  *  nSize        : Size of the structure in bytes
736  *  nVersion     : OMX specification version information
737  *  nPortIndex   : Port that this structure applies to
738  *  bExposureLock :
739  *        Enable - OMX_TRUE/Disable - OMX_FALSE
740  */
741 typedef struct OMX_CONFIG_EXPOSURELOCKTYPE {
742     OMX_U32 nSize;
743     OMX_VERSIONTYPE nVersion;
744     OMX_U32 nPortIndex;
745     OMX_BOOL bExposureLock;
746 } OMX_CONFIG_EXPOSURELOCKTYPE;
747 
748 /**
749  *for locking the Exposure
750  *  Simultaneously lock focus, white balance and exposure (and relevant other settings).
751  *
752  * STRUCT MEMBERS:
753  *  nSize        : Size of the structure in bytes
754  *  nVersion     : OMX specification version information
755  *  nPortIndex   : Port that this structure applies to
756  *  bAllLock :
757  *        Enable - OMX_TRUE/Disable - OMX_FALSE
758  */
759 typedef struct OMX_CONFIG_ALLLOCKTYPE {
760     OMX_U32 nSize;
761     OMX_VERSIONTYPE nVersion;
762     OMX_U32 nPortIndex;
763     OMX_BOOL bAllLock;
764 } OMX_CONFIG_ALLLOCKTYPE;
765 
766 /**
767  *for locking
768  *  Simultaneously lock focus, white balance and exposure (and relevant other settings).
769  *
770  * STRUCT MEMBERS:
771  *  nSize        : Size of the structure in bytes
772  *  nVersion     : OMX specification version information
773  *  nPortIndex   : Port that this structure applies to
774  *  bLock :
775  *        Enable - OMX_TRUE/Disable - OMX_FALSE
776  *  bAtCapture:
777  *
778  */
779 typedef struct OMX_IMAGE_CONFIG_LOCKTYPE {
780     OMX_U32 nSize;
781     OMX_VERSIONTYPE nVersion;
782     OMX_U32 nPortIndex;
783     OMX_BOOL bLock;
784     OMX_BOOL bAtCapture;
785 } OMX_IMAGE_CONFIG_LOCKTYPE;
786 
787 /**
788  * processig level types enum
789  */
790 typedef enum OMX_PROCESSINGLEVEL{
791         OMX_Min = 0,
792         OMX_Low,
793         OMX_Medium,
794         OMX_High,
795         OMX_Max,
796         OMX_ProcessingLevelMax = 0x7fffffff
797 }OMX_PROCESSINGLEVEL;
798 
799 /**
800  *processing level type
801  *  Simultaneously lock focus, white balance and exposure (and relevant other settings).
802  *
803  * STRUCT MEMBERS:
804  *  nSize        : Size of the structure in bytes
805  *  nVersion     : OMX specification version information
806  *  nPortIndex   : Port that this structure applies to
807  *  nLevel :
808  *               nLevel hinting processing amount. Range of values is -100 to 100.
809  *               0 causes no change to the image.  Increased values cause increased processing to occur, with 100 applying maximum processing.
810  *               Negative values have the opposite effect of positive values.
811  *  bAuto:
812  *		sets if the processing should be applied according to input data.
813  		It is allowed to combine the hint level with the auto setting,
814  *		i.e. to give a bias to the automatic setting. When set to false, the processing should not take input data into account.
815  */
816 
817 typedef struct OMX_IMAGE_CONFIG_PROCESSINGLEVELTYPE {
818 OMX_U32 nSize;
819 OMX_VERSIONTYPE nVersion;
820 OMX_U32 nPortIndex;
821 OMX_S32 nLevel;
822 OMX_BOOL bAuto;
823 } OMX_IMAGE_CONFIG_PROCESSINGLEVELTYPE;
824 
825 
826 /**
827  * White Balance control type extended enums - to be used along with the structure @OMX_CONFIG_WHITEBALCONTROLTYPE
828  *
829  *
830  *
831  */
832 typedef enum OMX_EXTWHITEBALCONTROLTYPE {
833     OMX_WhiteBalControlFacePriorityMode = OMX_WhiteBalControlVendorStartUnused + 1, /**<  */
834     OMX_TI_WhiteBalControlSunset,
835     OMX_TI_WhiteBalControlShade,
836     OMX_TI_WhiteBalControlTwilight,
837     OMX_TI_WhiteBalControlWarmFluorescent
838 } OMX_EXTWHITEBALCONTROLTYPE;
839 
840 /**
841  *white balance gain type
842  *  xWhiteBalanceGain and xWhiteBalanceOffset represents gain and offset for R, Gr, Gb, B channels respectively in Q16 format. \
843  *  For example, new red pixel value = xWhiteBalanceGain[1]* the current pixel value + xWhiteBalanceOffset[1].
844  *  All values assume that maximum value is 255. If internal implementation uses higher dynamic range, this value should be adjusted internally.
845  *  nWhiteThreshhold  represents thresholds for "white" area measurments in Q16 format.
846  *
847  * STRUCT MEMBERS:
848  *  nSize        : Size of the structure in bytes
849  *  nVersion     : OMX specification version information
850  *  nPortIndex   : Port that this structure applies to
851  *
852  */
853 typedef struct OMX_CONFIG_WHITEBALGAINTYPE {
854     OMX_U32 nSize;
855     OMX_VERSIONTYPE nVersion;
856     OMX_U32 nPortIndex;
857     OMX_S32 xWhiteBalanceGain[4];
858     OMX_S32 xWhiteBalanceOffset[4];
859     OMX_S32 nWhiteThreshhold[4];
860 } OMX_CONFIG_WHITEBALGAINTYPE;
861 
862 /**
863  *  This structure represents linear color conversion from one space to another.  For example, to conversion from one RGB color into another RGB color space can be represented as
864  *  R' =  xColorMatrix[1][1]*R + xColorMatrix[1][2]*G + xColorMatrix[1][3]*B + xColorOffset[1]
865  *  G' = xColorMatrix[2][1]*R + xColorMatrix[2][2]*G + xColorMatrix[2][3]*B + xColorOffset[2]
866  *  B' = xColorMatrix[3][1]*R + xColorMatrix[3][2]*G + xColorMatrix[3][3]*B + xColorOffset[3]
867  *  Both xColorMatrix and xColorOffset are represented as Q16 value.
868  *  bFullColorRange represents represents whether valid range of color is 0 to 255 (when set to TRUE) or 16 to 235 (for FALSE).
869  *  Again all values assume that maximum value is 255. If internal implementation uses higher dynamic range, this value should be adjusted internally.
870  *
871  *
872  * STRUCT MEMBERS:
873  *  nSize        : Size of the structure in bytes
874  *  nVersion     : OMX specification version information
875  *  nPortIndex   : Port that this structure applies to
876  *
877  */
878 typedef struct OMX_CONFIG_EXT_COLORCONVERSIONTYPE {
879     OMX_U32 nSize;
880     OMX_VERSIONTYPE nVersion;
881     OMX_U32 nPortIndex;
882     OMX_S32 xColorMatrix[3][3];
883     OMX_S32 xColorOffset[3];
884     OMX_BOOL bFullColorRange;
885 }OMX_CONFIG_EXT_COLORCONVERSIONTYPE;
886 
887 
888 /**
889  * xGamma represents lool-up table for gamma correction in Q16 format.
890  * All values assume that maximum value is 255. If internal implementation uses higher dynamic range, this value should be adjusted internally.
891  *
892  *
893  *
894  * STRUCT MEMBERS:
895  *  nSize        : Size of the structure in bytes
896  *  nVersion     : OMX specification version information
897  *  nPortIndex   : Port that this structure applies to
898  *
899  */
900 typedef struct OMX_CONFIG_GAMMATABLETYPE {
901     OMX_U32 nSize;
902     OMX_VERSIONTYPE nVersion;
903     OMX_U32 nPortIndex;
904     OMX_U32 xGamma[3][256];
905 }OMX_CONFIG_GAMMATABLETYPE;
906 
907 
908 
909 /**
910  * processig types
911  */
912 typedef enum OMX_PROCESSINGTYPE{
913         OMX_BloomingReduction = 0,
914         OMX_Denoise,
915         OMX_Sharpening,
916         OMX_Deblurring,
917         OMX_Demosaicing,
918         OMX_ContrastEnhancement,
919         OMX_ProcessingTypeMax = 0x7fffffff
920 }OMX_PROCESSINGTYPE;
921 
922 
923 typedef  struct OMX_CONFIGPROCESSINGORDERTYPE {
924 OMX_U32  nSize; /**< Size of the structure in bytes */
925 OMX_VERSIONTYPE nVersion; /**< OMX specification version info */
926 OMX_U32 nPortIndex; /**< Port that this struct applies to */
927 OMX_U32 nIndex;
928 OMX_PROCESSINGTYPE eProc;
929 } OMX_CONFIGPROCESSINGORDERTYPE;
930 
931 /**
932  * HIST TYPE
933  */
934 typedef enum OMX_HISTTYPE{
935         OMX_HistControlLuminance = 0, /**< Luminance histogram is calculated (Y)*/
936         OMX_HistControlColorComponents, /**< A histogram per color component (R, G, B) is calculated*/
937         OMX_HistControlChrominanceComponents /**< A histogram per chrominance component (Cb, Cr) is calculated.*/
938 }OMX_HISTTYPE;
939 
940 /**
941  * Histogram Setting
942  *  nPortIndex is an output port. The port index decides on which port the extra data structur is sent on.
943  *  bFrameLimited is a Boolean used to indicate if measurement shall be terminated after the specified number of
944  *  frames if true frame limited measurement is enabled; otherwise the port does not terminate measurement until
945  *  instructed to do so by the client.
946  *  nFrameLimit is the limit on number of frames measured, this parameter is only valid if bFrameLimited is enabled.
947  *  bMeasure is a Boolean that should be set to true when measurement shall begin, otherwise set to false. Query will give status information on if measurement is ongoing or not.
948  *  nBins specifies the number of histogram bins. When queried with set to zero, the respons gives the maximum number of bins allowed.
949  *  nLeft is the leftmost coordinate of the measurement area rectangle.
950  *  nTop is the topmost coordinate of the measurement area rectangle.
951  *  nWidth is the width of the measurement area rectangle in pixels.
952  *  nHeight is the height of the measurement area rectangle in pixels.
953  *  eHistType is an enumeration specifying the histogram type
954  *
955  *
956  */
957 
958 typedef struct OMX_CONFIG_HISTOGRAMTYPE {
959     OMX_U32 nSize;
960     OMX_VERSIONTYPE nVersion;
961     OMX_U32 nPortIndex;
962     OMX_BOOL bFrameLimited;
963     OMX_U32 nFrameLimit;
964     OMX_BOOL bMeasure;
965     OMX_U32 nBins;
966     OMX_S32 nLeft;
967     OMX_S32 nTop;
968     OMX_U32 nWidth;
969     OMX_U32 nHeight;
970     OMX_HISTTYPE eHistType;
971 } OMX_CONFIG_HISTOGRAMTYPE;
972 
973 /**
974  * Enums for HIST component type.
975  */
976 typedef enum OMX_HISTCOMPONENTTYPE{
977         OMX_HISTCOMP_Y = 0, /**<    Luminance histogram (Y) */
978         OMX_HISTCOMP_YLOG,  /**< Logarithmic luminance histogram (Y)*/
979         OMX_HISTCOMP_R, /**< Red histogram component (R)*/
980         OMX_HISTCOMP_G, /**< Green histogram component (G)*/
981         OMX_HISTCOMP_B, /**< Blue histogram component (B)*/
982         OMX_HISTCOMP_Cb,    /**< Chroma blue histogram component (Cb)*/
983         OMX_HISTCOMP_Cr /**< Chroma red histogram component (Cr) */
984 }OMX_HISTCOMPONENTTYPE;
985 
986  /**
987  * The OMX_TI_CAMERAVIEWTYPE enumeration is used to identify the
988  * particular camera view that the rest of the data in the structure is
989  * associated with.
990  */
991 typedef enum OMX_TI_CAMERAVIEWTYPE
992 {
993     OMX_2D,     /**< Camera view in 2D sensor configuration */
994     OMX_Left,   /**< Left camera view in stereo sensor configuration */
995     OMX_Right,  /**< Right camera view in stereo sensor configuration */
996     OMX_TI_CAMERAVIEWTYPE_32BIT_PATCH = 0x7FFFFFFF
997 } OMX_TI_CAMERAVIEWTYPE;
998 /**
999  *  nSize is the size of the structure including the length of data field containing
1000  *  the histogram data.
1001  *  nBins is the number of bins in the histogram.
1002  *  eComponentType specifies the type of the histogram bins according to enum.
1003  *  It can be selected to generate multiple component types, then the extradata struct
1004  *  is repeated for each component type.
1005  *  data[1] first byte of the histogram data
1006  */
1007 typedef struct OMX_HISTOGRAMTYPE {
1008     OMX_U32 nSize;
1009     OMX_VERSIONTYPE nVersion;
1010     OMX_U32 nPortIndex;
1011     OMX_TI_CAMERAVIEWTYPE eCameraView;
1012     OMX_U32 nBins;
1013     OMX_HISTCOMPONENTTYPE eComponentType;
1014     OMX_U8  data[1];
1015 } OMX_HISTOGRAMTYPE;
1016 
1017 #define OMX_OTHER_EXTRADATATYPE_SIZE ( (OMX_U32)(((OMX_OTHER_EXTRADATATYPE*)0x0)->data) ) /**< Size of OMX_OTHER_EXTRADATATYPE**/
1018 /**
1019  * The extra data having ancillary data is described with the following structure.
1020  * This data contains single flags and values
1021  * (not arrays) that have general usage for camera applications.
1022  */
1023 typedef  struct OMX_TI_ANCILLARYDATATYPE {
1024     OMX_U32             nSize;
1025     OMX_VERSIONTYPE     nVersion;
1026     OMX_U32             nPortIndex;
1027     OMX_TI_CAMERAVIEWTYPE       eCameraView;
1028     OMX_U32             nAncillaryDataVersion;
1029     OMX_U32             nFrameNumber;
1030     OMX_U32             nShotNumber;
1031     OMX_U16             nInputImageHeight;
1032     OMX_U16             nInputImageWidth;
1033     OMX_U16             nOutputImageHeight;
1034     OMX_U16             nOutputImageWidth;
1035     OMX_U16             nDigitalZoomFactor;
1036     OMX_S16             nCropCenterColumn;
1037     OMX_S16             nCropCenterRow;
1038     OMX_U16             nOpticalZoomValue;
1039     OMX_U8              nFlashConfiguration;
1040     OMX_U8              nFlashUsage;
1041     OMX_U32             nFlashStatus;
1042     OMX_U8              nAFStatus;
1043     OMX_U8              nAWBStatus;
1044     OMX_U8              nAEStatus;
1045     OMX_U32             nExposureTime;
1046     OMX_U16             nEVCompensation;
1047     OMX_U8              nDigitalGainValue;
1048     OMX_U8              nAnalogGainValue;
1049     OMX_U16             nCurrentISO;
1050     OMX_U16             nReferenceISO;
1051     OMX_U8              nApertureValue;
1052     OMX_U8              nPixelRange;
1053     OMX_U16             nPixelAspectRatio;
1054     OMX_U8              nCameraShake;
1055     OMX_U16             nFocalDistance;
1056     OMX_U64             nParameterChangeFlags;
1057     OMX_U8              nNumFacesDetected;
1058     OMX_U8              nConvergenceMode;
1059     OMX_U8              nConvergenceStatus;
1060     OMX_U8              nDCCStatus;
1061 } OMX_TI_ANCILLARYDATATYPE;
1062 
1063 typedef struct OMX_TI_WHITEBALANCERESULTTYPE {
1064     OMX_U32             nSize;          /**< Size */
1065     OMX_VERSIONTYPE     nVersion;       /**< Version */
1066     OMX_U32             nPortIndex;     /**< Port Index */
1067     OMX_TI_CAMERAVIEWTYPE eCameraView;
1068     OMX_U16             nColorTemperature;      /**< White Balance Color Temperature in Kelvins */
1069     OMX_U16             nGainR;         /**< Bayer applied R color channel gain in (U13Q9) */
1070     OMX_U16             nGainGR;        /**< Bayer applied Gr color channel gain in (U13Q9) */
1071     OMX_U16             nGainGB;        /**< Bayer applied Gb color channel gain in (U13Q9) */
1072     OMX_U16             nGainB;         /**< Bayer applied B color channel gain in (U13Q9) */
1073     OMX_S16             nOffsetR;       /**< Bayer applied R color channel offset */
1074     OMX_S16             nOffsetGR;      /**< Bayer applied Gr color channel offset */
1075     OMX_S16             nOffsetGB;      /**< Bayer applied Gb color channel offset */
1076     OMX_S16             nOffsetB;       /**< Bayer applied B color channel offset */
1077 } OMX_TI_WHITEBALANCERESULTTYPE;
1078 
1079 /**
1080  * Unsaturated Regions data
1081  * The extra data having unsaturated regions data is
1082  * described with the following structure..
1083  */
1084 typedef struct OMX_TI_UNSATURATEDREGIONSTYPE {
1085     OMX_U32             nSize;          /**< Size */
1086     OMX_VERSIONTYPE     nVersion;       /**< Version */
1087     OMX_U32             nPortIndex;     /**< Port Index */
1088     OMX_U16             nPaxelsX;       /**< The number of paxels in the horizontal direction */
1089     OMX_U16             nPaxelsY;       /**< The number of paxels in the vertical direction */
1090     OMX_U16             data[1];        /**< the first value of an array of values that represent */
1091 } OMX_TI_UNSATURATEDREGIONSTYPE;
1092 
1093 /**
1094  * OMX_BARCODETYPE
1095  */
1096 typedef enum OMX_BARCODETYPE{
1097         OMX_BARCODE1D = 0,      /**< 1D barcode */
1098         OMX_BARCODE2D,          /**< 2D barcode */
1099 }OMX_BARCODETYPE;
1100 /**
1101  * Brcode detection data
1102  *	nLeft is the leftmost coordinate of the detected area rectangle.
1103  *	nTop is the topmost coordinate of the detected area rectangle.
1104  *	nWidth is the width of the detected area rectangle in pixels.
1105  *	nHeight is the height of the detected area rectangle in pixels.
1106  *	nOrientation is the orientation of the axis of the detected object. This refers to the angle between the vertical axis of barcode and the horizontal axis.
1107  *	eBarcodetype is an enumeration specifying the barcode type, as listed in the given table.
1108  */
1109 typedef struct OMX_BARCODEDETECTIONTYPE {
1110 	OMX_U32 nSize;
1111 	OMX_VERSIONTYPE nVersion;
1112 	OMX_U32 nPortIndex;
1113 	OMX_TI_CAMERAVIEWTYPE eCameraView;
1114 	OMX_S32 nLeft;
1115 	OMX_S32 nTop;
1116 	OMX_U32 nWidth;
1117 	OMX_U32 nHeight;
1118 	OMX_S32 nOrientation;
1119 	OMX_BARCODETYPE eBarcodetype;
1120  } OMX_BARCODEDETECTIONTYPE;
1121 
1122 /**
1123  * Front object detection data
1124  *	nLeft is the leftmost coordinate of the detected area rectangle.
1125  *	nTop is the topmost coordinate of the detected area rectangle.
1126  *	nWidth is the width of the detected area rectangle in pixels.
1127  *	nHeight is the height of the detected area rectangle in pixels.
1128  */
1129 typedef struct OMX_FRONTOBJDETECTIONTYPE {
1130     OMX_U32 nSize;
1131     OMX_VERSIONTYPE nVersion;
1132     OMX_U32 nPortIndex;
1133     OMX_TI_CAMERAVIEWTYPE eCameraView;
1134     OMX_S32 nLeft;
1135     OMX_S32 nTop;
1136     OMX_U32 nWidth;
1137     OMX_U32 nHeight;
1138 } OMX_FRONTOBJDETECTIONTYPE;
1139 
1140 /**
1141  * Distance estimation data
1142  * nDistance is the estimated distance to the object in millimeters.
1143  * nLargestDiscrepancy is the estimated largest discrepancy of the distance to the object in millimeters. When equal to MAX_INT the discrepancy is unknown.
1144  */
1145 typedef struct OMX_DISTANCEESTIMATIONTYPE {
1146     OMX_U32 nSize;
1147     OMX_VERSIONTYPE nVersion;
1148     OMX_U32 nPortIndex;
1149     OMX_TI_CAMERAVIEWTYPE eCameraView;
1150     OMX_U32 nDistance;
1151     OMX_U32 nLargestDiscrepancy;
1152 } OMX_DISTANCEESTIMATIONTYPE;
1153 
1154 /**
1155  * Distance estimation data
1156  * nDistance is the estimated distance to the object in millimeters.
1157  * nLargestDiscrepancy is the estimated largest discrepancy of the distance to the object in millimeters. When equal to MAX_INT the discrepancy is unknown.
1158  */
1159 
1160 typedef struct OMX_MOTIONESTIMATIONTYPE {
1161     OMX_U32 nSize;
1162     OMX_VERSIONTYPE nVersion;
1163     OMX_U32 nPortIndex;
1164     OMX_TI_CAMERAVIEWTYPE eCameraView;
1165     OMX_S32 nPanX;
1166     OMX_S32 nPanY;
1167 } OMX_MOTIONESTIMATIONTYPE;
1168 
1169 
1170 /**
1171  * Focus region data
1172  *	nRefPortIndex is the port the image frame size is defined on. This image frame size is used as reference for the focus region rectangle.
1173  *	nLeft is the leftmost coordinate of the focus region rectangle.
1174  *	nTop is the topmost coordinate of the focus region rectangle.
1175  *	nWidth is the width of the focus region rectangle in pixels.
1176  *	nHeight is the height of the focus region rectangle in pixels.
1177  *
1178  */
1179 typedef struct OMX_FOCUSREGIONTYPE {
1180     OMX_U32 nSize;
1181     OMX_VERSIONTYPE nVersion;
1182     OMX_U32 nPortIndex;
1183     OMX_TI_CAMERAVIEWTYPE eCameraView;
1184     OMX_U32 nRefPortIndex;
1185     OMX_S32 nLeft;
1186     OMX_S32 nTop;
1187     OMX_U32 nWidth;
1188     OMX_U32 nHeight;
1189 } OMX_FOCUSREGIONTYPE;
1190 
1191 /**
1192  * OMX_ISOSETTINGTYPE: specifies its auto or manual setting
1193  *
1194  */
1195 typedef enum OMX_ISOSETTINGTYPE{
1196         OMX_Auto = 0, /**<	*/
1197         OMX_IsoManual	/**< */
1198 }OMX_ISOSETTINGTYPE;
1199 
1200 /**
1201  *  nSize is the size of the structure including the length of data field containing
1202  *  the histogram data.
1203  *  eISOMode:
1204  *  	specifies the ISO seetting mode - auto/manual
1205  *  nISOSetting:
1206  *  	for manual mode client can specify the ISO setting.
1207  */
1208 
1209 typedef struct OMX_CONFIG_ISOSETTINGTYPE{
1210 	OMX_U32 nSize;
1211 	OMX_VERSIONTYPE nVersion;
1212 	OMX_U32 nPortIndex;
1213 	OMX_ISOSETTINGTYPE eISOMode;
1214 	OMX_U32 nISOSetting;
1215 }OMX_CONFIG_ISOSETTINGTYPE;
1216 
1217 /**
1218  * custom RAW format
1219  */
1220 typedef struct OMX_CONFIG_RAWFORMATTYPE {
1221     OMX_U32 nSize;
1222     OMX_VERSIONTYPE nVersion;
1223     OMX_U32 nPortIndex;
1224     OMX_VERSIONTYPE nFormatVersion;
1225     OMX_STRING cVendorName;
1226 } OMX_CONFIG_RAWFORMATTYPE;
1227 
1228 /**
1229  * Sensor type
1230  */
1231 typedef struct OMX_CONFIG_SENSORTYPE {
1232     OMX_U32 nSize;
1233     OMX_VERSIONTYPE nVersion;
1234     OMX_U32 nPortIndex;
1235     OMX_VERSIONTYPE nSensorVersion;
1236     OMX_STRING cModelName;
1237 } OMX_CONFIG_SENSORTYPE;
1238 
1239 /**
1240  * Sensor custom data type
1241  */
1242 typedef struct OMX_CONFIG_SENSORCUSTOMDATATYPE {
1243     OMX_U32 nSize;
1244     OMX_VERSIONTYPE nVersion;
1245     OMX_U32 nPortIndex;
1246     OMX_U32 nDataLength;
1247     OMX_U8 xSensorData[1];
1248 } OMX_CONFIG_SENSORCUSTOMDATATYPE;
1249 
1250 /**
1251  * OMX_OBJDETECTQUALITY
1252  *
1253  */
1254 typedef enum OMX_OBJDETECTQUALITY{
1255         OMX_FastDetection = 0, /**< A detection that prioritizes speed*/
1256         OMX_Default,    /**< The default detection, should be used when no control of the detection quality is given.*/
1257         OMX_BetterDetection,    /**< A detection that levels correct detection with speed*/
1258         OMX_BestDtection,   /**< A detection that prioritizes correct detection*/
1259         OMX_AUTODETECTION   /**< Automatically decide which object detection quality is best.*/
1260 }OMX_OBJDETECTQUALITY;
1261 
1262 /**
1263  * OBJECT DETECTION Type
1264  *      nPortIndex: is an output port. The port index decides on which port the extra data structur of detected object is sent on.
1265  *      bEnable : this controls ON/OFF for this object detection algirithm.
1266  *      bFrameLimited: is a Boolean used to indicate if detection shall be terminated after the specified number of frames if
1267  *          true frame limited detection is enabled; otherwise the port does not terminate detection until instructed to do so by the client.
1268  *      nFrameLimit: is the limit on number of frames detection is executed for, this parameter is only valid if bFrameLimited is enabled.
1269  *      nMaxNbrObjects: specifies the maximum number of objects that should be found in each frame. It is implementation dependent which objects are found.
1270  *      nLeft: is the leftmost coordinate of the detection area rectangle.
1271  *      nTop: is the topmost coordinate of the detection area rectangle.
1272  *      nWidth: is the width of the detection area rectangle in pixels.
1273  *      nHeight: is the height of the detection area rectangle in pixels.
1274  *      eObjDetectQuality: is an enumeration specifying the quality desired by the detection.
1275  *      nPriority: represents priority of each object when there are multiple objects detected.
1276  */
1277 
1278 typedef struct OMX_CONFIG_OBJDETECTIONTYPE {
1279     OMX_U32 nSize;
1280     OMX_VERSIONTYPE nVersion;
1281     OMX_U32 nPortIndex;
1282     OMX_BOOL bEnable;
1283     OMX_BOOL bFrameLimited;
1284     OMX_U32 nFrameLimit;
1285     OMX_U32 nMaxNbrObjects;
1286     OMX_S32 nLeft;
1287     OMX_S32 nTop;
1288     OMX_U32 nWidth;
1289     OMX_U32 nHeight;
1290     OMX_OBJDETECTQUALITY eObjDetectQuality;
1291     OMX_U32 nPriority;
1292     OMX_U32 nDeviceOrientation;
1293  } OMX_CONFIG_OBJDETECTIONTYPE;
1294 
1295 
1296 /**
1297  * OMX_OBJDETECTQUALITY
1298  *
1299  */
1300 typedef enum OMX_DISTTYPE{
1301         OMX_DistanceControlFocus = 0, /**< focus objects distance type*/
1302         OMX_DISTANCECONTROL_RECT	/**< Evaluated distance to the object found in the rectangelar area indicated as input region.  */
1303 }OMX_DISTTYPE;
1304 
1305 
1306 /**
1307  * Distance mesurement
1308  *	bStarted is a Boolean. The IL client sets it to true to start the measurement .
1309  *		the IL client sets to false to stop the measurement. The IL client can query it to check if the measurement is ongoing.
1310  *	nLeft : is the leftmost coordinate of the rectangle.
1311  *	nTop : is the topmost coordinate of the rectangle.
1312  *	nWidth:  is the width of the rectangle in pixels.
1313  *	nHeight:  is the height of the rectangle in pixels.
1314  *	eDistType:  is an enumeration specifying the distance measurement type, as shown in
1315  */
1316 typedef struct OMX_CONFIG_DISTANCETYPE {
1317     OMX_U32 nSize;
1318     OMX_VERSIONTYPE nVersion;
1319     OMX_U32 nPortIndex;
1320     OMX_BOOL bStarted;
1321     OMX_S32 nLeft;
1322     OMX_S32 nTop;
1323     OMX_U32 nWidth;
1324     OMX_U32 nHeight;
1325     OMX_DISTTYPE eDistType;
1326 } OMX_CONFIG_DISTANCETYPE;
1327 
1328 
1329 /**
1330  * face detect data - face attribute
1331  *  nARGBEyeColor: is the indicates a 32-bit eye color of the person, where bits 0-7 are blue,
1332  *      bits 15-8 are green, bits 24-16 are red, and bits 31-24 are for alpha.
1333  *  nARGBSkinColor: is the indicates a 32-bit skin color of the person, where bits 0-7 are blue,
1334  *      bits 15-8 are green, bits 24-16 are red, and bits 31-24 are for alpha.
1335  *  nARGBHairColor: is the indicates a 32-bit hair color of the person, where bits 0-7 are blue,
1336  *      bits 15-8 are green, bits 24-16 are red, and bits 31-24 are for alpha.
1337  *  nSmileScore: a smile detection score between 0 and 100, where 0 means not detecting,
1338  *      1 means least certain and 100 means most certain a smile is detected.
1339  *  nBlinkScore: a eye-blink detection score between 0 and 100, where 0 means not detecting,
1340  *      1 means least certain and 100 means most certain an eye-blink is detected.
1341  *  xIdentity: represents the identity of the face. With identity equal to zero this is not supported.
1342  *      This can be used by a face recognition application. The component shall not reuse an identity value unless the same face.
1343  *      Can be used to track detected faces when it moves between frames. Specific usage of this field is implementation dependent.
1344  *      It can be some kind of ID.
1345  *
1346  */
1347 typedef struct OMX_FACEATTRIBUTE {
1348         OMX_U32 nARGBEyeColor;
1349     OMX_U32 nARGBSkinColor;
1350     OMX_U32 nARGBHairColor;
1351     OMX_U32 nSmileScore;
1352     OMX_U32 nBlinkScore;
1353     OMX_U32 xIdentity[4];
1354 } OMX_FACEATTRIBUTE;
1355 
1356 /**
1357  * xGamma represents lool-up table for gamma correction in Q16 format.
1358  * All values assume that maximum value is 255. If internal implementation uses higher dynamic range, this value should be adjusted internally.
1359  *
1360  *
1361  *
1362  * STRUCT MEMBERS:
1363  *  nScore: is a detection score between 0 and 100, where 0 means unknown score, 1 means least certain and 100 means most certain the detection is correct.
1364  *  nLeft: is the leftmost coordinate of the detected area rectangle.
1365  *  nTop: is the topmost coordinate of the detected area rectangle.
1366  *  nWidth: is the width of the detected area rectangle in pixels.
1367  *  nHeight: is the height of the detected area rectangle in pixels.
1368  *  nOrientationRoll/Yaw/Pitch is the orientation of the axis of the detected object. Here roll angle is defined as the angle between the vertical axis of face and the horizontal axis. All angles can have the value of -180 to 180 degree in Q16 format. Some face detection algorithm may not be able to fill in the angles, this is denoted by the use of MAX_INT value.
1369  *  nPriority represents priority of each object when there are multiple objects detected.
1370  *  nFaceAttr describe the attributes of the detected face object with the following structure:
1371  *
1372  *
1373  */
1374 typedef struct OMX_TI_FACERESULT {
1375     OMX_U32 nSize;
1376     OMX_VERSIONTYPE nVersion;
1377     OMX_U32 nPortIndex;
1378     OMX_TI_CAMERAVIEWTYPE eCameraView;
1379     OMX_U32 nScore;
1380     OMX_S32 nLeft;
1381     OMX_S32 nTop;
1382 OMX_U32 nWidth;
1383 OMX_U32 nHeight;
1384 OMX_S32 nOrientationRoll;
1385 OMX_S32 nOrientationYaw;
1386 OMX_S32 nOrientationPitch;
1387 OMX_U32 nPriority;
1388 OMX_FACEATTRIBUTE nFaceAttr;
1389 } OMX_TI_FACERESULT;
1390 
1391 
1392 /**
1393  * Face detection data
1394  * The extra data having face detection data is described with the following structure.
1395  * The parser should only assume that the first tFacePosition[ulFaceCount] of the 35 elements
1396  * of the array should contain valid data.
1397  */
1398 typedef struct OMX_FACEDETECTIONTYPE {
1399     OMX_U32 nSize;
1400     OMX_VERSIONTYPE nVersion;
1401     OMX_U32 nPortIndex;
1402     OMX_TI_CAMERAVIEWTYPE    eCameraView;
1403     OMX_U16 ulFaceCount;
1404     OMX_TI_FACERESULT tFacePosition[35];// 35 is max faces supported by FDIF
1405 } OMX_FACEDETECTIONTYPE;
1406 
1407 /**
1408  * MTIS Vendor Specific Motion estimation
1409  * The extra data having MTIS motion estimation data is
1410  * described with the following structure.
1411  */
1412 typedef struct OMX_TI_MTISTYPE {
1413     OMX_U32 nSize;
1414     OMX_VERSIONTYPE nVersion;
1415     OMX_U32 nPortIndex;
1416     OMX_TI_CAMERAVIEWTYPE eCameraView;
1417     OMX_S32 nMaxMVh;            /**< The maximum MV for horizontal direction */
1418     OMX_S32 nMaxMVv;            /**< The maximum MV for vertical direction */
1419     OMX_U16 nMVRelY[9];         /**< The mask for MV reliability */
1420     OMX_U16 nMVRelX[9];         /**< The mask for MV reliability */
1421     OMX_S32 nMVh[9];            /**< The MVs for horizontal direction */
1422     OMX_S32 nMVv[9];            /**< The MVs for vertical direction */
1423 } OMX_TI_MTISTYPE;
1424 
1425 /**
1426  * The OMX_EXTRADATATYPE enumeration is used to define the
1427  * possible extra data payload types.
1428  */
1429 typedef enum OMX_EXT_EXTRADATATYPE
1430 {
1431    OMX_ExifAttributes = 0x7F000001, /**< Reserved region for introducing Vendor Extensions */
1432    OMX_AncillaryData,                   /**< 0x7F000002 ancillary data */
1433    OMX_WhiteBalance,                    /**< 0x7F000003 white balance resultant data */
1434    OMX_UnsaturatedRegions,              /**< 0x7F000004 unsaturated regions data */
1435    OMX_FaceDetection, /**< face detect data */
1436    OMX_BarcodeDetection, /**< bar-code detct data */
1437    OMX_FrontObjectDetection, /**< Front object detection data */
1438    OMX_MotionEstimation, /**< motion Estimation data */
1439    OMX_TI_MTISType,                     /**< 0x7F000009 MTIS motion Estimation data */
1440    OMX_DistanceEstimation, /**< disctance estimation */
1441    OMX_Histogram, /**< histogram */
1442    OMX_FocusRegion, /**< focus region data */
1443    OMX_ExtraDataPanAndScan,             /**< 0x7F00000D pan and scan data */
1444    OMX_RawFormat, /**< custom RAW data format */
1445    OMX_SensorType, /**< vendor & model of the sensor being used */
1446    OMX_SensorCustomDataLength, /**< vendor specific custom data length */
1447    OMX_SensorCustomData, /**< vendor specific data */
1448    OMX_TI_FrameLayout,                  /**< 0x7F000012 vendor specific data */
1449    OMX_TI_SEIinfo2004Frame1,    /**< 0x7F000013 Used for 2004 SEI message to be provided by video decoders */
1450    OMX_TI_SEIinfo2004Frame2,    /**< 0x7F000014 Used for 2004 SEI message to be provided by video decoders */
1451    OMX_TI_SEIinfo2010Frame1,    /**< 0x7F000015 Used for 2010 SEI message to be provided by video decoders */
1452    OMX_TI_SEIinfo2010Frame2,    /**< 0x7F000016 Used for 2010 SEI message to be provided by video decoders */
1453    OMX_TI_RangeMappingInfo,     /**< 0x7F000017 Used for Range mapping info provided by Video Decoders */
1454    OMX_TI_RescalingInfo,        /**< 0x7F000018 Used for width/height rescaling info provided by Video Decoders */
1455    OMX_TI_WhiteBalanceOverWrite,        /**< 0x7F000019 Used for manual AWB settings */
1456    OMX_TI_ExtraData_Count,
1457    OMX_TI_ExtraData_Max = OMX_TI_ExtraData_Count - 1,
1458 } OMX_EXT_EXTRADATATYPE;
1459 
1460 
1461 /**
1462  * Enable Extra-data on a specific port.
1463  *
1464  *
1465  *
1466  * STRUCT MEMBERS:
1467  *  nSize        : Size of the structure in bytes
1468  *  nVersion     : OMX specification version information
1469  *  nPortIndex   : Port on which this extra data to be assosiated
1470  *  eExtraDataType :  Extra data type
1471  *  bEnable      : Eneble/Disable this extra-data through port.
1472  *
1473  */
1474 typedef struct OMX_CONFIG_EXTRADATATYPE {
1475     OMX_U32 nSize;
1476     OMX_VERSIONTYPE nVersion;
1477     OMX_U32 nPortIndex;
1478     OMX_EXT_EXTRADATATYPE eExtraDataType;
1479     OMX_TI_CAMERAVIEWTYPE eCameraView;
1480     OMX_BOOL bEnable;
1481 } OMX_CONFIG_EXTRADATATYPE;
1482 
1483 /**
1484  * JPEG header type
1485  * */
1486 
1487 typedef enum OMX_JPEGHEADERTYPE{
1488 	OMX_NoHeader = 0,
1489 	OMX_JFIF,
1490 	OMX_EXIF
1491 }OMX_JPEGHEADERTYPE;
1492 /**
1493  * Re-start marker configuration
1494  *
1495  *
1496  *
1497  * STRUCT MEMBERS:
1498  *  nSize        : Size of the structure in bytes
1499  *  nVersion     : OMX specification version information
1500  *  nPortIndex   : Port on which this extra data to be assosiated
1501  *  eJpegHeaderType : JPEG header type EXIF, JFIF, or No heeader.
1502  */
1503 
1504 typedef struct OMX_CONFIG_JPEGHEEADERTYPE{
1505 	OMX_U32 nSize;
1506 	OMX_VERSIONTYPE nVersion;
1507 	OMX_U32 nPortIndex;
1508 	OMX_JPEGHEADERTYPE eJpegHeaderType;
1509 }OMX_CONFIG_JPEGHEEADERTYPE;
1510 
1511 /**
1512  * Re-start marker configuration
1513  *
1514  *
1515  *
1516  * STRUCT MEMBERS:
1517  *  nSize        : Size of the structure in bytes
1518  *  nVersion     : OMX specification version information
1519  *  nPortIndex   : Port on which this extra data to be assosiated
1520  *  nRstInterval :  interval at which RST markers are to be inserted.
1521  *  bEnable      : Eneble/Disable this RST marker insertion feature.
1522  *
1523  */
1524 
1525 typedef struct OMX_CONFIG_RSTMARKER{
1526 	OMX_U32 nSize;
1527 	OMX_VERSIONTYPE nVersion;
1528 	OMX_U32 nPortIndex;
1529 	OMX_U32 nRstInterval;
1530 	OMX_BOOL nEnable;
1531 }OMX_CONFIG_RSTMARKER;
1532 
1533 /**
1534  * Enable Extra-data on a specific port.
1535  *
1536  *
1537  *
1538  * STRUCT MEMBERS:
1539  *  nSize        : Size of the structure in bytes
1540  *  nVersion     : OMX specification version information
1541  *  nPortIndex   : Port that this structure applies to
1542  * nMaxSize : max size
1543  *
1544  *
1545  */
1546 typedef struct OMX_IMAGE_JPEGMAXSIZE {
1547     OMX_U32 nSize;
1548     OMX_VERSIONTYPE nVersion;
1549     OMX_U32 nPortIndex;
1550     OMX_U32 nMaxSize;
1551 } OMX_IMAGE_JPEGMAXSIZE;
1552 
1553 
1554 typedef enum OMX_IMAGESTAMPOPERATION{
1555     OMX_NewImageStamp = 0,
1556     OMX_Continuation
1557 }OMX_IMAGESTAMPOPERATION;
1558 
1559 
1560 /**
1561  * Enable Extra-data on a specific port.
1562  *
1563  *
1564  *
1565  * STRUCT MEMBERS:
1566  *  nSize        : Size of the structure in bytes
1567  *  nVersion     : OMX specification version information
1568  *  nPortIndex   : Port that this structure applies to
1569  * nMaxSize : max size
1570  *
1571  *
1572  */
1573 typedef struct OMX_PARAM_IMAGESTAMPOVERLAYTYPE {
1574     OMX_U32 nSize;
1575     OMX_VERSIONTYPE nVersion;
1576     OMX_U32 nPortIndex;
1577     OMX_IMAGESTAMPOPERATION nOp;
1578     OMX_U32 nLeft;
1579     OMX_U32 nTop;
1580     OMX_U32 nHeight;
1581     OMX_U32 nWidth;
1582     OMX_COLOR_FORMATTYPE eFormat;
1583     OMX_U8 * pBitMap;
1584 } OMX_PARAM_IMAGESTAMPOVERLAYTYPE;
1585 
1586 
1587 /**
1588  * Enable Extra-data on a specific port.
1589  *
1590  *
1591  *
1592  * STRUCT MEMBERS:
1593  *  nSize        : Size of the structure in bytes
1594  *  nVersion     : OMX specification version information
1595  *  nPortIndex   : Port that this structure applies to
1596  * nMaxSize : max size
1597  *
1598  *
1599  */
1600 typedef struct OMX_PARAM_THUMBNAILTYPE {
1601     OMX_U32 nSize;
1602     OMX_VERSIONTYPE nVersion;
1603     OMX_U32 nPortIndex;
1604     OMX_U32 nHeight;
1605     OMX_U32 nWidth;
1606     OMX_IMAGE_CODINGTYPE eCompressionFormat;
1607     OMX_COLOR_FORMATTYPE eColorFormat;
1608     OMX_U32 nQuality;
1609     OMX_U32 nMaxSize;
1610 } OMX_PARAM_THUMBNAILTYPE;
1611 
1612 /**
1613  * Red-Eye Removal Enum
1614  */
1615 typedef enum OMX_REDEYEREMOVALTYPE{
1616     OMX_RedEyeRemovalOff    = 0, /** No red eye removal*/
1617     OMX_RedEyeRemovalOn, /**    Red eye removal on*/
1618     OMX_RedEyeRemovalAuto,  /** Red eye removal will be done automatically when detected*/
1619     OMX_RedEyeRemovalKhronosExtensions = 0x6F000000,    /** Reserved region for introducing Khronos Standard Extensions*/
1620     OMX_RedEyeRemovalVendorStartUnused = 0x7F000000,    /** Reserved region for introducing Vendor Extensions*/
1621     OMX_RedEyeRemovalMax = 0x7FFFFFFF
1622 }OMX_REDEYEREMOVALTYPE;
1623 
1624 /**
1625  * Enable Extra-data on a specific port.
1626  *
1627  *
1628  *
1629  * STRUCT MEMBERS:
1630  *  nSize        : Size of the structure in bytes
1631  *  nVersion     : OMX specification version information
1632  *  nPortIndex   : Port that this structure applies to
1633  *  nLeft: is the leftmost coordinate of the detection area rectangle (such as face region).
1634  *  nTop: is the topmost coordinate of the detection area rectangle (such as face region).
1635  *  nWidth: is the width of the detection area rectangle  in pixels.
1636  *  nHeight: is the height of the detection area rectangle in pixels.
1637  *  nARGBEyeColor indicates a 32-bit eye color to replace the red-eye, where bits 0-7 are blue, bits 15-8 are green, bits 24-16 are red, and bits 31-24 are for alpha. When all zero indicates automatic choice.
1638 
1639  *
1640  */
1641 typedef struct OMX_CONFIG_REDEYEREMOVALTYPE {
1642    OMX_U32 nSize;
1643    OMX_VERSIONTYPE nVersion;
1644    OMX_U32 nPortIndex;
1645    OMX_S32 nLeft;
1646    OMX_S32 nTop;
1647    OMX_U32 nWidth;
1648    OMX_U32 nHeight;
1649    OMX_U32 nARGBEyeColor;
1650    OMX_REDEYEREMOVALTYPE eMode;
1651 } OMX_CONFIG_REDEYEREMOVALTYPE;
1652 
1653 
1654 
1655 
1656 
1657 
1658 /**
1659  * Video capture YUV Range Enum
1660  */
1661 typedef enum OMX_VIDEOYUVRANGETYPE{
1662     OMX_ITURBT601 = 0,
1663     OMX_Full8Bit,
1664     OMX_VideoYUVRangeKhronosExtensions = 0x6F000000,    /** Reserved region for introducing Khronos Standard Extensions*/
1665     OMX_VideoYUVRangeVendorStartUnused = 0x7F000000,    /** Reserved region for introducing Vendor Extensions*/
1666     OMX_VideoYUVRangeMax = 0x7FFFFFFF
1667 }OMX_VIDEOYUVRANGETYPE;
1668 
1669 /**
1670  * Enable Extra-data on a specific port.
1671  *
1672  *
1673  *
1674  * STRUCT MEMBERS:
1675  *  nSize        : Size of the structure in bytes
1676  *  nVersion     : OMX specification version information
1677  *  nPortIndex   : Port that this structure applies to
1678  *
1679  */
1680 typedef struct OMX_PARAM_VIDEOYUVRANGETYPE {
1681    OMX_U32 nSize;
1682    OMX_VERSIONTYPE nVersion;
1683    OMX_U32 nPortIndex;
1684    OMX_VIDEOYUVRANGETYPE eYUVRange;
1685 } OMX_PARAM_VIDEOYUVRANGETYPE;
1686 
1687 /**
1688  * Video noise filter mode range enum
1689  */
1690 typedef enum OMX_VIDEONOISEFILTERMODETYPE{
1691     OMX_VideoNoiseFilterModeOff = 0,
1692     OMX_VideoNoiseFilterModeOn,
1693     OMX_VideoNoiseFilterModeAuto,
1694     OMX_VideoNoiseFilterModeExtensions = 0x6F000000,    /** Reserved region for introducing Khronos Standard Extensions */
1695     OMX_VideoNoiseFilterModeStartUnused = 0x7F000000,   /** Reserved region for introducing Vendor Extensions */
1696     OMX_VideoNoiseFilterModeMax = 0x7FFFFFFF
1697 } OMX_VIDEONOISEFILTERMODETYPE;
1698 
1699 /**
1700  * Enable video noise filter.
1701  *
1702  * STRUCT MEMBERS:
1703  *  nSize       : Size of the structure in bytes
1704  *  nVersion    : OMX specification version information
1705  *  nPortIndex  : Port that this structure applies to
1706  *  eMode       : Video noise filter mode (on/off/auto)
1707  */
1708 typedef struct OMX_PARAM_VIDEONOISEFILTERTYPE {
1709     OMX_U32 nSize;
1710     OMX_VERSIONTYPE nVersion;
1711     OMX_U32 nPortIndex;
1712     OMX_VIDEONOISEFILTERMODETYPE eMode;
1713 } OMX_PARAM_VIDEONOISEFILTERTYPE;
1714 
1715 
1716 /**
1717  * High ISO Noise filter mode range enum
1718  */
1719 typedef enum OMX_ISONOISEFILTERMODETYPE{
1720     OMX_ISONoiseFilterModeOff = 0,
1721     OMX_ISONoiseFilterModeOn,
1722     OMX_ISONoiseFilterModeAuto,
1723     OMX_ISONoiseFilterModeExtensions = 0x6F000000,    /** Reserved region for introducing Khronos Standard Extensions */
1724     OMX_ISONoiseFilterModeStartUnused = 0x7F000000,   /** Reserved region for introducing Vendor Extensions */
1725     OMX_ISONoiseFilterModeMax = 0x7FFFFFFF
1726 } OMX_ISONOISEFILTERMODETYPE;
1727 
1728 /**
1729  * Enable ISO noise filter.
1730  *
1731  * STRUCT MEMBERS:
1732  *  nSize       : Size of the structure in bytes
1733  *  nVersion    : OMX specification version information
1734  *  nPortIndex  : Port that this structure applies to
1735  *  eMode       : ISO noise filter (NSF2 is used) mode (on/off/auto)
1736  */
1737 typedef struct OMX_PARAM_ISONOISEFILTERTYPE {
1738     OMX_U32 nSize;
1739     OMX_VERSIONTYPE nVersion;
1740     OMX_U32 nPortIndex;
1741     OMX_ISONOISEFILTERMODETYPE eMode;
1742 } OMX_PARAM_ISONOISEFILTERTYPE;
1743 
1744 /**
1745  * Structure used to to call OMX_GetParams() for each
1746  * increment of "Index" starting with "0"
1747  *
1748  * STRUCT MEMBERS:
1749  * nSize            : Size of the structure in bytes
1750  * nVersion         : OMX specification version information
1751  * nIndex           : Index of the sDCCURI 0..MAX_URI_LENGTH
1752  * sDCCURI          : Look-up table containing strings. Ends with '\0'
1753  */
1754 typedef struct OMX_TI_PARAM_DCCURIINFO {
1755     OMX_U32 nSize;
1756     OMX_VERSIONTYPE nVersion;
1757     OMX_U32 nIndex;
1758     OMX_S8 sDCCURI[MAX_URI_LENGTH];
1759 } OMX_TI_PARAM_DCCURIINFO;
1760 
1761 /**
1762  * Structure used to configure DCC buffer
1763  *
1764  * STRUCT MEMBERS:
1765  * nSize            : Size of the structure in bytes
1766  * nVersion         : OMX specification version information
1767  * nDCCURIBuffSize  : Size of the pDCCURIBuff in bytes
1768  * pDCCURIBuff      : Pointer to a buffer
1769  */
1770 typedef struct OMX_TI_PARAM_DCCURIBUFFER {
1771     OMX_U32 nSize;
1772     OMX_VERSIONTYPE nVersion;
1773     OMX_U32 nDCCURIBuffSize;
1774     OMX_U8 *pDCCURIBuff;
1775 } OMX_TI_PARAM_DCCURIBUFFER;
1776 
1777 /**
1778  * Manual White Balance color temperature
1779  * STRUCT MEMBERS:
1780  *  nSize        : Size of the structure in bytes
1781  *  nVersion     : OMX specification version information
1782  *  nPortIndex   : Port that this structure applies to
1783  *  nColorTemperature : Color Temperature in K
1784  */
1785 typedef struct OMX_TI_CONFIG_WHITEBALANCECOLORTEMPTYPE {
1786     OMX_U32 nSize;
1787     OMX_VERSIONTYPE nVersion;
1788     OMX_U32 nPortIndex;
1789     OMX_U32 nColorTemperature;
1790 } OMX_TI_CONFIG_WHITEBALANCECOLORTEMPTYPE;
1791 
1792 /**
1793  * Focus spot weighting range enum
1794  */
1795 typedef enum OMX_TI_CONFIG_FOCUSSPOTMODETYPE {
1796     OMX_FocusSpotDefault = 0,                           /** Makes CommonFocusRegion to be used. */
1797     OMX_FocusSpotSinglecenter,
1798     OMX_FocusSpotMultiNormal,
1799     OMX_FocusSpotMultiAverage,
1800     OMX_FocusSpotMultiCenter,
1801     OMX_FocusSpotExtensions = 0x6F000000,               /** Reserved region for introducing Khronos Standard Extensions */
1802     OMX_FocusSpotModeStartUnused = 0x7F000000,          /** Reserved region for introducing Vendor Extensions */
1803     OMX_FocusSpotModeMax = 0x7FFFFFFF
1804 } OMX_TI_CONFIG_FOCUSSPOTMODETYPE;
1805 
1806 /**
1807  * Focus Spot Weighting configuration.
1808  *
1809  * STRUCT MEMBERS:
1810  *  nSize       : Size of the structure in bytes
1811  *  nVersion    : OMX specification version information
1812  *  nPortIndex  : Port that this structure applies to
1813  *  eMode       : Spot Weighting mode
1814  */
1815 typedef struct OMX_TI_CONFIG_FOCUSSPOTWEIGHTINGTYPE {
1816     OMX_U32 nSize;
1817     OMX_VERSIONTYPE nVersion;
1818     OMX_U32 nPortIndex;
1819     OMX_TI_CONFIG_FOCUSSPOTMODETYPE eMode;
1820 } OMX_TI_CONFIG_FOCUSSPOTWEIGHTINGTYPE;
1821 
1822 /**
1823  * Enumeration of possible Exposure control types for OMX_EXPOSURECONTROLTYPE
1824  */
1825 typedef enum OMX_TI_EXTEXPOSURECONTROLTYPE {
1826     OMX_TI_ExposureControlVeryLong = OMX_ExposureControlVendorStartUnused + 1
1827 } OMX_TI_EXTEXPOSURECONTROLTYPE;
1828 
1829 /**
1830  * Variable frame rate configuration.
1831  *
1832  * STRUCT MEMBERS:
1833  *  nSize         : Size of the structure in bytes
1834  *  nVersion      : OMX specification version information
1835  *  nPortIndex    : Port that this structure applies to
1836  *  xMinFramerate : Minimum variable frame rate value
1837  */
1838 typedef struct OMX_TI_PARAM_VARFRAMERATETYPE {
1839 	OMX_U32 nSize;
1840 	OMX_VERSIONTYPE nVersion;
1841 	OMX_U32 nPortIndex;
1842 	OMX_U32 xMinFramerate;
1843 } OMX_TI_PARAM_VARFRAMERATETYPE;
1844 
1845 /**
1846  * Exposure config for right frame
1847  */
1848 typedef struct OMX_TI_CONFIG_EXPOSUREVALUERIGHTTYPE {
1849 	OMX_U32 nSize;
1850 	OMX_VERSIONTYPE nVersion;
1851 	OMX_U32 nPortIndex;
1852 	OMX_U32 nApertureFNumber;  /**< e.g. nApertureFNumber = 2 implies "f/2" - Q16 format */
1853 	OMX_U32 nShutterSpeedMsec; /**< Shutterspeed in milliseconds */
1854 	OMX_U32 nSensitivity;      /**< e.g. nSensitivity = 100 implies "ISO 100" */
1855 } OMX_TI_CONFIG_EXPOSUREVALUERIGHTTYPE;
1856 
1857 /**
1858  * Auto Convergence mode enum
1859  */
1860 typedef enum OMX_TI_AUTOCONVERGENCEMODETYPE {
1861 	OMX_TI_AutoConvergenceModeDisable,
1862 	OMX_TI_AutoConvergenceModeFrame,
1863 	OMX_TI_AutoConvergenceModeCenter,
1864 	OMX_TI_AutoConvergenceModeFocusFaceTouch,
1865 	OMX_TI_AutoConvergenceModeManual,
1866 	OMX_TI_AutoConvergenceExtensions = 0x6F000000,    /** Reserved region for introducing Khronos Standard Extensions */
1867 	OMX_TI_AutoConvergenceStartUnused = 0x7F000000,   /** Reserved region for introducing Vendor Extensions */
1868 	OMX_TI_AutoConvergenceModeMax = 0x7FFFFFFF
1869 } OMX_TI_AUTOCONVERGENCEMODETYPE;
1870 
1871 /**
1872  * Variable farame rate configuration.
1873  *
1874  * STRUCT MEMBERS:
1875  *  nSize             : Size of the structure in bytes
1876  *  nVersion          : OMX specification version information
1877  *  nPortIndex        : Port that this structure applies to
1878  *  eACMode           : Auto convergence mode
1879  *  nManualConverence : Manual Converence value
1880  *  nACProcWinStartX  : Start X AC Window
1881  *  nACProcWinStartY  : Start Y AC Window
1882  *  nACProcWinWidth   : Width of AC Window
1883  *  nACProcWinHeight  : Height of AC Window
1884  *  bACStatus         : output status from AL alg
1885  */
1886 typedef struct OMX_TI_CONFIG_CONVERGENCETYPE {
1887 	OMX_U32 nSize;
1888 	OMX_VERSIONTYPE nVersion;
1889 	OMX_U32 nPortIndex;
1890 	OMX_TI_AUTOCONVERGENCEMODETYPE eACMode;
1891 	OMX_S32 nManualConverence;
1892 	OMX_U32 nACProcWinStartX;
1893 	OMX_U32 nACProcWinStartY;
1894 	OMX_U32 nACProcWinWidth;
1895 	OMX_U32 nACProcWinHeight;
1896 	OMX_BOOL bACStatus;
1897 } OMX_TI_CONFIG_CONVERGENCETYPE;
1898 
1899 /**
1900  * Camera specific version.
1901  *
1902  * STRUCT MEMBERS:
1903  *  nBranch        : Branch
1904  *  nCommitID      : Commit ID
1905  *  nBuildDateTime : Build date and time
1906  *  nExtraInfo     : rederved for future use
1907  */
1908 typedef struct OMX_TI_CAMERASPECVERSIONTYPE {
1909 	OMX_U8 nBranch[64];
1910 	OMX_U8 nCommitID[64];
1911 	OMX_U8 nBuildDateTime[64];
1912 	OMX_U8 nExtraInfo[64];
1913 } OMX_TI_CAMERASPECVERSIONTYPE;
1914 
1915 /**
1916  * Stereo frame layout enum
1917  */
1918 typedef enum OMX_TI_STEREOFRAMELAYOUTTYPE {
1919 	OMX_TI_StereoFrameLayout2D,
1920 	OMX_TI_StereoFrameLayoutTopBottom,
1921 	OMX_TI_StereoFrameLayoutLeftRight,
1922 	OMX_TI_StereoFrameLayoutMax = 0x7FFFFFFF
1923 } OMX_TI_STEREOFRAMELAYOUTTYPE;
1924 
1925 /**
1926  * Camera frame layout type.
1927  *
1928  * STRUCT MEMBERS:
1929  *  eFrameLayout    : frame layout
1930  *  nSubsampleRatio : subsample ratio
1931  */
1932 typedef struct OMX_TI_FRAMELAYOUTTYPE {
1933 	OMX_U32 nSize;
1934 	OMX_VERSIONTYPE nVersion;
1935 	OMX_U32 nPortIndex;
1936 	OMX_TI_STEREOFRAMELAYOUTTYPE eFrameLayout;
1937 	OMX_U32 nSubsampleRatio; /**  Subsampling ratio, Q15.7 */
1938 } OMX_TI_FRAMELAYOUTTYPE;
1939 
1940 /**
1941  * The OMX_TI_COLOR_FORMATTYPE enumeration is used to define the
1942  * extended color format types.
1943  */
1944 typedef enum OMX_TI_COLOR_FORMATTYPE {
1945 	OMX_TI_COLOR_FormatYUV420PackedSemiPlanarInterlaced =
1946 	    (OMX_COLOR_FORMATTYPE) OMX_COLOR_FormatVendorStartUnused + 1,
1947 	OMX_TI_COLOR_FormatRawBayer10bitStereo =
1948 	    OMX_COLOR_FormatVendorStartUnused + 2, /**< 10 bit raw for stereo */
1949 	OMX_TI_COLOR_FormatYUV420PackedSemiPlanar =
1950             (OMX_COLOR_FORMATTYPE) OMX_COLOR_FormatVendorStartUnused  + 0x100, /* 0x100 is used since it is the corresponding HAL pixel fromat */
1951         OMX_COLOR_FormatAndroidOpaque =
1952 	    (OMX_COLOR_FORMATTYPE) OMX_COLOR_FormatVendorStartUnused  + 0x789 /**< Platform specified opaque format set to unique value 0x789*/
1953 } OMX_TI_COLOR_FORMATTYPE;
1954 
1955 /**
1956  * The OMX_TI_EXIFTAGSTATUS enumeration is used to define the
1957  * tag status types.
1958  */
1959 typedef enum OMX_TI_EXIFTAGSTATUS {
1960 	OMX_TI_TagReadOnly,     /**< implies this tag is generated within omx-camera >*/
1961 	OMX_TI_TagReadWrite,    /**< implies this tag can be overwritten by client >*/
1962 	OMX_TI_TagUpdated,      /**< client has to use this to indicate the specific tag is overwritten >*/
1963 	OMX_TI_ExifStatus_Max = 0x7fffffff
1964 } OMX_TI_EXIFTAGSTATUS;
1965 
1966 typedef struct OMX_TI_CONFIG_EXIF_TAGS {
1967 	OMX_U32                 nSize;
1968 	OMX_VERSIONTYPE         nVersion;
1969 	OMX_U32                 nPortIndex;
1970 	OMX_TI_EXIFTAGSTATUS    eStatusImageWidth;
1971 	OMX_U32                 ulImageWidth;
1972 	OMX_TI_EXIFTAGSTATUS    eStatusImageHeight;
1973 	OMX_U32                 ulImageHeight;
1974 	OMX_TI_EXIFTAGSTATUS    eStatusBitsPerSample;
1975 	OMX_U16                 usBitsPerSample[3];
1976 	OMX_TI_EXIFTAGSTATUS    eStatusCompression;
1977 	OMX_U16                 usCompression;
1978 	OMX_TI_EXIFTAGSTATUS    eStatusPhotometricInterpretation;
1979 	OMX_U16                 usPhotometricInterpretation;
1980 	OMX_TI_EXIFTAGSTATUS    eStatusOrientation;
1981 	OMX_U16                 usOrientation;
1982 	OMX_TI_EXIFTAGSTATUS    eStatusSamplesPerPixel;
1983 	OMX_U16                 usSamplesPerPixel;
1984 	OMX_TI_EXIFTAGSTATUS    eStatusPlanarConfiguration;
1985 	OMX_U16                 usPlanarConfiguration;
1986 	OMX_TI_EXIFTAGSTATUS    eStatusYCbCrSubSampling;
1987 	OMX_U16                 usYCbCrSubSampling[2];
1988 	OMX_TI_EXIFTAGSTATUS    eStatusYCbCrPositioning;
1989 	OMX_U16                 usYCbCrPositioning;
1990 	OMX_TI_EXIFTAGSTATUS    eStatusXResolution;
1991 	OMX_U32                 ulXResolution[2];
1992 	OMX_TI_EXIFTAGSTATUS    eStatusYResolution;
1993 	OMX_U32                 ulYResolution[2];
1994 	OMX_TI_EXIFTAGSTATUS    eStatusResolutionUnit;
1995 	OMX_U16                 usResolutionUnit;
1996 
1997 	OMX_TI_EXIFTAGSTATUS    eStatusRowsPerStrip;
1998 	OMX_U32                 ulRowsPerStrip;
1999 	OMX_TI_EXIFTAGSTATUS    eStatusDataSize;
2000 	OMX_U32                 ulDataSize;
2001 
2002 	OMX_TI_EXIFTAGSTATUS    eStatusTransferFunction;
2003 	OMX_U16                 usTransferFunction[3*256];
2004 	OMX_TI_EXIFTAGSTATUS    eStatusWhitePoint;
2005 	OMX_U32                 ulWhitePoint[4]; //2x2
2006 	OMX_TI_EXIFTAGSTATUS    eStatusPrimaryChromaticities;
2007 	OMX_U32                 ulPrimaryChromaticities[12]; //2x6
2008 	OMX_TI_EXIFTAGSTATUS    eStatusYCbCrCoefficients;
2009 	OMX_U32                 ulYCbCrCoefficients[6]; //2x3
2010 	OMX_TI_EXIFTAGSTATUS    eStatusReferenceBlackWhite;
2011 	OMX_U32                 ulReferenceBlackWhite[12]; //2x6
2012 	OMX_TI_EXIFTAGSTATUS    eStatusDateTime;
2013 	OMX_S8*                 pDateTimeBuff;
2014 	OMX_U32                 ulDateTimeBuffSizeBytes;
2015 	OMX_TI_EXIFTAGSTATUS    eStatusImageDescription;
2016 	OMX_S8*                 pImageDescriptionBuff;
2017 	OMX_U32                 ulImageDescriptionBuffSizeBytes;
2018 	OMX_TI_EXIFTAGSTATUS    eStatusMake;
2019 	OMX_S8*                 pMakeBuff;
2020 	OMX_U32                 ulMakeBuffSizeBytes;
2021 	OMX_TI_EXIFTAGSTATUS    eStatusModel;
2022 	OMX_S8*                 pModelBuff;
2023 	OMX_U32                 ulModelBuffSizeBytes;
2024 	OMX_TI_EXIFTAGSTATUS    eStatusSoftware;
2025 	OMX_S8*                 pSoftwareBuff;
2026 	OMX_U32                 ulSoftwareBuffSizeBytes;
2027 	OMX_TI_EXIFTAGSTATUS    eStatusArtist;
2028 	OMX_S8*                 pArtistBuff;
2029 	OMX_U32                 ulArtistBuffSizeBytes;
2030 	OMX_TI_EXIFTAGSTATUS    eStatusCopyright;
2031 	OMX_S8*                 pCopyrightBuff;
2032 	OMX_U32                 ulCopyrightBuffSizeBytes;
2033 
2034 	OMX_TI_EXIFTAGSTATUS    eStatusExifVersion;
2035 	OMX_S8                  cExifVersion[4];
2036 	OMX_TI_EXIFTAGSTATUS    eStatusFlashpixVersion;
2037 	OMX_S8                  cFlashpixVersion[4];
2038 	OMX_TI_EXIFTAGSTATUS    eStatusColorSpace;
2039 	OMX_U16                 usColorSpace;
2040 	OMX_TI_EXIFTAGSTATUS    eStatusComponentsConfiguration;
2041 	OMX_S8                  cComponentsConfiguration[4];
2042 	OMX_TI_EXIFTAGSTATUS    eStatusCompressedBitsPerPixel;
2043 	OMX_U32                 ulCompressedBitsPerPixel[2];
2044 	OMX_TI_EXIFTAGSTATUS    eStatusPixelXDimension;
2045 	OMX_U32                 ulPixelXDimension;
2046 	OMX_TI_EXIFTAGSTATUS    eStatusPixelYDimension;
2047 	OMX_U32                 ulPixelYDimension;
2048 	OMX_TI_EXIFTAGSTATUS    eStatusMakerNote;
2049 	OMX_S8*                 pMakerNoteBuff;
2050 	OMX_U32                 ulMakerNoteBuffSizeBytes;
2051 	OMX_TI_EXIFTAGSTATUS    eStatusUserComment;
2052 	OMX_S8*                 pUserCommentBuff;
2053 	OMX_U32                 ulUserCommentBuffSizeBytes;
2054 	OMX_TI_EXIFTAGSTATUS    eStatusRelatedSoundFile;
2055 	OMX_S8                  cRelatedSoundFile[13];
2056 	OMX_TI_EXIFTAGSTATUS    eStatusDateTimeOriginal;
2057 	OMX_S8*                 pDateTimeOriginalBuff;
2058 	OMX_U32                 ulDateTimeOriginalBuffSizeBytes;
2059 	OMX_TI_EXIFTAGSTATUS    eStatusDateTimeDigitized;
2060 	OMX_S8*                 pDateTimeDigitizedBuff;
2061 	OMX_U32                 ulDateTimeDigitizedBuffSizeBytes;
2062 	OMX_TI_EXIFTAGSTATUS    eStatusSubSecTime;
2063 	OMX_S8*                 pSubSecTimeBuff;
2064 	OMX_U32                 ulSubSecTimeBuffSizeBytes;
2065 	OMX_TI_EXIFTAGSTATUS    eStatusSubSecTimeOriginal;
2066 	OMX_S8*                 pSubSecTimeOriginalBuff;
2067 	OMX_U32                 ulSubSecTimeOriginalBuffSizeBytes;
2068 	OMX_TI_EXIFTAGSTATUS    eStatusSubSecTimeDigitized;
2069 	OMX_S8*                 pSubSecTimeDigitizedBuff;
2070 	OMX_U32                 ulSubSecTimeDigitizedBuffSizeBytes;
2071 
2072 	OMX_TI_EXIFTAGSTATUS    eStatusExposureTime;
2073 	OMX_U32                 ulExposureTime[2];
2074 	OMX_TI_EXIFTAGSTATUS    eStatusFNumber;
2075 	OMX_U32                 ulFNumber[2];
2076 	OMX_TI_EXIFTAGSTATUS    eStatusExposureProgram;
2077 	OMX_U16                 usExposureProgram;
2078 	OMX_TI_EXIFTAGSTATUS    eStatusSpectralSensitivity;
2079 	OMX_S8*                 pSpectralSensitivityBuff;
2080 	OMX_U32                 ulSpectralSensitivityBuffSizeBytes;
2081 	OMX_TI_EXIFTAGSTATUS    eStatusISOCount;
2082 	OMX_U16                 usISOCount;
2083 	OMX_TI_EXIFTAGSTATUS    eStatusISOSpeedRatings;
2084 	OMX_U16*                pISOSpeedRatings;
2085 	OMX_TI_EXIFTAGSTATUS    eStatusOECF;
2086 	OMX_S8*                 pOECFBuff;
2087 	OMX_U32                 ulOECFBuffSizeBytes;
2088 	OMX_TI_EXIFTAGSTATUS    eStatusShutterSpeedValue;
2089 	OMX_S32                 slShutterSpeedValue[2];
2090 	OMX_TI_EXIFTAGSTATUS    eStatusApertureValue;
2091 	OMX_U32                 ulApertureValue[2];
2092 	OMX_TI_EXIFTAGSTATUS    eStatusBrightnessValue;
2093 	OMX_S32                 slBrightnessValue[2];
2094 	OMX_TI_EXIFTAGSTATUS    eStatusExposureBiasValue;
2095 	OMX_S32                 slExposureBiasValue[2];
2096 	OMX_TI_EXIFTAGSTATUS    eStatusMaxApertureValue;
2097 	OMX_U32                 ulMaxApertureValue[2];
2098 	OMX_TI_EXIFTAGSTATUS    eStatusSubjectDistance;
2099 	OMX_U32                 ulSubjectDistance[2];
2100 	OMX_TI_EXIFTAGSTATUS    eStatusMeteringMode;
2101 	OMX_U16                 usMeteringMode;
2102 	OMX_TI_EXIFTAGSTATUS    eStatusLightSource;
2103 	OMX_U16                 usLightSource;
2104 	OMX_TI_EXIFTAGSTATUS    eStatusFlash;
2105 	OMX_U16                 usFlash;
2106 	OMX_TI_EXIFTAGSTATUS    eStatusFocalLength;
2107 	OMX_U32                 ulFocalLength[2];
2108 	OMX_TI_EXIFTAGSTATUS    eStatusSubjectArea;
2109 	OMX_U16                 usSubjectArea[4];
2110 	OMX_TI_EXIFTAGSTATUS    eStatusFlashEnergy;
2111 	OMX_U32                 ulFlashEnergy[2];
2112 	OMX_TI_EXIFTAGSTATUS    eStatusSpatialFrequencyResponse;
2113 	OMX_S8*                 pSpatialFrequencyResponseBuff;
2114 	OMX_U32                 ulSpatialFrequencyResponseBuffSizeBytes;
2115 	OMX_TI_EXIFTAGSTATUS    eStatusFocalPlaneXResolution;
2116 	OMX_U32                 ulFocalPlaneXResolution[2];
2117 	OMX_TI_EXIFTAGSTATUS    eStatusFocalPlaneYResolution;
2118 	OMX_U32                 ulFocalPlaneYResolution[2];
2119 	OMX_TI_EXIFTAGSTATUS    eStatusFocalPlaneResolutionUnit;
2120 	OMX_U16                 usFocalPlaneResolutionUnit;
2121 	OMX_TI_EXIFTAGSTATUS    eStatusSubjectLocation;
2122 	OMX_U16                 usSubjectLocation[2];
2123 	OMX_TI_EXIFTAGSTATUS    eStatusExposureIndex;
2124 	OMX_U32                 ulExposureIndex[2];
2125 	OMX_TI_EXIFTAGSTATUS    eStatusSensingMethod;
2126 	OMX_U16                 usSensingMethod;
2127 	OMX_TI_EXIFTAGSTATUS    eStatusFileSource;
2128 	OMX_S8                  cFileSource;
2129 	OMX_TI_EXIFTAGSTATUS    eStatusSceneType;
2130 	OMX_S8                  cSceneType;
2131 	OMX_TI_EXIFTAGSTATUS    eStatusCFAPattern;
2132 	OMX_S8*                 pCFAPatternBuff;
2133 	OMX_U32                 ulCFAPatternBuffSizeBytes;
2134 	OMX_TI_EXIFTAGSTATUS    eStatusCustomRendered;
2135 	OMX_U16                 usCustomRendered;
2136 	OMX_TI_EXIFTAGSTATUS    eStatusExposureMode;
2137 	OMX_U16                 usExposureMode;
2138 	OMX_TI_EXIFTAGSTATUS    eStatusWhiteBalance;
2139 	OMX_U16                 usWhiteBalance;
2140 	OMX_TI_EXIFTAGSTATUS    eStatusDigitalZoomRatio;
2141 	OMX_U32                 ulDigitalZoomRatio[2];
2142 	OMX_TI_EXIFTAGSTATUS    eStatusFocalLengthIn35mmFilm;
2143 	OMX_U16                 usFocalLengthIn35mmFilm;
2144 	OMX_TI_EXIFTAGSTATUS    eStatusSceneCaptureType;
2145 	OMX_U16                 usSceneCaptureType;
2146 	OMX_TI_EXIFTAGSTATUS    eStatusGainControl;
2147 	OMX_U16                 usGainControl;
2148 	OMX_TI_EXIFTAGSTATUS    eStatusContrast;
2149 	OMX_U16                 usContrast;
2150 	OMX_TI_EXIFTAGSTATUS    eStatusSaturation;
2151 	OMX_U16                 usSaturation;
2152 	OMX_TI_EXIFTAGSTATUS    eStatusSharpness;
2153 	OMX_U16                 usSharpness;
2154 	OMX_TI_EXIFTAGSTATUS    eStatusDeviceSettingDescription;
2155 	OMX_S8*                 pDeviceSettingDescriptionBuff;
2156 	OMX_U32                 ulDeviceSettingDescriptionBuffSizeBytes;
2157 	OMX_TI_EXIFTAGSTATUS    eStatusSubjectDistanceRange;
2158 	OMX_U16                 usSubjectDistanceRange;
2159 
2160 	OMX_TI_EXIFTAGSTATUS    eStatusImageUniqueID;
2161 	OMX_S8                  cImageUniqueID[33];
2162 	OMX_U8*                 pPrivateNextIFDPointer;    //Should not be used by the application
2163 	OMX_U8*                 pPrivateThumbnailSize;     //Should not be used by the application
2164 	OMX_U8*                 pPrivateTiffHeaderPointer; //Should not be used by the application
2165 
2166 	OMX_TI_EXIFTAGSTATUS    eStatusGpsVersionId;
2167 	OMX_U8                  ucGpsVersionId[4];
2168 	OMX_TI_EXIFTAGSTATUS    eStatusGpslatitudeRef;
2169 	OMX_S8                  cGpslatitudeRef[2];
2170 	OMX_TI_EXIFTAGSTATUS    eStatusGpsLatitude;
2171 	OMX_U32                 ulGpsLatitude[6];
2172 	OMX_TI_EXIFTAGSTATUS    eStatusGpsLongitudeRef;
2173 	OMX_S8                  cGpsLongitudeRef[2];
2174 	OMX_TI_EXIFTAGSTATUS    eStatusGpsLongitude;
2175 	OMX_U32                 ulGpsLongitude[6];
2176 	OMX_TI_EXIFTAGSTATUS    eStatusGpsAltitudeRef;
2177 	OMX_U8                  ucGpsAltitudeRef;
2178 	OMX_TI_EXIFTAGSTATUS    eStatusGpsAltitude;
2179 	OMX_U32                 ulGpsAltitude[2];
2180 	OMX_TI_EXIFTAGSTATUS    eStatusGpsTimeStamp;
2181 	OMX_U32                 ulGpsTimeStamp[6];
2182 	OMX_TI_EXIFTAGSTATUS    eStatusGpsSatellites;
2183 	OMX_S8*                 pGpsSatellitesBuff;
2184 	OMX_U32                 ulGpsSatellitesBuffSizeBytes;
2185 	OMX_TI_EXIFTAGSTATUS    eStatusGpsStatus;
2186 	OMX_S8                  cGpsStatus[2];
2187 	OMX_TI_EXIFTAGSTATUS    eStatusGpsMeasureMode;
2188 	OMX_S8                  cGpsMeasureMode[2];
2189 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDop;
2190 	OMX_U32                 ulGpsDop[2];
2191 	OMX_TI_EXIFTAGSTATUS    eStatusGpsSpeedRef;
2192 	OMX_S8                  cGpsSpeedRef[2];
2193 	OMX_TI_EXIFTAGSTATUS    eStatusGpsSpeed;
2194 	OMX_U32                 ulGpsSpeed[2];
2195 	OMX_TI_EXIFTAGSTATUS    eStatusGpsTrackRef;
2196 	OMX_S8                  cGpsTrackRef[2];
2197 	OMX_TI_EXIFTAGSTATUS    eStatusGpsTrack;
2198 	OMX_U32                 ulGpsTrack[2];
2199 	OMX_TI_EXIFTAGSTATUS    eStatusGpsImgDirectionRef;
2200 	OMX_S8                  cGpsImgDirectionRef[2];
2201 	OMX_TI_EXIFTAGSTATUS    eStatusGpsImgDirection;
2202 	OMX_U32                 ulGpsImgDirection[2];
2203 	OMX_TI_EXIFTAGSTATUS    eStatusGpsMapDatum;
2204 	OMX_S8*                 pGpsMapDatumBuff;
2205 	OMX_U32                 ulGpsMapDatumBuffSizeBytes;
2206 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDestLatitudeRef;
2207 	OMX_S8                  cGpsDestLatitudeRef[2];
2208 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDestLatitude;
2209 	OMX_U32                 ulGpsDestLatitude[6];
2210 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDestLongitudeRef;
2211 	OMX_S8                  cGpsDestLongitudeRef[2];
2212 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDestLongitude;
2213 	OMX_U32                 ulGpsDestLongitude[6];
2214 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDestBearingRef;
2215 	OMX_S8                  cGpsDestBearingRef[2];
2216 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDestBearing;
2217 	OMX_U32                 ulGpsDestBearing[2];
2218 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDestDistanceRef;
2219 	OMX_S8                  cGpsDestDistanceRef[2];
2220 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDestDistance;
2221 	OMX_U32                 ulGpsDestDistance[2];
2222 	OMX_TI_EXIFTAGSTATUS    eStatusGpsProcessingMethod;
2223 	OMX_S8*                 pGpsProcessingMethodBuff;
2224 	OMX_U32                 ulGpsProcessingMethodBuffSizeBytes;
2225 	OMX_TI_EXIFTAGSTATUS    eStatusGpsAreaInformation;
2226 	OMX_S8*                 pGpsAreaInformationBuff;
2227 	OMX_U32                 ulGpsAreaInformationBuffSizeBytes;
2228 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDateStamp;
2229 	OMX_S8                  cGpsDateStamp[11];
2230 	OMX_TI_EXIFTAGSTATUS    eStatusGpsDifferential;
2231 	OMX_U16                 usGpsDifferential;
2232 } OMX_TI_CONFIG_EXIF_TAGS;
2233 
2234 /**
2235  * Structure used to configure current OMX_TI_SENMOUNT_TYPE
2236  *
2237  * @param nSenId
2238  * @param nRotation
2239  */
2240 typedef struct OMX_TI_SENMOUNT_TYPE {
2241     OMX_U32             nSenId;
2242     OMX_U32             nRotation;
2243 }OMX_TI_SENMOUNT_TYPE;
2244 
2245 /**
2246  * Structure used to configure current OMX_TI_VARFPSTYPE
2247  *
2248  * @param nVarFPSMin    Number of the smallest FPS supported.
2249  * @param nVarFPSMax    Number of the biggest FPS supported.
2250  */
2251 typedef struct OMX_TI_VARFPSTYPE {
2252     OMX_U32                 nVarFPSMin;
2253     OMX_U32                 nVarFPSMax;
2254 } OMX_TI_VARFPSTYPE;
2255 
2256 /**
2257  * Structure used to configure current OMX_TI_CONFIG_SHAREDBUFFER
2258  *
2259  * STRUCT MEMBERS:
2260  * nSize            : Size of the structure in bytes
2261  * nVersion         : OMX specification version information
2262  * nPortIndex       : Port that this structure applies to
2263  * nSharedBuffSize  : Size of the pSharedBuff in bytes
2264  * pSharedBuff      : Pointer to a buffer
2265  */
2266 typedef struct OMX_TI_CONFIG_SHAREDBUFFER {
2267 	OMX_U32 nSize;
2268 	OMX_VERSIONTYPE nVersion;
2269 	OMX_U32 nPortIndex;
2270 	OMX_U32 nSharedBuffSize;
2271 	OMX_U8* pSharedBuff;
2272 } OMX_TI_CONFIG_SHAREDBUFFER;
2273 
2274 /**
2275  * Structure used to configure current OMX_TI_CAPRESTYPE
2276  *
2277  * STRUCT MEMBERS:
2278  * nSize            : Size of the structure in bytes
2279  * nVersion         : OMX specification version information
2280  * nPortIndex       : Port that this structure applies to
2281  * nWidthMin        : Number of the smallest width supported
2282  * nHeightMin       : Number of the smallest height supported
2283  * nWidthMax        : Number of the biggest width supported
2284  * nHeightMax       : Number of the biggest height supported
2285  */
2286 typedef struct OMX_TI_CAPRESTYPE {
2287 	OMX_U32         nSize;
2288 	OMX_VERSIONTYPE nVersion;
2289 	OMX_U32         nPortIndex;
2290 	OMX_U32         nWidthMin;  // smallest width supported
2291 	OMX_U32         nHeightMin; // smallest height supported
2292 	OMX_U32         nWidthMax;  // biggest width supported
2293 	OMX_U32         nHeightMax; // biggest height supported
2294 } OMX_TI_CAPRESTYPE;
2295 
2296 /**
2297  * Structure used to configure current OMX_TI_CAPTYPE
2298  *
2299  * STRUCT MEMBERS:
2300  * nSize                                : Size of the structure in bytes
2301  * nVersion                             : OMX specification version information
2302  * nPortIndex                           : Port that this structure applies to
2303  * ulPreviewFormatCount                 : Number of the supported preview pixelformat count
2304  * ePreviewFormats                      : Array containing the supported preview pixelformat count
2305  * ulImageFormatCount                   : Number of the supported image pixelformat count
2306  * eImageFormats                        : Array containing the supported image pixelformat count
2307  * tPreviewResRange                     : Supported preview resolution range
2308  * tImageResRange                       : Supported image resolution range
2309  * tThumbResRange                       : Supported thumbnail resolution range
2310  * ulWhiteBalanceCount                  : Supported whitebalance mode count
2311  * eWhiteBalanceModes                   : Array containing the whitebalance modes
2312  * ulColorEffectCount                   : Supported effects count
2313  * eColorEffects                        : Array containing the supported effects
2314  * xMaxWidthZoom                        : Fixed point value stored as Q16 representing the maximum value for the Zoom allowed on Width
2315  * xMaxHeightZoom                       : Fixed point value stored as Q16 representing the maximum value for the Zoom allowed on Height
2316  * ulFlickerCount                       : Number of the supported anti-flicker modes
2317  * eFlicker                             : Array containing the supported anti-flicker modes
2318  * ulExposureModeCount                  : Number of the supported exposure modes
2319  * eExposureModes                       : Array containing the supported exposure modes
2320  * bLensDistortionCorrectionSupported   : Flag for Lens Distortion Correction Algorithm support
2321  * bISONoiseFilterSupported             : Flag for Noise Filter Algorithm support
2322  * xEVCompensationMin                   : Fixed point value stored as Q16 representing the EVCompensation minumum allowed value
2323  * xEVCompensationMax                   : Fixed point value stored as Q16 representing the EVCompensation maximum allowed value
2324  * nSensitivityMax                      : nSensitivityMax = 100 implies maximum supported equal to "ISO 100"
2325  * ulFocusModeCount                     : Number of the supported focus modes
2326  * eFocusModes                          : Array containing the supported focus modes
2327  * ulSceneCount                         : Number of the supported scenes
2328  * eSceneModes                          : Array containing the supported scenes
2329  * ulFlashCount                         : Number of the supported flash modes
2330  * eFlashModes                          : Array containing the supported flash modes
2331  * xFramerateMin                        : Fixed point value stored as Q16 representing the minimum framerate allowed
2332  * xFramerateMax                        : Fixed point value stored as Q16 representing the maximum framerate allowed
2333  * bContrastSupported                   : Flag showing if the contrast is supported
2334  * bSaturationSupported                 : Flag showing if the saturation is supported
2335  * bBrightnessSupported                 : Flag showing if the brightness is supported
2336  * bProcessingLevelSupported            : Flag showing if the processing level is supported
2337  * bQFactorSupported                    : Flag showing if the QFactor is supported
2338  * ulPrvVarFPSModesCount                : Number of preview FPS modes
2339  * tPrvVarFPSModes                      : Preview FPS modes
2340  * ulCapVarFPSModesCount                : Number of capture FPS modes
2341  * tCapVarFPSModes                      : Capture FPS modes
2342  * tSenMounting                         : Sensor mount information
2343  */
2344 typedef struct OMX_TI_CAPTYPE {
2345 	OMX_U32                 nSize;
2346 	OMX_VERSIONTYPE         nVersion;
2347 	OMX_U32                 nPortIndex;
2348 	OMX_U16                 ulPreviewFormatCount;   // supported preview pixelformat count
2349 	OMX_COLOR_FORMATTYPE    ePreviewFormats[100];
2350 	OMX_U16                 ulImageFormatCount;     // supported image pixelformat count
2351 	OMX_COLOR_FORMATTYPE    eImageFormats[100];
2352 	OMX_TI_CAPRESTYPE       tPreviewResRange;       // supported preview resolution range
2353 	OMX_TI_CAPRESTYPE       tImageResRange;         // supported image resolution range
2354 	OMX_TI_CAPRESTYPE       tThumbResRange;         // supported thumbnail resolution range
2355 	OMX_U16                 ulWhiteBalanceCount;    // supported whitebalance mode count
2356 	OMX_WHITEBALCONTROLTYPE eWhiteBalanceModes[100];
2357 	OMX_U16                 ulColorEffectCount;     // supported effects count
2358 	OMX_IMAGEFILTERTYPE     eColorEffects[100];
2359 	OMX_S32                 xMaxWidthZoom;          // Fixed point value stored as Q16
2360 	OMX_S32                 xMaxHeightZoom;         // Fixed point value stored as Q16
2361 	OMX_U16                 ulFlickerCount;         // supported anti-flicker mode count
2362 	OMX_COMMONFLICKERCANCELTYPE     eFlicker[100];
2363 	OMX_U16                 ulExposureModeCount;    // supported exposure mode count
2364 	OMX_EXPOSURECONTROLTYPE eExposureModes[100];
2365 	OMX_BOOL                bLensDistortionCorrectionSupported;
2366 	OMX_BOOL                bISONoiseFilterSupported;
2367 	OMX_S32                 xEVCompensationMin;     // Fixed point value stored as Q16
2368 	OMX_S32                 xEVCompensationMax;     // Fixed point value stored as Q16
2369 	OMX_U32                 nSensitivityMax;        // nSensitivityMax = 100 implies maximum supported equal to "ISO 100"
2370 	OMX_U16                 ulFocusModeCount;       // supported focus mode count
2371 	OMX_IMAGE_FOCUSCONTROLTYPE      eFocusModes[100];
2372 	OMX_U16                 ulSceneCount;           // supported scene count
2373 	OMX_SCENEMODETYPE       eSceneModes[100];
2374 	OMX_U16                 ulFlashCount;           // supported flash modes count
2375 	OMX_IMAGE_FLASHCONTROLTYPE      eFlashModes[100];
2376 	OMX_U32                 xFramerateMin;          // Fixed point value stored as Q16
2377 	OMX_U32                 xFramerateMax;          // Fixed point value stored as Q16
2378 	OMX_BOOL                bContrastSupported;
2379 	OMX_BOOL                bSaturationSupported;
2380 	OMX_BOOL                bBrightnessSupported;
2381 	OMX_BOOL                bProcessingLevelSupported;
2382 	OMX_BOOL                bQFactorSupported;
2383 	OMX_U16                 ulPrvVarFPSModesCount;  // supported variable FPS preview modes count
2384 	OMX_TI_VARFPSTYPE       tPrvVarFPSModes[10];
2385 	OMX_U16                 ulCapVarFPSModesCount;  // supported variable FPS capture modes count
2386 	OMX_TI_VARFPSTYPE       tCapVarFPSModes[10];
2387 	OMX_TI_SENMOUNT_TYPE    tSenMounting;
2388         OMX_U16                 ulAlgoAreasFocusCount;    // supported number of AlgoAreas for focus areas
2389        OMX_U16                  ulAlgoAreasExposureCount; // supported number of AlgoAreas for exposure areas
2390 } OMX_TI_CAPTYPE;
2391 
2392 
2393 
2394 /**
2395  * Defines 3A Face priority mode.
2396  *
2397  * STRUCT MEMBERS:
2398  *  nSize               : Size of the structure in bytes
2399  *  nVersion            : OMX specification version information
2400  *  nPortIndex          : Port that this structure applies to
2401  *  bAwbFaceEnable      : Enable Face priority for Auto White Balance
2402  *  bAeFaceEnable       : Enable Face priority for Auto Exposure
2403  *  bAfFaceEnable       : Enable Face priority for Auto Focus
2404  */
2405 typedef struct OMX_TI_CONFIG_3A_FACE_PRIORITY {
2406 	OMX_U32 nSize;
2407 	OMX_VERSIONTYPE nVersion;
2408 	OMX_U32 nPortIndex;
2409 	OMX_BOOL bAwbFaceEnable;
2410 	OMX_BOOL bAeFaceEnable;
2411 	OMX_BOOL bAfFaceEnable;
2412 } OMX_TI_CONFIG_3A_FACE_PRIORITY;
2413 
2414 /**
2415  * Defines 3A Region priority mode.
2416  *
2417  * STRUCT MEMBERS:
2418  *  nSize               : Size of the structure in bytes
2419  *  nVersion            : OMX specification version information
2420  *  nPortIndex          : Port that this structure applies to
2421  *  bAwbFaceEnable      : Enable Region priority for Auto White Balance
2422  *  bAeFaceEnable       : Enable Region priority for Auto Exposure
2423  *  bAfFaceEnable       : Enable Region priority for Auto Focus
2424  */
2425 typedef struct OMX_TI_CONFIG_3A_REGION_PRIORITY {
2426 	OMX_U32 nSize;
2427 	OMX_VERSIONTYPE nVersion;
2428 	OMX_U32 nPortIndex;
2429 	OMX_BOOL bAwbRegionEnable;
2430 	OMX_BOOL bAeRegionEnable;
2431 	OMX_BOOL bAfRegionEnable;
2432 } OMX_TI_CONFIG_3A_REGION_PRIORITY;
2433 
2434 /*
2435 * STRUCT MEMBERS:
2436 * nSize         : Size of the structure in bytes
2437 * nVersion      : OMX specification version information
2438 * nPortIndex    : Port that this structure applies to
2439 * bAutoConvergence : Enable/Disable Auto Convergence
2440 */
2441 typedef struct OMX_TI_PARAM_AUTOCONVERGENCETYPE {
2442 	OMX_U32 nSize;
2443 	OMX_VERSIONTYPE nVersion;
2444 	OMX_U32 nPortIndex;
2445 	OMX_BOOL bAutoConvergence;
2446 } OMX_TI_PARAM_AUTOCONVERGENCETYPE;
2447 
2448 /**
2449  * Focus distance configuration
2450  *
2451  *  STRUCT MEMBERS:
2452  *  nSize: Size of the structure in bytes
2453  *  nVersion: OMX specification version information
2454  *  nPortIndex: Port that this structure applies to
2455  *  nFocusDistanceNear : Specifies the near focus distance in mm ( 0 equals infinity )
2456  *  nFocusDistanceOptimal : Specifies the optimal focus distance in mm ( 0 equals infinity )
2457  *  nFocusDistanceFar : Specifies the far focus distance in mm ( 0 equals infinity )
2458  *  nLensPosition : Specifies the current lens position in driver units
2459  */
2460 typedef struct OMX_TI_CONFIG_FOCUSDISTANCETYPE {
2461     OMX_U32 nSize;
2462     OMX_VERSIONTYPE nVersion;
2463     OMX_U32 nPortIndex;
2464     OMX_U32 nFocusDistanceNear;
2465     OMX_U32 nFocusDistanceOptimal;
2466     OMX_U32 nFocusDistanceFar;
2467     OMX_S32 nLensPosition;
2468 } OMX_TI_CONFIG_FOCUSDISTANCETYPE;
2469 
2470 /*
2471 * STRUCT MEMBERS:
2472 * nSize             : Size of the structure in bytes
2473 * nVersion          : OMX specification version information
2474 * nPortIndex        : Port that this structure applies to
2475 * pAAAskipBuff      : Pointer to a buffer
2476 * AAAskipBuffId     : Id of the send buffer
2477 * AAAskipBuffSize   : Size of the sent buffer
2478 */
2479 typedef struct OMX_TI_CONFIG_AAASKIPBUFFERTYPE {
2480 	OMX_U32 nSize;
2481 	OMX_VERSIONTYPE nVersion;
2482 	OMX_U32 nPortIndex;
2483 	OMX_PTR pAAAskipBuff;
2484 	OMX_U32 AAAskipBuffId;
2485 	OMX_U32 AAAskipBuffSize;
2486 } OMX_TI_CONFIG_AAASKIPBUFFERTYPE;
2487 
2488 
2489 /**
2490  * The OMX_TI_BRIGHTNESSCONTRASTCRTLTYPE enumeration is used to define the
2491  * brightness and contrast mode types.
2492  */
2493 typedef enum OMX_TI_BRIGHTNESSCONTRASTCRTLTYPE {
2494 	OMX_TI_BceModeOff = 0,
2495 	OMX_TI_BceModeOn,
2496 	OMX_TI_BceModeAuto,
2497 	OMX_TI_BceModeMax = 0x7FFFFFFF
2498 } OMX_TI_BRIGHTNESSCONTRASTCRTLTYPE;
2499 
2500 /**
2501  * Local and global brightness contrast type.
2502  *
2503  * STRUCT MEMBERS:
2504  *  nSize             : Size of the structure in bytes
2505  *  nVersion          : OMX specification version information
2506  *  nPortIndex        : Port that this structure applies to
2507  *  eControl          : Control field for GLBCE
2508  */
2509 typedef struct OMX_TI_CONFIG_LOCAL_AND_GLOBAL_BRIGHTNESSCONTRASTTYPE {
2510 	OMX_U32 nSize;
2511 	OMX_VERSIONTYPE nVersion;
2512 	OMX_U32 nPortIndex;
2513 	OMX_TI_BRIGHTNESSCONTRASTCRTLTYPE eControl;
2514 } OMX_TI_CONFIG_LOCAL_AND_GLOBAL_BRIGHTNESSCONTRASTTYPE;
2515 
2516 /**
2517  * Uncompressed image operating mode configuration structure.
2518  *
2519  * @param nSize         Size of the structure in bytes.
2520  * @param nVersion      OMX specification version information.
2521  * @param xMin          The minimum frame rate allowed.
2522  *                      Units are Q16 frames per second.
2523  * @param xMax          The maximum frame rate allowed.
2524  *                      Units are Q16 frames per second.
2525  */
2526 
2527 typedef struct OMX_TI_CONFIG_VARFRMRANGETYPE {
2528     OMX_U32 nSize;
2529     OMX_VERSIONTYPE nVersion;
2530     OMX_U32 xMin;
2531     OMX_U32 xMax;
2532 } OMX_TI_CONFIG_VARFRMRANGETYPE;
2533 
2534 /**
2535 * A pointer to this struct is passed to the OMX_SetParameter when the extension
2536 * index for the 'OMX.google.android.index.enableAndroidNativeBuffers' extension
2537 * is given.
2538 * The corresponding extension Index is OMX_TI_IndexUseNativeBuffers.
2539 * This will be used to inform OMX about the presence of gralloc pointers instead
2540 * of virtual pointers
2541 */
2542 typedef struct OMX_TI_PARAMUSENATIVEBUFFER {
2543     OMX_U32 nSize;
2544     OMX_VERSIONTYPE nVersion;
2545     OMX_U32 nPortIndex;
2546     OMX_BOOL bEnable;
2547 } OMX_TI_PARAMUSENATIVEBUFFER;
2548 
2549 /**
2550 * A pointer to this struct is passed to OMX_GetParameter when the extension
2551 * index for the 'OMX.google.android.index.getAndroidNativeBufferUsage'
2552 * extension is given.
2553 * The corresponding extension Index is OMX_TI_IndexAndroidNativeBufferUsage.
2554 * The usage bits returned from this query will be used to allocate the Gralloc
2555 * buffers that get passed to the useAndroidNativeBuffer command.
2556 */
2557 typedef struct OMX_TI_PARAMNATIVEBUFFERUSAGE {
2558     OMX_U32 nSize;
2559     OMX_VERSIONTYPE nVersion;
2560     OMX_U32 nPortIndex;
2561     OMX_U32 nUsage;
2562 } OMX_TI_PARAMNATIVEBUFFERUSAGE;
2563 
2564 /*==========================================================================*/
2565 /*!
2566 @brief OMX_TI_PARAM_ENHANCEDPORTRECONFIG : Suport added to new port reconfig usage
2567 @param bUsePortReconfigForCrop       Enables port reconfig for crop.
2568 @param bUsePortReconfigForPadding    Enables port reconfig for padding
2569 */
2570 /*==========================================================================*/
2571 
2572 typedef struct OMX_TI_PARAM_ENHANCEDPORTRECONFIG {
2573     OMX_U32 nSize;
2574     OMX_VERSIONTYPE nVersion;
2575     OMX_U32 nPortIndex;
2576     OMX_BOOL bUsePortReconfigForCrop;
2577     OMX_BOOL bUsePortReconfigForPadding;
2578 } OMX_TI_PARAM_ENHANCEDPORTRECONFIG;
2579 
2580 /**
2581 * Define the frames queue len for ZSL
2582 *
2583 * STRUCT MEMBERS:
2584 * nSize: Size of the structure in bytes
2585 * nVersion: OMX specification version information
2586 * nHistoryLen: History len in number of frames
2587 */
2588 typedef struct OMX_TI_PARAM_ZSLHISTORYLENTYPE {
2589     OMX_U32 nSize;
2590     OMX_VERSIONTYPE nVersion;
2591     OMX_U32 nHistoryLen;
2592 } OMX_TI_PARAM_ZSLHISTORYLENTYPE;
2593 
2594 /**
2595 * Define the frame delay in ms for ZSL
2596 *
2597 * STRUCT MEMBERS:
2598 * nSize: Size of the structure in bytes
2599 * nVersion: OMX specification version information
2600 * nDelay: Capture frame delay in ms
2601 */
2602 typedef struct OMX_TI_CONFIG_ZSLDELAYTYPE {
2603     OMX_U32 nSize;
2604     OMX_VERSIONTYPE nVersion;
2605     OMX_S32 nDelay;
2606 } OMX_TI_CONFIG_ZSLDELAYTYPE;
2607 
2608 /**
2609  * AlogAreas purpose
2610  * This type specifies the purpose of areas specified in OMX_ALGOAREASTYPE.
2611  * */
2612 typedef enum OMX_ALGOAREAPURPOSE{
2613     OMX_AlgoAreaFocus = 0, // Multi region focus
2614     OMX_AlgoAreaExposure,
2615 }OMX_ALGOAREAPURPOSE;
2616 
2617 typedef  struct OMX_ALGOAREA {
2618     OMX_S32 nLeft;                      /**< The leftmost coordinate of the area rectangle */
2619     OMX_S32 nTop;                       /**< The topmost coordinate of the area rectangle */
2620     OMX_U32 nWidth;                     /**< The width of the area rectangle in pixels */
2621     OMX_U32 nHeight;                    /**< The height of the area rectangle in pixels */
2622     OMX_U32 nPriority;                  /**< Priority - ranges from 1 to 1000 */
2623 }OMX_ALGOAREA;
2624 
2625 /**
2626  * Algorythm areas type
2627  * This type defines areas for Multi Region Focus,
2628  * or another algorithm region parameters,
2629  * such as Multi Region Auto Exposure.
2630  *
2631  * STRUCT MEMBERS:
2632  *  nSize            : Size of the structure in bytes
2633  *  nVersion         : OMX specification version information
2634  *  nPortIndex       : Port index
2635  *  tAreaPosition    : Area definition - coordinates and purpose - Multi Region Focus, Auto Exposure, etc.
2636  *  nNumAreas        : Number of areas defined in the array
2637  *  nAlgoAreaPurpose : Algo area purpose - eg. Multi Region Focus is OMX_AlgoAreaFocus
2638  */
2639 typedef  struct OMX_ALGOAREASTYPE {
2640     OMX_U32 nSize;
2641     OMX_VERSIONTYPE nVersion;
2642     OMX_U32 nPortIndex;
2643 
2644     OMX_U32 nNumAreas;
2645     OMX_ALGOAREA tAlgoAreas[MAX_ALGOAREAS];
2646     OMX_ALGOAREAPURPOSE nAlgoAreaPurpose;
2647 } OMX_ALGOAREASTYPE;
2648 
2649 
2650 
2651 #ifdef __cplusplus
2652 }
2653 #endif /* __cplusplus */
2654 
2655 #endif
2656 
2657 
2658