00001 /* 00002 * Copyright (c) 2010, 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 00047 #ifndef ti_xdais_dm_IVIDDEC2_ 00048 #define ti_xdais_dm_IVIDDEC2_ 00049 00050 #include <ti/xdais/ialg.h> 00051 #include <ti/xdais/xdas.h> 00052 #include "xdm.h" 00053 #include "ivideo.h" 00054 00055 #ifdef __cplusplus 00056 extern "C" { 00057 #endif 00058 00059 00062 00068 #define IVIDDEC2_MAX_IO_BUFFERS 20 00069 00070 #define IVIDDEC2_EOK XDM_EOK 00071 #define IVIDDEC2_EFAIL XDM_EFAIL 00072 #define IVIDDEC2_EUNSUPPORTED XDM_EUNSUPPORTED 00078 typedef struct IVIDDEC2_Obj { 00079 struct IVIDDEC2_Fxns *fxns; 00080 } IVIDDEC2_Obj; 00081 00082 00086 typedef struct IVIDDEC2_Obj *IVIDDEC2_Handle; 00087 00088 00096 typedef enum { 00097 IVIDDEC2_DISPLAY_ORDER = 0, 00113 IVIDDEC2_DECODE_ORDER = 1, 00128 IVIDDEC2_FRAMEORDER_DEFAULT = IVIDDEC2_DISPLAY_ORDER 00129 } IVIDDEC2_FrameOrder; 00130 00131 00138 typedef struct IVIDDEC2_Params { 00139 XDAS_Int32 size; 00140 XDAS_Int32 maxHeight; 00141 XDAS_Int32 maxWidth; 00142 XDAS_Int32 maxFrameRate; 00147 XDAS_Int32 maxBitRate; 00151 XDAS_Int32 dataEndianness; 00155 XDAS_Int32 forceChromaFormat; 00159 } IVIDDEC2_Params; 00160 00161 00176 typedef struct IVIDDEC2_DynamicParams { 00177 XDAS_Int32 size; 00178 XDAS_Int32 decodeHeader; 00182 XDAS_Int32 displayWidth; 00186 XDAS_Int32 frameSkipMode; 00190 XDAS_Int32 frameOrder; 00194 XDAS_Int32 newFrameFlag; 00206 XDAS_Int32 mbDataFlag; 00215 } IVIDDEC2_DynamicParams; 00216 00217 00226 typedef struct IVIDDEC2_InArgs { 00227 XDAS_Int32 size; 00228 XDAS_Int32 numBytes; 00231 XDAS_Int32 inputID; 00250 } IVIDDEC2_InArgs; 00251 00252 00263 typedef struct IVIDDEC2_Status { 00264 XDAS_Int32 size; 00265 XDAS_Int32 extendedError; 00266 XDM1_SingleBufDesc data; 00287 XDAS_Int32 maxNumDisplayBufs; 00293 XDAS_Int32 outputHeight; 00294 XDAS_Int32 outputWidth; 00295 XDAS_Int32 frameRate; 00300 XDAS_Int32 bitRate; 00301 XDAS_Int32 contentType; 00305 XDAS_Int32 outputChromaFormat; 00309 XDM_AlgBufInfo bufInfo; 00313 } IVIDDEC2_Status; 00314 00315 00324 typedef struct IVIDDEC2_OutArgs { 00325 XDAS_Int32 size; 00326 XDAS_Int32 bytesConsumed; 00330 XDAS_Int32 outputID[IVIDDEC2_MAX_IO_BUFFERS]; 00345 IVIDEO1_BufDesc decodedBufs; 00360 IVIDEO1_BufDesc displayBufs[IVIDDEC2_MAX_IO_BUFFERS]; 00383 XDAS_Int32 outputMbDataID; 00388 XDM1_SingleBufDesc mbDataBuf; 00395 XDAS_Int32 freeBufID[IVIDDEC2_MAX_IO_BUFFERS]; 00432 XDAS_Int32 outBufsInUseFlag; 00441 } IVIDDEC2_OutArgs; 00442 00443 00454 typedef IALG_Cmd IVIDDEC2_Cmd; 00455 00456 00460 typedef struct IVIDDEC2_Fxns { 00461 IALG_Fxns ialg; 00567 XDAS_Int32 (*process)(IVIDDEC2_Handle handle, XDM1_BufDesc *inBufs, 00568 XDM_BufDesc *outBufs, IVIDDEC2_InArgs *inArgs, 00569 IVIDDEC2_OutArgs *outArgs); 00570 00571 00607 XDAS_Int32 (*control)(IVIDDEC2_Handle handle, IVIDDEC2_Cmd id, 00608 IVIDDEC2_DynamicParams *params, IVIDDEC2_Status *status); 00609 00610 } IVIDDEC2_Fxns; 00611 00612 00615 #ifdef __cplusplus 00616 } 00617 #endif 00618 00619 #endif /* ti_xdais_dm_IVIDDEC2_ */ 00620 /* 00621 * @(#) ti.xdais.dm; 1, 0, 5,245; 5-4-2010 08:44:03; /db/wtree/library/trees/dais/dais-q11x/src/ 00622 */ 00623