Hello
I m new to DM6467. and I m just writting simple code for 8x8 block tranasfer from one image to another. i write down the below code
ipDataPtr = (
unsigned char *) inBufs->descs[0].buf;
opDataPtr = (
unsigned char *) outBufs->descs[0].buf;
blockWidth = 8;
for
( i=0; i<elem.NumLines ; i += blockWidth) {
for
( j=0; j<elem.LineLength ; j+=blockWidth ) {
tin = ipDataPtr + (i*ipWdthStp + j); tout = opDataPtr + (i*opWdthStp + j);
VCA_ALGORITHMS_MT_doCopy2D2DBlock(obj->dmaHandle2D[0], tin , tout, &elem, blockWidth);
}
}
Void VCA_ALGORITHMS_MT_doCopy2D1D(IDMA3_Handle dmaHandle, Void *in, Void *out, ElemStruct *elem) { ACPY3_Params params; params.transferType = ACPY3_2D1D; params.srcAddr = ( void *)in;
params.dstAddr = ( void *)out;
params.elementSize = (elem->LineLength); params.numElements = (elem->NumLines); params.numFrames = 1; params.srcElementIndex = elem->srcLineOffset; //params.dstElementIndex = elem->dstLineOffset; params.srcFrameIndex = 0; params.dstFrameIndex = 0; /* Configure logical dma channel */ ACPY3_configure(dmaHandle, ¶ms, 0); /* Use DMA to fcpy input buffer into working buffer */ ACPY3_start(dmaHandle); /* Check that dma transfer has completed before finishing "processing" */ (!ACPY3_complete(dmaHandle)) {
; }; /*
* DeActivate Channel scratch DMA channels. */ // ACPY3_deactivate(dmaHandle); } Void VCA_ALGORITHMS_MT_doCopy2D2DBlock(IDMA3_Handle dmaHandle, Void *in, Void *out, ElemStruct *elem, blockWidth)
{ ACPY3_Params params; /*
* Activate Channel scratch DMA channels. */ // ACPY3_activate(dmaHandle); /* Configure the logical channel */ params.transferType = ACPY3_2D2D; params.srcAddr = ( *)in;
params.dstAddr = ( *)out;
params.elementSize = blockWidth; params.numElements = blockWidth; params.numFrames = 1; //(elem->LineLength)*(elem->NumLines)/(blockWidth*blockWidth); params.srcElementIndex = elem->srcLineOffset ; params.dstElementIndex = elem->dstLineOffset ; params.srcFrameIndex = 0; params.dstFrameIndex = 0; /* Configure logical dma channel */ ACPY3_configure(dmaHandle, ¶ms, 0); /* Use DMA to fcpy input buffer into working buffer */ ACPY3_start(dmaHandle); /* Check that dma transfer has completed before finishing "processing" */ (!ACPY3_complete(dmaHandle)) {
; }; /*
* DeActivate Channel scratch DMA channels. */ // ACPY3_deactivate(dmaHandle); }
but surprisingly this code is working fine with 32 and 16 byte block transfer but its not working with 8x8 and 4x4 block.
i cant understand hows it happen.
can anybody tell me why that is happening.
thanks in advance.