forked from marfrit/marfrit-packages
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f3dd1c1886 | |||
| add049f0bd | |||
| 249e8461bb | |||
| 3293cd6542 | |||
| 6de7268b49 | |||
| dbae9832b6 | |||
| b248aa2ac8 | |||
| 06023bcf9d | |||
| 7542989f2b | |||
| 9e9447502e |
@@ -0,0 +1,68 @@
|
||||
# Maintainer: Markus Fritsche <fritsche.markus@gmail.com>
|
||||
#
|
||||
# daedalus-v4l2-dkms — DKMS package for the daedalus_v4l2 out-of-tree
|
||||
# kernel module (V4L2 stateless decoder shim for Pi 5 / CM5).
|
||||
#
|
||||
# Pair to daedalus-v4l2 (userspace daemon). When loaded, the module
|
||||
# registers /dev/videoNN (V4L2 m2m) + /dev/mediaNN (media controller) +
|
||||
# /dev/daedalus-v4l2 (chardev to the userspace daemon). Userspace
|
||||
# clients drive the V4L2 m2m + request API path; the daemon does the
|
||||
# actual FFmpeg-backed decode on /dev/daedalus-v4l2.
|
||||
#
|
||||
# Project: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
# Sibling userspace package: daedalus-v4l2
|
||||
# Sibling consumer: libva-v4l2-request-fourier
|
||||
|
||||
pkgname=daedalus-v4l2-dkms
|
||||
_module=daedalus_v4l2
|
||||
|
||||
# Same pin as arch/daedalus-v4l2 — keep kernel module + daemon
|
||||
# bit-versioned together so the chardev wire protocol stays in sync.
|
||||
_commit=f04d7000f858fe51d867aba14a529d3aef4fbd54
|
||||
|
||||
pkgver=0.1.0.r15.f04d700
|
||||
pkgrel=1
|
||||
pkgdesc="V4L2 stateless decoder shim kernel module (DKMS) — Pi 5 / CM5"
|
||||
arch=('any')
|
||||
url="https://git.reauktion.de/reauktion/daedalus-v4l2"
|
||||
license=('GPL-2.0-or-later')
|
||||
depends=('dkms')
|
||||
makedepends=('git')
|
||||
|
||||
source=("git+https://git.reauktion.de/reauktion/daedalus-v4l2.git#commit=${_commit}"
|
||||
"dkms.conf")
|
||||
sha256sums=('SKIP'
|
||||
'SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "${srcdir}/daedalus-v4l2"
|
||||
printf '0.1.0.r%s.%s' \
|
||||
"$(git rev-list --count HEAD)" \
|
||||
"$(git rev-parse --short=7 HEAD)"
|
||||
}
|
||||
|
||||
package() {
|
||||
local _src="${pkgdir}/usr/src/${_module}-${pkgver}"
|
||||
|
||||
install -dm755 "${_src}"
|
||||
|
||||
# Install the kernel/ subdir and embed the shared proto header in
|
||||
# the same tree. The in-tree Makefile uses
|
||||
# `ccflags-y += -I$(src)/../include` (assuming the parent
|
||||
# daedalus-v4l2 layout); for DKMS we flatten by copying the header
|
||||
# into kernel/include/ and patching the Makefile to point there.
|
||||
cp -r "${srcdir}/daedalus-v4l2/kernel/." "${_src}/"
|
||||
install -Dm644 "${srcdir}/daedalus-v4l2/include/daedalus_v4l2_proto.h" \
|
||||
"${_src}/include/daedalus_v4l2_proto.h"
|
||||
sed -i 's|-I\$(src)/\.\./include|-I$(src)/include|' "${_src}/Makefile"
|
||||
|
||||
# dkms.conf at the root of the source tree (DKMS convention).
|
||||
# Substitute #MODULE_VERSION# placeholder with the actual pkgver
|
||||
# so dkms install/uninstall match what's on disk.
|
||||
install -Dm644 "${srcdir}/dkms.conf" "${_src}/dkms.conf"
|
||||
sed -i "s/#MODULE_VERSION#/${pkgver}/" "${_src}/dkms.conf"
|
||||
|
||||
# License
|
||||
install -Dm644 "${srcdir}/daedalus-v4l2/kernel/daedalus_v4l2_main.c" \
|
||||
"${pkgdir}/usr/share/licenses/${pkgname}/SPDX-HEADER"
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
# DKMS configuration for daedalus_v4l2 — V4L2 stateless decoder shim.
|
||||
#
|
||||
# Built against /lib/modules/$kernelver/build with the in-tree Makefile.
|
||||
# The Makefile uses `obj-m := daedalus_v4l2.o` and links
|
||||
# daedalus_v4l2_main.o + daedalus_v4l2_chardev.o into the final .ko.
|
||||
|
||||
PACKAGE_NAME="daedalus_v4l2"
|
||||
PACKAGE_VERSION="#MODULE_VERSION#"
|
||||
|
||||
# Single module produced by the Makefile.
|
||||
BUILT_MODULE_NAME[0]="daedalus_v4l2"
|
||||
DEST_MODULE_LOCATION[0]="/updates"
|
||||
|
||||
# Use the package's own Makefile — it already does
|
||||
# `$(MAKE) -C $(KERNELDIR) M=$(PWD) modules`.
|
||||
MAKE[0]="make KERNELDIR=/lib/modules/${kernelver}/build all"
|
||||
CLEAN="make KERNELDIR=/lib/modules/${kernelver}/build clean"
|
||||
|
||||
AUTOINSTALL="yes"
|
||||
@@ -0,0 +1,105 @@
|
||||
# Maintainer: Markus Fritsche <fritsche.markus@gmail.com>
|
||||
#
|
||||
# daedalus-v4l2 — userspace daemon + V4L2 m2m test tools.
|
||||
#
|
||||
# Pair to daedalus-v4l2-dkms (kernel module). Together they expose
|
||||
# /dev/videoNN + /dev/mediaNN as a V4L2 stateless decoder shim on Pi 5 /
|
||||
# CM5, decoding VP9 / AV1 / H.264 via dlopen'd FFmpeg in a single-
|
||||
# threaded daemon and shipping decoded NV12 / P010 back through dmabuf.
|
||||
# Consumed end-to-end by libva-v4l2-request-fourier (>= 1.0.0.r376) so
|
||||
# `ffmpeg -hwaccel vaapi` against vp9_small.ivf produces byte-exact NV12.
|
||||
#
|
||||
# Project: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
# Sibling kernel package: daedalus-v4l2-dkms
|
||||
# Sibling consumer: libva-v4l2-request-fourier
|
||||
|
||||
pkgname=daedalus-v4l2
|
||||
_upstreampkg=daedalus-v4l2
|
||||
|
||||
# Pin the daedalus-v4l2 tip. f04d700 = "Phase 8.13: byte-exact end-to-
|
||||
# end via libva (consumer target hit)" — first commit where the full
|
||||
# ffmpeg -hwaccel vaapi → libva → /dev/video0 → daemon path lands a
|
||||
# pixel-correct decoded frame back in ffmpeg. Promote to a later pin
|
||||
# only after a future phase closes cleanly.
|
||||
_commit=f04d7000f858fe51d867aba14a529d3aef4fbd54
|
||||
|
||||
# 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.r15.f04d700
|
||||
pkgrel=1
|
||||
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"
|
||||
license=('BSD-2-Clause' 'GPL-2.0-or-later')
|
||||
# Daemon dlopens libavformat.so.61 / libavcodec.so.61 / libavutil.so.59
|
||||
# at runtime (Option γ — see daemon/src/ffmpeg_loader.h). ffmpeg
|
||||
# provides those; we don't link them.
|
||||
depends=('ffmpeg' 'libdrm')
|
||||
# Headers from libav*-dev needed at compile time for type-safe function
|
||||
# pointer signatures; pkg-config locates them.
|
||||
makedepends=('cmake' 'ninja' 'pkgconf' 'git' 'ffmpeg')
|
||||
optdepends=('daedalus-v4l2-dkms: kernel module providing /dev/video0 + /dev/daedalus-v4l2'
|
||||
'libva-v4l2-request-fourier: VA-API consumer routing through this daemon')
|
||||
|
||||
source=("git+https://git.reauktion.de/reauktion/daedalus-v4l2.git#commit=${_commit}")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "${srcdir}/${_upstreampkg}"
|
||||
printf '0.1.0.r%s.%s' \
|
||||
"$(git rev-list --count HEAD)" \
|
||||
"$(git rev-parse --short=7 HEAD)"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_upstreampkg}/daemon"
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
cmake --build build
|
||||
|
||||
cd "${srcdir}/${_upstreampkg}/tools"
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_upstreampkg}"
|
||||
|
||||
# Daemon binary
|
||||
install -Dm755 daemon/build/daedalus_v4l2_daemon \
|
||||
"${pkgdir}/usr/bin/daedalus_v4l2_daemon"
|
||||
|
||||
# Test tools (under /usr/libexec to keep them out of the default PATH
|
||||
# — they're for verification, not daily use).
|
||||
install -Dm755 tools/test_chardev_pingpong \
|
||||
"${pkgdir}/usr/libexec/daedalus-v4l2/test_chardev_pingpong"
|
||||
install -Dm755 tools/test_m2m_decode \
|
||||
"${pkgdir}/usr/libexec/daedalus-v4l2/test_m2m_decode"
|
||||
install -Dm755 tools/test_m2m_stream \
|
||||
"${pkgdir}/usr/libexec/daedalus-v4l2/test_m2m_stream"
|
||||
|
||||
# Shared wire-protocol header (kernel ↔ daemon); useful for
|
||||
# third-party clients of the chardev.
|
||||
install -Dm644 include/daedalus_v4l2_proto.h \
|
||||
"${pkgdir}/usr/include/daedalus_v4l2_proto.h"
|
||||
|
||||
# Documentation
|
||||
install -Dm644 README.md \
|
||||
"${pkgdir}/usr/share/doc/${pkgname}/README.md"
|
||||
for d in docs/*.md; do
|
||||
install -Dm644 "$d" "${pkgdir}/usr/share/doc/${pkgname}/$(basename "$d")"
|
||||
done
|
||||
|
||||
# Licenses: BSD-2-Clause for daemon/tools, GPL for the kernel proto
|
||||
# header; the SPDX headers in src/ are the canonical declaration but
|
||||
# ship a short note here for package-manager-driven license queries.
|
||||
install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
cat > "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" <<'EOF'
|
||||
daedalus-v4l2 userspace components are BSD-2-Clause licensed.
|
||||
The shared kernel↔daemon wire protocol header
|
||||
(/usr/include/daedalus_v4l2_proto.h) is GPL-2.0-or-later WITH
|
||||
Linux-syscall-note for kernel-side compatibility. See SPDX
|
||||
headers on individual source files for the canonical
|
||||
per-file declaration.
|
||||
EOF
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
From 0cd6e669735e453ec8772f111065bbb2f70a5bc6 Mon Sep 17 00:00:00 2001
|
||||
From: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Date: Mon, 18 May 2026 07:27:10 +0000
|
||||
Subject: [PATCH] avutil/hwcontext_v4l2request: unpack NV15 to P010 in
|
||||
transfer_data_from
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
V4L2_PIX_FMT_NV15 (RK3399/RK3588 rkvdec 10-bit 4:2:0 capture) is mapped to
|
||||
sw_format = AV_PIX_FMT_YUV420P10 in v4l2request_capture_pixelformats[]. The
|
||||
existing transfer_get_formats explicitly blanked the format list for that
|
||||
sw_format, so 'ffmpeg -hwaccel v4l2request -vf hwdownload,format=p010le' on
|
||||
a Hi10P / Main10 input failed at filter init with EINVAL before reaching
|
||||
the actual decode (which itself succeeds — 2 frames decoded cleanly).
|
||||
|
||||
Expose AV_PIX_FMT_P010 as the transfer target for NV15-backed surfaces and
|
||||
unpack the packed 10-bit samples into the standard high-bits-of-16 layout
|
||||
inside transfer_data_from. Luma and chroma share the same packing format
|
||||
(5 bytes per 4 samples, little endian); chroma plane is W × H/2 samples
|
||||
for 4:2:0.
|
||||
|
||||
The other 'needs custom unpack' sw_formats (YUV420P / Allwinner NV12_32L32
|
||||
tiled and YUV422P10 / rkvdec NV20) keep the original ENOSYS path because
|
||||
they need different unpack code that isn't covered by this patch.
|
||||
|
||||
Closes marfrit/marfrit-packages#21.
|
||||
---
|
||||
libavutil/hwcontext_v4l2request.c | 111 +++++++++++++++++++++++++++++-
|
||||
1 file changed, 110 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libavutil/hwcontext_v4l2request.c b/libavutil/hwcontext_v4l2request.c
|
||||
index b6633d9081..3842160dfb 100644
|
||||
--- a/libavutil/hwcontext_v4l2request.c
|
||||
+++ b/libavutil/hwcontext_v4l2request.c
|
||||
@@ -1073,6 +1073,56 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Unpack one NV15-packed 10-bit plane (5 bytes per 4 samples, little endian)
|
||||
+ * into a P010-style plane (10 bits in the high bits of a 16-bit container).
|
||||
+ * `dst_stride` is in bytes; `src_stride` is bytes per row of NV15 data.
|
||||
+ */
|
||||
+static void v4l2request_nv15_unpack_plane_to_p010(const uint8_t *src,
|
||||
+ uint16_t *dst,
|
||||
+ unsigned width,
|
||||
+ unsigned height,
|
||||
+ unsigned src_stride,
|
||||
+ unsigned dst_stride)
|
||||
+{
|
||||
+ for (unsigned y = 0; y < height; y++) {
|
||||
+ const uint8_t *s = src + y * src_stride;
|
||||
+ uint16_t *d = (uint16_t *)((uint8_t *)dst + y * dst_stride);
|
||||
+ unsigned x;
|
||||
+
|
||||
+ for (x = 0; x + 4 <= width; x += 4) {
|
||||
+ uint16_t a = (uint16_t)s[0] | ((uint16_t)(s[1] & 0x03) << 8);
|
||||
+ uint16_t b = ((uint16_t)s[1] >> 2) | ((uint16_t)(s[2] & 0x0F) << 6);
|
||||
+ uint16_t c = ((uint16_t)s[2] >> 4) | ((uint16_t)(s[3] & 0x3F) << 4);
|
||||
+ uint16_t e = ((uint16_t)s[3] >> 6) | ((uint16_t)s[4] << 2);
|
||||
+
|
||||
+ d[0] = (uint16_t)(a << 6);
|
||||
+ d[1] = (uint16_t)(b << 6);
|
||||
+ d[2] = (uint16_t)(c << 6);
|
||||
+ d[3] = (uint16_t)(e << 6);
|
||||
+
|
||||
+ d += 4;
|
||||
+ s += 5;
|
||||
+ }
|
||||
+
|
||||
+ if (x < width) {
|
||||
+ unsigned rem = width - x;
|
||||
+ uint16_t pix[4] = { 0, 0, 0, 0 };
|
||||
+
|
||||
+ pix[0] = (uint16_t)s[0] | ((uint16_t)(s[1] & 0x03) << 8);
|
||||
+ if (rem >= 2)
|
||||
+ pix[1] = ((uint16_t)s[1] >> 2) | ((uint16_t)(s[2] & 0x0F) << 6);
|
||||
+ if (rem >= 3)
|
||||
+ pix[2] = ((uint16_t)s[2] >> 4) | ((uint16_t)(s[3] & 0x3F) << 4);
|
||||
+ if (rem >= 4)
|
||||
+ pix[3] = ((uint16_t)s[3] >> 6) | ((uint16_t)s[4] << 2);
|
||||
+
|
||||
+ for (unsigned j = 0; j < rem; j++)
|
||||
+ d[j] = (uint16_t)(pix[j] << 6);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int v4l2request_transfer_get_formats(AVHWFramesContext *hwfc,
|
||||
enum AVHWFrameTransferDirection dir,
|
||||
enum AVPixelFormat **formats)
|
||||
@@ -1082,6 +1132,22 @@ static int v4l2request_transfer_get_formats(AVHWFramesContext *hwfc,
|
||||
if (dir == AV_HWFRAME_TRANSFER_DIRECTION_TO)
|
||||
return AVERROR(ENOSYS);
|
||||
|
||||
+ /*
|
||||
+ * NV15-backed surfaces (sw_format = YUV420P10) are exposed as P010 to
|
||||
+ * downstream filters: the unpack below converts the packed 10-bit
|
||||
+ * samples into the standard high-bits-of-16 layout. Hi10P / Main10
|
||||
+ * VAAPI/v4l2-request decode reaches userspace through this path.
|
||||
+ */
|
||||
+ if (hwfc->sw_format == AV_PIX_FMT_YUV420P10) {
|
||||
+ fmts = av_malloc_array(2, sizeof(*fmts));
|
||||
+ if (!fmts)
|
||||
+ return AVERROR(ENOMEM);
|
||||
+ fmts[0] = AV_PIX_FMT_P010;
|
||||
+ fmts[1] = AV_PIX_FMT_NONE;
|
||||
+ *formats = fmts;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
fmts = av_malloc_array(2, sizeof(*fmts));
|
||||
if (!fmts)
|
||||
return AVERROR(ENOMEM);
|
||||
@@ -1089,8 +1155,13 @@ static int v4l2request_transfer_get_formats(AVHWFramesContext *hwfc,
|
||||
fmts[0] = hwfc->sw_format;
|
||||
fmts[1] = AV_PIX_FMT_NONE;
|
||||
|
||||
+ /*
|
||||
+ * Tiled-NV12-32L32 (Allwinner) and NV20 (rkvdec 4:2:2 10-bit) still need
|
||||
+ * dedicated unpacks before hwdownload can consume them; leave them as
|
||||
+ * "no transfer formats" so the filter graph reports the limitation
|
||||
+ * rather than silently producing garbage.
|
||||
+ */
|
||||
if (hwfc->sw_format == AV_PIX_FMT_YUV420P ||
|
||||
- hwfc->sw_format == AV_PIX_FMT_YUV420P10 ||
|
||||
hwfc->sw_format == AV_PIX_FMT_YUV422P10)
|
||||
fmts[0] = AV_PIX_FMT_NONE;
|
||||
|
||||
@@ -1110,6 +1181,44 @@ static int v4l2request_transfer_data_from(AVHWFramesContext *hwfc,
|
||||
map = av_frame_alloc();
|
||||
if (!map)
|
||||
return AVERROR(ENOMEM);
|
||||
+
|
||||
+ /*
|
||||
+ * For NV15→P010, map the raw NV15 bytes (sw_format) and unpack into
|
||||
+ * dst's P010 storage. Otherwise fall through to the original byte-copy
|
||||
+ * path used for 1:1 sw_format matches (NV12, NV16, AFBC handled by DRM).
|
||||
+ */
|
||||
+ if (hwfc->sw_format == AV_PIX_FMT_YUV420P10) {
|
||||
+ /*
|
||||
+ * Only P010 is advertised by transfer_get_formats for this sw_format;
|
||||
+ * a caller that bypasses get_formats and asks for anything else would
|
||||
+ * silently corrupt output via av_frame_copy on NV15-packed bytes.
|
||||
+ * Reject explicitly.
|
||||
+ */
|
||||
+ if (dst->format != AV_PIX_FMT_P010) {
|
||||
+ ret = AVERROR(ENOSYS);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ map->format = hwfc->sw_format;
|
||||
+ ret = v4l2request_map_frame(hwfc, map, src);
|
||||
+ if (ret)
|
||||
+ goto fail;
|
||||
+
|
||||
+ v4l2request_nv15_unpack_plane_to_p010(map->data[0],
|
||||
+ (uint16_t *)dst->data[0],
|
||||
+ dst->width, dst->height,
|
||||
+ map->linesize[0],
|
||||
+ dst->linesize[0]);
|
||||
+ /* NV15 chroma plane is W × H/2 samples (4:2:0, UV interleaved). */
|
||||
+ v4l2request_nv15_unpack_plane_to_p010(map->data[1],
|
||||
+ (uint16_t *)dst->data[1],
|
||||
+ dst->width, dst->height / 2,
|
||||
+ map->linesize[1],
|
||||
+ dst->linesize[1]);
|
||||
+ ret = 0;
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
map->format = dst->format;
|
||||
|
||||
ret = v4l2request_map_frame(hwfc, map, src);
|
||||
--
|
||||
2.47.3
|
||||
|
||||
@@ -24,7 +24,7 @@ _srcname=FFmpeg
|
||||
_version='8.1'
|
||||
_commit='b57fbbe50c9b2656fad86a1a7eeabfd2b2a50935' # v4l2-request-n8.1 tip 2026-04-24
|
||||
pkgver=8.1.r123329.b57fbbe
|
||||
pkgrel=4
|
||||
pkgrel=5
|
||||
epoch=2
|
||||
pkgdesc='FFmpeg with V4L2 Request API hwaccel (Rockchip / Allwinner stateless decode)'
|
||||
arch=('aarch64')
|
||||
@@ -78,8 +78,9 @@ provides=(
|
||||
conflicts=(ffmpeg)
|
||||
replaces=(ffmpeg ffmpeg-v4l2-request-git)
|
||||
source=("git+https://github.com/Kwiboo/FFmpeg.git#commit=${_commit}"
|
||||
'0001-libudev-bypass-fallback.patch')
|
||||
sha256sums=('SKIP' 'SKIP')
|
||||
'0001-libudev-bypass-fallback.patch'
|
||||
'0002-nv15-to-p010-unpack.patch')
|
||||
sha256sums=('SKIP' 'SKIP' 'SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "${_srcname}"
|
||||
@@ -91,6 +92,7 @@ pkgver() {
|
||||
prepare() {
|
||||
cd "${_srcname}"
|
||||
patch -Np1 -i "${srcdir}/0001-libudev-bypass-fallback.patch"
|
||||
patch -Np1 -i "${srcdir}/0002-nv15-to-p010-unpack.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
@@ -23,20 +23,26 @@
|
||||
pkgname=libva-v4l2-request-fourier
|
||||
_upstreampkg=libva-v4l2-request
|
||||
|
||||
# Pin the fork tip. 7ac934e = "iter38b: bounds check uses MAX_PROFILES
|
||||
# (11), not MAX_CONFIG_ATTRIBUTES (10)" — fresnel-fourier campaign
|
||||
# production tip 2026-05-14, sibling iter38 added multi-device probe so
|
||||
# a single libva session serves rkvdec + hantro without requiring
|
||||
# LIBVA_V4L2_REQUEST_VIDEO_PATH overrides. Promote to a later pin only
|
||||
# after a future iteration closes cleanly.
|
||||
_commit=7ac934e0c5420814c7a5fc3e2a2f08251d590d9e
|
||||
# Pin the fork tip. de27e95 = "v4l2: log error_idx + failing ctrl id
|
||||
# on S_EXT_CTRLS failure" — Phase 8.13 diagnostic that surfaced the
|
||||
# real root cause of the libva→daedalus_v4l2 request-completion
|
||||
# timeout (turned out the EINVAL libva was logging was a harmless
|
||||
# H264/HEVC probe; actual VP9 stateless control SET worked all along).
|
||||
#
|
||||
# Prior pin (7ac934e) was iter38b — fresnel-fourier multi-device probe
|
||||
# + MAX_PROFILES bounds-check fix. de27e95 adds the daedalus_v4l2
|
||||
# probe slot (b5b3acf), the meson option gate (2146341), and the
|
||||
# S_EXT_CTRLS diagnostic (de27e95 itself). Backward-compatible on
|
||||
# rkvdec / hantro / cedrus / rpi-hevc-dec hosts — daedalus probe is
|
||||
# off by default unless the kernel module is present.
|
||||
_commit=de27e95571b67ef34619c23a12db4698f9b3454e
|
||||
|
||||
# Project version from meson.build (1.0.0) + commit count + short sha,
|
||||
# matching the ffmpeg-v4l2-request-fourier convention. Recomputed at
|
||||
# build time by pkgver() below; the static value here is a placeholder
|
||||
# so AUR-style consumers see something coherent before src/ exists.
|
||||
pkgver=1.0.0.r348.7ac934e
|
||||
pkgrel=2
|
||||
pkgver=1.0.0.r376.de27e95
|
||||
pkgrel=1
|
||||
pkgdesc="VA-API backend for V4L2 stateless decoders (multiplanar fork — fourier umbrella)"
|
||||
arch=('aarch64')
|
||||
url="https://git.reauktion.de/marfrit/libva-v4l2-request-fourier"
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
# Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
#
|
||||
# linux-ampere-fourier — CoolPi GenBook (RK3588) kernel from the
|
||||
# marfrit-iterated linux-rk3588-marfrit branch (pinned commit).
|
||||
# linux-ampere-fourier — CoolPi GenBook (RK3588) kernel built from the
|
||||
# kernel-agent fleet/ampere.yaml manifest applied to mainline v7.0-rc3.
|
||||
#
|
||||
# Baseline carries the marfrit RK3588 delta on top of mainline v7.0-rc3:
|
||||
# 10 Markus commits (board DTS + Kconfig + suspend/wakeup + bluetooth)
|
||||
# plus 8 upstream cherry-picks (Shawn Lin's pcie3 phy series, Collabora
|
||||
# clk/dts/dw-dp fixes, Sebastian Reichel's Rock 5 ITX hdmirx). The 6
|
||||
# board-relevant patches are scope-tagged in marfrit/kernel-agent under
|
||||
# patches/{soc,module,board}/ — see fleet/ampere.yaml manifest.
|
||||
# kafr2 baseline (2026-05-18): mainline v7.0-rc3 + the 10 scope-tagged
|
||||
# kernel-agent patches under patches/{soc,module,board,driver}/:
|
||||
# - 1 soc/rk3588 pwm15 pinctrl
|
||||
# - 6 board/coolpi-cm5-genbook DTS patches (pwm-fan, RK806 power-off,
|
||||
# speaker, USB-C PD, lid switch + USB3 PHY, microphone)
|
||||
# - 3 driver/media VP9-on-VDPU381 patches (Sarma's v8 series, imported
|
||||
# via marfrit/kernel-agent#12 closure and PR #24)
|
||||
#
|
||||
# Drops the prior f8f3ad9 baseline ("18 commits ahead") because that tip
|
||||
# black-screens ampere — kernel-agent's ka-promote produces this 10-patch
|
||||
# minimal set from fleet/ampere.yaml. End-to-end VP9 + AV1 (av1-vpu-dec
|
||||
# is mainline-7.0) decode verified bit-exact via kdirect on the
|
||||
# hand-built tip 48a8c78 before this package iteration was cut.
|
||||
#
|
||||
# Coexists with the user's other extlinux labels in
|
||||
# /boot/firmware/extlinux/extlinux.conf; never edits them. Adds a
|
||||
@@ -21,9 +28,9 @@
|
||||
|
||||
pkgbase=linux-ampere-fourier
|
||||
pkgname=("$pkgbase" "$pkgbase-headers")
|
||||
pkgver=7.0rc3.kafr1
|
||||
pkgver=7.0rc3.kafr2
|
||||
pkgrel=1
|
||||
pkgdesc='CoolPi GenBook kernel (linux-rk3588-marfrit @ f8f3ad9 + RK3588 cherry-picks + GenBook DTS)'
|
||||
pkgdesc='CoolPi GenBook kernel (v7.0-rc3 + kernel-agent fleet/ampere.yaml — 6 board patches + 3 VP9-VDPU381 + 1 pwm15)'
|
||||
arch=(aarch64)
|
||||
url='https://git.reauktion.de/marfrit/kernel-agent'
|
||||
license=(GPL-2.0-only)
|
||||
@@ -34,13 +41,24 @@ makedepends=(
|
||||
)
|
||||
options=('!strip')
|
||||
|
||||
# Pinned tip of marfrit/linux-rk3588-marfrit. 18 commits ahead of v7.0-rc3:
|
||||
# 10 by Markus Fritsche (board/SoC/module/Bluetooth/Kconfig)
|
||||
# 4 by Shawn Lin (phy: rockchip-snps-pcie3 stability series)
|
||||
# 2 by Cristian Ciocaltea (clk + dw-dp bridge — Collabora track)
|
||||
# 1 by Sebastian Reichel (Rock 5 ITX hdmirx — not used by ampere)
|
||||
# 1 by Pedro Alves (CLK_SET_RATE_PARENT VOP2 fix)
|
||||
_commit=f8f3ad934433bd7e1207d9b0b37e817a692b7ee9
|
||||
# Pinned tip of the kernel-agent-managed source tree for ampere.
|
||||
# 10 commits ahead of v7.0-rc3, exactly mirroring fleet/ampere.yaml's
|
||||
# manifest under apply order:
|
||||
# - c57d069 soc/rk3588: pwm15 pinctrl entries
|
||||
# - 05a915c board/genbook: pwm-fan with thermal cooling
|
||||
# - d007b90 module/coolpi-cm5: RK806 system-power-controller
|
||||
# - 3722eab board/genbook: speaker via audio-graph-card
|
||||
# - 3e42ab6 board/genbook: USB-C PD via FUSB302
|
||||
# - 7c241f2 board/genbook: lid switch + USB3 PHY lane
|
||||
# - dd545fa board/genbook: wire internal microphone
|
||||
# - 9ddcae5 driver/media: rkvdec-vp9 helper rename (Sarma)
|
||||
# - c5063d9 driver/media: rkvdec move vp9 to common (Sarma)
|
||||
# - 48a8c78 driver/media: rkvdec VP9 for VDPU381 (Sarma)
|
||||
#
|
||||
# This is the same tree state ka-promote ampere produces as cumulative.patch
|
||||
# (see marfrit/kernel-agent build/ampere/v7.0-rc3/manifest.lock for the
|
||||
# b2sum + per-patch sha256s).
|
||||
_commit=48a8c785de7f5320513052a64e544c6310d7b273
|
||||
|
||||
source=(
|
||||
# Local tarball produced by ./prebuild.sh from a local clone of the
|
||||
|
||||
@@ -19,8 +19,11 @@
|
||||
set -euo pipefail
|
||||
|
||||
TREE="${LINUX_RK3588_MARFRIT_TREE:-${HOME}/src/linux-rockchip}"
|
||||
COMMIT=f8f3ad934433bd7e1207d9b0b37e817a692b7ee9
|
||||
SHA256_EXPECTED=b4eca11e883fe6f7f306d8751c3efa3afed9cc3465c74a3320de1b7204f5f330
|
||||
COMMIT=48a8c785de7f5320513052a64e544c6310d7b273
|
||||
# Generated tarball sha varies with gzip version — script warns-not-fails.
|
||||
# Leave EXPECTED empty for fresh kafr2 builds; first successful build can
|
||||
# pin a canonical sha here if a reproducibility audit needs it.
|
||||
SHA256_EXPECTED=
|
||||
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
OUTPUT="${HERE}/linux-rk3588-marfrit-${COMMIT:0:7}.tar.gz"
|
||||
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
#!/bin/bash
|
||||
# Build daedalus-v4l2-dkms_<ver>_all.deb (kernel module via DKMS).
|
||||
#
|
||||
# Installs kernel/ source tree to /usr/src/daedalus_v4l2-${PKGVER}/
|
||||
# plus a dkms.conf. Postinst registers with DKMS (dkms add + build +
|
||||
# install). Prerm deregisters. Result: the daedalus_v4l2 module
|
||||
# auto-rebuilds against any installed kernel headers without users
|
||||
# needing to remember to dkms-add it.
|
||||
#
|
||||
# Architecture: all. The kernel module itself is per-kernel-version,
|
||||
# but the SOURCE package is arch-independent.
|
||||
#
|
||||
# Sibling Arch package: ../../arch/daedalus-v4l2-dkms/PKGBUILD
|
||||
# Sibling userspace package: ../daedalus-v4l2/build-deb.sh
|
||||
set -euo pipefail
|
||||
|
||||
UPSTREAM_COMMIT=f04d7000f858fe51d867aba14a529d3aef4fbd54
|
||||
PKGVER=0.1.0+r15+gf04d700
|
||||
PKGREL=1
|
||||
MODULE_NAME=daedalus_v4l2
|
||||
|
||||
HERE=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
# Reproducible build. 2026-05-18 23:00 UTC — Phase 8.13 close.
|
||||
export SOURCE_DATE_EPOCH=1779231600
|
||||
|
||||
work=$(mktemp -d)
|
||||
trap "rm -rf $work" EXIT
|
||||
|
||||
cd "$work"
|
||||
curl -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
|
||||
|
||||
ROOT="$work/pkgroot"
|
||||
SRCROOT="$ROOT/usr/src/${MODULE_NAME}-${PKGVER}"
|
||||
|
||||
mkdir -p "$SRCROOT/include" \
|
||||
"$ROOT/DEBIAN" \
|
||||
"$ROOT/usr/share/doc/daedalus-v4l2-dkms"
|
||||
|
||||
# Copy kernel/ source files to the DKMS source dir.
|
||||
cp -r "$work/$SRCDIR/kernel/." "$SRCROOT/"
|
||||
|
||||
# Embed the shared protocol header inline (rather than referencing
|
||||
# ../include/ which doesn't exist after DKMS extracts the tree).
|
||||
# Patch the Makefile to find it at $SRCROOT/include/ instead.
|
||||
install -m 644 "$work/$SRCDIR/include/daedalus_v4l2_proto.h" \
|
||||
"$SRCROOT/include/daedalus_v4l2_proto.h"
|
||||
sed -i 's|-I\$(src)/\.\./include|-I$(src)/include|' "$SRCROOT/Makefile"
|
||||
|
||||
# Generate dkms.conf with the actual version substituted.
|
||||
cat > "$SRCROOT/dkms.conf" <<EOF
|
||||
PACKAGE_NAME="${MODULE_NAME}"
|
||||
PACKAGE_VERSION="${PKGVER}"
|
||||
|
||||
BUILT_MODULE_NAME[0]="${MODULE_NAME}"
|
||||
DEST_MODULE_LOCATION[0]="/updates"
|
||||
|
||||
MAKE[0]="make KERNELDIR=/lib/modules/\${kernelver}/build all"
|
||||
CLEAN="make KERNELDIR=/lib/modules/\${kernelver}/build clean"
|
||||
|
||||
AUTOINSTALL="yes"
|
||||
EOF
|
||||
|
||||
# Doc
|
||||
install -m 644 "$work/$SRCDIR/README.md" \
|
||||
"$ROOT/usr/share/doc/daedalus-v4l2-dkms/README.md"
|
||||
install -Dm644 "$HERE/debian/copyright" "$ROOT/usr/share/doc/daedalus-v4l2-dkms/copyright"
|
||||
install -Dm644 "$HERE/debian/changelog" "$ROOT/usr/share/doc/daedalus-v4l2-dkms/changelog.Debian"
|
||||
gzip -9 -n "$ROOT/usr/share/doc/daedalus-v4l2-dkms/changelog.Debian"
|
||||
|
||||
# DKMS post-install / pre-remove hooks.
|
||||
cat > "$ROOT/DEBIAN/postinst" <<EOF
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
NAME=${MODULE_NAME}
|
||||
VERSION=${PKGVER}
|
||||
|
||||
if [ "\$1" = "configure" ] && command -v dkms >/dev/null 2>&1; then
|
||||
dkms add "\$NAME/\$VERSION" 2>/dev/null || true
|
||||
dkms autoinstall "\$NAME/\$VERSION" || true
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
EOF
|
||||
chmod 755 "$ROOT/DEBIAN/postinst"
|
||||
|
||||
cat > "$ROOT/DEBIAN/prerm" <<EOF
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
NAME=${MODULE_NAME}
|
||||
VERSION=${PKGVER}
|
||||
|
||||
if [ "\$1" = "remove" ] && command -v dkms >/dev/null 2>&1; then
|
||||
dkms remove "\$NAME/\$VERSION" --all || true
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
EOF
|
||||
chmod 755 "$ROOT/DEBIAN/prerm"
|
||||
|
||||
cat > "$ROOT/DEBIAN/control" <<EOF
|
||||
Package: daedalus-v4l2-dkms
|
||||
Version: ${PKGVER}-${PKGREL}
|
||||
Section: kernel
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: dkms (>= 2.1.0.0)
|
||||
Recommends: daedalus-v4l2, linux-headers-generic | linux-headers
|
||||
Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Homepage: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
Description: V4L2 stateless decoder shim kernel module (DKMS) — Pi 5 / CM5
|
||||
Out-of-tree V4L2 m2m kernel module for the daedalus-v4l2 stack on
|
||||
Raspberry Pi 5 / CM5. Registers /dev/videoNN (V4L2 stateless m2m
|
||||
decoder), /dev/mediaNN (media controller with request API), and
|
||||
/dev/daedalus-v4l2 (chardev bridge to the userspace daemon).
|
||||
.
|
||||
The actual decode happens in the userspace daemon shipped by the
|
||||
daedalus-v4l2 package — this module is just the kernel-side V4L2
|
||||
plumbing. Install both to actually serve VAAPI / V4L2 clients.
|
||||
.
|
||||
Built via DKMS against the running kernel's headers.
|
||||
EOF
|
||||
|
||||
DEB_OUT="daedalus-v4l2-dkms_${PKGVER}-${PKGREL}_all.deb"
|
||||
dpkg-deb --root-owner-group --build "$ROOT" "$HERE/$DEB_OUT"
|
||||
echo "built: $HERE/$DEB_OUT"
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
daedalus-v4l2-dkms (0.1.0+r15+gf04d700-1) bookworm trixie; urgency=medium
|
||||
|
||||
* Initial Debian DKMS packaging for the daedalus_v4l2 kernel module.
|
||||
* Pinned to f04d700 (Phase 8.13 close): kernel-side framework
|
||||
integration (V4L2 m2m, dmabuf-export, media controller, request
|
||||
API, NV12 single-plane + NV12M + P010 CAPTURE) that closes the
|
||||
libva→/dev/video0→daemon round-trip with byte-exact pixels.
|
||||
* Auto-builds via DKMS against the running kernel's headers.
|
||||
* Companion userspace package: daedalus-v4l2 (daemon + tools).
|
||||
|
||||
-- Markus Fritsche <mfritsche@reauktion.de> Mon, 18 May 2026 23:00:00 +0000
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
Source: daedalus-v4l2-dkms
|
||||
Section: kernel
|
||||
Priority: optional
|
||||
Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
|
||||
Package: daedalus-v4l2-dkms
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, dkms (>= 2.1.0.0)
|
||||
Recommends: daedalus-v4l2,
|
||||
linux-headers-generic | linux-headers
|
||||
Description: V4L2 stateless decoder shim kernel module (DKMS) — Pi 5 / CM5
|
||||
Out-of-tree V4L2 m2m kernel module for the daedalus-v4l2 stack on
|
||||
Raspberry Pi 5 / CM5. Registers /dev/videoNN (V4L2 stateless m2m
|
||||
decoder), /dev/mediaNN (media controller with request API), and
|
||||
/dev/daedalus-v4l2 (chardev bridge to the userspace daemon).
|
||||
.
|
||||
The actual decode happens in the userspace daemon shipped by the
|
||||
daedalus-v4l2 package — this module is just the kernel-side V4L2
|
||||
plumbing. Install both to actually serve VAAPI / V4L2 clients.
|
||||
.
|
||||
Built via DKMS against the running kernel's headers.
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: daedalus-v4l2
|
||||
Upstream-Contact: Markus Fritsche <fritsche.markus@gmail.com>
|
||||
Source: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
|
||||
Files: *
|
||||
Copyright: 2026 Markus Fritsche <fritsche.markus@gmail.com>
|
||||
License: GPL-2.0-or-later
|
||||
Comment:
|
||||
Kernel module (loadable into the Linux kernel) — GPL-2.0-or-later.
|
||||
The shared protocol header carries an additional Linux-syscall-note
|
||||
exception so userspace inclusion is BSD-clean.
|
||||
|
||||
License: GPL-2.0-or-later
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public
|
||||
License v2 can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
#!/bin/bash
|
||||
# Build daedalus-v4l2_<ver>_arm64.deb (userspace daemon + test tools).
|
||||
#
|
||||
# Mirrors arch/daedalus-v4l2 (Arch Linux build). The companion DKMS
|
||||
# package (debian/daedalus-v4l2-dkms) carries the kernel module
|
||||
# separately so apt/dpkg can split kernel-version-tied and userspace
|
||||
# upgrade cadence.
|
||||
#
|
||||
# Sibling Arch package: ../../arch/daedalus-v4l2/PKGBUILD
|
||||
# Sibling DKMS package: ../daedalus-v4l2-dkms/build-deb.sh
|
||||
# Upstream repo: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
set -euo pipefail
|
||||
|
||||
# Same pin as the Arch PKGBUILD. f04d700 = "Phase 8.13: byte-exact
|
||||
# end-to-end via libva (consumer target hit)" — first commit where the
|
||||
# full ffmpeg -hwaccel vaapi → libva → /dev/video0 → daemon path lands
|
||||
# a pixel-correct decoded frame back in ffmpeg.
|
||||
UPSTREAM_COMMIT=f04d7000f858fe51d867aba14a529d3aef4fbd54
|
||||
PKGVER=0.1.0+r15+gf04d700
|
||||
PKGREL=1
|
||||
|
||||
HERE=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
# Reproducible build. 2026-05-18 23:00 UTC — Phase 8.13 close.
|
||||
export SOURCE_DATE_EPOCH=1779231600
|
||||
|
||||
work=$(mktemp -d)
|
||||
trap "rm -rf $work" EXIT
|
||||
|
||||
cd "$work"
|
||||
curl -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)
|
||||
cd "$SRCDIR/daemon"
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
cmake --build build
|
||||
|
||||
# Build test tools (in-tree Makefile)
|
||||
cd "$work/$SRCDIR/tools"
|
||||
make
|
||||
|
||||
# Stage
|
||||
ROOT="$work/pkgroot"
|
||||
mkdir -p "$ROOT/DEBIAN" \
|
||||
"$ROOT/usr/bin" \
|
||||
"$ROOT/usr/libexec/daedalus-v4l2" \
|
||||
"$ROOT/usr/include" \
|
||||
"$ROOT/usr/share/doc/daedalus-v4l2"
|
||||
|
||||
install -m 755 "$work/$SRCDIR/daemon/build/daedalus_v4l2_daemon" \
|
||||
"$ROOT/usr/bin/daedalus_v4l2_daemon"
|
||||
|
||||
install -m 755 "$work/$SRCDIR/tools/test_chardev_pingpong" \
|
||||
"$ROOT/usr/libexec/daedalus-v4l2/test_chardev_pingpong"
|
||||
install -m 755 "$work/$SRCDIR/tools/test_m2m_decode" \
|
||||
"$ROOT/usr/libexec/daedalus-v4l2/test_m2m_decode"
|
||||
install -m 755 "$work/$SRCDIR/tools/test_m2m_stream" \
|
||||
"$ROOT/usr/libexec/daedalus-v4l2/test_m2m_stream"
|
||||
|
||||
install -m 644 "$work/$SRCDIR/include/daedalus_v4l2_proto.h" \
|
||||
"$ROOT/usr/include/daedalus_v4l2_proto.h"
|
||||
|
||||
install -m 644 "$work/$SRCDIR/README.md" \
|
||||
"$ROOT/usr/share/doc/daedalus-v4l2/README.md"
|
||||
for d in "$work/$SRCDIR/docs/"*.md; do
|
||||
install -m 644 "$d" "$ROOT/usr/share/doc/daedalus-v4l2/$(basename "$d")"
|
||||
done
|
||||
|
||||
install -Dm644 "$HERE/debian/copyright" "$ROOT/usr/share/doc/daedalus-v4l2/copyright"
|
||||
install -Dm644 "$HERE/debian/changelog" "$ROOT/usr/share/doc/daedalus-v4l2/changelog.Debian"
|
||||
gzip -9 -n "$ROOT/usr/share/doc/daedalus-v4l2/changelog.Debian"
|
||||
|
||||
cat > "$ROOT/DEBIAN/control" <<EOF
|
||||
Package: daedalus-v4l2
|
||||
Version: ${PKGVER}-${PKGREL}
|
||||
Section: video
|
||||
Priority: optional
|
||||
Architecture: arm64
|
||||
Depends: ffmpeg (>= 7.1), libdrm2
|
||||
Recommends: daedalus-v4l2-dkms
|
||||
Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Homepage: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
Description: Userspace daemon for the daedalus_v4l2 stateless decoder shim
|
||||
daedalus-v4l2 ships the userspace daemon that backs the daedalus_v4l2
|
||||
out-of-tree V4L2 kernel module on Raspberry Pi 5 / CM5. Together they
|
||||
expose /dev/videoNN + /dev/mediaNN as a V4L2 stateless decoder for
|
||||
VP9, AV1, and H.264 — actual decoding happens in this single-threaded
|
||||
daemon via dlopen'd FFmpeg, with decoded NV12 / P010 frames shipped
|
||||
back through dmabuf.
|
||||
.
|
||||
Consumed end-to-end by libva-v4l2-request-fourier (>= 1.0.0+r376) so
|
||||
that 'ffmpeg -hwaccel vaapi' against vp9_small.ivf produces a
|
||||
byte-exact NV12 frame.
|
||||
.
|
||||
The kernel module ships separately in daedalus-v4l2-dkms; install
|
||||
both to actually serve V4L2 clients.
|
||||
EOF
|
||||
|
||||
DEB_OUT="daedalus-v4l2_${PKGVER}-${PKGREL}_arm64.deb"
|
||||
dpkg-deb --root-owner-group --build "$ROOT" "$HERE/$DEB_OUT"
|
||||
echo "built: $HERE/$DEB_OUT"
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
daedalus-v4l2 (0.1.0+r15+gf04d700-1) bookworm trixie; urgency=medium
|
||||
|
||||
* Initial Debian packaging for the daedalus-v4l2 userspace daemon.
|
||||
* Pinned to f04d700 (Phase 8.13 close): first commit where the full
|
||||
ffmpeg -hwaccel vaapi → libva-v4l2-request-fourier → /dev/video0
|
||||
→ daemon path lands a pixel-correct decoded NV12 frame back in
|
||||
ffmpeg.
|
||||
* Codecs: VP9, AV1, H.264 (all via dlopen'd FFmpeg 7.1.3).
|
||||
* Capture formats: NV12M (2 plane), NV12 (1 plane, for libva),
|
||||
P010 (10-bit single plane).
|
||||
* Companion package: daedalus-v4l2-dkms (kernel module).
|
||||
|
||||
-- Markus Fritsche <mfritsche@reauktion.de> Mon, 18 May 2026 23:00:00 +0000
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
Source: daedalus-v4l2
|
||||
Section: video
|
||||
Priority: optional
|
||||
Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
cmake,
|
||||
ninja-build,
|
||||
pkg-config,
|
||||
libavformat-dev (>= 7.1),
|
||||
libavcodec-dev (>= 7.1),
|
||||
libavutil-dev (>= 7.1)
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
|
||||
Package: daedalus-v4l2
|
||||
Architecture: arm64
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends},
|
||||
ffmpeg (>= 7.1),
|
||||
libdrm2
|
||||
Recommends: daedalus-v4l2-dkms
|
||||
Description: Userspace daemon for the daedalus_v4l2 stateless decoder shim
|
||||
daedalus-v4l2 ships the userspace daemon that backs the daedalus_v4l2
|
||||
out-of-tree V4L2 kernel module on Raspberry Pi 5 / CM5. Together they
|
||||
expose /dev/videoNN + /dev/mediaNN as a V4L2 stateless decoder for
|
||||
VP9, AV1, and H.264 — actual decoding happens in this single-threaded
|
||||
daemon via dlopen'd FFmpeg, with decoded NV12 / P010 frames shipped
|
||||
back through dmabuf.
|
||||
.
|
||||
Consumed end-to-end by libva-v4l2-request-fourier (>= 1.0.0+r376) so
|
||||
that 'ffmpeg -hwaccel vaapi' against vp9_small.ivf produces a
|
||||
byte-exact NV12 frame.
|
||||
.
|
||||
The kernel module ships separately in daedalus-v4l2-dkms; install
|
||||
both to actually serve V4L2 clients.
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: daedalus-v4l2
|
||||
Upstream-Contact: Markus Fritsche <fritsche.markus@gmail.com>
|
||||
Source: https://git.reauktion.de/reauktion/daedalus-v4l2
|
||||
|
||||
Files: *
|
||||
Copyright: 2026 Markus Fritsche <fritsche.markus@gmail.com>
|
||||
License: BSD-2-Clause
|
||||
|
||||
Files: include/daedalus_v4l2_proto.h
|
||||
Copyright: 2026 Markus Fritsche <fritsche.markus@gmail.com>
|
||||
License: GPL-2.0-or-later WITH Linux-syscall-note
|
||||
Comment:
|
||||
Shared kernel↔daemon wire-protocol header. GPL-2.0-or-later (matches
|
||||
the kernel module that includes it) with the standard
|
||||
Linux-syscall-note exception so userspace inclusion is BSD-clean.
|
||||
|
||||
License: BSD-2-Clause
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
.
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED.
|
||||
|
||||
License: GPL-2.0-or-later
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public
|
||||
License v2 can be found in `/usr/share/common-licenses/GPL-2'.
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
# Build libva-v4l2-request-fourier_<ver>_arm64.deb.
|
||||
#
|
||||
# Compiles the libva ICD from the marfrit/libva-v4l2-request-fourier
|
||||
# tip pinned in PKGVER below. Mirrors arch/libva-v4l2-request-fourier
|
||||
# (Arch Linux build). Output is a single arm64 .deb that ships the
|
||||
# VA-API driver as /usr/lib/aarch64-linux-gnu/dri/v4l2_request_drv_video.so.
|
||||
#
|
||||
# Sibling Arch package: ../../arch/libva-v4l2-request-fourier/PKGBUILD
|
||||
# Upstream fork: https://git.reauktion.de/marfrit/libva-v4l2-request-fourier
|
||||
set -euo pipefail
|
||||
|
||||
# Same pin as the Arch PKGBUILD. de27e95 = "v4l2: log error_idx +
|
||||
# failing ctrl id on S_EXT_CTRLS failure" (Phase 8.13 diagnostic).
|
||||
UPSTREAM_COMMIT=de27e95571b67ef34619c23a12db4698f9b3454e
|
||||
PKGVER=1.0.0+r376+gde27e95
|
||||
PKGREL=1
|
||||
|
||||
HERE=$(dirname "$(readlink -f "$0")")
|
||||
|
||||
# Reproducible build. 2026-05-18 23:00 UTC — Phase 8.13 close.
|
||||
export SOURCE_DATE_EPOCH=1779231600
|
||||
|
||||
work=$(mktemp -d)
|
||||
trap "rm -rf $work" EXIT
|
||||
|
||||
cd "$work"
|
||||
curl -sSLfo libva-fourier.tar.gz \
|
||||
"https://git.reauktion.de/marfrit/libva-v4l2-request-fourier/archive/${UPSTREAM_COMMIT}.tar.gz"
|
||||
tar xzf libva-fourier.tar.gz
|
||||
SRCDIR=$(echo libva-v4l2-request-fourier)
|
||||
|
||||
cd "$SRCDIR"
|
||||
meson setup build \
|
||||
--buildtype=release \
|
||||
--prefix=/usr \
|
||||
--libdir=lib/aarch64-linux-gnu \
|
||||
-Db_lto=false
|
||||
meson compile -C build
|
||||
|
||||
ROOT="$work/pkgroot"
|
||||
DESTDIR="$ROOT" meson install -C build
|
||||
|
||||
# Strip any non-package debug, then drop dependencies + control.
|
||||
install -Dm644 "$HERE/debian/copyright" "$ROOT/usr/share/doc/libva-v4l2-request-fourier/copyright"
|
||||
install -Dm644 "$HERE/debian/changelog" "$ROOT/usr/share/doc/libva-v4l2-request-fourier/changelog.Debian"
|
||||
gzip -9 -n "$ROOT/usr/share/doc/libva-v4l2-request-fourier/changelog.Debian"
|
||||
|
||||
mkdir -p "$ROOT/DEBIAN"
|
||||
cat > "$ROOT/DEBIAN/control" <<EOF
|
||||
Package: libva-v4l2-request-fourier
|
||||
Version: ${PKGVER}-${PKGREL}
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Architecture: arm64
|
||||
Depends: libva2, libdrm2
|
||||
Conflicts: libva-v4l2-request
|
||||
Replaces: libva-v4l2-request
|
||||
Provides: libva-driver, libva-v4l2-request (= ${PKGVER}-${PKGREL})
|
||||
Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Homepage: https://git.reauktion.de/marfrit/libva-v4l2-request-fourier
|
||||
Description: VA-API backend for V4L2 stateless decoders (fourier fork)
|
||||
LibVA implementation for the Linux Video4Linux2 Request API, multiplanar
|
||||
fork of bootlin/libva-v4l2-request. Drives rkvdec / hantro / cedrus /
|
||||
rpi-hevc-dec / daedalus_v4l2 stateless decoders for H.264, HEVC, VP8,
|
||||
VP9, AV1, and MPEG-2.
|
||||
.
|
||||
Auto-detected by VAAPI consumers (ffmpeg -hwaccel vaapi, mpv --hwdec=vaapi,
|
||||
Firefox VAAPI accel) when LIBVA_DRIVER_NAME=v4l2_request is set.
|
||||
EOF
|
||||
|
||||
DEB_OUT="libva-v4l2-request-fourier_${PKGVER}-${PKGREL}_arm64.deb"
|
||||
dpkg-deb --root-owner-group --build "$ROOT" "$HERE/$DEB_OUT"
|
||||
echo "built: $HERE/$DEB_OUT"
|
||||
@@ -0,0 +1,15 @@
|
||||
libva-v4l2-request-fourier (1.0.0+r376+gde27e95-1) bookworm trixie; urgency=medium
|
||||
|
||||
* Initial Debian packaging (sibling to existing
|
||||
arch/libva-v4l2-request-fourier).
|
||||
* Pinned to fork tip de27e95: "v4l2: log error_idx + failing ctrl id
|
||||
on S_EXT_CTRLS failure" — Phase 8.13 diagnostic that surfaced the
|
||||
real root cause of the libva→daedalus_v4l2 request-completion
|
||||
timeout.
|
||||
* Includes daedalus_v4l2 probe slot (b5b3acf) and meson option gate
|
||||
(2146341) for the Pi 5 daemon-backed decoder shim.
|
||||
* Backward-compatible on rkvdec / hantro / cedrus / rpi-hevc-dec
|
||||
hosts — daedalus probe is off by default unless the kernel module
|
||||
is present.
|
||||
|
||||
-- Markus Fritsche <mfritsche@reauktion.de> Mon, 18 May 2026 23:00:00 +0000
|
||||
@@ -0,0 +1,27 @@
|
||||
Source: libva-v4l2-request-fourier
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
||||
Build-Depends: debhelper-compat (= 13),
|
||||
libva-dev,
|
||||
libdrm-dev,
|
||||
meson (>= 0.43),
|
||||
ninja-build,
|
||||
pkg-config
|
||||
Standards-Version: 4.6.2
|
||||
Homepage: https://git.reauktion.de/marfrit/libva-v4l2-request-fourier
|
||||
|
||||
Package: libva-v4l2-request-fourier
|
||||
Architecture: arm64
|
||||
Depends: ${misc:Depends}, ${shlibs:Depends}, libva2, libdrm2
|
||||
Conflicts: libva-v4l2-request
|
||||
Replaces: libva-v4l2-request
|
||||
Provides: libva-driver, libva-v4l2-request (= ${binary:Version})
|
||||
Description: VA-API backend for V4L2 stateless decoders (fourier fork)
|
||||
LibVA implementation for the Linux Video4Linux2 Request API, multiplanar
|
||||
fork of bootlin/libva-v4l2-request. Drives rkvdec / hantro / cedrus /
|
||||
rpi-hevc-dec / daedalus_v4l2 stateless decoders for H.264, HEVC, VP8,
|
||||
VP9, AV1, and MPEG-2.
|
||||
.
|
||||
Auto-detected by VAAPI consumers (ffmpeg -hwaccel vaapi, mpv --hwdec=vaapi,
|
||||
Firefox VAAPI accel) when LIBVA_DRIVER_NAME=v4l2_request is set.
|
||||
@@ -0,0 +1,38 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: libva-v4l2-request-fourier
|
||||
Upstream-Contact: Markus Fritsche <fritsche.markus@gmail.com>
|
||||
Source: https://git.reauktion.de/marfrit/libva-v4l2-request-fourier
|
||||
Comment:
|
||||
Fork of bootlin/libva-v4l2-request with multi-codec / multi-device
|
||||
enhancements for the fourier campaign (RK3399 / RK3588 / RK3566 / BCM2712).
|
||||
Per-file SPDX headers are the canonical declaration; this summary
|
||||
covers the aggregate.
|
||||
|
||||
Files: *
|
||||
Copyright: 2018 Paul Kocialkowski <paul.kocialkowski@bootlin.com>
|
||||
2018-2026 The libva-v4l2-request authors
|
||||
2024-2026 Markus Fritsche <fritsche.markus@gmail.com>
|
||||
License: LGPL-2.1+ or MIT
|
||||
|
||||
License: LGPL-2.1+
|
||||
This package is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU Lesser General
|
||||
Public License v2.1 can be found in `/usr/share/common-licenses/LGPL-2.1'.
|
||||
|
||||
License: MIT
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject
|
||||
to the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
||||
Reference in New Issue
Block a user