Commit Graph

8 Commits

Author SHA1 Message Date
marfrit 0bd4222a36 iter1 phase6: implementation (file 3 follow-ups, close ka#6, write close artifact)
Phase 6 atoms executed:
  1. Refined C4 to per-codec SSIM floors — documented in iter1_close.md.
  2. Filed kernel-agent #11 [ka:experiment]: HEVC rkvdec_hevc_prepare_hw_st_rps
     __pi_memcmp fault, m2m wedge. Includes dmesg trace + reproducer +
     fresnel cross-check (RK3399 doesn't trip).
  3. Filed kernel-agent #12 [ka:experiment]: VP9 enablement on RK3588
     rkvdec via VDPU381/383 variant_ops. References memory
     feedback_rkvdec_patch_reachability for path boundary.
  4. Filed libva-v4l2-request-fourier #2: iter39 third-fd auto-probe
     for RK3588 av1-vpu-dec. Pure backend, no kernel.
  5. Updated kernel-agent #6 with per-iter1 outcome comment, closed
     with cross-refs to #11, #12, libva-v4l2-request-fourier#2.

iter1_close.md applies the two Phase 5 framing amendments:
  - H.264 SSIM 0.6676 reframed as 'independent RK3588 empirical
    observation; converges with fresnel 0.6431 but neither is the
    other's reference anchor'
  - C7 reframed as 'out of iter1 scope (headless by design)' not
    'rig blocker'

Carries-forward / does-not-carry state explicit for iter2/3/4 entry.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 07:27:37 +00:00
marfrit ad913dc14b iter1 phase5: second-model review (Plan/sonnet)
Plan subagent with model:sonnet reviewed Phase 0-4 with raw artifacts
(no curation per dev process). Two findings:

1. H.264 SSIM precedent framing — "mirrors fresnel iter1 exactly"
   overstates the cross-host link. Two independent empirical data
   points on two different rkvdec generations (RK3399 0.6431 vs
   RK3588 0.6676) that converge, not a cross-verified anchor.
   Reframe in iter1_close.md.

2. C7 deferral framing — "rig blocker" misframes a deliberate
   scope boundary (headless-ssh by design) as a rig deficit.
   Reframe in iter1_close.md.

Both findings are pure framing changes (no code/data/struct claim),
so no test-verify gate. Per empirical-over-theoretical guardrail,
adoption is direct.

Reviewer also confirmed the codec fragmentation rationale and
kernel-agent-vs-backend issue assignment as correct (no cross-codec
coupling problem).

Plan sound, proceed to Phase 6 with the two amendments applied.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 07:26:30 +00:00
marfrit 73726112e7 iter1 phase4: plan (refine C4, file 3 follow-up issues, close iter1)
iter1 is a characterize-and-baseline iteration. Backend code is
unchanged; what Phase 6 executes is criterion refinement +
follow-up-issue filing + iteration close artifact.

5 work items for Phase 6:
1. Refine C4 to per-codec SSIM Y floors (VP8 >=1.000 byte-identical,
   MPEG-2 >=0.9997 IEEE-1180, H.264 documented at ~0.667 no PASS
   threshold — accepted decoder drift per fresnel iter1 precedent).
2. File kernel-agent [ka:experiment] for HEVC kernel OOPS fix.
3. File kernel-agent [ka:experiment] for VP9 enablement on RK3588
   rkvdec (VDPU381/383 path, not RK3399 legacy).
4. File marfrit/libva-v4l2-request-fourier issue for iter39 (3rd-fd
   probe for AV1).
5. Update + close kernel-agent #6, write iter1_close.md.

Phase 7 verification: re-run p3_*.sh at N=1; predict within ±2σ of
Phase 3 anchors. Loopback if deviation.

Risk register: gitea API filing low risk (claude-noether proven
today), other risks small. Documented in plan.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 07:24:54 +00:00
marfrit 6aef03df8d iter1 phase3: archive helper scripts used during baseline measurement
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 07:24:25 +00:00
marfrit b5fdb5e854 iter1 phase3: baseline measurements
C1-C6 measured for all 3 in-scope codecs on ampere RK3588 with the
hand-built libva backend over a clean v7.0-rc3 + ampere DTS kernel.

C1 (decode completes): PASS all 3 — 30-frame decodes produce
   41 472 000 B NV12 exactly (30 × 1280 × 720 × 1.5).
C2 (HW engagement via strace ioctl trace): PASS all 3 —
   VIDIOC_S_EXT_CTRLS + VIDIOC_QBUF/DQBUF + MEDIA_REQUEST_IOC_QUEUE
   counts unambiguous. lsof poll lost race (script bug; non-fatal).
C3 (frame 0 byte-identical vs SW reference): PASS all 3 — same SHA
   3214803d8be74416 across codecs (same source I-frame, both SW
   and HW agree).
C4 (frame 720 / t=30s SSIM Y >= 0.99): split —
   VP8 SSIM 1.000 (byte-identical), MPEG-2 SSIM 0.9997 (IEEE 1180),
   H.264 SSIM 0.6676 (cumulative GOP drift, mirrors fresnel iter1).
   Phase 4 must refine C4 to per-codec SSIM floors.
C5 (FPS N=3 with sigma): PASS all 3, tight sigma.
   H.264 461±0.6 fps, VP8 217±0.6 fps, MPEG-2 199±0.7 fps.
C6 (clean dmesg): PASS — empty diff pre vs post sweep.
C7 (firefox-fourier vendor-defaults): NOT RUN — no Wayland session
   on ampere (SDDM greeter only). Rig-blocked, documented.

Phase 1 hypothesis upheld: substrate is sound, codec works, no
backend regression. H.264 SSIM is decoder drift (per fresnel
precedent), needs C4 refinement, not loopback.

Scripts archived in phase3_scripts/ for reproducibility.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 07:24:19 +00:00
marfrit 4353db0cd0 iter1 phase2: situation analysis + reset-context
Re-verifies Phase 0 substrate against live system (post-reboot ampere
2 min uptime, backend md5 still matches hand-build, source clips
intact, memory list unchanged). Two missing tools flagged for Phase 4
to install (strace, firefox-fourier).

Catalogues 7 constraints (backend file pacman-owned but content-
unmanaged; kernel hand-managed; HEVC OOPS cascade; mpv --hwdec=vaapi
needs GL surface; mpv MPEG-2 not on default hwdec allow-list; reboot
authorization in scope; fresnel offline-able and not depended-on)
and 7 known failure modes (HEVC oops, broken CI backend silent fail,
hwdec SW fallback, MPEG-2 hwdec gate, firefox prefs version
sensitivity, RK3399 vaDeriveImage zero-page issue as open Q for
RK3588, pacman-Qo lying about file content).

Explicit non-deps section (HEVC/VP9/AV1, kdirect-on-RK3588, cross-host
byte-compare, DokuWiki) preempts scope creep doubts in Phase 3-7.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 07:21:07 +00:00
marfrit 0d9914062c iter1 phase1: goal formulation
Locks iter1 scope to the 3 currently-kernel-supported codecs (H.264,
VP8, MPEG-2). The other 3 (HEVC, VP9, AV1) are deferred to dedicated
iter2/3/4 loops — bundling them would conflate three different
external dependencies into one un-closable iteration.

Resolves Phase 0 open questions Q1 (scope = 3 codecs), Q2 (bit-exact
anchor = libva-HW vs SW byte-compare; kdirect-on-RK3588 is its own
piece of work), Q4 (firefox-fourier in scope as consumer test).
Defers Q3 (HEVC OOPS sandboxing) and Q5 (AV1 source clip) to the
relevant iterations.

Success criteria are six per-codec instruments (C1-C6: frame count,
HW engagement via lsof+strace, byte-identical at frame 0, SSIM>=0.99
at frame 30s, N=3 FPS, clean dmesg) plus one campaign-level
firefox-fourier vendor-default test (C7).

Hypothesis is falsifiable in three named ways (codec crash/hang,
first-frame byte deviation indicating kernel ABI drift, MPEG-2 IDCT
tolerance refinement) — each maps to a specific phase loopback.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 07:20:23 +00:00
marfrit de0f267d05 iter1 phase0: substrate / motivation / inventory
Locks the research question, captures hardware + kernel + userland
state, walks the V4L2 decoder topology (3 decoder cores), enumerates
libva backend behavior, anchors the in-session N=1 baseline (H.264
via rkvdec, VP8 + MPEG-2 via hantro — all decode end-to-end), and
documents the three blockers (kernel HEVC OOPS in
rkvdec_hevc_prepare_hw_st_rps; kernel VP9 not exposed on RK3588
rkvdec; libva backend iter38 hard-capped at 2 fds, AV1 unprobed).

Predecessor carryover rules followed: backend source pin + memory
entries carry; per-codec FPS numbers and bit-exact criteria do not.

Open questions tabled for Phase 1 goal lock:
  1. Success-metric scope: 3 / 5 / 6 codecs.
  2. RK3588 bit-exact anchor (kdirect adapt vs SW byte-compare).
  3. HEVC OOPS pre-decode vs post-decode (instrumentation Q).
  4. firefox-fourier vendor defaults adequacy on RK3588.
  5. AV1 source clip provenance for the eventual iter39 test.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 07:19:57 +00:00