ires_vicp2.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  */
00048 #ifndef ti_sdo_fc_ires_vicp2_IRES_VICP2_
00049 #define ti_sdo_fc_ires_vicp2_IRES_VICP2_
00050 
00053 
00054 
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif
00058 
00059 #include <ti/xdais/ires.h>
00060 
00064 #define IRES_VICP2_MAXRESOURCES  1
00065 
00066 
00070 #define IRES_VICP2_PROTOCOLNAME     "ti.sdo.fc.ires.vicp2"
00071 
00075 #define IRES_VICP2_NUMBUFFERS      16 
00076 
00080 #define IRES_VICP2_BADRESOURCE     0xFFFFFFFF  
00081 
00086 #define IMCOP_BUFFER_IMGBUF_A           0x0 
00087 #define IMCOP_BUFFER_IMGBUF_B           0x1 
00088 #define IMCOP_BUFFER_IMGBUF_C           0x2 
00089 #define IMCOP_BUFFER_IMGBUF_D           0x3     
00090 #define IMCOP_BUFFER_IMGBUF_E           0x4     
00091 #define IMCOP_BUFFER_IMX0COEFFBUF       0x5    
00092 #define IMCOP_BUFFER_IMX0CMDBUF         0x6 
00093 #define IMCOP_BUFFER_IMX1COEFFBUF       0x7     
00094 #define IMCOP_BUFFER_IMX1CMDBUF         0x8     
00096 #define IMCOP_BUFFER_BABYIMXCMDBUFFER   0x9     
00097 #define IMCOP_BUFFER_BABYIMXORIGBUFFER  0xA     
00098 
00099 #define IMCOP_BUFFER_BABYIMXREFBUFFER   0xB     
00100 #define IMCOP_BUFFER_SEQUENCERPMEM      0xC     
00102 #define IMCOP_BUFFER_QIQMEM             0xD     
00103 #define IMCOP_BUFFER_HUFFMEM            0xE     
00104 #define IMCOP_BUFFER_SEQBUF4            0xF     
00105 
00106 /*
00107  * Note, we wrap the PROTOCOLVERSION in an ifdef so the
00108  * resource managers and algs get this version data placed in their object
00109  * files.  Apps, which include rman.h, will have this 'NOPROTOCOLREV' defined.
00110  */
00111 #ifndef ti_sdo_fc_ires_NOPROTOCOLREV
00112 
00116 static IRES_ProtocolRevision IRES_VICP2_PROTOCOLREVISION = {1, 0, 0}; 
00117 
00118 #endif
00119 
00123 typedef struct IRES_VICP2_Obj *IRES_VICP2_Handle;
00124 
00128 typedef struct IRES_VICP2_ProtocolArgs {
00129 
00130     int                 size;           
00131     IRES_RequestMode    mode;           
00135     short               requestIMX0;     
00136     short               requestIMX1;    
00138     short               requestMJCP;    
00139     short               requestNSF;     
00141     unsigned int        requestIMCOPBuffers;
00148     unsigned int        numMemoryRequests;       
00151     unsigned int        memRequestSizes[IRES_VICP2_NUMBUFFERS];
00154 } IRES_VICP2_ProtocolArgs;
00155 
00161 typedef struct  IRES_VICP2_Obj {
00162 
00163     IRES_Obj            ires;
00164     short               assignedIMX0;    
00165     short               assignedIMX1;     
00167     short               assignedMJCP;
00168     short               assignedNSF;
00169 
00170     unsigned int        assignedIMCOPBuffers[IRES_VICP2_NUMBUFFERS];
00174     short               numMemBufs;       
00176     unsigned int        assignedMemAddrs[IRES_VICP2_NUMBUFFERS];
00180     unsigned int        assignedMemSizes[IRES_VICP2_NUMBUFFERS]; 
00181 
00182     unsigned int        configBaseAddress;
00184     unsigned int        dmaViewConfigBaseAddr;  
00188     unsigned  int           pscRegisterSpace; 
00191 } IRES_VICP2_Obj;
00192 
00193 /*
00194  * @brief           VICP Buffer Layout 
00195  */
00196 typedef struct IRES_VICP2_Buffers {
00197 
00198     int size;   
00200     unsigned char *vicp_cfg_base;
00201  
00202     unsigned char *imgBufA_base;
00203     unsigned char *imgBufB_base;
00204     unsigned char *imgBufC_base;
00205     unsigned char *imgBufD_base;
00206     unsigned char *imgBufE_base;
00207     unsigned char *imx0CoeffBuff_base;
00208     unsigned char *imx0CmdBuf_base;
00209     unsigned char *imx1CoeffBuff_base;
00210     unsigned char *imx1CmdBuf_base;
00211 
00212     
00213     unsigned char *babyImxCmdBuf_base;  
00214     unsigned char *babyImxOrigBuf_base; 
00215     unsigned char *babyImxRefBuf_base;  
00216     unsigned char *sequencerPmem_base;  
00217     unsigned int  *qiqmem_base;         
00218     unsigned int  *predmem_base;        
00219     unsigned int  *mvmem;               
00220     unsigned int  *huffmem;             
00221     unsigned int  *seqBuf1;             
00222     unsigned int  *seqBuf2;             
00223     unsigned int  *seqBuf3;             
00224     unsigned int  *seqBuf4;             
00225     unsigned int  *sequencerDmem;       
00226     /* . . . */
00227 
00228 } IRES_VICP2_Buffers;
00229 
00230 
00231 /*
00232  * @brief       Static Resource Properties 
00233  */
00234 typedef struct IRES_VICP2_Properties {
00235     
00236     int size;
00237 
00238     IRES_VICP2_Buffers buffers;
00239 
00240 } IRES_VICP2_Properties;
00241 
00242 
00243 #ifdef __cplusplus
00244 }
00245 #endif /* extern "C" */
00246 
00247 
00250 #endif
00251 /*
00252  *  @(#) ti.sdo.fc.ires.vicp; 1, 0, 1,155; 11-8-2009 20:58:17; /db/atree/library/trees/fc/fc-l04x/src/
00253  */
00254 

Copyright 2009, Texas Instruments Incorporated