Hi,
I’m trying to unload some computations onto the aDSP from the main program but am experiencing a massive performance hit (in terms of time) when running computations on the aDSP when compared to the main processor. I understand that this is because the aDSP trades off clock speed for better performance in other areas but I do not have the knowhow to take advantage of this. This is the code I’m running:
#include <stdio.h> #include <HAP_farf.h> #include <video.h> int video_histogram(const unsigned char* frame,int arrayLength, unsigned int* histarray, int histarrayLength){ int ii; unsigned short pixelmag;//stores pixel magnitude for (ii=0; ii<(arrayLength/2); ii++){ //increment through all pixels to fill histarray pixelmag= frame[2*ii] + (frame[2*ii+1]*256); //convert 2 bytes to unsigned short histarray[pixelmag]++; } return 0; }
If anyone can give me some tips or even just point me in the direction of some documentation on the subject It would be very much appreciated!