Dear all:
My development platform is DM8168, and the development kit is DVRRDK_03.00.00.00.
I want to run some algorithms on DM8168.
Can some one tell me how to do it? Or do you have any related documentation.
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.
Dear all:
My development platform is DM8168, and the development kit is DVRRDK_03.00.00.00.
I want to run some algorithms on DM8168.
Can some one tell me how to do it? Or do you have any related documentation.
Hi, Badri
I have look at the rpe resources, and I do not know how to add the alg to it?
Can you tell me?
Hi,Badri.I add my code in algLink_priv.c.It worked,however,the video output become very slow,even it seems just 1 frame per second.Why? Please help me.
And there is my code.
Int32 AlgLink_algProcessData(AlgLink_Obj * pObj)
{
UInt32 frameId, status;
System_LinkInQueParams *pInQueParams;
FVID2_Frame *pFrame;
FVID2_FrameList frameList;
int p,curTime2,curTime1;
Uint8 i,j,m,n,k;
unsigned char *pTmp;
Uint8* ucPtr,ucPtr1;
pInQueParams = &pObj->createArgs.inQueParams;
System_getLinksFullFrames(pInQueParams->prevLinkId,
pInQueParams->prevLinkQueId, &frameList);
if (frameList.numFrames)
{
/* SCD should be done first as it requires to operate on raw YUV */
/* if (pObj->createArgs.enableSCDAlg)
{
status = AlgLink_ScdalgProcessData(&pObj->scdAlg, &frameList, &pObj->outObj[0].bufOutQue);
if (status == FVID2_SOK)
{
/* Send-out the output bitbuffer */
/* System_sendLinkCmd(pObj->createArgs.outQueParams.nextLink,
SYSTEM_CMD_NEW_DATA);
}
}
*/
for(frameId=0; frameId<frameList.numFrames; frameId++)
{
pFrame = frameList.frames[frameId];
/*my program*/
#if 1
curTime1=Utils_getCurTimeInMsec();
for(p=0;p<360*576;p++)//yuyv
{
i=*((unsigned char*)(pFrame->addr[0][0])+p*2+1);
j=*((unsigned char*)(pFrame->addr[0][0])+p*2);
m=*((unsigned char*)(pFrame->addr[1][0])+p*2+1);
n=*((unsigned char*)(pFrame->addr[1][0])+p*2);
i=0x80;//uv
m=0x80;//uv
if(j>128)
j=255;
else
j=0;
if(n>128)
n=255;
else
n=0;
*((unsigned char*)(pFrame->addr[0][0])+p*2+1)=i;
*((unsigned char*)(pFrame->addr[0][0])+p*2)=j;
*((unsigned char*)(pFrame->addr[1][0])+p*2+1)=m;
*((unsigned char*)(pFrame->addr[1][0])+p*2)=n;
}
curTime2=Utils_getCurTimeInMsec();
k=curTime2-curTime1;
Vps_printf("time: %d: ms !!!\n", k);
#endif
System_putLinksEmptyFrames(pInQueParams->prevLinkId,
pInQueParams->prevLinkQueId, &frameList);
}
return FVID2_SOK;
}
Check pFrame->addr[0][0] and pFrame->addr[1][0] addresses are cached.
Check this post on how to check if address is cached http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/337467/1177956.aspx#1177956