pObj->algHndl = DSKT2_createAlg((Int)scratchId,
(IALG_Fxns *)algFxns, NULL,(IALG_Params *)&prm);
Vps_rprintf(" IVD_open pObj->algHndl %x !!!\n",pObj->algHndl);
。。。。。。。。。
#define IALGFXNS \
&IVD_TI_IALG, /* module ID */ \
NULL, /* activate */ \
IVD_TI_alloc, /* alloc */ \
NULL, /* control (NULL => no control ops) */ \
NULL, /* deactivate */ \
IVD_TI_free, /* free */ \
IVD_TI_initObj,/* init */ \
NULL, /* moved */ \
IVD_TI_numAlloc /* numAlloc (NULL => IALG_MAXMEMRECS) */
IVD_TI_numAlloc ()运行通过,IVD_TI_alloc()运行时不通过,IVD_TI_initObj没有运行
Int IVD_TI_alloc(const IALG_Params *algParams, IALG_Fxns **pf, IALG_MemRec memTab[])
{
XDAS_Int32 uRegin_width;
XDAS_Int32 uRegin_height;
// XDAS_Int32 i;
XDAS_Int32 size;
const IVD_Params *params = (IVD_Params *)algParams;
Vps_rprintf("IVD_TI_alloc maxWidth %d, maxHeight %d ,size %d!!!\n",params->maxWidth,params->maxHeight,params->size);
/* Request memory for my object */
memTab[0].size = sizeof(IVD_TI_Obj);
memTab[0].alignment = 0;
memTab[0].space = IALG_DARAM0;
// memTab[0].space = IALG_EXTERNAL;
memTab[0].attrs = IALG_PERSIST;
Vps_rprintf("IVD_TI_alloc memTab[0] size %d base:0x%x!!!\n",memTab[0].size,memTab[0].base);
/* Request memory */
memTab[1].size = sizeof(ALGCFGS);
memTab[1].alignment = 0;
memTab[1].space = IALG_DARAM0; //mod by david 20130513
// memTab[1].space = IALG_EXTERNAL;
memTab[1].attrs = IALG_PERSIST;
Vps_rprintf("IVD_TI_alloc memTab[1] size %d base:0x%x!!!\n",memTab[1].size,memTab[1].base);
/* Request memory*/
memTab[2].size = sizeof(ALGPARAMS);
memTab[2].alignment = 0;
//memTab[2].space = IALG_DARAM0; //mod by david 20130513
memTab[2].space = IALG_EXTERNAL;
memTab[2].attrs = IALG_SCRATCH; //
Vps_rprintf("IVD_TI_alloc memTab[2] size %d base:0x%x!!!\n",memTab[2].size,memTab[2].base);
/* Request memory*/
size = 0;
uRegin_width = DETECTRECT_WIDTH_MAX1;
uRegin_height = DETECTRECT_HEIGHT_MAX;
//size = uRegin_width*uRegin_height*5; //每个speed检测器有五个大小相同的buf
// size = uRegin_width*uRegin_height*7; //每个speed检测器有6个大小相同的buf, mod by david 20130826 for ivd2.0
size = uRegin_width*uRegin_height*10; //20140706 增加4个 queue
memTab[3].size = size; //可变大小,由下载配置项决定
memTab[3].alignment = 0;
//memTab[3].space = IALG_DARAM0; //暂时使用外存
memTab[3].space = IALG_EXTERNAL; //暂时使用外存
memTab[3].attrs = IALG_SCRATCH;
/* Request memory */
size = DETECTRECT_WIDTH_MAX1 * DETECTRECT_HEIGHT_MAX * sizeof(Uint32); //按最大区域设置
///全部default为最大
// size = sizeof(CAMERA_STRUCT) + \
// sizeof(LANE_STRUCT_DEF)*MAX_LANE + \
// uLaneAmount * sizeof(SPEED_DETECT_STRUCT) + \
// size;
size = sizeof(CAMERA_STRUCT) + \
sizeof(LANE_STRUCT_DEF)*MAX_LANE + \
MAX_LANE * sizeof(SPEED_DETECT_STRUCT) + \
size;
memTab[4].size = size;
memTab[4].alignment = 0;
memTab[4].space = IALG_EXTERNAL;
memTab[4].attrs = IALG_PERSIST;
/* Request memory */
size = 0;
uRegin_width = DETECTRECT_WIDTH_MAX1;////768
uRegin_height = DETECTRECT_HEIGHT_MAX;
//size = uRegin_width*uRegin_height*5;
// size = uRegin_width*uRegin_height*6;
size = uRegin_width*uRegin_height*10; ////20140706 add 4 memory quene 按照最大的768×576 分配
memTab[5].size = size;
memTab[5].alignment = 0;
memTab[5].space = IALG_EXTERNAL;
memTab[5].attrs = IALG_PERSIST;
/* Request memory */ //added by david 20130903 for ivd2.0
size = 0;
size = 200*300* sizeof(CPoint); ////20140706
memTab[6].size = size;
memTab[6].alignment = 0;
memTab[6].space = IALG_EXTERNAL;
memTab[6].attrs = IALG_PERSIST;
/* Request memory */ //2014
size = 0;
size = 1 * sizeof(CForeground_Array);
memTab[7].size = size;
memTab[7].alignment = 0;
memTab[7].space = IALG_EXTERNAL;
memTab[7].attrs = IALG_PERSIST;
////20140708
size = 0;
size = uRegin_width *uRegin_height* sizeof(unsigned char); ////20140706
memTab[8].size = size;
memTab[8].alignment = 0;
memTab[8].space = IALG_EXTERNAL;
memTab[8].attrs = IALG_PERSIST;
Vps_rprintf("IVD_TI_alloc memTab[8] size %d base:0x%x!!!\n",memTab[8].size,memTab[8].base);
return (MTAB_NRECS);
}
打印信息:
[c6xdsp ] IVD_open maxWidth 320, maxHeight 192 !!!
[c6xdsp ] IVD_TI_numAlloc MTAB_NRECS:9 !!!
[c6xdsp ] IVD_TI_alloc maxWidth 320, maxHeight 192 ,size 12!!!
[c6xdsp ] IVD_TI_alloc memTab[0] size 312 base:0x0!!!
[c6xdsp ] IVD_TI_alloc memTab[1] size 7056 base:0x0!!!
[c6xdsp ] IVD_TI_alloc memTab[2] size 1872 base:0x0!!!
[c6xdsp ] IVD_TI_alloc memTab[8] size 442368 base:0x0!!!
[host] FUN: [MultiCh_createTriStreamFullFtr] LINE: 1127
[c6xdsp ] IVD_open pObj->algHndl 0 !!!
[m3vpss ] FUN: System_linkGetInfo LINE: 86
[m3vpss ] FUN: System_linkGetInfo LINE: 97
[m3vpss ] 13141: FD : Alg Create Done !!!
[c6xdsp ] Creat DSKT2_createAlg failed !!!为什么分配不成功?需要配置什么文件吗
oo0oo:
是不是需要
把FC_RMAN_IRES_c6xdsp.cfg这个文件里面
添加var DSKT2 = xdc.useModule('ti.sdo.fc.dskt2.DSKT2');DSKT2.ALLOW_EXTERNAL_SCRATCH = false;改成true ???