INDI monthly update. In addition to driver improvements, major code refactoring is in progress by @pawel-soja to modernize and improve INDI aging code.
New forum users, please go here first: indilib.org/forum/new-forum-users.html
Please Log in or Create an account to join the conversation.
void bayer_grbg_to_rgb24(unsigned char *dst, unsigned char *src, long int WIDTH, long int HEIGHT)
{
//Format is
// GRGRGRGRGR
// BGBGBGBGBG
// GRGRGRGRGR
// BGBGBGBGBG
long int row;
long int col;
long int src_pixel;
long int src_pixel_row2;
for (row = 0; row < HEIGHT; row++) {
for (col = 0; col < WIDTH; col++) {
i=(row*WIDTH+col)*3; //Output is in 3 bytes RGB, so convert a single pixel each time.
src_pixel=(row*WIDTH+col)*2; //Bayer pattern has 2 bytes in first row: GR
src_pixel_row2=((row+1)*WIDTH+col)*2; //Bayer pattern has 2 bytes in 2nd row:BG
dst[i]/*RED*/=src[src_pixel+1];
dst[i+1]/*GREEN*/=(src[src_pixel]+src[src_pixel_row2+1])/2;
dst[i+2]/*BLUE*/=src[src_pixel_row2+1];
}
}
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.