2 * Copyright (c) 2008 The Khronos Group Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject
10 * to the following conditions:
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 * @file OMX_Video.h - OpenMax IL version 1.1.2
26 * The structures is needed by Video components to exchange parameters
27 * and configuration data with OMX components.
32 /** @defgroup video OpenMAX IL Video Domain
34 * Structures for OpenMAX IL Video domain
40 #endif /* __cplusplus */
44 * Each OMX header must include all required header files to allow the
45 * header to compile without errors. The includes below are required
46 * for this header file to compile successfully
49 #include <OMX_IVCommon.h>
53 * Enumeration used to define the possible video compression codings.
54 * NOTE: This essentially refers to file extensions. If the coding is
55 * being used to specify the ENCODE type, then additional work
56 * must be done to configure the exact flavor of the compression
57 * to be used. For decode cases where the user application can
58 * not differentiate between MPEG-4 and H.264 bit streams, it is
59 * up to the codec to handle this.
61 typedef enum OMX_VIDEO_CODINGTYPE {
62 OMX_VIDEO_CodingUnused, /**< Value when coding is N/A */
63 OMX_VIDEO_CodingAutoDetect, /**< Autodetection of coding type */
64 OMX_VIDEO_CodingMPEG2, /**< AKA: H.262 */
65 OMX_VIDEO_CodingH263, /**< H.263 */
66 OMX_VIDEO_CodingMPEG4, /**< MPEG-4 */
67 OMX_VIDEO_CodingWMV, /**< all versions of Windows Media Video */
68 OMX_VIDEO_CodingRV, /**< all versions of Real Video */
69 OMX_VIDEO_CodingAVC, /**< H.264/AVC */
70 OMX_VIDEO_CodingMJPEG, /**< Motion JPEG */
71 OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
72 OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
73 OMX_VIDEO_CodingMax = 0x7FFFFFFF
74 } OMX_VIDEO_CODINGTYPE;
78 * Data structure used to define a video path. The number of Video paths for
79 * input and output will vary by type of the Video component.
81 * Input (aka Source) : zero Inputs, one Output,
82 * Splitter : one Input, 2 or more Outputs,
83 * Processing Element : one Input, one output,
84 * Mixer : 2 or more inputs, one output,
85 * Output (aka Sink) : one Input, zero outputs.
87 * The PortDefinition structure is used to define all of the parameters
88 * necessary for the compliant component to setup an input or an output video
89 * path. If additional vendor specific data is required, it should be
90 * transmitted to the component using the CustomCommand function. Compliant
91 * components will prepopulate this structure with optimal values during the
92 * GetDefaultInitParams command.
95 * cMIMEType : MIME type of data for the port
96 * pNativeRender : Platform specific reference for a display if a
97 * sync, otherwise this field is 0
98 * nFrameWidth : Width of frame to be used on channel if
99 * uncompressed format is used. Use 0 for unknown,
100 * don't care or variable
101 * nFrameHeight : Height of frame to be used on channel if
102 * uncompressed format is used. Use 0 for unknown,
103 * don't care or variable
104 * nStride : Number of bytes per span of an image
105 * (i.e. indicates the number of bytes to get
106 * from span N to span N+1, where negative stride
107 * indicates the image is bottom up
108 * nSliceHeight : Height used when encoding in slices
109 * nBitrate : Bit rate of frame to be used on channel if
110 * compressed format is used. Use 0 for unknown,
111 * don't care or variable
112 * xFramerate : Frame rate to be used on channel if uncompressed
113 * format is used. Use 0 for unknown, don't care or
114 * variable. Units are Q16 frames per second.
115 * bFlagErrorConcealment : Turns on error concealment if it is supported by
117 * eCompressionFormat : Compression format used in this instance of the
118 * component. When OMX_VIDEO_CodingUnused is
119 * specified, eColorFormat is used
120 * eColorFormat : Decompressed format used by this component
121 * pNativeWindow : Platform specific reference for a window object if a
122 * display sink , otherwise this field is 0x0.
124 typedef struct OMX_VIDEO_PORTDEFINITIONTYPE {
125 OMX_STRING cMIMEType;
126 OMX_NATIVE_DEVICETYPE pNativeRender;
128 OMX_U32 nFrameHeight;
130 OMX_U32 nSliceHeight;
133 OMX_BOOL bFlagErrorConcealment;
134 OMX_VIDEO_CODINGTYPE eCompressionFormat;
135 OMX_COLOR_FORMATTYPE eColorFormat;
136 OMX_NATIVE_WINDOWTYPE pNativeWindow;
137 } OMX_VIDEO_PORTDEFINITIONTYPE;
140 * Port format parameter. This structure is used to enumerate the various
141 * data input/output format supported by the port.
144 * nSize : Size of the structure in bytes
145 * nVersion : OMX specification version information
146 * nPortIndex : Indicates which port to set
147 * nIndex : Indicates the enumeration index for the format from
149 * eCompressionFormat : Compression format used in this instance of the
150 * component. When OMX_VIDEO_CodingUnused is specified,
151 * eColorFormat is used
152 * eColorFormat : Decompressed format used by this component
153 * xFrameRate : Indicates the video frame rate in Q16 format
155 typedef struct OMX_VIDEO_PARAM_PORTFORMATTYPE {
157 OMX_VERSIONTYPE nVersion;
160 OMX_VIDEO_CODINGTYPE eCompressionFormat;
161 OMX_COLOR_FORMATTYPE eColorFormat;
163 } OMX_VIDEO_PARAM_PORTFORMATTYPE;
167 * This is a structure for configuring video compression quantization
168 * parameter values. Codecs may support different QP values for different
172 * nSize : Size of the structure in bytes
173 * nVersion : OMX specification version info
174 * nPortIndex : Port that this structure applies to
175 * nQpI : QP value to use for index frames
176 * nQpP : QP value to use for P frames
177 * nQpB : QP values to use for bidirectional frames
179 typedef struct OMX_VIDEO_PARAM_QUANTIZATIONTYPE {
181 OMX_VERSIONTYPE nVersion;
186 } OMX_VIDEO_PARAM_QUANTIZATIONTYPE;
190 * Structure for configuration of video fast update parameters.
193 * nSize : Size of the structure in bytes
194 * nVersion : OMX specification version info
195 * nPortIndex : Port that this structure applies to
196 * bEnableVFU : Enable/Disable video fast update
197 * nFirstGOB : Specifies the number of the first macroblock row
198 * nFirstMB : specifies the first MB relative to the specified first GOB
199 * nNumMBs : Specifies the number of MBs to be refreshed from nFirstGOB
202 typedef struct OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE {
204 OMX_VERSIONTYPE nVersion;
210 } OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE;
214 * Enumeration of possible bitrate control types
216 typedef enum OMX_VIDEO_CONTROLRATETYPE {
217 OMX_Video_ControlRateDisable,
218 OMX_Video_ControlRateVariable,
219 OMX_Video_ControlRateConstant,
220 OMX_Video_ControlRateVariableSkipFrames,
221 OMX_Video_ControlRateConstantSkipFrames,
222 OMX_Video_ControlRateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
223 OMX_Video_ControlRateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
224 OMX_Video_ControlRateMax = 0x7FFFFFFF
225 } OMX_VIDEO_CONTROLRATETYPE;
229 * Structure for configuring bitrate mode of a codec.
232 * nSize : Size of the struct in bytes
233 * nVersion : OMX spec version info
234 * nPortIndex : Port that this struct applies to
235 * eControlRate : Control rate type enum
236 * nTargetBitrate : Target bitrate to encode with
238 typedef struct OMX_VIDEO_PARAM_BITRATETYPE {
240 OMX_VERSIONTYPE nVersion;
242 OMX_VIDEO_CONTROLRATETYPE eControlRate;
243 OMX_U32 nTargetBitrate;
244 } OMX_VIDEO_PARAM_BITRATETYPE;
248 * Enumeration of possible motion vector (MV) types
250 typedef enum OMX_VIDEO_MOTIONVECTORTYPE {
251 OMX_Video_MotionVectorPixel,
252 OMX_Video_MotionVectorHalfPel,
253 OMX_Video_MotionVectorQuarterPel,
254 OMX_Video_MotionVectorEighthPel,
255 OMX_Video_MotionVectorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
256 OMX_Video_MotionVectorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
257 OMX_Video_MotionVectorMax = 0x7FFFFFFF
258 } OMX_VIDEO_MOTIONVECTORTYPE;
262 * Structure for configuring the number of motion vectors used as well
266 * nSize : Size of the struct in bytes
267 * nVersion : OMX spec version info
268 * nPortIndex : port that this structure applies to
269 * eAccuracy : Enumerated MV accuracy
270 * bUnrestrictedMVs : Allow unrestricted MVs
271 * bFourMV : Allow use of 4 MVs
272 * sXSearchRange : Search range in horizontal direction for MVs
273 * sYSearchRange : Search range in vertical direction for MVs
275 typedef struct OMX_VIDEO_PARAM_MOTIONVECTORTYPE {
277 OMX_VERSIONTYPE nVersion;
279 OMX_VIDEO_MOTIONVECTORTYPE eAccuracy;
280 OMX_BOOL bUnrestrictedMVs;
282 OMX_S32 sXSearchRange;
283 OMX_S32 sYSearchRange;
284 } OMX_VIDEO_PARAM_MOTIONVECTORTYPE;
288 * Enumeration of possible methods to use for Intra Refresh
290 typedef enum OMX_VIDEO_INTRAREFRESHTYPE {
291 OMX_VIDEO_IntraRefreshCyclic,
292 OMX_VIDEO_IntraRefreshAdaptive,
293 OMX_VIDEO_IntraRefreshBoth,
294 OMX_VIDEO_IntraRefreshKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
295 OMX_VIDEO_IntraRefreshVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
296 OMX_VIDEO_IntraRefreshMax = 0x7FFFFFFF
297 } OMX_VIDEO_INTRAREFRESHTYPE;
301 * Structure for configuring intra refresh mode
304 * nSize : Size of the structure in bytes
305 * nVersion : OMX specification version information
306 * nPortIndex : Port that this structure applies to
307 * eRefreshMode : Cyclic, Adaptive, or Both
308 * nAirMBs : Number of intra macroblocks to refresh in a frame when
310 * nAirRef : Number of times a motion marked macroblock has to be
312 * nCirMBs : Number of consecutive macroblocks to be coded as "intra"
313 * when CIR is enabled
315 typedef struct OMX_VIDEO_PARAM_INTRAREFRESHTYPE {
317 OMX_VERSIONTYPE nVersion;
319 OMX_VIDEO_INTRAREFRESHTYPE eRefreshMode;
323 } OMX_VIDEO_PARAM_INTRAREFRESHTYPE;
327 * Structure for enabling various error correction methods for video
331 * nSize : Size of the structure in bytes
332 * nVersion : OMX specification version information
333 * nPortIndex : Port that this structure applies to
334 * bEnableHEC : Enable/disable header extension codes (HEC)
335 * bEnableResync : Enable/disable resynchronization markers
336 * nResynchMarkerSpacing : Resynch markers interval (in bits) to be
337 * applied in the stream
338 * bEnableDataPartitioning : Enable/disable data partitioning
339 * bEnableRVLC : Enable/disable reversible variable length
342 typedef struct OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE {
344 OMX_VERSIONTYPE nVersion;
347 OMX_BOOL bEnableResync;
348 OMX_U32 nResynchMarkerSpacing;
349 OMX_BOOL bEnableDataPartitioning;
350 OMX_BOOL bEnableRVLC;
351 } OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE;
355 * Configuration of variable block-size motion compensation (VBSMC)
358 * nSize : Size of the structure in bytes
359 * nVersion : OMX specification version information
360 * nPortIndex : Port that this structure applies to
361 * b16x16 : Enable inter block search 16x16
362 * b16x8 : Enable inter block search 16x8
363 * b8x16 : Enable inter block search 8x16
364 * b8x8 : Enable inter block search 8x8
365 * b8x4 : Enable inter block search 8x4
366 * b4x8 : Enable inter block search 4x8
367 * b4x4 : Enable inter block search 4x4
369 typedef struct OMX_VIDEO_PARAM_VBSMCTYPE {
371 OMX_VERSIONTYPE nVersion;
380 } OMX_VIDEO_PARAM_VBSMCTYPE;
384 * H.263 profile types, each profile indicates support for various
385 * performance bounds and different annexes.
388 * Baseline : Baseline Profile: H.263 (V1), no optional modes
389 * H320 Coding : H.320 Coding Efficiency Backward Compatibility
390 * Profile: H.263+ (V2), includes annexes I, J, L.4
392 * BackwardCompatible : Backward Compatibility Profile: H.263 (V1),
394 * ISWV2 : Interactive Streaming Wireless Profile: H.263+
395 * (V2), includes annexes I, J, K and T
396 * ISWV3 : Interactive Streaming Wireless Profile: H.263++
397 * (V3), includes profile 3 and annexes V and W.6.3.8
398 * HighCompression : Conversational High Compression Profile: H.263++
399 * (V3), includes profiles 1 & 2 and annexes D and U
400 * Internet : Conversational Internet Profile: H.263++ (V3),
401 * includes profile 5 and annex K
402 * Interlace : Conversational Interlace Profile: H.263++ (V3),
403 * includes profile 5 and annex W.6.3.11
404 * HighLatency : High Latency Profile: H.263++ (V3), includes
405 * profile 6 and annexes O.1 and P.5
407 typedef enum OMX_VIDEO_H263PROFILETYPE {
408 OMX_VIDEO_H263ProfileBaseline = 0x01,
409 OMX_VIDEO_H263ProfileH320Coding = 0x02,
410 OMX_VIDEO_H263ProfileBackwardCompatible = 0x04,
411 OMX_VIDEO_H263ProfileISWV2 = 0x08,
412 OMX_VIDEO_H263ProfileISWV3 = 0x10,
413 OMX_VIDEO_H263ProfileHighCompression = 0x20,
414 OMX_VIDEO_H263ProfileInternet = 0x40,
415 OMX_VIDEO_H263ProfileInterlace = 0x80,
416 OMX_VIDEO_H263ProfileHighLatency = 0x100,
417 OMX_VIDEO_H263ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
418 OMX_VIDEO_H263ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
419 OMX_VIDEO_H263ProfileMax = 0x7FFFFFFF
420 } OMX_VIDEO_H263PROFILETYPE;
424 * H.263 level types, each level indicates support for various frame sizes,
425 * bit rates, decoder frame rates.
427 typedef enum OMX_VIDEO_H263LEVELTYPE {
428 OMX_VIDEO_H263Level10 = 0x01,
429 OMX_VIDEO_H263Level20 = 0x02,
430 OMX_VIDEO_H263Level30 = 0x04,
431 OMX_VIDEO_H263Level40 = 0x08,
432 OMX_VIDEO_H263Level45 = 0x10,
433 OMX_VIDEO_H263Level50 = 0x20,
434 OMX_VIDEO_H263Level60 = 0x40,
435 OMX_VIDEO_H263Level70 = 0x80,
436 OMX_VIDEO_H263LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
437 OMX_VIDEO_H263LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
438 OMX_VIDEO_H263LevelMax = 0x7FFFFFFF
439 } OMX_VIDEO_H263LEVELTYPE;
443 * Specifies the picture type. These values should be OR'd to signal all
444 * pictures types which are allowed.
447 * Generic Picture Types: I, P and B
448 * H.263 Specific Picture Types: SI and SP
449 * H.264 Specific Picture Types: EI and EP
450 * MPEG-4 Specific Picture Types: S
452 typedef enum OMX_VIDEO_PICTURETYPE {
453 OMX_VIDEO_PictureTypeI = 0x01,
454 OMX_VIDEO_PictureTypeP = 0x02,
455 OMX_VIDEO_PictureTypeB = 0x04,
456 OMX_VIDEO_PictureTypeSI = 0x08,
457 OMX_VIDEO_PictureTypeSP = 0x10,
458 OMX_VIDEO_PictureTypeEI = 0x11,
459 OMX_VIDEO_PictureTypeEP = 0x12,
460 OMX_VIDEO_PictureTypeS = 0x14,
461 OMX_VIDEO_PictureTypeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
462 OMX_VIDEO_PictureTypeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
463 OMX_VIDEO_PictureTypeMax = 0x7FFFFFFF
464 } OMX_VIDEO_PICTURETYPE;
471 * nSize : Size of the structure in bytes
472 * nVersion : OMX specification version information
473 * nPortIndex : Port that this structure applies to
474 * nPFrames : Number of P frames between each I frame
475 * nBFrames : Number of B frames between each I frame
476 * eProfile : H.263 profile(s) to use
477 * eLevel : H.263 level(s) to use
478 * bPLUSPTYPEAllowed : Indicating that it is allowed to use PLUSPTYPE
479 * (specified in the 1998 version of H.263) to
480 * indicate custom picture sizes or clock
482 * nAllowedPictureTypes : Specifies the picture types allowed in the
484 * bForceRoundingTypeToZero : value of the RTYPE bit (bit 6 of MPPTYPE) is
485 * not constrained. It is recommended to change
486 * the value of the RTYPE bit for each reference
487 * picture in error-free communication
488 * nPictureHeaderRepetition : Specifies the frequency of picture header
490 * nGOBHeaderInterval : Specifies the interval of non-empty GOB
491 * headers in units of GOBs
493 typedef struct OMX_VIDEO_PARAM_H263TYPE {
495 OMX_VERSIONTYPE nVersion;
499 OMX_VIDEO_H263PROFILETYPE eProfile;
500 OMX_VIDEO_H263LEVELTYPE eLevel;
501 OMX_BOOL bPLUSPTYPEAllowed;
502 OMX_U32 nAllowedPictureTypes;
503 OMX_BOOL bForceRoundingTypeToZero;
504 OMX_U32 nPictureHeaderRepetition;
505 OMX_U32 nGOBHeaderInterval;
506 } OMX_VIDEO_PARAM_H263TYPE;
510 * MPEG-2 profile types, each profile indicates support for various
511 * performance bounds and different annexes.
513 typedef enum OMX_VIDEO_MPEG2PROFILETYPE {
514 OMX_VIDEO_MPEG2ProfileSimple = 0, /**< Simple Profile */
515 OMX_VIDEO_MPEG2ProfileMain, /**< Main Profile */
516 OMX_VIDEO_MPEG2Profile422, /**< 4:2:2 Profile */
517 OMX_VIDEO_MPEG2ProfileSNR, /**< SNR Profile */
518 OMX_VIDEO_MPEG2ProfileSpatial, /**< Spatial Profile */
519 OMX_VIDEO_MPEG2ProfileHigh, /**< High Profile */
520 OMX_VIDEO_MPEG2ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
521 OMX_VIDEO_MPEG2ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
522 OMX_VIDEO_MPEG2ProfileMax = 0x7FFFFFFF
523 } OMX_VIDEO_MPEG2PROFILETYPE;
527 * MPEG-2 level types, each level indicates support for various frame
528 * sizes, bit rates, decoder frame rates. No need
530 typedef enum OMX_VIDEO_MPEG2LEVELTYPE {
531 OMX_VIDEO_MPEG2LevelLL = 0, /**< Low Level */
532 OMX_VIDEO_MPEG2LevelML, /**< Main Level */
533 OMX_VIDEO_MPEG2LevelH14, /**< High 1440 */
534 OMX_VIDEO_MPEG2LevelHL, /**< High Level */
535 OMX_VIDEO_MPEG2LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
536 OMX_VIDEO_MPEG2LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
537 OMX_VIDEO_MPEG2LevelMax = 0x7FFFFFFF
538 } OMX_VIDEO_MPEG2LEVELTYPE;
545 * nSize : Size of the structure in bytes
546 * nVersion : OMX specification version information
547 * nPortIndex : Port that this structure applies to
548 * nPFrames : Number of P frames between each I frame
549 * nBFrames : Number of B frames between each I frame
550 * eProfile : MPEG-2 profile(s) to use
551 * eLevel : MPEG-2 levels(s) to use
553 typedef struct OMX_VIDEO_PARAM_MPEG2TYPE {
555 OMX_VERSIONTYPE nVersion;
559 OMX_VIDEO_MPEG2PROFILETYPE eProfile;
560 OMX_VIDEO_MPEG2LEVELTYPE eLevel;
561 } OMX_VIDEO_PARAM_MPEG2TYPE;
565 * MPEG-4 profile types, each profile indicates support for various
566 * performance bounds and different annexes.
569 * - Simple Profile, Levels 1-3
570 * - Simple Scalable Profile, Levels 1-2
571 * - Core Profile, Levels 1-2
572 * - Main Profile, Levels 2-4
573 * - N-bit Profile, Level 2
574 * - Scalable Texture Profile, Level 1
575 * - Simple Face Animation Profile, Levels 1-2
576 * - Simple Face and Body Animation (FBA) Profile, Levels 1-2
577 * - Basic Animated Texture Profile, Levels 1-2
578 * - Hybrid Profile, Levels 1-2
579 * - Advanced Real Time Simple Profiles, Levels 1-4
580 * - Core Scalable Profile, Levels 1-3
581 * - Advanced Coding Efficiency Profile, Levels 1-4
582 * - Advanced Core Profile, Levels 1-2
583 * - Advanced Scalable Texture, Levels 2-3
585 typedef enum OMX_VIDEO_MPEG4PROFILETYPE {
586 OMX_VIDEO_MPEG4ProfileSimple = 0x01,
587 OMX_VIDEO_MPEG4ProfileSimpleScalable = 0x02,
588 OMX_VIDEO_MPEG4ProfileCore = 0x04,
589 OMX_VIDEO_MPEG4ProfileMain = 0x08,
590 OMX_VIDEO_MPEG4ProfileNbit = 0x10,
591 OMX_VIDEO_MPEG4ProfileScalableTexture = 0x20,
592 OMX_VIDEO_MPEG4ProfileSimpleFace = 0x40,
593 OMX_VIDEO_MPEG4ProfileSimpleFBA = 0x80,
594 OMX_VIDEO_MPEG4ProfileBasicAnimated = 0x100,
595 OMX_VIDEO_MPEG4ProfileHybrid = 0x200,
596 OMX_VIDEO_MPEG4ProfileAdvancedRealTime = 0x400,
597 OMX_VIDEO_MPEG4ProfileCoreScalable = 0x800,
598 OMX_VIDEO_MPEG4ProfileAdvancedCoding = 0x1000,
599 OMX_VIDEO_MPEG4ProfileAdvancedCore = 0x2000,
600 OMX_VIDEO_MPEG4ProfileAdvancedScalable = 0x4000,
601 OMX_VIDEO_MPEG4ProfileAdvancedSimple = 0x8000,
602 OMX_VIDEO_MPEG4ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
603 OMX_VIDEO_MPEG4ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
604 OMX_VIDEO_MPEG4ProfileMax = 0x7FFFFFFF
605 } OMX_VIDEO_MPEG4PROFILETYPE;
609 * MPEG-4 level types, each level indicates support for various frame
610 * sizes, bit rates, decoder frame rates. No need
612 typedef enum OMX_VIDEO_MPEG4LEVELTYPE {
613 OMX_VIDEO_MPEG4Level0 = 0x01, /**< Level 0 */
614 OMX_VIDEO_MPEG4Level0b = 0x02, /**< Level 0b */
615 OMX_VIDEO_MPEG4Level1 = 0x04, /**< Level 1 */
616 OMX_VIDEO_MPEG4Level2 = 0x08, /**< Level 2 */
617 OMX_VIDEO_MPEG4Level3 = 0x10, /**< Level 3 */
618 OMX_VIDEO_MPEG4Level4 = 0x20, /**< Level 4 */
619 OMX_VIDEO_MPEG4Level4a = 0x40, /**< Level 4a */
620 OMX_VIDEO_MPEG4Level5 = 0x80, /**< Level 5 */
621 OMX_VIDEO_MPEG4LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
622 OMX_VIDEO_MPEG4LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
623 OMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF
624 } OMX_VIDEO_MPEG4LEVELTYPE;
628 * MPEG-4 configuration. This structure handles configuration options
629 * which are specific to MPEG4 algorithms
632 * nSize : Size of the structure in bytes
633 * nVersion : OMX specification version information
634 * nPortIndex : Port that this structure applies to
635 * nSliceHeaderSpacing : Number of macroblocks between slice header (H263+
636 * Annex K). Put zero if not used
637 * bSVH : Enable Short Video Header mode
638 * bGov : Flag to enable GOV
639 * nPFrames : Number of P frames between each I frame (also called
641 * nBFrames : Number of B frames between each I frame
642 * nIDCVLCThreshold : Value of intra DC VLC threshold
643 * bACPred : Flag to use ac prediction
644 * nMaxPacketSize : Maximum size of packet in bytes.
645 * nTimeIncRes : Used to pass VOP time increment resolution for MPEG4.
646 * Interpreted as described in MPEG4 standard.
647 * eProfile : MPEG-4 profile(s) to use.
648 * eLevel : MPEG-4 level(s) to use.
649 * nAllowedPictureTypes : Specifies the picture types allowed in the bitstream
650 * nHeaderExtension : Specifies the number of consecutive video packet
651 * headers within a VOP
652 * bReversibleVLC : Specifies whether reversible variable length coding
655 typedef struct OMX_VIDEO_PARAM_MPEG4TYPE {
657 OMX_VERSIONTYPE nVersion;
659 OMX_U32 nSliceHeaderSpacing;
664 OMX_U32 nIDCVLCThreshold;
666 OMX_U32 nMaxPacketSize;
668 OMX_VIDEO_MPEG4PROFILETYPE eProfile;
669 OMX_VIDEO_MPEG4LEVELTYPE eLevel;
670 OMX_U32 nAllowedPictureTypes;
671 OMX_U32 nHeaderExtension;
672 OMX_BOOL bReversibleVLC;
673 } OMX_VIDEO_PARAM_MPEG4TYPE;
679 typedef enum OMX_VIDEO_WMVFORMATTYPE {
680 OMX_VIDEO_WMVFormatUnused = 0x01, /**< Format unused or unknown */
681 OMX_VIDEO_WMVFormat7 = 0x02, /**< Windows Media Video format 7 */
682 OMX_VIDEO_WMVFormat8 = 0x04, /**< Windows Media Video format 8 */
683 OMX_VIDEO_WMVFormat9 = 0x08, /**< Windows Media Video format 9 */
684 OMX_VIDEO_WMFFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
685 OMX_VIDEO_WMFFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
686 OMX_VIDEO_WMVFormatMax = 0x7FFFFFFF
687 } OMX_VIDEO_WMVFORMATTYPE;
694 * nSize : Size of the structure in bytes
695 * nVersion : OMX specification version information
696 * nPortIndex : Port that this structure applies to
697 * eFormat : Version of WMV stream / data
699 typedef struct OMX_VIDEO_PARAM_WMVTYPE {
701 OMX_VERSIONTYPE nVersion;
703 OMX_VIDEO_WMVFORMATTYPE eFormat;
704 } OMX_VIDEO_PARAM_WMVTYPE;
710 typedef enum OMX_VIDEO_RVFORMATTYPE {
711 OMX_VIDEO_RVFormatUnused = 0, /**< Format unused or unknown */
712 OMX_VIDEO_RVFormat8, /**< Real Video format 8 */
713 OMX_VIDEO_RVFormat9, /**< Real Video format 9 */
714 OMX_VIDEO_RVFormatG2, /**< Real Video Format G2 */
715 OMX_VIDEO_RVFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
716 OMX_VIDEO_RVFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
717 OMX_VIDEO_RVFormatMax = 0x7FFFFFFF
718 } OMX_VIDEO_RVFORMATTYPE;
725 * nSize : Size of the structure in bytes
726 * nVersion : OMX specification version information
727 * nPortIndex : Port that this structure applies to
728 * eFormat : Version of RV stream / data
729 * nBitsPerPixel : Bits per pixel coded in the frame
730 * nPaddedWidth : Padded width in pixel of a video frame
731 * nPaddedHeight : Padded Height in pixels of a video frame
732 * nFrameRate : Rate of video in frames per second
733 * nBitstreamFlags : Flags which internal information about the bitstream
734 * nBitstreamVersion : Bitstream version
735 * nMaxEncodeFrameSize: Max encoded frame size
736 * bEnablePostFilter : Turn on/off post filter
737 * bEnableTemporalInterpolation : Turn on/off temporal interpolation
738 * bEnableLatencyMode : When enabled, the decoder does not display a decoded
739 * frame until it has detected that no enhancement layer
740 * frames or dependent B frames will be coming. This
741 * detection usually occurs when a subsequent non-B
742 * frame is encountered
744 typedef struct OMX_VIDEO_PARAM_RVTYPE {
746 OMX_VERSIONTYPE nVersion;
748 OMX_VIDEO_RVFORMATTYPE eFormat;
749 OMX_U16 nBitsPerPixel;
750 OMX_U16 nPaddedWidth;
751 OMX_U16 nPaddedHeight;
753 OMX_U32 nBitstreamFlags;
754 OMX_U32 nBitstreamVersion;
755 OMX_U32 nMaxEncodeFrameSize;
756 OMX_BOOL bEnablePostFilter;
757 OMX_BOOL bEnableTemporalInterpolation;
758 OMX_BOOL bEnableLatencyMode;
759 } OMX_VIDEO_PARAM_RVTYPE;
763 * AVC profile types, each profile indicates support for various
764 * performance bounds and different annexes.
766 typedef enum OMX_VIDEO_AVCPROFILETYPE {
767 OMX_VIDEO_AVCProfileBaseline = 0x01, /**< Baseline profile */
768 OMX_VIDEO_AVCProfileMain = 0x02, /**< Main profile */
769 OMX_VIDEO_AVCProfileExtended = 0x04, /**< Extended profile */
770 OMX_VIDEO_AVCProfileHigh = 0x08, /**< High profile */
771 OMX_VIDEO_AVCProfileHigh10 = 0x10, /**< High 10 profile */
772 OMX_VIDEO_AVCProfileHigh422 = 0x20, /**< High 4:2:2 profile */
773 OMX_VIDEO_AVCProfileHigh444 = 0x40, /**< High 4:4:4 profile */
774 OMX_VIDEO_AVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
775 OMX_VIDEO_AVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
776 OMX_VIDEO_AVCProfileMax = 0x7FFFFFFF
777 } OMX_VIDEO_AVCPROFILETYPE;
781 * AVC level types, each level indicates support for various frame sizes,
782 * bit rates, decoder frame rates. No need
784 typedef enum OMX_VIDEO_AVCLEVELTYPE {
785 OMX_VIDEO_AVCLevel1 = 0x01, /**< Level 1 */
786 OMX_VIDEO_AVCLevel1b = 0x02, /**< Level 1b */
787 OMX_VIDEO_AVCLevel11 = 0x04, /**< Level 1.1 */
788 OMX_VIDEO_AVCLevel12 = 0x08, /**< Level 1.2 */
789 OMX_VIDEO_AVCLevel13 = 0x10, /**< Level 1.3 */
790 OMX_VIDEO_AVCLevel2 = 0x20, /**< Level 2 */
791 OMX_VIDEO_AVCLevel21 = 0x40, /**< Level 2.1 */
792 OMX_VIDEO_AVCLevel22 = 0x80, /**< Level 2.2 */
793 OMX_VIDEO_AVCLevel3 = 0x100, /**< Level 3 */
794 OMX_VIDEO_AVCLevel31 = 0x200, /**< Level 3.1 */
795 OMX_VIDEO_AVCLevel32 = 0x400, /**< Level 3.2 */
796 OMX_VIDEO_AVCLevel4 = 0x800, /**< Level 4 */
797 OMX_VIDEO_AVCLevel41 = 0x1000, /**< Level 4.1 */
798 OMX_VIDEO_AVCLevel42 = 0x2000, /**< Level 4.2 */
799 OMX_VIDEO_AVCLevel5 = 0x4000, /**< Level 5 */
800 OMX_VIDEO_AVCLevel51 = 0x8000, /**< Level 5.1 */
801 OMX_VIDEO_AVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
802 OMX_VIDEO_AVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
803 OMX_VIDEO_AVCLevelMax = 0x7FFFFFFF
804 } OMX_VIDEO_AVCLEVELTYPE;
808 * AVC loop filter modes
810 * OMX_VIDEO_AVCLoopFilterEnable : Enable
811 * OMX_VIDEO_AVCLoopFilterDisable : Disable
812 * OMX_VIDEO_AVCLoopFilterDisableSliceBoundary : Disabled on slice boundaries
814 typedef enum OMX_VIDEO_AVCLOOPFILTERTYPE {
815 OMX_VIDEO_AVCLoopFilterEnable = 0,
816 OMX_VIDEO_AVCLoopFilterDisable,
817 OMX_VIDEO_AVCLoopFilterDisableSliceBoundary,
818 OMX_VIDEO_AVCLoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
819 OMX_VIDEO_AVCLoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
820 OMX_VIDEO_AVCLoopFilterMax = 0x7FFFFFFF
821 } OMX_VIDEO_AVCLOOPFILTERTYPE;
828 * nSize : Size of the structure in bytes
829 * nVersion : OMX specification version information
830 * nPortIndex : Port that this structure applies to
831 * nSliceHeaderSpacing : Number of macroblocks between slice header, put
833 * nPFrames : Number of P frames between each I frame
834 * nBFrames : Number of B frames between each I frame
835 * bUseHadamard : Enable/disable Hadamard transform
836 * nRefFrames : Max number of reference frames to use for inter
837 * motion search (1-16)
838 * nRefIdxTrailing : Pic param set ref frame index (index into ref
839 * frame buffer of trailing frames list), B frame
841 * nRefIdxForward : Pic param set ref frame index (index into ref
842 * frame buffer of forward frames list), B frame
844 * bEnableUEP : Enable/disable unequal error protection. This
845 * is only valid of data partitioning is enabled.
846 * bEnableFMO : Enable/disable flexible macroblock ordering
847 * bEnableASO : Enable/disable arbitrary slice ordering
848 * bEnableRS : Enable/disable sending of redundant slices
849 * eProfile : AVC profile(s) to use
850 * eLevel : AVC level(s) to use
851 * nAllowedPictureTypes : Specifies the picture types allowed in the
853 * bFrameMBsOnly : specifies that every coded picture of the
854 * coded video sequence is a coded frame
855 * containing only frame macroblocks
856 * bMBAFF : Enable/disable switching between frame and
857 * field macroblocks within a picture
858 * bEntropyCodingCABAC : Entropy decoding method to be applied for the
859 * syntax elements for which two descriptors appear
860 * in the syntax tables
861 * bWeightedPPrediction : Enable/disable weighted prediction shall not
862 * be applied to P and SP slices
863 * nWeightedBipredicitonMode : Default weighted prediction is applied to B
865 * bconstIpred : Enable/disable intra prediction
866 * bDirect8x8Inference : Specifies the method used in the derivation
867 * process for luma motion vectors for B_Skip,
868 * B_Direct_16x16 and B_Direct_8x8 as specified
869 * in subclause 8.4.1.2 of the AVC spec
870 * bDirectSpatialTemporal : Flag indicating spatial or temporal direct
871 * mode used in B slice coding (related to
872 * bDirect8x8Inference) . Spatial direct mode is
873 * more common and should be the default.
874 * nCabacInitIdx : Index used to init CABAC contexts
875 * eLoopFilterMode : Enable/disable loop filter
877 typedef struct OMX_VIDEO_PARAM_AVCTYPE {
879 OMX_VERSIONTYPE nVersion;
881 OMX_U32 nSliceHeaderSpacing;
884 OMX_BOOL bUseHadamard;
886 OMX_U32 nRefIdx10ActiveMinus1;
887 OMX_U32 nRefIdx11ActiveMinus1;
892 OMX_VIDEO_AVCPROFILETYPE eProfile;
893 OMX_VIDEO_AVCLEVELTYPE eLevel;
894 OMX_U32 nAllowedPictureTypes;
895 OMX_BOOL bFrameMBsOnly;
897 OMX_BOOL bEntropyCodingCABAC;
898 OMX_BOOL bWeightedPPrediction;
899 OMX_U32 nWeightedBipredicitonMode;
900 OMX_BOOL bconstIpred ;
901 OMX_BOOL bDirect8x8Inference;
902 OMX_BOOL bDirectSpatialTemporal;
903 OMX_U32 nCabacInitIdc;
904 OMX_VIDEO_AVCLOOPFILTERTYPE eLoopFilterMode;
905 } OMX_VIDEO_PARAM_AVCTYPE;
907 typedef struct OMX_VIDEO_PARAM_PROFILELEVELTYPE {
909 OMX_VERSIONTYPE nVersion;
911 OMX_U32 eProfile; /**< type is OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263PROFILETYPE,
912 or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
913 OMX_U32 eLevel; /**< type is OMX_VIDEO_AVCLEVELTYPE, OMX_VIDEO_H263LEVELTYPE,
914 or OMX_VIDEO_MPEG4PROFILETYPE depending on context */
915 OMX_U32 nProfileIndex; /**< Used to query for individual profile support information,
916 This parameter is valid only for
917 OMX_IndexParamVideoProfileLevelQuerySupported index,
918 For all other indices this parameter is to be ignored. */
919 } OMX_VIDEO_PARAM_PROFILELEVELTYPE;
922 * Structure for dynamically configuring bitrate mode of a codec.
925 * nSize : Size of the struct in bytes
926 * nVersion : OMX spec version info
927 * nPortIndex : Port that this struct applies to
928 * nEncodeBitrate : Target average bitrate to be generated in bps
930 typedef struct OMX_VIDEO_CONFIG_BITRATETYPE {
932 OMX_VERSIONTYPE nVersion;
934 OMX_U32 nEncodeBitrate;
935 } OMX_VIDEO_CONFIG_BITRATETYPE;
938 * Defines Encoder Frame Rate setting
941 * nSize : Size of the structure in bytes
942 * nVersion : OMX specification version information
943 * nPortIndex : Port that this structure applies to
944 * xEncodeFramerate : Encoding framerate represented in Q16 format
946 typedef struct OMX_CONFIG_FRAMERATETYPE {
948 OMX_VERSIONTYPE nVersion;
950 OMX_U32 xEncodeFramerate; /* Q16 format */
951 } OMX_CONFIG_FRAMERATETYPE;
953 typedef struct OMX_CONFIG_INTRAREFRESHVOPTYPE {
955 OMX_VERSIONTYPE nVersion;
957 OMX_BOOL IntraRefreshVOP;
958 } OMX_CONFIG_INTRAREFRESHVOPTYPE;
960 typedef struct OMX_CONFIG_MACROBLOCKERRORMAPTYPE {
962 OMX_VERSIONTYPE nVersion;
964 OMX_U32 nErrMapSize; /* Size of the Error Map in bytes */
965 OMX_U8 ErrMap[1]; /* Error map hint */
966 } OMX_CONFIG_MACROBLOCKERRORMAPTYPE;
968 typedef struct OMX_CONFIG_MBERRORREPORTINGTYPE {
970 OMX_VERSIONTYPE nVersion;
973 } OMX_CONFIG_MBERRORREPORTINGTYPE;
975 typedef struct OMX_PARAM_MACROBLOCKSTYPE {
977 OMX_VERSIONTYPE nVersion;
979 OMX_U32 nMacroblocks;
980 } OMX_PARAM_MACROBLOCKSTYPE;
983 * AVC Slice Mode modes
985 * OMX_VIDEO_SLICEMODE_AVCDefault : Normal frame encoding, one slice per frame
986 * OMX_VIDEO_SLICEMODE_AVCMBSlice : NAL mode, number of MBs per frame
987 * OMX_VIDEO_SLICEMODE_AVCByteSlice : NAL mode, number of bytes per frame
989 typedef enum OMX_VIDEO_AVCSLICEMODETYPE {
990 OMX_VIDEO_SLICEMODE_AVCDefault = 0,
991 OMX_VIDEO_SLICEMODE_AVCMBSlice,
992 OMX_VIDEO_SLICEMODE_AVCByteSlice,
993 OMX_VIDEO_SLICEMODE_AVCKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
994 OMX_VIDEO_SLICEMODE_AVCVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
995 OMX_VIDEO_SLICEMODE_AVCLevelMax = 0x7FFFFFFF
996 } OMX_VIDEO_AVCSLICEMODETYPE;
999 * AVC FMO Slice Mode Params
1002 * nSize : Size of the structure in bytes
1003 * nVersion : OMX specification version information
1004 * nPortIndex : Port that this structure applies to
1005 * nNumSliceGroups : Specifies the number of slice groups
1006 * nSliceGroupMapType : Specifies the type of slice groups
1007 * eSliceMode : Specifies the type of slice
1009 typedef struct OMX_VIDEO_PARAM_AVCSLICEFMO {
1011 OMX_VERSIONTYPE nVersion;
1013 OMX_U8 nNumSliceGroups;
1014 OMX_U8 nSliceGroupMapType;
1015 OMX_VIDEO_AVCSLICEMODETYPE eSliceMode;
1016 } OMX_VIDEO_PARAM_AVCSLICEFMO;
1019 * AVC IDR Period Configs
1022 * nSize : Size of the structure in bytes
1023 * nVersion : OMX specification version information
1024 * nPortIndex : Port that this structure applies to
1025 * nIDRPeriod : Specifies periodicity of IDR frames
1026 * nPFrames : Specifies internal of coding Intra frames
1028 typedef struct OMX_VIDEO_CONFIG_AVCINTRAPERIOD {
1030 OMX_VERSIONTYPE nVersion;
1034 } OMX_VIDEO_CONFIG_AVCINTRAPERIOD;
1037 * AVC NAL Size Configs
1040 * nSize : Size of the structure in bytes
1041 * nVersion : OMX specification version information
1042 * nPortIndex : Port that this structure applies to
1043 * nNaluBytes : Specifies the NAL unit size
1045 typedef struct OMX_VIDEO_CONFIG_NALSIZE {
1047 OMX_VERSIONTYPE nVersion;
1050 } OMX_VIDEO_CONFIG_NALSIZE;
1056 #endif /* __cplusplus */