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

+25
View File
@@ -75,6 +75,7 @@ targets = [
"/usr/local/bin/chandra-kde-colors",
"/usr/local/bin/chandra-camera",
"/usr/local/lib/chandra/chandra-camera-ui",
"/usr/local/lib/chandra/libchandra-camera-isp.so",
"/usr/share/applications/chandra-camera.desktop",
"/usr/share/icons/hicolor/scalable/apps/chandra-camera.svg",
"/usr/local/bin/chandra-remote",
@@ -200,6 +201,30 @@ subprocess.check_call([cc, "-O2", "-Wall", "-Wextra", "-o", cam_ui_dst + ".new",
os.chmod(cam_ui_dst + ".new", 0o755)
os.replace(cam_ui_dst + ".new", cam_ui_dst)
print("installed", cam_ui_dst)
cam_isp_src = os.path.join(root, "camera/chandra-camera-isp.c")
cam_isp_dst = "/usr/local/lib/chandra/libchandra-camera-isp.so"
if os.path.exists(cam_isp_src):
rc = subprocess.call([
cc, "-O3", "-fopenmp", "-shared", "-fPIC", "-Wall", "-Wextra",
"-o", cam_isp_dst + ".new", cam_isp_src, "-lm",
])
if rc != 0:
subprocess.check_call([
cc, "-O3", "-shared", "-fPIC", "-Wall", "-Wextra",
"-o", cam_isp_dst + ".new", cam_isp_src, "-lm",
])
os.chmod(cam_isp_dst + ".new", 0o755)
os.replace(cam_isp_dst + ".new", cam_isp_dst)
print("installed", cam_isp_dst)
cam_ipa_src = os.path.join(root, "camera/ipa/simple")
cam_ipa_dst = os.path.join(share, "ipa", "simple")
if os.path.isdir(cam_ipa_src):
os.makedirs(cam_ipa_dst, exist_ok=True)
os.chmod(os.path.join(share, "ipa"), 0o755)
os.chmod(cam_ipa_dst, 0o755)
for fn in sorted(os.listdir(cam_ipa_src)):
if fn.endswith(".yaml"):
put(os.path.join(cam_ipa_src, fn), os.path.join(cam_ipa_dst, fn), 0o644)
put(os.path.join(root, "camera/chandra-camera.desktop"), "/usr/share/applications/chandra-camera.desktop", 0o644)
put(os.path.join(root, "camera/chandra-camera.svg"), "/usr/share/icons/hicolor/scalable/apps/chandra-camera.svg", 0o644)
remote_srcs = [