c7d8050cc9
V4L2 stateless decoder for Pi 5, backed by sibling
daedalus-fourier kernel library (VP9 + AV1 CDEF + H.264 video
decode kernels on VideoCore VII compute + ARM NEON).
Architecture locked 2026-05-18 by mfritsche per
daedalus-fourier/docs/phase8_scoping.md:
- Option B: Linux kernel V4L2 shim + userspace daemon (not
v4l2loopback). Real /dev/videoNN; proper DRM PRIME for
browser zero-copy.
- Option γ: dlopen FFmpeg at runtime as parser. No vendoring;
fastest to v1.
- Sibling repo (this repo): V4L2-side work outside of
daedalus-fourier so kernel-library API stays clean.
Components:
kernel/ - Linux out-of-tree kernel module (GPLv2; V4L2
device + chardev bridge to userspace daemon)
daemon/ - userspace decoder daemon (BSD-2-Clause; links
libdaedalus_core.a from sibling; dlopens FFmpeg)
docs/ - architecture + 7-phase roadmap (8.1..8.7)
include/ - shared headers between kernel and daemon
Roadmap (7 sub-phases, ~1 week each):
8.1 kernel skeleton (/dev/videoNN with no-op ioctls)
8.2 chardev bridge (kernel ↔ daemon ping-pong)
8.3 daemon FFmpeg dlopen + parse path
8.4 VP9 end-to-end via daedalus_dispatch_*
8.5 dmabuf / DRM PRIME for zero-copy
8.6 AV1 + H.264 codec support
8.7 performance: hit 30fps@1080p (project floor)
No code yet — only README + design docs + directory structure.
First implementation work starts in Phase 8.1 next session.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.3 KiB
2.3 KiB
daedalus-v4l2 — roadmap
Sub-phases
Phase 8.1 — kernel module skeleton
Out-of-tree kernel module that:
- Registers
/dev/videoNNwithVFL_TYPE_VIDEO+ a no-op V4L2 stateless dispatch table. - Accepts open/close, S_FMT, REQBUFS ioctls without doing anything (yet).
- Builds against
/lib/modules/$(uname -r)/build.
Deliverable: modprobe daedalus_v4l2 works, v4l2-ctl --list-devices
shows the new device.
Phase 8.2 — kernel ↔ daemon chardev bridge
- Kernel module creates
/dev/daedalus-v4l2chardev. - Defines a simple req/resp protocol in
include/daedalus_v4l2_proto.h. - Daemon connects, exchanges echo requests.
Deliverable: ping-pong test passes.
Phase 8.3 — daemon FFmpeg dlopen + parse
- Daemon links
libdaedalus_core.afrom sibling. - Daemon dlopens FFmpeg.
- Test program: feed a VP9 IVF file to FFmpeg parsers, extract block-level metadata, validate against expected.
Deliverable: daemon can parse a VP9 frame and walk the block-level info.
Phase 8.4 — VP9 end-to-end via daedalus-fourier
- Wire daemon's per-block walker to
daedalus_dispatch_*calls. - Kernel module passes bitstream + controls to daemon over chardev.
- Daemon decodes, writes pixels to a shared buffer, returns result to kernel.
- Kernel returns via DQBUF.
Deliverable: v4l2-ctl --stream-from=foo.ivf produces
decoded frames (output via --stream-to PNG dump).
Phase 8.5 — dmabuf / DRM PRIME
- Kernel module allocates dma-coherent buffers.
- Export via VIDIOC_EXPBUF.
- Daemon writes via mmap into kernel-allocated dmabuf.
- Test:
v4l2-ctl --capture-mmap-dmabufworks.
Deliverable: dmabuf-fd is exportable; first browser-friendly frame.
Phase 8.6 — AV1 + H.264
- Add codec support for AV1 (using CDEF QPU helper) and H.264 (using deblock QPU helper for the one cycle 8 path, everything else CPU).
Deliverable: real AV1/H.264 clips decode end-to-end.
Phase 8.7 — performance + 30fps@1080p
- Profile end-to-end pipeline.
- Eliminate copies where possible.
- Hit 30fps@1080p for daily YouTube videos
(the project's user-facing success criterion per
30fps-floor-is-finememory).
Deliverable: 30fps stable on real content.
Effort estimate
Each phase: ~1 week of focused work (~40 hours). Total: 7 weeks for v1.
Could be split across multiple sessions / contributors.