megapixels: Implement quick-debayering all Bayer 8-bits pixel formats
This application was supporting only debayering of BGGR8 streams: this is an issue on cameras that are outputting a different format. Implement quick-debayering of all Bayer 8-bits pixfmts in order to solve wrong tint issues on many, many camera sensors. This was tested on a Sony Exmor-RS IMX300 sensor. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
This commit is contained in:

committed by
Martijn Braam

parent
6a5f1078ef
commit
b56182ca33
8
main.c
8
main.c
@@ -610,7 +610,9 @@ process_image(const int *p, int size)
|
||||
}
|
||||
pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, current.width / (skip*2), current.height / (skip*2));
|
||||
pixels = gdk_pixbuf_get_pixels(pixbuf);
|
||||
quick_debayer_bggr8((const uint8_t *)p, pixels, current.width, current.height, skip, current.blacklevel);
|
||||
quick_debayer((const uint8_t *)p, pixels, current.fmt,
|
||||
current.width, current.height, skip,
|
||||
current.blacklevel);
|
||||
|
||||
if (current.rotate == 0) {
|
||||
pixbufrot = pixbuf;
|
||||
@@ -765,7 +767,9 @@ process_image(const int *p, int size)
|
||||
// Update the thumbnail if this is the last frame
|
||||
pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, current.width / (skip*2), current.height / (skip*2));
|
||||
pixels = gdk_pixbuf_get_pixels(pixbuf);
|
||||
quick_debayer_bggr8((const uint8_t *)p, pixels, current.width, current.height, skip, current.blacklevel);
|
||||
quick_debayer((const uint8_t *)p, pixels, current.fmt,
|
||||
current.width, current.height, skip,
|
||||
current.blacklevel);
|
||||
|
||||
if (current.rotate == 0) {
|
||||
pixbufrot = pixbuf;
|
||||
|
Reference in New Issue
Block a user