Hi,
I would like to process image in the format of RGB888.(since I have some C functions in hand)
I am just new to DSP and use DM6437 to evaluate image processing algorithm.
I used the sample code at C:\dvsdk_1_01_00_15\psp_1_00_02_00\pspdrivers\system\dm6437\bios\dm6437_evm to start working with 6437.
Firstly, I access each pixel in YUV format by declare unsigned char *test;
and access by
test=(unsigned char *)FBAddr->frame.frameBufferPtr;
for (j=720*240; j<=720*250;j++)
{
*((test) + (2 * j)) = 128;
}
it works.
However, I try to write functions ycbcr2rgb(Uint8* src, Int32 width, Int32 height, Uint8* des); and void rgb2ycbcr(Uint8* src, Int32 width, Int32 height, Uint8* des);
and declare unsigned char testBGR[720*480*3]; unsigned char testYUV[720*480*2]; in the global scope.
using
memcpy(testYUV, test, sizeof(unsigned char)*720*480*2);
ycbcr2rgb(testYUV, 720, 480, testBGR);
rgb2ycbcr(testBGR, 720, 480, testYUV);
memcpy(test, testYUV, sizeof(unsigned char)*720*480*2);
in the main function.
But it crashes with
Trouble Halting Target CPU:
Error 0x00000020/-1060
Error during: Execution,
An unknown error prevented the emulator from accessing the processor
in a timely fashion.
Could someone help me with the problem?
In addition, I study the user guide spraak8 Understanding the DaVinci Preview Engine and find that there is a process from RGB to YUV422
Could I process the data just after I capture from the camera with format RGB?
Thanks a lot
BR,
Hank