Small fix for bilinear debayering

master
Stefan Jahn 3 years ago
parent e1f9d581c4
commit 36b734d58b

@ -60,9 +60,9 @@ void debayer_grbg16_simple (uint16_t * src, int src_w, int src_h,
#define LE (*(src-1))
#define RI (*(src+1))
#define UPLE (*(src-src_w-1))
#define UPRI (*(src-src_w+11))
#define UPRI (*(src-src_w+1))
#define DNLE (*(src+src_w-1))
#define DNRI (*(src+src_w+11))
#define DNRI (*(src+src_w+1))
#define STORE *(dst++) = r; *(dst++) = g; *(dst++) = b; src++;
@ -106,7 +106,7 @@ void debayer_grbg16_bilinear (uint16_t * src, int src_w, int src_h,
b = DNLE;
STORE;
// got through the "body" of the image
// go through the "body" of the image
for (ys = 1; ys < src_h - 1; ys+=2) {
// every second line with BB GG BB GG (start at 2nd line)
@ -151,6 +151,7 @@ void debayer_grbg16_bilinear (uint16_t * src, int src_w, int src_h,
r = (LE + RI) / 2;
g = CE;
b = (UP + DN) / 2;
STORE;
}
// last pixel in line (red)
r = CE;

Loading…
Cancel
Save