Hello. I have a question about C6EZAccel. I wrote application on DM8168, based on saLoopBack demo, which grabs frames from camera and does some processing on DSP. For image processing I added a new kernel to c6accel.
Inside my algorithm I need several buffers to use (6 buffers size of 1280*720). These buffers are used only by my algorithm. Here is how I allocate them:
file $(C6ACCEL_DIR)/dsp/alg/src/algorithm.c:
case (PREPROCESSING_FXN_ID):
{
Memory_AllocParams memParams = Memory_DEFAULTPARAMS;
memParams.flags = Memory_CACHED;
memParams.type = Memory_CONTIGHEAP;
unsigned char *Y1;
Y1 = Memory_alloc(rows*cols, &memParams);
Memory_cacheWbInv(Y1, rows*cols);
...
// some processing
...
Memory_free(Y1, rows*cols, &memParams);
}
break;
Since the function is called every time when new frame arrived, buffers also are allocated every frame. If I allocate buffers earlier on ARM (main.c) and pass them through C6Accel wrapper API function call to DSP, processing time increases. Is there any method to allocate buffers once on DSP and then use them? Or any other more efficient ways?
Thanks, Sergey.