1 /*-------------------------------------------------------------------------- 2 Copyright (c) 2009-2017, The Linux Foundation. All rights reserved. 3 4 Redistribution and use in source and binary forms, with or without 5 modification, are permitted provided that the following conditions are met: 6 * Redistributions of source code must retain the above copyright 7 notice, this list of conditions and the following disclaimer. 8 * Redistributions in binary form must reproduce the above copyright 9 notice, this list of conditions and the following disclaimer in the 10 documentation and/or other materials provided with the distribution. 11 * Neither the name of The Linux Foundation nor 12 the names of its contributors may be used to endorse or promote 13 products derived from this software without specific prior written 14 permission. 15 16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 20 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 --------------------------------------------------------------------------*/ 28 #ifndef __OMX_QCOM_EXTENSIONS_H__ 29 #define __OMX_QCOM_EXTENSIONS_H__ 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif /* __cplusplus */ 34 35 /*============================================================================ 36 *//** @file OMX_QCOMExtns.h 37 This header contains constants and type definitions that specify the 38 extensions added to the OpenMAX Vendor specific APIs. 39 40 *//*========================================================================*/ 41 42 43 /////////////////////////////////////////////////////////////////////////////// 44 // Include Files 45 /////////////////////////////////////////////////////////////////////////////// 46 #include "OMX_Core.h" 47 #include "OMX_Video.h" 48 49 #define OMX_VIDEO_MAX_HP_LAYERS 6 50 51 /** 52 * These MACROS used by Camera and Video to decide buffer count. 53 * This is to avoid mismatch of buffer count between Camera and Video. 54 * In Meta mode, read this count as buffer count in Camera and Header 55 * count in Video. 56 * 1) Number of buffers in Non-DCVS mode. 57 * 2) DCVS resolution. 58 * 3) Buffer count when Current resolution is greater than DCVS resolution 59 * defined in 2) 60 */ 61 62 #define OMX_VIDEO_MIN_CAMERA_BUFFERS 9 63 #define OMX_VIDEO_ENC_DCVS_RESOLUTION 3840 * 2160 64 #define OMX_VIDEO_MIN_CAMERA_BUFFERS_DCVS 11 65 66 /** 67 * This count indicates the number of Ints in the legacy Camera payload 68 * used for HAL1 69 */ 70 71 #define VIDEO_METADATA_NUM_COMMON_INTS 1 72 73 /** 74 * This extension is used to register mapping of a virtual 75 * address to a physical address. This extension is a parameter 76 * which can be set using the OMX_SetParameter macro. The data 77 * pointer corresponding to this extension is 78 * OMX_QCOM_MemMapEntry. This parameter is a 'write only' 79 * parameter (Current value cannot be queried using 80 * OMX_GetParameter macro). 81 */ 82 #define OMX_QCOM_EXTN_REGISTER_MMAP "OMX.QCOM.index.param.register_mmap" 83 84 /** 85 * This structure describes the data pointer corresponding to 86 * the OMX_QCOM_MMAP_REGISTER_EXTN extension. This parameter 87 * must be set only 'after' populating a port with a buffer 88 * using OMX_UseBuffer, wherein the data pointer of the buffer 89 * corresponds to the virtual address as specified in this 90 * structure. 91 */ 92 struct OMX_QCOM_PARAM_MEMMAPENTRYTYPE 93 { 94 OMX_U32 nSize; /** Size of the structure in bytes */ 95 OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ 96 OMX_U32 nPortIndex; /**< Port number the structure applies to */ 97 98 /** 99 * The virtual address of memory block 100 */ 101 OMX_U64 nVirtualAddress; 102 103 /** 104 * The physical address corresponding to the virtual address. The physical 105 * address is contiguous for the entire valid range of the virtual 106 * address. 107 */ 108 OMX_U64 nPhysicalAddress; 109 }; 110 111 #define QOMX_VIDEO_IntraRefreshRandom (OMX_VIDEO_IntraRefreshVendorStartUnused + 0) 112 113 /* This error event is used for H.264 long-term reference (LTR) encoding. 114 * When IL client specifies an LTR frame with its identifier via 115 * OMX_QCOM_INDEX_CONFIG_VIDEO_LTRUSE to the encoder, if the specified 116 * LTR frame can not be located by the encoder in its LTR list, the encoder 117 * issues this error event to IL client to notify the failure of LTRUse config. 118 */ 119 #define QOMX_ErrorLTRUseFailed (OMX_ErrorVendorStartUnused + 1) 120 121 /* 122 * This rate control will be used for low bitrate applications to get better 123 * video quality for a given bitrate. 124 */ 125 #define QOMX_Video_ControlRateMaxBitrate (OMX_Video_ControlRateVendorStartUnused + 1) 126 127 #define QOMX_Video_ControlRateMaxBitrateSkipFrames (OMX_Video_ControlRateVendorStartUnused + 2) 128 129 #define QOMX_VIDEO_BUFFERFLAG_BFRAME 0x00100000 130 131 #define QOMX_VIDEO_BUFFERFLAG_EOSEQ 0x00200000 132 133 #define QOMX_VIDEO_BUFFERFLAG_MBAFF 0x00400000 134 135 #define QOMX_VIDEO_BUFFERFLAG_CANCEL 0x00800000 136 137 #define OMX_QCOM_PORTDEFN_EXTN "OMX.QCOM.index.param.portdefn" 138 /* Allowed APIs on the above Index: OMX_GetParameter() and OMX_SetParameter() */ 139 140 typedef enum OMX_QCOMMemoryRegion 141 { 142 OMX_QCOM_MemRegionInvalid, 143 OMX_QCOM_MemRegionEBI1, 144 OMX_QCOM_MemRegionSMI, 145 OMX_QCOM_MemRegionMax = 0X7FFFFFFF 146 } OMX_QCOMMemoryRegion; 147 148 typedef enum OMX_QCOMCacheAttr 149 { 150 OMX_QCOM_CacheAttrNone, 151 OMX_QCOM_CacheAttrWriteBack, 152 OMX_QCOM_CacheAttrWriteThrough, 153 OMX_QCOM_CacheAttrMAX = 0X7FFFFFFF 154 } OMX_QCOMCacheAttr; 155 156 typedef struct OMX_QCOMRectangle 157 { 158 OMX_S32 x; 159 OMX_S32 y; 160 OMX_S32 dx; 161 OMX_S32 dy; 162 } OMX_QCOMRectangle; 163 164 /** OMX_QCOMFramePackingFormat 165 * Input or output buffer format 166 */ 167 typedef enum OMX_QCOMFramePackingFormat 168 { 169 /* 0 - unspecified 170 */ 171 OMX_QCOM_FramePacking_Unspecified, 172 173 /* 1 - Partial frames may be present OMX IL 1.1.1 Figure 2-10: 174 * Case 1??Each Buffer Filled In Whole or In Part 175 */ 176 OMX_QCOM_FramePacking_Arbitrary, 177 178 /* 2 - Multiple complete frames per buffer (integer number) 179 * OMX IL 1.1.1 Figure 2-11: Case 2�Each Buffer Filled with 180 * Only Complete Frames of Data 181 */ 182 OMX_QCOM_FramePacking_CompleteFrames, 183 184 /* 3 - Only one complete frame per buffer, no partial frame 185 * OMX IL 1.1.1 Figure 2-12: Case 3�Each Buffer Filled with 186 * Only One Frame of Compressed Data. Usually at least one 187 * complete unit of data will be delivered in a buffer for 188 * uncompressed data formats. 189 */ 190 OMX_QCOM_FramePacking_OnlyOneCompleteFrame, 191 192 /* 4 - Only one complete subframe per buffer, no partial subframe 193 * Example: In H264, one complete NAL per buffer, where one frame 194 * can contatin multiple NAL 195 */ 196 OMX_QCOM_FramePacking_OnlyOneCompleteSubFrame, 197 198 OMX_QCOM_FramePacking_MAX = 0X7FFFFFFF 199 } OMX_QCOMFramePackingFormat; 200 201 typedef struct OMX_QCOM_PARAM_PORTDEFINITIONTYPE { 202 OMX_U32 nSize; /** Size of the structure in bytes */ 203 OMX_VERSIONTYPE nVersion;/** OMX specification version information */ 204 OMX_U32 nPortIndex; /** Portindex which is extended by this structure */ 205 206 /** Platform specific memory region EBI1, SMI, etc.,*/ 207 OMX_QCOMMemoryRegion nMemRegion; 208 209 OMX_QCOMCacheAttr nCacheAttr; /** Cache attributes */ 210 211 /** Input or output buffer format */ 212 OMX_U32 nFramePackingFormat; 213 214 } OMX_QCOM_PARAM_PORTDEFINITIONTYPE; 215 216 typedef struct OMX_QCOM_VIDEO_PARAM_QPRANGETYPE { 217 OMX_U32 nSize; 218 OMX_VERSIONTYPE nVersion; 219 OMX_U32 nPortIndex; 220 OMX_U32 minQP; 221 OMX_U32 maxQP; 222 } OMX_QCOM_VIDEO_PARAM_QPRANGETYPE; 223 224 typedef struct OMX_QCOM_VIDEO_PARAM_IPB_QPRANGETYPE { 225 OMX_U32 nSize; 226 OMX_VERSIONTYPE nVersion; 227 OMX_U32 nPortIndex; 228 OMX_U32 minIQP; 229 OMX_U32 maxIQP; 230 OMX_U32 minPQP; 231 OMX_U32 maxPQP; 232 OMX_U32 minBQP; 233 OMX_U32 maxBQP; 234 } OMX_QCOM_VIDEO_PARAM_IPB_QPRANGETYPE; 235 236 #define OMX_QCOM_PLATFORMPVT_EXTN "OMX.QCOM.index.param.platformprivate" 237 /** Allowed APIs on the above Index: OMX_SetParameter() */ 238 239 typedef enum OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE 240 { 241 /** Enum for PMEM information */ 242 OMX_QCOM_PLATFORM_PRIVATE_PMEM = 0x1 243 } OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE; 244 245 /** IL client will set the following structure. A failure 246 * code will be returned if component does not support the 247 * value provided for 'type'. 248 */ 249 struct OMX_QCOM_PLATFORMPRIVATE_EXTN 250 { 251 OMX_U32 nSize; /** Size of the structure in bytes */ 252 OMX_VERSIONTYPE nVersion; /** OMX spec version information */ 253 OMX_U32 nPortIndex; /** Port number on which usebuffer extn is applied */ 254 255 /** Type of extensions should match an entry from 256 OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE 257 */ 258 OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE type; 259 }; 260 261 typedef struct OMX_QCOM_PLATFORM_PRIVATE_PMEM_INFO 262 { 263 /** pmem file descriptor */ 264 unsigned long pmem_fd; 265 /** Offset from pmem device base address */ 266 OMX_U32 offset; 267 OMX_U32 size; 268 OMX_U32 mapped_size; 269 OMX_PTR buffer; 270 }OMX_QCOM_PLATFORM_PRIVATE_PMEM_INFO; 271 272 typedef struct OMX_QCOM_PLATFORM_PRIVATE_ENTRY 273 { 274 /** Entry type */ 275 OMX_QCOM_PLATFORM_PRIVATE_ENTRY_TYPE type; 276 277 /** Pointer to platform specific entry */ 278 OMX_PTR entry; 279 }OMX_QCOM_PLATFORM_PRIVATE_ENTRY; 280 281 typedef struct OMX_QCOM_PLATFORM_PRIVATE_LIST 282 { 283 /** Number of entries */ 284 OMX_U32 nEntries; 285 286 /** Pointer to array of platform specific entries * 287 * Contiguous block of OMX_QCOM_PLATFORM_PRIVATE_ENTRY element 288 */ 289 OMX_QCOM_PLATFORM_PRIVATE_ENTRY* entryList; 290 }OMX_QCOM_PLATFORM_PRIVATE_LIST; 291 292 #define OMX_QCOM_FRAME_PACKING_FORMAT "OMX.QCOM.index.param.framepackfmt" 293 /* Allowed API call: OMX_GetParameter() */ 294 /* IL client can use this index to rerieve the list of frame formats * 295 * supported by the component */ 296 297 typedef struct OMX_QCOM_FRAME_PACKINGFORMAT_TYPE { 298 OMX_U32 nSize; 299 OMX_VERSIONTYPE nVersion; 300 OMX_U32 nPortIndex; 301 OMX_U32 nIndex; 302 OMX_QCOMFramePackingFormat eframePackingFormat; 303 } OMX_QCOM_FRAME_PACKINGFORMAT_TYPE; 304 305 306 /** 307 * Following is the enum for color formats supported on Qualcomm 308 * MSMs YVU420SemiPlanar color format is not defined in OpenMAX 309 * 1.1.1 and prior versions of OpenMAX specification. 310 */ 311 312 enum OMX_QCOM_COLOR_FORMATTYPE 313 { 314 315 /** YVU420SemiPlanar: YVU planar format, organized with a first 316 * plane containing Y pixels, and a second plane containing 317 * interleaved V and U pixels. V and U pixels are sub-sampled 318 * by a factor of two both horizontally and vertically. 319 */ 320 QOMX_COLOR_FormatYVU420SemiPlanar = 0x7FA30C00, 321 QOMX_COLOR_FormatYVU420PackedSemiPlanar32m4ka, 322 QOMX_COLOR_FormatYUV420PackedSemiPlanar16m2ka, 323 QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka, 324 QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m, 325 QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mMultiView, 326 QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mCompressed, 327 QOMX_COLOR_Format32bitRGBA8888, 328 QOMX_COLOR_Format32bitRGBA8888Compressed, 329 QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m10bitCompressed, 330 QOMX_COLOR_FormatAndroidOpaque = (OMX_COLOR_FORMATTYPE) OMX_COLOR_FormatVendorStartUnused + 0x789, 331 }; 332 333 enum OMX_QCOM_VIDEO_CODINGTYPE 334 { 335 /** Codecs support by qualcomm which are not listed in OMX 1.1.x 336 * spec 337 * */ 338 OMX_QCOM_VIDEO_CodingVC1 = 0x7FA30C00 , 339 OMX_QCOM_VIDEO_CodingWMV9 = 0x7FA30C01, 340 QOMX_VIDEO_CodingDivx = 0x7FA30C02, /**< Value when coding is Divx */ 341 QOMX_VIDEO_CodingSpark = 0x7FA30C03, /**< Value when coding is Sorenson Spark */ 342 QOMX_VIDEO_CodingVp = 0x7FA30C04, 343 QOMX_VIDEO_CodingVp8 = OMX_VIDEO_CodingVP8, /**< keeping old enum for backwards compatibility*/ 344 QOMX_VIDEO_CodingHevc = OMX_VIDEO_CodingHEVC, /**< keeping old enum for backwards compatibility*/ 345 QOMX_VIDEO_CodingMVC = 0x7FA30C07, 346 QOMX_VIDEO_CodingVp9 = OMX_VIDEO_CodingVP9, /**< keeping old enum for backwards compatibility*/ 347 }; 348 349 enum OMX_QCOM_EXTN_INDEXTYPE 350 { 351 /** Qcom proprietary extension index list */ 352 353 /* "OMX.QCOM.index.param.register_mmap" */ 354 OMX_QcomIndexRegmmap = 0x7F000000, 355 356 /* "OMX.QCOM.index.param.platformprivate" */ 357 OMX_QcomIndexPlatformPvt = 0x7F000001, 358 359 /* "OMX.QCOM.index.param.portdefn" */ 360 OMX_QcomIndexPortDefn = 0x7F000002, 361 362 /* "OMX.QCOM.index.param.framepackingformat" */ 363 OMX_QcomIndexPortFramePackFmt = 0x7F000003, 364 365 /*"OMX.QCOM.index.param.Interlaced */ 366 OMX_QcomIndexParamInterlaced = 0x7F000004, 367 368 /*"OMX.QCOM.index.config.interlaceformat */ 369 OMX_QcomIndexConfigInterlaced = 0x7F000005, 370 371 /*"OMX.QCOM.index.param.syntaxhdr" */ 372 QOMX_IndexParamVideoSyntaxHdr = 0x7F000006, 373 374 /*"OMX.QCOM.index.config.intraperiod" */ 375 QOMX_IndexConfigVideoIntraperiod = 0x7F000007, 376 377 /*"OMX.QCOM.index.config.randomIntrarefresh" */ 378 QOMX_IndexConfigVideoIntraRefresh = 0x7F000008, 379 380 /*"OMX.QCOM.index.config.video.TemporalSpatialTradeOff" */ 381 QOMX_IndexConfigVideoTemporalSpatialTradeOff = 0x7F000009, 382 383 /*"OMX.QCOM.index.param.video.EncoderMode" */ 384 QOMX_IndexParamVideoEncoderMode = 0x7F00000A, 385 386 /*"OMX.QCOM.index.param.Divxtype */ 387 OMX_QcomIndexParamVideoDivx = 0x7F00000B, 388 389 /*"OMX.QCOM.index.param.Sparktype */ 390 OMX_QcomIndexParamVideoSpark = 0x7F00000C, 391 392 /*"OMX.QCOM.index.param.Vptype */ 393 OMX_QcomIndexParamVideoVp = 0x7F00000D, 394 395 OMX_QcomIndexQueryNumberOfVideoDecInstance = 0x7F00000E, 396 397 OMX_QcomIndexParamVideoSyncFrameDecodingMode = 0x7F00000F, 398 399 OMX_QcomIndexParamVideoDecoderPictureOrder = 0x7F000010, 400 401 /* "OMX.QCOM.index.config.video.FramePackingInfo" */ 402 OMX_QcomIndexConfigVideoFramePackingArrangement = 0x7F000011, 403 404 OMX_QcomIndexParamConcealMBMapExtraData = 0x7F000012, 405 406 OMX_QcomIndexParamFrameInfoExtraData = 0x7F000013, 407 408 OMX_QcomIndexParamInterlaceExtraData = 0x7F000014, 409 410 OMX_QcomIndexParamH264TimeInfo = 0x7F000015, 411 412 OMX_QcomIndexParamIndexExtraDataType = 0x7F000016, 413 414 OMX_GoogleAndroidIndexEnableAndroidNativeBuffers = 0x7F000017, 415 416 OMX_GoogleAndroidIndexUseAndroidNativeBuffer = 0x7F000018, 417 418 OMX_GoogleAndroidIndexGetAndroidNativeBufferUsage = 0x7F000019, 419 420 /*"OMX.QCOM.index.config.video.QPRange" */ 421 OMX_QcomIndexConfigVideoQPRange = 0x7F00001A, 422 423 /*"OMX.QCOM.index.param.EnableTimeStampReoder"*/ 424 OMX_QcomIndexParamEnableTimeStampReorder = 0x7F00001B, 425 426 /*"OMX.google.android.index.storeMetaDataInBuffers"*/ 427 OMX_QcomIndexParamVideoMetaBufferMode = 0x7F00001C, 428 429 /*"OMX.google.android.index.useAndroidNativeBuffer2"*/ 430 OMX_GoogleAndroidIndexUseAndroidNativeBuffer2 = 0x7F00001D, 431 432 /*"OMX.QCOM.index.param.VideoMaxAllowedBitrateCheck"*/ 433 OMX_QcomIndexParamVideoMaxAllowedBitrateCheck = 0x7F00001E, 434 435 OMX_QcomIndexEnableSliceDeliveryMode = 0x7F00001F, 436 437 /* "OMX.QCOM.index.param.video.ExtnUserExtraData" */ 438 OMX_QcomIndexEnableExtnUserData = 0x7F000020, 439 440 /*"OMX.QCOM.index.param.video.EnableSmoothStreaming"*/ 441 OMX_QcomIndexParamEnableSmoothStreaming = 0x7F000021, 442 443 /*"OMX.QCOM.index.param.video.QPRange" */ 444 OMX_QcomIndexParamVideoQPRange = 0x7F000022, 445 446 OMX_QcomIndexEnableH263PlusPType = 0x7F000023, 447 448 /*"OMX.QCOM.index.param.video.LTRCountRangeSupported"*/ 449 QOMX_IndexParamVideoLTRCountRangeSupported = 0x7F000024, 450 451 /*"OMX.QCOM.index.param.video.LTRMode"*/ 452 QOMX_IndexParamVideoLTRMode = 0x7F000025, 453 454 /*"OMX.QCOM.index.param.video.LTRCount"*/ 455 QOMX_IndexParamVideoLTRCount = 0x7F000026, 456 457 /*"OMX.QCOM.index.config.video.LTRPeriod"*/ 458 QOMX_IndexConfigVideoLTRPeriod = 0x7F000027, 459 460 /*"OMX.QCOM.index.config.video.LTRUse"*/ 461 QOMX_IndexConfigVideoLTRUse = 0x7F000028, 462 463 /*"OMX.QCOM.index.config.video.LTRMark"*/ 464 QOMX_IndexConfigVideoLTRMark = 0x7F000029, 465 466 /* OMX.google.android.index.prependSPSPPSToIDRFrames */ 467 OMX_QcomIndexParamSequenceHeaderWithIDR = 0x7F00002A, 468 469 OMX_QcomIndexParamH264AUDelimiter = 0x7F00002B, 470 471 OMX_QcomIndexParamVideoDownScalar = 0x7F00002C, 472 473 /* "OMX.QCOM.index.param.video.FramePackingExtradata" */ 474 OMX_QcomIndexParamVideoFramePackingExtradata = 0x7F00002D, 475 476 /* "OMX.QCOM.index.config.activeregiondetection" */ 477 OMX_QcomIndexConfigActiveRegionDetection = 0x7F00002E, 478 479 /* "OMX.QCOM.index.config.activeregiondetectionstatus" */ 480 OMX_QcomIndexConfigActiveRegionDetectionStatus = 0x7F00002F, 481 482 /* "OMX.QCOM.index.config.scalingmode" */ 483 OMX_QcomIndexConfigScalingMode = 0x7F000030, 484 485 /* "OMX.QCOM.index.config.noisereduction" */ 486 OMX_QcomIndexConfigNoiseReduction = 0x7F000031, 487 488 /* "OMX.QCOM.index.config.imageenhancement" */ 489 OMX_QcomIndexConfigImageEnhancement = 0x7F000032, 490 491 /* google smooth-streaming support */ 492 OMX_QcomIndexParamVideoAdaptivePlaybackMode = 0x7F000033, 493 494 /* H.264 MVC codec index */ 495 QOMX_IndexParamVideoMvc = 0x7F000034, 496 497 /* "OMX.QCOM.index.param.video.QPExtradata" */ 498 OMX_QcomIndexParamVideoQPExtraData = 0x7F000035, 499 500 /* "OMX.QCOM.index.param.video.InputBitsInfoExtradata" */ 501 OMX_QcomIndexParamVideoInputBitsInfoExtraData = 0x7F000036, 502 503 /* VP8 Hierarchical P support */ 504 OMX_QcomIndexHierarchicalStructure = 0x7F000037, 505 506 OMX_QcomIndexParamPerfLevel = 0x7F000038, 507 508 OMX_QcomIndexParamH264VUITimingInfo = 0x7F000039, 509 510 OMX_QcomIndexParamPeakBitrate = 0x7F00003A, 511 512 /* Enable InitialQP index */ 513 QOMX_IndexParamVideoInitialQp = 0x7F00003B, 514 515 OMX_QcomIndexParamSetMVSearchrange = 0x7F00003C, 516 517 OMX_QcomIndexConfigPerfLevel = 0x7F00003D, 518 519 /*"OMX.QCOM.index.param.video.LTRCount"*/ 520 OMX_QcomIndexParamVideoLTRCount = QOMX_IndexParamVideoLTRCount, 521 522 /*"OMX.QCOM.index.config.video.LTRUse"*/ 523 OMX_QcomIndexConfigVideoLTRUse = QOMX_IndexConfigVideoLTRUse, 524 525 /*"OMX.QCOM.index.config.video.LTRMark"*/ 526 OMX_QcomIndexConfigVideoLTRMark = QOMX_IndexConfigVideoLTRMark, 527 528 /*"OMX.QCOM.index.param.video.CustomBufferSize"*/ 529 OMX_QcomIndexParamVideoCustomBufferSize = 0x7F00003E, 530 531 /* Max Hierarchical P layers */ 532 OMX_QcomIndexMaxHierarchicallayers = 0x7F000041, 533 534 /* Set Encoder Performance Index */ 535 OMX_QcomIndexConfigVideoVencPerfMode = 0x7F000042, 536 537 /* Set Hybrid Hier-p layers */ 538 OMX_QcomIndexParamVideoHybridHierpMode = 0x7F000043, 539 540 OMX_QcomIndexFlexibleYUVDescription = 0x7F000044, 541 542 /* Vpp Hqv Control Type */ 543 OMX_QcomIndexParamVppHqvControl = 0x7F000045, 544 545 /* Enable VPP */ 546 OMX_QcomIndexParamEnableVpp = 0x7F000046, 547 548 /* MBI statistics mode */ 549 OMX_QcomIndexParamMBIStatisticsMode = 0x7F000047, 550 551 /* Set PictureTypeDecode */ 552 OMX_QcomIndexConfigPictureTypeDecode = 0x7F000048, 553 554 OMX_QcomIndexConfigH264EntropyCodingCabac = 0x7F000049, 555 556 /* "OMX.QCOM.index.param.video.InputBatch" */ 557 OMX_QcomIndexParamBatchSize = 0x7F00004A, 558 559 OMX_QcomIndexConfigNumHierPLayers = 0x7F00004B, 560 561 OMX_QcomIndexConfigRectType = 0x7F00004C, 562 563 OMX_QcomIndexConfigBaseLayerId = 0x7F00004E, 564 565 OMX_QcomIndexParamDriverVersion = 0x7F00004F, 566 567 OMX_QcomIndexConfigQp = 0x7F000050, 568 569 OMX_QcomIndexParamVencAspectRatio = 0x7F000051, 570 571 OMX_QTIIndexParamVQZipSEIExtraData = 0x7F000052, 572 573 /* Enable VQZIP SEI NAL type */ 574 OMX_QTIIndexParamVQZIPSEIType = 0x7F000053, 575 576 OMX_QTIIndexParamPassInputBufferFd = 0x7F000054, 577 578 /* Set Prefer-adaptive playback*/ 579 /* "OMX.QTI.index.param.video.PreferAdaptivePlayback" */ 580 OMX_QTIIndexParamVideoPreferAdaptivePlayback = 0x7F000055, 581 582 /* Set time params */ 583 OMX_QTIIndexConfigSetTimeData = 0x7F000056, 584 /* Force Compressed format for DPB when resolution <=1080p 585 * and OPB is cpu_access */ 586 /* OMX.QTI.index.param.video.ForceCompressedForDPB */ 587 OMX_QTIIndexParamForceCompressedForDPB = 0x7F000057, 588 589 /* Enable ROI info */ 590 OMX_QTIIndexParamVideoEnableRoiInfo = 0x7F000058, 591 592 /* Configure ROI info */ 593 OMX_QTIIndexConfigVideoRoiInfo = 0x7F000059, 594 595 /* Encoder Low Latency mode */ 596 OMX_QcomIndexConfigVideoVencLowLatencyMode = 0x7F00005A, 597 598 /* Set Low Latency Mode */ 599 OMX_QTIIndexParamLowLatencyMode = 0x7F00005B, 600 601 /* Force OPB to UnCompressed mode */ 602 OMX_QTIIndexParamForceUnCompressedForOPB = 0x7F00005C, 603 604 /* OMX.google.android.index.allocateNativeHandle */ 605 OMX_GoogleAndroidIndexAllocateNativeHandle = 0x7F00005D, 606 607 /* Configure BLUR resolution for encode */ 608 OMX_QTIIndexConfigVideoBlurResolution = 0x7F00005E, 609 610 /* QP range for I frame B frame P frame */ 611 OMX_QcomIndexParamVideoIPBQPRange = 0x7F00005F, 612 613 /* Enable client extradata */ 614 OMX_QTIIndexParamVideoClientExtradata = 0x7F000060, 615 616 /* H264 transform 8x8 mode */ 617 OMX_QcomIndexConfigH264Transform8x8 = 0x7F000061, 618 619 /*"OMX.google.android.index.describeColorAspects"*/ 620 OMX_QTIIndexConfigDescribeColorAspects = 0x7F000062, 621 622 OMX_QTIIndexParamVUIExtraDataExtraData = 0x7F000063, 623 624 OMX_QTIIndexParamMPEG2SeqDispExtraData = 0x7F000064, 625 626 OMX_QTIIndexParamVC1SeqDispExtraData = 0x7F000065, 627 628 OMX_QTIIndexParamVPXColorSpaceExtraData = 0x7F000066, 629 630 /*"OMX.google.android.index.describeHDRStaticInfo"*/ 631 OMX_QTIIndexConfigDescribeHDRColorInfo = 0x7F000067, 632 633 /* Configure to disable PQ*/ 634 OMX_QTIIndexParamDisablePQ = 0x7F000068, 635 636 /* Dither control for 10bit */ 637 OMX_QTIIndexParamDitherControl = 0x7F000069, 638 639 /* Suggest how big Iframe sizes should be */ 640 OMX_QTIIndexParamIframeSizeType = 0x7F000070, 641 642 /* use av-timer ticks as timestamp (used by VT-client) */ 643 OMX_QTIIndexParamEnableAVTimerTimestamps = 0x7F000071, 644 }; 645 646 /** 647 * This is custom extension to configure Low Latency Mode. 648 * 649 * STRUCT MEMBERS 650 * 651 * nSize : Size of Structure in bytes 652 * nVersion : OpenMAX IL specification version information 653 * bLowLatencyMode : Enable/Disable Low Latency mode 654 */ 655 656 typedef struct QOMX_EXTNINDEX_VIDEO_VENC_LOW_LATENCY_MODE 657 { 658 OMX_U32 nSize; 659 OMX_VERSIONTYPE nVersion; 660 OMX_BOOL bLowLatencyMode; 661 } QOMX_EXTNINDEX_VIDEO_VENC_LOW_LATENCY_MODE; 662 663 /** 664 * This is custom extension to configure Encoder Aspect Ratio. 665 * 666 * STRUCT MEMBERS 667 * 668 * nSize : Size of Structure in bytes 669 * nVersion : OpenMAX IL specification version information 670 * nSARWidth : Horizontal aspect size 671 * nSARHeight : Vertical aspect size 672 */ 673 674 typedef struct QOMX_EXTNINDEX_VIDEO_VENC_SAR 675 { 676 OMX_U32 nSize; 677 OMX_VERSIONTYPE nVersion; 678 OMX_U32 nSARWidth; 679 OMX_U32 nSARHeight; 680 } QOMX_EXTNINDEX_VIDEO_VENC_SAR; 681 682 /** 683 * This is custom extension to configure Hier-p layers. 684 * This mode configures Hier-p layers dynamically. 685 * 686 * STRUCT MEMBERS 687 * 688 * nSize : Size of Structure in bytes 689 * nVersion : OpenMAX IL specification version information 690 * nNumHierLayers: Set the number of Hier-p layers for the session 691 * - This should be less than the MAX Hier-P 692 * layers set for the session. 693 */ 694 695 typedef struct QOMX_EXTNINDEX_VIDEO_HIER_P_LAYERS { 696 OMX_U32 nSize; 697 OMX_VERSIONTYPE nVersion; 698 OMX_U32 nNumHierLayers; 699 } QOMX_EXTNINDEX_VIDEO_HIER_P_LAYERS; 700 701 702 /** 703 * This is custom extension to configure Hybrid Hier-p settings. 704 * This mode is different from enabling Hier-p mode. This 705 * property enables Hier-p encoding with LTR referencing in each 706 * sub-GOP. 707 * 708 * STRUCT MEMBERS 709 * 710 * nSize : Size of Structure in bytes 711 * nVersion : OpenMAX IL specification version information 712 * nKeyFrameInterval : Indicates the I frame interval 713 * nHpLayers : Set the number of Hier-p layers for the session 714 * - This should be <= 6. (1 Base layer + 715 * 5 Enhancement layers) 716 * nTemporalLayerBitrateRatio[OMX_VIDEO_MAX_HP_LAYERS] : Bitrate to 717 * be set for each enhancement layer 718 * nMinQuantizer : minimum session QP 719 * nMaxQuantizer : Maximun session QP 720 */ 721 722 typedef struct QOMX_EXTNINDEX_VIDEO_HYBRID_HP_MODE { 723 OMX_U32 nSize; 724 OMX_VERSIONTYPE nVersion; 725 OMX_U32 nKeyFrameInterval; 726 OMX_U32 nTemporalLayerBitrateRatio[OMX_VIDEO_MAX_HP_LAYERS]; 727 OMX_U32 nMinQuantizer; 728 OMX_U32 nMaxQuantizer; 729 OMX_U32 nHpLayers; 730 } QOMX_EXTNINDEX_VIDEO_HYBRID_HP_MODE; 731 732 /** 733 * Encoder Performance Mode. This structure is used to set 734 * performance mode or power save mode when encoding. The search 735 * range is modified to save power or improve quality. 736 * 737 * STRUCT MEMBERS: 738 * OMX_U32 nPerfMode : Performance mode: 739 * 1: MAX_QUALITY 740 * 2: POWER_SAVE 741 */ 742 743 typedef struct QOMX_EXTNINDEX_VIDEO_PERFMODE { 744 OMX_U32 nSize; 745 OMX_VERSIONTYPE nVersion; 746 OMX_U32 nPerfMode; 747 } QOMX_EXTNINDEX_VIDEO_PERFMODE; 748 749 /** 750 * Initial QP parameter. This structure is used to enable 751 * vendor specific extension to let client enable setting 752 * initial QP values to I P B Frames 753 * 754 * STRUCT MEMBERS: 755 * nSize : Size of Structure in bytes 756 * nVersion : OpenMAX IL specification version information 757 * nPortIndex : Index of the port to which this structure applies 758 * OMX_U32 nQpI : First Iframe QP 759 * OMX_U32 nQpP : First Pframe QP 760 * OMX_U32 nQpB : First Bframe QP 761 * OMX_U32 bEnableInitQp : Bit field indicating which frame type(s) shall 762 * use the specified initial QP. 763 * Bit 0: Enable initial QP for I/IDR 764 * and use value specified in nInitQpI 765 * Bit 1: Enable initial QP for P 766 * and use value specified in nInitQpP 767 * Bit 2: Enable initial QP for B 768 * and use value specified in nInitQpB 769 */ 770 771 typedef struct QOMX_EXTNINDEX_VIDEO_INITIALQP { 772 OMX_U32 nSize; 773 OMX_VERSIONTYPE nVersion; 774 OMX_U32 nPortIndex; 775 OMX_U32 nQpI; 776 OMX_U32 nQpP; 777 OMX_U32 nQpB; 778 OMX_U32 bEnableInitQp; 779 } QOMX_EXTNINDEX_VIDEO_INITIALQP; 780 781 /** 782 * Extension index parameter. This structure is used to enable 783 * vendor specific extension on input/output port and 784 * to pass the required flags and data, if any. 785 * The format of flags and data being passed is known to 786 * the client and component apriori. 787 * 788 * STRUCT MEMBERS: 789 * nSize : Size of Structure plus pData size 790 * nVersion : OMX specification version information 791 * nPortIndex : Indicates which port to set 792 * bEnable : Extension index enable (1) or disable (0) 793 * nFlags : Extension index flags, if any 794 * nDataSize : Size of the extension index data to follow 795 * pData : Extension index data, if present. 796 */ 797 typedef struct QOMX_EXTNINDEX_PARAMTYPE { 798 OMX_U32 nSize; 799 OMX_VERSIONTYPE nVersion; 800 OMX_U32 nPortIndex; 801 OMX_BOOL bEnable; 802 OMX_U32 nFlags; 803 OMX_U32 nDataSize; 804 OMX_PTR pData; 805 } QOMX_EXTNINDEX_PARAMTYPE; 806 807 /** 808 * Range index parameter. This structure is used to enable 809 * vendor specific extension on input/output port and 810 * to pass the required minimum and maximum values 811 * 812 * STRUCT MEMBERS: 813 * nSize : Size of Structure in bytes 814 * nVersion : OpenMAX IL specification version information 815 * nPortIndex : Index of the port to which this structure applies 816 * nMin : Minimum value 817 * nMax : Maximum value 818 * nSteSize : Step size 819 */ 820 typedef struct QOMX_EXTNINDEX_RANGETYPE { 821 OMX_U32 nSize; 822 OMX_VERSIONTYPE nVersion; 823 OMX_U32 nPortIndex; 824 OMX_S32 nMin; 825 OMX_S32 nMax; 826 OMX_S32 nStepSize; 827 } QOMX_EXTNINDEX_RANGETYPE; 828 829 /** 830 * Specifies LTR mode types. 831 */ 832 typedef enum QOMX_VIDEO_LTRMODETYPE 833 { 834 QOMX_VIDEO_LTRMode_Disable = 0x0, /**< LTR encoding is disabled */ 835 QOMX_VIDEO_LTRMode_Manual = 0x1, /**< In this mode, IL client configures 836 ** the encoder the LTR count and manually 837 ** controls the marking and use of LTR 838 ** frames during video encoding. 839 */ 840 QOMX_VIDEO_LTRMode_Auto = 0x2, /**< In this mode, IL client configures 841 ** the encoder the LTR count and LTR 842 ** period. The encoder marks LTR frames 843 ** automatically based on the LTR period 844 ** during video encoding. IL client controls 845 ** the use of LTR frames. 846 */ 847 QOMX_VIDEO_LTRMode_MAX = 0x7FFFFFFF /** Maximum LTR Mode type */ 848 } QOMX_VIDEO_LTRMODETYPE; 849 850 /** 851 * LTR mode index parameter. This structure is used 852 * to enable vendor specific extension on output port 853 * to pass the LTR mode information. 854 * 855 * STRUCT MEMBERS: 856 * nSize : Size of Structure in bytes 857 * nVersion : OpenMAX IL specification version information 858 * nPortIndex : Index of the port to which this structure applies 859 * eLTRMode : Specifies the LTR mode used in encoder 860 */ 861 typedef struct QOMX_VIDEO_PARAM_LTRMODE_TYPE { 862 OMX_U32 nSize; 863 OMX_VERSIONTYPE nVersion; 864 OMX_U32 nPortIndex; 865 QOMX_VIDEO_LTRMODETYPE eLTRMode; 866 } QOMX_VIDEO_PARAM_LTRMODE_TYPE; 867 868 /** 869 * LTR count index parameter. This structure is used 870 * to enable vendor specific extension on output port 871 * to pass the LTR count information. 872 * 873 * STRUCT MEMBERS: 874 * nSize : Size of Structure in bytes 875 * nVersion : OpenMAX IL specification version information 876 * nPortIndex : Index of the port to which this structure applies 877 * nCount : Specifies the number of LTR frames stored in the 878 * encoder component 879 */ 880 typedef struct QOMX_VIDEO_PARAM_LTRCOUNT_TYPE { 881 OMX_U32 nSize; 882 OMX_VERSIONTYPE nVersion; 883 OMX_U32 nPortIndex; 884 OMX_U32 nCount; 885 } QOMX_VIDEO_PARAM_LTRCOUNT_TYPE; 886 887 888 /** 889 * This should be used with OMX_QcomIndexParamVideoLTRCount extension. 890 */ 891 typedef QOMX_VIDEO_PARAM_LTRCOUNT_TYPE OMX_QCOM_VIDEO_PARAM_LTRCOUNT_TYPE; 892 893 /** 894 * LTR period index parameter. This structure is used 895 * to enable vendor specific extension on output port 896 * to pass the LTR period information. 897 * 898 * STRUCT MEMBERS: 899 * nSize : Size of Structure in bytes 900 * nVersion : OpenMAX IL specification version information 901 * nPortIndex : Index of the port to which this structure applies 902 * nFrames : Specifies the number of frames between two consecutive 903 * LTR frames. 904 */ 905 typedef struct QOMX_VIDEO_CONFIG_LTRPERIOD_TYPE { 906 OMX_U32 nSize; 907 OMX_VERSIONTYPE nVersion; 908 OMX_U32 nPortIndex; 909 OMX_U32 nFrames; 910 } QOMX_VIDEO_CONFIG_LTRPERIOD_TYPE; 911 912 /** 913 * Marks the next encoded frame as an LTR frame. 914 * STRUCT MEMBERS: 915 * nSize : Size of Structure in bytes 916 * nVersion : OpenMAX IL specification version information 917 * nPortIndex : Index of the port to which this structure applies 918 * nID : Specifies the identifier of the LTR frame to be marked 919 * as reference frame for encoding subsequent frames. 920 */ 921 typedef struct QOMX_VIDEO_CONFIG_LTRMARK_TYPE { 922 OMX_U32 nSize; 923 OMX_VERSIONTYPE nVersion; 924 OMX_U32 nPortIndex; 925 OMX_U32 nID; 926 } QOMX_VIDEO_CONFIG_LTRMARK_TYPE; 927 928 /** 929 * This should be used with OMX_QcomIndexConfigVideoLTRMark extension. 930 */ 931 typedef QOMX_VIDEO_CONFIG_LTRMARK_TYPE OMX_QCOM_VIDEO_CONFIG_LTRMARK_TYPE; 932 933 /** 934 * Specifies an LTR frame to encode subsequent frames. 935 * STRUCT MEMBERS: 936 * nSize : Size of Structure in bytes 937 * nVersion : OpenMAX IL specification version information 938 * nPortIndex : Index of the port to which this structure applies 939 * nID : Specifies the identifier of the LTR frame to be used 940 as reference frame for encoding subsequent frames. 941 * nFrames : Specifies the number of subsequent frames to be 942 encoded using the LTR frame with its identifier 943 nID as reference frame. Short-term reference frames 944 will be used thereafter. The value of 0xFFFFFFFF 945 indicates that all subsequent frames will be 946 encodedusing this LTR frame as reference frame. 947 */ 948 typedef struct QOMX_VIDEO_CONFIG_LTRUSE_TYPE { 949 OMX_U32 nSize; 950 OMX_VERSIONTYPE nVersion; 951 OMX_U32 nPortIndex; 952 OMX_U32 nID; 953 OMX_U32 nFrames; 954 } QOMX_VIDEO_CONFIG_LTRUSE_TYPE; 955 956 /** 957 * This should be used with OMX_QcomIndexConfigVideoLTRUse extension. 958 */ 959 typedef QOMX_VIDEO_CONFIG_LTRUSE_TYPE OMX_QCOM_VIDEO_CONFIG_LTRUSE_TYPE; 960 961 /** 962 * Enumeration used to define the video encoder modes 963 * 964 * ENUMS: 965 * EncoderModeDefault : Default video recording mode. 966 * All encoder settings made through 967 * OMX_SetParameter/OMX_SetConfig are applied. No 968 * parameter is overridden. 969 * EncoderModeMMS : Video recording mode for MMS (Multimedia Messaging 970 * Service). This mode is similar to EncoderModeDefault 971 * except that here the Rate control mode is overridden 972 * internally and set as a variant of variable bitrate with 973 * variable frame rate. After this mode is set if the IL 974 * client tries to set OMX_VIDEO_CONTROLRATETYPE via 975 * OMX_IndexParamVideoBitrate that would be rejected. For 976 * this, client should set mode back to EncoderModeDefault 977 * first and then change OMX_VIDEO_CONTROLRATETYPE. 978 */ 979 typedef enum QOMX_VIDEO_ENCODERMODETYPE 980 { 981 QOMX_VIDEO_EncoderModeDefault = 0x00, 982 QOMX_VIDEO_EncoderModeMMS = 0x01, 983 QOMX_VIDEO_EncoderModeMax = 0x7FFFFFFF 984 } QOMX_VIDEO_ENCODERMODETYPE; 985 986 /** 987 * This structure is used to set the video encoder mode. 988 * 989 * STRUCT MEMBERS: 990 * nSize : Size of the structure in bytes 991 * nVersion : OMX specification version info 992 * nPortIndex : Port that this structure applies to 993 * nMode : defines the video encoder mode 994 */ 995 typedef struct QOMX_VIDEO_PARAM_ENCODERMODETYPE { 996 OMX_U32 nSize; 997 OMX_VERSIONTYPE nVersion; 998 OMX_U32 nPortIndex; 999 QOMX_VIDEO_ENCODERMODETYPE nMode; 1000 } QOMX_VIDEO_PARAM_ENCODERMODETYPE; 1001 1002 /** 1003 * This structure describes the parameters corresponding to the 1004 * QOMX_VIDEO_SYNTAXHDRTYPE extension. This parameter can be queried 1005 * during the loaded state. 1006 */ 1007 1008 typedef struct QOMX_VIDEO_SYNTAXHDRTYPE 1009 { 1010 OMX_U32 nSize; /** Size of the structure in bytes */ 1011 OMX_VERSIONTYPE nVersion;/** OMX specification version information */ 1012 OMX_U32 nPortIndex; /** Portindex which is extended by this structure */ 1013 OMX_U32 nBytes; /** The number of bytes filled in to the buffer */ 1014 OMX_U8 data[1]; /** Buffer to store the header information */ 1015 } QOMX_VIDEO_SYNTAXHDRTYPE; 1016 1017 /** 1018 * This structure describes the parameters corresponding to the 1019 * QOMX_VIDEO_TEMPORALSPATIALTYPE extension. This parameter can be set 1020 * dynamically during any state except the state invalid. This is primarily 1021 * used for setting MaxQP from the application. This is set on the out port. 1022 */ 1023 1024 typedef struct QOMX_VIDEO_TEMPORALSPATIALTYPE 1025 { 1026 OMX_U32 nSize; /** Size of the structure in bytes */ 1027 OMX_VERSIONTYPE nVersion;/** OMX specification version information */ 1028 OMX_U32 nPortIndex; /** Portindex which is extended by this structure */ 1029 OMX_U32 nTSFactor; /** Temoral spatial tradeoff factor value in 0-100 */ 1030 } QOMX_VIDEO_TEMPORALSPATIALTYPE; 1031 1032 /** 1033 * This structure describes the parameters corresponding to the 1034 * OMX_QCOM_VIDEO_CONFIG_INTRAPERIODTYPE extension. This parameter can be set 1035 * dynamically during any state except the state invalid. This is set on the out port. 1036 */ 1037 1038 typedef struct QOMX_VIDEO_INTRAPERIODTYPE 1039 { 1040 OMX_U32 nSize; /** Size of the structure in bytes */ 1041 OMX_VERSIONTYPE nVersion;/** OMX specification version information */ 1042 OMX_U32 nPortIndex; /** Portindex which is extended by this structure */ 1043 OMX_U32 nIDRPeriod; /** This specifies coding a frame as IDR after every nPFrames 1044 of intra frames. If this parameter is set to 0, only the 1045 first frame of the encode session is an IDR frame. This 1046 field is ignored for non-AVC codecs and is used only for 1047 codecs that support IDR Period */ 1048 OMX_U32 nPFrames; /** The number of "P" frames between two "I" frames */ 1049 OMX_U32 nBFrames; /** The number of "B" frames between two "I" frames */ 1050 } QOMX_VIDEO_INTRAPERIODTYPE; 1051 1052 /** 1053 * This structure describes the parameters corresponding to the 1054 * OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE extension. This parameter can be set 1055 * dynamically during any state except the state invalid. This is used for the buffer negotiation 1056 * with other clients. This is set on the out port. 1057 */ 1058 typedef struct OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE 1059 { 1060 OMX_U32 nSize; /** Size of the structure in bytes */ 1061 OMX_VERSIONTYPE nVersion; /** OMX specification version information */ 1062 OMX_U32 nPortIndex; /** Portindex which is extended by this structure */ 1063 OMX_U32 nBufferOccupancy; /** The number of bytes to be set for the buffer occupancy */ 1064 } OMX_QCOM_VIDEO_CONFIG_ULBUFFEROCCUPANCYTYPE; 1065 1066 /** 1067 * This structure describes the parameters corresponding to the 1068 * OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE extension. This parameter can be set 1069 * dynamically during any state except the state invalid. This is primarily used for the dynamic/random 1070 * intrarefresh. This is set on the out port. 1071 */ 1072 typedef struct OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE 1073 { 1074 OMX_U32 nSize; /** Size of the structure in bytes */ 1075 OMX_VERSIONTYPE nVersion;/** OMX specification version information */ 1076 OMX_U32 nPortIndex; /** Portindex which is extended by this structure */ 1077 OMX_U32 nRirMBs; /** The number of MBs to be set for intrarefresh */ 1078 } OMX_QCOM_VIDEO_CONFIG_RANDOMINTRAREFRESHTYPE; 1079 1080 1081 /** 1082 * This structure describes the parameters corresponding to the 1083 * OMX_QCOM_VIDEO_CONFIG_QPRANGE extension. This parameter can be set 1084 * dynamically during any state except the state invalid. This is primarily 1085 * used for the min/max QP to be set from the application. This 1086 * is set on the out port. 1087 */ 1088 typedef struct OMX_QCOM_VIDEO_CONFIG_QPRANGE 1089 { 1090 OMX_U32 nSize; /** Size of the structure in bytes */ 1091 OMX_VERSIONTYPE nVersion;/** OMX specification version information */ 1092 OMX_U32 nPortIndex; /** Portindex which is extended by this structure */ 1093 OMX_U32 nMinQP; /** The number for minimum quantization parameter */ 1094 OMX_U32 nMaxQP; /** The number for maximum quantization parameter */ 1095 } OMX_QCOM_VIDEO_CONFIG_QPRANGE; 1096 1097 /** 1098 * This structure describes the parameters for the 1099 * OMX_QcomIndexParamH264AUDelimiter extension. It enables/disables 1100 * the AU delimiters in the H264 stream, which is used by WFD. 1101 */ 1102 typedef struct OMX_QCOM_VIDEO_CONFIG_H264_AUD 1103 { 1104 OMX_U32 nSize; /** Size of the structure in bytes */ 1105 OMX_VERSIONTYPE nVersion;/** OMX specification version information */ 1106 OMX_BOOL bEnable; /** Enable/disable the setting */ 1107 } OMX_QCOM_VIDEO_CONFIG_H264_AUD; 1108 1109 typedef enum QOMX_VIDEO_PERF_LEVEL 1110 { 1111 OMX_QCOM_PerfLevelNominal, 1112 OMX_QCOM_PerfLevelTurbo 1113 } QOMX_VIDEO_PERF_LEVEL; 1114 1115 /** 1116 * This structure describes the parameters corresponding 1117 * to OMX_QcomIndexParamPerfLevel extension. It will set 1118 * the performance mode specified as QOMX_VIDEO_PERF_LEVEL. 1119 */ 1120 typedef struct OMX_QCOM_VIDEO_PARAM_PERF_LEVEL { 1121 OMX_U32 nSize; /** Size of the structure in bytes */ 1122 OMX_VERSIONTYPE nVersion; /** OMX specification version information */ 1123 QOMX_VIDEO_PERF_LEVEL ePerfLevel; /** Performance level */ 1124 } OMX_QCOM_VIDEO_PARAM_PERF_LEVEL; 1125 1126 /** 1127 * This structure describes the parameters corresponding 1128 * to OMX_QcomIndexConfigPerfLevel extension. It will set 1129 * the performance mode specified as QOMX_VIDEO_PERF_LEVEL. 1130 */ 1131 typedef struct OMX_QCOM_VIDEO_CONFIG_PERF_LEVEL { 1132 OMX_U32 nSize; /** Size of the structure in bytes */ 1133 OMX_VERSIONTYPE nVersion; /** OMX specification version information */ 1134 QOMX_VIDEO_PERF_LEVEL ePerfLevel; /** Performance level */ 1135 } OMX_QCOM_VIDEO_CONFIG_PERF_LEVEL; 1136 1137 typedef enum QOMX_VIDEO_PICTURE_TYPE_DECODE 1138 { 1139 OMX_QCOM_PictypeDecode_IPB, 1140 OMX_QCOM_PictypeDecode_I 1141 } QOMX_VIDEO_PICTURE_TYPE_DECODE; 1142 1143 /** 1144 * This structure describes the parameters corresponding 1145 * to OMX_QcomIndexConfigPictureTypeDecode extension. It 1146 * will set the picture type decode specified by eDecodeType. 1147 */ 1148 typedef struct OMX_QCOM_VIDEO_CONFIG_PICTURE_TYPE_DECODE { 1149 OMX_U32 nSize; /** Size of the structure in bytes */ 1150 OMX_VERSIONTYPE nVersion; /** OMX specification version information */ 1151 QOMX_VIDEO_PICTURE_TYPE_DECODE eDecodeType; /** Decode type */ 1152 } OMX_QCOM_VIDEO_CONFIG_PICTURE_TYPE_DECODE; 1153 1154 /** 1155 * This structure describes the parameters corresponding 1156 * to OMX_QcomIndexParamH264VUITimingInfo extension. It 1157 * will enable/disable the VUI timing info. 1158 */ 1159 typedef struct OMX_QCOM_VIDEO_PARAM_VUI_TIMING_INFO { 1160 OMX_U32 nSize; /** Size of the structure in bytes */ 1161 OMX_VERSIONTYPE nVersion; /** OMX specification version information */ 1162 OMX_BOOL bEnable; /** Enable/disable the setting */ 1163 } OMX_QCOM_VIDEO_PARAM_VUI_TIMING_INFO; 1164 1165 /** 1166 * This structure describes the parameters corresponding 1167 * to OMX_QcomIndexParamVQZIPSEIType extension. It 1168 * will enable/disable the VQZIP SEI info. 1169 */ 1170 typedef struct OMX_QTI_VIDEO_PARAM_VQZIP_SEI_TYPE { 1171 OMX_U32 nSize; /** Size of the structure in bytes */ 1172 OMX_VERSIONTYPE nVersion; /** OMX specification version information */ 1173 OMX_BOOL bEnable; /** Enable/disable the setting */ 1174 } OMX_QTI_VIDEO_PARAM_VQZIP_SEI_TYPE; 1175 1176 /** 1177 * This structure describes the parameters corresponding 1178 * to OMX_QcomIndexParamPeakBitrate extension. It will 1179 * set the peak bitrate specified by nPeakBitrate. 1180 */ 1181 typedef struct OMX_QCOM_VIDEO_PARAM_PEAK_BITRATE { 1182 OMX_U32 nSize; /** Size of the structure in bytes */ 1183 OMX_VERSIONTYPE nVersion; /** OMX specification version information */ 1184 OMX_U32 nPeakBitrate; /** Peak bitrate value */ 1185 } OMX_QCOM_VIDEO_PARAM_PEAK_BITRATE; 1186 1187 /** 1188 * This structure describes the parameters corresponding 1189 * to OMX_QTIIndexParamForceCompressedForDPB extension. Enabling 1190 * this extension will force the split mode DPB(compressed)/OPB(Linear) 1191 * for all resolutions.On some chipsets preferred mode would be combined 1192 * Linear for both DPB/OPB to save memory. For example on 8996 preferred mode 1193 * would be combined linear for resolutions <= 1080p . 1194 * Enabling this might save power but with the cost 1195 * of increased memory i.e almost double the number on output YUV buffers. 1196 */ 1197 typedef struct OMX_QTI_VIDEO_PARAM_FORCE_COMPRESSED_FOR_DPB_TYPE { 1198 OMX_U32 nSize; /** Size of the structure in bytes */ 1199 OMX_VERSIONTYPE nVersion; /** OMX specification version information */ 1200 OMX_BOOL bEnable; /** Enable/disable the setting */ 1201 } OMX_QTI_VIDEO_PARAM_FORCE_COMPRESSED_FOR_DPB_TYPE; 1202 1203 /** 1204 * This structure describes the parameters corresponding 1205 * to OMX_QTIIndexParamForceUnCompressedForOPB extension. Enabling this 1206 * extension will force the OPB to be linear for the current video session. 1207 * If this property is not set, then the OPB will be set to linear or compressed 1208 * based on resolution selected and/or if cpu access is requested on the 1209 * OPB buffer. 1210 */ 1211 typedef struct OMX_QTI_VIDEO_PARAM_FORCE_UNCOMPRESSED_FOR_OPB_TYPE { 1212 OMX_U32 nSize; /** Sizeo f the structure in bytes */ 1213 OMX_VERSIONTYPE nVersion; /** OMX specification version information */ 1214 OMX_BOOL bEnable; /** Enable/disable the setting */ 1215 } OMX_QTI_VIDEO_PARAM_FORCE_UNCOMPRESSED_FOR_OPB_TYPE; 1216 1217 typedef struct OMX_VENDOR_EXTRADATATYPE { 1218 OMX_U32 nPortIndex; 1219 OMX_U32 nDataSize; 1220 OMX_U8 *pData; // cdata (codec_data/extradata) 1221 } OMX_VENDOR_EXTRADATATYPE; 1222 1223 /** 1224 * This structure describes the parameters corresponding to the 1225 * OMX_VENDOR_VIDEOFRAMERATE extension. This parameter can be set 1226 * dynamically during any state except the state invalid. This is 1227 * used for frame rate to be set from the application. This 1228 * is set on the in port. 1229 */ 1230 typedef struct OMX_VENDOR_VIDEOFRAMERATE { 1231 OMX_U32 nSize; /** Size of the structure in bytes */ 1232 OMX_VERSIONTYPE nVersion;/** OMX specification version information */ 1233 OMX_U32 nPortIndex; /** Portindex which is extended by this structure */ 1234 OMX_U32 nFps; /** Frame rate value */ 1235 OMX_BOOL bEnabled; /** Flag to enable or disable client's frame rate value */ 1236 } OMX_VENDOR_VIDEOFRAMERATE; 1237 1238 typedef enum OMX_INDEXVENDORTYPE { 1239 OMX_IndexVendorFileReadInputFilename = 0xFF000001, 1240 OMX_IndexVendorParser3gpInputFilename = 0xFF000002, 1241 OMX_IndexVendorVideoExtraData = 0xFF000003, 1242 OMX_IndexVendorAudioExtraData = 0xFF000004, 1243 OMX_IndexVendorVideoFrameRate = 0xFF000005, 1244 } OMX_INDEXVENDORTYPE; 1245 1246 typedef enum OMX_QCOM_VC1RESOLUTIONTYPE 1247 { 1248 OMX_QCOM_VC1_PICTURE_RES_1x1, 1249 OMX_QCOM_VC1_PICTURE_RES_2x1, 1250 OMX_QCOM_VC1_PICTURE_RES_1x2, 1251 OMX_QCOM_VC1_PICTURE_RES_2x2 1252 } OMX_QCOM_VC1RESOLUTIONTYPE; 1253 1254 typedef enum OMX_QCOM_INTERLACETYPE 1255 { 1256 OMX_QCOM_InterlaceFrameProgressive, 1257 OMX_QCOM_InterlaceInterleaveFrameTopFieldFirst, 1258 OMX_QCOM_InterlaceInterleaveFrameBottomFieldFirst, 1259 OMX_QCOM_InterlaceFrameTopFieldFirst, 1260 OMX_QCOM_InterlaceFrameBottomFieldFirst, 1261 OMX_QCOM_InterlaceFieldTop, 1262 OMX_QCOM_InterlaceFieldBottom 1263 }OMX_QCOM_INTERLACETYPE; 1264 1265 typedef struct OMX_QCOM_PARAM_VIDEO_INTERLACETYPE 1266 { 1267 OMX_U32 nSize; /** Size of the structure in bytes */ 1268 OMX_VERSIONTYPE nVersion;/** OMX specification version information */ 1269 OMX_U32 nPortIndex; /** Portindex which is extended by this structure */ 1270 OMX_BOOL bInterlace; /** Interlace content **/ 1271 }OMX_QCOM_PARAM_VIDEO_INTERLACETYPE; 1272 1273 typedef struct OMX_QCOM_CONFIG_INTERLACETYPE 1274 { 1275 OMX_U32 nSize; 1276 OMX_VERSIONTYPE nVersion; 1277 OMX_U32 nPortIndex; 1278 OMX_U32 nIndex; 1279 OMX_QCOM_INTERLACETYPE eInterlaceType; 1280 }OMX_QCOM_CONFIG_INTERLACETYPE; 1281 1282 #define MAX_PAN_SCAN_WINDOWS 4 1283 1284 typedef struct OMX_QCOM_PANSCAN 1285 { 1286 OMX_U32 numWindows; 1287 OMX_QCOMRectangle window[MAX_PAN_SCAN_WINDOWS]; 1288 } OMX_QCOM_PANSCAN; 1289 1290 typedef struct OMX_QCOM_ASPECT_RATIO 1291 { 1292 OMX_U32 aspectRatioX; 1293 OMX_U32 aspectRatioY; 1294 } OMX_QCOM_ASPECT_RATIO; 1295 1296 typedef struct OMX_QCOM_DISPLAY_ASPECT_RATIO 1297 { 1298 OMX_U32 displayVerticalSize; 1299 OMX_U32 displayHorizontalSize; 1300 } OMX_QCOM_DISPLAY_ASPECT_RATIO; 1301 1302 typedef struct OMX_QCOM_FRAME_PACK_ARRANGEMENT 1303 { 1304 OMX_U32 nSize; 1305 OMX_VERSIONTYPE nVersion; 1306 OMX_U32 nPortIndex; 1307 OMX_U32 id; 1308 OMX_U32 cancel_flag; 1309 OMX_U32 type; 1310 OMX_U32 quincunx_sampling_flag; 1311 OMX_U32 content_interpretation_type; 1312 OMX_U32 spatial_flipping_flag; 1313 OMX_U32 frame0_flipped_flag; 1314 OMX_U32 field_views_flag; 1315 OMX_U32 current_frame_is_frame0_flag; 1316 OMX_U32 frame0_self_contained_flag; 1317 OMX_U32 frame1_self_contained_flag; 1318 OMX_U32 frame0_grid_position_x; 1319 OMX_U32 frame0_grid_position_y; 1320 OMX_U32 frame1_grid_position_x; 1321 OMX_U32 frame1_grid_position_y; 1322 OMX_U32 reserved_byte; 1323 OMX_U32 repetition_period; 1324 OMX_U32 extension_flag; 1325 } OMX_QCOM_FRAME_PACK_ARRANGEMENT; 1326 1327 typedef struct OMX_QCOM_EXTRADATA_QP 1328 { 1329 OMX_U32 nQP; 1330 } OMX_QCOM_EXTRADATA_QP; 1331 1332 typedef struct OMX_QCOM_EXTRADATA_BITS_INFO 1333 { 1334 OMX_U32 header_bits; 1335 OMX_U32 frame_bits; 1336 } OMX_QCOM_EXTRADATA_BITS_INFO; 1337 1338 typedef struct OMX_QCOM_EXTRADATA_USERDATA { 1339 OMX_U32 type; 1340 OMX_U32 data[1]; 1341 } OMX_QCOM_EXTRADATA_USERDATA; 1342 1343 typedef struct OMX_QCOM_EXTRADATA_FRAMEINFO 1344 { 1345 // common frame meta data. interlace related info removed 1346 OMX_VIDEO_PICTURETYPE ePicType; 1347 OMX_QCOM_INTERLACETYPE interlaceType; 1348 OMX_QCOM_PANSCAN panScan; 1349 OMX_QCOM_ASPECT_RATIO aspectRatio; 1350 OMX_QCOM_DISPLAY_ASPECT_RATIO displayAspectRatio; 1351 OMX_U32 nConcealedMacroblocks; 1352 OMX_U32 nRecoverySeiFlag; 1353 OMX_U32 nFrameRate; 1354 OMX_TICKS nTimeStamp; 1355 } OMX_QCOM_EXTRADATA_FRAMEINFO; 1356 1357 typedef struct OMX_QCOM_EXTRADATA_FRAMEDIMENSION 1358 { 1359 /** Frame Dimensions added to each YUV buffer */ 1360 OMX_U32 nDecWidth; /** Width rounded to multiple of 16 */ 1361 OMX_U32 nDecHeight; /** Height rounded to multiple of 16 */ 1362 OMX_U32 nActualWidth; /** Actual Frame Width */ 1363 OMX_U32 nActualHeight; /** Actual Frame Height */ 1364 1365 } OMX_QCOM_EXTRADATA_FRAMEDIMENSION; 1366 1367 typedef struct OMX_QCOM_H264EXTRADATA 1368 { 1369 OMX_U64 seiTimeStamp; 1370 } OMX_QCOM_H264EXTRADATA; 1371 1372 typedef struct OMX_QCOM_VC1EXTRADATA 1373 { 1374 OMX_U32 nVC1RangeY; 1375 OMX_U32 nVC1RangeUV; 1376 OMX_QCOM_VC1RESOLUTIONTYPE eVC1PicResolution; 1377 } OMX_QCOM_VC1EXTRADATA; 1378 1379 typedef union OMX_QCOM_EXTRADATA_CODEC_DATA 1380 { 1381 OMX_QCOM_H264EXTRADATA h264ExtraData; 1382 OMX_QCOM_VC1EXTRADATA vc1ExtraData; 1383 } OMX_QCOM_EXTRADATA_CODEC_DATA; 1384 1385 typedef struct OMX_QCOM_EXTRADATA_MBINFO 1386 { 1387 OMX_U32 nFormat; 1388 OMX_U32 nDataSize; 1389 OMX_U8 data[0]; 1390 } OMX_QCOM_EXTRADATA_MBINFO; 1391 1392 typedef struct OMX_QCOM_EXTRADATA_VQZIPSEI { 1393 OMX_U32 nSize; 1394 OMX_U8 data[0]; 1395 } OMX_QCOM_EXTRADATA_VQZIPSEI; 1396 1397 typedef struct OMX_QTI_VIDEO_PARAM_ENABLE_ROIINFO { 1398 OMX_U32 nSize; 1399 OMX_VERSIONTYPE nVersion; 1400 OMX_U32 nPortIndex; 1401 OMX_BOOL bEnableRoiInfo; 1402 } OMX_QTI_VIDEO_PARAM_ENABLE_ROIINFO; 1403 1404 typedef struct OMX_QTI_VIDEO_CONFIG_ROIINFO { 1405 OMX_U32 nSize; 1406 OMX_VERSIONTYPE nVersion; 1407 OMX_U32 nPortIndex; 1408 OMX_S32 nUpperQpOffset; 1409 OMX_S32 nLowerQpOffset; 1410 OMX_BOOL bUseRoiInfo; 1411 OMX_S32 nRoiMBInfoSize; 1412 OMX_PTR pRoiMBInfo; 1413 } OMX_QTI_VIDEO_CONFIG_ROIINFO; 1414 1415 typedef enum OMX_QTI_VIDEO_BLUR_RESOLUTION { 1416 BLUR_RESOL_DISABLED = 0, 1417 BLUR_RESOL_240 = 1, 1418 BLUR_RESOL_480 = 2, 1419 BLUR_RESOL_720 = 3, 1420 BLUR_RESOL_1080 = 4, 1421 } OMX_QTI_VIDEO_BLUR_RESOLUTION; 1422 1423 typedef struct OMX_QTI_VIDEO_CONFIG_BLURINFO { 1424 OMX_U32 nSize; 1425 OMX_VERSIONTYPE nVersion; 1426 OMX_U32 nPortIndex; 1427 OMX_QTI_VIDEO_BLUR_RESOLUTION eTargetResol; 1428 } OMX_QTI_VIDEO_CONFIG_BLURINFO; 1429 1430 typedef enum OMX_QCOM_EXTRADATATYPE 1431 { 1432 OMX_ExtraDataFrameInfo = 0x7F000001, 1433 OMX_ExtraDataH264 = 0x7F000002, 1434 OMX_ExtraDataVC1 = 0x7F000003, 1435 OMX_ExtraDataFrameDimension = 0x7F000004, 1436 OMX_ExtraDataVideoEncoderSliceInfo = 0x7F000005, 1437 OMX_ExtraDataConcealMB = 0x7F000006, 1438 OMX_ExtraDataInterlaceFormat = 0x7F000007, 1439 OMX_ExtraDataPortDef = 0x7F000008, 1440 OMX_ExtraDataMP2ExtnData = 0x7F000009, 1441 OMX_ExtraDataMP2UserData = 0x7F00000a, 1442 OMX_ExtraDataVideoLTRInfo = 0x7F00000b, 1443 OMX_ExtraDataFramePackingArrangement = 0x7F00000c, 1444 OMX_ExtraDataQP = 0x7F00000d, 1445 OMX_ExtraDataInputBitsInfo = 0x7F00000e, 1446 OMX_ExtraDataVideoEncoderMBInfo = 0x7F00000f, 1447 OMX_ExtraDataVQZipSEI = 0x7F000010, 1448 OMX_ExtraDataDisplayColourSEI = 0x7F000011, 1449 OMX_ExtraDataLightLevelSEI = 0x7F000012, 1450 OMX_ExtraDataEncoderOverrideQPInfo = 0x7F000013, 1451 } OMX_QCOM_EXTRADATATYPE; 1452 1453 typedef struct OMX_STREAMINTERLACEFORMATTYPE { 1454 OMX_U32 nSize; 1455 OMX_VERSIONTYPE nVersion; 1456 OMX_U32 nPortIndex; 1457 OMX_BOOL bInterlaceFormat; 1458 OMX_U32 nInterlaceFormats; 1459 } OMX_STREAMINTERLACEFORMAT; 1460 1461 typedef enum OMX_INTERLACETYPE 1462 { 1463 OMX_InterlaceFrameProgressive, 1464 OMX_InterlaceInterleaveFrameTopFieldFirst, 1465 OMX_InterlaceInterleaveFrameBottomFieldFirst, 1466 OMX_InterlaceFrameTopFieldFirst, 1467 OMX_InterlaceFrameBottomFieldFirst 1468 } OMX_INTERLACES; 1469 1470 typedef enum QOMX_VIDEO_RECOVERYSEITYPE { 1471 /* 1472 * 0: Frame reconstruction is incorrect 1473 * a) Open Gop, frames before recovery point SEI 1474 * 1: Frame reconstruction is correct. 1475 * a) Closed Gop, When decoding starts from the top of closed GOP at IDR 1476 * b) Open Gop, Output at and subsequent to recovery point SEI with 1477 * exact_match_flag = true 1478 * 2: Frame reconstruction is approximately correct: 1479 * a) Closed Gop, When decoding starts from a P/B/I frames wihtout 1480 * any recovery point SEI information 1481 * b) Open Gop, Output at and subsequent to recovery point SEI with 1482 * exact_match_flag = false 1483 * In case flag is set to 0 or 2, DATACORRUPT shall be enabled 1484 * for buffer (nFlags) in FILL_BUFFER_DONE 1485 */ 1486 OMX_FRAME_RECONSTRUCTION_INCORRECT = 0, 1487 OMX_FRAME_RECONSTRUCTION_CORRECT = 1, 1488 OMX_FRAME_RECONSTRUCTION_APPROXIMATELY_CORRECT = 2 1489 } QOMX_VIDEO_RECOVERYSEI; 1490 1491 #define OMX_EXTRADATA_HEADER_SIZE 20 1492 1493 /** 1494 * AVC profile types, each profile indicates support for various 1495 * performance bounds and different annexes. 1496 */ 1497 typedef enum QOMX_VIDEO_AVCPROFILETYPE { 1498 QOMX_VIDEO_AVCProfileBaseline = OMX_VIDEO_AVCProfileBaseline, 1499 QOMX_VIDEO_AVCProfileMain = OMX_VIDEO_AVCProfileMain, 1500 QOMX_VIDEO_AVCProfileExtended = OMX_VIDEO_AVCProfileExtended, 1501 QOMX_VIDEO_AVCProfileHigh = OMX_VIDEO_AVCProfileHigh, 1502 QOMX_VIDEO_AVCProfileHigh10 = OMX_VIDEO_AVCProfileHigh10, 1503 QOMX_VIDEO_AVCProfileHigh422 = OMX_VIDEO_AVCProfileHigh422, 1504 QOMX_VIDEO_AVCProfileHigh444 = OMX_VIDEO_AVCProfileHigh444, 1505 /* QCom specific profile indexes */ 1506 QOMX_VIDEO_AVCProfileConstrained = OMX_VIDEO_AVCProfileVendorStartUnused, 1507 QOMX_VIDEO_AVCProfileConstrainedBaseline, 1508 QOMX_VIDEO_AVCProfileConstrainedHigh, 1509 } QOMX_VIDEO_AVCPROFILETYPE; 1510 1511 1512 /** 1513 * H.264 MVC Profiles 1514 */ 1515 typedef enum QOMX_VIDEO_MVCPROFILETYPE { 1516 QOMX_VIDEO_MVCProfileStereoHigh = 0x1, 1517 QOMX_VIDEO_MVCProfileMultiViewHigh = 0x2, 1518 QOMX_VIDEO_MVCProfileKhronosExtensions = 0x6F000000, 1519 QOMX_VIDEO_MVCProfileVendorStartUnused = 0x7F000000, 1520 QOMX_VIDEO_MVCProfileMax = 0x7FFFFFFF 1521 } QOMX_VIDEO_MVCPROFILETYPE; 1522 1523 /** 1524 * H.264 MVC Levels 1525 */ 1526 typedef enum QOMX_VIDEO_MVCLEVELTYPE { 1527 QOMX_VIDEO_MVCLevel1 = 0x01, /**< Level 1 */ 1528 QOMX_VIDEO_MVCLevel1b = 0x02, /**< Level 1b */ 1529 QOMX_VIDEO_MVCLevel11 = 0x04, /**< Level 1.1 */ 1530 QOMX_VIDEO_MVCLevel12 = 0x08, /**< Level 1.2 */ 1531 QOMX_VIDEO_MVCLevel13 = 0x10, /**< Level 1.3 */ 1532 QOMX_VIDEO_MVCLevel2 = 0x20, /**< Level 2 */ 1533 QOMX_VIDEO_MVCLevel21 = 0x40, /**< Level 2.1 */ 1534 QOMX_VIDEO_MVCLevel22 = 0x80, /**< Level 2.2 */ 1535 QOMX_VIDEO_MVCLevel3 = 0x100, /**< Level 3 */ 1536 QOMX_VIDEO_MVCLevel31 = 0x200, /**< Level 3.1 */ 1537 QOMX_VIDEO_MVCLevel32 = 0x400, /**< Level 3.2 */ 1538 QOMX_VIDEO_MVCLevel4 = 0x800, /**< Level 4 */ 1539 QOMX_VIDEO_MVCLevel41 = 0x1000, /**< Level 4.1 */ 1540 QOMX_VIDEO_MVCLevel42 = 0x2000, /**< Level 4.2 */ 1541 QOMX_VIDEO_MVCLevel5 = 0x4000, /**< Level 5 */ 1542 QOMX_VIDEO_MVCLevel51 = 0x8000, /**< Level 5.1 */ 1543 QOMX_VIDEO_MVCLevelKhronosExtensions = 0x6F000000, 1544 QOMX_VIDEO_MVCLevelVendorStartUnused = 0x7F000000, 1545 QOMX_VIDEO_MVCLevelMax = 0x7FFFFFFF 1546 } QOMX_VIDEO_MVCLEVELTYPE; 1547 1548 /** 1549 * DivX Versions 1550 */ 1551 typedef enum QOMX_VIDEO_DIVXFORMATTYPE { 1552 QOMX_VIDEO_DIVXFormatUnused = 0x01, /**< Format unused or unknown */ 1553 QOMX_VIDEO_DIVXFormat311 = 0x02, /**< DivX 3.11 */ 1554 QOMX_VIDEO_DIVXFormat4 = 0x04, /**< DivX 4 */ 1555 QOMX_VIDEO_DIVXFormat5 = 0x08, /**< DivX 5 */ 1556 QOMX_VIDEO_DIVXFormat6 = 0x10, /**< DivX 6 */ 1557 QOMX_VIDEO_DIVXFormatKhronosExtensions = 0x6F000000, 1558 QOMX_VIDEO_DIVXFormatVendorStartUnused = 0x7F000000, 1559 QOMX_VIDEO_DIVXFormatMax = 0x7FFFFFFF 1560 } QOMX_VIDEO_DIVXFORMATTYPE; 1561 1562 /** 1563 * DivX profile types, each profile indicates support for 1564 * various performance bounds. 1565 */ 1566 typedef enum QOMX_VIDEO_DIVXPROFILETYPE { 1567 QOMX_VIDEO_DivXProfileqMobile = 0x01, /**< qMobile Profile */ 1568 QOMX_VIDEO_DivXProfileMobile = 0x02, /**< Mobile Profile */ 1569 QOMX_VIDEO_DivXProfileMT = 0x04, /**< Mobile Theatre Profile */ 1570 QOMX_VIDEO_DivXProfileHT = 0x08, /**< Home Theatre Profile */ 1571 QOMX_VIDEO_DivXProfileHD = 0x10, /**< High Definition Profile */ 1572 QOMX_VIDEO_DIVXProfileKhronosExtensions = 0x6F000000, 1573 QOMX_VIDEO_DIVXProfileVendorStartUnused = 0x7F000000, 1574 QOMX_VIDEO_DIVXProfileMax = 0x7FFFFFFF 1575 } QOMX_VIDEO_DIVXPROFILETYPE; 1576 1577 /** 1578 * DivX Video Params 1579 * 1580 * STRUCT MEMBERS: 1581 * nSize : Size of the structure in bytes 1582 * nVersion : OMX specification version information 1583 * nPortIndex : Port that this structure applies to 1584 * eFormat : Version of DivX stream / data 1585 * eProfile : Profile of DivX stream / data 1586 */ 1587 typedef struct QOMX_VIDEO_PARAM_DIVXTYPE { 1588 OMX_U32 nSize; 1589 OMX_VERSIONTYPE nVersion; 1590 OMX_U32 nPortIndex; 1591 QOMX_VIDEO_DIVXFORMATTYPE eFormat; 1592 QOMX_VIDEO_DIVXPROFILETYPE eProfile; 1593 } QOMX_VIDEO_PARAM_DIVXTYPE; 1594 1595 1596 1597 /** 1598 * VP Versions 1599 */ 1600 typedef enum QOMX_VIDEO_VPFORMATTYPE { 1601 QOMX_VIDEO_VPFormatUnused = 0x01, /**< Format unused or unknown */ 1602 QOMX_VIDEO_VPFormat6 = 0x02, /**< VP6 Video Format */ 1603 QOMX_VIDEO_VPFormat7 = 0x04, /**< VP7 Video Format */ 1604 QOMX_VIDEO_VPFormat8 = 0x08, /**< VP8 Video Format */ 1605 QOMX_VIDEO_VPFormat9 = 0x10, /**< VP9 Video Format */ 1606 QOMX_VIDEO_VPFormatKhronosExtensions = 0x6F000000, 1607 QOMX_VIDEO_VPFormatVendorStartUnused = 0x7F000000, 1608 QOMX_VIDEO_VPFormatMax = 0x7FFFFFFF 1609 } QOMX_VIDEO_VPFORMATTYPE; 1610 1611 /** 1612 * VP profile types, each profile indicates support for various 1613 * encoding tools. 1614 */ 1615 typedef enum QOMX_VIDEO_VPPROFILETYPE { 1616 QOMX_VIDEO_VPProfileSimple = 0x01, /**< Simple Profile, applies to VP6 only */ 1617 QOMX_VIDEO_VPProfileAdvanced = 0x02, /**< Advanced Profile, applies to VP6 only */ 1618 QOMX_VIDEO_VPProfileVersion0 = 0x04, /**< Version 0, applies to VP7 and VP8 */ 1619 QOMX_VIDEO_VPProfileVersion1 = 0x08, /**< Version 1, applies to VP7 and VP8 */ 1620 QOMX_VIDEO_VPProfileVersion2 = 0x10, /**< Version 2, applies to VP8 only */ 1621 QOMX_VIDEO_VPProfileVersion3 = 0x20, /**< Version 3, applies to VP8 only */ 1622 QOMX_VIDEO_VPProfileKhronosExtensions = 0x6F000000, 1623 QOMX_VIDEO_VPProfileVendorStartUnused = 0x7F000000, 1624 QOMX_VIDEO_VPProfileMax = 0x7FFFFFFF 1625 } QOMX_VIDEO_VPPROFILETYPE; 1626 1627 /** 1628 * VP Video Params 1629 * 1630 * STRUCT MEMBERS: 1631 * nSize : Size of the structure in bytes 1632 * nVersion : OMX specification version information 1633 * nPortIndex : Port that this structure applies to 1634 * eFormat : Format of VP stream / data 1635 * eProfile : Profile or Version of VP stream / data 1636 */ 1637 typedef struct QOMX_VIDEO_PARAM_VPTYPE { 1638 OMX_U32 nSize; 1639 OMX_VERSIONTYPE nVersion; 1640 OMX_U32 nPortIndex; 1641 QOMX_VIDEO_VPFORMATTYPE eFormat; 1642 QOMX_VIDEO_VPPROFILETYPE eProfile; 1643 } QOMX_VIDEO_PARAM_VPTYPE; 1644 1645 /** 1646 * Spark Versions 1647 */ 1648 typedef enum QOMX_VIDEO_SPARKFORMATTYPE { 1649 QOMX_VIDEO_SparkFormatUnused = 0x01, /**< Format unused or unknown */ 1650 QOMX_VIDEO_SparkFormat0 = 0x02, /**< Video Format Version 0 */ 1651 QOMX_VIDEO_SparkFormat1 = 0x04, /**< Video Format Version 1 */ 1652 QOMX_VIDEO_SparkFormatKhronosExtensions = 0x6F000000, 1653 QOMX_VIDEO_SparkFormatVendorStartUnused = 0x7F000000, 1654 QOMX_VIDEO_SparkFormatMax = 0x7FFFFFFF 1655 } QOMX_VIDEO_SPARKFORMATTYPE; 1656 1657 /** 1658 * Spark Video Params 1659 * 1660 * STRUCT MEMBERS: 1661 * nSize : Size of the structure in bytes 1662 * nVersion : OMX specification version information 1663 * nPortIndex : Port that this structure applies to 1664 * eFormat : Version of Spark stream / data 1665 */ 1666 typedef struct QOMX_VIDEO_PARAM_SPARKTYPE { 1667 OMX_U32 nSize; 1668 OMX_VERSIONTYPE nVersion; 1669 OMX_U32 nPortIndex; 1670 QOMX_VIDEO_SPARKFORMATTYPE eFormat; 1671 } QOMX_VIDEO_PARAM_SPARKTYPE; 1672 1673 1674 typedef struct QOMX_VIDEO_QUERY_DECODER_INSTANCES { 1675 OMX_U32 nSize; 1676 OMX_VERSIONTYPE nVersion; 1677 OMX_U32 nPortIndex; 1678 OMX_U32 nNumOfInstances; 1679 } QOMX_VIDEO_QUERY_DECODER_INSTANCES; 1680 1681 typedef struct QOMX_ENABLETYPE { 1682 OMX_U32 nSize; 1683 OMX_VERSIONTYPE nVersion; 1684 OMX_BOOL bEnable; 1685 } QOMX_ENABLETYPE; 1686 1687 typedef struct QOMX_DISABLETYPE { 1688 OMX_U32 nSize; 1689 OMX_VERSIONTYPE nVersion; 1690 OMX_BOOL bDisable; 1691 } QOMX_DISABLETYPE; 1692 1693 typedef enum QOMX_VIDEO_EVENTS { 1694 OMX_EventIndexsettingChanged = OMX_EventVendorStartUnused 1695 } QOMX_VIDEO_EVENTS; 1696 1697 typedef enum QOMX_VIDEO_PICTURE_ORDER { 1698 QOMX_VIDEO_DISPLAY_ORDER = 0x1, 1699 QOMX_VIDEO_DECODE_ORDER = 0x2 1700 } QOMX_VIDEO_PICTURE_ORDER; 1701 1702 typedef struct QOMX_VIDEO_DECODER_PICTURE_ORDER { 1703 OMX_U32 nSize; 1704 OMX_VERSIONTYPE nVersion; 1705 OMX_U32 nPortIndex; 1706 QOMX_VIDEO_PICTURE_ORDER eOutputPictureOrder; 1707 } QOMX_VIDEO_DECODER_PICTURE_ORDER; 1708 1709 typedef struct QOMX_INDEXEXTRADATATYPE { 1710 OMX_U32 nSize; 1711 OMX_VERSIONTYPE nVersion; 1712 OMX_U32 nPortIndex; 1713 OMX_BOOL bEnabled; 1714 OMX_INDEXTYPE nIndex; 1715 } QOMX_INDEXEXTRADATATYPE; 1716 1717 typedef struct QOMX_INDEXTIMESTAMPREORDER { 1718 OMX_U32 nSize; 1719 OMX_VERSIONTYPE nVersion; 1720 OMX_U32 nPortIndex; 1721 OMX_BOOL bEnable; 1722 } QOMX_INDEXTIMESTAMPREORDER; 1723 1724 typedef struct QOMX_INDEXDOWNSCALAR { 1725 OMX_U32 nSize; 1726 OMX_VERSIONTYPE nVersion; 1727 OMX_U32 nPortIndex; 1728 OMX_BOOL bEnable; 1729 } QOMX_INDEXDOWNSCALAR; 1730 1731 typedef struct QOMX_VIDEO_CUSTOM_BUFFERSIZE { 1732 OMX_U32 nSize; 1733 OMX_VERSIONTYPE nVersion; 1734 OMX_U32 nPortIndex; 1735 OMX_U32 nBufferSize; 1736 } QOMX_VIDEO_CUSTOM_BUFFERSIZE; 1737 1738 #define OMX_QCOM_INDEX_PARAM_VIDEO_SYNCFRAMEDECODINGMODE "OMX.QCOM.index.param.video.SyncFrameDecodingMode" 1739 #define OMX_QCOM_INDEX_PARAM_INDEXEXTRADATA "OMX.QCOM.index.param.IndexExtraData" 1740 #define OMX_QCOM_INDEX_PARAM_VIDEO_SLICEDELIVERYMODE "OMX.QCOM.index.param.SliceDeliveryMode" 1741 #define OMX_QCOM_INDEX_PARAM_VIDEO_FRAMEPACKING_EXTRADATA "OMX.QCOM.index.param.video.FramePackingExtradata" 1742 #define OMX_QCOM_INDEX_PARAM_VIDEO_QP_EXTRADATA "OMX.QCOM.index.param.video.QPExtradata" 1743 #define OMX_QCOM_INDEX_PARAM_VIDEO_INPUTBITSINFO_EXTRADATA "OMX.QCOM.index.param.video.InputBitsInfoExtradata" 1744 #define OMX_QCOM_INDEX_PARAM_VIDEO_EXTNUSER_EXTRADATA "OMX.QCOM.index.param.video.ExtnUserExtraData" 1745 #define OMX_QCOM_INDEX_CONFIG_VIDEO_FRAMEPACKING_INFO "OMX.QCOM.index.config.video.FramePackingInfo" 1746 #define OMX_QCOM_INDEX_PARAM_VIDEO_MPEG2SEQDISP_EXTRADATA "OMX.QCOM.index.param.video.Mpeg2SeqDispExtraData" 1747 1748 #define OMX_QCOM_INDEX_PARAM_VIDEO_HIERSTRUCTURE "OMX.QCOM.index.param.video.HierStructure" 1749 #define OMX_QCOM_INDEX_PARAM_VIDEO_LTRCOUNT "OMX.QCOM.index.param.video.LTRCount" 1750 #define OMX_QCOM_INDEX_PARAM_VIDEO_LTRPERIOD "OMX.QCOM.index.param.video.LTRPeriod" 1751 #define OMX_QCOM_INDEX_CONFIG_VIDEO_LTRUSE "OMX.QCOM.index.config.video.LTRUse" 1752 #define OMX_QCOM_INDEX_CONFIG_VIDEO_LTRMARK "OMX.QCOM.index.config.video.LTRMark" 1753 #define OMX_QCOM_INDEX_CONFIG_VIDEO_HIER_P_LAYERS "OMX.QCOM.index.config.video.hierplayers" 1754 #define OMX_QCOM_INDEX_CONFIG_RECTANGLE_TYPE "OMX.QCOM.index.config.video.rectangle" 1755 #define OMX_QCOM_INDEX_PARAM_VIDEO_BASE_LAYER_ID "OMX.QCOM.index.param.video.baselayerid" 1756 #define OMX_QCOM_INDEX_CONFIG_VIDEO_QP "OMX.QCOM.index.config.video.qp" 1757 #define OMX_QCOM_INDEX_PARAM_VIDEO_SAR "OMX.QCOM.index.param.video.sar" 1758 #define OMX_QTI_INDEX_PARAM_VIDEO_LOW_LATENCY "OMX.QTI.index.param.video.LowLatency" 1759 1760 #define OMX_QCOM_INDEX_PARAM_VIDEO_PASSINPUTBUFFERFD "OMX.QCOM.index.param.video.PassInputBufferFd" 1761 #define OMX_QTI_INDEX_PARAM_VIDEO_PREFER_ADAPTIVE_PLAYBACK "OMX.QTI.index.param.video.PreferAdaptivePlayback" 1762 #define OMX_QTI_INDEX_CONFIG_VIDEO_SETTIMEDATA "OMX.QTI.index.config.video.settimedata" 1763 #define OMX_QTI_INDEX_PARAM_VIDEO_FORCE_COMPRESSED_FOR_DPB "OMX.QTI.index.param.video.ForceCompressedForDPB" 1764 #define OMX_QTI_INDEX_PARAM_VIDEO_ENABLE_ROIINFO "OMX.QTI.index.param.enableRoiInfo" 1765 #define OMX_QTI_INDEX_CONFIG_VIDEO_ROIINFO "OMX.QTI.index.config.RoiInfo" 1766 #define OMX_QTI_INDEX_CONFIG_VIDEO_BLURINFO "OMX.QTI.index.config.BlurInfo" 1767 #define OMX_QTI_INDEX_PARAM_VIDEO_CLIENT_EXTRADATA "OMX.QTI.index.param.client.extradata" 1768 #define OMX_QTI_INDEX_CONFIG_COLOR_ASPECTS "OMX.google.android.index.describeColorAspects" 1769 1770 typedef enum { 1771 QOMX_VIDEO_FRAME_PACKING_CHECKERBOARD = 0, 1772 QOMX_VIDEO_FRAME_PACKING_COLUMN_INTERLEAVE = 1, 1773 QOMX_VIDEO_FRAME_PACKING_ROW_INTERLEAVE = 2, 1774 QOMX_VIDEO_FRAME_PACKING_SIDE_BY_SIDE = 3, 1775 QOMX_VIDEO_FRAME_PACKING_TOP_BOTTOM = 4, 1776 QOMX_VIDEO_FRAME_PACKING_TEMPORAL = 5, 1777 } QOMX_VIDEO_FRAME_PACKING_ARRANGEMENT; 1778 1779 typedef enum { 1780 QOMX_VIDEO_CONTENT_UNSPECIFIED = 0, 1781 QOMX_VIDEO_CONTENT_LR_VIEW = 1, 1782 QOMX_VIDEO_CONTENT_RL_VIEW = 2, 1783 } QOMX_VIDEO_CONTENT_INTERPRETATION; 1784 1785 /** 1786 * Specifies the extended picture types. These values should be 1787 * OR'd along with the types defined in OMX_VIDEO_PICTURETYPE to 1788 * signal all pictures types which are allowed. 1789 * 1790 * ENUMS: 1791 * H.264 Specific Picture Types: IDR 1792 */ 1793 typedef enum QOMX_VIDEO_PICTURETYPE { 1794 QOMX_VIDEO_PictureTypeIDR = OMX_VIDEO_PictureTypeVendorStartUnused + 0x1000 1795 } QOMX_VIDEO_PICTURETYPE; 1796 1797 #define OMX_QCOM_INDEX_CONFIG_ACTIVE_REGION_DETECTION "OMX.QCOM.index.config.activeregiondetection" 1798 #define OMX_QCOM_INDEX_CONFIG_ACTIVE_REGION_DETECTION_STATUS "OMX.QCOM.index.config.activeregiondetectionstatus" 1799 #define OMX_QCOM_INDEX_CONFIG_SCALING_MODE "OMX.QCOM.index.config.scalingmode" 1800 #define OMX_QCOM_INDEX_CONFIG_NOISEREDUCTION "OMX.QCOM.index.config.noisereduction" 1801 #define OMX_QCOM_INDEX_CONFIG_IMAGEENHANCEMENT "OMX.QCOM.index.config.imageenhancement" 1802 #define OMX_QCOM_INDEX_PARAM_HELDBUFFERCOUNT "OMX.QCOM.index.param.HeldBufferCount" /**< reference: QOMX_HELDBUFFERCOUNTTYPE */ 1803 1804 1805 typedef struct QOMX_RECTTYPE { 1806 OMX_U32 nSize; 1807 OMX_VERSIONTYPE nVersion; 1808 OMX_S32 nLeft; 1809 OMX_S32 nTop; 1810 OMX_U32 nWidth; 1811 OMX_U32 nHeight; 1812 } QOMX_RECTTYPE; 1813 1814 typedef struct QOMX_ACTIVEREGIONDETECTIONTYPE { 1815 OMX_U32 nSize; 1816 OMX_VERSIONTYPE nVersion; 1817 OMX_U32 nPortIndex; 1818 OMX_BOOL bEnable; 1819 QOMX_RECTTYPE sROI; 1820 OMX_U32 nNumExclusionRegions; 1821 QOMX_RECTTYPE sExclusionRegions[1]; 1822 } QOMX_ACTIVEREGIONDETECTIONTYPE; 1823 1824 typedef struct QOMX_ACTIVEREGIONDETECTION_STATUSTYPE { 1825 OMX_U32 nSize; 1826 OMX_VERSIONTYPE nVersion; 1827 OMX_U32 nPortIndex; 1828 OMX_BOOL bDetected; 1829 QOMX_RECTTYPE sDetectedRegion; 1830 } QOMX_ACTIVEREGIONDETECTION_STATUSTYPE; 1831 1832 typedef enum QOMX_SCALE_MODETYPE { 1833 QOMX_SCALE_MODE_Normal, 1834 QOMX_SCALE_MODE_Anamorphic, 1835 QOMX_SCALE_MODE_Max = 0x7FFFFFFF 1836 } QOMX_SCALE_MODETYPE; 1837 1838 typedef struct QOMX_SCALINGMODETYPE { 1839 OMX_U32 nSize; 1840 OMX_VERSIONTYPE nVersion; 1841 QOMX_SCALE_MODETYPE eScaleMode; 1842 } QOMX_SCALINGMODETYPE; 1843 1844 typedef struct QOMX_NOISEREDUCTIONTYPE { 1845 OMX_U32 nSize; 1846 OMX_VERSIONTYPE nVersion; 1847 OMX_U32 nPortIndex; 1848 OMX_BOOL bEnable; 1849 OMX_BOOL bAutoMode; 1850 OMX_S32 nNoiseReduction; 1851 } QOMX_NOISEREDUCTIONTYPE; 1852 1853 typedef struct QOMX_IMAGEENHANCEMENTTYPE { 1854 OMX_U32 nSize; 1855 OMX_VERSIONTYPE nVersion; 1856 OMX_U32 nPortIndex; 1857 OMX_BOOL bEnable; 1858 OMX_BOOL bAutoMode; 1859 OMX_S32 nImageEnhancement; 1860 } QOMX_IMAGEENHANCEMENTTYPE; 1861 1862 /* 1863 * these are part of OMX1.2 but JB MR2 branch doesn't have them defined 1864 * OMX_IndexParamInterlaceFormat 1865 * OMX_INTERLACEFORMATTYPE 1866 */ 1867 #ifndef OMX_IndexParamInterlaceFormat 1868 #define OMX_IndexParamInterlaceFormat (0x7FF00000) 1869 typedef struct OMX_INTERLACEFORMATTYPE { 1870 OMX_U32 nSize; 1871 OMX_VERSIONTYPE nVersion; 1872 OMX_U32 nPortIndex; 1873 OMX_U32 nFormat; 1874 OMX_TICKS nTimeStamp; 1875 } OMX_INTERLACEFORMATTYPE; 1876 #endif 1877 1878 /** 1879 * This structure is used to indicate the maximum number of buffers 1880 * that a port will hold during data flow. 1881 * 1882 * STRUCT MEMBERS: 1883 * nSize : Size of the structure in bytes 1884 * nVersion : OMX specification version info 1885 * nPortIndex : Port that this structure applies to 1886 * nHeldBufferCount : Read-only, maximum number of buffers that will be held 1887 */ 1888 typedef struct QOMX_HELDBUFFERCOUNTTYPE { 1889 OMX_U32 nSize; 1890 OMX_VERSIONTYPE nVersion; 1891 OMX_U32 nPortIndex; 1892 OMX_U32 nHeldBufferCount; 1893 } QOMX_HELDBUFFERCOUNTTYPE; 1894 1895 typedef enum QOMX_VIDEO_HIERARCHICALCODINGTYPE { 1896 QOMX_HIERARCHICALCODING_P = 0x01, 1897 QOMX_HIERARCHICALCODING_B = 0x02, 1898 } QOMX_VIDEO_HIERARCHICALCODINGTYPE; 1899 1900 typedef struct QOMX_VIDEO_HIERARCHICALLAYERS { 1901 OMX_U32 nSize; 1902 OMX_VERSIONTYPE nVersion; 1903 OMX_U32 nPortIndex; 1904 OMX_U32 nNumLayers; 1905 QOMX_VIDEO_HIERARCHICALCODINGTYPE eHierarchicalCodingType; 1906 } QOMX_VIDEO_HIERARCHICALLAYERS; 1907 1908 typedef struct QOMX_VIDEO_H264ENTROPYCODINGTYPE { 1909 OMX_U32 nSize; 1910 OMX_VERSIONTYPE nVersion; 1911 OMX_BOOL bCabac; 1912 OMX_U32 nCabacInitIdc; 1913 } QOMX_VIDEO_H264ENTROPYCODINGTYPE; 1914 1915 typedef enum QOMX_VIDEO_IFRAMESIZE_TYPE { 1916 QOMX_IFRAMESIZE_DEFAULT, 1917 QOMX_IFRAMESIZE_MEDIUM, 1918 QOMX_IFRAMESIZE_HUGE, 1919 QOMX_IFRAMESIZE_UNLIMITED, 1920 } QOMX_VIDEO_IFRAMESIZE_TYPE; 1921 1922 typedef struct QOMX_VIDEO_IFRAMESIZE { 1923 OMX_U32 nSize; 1924 OMX_VERSIONTYPE nVersion; 1925 QOMX_VIDEO_IFRAMESIZE_TYPE eType; 1926 } QOMX_VIDEO_IFRAMESIZE; 1927 1928 /* VIDEO POSTPROCESSING CTRLS AND ENUMS */ 1929 /* MUST KEEP SAME AS IN vpp.h */ 1930 #define QOMX_VPP_HQV_CUSTOMPAYLOAD_SZ 256 1931 #define VPP_HQV_CONTROL_GLOBAL_START (VPP_HQV_CONTROL_CUST + 1) 1932 1933 typedef enum QOMX_VPP_HQV_MODE { 1934 VPP_HQV_MODE_OFF, 1935 VPP_HQV_MODE_AUTO, 1936 VPP_HQV_MODE_MANUAL, 1937 VPP_HQV_MODE_MAX 1938 } QOMX_VPP_HQV_MODE; 1939 1940 typedef enum QOMX_VPP_HQVCONTROLTYPE { 1941 VPP_HQV_CONTROL_CADE = 0x1, 1942 VPP_HQV_CONTROL_DI = 0x02, 1943 VPP_HQV_CONTROL_CNR = 0x04, 1944 VPP_HQV_CONTROL_AIE = 0x05, 1945 VPP_HQV_CONTROL_FRC = 0x06, 1946 VPP_HQV_CONTROL_CUST = 0x07, 1947 VPP_HQV_CONTROL_GLOBAL_DEMO = VPP_HQV_CONTROL_GLOBAL_START, 1948 VPP_HQV_CONTROL_MAX, 1949 } QOMX_VPP_HQVCONTROLTYPE; 1950 1951 typedef enum QOMX_VPP_HQV_DI_MODE { 1952 VPP_HQV_DI_MODE_OFF, 1953 VPP_HQV_DI_MODE_VIDEO_1F, 1954 VPP_HQV_DI_MODE_VIDEO_3F, 1955 VPP_HQV_DI_MODE_AUTO, 1956 VPP_HQV_DI_MODE_MAX, 1957 } QOMX_VPP_HQV_DI_MODE; 1958 1959 typedef enum QOMX_VPP_HQV_HUE_MODE { 1960 VPP_HQV_HUE_MODE_OFF, 1961 VPP_HQV_HUE_MODE_ON, 1962 VPP_HQV_HUE_MODE_MAX, 1963 } QOMX_VPP_HQV_HUE_MODE; 1964 1965 typedef enum QOMX_VPP_SPLIT_DIRECTION { 1966 VPP_HQV_SPLIT_LEFT_TO_RIGHT, 1967 VPP_HQV_SPLIT_RIGHT_TO_LEFT, 1968 VPP_HQV_SPLIT_TOP_TO_BOTTOM, 1969 VPP_HQV_SPLIT_BOTTOM_TO_TOP, 1970 VPP_HQV_SPLIT_MAX, 1971 } QOMX_VPP_SPLIT_DIRECTION; 1972 1973 typedef enum QOMX_VPP_HQV_FRC_MODE { 1974 VPP_HQV_FRC_MODE_OFF, 1975 VPP_HQV_FRC_MODE_LOW, 1976 VPP_HQV_FRC_MODE_MED, 1977 VPP_HQV_FRC_MODE_HIGH, 1978 VPP_HQV_FRC_MODE_MAX, 1979 } QOMX_VPP_HQV_FRC_MODE; 1980 1981 1982 typedef struct QOMX_VPP_HQVCTRL_CADE { 1983 QOMX_VPP_HQV_MODE mode; 1984 OMX_U32 level; 1985 OMX_S32 contrast; 1986 OMX_S32 saturation; 1987 } QOMX_VPP_HQVCTRL_CADE; 1988 1989 typedef struct QOMX_VPP_HQVCTRL_DI { 1990 QOMX_VPP_HQV_DI_MODE mode; 1991 } QOMX_VPP_HQVCTRL_DI; 1992 1993 typedef struct QOMX_VPP_HQVCTRL_CNR { 1994 QOMX_VPP_HQV_MODE mode; 1995 OMX_U32 level; 1996 } QOMX_VPP_HQVCTRL_CNR; 1997 1998 typedef struct QOMX_VPP_HQVCTRL_AIE { 1999 QOMX_VPP_HQV_MODE mode; 2000 QOMX_VPP_HQV_HUE_MODE hue_mode; 2001 OMX_U32 cade_level; 2002 OMX_U32 ltm_level; 2003 } QOMX_VPP_HQVCTRL_AIE; 2004 2005 typedef struct QOMX_VPP_HQVCTRL_CUSTOM { 2006 OMX_U32 id; 2007 OMX_U32 len; 2008 OMX_U8 data[QOMX_VPP_HQV_CUSTOMPAYLOAD_SZ]; 2009 } QOMX_VPP_HQVCTRL_CUSTOM; 2010 2011 typedef struct QOMX_VPP_HQVCTRL_GLOBAL_DEMO { 2012 OMX_U32 process_percent; 2013 QOMX_VPP_SPLIT_DIRECTION process_direction; 2014 } QOMX_VPP_HQVCTRL_GLOBAL_DEMO; 2015 2016 typedef struct QOMX_VPP_HQVCTRL_FRC { 2017 QOMX_VPP_HQV_FRC_MODE mode; 2018 } QOMX_VPP_HQVCTRL_FRC; 2019 2020 /* VIDEO POSTPROCESSING OMX CTRLS */ 2021 typedef struct QOMX_VPP_HQVCONTROL { 2022 OMX_U32 nSize; 2023 OMX_VERSIONTYPE nVersion; 2024 QOMX_VPP_HQV_MODE mode; 2025 QOMX_VPP_HQVCONTROLTYPE ctrl_type; 2026 union { 2027 QOMX_VPP_HQVCTRL_CADE cade; 2028 QOMX_VPP_HQVCTRL_DI di; 2029 QOMX_VPP_HQVCTRL_CNR cnr; 2030 QOMX_VPP_HQVCTRL_AIE aie; 2031 QOMX_VPP_HQVCTRL_CUSTOM custom; 2032 QOMX_VPP_HQVCTRL_GLOBAL_DEMO global_demo; 2033 QOMX_VPP_HQVCTRL_FRC frc; 2034 }; 2035 } QOMX_VPP_HQVCONTROL; 2036 2037 /* STRUCTURE TO TURN VPP ON */ 2038 typedef struct QOMX_VPP_ENABLE { 2039 OMX_U32 nSize; 2040 OMX_VERSIONTYPE nVersion; 2041 OMX_BOOL enable_vpp; 2042 } QOMX_VPP_ENABLE; 2043 2044 typedef struct QOMX_EXTRADATA_ENABLE { 2045 OMX_U32 nSize; 2046 OMX_VERSIONTYPE nVersion; 2047 OMX_U32 nPortIndex; 2048 OMX_BOOL bEnable; 2049 } QOMX_EXTRADATA_ENABLE; 2050 2051 typedef enum OMX_QOMX_VIDEO_MBISTATISTICSTYPE { 2052 QOMX_MBI_STATISTICS_MODE_DEFAULT = 0, 2053 QOMX_MBI_STATISTICS_MODE_1 = 0x01, 2054 QOMX_MBI_STATISTICS_MODE_2 = 0x02, 2055 } OMX_QOMX_VIDEO_MBISTATISTICSTYPE; 2056 2057 typedef struct OMX_QOMX_VIDEO_MBI_STATISTICS { 2058 OMX_U32 nSize; 2059 OMX_VERSIONTYPE nVersion; 2060 OMX_U32 nPortIndex; 2061 OMX_QOMX_VIDEO_MBISTATISTICSTYPE eMBIStatisticsType; 2062 } OMX_QOMX_VIDEO_MBI_STATISTICS; 2063 2064 typedef struct QOMX_VIDEO_BATCHSIZETYPE { 2065 OMX_U32 nSize; 2066 OMX_VERSIONTYPE nVersion; 2067 OMX_U32 nPortIndex; 2068 OMX_U32 nBatchSize; 2069 } QOMX_VIDEO_BATCHSIZETYPE; 2070 2071 typedef struct QOMX_VIDEO_CLIENT_EXTRADATA { 2072 OMX_U32 nSize; 2073 OMX_VERSIONTYPE nVersion; 2074 OMX_U32 nPortIndex; 2075 OMX_U32 nFd; 2076 OMX_U32 nExtradataAllocSize; 2077 OMX_U32 nExtradataSize; 2078 } QOMX_VIDEO_CLIENT_EXTRADATATYPE; 2079 2080 #if defined(__cplusplus) && defined(USE_CAMERA_METABUFFER_UTILS) 2081 2082 #define CAM_META_BUFFER_EVENT_PERF 0x01 2083 2084 /** 2085 * Camera1 meta-buffer payload create/access/modify utility 2086 */ 2087 struct MetaBufferUtil { 2088 2089 enum { 2090 INT_OFFSET = 1, 2091 INT_SIZE = 2, 2092 INT_USAGE = 3, 2093 INT_TIMESTAMP = 4, 2094 INT_COLORFORMAT = 5, 2095 INT_BUFINDEX = 6, 2096 INT_BUFEVENT = 7, 2097 INT_TOTAL = INT_BUFEVENT, 2098 }; 2099 getNumFdsForBatchMetaBufferUtil2100 static int getNumFdsForBatch(int batchSize) { 2101 return batchSize; 2102 } getNumIntsForBatchMetaBufferUtil2103 static int getNumIntsForBatch(int batchSize) { 2104 return batchSize * INT_TOTAL; 2105 } getBatchSizeMetaBufferUtil2106 static int getBatchSize(const native_handle_t *hnd) { 2107 return MetaBufferUtil::isHandleSane(hnd) ? hnd->numFds : -1; 2108 } 2109 2110 /* getters */ 2111 /* return a fd at index or -1 if index is invalid */ getFdAtMetaBufferUtil2112 static int getFdAt(const native_handle_t *hnd, int index) { 2113 return (MetaBufferUtil::isHandleSane(hnd) && (index < hnd->numFds)) ? hnd->data[index] : -1; 2114 } 2115 /* return a int of type at index or -1 if index or type is invalid */ getIntAtMetaBufferUtil2116 static int getIntAt(const native_handle_t *hnd, int index, int type) { 2117 int idx = MetaBufferUtil::getIntIndex(hnd, index, type); 2118 return idx < 0 ? -1 : hnd->data[idx]; 2119 } 2120 2121 /* setters */ 2122 /* replace the fd at index and return 0. Return -1 if index is invalid */ setFdAtMetaBufferUtil2123 static int setFdAt(native_handle_t *hnd, int index, int fd) { 2124 return (MetaBufferUtil::isHandleSane(hnd) && (index < hnd->numFds)) ? hnd->data[index] = fd, 0 : -1; 2125 } 2126 /* replace an int of type at index and return 0. Return -1 if index or type is invalid */ setIntAtMetaBufferUtil2127 static int setIntAt(native_handle_t *hnd, int index, int type, int value) { 2128 int idx = MetaBufferUtil::getIntIndex(hnd, index, type); 2129 return idx < 0 ? -1 : hnd->data[idx] = value, 0; 2130 } 2131 2132 private: isHandleSaneMetaBufferUtil2133 static bool isHandleSane(const native_handle_t *hnd) { 2134 return hnd && hnd->version == sizeof(native_handle_t); 2135 } 2136 getIntIndexMetaBufferUtil2137 static int getIntIndex(const native_handle_t *hnd, int index, int type) { 2138 int idx = index + type * MetaBufferUtil::getBatchSize(hnd); 2139 return (MetaBufferUtil::isHandleSane(hnd) && (idx < (hnd->numInts + hnd->numFds))) ? idx : -1; 2140 } 2141 }; 2142 2143 #endif // __cplusplus 2144 2145 typedef enum QOMX_VIDEO_DITHERTYPE { 2146 QOMX_DITHER_DISABLE = 0, 2147 QOMX_DITHER_COLORSPACE_EXCEPT_BT2020 = 0x01, 2148 QOMX_DITHER_ALL_COLORSPACE = 0x02, 2149 } QOMX_VIDEO_DITHERTYPE; 2150 2151 typedef struct QOMX_VIDEO_DITHER_CONTROL { 2152 OMX_U32 nSize; 2153 OMX_VERSIONTYPE nVersion; 2154 OMX_U32 nPortIndex; 2155 QOMX_VIDEO_DITHERTYPE eDitherType; 2156 } QOMX_VIDEO_DITHER_CONTROL; 2157 2158 #ifdef __cplusplus 2159 } 2160 #endif /* __cplusplus */ 2161 2162 #endif /* __OMX_QCOM_EXTENSIONS_H__ */ 2163