1 /*
2 Copyright (c) 2012, Broadcom Europe Ltd
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 are met:
7     * Redistributions of source code must retain the above copyright
8       notice, this list of conditions and the following disclaimer.
9     * Redistributions in binary form must reproduce the above copyright
10       notice, this list of conditions and the following disclaimer in the
11       documentation and/or other materials provided with the distribution.
12     * Neither the name of the copyright holder nor the
13       names of its contributors may be used to endorse or promote products
14       derived from this software without specific prior written permission.
15 
16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 // OpenMAX IL - Broadcom specific types
29 
30 #ifndef OMX_Broadcom_h
31 #define OMX_Broadcom_h
32 
33 #include "OMX_Component.h"
34 
35 // for use in buffer headers - marks the contained data
36 // as being a codec header
37 #define OMX_BUFFERFLAG_TIME_UNKNOWN 0x00000100
38 
39 //for use in buffer headers - marks the buffer as being the
40 //snapshot preview image from a still capture.
41 //Mainly to be used with the DisplayFunction callback from camera.
42 #define OMX_BUFFERFLAG_CAPTURE_PREVIEW 0x00000200
43 
44 /* Mark the end of a NAL unit produced by a video encoder.
45  */
46 #define OMX_BUFFERFLAG_ENDOFNAL    0x00000400
47 
48 /* Marks pBuffer in OMX_BUFFERHEADERTYPE as containing a fragment list instead of the actual buffer
49  */
50 #define OMX_BUFFERFLAG_FRAGMENTLIST 0x00000800
51 
52 /* Marks the start of a new sequence of data following any kind of seek operation.
53  */
54 #define OMX_BUFFERFLAG_DISCONTINUITY 0x00001000
55 
56 /** Codec side information Flag:
57 * OMX_BUFFERFLAG_CODECSIDEINFO is an optional flag that is set by an
58 * output port when all bytes in the buffer form part or all of a set of
59 * codec specific side information. For example, distortion information
60 * estimated by H.264 encoder can be sent using this flag to signal
61 * the decoder quality
62 */
63 #define OMX_BUFFERFLAG_CODECSIDEINFO 0x00002000
64 
65 // for use in buffer headers - indicated the timestamp is a DTS rather than PTS
66 #define OMX_BUFFERFLAG_TIME_IS_DTS 0x00004000
67 
68 // for use in buffer headers - signals that a video picture is interlaced
69 #define OMX_BUFFERFLAG_INTERLACED 0x00010000
70 
71 // Signals that the top field of the current interlaced frame should be displayed first
72 #define OMX_BUFFERFLAG_TOP_FIELD_FIRST 0x00020000
73 
74 // User flags that can be set by the application and will be passed by most
75 // components as an alternative to buffer marks.
76 #define OMX_BUFFERFLAG_USR0      0x10000000
77 #define OMX_BUFFERFLAG_USR1      0x20000000
78 #define OMX_BUFFERFLAG_USR2      0x40000000
79 #define OMX_BUFFERFLAG_USR3      0x80000000
80 #define OMX_BUFFERFLAG_USR_FLAGS 0xF0000000
81 
82 /**
83  * Macros to convert to <code>OMX_TICKS</code> from a signed 64 bit value and
84  * vice-versa. These macros don't actually do anything unless <code>OMX_TICKS</code>
85  * is defined as a two-part structure (instead of a native signed 64-bit type).
86  **/
87 #ifndef OMX_SKIP64BIT
88    #define omx_ticks_from_s64(s) (s)
89    #define omx_ticks_to_s64(t) (t)
90 #else
omx_ticks_from_s64(signed long long s)91    static inline OMX_TICKS omx_ticks_from_s64(signed long long s) { OMX_TICKS t; t.nLowPart = (OMX_U32)s; t.nHighPart = (OMX_U32)(s>>32); return t; }
92    #define omx_ticks_to_s64(t) ((t).nLowPart | ((uint64_t)((t).nHighPart) << 32))
93 #endif /* OMX_SKIP64BIT */
94 
95 /* Buffer fragment descriptor */
96 typedef struct OMX_BUFFERFRAGMENTTYPE {
97    OMX_PTR pBuffer; /**< Pointer to actual block of memory that is acting as the fragment buffer */
98    OMX_U32 nLen;    /**< number of bytes in the buffer */
99 } OMX_BUFFERFRAGMENTTYPE;
100 
101 /* OMX_IndexParamBrcmEnableIJGTableScaling: JPEG Quality Table Setting. */
102 typedef struct OMX_PARAM_IJGSCALINGTYPE {
103    OMX_U32 nSize;
104    OMX_VERSIONTYPE nVersion;
105    OMX_U32 nPortIndex;
106    OMX_BOOL bEnabled;
107 } OMX_PARAM_IJGSCALINGTYPE;
108 /*
109 The boolean \code{bEnabled} value determines whether the component uses
110 the standard IJG quality tables when encoding images.
111 */
112 
113 /* OMX_IndexConfigTimeInvalidStartTime: Invalid Start Times */
114 /*
115 This allows clock clients to supply a start time notification to the
116 clock whilst indicating that this time is invalid.
117 */
118 
119 /* OMX_IndexParamBrcmMaxFrameSkips: Frame timestamp jumps */
120 /*
121 This number represents the number of times a jump in frame timestamps
122 has been observed that is greater than expected.
123 */
124 
125 /* OMX_IndexConfigAsynchronousFailureURI: Asynchronous Failure Filename */
126 /*
127 This allows the client to query for the filename that cause an asynchronous
128 output error.
129 */
130 
131 /* OMX_IndexParamAsynchronousOutput: Asynchronous Output */
132 /*
133 The allows the client to specify to a component that is writing files
134 that this writing may happen asynchronously, including opening and closing
135 of files.
136 */
137 
138 /* OMX_IndexConfigClockAdjustment: Clock Adjustment */
139 /*
140 This allows the client to read from the clock the total time
141 adjustment made to the clock whilst running by the reference clock.
142 If the reference clock sends a time that causes the media time to jump
143 this difference is added to the total, which can be reported via this
144 index.  When the stream restarts by setting the clock state to
145 \code{OMX_TIME_ClockStateRunning} or
146 \code{OMX_TIME_ClockStateWaitingForStartTime} this adjustment total is
147 set to zero.
148 */
149 
150 /* OMX_IndexParamBrcmDataUnit: Data Unit */
151 /*
152 The data unit is an indication to components connected to this
153 component of the type of data delivery available.
154 \code{OMX_DataUnitCodedPicture} indicates that we are able to give
155 framing information, using the \code{OMX_BUFFERFLAG_ENDOFFRAME} flag to
156 indicate that the data contained finishes a complete
157 frame. \code{OMX_DataUnitArbitraryStreamSection} indicates that no
158 end-of-frame markers will be present, and the decoder should perform
159 the steps necessary to decode the stream. The other enum values are
160 not used.
161 */
162 
163 /* OMX_IndexConfigPresentationOffset: Presentation Offset */
164 /*
165 The value of \code{nTimestamp} is added to the offset requested for
166 each new input frame. Takes effect for all new input frames, and has
167 no effect on the offset used for currently-queued frames. A positive
168 value will make the requested port earlier relative to other streams,
169 a negative value will make the requested port later relative to other
170 streams.
171 */
172 
173 /* OMX_IndexConfigSingleStep: Single Step */
174 /*
175 When setting this config on a paused clock, where the \code{nU32}
176 value is non-zero and \code{nPortIndex} is OMX_ALL, the media clock
177 will advance through the next \code{nU32} next requested media
178 times. A paused clock is in running state but has a time scale of
179 0. This will trigger the display of some video frames, so allowing
180 single-stepping functionality. This config can be set multiple times,
181 and will buffer up stepping requests until we have media requests to
182 fulfil, or the clock is stopped or un-paused.
183 
184 This config can also be used on some video output ports and, if
185 \code{nU32} is non-zero, requests that the output port forwards the
186 next \code{nU32} frames appending an EOS marker on the last frame, and
187 then ceases to forward data on this port.  If \code{nU32} is zero, any
188 previous request to forward a limited number of frames is cancelled
189 and the default behaviour of this port will resume.
190 */
191 
192 /* OMX_IndexParamCameraCamplusId: Camera Subsystem Identification */
193 /*
194 This parameter allows the configuration of the identifier to be used
195 to initialise the Broadcom Camplus subsystem that sits beneath the
196 camera component. If only one instance of the camera component is
197 used, the default value can be used. If more than one instance is
198 required, they must each have their own unique values for this
199 parameter. It is also used to tie the component to the image pool
200 created with \code{OMX_Set upCamPools}.
201 */
202 
203 /* OMX_IndexConfigAudioRenderingLatency: Audio Rendering Latency */
204 /*
205 This config allows the client to query the current latency of audio
206 rendering.  The latency is returned as the number of samples that
207 an audio rendering component has received but have not been played.
208 */
209 
210 /* OMX_IndexConfigBrcmPoolMemAllocSize: Pool memory usage values */
211 /*
212 This config allows the client to query how much memory is being used by
213 the component for any image pools.
214 */
215 
216 /* OMX_IndexConfigDisplayRegion: Display Region */
217 typedef enum OMX_DISPLAYTRANSFORMTYPE{
218    OMX_DISPLAY_ROT0 = 0,
219    OMX_DISPLAY_MIRROR_ROT0 = 1,
220    OMX_DISPLAY_MIRROR_ROT180 = 2,
221    OMX_DISPLAY_ROT180 = 3,
222    OMX_DISPLAY_MIRROR_ROT90 = 4,
223    OMX_DISPLAY_ROT270 = 5,
224    OMX_DISPLAY_ROT90 = 6,
225    OMX_DISPLAY_MIRROR_ROT270 = 7,
226    OMX_DISPLAY_DUMMY = 0x7FFFFFFF
227 } OMX_DISPLAYTRANSFORMTYPE;
228 
229 typedef struct OMX_DISPLAYRECTTYPE {
230    OMX_S16 x_offset;
231    OMX_S16 y_offset;
232    OMX_S16 width;
233    OMX_S16 height;
234 } OMX_DISPLAYRECTTYPE;
235 
236 typedef enum OMX_DISPLAYMODETYPE {
237    OMX_DISPLAY_MODE_FILL = 0,
238    OMX_DISPLAY_MODE_LETTERBOX = 1,
239    // these allow a left eye source->dest to be specified and the right eye mapping will be inferred by symmetry
240    OMX_DISPLAY_MODE_STEREO_LEFT_TO_LEFT = 2,
241    OMX_DISPLAY_MODE_STEREO_TOP_TO_TOP = 3,
242    OMX_DISPLAY_MODE_STEREO_LEFT_TO_TOP = 4,
243    OMX_DISPLAY_MODE_STEREO_TOP_TO_LEFT = 5,
244    OMX_DISPLAY_MODE_DUMMY = 0x7FFFFFFF
245 } OMX_DISPLAYMODETYPE;
246 
247 typedef enum OMX_DISPLAYSETTYPE {
248    OMX_DISPLAY_SET_NONE = 0,
249    OMX_DISPLAY_SET_NUM = 1,
250    OMX_DISPLAY_SET_FULLSCREEN = 2,
251    OMX_DISPLAY_SET_TRANSFORM = 4,
252    OMX_DISPLAY_SET_DEST_RECT = 8,
253    OMX_DISPLAY_SET_SRC_RECT = 0x10,
254    OMX_DISPLAY_SET_MODE = 0x20,
255    OMX_DISPLAY_SET_PIXEL = 0x40,
256    OMX_DISPLAY_SET_NOASPECT = 0x80,
257    OMX_DISPLAY_SET_LAYER = 0x100,
258    OMX_DISPLAY_SET_COPYPROTECT = 0x200,
259    OMX_DISPLAY_SET_ALPHA = 0x400,
260    OMX_DISPLAY_SET_DUMMY = 0x7FFFFFFF
261 } OMX_DISPLAYSETTYPE;
262 
263 typedef enum OMX_DISPLAYASPECTFLAGSTYPE {
264   OMX_DISPLAY_ALPHA_FLAGS_NONE = 0,
265   // All layers below and including this one will be ignored (used for screen
266   // blanking in full screen rendering)
267   OMX_DISPLAY_ALPHA_FLAGS_DISCARD_LOWER_LAYERS = 1<<29,
268   // Alpha values are already premultiplied
269   OMX_DISPLAY_ALPHA_FLAGS_PREMULT = 1<<30,
270   // Mix the per pixel alpha (if present) and the per plane alpha.
271   OMX_DISPLAY_ALPHA_FLAGS_MIX = 1<<31,
272 } OMX_DISPLAYASPECTFLAGSTYPE;
273 
274 typedef struct OMX_CONFIG_DISPLAYREGIONTYPE {
275    OMX_U32 nSize;
276    OMX_VERSIONTYPE nVersion;
277    OMX_U32 nPortIndex;
278    OMX_DISPLAYSETTYPE set;
279    OMX_U32 num;
280    OMX_BOOL fullscreen;
281    OMX_DISPLAYTRANSFORMTYPE transform;
282    OMX_DISPLAYRECTTYPE dest_rect;
283    OMX_DISPLAYRECTTYPE src_rect;
284    OMX_BOOL noaspect;
285    OMX_DISPLAYMODETYPE mode;
286    OMX_U32 pixel_x;
287    OMX_U32 pixel_y;
288    OMX_S32 layer;
289    OMX_BOOL copyprotect_required;
290    OMX_U32 alpha;
291    OMX_U32 wfc_context_width;
292    OMX_U32 wfc_context_height;
293 } OMX_CONFIG_DISPLAYREGIONTYPE;
294 /*
295 This config sets the output display device, as well as the region used
296 on the output display, any display transformation, and some flags to
297 indicate how to scale the image.
298 
299 The structure uses a bitfield, \code{set}, to indicate which fields are set
300 and should be used. All other fields will maintain their current
301 value.
302 
303 \code{num} describes the display output device, with 0 typically being
304 a directly connected LCD display.
305 
306 \code{fullscreen} indicates that we are using the full device screen
307 area, rather than a window of the display.  If fullscreen is false,
308 then dest_rect is used to specify a region of the display to use.
309 
310 \code{transform} indicates any rotation or flipping used to map frames
311 onto the natural display orientation.
312 
313 The \code{src_rect} indicates which area of the frame to display. If
314 all values are zero, the whole frame will be used.
315 
316 The \code{noaspect} flag, if set, indicates that any display scaling
317 should disregard the aspect ratio of the frame region being displayed.
318 
319 \code{mode} indicates how the image should be scaled to fit the
320 display. \code{OMX_DISPLAY_MODE_FILL} indicates that the image should
321 fill the screen by potentially cropping the frames.  Setting
322 \code{mode} to \code{OMX_DISPLAY_MODE_LETTERBOX} indicates that all
323 the source region should be displayed and black bars added if
324 necessary.
325 
326 The \code{pixel_x} and \code{pixel_y} values, if non-zero, are used to
327 describe the size of a source pixel. If values are zero, then pixels
328 default to being square.
329 
330 Set the \code{layer} that the image will appear on with the
331 \code{layer} field.
332 */
333 
334 /* OMX_IndexParamSource: Source Image Configuration */
335 typedef enum OMX_SOURCETYPE {
336    OMX_SOURCE_WHITE = 0,    // all white images
337    OMX_SOURCE_BLACK = 1,    // all black images
338    OMX_SOURCE_DIAGONAL = 2, // greyscale diagonal stripes
339    OMX_SOURCE_NOISE = 3,    // random pixel values
340    OMX_SOURCE_RANDOM = 4,   // a shaded random pattern of colours
341    OMX_SOURCE_COLOUR = 5,   // a solid colour determined by nParam
342    OMX_SOURCE_BLOCKS = 6,   // random coloured blocks of 16x16 size
343    OMX_SOURCE_SWIRLY,       // a swirly pattern used for encode testing
344    OMX_SOURCE_DUMMY = 0x7FFFFFFF
345 } OMX_SOURCETYPE;
346 
347 typedef struct OMX_PARAM_SOURCETYPE {
348    OMX_U32 nSize;
349    OMX_VERSIONTYPE nVersion;
350    OMX_U32 nPortIndex;
351    OMX_SOURCETYPE eType;
352    OMX_U32 nParam;
353    OMX_U32 nFrameCount;
354    OMX_U32 xFrameRate;
355 } OMX_PARAM_SOURCETYPE;
356 /*
357 The source type determines the kind of image that is produced. Not all
358 combinations of source type and image type are supported.  The
359 \code{OMX_SOURCE_SWIRLY} setting can only be used with YUV420 packed
360 planar image formats.  When producing RGB565 image format, the
361 \code{OMX_SOURCE_DIAGONAL} and \code{OMX_SOURCE_RANDOM} modes are
362 treated as \code{OMX_SOURCE_NOISE}.
363 
364 The \code{nParam} field is used to specify the colour for the source
365 colour mode, and the offset of the diagonal pattern for diagonal mode.
366 For the blocks mode, \code{nParam} is used as the seed for the random
367 colour generator.
368 
369 The \code{nFrameCount} parameter determines how many frames to send.
370 If it is zero, then frames are sent continuously. For any other value,
371 it counts down until it has sent that many frames, and then stops,
372 sending out an EOS. The \code{xFrameRate} setting is used to determine
373 the timestamp for each frame produced, or can be set to zero if
374 timestamps should all remain at zero.
375 */
376 
377 /* OMX_IndexParamSourceSeed: Source Random Seed */
378 typedef struct OMX_PARAM_SOURCESEEDTYPE {
379    OMX_U32 nSize;
380    OMX_VERSIONTYPE nVersion;
381    OMX_U32 nPortIndex;
382    OMX_U16 nData[16];
383 } OMX_PARAM_SOURCESEEDTYPE;
384 /*
385 This structure sets the current state of the random number generator
386 used for \code{OMX_SOURCE_RANDOM} source type, allowing repeatable
387 random image creation.
388 */
389 
390 /* OMX_IndexParamResize: Resize Control */
391 typedef enum OMX_RESIZEMODETYPE {
392    OMX_RESIZE_NONE,
393    OMX_RESIZE_CROP,
394    OMX_RESIZE_BOX,
395    OMX_RESIZE_BYTES,
396    OMX_RESIZE_DUMMY = 0x7FFFFFFF
397 } OMX_RESIZEMODETYPE;
398 
399 typedef struct OMX_PARAM_RESIZETYPE {
400    OMX_U32 nSize;
401    OMX_VERSIONTYPE nVersion;
402    OMX_U32 nPortIndex;
403    OMX_RESIZEMODETYPE eMode;
404    OMX_U32 nMaxWidth;
405    OMX_U32 nMaxHeight;
406    OMX_U32 nMaxBytes;
407    OMX_BOOL bPreserveAspectRatio;
408    OMX_BOOL bAllowUpscaling;
409 } OMX_PARAM_RESIZETYPE;
410 /*
411 The mode determines the kind of resize. \code{OMX_RESIZE_BOX} allow
412 the \code{nMaxWidth} and \code{nMaxHeight} to set a bounding box into
413 which the output must fit. \code{OMX_RESIZE_BYTES} allows
414 \code{nMaxBytes} to set the maximum number of bytes into which the
415 full output frame must fit.  Two flags aid the setting of the output
416 size. \code{bPreseveAspectRatio} sets whether the resize should
417 preserve the aspect ratio of the incoming
418 image. \code{bAllowUpscaling} sets whether the resize is allowed to
419 increase the size of the output image compared to the size of the
420 input image.
421 */
422 
423 typedef struct OMX_PARAM_TESTINTERFACETYPE {
424    OMX_U32 nSize;
425    OMX_VERSIONTYPE nVersion;
426    OMX_BOOL bTest;
427    OMX_BOOL bSetExtra;
428    OMX_U32 nExtra;
429    OMX_BOOL bSetError;
430    OMX_BOOL stateError[2];
431 } OMX_PARAM_TESTINTERFACETYPE;
432 
433 /* OMX_IndexConfigVisualisation: Visualisation Mode */
434 typedef struct OMX_CONFIG_VISUALISATIONTYPE {
435    OMX_U32 nSize;
436    OMX_VERSIONTYPE nVersion;
437    OMX_U32 nPortIndex;
438    OMX_U8 name[16];
439    OMX_U8 property[64];
440 } OMX_CONFIG_VISUALISATIONTYPE;
441 
442 /*
443 \code{name} is a string of characters specifying the type of
444 visualization. The component appends \code{"_vis.vll"} to the name
445 provided, and attempts to load a visualisation library contained in
446 this VLL.  \code{property} contains configuration parameters and
447 values, which is interpreted by the visualisation library. Typically
448 all visualisations will accept a property string containing
449 \code{'mode=<number>'}, where \code{<number>} may be a random 32 bit
450 integer in decimal format. If provided, this may select a random mode
451 from that visualisation library.
452 */
453 
454 /*
455 This parameter is used when creating proprietary communication with
456 the display component, and provides the display function for passing
457 images to be displayed, together with a function used to flush all
458 pending image updates and release all images.
459 */
460 
461 /* OMX_IndexConfigBrcmAudioDestination: Audio Destination */
462 typedef struct OMX_CONFIG_BRCMAUDIODESTINATIONTYPE {
463    OMX_U32 nSize;
464    OMX_VERSIONTYPE nVersion;
465    OMX_U8 sName[16];
466 } OMX_CONFIG_BRCMAUDIODESTINATIONTYPE;
467 /*
468 This config sets the platform-specific audio destination or output
469 device for audio sink components (e.g. audio_render).
470 
471 \code{sName} describes the audio destination, with \code{"local"}
472 typically being directly connected to headphones.
473 */
474 
475 /* OMX_IndexConfigBrcmAudioSource: Audio Source */
476 typedef struct OMX_CONFIG_BRCMAUDIOSOURCETYPE {
477    OMX_U32 nSize;
478    OMX_VERSIONTYPE nVersion;
479    OMX_U8 sName[16];
480 } OMX_CONFIG_BRCMAUDIOSOURCETYPE;
481 /*
482 This config sets the platform-specific audio source or input device
483 for audio source components (e.g. audio_capture).
484 
485 \code{sName} describes the audio source, with \code{"local"}
486 typically being directly connected to microphone.
487 */
488 
489 /* OMX_IndexConfigBrcmAudioDownmixCoefficients: Audio Downmix Coefficients */
490 typedef struct OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS {
491    OMX_U32 nSize;
492    OMX_VERSIONTYPE nVersion;
493    OMX_U32 nPortIndex;
494    OMX_U32 coeff[16];
495 } OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS;
496 /*
497 This config sets the platform-specific audio downmixing coefficients for the
498 audio mixer component. The coefficients are 16.16 fixed point.
499 The even coefficients contribute to the left channel.
500 The odd coefficients contribute to the right channel.
501 L' = coeff[0] * sample[N] + coeff[2] * sample[N+1] + coeff[4] * sample[N+2] + coeff[6] * sample[N+3]
502    + coeff[8] * sample[N+4] + coeff[10] * sample[N+5] + coeff[12] * sample[N+6] + coeff[14] * sample[N+7]
503 R' = coeff[1] * sample[N] + coeff[3] * sample[N+1] + coeff[5] * sample[N+2] + coeff[7] * sample[N+3]
504    + coeff[9] * sample[N+4] + coeff[11] * sample[N+5] + coeff[13] * sample[N+6] + coeff[15] * sample[N+7]
505 
506 \code{coeff} describes the downmixing coefficients
507 */
508 
509 /* OMX_IndexConfigBrcmAudioDownmixCoefficients8x8: Audio Downmix Coefficient matrix */
510 typedef struct OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8 {
511    OMX_U32 nSize;
512    OMX_VERSIONTYPE nVersion;
513    OMX_U32 nPortIndex;
514    OMX_U32 coeff[64];
515 } OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8;
516 /*
517 This config sets the platform-specific audio downmixing coefficients for the
518 audio mixer component. The coefficients are 16.16 fixed point.
519 The coefficients are a 8*8 mixing matrix from 8 input channels to 8 outputs channels
520 
521 \code{coeff} describes the downmixing coefficients
522 */
523 
524 /* OMX_IndexConfigBrcmAudioMaxSample: Maximum sample seen */
525 typedef struct OMX_CONFIG_BRCMAUDIOMAXSAMPLE {
526    OMX_U32 nSize;
527    OMX_VERSIONTYPE nVersion;
528    OMX_U32 nPortIndex;
529    OMX_U32 nMaxSample;
530    OMX_TICKS nTimeStamp;
531 } OMX_CONFIG_BRCMAUDIOMAXSAMPLE;
532 /*
533 This gets the largest sample produced (after downmixing with OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8)
534 since this config was last read. The nTimestamp is the earliest timestamp processed.
535 This can be used for DRC schemes
536 
537 \code{coeff} maximum sample seen in current block
538 */
539 
540 /* OMX_IndexConfigPlayMode: Play Mode */
541 typedef enum OMX_PLAYMODETYPE {
542    OMX_PLAYMODE_NORMAL,
543    OMX_PLAYMODE_FF,
544    OMX_PLAYMODE_REW,
545    OMX_PLAYMODE_DUMMY = 0x7FFFFFFF
546 } OMX_PLAYMODETYPE;
547 
548 typedef struct OMX_CONFIG_PLAYMODETYPE {
549    OMX_U32 nSize;
550    OMX_VERSIONTYPE nVersion;
551    OMX_PLAYMODETYPE eMode;
552 } OMX_CONFIG_PLAYMODETYPE;
553 /*
554 The playmode affects which frames are extracted from the media file
555 and passed on the output ports. \code{OMX_PLAYMODE_NORMAL} will
556 extract all frames, \code{OMX_PLAYMODE_FF} extracts only IDR frames
557 when video is present, or only occasional packets of audio if no video
558 is present. \code{OMX_PLAYMODE_REW} is similar to
559 \code{OMX_PLAYMODE_FF} but extracts packets in reverse time
560 order.
561 */
562 
563 typedef enum OMX_DELIVERYFORMATTYPE {
564    OMX_DELIVERYFORMAT_STREAM,         // no framing information is known
565    OMX_DELIVERYFORMAT_SINGLE_PACKET,  // packetised, at most one frame per buffer
566    OMX_DELIVERYFORMAT_DUMMY = 0x7FFFFFFF
567 } OMX_DELIVERYFORMATTYPE;
568 
569 typedef struct OMX_PARAM_DELIVERYFORMATTYPE {
570    OMX_U32 nSize;
571    OMX_VERSIONTYPE nVersion;
572    OMX_U32 nPortIndex;
573    OMX_DELIVERYFORMATTYPE eFormat;
574 } OMX_PARAM_DELIVERYFORMATTYPE;
575 
576 /* OMX_IndexParamCodecConfig: Codec Configuration */
577 
578 typedef struct OMX_PARAM_CODECCONFIGTYPE {
579    OMX_U32 nSize;
580    OMX_VERSIONTYPE nVersion;
581    OMX_U32 nPortIndex;
582    OMX_U32 bCodecConfigIsComplete;
583    OMX_U8 nData[1];
584 } OMX_PARAM_CODECCONFIGTYPE;
585 
586 /*
587 This parameter contains opaque data in a format specified by Broadcom
588 and allows out-of-band information such as cropping rectangles, aspect
589 ratio information, codec-specific header bytes, and other essential
590 information to be passed between connected components.
591 
592 \code{bCodecConfigIsCompete} specifies if the codec config is fully
593 contained in here and there is no need to wait for OMX_BUFFERFLAG_CODECCONFIG
594 buffers
595 */
596 
597 typedef struct OMX_PARAM_STILLSFUNCTIONTYPE {
598    OMX_U32 nSize;
599    OMX_VERSIONTYPE nVersion;
600    OMX_BOOL bBuffer;
601    OMX_PTR (*pOpenFunc)(void);
602    OMX_PTR (*pCloseFunc)(void);
603    OMX_PTR (*pReadFunc)(void);
604    OMX_PTR (*pSeekFunc)(void);
605    OMX_PTR (*pWriteFunc)(void);
606 } OMX_PARAM_STILLSFUNCTIONTYPE;
607 
608 typedef void* OMX_BUFFERADDRESSHANDLETYPE;
609 
610 typedef struct OMX_PARAM_BUFFERADDRESSTYPE {
611    OMX_U32 nSize;
612    OMX_VERSIONTYPE nVersion;
613    OMX_U32 nPortIndex;
614    OMX_U32 nAllocLen;
615    OMX_BUFFERADDRESSHANDLETYPE handle;
616 } OMX_PARAM_BUFFERADDRESSTYPE;
617 
618 typedef struct OMX_PARAM_TUNNELSETUPTYPE {
619    OMX_U32 nSize;
620    OMX_VERSIONTYPE nVersion;
621    OMX_U32 nPortIndex;
622    OMX_TUNNELSETUPTYPE sSetup;
623 } OMX_PARAM_TUNNELSETUPTYPE;
624 
625 /* OMX_IndexParamBrcmPortEGL: Used for querying whether a port is an EGL port or not. */
626 typedef struct OMX_PARAM_BRCMPORTEGLTYPE {
627    OMX_U32 nSize;
628    OMX_VERSIONTYPE nVersion;
629    OMX_U32 nPortIndex;
630    OMX_BOOL bPortIsEGL;
631 } OMX_PARAM_BRCMPORTEGLTYPE;
632 /*
633 */
634 
635 #define OMX_CONFIG_IMAGEFILTERPARAMS_MAXPARAMS 6
636 /* OMX_IndexConfigCommonImageFilterParameters: Parameterized Image Filter */
637 typedef struct OMX_CONFIG_IMAGEFILTERPARAMSTYPE {
638    OMX_U32 nSize;
639    OMX_VERSIONTYPE nVersion;
640    OMX_U32 nPortIndex;
641    OMX_IMAGEFILTERTYPE eImageFilter;
642    OMX_U32 nNumParams;
643    OMX_U32 nParams[OMX_CONFIG_IMAGEFILTERPARAMS_MAXPARAMS];
644 } OMX_CONFIG_IMAGEFILTERPARAMSTYPE;
645 /*
646 This structure contains optional parameters for some image
647 filters. The following table lists all image filters that support
648 parameters.
649 
650 <table border="1" cellspacing="0" cellpadding="2">
651 <tr><td>Filter<td>Parameters<td>Notes
652 
653 <tr><td>\code{OMX_ImageFilterSolarize}
654 <td>\code{[x0 y0 y1 y2]}
655 <td>Linear mapping of \code{[0,x0]} to \code{[0,y0>]}
656 and \code{[x0,255]} to \code{[y1,y2]}.
657 Default is \code{"128 128 128 0"}.
658 
659 <tr><td>\code{OMX_ImageFilterSharpen}
660 <td>\code{[sz [str [th]]}
661 <td>\code{sz} size of filter, either 1 or 2.
662 \code{str} strength of filter.
663 \code{th} threshold of filter.
664 Default is \code{"1 40 20"}.
665 
666 <tr><td>\code{OMX_ImageFilterFilm}
667 <td>\code{[[str] [u v]]}
668 <td>\code{str} strength of effect.
669 \code{u} sets u to constant value.
670 \code{v} sets v to constant value.
671 Default is \code{"24"}.
672 
673 <tr><td>\code{OMX_ImageFilterBlur}
674 <td>\code{[sz]}
675 <td>\code{sz} size of filter, either 1 or 2.
676 Default is \code{"2"}.
677 
678 <tr><td>\code{OMX_ImageFilterSaturation}
679 <td>\code{[str]}
680 <td>\code{str} strength of effect, in 8.8 fixed point format. u/v value
681 differences from 128 are multiplied by \code{str}.
682 Default is \code{"272"}.
683 </table>
684 */
685 
686 /* OMX_IndexConfigTransitionControl: Transition Control */
687 typedef struct OMX_CONFIG_TRANSITIONCONTROLTYPE {
688    OMX_U32 nSize;
689    OMX_VERSIONTYPE nVersion;
690    OMX_U32 nPortIndex;
691    OMX_U32 nPosStart;
692    OMX_U32 nPosEnd;
693    OMX_S32 nPosIncrement;
694    OMX_TICKS nFrameIncrement;
695    OMX_BOOL bSwapInputs;
696    OMX_U8 name[16];
697    OMX_U8 property[64];
698 } OMX_CONFIG_TRANSITIONCONTROLTYPE;
699 /*
700 This structure represents the internal configuration of the
701 transition. Transitions are generated by a loadable plug-in described
702 by the \code{name} field. The component appends \code{"_tran.vll"} to
703 the name provided, and attempts to load a transition library contained
704 in this VLL.  The exact type of transition is configured in a
705 plug-in-dependent manner with the \code{property} field. All plug-ins
706 should accept a \code{property} field equal to
707 \code{"flags=<number>"}, where \code{<number>} can be a random 32 bit
708 number.  If \code{bSwapInputs} is false, then the start image is on
709 port 210, the stop image on port 211. These are reversed if
710 \code{bSwapInputs} is true.
711 
712 Transition frames are generated from the plug-in by referencing a
713 frame position in [0,65536], where position 0 is the start image,
714 position 65536 is the stop image. The first frame position generated
715 is \code{nPosStart}. The last frame position generated is
716 \code{nPosEnd}. Each frame will increment the position by
717 \code{nPosIncrement}. The timestamp attached to each frame will
718 increment by \code{nFrameIncrement}.
719 */
720 
721 /*
722 This parameter is used to provide a callback function pointer for
723 release events. It is used for internal clients on VideoCore.
724 */
725 
726 /* OMX_IndexConfigAudioMonoTrackControl: Dual Mono Control */
727 typedef enum OMX_AUDIOMONOTRACKOPERATIONSTYPE {
728    OMX_AUDIOMONOTRACKOPERATIONS_NOP,
729    OMX_AUDIOMONOTRACKOPERATIONS_L_TO_R,
730    OMX_AUDIOMONOTRACKOPERATIONS_R_TO_L,
731    OMX_AUDIOMONOTRACKOPERATIONS_DUMMY = 0x7FFFFFFF
732 } OMX_AUDIOMONOTRACKOPERATIONSTYPE ;
733 
734 typedef struct OMX_CONFIG_AUDIOMONOTRACKCONTROLTYPE {
735    OMX_U32 nSize;
736    OMX_VERSIONTYPE nVersion;
737    OMX_U32 nPortIndex;
738    OMX_AUDIOMONOTRACKOPERATIONSTYPE eMode;
739 } OMX_CONFIG_AUDIOMONOTRACKCONTROLTYPE;
740 /*
741 This config controls the options to support dual mono audio
742 streams. The output can be unchanged, or the left channel copied over
743 the right channel, or the right channel copied over the left
744 channel. This config can be applied at any time with stereo
745 16-bit-per-sample data. Since audio output is typically buffered, any
746 change will not be audible until that buffering has been played out.
747 */
748 
749 /* OMX_IndexParamCameraImagePool: Camera Image Pools */
750 typedef enum OMX_CAMERAIMAGEPOOLINPUTMODETYPE {
751    OMX_CAMERAIMAGEPOOLINPUTMODE_ONEPOOL,     /*All input images are allocated from one pool
752                                                Works for simple stills capture use cases
753                                                Can not be used with parallel stills capture
754                                                and video encode, as the pool will be sized for
755                                                capture or viewfinder, not both simultaneously.
756                                                The pool wouldn't divide sensibly in this mode
757                                                anyway.
758                                              */
759    OMX_CAMERAIMAGEPOOLINPUTMODE_TWOPOOLS,    /*All stills & video input images are allocated
760                                                from two separate pools.
761                                                This ensures that parallel capture can work, but
762                                                would consume more memory if used on a simple
763                                                stills capture use case.
764                                              */
765 } OMX_CAMERAIMAGEPOOLINPUTMODETYPE;
766 
767 typedef struct OMX_PARAM_CAMERAIMAGEPOOLTYPE {
768    OMX_U32 nSize;
769    OMX_VERSIONTYPE nVersion;
770    OMX_U32 nNumHiResVideoFrames;
771    OMX_U32 nHiResVideoWidth;
772    OMX_U32 nHiResVideoHeight;
773    OMX_COLOR_FORMATTYPE eHiResVideoType;
774    OMX_U32 nNumHiResStillsFrames;
775    OMX_U32 nHiResStillsWidth;
776    OMX_U32 nHiResStillsHeight;
777    OMX_COLOR_FORMATTYPE eHiResStillsType;
778    OMX_U32 nNumLoResFrames;
779    OMX_U32 nLoResWidth;
780    OMX_U32 nLoResHeight;
781    OMX_COLOR_FORMATTYPE eLoResType;
782    OMX_U32 nNumSnapshotFrames;
783    OMX_COLOR_FORMATTYPE eSnapshotType;
784    OMX_CAMERAIMAGEPOOLINPUTMODETYPE eInputPoolMode;
785    OMX_U32 nNumInputVideoFrames;
786    OMX_U32 nInputVideoWidth;
787    OMX_U32 nInputVideoHeight;
788    OMX_COLOR_FORMATTYPE eInputVideoType;
789    OMX_U32 nNumInputStillsFrames;
790    OMX_U32 nInputStillsWidth;
791    OMX_U32 nInputStillsHeight;
792    OMX_COLOR_FORMATTYPE eInputStillsType;
793 } OMX_PARAM_CAMERAIMAGEPOOLTYPE;
794 /*
795 \sloppy This parameter specifies the size, type, and number, of images to
796 allow in the images pools required by Camplus. Supported types are
797 \code{OMX_COLOR_FormatYUV420PackedPlanar},
798 \code{OMX_COLOR_FormatYUV422PackedPlanar},
799 \code{OMX_COLOR_FormatRawBayer8bit},
800 \code{OMX_COLOR_FormatRawBayer10bit},
801 \code{OMX_COLOR_FormatRawBayer8bitcompressed}, and 0 (reserved for the
802 Broadcom-specific format required by the video encoder). The input
803 pool width, height, and type can be set as 0 to make the component
804 query Camplus for the sensor mode that would correspond to the largest
805 of the viewfinder port definition, the capture port definition, or the
806 high resolution image pool.
807 */
808 
809 /* OMX_IndexParamImagePoolSize: Specifying Image Pool Properties */
810 typedef struct OMX_PARAM_IMAGEPOOLSIZETYPE {
811    OMX_U32 nSize;
812    OMX_VERSIONTYPE nVersion;
813    OMX_U32 width;
814    OMX_U32 height;
815    OMX_U32 num_pages;
816 } OMX_PARAM_IMAGEPOOLSIZETYPE;
817 /*
818 This parameter is used to control the size of pool that the component
819 will allocate in the absence of setting an external pool.  The default
820 can be reset by setting this parameter with all three fields set to
821 zero.
822 */
823 
824 /* OMX_IndexParamImagePoolExternal: Client Allocated Image Pools */
825 struct opaque_vc_pool_s;
826 typedef struct opaque_vc_pool_s OMX_BRCM_POOL_T;
827 
828 typedef struct OMX_PARAM_IMAGEPOOLEXTERNALTYPE {
829    OMX_U32 nSize;
830    OMX_VERSIONTYPE nVersion;
831    OMX_BRCM_POOL_T *image_pool;
832    OMX_BRCM_POOL_T *image_pool2;
833    OMX_BRCM_POOL_T *image_pool3;
834    OMX_BRCM_POOL_T *image_pool4;
835    OMX_BRCM_POOL_T *image_pool5;
836 } OMX_PARAM_IMAGEPOOLEXTERNALTYPE;
837 /*
838 This config allows the client to pass in handles to pre-allocated
839 image pools for use within the component.
840 */
841 
842 struct _IL_FIFO_T;
843 typedef struct OMX_PARAM_RUTILFIFOINFOTYPE {
844    OMX_U32 nSize;
845    OMX_VERSIONTYPE nVersion;
846    OMX_U32 nPortIndex;
847    struct _IL_FIFO_T *pILFifo;
848 } OMX_PARAM_RUTILFIFOINFOTYPE;
849 
850 /* OMX_IndexParamILFifoConfig: Allows configuration of the FIFO settings. */
851 typedef struct OMX_PARAM_ILFIFOCONFIG {
852    OMX_U32 nSize;
853    OMX_VERSIONTYPE nVersion;
854    OMX_U32 nPortIndex;
855    OMX_U32 nDataSize;         /**< The size of the FIFO's data area */
856    OMX_U32 nHeaderCount;      /**< The number of headers allocated */
857 } OMX_PARAM_ILFIFOCONFIG;
858 /**
859  * Allows configuring the size of the ILFIFO used in a component.
860  */
861 
862 /* OMX_IndexConfigCameraSensorModes: Camera Sensor Mode */
863 typedef struct OMX_CONFIG_CAMERASENSORMODETYPE {
864    OMX_U32 nSize;
865    OMX_VERSIONTYPE nVersion;
866    OMX_U32 nPortIndex;
867    OMX_U32 nModeIndex;
868    OMX_U32 nNumModes;
869    OMX_U32 nWidth;
870    OMX_U32 nHeight;
871    OMX_U32 nPaddingRight;
872    OMX_U32 nPaddingDown;
873    OMX_COLOR_FORMATTYPE eColorFormat;
874    OMX_U32 nFrameRateMax;
875    OMX_U32 nFrameRateMin;
876 } OMX_CONFIG_CAMERASENSORMODETYPE;
877 /*
878 This parameter is used by clients to determine the sensor mode, and
879 hence the memory usage, of the camera module. This is primarily used
880 for determining the size of the input image pool.
881 
882 It can be used in two ways dependent on \code{nPortIndex}. If
883 \code{nPortIndex} is \code{OMX_ALL}, it returns the sensor mode
884 corresponding to \code{nModeIndex}, and the number of modes in
885 \code{nNumModes}. If \code{nModeIndex} is greater than or equal to
886 \code{nNumModes} only \code{nNumModes} is returned. If
887 \code{nPortIndex} is equal to a camera video output port index, it
888 returns the sensor mode that would be selected for the values
889 currently in \code{OMX_IndexParamPortDefinition} for that port.
890 
891 The \code{nPaddingRight} and \code{nPaddingDown} values determine the
892 extra padding the sensor adds to the image. These values must be added
893 to \code{nWidth} and \code{nHeight} respectively if the client is
894 specifying the input image pool size.
895 */
896 
897 typedef struct OMX_BRCMBUFFERSTATSTYPE {
898    OMX_U32 nOrdinal;
899    OMX_TICKS nTimeStamp;
900    OMX_U32 nFilledLen;
901    OMX_U32 nFlags;
902    union
903    {
904       OMX_U32 nU32;
905       struct
906       {
907          OMX_U32 nYpart;
908          OMX_U32 nUVpart;
909       } image;
910    } crc;
911 } OMX_BRCMBUFFERSTATSTYPE;
912 
913 /*
914 Ports that gather statistics for debugging and diagnostics
915 might also collect information about buffer header fields
916 and data.
917 
918 Note that:
919 
920 The \code{nOrdinal} field increases monotonically whenever
921 a new buffer is received or emitted and shall not be reset
922 upon a port flush.
923 
924 The \code{nFilledLen} might indicate the size of a data area
925 larger than the data area that actually contributed to the
926 checksums (e.g. when image data is provided with cropping
927 information).
928 */
929 
930 /* OMX_IndexConfigBrcmPortBufferStats: Query port buffer stats history */
931 typedef struct OMX_CONFIG_BRCMPORTBUFFERSTATSTYPE {
932    OMX_U32 nSize;
933    OMX_VERSIONTYPE nVersion;
934    OMX_U32 nPortIndex;
935    OMX_U32 nCount;
936    OMX_BRCMBUFFERSTATSTYPE sData[1];
937 } OMX_CONFIG_BRCMPORTBUFFERSTATSTYPE;
938 /*
939 Ports that gather statistics for debugging and diagnostics
940 might also collect information about buffer header fields
941 and data.
942 
943 The \code{sStatsData} field is a variable length array and
944 the number of items is denoted by \code{nStatsCount}.
945 */
946 
947 /* OMX_IndexConfigBrcmPortStats: Query port statistics */
948 typedef struct OMX_CONFIG_BRCMPORTSTATSTYPE {
949    OMX_U32 nSize;
950    OMX_VERSIONTYPE nVersion;
951    OMX_U32 nPortIndex;
952    OMX_U32 nImageCount;
953    OMX_U32 nBufferCount;
954    OMX_U32 nFrameCount;
955    OMX_U32 nFrameSkips;
956    OMX_U32 nDiscards;
957    OMX_U32 nEOS;
958    OMX_U32 nMaxFrameSize;
959 
960    OMX_TICKS nByteCount;
961    OMX_TICKS nMaxTimeDelta;
962    OMX_U32 nCorruptMBs;   /**< Number of corrupt macroblocks in the stream */
963 } OMX_CONFIG_BRCMPORTSTATSTYPE;
964 /*
965 Some ports gather various statistics that can be used by clients for
966 debugging purposes.  This structure is the set of all statistics that
967 are gathered.
968 
969 The \code{nFrameSkips} field indicates the number of frames that did
970 not have an expected PTS value based on the port frame rate.
971 
972 The \code{nByteCount} field is a 64 bit value, that will either use a
973 64 bit type or two 32 bit types, similarly to \code{OMX_TICKS}.
974 */
975 
976 /* OMX_IndexConfigBrcmClockMissCount: Missed clock request accounting */
977 /*
978 For each port on the clock component, requests for media times may be
979 made.  These are typically done one per video frame to allow for
980 scheduling the display of that frame at the correct time.  If a
981 request is made after the time has occurred, then that frame will be
982 displayed late, and the clock component keeps a per-port record of the
983 number of times this occurs.  This record can be read using this
984 index.
985 */
986 
987 typedef struct OMX_CONFIG_BRCMCAMERASTATSTYPE {
988    OMX_U32 nSize;
989    OMX_VERSIONTYPE nVersion;
990    OMX_U32 nOutFrameCount;
991    OMX_U32 nDroppedFrameCount;
992 } OMX_CONFIG_BRCMCAMERASTATSTYPE;
993 
994 // for backward compatibility
995 typedef struct OMX_CONFIG_BRCMCAMERASTATSTYPE OMX_CONFIG_BRCMCAMERASTATS;
996 
997 #define OMX_BRCM_MAXIOPERFBANDS 10
998 typedef struct {
999    OMX_U32 count[OMX_BRCM_MAXIOPERFBANDS];
1000    OMX_U32 num[OMX_BRCM_MAXIOPERFBANDS];
1001 } OMX_BRCM_PERFSTATS;
1002 
1003 /* OMX_IndexConfigBrcmIOPerfStats: Query I/O performance statistics */
1004 typedef struct OMX_CONFIG_BRCMIOPERFSTATSTYPE {
1005    OMX_U32 nSize;
1006    OMX_VERSIONTYPE nVersion;
1007    OMX_BOOL bEnabled;                              /**< Enable/disable I/O performance statistics */
1008    OMX_BRCM_PERFSTATS write; /**< count:bytes     num:microseconds */
1009    OMX_BRCM_PERFSTATS flush; /**< count:frequency num:microseconds waiting to flush data */
1010    OMX_BRCM_PERFSTATS wait;  /**< count:frequency num:microseconds waiting in calling function */
1011 } OMX_CONFIG_BRCMIOPERFSTATSTYPE;
1012 /*
1013 A sink component can gather various statistics about I/O (eg. file media) performance that can be used by
1014 clients for debugging purposes.  The \code{bEnabled} field is used to turn the gathering of statistics
1015 on/off.
1016 */
1017 
1018 typedef struct OMX_CONFIG_SHARPNESSTYPE {
1019    OMX_U32 nSize;
1020    OMX_VERSIONTYPE nVersion;
1021    OMX_U32 nPortIndex;
1022    OMX_S32 nSharpness;
1023 } OMX_CONFIG_SHARPNESSTYPE;
1024 
1025 /* OMX_IndexConfigCommonFlickerCancellation: Flicker cancellation */
1026 typedef enum OMX_COMMONFLICKERCANCELTYPE {
1027    OMX_COMMONFLICKERCANCEL_OFF,
1028    OMX_COMMONFLICKERCANCEL_AUTO,
1029    OMX_COMMONFLICKERCANCEL_50,
1030    OMX_COMMONFLICKERCANCEL_60,
1031    OMX_COMMONFLICKERCANCEL_DUMMY = 0x7FFFFFFF
1032 } OMX_COMMONFLICKERCANCELTYPE;
1033 
1034 typedef struct OMX_CONFIG_FLICKERCANCELTYPE {
1035    OMX_U32 nSize;
1036    OMX_VERSIONTYPE nVersion;
1037    OMX_U32 nPortIndex;
1038    OMX_COMMONFLICKERCANCELTYPE eFlickerCancel;
1039 } OMX_CONFIG_FLICKERCANCELTYPE;
1040 /*
1041 Query / set the flicker cancellation frequency. Values are defined for Off,
1042 50Hz, 60Hz, or auto. The method for auto detecting the flicker frequency is
1043 not defined, and currently results in the feature being turned off.
1044 */
1045 
1046 /* OMX_IndexConfigCommonRedEyeRemoval: Red eye removal/reduction */
1047 typedef enum OMX_REDEYEREMOVALTYPE {
1048    OMX_RedEyeRemovalNone,                           /**< No red eye removal */
1049    OMX_RedEyeRemovalOn,                             /**< Red eye removal on */
1050    OMX_RedEyeRemovalAuto,                           /**< Red eye removal will be done automatically when detected */
1051    OMX_RedEyeRemovalKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1052    OMX_RedEyeRemovalVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1053    OMX_RedEyeRemovalSimple,                         /**< Use simple red eye reduction mechanism if supported by algorithm */
1054    OMX_RedEyeRemovalMax = 0x7FFFFFFF
1055 } OMX_REDEYEREMOVALTYPE;
1056 
1057 typedef struct OMX_CONFIG_REDEYEREMOVALTYPE {
1058    OMX_U32 nSize;
1059    OMX_VERSIONTYPE nVersion;
1060    OMX_U32 nPortIndex;
1061    OMX_REDEYEREMOVALTYPE eMode;
1062 } OMX_CONFIG_REDEYEREMOVALTYPE;
1063 /*
1064    Configures the red eye reduction algorithm in the camera processing
1065    pipeline. The stage is only enabled if the flash mode is not FlashOff.
1066    The OMX_RedEyeRemovalSimple mode requests that the algorithm uses a
1067    reduced complexity algorithm to reduce the processing time.
1068 */
1069 
1070 typedef enum OMX_FACEDETECTIONCONTROLTYPE {
1071    OMX_FaceDetectionControlNone,                           /**< Disables face detection */
1072    OMX_FaceDetectionControlOn,                             /**< Enables face detection */
1073    OMX_FaceDetectionControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1074    OMX_FaceDetectionControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1075    OMX_FaceDetectionControlMax = 0x7FFFFFFF
1076 } OMX_FACEDETECTIONCONTROLTYPE;
1077 
1078 typedef struct OMX_CONFIG_FACEDETECTIONCONTROLTYPE {
1079    OMX_U32 nSize;
1080    OMX_VERSIONTYPE nVersion;
1081    OMX_U32 nPortIndex;
1082    OMX_FACEDETECTIONCONTROLTYPE eMode;
1083    OMX_U32 nFrames;      /**< number of frames to apply this setting for,
1084                               0 for unlimited */
1085    OMX_U32 nMaxRegions;  /**< maximum number of regions to detect, 0 for unlimited */
1086    OMX_U32 nQuality;     /**< hint for algorithmic complexity, range is 0-100.
1087                               0 for simplest algorithm, 100 for best quality */
1088 } OMX_CONFIG_FACEDETECTIONCONTROLTYPE;
1089 
1090 typedef enum OMX_FACEREGIONFLAGSTYPE {
1091    OMX_FaceRegionFlagsNone    = 0,
1092    OMX_FaceRegionFlagsBlink   = 1,
1093    OMX_FaceRegionFlagsSmile   = 2,
1094    OMX_FaceRegionFlagsKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1095    OMX_FaceRegionFlagsVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1096    OMX_FaceRegionFlagsMax = 0x7FFFFFFF
1097 } OMX_FACEREGIONFLAGSTYPE;
1098 
1099 typedef struct OMX_FACEREGIONTYPE {
1100    OMX_S16 nLeft;              /**< X Coordinate of the top left corner of the rectangle */
1101    OMX_S16 nTop;               /**< Y Coordinate of the top left corner of the rectangle */
1102    OMX_U16 nWidth;             /**< Width of the rectangle */
1103    OMX_U16 nHeight;            /**< Height of the rectangle */
1104    OMX_FACEREGIONFLAGSTYPE nFlags;  /**< Flags for the region */
1105 #ifndef OMX_SKIP64BIT
1106    OMX_U64 nFaceRecognitionId; /**< ID returned by face recognition for this face */
1107 #else
1108    struct
1109    {
1110       OMX_U32 nLowPart;   /**< low bits of the signed 64 bit value */
1111       OMX_U32 nHighPart;  /**< high bits of the signed 64 bit value */
1112    } nFaceRecognitionId;
1113 #endif
1114 } OMX_FACEREGIONTYPE;
1115 
1116 typedef struct OMX_CONFIG_FACEDETECTIONREGIONTYPE {
1117    OMX_U32 nSize;
1118    OMX_VERSIONTYPE nVersion;
1119    OMX_U32 nPortIndex;            /**< index of port with face detection enabled */
1120    OMX_U32 nIndex;                /**< first requested region number, allowing retrieval of many regions
1121                                        over several requests */
1122    OMX_U32 nDetectedRegions;      /**< total number of detected regions */
1123    OMX_S32 nValidRegions;         /**< number of valid regions in sRegion array
1124                                        When getting, the client sets this to the number of regions available.
1125                                        The component writes region data and updates this field with how many
1126                                        regions have been written to. */
1127    OMX_U32 nImageWidth;           /**< Width of the image, hence reference for the face coordinates */
1128    OMX_U32 nImageHeight;          /**< Height of the image, hence reference for the face coordinates */
1129    OMX_FACEREGIONTYPE sRegion[1]; /**< variable length array of face regions */
1130 } OMX_CONFIG_FACEDETECTIONREGIONTYPE;
1131 
1132 typedef enum OMX_INTERLACETYPE {
1133    OMX_InterlaceProgressive,                    /**< The data is not interlaced, it is progressive scan */
1134    OMX_InterlaceFieldSingleUpperFirst,          /**< The data is interlaced, fields sent
1135                                                      separately in temporal order, with upper field first */
1136    OMX_InterlaceFieldSingleLowerFirst,          /**< The data is interlaced, fields sent
1137                                                      separately in temporal order, with lower field first */
1138    OMX_InterlaceFieldsInterleavedUpperFirst,    /**< The data is interlaced, two fields sent together line
1139                                                      interleaved, with the upper field temporally earlier */
1140    OMX_InterlaceFieldsInterleavedLowerFirst,    /**< The data is interlaced, two fields sent together line
1141                                                      interleaved, with the lower field temporally earlier */
1142    OMX_InterlaceMixed,                          /**< The stream may contain a mixture of progressive
1143                                                      and interlaced frames */
1144    OMX_InterlaceKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1145    OMX_InterlaceVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1146    OMX_InterlaceMax = 0x7FFFFFFF
1147 } OMX_INTERLACETYPE;
1148 
1149 typedef struct OMX_CONFIG_INTERLACETYPE {
1150    OMX_U32 nSize;
1151    OMX_VERSIONTYPE nVersion;
1152    OMX_U32 nPortIndex;            /**< index of port emitting or accepting the content */
1153    OMX_INTERLACETYPE eMode;       /**< The interlace type of the content */
1154    OMX_BOOL bRepeatFirstField;    /**< Whether to repeat the first field */
1155 } OMX_CONFIG_INTERLACETYPE;
1156 
1157 /* OMX_IndexParamIspTuner: Custom ISP tuner */
1158 typedef struct OMX_PARAM_CAMERAISPTUNERTYPE {
1159    OMX_U32 nSize;
1160    OMX_VERSIONTYPE nVersion;
1161    OMX_U8 tuner_name[64];
1162 } OMX_PARAM_CAMERAISPTUNERTYPE;
1163 /*
1164 This parameter allows a custom ISP tuner to be loaded instead of
1165 the default one specified for the camera module. Setting an empty
1166 string uses the default value.
1167 */
1168 
1169 /* OMX_IndexConfigCameraInputFrame: Pointer to the raw input image */
1170 typedef struct OMX_CONFIG_IMAGEPTRTYPE {
1171    OMX_U32 nSize;
1172    OMX_VERSIONTYPE nVersion;
1173    OMX_PTR pImage;
1174 } OMX_CONFIG_IMAGEPTRTYPE;
1175 /*
1176 This parameter parameter allows the return of a pointer to a
1177 VideoCore image resource.
1178 */
1179 
1180 /* OMX_IndexConfigAFAssistLight: Autofocus assist light mode selection */
1181 typedef enum OMX_AFASSISTTYPE {
1182    OMX_AFAssistAuto,
1183    OMX_AFAssistOn,
1184    OMX_AFAssistOff,
1185    OMX_AFAssistTorch,
1186    OMX_AFAssistKhronosExtensions = 0x6F000000,
1187    OMX_AFAssistVendorStartUnused = 0x7F000000,
1188    OMX_AFAssistMax = 0x7FFFFFFF
1189 } OMX_AFASSISTTYPE;
1190 
1191 typedef struct OMX_CONFIG_AFASSISTTYPE {
1192    OMX_U32 nSize;
1193    OMX_VERSIONTYPE nVersion;
1194    OMX_U32 nPortIndex;
1195    OMX_AFASSISTTYPE eMode;
1196 } OMX_CONFIG_AFASSISTTYPE;
1197 /*
1198 Set the mode to adopt for the autofocus assist light.
1199 \code{OMX_AFAssistTorch} will turn the AF assist light on permanently, allowing
1200 it to be used as a torch.
1201 */
1202 
1203 /* OMX_IndexConfigInputCropPercentage: Specify input crop as a percentage */
1204 typedef struct OMX_CONFIG_INPUTCROPTYPE {
1205    OMX_U32 nSize;
1206    OMX_VERSIONTYPE nVersion;
1207    OMX_U32 nPortIndex;
1208    OMX_U32 xLeft;     /**< Fraction of the width for the top left corner of the rectangle */
1209    OMX_U32 xTop;      /**< Fraction of the height for the top left corner of the rectangle */
1210    OMX_U32 xWidth;    /**< Fraction of the image width desired */
1211    OMX_U32 xHeight;   /**< Fraction of the image height desired */
1212 } OMX_CONFIG_INPUTCROPTYPE;
1213 /*
1214 This parameter allows the input cropping to be specified as a
1215 percentage of the current width/height.  Required for the camera
1216 component where the output resolution varies dependent on the port.
1217 All percentage values are as 16p16 fixed point numbers (0x10000 =
1218 100\%)
1219 */
1220 
1221 /* OMX_IndexParamCodecRequirements: Advanced codec requirements */
1222 typedef struct OMX_PARAM_CODECREQUIREMENTSTYPE {
1223    OMX_U32 nSize;
1224    OMX_VERSIONTYPE nVersion;
1225    OMX_U32 nCallbackID;
1226    OMX_BOOL bTryHWCodec;
1227 } OMX_PARAM_CODECREQUIREMENTSTYPE;
1228 /*
1229 This parameter allows internal users of RIL components controlling
1230 video codecs to request that the component loads the component and
1231 queries for requirements.  The component will perform a callback with
1232 the given nCallbackID value passing a pointer to the requirements
1233 structure as the data field.
1234 */
1235 
1236 /* OMX_IndexConfigBrcmEGLImageMemHandle: Mapping from an EGLImage to a VideoCore mem handle */
1237 typedef struct OMX_CONFIG_BRCMEGLIMAGEMEMHANDLETYPE {
1238    OMX_U32 nSize;
1239    OMX_VERSIONTYPE nVersion;
1240    OMX_U32 nPortIndex;
1241    OMX_PTR eglImage;
1242    OMX_PTR memHandle;
1243 } OMX_CONFIG_BRCMEGLIMAGEMEMHANDLETYPE;
1244 /*
1245 This config allows the EGL server to notify a RIL component that an
1246 EGLImage is available for rendering into and to provide a mapping from
1247 an EGLImage to a mem handle.
1248 */
1249 
1250 /* OMX_IndexConfigPrivacyIndicator: Privacy indicator control */
1251 typedef enum OMX_PRIVACYINDICATORTYPE {
1252    OMX_PrivacyIndicatorOff,
1253    OMX_PrivacyIndicatorOn,
1254    OMX_PrivacyIndicatorForceOn,
1255    OMX_PrivacyIndicatorKhronosExtensions = 0x6F000000,
1256    OMX_PrivacyIndicatorVendorStartUnused = 0x7F000000,
1257    OMX_PrivacyIndicatorMax = 0x7FFFFFFF
1258 } OMX_PRIVACYINDICATORTYPE;
1259 
1260 typedef struct OMX_CONFIG_PRIVACYINDICATORTYPE {
1261    OMX_U32 nSize;
1262    OMX_VERSIONTYPE nVersion;
1263    OMX_PRIVACYINDICATORTYPE ePrivacyIndicatorMode;
1264 } OMX_CONFIG_PRIVACYINDICATORTYPE;
1265 /*
1266 This config allows control over the privacy indicator light.  This
1267 light indicates when a capture is in progress.
1268 
1269 \code{OMX_PrivacyIndicatorOff} indicator is disabled.
1270 
1271 \code{OMX_PrivacyIndicatorOn} indicator will be
1272 turned on whenever an image is being captured as determined by the
1273 capturing bit. Minimum on duration of approx 200ms.
1274 
1275 \code{OMX_PrivacyIndicatorForceOn} results in turning the indicator on
1276 immediately, whether an image is being captured or not. The mode will
1277 automatically revert to \code{OMX_PrivacyIndicatorOff} once the
1278 indicator has been turned on, so \code{OMX_PrivacyIndicatorForceOn}
1279 must be requested at least every 200ms if the indicator is to remain
1280 on.
1281 */
1282 
1283 /* OMX_IndexParamCameraFlashType: Select flash type */
1284 typedef enum OMX_CAMERAFLASHTYPE {
1285    OMX_CameraFlashDefault,
1286    OMX_CameraFlashXenon,
1287    OMX_CameraFlashLED,
1288    OMX_CameraFlashNone,
1289    OMX_CameraFlashKhronosExtensions = 0x6F000000,
1290    OMX_CameraFlashVendorStartUnused = 0x7F000000,
1291    OMX_CameraFlashMax = 0x7FFFFFFF
1292 } OMX_CAMERAFLASHTYPE;
1293 
1294 typedef struct OMX_PARAM_CAMERAFLASHTYPE {
1295    OMX_U32 nSize;
1296    OMX_VERSIONTYPE nVersion;
1297    OMX_U32 nPortIndex;
1298    OMX_CAMERAFLASHTYPE eFlashType;
1299    OMX_BOOL bRedEyeUsesTorchMode;
1300 } OMX_PARAM_CAMERAFLASHTYPE;
1301 /*
1302 This parameter allows the selection of xenon or LED flash devices
1303 to be used with the currently selected camera. If that device is not
1304 available, then the component will revert back to whatever flash
1305 device is available for that camera.
1306 \code{bRedEyeUsesTorchMode} allows the blinking for red eye reduction to
1307 be switched between using the indicator mode, and the torch mode for the
1308 flash driver.
1309 */
1310 
1311 /* OMX_IndexConfigCameraFlashConfig: Flash cycle configuration */
1312 typedef enum OMX_CAMERAFLASHCONFIGSYNCTYPE {
1313    OMX_CameraFlashConfigSyncFrontSlow,
1314    OMX_CameraFlashConfigSyncRearSlow,
1315    OMX_CameraFlashConfigSyncFrontFast,
1316    OMX_CameraFlashConfigSyncKhronosExtensions = 0x6F000000,
1317    OMX_CameraFlashConfigSyncVendorStartUnused = 0x7F000000,
1318    OMX_CameraFlashConfigSyncMax = 0x7FFFFFFF
1319 } OMX_CAMERAFLASHCONFIGSYNCTYPE;
1320 
1321 typedef struct OMX_CONFIG_CAMERAFLASHCONFIGTYPE {
1322    OMX_U32 nSize;
1323    OMX_VERSIONTYPE nVersion;
1324    OMX_U32 nPortIndex;
1325    OMX_BOOL bUsePreFlash;
1326    OMX_BOOL bUseFocusDistanceInfo;
1327    OMX_CAMERAFLASHCONFIGSYNCTYPE eFlashSync;
1328    OMX_BOOL bIgnoreChargeState;
1329 } OMX_CONFIG_CAMERAFLASHCONFIGTYPE;
1330 /*
1331 This parameter allows the configuration of various parameters relating to
1332 the flash cycle. Some of the options are only applicable to xenon flash.
1333 
1334 \code{bUsePreFlash} uses a low intensity pre-flash to determine flash intensity. This setting
1335 is recommended for almost all flash situations.
1336 
1337 \code{bUseFocusDistanceInfo} uses the distance of the subject, as measured by the AF algorithm
1338 to set the intensity of the flash.
1339 
1340 \code{eFlashSync} configures which edge of the shutter is used to synchronise the flash, and
1341 the duration of the exposure.
1342 
1343 \code{eIgnoreChargeState} will make the flash fire, even if it is not fully charged.
1344 */
1345 
1346 /* OMX_IndexConfigBrcmAudioTrackGaplessPlayback: Encoder/decoder delay and padding information for gapless playback. */
1347 typedef struct OMX_CONFIG_BRCMAUDIOTRACKGAPLESSPLAYBACKTYPE {
1348    OMX_U32 nSize;
1349    OMX_VERSIONTYPE nVersion;
1350    OMX_U32 nPortIndex;
1351    OMX_U32 nDelay;   /**< number of samples delay added by the codec */
1352    OMX_U32 nPadding; /**< number of silent samples added to the end */
1353 } OMX_CONFIG_BRCMAUDIOTRACKGAPLESSPLAYBACKTYPE;
1354 /*
1355 This config allows communication between components to facilitate gapless playback.
1356 */
1357 
1358 /* OMX_IndexConfigBrcmAudioTrackChangeControl: Configure gapless/crossfaded audio track change. */
1359 typedef struct OMX_CONFIG_BRCMAUDIOTRACKCHANGECONTROLTYPE {
1360    OMX_U32 nSize;
1361    OMX_VERSIONTYPE nVersion;
1362    OMX_U32 nSrcPortIndex;
1363    OMX_U32 nDstPortIndex;
1364    OMX_U32 nXFade;
1365 } OMX_CONFIG_BRCMAUDIOTRACKCHANGECONTROLTYPE;
1366 /*
1367 This config allows the client to specify the gapless or crossfade
1368 parameters to be used on a track change.  If \code{nXFade} is 0, then
1369 a normal or gapless track change will result, otherwise a crossfade of
1370 \code{nXFade} ms is used.
1371 */
1372 
1373 /* OMX_IndexParamBrcmPixelValueRange: Describing the pixel value range */
1374 typedef enum OMX_BRCMPIXELVALUERANGETYPE
1375 {
1376    OMX_PixelValueRangeUnspecified = 0,
1377    OMX_PixelValueRangeITU_R_BT601,
1378    OMX_PixelValueRangeFull8Bit,
1379    OMX_PixelValueRangeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1380    OMX_PixelValueRangeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1381    OMX_PixelValueRangeMax = 0x7FFFFFFF
1382 } OMX_BRCMPIXELVALUERANGETYPE;
1383 
1384 typedef struct OMX_PARAM_BRCMPIXELVALUERANGETYPE
1385 {
1386    OMX_U32 nSize;
1387    OMX_VERSIONTYPE nVersion;
1388    OMX_U32 nPortIndex;
1389    OMX_BRCMPIXELVALUERANGETYPE ePixelValueRange;
1390 } OMX_PARAM_BRCMPIXELVALUERANGETYPE;
1391 /*
1392 This structure allows a description of the range that pixel values may
1393 have.  This is typically useful since some standards use the full 8
1394 bit range, whereas others introduce pedastals which reduce the range
1395 at the top and bottom end.
1396 */
1397 
1398 /* OMX_IndexParamCameraDisableAlgorithm: Disabling camera processing stages. */
1399 typedef enum OMX_CAMERADISABLEALGORITHMTYPE {
1400       OMX_CameraDisableAlgorithmFacetracking,
1401       OMX_CameraDisableAlgorithmRedEyeReduction,
1402       OMX_CameraDisableAlgorithmVideoStabilisation,
1403       OMX_CameraDisableAlgorithmWriteRaw,
1404       OMX_CameraDisableAlgorithmVideoDenoise,
1405       OMX_CameraDisableAlgorithmStillsDenoise,
1406       OMX_CameraDisableAlgorithmAntiShake,
1407       OMX_CameraDisableAlgorithmImageEffects,
1408       OMX_CameraDisableAlgorithmDarkSubtract,
1409       OMX_CameraDisableAlgorithmDynamicRangeExpansion,
1410       OMX_CameraDisableAlgorithmFaceRecognition,
1411       OMX_CameraDisableAlgorithmFaceBeautification,
1412       OMX_CameraDisableAlgorithmSceneDetection,
1413       OMX_CameraDisableAlgorithmHighDynamicRange,
1414    OMX_CameraDisableAlgorithmKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1415    OMX_CameraDisableAlgorithmVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1416    OMX_CameraDisableAlgorithmMax = 0x7FFFFFFF
1417 } OMX_CAMERADISABLEALGORITHMTYPE;
1418 
1419 typedef struct OMX_PARAM_CAMERADISABLEALGORITHMTYPE
1420 {
1421    OMX_U32 nSize;
1422    OMX_VERSIONTYPE nVersion;
1423    OMX_CAMERADISABLEALGORITHMTYPE eAlgorithm;
1424    OMX_BOOL bDisabled;
1425 } OMX_PARAM_CAMERADISABLEALGORITHMTYPE;
1426 /*
1427 Allows plugin algorithms to be disabled to save memory
1428 within the camera component
1429 */
1430 
1431 /* OMX_IndexConfigBrcmAudioEffectControl: Audio Effect Control */
1432 typedef struct OMX_CONFIG_BRCMAUDIOEFFECTCONTROLTYPE {
1433    OMX_U32 nSize;
1434    OMX_VERSIONTYPE nVersion;
1435    OMX_U32 nPortIndex;
1436    OMX_BOOL bEnable;
1437    OMX_U8 name[16];
1438    OMX_U8 property[256];
1439 } OMX_CONFIG_BRCMAUDIOEFFECTCONTROLTYPE;
1440 /*
1441 This structure represents the internal configuration of an audio effect.
1442 The audio effect is provided by a loadable plug-in described
1443 in the \code{name} field and is configured in a plug-in-dependent
1444 manner with the \code{property} field. The \code{bEnable} field is used to
1445 turn the effect on/off.
1446 */
1447 
1448 /* OMX_IndexConfigBrcmMinimumProcessingLatency: Processing Latency Bound */
1449 typedef struct OMX_CONFIG_BRCMMINIMUMPROCESSINGLATENCY {
1450    OMX_U32 nSize;
1451    OMX_VERSIONTYPE nVersion;
1452    OMX_TICKS nOffset;
1453 } OMX_CONFIG_BRCMMINIMUMPROCESSINGLATENCY;
1454 /*
1455 Query/set the difference between the actual media time and when the
1456 component receives request fulfillments for media time requests. This
1457 can be used with e.g. splitter/mixer components to control when the
1458 component stops waiting for input or output packets from active
1459 streams and continues with processing (to maintain a constant
1460 processing rate).
1461 */
1462 
1463 /** Enable or disable Supplemental Enhancment Information (SEI) messages to be inserted in
1464   * the H.264 bitstream.
1465   */
1466 typedef struct OMX_PARAM_BRCMVIDEOAVCSEIENABLETYPE {
1467    OMX_U32 nSize;
1468    OMX_VERSIONTYPE nVersion;
1469    OMX_U32 nPortIndex;
1470    OMX_BOOL bEnable;
1471 } OMX_PARAM_BRCMVIDEOAVCSEIENABLETYPE;
1472 
1473 /* OMX_IndexParamBrcmAllowMemChange: Allowing changing memory allocation on state transition */
1474 typedef struct OMX_PARAM_BRCMALLOWMEMCHANGETYPE {
1475    OMX_U32 nSize;
1476    OMX_VERSIONTYPE nVersion;
1477    OMX_BOOL bEnable;
1478 } OMX_PARAM_BRCMALLOWMEMCHANGETYPE;
1479 /*
1480 Let the component change the amount of memory it has allocated when
1481 going from LOADED to IDLE. By default this is enabled, but if it is
1482 disabled the component will fail to transition to IDLE if the
1483 component requires more memory than has already been allocated.  This
1484 might occur if (for example) the component was configured, taken to
1485 IDLE, then taken back to LOADED, the profile increased and the
1486 component taken back to IDLE.
1487 */
1488 
1489 typedef enum OMX_CONFIG_CAMERAUSECASE {
1490    OMX_CameraUseCaseAuto,
1491    OMX_CameraUseCaseVideo,
1492    OMX_CameraUseCaseStills,
1493    OMX_CameraUseCaseKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1494    OMX_CameraUseCaseVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1495    OMX_CameraUseCaseMax = 0x7FFFFFFF
1496 } OMX_CONFIG_CAMERAUSECASE;
1497 
1498 typedef struct OMX_CONFIG_CAMERAUSECASETYPE {
1499    OMX_U32 nSize;
1500    OMX_VERSIONTYPE nVersion;
1501    OMX_CONFIG_CAMERAUSECASE eUseCase;
1502 } OMX_CONFIG_CAMERAUSECASETYPE;
1503 
1504 /* OMX_IndexParamBrcmDisableProprietaryTunnels: Disabling proprietary tunnelling */
1505 typedef struct OMX_PARAM_BRCMDISABLEPROPRIETARYTUNNELSTYPE {
1506    OMX_U32 nSize;
1507    OMX_VERSIONTYPE nVersion;
1508    OMX_U32 nPortIndex;
1509    OMX_BOOL bUseBuffers;
1510 }  OMX_PARAM_BRCMDISABLEPROPRIETARYTUNNELSTYPE;
1511 /*
1512 Tell a source component to refuse to support proprietary tunnelling. Buffers will be used instead.
1513 */
1514 
1515 //
1516 // Control for memory allocation and component-internal buffering
1517 //
1518 
1519 /* OMX_IndexParamBrcmRetainMemory: Controlling memory use on state transition */
1520 typedef struct OMX_PARAM_BRCMRETAINMEMORYTYPE
1521 {
1522    OMX_U32 nSize;
1523    OMX_VERSIONTYPE nVersion;
1524    OMX_BOOL bEnable;
1525 } OMX_PARAM_BRCMRETAINMEMORYTYPE;
1526 /*
1527 Ask a component to retain its memory when going from IDLE to LOADED, if possible.
1528 This has the benefit that you are then guaranteed that the transition to IDLE cannot
1529 fail due to lack of memory, but has the disadvantage that you cannot leave the component
1530 lying around in LOADED, unused, since it is using significant amounts of memory.
1531 */
1532 
1533 /** Tell write media how large the output buffer should be. This is a hint, and
1534   * may be ignored. A good size is bandwidth*<SDcard-delay>, which works out at
1535   * around 1Mbyte for up to 16Mbit/s. Sizes may (and probably will) be rounded down
1536   * to the nearest power of 2.
1537   */
1538 typedef struct OMX_PARAM_BRCMOUTPUTBUFFERSIZETYPE {
1539    OMX_U32 nSize;
1540    OMX_VERSIONTYPE nVersion;
1541    OMX_U32 nBufferSize;
1542 } OMX_PARAM_BRCMOUTPUTBUFFERSIZETYPE;
1543 
1544 /* OMX_IndexConfigCameraInfo: Camera device driver information */
1545 #define OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN 16
1546 typedef struct OMX_CONFIG_LENSCALIBRATIONVALUETYPE
1547 {
1548    OMX_U16  nShutterDelayTime;
1549    OMX_U16  nNdTransparency;
1550    OMX_U16  nPwmPulseNearEnd;  /**< Num pulses to move lens 1um at near end */
1551    OMX_U16  nPwmPulseFarEnd;   /**< Num pulses to move lens 1um at far end */
1552    OMX_U16  nVoltagePIOutNearEnd[3];
1553    OMX_U16  nVoltagePIOut10cm[3];
1554    OMX_U16  nVoltagePIOutInfinity[3];
1555    OMX_U16  nVoltagePIOutFarEnd[3];
1556    OMX_U32  nAdcConversionNearEnd;
1557    OMX_U32  nAdcConversionFarEnd;
1558 } OMX_CONFIG_LENSCALIBRATIONVALUETYPE;
1559 /*
1560 Ask the camera component for the driver info on the current camera device
1561 */
1562 
1563 #define OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN 16
1564 #define OMX_CONFIG_CAMERAINFOTYPE_SERIALNUM_LEN 20
1565 #define OMX_CONFIG_CAMERAINFOTYPE_EPROMVER_LEN 8
1566 typedef struct OMX_CONFIG_CAMERAINFOTYPE
1567 {
1568    OMX_U32 nSize;
1569    OMX_VERSIONTYPE nVersion;
1570    OMX_U8 cameraname[OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN];
1571    OMX_U8 lensname[OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN];
1572    OMX_U16 nModelId;
1573    OMX_U8 nManufacturerId;
1574    OMX_U8 nRevNum;
1575    OMX_U8 sSerialNumber[OMX_CONFIG_CAMERAINFOTYPE_SERIALNUM_LEN];
1576    OMX_U8 sEpromVersion[OMX_CONFIG_CAMERAINFOTYPE_EPROMVER_LEN];
1577    OMX_CONFIG_LENSCALIBRATIONVALUETYPE sLensCalibration;
1578    OMX_U32 xFNumber;
1579    OMX_U32 xFocalLength;
1580 } OMX_CONFIG_CAMERAINFOTYPE;
1581 
1582 typedef enum OMX_CONFIG_CAMERAFEATURESSHUTTER {
1583    OMX_CameraFeaturesShutterUnknown,
1584    OMX_CameraFeaturesShutterNotPresent,
1585    OMX_CameraFeaturesShutterPresent,
1586    OMX_CameraFeaturesShutterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1587    OMX_CameraFeaturesShutterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1588    OMX_CameraFeaturesShutterMax = 0x7FFFFFFF
1589 } OMX_CONFIG_CAMERAFEATURESSHUTTER;
1590 
1591 typedef struct OMX_CONFIG_CAMERAFEATURESTYPE
1592 {
1593    OMX_U32 nSize;
1594    OMX_VERSIONTYPE nVersion;
1595    OMX_CONFIG_CAMERAFEATURESSHUTTER eHasMechanicalShutter;
1596    OMX_BOOL bHasLens;
1597 } OMX_CONFIG_CAMERAFEATURESTYPE;
1598 
1599 //Should be added to the spec as part of IL416c
1600 /* OMX_IndexConfigRequestCallback: Enable config change notifications. */
1601 typedef struct OMX_CONFIG_REQUESTCALLBACKTYPE
1602 {
1603    OMX_U32 nSize;
1604    OMX_VERSIONTYPE nVersion;
1605    OMX_U32 nPortIndex;
1606    OMX_INDEXTYPE nIndex;
1607    OMX_BOOL bEnable;
1608 } OMX_CONFIG_REQUESTCALLBACKTYPE;
1609 /*
1610 This config implements IL416c to allow clients to request notification
1611 of when a config or parameter is changed. When the parameter specified
1612 in \code{nIndex} for port \code{nPortIndex} changes, an
1613 \code{OMX_EventParamOrConfigChanged} event is generated for the client.
1614 */
1615 
1616 /* OMX_IndexConfigCommonFocusRegionXY: Define focus regions */
1617 typedef enum OMX_FOCUSREGIONTYPE {
1618    OMX_FocusRegionNormal,
1619    OMX_FocusRegionFace,
1620    OMX_FocusRegionMax
1621 } OMX_FOCUSREGIONTYPE;
1622 
1623 typedef struct OMX_FOCUSREGIONXY {
1624    OMX_U32 xLeft;
1625    OMX_U32 xTop;
1626    OMX_U32 xWidth;
1627    OMX_U32 xHeight;
1628    OMX_U32 nWeight;
1629    OMX_U32 nMask;
1630    OMX_FOCUSREGIONTYPE eType;
1631 } OMX_FOCUSREGIONXY;
1632 
1633 typedef struct OMX_CONFIG_FOCUSREGIONXYTYPE
1634 {
1635    OMX_U32 nSize;
1636    OMX_VERSIONTYPE nVersion;
1637    OMX_U32 nPortIndex;
1638    OMX_U32 nIndex;
1639    OMX_U32 nTotalRegions;
1640    OMX_S32 nValidRegions;
1641    OMX_BOOL bLockToFaces;
1642    OMX_U32 xFaceTolerance;
1643    OMX_FOCUSREGIONXY sRegion[1];
1644 } OMX_CONFIG_FOCUSREGIONXYTYPE;
1645 /*
1646 Query / set the focus regions to use as a set of x/y/width/height boxes relative
1647 to the overall image.
1648 
1649 \code{nIndex} - first region number being set/read, allowing retrieval/setting
1650 of many regions over several requests.
1651 
1652 \code{nTotalRegions} - total number of regions currently defined.
1653 
1654 \code{nValidRegions} - number of valid regions in the \code{sRegion} array.
1655 When getting, the client sets this to the number of regions available.
1656 The component writes region data and updates this field with how many
1657 regions have been written to.
1658 When setting, this is the number of regions defined with this structure
1659 
1660 \code{bLockToFaces} - compare the region(s) given to the latest face tracking results.
1661 If a face is found within xFaceTolerance of the defined region, then amend the
1662 region to correspond to the face.
1663 
1664 \code{xFaceTolerance} - 0p16 value to define the max difference between the region centre
1665 and face tracking result centre to take the FT results
1666 
1667 \code{sRegions} - variable length array of focus regions.
1668 */
1669 
1670 typedef struct OMX_CONFIG_U8TYPE {
1671     OMX_U32 nSize;                    /**< Size of this structure, in Bytes */
1672     OMX_VERSIONTYPE nVersion;         /**< OMX specification version information */
1673     OMX_U32 nPortIndex;               /**< port that this structure applies to */
1674     OMX_U8  nU8;                     /**< U8 value */
1675 } OMX_PARAM_U8TYPE;
1676 
1677 typedef struct OMX_CONFIG_CAMERASETTINGSTYPE {
1678     OMX_U32 nSize;
1679     OMX_VERSIONTYPE nVersion;
1680     OMX_U32 nPortIndex;               /**< port that this structure applies to */
1681     OMX_U32 nExposure;
1682     OMX_U32 nAnalogGain;
1683     OMX_U32 nDigitalGain;
1684     OMX_U32 nLux;
1685     OMX_U32 nRedGain;
1686     OMX_U32 nBlueGain;
1687     OMX_U32 nFocusPosition;
1688 } OMX_CONFIG_CAMERASETTINGSTYPE;
1689 
1690 /* OMX_IndexConfigDrawBoxLineParams: Face box style parameters. */
1691 typedef struct OMX_YUVCOLOUR {
1692    OMX_U8 nY;
1693    OMX_U8 nU;
1694    OMX_U8 nV;
1695 } OMX_YUVCOLOUR;
1696 
1697 typedef struct OMX_CONFIG_DRAWBOXLINEPARAMS {
1698     OMX_U32 nSize;                           /**< Size of this structure, in Bytes */
1699     OMX_VERSIONTYPE nVersion;                /**< OMX specification version information */
1700     OMX_U32 nPortIndex;                      /**< Port to which this config applies */
1701     OMX_U32 xCornerSize;                     /**< Size of the corners as a fraction of the complete side */
1702     OMX_U32 nPrimaryFaceLineWidth;           /**< Width of the box line for the primary face in pixels */
1703     OMX_U32 nOtherFaceLineWidth;             /**< Width of the box line for other faces in pixels */
1704     OMX_U32 nFocusRegionLineWidth;           /**< Width of the box line for focus regions in pixels */
1705     OMX_YUVCOLOUR sPrimaryFaceColour;        /**< YUV colour for the primary face */
1706     OMX_YUVCOLOUR sPrimaryFaceSmileColour;   /**< YUV colour for the primary face if smiling */
1707     OMX_YUVCOLOUR sPrimaryFaceBlinkColour;   /**< YUV colour for the primary face if blinking */
1708     OMX_YUVCOLOUR sOtherFaceColour;          /**< YUV colour for the all other faces */
1709     OMX_YUVCOLOUR sOtherFaceSmileColour;     /**< YUV colour for the all other faces if smiling */
1710     OMX_YUVCOLOUR sOtherFaceBlinkColour;     /**< YUV colour for the all other faces if blinking */
1711     OMX_BOOL bShowFocusRegionsWhenIdle;      /**< Are focus regions displayed when just in viewfinder/AF idle */
1712     OMX_YUVCOLOUR sFocusRegionColour;        /**< YUV colour for focus regions */
1713     OMX_BOOL bShowAfState;                   /**< Change to the colours specified below if AF cycle has run */
1714     OMX_BOOL bShowOnlyPrimaryAfState;        /**< Only show the primary face when displaying the AF status */
1715     OMX_BOOL bCombineNonFaceRegions;         /**< Combine all regions not defined as faces into one single box covering them all */
1716     OMX_YUVCOLOUR sAfLockPrimaryFaceColour;  /**< YUV colour for the primary face */
1717     OMX_YUVCOLOUR sAfLockOtherFaceColour;    /**< YUV colour for the all other faces */
1718     OMX_YUVCOLOUR sAfLockFocusRegionColour;  /**< YUV colour for focus regions */
1719     OMX_YUVCOLOUR sAfFailPrimaryFaceColour;  /**< YUV colour for the primary face */
1720     OMX_YUVCOLOUR sAfFailOtherFaceColour;    /**< YUV colour for the all other faces */
1721     OMX_YUVCOLOUR sAfFailFocusRegionColour;  /**< YUV colour for focus regions */
1722  } OMX_CONFIG_DRAWBOXLINEPARAMS;
1723 /*
1724 Query / set the parameters for the box to be drawn around faces/focus regions.
1725 */
1726 
1727  #define OMX_PARAM_CAMERARMITYPE_RMINAME_LEN 16
1728  //OMX_IndexParamCameraRmiControl
1729  typedef struct OMX_PARAM_CAMERARMITYPE {
1730     OMX_U32 nSize;
1731     OMX_VERSIONTYPE nVersion;
1732     OMX_BOOL bEnabled;
1733     OMX_U8 sRmiName[OMX_PARAM_CAMERARMITYPE_RMINAME_LEN];
1734     OMX_U32 nInputBufferHeight;
1735     OMX_U32 nRmiBufferSize;
1736     OMX_BRCM_POOL_T *pImagePool;
1737  } OMX_PARAM_CAMERARMITYPE;
1738 
1739 /* OMX_IndexConfigBrcmSyncOutput: Forcing a write sync */
1740 typedef struct OMX_CONFIG_BRCMSYNCOUTPUTTYPE {
1741     OMX_U32 nSize;                           /**< Size of this structure, in Bytes */
1742     OMX_VERSIONTYPE nVersion;                /**< OMX specification version information */
1743 }  OMX_CONFIG_BRCMSYNCOUTPUTTYPE;
1744 /*
1745 Setting this config forces a sync of data to the filesystem.
1746 */
1747 
1748 /* OMX_IndexConfigDrmView: View information for DRM rental files */
1749 typedef struct OMX_CONFIG_DRMVIEWTYPE {
1750    OMX_U32 nSize;             /**< Size of this structure, in Bytes */
1751    OMX_VERSIONTYPE nVersion;  /**< OMX specification version information */
1752    OMX_U32 nCurrentView;      /**< Current view count */
1753    OMX_U32 nMaxView;          /**< Max. no. of view allowed */
1754 } OMX_CONFIG_DRMVIEWTYPE;
1755 /*
1756 This structure contains information about the number of available
1757 views in the selected DRM rental file, which typically have a given
1758 maximum view count.  It allows the user to explicitly agree to playing
1759 the file, which will increment the number of current views the file
1760 has had.
1761 */
1762 
1763 typedef struct OMX_PARAM_BRCMU64TYPE {
1764     OMX_U32 nSize;                    /**< Size of this structure, in Bytes */
1765     OMX_VERSIONTYPE nVersion;         /**< OMX specification version information */
1766     OMX_U32 nPortIndex;               /**< port that this structure applies to */
1767     OMX_U32 nLowPart;                 /**< low bits of the unsigned 64 bit value */
1768     OMX_U32 nHighPart;                /**< high bits of the unsigned 64 bit value */
1769 } OMX_PARAM_BRCMU64TYPE;
1770 
1771 /* OMX_IndexParamBrcmDisableEXIF: Disable generation of EXIF data */
1772 /*
1773 This parameter is used by clients to control the generation of exif
1774 data in JPEG images.
1775 */
1776 
1777 /* OMX_IndexParamBrcmThumbnail: Control generation of thumbnail */
1778 typedef struct OMX_PARAM_BRCMTHUMBNAILTYPE {
1779     OMX_U32 nSize;                    /**< Size of this structure, in Bytes */
1780     OMX_VERSIONTYPE nVersion;         /**< OMX specification version information */
1781     OMX_BOOL bEnable;                 /**< Enable generation of thumbnails during still capture */
1782     OMX_BOOL bUsePreview;             /**< Use the preview image (as is) as thumbnail */
1783     OMX_U32 nWidth;                   /**< Desired width of the thumbnail */
1784     OMX_U32 nHeight;                  /**< Desired height of the thumbnail */
1785 } OMX_PARAM_BRCMTHUMBNAILTYPE;
1786 /*
1787 This parameter is used by clients to control how thumbnails are
1788 generated when creating still images.
1789 
1790 Thumbnail generation will be turned on or off depending on the
1791 \code{bEnable} field.
1792 
1793 The \code{bUsePreview} field will let the component know whether it
1794 should use the low resolution preview image (if the component has one
1795 available) as is for the thumbnail. When this is set to true, it should
1796 make the generation of thumbnails faster (if a preview image is available)
1797 and should use less memory as well.
1798 
1799 The \code{nWidth} and \code{nHeight} fields allow the client to
1800 specify the dimensions of the thumbnail.  If both \code{nWidth} and
1801 \code{nHeight} are 0, we will calculate a sensible size for the
1802 thumbnail.
1803 */
1804 
1805 typedef struct OMX_PARAM_BRCMASPECTRATIOTYPE {
1806     OMX_U32 nSize;
1807     OMX_VERSIONTYPE nVersion;
1808     OMX_U32 nPortIndex;
1809     OMX_U32 nWidth;
1810     OMX_U32 nHeight;
1811 } OMX_PARAM_BRCMASPECTRATIOTYPE;
1812 
1813 /* OMX_IndexParamBrcmVideoDecodeErrorConcealment: Control error concealment for video decode */
1814 typedef struct OMX_PARAM_BRCMVIDEODECODEERRORCONCEALMENTTYPE {
1815    OMX_U32 nSize;
1816    OMX_VERSIONTYPE nVersion;
1817    OMX_BOOL bStartWithValidFrame; /**< Decoder will only start emitting frames from a non-corrupted frame */
1818 } OMX_PARAM_BRCMVIDEODECODEERRORCONCEALMENTTYPE;
1819 /*
1820  This parameter is used by clients to control the type of error concealment
1821  that will be done by the video decoder.
1822  */
1823 
1824 #define OMX_CONFIG_FLASHINFOTYPE_NAME_LEN 16
1825 typedef struct OMX_CONFIG_FLASHINFOTYPE
1826 {
1827    OMX_U32 nSize;
1828    OMX_VERSIONTYPE nVersion;
1829    OMX_U8 sFlashName[OMX_CONFIG_FLASHINFOTYPE_NAME_LEN];
1830    OMX_CAMERAFLASHTYPE eFlashType;
1831    OMX_U8 nDeviceId;
1832    OMX_U8 nDeviceVersion;
1833 } OMX_CONFIG_FLASHINFOTYPE;
1834 
1835 /* OMX_IndexParamBrcmInterpolateMissingTimestamps: Configure component to interpolate missing timestamps */
1836 /*
1837 Configures a component so that it tries to timestamp all the buffers it outputs.
1838 If the timestamp information is missing from the original buffer, the
1839 component will try its best to interpolate a value for the missing timestamp.
1840  */
1841 
1842 /* OMX_IndexParamBrcmSetCodecPerformanceMonitoring: Configure component to output performance statistics */
1843 /*
1844 Configures a codec component so that it outputs performance statistics to
1845 the given DECODE_PROGRESS_REPORT_T structure (passed as a pointer).
1846 This structure can then be read by the client to find out where the codec is
1847 at in its processing.
1848  */
1849 
1850 /* OMX_IndexConfigDynamicRangeExpansion: Configure image dynamic range expansion processing */
1851 typedef enum OMX_DYNAMICRANGEEXPANSIONMODETYPE {
1852    OMX_DynRangeExpOff,
1853    OMX_DynRangeExpLow,
1854    OMX_DynRangeExpMedium,
1855    OMX_DynRangeExpHigh,
1856    OMX_DynRangeExpKhronosExtensions = 0x6F000000,
1857    OMX_DynRangeExpVendorStartUnused = 0x7F000000,
1858    OMX_DynRangeExpMax = 0x7FFFFFFF
1859 } OMX_DYNAMICRANGEEXPANSIONMODETYPE;
1860 
1861 typedef struct OMX_CONFIG_DYNAMICRANGEEXPANSIONTYPE
1862 {
1863    OMX_U32 nSize;
1864    OMX_VERSIONTYPE nVersion;
1865    OMX_DYNAMICRANGEEXPANSIONMODETYPE eMode;
1866 } OMX_CONFIG_DYNAMICRANGEEXPANSIONTYPE;
1867 /*
1868 Configures the intensity of an image dynamic range expansion processing stage
1869 */
1870 
1871 /* OMX_IndexParamBrcmTransposeBufferCount: Configure the number of pre-allocated transpose buffers  */
1872 /*
1873 This config allows the client to explicitly set the number of destination buffers pre-allocated for
1874 ports that support 90/270 degree rotation (e.g. in video_render). The buffers will be pre-allocated during
1875 a state transition from LOADED to IDLE (the transition will fail if there is not enough memory available
1876 for the buffers).
1877 .
1878 */
1879 
1880 /* OMX_IndexParamBrcmThreadAffinity: Control the CPU affinity of component thread(s) */
1881 typedef enum OMX_BRCMTHREADAFFINITYTYPE {
1882    OMX_BrcmThreadAffinityCPU0,
1883    OMX_BrcmThreadAffinityCPU1,
1884    OMX_BrcmThreadAffinityMax = 0x7FFFFFFF
1885 } OMX_BRCMTHREADAFFINITYTYPE;
1886 
1887 typedef struct OMX_PARAM_BRCMTHREADAFFINITYTYPE {
1888    OMX_U32 nSize;
1889    OMX_VERSIONTYPE nVersion;
1890    OMX_BRCMTHREADAFFINITYTYPE eAffinity;  /**< Thread CPU affinity */
1891 } OMX_PARAM_BRCMTHREADAFFINITYTYPE;
1892 /*
1893  This parameter is used by clients to hint the CPU that a component thread should run on.
1894  */
1895 
1896  /* OMX_IndexConfigCommonSceneDetected: Reports the scene type detected by a scene detection algorithm. */
1897 typedef enum OMX_SCENEDETECTTYPE {
1898    OMX_SceneDetectUnknown,
1899    OMX_SceneDetectLandscape,
1900    OMX_SceneDetectPortrait,
1901    OMX_SceneDetectMacro,
1902    OMX_SceneDetectNight,
1903    OMX_SceneDetectPortraitNight,
1904    OMX_SceneDetectBacklit,
1905    OMX_SceneDetectPortraitBacklit,
1906    OMX_SceneDetectSunset,
1907    OMX_SceneDetectBeach,
1908    OMX_SceneDetectSnow,
1909    OMX_SceneDetectFireworks,
1910    OMX_SceneDetectMax = 0x7FFFFFFF
1911 } OMX_SCENEDETECTTYPE;
1912 
1913 /* OMX_IndexConfigCommonSceneDetected: Reports the scene type detected by a scene detection algorithm. */
1914 typedef struct OMX_CONFIG_SCENEDETECTTYPE {
1915    OMX_U32 nSize;
1916    OMX_VERSIONTYPE nVersion;
1917    OMX_SCENEDETECTTYPE eScene;  /**< Scene type detected */
1918 } OMX_CONFIG_SCENEDETECTTYPE;
1919 /*
1920  This config is used to report to clients the scene type that has been detected.
1921  */
1922 
1923 /* OMX_IndexParamNalStreamFormat: Control the NAL unit packaging. This is a Khronos extension. */
1924 typedef enum OMX_INDEXEXTTYPE {
1925     /* Video parameters and configurations */
1926     OMX_IndexExtVideoStartUnused = OMX_IndexKhronosExtensions + 0x00600000,
1927     OMX_IndexParamNalStreamFormatSupported,         /**< reference: OMX_NALSTREAMFORMATTYPE */
1928     OMX_IndexParamNalStreamFormat,                  /**< reference: OMX_NALSTREAMFORMATTYPE */
1929     OMX_IndexParamNalStreamFormatSelect,            /**< reference: OMX_NALSTREAMFORMATTYPE */
1930 
1931     OMX_IndexExtMax = 0x7FFFFFFF
1932 } OMX_INDEXEXTTYPE;
1933 
1934 /* OMX_IndexParamNalStreamFormat: Control the NAL unit packaging. This is a Khronos extension. */
1935 typedef enum OMX_NALUFORMATSTYPE {
1936     OMX_NaluFormatStartCodes = 1,
1937     OMX_NaluFormatOneNaluPerBuffer = 2,
1938     OMX_NaluFormatOneByteInterleaveLength = 4,
1939     OMX_NaluFormatTwoByteInterleaveLength = 8,
1940     OMX_NaluFormatFourByteInterleaveLength = 16,
1941     OMX_NaluFormatCodingMax = 0x7FFFFFFF
1942 } OMX_NALUFORMATSTYPE;
1943 
1944 /* OMX_IndexParamNalStreamFormat: Control the NAL unit packaging. This is a Khronos extension. */
1945 typedef struct OMX_NALSTREAMFORMATTYPE{
1946     OMX_U32 nSize;
1947     OMX_VERSIONTYPE nVersion;
1948     OMX_U32 nPortIndex;
1949     OMX_NALUFORMATSTYPE eNaluFormat;
1950 } OMX_NALSTREAMFORMATTYPE;
1951 /*
1952  This parameter is used to control the NAL unit packaging of an H264 video port.
1953  */
1954 
1955 /* OMX_IndexParamVideoMvc: MVC codec parameters */
1956 typedef  struct OMX_VIDEO_PARAM_AVCTYPE  OMX_VIDEO_PARAM_MVCTYPE;
1957 /*
1958 This parameter is currently identical to the AVC parameter type.
1959 */
1960 
1961  /* OMX_IndexConfigBrcmDrawStaticBox: Define static box to be drawn */
1962 typedef enum OMX_STATICBOXTYPE {
1963    OMX_StaticBoxNormal,
1964    OMX_StaticBoxPrimaryFaceAfIdle,
1965    OMX_StaticBoxNonPrimaryFaceAfIdle,
1966    OMX_StaticBoxFocusRegionAfIdle,
1967    OMX_StaticBoxPrimaryFaceAfSuccess,
1968    OMX_StaticBoxNonPrimaryFaceAfSuccess,
1969    OMX_StaticBoxFocusRegionAfSuccess,
1970    OMX_StaticBoxPrimaryFaceAfFail,
1971    OMX_StaticBoxNonPrimaryFaceAfFail,
1972    OMX_StaticBoxFocusRegionAfFail,
1973    OMX_StaticBoxMax
1974 } OMX_STATICBOXTYPE;
1975 
1976 typedef struct OMX_STATICBOX {
1977    OMX_U32 xLeft;
1978    OMX_U32 xTop;
1979    OMX_U32 xWidth;
1980    OMX_U32 xHeight;
1981    OMX_STATICBOXTYPE eType;
1982 } OMX_STATICBOX;
1983 
1984 typedef struct OMX_CONFIG_STATICBOXTYPE
1985 {
1986    OMX_U32 nSize;
1987    OMX_VERSIONTYPE nVersion;
1988    OMX_U32 nPortIndex;
1989    OMX_U32 nIndex;
1990    OMX_U32 nTotalBoxes;
1991    OMX_S32 nValidBoxes;
1992    OMX_BOOL bDrawOtherBoxes;
1993    OMX_STATICBOX sBoxes[1];
1994 } OMX_CONFIG_STATICBOXTYPE;
1995 /*
1996 Query / set the parameters for a box to always be drawn on viewfinder images
1997 The x/y/width/height values for the boxes are relative to the overall image.
1998 
1999 \code{nIndex} - first box number being set/read, allowing retrieval/setting
2000 of many boxes over several requests.
2001 
2002 \code{nValidBoxes} - total number of boxes currently defined.
2003 
2004 \code{nValidBoxes} - number of valid boxes in the \code{sBoxes} array.
2005 When getting, the client sets this to the number of boxes available.
2006 The component writes box data and updates this field with how many
2007 boxes have been written to.
2008 When setting, this is the number of boxes defined with this structure
2009 
2010 \code{sBoxes} - variable length array of static boxes.
2011 */
2012 
2013 /* OMX_IndexConfigPortCapturing: Per-port capturing state */
2014 typedef struct OMX_CONFIG_PORTBOOLEANTYPE{
2015     OMX_U32 nSize;
2016     OMX_VERSIONTYPE nVersion;
2017     OMX_U32 nPortIndex;
2018     OMX_BOOL bEnabled;
2019 } OMX_CONFIG_PORTBOOLEANTYPE;
2020 /*
2021 This is proposed in IL533f for controlling
2022 which ports of a multi-port camera component are capturing frames.
2023 */
2024 
2025 /* OMX_IndexConfigCaptureMode: Capturing mode type */
2026 typedef enum OMX_CAMERACAPTUREMODETYPE {
2027    OMX_CameraCaptureModeWaitForCaptureEnd,
2028    OMX_CameraCaptureModeWaitForCaptureEndAndUsePreviousInputImage,
2029    OMX_CameraCaptureModeResumeViewfinderImmediately,
2030    OMX_CameraCaptureModeMax,
2031 } OMX_CAMERACAPTUREMODETYPE;
2032 
2033 typedef struct OMX_PARAM_CAMERACAPTUREMODETYPE{
2034     OMX_U32 nSize;
2035     OMX_VERSIONTYPE nVersion;
2036     OMX_U32 nPortIndex;
2037     OMX_CAMERACAPTUREMODETYPE eMode;
2038 } OMX_PARAM_CAMERACAPTUREMODETYPE;
2039 /*
2040 This controls the mode of operation for
2041 still image capture in the camera component.
2042 */
2043 
2044 /* OMX_IndexParamBrcmDrmEncryption: Set DRM encryption scheme */
2045 typedef enum OMX_BRCMDRMENCRYPTIONTYPE
2046 {
2047    OMX_DrmEncryptionNone = 0,
2048    OMX_DrmEncryptionHdcp2,
2049    OMX_DrmEncryptionKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
2050    OMX_DrmEncryptionVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
2051    OMX_DrmEncryptionRangeMax = 0x7FFFFFFF
2052 } OMX_BRCMDRMENCRYPTIONTYPE;
2053 
2054 typedef struct OMX_PARAM_BRCMDRMENCRYPTIONTYPE
2055 {
2056    OMX_U32 nSize;
2057    OMX_VERSIONTYPE nVersion;
2058    OMX_U32 nPortIndex;
2059    OMX_BRCMDRMENCRYPTIONTYPE eEncryption;
2060    OMX_U32 nConfigDataLen;
2061    OMX_U8 configData[1];
2062 } OMX_PARAM_BRCMDRMENCRYPTIONTYPE;
2063 /*
2064 Query/set the DRM encryption scheme used by a port writing out data.
2065 */
2066 
2067 /* OMX_IndexConfigBufferStall: Advertise buffer stall state */
2068 typedef struct OMX_CONFIG_BUFFERSTALLTYPE
2069 {
2070    OMX_U32 nSize;
2071    OMX_VERSIONTYPE nVersion;
2072    OMX_U32 nPortIndex;
2073    OMX_BOOL bStalled;      /**< Whether we are stalled */
2074    OMX_U32 nDelay;         /**< Delay in real time (us) from last buffer to current time */
2075 } OMX_CONFIG_BUFFERSTALLTYPE;
2076 /*
2077 Query/set the buffer stall threashold.  When set the \code{nDelay}
2078 parameter specifies a time to class whether buffer output is stalled.
2079 When get, the \code{nDelay} parameter indicates the current buffer
2080 delay, and the {bStalled} parameter indicates whether this time is
2081 over a previously set threashold.  When
2082 \code{OMX_IndexConfigRequestCallback} is used with this index, a
2083 notification is given when \code{bStalled} changes.
2084 */
2085 
2086 /* OMX_IndexConfigLatencyTarget: Maintain target latency by adjusting clock speed */
2087 typedef struct OMX_CONFIG_LATENCYTARGETTYPE
2088 {
2089    OMX_U32 nSize;
2090    OMX_VERSIONTYPE nVersion;
2091    OMX_U32 nPortIndex;
2092    OMX_BOOL bEnabled; /**< whether this mode is enabled */
2093    OMX_U32 nFilter; /**< number of latency samples to filter on, good value: 1 */
2094    OMX_U32 nTarget; /**< target latency, us */
2095    OMX_U32 nShift;  /**< shift for storing latency values, good value: 7 */
2096    OMX_S32 nSpeedFactor; /**< multiplier for speed changes, in 24.8 format, good value: 256-512 */
2097    OMX_S32 nInterFactor; /**< divider for comparing latency versus gradiant, good value: 300 */
2098    OMX_S32 nAdjCap; /**< limit for speed change before nSpeedFactor is applied, good value: 100 */
2099 } OMX_CONFIG_LATENCYTARGETTYPE;
2100 /*
2101 Query/set parameters used when adjusting clock speed to match the
2102 measured latency to a specified value.
2103 */
2104 
2105 /* OMX_IndexConfigBrcmUseProprietaryCallback: Force use of proprietary callback */
2106 typedef struct OMX_CONFIG_BRCMUSEPROPRIETARYCALLBACKTYPE
2107 {
2108    OMX_U32 nSize;
2109    OMX_VERSIONTYPE nVersion;
2110    OMX_U32 nPortIndex;
2111    OMX_BOOL bEnable;
2112 } OMX_CONFIG_BRCMUSEPROPRIETARYCALLBACKTYPE;
2113 /*
2114 Disable/enable the use of proprietary callbacks rather than OpenMAX IL buffer handling.
2115 */
2116 
2117 /* OMX_IndexParamCommonUseStcTimestamps: Select timestamp mode */
2118 typedef enum OMX_TIMESTAMPMODETYPE
2119 {
2120    OMX_TimestampModeZero = 0,       /**< Use a timestamp of 0 */
2121    OMX_TimestampModeRawStc,         /**< Use the raw STC as the timestamp */
2122    OMX_TimestampModeResetStc,       /**< Store the STC when video capture port goes active, and subtract that from STC for the timestamp */
2123    OMX_TimestampModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
2124    OMX_TimestampModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
2125    OMX_TimestampModeMax = 0x7FFFFFFF
2126 } OMX_TIMESTAMPMODETYPE;
2127 
2128 typedef struct OMX_PARAM_TIMESTAMPMODETYPE
2129 {
2130    OMX_U32 nSize;
2131    OMX_VERSIONTYPE nVersion;
2132    OMX_TIMESTAMPMODETYPE eTimestampMode;
2133 } OMX_PARAM_TIMESTAMPMODETYPE;
2134 /*
2135  Specifies what to use as timestamps in the absence of a clock component.
2136 */
2137 
2138 /* EGL image buffer for passing to video port.
2139  * Used when port color format is OMX_COLOR_FormatBRCMEGL.
2140  */
2141 typedef struct OMX_BRCMVEGLIMAGETYPE
2142 {
2143    /* Passed between ARM + VC; use fixed width types. */
2144    OMX_U32 nWidth;
2145    OMX_U32 nHeight;
2146    OMX_U32 nStride;
2147    OMX_U32 nUmemHandle;
2148    OMX_U32 nUmemOffset;
2149    OMX_U32 nFlipped;    /* Non-zero -> vertically flipped image */
2150 } OMX_BRCMVEGLIMAGETYPE;
2151 
2152 /* Provides field of view
2153  */
2154 typedef struct OMX_CONFIG_BRCMFOVTYPE
2155 {
2156    OMX_U32 nSize;
2157    OMX_VERSIONTYPE nVersion;
2158    OMX_U32 nPortIndex;
2159    OMX_U32 xFieldOfViewHorizontal;  /**< Horizontal field of view in degrees. 16p16 value */
2160    OMX_U32 xFieldOfViewVertical;    /**< Vertical field of view in degrees. 16p16 value */
2161 } OMX_CONFIG_BRCMFOVTYPE;
2162 
2163 /* OMX_IndexConfigBrcmDecoderPassThrough: Enabling Audio Passthrough */
2164 /*
2165 This allows an audio decoder to disable decoding the stream and pass through correctly framed
2166 data to enable playback of compressed audio to supported output devices.
2167 */
2168 
2169 /* OMX_IndexConfigBrcmClockReferenceSource: Select Clock Reference Source */
2170 /*
2171 This control allows communicating directly to an audio renderer component whether it should
2172 act as a clock reference source or act as a slave.
2173 */
2174 
2175 /* OMX_IndexConfigEncLevelExtension: AVC Override encode capabilities */
2176 typedef struct OMX_VIDEO_CONFIG_LEVEL_EXTEND {
2177    OMX_U32 nSize;
2178    OMX_VERSIONTYPE nVersion;
2179    OMX_U32 nPortIndex;
2180    OMX_U32 nCustomMaxMBPS;     /**< Specifies maximum macro-blocks per second */
2181    OMX_U32 nCustomMaxFS;       /**< Specifies maximum frame size (macro-blocks per frame) */
2182    OMX_U32 nCustomMaxBRandCPB; /**< Specifies maximum bitrate in units of 1000 bits/s and Codec Picture Buffer (CPB derived from bitrate) */
2183 } OMX_VIDEO_CONFIG_LEVEL_EXTEND;
2184 /*
2185 This allows finer control of the H264 encode internal parameters.
2186 */
2187 
2188 /* OMX_IndexParamBrcmEEDEEnable: Enable/Disable end to end distortion estimator */
2189 typedef struct OMX_VIDEO_EEDE_ENABLE {
2190     OMX_U32 nSize;
2191     OMX_VERSIONTYPE nVersion;
2192     OMX_U32 nPortIndex;
2193     OMX_U32 enable;
2194 } OMX_VIDEO_EEDE_ENABLE;
2195 /*
2196 This enables or disables the use of end to end distortion estimation.
2197 */
2198 
2199 /* OMX_IndexParamBrcmEEDELossRate: Loss rate configuration for end to end distortion */
2200 typedef struct OMX_VIDEO_EEDE_LOSSRATE {
2201     OMX_U32 nSize;
2202     OMX_VERSIONTYPE nVersion;
2203     OMX_U32 nPortIndex;
2204    OMX_U32 loss_rate; /**< loss rate, 5 means 5% */
2205 } OMX_VIDEO_EEDE_LOSSRATE;
2206 /*
2207 Set the packet loss rate used by the end to end distortion estimator.
2208 */
2209 
2210 /* OMX_IndexParamColorSpace: Colour space information */
2211 typedef enum OMX_COLORSPACETYPE
2212 {
2213    OMX_COLORSPACE_UNKNOWN,
2214    OMX_COLORSPACE_JPEG_JFIF,
2215    OMX_COLORSPACE_ITU_R_BT601,
2216    OMX_COLORSPACE_ITU_R_BT709,
2217    OMX_COLORSPACE_FCC,
2218    OMX_COLORSPACE_SMPTE240M,
2219    OMX_COLORSPACE_BT470_2_M,
2220    OMX_COLORSPACE_BT470_2_BG,
2221    OMX_COLORSPACE_JFIF_Y16_255,
2222    OMX_COLORSPACE_MAX = 0x7FFFFFFF
2223 } OMX_COLORSPACETYPE;
2224 
2225 typedef struct OMX_PARAM_COLORSPACETYPE
2226 {
2227    OMX_U32 nSize;
2228    OMX_VERSIONTYPE nVersion;
2229    OMX_U32 nPortIndex;
2230    OMX_COLORSPACETYPE eColorSpace;
2231 } OMX_PARAM_COLORSPACETYPE;
2232 /*
2233 Sets the colourspace with which pixel buffers should be generated / interpreted.
2234 */
2235 
2236 typedef enum OMX_CAPTURESTATETYPE
2237 {
2238    OMX_NotCapturing,
2239    OMX_CaptureStarted,
2240    OMX_CaptureComplete,
2241    OMX_CaptureMax = 0x7FFFFFFF
2242 } OMX_CAPTURESTATETYPE;
2243 
2244 typedef struct OMX_PARAM_CAPTURESTATETYPE
2245 {
2246    OMX_U32 nSize;
2247    OMX_VERSIONTYPE nVersion;
2248    OMX_U32 nPortIndex;
2249    OMX_CAPTURESTATETYPE eCaptureState;
2250 } OMX_PARAM_CAPTURESTATETYPE;
2251 
2252 /*
2253 Provides information on the colour space that's in use during image/video processing.
2254 */
2255 
2256 /* OMX_IndexConfigMinimiseFragmentation: Minimising Fragmentation */
2257 /*
2258 This control can be supported to enable the client to request that the component works
2259 to minimise fragmentation of output buffers.
2260 */
2261 
2262 /* OMX_IndexConfigBrcmBufferFlagFilter: Filter buffers based on flags */
2263 /*
2264 This control can be set to request that buffers are conditionally forwarded on
2265 output ports based on matching flags set on that buffer.
2266 */
2267 
2268 /* OMX_IndexParamPortMaxFrameSize: Specifying maximum frame size */
2269 /*
2270 This control can be used to control the maximum frame size allowed on an output port.
2271 */
2272 
2273 /* OMX_IndexConfigBrcmCameraRnDPreprocess: Enable use of development ISP software stage */
2274 /*
2275 This control can be used to enable a developmental software stage to be inserted into
2276 the preprocessor stage of the ISP.
2277 */
2278 
2279 /* OMX_IndexConfigBrcmCameraRnDPostprocess: Enable use of development ISP software stage */
2280 /*
2281 This control can be used to enable a developmental software stage to be inserted into
2282 the postprocessor stage of the ISP.
2283 */
2284 
2285 /* OMX_IndexParamDisableVllPool: Controlling use of memory for loadable modules */
2286 /*
2287 This control can be used to control whether loadable modules used a dedicated memory
2288 pool or use heap allocated memory.
2289 */
2290 
2291 /* OMX_IndexParamBrcmVideoPrecodeForQP: Pre-code 1st frame for QP.*/
2292 /*
2293 This control selects a pre-encode of the first frame to set up a better initial QP value.
2294 */
2295 
2296 /* OMX_IndexParamBrcmVideoTimestampFifo: Video timestamp FIFO mode. */
2297 /*
2298 When enabled, the timestamp fifo mode will change the way
2299 incoming timestamps are associated with output images so the incoming timestamps
2300 get used without re-ordering on output images.
2301 */
2302 
2303 /* OMX_IndexParamCameraCustomSensorConfig: Custom camera sensor configuration. */
2304 /*
2305 This parameter is passed down to the camera sensor driver to be interpreted as a
2306 request for a different configuration to normal. How the configuration varies is
2307 sensor specific.
2308 */
2309 
2310 /* OMX_IndexParamCameraDeviceNumber: Camera device selection .*/
2311 /*
2312 Controls which camera driver, or camera peripheral, to use.
2313 */
2314 
2315 /* OMX_IndexParamBrcmMaxNumCallbacks: Codec callback limit. */
2316 /*
2317 The codec can queue up a significant number of frames internally if the sink is
2318 not consuming the output fast enough. This control limits the number of frames
2319 that can be queued up.
2320 */
2321 
2322 typedef struct OMX_PARAM_BRCMCONFIGFILETYPE {
2323    OMX_U32 nSize;                      /**< size of the structure in bytes, including
2324                                             actual URI name */
2325    OMX_VERSIONTYPE nVersion;           /**< OMX specification version information */
2326    OMX_U32 fileSize;                   /**< Size of complete file data */
2327 } OMX_PARAM_BRCMCONFIGFILETYPE;
2328 
2329 typedef struct OMX_PARAM_BRCMCONFIGFILECHUNKTYPE {
2330    OMX_U32 nSize;                      /**< size of the structure in bytes, including
2331                                             actual chunk data */
2332    OMX_VERSIONTYPE nVersion;           /**< OMX specification version information */
2333    OMX_U32 size;                       /**< Number of bytes being transferred in this chunk */
2334    OMX_U32 offset;                     /**< Offset of this chunk in the file */
2335    OMX_U8 data[1];                     /**< Chunk data */
2336 } OMX_PARAM_BRCMCONFIGFILECHUNKTYPE;
2337 
2338 typedef struct OMX_PARAM_BRCMFRAMERATERANGETYPE {
2339    OMX_U32 nSize;                      /**< size of the structure in bytes, including
2340                                             actual chunk data */
2341    OMX_VERSIONTYPE nVersion;           /**< OMX specification version information */
2342    OMX_U32 nPortIndex;
2343    OMX_U32 xFramerateLow;              /**< Low end of framerate range. Q16 format */
2344    OMX_U32 xFramerateHigh;             /**< High end of framerate range. Q16 format */
2345 } OMX_PARAM_BRCMFRAMERATERANGETYPE;
2346 
2347 typedef struct OMX_PARAM_S32TYPE {
2348     OMX_U32 nSize;                    /**< Size of this structure, in Bytes */
2349     OMX_VERSIONTYPE nVersion;         /**< OMX specification version information */
2350     OMX_U32 nPortIndex;               /**< port that this structure applies to */
2351     OMX_S32 nS32;                     /**< S32 value */
2352 } OMX_PARAM_S32TYPE;
2353 
2354 typedef struct OMX_PARAM_BRCMVIDEODRMPROTECTBUFFERTYPE
2355 {
2356    OMX_U32 nSize;
2357    OMX_VERSIONTYPE nVersion;
2358 
2359    OMX_U32 size_wanted;     /**< Input. Zero size means internal video decoder buffer,
2360                                  mem_handle and phys_addr not returned in this case */
2361    OMX_U32 protect;         /**< Input. 1 = protect, 0 = unprotect */
2362 
2363    OMX_U32 mem_handle;      /**< Output. Handle for protected buffer */
2364    OMX_PTR phys_addr;       /**< Output. Physical memory address of protected buffer */
2365 } OMX_PARAM_BRCMVIDEODRMPROTECTBUFFERTYPE;
2366 
2367 typedef struct OMX_CONFIG_ZEROSHUTTERLAGTYPE
2368 {
2369    OMX_U32 nSize;
2370    OMX_VERSIONTYPE nVersion;
2371 
2372    OMX_U32 bZeroShutterMode;        /**< Select ZSL mode from the camera. */
2373    OMX_U32 bConcurrentCapture;      /**< Perform concurrent captures for full ZSL. */
2374 
2375 } OMX_CONFIG_ZEROSHUTTERLAGTYPE;
2376 
2377 /* OMX_IndexParamBrcmVideoDecodeConfigVD3: VDec3 configuration. */
2378 typedef struct OMX_PARAM_BRCMVIDEODECODECONFIGVD3TYPE {
2379    OMX_U32 nSize;                      /**< size of the structure in bytes, including
2380                                             configuration data */
2381    OMX_VERSIONTYPE nVersion;           /**< OMX specification version information */
2382    OMX_U8 config[1];                   /**< Configuration data (a VD3_CONFIGURE_T) */
2383 } OMX_PARAM_BRCMVIDEODECODECONFIGVD3TYPE;
2384 /*
2385 Codec specific configuration block to set up internal state in a non-standard manner.
2386 */
2387 
2388 /* OMX_IndexConfigCustomAwbGains: Manual AWB Gains. */
2389 typedef struct OMX_CONFIG_CUSTOMAWBGAINSTYPE {
2390    OMX_U32 nSize;                      /**< size of the structure in bytes, including
2391                                             configuration data */
2392    OMX_VERSIONTYPE nVersion;           /**< OMX specification version information */
2393    OMX_U32 xGainR;                     /**< Red gain - 16p16 */
2394    OMX_U32 xGainB;                     /**< Blue gain - 16p16 */
2395 } OMX_CONFIG_CUSTOMAWBGAINSTYPE;
2396 
2397 /* OMX_IndexConfigCustomAwbGains: Manual AWB Gains. */
2398 
2399 /* OMX_IndexConfigBrcmRenderStats: Render port statistics */
2400 typedef struct OMX_CONFIG_BRCMRENDERSTATSTYPE {
2401    OMX_U32 nSize;
2402    OMX_VERSIONTYPE nVersion;
2403    OMX_U32 nPortIndex;
2404    OMX_BOOL nValid;
2405    OMX_U32 nMatch;
2406    OMX_U32 nPeriod;
2407    OMX_U32 nPhase;
2408    OMX_U32 nPixelClockNominal;
2409    OMX_U32 nPixelClock;
2410    OMX_U32 nHvsStatus;
2411    OMX_U32 dummy0[2];
2412 } OMX_CONFIG_BRCMRENDERSTATSTYPE;
2413 /*
2414 This provides statistics from the renderer to allow more accurate synchronisation
2415 between the scheduler and display VSYNC.
2416 */
2417 
2418 typedef enum OMX_BRCMANNOTATEJUSTIFYTYPE {
2419    OMX_ANNOTATE_CENTRE = 0,
2420    OMX_ANNOTATE_LEFT = 1,
2421    OMX_ANNOTATE_RIGHT = 2,
2422    OMX_ANNOTATE_MAX = 0x7FFFFFFF,
2423 } OMX_BRCMANNOTATEJUSTIFYTYPE;
2424 
2425 #define OMX_BRCM_MAXANNOTATETEXTLEN 256
2426 typedef struct OMX_CONFIG_BRCMANNOTATETYPE {
2427    OMX_U32 nSize;
2428    OMX_VERSIONTYPE nVersion;
2429    OMX_BOOL bEnable;
2430    OMX_BOOL bShowShutter;
2431    OMX_BOOL bShowAnalogGain;
2432    OMX_BOOL bShowLens;
2433    OMX_BOOL bShowCaf;
2434    OMX_BOOL bShowMotion;
2435    OMX_BOOL bShowFrameNum;
2436    OMX_BOOL bEnableBackground;
2437    OMX_BOOL bCustomBackgroundColour;
2438    OMX_U8 nBackgroundY;
2439    OMX_U8 nBackgroundU;
2440    OMX_U8 nBackgroundV;
2441    OMX_U8 dummy1;
2442    OMX_BOOL bCustomTextColour;
2443    OMX_U8 nTextY;
2444    OMX_U8 nTextU;
2445    OMX_U8 nTextV;
2446    OMX_U8 nTextSize;   /**< Text size: 6-150 pixels */
2447    OMX_U8 sText[OMX_BRCM_MAXANNOTATETEXTLEN];
2448    OMX_BRCMANNOTATEJUSTIFYTYPE eJustify;
2449    OMX_U32 nXOffset;
2450    OMX_U32 nYOffset;
2451 } OMX_CONFIG_BRCMANNOTATETYPE;
2452 
2453 /* OMX_IndexParamBrcmStereoscopicMode: Stereoscopic camera support */
2454 typedef enum OMX_BRCMSTEREOSCOPICMODETYPE {
2455    OMX_STEREOSCOPIC_NONE = 0,
2456    OMX_STEREOSCOPIC_SIDEBYSIDE = 1,
2457    OMX_STEREOSCOPIC_TOPBOTTOM = 2,
2458    OMX_STEREOSCOPIC_MAX = 0x7FFFFFFF,
2459 } OMX_BRCMSTEREOSCOPICMODETYPE;
2460 
2461 typedef struct OMX_CONFIG_BRCMSTEREOSCOPICMODETYPE {
2462    OMX_U32 nSize;
2463    OMX_VERSIONTYPE nVersion;
2464 
2465    OMX_U32 nPortIndex;                    /**< port that this structure applies to */
2466    OMX_BRCMSTEREOSCOPICMODETYPE eMode;    /**< Packing mode */
2467    OMX_BOOL bDecimate;                    /**< Half/half mode
2468                                           (pixel aspect ratio = 1:2 or 2:1 if set. 1:1 if not set) */
2469    OMX_BOOL bSwapEyes;                    /**< False = left eye first. True = right eye first. */
2470 } OMX_CONFIG_BRCMSTEREOSCOPICMODETYPE;
2471 /*
2472 This control sets up how stereoscopic images should be generated.
2473 */
2474 
2475 /* OMX_IndexParamCameraInterface: Camera interface type. */
2476 typedef enum OMX_CAMERAINTERFACETYPE {
2477    OMX_CAMERAINTERFACE_CSI = 0,
2478    OMX_CAMERAINTERFACE_CCP2 = 1,
2479    OMX_CAMERAINTERFACE_CPI = 2,
2480    OMX_CAMERAINTERFACE_MAX = 0x7FFFFFFF,
2481 } OMX_CAMERAINTERFACETYPE;
2482 
2483 typedef struct OMX_PARAM_CAMERAINTERFACETYPE {
2484    OMX_U32 nSize;
2485    OMX_VERSIONTYPE nVersion;
2486 
2487    OMX_U32 nPortIndex;                    /**< port that this structure applies to */
2488    OMX_CAMERAINTERFACETYPE eMode;         /**< Interface mode */
2489 } OMX_PARAM_CAMERAINTERFACETYPE;
2490 /*
2491 This configures the physical camera interface type.
2492 */
2493 
2494 typedef enum OMX_CAMERACLOCKINGMODETYPE {
2495    OMX_CAMERACLOCKINGMODE_STROBE = 0,
2496    OMX_CAMERACLOCKINGMODE_CLOCK = 1,
2497    OMX_CAMERACLOCKINGMODE_MAX = 0x7FFFFFFF,
2498 } OMX_CAMERACLOCKINGMODETYPE;
2499 
2500 typedef struct OMX_PARAM_CAMERACLOCKINGMODETYPE {
2501    OMX_U32 nSize;
2502    OMX_VERSIONTYPE nVersion;
2503 
2504    OMX_U32 nPortIndex;                    /**< port that this structure applies to */
2505    OMX_CAMERACLOCKINGMODETYPE eMode;      /**< Clocking mode */
2506 } OMX_PARAM_CAMERACLOCKINGMODETYPE;
2507 
2508 /* OMX_IndexParamCameraRxConfig: Camera receiver configuration */
2509 typedef enum OMX_CAMERARXDECODETYPE {
2510    OMX_CAMERARXDECODE_NONE = 0,
2511    OMX_CAMERARXDECODE_DPCM8TO10 = 1,
2512    OMX_CAMERARXDECODE_DPCM7TO10 = 2,
2513    OMX_CAMERARXDECODE_DPCM6TO10 = 3,
2514    OMX_CAMERARXDECODE_DPCM8TO12 = 4,
2515    OMX_CAMERARXDECODE_DPCM7TO12 = 5,
2516    OMX_CAMERARXDECODE_DPCM6TO12 = 6,
2517    OMX_CAMERARXDECODE_DPCM10TO14 = 7,
2518    OMX_CAMERARXDECODE_DPCM8TO14 = 8,
2519    OMX_CAMERARXDECODE_DPCM12TO16 = 9,
2520    OMX_CAMERARXDECODE_DPCM10TO16 = 10,
2521    OMX_CAMERARXDECODE_DPCM8TO16 = 11,
2522    OMX_CAMERARXDECODE_MAX = 0x7FFFFFFF
2523 } OMX_CAMERARXDECODETYPE;
2524 
2525 typedef enum OMX_CAMERARXENCODETYPE {
2526    OMX_CAMERARXENCODE_NONE = 0,
2527    OMX_CAMERARXENCODE_DPCM10TO8 = 1,
2528    OMX_CAMERARXENCODE_DPCM12TO8 = 2,
2529    OMX_CAMERARXENCODE_DPCM14TO8 = 3,
2530    OMX_CAMERARXENCODE_MAX = 0x7FFFFFFF
2531 } OMX_CAMERARXENCODETYPE;
2532 
2533 typedef enum OMX_CAMERARXUNPACKTYPE {
2534    OMX_CAMERARXUNPACK_NONE = 0,
2535    OMX_CAMERARXUNPACK_6 = 1,
2536    OMX_CAMERARXUNPACK_7 = 2,
2537    OMX_CAMERARXUNPACK_8 = 3,
2538    OMX_CAMERARXUNPACK_10 = 4,
2539    OMX_CAMERARXUNPACK_12 = 5,
2540    OMX_CAMERARXUNPACK_14 = 6,
2541    OMX_CAMERARXUNPACK_16 = 7,
2542    OMX_CAMERARXUNPACK_MAX = 0x7FFFFFFF
2543 } OMX_CAMERARXUNPACKYPE;
2544 
2545 typedef enum OMX_CAMERARXPACKTYPE {
2546    OMX_CAMERARXPACK_NONE = 0,
2547    OMX_CAMERARXPACK_8 = 1,
2548    OMX_CAMERARXPACK_10 = 2,
2549    OMX_CAMERARXPACK_12 = 3,
2550    OMX_CAMERARXPACK_14 = 4,
2551    OMX_CAMERARXPACK_16 = 5,
2552    OMX_CAMERARXPACK_RAW10 = 6,
2553    OMX_CAMERARXPACK_RAW12 = 7,
2554    OMX_CAMERARXPACK_MAX = 0x7FFFFFFF
2555 } OMX_CAMERARXPACKTYPE;
2556 
2557 typedef struct OMX_PARAM_CAMERARXCONFIG_TYPE {
2558    OMX_U32 nSize;
2559    OMX_VERSIONTYPE nVersion;
2560 
2561    OMX_U32 nPortIndex;                    /**< port that this structure applies to */
2562    OMX_CAMERARXDECODETYPE eDecode;
2563    OMX_CAMERARXENCODETYPE eEncode;
2564    OMX_CAMERARXUNPACKYPE eUnpack;
2565    OMX_CAMERARXPACKTYPE ePack;
2566    OMX_U32 nDataLanes;
2567    OMX_U32 nEncodeBlockLength;
2568    OMX_U32 nEmbeddedDataLines;
2569    OMX_U32 nImageId;
2570 } OMX_PARAM_CAMERARXCONFIG_TYPE;
2571 /*
2572 Configures the setup and processing options of the camera receiver peripheral.
2573 */
2574 
2575 typedef struct OMX_PARAM_CAMERARXTIMING_TYPE {
2576    OMX_U32 nSize;
2577    OMX_VERSIONTYPE nVersion;
2578 
2579    OMX_U32 nPortIndex;                    /**< port that this structure applies to */
2580    OMX_U32 nTiming1;
2581    OMX_U32 nTiming2;
2582    OMX_U32 nTiming3;
2583    OMX_U32 nTiming4;
2584    OMX_U32 nTiming5;
2585    OMX_U32 nTerm1;
2586    OMX_U32 nTerm2;
2587    OMX_U32 nCpiTiming1;
2588    OMX_U32 nCpiTiming2;
2589 } OMX_PARAM_CAMERARXTIMING_TYPE;
2590 
2591 /* OMX_IndexParamBrcmBayerOrder: Bayer order */
2592 typedef enum OMX_BAYERORDERTYPE {
2593    OMX_BayerOrderRGGB = 0,
2594    OMX_BayerOrderGBRG = 1,
2595    OMX_BayerOrderBGGR = 2,
2596    OMX_BayerOrderGRBG = 3,
2597 
2598    OMX_BayerOrderMax = 0x7FFFFFFF
2599 } OMX_BAYERORDERTYPE;
2600 
2601 typedef struct OMX_PARAM_BAYERORDERTYPE {
2602    OMX_U32 nSize;
2603    OMX_VERSIONTYPE nVersion;
2604 
2605    OMX_U32 nPortIndex;                    /**< port that this structure applies to */
2606    OMX_BAYERORDERTYPE eBayerOrder;
2607 } OMX_PARAM_BAYERORDERTYPE;
2608 /*
2609 The IL standard does not support a way to specify the Bayer order of Bayer images.
2610 This control adds that missing functionality.
2611 */
2612 
2613 /* OMX_IndexParamBrcmLensShadingOverride: Override or set a lens shading table.*/
2614 /*
2615 Allows the lens shading grid to be set.
2616 Configuration is based on a similar system to the OMAP3 ISP.
2617 A grid of gains is required for each of the 4 Bayer channels, with each value covering
2618 a nGridCellSize square of pixels.
2619 nWidth and nHeight should be equal or greater than the sensor resolution. In the
2620 case of the camera component, the firmware will crop the table based on the preconfigured
2621 mode set. nStride allows additional horizontal padding to be including in the table.
2622 nMemHandleTable needs to be set to a MEM_HANDLE_T, allocated via VC-SM or similar allocator.
2623 nRefTransform should be set to the transform in force when the reference table was
2624 captured. This allows correct compensation when the sensor is subsequently used with
2625 an alternate transform.
2626 */
2627 typedef struct OMX_PARAM_LENSSHADINGOVERRIDETYPE {
2628    OMX_U32 nSize;
2629    OMX_VERSIONTYPE nVersion;
2630 
2631    OMX_BOOL bEnabled;                     /**< Enable the override grid */
2632    OMX_U32 nGridCellSize;                 /**< size of each grid element. Assumes square grid */
2633    OMX_U32 nWidth;                        /**< grid width */
2634    OMX_U32 nStride;                       /**< grid stride (allows for padding) */
2635    OMX_U32 nHeight;                       /**< grid height */
2636    OMX_U32 nMemHandleTable;               /**< Handle for grid */
2637    OMX_U32 nRefTransform;                 /**< Reference transform taken from raw header */
2638 } OMX_PARAM_LENSSHADINGOVERRIDETYPE;
2639 
2640 /* OMX_IndexConfigBrcmPowerMonitor: Deprecated.*/
2641 /*
2642 Deprecated. Do not use.
2643 */
2644 
2645 /* OMX_IndexParamBrcmZeroCopy: Deprecated */
2646 /*
2647 Deprecated. Do not use.
2648 */
2649 
2650 /* OMX_IndexParamBrcmSupportsSlices: Sliced processing support */
2651 /*
2652 Mainly used by the MMAL framework.
2653 Some components support an nSliceHeight value of 16, to allow images
2654 to be passed in multiple chunks. All will support an nSliceHeight >=
2655 nFrameHeight (with some extra constraints).
2656 If a component supports nSliceHeight of 16, then it will respond to
2657 OMX_GetParameter on this index with no error and bEnabled set to OMX_TRUE.
2658 */
2659 
2660 /* OMX_IndexParamBrcmSupportsUnalignedSliceheight: Unaligned nSliceHeight support */
2661 /*
2662 Most components require an nSliceHeight value which is a multiple of 16, but
2663 some components accepting any value >= nFrameHeight. Those ports/components will
2664 respond to OMX_GetParameter on this index with no error and bEnabled set to OMX_TRUE.
2665 */
2666 
2667 typedef struct OMX_CCMTYPE {
2668    OMX_S32 sCcm[3][3];
2669    OMX_S32 soffsets[3];
2670 } OMX_PARAM_CCMTYPE;
2671 
2672 typedef struct OMX_PARAM_CUSTOMCCMTYPE {
2673    OMX_U32 nSize;
2674    OMX_VERSIONTYPE nVersion;
2675    OMX_U32 nPortIndex;
2676 
2677    OMX_BOOL bEnabled;          /**< Enable the custom CCM. */
2678    OMX_S32 xColorMatrix[3][3]; /**< Stored in signed Q16 format */
2679    OMX_S32 nColorOffset[3];    /**< CCM offsets */
2680 } OMX_PARAM_CUSTOMCCMTYPE;
2681 
2682 /* OMX_IndexConfigCameraDigitalGain: Manual digital gain. */
2683 /*
2684 Configures the digital gain within the ISP pipeline.
2685 */
2686 typedef struct OMX_CONFIG_CAMERAGAINTYPE {
2687    OMX_U32 nSize;
2688    OMX_VERSIONTYPE nVersion;
2689    OMX_U32 nPortIndex;
2690 
2691    OMX_U32 xGain;             /**< Gain to be applied, stored as Q16 format */
2692    OMX_BOOL bAutoGain;        /**< Whether gain is set automatically */
2693 } OMX_CONFIG_CAMERAGAINTYPE;
2694 
2695 /* OMX_IndexParamMinimumAlignment: Query component alignment requirements. */
2696 /*
2697 Allows the component to be queried for the minimum alignment (in bytes) required
2698 on a port for a given color format.
2699 Used by the MMAL framework to allow a reduction in the padding.
2700 */
2701 
2702 typedef struct OMX_PARAM_MINALIGNTYPE {
2703    OMX_U32 nSize;
2704    OMX_VERSIONTYPE nVersion;
2705    OMX_U32 nPortIndex;
2706 
2707    OMX_COLOR_FORMATTYPE eColorFormat;  /**< Format being queried */
2708    OMX_U32 nMinHorizontalAlign;  /**< Minimum horizontal alignment required in bytes */
2709    OMX_U32 nMinVerticalAlign;    /**< Minimum vertical alignment required in bytes */
2710 } OMX_PARAM_MINALIGNTYPE;
2711 
2712 /* OMX_IndexParamRemoveImagePadding: Query component padding requirements */
2713 /*
2714 Queries whether the component can remove all padding from images, or can
2715 accept images with no padding.
2716 Used by the MMAL framework predominantly.
2717 Superceded by OMX_IndexParamMinimumAlignment.
2718 */
2719 
2720 #endif
2721 /* File EOF */
2722