2 Commits

Author SHA1 Message Date
marfrit f0461f7662 Phase 3+5 close: amend with Phase 5 review outcome (Amendment 4 kept; Amendment 1 reverted empirically) 2026-05-17 12:19:45 +00:00
marfrit c6d55bce29 Phase 3 close: AV1 PASS on all-intra (10/10) and grain-IDR; film_grain+show_existing edge case localized
Major iteration result on av1-iter1 backend branch (tip c839b94 both
ampere and noether). AV1 hardware decode is FUNCTIONALLY WORKING for
the common cases:

  Fixture                                    Result
  test_av1.ivf (2 frames, no grain)          bit-exact PASS 2/2
  av1-1-b8-02-allintra.ivf (39 all-intra)    bit-exact PASS 10/10
  av1_larger.ivf (film_grain + show_existing) 3/10 PASS (apply_grain=1 IDR-derived)
  av1-1-b10-23-film_grain-50.ivf (10-bit)    both libva + kdirect 0 bytes (vpu981 may not support)

The 10/10 all-intra PASS is the load-bearing validation: it proves
our backend's V4L2 control submission, OUTPUT byte assembly, surface
management, reference timestamp plumbing, and per-codec dispatch
are all correct for the common AV1 case.

The remaining 7/10 divergence on the film_grain+show_existing
fixture is localized via patched-libavcodec dump (LD_LIBRARY_PATH
override on debug fwrite-instrumented libavcodec.so) to:
  - First 7 EndPicture submissions byte-IDENTICAL to kdirect for
    SEQUENCE + FRAME + TILE_GROUP_ENTRY + FILM_GRAIN ctrls AND for
    OUTPUT byte payload.
  - libva has 2 EXTRA EndPicture calls on REUSED surfaces (the
    ffmpeg-vaapi AV1 hwaccel's show_existing_frame handling).
  - iter2 Fix 3 release-on-rebind FALSIFIED as the cause
    (LIBVA_SKIP_REBIND=1 A/B identical to default).

Fix space (Phase 4): cap_pool refactor to track N surfaces per
slot, OR ffmpeg-vaapi AV1 hwaccel surface-allocation change.

All diagnostic infrastructure retained for next iteration:
  /tmp/diff_av1_ctrls.py on ampere (per-CID strace byte diff)
  /tmp/ivf_split.py on ampere (per-frame IVF extraction)
  LIBVA_V4L2_DUMP_OUTPUT env on backend (libva-side OUTPUT bytes)
  patched libavcodec build instructions in close doc

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 12:14:03 +00:00