Files
daedalus-v4l2/daemon/README.md
T
marfrit c7d8050cc9 Initial scaffold: daedalus-v4l2 sibling repo
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>
2026-05-18 14:54:56 +00:00

1.4 KiB

daemon/ — daedalus-v4l2 userspace decoder daemon

Userspace daemon that:

  1. Connects to the kernel module's chardev
  2. Receives bitstream + V4L2 control blobs
  3. Parses bitstream via dlopen'd FFmpeg
  4. Dispatches per-block work via daedalus_dispatch_* from sibling daedalus-fourier
  5. Returns decoded frames to kernel

Status

Scaffold only. Phase 8.3 not yet started.

Build dependencies (planned)

  • libdaedalus_core.a from sibling daedalus-fourier (static link)
  • FFmpeg dev headers (for AVPacket/AVCodec interface types) + runtime FFmpeg .so (loaded via dlopen)
  • libv4l2 (for V4L2 control struct definitions)
  • pthread

Build (when implemented)

mkdir build && cd build
cmake .. -DDAEDALUS_FOURIER_DIR=/path/to/daedalus-fourier
make

Layout (planned)

  • CMakeLists.txt
  • src/main.c — event loop, chardev connection
  • src/parser.c — FFmpeg dlopen wrapper + per-codec dispatch
  • src/decode_vp9.c, src/decode_av1.c, src/decode_h264.c — per-codec block walkers
  • src/frame_io.c — frame allocation, return to kernel

License

BSD-2-Clause (matches daedalus-fourier sibling).

Phase 8.3 starting point

A standalone program that:

  1. Opens a .ivf or .mp4
  2. Pulls codec packets via dlopen'd avformat
  3. Calls dlopen'd avcodec to parse (without decoding)
  4. Walks the block-level metadata
  5. Validates output structure

No kernel involvement yet — just confirm the parse path works.