From c9a4b82f2c05c6bafa0c0d96c4e8bec7bcc77b4b Mon Sep 17 00:00:00 2001 From: claude-noether Date: Thu, 21 May 2026 18:39:22 +0200 Subject: [PATCH] =?UTF-8?q?daedalus-v4l2:=205d8b436=20->=2077e14e5=20?= =?UTF-8?q?=E2=80=94=20picks=20up=20#12=20(LOW=5FDELAY)=20+=20#13=20(daeda?= =?UTF-8?q?lus-fourier=20linkage)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Daemon-only bump (no daedalus-v4l2-dkms change needed; PROTO_VERSION stays at 0). #12 (LOW_DELAY half-measure): daemon sets AV_CODEC_FLAG_LOW_DELAY on the H.264 AVCodecContext so libavcodec emits frames in decode order ~99% of the time (a few stragglers at GOP boundaries when the stream's SPS num_reorder_frames overrides the flag). Visible improvement vs the 2-1-4-3 pair-swap on Firefox + mpv playback; not the permanent fix — see daedalus-v4l2#11 for the architectural plan to substitute daedalus-fourier kernels for libavcodec's pixel math one cycle at a time. #13 (daedalus-fourier linkage): daemon now pkg-config-links against the daedalus-fourier kernel library (marfrit/daedalus-fourier) and logs substrate availability at startup. No kernels dispatched yet — this is the build-time foundation for the substitution work. build-deb.sh updated to fetch + build + install daedalus-fourier (pinned at d87239d, marfrit/daedalus-fourier PR #1) into a per- build temp prefix before invoking the daemon's cmake, exposing it via PKG_CONFIG_PATH. Static-linked, so the resulting .deb has no new runtime deps. Requires libvulkan-dev + glslang-tools on the CI runner. Arch PKGBUILD bumped to the same upstream commit but Arch packaging for daedalus-fourier itself is a follow-up; until that lands the Arch build expects daedalus-fourier installed by the user (AUR-style). Debian-side is end-to-end self-contained via build-deb.sh. Refs: * https://git.reauktion.de/reauktion/daedalus-v4l2/pulls/12 * https://git.reauktion.de/reauktion/daedalus-v4l2/pulls/13 * https://git.reauktion.de/reauktion/daedalus-v4l2/issues/11 * https://git.reauktion.de/marfrit/daedalus-fourier/pulls/1 --- arch/daedalus-v4l2/PKGBUILD | 22 ++++++----- debian/daedalus-v4l2/build-deb.sh | 54 +++++++++++++++++++++------ debian/daedalus-v4l2/debian/changelog | 31 +++++++++++++++ 3 files changed, 86 insertions(+), 21 deletions(-) diff --git a/arch/daedalus-v4l2/PKGBUILD b/arch/daedalus-v4l2/PKGBUILD index c1a3346f6..c4f3d9fbe 100644 --- a/arch/daedalus-v4l2/PKGBUILD +++ b/arch/daedalus-v4l2/PKGBUILD @@ -16,19 +16,21 @@ pkgname=daedalus-v4l2 _upstreampkg=daedalus-v4l2 -# Pin the daedalus-v4l2 tip. 5d8b436 = revert of PRs #7 + #8 (the -# parking design that broke libva's 1:1 contract — see -# daedalus-v4l2#9 + #10). Tree is content-equivalent to f0d4186 -# plus PR #4 (DECODE_MODE / START_CODE menu controls; cosmetic -# warning fix). PROTO_VERSION drops 1 → 0 to match — lock-step -# install with daedalus-v4l2-dkms 0.1.0.r33.5d8b436 REQUIRED. -# Proper H.264 reorder fix tracked separately at daedalus-v4l2#11. -_commit=5d8b4369e58ab947d1c56b1f718293c57c6065b5 +# 77e14e5 = post-revert state plus daedalus-v4l2 PRs #12 (LOW_DELAY +# half-measure for the H.264 display-reorder visual) and #13 (daemon +# now links daedalus-fourier and logs substrate availability at +# startup). Daemon now needs `daedalus-fourier` at build time — +# Arch packaging for that sibling library is a follow-up; until it +# lands as an AUR-style PKGBUILD, this Arch build expects +# daedalus-fourier installed to /usr/local (or equivalent) by the +# user. See debian/daedalus-v4l2/build-deb.sh for the Debian-side +# in-build fetch-and-install of daedalus-fourier. +_commit=77e14e5a192f0eef0b41dd1140205e29d13d4d58 # 0.1.0 (pre-1.0) + commit count + short sha. Bump the .Y on each # Phase 8.x close. pkgver() recomputes at build time. -pkgver=0.1.0.r33.5d8b436 -pkgrel=1 # reset for new upstream pin (5d8b436 — revert parking design) +pkgver=0.1.0.r37.77e14e5 +pkgrel=1 # reset for new upstream pin (77e14e5 — daedalus-fourier linkage) pkgdesc="Userspace daemon for the daedalus-v4l2 V4L2 stateless decoder shim (VP9/AV1/H.264 on Pi 5 / CM5)" arch=('aarch64') url="https://git.reauktion.de/reauktion/daedalus-v4l2" diff --git a/debian/daedalus-v4l2/build-deb.sh b/debian/daedalus-v4l2/build-deb.sh index 78ada2dcd..3b9cd82c8 100755 --- a/debian/daedalus-v4l2/build-deb.sh +++ b/debian/daedalus-v4l2/build-deb.sh @@ -11,16 +11,25 @@ # Upstream repo: https://git.reauktion.de/reauktion/daedalus-v4l2 set -euo pipefail -# Same pin as the Arch PKGBUILD. 5d8b436 reverts PRs #7 + #8 (the -# parking design that broke libva's 1:1 CAPTURE-buffer contract; see -# daedalus-v4l2#9 + #10). Tree is content-equivalent to f0d4186 -# plus PR #4 (DECODE_MODE / START_CODE menu controls — cosmetic -# warning fix). PROTO_VERSION drops 1 → 0; lock-step install with -# daedalus-v4l2-dkms 0.1.0+r33+g5d8b436 REQUIRED. Proper H.264 -# reorder fix tracked separately at daedalus-v4l2#11. -UPSTREAM_COMMIT=5d8b4369e58ab947d1c56b1f718293c57c6065b5 -PKGVER=0.1.0+r33+g5d8b436 -PKGREL=1 # reset for new upstream pin (5d8b436 — revert parking design) +# 77e14e5 = post-revert state plus daedalus-v4l2 PRs #12 (LOW_DELAY +# half-measure for the H.264 display-reorder visual) and #13 (daemon +# now links daedalus-fourier and logs substrate availability at +# startup). PROTO_VERSION stays at 0; daedalus-v4l2-dkms only needs +# bumping when the kernel module changes (no kmod changes here). +# +# New build-dep: daedalus-fourier kernel library. Fetched + built + +# installed to a per-build temp prefix below, exposed to the daemon +# cmake via PKG_CONFIG_PATH. Static-linked into the daemon binary, +# so the resulting .deb has no runtime dep on daedalus-fourier. +UPSTREAM_COMMIT=77e14e5a192f0eef0b41dd1140205e29d13d4d58 +PKGVER=0.1.0+r37+g77e14e5 +PKGREL=1 # reset for new upstream pin (77e14e5 — daedalus-fourier linkage) + +# daedalus-fourier pin. d87239d = marfrit/daedalus-fourier PR #1 merge +# (install rules + pkg-config, enables this consumer to find_package +# + link). Bump in lockstep with the upstream daemon when daedalus- +# fourier's API or installed shaders are changed by a new consumer. +DAEDALUS_FOURIER_COMMIT=d87239d8172307d9a1b93c95cbed116d175b85cc HERE=$(dirname "$(readlink -f "$0")") @@ -30,14 +39,37 @@ export SOURCE_DATE_EPOCH=1779231600 work=$(mktemp -d) trap "rm -rf $work" EXIT +# --- daedalus-fourier: fetch + build + install to per-build prefix --- +# +# Static-linked into the daemon, so the temp prefix is only for the +# duration of this build script. Requires libvulkan-dev + glslang-tools +# on the runner (already needed for the daedalus-fourier benches). +FOURIER_PREFIX=$work/fourier-prefix +mkdir -p "$FOURIER_PREFIX" + +cd "$work" +curl --connect-timeout 10 --max-time 600 --retry 3 --retry-delay 5 -sSLfo daedalus-fourier.tar.gz \ + "https://git.reauktion.de/marfrit/daedalus-fourier/archive/${DAEDALUS_FOURIER_COMMIT}.tar.gz" +tar xzf daedalus-fourier.tar.gz +cd daedalus-fourier +cmake -B build -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="$FOURIER_PREFIX" +cmake --build build --target daedalus_core +cmake --install build + +# --- daedalus-v4l2: fetch + build daemon against installed daedalus-fourier --- + cd "$work" curl --connect-timeout 10 --max-time 600 --retry 3 --retry-delay 5 -sSLfo daedalus-v4l2.tar.gz \ "https://git.reauktion.de/reauktion/daedalus-v4l2/archive/${UPSTREAM_COMMIT}.tar.gz" tar xzf daedalus-v4l2.tar.gz SRCDIR=daedalus-v4l2 -# Build daemon (CMake) +# Build daemon (CMake) — point pkg-config at the daedalus-fourier +# temp prefix so pkg_check_modules(DAEDALUS_FOURIER …) resolves to it. cd "$SRCDIR/daemon" +PKG_CONFIG_PATH="$FOURIER_PREFIX/lib/pkgconfig" \ cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr diff --git a/debian/daedalus-v4l2/debian/changelog b/debian/daedalus-v4l2/debian/changelog index c37e636d0..d2dc40d3b 100644 --- a/debian/daedalus-v4l2/debian/changelog +++ b/debian/daedalus-v4l2/debian/changelog @@ -1,3 +1,34 @@ +daedalus-v4l2 (0.1.0+r37+g77e14e5-1) bookworm trixie; urgency=medium + + * Bump to 77e14e5 — picks up daedalus-v4l2 PRs #12 + #13. + * #12 (LOW_DELAY half-measure): the daemon now sets + AV_CODEC_FLAG_LOW_DELAY on the H.264 AVCodecContext so libavcodec + emits frames in decode order ~99% of the time (a few stragglers + at GOP boundaries when the stream's SPS num_reorder_frames + overrides the flag). Visible improvement vs the 2-1-4-3 + pair-swap on Firefox YouTube + mpv playback; not a permanent + fix (see #11 for the architectural plan). + * #13 (daedalus-fourier linkage): the daemon now pkg-config-links + against the daedalus-fourier kernel library (marfrit/ + daedalus-fourier) and logs substrate availability at startup. + No kernels dispatched yet — this is the build-time / link-time + foundation for the H.264 daemon-rewrite plan in #11 + (substituting daedalus-fourier IDCT 4×4 / IDCT 8×8 / luma + deblock primitives for libavcodec's per-MB pixel math, one + cycle at a time, measuring CPU saved per substitution). + * Build-deb.sh now fetches + builds + installs daedalus-fourier + (pinned at d87239d, marfrit/daedalus-fourier PR #1) into a + per-build temp prefix, then builds the daemon with + PKG_CONFIG_PATH pointing at it. daedalus-fourier is + statically linked into the daemon binary, so the resulting + .deb has no new runtime deps. Requires libvulkan-dev + + glslang-tools on the CI runner (the daedalus-fourier benches + already needed those). + * Wire protocol unchanged — DAEDALUS_PROTO_VERSION stays at 0. + No daedalus-v4l2-dkms bump needed. + + -- Markus Fritsche Thu, 21 May 2026 16:30:00 +0000 + daedalus-v4l2 (0.1.0+r33+g5d8b436-1) bookworm trixie; urgency=medium * Bump to 5d8b436 — reverts daedalus-v4l2 PRs #7 + #8 (the parking -- 2.47.3