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