This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Intelligent Motion Detect does not in DM8168 [DVRRDK04.00.00.03]

Hi,

I have debug my case for two month.But I do not solve the probelm.

I make the chain and run. I have try many times with different configure of AlgLink. The result is bad.

Why my case can not get the result?

Does the DM8168 SoC have some limits?

If I lack some operations?

Please help me! Thanks!

Below is a part of my code and print.

 

//alg *******************************************************************************************
algPrm.enableOSDAlg = FALSE;
algPrm.enableSCDAlg = TRUE;
algPrm.inQueParams.prevLinkId = ipcFrameInDspId;
algPrm.inQueParams.prevLinkQueId = 0;
algPrm.outQueParams[0].nextLink = ipcBitsOutDspId;
///////////////////
AlgLink_ScdCreateParams * pScdCreateParams = &algPrm.scdCreateParams;
pScdCreateParams->enableMotionNotify = FALSE;
pScdCreateParams->enableTamperNotify = FALSE;
pScdCreateParams->enableVaEvntNotify = FALSE;
pScdCreateParams->inputFrameRate = 30;
pScdCreateParams->maxHeight = 288;
pScdCreateParams->maxNumVaChan = 1;
pScdCreateParams->maxStride = 352;
pScdCreateParams->maxWidth = 352;
pScdCreateParams->numBufPerCh = 3;
pScdCreateParams->numSecs2WaitAfterFrmAlert = 1;
pScdCreateParams->numSecs2WaitB4FrmAlert = 1;
pScdCreateParams->numSecs2WaitB4Init = 3;
pScdCreateParams->numValidChForSCD = 1;
pScdCreateParams->outputFrameRate = 5;
pScdCreateParams->thresold2WaitAfterFrmAlert = 0;
pScdCreateParams->thresold2WaitB4FrmAlert = 0;

AlgLink_ScdChParams * pChDefaultParams = &(pScdCreateParams->chDefaultParams[0]);

pChDefaultParams->blkNumBlksInFrame = 264;
pChDefaultParams->frmIgnoreLightsOFF = FALSE;
pChDefaultParams->frmIgnoreLightsON = FALSE;
pChDefaultParams->frmEdgeThreshold = 100;
pChDefaultParams->frmSensitivity = ALG_LINK_SCD_SENSITIVITY_HIGH;
pChDefaultParams->chId = 3;
pChDefaultParams->mode = ALG_LINK_SCD_DETECTMODE_IMD;
// pChDefaultParams->inputFrameRate = 30;
// pChDefaultParams->outputFrameRate = 5;
// pChDefaultParams->useDefaultVaAlgCfg = TRUE;
for(i=0; i<264; i++)
{
pChDefaultParams->blkConfig[i].monitored = 0;
pChDefaultParams->blkConfig[i].sensitivity = ALG_LINK_SCD_SENSITIVITY_LOW;
}
///////////////////
AlgLink_ScdChVaParams * pScdVaAlgCfg = &(pChDefaultParams->scdVaAlgCfg);
pScdVaAlgCfg->chId = 0;
//pScdVaAlgCfg->detectionRate unvalid in IMD
//pScdVaAlgCfg->direction unvalid in IMD
pScdVaAlgCfg->mode = ALG_LINK_SCD_DETECTMODE_IMD;
pScdVaAlgCfg->numZone = 1;
pScdVaAlgCfg->objectInView = 3;
//pScdVaAlgCfg->orientation unvalid in IMD
pScdVaAlgCfg->sensitiveness = ALG_LINK_SCD_SENSITIVITY_HIGH;
//pScdVaAlgCfg->tamperBGRefreshInterval
//pScdVaAlgCfg->tamperResetCnt
pScdVaAlgCfg->verboseLevel = TRUE;
pScdVaAlgCfg->zoneCfg[0].activeZone = TRUE;
pScdVaAlgCfg->zoneCfg[0].noOfPoints = 5;
pScdVaAlgCfg->zoneCfg[0].zoneDirection = ALG_LINK_SCD_VA_DIRECTION_UNSPECIFIED;
pScdVaAlgCfg->zoneCfg[0].zoneId = 1;
pScdVaAlgCfg->zoneCfg[0].zoneType = ALG_LINK_SCD_VA_IMD;
pScdVaAlgCfg->zoneCfg[0].pixLocation[0].x = 0;
pScdVaAlgCfg->zoneCfg[0].pixLocation[0].y = 0;
pScdVaAlgCfg->zoneCfg[0].pixLocation[1].x = 352;
pScdVaAlgCfg->zoneCfg[0].pixLocation[1].y = 0;
pScdVaAlgCfg->zoneCfg[0].pixLocation[2].x = 352;
pScdVaAlgCfg->zoneCfg[0].pixLocation[2].y = 288;
pScdVaAlgCfg->zoneCfg[0].pixLocation[3].x = 0;
pScdVaAlgCfg->zoneCfg[0].pixLocation[3].y = 288;
pScdVaAlgCfg->zoneCfg[0].pixLocation[4].x = 0;
pScdVaAlgCfg->zoneCfg[0].pixLocation[4].y = 0;
// *******************************************************************************************

IpcBitsInLink_getFullVideoBitStreamBufs(ipcBitsInA8Id, &bufList);
if(bufList.numBufs!=0)
{
printf("bufList.numBufs = %d\n", bufList.numBufs);
printf("bufList.bufs[0]->bufSize=%d\n", bufList.bufs[0]->bufSize);
printf("bufList.bufs[0]->channelNum=%d\n", bufList.bufs[0]->channelNum);

pImdResult = (AlgLink_ScdResult *)bufList.bufs[0]->addr;
printf("chId = %d\n", pImdResult->chId);
printf("mode = %d\n", pImdResult->mode);
printf("numObjects = %d\n", pImdResult->numObjects);
printf("frmResult = %d\n", pImdResult->frmResult);
printf("numPolygons = %d\n", pImdResult->numPolygons);
printf("objectCount = %d\n", pImdResult->objectCount);
if(pImdResult->polygonRtUpdated==TRUE)
printf("pImdResult->polygonRtUpdated is TRUE\n");
else
printf("pImdResult->polygonRtUpdated is FALSE\n");

printf("objMetadata[0].area=%d\n", pImdResult->objMetadata[0].area);
printf("objMetadata[0].zoneId=%d\n", pImdResult->objMetadata[0].zoneId);


printf("\n");
IpcBitsInLink_putEmptyVideoBitStreamBufs(ipcBitsInA8Id, &bufList);

System_linkControl(algId, ALG_LINK_SCD_CMD_PRINT_STATISTICS, NULL, 0, TRUE);


--------------------------------------------------------------------------------------
ipc_bits_in_a8_fxn (nil)
bufList.numBufs = 1
bufList.bufs[0]->bufSize=9984
bufList.bufs[0]->channelNum=3
chId = 3
mode = 4
numObjects = 0
frmResult = 0
numPolygons = -2139062144
objectCount = 0
pImdResult->polygonRtUpdated is FALSE
objMetadata[0].area=-2139062144
objMetadata[0].zoneId=-2139062144

[c6xdsp ] 614949: SCD : VA :
[c6xdsp ] Processing of IMD algorithm for frame = 3013
[c6xdsp ]
[c6xdsp ] *** SCD Statistics ***
[c6xdsp ]
[c6xdsp ] Elasped Time : 0 secs
[c6xdsp ] Total Fields Processed : 1
[c6xdsp ] Total Fields FPS : 3 FPS
[c6xdsp ]
[c6xdsp ]
[c6xdsp ] CH | In Recv In Process User Skip Process Skip In Process Time
[c6xdsp ] Num | FPS FPS FPS FPS per frame (msec)
[c6xdsp ] ----------------------------------------------------------------
[c6xdsp ] 3 | 15 3 15 1 8
[c6xdsp ]
ipc_bits_in_a8_fxn (nil)
bufList.numBufs = 1
bufList.bufs[0]->bufSize=9984
bufList.bufs[0]->channelNum=3
chId = 3
mode = 4
numObjects = 0
frmResult = 0
numPolygons = -2139062144
objectCount = 0
pImdResult->polygonRtUpdated is FALSE
objMetadata[0].area=-2139062144
objMetadata[0].zoneId=-2139062144

[c6xdsp ] 615141: SCD : VA :
[c6xdsp ] Processing of IMD algorithm for frame = 3014
[c6xdsp ]
[c6xdsp ] *** SCD Statistics ***
[c6xdsp ]
[c6xdsp ] Elasped Time : 0 secs
[c6xdsp ] Total Fields Processed : 1
[c6xdsp ] Total Fields FPS : 3 FPS
[c6xdsp ]
[c6xdsp ]
[c6xdsp ] CH | In Recv In Process User Skip Process Skip In Process Time
[c6xdsp ] Num | FPS FPS FPS FPS per frame (msec)
[c6xdsp ] ----------------------------------------------------------------
[c6xdsp ] 3 | 15 3 15 1 8
[c6xdsp ]