forge
Explore
Log in

Don't you dare go Hollow

R2 handoff -- merge state, per-segment triage, gate state, next step

Browse files at this commit

c6cb99f3170a87e1555639916fdcb472d39f176bAhmet Kaan GümüşParent: 28382aa
  • docs
    • r2 handoff -- merge state, per-segment triage, gate state, next step
Show full message
docs(kf1200): r2 handoff -- merge state, per-segment triage, gate state, next step
lanes/kf1200-r2.handoff.mdadded+72 -0
@@ -0,0 +1,72 @@
1+# lane-kf1200 r2 HANDOFF
2+
3+## Merge state
4+Branch `lane-kf1200`, tip `385b745`. `git merge main` (85887c7 = lane-mvtwin +
5+lane-sb128b) landed clean at `d85d7d2`; cdf.rs byte-identical to main's; r1's
6+pair-mi chroma edge-filter fix survives at decode.rs:7747. main contains
7+NEITHER lane-reelckf NOR lane-kf900 (`git log --oneline main | grep` empty for
8+both), so no duplicate-implementation resolution was needed and the
9+multi-million-byte census rows are still kf900's.
10+Do NOT commit `lanes/COMMON-20260901.md` — another agent edits it in this
11+worktree; it is intentionally left unstaged. (It is currently modified.)
12+
13+## Per-segment findings (ReelB, 1-frame truncation, EC_PROBE_OUT16 vs ffmpeg 10-bit)
14+- **-ss 300 — FIXED (463 -> 0 bytes).** Plane: U+V only, Y exact. First bad
15+ sample chroma (412,384). Stage: PRE-loop-filter (EC_AV1_PREFILT_DUMP16),
16+ 16x16 chroma region at (384,412). Block: the 4x4 chroma block of the
17+ BLOCK_4X4 2x2 group at luma mi (206,192); chroma-ref mi (207,193),
18+ `uv_mode=13` (UV_CFL_PRED), `skip=1`. Root cause: both sub-8x8 leaf decoders
19+ passed literal `None` for the CfL argument in their `skip_txfm` arm
20+ (decode.rs:10554/10555 4-leaf, :10916/10917 2-leaf), so the block
21+ reconstructed as flat DC. libaom `av1_predict_intra_block_facade`
22+ (av1/common/reconintra.c:1719) calls `cfl_predict_block` whenever
23+ `mbmi->uv_mode == UV_CFL_PRED`; `skip_txfm` drops only the residual.
24+ Fix: compute `cfl_ac_q3(y, gpx, gpy, 8)` and pass `alpha.zip(ac)` in both
25+ arms + `SKIP_CFL_HITS` counter (decode.rs:2207, `skip_cfl_hits()`).
26+ Effect: -ss 300 pixel-exact; -ss 4800 2348 -> 34 bytes as a side effect.
27+- **-ss 600 / 2400 / 3300 / 5700 — ONE class, open.** 48771 / 42343 / 39971 /
28+ 16375 bytes. All planes. Final-picture damage rows Y 1595..1607, chroma
29+ 796..803. Stage: PRE-loop-filter damage is EXACTLY luma rows 1600..1607,
30+ cols 192..3839 (rows 1595..1599 are deblock spill across the y=1600 edge).
31+ Frame is 1608 rows = 25 full 64-px SB rows + an 8-row remainder, so this is
32+ the bottom PARTIAL superblock row; its first three superblocks (cols 0..191)
33+ are pixel-exact. Block: our prediction trace matches aomdec block-for-block
34+ through mi (400,47) (mi 44 four TX_4X4 in an 8x8, mi 46 an 8x8). First
35+ divergence is the FIRST block of superblock #3:
36+ aomdec `EC_PRED mi_row=400 mi_col=48 txw=16 txh=8 mode=2 p_angle=180 bsize=5 part=1 ft=1`
37+ ours `OUR_PRED x=192 y=1600 bw=32 bh=16 mode=0 ad=0` (decode.rs:6511)
38+ i.e. a PARTITION-SYMBOL divergence at the root of a partial-height
39+ superblock (`has_rows == false`, 2 of 16 mi rows present). Not prediction,
40+ not caused by the preceding block. Root cause NOT yet identified.
41+- **-ss 4800 — open, small.** 34 bytes (was 2348). Chroma only, luma exact,
42+ PRE-loop-filter: U 25 + V 3 samples in an 8x4 chroma patch rows 540..543
43+ cols 1200..1207, |d| <= 6. Luma mi ~ (270,600). Same geometry as r1's
44+ 16x8 PARTITION_HORZ_4 pair defect -> likely a sibling of the pair-mi bug.
45+- Accepted (kf900's): 900, 1500, 2100, 2700, 3900, 6000, 6300, 6600.
46+
47+## Gate state
48+- New: `the_reelb_ss300_key_frame_skipped_cfl_decodes_pixel_exact`
49+ (crates/ec-av1/src/stream.rs), pins
50+ `crates/ec-av1/fixtures/reelb_ss300_key_frame.obu` (139201 B, sha256
51+ 7e3ddf0d602f9496b2f7eb11f051fd4a045020e094d5bc02f83825e2c494ef12, one
52+ 3840x1608 yuv420p10le key frame, `git add -f`, confirmed in `git ls-files`).
53+ HARD-asserts `skip_cfl_hits > 0` (it fires exactly ONCE in the whole frame)
54+ then Y/U/V vs ffmpeg. Fixture used because lane-reelckf r1's ledger dead-end
55+ records 20 aomenc recipes that never produced a skipped sub-8x8 CfL block.
56+- r1's `a_real_aomenc_stream_with_a_16_level_1to4_partition_decodes_pixel_exact`
57+ (chroma-carrying source + `pair_filt_proved > 0`) unchanged and green.
58+- No refusal lifted; refusal_inventory.rs / gate_coverage.rs untouched.
59+- Suite: 378 passed / 0 failed / 33 ignored (794.95 s),
60+ `$HOME/.cache/kf1200-suite-r2.log`.
61+
62+## Exact next step
63+Range-ladder the partition symbols of superblock (mi_row=400, mi_col=48) on
64+`scratchpad/kf1200/s600_f1.obu` (1 frame, sha256 36de46676ed7de70… stable
65+twice): both decoders are still in sync at mi (400,47), so start the ladder
66+there and compare aomdec's `r->ec.rng` at each `EC_IMODE`/partition read
67+against ours element by element (compare RANGE, never tell()). The suspect is
68+the `has_rows == false` forced-partition path at a 64x64 root with only 2 mi
69+rows left — we take a 32x16 where libaom takes 16x8. Artifacts already on disk
70+in scratchpad/kf1200: s600_f1.obu, a600p.trace (aomdec EC_PRED), o600.trace
71+(our OUR_PRED), pre600.f0 / apre600.f0 (prefilter dumps), d1.py (plane differ),
72+census.sh (24-frame census, debug probe path).