hi,
i have some questions about the video_preview project, as i see the format that is being used in the project is ycbcr 4:2:2.
as i understand (correct me if i'm wrong) the pixele it that format are stay in this order (y1 cb2 y2 cr2 y3 cb4 y4 cr4) and soo on, i still cant understand how can i modify the the image to work on each pixel for example, i want in my project to make a miror present a miror image - how shuld i work on these pixeles? or can it be some ting as i wrote here down.
void process_image_test( void* currentFrame, int yRows, int xPixels)
{
int xx = 0;
int yy = 0;
for( yy = 0; yy < (xPixels*yRows)*2; yy+=4 )
{
*( ( (unsigned char*)currentFrame ) + yy ) = *( ( (unsigned char*)currentFrame ) - yy + (xx*yRows) - 2);
if (yy == (xx*yRows))
xx++;
}
for( yy = 1; yy < (xPixels*yRows)*2; yy+=2 )
{
*( ( (unsigned char*)currentFrame ) + yy ) = *( ( (unsigned char*)currentFrame ) - yy + (xx*yRows));
if (yy == (xx*yRows))
xx++;
}
for( yy = 2; yy < (xPixels*yRows)*2; yy+=4 )
{
*( ( (unsigned char*)currentFrame ) + yy ) = *( ( (unsigned char*)currentFrame ) - yy + (xx*yRows) + 2);
if (yy == (xx*yRows))
xx++;
}
}
another question i have is how can i change the format from Ycbcr to RGB 565 and supose i can work on the Y cb and cr how the function :
FVID_exchange(hGioVpbeVid0, &frameBuffPtr);
will know to work with this format.
thank you for your help,
vadim beginer user of dsp