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