Tool/software:
Hi,
I have an image processing algorithm which takes one RGBIR raw image as input and generated complete IR raw output.
Resolution of the image is width 2592 and heigh 1944. I have connected to the XDS110 on board debugger in J721e Soc and loaded the binary on to the C7x core.
I am using code composer studio version 12.4 in ubuntu 22.
While reading the image into the input buffer, I noticed that it is copying slower.
I have tried with 100 rows, and I noticed it took 170 seconds. Tried to copy 100 rows in different ways, copying each pixel, copying 32 pixels in iteration, copying row by row, copying in single go.
Whatever the way, it took 170 seconds.
I have attached the piece of code for reference.
Can you please suggest me the appropriate way to do copying?
Is this issue really caused by fread() ?
int i = 0;
FILE *fp = fopen("/home/thalamr/workspace_v_latest/rgbir_instrinsic/input1.raw", "rb);
const unsigned int img_width = 2592;
const unsigned int img_height = 1944;
const unsigned int out_stride = 2688;
unsigned short* input = (unsigned short*) malloc(out_stride * img_height * sizeof(unsigned short));
unsigned short* outputBayer = (unsigned short*) malloc(out_stride * img_height * sizeof(unsigned short));
for (i = 0; i < img_height; i++)
{
fread(&input[i * out_stride], sizeof(unsigned short), img_width, fp);
}
Thanks and Regards,
Srinivas Thalam