Hi, all
I do some image processing in CCS 2.21 on evmDM642.I use the IMGLIB to process the video. I list the part of my code.I have two questions:
for ( i = 0; i < numLines-2; i ++ )
{
IMG_median_3x3(capFrameBuf->frame.iFrm.y1+i*capLinePitch,720,nMemTemp_out+i*capLinePitch);
m_nID=DAT_copy(capFrameBuf->frame.iFrm.cb1+i*(capLinePitch>>1),nMemTemp_cb,numPixels>>1);
DAT_wait(m_nID);
m_nID=DAT_copy(capFrameBuf->frame.iFrm.cr1+i*(capLinePitch>>1),nMemTemp_cr,numPixels>>1);
DAT_wait(m_nID);
ICETEKDM642PCIImagebinary();
m_nID=DAT_copy(nSegmentTemp,nMemTemp_out+i*capLinePitch,720);
DAT_wait(m_nID);
IMG_perimeter(nMemTemp_out+i*capLinePitch,720,binary_out+i*capLinePitch);
.......
1:
I want to test the overhead of the function of the ICETEKDM642PCIImagebinary(), I write a clock function such as:
clock_t start,stop,overhead;
start=clock(); stop=clock(); overhead=stop-start;
start=clock();
ICETEKDM642PCIImagebinary();
stop=clock()
printf("%d \n",stop-start-overhead);
But the result is 0. Why? I track the running step by step,the application turn into the function of the ICETEKDM642PCIImagebinary() actually. Why?
When I use the profile tool to test the cycles of this function,but it can't run continue. WHY?
2:
#pragma DATA_ALIGN(nMemTemp_out,128);
unsigned char nMemTemp_out[720*574];
unsigned char binary_out[720*574];
the varibles of nMemTemp_out and binary_out defined as a globle varible allocated in SDRAM,I want to process it in inter ram,so,I defined a varible nSegmentTemp
#pragma DATA_SECTION(nSegmentTemp, ".INTPROCBUFF");
#pragma DATA_ALIGN(nSegmentTemp,128);
unsigned char nSegmentTemp[720];
the nSegmentTemp is allocated in the inter ram. tha data of nSegmentTemp is evaluated by the function of ICETEKDM642PCIImagebinary()
this statements are in another file. The compiling is passed,When i track this step by step ,I watch the memory
m_nID=DAT_copy(nSegmentTemp,nMemTemp_out+i*capLinePitch,720);
The content of the nSegmentTemp is not copied to the nMemTemp_out, the content of the nMemTemp_out is not changed.Why?
And this statement: IMG_perimeter(nMemTemp_out+i*capLinePitch,720,binary_out+i*capLinePitch);
This invoke is right? I mean the method of line by line to process this video?
Thank you very much!