- 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:
1 parent
851c39d827
commit
52b42890d6
34 files changed
+2851
-364
No files matched your search
@@ -22,3 +22,42 @@ fn b_glyph(slot : Int, cp : Int, size : Int) -> RawGlyph {
|
||||
coverage: Bytes::from_fixedarray(g.coverage),
|
||||
}
|
||||
}
|
||||
|
||||
///| Cached `.notdef` glyph (cp 0 at 16 px) per slot for wasm glyph-presence checks.
|
||||
let wasm_notdef : Map[Int, RawGlyph] = {}
|
||||
|
||||
///| Cached `b_has_glyph` results keyed by `slot * 0x110000 + cp`.
|
||||
let wasm_has_cache : Map[Int, Bool] = {}
|
||||
|
||||
///|
|
||||
fn raw_glyph_eq(a : RawGlyph, b : RawGlyph) -> Bool {
|
||||
a.w == b.w &&
|
||||
a.h == b.h &&
|
||||
a.xoff == b.xoff &&
|
||||
a.yoff == b.yoff &&
|
||||
a.advance == b.advance &&
|
||||
a.coverage == b.coverage
|
||||
}
|
||||
|
||||
///| Whether `slot` has a glyph for `cp` (not `.notdef`).
|
||||
fn b_has_glyph(slot : Int, cp : Int) -> Bool {
|
||||
if cp >= 0x1F000 {
|
||||
return false
|
||||
}
|
||||
let key = slot * 0x110000 + cp
|
||||
match wasm_has_cache.get(key) {
|
||||
Some(v) => return v
|
||||
None => ()
|
||||
}
|
||||
let notdef = match wasm_notdef.get(slot) {
|
||||
Some(g) => g
|
||||
None => {
|
||||
let g = b_glyph(slot, 0, 16)
|
||||
wasm_notdef.set(slot, g)
|
||||
g
|
||||
}
|
||||
}
|
||||
let has = !raw_glyph_eq(b_glyph(slot, cp, 16), notdef)
|
||||
wasm_has_cache.set(key, has)
|
||||
has
|
||||
}
|
||||
Reference in new issue
Block a user