Camera: C ISP pipeline, contrast autofocus, and VFR video
CI / test (push) Canceled after 0s

- Add chandra-camera-isp.c (C/OpenMP) for Quad-Bayer unpack, CCM, and tone mapping, with a NumPy fallback when it is not built
- Add non-blocking contrast-detection VCM autofocus, with lens subdev discovery on the sensor's I2C bus
- Tune Quad-Bayer AE: a video-mode vblank cap, damped steps, and full analog gain before extending blanking
- Record variable-frame-rate video through a streaming Matroska muxer, and count dropped frames
- Ship libcamera IPA tuning files for imx376, imx519, and uncalibrated sensors
- Map camera buffers by fd and sync them with dma-buf ioctls
This commit is contained in:
nandi committed 2026-11-28 19:25:43 -08:00
1 parent 851c39d827
commit 52b42890d6
34 files changed
+2851 -364

No files matched your search

+22 -2
View File
@@ -235,8 +235,28 @@ fn Plasmoid::str(self : Plasmoid, ptr : Int, len : Int) -> String {
None => ""
Some(b) => {
let sb = StringBuilder::new()
for i = 0; i < len; i = i + 1 {
sb.write_char((b[2 * i].to_int() | (b[2 * i + 1].to_int() << 8)).unsafe_to_char())
let mut i = 0
while i < len {
let u = b[2 * i].to_int() | (b[2 * i + 1].to_int() << 8)
if u >= 0xD800 && u <= 0xDBFF {
if i + 1 < len {
let lo = b[2 * (i + 1)].to_int() | (b[2 * (i + 1) + 1].to_int() << 8)
if lo >= 0xDC00 && lo <= 0xDFFF {
let cp = 0x10000 + ((u - 0xD800) << 10) + (lo - 0xDC00)
sb.write_char(cp.unsafe_to_char())
i = i + 2
continue
}
}
sb.write_char('\u{FFFD}')
i = i + 1
} else if u >= 0xDC00 && u <= 0xDFFF {
sb.write_char('\u{FFFD}')
i = i + 1
} else {
sb.write_char(u.unsafe_to_char())
i = i + 1
}
}
sb.to_string()
}
+6 -1
View File
@@ -189,7 +189,12 @@ static char *guest_str(Inst *in, int32_t ptr, int32_t units) {
size_t o = 0;
for (int i = 0; i < units; i++) {
uint32_t cp = u[i];
if (cp >= 0xD800 && cp < 0xDC00 && i + 1 < units) { cp = 0x10000 + ((cp - 0xD800) << 10) + (u[i + 1] - 0xDC00); i++; }
if (cp >= 0xD800 && cp < 0xDC00 && i + 1 < units && u[i + 1] >= 0xDC00 && u[i + 1] < 0xE000) {
cp = 0x10000 + ((cp - 0xD800) << 10) + (u[i + 1] - 0xDC00);
i++;
} else if (cp >= 0xD800 && cp < 0xE000) {
cp = 0xFFFD;
}
if (cp < 0x80) out[o++] = (char)cp;
else if (cp < 0x800) { out[o++] = (char)(0xC0 | (cp >> 6)); out[o++] = (char)(0x80 | (cp & 0x3F)); }
else if (cp < 0x10000) { out[o++] = (char)(0xE0 | (cp >> 12)); out[o++] = (char)(0x80 | ((cp >> 6) & 0x3F)); out[o++] = (char)(0x80 | (cp & 0x3F)); }