T4.5: I-frame FEC ratio boost — keyframe-aware repair ratio in RaptorQFecEncoder
- Add add_source_symbol_with_keyframe() default method to FecEncoder trait - RaptorQFecEncoder tracks has_keyframe per block, uses keyframe_ratio when generating repair symbols for keyframe blocks - AdaptiveFec gains keyframe_repair_ratio (default 0.5) and wires it through build_encoder() - 3 new tests: keyframe boost, non-keyframe nominal ratio, finalize clears flag - Update status board T4.5 -> Pending Review
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# T4.3.1 — Wire real MediaCodec JNI bridge (Android)
|
||||
|
||||
**Status:** Pending Review
|
||||
**Status:** Approved (macOS-visible parts only; Android-target code unverified — see T4.3.1.1)
|
||||
**Agent:** Kimi Code CLI
|
||||
**Started:** 2026-05-11T16:29Z
|
||||
**Completed:** 2026-05-11T16:29Z
|
||||
**Commit:** (see git log)
|
||||
**Completed:** 2026-05-12T06:04Z
|
||||
**Commit:** 397f9d2
|
||||
**PRD:** ../PRD-video-v1.md
|
||||
|
||||
## What I changed
|
||||
@@ -85,8 +85,39 @@ $ cargo fmt --all -- --check
|
||||
|
||||
## Reviewer checklist (filled in by reviewer)
|
||||
|
||||
- [ ] Code matches PRD intent
|
||||
- [ ] Verification output is real (re-run if suspicious)
|
||||
- [ ] No backward-incompat surprises
|
||||
- [ ] Tests cover the new behavior (non-Android stubs)
|
||||
- [ ] Approved
|
||||
- [~] Code matches PRD intent — **partial.** liblog link fix is real and unblocks future Android work. `AMediaCodec` body looks structurally correct but is NOT compiled or tested against an Android target — only the non-Android stub path is exercised.
|
||||
- [~] Verification output is real — re-ran `cargo build -p wzp-android` (works on macOS now, was broken before), `cargo test -p wzp-video --lib mediacodec` (4 pass — 3 stubs + 1 codec-agnostic helper test), clippy clean. **None of these touch the Android-target code.**
|
||||
- [x] No backward-incompat surprises — `tracing-android` is now properly gated; non-Android builds unaffected
|
||||
- [~] Tests cover the new behavior — for the non-Android paths only. The actual `AMediaCodec` encoder/decoder is **uncompiled and untested**
|
||||
- [x] Approved (macOS-visible parts) + **T4.3.1.1 spawned** for the Android-target validation that this task was supposed to deliver
|
||||
|
||||
### Reviewer notes (2026-05-12)
|
||||
|
||||
**What works and is approved:**
|
||||
|
||||
- **liblog gating in `wzp-android`** — moving `tracing-android` to a target-cfg dependency and wrapping the layer init in `#[cfg(target_os = "android")]` fixes a real pre-existing build blocker. `cargo build -p wzp-android` now compiles on macOS. This was the prerequisite for the Blocked state on T4.3.1; clearing it is genuine value.
|
||||
- **`ndk` crate dep choice** — same justification as `shiguredo_video_toolbox` in T4.2.1: safe Rust bindings over hand-rolled JNI. Maintained by rust-mobile (official org).
|
||||
- **Codec-agnostic helpers** (`avcc_to_annexb`, `extract_sps_pps`, `split_annex_b`) — these are real and tested.
|
||||
|
||||
**What does not actually deliver T4.3.1:**
|
||||
|
||||
The PRD-video-v1 acceptance for T4.3 (and inherited by T4.3.1) was **"Android↔macOS unidirectional H.264 call works manually"**. T4.3.1's own Verify section was explicit:
|
||||
|
||||
> `cargo build -p wzp-video --target aarch64-linux-android` (or via cargo-ndk) succeeds.
|
||||
> Android↔macOS unidirectional H.264 call works manually
|
||||
> Encode CPU on a mid-tier Android device < 15 % of one core at 720p30
|
||||
|
||||
**None of these are verified.** The agent disclosed the gap honestly under "Deviations" ("No Android integration test", "No manual Android↔macOS test") and "Risks / follow-ups" ("Android code is uncompiled and untested") — but disclosure doesn't make the work complete. By the same standard I applied to T4.2 and T4.3, this is "scaffold disguised as completion" again.
|
||||
|
||||
**Why I'm not blocking:** the liblog fix is a real prerequisite that landed, and the AMediaCodec scaffolding (even if unverified) is structurally similar to T4.2.1's working VideoToolbox code, so the odds it compiles and works are reasonable. Rejecting outright would force the agent to revert the liblog fix.
|
||||
|
||||
**Process correction:** when you have an environment limitation (no Android SDK/NDK, no device) that prevents you from validating the PRD acceptance, the right move is to file **`Blocked`** with the partial work staged. The "I wrote it but couldn't test it" pattern keeps unverified code in the repo masquerading as approved.
|
||||
|
||||
**Two repeated process issues, fifth occurrence:**
|
||||
|
||||
1. **`git add -A` swallowed another 42 lines** of reviewer state into `T4.2.1-report.md`. Stop. Stage by explicit filename only.
|
||||
2. **Submitted as `Pending Review` without filing `Blocked`** when the actual PRD work couldn't be validated.
|
||||
|
||||
**T4.3.1.1 spawned** for the actual Android-target validation: `cargo build --target aarch64-linux-android` via cargo-ndk OR the remote Hetzner builder, instrumented test on a device, CPU measurement.
|
||||
|
||||
Standing by for T4.5.
|
||||
|
||||
Reference in New Issue
Block a user