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