1 2 /* 3 * Copyright (C) Texas Instruments - http://www.ti.com/ 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 20 */ 21 /* ============================================================================= 22 * Texas Instruments OMAP(TM) Platform Software 23 * (c) Copyright Texas Instruments, Incorporated. All Rights Reserved. 24 * 25 * Use of this software is controlled by the terms and conditions found 26 * in the license agreement under which this software has been supplied. 27 * =========================================================================== */ 28 /** 29 * @file OMX_VIDDEC_DSP.h 30 * 31 * This is a header file for a TI OMX video component that is fully 32 * compliant with the OMX Video specification. 33 * This the file that the application that uses OMX would include 34 * in its code. 35 * 36 * @path $(CSLPATH)\ 37 * 38 * @rev 0.1 39 */ 40 /* -------------------------------------------------------------------------- */ 41 42 #ifndef OMX_VIDDEC_DSP__H 43 #define OMX_VIDDEC_DSP__H 44 45 #define OMX_H264DEC_NUM_DLLS 5 46 #define OMX_MP4DEC_NUM_DLLS 5 47 #define OMX_MP2DEC_NUM_DLLS 4 48 #define OMX_WMVDEC_NUM_DLLS 5 49 #ifdef VIDDEC_SPARK_CODE 50 #define OMX_SPARKDEC_NUM_DLLS 5 51 #endif 52 53 #ifndef VIDDEC_SN_R8_14 54 #define VIDDEC_SN_R8_14 55 #endif 56 57 #ifndef UNDER_CE 58 #define H264_DEC_NODE_DLL "h264vdec_sn.dll64P" 59 #define MP4_DEC_NODE_DLL "mp4vdec_sn.dll64P" 60 #define MP4720P_DEC_NODE_DLL "mpeg4aridec_sn.dll64P" 61 #define MP2_DEC_NODE_DLL "mp2vdec_sn.dll64P" 62 #define WMV_DEC_NODE_DLL "wmv9dec_sn.dll64P" 63 #define RINGIO_NODE_DLL "ringio.dll64P" 64 #define USN_DLL "usn.dll64P" 65 #define CONVERSIONS_DLL "conversions.dll64P" 66 #ifdef VIDDEC_SPARK_CODE 67 #define SPARK_DEC_NODE_DLL "sparkdec_sn.dll64P" 68 #endif 69 #else 70 #define H264_DEC_NODE_DLL "\\windows\\h264vdec_sn.dll64P" 71 #define MP4_DEC_NODE_DLL "\\windows\\mp4vdec_sn.dll64P" 72 #define MP2_DEC_NODE_DLL "\\windows\\mp2vdec_sn.dll64P" 73 #define WMV_DEC_NODE_DLL "\\windows\\wmv9dec_sn.dll64P" 74 #define RINGIO_NODE_DLL "\\windows\\ringio.dll64P" 75 #define USN_DLL "\\windows\\usn.dll64P" 76 #define CONVERSIONS_DLL "\\windows\\conversions.dll64P" 77 #ifdef VIDDEC_SPARK_CODE 78 #define SPARK_DEC_NODE_DLL "\\windows\\sparkdec_sn.dll64P" 79 #endif 80 #endif 81 82 #define CEILING_1000X(x) ((OMX_U32)(x) + (1000-(OMX_U32)(x)%1000)) 83 84 #define STRING_UUID_LENGHT 37 85 /* DIVX_1.0_ARICENT_uuid */ 86 #define STRING_MP4D720PSOCKET_TI_UUID "E7FDD4D8_4F0B_4325_A430_E5729975F54A" 87 static const struct DSP_UUID MP4D720PSOCKET_TI_UUID = { 88 0xe7fdd4d8, 0x4f0b, 0x4325, 0xa4, 0x30, { 89 0xe5, 0x72, 0x99, 0x75, 0xf5, 0x4a 90 } 91 }; 92 /* MP4VDSOCKET_TI_UUID = 7E4B8541_47A1_11D6_B156_00B0D017674B */ 93 #define STRING_MP4DSOCKET_TI_UUID "7E4B8541_47A1_11D6_B156_00B0D017674B" 94 static const struct DSP_UUID MP4DSOCKET_TI_UUID = { 95 0x7e4b8541, 0x47a1, 0x11d6, 0xb1, 0x56, { 96 0x00, 0xb0, 0xd0, 0x17, 0x67, 0x4b 97 } 98 }; 99 /* MP2VDSOCKET_TI_UUID = 7E4B8541_47A1_11D6_B156_00B0D0176740 */ 100 #define STRING_MP2DSOCKET_TI_UUID "7E4B8541_47A1_11D6_B156_00B0D0176740" 101 static const struct DSP_UUID MP2DSOCKET_TI_UUID = { 102 0x7e4b8541, 0x47a1, 0x11d6, 0xb1, 0x56, { 103 0x00, 0xb0, 0xd0, 0x17, 0x67, 0x40 104 } 105 }; 106 /* H264VDSOCKET_TI_UUID = CB1E9F0F_9D5A_4434_8449_1FED2F992DF7 */ 107 #define STRING_H264VDSOCKET_TI_UUID "CB1E9F0F_9D5A_4434_8449_1FED2F992DF7" 108 static const struct DSP_UUID H264VDSOCKET_TI_UUID = { 109 0xCB1E9F0F, 0x9D5A, 0x4434, 0x84, 0x49, { 110 0x1F, 0xED, 0x2F, 0x99, 0x2D, 0xF7 111 } 112 }; 113 /* WMV9SOCKET_TI_UUID = 609DAB97_3DFC_471F_8AB9_4E56E834501B */ 114 #define STRING_WMVDSOCKET_TI_UUID "609DAB97_3DFC_471F_8AB9_4E56E834501B" 115 static const struct DSP_UUID WMVDSOCKET_TI_UUID = { 116 0x609DAB97, 0x3DFC, 0x471F, 0x8A, 0xB9, { 117 0x4E, 0x56, 0xE8, 0x34, 0x50, 0x1B 118 } 119 }; 120 121 static const struct DSP_UUID USN_UUID = { 122 0x79A3C8B3, 0x95F2, 0x403F, 0x9A, 0x4B, { 123 0xCF, 0x80, 0x57, 0x73, 0x05, 0x41 124 } 125 }; 126 127 static const struct DSP_UUID RINGIO_TI_UUID = { 128 0x47698bfb, 0xa7ee, 0x417e, 0xa6, 0x7a, { 129 0x41, 0xc0, 0x27, 0x9e, 0xb8, 0x05 130 } 131 }; 132 133 static const struct DSP_UUID CONVERSIONS_UUID = { 134 0x722DD0DA, 0xF532, 0x4238, 0xB8, 0x46, { 135 0xAB, 0xFF, 0x5D, 0xA4, 0xBA, 0x02 136 } 137 }; 138 139 #ifdef VIDDEC_SPARK_CODE 140 #define STRING_SPARKDSOCKET_TI_UUID "DD8AC7F0_33BF_446B_938E_FDF00B467ED6" 141 static const struct DSP_UUID SPARKDSOCKET_TI_UUID = { 142 0xdd8ac7f0, 0x33bf, 0x446b, 0x93, 0x8e, { 143 0xfd, 0xf0, 0x0b, 0x46, 0x7e, 0xd6 144 } 145 }; 146 #endif 147 148 typedef struct WMV9DEC_SNCreatePhArg { 149 OMX_U16 unNumOfStreams; 150 OMX_U16 unInputStreamID; 151 OMX_U16 unInputBufferType; 152 OMX_U16 unInputNumBufsPerStream; 153 154 OMX_U16 unOutputStreamID; 155 OMX_U16 unOutputBufferType; 156 OMX_U16 unOutputNumBufsPerStream; 157 OMX_U16 unReserved; 158 159 OMX_U32 ulMaxWidth; 160 OMX_U32 ulMaxHeight; 161 OMX_U32 ulYUVFormat; 162 OMX_U32 ulMaxFrameRate; 163 OMX_U32 ulMaxBitRate; 164 OMX_U32 ulDataEndianness; 165 OMX_S32 ulProfile; 166 OMX_S32 ulMaxLevel; 167 OMX_U32 ulProcessMode; 168 OMX_S32 lPreRollBufConfig; 169 OMX_U32 usIsElementaryStream; 170 OMX_U32 bCopiedCCDBuffer; 171 OMX_U16 endArgs; 172 } WMV9DEC_SNCreatePhArg; 173 174 typedef struct { 175 OMX_S32 lBuffCount; 176 } WMV9DEC_UALGInputParam; 177 178 typedef struct { 179 OMX_U32 ulDisplayID; 180 OMX_U32 ulBytesConsumed; 181 OMX_S32 iErrorCode; 182 OMX_U32 ulDecodedFrameType; 183 } WMV9DEC_UALGOutputParam; 184 185 /* Mpeg4 Decoder Structures */ 186 typedef enum 187 { 188 /* 0 */ 189 DECSTAT_Success, 190 /* 0x80000001 */ DECSTAT_Failure = -0x7FFFFFFF, 191 /* 0x80000002 */ DECSTAT_nonMpegStream, 192 /* 0x80000003 */ DECSTAT_nonVideoMpegStream, 193 /* 0x80000004 */ DECSTAT_unSupportedProfile, 194 /* 0x80000005 */ DECSTAT_invalidBitstreamAddress, 195 /* 0x80000006 */ DECSTAT_invalidVideoObjectLayerStartCode, 196 /* 0x80000007 */ DECSTAT_nullBitstreamAddress, 197 /* 0x80000008 */ DECSTAT_insufficientData, 198 /* 0x80000009 */ DECSTAT_unsupportedVOL_verid, 199 /* 0x8000000A */ DECSTAT_invalidAspectRatio, 200 /* 0x8000000B */ DECSTAT_invalidChromaFormat, 201 /* 0x8000000C */ DECSTAT_unsupportedVOLShape, 202 /* 0x8000000D */ DECSTAT_invalidVOPTimeIncrementResolution, 203 /* 0x8000000E */ DECSTAT_unsupportedFeatureInterlaced, 204 /* 0x8000000F */ DECSTAT_unsupportedFeatureOBMC, 205 /* 0x80000010 */ DECSTAT_unsupportedVideoDataPrecision, 206 /* 0x80000011 */ DECSTAT_unsupportedObjectType, 207 /* 0x80000012 */ DECSTAT_unsupportedFirstQuantMethod, 208 /* 0x80000013 */ DECSTAT_unsupportedFeatureScalability, 209 /* 0x80000014 */ DECSTAT_invalidCallingOrder, 210 /* 0x80000015 */ DECSTAT_invalidVideoObjectSC, 211 /* 0x80000016 */ DECSTAT_invalidVOPSC, 212 /* 0x80000017 */ DECSTAT_invalidQuant, 213 /* 0x80000018 */ DECSTAT_invalidFcode, 214 /* 0x80000019 */ DECSTAT_invalidMBnumInVPH, 215 /* 0x8000001A */ DECSTAT_endOfSequence, 216 /* 0x8000001B */ DECSTAT_invalidGOBnum, 217 /* 0x8000001C */ DECSTAT_corruptedHeader, 218 /* 0x8000001D */ DECSTAT_corruptedBitStream, 219 /* 0x8000001E */ DECSTAT_unsupportedFeatureBFrames, 220 /* 0x8000001F */ DECSTAT_unsupportedFeatureSprite, 221 /* 0x80000020 */ DECSTAT_duringInitialization, 222 /* 0x80000021 */ DECSTAT_initSuccess, 223 /* 0x80000022 */ DECSTAT_noError, 224 /* 0x80000023 */ DECSTAT_unsupportedFeatureQuarterPel, 225 /* 0x80000024 */ DECSTAT_exceededResolution 226 } DEC_STATUS; 227 228 typedef struct MP2VDEC_SNCreatePhArg 229 { 230 OMX_U16 unNumOfStreams; 231 OMX_U16 unInputStreamID; 232 OMX_U16 unInputBufferType; 233 OMX_U16 unInputNumBufsPerStream; 234 OMX_U16 unOutputStreamID; 235 OMX_U16 unOutputBufferType; 236 OMX_U16 unOutputNumBufsPerStream; 237 OMX_U16 unReserved; 238 239 OMX_U32 ulMaxWidth; 240 OMX_U32 ulMaxHeight; 241 OMX_U32 ulYUVFormat; 242 OMX_U32 ulMaxFrameRate; 243 OMX_U32 ulMaxBitRate; 244 OMX_U32 ulDataEndianness; 245 OMX_U32 ulProfile; 246 OMX_S32 lMaxLevel; 247 OMX_U32 ulProcessMode; 248 OMX_S32 lPreRollBufConfig; 249 OMX_U32 ulDisplayWidth; 250 OMX_U16 endArgs; 251 } MP2VDEC_SNCreatePhArg; 252 253 typedef struct 254 { 255 OMX_S32 lBuffCount; 256 257 } MP2VDEC_UALGInputParam; 258 259 typedef struct 260 { 261 OMX_U32 ulDisplayID; 262 OMX_U32 ulBytesConsumed; 263 OMX_S32 lErrorCode; 264 OMX_U32 ulDecodedFrameType; 265 OMX_U32 ulQP[(640 * 480) / 256]; 266 } MP2VDEC_UALGOutputParam; 267 268 typedef struct MP4VD_GPP_SN_Obj_CreatePhase { 269 OMX_U16 unNumOfStreams; 270 OMX_U16 unInputStreamID; 271 OMX_U16 unInputBufferType; 272 OMX_U16 unlInputNumBufsPerStream; 273 274 OMX_U16 unOutputStreamID; 275 OMX_U16 unOutputBufferType; 276 OMX_U16 unOutputNumBufsPerStream; 277 OMX_U16 unReserved; 278 279 OMX_U32 ulMaxWidth; 280 OMX_U32 ulMaxHeight; 281 OMX_U32 ulYUVFormat; 282 OMX_U32 ulMaxFrameRate; 283 OMX_U32 ulMaxBitRate; 284 OMX_U32 ulDataEndianness; 285 OMX_U32 ulProfile; 286 OMX_S32 ulMaxLevel; 287 OMX_U32 ulProcessMode; 288 OMX_S32 ulPreRollBufConfig; 289 OMX_U32 ulDisplayWidth; 290 OMX_U16 endArgs; 291 } MP4VD_GPP_SN_Obj_CreatePhase; 292 293 typedef struct 294 { 295 OMX_S32 nBuffCount; 296 OMX_U32 uRingIOBlocksize; 297 OMX_S32 nPerformMode; 298 } MP4VD_GPP_SN_UALGInputParams; 299 300 typedef struct 301 { 302 OMX_U32 ulDisplayID; 303 OMX_U32 uBytesConsumed; 304 OMX_S32 iErrorCode; 305 OMX_U32 ulDecodedFrameType; 306 OMX_U32 ulQP[(720 * 576) / 256]; 307 OMX_S32 lMbErrorBufFlag; 308 OMX_U8 usMbErrorBuf[(720 * 576) / 256]; 309 310 } MP4VD_GPP_SN_UALGOutputParams; 311 312 typedef struct H264VDEC_SNCreatePhArg { 313 OMX_U16 unNumOfStreams; 314 OMX_U16 unInputStreamID; 315 OMX_U16 unInputBufferType; 316 OMX_U16 unInputNumBufsPerStream; 317 318 OMX_U16 unOutputStreamID; 319 OMX_U16 unOutputBufferType; 320 OMX_U16 unOutputNumBufsPerStream; 321 OMX_U16 unReserved; 322 323 OMX_U32 ulMaxWidth; 324 OMX_U32 ulMaxHeight; 325 OMX_U32 ulYUVFormat; 326 OMX_U32 ulMaxFrameRate; 327 OMX_U32 ulMaxBitRate; 328 OMX_U32 ulDataEndianness; 329 OMX_U32 ulProfile; 330 OMX_S32 ulMaxLevel; 331 OMX_U32 ulProcessMode; 332 OMX_S32 lPreRollBufConfig; 333 OMX_U32 ulBitStreamFormat; 334 OMX_U32 ulDisplayWidth; 335 OMX_U16 endArgs; 336 } H264VDEC_SNCreatePhArg; 337 338 typedef struct { 339 OMX_S32 lBuffCount; 340 #if 1 341 OMX_U32 ulNumOfNALU; 342 OMX_U32 pNALUSizeArray[H264VDEC_SN_MAX_NALUNITS]; 343 /* OMX_U32 *pNALUSizeArray;*/ 344 #endif 345 } H264VDEC_UALGInputParam; 346 347 #define H264VDEC_SN_MAX_MB_NUMBER 1620 348 349 typedef struct { 350 OMX_U32 ulDisplayID; 351 OMX_U32 ulBytesConsumed; 352 OMX_S32 iErrorCode; 353 OMX_U32 ulDecodedFrameType; 354 #if 1 355 OMX_U32 ulNumOfNALUDecoded; 356 OMX_S32 lMBErrStatFlag; 357 OMX_U8 pMBErrStatOutBuf[H264VDEC_SN_MAX_MB_NUMBER]; 358 #endif 359 } H264VDEC_UALGOutputParam; 360 #ifdef VIDDEC_SPARK_CODE 361 typedef struct SPARKVD_GPP_SN_Obj_CreatePhase { 362 OMX_U16 unNumOfStreams; 363 OMX_U16 unInputStreamID; 364 OMX_U16 unInputBufferType; 365 OMX_U16 unlInputNumBufsPerStream; 366 367 OMX_U16 unOutputStreamID; 368 OMX_U16 unOutputBufferType; 369 OMX_U16 unOutputNumBufsPerStream; 370 371 OMX_U32 ulMaxWidth; 372 OMX_U32 ulMaxHeight; 373 OMX_U32 ulYUVFormat; 374 OMX_U32 ulMaxFrameRate; 375 OMX_U32 ulMaxBitRate; 376 OMX_U32 ulDataEndianness; 377 OMX_U32 ulProfile; 378 OMX_S32 ulMaxLevel; 379 OMX_U32 ulProcessMode; 380 OMX_S32 ulPreRollBufConfig; 381 OMX_U16 endArgs; 382 } SPARKVD_GPP_SN_Obj_CreatePhase; 383 384 typedef struct SPARKVD_GPP_SN_UALGInputParams 385 { 386 long int lBuffCount; 387 long int nIsSparkInput; 388 } SPARKVD_GPP_SN_UALGInputParams; 389 390 typedef struct SPARKVD_GPP_SN_UALGOutputParams 391 { 392 OMX_U32 ulDisplayID; 393 OMX_U32 uBytesConsumed; 394 OMX_S32 iErrorCode; 395 OMX_U32 ulDecodedFrameType; 396 OMX_U32 ulQP[(720 * 576) / 256]; 397 } SPARKVD_GPP_SN_UALGOutputParams; 398 #endif 399 400 typedef enum { 401 USN_DSPACK_STOP = 0x0200, 402 USN_DSPACK_PAUSE = 0x0300, 403 USN_DSPACK_ALGCTRL = 0x0400, 404 USN_DSPACK_STRMCTRL = 0x0500, 405 USN_DSPMSG_BUFF_FREE = 0x0600, 406 USN_DSPACK_SET_STRM_NODE = 0x0700, 407 USN_DSPACK_GET_NODE_PTR = 0x0800, 408 USN_DSPMSG_EVENT = 0x0E00 409 }USN_NodeToHostCmd; 410 411 typedef enum { 412 USN_ERR_NONE, 413 USN_ERR_WARNING, 414 USN_ERR_PROCESS, 415 USN_ERR_PAUSE, 416 USN_ERR_STOP, 417 USN_ERR_ALGCTRL, 418 USN_ERR_STRMCTRL, 419 USN_ERR_UNKNOWN_MSG 420 } USN_ErrTypes; 421 422 typedef enum { 423 IUALG_OK = 0x0000, 424 IUALG_WARN_CONCEALED = 0x0100, 425 IUALG_WARN_UNDERFLOW = 0x0200, 426 IUALG_WARN_OVERFLOW = 0x0300, 427 IUALG_WARN_ENDOFDATA = 0x0400, 428 IUALG_WARN_PLAYCOMPLETED = 0x0500, 429 IUALG_ERR_BAD_HANDLE = 0x0F00, 430 IUALG_ERR_DATA_CORRUPT = 0x0F01, 431 IUALG_ERR_NOT_SUPPORTED = 0x0F02, 432 IUALG_ERR_ARGUMENT = 0x0F03, 433 IUALG_ERR_NOT_READY = 0x0F04, 434 IUALG_ERR_GENERAL = 0x0FFF 435 }IUALG_Event; 436 437 typedef enum { 438 USN_STRMCMD_PLAY, 439 USN_STRMCMD_PAUSE, 440 USN_STRMCMD_STOP, 441 USN_STRMCMD_SETCODECPARAMS, 442 USN_STRMCMD_IDLE, 443 USN_STRMCMD_FLUSH 444 }USN_StrmCmd; 445 446 /* 447 * ======== VIDDEC_FrameType ======== 448 * XDM supported frame types for video 449 */ 450 typedef enum { 451 VIDDEC_I_FRAME =0, VIDDEC_P_FRAME, VIDDEC_B_FRAME, 452 VIDDEC_IDR_FRAME 453 } VIDDEC_FrameType; 454 455 #define OMX_VIDDEC_1_1 456 #ifdef OMX_VIDDEC_1_1 457 #define OMX_BUFFERFLAG_SYNCFRAME 0x00000020 458 #endif 459 #define VIDDEC_BUFFERFLAG_FRAMETYPE_MASK 0xF0000000 460 #define VIDDEC_BUFFERFLAG_FRAMETYPE_I_FRAME 0x10000000 461 #define VIDDEC_BUFFERFLAG_FRAMETYPE_P_FRAME 0x20000000 462 #define VIDDEC_BUFFERFLAG_FRAMETYPE_B_FRAME 0x40000000 463 #define VIDDEC_BUFFERFLAG_FRAMETYPE_IDR_FRAME 0x80000000 464 465 #define VIDDEC_BUFFERFLAG_EXTENDERROR_MASK 0x0FFFF000 466 #define VIDDEC_BUFFERFLAG_EXTENDERROR_DIRTY 0x000FF000 467 #define VIDDEC_BUFFERFLAG_EXTENDERROR_APPLIEDCONCEALMENT 0x00200000 468 #define VIDDEC_BUFFERFLAG_EXTENDERROR_INSUFFICIENTDATA 0x00400000 469 #define VIDDEC_BUFFERFLAG_EXTENDERROR_CORRUPTEDDATA 0x00800000 470 #define VIDDEC_BUFFERFLAG_EXTENDERROR_CORRUPTEDHEADER 0x01000000 471 #define VIDDEC_BUFFERFLAG_EXTENDERROR_UNSUPPORTEDINPUT 0x02000000 472 #define VIDDEC_BUFFERFLAG_EXTENDERROR_UNSUPPORTEDPARAM 0x04000000 473 #define VIDDEC_BUFFERFLAG_EXTENDERROR_FATALERROR 0x08000000 474 475 /* 476 * Extended error enumeration for XDM compliant encoders and decoders: 477 * 478 * Bit 16-32 : Reserved 479 * Bit XDM_FATALERROR: 1 => Fatal error (Stop decoding) 480 * 0 => Recoverable error 481 * Bit XDM_UNSUPPORTEDPARAM: 1 => Unsupported input parameter or configuration 482 * 0 => Ignore 483 * Bit XDM_UNSUPPORTEDINPUT: 1 => Unsupported feature/ parameter in input, 484 * 0 => Ignore 485 * Bit XDM_CORRUPTEDHEADER: 1 => Header problem/ corruption, 486 * 0 => Ignore 487 * Bit XDM_CORRUPTEDDATA: 1 => Data problem /corruption, 488 * 0 => Ignore 489 * Bit XDM_INSUFFICIENTDATA: 1 => Insufficient data, 490 * 0 => Ignore 491 * Bit XDM_APPLIEDCONCEALMENT: 1 => Applied concelement, 492 * 0=> Ignore 493 * Bit 8 : Reserved 494 * Bit 7-0 : Codec & Implementation specific 495 * 496 * Notes : 497 * ===== 498 * 1) Algorithm will set multiple bits to 1 based on conditions. 499 * e.g. it will set bits XDM_FATALERROR (fatal) and XDM_UNSUPPORTEDPARAM 500 * (unsupported params) in case of unsupported run time parameters 501 * 2) Some erors are applicable to decoders only. 502 */ 503 typedef enum { 504 VIDDEC_XDM_APPLIEDCONCEALMENT=9, VIDDEC_XDM_INSUFFICIENTDATA=10, VIDDEC_XDM_CORRUPTEDDATA=11, 505 VIDDEC_XDM_CORRUPTEDHEADER=12, VIDDEC_XDM_UNSUPPORTEDINPUT=13, VIDDEC_XDM_UNSUPPORTEDPARAM=14, 506 VIDDEC_XDM_FATALERROR=15 507 } VIDDEC_XDM_ErrorBit; 508 509 #define VIDDEC_ISFLAGSET(x,y) (((x)>>(y)) & 0x1) 510 /*#define VIDDEC_ISFLAGSET(x,y) ((((OMX_S32*)(x))>>((OMX_S32*)(y))) & 0x1) */ 511 512 /** @enum M4H3DEC_TI_ERROR */ 513 typedef enum { 514 /* 00 */ M4H3DEC_TI_ERROR_Success = 0, 515 /* 01 */ M4H3DEC_TI_ERROR_Failure , 516 /* 02 */ M4H3DEC_TI_ERROR_nonMpegStream, 517 /* 03 */ M4H3DEC_TI_ERROR_nonVideoMpegStream, 518 /* 04 */ M4H3DEC_TI_ERROR_unSupportedProfile, 519 /* 05 */ M4H3DEC_TI_ERROR_invalidBitstreamAddress, 520 /* 06 */ M4H3DEC_TI_ERROR_invalidVideoObjectLayerStartCode, 521 /* 07 */ M4H3DEC_TI_ERROR_nullBitstreamAddress, 522 /* 08 */ M4H3DEC_TI_ERROR_insufficientData, 523 /* 09 */ M4H3DEC_TI_ERROR_unsupportedVOL_verid, 524 /* 10 */ M4H3DEC_TI_ERROR_invalidAspectRatio, 525 /* 11 */ M4H3DEC_TI_ERROR_invalidChromaFormat, 526 /* 12 */ M4H3DEC_TI_ERROR_unsupportedVOLShape, 527 /* 13 */ M4H3DEC_TI_ERROR_invalidVOPTimeIncrementResolution, 528 /* 14 */ M4H3DEC_TI_ERROR_unsupportedFeatureInterlaced, 529 /* 15 */ M4H3DEC_TI_ERROR_unsupportedFeatureOBMC, 530 /* 16 */ M4H3DEC_TI_ERROR_unsupportedVideoDataPrecision, 531 /* 17 */ M4H3DEC_TI_ERROR_unsupportedObjectType, 532 /* 18 */ M4H3DEC_TI_ERROR_unsupportedFirstQuantMethod, 533 /* 19 */ M4H3DEC_TI_ERROR_unsupportedFeatureScalability, 534 /* 20 */ M4H3DEC_TI_ERROR_invalidCallingOrder, 535 /* 21 */ M4H3DEC_TI_ERROR_invalidVideoObjectSC, 536 /* 22 */ M4H3DEC_TI_ERROR_invalidVOPSC, 537 /* 23 */ M4H3DEC_TI_ERROR_invalidQuant, 538 /* 24 */ M4H3DEC_TI_ERROR_invalidFcode, 539 /* 25 */ M4H3DEC_TI_ERROR_invalidMBnumInVPH, 540 /* 26 */ M4H3DEC_TI_ERROR_endOfSequence, 541 /* 27 */ M4H3DEC_TI_ERROR_invalidGOBnum, 542 /* 28 */ M4H3DEC_TI_ERROR_corruptedHeader, 543 /* 29 */ M4H3DEC_TI_ERROR_corruptedBitStream, 544 /* 30 */ M4H3DEC_TI_ERROR_unsupportedFeatureBFrames, 545 /* 31 */ M4H3DEC_TI_ERROR_unsupportedFeatureSprite, 546 /* 32 */ M4H3DEC_TI_ERROR_unsupportedFeatureQuarterPel, 547 /* 33 */ M4H3DEC_TI_ERROR_exceededResolution, 548 /* 34 */ M4H3DEC_TI_ERROR_unsupportedFeatureIntraDcVlcThreshold, 549 /* 35 */ M4H3DEC_TI_ERROR_invalidValue, 550 /* 36 */ M4H3DEC_TI_ERROR_stuffingInMB, 551 /* 37 */ M4H3DEC_TI_ERROR_numMbRowsInVpExceeded, 552 /* 38 */ M4H3DEC_TI_ERROR_cannotdecodempeg4, 553 /* 39 */ M4H3DEC_TI_ERROR_incorrectWidthHeight, 554 /* 40 */ M4H3DEC_TI_ERROR_insufficientMemory, 555 } VIDDEC_M4H3DEC_TI_ERROR; 556 557 /* ======================================================================= */ 558 /* WMV9DEC_UALGDynamicParams - This structure defines the run-time algorithm 559 * specific and UALG parameters which can be configured. 560 * 561 * @param ulDecodeHeader :Parse header. 562 * 563 * @param ulDisplayWidth :Pitch value. Used as pitch only if this value 564 * is greater than Video width. 565 * 566 * @param ulFrameSkipMode :Frame skip mode. 567 * 568 * @param ulPPType :Post-processing type required. 569 * 570 */ 571 /* ==================================================================== */ 572 typedef struct WMV9DEC_UALGDynamicParams 573 { 574 #ifdef VIDDEC_SN_R8_14 575 OMX_S32 size; 576 #endif 577 OMX_U32 ulDecodeHeader; 578 OMX_U32 ulDisplayWidth; 579 OMX_U32 ulFrameSkipMode; 580 OMX_U32 ulPPType; 581 OMX_U16 usIsElementaryStream; 582 583 }WMV9DEC_UALGDynamicParams; 584 585 typedef struct H264_Iualg_Cmd_SetStatus 586 { 587 #ifdef VIDDEC_SN_R8_14 588 OMX_S32 size; 589 #endif 590 OMX_U32 ulDecodeHeader; 591 OMX_U32 ulDisplayWidth; 592 OMX_U32 ulFrameSkipMode; 593 OMX_U32 ulPPType; 594 595 /*#if defined(WMV9PGIN) */ 596 /* OMX_U16 usIsElementaryStream; */ 597 /*#endif */ 598 } H264_Iualg_Cmd_SetStatus; 599 600 typedef struct MP4VDEC_UALGDynamicParams 601 { 602 #ifdef VIDDEC_SN_R8_14 603 OMX_S32 size; 604 #endif 605 OMX_U32 ulDecodeHeader; 606 OMX_U32 ulDisplayWidth; 607 OMX_U32 ulFrameSkipMode; 608 OMX_U32 ulPPType; 609 OMX_BOOL useHighPrecIdctQp1; 610 }MP4VDEC_UALGDynamicParams; 611 612 #ifdef VIDDEC_SPARK_CODE 613 typedef struct SPARKVDEC_UALGDynamicParams 614 { 615 #ifdef VIDDEC_SN_R8_14 616 OMX_S32 size; 617 #endif 618 OMX_U32 ulDecodeHeader; 619 OMX_U32 ulDisplayWidth; 620 OMX_U32 ulFrameSkipMode; 621 OMX_U32 ulPPType; 622 }SPARKVDEC_UALGDynamicParams; 623 #endif 624 625 typedef struct MP2VDEC_UALGDynamicParams 626 { 627 #ifdef VIDDEC_SN_R8_14 628 OMX_S32 size; 629 #endif 630 OMX_U32 ulDecodeHeader; 631 OMX_U32 ulDisplayWidth; 632 OMX_U32 ulFrameSkipMode; 633 OMX_U32 ulPPType; 634 OMX_U32 ulPpNone; /* This will generate 4:2:0 planar output */ 635 OMX_U32 ulDyna_chroma_format; /* If ON, chroma format can be modified at the format level */ 636 637 } MP2VDEC_UALGDynamicParams; 638 639 #endif 640 641