• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 /**
19  * Copyright (c) 2008 The Khronos Group Inc.
20  *
21  * Permission is hereby granted, free of charge, to any person obtaining
22  * a copy of this software and associated documentation files (the
23  * "Software"), to deal in the Software without restriction, including
24  * without limitation the rights to use, copy, modify, merge, publish,
25  * distribute, sublicense, and/or sell copies of the Software, and to
26  * permit persons to whom the Software is furnished to do so, subject
27  * to the following conditions:
28  * The above copyright notice and this permission notice shall be included
29  * in all copies or substantial portions of the Software.
30  *
31  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
32  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
35  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
36  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
37  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38  *
39  */
40 
41 /**
42  *  @file OMX_Video.h - OpenMax IL version 1.1.2
43  *  The structures is needed by Video components to exchange parameters
44  *  and configuration data with OMX components.
45  */
46 #ifndef OMX_Video_h
47 #define OMX_Video_h
48 
49 /** @defgroup video OpenMAX IL Video Domain
50  * @ingroup iv
51  * Structures for OpenMAX IL Video domain
52  * @{
53  */
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif /* __cplusplus */
58 
59 
60 /**
61  * Each OMX header must include all required header files to allow the
62  * header to compile without errors.  The includes below are required
63  * for this header file to compile successfully
64  */
65 
66 #include <OMX_IVCommon.h>
67 
68 
69 /**
70  * Enumeration used to define the possible video compression codings.
71  * NOTE:  This essentially refers to file extensions. If the coding is
72  *        being used to specify the ENCODE type, then additional work
73  *        must be done to configure the exact flavor of the compression
74  *        to be used.  For decode cases where the user application can
75  *        not differentiate between MPEG-4 and H.264 bit streams, it is
76  *        up to the codec to handle this.
77  */
78 typedef enum OMX_VIDEO_CODINGTYPE {
79     OMX_VIDEO_CodingUnused,     /**< Value when coding is N/A */
80     OMX_VIDEO_CodingAutoDetect, /**< Autodetection of coding type */
81     OMX_VIDEO_CodingMPEG2,      /**< AKA: H.262 */
82     OMX_VIDEO_CodingH263,       /**< H.263 */
83     OMX_VIDEO_CodingMPEG4,      /**< MPEG-4 */
84     OMX_VIDEO_CodingWMV,        /**< all versions of Windows Media Video */
85     OMX_VIDEO_CodingRV,         /**< all versions of Real Video */
86     OMX_VIDEO_CodingAVC,        /**< H.264/AVC */
87     OMX_VIDEO_CodingMJPEG,      /**< Motion JPEG */
88     OMX_VIDEO_CodingVP8,        /**< Google VP8, formerly known as On2 VP8 */
89     OMX_VIDEO_CodingVP9,        /**< Google VP9 */
90     OMX_VIDEO_CodingHEVC,       /**< ITU H.265/HEVC */
91     OMX_VIDEO_CodingDolbyVision,/**< Dolby Vision */
92     OMX_VIDEO_CodingImageHEIC,  /**< HEIF image encoded with HEVC */
93     OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
94     OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
95     OMX_VIDEO_CodingMax = 0x7FFFFFFF
96 } OMX_VIDEO_CODINGTYPE;
97 
98 
99 /**
100  * Data structure used to define a video path.  The number of Video paths for
101  * input and output will vary by type of the Video component.
102  *
103  *    Input (aka Source) : zero Inputs, one Output,
104  *    Splitter           : one Input, 2 or more Outputs,
105  *    Processing Element : one Input, one output,
106  *    Mixer              : 2 or more inputs, one output,
107  *    Output (aka Sink)  : one Input, zero outputs.
108  *
109  * The PortDefinition structure is used to define all of the parameters
110  * necessary for the compliant component to setup an input or an output video
111  * path.  If additional vendor specific data is required, it should be
112  * transmitted to the component using the CustomCommand function.  Compliant
113  * components will prepopulate this structure with optimal values during the
114  * GetDefaultInitParams command.
115  *
116  * STRUCT MEMBERS:
117  *  cMIMEType             : MIME type of data for the port
118  *  pNativeRender         : Platform specific reference for a display if a
119  *                          sync, otherwise this field is 0
120  *  nFrameWidth           : Width of frame to be used on channel if
121  *                          uncompressed format is used.  Use 0 for unknown,
122  *                          don't care or variable
123  *  nFrameHeight          : Height of frame to be used on channel if
124  *                          uncompressed format is used. Use 0 for unknown,
125  *                          don't care or variable
126  *  nStride               : Number of bytes per span of an image
127  *                          (i.e. indicates the number of bytes to get
128  *                          from span N to span N+1, where negative stride
129  *                          indicates the image is bottom up
130  *  nSliceHeight          : Height used when encoding in slices
131  *  nBitrate              : Bit rate of frame to be used on channel if
132  *                          compressed format is used. Use 0 for unknown,
133  *                          don't care or variable
134  *  xFramerate            : Frame rate to be used on channel if uncompressed
135  *                          format is used. Use 0 for unknown, don't care or
136  *                          variable.  Units are Q16 frames per second.
137  *  bFlagErrorConcealment : Turns on error concealment if it is supported by
138  *                          the OMX component
139  *  eCompressionFormat    : Compression format used in this instance of the
140  *                          component. When OMX_VIDEO_CodingUnused is
141  *                          specified, eColorFormat is used
142  *  eColorFormat : Decompressed format used by this component
143  *  pNativeWindow : Platform specific reference for a window object if a
144  *                          display sink , otherwise this field is 0x0.
145  */
146 typedef struct OMX_VIDEO_PORTDEFINITIONTYPE {
147     OMX_STRING cMIMEType;
148     OMX_NATIVE_DEVICETYPE pNativeRender;
149     OMX_U32 nFrameWidth;
150     OMX_U32 nFrameHeight;
151     OMX_S32 nStride;
152     OMX_U32 nSliceHeight;
153     OMX_U32 nBitrate;
154     OMX_U32 xFramerate;
155     OMX_BOOL bFlagErrorConcealment;
156     OMX_VIDEO_CODINGTYPE eCompressionFormat;
157     OMX_COLOR_FORMATTYPE eColorFormat;
158     OMX_NATIVE_WINDOWTYPE pNativeWindow;
159 } OMX_VIDEO_PORTDEFINITIONTYPE;
160 
161 /**
162  * Port format parameter.  This structure is used to enumerate the various
163  * data input/output format supported by the port.
164  *
165  * STRUCT MEMBERS:
166  *  nSize              : Size of the structure in bytes
167  *  nVersion           : OMX specification version information
168  *  nPortIndex         : Indicates which port to set
169  *  nIndex             : Indicates the enumeration index for the format from
170  *                       0x0 to N-1
171  *  eCompressionFormat : Compression format used in this instance of the
172  *                       component. When OMX_VIDEO_CodingUnused is specified,
173  *                       eColorFormat is used
174  *  eColorFormat       : Decompressed format used by this component
175  *  xFrameRate         : Indicates the video frame rate in Q16 format
176  */
177 typedef struct OMX_VIDEO_PARAM_PORTFORMATTYPE {
178     OMX_U32 nSize;
179     OMX_VERSIONTYPE nVersion;
180     OMX_U32 nPortIndex;
181     OMX_U32 nIndex;
182     OMX_VIDEO_CODINGTYPE eCompressionFormat;
183     OMX_COLOR_FORMATTYPE eColorFormat;
184     OMX_U32 xFramerate;
185 } OMX_VIDEO_PARAM_PORTFORMATTYPE;
186 
187 
188 /**
189  * This is a structure for configuring video compression quantization
190  * parameter values.  Codecs may support different QP values for different
191  * frame types.
192  *
193  * STRUCT MEMBERS:
194  *  nSize      : Size of the structure in bytes
195  *  nVersion   : OMX specification version info
196  *  nPortIndex : Port that this structure applies to
197  *  nQpI       : QP value to use for index frames
198  *  nQpP       : QP value to use for P frames
199  *  nQpB       : QP values to use for bidirectional frames
200  */
201 typedef struct OMX_VIDEO_PARAM_QUANTIZATIONTYPE {
202     OMX_U32 nSize;
203     OMX_VERSIONTYPE nVersion;
204     OMX_U32 nPortIndex;
205     OMX_U32 nQpI;
206     OMX_U32 nQpP;
207     OMX_U32 nQpB;
208 } OMX_VIDEO_PARAM_QUANTIZATIONTYPE;
209 
210 
211 /**
212  * Structure for configuration of video fast update parameters.
213  *
214  * STRUCT MEMBERS:
215  *  nSize      : Size of the structure in bytes
216  *  nVersion   : OMX specification version info
217  *  nPortIndex : Port that this structure applies to
218  *  bEnableVFU : Enable/Disable video fast update
219  *  nFirstGOB  : Specifies the number of the first macroblock row
220  *  nFirstMB   : specifies the first MB relative to the specified first GOB
221  *  nNumMBs    : Specifies the number of MBs to be refreshed from nFirstGOB
222  *               and nFirstMB
223  */
224 typedef struct OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE {
225     OMX_U32 nSize;
226     OMX_VERSIONTYPE nVersion;
227     OMX_U32 nPortIndex;
228     OMX_BOOL bEnableVFU;
229     OMX_U32 nFirstGOB;
230     OMX_U32 nFirstMB;
231     OMX_U32 nNumMBs;
232 } OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE;
233 
234 
235 /**
236  * Enumeration of possible bitrate control types
237  */
238 typedef enum OMX_VIDEO_CONTROLRATETYPE {
239     OMX_Video_ControlRateDisable,
240     OMX_Video_ControlRateVariable,
241     OMX_Video_ControlRateConstant,
242     OMX_Video_ControlRateVariableSkipFrames,
243     OMX_Video_ControlRateConstantSkipFrames,
244     OMX_Video_ControlRateConstantQuality,
245     OMX_Video_ControlRateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
246     OMX_Video_ControlRateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
247     OMX_Video_ControlRateMax = 0x7FFFFFFF
248 } OMX_VIDEO_CONTROLRATETYPE;
249 
250 
251 /**
252  * Structure for configuring bitrate mode of a codec.
253  *
254  * STRUCT MEMBERS:
255  *  nSize          : Size of the struct in bytes
256  *  nVersion       : OMX spec version info
257  *  nPortIndex     : Port that this struct applies to
258  *  eControlRate   : Control rate type enum
259  *  nTargetBitrate : Target bitrate to encode with (used when eControlRate is
260  *                   not OMX_Video_ControlRateConstantQuality)
261  *  nQualityFactor : Quality to encode with (used when eControlRate is
262  *                   OMX_Video_ControlRateConstantQuality only)
263  */
264 typedef struct OMX_VIDEO_PARAM_BITRATETYPE {
265     OMX_U32 nSize;
266     OMX_VERSIONTYPE nVersion;
267     OMX_U32 nPortIndex;
268     OMX_VIDEO_CONTROLRATETYPE eControlRate;
269     union {
270         OMX_U32 nTargetBitrate;
271         OMX_U32 nQualityFactor;
272     };
273 } OMX_VIDEO_PARAM_BITRATETYPE;
274 
275 
276 /**
277  * Enumeration of possible motion vector (MV) types
278  */
279 typedef enum OMX_VIDEO_MOTIONVECTORTYPE {
280     OMX_Video_MotionVectorPixel,
281     OMX_Video_MotionVectorHalfPel,
282     OMX_Video_MotionVectorQuarterPel,
283     OMX_Video_MotionVectorEighthPel,
284     OMX_Video_MotionVectorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
285     OMX_Video_MotionVectorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
286     OMX_Video_MotionVectorMax = 0x7FFFFFFF
287 } OMX_VIDEO_MOTIONVECTORTYPE;
288 
289 
290 /**
291  * Structure for configuring the number of motion vectors used as well
292  * as their accuracy.
293  *
294  * STRUCT MEMBERS:
295  *  nSize            : Size of the struct in bytes
296  *  nVersion         : OMX spec version info
297  *  nPortIndex       : port that this structure applies to
298  *  eAccuracy        : Enumerated MV accuracy
299  *  bUnrestrictedMVs : Allow unrestricted MVs
300  *  bFourMV          : Allow use of 4 MVs
301  *  sXSearchRange    : Search range in horizontal direction for MVs
302  *  sYSearchRange    : Search range in vertical direction for MVs
303  */
304 typedef struct OMX_VIDEO_PARAM_MOTIONVECTORTYPE {
305     OMX_U32 nSize;
306     OMX_VERSIONTYPE nVersion;
307     OMX_U32 nPortIndex;
308     OMX_VIDEO_MOTIONVECTORTYPE eAccuracy;
309     OMX_BOOL bUnrestrictedMVs;
310     OMX_BOOL bFourMV;
311     OMX_S32 sXSearchRange;
312     OMX_S32 sYSearchRange;
313 } OMX_VIDEO_PARAM_MOTIONVECTORTYPE;
314 
315 
316 /**
317  * Enumeration of possible methods to use for Intra Refresh
318  */
319 typedef enum OMX_VIDEO_INTRAREFRESHTYPE {
320     OMX_VIDEO_IntraRefreshCyclic,
321     OMX_VIDEO_IntraRefreshAdaptive,
322     OMX_VIDEO_IntraRefreshBoth,
323     OMX_VIDEO_IntraRefreshKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
324     OMX_VIDEO_IntraRefreshVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
325     OMX_VIDEO_IntraRefreshMax = 0x7FFFFFFF
326 } OMX_VIDEO_INTRAREFRESHTYPE;
327 
328 
329 /**
330  * Structure for configuring intra refresh mode
331  *
332  * STRUCT MEMBERS:
333  *  nSize        : Size of the structure in bytes
334  *  nVersion     : OMX specification version information
335  *  nPortIndex   : Port that this structure applies to
336  *  eRefreshMode : Cyclic, Adaptive, or Both
337  *  nAirMBs      : Number of intra macroblocks to refresh in a frame when
338  *                 AIR is enabled
339  *  nAirRef      : Number of times a motion marked macroblock has to be
340  *                 intra coded
341  *  nCirMBs      : Number of consecutive macroblocks to be coded as "intra"
342  *                 when CIR is enabled
343  */
344 typedef struct OMX_VIDEO_PARAM_INTRAREFRESHTYPE {
345     OMX_U32 nSize;
346     OMX_VERSIONTYPE nVersion;
347     OMX_U32 nPortIndex;
348     OMX_VIDEO_INTRAREFRESHTYPE eRefreshMode;
349     OMX_U32 nAirMBs;
350     OMX_U32 nAirRef;
351     OMX_U32 nCirMBs;
352 } OMX_VIDEO_PARAM_INTRAREFRESHTYPE;
353 
354 
355 /**
356  * Structure for enabling various error correction methods for video
357  * compression.
358  *
359  * STRUCT MEMBERS:
360  *  nSize                   : Size of the structure in bytes
361  *  nVersion                : OMX specification version information
362  *  nPortIndex              : Port that this structure applies to
363  *  bEnableHEC              : Enable/disable header extension codes (HEC)
364  *  bEnableResync           : Enable/disable resynchronization markers
365  *  nResynchMarkerSpacing   : Resynch markers interval (in bits) to be
366  *                            applied in the stream
367  *  bEnableDataPartitioning : Enable/disable data partitioning
368  *  bEnableRVLC             : Enable/disable reversible variable length
369  *                            coding
370  */
371 typedef struct OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE {
372     OMX_U32 nSize;
373     OMX_VERSIONTYPE nVersion;
374     OMX_U32 nPortIndex;
375     OMX_BOOL bEnableHEC;
376     OMX_BOOL bEnableResync;
377     OMX_U32  nResynchMarkerSpacing;
378     OMX_BOOL bEnableDataPartitioning;
379     OMX_BOOL bEnableRVLC;
380 } OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE;
381 
382 
383 /**
384  * Configuration of variable block-size motion compensation (VBSMC)
385  *
386  * STRUCT MEMBERS:
387  *  nSize      : Size of the structure in bytes
388  *  nVersion   : OMX specification version information
389  *  nPortIndex : Port that this structure applies to
390  *  b16x16     : Enable inter block search 16x16
391  *  b16x8      : Enable inter block search 16x8
392  *  b8x16      : Enable inter block search 8x16
393  *  b8x8       : Enable inter block search 8x8
394  *  b8x4       : Enable inter block search 8x4
395  *  b4x8       : Enable inter block search 4x8
396  *  b4x4       : Enable inter block search 4x4
397  */
398 typedef struct OMX_VIDEO_PARAM_VBSMCTYPE {
399     OMX_U32 nSize;
400     OMX_VERSIONTYPE nVersion;
401     OMX_U32 nPortIndex;
402     OMX_BOOL b16x16;
403     OMX_BOOL b16x8;
404     OMX_BOOL b8x16;
405     OMX_BOOL b8x8;
406     OMX_BOOL b8x4;
407     OMX_BOOL b4x8;
408     OMX_BOOL b4x4;
409 } OMX_VIDEO_PARAM_VBSMCTYPE;
410 
411 
412 /**
413  * H.263 profile types, each profile indicates support for various
414  * performance bounds and different annexes.
415  *
416  * ENUMS:
417  *  Baseline           : Baseline Profile: H.263 (V1), no optional modes
418  *  H320 Coding        : H.320 Coding Efficiency Backward Compatibility
419  *                       Profile: H.263+ (V2), includes annexes I, J, L.4
420  *                       and T
421  *  BackwardCompatible : Backward Compatibility Profile: H.263 (V1),
422  *                       includes annex F
423  *  ISWV2              : Interactive Streaming Wireless Profile: H.263+
424  *                       (V2), includes annexes I, J, K and T
425  *  ISWV3              : Interactive Streaming Wireless Profile: H.263++
426  *                       (V3), includes profile 3 and annexes V and W.6.3.8
427  *  HighCompression    : Conversational High Compression Profile: H.263++
428  *                       (V3), includes profiles 1 & 2 and annexes D and U
429  *  Internet           : Conversational Internet Profile: H.263++ (V3),
430  *                       includes profile 5 and annex K
431  *  Interlace          : Conversational Interlace Profile: H.263++ (V3),
432  *                       includes profile 5 and annex W.6.3.11
433  *  HighLatency        : High Latency Profile: H.263++ (V3), includes
434  *                       profile 6 and annexes O.1 and P.5
435  */
436 typedef enum OMX_VIDEO_H263PROFILETYPE {
437     OMX_VIDEO_H263ProfileBaseline            = 0x01,
438     OMX_VIDEO_H263ProfileH320Coding          = 0x02,
439     OMX_VIDEO_H263ProfileBackwardCompatible  = 0x04,
440     OMX_VIDEO_H263ProfileISWV2               = 0x08,
441     OMX_VIDEO_H263ProfileISWV3               = 0x10,
442     OMX_VIDEO_H263ProfileHighCompression     = 0x20,
443     OMX_VIDEO_H263ProfileInternet            = 0x40,
444     OMX_VIDEO_H263ProfileInterlace           = 0x80,
445     OMX_VIDEO_H263ProfileHighLatency         = 0x100,
446     OMX_VIDEO_H263ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
447     OMX_VIDEO_H263ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
448     OMX_VIDEO_H263ProfileMax                 = 0x7FFFFFFF
449 } OMX_VIDEO_H263PROFILETYPE;
450 
451 
452 /**
453  * H.263 level types, each level indicates support for various frame sizes,
454  * bit rates, decoder frame rates.
455  */
456 typedef enum OMX_VIDEO_H263LEVELTYPE {
457     OMX_VIDEO_H263Level10  = 0x01,
458     OMX_VIDEO_H263Level20  = 0x02,
459     OMX_VIDEO_H263Level30  = 0x04,
460     OMX_VIDEO_H263Level40  = 0x08,
461     OMX_VIDEO_H263Level45  = 0x10,
462     OMX_VIDEO_H263Level50  = 0x20,
463     OMX_VIDEO_H263Level60  = 0x40,
464     OMX_VIDEO_H263Level70  = 0x80,
465     OMX_VIDEO_H263LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
466     OMX_VIDEO_H263LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
467     OMX_VIDEO_H263LevelMax = 0x7FFFFFFF
468 } OMX_VIDEO_H263LEVELTYPE;
469 
470 
471 /**
472  * Specifies the picture type. These values should be OR'd to signal all
473  * pictures types which are allowed.
474  *
475  * ENUMS:
476  *  Generic Picture Types:          I, P and B
477  *  H.263 Specific Picture Types:   SI and SP
478  *  H.264 Specific Picture Types:   EI and EP
479  *  MPEG-4 Specific Picture Types:  S
480  */
481 typedef enum OMX_VIDEO_PICTURETYPE {
482     OMX_VIDEO_PictureTypeI   = 0x01,
483     OMX_VIDEO_PictureTypeP   = 0x02,
484     OMX_VIDEO_PictureTypeB   = 0x04,
485     OMX_VIDEO_PictureTypeSI  = 0x08,
486     OMX_VIDEO_PictureTypeSP  = 0x10,
487     OMX_VIDEO_PictureTypeEI  = 0x11,
488     OMX_VIDEO_PictureTypeEP  = 0x12,
489     OMX_VIDEO_PictureTypeS   = 0x14,
490     OMX_VIDEO_PictureTypeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
491     OMX_VIDEO_PictureTypeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
492     OMX_VIDEO_PictureTypeMax = 0x7FFFFFFF
493 } OMX_VIDEO_PICTURETYPE;
494 
495 
496 /**
497  * H.263 Params
498  *
499  * STRUCT MEMBERS:
500  *  nSize                    : Size of the structure in bytes
501  *  nVersion                 : OMX specification version information
502  *  nPortIndex               : Port that this structure applies to
503  *  nPFrames                 : Number of P frames between each I frame
504  *  nBFrames                 : Number of B frames between each I frame
505  *  eProfile                 : H.263 profile(s) to use
506  *  eLevel                   : H.263 level(s) to use
507  *  bPLUSPTYPEAllowed        : Indicating that it is allowed to use PLUSPTYPE
508  *                             (specified in the 1998 version of H.263) to
509  *                             indicate custom picture sizes or clock
510  *                             frequencies
511  *  nAllowedPictureTypes     : Specifies the picture types allowed in the
512  *                             bitstream
513  *  bForceRoundingTypeToZero : value of the RTYPE bit (bit 6 of MPPTYPE) is
514  *                             not constrained. It is recommended to change
515  *                             the value of the RTYPE bit for each reference
516  *                             picture in error-free communication
517  *  nPictureHeaderRepetition : Specifies the frequency of picture header
518  *                             repetition
519  *  nGOBHeaderInterval       : Specifies the interval of non-empty GOB
520  *                             headers in units of GOBs
521  */
522 typedef struct OMX_VIDEO_PARAM_H263TYPE {
523     OMX_U32 nSize;
524     OMX_VERSIONTYPE nVersion;
525     OMX_U32 nPortIndex;
526     OMX_U32 nPFrames;
527     OMX_U32 nBFrames;
528     OMX_VIDEO_H263PROFILETYPE eProfile;
529     OMX_VIDEO_H263LEVELTYPE eLevel;
530     OMX_BOOL bPLUSPTYPEAllowed;
531     OMX_U32 nAllowedPictureTypes;
532     OMX_BOOL bForceRoundingTypeToZero;
533     OMX_U32 nPictureHeaderRepetition;
534     OMX_U32 nGOBHeaderInterval;
535 } OMX_VIDEO_PARAM_H263TYPE;
536 
537 
538 /**
539  * MPEG-2 profile types, each profile indicates support for various
540  * performance bounds and different annexes.
541  */
542 typedef enum OMX_VIDEO_MPEG2PROFILETYPE {
543     OMX_VIDEO_MPEG2ProfileSimple = 0,  /**< Simple Profile */
544     OMX_VIDEO_MPEG2ProfileMain,        /**< Main Profile */
545     OMX_VIDEO_MPEG2Profile422,         /**< 4:2:2 Profile */
546     OMX_VIDEO_MPEG2ProfileSNR,         /**< SNR Profile */
547     OMX_VIDEO_MPEG2ProfileSpatial,     /**< Spatial Profile */
548     OMX_VIDEO_MPEG2ProfileHigh,        /**< High Profile */
549     OMX_VIDEO_MPEG2ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
550     OMX_VIDEO_MPEG2ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
551     OMX_VIDEO_MPEG2ProfileMax = 0x7FFFFFFF
552 } OMX_VIDEO_MPEG2PROFILETYPE;
553 
554 
555 /**
556  * MPEG-2 level types, each level indicates support for various frame
557  * sizes, bit rates, decoder frame rates.  No need
558  */
559 typedef enum OMX_VIDEO_MPEG2LEVELTYPE {
560     OMX_VIDEO_MPEG2LevelLL = 0,  /**< Low Level */
561     OMX_VIDEO_MPEG2LevelML,      /**< Main Level */
562     OMX_VIDEO_MPEG2LevelH14,     /**< High 1440 */
563     OMX_VIDEO_MPEG2LevelHL,      /**< High Level */
564     OMX_VIDEO_MPEG2LevelHP,      /**< HighP Level */
565     OMX_VIDEO_MPEG2LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
566     OMX_VIDEO_MPEG2LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
567     OMX_VIDEO_MPEG2LevelMax = 0x7FFFFFFF
568 } OMX_VIDEO_MPEG2LEVELTYPE;
569 
570 
571 /**
572  * MPEG-2 params
573  *
574  * STRUCT MEMBERS:
575  *  nSize      : Size of the structure in bytes
576  *  nVersion   : OMX specification version information
577  *  nPortIndex : Port that this structure applies to
578  *  nPFrames   : Number of P frames between each I frame
579  *  nBFrames   : Number of B frames between each I frame
580  *  eProfile   : MPEG-2 profile(s) to use
581  *  eLevel     : MPEG-2 levels(s) to use
582  */
583 typedef struct OMX_VIDEO_PARAM_MPEG2TYPE {
584     OMX_U32 nSize;
585     OMX_VERSIONTYPE nVersion;
586     OMX_U32 nPortIndex;
587     OMX_U32 nPFrames;
588     OMX_U32 nBFrames;
589     OMX_VIDEO_MPEG2PROFILETYPE eProfile;
590     OMX_VIDEO_MPEG2LEVELTYPE eLevel;
591 } OMX_VIDEO_PARAM_MPEG2TYPE;
592 
593 
594 /**
595  * MPEG-4 profile types, each profile indicates support for various
596  * performance bounds and different annexes.
597  *
598  * ENUMS:
599  *  - Simple Profile, Levels 1-3
600  *  - Simple Scalable Profile, Levels 1-2
601  *  - Core Profile, Levels 1-2
602  *  - Main Profile, Levels 2-4
603  *  - N-bit Profile, Level 2
604  *  - Scalable Texture Profile, Level 1
605  *  - Simple Face Animation Profile, Levels 1-2
606  *  - Simple Face and Body Animation (FBA) Profile, Levels 1-2
607  *  - Basic Animated Texture Profile, Levels 1-2
608  *  - Hybrid Profile, Levels 1-2
609  *  - Advanced Real Time Simple Profiles, Levels 1-4
610  *  - Core Scalable Profile, Levels 1-3
611  *  - Advanced Coding Efficiency Profile, Levels 1-4
612  *  - Advanced Core Profile, Levels 1-2
613  *  - Advanced Scalable Texture, Levels 2-3
614  */
615 typedef enum OMX_VIDEO_MPEG4PROFILETYPE {
616     OMX_VIDEO_MPEG4ProfileSimple           = 0x01,
617     OMX_VIDEO_MPEG4ProfileSimpleScalable   = 0x02,
618     OMX_VIDEO_MPEG4ProfileCore             = 0x04,
619     OMX_VIDEO_MPEG4ProfileMain             = 0x08,
620     OMX_VIDEO_MPEG4ProfileNbit             = 0x10,
621     OMX_VIDEO_MPEG4ProfileScalableTexture  = 0x20,
622     OMX_VIDEO_MPEG4ProfileSimpleFace       = 0x40,
623     OMX_VIDEO_MPEG4ProfileSimpleFBA        = 0x80,
624     OMX_VIDEO_MPEG4ProfileBasicAnimated    = 0x100,
625     OMX_VIDEO_MPEG4ProfileHybrid           = 0x200,
626     OMX_VIDEO_MPEG4ProfileAdvancedRealTime = 0x400,
627     OMX_VIDEO_MPEG4ProfileCoreScalable     = 0x800,
628     OMX_VIDEO_MPEG4ProfileAdvancedCoding   = 0x1000,
629     OMX_VIDEO_MPEG4ProfileAdvancedCore     = 0x2000,
630     OMX_VIDEO_MPEG4ProfileAdvancedScalable = 0x4000,
631     OMX_VIDEO_MPEG4ProfileAdvancedSimple   = 0x8000,
632     OMX_VIDEO_MPEG4ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
633     OMX_VIDEO_MPEG4ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
634     OMX_VIDEO_MPEG4ProfileMax              = 0x7FFFFFFF
635 } OMX_VIDEO_MPEG4PROFILETYPE;
636 
637 
638 /**
639  * MPEG-4 level types, each level indicates support for various frame
640  * sizes, bit rates, decoder frame rates.  No need
641  */
642 typedef enum OMX_VIDEO_MPEG4LEVELTYPE {
643     OMX_VIDEO_MPEG4Level0  = 0x01,   /**< Level 0 */
644     OMX_VIDEO_MPEG4Level0b = 0x02,   /**< Level 0b */
645     OMX_VIDEO_MPEG4Level1  = 0x04,   /**< Level 1 */
646     OMX_VIDEO_MPEG4Level2  = 0x08,   /**< Level 2 */
647     OMX_VIDEO_MPEG4Level3  = 0x10,   /**< Level 3 */
648     /* normally levels are powers of 2s, but 3b was missed and levels must be properly ordered */
649     OMX_VIDEO_MPEG4Level3b = 0x18,   /**< Level 3a */
650     OMX_VIDEO_MPEG4Level4  = 0x20,   /**< Level 4 */
651     OMX_VIDEO_MPEG4Level4a = 0x40,   /**< Level 4a */
652     OMX_VIDEO_MPEG4Level5  = 0x80,   /**< Level 5 */
653     OMX_VIDEO_MPEG4Level6  = 0x100,  /**< Level 6 */
654     OMX_VIDEO_MPEG4LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
655     OMX_VIDEO_MPEG4LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
656     OMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF
657 } OMX_VIDEO_MPEG4LEVELTYPE;
658 
659 
660 /**
661  * MPEG-4 configuration.  This structure handles configuration options
662  * which are specific to MPEG4 algorithms
663  *
664  * STRUCT MEMBERS:
665  *  nSize                : Size of the structure in bytes
666  *  nVersion             : OMX specification version information
667  *  nPortIndex           : Port that this structure applies to
668  *  nSliceHeaderSpacing  : Number of macroblocks between slice header (H263+
669  *                         Annex K). Put zero if not used
670  *  bSVH                 : Enable Short Video Header mode
671  *  bGov                 : Flag to enable GOV
672  *  nPFrames             : Number of P frames between each I frame (also called
673  *                         GOV period)
674  *  nBFrames             : Number of B frames between each I frame
675  *  nIDCVLCThreshold     : Value of intra DC VLC threshold
676  *  bACPred              : Flag to use ac prediction
677  *  nMaxPacketSize       : Maximum size of packet in bytes.
678  *  nTimeIncRes          : Used to pass VOP time increment resolution for MPEG4.
679  *                         Interpreted as described in MPEG4 standard.
680  *  eProfile             : MPEG-4 profile(s) to use.
681  *  eLevel               : MPEG-4 level(s) to use.
682  *  nAllowedPictureTypes : Specifies the picture types allowed in the bitstream
683  *  nHeaderExtension     : Specifies the number of consecutive video packet
684  *                         headers within a VOP
685  *  bReversibleVLC       : Specifies whether reversible variable length coding
686  *                         is in use
687  */
688 typedef struct OMX_VIDEO_PARAM_MPEG4TYPE {
689     OMX_U32 nSize;
690     OMX_VERSIONTYPE nVersion;
691     OMX_U32 nPortIndex;
692     OMX_U32 nSliceHeaderSpacing;
693     OMX_BOOL bSVH;
694     OMX_BOOL bGov;
695     OMX_U32 nPFrames;
696     OMX_U32 nBFrames;
697     OMX_U32 nIDCVLCThreshold;
698     OMX_BOOL bACPred;
699     OMX_U32 nMaxPacketSize;
700     OMX_U32 nTimeIncRes;
701     OMX_VIDEO_MPEG4PROFILETYPE eProfile;
702     OMX_VIDEO_MPEG4LEVELTYPE eLevel;
703     OMX_U32 nAllowedPictureTypes;
704     OMX_U32 nHeaderExtension;
705     OMX_BOOL bReversibleVLC;
706 } OMX_VIDEO_PARAM_MPEG4TYPE;
707 
708 
709 /**
710  * WMV Versions
711  */
712 typedef enum OMX_VIDEO_WMVFORMATTYPE {
713     OMX_VIDEO_WMVFormatUnused = 0x01,   /**< Format unused or unknown */
714     OMX_VIDEO_WMVFormat7      = 0x02,   /**< Windows Media Video format 7 */
715     OMX_VIDEO_WMVFormat8      = 0x04,   /**< Windows Media Video format 8 */
716     OMX_VIDEO_WMVFormat9      = 0x08,   /**< Windows Media Video format 9 */
717     OMX_VIDEO_WMFFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
718     OMX_VIDEO_WMFFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
719     OMX_VIDEO_WMVFormatMax    = 0x7FFFFFFF
720 } OMX_VIDEO_WMVFORMATTYPE;
721 
722 
723 /**
724  * WMV Params
725  *
726  * STRUCT MEMBERS:
727  *  nSize      : Size of the structure in bytes
728  *  nVersion   : OMX specification version information
729  *  nPortIndex : Port that this structure applies to
730  *  eFormat    : Version of WMV stream / data
731  */
732 typedef struct OMX_VIDEO_PARAM_WMVTYPE {
733     OMX_U32 nSize;
734     OMX_VERSIONTYPE nVersion;
735     OMX_U32 nPortIndex;
736     OMX_VIDEO_WMVFORMATTYPE eFormat;
737 } OMX_VIDEO_PARAM_WMVTYPE;
738 
739 
740 /**
741  * Real Video Version
742  */
743 typedef enum OMX_VIDEO_RVFORMATTYPE {
744     OMX_VIDEO_RVFormatUnused = 0, /**< Format unused or unknown */
745     OMX_VIDEO_RVFormat8,          /**< Real Video format 8 */
746     OMX_VIDEO_RVFormat9,          /**< Real Video format 9 */
747     OMX_VIDEO_RVFormatG2,         /**< Real Video Format G2 */
748     OMX_VIDEO_RVFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
749     OMX_VIDEO_RVFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
750     OMX_VIDEO_RVFormatMax = 0x7FFFFFFF
751 } OMX_VIDEO_RVFORMATTYPE;
752 
753 
754 /**
755  * Real Video Params
756  *
757  * STUCT MEMBERS:
758  *  nSize              : Size of the structure in bytes
759  *  nVersion           : OMX specification version information
760  *  nPortIndex         : Port that this structure applies to
761  *  eFormat            : Version of RV stream / data
762  *  nBitsPerPixel      : Bits per pixel coded in the frame
763  *  nPaddedWidth       : Padded width in pixel of a video frame
764  *  nPaddedHeight      : Padded Height in pixels of a video frame
765  *  nFrameRate         : Rate of video in frames per second
766  *  nBitstreamFlags    : Flags which internal information about the bitstream
767  *  nBitstreamVersion  : Bitstream version
768  *  nMaxEncodeFrameSize: Max encoded frame size
769  *  bEnablePostFilter  : Turn on/off post filter
770  *  bEnableTemporalInterpolation : Turn on/off temporal interpolation
771  *  bEnableLatencyMode : When enabled, the decoder does not display a decoded
772  *                       frame until it has detected that no enhancement layer
773  *                       frames or dependent B frames will be coming. This
774  *                       detection usually occurs when a subsequent non-B
775  *                       frame is encountered
776  */
777 typedef struct OMX_VIDEO_PARAM_RVTYPE {
778     OMX_U32 nSize;
779     OMX_VERSIONTYPE nVersion;
780     OMX_U32 nPortIndex;
781     OMX_VIDEO_RVFORMATTYPE eFormat;
782     OMX_U16 nBitsPerPixel;
783     OMX_U16 nPaddedWidth;
784     OMX_U16 nPaddedHeight;
785     OMX_U32 nFrameRate;
786     OMX_U32 nBitstreamFlags;
787     OMX_U32 nBitstreamVersion;
788     OMX_U32 nMaxEncodeFrameSize;
789     OMX_BOOL bEnablePostFilter;
790     OMX_BOOL bEnableTemporalInterpolation;
791     OMX_BOOL bEnableLatencyMode;
792 } OMX_VIDEO_PARAM_RVTYPE;
793 
794 
795 /**
796  * AVC profile types, each profile indicates support for various
797  * performance bounds and different annexes.
798  */
799 typedef enum OMX_VIDEO_AVCPROFILETYPE {
800     OMX_VIDEO_AVCProfileBaseline = 0x01,   /**< Baseline profile */
801     OMX_VIDEO_AVCProfileMain     = 0x02,   /**< Main profile */
802     OMX_VIDEO_AVCProfileExtended = 0x04,   /**< Extended profile */
803     OMX_VIDEO_AVCProfileHigh     = 0x08,   /**< High profile */
804     OMX_VIDEO_AVCProfileHigh10   = 0x10,   /**< High 10 profile */
805     OMX_VIDEO_AVCProfileHigh422  = 0x20,   /**< High 4:2:2 profile */
806     OMX_VIDEO_AVCProfileHigh444  = 0x40,   /**< High 4:4:4 profile */
807     OMX_VIDEO_AVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
808     OMX_VIDEO_AVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
809     OMX_VIDEO_AVCProfileMax      = 0x7FFFFFFF
810 } OMX_VIDEO_AVCPROFILETYPE;
811 
812 
813 /**
814  * AVC level types, each level indicates support for various frame sizes,
815  * bit rates, decoder frame rates.  No need
816  */
817 typedef enum OMX_VIDEO_AVCLEVELTYPE {
818     OMX_VIDEO_AVCLevel1   = 0x01,     /**< Level 1 */
819     OMX_VIDEO_AVCLevel1b  = 0x02,     /**< Level 1b */
820     OMX_VIDEO_AVCLevel11  = 0x04,     /**< Level 1.1 */
821     OMX_VIDEO_AVCLevel12  = 0x08,     /**< Level 1.2 */
822     OMX_VIDEO_AVCLevel13  = 0x10,     /**< Level 1.3 */
823     OMX_VIDEO_AVCLevel2   = 0x20,     /**< Level 2 */
824     OMX_VIDEO_AVCLevel21  = 0x40,     /**< Level 2.1 */
825     OMX_VIDEO_AVCLevel22  = 0x80,     /**< Level 2.2 */
826     OMX_VIDEO_AVCLevel3   = 0x100,    /**< Level 3 */
827     OMX_VIDEO_AVCLevel31  = 0x200,    /**< Level 3.1 */
828     OMX_VIDEO_AVCLevel32  = 0x400,    /**< Level 3.2 */
829     OMX_VIDEO_AVCLevel4   = 0x800,    /**< Level 4 */
830     OMX_VIDEO_AVCLevel41  = 0x1000,   /**< Level 4.1 */
831     OMX_VIDEO_AVCLevel42  = 0x2000,   /**< Level 4.2 */
832     OMX_VIDEO_AVCLevel5   = 0x4000,   /**< Level 5 */
833     OMX_VIDEO_AVCLevel51  = 0x8000,   /**< Level 5.1 */
834     OMX_VIDEO_AVCLevel52  = 0x10000,  /**< Level 5.2 */
835     OMX_VIDEO_AVCLevel6   = 0x20000,  /**< Level 6 */
836     OMX_VIDEO_AVCLevel61  = 0x40000,  /**< Level 6.1 */
837     OMX_VIDEO_AVCLevel62  = 0x80000,  /**< Level 6.2 */
838     OMX_VIDEO_AVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
839     OMX_VIDEO_AVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
840     OMX_VIDEO_AVCLevelMax = 0x7FFFFFFF
841 } OMX_VIDEO_AVCLEVELTYPE;
842 
843 
844 /**
845  * AVC loop filter modes
846  *
847  * OMX_VIDEO_AVCLoopFilterEnable               : Enable
848  * OMX_VIDEO_AVCLoopFilterDisable              : Disable
849  * OMX_VIDEO_AVCLoopFilterDisableSliceBoundary : Disabled on slice boundaries
850  */
851 typedef enum OMX_VIDEO_AVCLOOPFILTERTYPE {
852     OMX_VIDEO_AVCLoopFilterEnable = 0,
853     OMX_VIDEO_AVCLoopFilterDisable,
854     OMX_VIDEO_AVCLoopFilterDisableSliceBoundary,
855     OMX_VIDEO_AVCLoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
856     OMX_VIDEO_AVCLoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
857     OMX_VIDEO_AVCLoopFilterMax = 0x7FFFFFFF
858 } OMX_VIDEO_AVCLOOPFILTERTYPE;
859 
860 
861 /**
862  * AVC params
863  *
864  * STRUCT MEMBERS:
865  *  nSize                     : Size of the structure in bytes
866  *  nVersion                  : OMX specification version information
867  *  nPortIndex                : Port that this structure applies to
868  *  nSliceHeaderSpacing       : Number of macroblocks between slice header, put
869  *                              zero if not used
870  *  nPFrames                  : Number of P frames between each I frame
871  *  nBFrames                  : Number of B frames between each I frame
872  *  bUseHadamard              : Enable/disable Hadamard transform
873  *  nRefFrames                : Max number of reference frames to use for inter
874  *                              motion search (1-16)
875  *  nRefIdxTrailing           : Pic param set ref frame index (index into ref
876  *                              frame buffer of trailing frames list), B frame
877  *                              support
878  *  nRefIdxForward            : Pic param set ref frame index (index into ref
879  *                              frame buffer of forward frames list), B frame
880  *                              support
881  *  bEnableUEP                : Enable/disable unequal error protection. This
882  *                              is only valid of data partitioning is enabled.
883  *  bEnableFMO                : Enable/disable flexible macroblock ordering
884  *  bEnableASO                : Enable/disable arbitrary slice ordering
885  *  bEnableRS                 : Enable/disable sending of redundant slices
886  *  eProfile                  : AVC profile(s) to use
887  *  eLevel                    : AVC level(s) to use
888  *  nAllowedPictureTypes      : Specifies the picture types allowed in the
889  *                              bitstream
890  *  bFrameMBsOnly             : specifies that every coded picture of the
891  *                              coded video sequence is a coded frame
892  *                              containing only frame macroblocks
893  *  bMBAFF                    : Enable/disable switching between frame and
894  *                              field macroblocks within a picture
895  *  bEntropyCodingCABAC       : Entropy decoding method to be applied for the
896  *                              syntax elements for which two descriptors appear
897  *                              in the syntax tables
898  *  bWeightedPPrediction      : Enable/disable weighted prediction shall not
899  *                              be applied to P and SP slices
900  *  nWeightedBipredicitonMode : Default weighted prediction is applied to B
901  *                              slices
902  *  bconstIpred               : Enable/disable intra prediction
903  *  bDirect8x8Inference       : Specifies the method used in the derivation
904  *                              process for luma motion vectors for B_Skip,
905  *                              B_Direct_16x16 and B_Direct_8x8 as specified
906  *                              in subclause 8.4.1.2 of the AVC spec
907  *  bDirectSpatialTemporal    : Flag indicating spatial or temporal direct
908  *                              mode used in B slice coding (related to
909  *                              bDirect8x8Inference) . Spatial direct mode is
910  *                              more common and should be the default.
911  *  nCabacInitIdx             : Index used to init CABAC contexts
912  *  eLoopFilterMode           : Enable/disable loop filter
913  */
914 typedef struct OMX_VIDEO_PARAM_AVCTYPE {
915     OMX_U32 nSize;
916     OMX_VERSIONTYPE nVersion;
917     OMX_U32 nPortIndex;
918     OMX_U32 nSliceHeaderSpacing;
919     OMX_U32 nPFrames;
920     OMX_U32 nBFrames;
921     OMX_BOOL bUseHadamard;
922     OMX_U32 nRefFrames;
923     OMX_U32 nRefIdx10ActiveMinus1;
924     OMX_U32 nRefIdx11ActiveMinus1;
925     OMX_BOOL bEnableUEP;
926     OMX_BOOL bEnableFMO;
927     OMX_BOOL bEnableASO;
928     OMX_BOOL bEnableRS;
929     OMX_VIDEO_AVCPROFILETYPE eProfile;
930     OMX_VIDEO_AVCLEVELTYPE eLevel;
931     OMX_U32 nAllowedPictureTypes;
932     OMX_BOOL bFrameMBsOnly;
933     OMX_BOOL bMBAFF;
934     OMX_BOOL bEntropyCodingCABAC;
935     OMX_BOOL bWeightedPPrediction;
936     OMX_U32 nWeightedBipredicitonMode;
937     OMX_BOOL bconstIpred ;
938     OMX_BOOL bDirect8x8Inference;
939     OMX_BOOL bDirectSpatialTemporal;
940     OMX_U32 nCabacInitIdc;
941     OMX_VIDEO_AVCLOOPFILTERTYPE eLoopFilterMode;
942 } OMX_VIDEO_PARAM_AVCTYPE;
943 
944 typedef struct OMX_VIDEO_PARAM_PROFILELEVELTYPE {
945    OMX_U32 nSize;
946    OMX_VERSIONTYPE nVersion;
947    OMX_U32 nPortIndex;
948    OMX_U32 eProfile;      /**< type is OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263PROFILETYPE,
949                                  or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
950    OMX_U32 eLevel;        /**< type is OMX_VIDEO_AVCLEVELTYPE, OMX_VIDEO_H263LEVELTYPE,
951                                  or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
952    OMX_U32 nProfileIndex; /**< Used to query for individual profile support information,
953                                This parameter is valid only for
954                                OMX_IndexParamVideoProfileLevelQuerySupported index,
955                                For all other indices this parameter is to be ignored. */
956 } OMX_VIDEO_PARAM_PROFILELEVELTYPE;
957 
958 /**
959  * Structure for dynamically configuring bitrate mode of a codec.
960  *
961  * STRUCT MEMBERS:
962  *  nSize          : Size of the struct in bytes
963  *  nVersion       : OMX spec version info
964  *  nPortIndex     : Port that this struct applies to
965  *  nEncodeBitrate : Target average bitrate to be generated in bps
966  */
967 typedef struct OMX_VIDEO_CONFIG_BITRATETYPE {
968     OMX_U32 nSize;
969     OMX_VERSIONTYPE nVersion;
970     OMX_U32 nPortIndex;
971     OMX_U32 nEncodeBitrate;
972 } OMX_VIDEO_CONFIG_BITRATETYPE;
973 
974 /**
975  * Defines Encoder Frame Rate setting
976  *
977  * STRUCT MEMBERS:
978  *  nSize            : Size of the structure in bytes
979  *  nVersion         : OMX specification version information
980  *  nPortIndex       : Port that this structure applies to
981  *  xEncodeFramerate : Encoding framerate represented in Q16 format
982  */
983 typedef struct OMX_CONFIG_FRAMERATETYPE {
984     OMX_U32 nSize;
985     OMX_VERSIONTYPE nVersion;
986     OMX_U32 nPortIndex;
987     OMX_U32 xEncodeFramerate; /* Q16 format */
988 } OMX_CONFIG_FRAMERATETYPE;
989 
990 typedef struct OMX_CONFIG_INTRAREFRESHVOPTYPE {
991     OMX_U32 nSize;
992     OMX_VERSIONTYPE nVersion;
993     OMX_U32 nPortIndex;
994     OMX_BOOL IntraRefreshVOP;
995 } OMX_CONFIG_INTRAREFRESHVOPTYPE;
996 
997 typedef struct OMX_CONFIG_MACROBLOCKERRORMAPTYPE {
998     OMX_U32 nSize;
999     OMX_VERSIONTYPE nVersion;
1000     OMX_U32 nPortIndex;
1001     OMX_U32 nErrMapSize;           /* Size of the Error Map in bytes */
1002     OMX_U8  ErrMap[1];             /* Error map hint */
1003 } OMX_CONFIG_MACROBLOCKERRORMAPTYPE;
1004 
1005 typedef struct OMX_CONFIG_MBERRORREPORTINGTYPE {
1006     OMX_U32 nSize;
1007     OMX_VERSIONTYPE nVersion;
1008     OMX_U32 nPortIndex;
1009     OMX_BOOL bEnabled;
1010 } OMX_CONFIG_MBERRORREPORTINGTYPE;
1011 
1012 typedef struct OMX_PARAM_MACROBLOCKSTYPE {
1013     OMX_U32 nSize;
1014     OMX_VERSIONTYPE nVersion;
1015     OMX_U32 nPortIndex;
1016     OMX_U32 nMacroblocks;
1017 } OMX_PARAM_MACROBLOCKSTYPE;
1018 
1019 /**
1020  * AVC Slice Mode modes
1021  *
1022  * OMX_VIDEO_SLICEMODE_AVCDefault   : Normal frame encoding, one slice per frame
1023  * OMX_VIDEO_SLICEMODE_AVCMBSlice   : NAL mode, number of MBs per frame
1024  * OMX_VIDEO_SLICEMODE_AVCByteSlice : NAL mode, number of bytes per frame
1025  */
1026 typedef enum OMX_VIDEO_AVCSLICEMODETYPE {
1027     OMX_VIDEO_SLICEMODE_AVCDefault = 0,
1028     OMX_VIDEO_SLICEMODE_AVCMBSlice,
1029     OMX_VIDEO_SLICEMODE_AVCByteSlice,
1030     OMX_VIDEO_SLICEMODE_AVCKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
1031     OMX_VIDEO_SLICEMODE_AVCVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
1032     OMX_VIDEO_SLICEMODE_AVCLevelMax = 0x7FFFFFFF
1033 } OMX_VIDEO_AVCSLICEMODETYPE;
1034 
1035 /**
1036  * AVC FMO Slice Mode Params
1037  *
1038  * STRUCT MEMBERS:
1039  *  nSize      : Size of the structure in bytes
1040  *  nVersion   : OMX specification version information
1041  *  nPortIndex : Port that this structure applies to
1042  *  nNumSliceGroups : Specifies the number of slice groups
1043  *  nSliceGroupMapType : Specifies the type of slice groups
1044  *  eSliceMode : Specifies the type of slice
1045  */
1046 typedef struct OMX_VIDEO_PARAM_AVCSLICEFMO {
1047     OMX_U32 nSize;
1048     OMX_VERSIONTYPE nVersion;
1049     OMX_U32 nPortIndex;
1050     OMX_U8 nNumSliceGroups;
1051     OMX_U8 nSliceGroupMapType;
1052     OMX_VIDEO_AVCSLICEMODETYPE eSliceMode;
1053 } OMX_VIDEO_PARAM_AVCSLICEFMO;
1054 
1055 /**
1056  * AVC IDR Period Configs
1057  *
1058  * STRUCT MEMBERS:
1059  *  nSize      : Size of the structure in bytes
1060  *  nVersion   : OMX specification version information
1061  *  nPortIndex : Port that this structure applies to
1062  *  nIDRPeriod : Specifies periodicity of IDR frames
1063  *  nPFrames : Specifies internal of coding Intra frames
1064  */
1065 typedef struct OMX_VIDEO_CONFIG_AVCINTRAPERIOD {
1066     OMX_U32 nSize;
1067     OMX_VERSIONTYPE nVersion;
1068     OMX_U32 nPortIndex;
1069     OMX_U32 nIDRPeriod;
1070     OMX_U32 nPFrames;
1071 } OMX_VIDEO_CONFIG_AVCINTRAPERIOD;
1072 
1073 /**
1074  * AVC NAL Size Configs
1075  *
1076  * STRUCT MEMBERS:
1077  *  nSize      : Size of the structure in bytes
1078  *  nVersion   : OMX specification version information
1079  *  nPortIndex : Port that this structure applies to
1080  *  nNaluBytes : Specifies the NAL unit size
1081  */
1082 typedef struct OMX_VIDEO_CONFIG_NALSIZE {
1083     OMX_U32 nSize;
1084     OMX_VERSIONTYPE nVersion;
1085     OMX_U32 nPortIndex;
1086     OMX_U32 nNaluBytes;
1087 } OMX_VIDEO_CONFIG_NALSIZE;
1088 
1089 /** @} */
1090 
1091 #ifdef __cplusplus
1092 }
1093 #endif /* __cplusplus */
1094 
1095 #endif
1096 /* File EOF */
1097 
1098