|
|
|
@ -206,7 +206,7 @@ void debayer_grbg8_simple (uint8_t * src, int src_w, int src_h,
|
|
|
|
// GG RR
|
|
|
|
// GG RR
|
|
|
|
// BB GG
|
|
|
|
// BB GG
|
|
|
|
uint8_t t;
|
|
|
|
uint8_t t;
|
|
|
|
uint8_t r, g, b;
|
|
|
|
uint16_t r, g, b;
|
|
|
|
int ys, yd, xs, xd;
|
|
|
|
int ys, yd, xs, xd;
|
|
|
|
|
|
|
|
|
|
|
|
for (ys = 0, yd = 0; ys < src_h && yd < dst_h; ys++, yd++) {
|
|
|
|
for (ys = 0, yd = 0; ys < src_h && yd < dst_h; ys++, yd++) {
|
|
|
|
@ -370,6 +370,7 @@ void debayer_grbg8_bilinear (uint8_t * src, int src_w, int src_h,
|
|
|
|
STORE8;
|
|
|
|
STORE8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int MAX(int a, int m) { if (a > m) return m; else return a; };
|
|
|
|
|
|
|
|
|
|
|
|
void debayer_rggb10packet_simple (uint8_t * src, int src_w, int src_h,
|
|
|
|
void debayer_rggb10packet_simple (uint8_t * src, int src_w, int src_h,
|
|
|
|
uint8_t * dst, int dst_w, int dst_h) {
|
|
|
|
uint8_t * dst, int dst_w, int dst_h) {
|
|
|
|
@ -383,10 +384,10 @@ void debayer_rggb10packet_simple (uint8_t * src, int src_w, int src_h,
|
|
|
|
|
|
|
|
|
|
|
|
printf ("%s:%d src size:%dx%d dst size:%dx%d\n", __FILE__, __LINE__, src_w, src_h, dst_w, dst_h);
|
|
|
|
printf ("%s:%d src size:%dx%d dst size:%dx%d\n", __FILE__, __LINE__, src_w, src_h, dst_w, dst_h);
|
|
|
|
|
|
|
|
|
|
|
|
// RR GG RR GG RR
|
|
|
|
// RR GG RR GG HH RR
|
|
|
|
// GG BB GG BB GG
|
|
|
|
// GG BB GG BB HH GG
|
|
|
|
// RR GG RR GG RR
|
|
|
|
// RR GG RR GG HH RR
|
|
|
|
// GG BB GG BB GG
|
|
|
|
// GG BB GG BB HH GG
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (ys = 0, yd = 0, psrc = src, pdst = dst; ys < dst_h; ys++, yd++) {
|
|
|
|
for (ys = 0, yd = 0, psrc = src, pdst = dst; ys < dst_h; ys++, yd++) {
|
|
|
|
@ -425,12 +426,18 @@ void debayer_rggb10packet_simple (uint8_t * src, int src_w, int src_h,
|
|
|
|
printf ("debayer error. dpst out of bounds size:%dx%d pos:%dx%d \n", dst_w, dst_h, xd, yd);
|
|
|
|
printf ("debayer error. dpst out of bounds size:%dx%d pos:%dx%d \n", dst_w, dst_h, xd, yd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((ys == 10 || ys == 11) && xs < 10) printf ("%dx%d - %d, %d, %d\n", xs, ys, r, g, b);
|
|
|
|
if ((ys == 10 || ys == 11) && xs < 10) printf ("%dx%d - %d, %d, %d\n", xs, ys, r, g, b);
|
|
|
|
pdst[0] = r;
|
|
|
|
pdst[0] = MAX(r, 0xff);
|
|
|
|
pdst[1] = g;
|
|
|
|
pdst[1] = MAX(g, 0xff);
|
|
|
|
pdst[2] = b;
|
|
|
|
pdst[2] = MAX(b, 0xff);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (yd < 100 && xd < 300) {
|
|
|
|
|
|
|
|
pdst[0] = 0; if (xd < 100) pdst[0] = 255;
|
|
|
|
|
|
|
|
pdst[1] = 0; if (xd > 100 && xd < 200) pdst[1] = 255;
|
|
|
|
|
|
|
|
pdst[2] = 0; if (xd > 200 && xd < 300) pdst[2] = 255;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pdst += 3;
|
|
|
|
pdst += 3;
|
|
|
|
psrc++;
|
|
|
|
psrc++;
|
|
|
|
// if (xs >= src_w -1) psrc += src_w / 4;
|
|
|
|
|
|
|
|
if (xs && (xs % 4 == 0)) psrc++;
|
|
|
|
if (xs && (xs % 4 == 0)) psrc++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} */
|
|
|
|
} */
|
|
|
|
|