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

+52
View File
@@ -68,3 +68,55 @@ test "a file that is not a colour emoji font is an error that says why" {
assert_true(msg.contains("no cmap table"))
assert_true(@emoji.missing_font_message("").contains("just install"))
}
///|
test "inline emoji matcher handles turtle, sequences, VS15/VS16, and BMP symbols" {
assert_false(@emoji.text_may_have_emoji("Regency 215-223 WiFi"))
assert_false(@emoji.text_may_have_emoji("Café • … — ©"))
assert_true(@emoji.text_may_have_emoji("🐢"))
assert_true(@emoji.text_may_have_emoji("Connected to 🐢 (72%)"))
assert_true(@emoji.text_may_have_emoji("#️⃣"))
assert_true(@emoji.text_may_have_emoji("©️"))
let f = open_font()
let all_have = fn(_cp : Int) { true }
let none_have = fn(_cp : Int) { false }
assert_eq(f.match_at("🐢".to_array(), 0, all_have), Some((1, "🐢")))
assert_eq(f.match_at("Connected to 🐢 (72%)".to_array(), 13, all_have), Some((14, "🐢")))
assert_eq(f.match_at("👍🏽!".to_array(), 0, all_have), Some((2, "👍🏽")))
assert_eq(f.match_at("#️⃣x".to_array(), 0, all_have), Some((3, "#️⃣")))
assert_eq(f.match_at("🇺🇸x".to_array(), 0, all_have), Some((2, "🇺🇸")))
assert_eq(f.match_at("👨‍👩‍👧‍👦x".to_array(), 0, all_have), Some((7, "👨‍👩‍👧‍👦")))
// Bare BMP symbols stay monochrome when the UI text font has them; VS16 switches to colour, VS15 keeps text.
assert_eq(f.match_at("▶".to_array(), 0, all_have), None)
assert_eq(f.match_at("▶️".to_array(), 0, all_have), Some((2, "▶️")))
assert_eq(f.match_at("▶\u{FE0E}".to_array(), 0, all_have), None)
assert_eq(f.match_at("☀".to_array(), 0, none_have), Some((1, "☀")))
// Non-emoji ASCII / CJK / unsupported Emoji 18.0 characters do not match.
assert_eq(f.match_at("#1".to_array(), 0, all_have), None)
assert_eq(f.match_at("日本語".to_array(), 0, none_have), None)
let cracking = @emoji.all().filter(e => e.name == "cracking face")[0]
assert_eq(f.match_at(cracking.text.to_array(), 0, none_have), None)
// Noto Color Emoji's turtle renders olive-green opaque pixels at inline size.
let p = f.picture("🐢", 16).unwrap()
assert_eq((p.width, p.height), (16, 16))
let mut green = 0
for i = 0; i < p.width * p.height; i = i + 1 {
let o = i * 4
let r = p.data[o].to_int()
let g = p.data[o + 1].to_int()
let b = p.data[o + 2].to_int()
let a = p.data[o + 3].to_int()
if a > 200 && g > r && g > b + 40 {
green = green + 1
}
}
assert_true(green > 10)
let src = @emoji.EmojiSource::new()
assert_eq(src.match_at("🐢".to_array(), 0, all_have), Some((1, "🐢")))
}