Iteration 1 of the campaign 8(+1)-phase loop opens following the
campaign Phase 0 close (b74551b). Per the suggested order in
phase0_evidence/2026-05-07/cross_validator_traces.md, iter1 attacks
MPEG-2 — the cheapest fix in the codec status sweep (mpeg2.c is
already compiled, src/config.c has the case statements, but
vaCreateConfig returns 12 / UNSUPPORTED_PROFILE).
Locked research question:
Make MPEG-2 the second codec to pass boolean-correctness on
fresnel via the libva-v4l2-request-fourier path —
mpv --hwdec=vaapi-copy bbb_720p10s_mpeg2.ts engages the backend
cleanly and DMA-BUF GL import yields HW pixels byte-identical
to a software-decoded reference for the same frames.
Phase 1 success criterion (5 boolean checks, all must be green):
1. vainfo: VAProfileMPEG2Simple + VAProfileMPEG2Main still
enumerated on the hantro env binding (regression check).
2. vaCreateConfig(VAProfileMPEG2Main, VLD): VA_STATUS_SUCCESS.
3. mpv --hwdec=vaapi-copy --frames=2 --vo=null on
bbb_720p10s_mpeg2.ts: engages backend, exit 0, no
"Failed to create decode configuration" lines.
4. mpv --hwdec=vaapi --vo=image (DMA-BUF GL import) at +02s
seek: 2 distinct frames hash-equal to SW reference frames
and hash-differ from each other.
5. T4 H.264 regression: re-run T4 incantation, hashes match
f623d5f7... and 7d7bc6f2... reference values.
Mechanism the question targets:
The kernel + driver path is solid (cross_validator_traces.md —
ffmpeg-v4l2request decodes the same fixture exit 0). vaCreateConfig
rejection must be downstream of src/config.c:64-65's case match
(both VAProfileMPEG2Simple and VAProfileMPEG2Main are present in
the validation switch) but upstream of return-success. Plausible
suspects for Phase 2 source-read:
- V4L2 capability probe (e.g., VIDIOC_TRY_FMT against MG2S) that
fails because the libva backend was bound to /dev/video5 but
is checking format against the wrong codec list.
- Device-discovery routing reaches a default-reject because
bound device didn't match an expected codec-to-device map.
- media_request allocation step fails on /dev/media2 for some
MPEG-2-specific reason.
- iter6/iter7 regression in the dispatch-by-profile path that
broke MPEG-2 silently because nobody on libva-multiplanar
tested it (iter5 close: "MPEG-2 was iter1 backlog, dropped
at iter6 close because A55 CPU handles it fine" — fresnel
runs A53 so the disposition doesn't transfer).
Phase 4 plan must cite the contract before patching, per
feedback_dev_process.md Phase 6 contract-before-code: read kernel
drivers/media/platform/verisilicon/hantro_mpeg2.c, read FFmpeg
downstream libavcodec/v4l2_request_mpeg2.c, state the MPEG-2
control-submission contract explicitly before any code lands.
Predecessor carry-over (state vs data) explicit per
feedback_dev_process.md Phase 0 + feedback_replicate_baseline_first.md:
Carries forward (re-verified in campaign Phase 0):
- iter8 master fork (65969da) installed on fresnel,
vainfo enumeration confirmed
- bbb_720p10s_mpeg2.ts fixture (5.3 MB, MPEG-2 Main, 720p,
10s, MPEG-TS) on fresnel ~/fourier-test/, provenance
documented in test_fixtures.md
- hantro-vpu-dec /dev/video5 + /dev/media2 binding
- Cross-validator anchor: ffmpeg-v4l2request mpeg2 trace
captured (5 S_EXT_CTRLS, 4 REQUEST_ALLOC, 4 DMA_BUF_SYNC)
- T4 reference hashes for H.264 regression check
Does NOT carry forward (re-acquire if needed):
- ohm/RK3568 hantro MPEG-2 behaviour — different kernel
driver variant inside drivers/media/platform/verisilicon/
- Pre-iter6 libva-multiplanar MPEG-2 trace data (untested
at iter6 close)
Open questions inherited:
- Cache-stale vaDeriveImage bug class on RK3399 (T4) —
iter1 uses DMA-BUF GL import for verify; Phase 4 cross-
cutting fix is not iter1-scoped
- Architectural divergence ffmpeg vs our backend (EXPBUF +
DMA_BUF_SYNC vs cap_pool + vaDeriveImage) — Phase 4
design decision, not iter1-blocking
Out-of-scope (LOCKED): HEVC/VP9/VP8 (later iterations); vaDerive
Image cache-stale fix (Phase 4 cross-cutting); chromium-fourier
149 install (Phase 0 follow-up to iter1 substrate, non-gating);
performance metrics (Phase 1+ separate iteration); long-duration
stress (>10s); other MPEG-2 containers beyond MPEG-TS;
upstream engagement.
Iter1 Phase 2 source-read targets:
- src/config.c::RequestCreateConfig (rejection site)
- src/picture.c MPEG-2 dispatch path
- src/mpeg2.c set-controls path
- kernel drivers/media/platform/verisilicon/hantro_mpeg2.c
- FFmpeg downstream libavcodec/v4l2_request_mpeg2.c
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fresnel-fourier
TL;DR
Peer campaign to libva-multiplanar, targeting fresnel (Pinebook Pro / Rockchip RK3399) instead of ohm (PineTab2 / RK3566). Same deliverable shape — make libva-v4l2-request-fourier work end-to-end, for production VA-API consumers — but on a different SoC with a different (and broader) V4L2 decoder surface.
The libva backend fork itself (libva-v4l2-request-fourier) is shared: it lives at ../libva-multiplanar/libva-v4l2-request-fourier/. This campaign does not nest a second copy. Code-side work that turns out to be RK3399-specific lands either as #ifdef/runtime-detected paths inside that fork's master or, if scope diverges sharply, on a feature branch — Phase 2 source-read of each iteration decides.
Origin
libva-multiplanar reached iter5-close on 2026-05-05 with the ohm path solid: hantro (rk3568-vpu DT compatible) decodes H.264 to NV12 dmabufs end-to-end, three iterations of bugs fixed, mpv --hwdec=vaapi smooth, firefox-fourier RDD-sandboxed Firefox engages the backend without MOZ_DISABLE_RDD_SANDBOX=1, chromium-fourier 149 confirmed as the regression-check consumer.
That campaign's README explicitly names fresnel (RK3399) and ampere/boltzmann (RK3588) as "future iterations after ohm path is solid" (libva-multiplanar/README.md:87). fresnel-fourier is the formal peer campaign for the RK3399 leg of that promise.
Topology choice (LOCKED 2026-05-07): peer campaign, not child of libva-multiplanar. Each runs its own 8(+1) phase loop. Cross-link only — fresnel-fourier results do not gate libva-multiplanar's Phase 8 close (which already happened iteration-by-iteration on ohm).
Hardware target
fresnel — Pinebook Pro laptop. See reference_fresnel_kernel_constraints.md for the custom-OC-kernel discipline (don't let pacman -Syu clobber the OC DTB) and project_fresnel.md for fleet placement.
| Property | Value |
|---|---|
| SoC | Rockchip RK3399 (2× Cortex-A72 + 4× Cortex-A53) |
| GPU | Mali-T860 MP4 (Midgard, panfrost) |
| Decoder block 1 | rkvdec (/dev/video3) — H.264 + HEVC + VP9 |
| Decoder block 2 | hantro-vpu-dec (rk3399-vpu-dec, /dev/video5) — MPEG-2 + VP8 (RK3399 hantro does not advertise H.264; corrected 2026-05-07 from empirical V4L2 enumeration — see phase0_evidence/2026-05-07/v4l2_inventory_findings.md) |
| Encoder block | hantro-vpu-enc (/dev/video4) — JPEG only |
| OS | EndeavourOS-ARM (Arch derivative; same pacman + marfrit-packages mechanism as ohm) |
| Kernel | linux-eos-arm 6.19.9-99 — CONFIG_FTRACE=y, CONFIG_FUNCTION_TRACER=y, CONFIG_DYNAMIC_FTRACE=y, CONFIG_TRACING=y verified 2026-05-07. No rebuild needed for trace work. |
The decode-side surface area is genuinely broader than ohm. ohm has hantro (H.264 + MPEG-2 + VP8) and an rkvdec block whose mainline rkvdec2/vdpu346 driver isn't merged. fresnel has hantro (MPEG-2 + VP8 only — empirical, see correction note in the table above) plus a fully-driven mainline rkvdec covering H.264 + HEVC + VP9. So this campaign exercises codecs (HEVC, VP9) the libva-v4l2-request-fourier fork has never run on real hardware to date, and there is exactly one decoder bind for H.264 (rkvdec) — no two-block routing decision.
GPU side: panfrost on Mali-T860 (Midgard) is a different generation than ohm's Mali-G52 (Bifrost). KWin / Mesa / panfrost stack regressions or wins on T860 are not assumed to track G52 — the kwin-fourier verdict from fourier_attribution doesn't transfer for free.
Scope (LOCKED 2026-05-07 in phase0_findings.md)
In scope:
- libva-v4l2-request-fourier backend exercised on fresnel V4L2 decode nodes (
rkvdec+hantro-vpu-dec). - Codecs: everything decode-capable — H.264 + HEVC + VP9 (via rkvdec) + MPEG-2 + VP8 (via hantro-vpu-dec). This is the explicit broadening from libva-multiplanar's H.264-first locked scope.
- Test consumers:
vainfo,mpv --hwdec=vaapi, Firefox viamedia.ffmpeg.vaapi.enabled, chromium-fourier 149 (regression check). - Phase 1 success criterion (matching libva-multiplanar): boolean correctness — "libva accepted + providing access to hardware decoder for each codec." Performance metrics deferred.
- Phase 0 task 1: recover fresnel from the SDDM greeter crash-loop (per
~/.claude/plans/dynamic-forging-piglet.md). Recovery is bookkept as substrate work inside this campaign, not as a separate prereq.
Out of scope:
- Front-end libva (API library). Backend only.
- Other hardware (ohm + ampere/boltzmann are libva-multiplanar's iterations).
- AV1 (no decoder block on RK3399 supports it).
- Performance metrics — fresnel CPU/GPU benchmarking is a separate iteration after correctness lands.
cros-codecsRust replacement (peruser_stance_rust.md).- Bootlin / Collabora upstreaming default-deferred (per
feedback_no_upstream.md). Same discipline as libva-multiplanar. - KWin / panfrost / Mali-T860 work — orthogonal until proven otherwise; a parallel
kwin-fourier-fresnelcampaign would be a separate decision.
Process
8(+1) phase loop per feedback_dev_process.md. Phase 0 substrate is in phase0_findings.md. Phase 5 review uses the sonnet-architect subagent pattern (Plan with model: sonnet).
In-session-acquired data discipline per feedback_replicate_baseline_first.md: libva-multiplanar's ohm-side measurements are reference history, not threshold sources for fresnel-fourier cells.
Predecessor work this campaign builds on
../libva-multiplanar/— five closed iterations on ohm. Read in order:README.md— current state, codec scope, file map.phase8_iteration5_close.md— most recent close. The iter5-end backend is the substrate fresnel-fourier starts from.phase0_findings.md(andphase0_findings_iter[2-5].md) — locked-scope precedent for codec breadth and consumer matrix on ohm; useful frame-of-reference when locking fresnel-side scope.phase8_iteration1_close.md— iter1 surface-export DMA-BUF lifecycle race + multi-resolution cache + 64-pitch alignment bugs. Likely re-surface candidates on RK3399.
../libva-multiplanar/libva-v4l2-request-fourier/— the fork itself. 12 commits ahead of bootlin tip plus iter1..iter5 work.git logfor the actual landing record.~/.claude/plans/dynamic-forging-piglet.md— fresnel SDDM greeter crash diagnosis + recovery plan. Phase 0 task 1 picks up from here.~/src/fourier_attribution/— ohm-only attribution matrix. The chromium-fourier WHEAT-but-fragile verdict and Cell E (vanilla Chromium 149 control) item are ohm-side context, not fresnel data.
External reference (carry-over from libva-multiplanar):
- Mozilla bug 1833354 / 1965646 (Firefox HW decode on RK35xx via libva-v4l2-request).
- Bootlin upstream
bootlin/libva-v4l2-request— dormant since 2021. - Linux kernel
drivers/staging/media/rkvdec/— RK3399 rkvdec H.264/HEVC/VP9 control protocol reference. - Linux kernel
drivers/media/platform/verisilicon/hantro_*— RK3399-vpu-dec MPEG-2/H.264/VP8 control protocol reference.
Repository layout
~/src/fresnel-fourier/ <- this campaign (its own git repo)
├── README.md <- this file
├── phase0_findings.md <- locked research question + Phase 0 work list
├── (worklist.md, phase[2-8]*.md as phases land)
└── (the libva fork is NOT here — see ../libva-multiplanar/libva-v4l2-request-fourier/)
The campaign repo and the fork repo stay separate. fresnel-fourier commits its findings here; code changes to the backend land on the fork's master (or a branch named per the iteration if scope diverges from libva-multiplanar's ohm-side master).
Operator-facing repo URL: git.reauktion.de/marfrit/fresnel-fourier — created empty during scaffolding, no push until first iteration finds something worth publishing.
Non-upstreaming default
Inherited from libva-multiplanar / feedback_no_upstream.md. Patches must be aligned to upstream in syntax and semantics; PR/MR/bug-report only on explicit operator instruction.
Build infrastructure
distcc/cross-build path is the existing fleet: aarch64crosscompiler LXD on data, tesla LXD on hertz, dcc1 on dcw3. See reference_distcc_kernel_builds.md for invocation. Per the locked Phase 0 answer for libva-multiplanar (item 9), no distcc for libva builds — libva is small and links fast, hand-build on fresnel directly. Same default applies here unless a specific reason emerges.
For chromium-fourier 149 / firefox-fourier rebuilds against fresnel-side findings, the boltzmann LXD container path from libva-multiplanar iter3 is reusable.