ividdec1.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2009, 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_IVIDDEC1_
00048 #define ti_xdais_dm_IVIDDEC1_
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 
00063 #define IVIDDEC1_EOK       XDM_EOK             
00064 #define IVIDDEC1_EFAIL     XDM_EFAIL           
00065 #define IVIDDEC1_EUNSUPPORTED XDM_EUNSUPPORTED 
00071 typedef struct IVIDDEC1_Obj {
00072     struct IVIDDEC1_Fxns *fxns;
00073 } IVIDDEC1_Obj;
00074 
00075 
00079 typedef struct IVIDDEC1_Obj  *IVIDDEC1_Handle;
00080 
00081 
00089 typedef enum {
00090     IVIDDEC_DISPLAY_ORDER = 0,  
00106     IVIDDEC_DECODE_ORDER = 1,   
00121     IVIDDEC_FRAMEORDER_DEFAULT = IVIDDEC_DISPLAY_ORDER
00122 } IVIDDEC1_FrameOrder;
00123 
00124 
00131 typedef struct IVIDDEC1_Params {
00132     XDAS_Int32 size;            
00133     XDAS_Int32 maxHeight;       
00134     XDAS_Int32 maxWidth;        
00135     XDAS_Int32 maxFrameRate;    
00140     XDAS_Int32 maxBitRate;      
00144     XDAS_Int32 dataEndianness;  
00148     XDAS_Int32 forceChromaFormat;
00152 } IVIDDEC1_Params;
00153 
00154 
00169 typedef struct IVIDDEC1_DynamicParams {
00170     XDAS_Int32 size;            
00171     XDAS_Int32 decodeHeader;    
00175     XDAS_Int32 displayWidth;    
00179     XDAS_Int32 frameSkipMode;   
00183     XDAS_Int32 frameOrder;      
00187     XDAS_Int32 newFrameFlag;    
00199     XDAS_Int32 mbDataFlag;      
00208 } IVIDDEC1_DynamicParams;
00209 
00210 
00219 typedef struct IVIDDEC1_InArgs {
00220     XDAS_Int32 size;            
00221     XDAS_Int32 numBytes;        
00224     XDAS_Int32 inputID;         
00243 } IVIDDEC1_InArgs;
00244 
00245 
00256 typedef struct IVIDDEC1_Status {
00257     XDAS_Int32 size;            
00258     XDAS_Int32 extendedError;   
00259     XDM1_SingleBufDesc data;    
00280     XDAS_Int32 outputHeight;    
00281     XDAS_Int32 outputWidth;     
00282     XDAS_Int32 frameRate;       
00287     XDAS_Int32 bitRate;         
00288     XDAS_Int32 contentType;     
00292     XDAS_Int32 outputChromaFormat; 
00296     XDM_AlgBufInfo bufInfo;     
00300 } IVIDDEC1_Status;
00301 
00302 
00303 #define IVIDDEC1_FREE_BUFF_SIZE 16 
00316 typedef struct IVIDDEC1_OutArgs {
00317     XDAS_Int32 size;            
00318     XDAS_Int32 bytesConsumed;   
00321     XDAS_Int32 outputID[XDM_MAX_IO_BUFFERS]; 
00336     IVIDEO1_BufDesc decodedBufs; 
00351     IVIDEO1_BufDesc displayBufs[XDM_MAX_IO_BUFFERS]; 
00374     XDAS_Int32 outputMbDataID;  
00379     XDM1_SingleBufDesc mbDataBuf; 
00386     XDAS_Int32 freeBufID[IVIDDEC1_FREE_BUFF_SIZE]; 
00423     XDAS_Int32 outBufsInUseFlag; 
00432 } IVIDDEC1_OutArgs;
00433 
00434 
00445 typedef  IALG_Cmd IVIDDEC1_Cmd;
00446 
00447 
00451 typedef struct IVIDDEC1_Fxns {
00452     IALG_Fxns   ialg;             
00539     XDAS_Int32 (*process)(IVIDDEC1_Handle handle, XDM1_BufDesc *inBufs,
00540         XDM_BufDesc *outBufs, IVIDDEC1_InArgs *inArgs,
00541         IVIDDEC1_OutArgs *outArgs);
00542 
00543 
00579     XDAS_Int32 (*control)(IVIDDEC1_Handle handle, IVIDDEC1_Cmd id,
00580         IVIDDEC1_DynamicParams *params, IVIDDEC1_Status *status);
00581 
00582 } IVIDDEC1_Fxns;
00583 
00584 
00587 #ifdef __cplusplus
00588 }
00589 #endif
00590 
00591 #endif
00592 /*
00593  *  @(#) ti.xdais.dm; 1, 0, 5,194; 3-13-2009 12:27:49; /db/wtree/library/trees/dais/dais-o05x/src/
00594  */
00595 

Copyright 2009, Texas Instruments Incorporated