claude-noether 05b4bd56ec iter2 Phase 7: verification — all 5 criteria GREEN, third codec PASS
Phase 7 verification of iter2 HEVC fix executed against fork tip
8d71e20 (libva-v4l2-request-fourier master = post-iter2-Commit-B).
Verbatim raw output captured to phase0_evidence/2026-05-08/
iter2_phase7/. All five Phase 1 criteria green; bonus byte-compare
confirms structural match against Baseline B with two minor field-
value divergences (informational SPS fields VAAPI doesn't expose;
non-blocking per Criterion 4 byte-identical pixel pass).

Phase 1 → Phase 7 scoreboard:

  Criterion 1 (vainfo VAProfileHEVCMain enum):                  PASS
    rkvdec bind: H.264 (5 profiles) + HEVCMain — same as Baseline.

  Criterion 2 (vaCreateConfig SUCCESS for HEVCMain):            PASS
    Pre-iter2: VA_STATUS_ERROR_UNSUPPORTED_PROFILE (12)
    Post-iter2: VA_STATUS_SUCCESS (verified verbatim libva trace)

  Criterion 3 (ffmpeg-direct HEVC engages backend, exit 0):     PASS
    5 frames decoded clean, cap_pool_init: 24 slots ready,
    no Failed-to-create lines, no S_EXT_CTRLS EINVAL.

  Criterion 4 (DMA-BUF GL HEVC HW=SW byte-identical at +02s):   PASS
    HW frame 1: 47a5f3850df5d8c732767a227830c2272ff78402a7b6adeea329e29838808be5
    SW frame 1: 47a5f3850df5d8c732767a227830c2272ff78402a7b6adeea329e29838808be5
    HW frame 2: a467b3bc9d7b6374b6786ecfac46932d6c7bb932ab11d311edaa233d7863e656
    SW frame 2: a467b3bc9d7b6374b6786ecfac46932d6c7bb932ab11d311edaa233d7863e656
    Frames 1 vs 2 hash-differ (real motion).

  Criterion 5 (iter1 MPEG-2 + T4 H.264 reference hashes):       PASS
    H.264 +30s HW1: f623d5f7a41697f67dd227275c6f1b21ffc257f65626d32fde8229357f8764c9 (T4 ref MATCH)
    H.264 +30s HW2: 7d7bc6f2146dda8b2d223bba622c4b9fbe9674181ff1e02afe286b620342e0a8 (T4 ref MATCH)
    MPEG-2 +02s HW1: 6e7873030dbf0403c67f35dd106ebef3c7909a0fd12433b82ad758e7fee9f092 (iter1 ref MATCH)
    MPEG-2 +02s HW2: ccc7ce08810d4a96e9ba7a19f4f95bbf6cc861bda9337604b5c668ad52bef7de (iter1 ref MATCH)

Bonus byte-compare against Phase 3 Baseline B verbatim:

  count=5, ctrl_class=V4L2_CTRL_CLASS_CODEC_STATELESS=0xf010000:
    SPS            id=0xa40a90 size=40   (matches Baseline B)
    PPS            id=0xa40a91 size=64   (matches)
    SLICE_PARAMS   id=0xa40a92 size=280  (1 slice × sizeof(slice_params))
    SCALING_MATRIX id=0xa40a93 size=1000 (matches sizeof(scaling_matrix);
                                          Phase 4 plan typo'\''d 1296 — actual
                                          struct sums to 1000 = 96+384+384+
                                          128+6+2)
    DECODE_PARAMS  id=0xa40a94 size=328  (matches)
    All return = 0 (kernel accepts every batched call).

  SPS field-value divergences vs Baseline B (FFmpeg-v4l2request):
    sps_max_num_reorder_pics:    post-fix=0  baseline=2   DIVERGE
    sps_max_latency_increase_plus1: post-fix=0  baseline=4 DIVERGE
    All other SPS fields match (pic_width=1280, pic_height=720,
    bit_depth=0, flags=0x180=SAO|STRONG_INTRA_SMOOTHING).

  PPS flags also diverge slightly (bit 12 ENTROPY_CODING_SYNC_ENABLED:
  post-fix unset, baseline set). Other PPS fields match.

  Cause: VAAPI'\''s VAPictureParameterBufferHEVC doesn'\''t expose
  sps_max_num_reorder_pics, sps_max_latency_increase_plus1, or
  always-truthful entropy_coding_sync. FFmpeg parses these from
  bitstream directly. Operational impact NIL (Criterion 4 byte-
  identical pixel pass — kernel decoded correctly with these fields
  defaulted to 0). Phase 8 polish backlog candidate (low priority):
  add SPS bitstream parsing to extract these fields when VAAPI
  doesn'\''t supply them.

Phase 7 → Phase 8: clean transition, no loopback.

Notable Phase 7 observations for Phase 8 memory:

  1. Phase 5 review value confirmed: 3 Critical findings (C1
     data_byte_offset rename, C2 dpb.rps→index-arrays semantics,
     C3 pic_order_cnt_val rename) caught at Phase 5 — prevented
     Phase 6 compile failures + at least 1-2 Phase 7→Phase 4
     loopback cycles. Per memory feedback_review_empirical_over_
     theoretical.md: every Critical/Should-fix verified
     empirically before responding. Lesson held.

  2. One Phase 5 amendment was empirically wrong: S1 suggested
     uniform_spacing_flag exists in VAAPI; gcc test-compile rejected.
     Both PPS bits 19+20 left zero (VAAPI exposes neither).
     Documented inline. Lesson: even reviewer-cited field mappings
     warrant empirical verification.

  3. Phase 4 plan typo: claimed sizeof(scaling_matrix) = 1296;
     empirical size is 1000. Code uses sizeof() so produces correct
     bytes. Plan body amendment-by-side-channel; not blocking.

  4. VAAPI↔V4L2 field-fidelity gaps surfaced: 2 SPS fields +
     possibly 1 PPS bit not exposed by VAAPI. Operational nil;
     Phase 8 polish-backlog candidate.

  5. mpv --hwdec=vaapi engages HEVC cleanly (no MPEG-2-style
     filtering). Confirms Phase 5 Q3 — VAPictureParameterBufferType
     sent per-frame for HEVC; latent B3 bug masked same as MPEG-2.

  6. BBB HEVC fixture is 1 slice per frame (slice_params size=280
     = 1 × sizeof). Multi-slice path in iter2 is coded but
     untested by binding cell.

Campaign scoreboard: 2/5 → 3/5 codecs passing
(H.264 in T4, MPEG-2 in iter1, HEVC in iter2). iter2 advances
to Phase 8.

Refs:
  ../libva-v4l2-request-fourier@8d71e20 (the fork tip verified)
  phase4_iter2_plan.md (10 contract clauses; SCALING_MATRIX size
                        typo noted)
  phase5_iter2_review.md (3 Critical + 4 Should-fix amendments
                          all incorporated; S1 partially empirically
                          incorrect — VAAPI doesn'\''t expose
                          uniform_spacing_flag)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 14:52:10 +00:00

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-99CONFIG_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 via media.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-codecs Rust replacement (per user_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-fresnel campaign 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 (and phase0_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 log for 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.

S
Description
libva-v4l2-request-fourier peer campaign for fresnel (Pinebook Pro / RK3399).
Readme 48 MiB
Languages
Shell 100%