![]() |
![]() |
00001 /* 00002 * Copyright (c) 2012, Texas Instruments Incorporated 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 00009 * * Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * 00012 * * Redistributions in binary form must reproduce the above copyright 00013 * notice, this list of conditions and the following disclaimer in the 00014 * documentation and/or other materials provided with the distribution. 00015 * 00016 * * Neither the name of Texas Instruments Incorporated nor the names of 00017 * its contributors may be used to endorse or promote products derived 00018 * from this software without specific prior written permission. 00019 * 00020 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00021 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00022 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00023 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00024 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00025 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00026 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 00027 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 00028 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 00029 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00030 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 * 00032 */ 00033 00050 #ifndef ti_xdais_dm_IVIDDEC1_ 00051 #define ti_xdais_dm_IVIDDEC1_ 00052 00053 #include <ti/xdais/ialg.h> 00054 #include <ti/xdais/xdas.h> 00055 #include "xdm.h" 00056 #include "ivideo.h" 00057 00058 #ifdef __cplusplus 00059 extern "C" { 00060 #endif 00061 00064 00065 #define IVIDDEC1_EOK XDM_EOK 00066 #define IVIDDEC1_EFAIL XDM_EFAIL 00067 #define IVIDDEC1_EUNSUPPORTED XDM_EUNSUPPORTED 00073 typedef struct IVIDDEC1_Obj { 00074 struct IVIDDEC1_Fxns *fxns; 00075 } IVIDDEC1_Obj; 00076 00077 00081 typedef struct IVIDDEC1_Obj *IVIDDEC1_Handle; 00082 00083 00091 typedef enum { 00092 IVIDDEC_DISPLAY_ORDER = 0, 00108 IVIDDEC_DECODE_ORDER = 1, 00123 IVIDDEC_FRAMEORDER_DEFAULT = IVIDDEC_DISPLAY_ORDER 00124 } IVIDDEC1_FrameOrder; 00125 00126 00133 typedef struct IVIDDEC1_Params { 00134 XDAS_Int32 size; 00135 XDAS_Int32 maxHeight; 00136 XDAS_Int32 maxWidth; 00137 XDAS_Int32 maxFrameRate; 00142 XDAS_Int32 maxBitRate; 00146 XDAS_Int32 dataEndianness; 00150 XDAS_Int32 forceChromaFormat; 00154 } IVIDDEC1_Params; 00155 00156 00171 typedef struct IVIDDEC1_DynamicParams { 00172 XDAS_Int32 size; 00173 XDAS_Int32 decodeHeader; 00177 XDAS_Int32 displayWidth; 00181 XDAS_Int32 frameSkipMode; 00185 XDAS_Int32 frameOrder; 00189 XDAS_Int32 newFrameFlag; 00201 XDAS_Int32 mbDataFlag; 00210 } IVIDDEC1_DynamicParams; 00211 00212 00221 typedef struct IVIDDEC1_InArgs { 00222 XDAS_Int32 size; 00223 XDAS_Int32 numBytes; 00226 XDAS_Int32 inputID; 00245 } IVIDDEC1_InArgs; 00246 00247 00258 typedef struct IVIDDEC1_Status { 00259 XDAS_Int32 size; 00260 XDAS_Int32 extendedError; 00261 XDM1_SingleBufDesc data; 00282 XDAS_Int32 outputHeight; 00283 XDAS_Int32 outputWidth; 00284 XDAS_Int32 frameRate; 00289 XDAS_Int32 bitRate; 00290 XDAS_Int32 contentType; 00294 XDAS_Int32 outputChromaFormat; 00298 XDM_AlgBufInfo bufInfo; 00302 } IVIDDEC1_Status; 00303 00304 00305 #define IVIDDEC1_FREE_BUFF_SIZE 16 00318 typedef struct IVIDDEC1_OutArgs { 00319 XDAS_Int32 size; 00320 XDAS_Int32 bytesConsumed; 00323 XDAS_Int32 outputID[XDM_MAX_IO_BUFFERS]; 00338 IVIDEO1_BufDesc decodedBufs; 00353 IVIDEO1_BufDesc displayBufs[XDM_MAX_IO_BUFFERS]; 00376 XDAS_Int32 outputMbDataID; 00381 XDM1_SingleBufDesc mbDataBuf; 00388 XDAS_Int32 freeBufID[IVIDDEC1_FREE_BUFF_SIZE]; 00425 XDAS_Int32 outBufsInUseFlag; 00434 } IVIDDEC1_OutArgs; 00435 00436 00447 typedef IALG_Cmd IVIDDEC1_Cmd; 00448 00449 00453 typedef struct IVIDDEC1_Fxns { 00454 IALG_Fxns ialg; 00541 XDAS_Int32 (*process)(IVIDDEC1_Handle handle, XDM1_BufDesc *inBufs, 00542 XDM_BufDesc *outBufs, IVIDDEC1_InArgs *inArgs, 00543 IVIDDEC1_OutArgs *outArgs); 00544 00545 00581 XDAS_Int32 (*control)(IVIDDEC1_Handle handle, IVIDDEC1_Cmd id, 00582 IVIDDEC1_DynamicParams *params, IVIDDEC1_Status *status); 00583 00584 } IVIDDEC1_Fxns; 00585 00586 00589 #ifdef __cplusplus 00590 } 00591 #endif 00592 00593 #endif 00594 /* 00595 * @(#) ti.xdais.dm; 1, 0, 7,1; 6-19-2012 17:57:46; /db/wtree/library/trees/dais/dais-w06/src/ xlibrary 00596 00597 */ 00598