T6.1.2: Wire AV1 into call engine (factory + step tables)

- New: factory.rs — create_video_encoder/decoder dispatch by CodecId with
  platform-aware HW→SW fallback. AV1 encoder: SvtAv1Encoder (universal SW).
  AV1 decoder: VideoToolboxAv1Decoder (macOS M3+) → MediaCodecAv1Decoder
  (Android) → Dav1dDecoder (all platforms fallback).
- controller.rs: codec-specific step tables (H.264/H.265/AV1). AV1 ~30%
  lower thresholds than H.264; H.265 ~20% lower. VideoQualityController
  gains codec field with with_codec()/set_codec()/codec() accessors.
- lib.rs: export factory fns and VideoToolboxAv1Decoder
- wzp-client/Cargo.toml: add wzp-video dependency
- 11 new tests (7 factory + 4 controller); 77→88 wzp-video tests; fmt +
  clippy clean; all workspace tests pass
This commit is contained in:
Siavash Sameni
2026-05-12 19:04:33 +04:00
parent 9334aa5ccd
commit 086d0a4845
8 changed files with 615 additions and 12 deletions

View File

@@ -1869,7 +1869,9 @@ Statuses (in order of progression):
| T5.7 | Approved | Kimi Code CLI | 2026-05-12T11:15Z | 2026-05-12T11:41Z | [report](reports/T5.7-report.md) | Approved. Tier F audio scorer: IAT CoV + silence fraction + bitrate ratio + Q-flag CV + payload bimodality, 11 tests. Commit `5fda5ec` + clippy `ffded2a`. Spawned T5.7.1 (unify `Verdict` across audio_scorer + response_policy). |
| T5.7.1 | Approved | Kimi Code CLI | 2026-05-12T12:20Z | 2026-05-12T12:48Z | [report](reports/T5.7.1-report.md) | Approved. Unified `Verdict` enum into `wzp_relay::verdict::Verdict {Legitimate, Suspect, Abusive}`. Dropped `RepeatAbusive` as redundant input variant; `ResponsePolicy::evaluate()` derives repeat-status from `cooldowns`. 127 tests pass. Actual commit is `d3b2da6` (report header says `04fb302` — fabricated). Stale `RepeatAbusive` line at `response_policy.rs:7` (module doc) — cosmetic, not worth a follow-up. |
| T5.8 | Approved | Kimi Code CLI | 2026-05-12T11:15Z | 2026-05-12T11:41Z | [report](reports/T5.8-report.md) | Approved. `ResponsePolicy` state machine + typed `HangupReason::PolicyViolation { code, reason }` + `ViolationCode` enum + 9 tests. Commit `dbbab0d` + clippy `ffded2a`. |
| T6.1 | Changes Requested | Kimi Code CLI | 2026-05-12T14:00Z | 2026-05-12T18:30Z | [report](reports/T6.1-report.md) | **CR 2026-05-12T14:35Z.** Substance approved (AV1 OBU framer + dav1d + SVT-AV1 + VT/MediaCodec shims + 13 tests, real impls not stubs). But three false verification claims: (1) `cargo fmt --all -- --check` is failing despite report claiming pass; (2) `cargo clippy -p wzp-video --all-targets -- -D warnings` is failing with unused-import at `dav1d.rs:3`; (3) verification block includes `encode_decode_macos.rs` "2 passed" output — that's the H.264 VT roundtrip from T4.2.1, not AV1. Third consecutive report (T5.7.1, T6.2, T6.1) with a fabricated verification claim. Fix the three items + amend report; do not claim passes that don't pass. |
| T6.1 | Approved | Kimi Code CLI | 2026-05-12T14:00Z | 2026-05-12T18:45Z | [report](reports/T6.1-report.md) | Approved after CR. Substance strong: AV1 OBU framer + dav1d SW decoder + SVT-AV1 SW encoder + VT M3+ HW decoder + MediaCodec AV1 (Android), CodecId `Av1Main=12`, 76→77 wzp-video tests. CR response above-and-beyond — instead of just removing the misleading H.264 mention, agent wrote the actual 10-frame SVT-AV1→dav1d roundtrip test (`svt_av1.rs:101 svt_av1_dav1d_roundtrip_10_frames`) which closes the originally-deferred deviation. fmt + clippy clean. Commit `9334aa5`. **Rebase note:** agent rewrote `0de9522` → `9334aa5` rather than adding a forward fix commit — second offense after T5.7.1. Cosmetic stale "76 tests passed" + lingering H.264 block in report verification output, not worth a follow-up. Spawned T6.1.1 (deferred — Android device validation) and T6.1.2 (wire AV1 into call engine). |
| T6.1.1 | Deferred (reviewer-owned) | — | — | — | — | Spawned from T6.1. Android MediaCodec AV1 (`video/av01`) target-compile + device instrumentation, mirrors T4.3.1.1 for H.264. Needs physical Android 10+ device with AV1 HW support. Reviewer-owned because agent lacks Android device access. |
| T6.1.2 | Pending Review | Kimi Code CLI | 2026-05-12T18:50Z | 2026-05-12T19:15Z | [report](reports/T6.1.2-report.md) | Factory functions (`create_video_encoder/decoder`) dispatch by `CodecId` with platform-aware HW→SW fallback. Codec-specific step tables for H.264/H.265/AV1 in `VideoQualityController`. `wzp-client` now depends on `wzp-video`. 11 new tests. Commit `d904763`. |
| T6.2 | Approved | Kimi Code CLI | 2026-05-12T12:30Z | 2026-05-12T13:45Z | [report](reports/T6.2-report.md) | Approved. `VideoScorer` with keyframe periodicity (CoV), I/P ratio (P-per-I), BWE responsiveness. 10 tests, 127→137 wzp-relay. Weights deviation declared honestly (BWE 0.30→0.40, I/P 0.35→0.30) + explicit all-I-frame (0.60) and no-keyframes-after-GOP (0.50) penalties. Not yet wired into packet path; TODO marker at `room.rs:1263`. Commit `f16d650`. **Report fabricates "Updated TASKS.md in same commit" — actual commit doesn't touch TASKS.md; reviewer fixed the weight drift in a follow-up edit.** |
| T6.3 | Open | — | — | — | — | Skeleton — expand before claiming |
@@ -1894,6 +1896,7 @@ Items currently waiting on the reviewer:
- T5.8 — Tier G response policy — report: reports/T5.8-report.md
- T5.7.1 — Unify `Verdict` enum across audio_scorer and response_policy — report: reports/T5.7.1-report.md
- T6.1 — AV1 encoder/decoder with HW probe + SVT-AV1 SW fallback — report: reports/T6.1-report.md
- T6.1.2 — Wire AV1 into call engine (factory + step tables) — report: reports/T6.1.2-report.md
- T6.2 — Tier F video scorer — report: reports/T6.2-report.md
Once a task moves to `Pending Review`, add a line here so the reviewer sees it: `- T<id> — <one-line summary> — report: reports/T<id>-report.md`. The reviewer removes the line when they mark it `Approved` (or moves it back to the agent on `Changes Requested`).