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.
我在evmc6678l上单独测试edma3lld,拷贝1920*360大小的数据(ddr3拷贝到ddr3)时间大概是0.8个毫秒左右,但是如果加入了ipc的messageQ应用之后,同样的拷贝过程,需要5.6毫秒,这和之间内存拷贝时间差不多了,这是什么原因呢?请各位专家帮忙分析分析
这和之间内存拷贝时间差不多了
[TY]请问这个 拷贝时间差不多了 怎么理解。用message Q 的话,您是用哪种copy方式,源地址和目的地址是否和edma3重合呢?
你好,我测了一下,内存间直接赋值,时间相差只有1毫秒。另外:源地址和目的地址是否和edma3重合呢?这是什么意思,能否详细解释一下,谢谢!
这个copy就是将yuv420格式的uv转换成yuv420sp格式的uv
简单的内存之间的赋值:
static void convertData(XDAS_Int8* outData,XDAS_Int32 yuvW,XDAS_Int32 yuvH)
{
int n=0;
XDAS_Int8 *dest,*pu,*pv;
pu=outData+yuvW*yuvH*3/2;
pv=pu+yuvW*yuvH/4;
dest=outData+yuvW*yuvH;
memcpy(pu,dest,yuvW*yuvH/2);
for(n=0;n<yuvW*yuvH/2;n+=2)
{
*(dest+n)=*pu;
*(dest+n+1)=*pv;
pu+=1;
pv+=1;
}
Cache_wbInv(dest,yuvW*yuvH/2, Cache_Type_ALL, TRUE);
}
edma3://edma3的代码间附件,和sample差不多
static void convertData(XDAS_Int8* jpgData,XDM1_BufDesc * outputBufDesc,XDAS_Int32 w,XDAS_Int32 h)
{
PROF_CLOCK begin;
XDAS_Int8* start=jpgData+w*h;
int i,n=1;
if(outputBufDesc->numBufs<3)
{
printf("converData desc buf is smaller than 3\n");
return;
}
for(i=1;i<12;i++)
{
if(w*i*2<32767 && h%(4*i)==0)
n=i;
}
printf("@@@@@@@@@@@ src:0x%08x,0x%08x\n",outputBufDesc->descs[1].buf,start);
begin=PROF_clock();
edma3_copy(hEdma,(unsigned char*)outputBufDesc->descs[1].buf,(unsigned char*)start,1,w*n,h/(4*n),1,w*n,2,w*n*2,EDMA3_DRV_SYNC_AB);
printf("%d decode frame 1:%f\n",MultiProc_self(),((float)(PROF_clock() - begin) / PROF_CLOCKS_PER_SEC));
edma3_copy(hEdma,(unsigned char*)outputBufDesc->descs[2].buf,(unsigned char*)start+1,1,w*n,h/(4*n),1,w*n,2,w*n*2,EDMA3_DRV_SYNC_AB);
Cache_wbInv(start,w*h/2, Cache_Type_ALL, TRUE);
}