Commit Graph

6 Commits

Author SHA1 Message Date
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