forge
Explore
Log in

Don't you dare go Hollow

R1 handoff -- per-key-frame first-difference table, stage attribution, the two blocks found, ruled-out hypotheses

Browse files at this commit

2150655617f5b617d111419a8a66f44e7f8642b1Ahmet Kaan GümüşParent: 52a7f38
  • docs
    • r1 handoff -- per-key-frame first-difference table, stage attribution, the two blocks found, ruled-out hypotheses
Show full message
docs(reelckf): r1 handoff -- per-key-frame first-difference table, stage attribution, the two blocks found, ruled-out hypotheses
lanes/reelckf-r1.handoff.mdadded+100 -0
@@ -0,0 +1,100 @@
1+# lane-reelckf r1 handoff
2+
3+Tip: see `git log -2`. Base `lane-sb128b` e8e64a6. Both root causes FIXED and the
4+lane is GREEN on its own gate; the only thing still owed is the final full-suite
5+number (the unit was still running at the turn cap, 318/~404 tests logged, zero
6+`FAILED` lines so far). Log: `$HOME/.cache/reelckf-suite-r1.log`.
7+
8+## Method (reusable)
9+`$HOME/.cache/reelckf-work/one.sh <ss>` — extracts 2 s with `ffmpeg -ss <ss> -c:v copy
10+-f obu`, truncates to ONE frame with `trunc.py`, decodes under
11+`systemd-run --scope -p MemoryMax=6G` with `EC_PROBE_OUT16`, sha256s the output,
12+decodes the same truncated file with `ffmpeg -pix_fmt yuv420p10le`, and prints
13+per-plane diff count + first differing sample + bounding box.
14+`$HOME/.cache/reelckf-work/stage.sh <ss>` — the same file through
15+`EC_AV1_PREFILT_DUMP16` / `EC_AV1_POSTDEBLOCK_DUMP16` on BOTH decoders.
16+`$HOME/.cache/reelckf-work/sweep.sh <lavfi-src> <cq> <depth>` (env `MP=` for
17+max-partition) — aomenc recipe probe printing `reelc_chroma:` counters.
18+
19+## Per-key-frame findings (1920x792 10-bit AV1, 12 seek points)
20+
21+All measurements are of decode-order frame 0 of a 1-frame truncation.
22+
23+| ss | first differing sample (before) | extent | stage | verdict |
24+|----|--------------------------------|--------|-------|---------|
25+| 0 | none | — | — | exact before and after |
26+| 900 | U (r103,c304) | U rows 103..395 cols 304..479, V rows 99..383; luma exact | prefilter | fixed, now 0 |
27+| 1800 | U (r19,c538) | U rows 19..313 cols 311..732; luma exact | prefilter | fixed, now 0 |
28+| 2700 | U (r48,c468) | ONE 8x16-luma chroma pair, chroma rows 48..79 cols 464..492 | prefilter (467 diffs) vs postdeblock (499) — reconstruction, not a filter | fixed, now 0 |
29+| 3600 | U (r151,c469) | U rows 151..395 cols 468..959; luma exact | prefilter | fixed, now 0 |
30+| 4500 | none | — | — | exact before and after |
31+| 5400 | U (r164,c154) | U rows 164..168 cols 153..159 (one 8x4 chroma block) + V (r152,c278) | prefilter | fixed, now 0 |
32+| 6300 | U (r148,c545) | U rows 148..395; V rows 148..395 cols 84..903 | prefilter | fixed, now 0 |
33+| 7200 | U (r24,c561) | U rows 24..348 cols 210..959 | prefilter | fixed, now 0 |
34+| 9900 | U (r8,c500) | U rows 8..395 cols 497..959 | prefilter | fixed, now 0 |
35+| 8100 | frame 0 REFUSES (128-root non-SPLIT) | — | — | lane-sb128c owns it |
36+| 9000 | frame 0 REFUSES (128-root non-SPLIT) | — | — | lane-sb128c owns it |
37+
38+LUMA WAS BIT-EXACT IN EVERY ROW, before and after. That single fact exonerated
39+the entropy stream at the first measurement and is why no range ladder was ever
40+needed.
41+
42+## Blocks found, and the symbol/prediction comparison
43+
44+* ss=2700, chroma (48,468) = luma (96,936) = mi(24,234). aomdec `EC_TRACE_MODE`:
45+ `EC_IMODE mi_row=24 mi_col=232..235 bsize=16` — four `BLOCK_4X16`
46+ (`PARTITION_VERT_4`); `mi_col=235` is the chroma reference and prints
47+ `uv_mode=13 skip=1`. Our chroma there was plain DC.
48+* ss=5400, chroma (164,152) = luma (328,608) = mi(82,76). aomdec: `mi_row=80..83
49+ mi_col=76 bsize=17` (`BLOCK_16X4`, `PARTITION_HORZ_4`), chroma reference
50+ `mi_row=83`, `uv_mode=5` (D113). aomdec `EC_PRED mi_row=83 mi_col=76 plane=1
51+ txw=8 txh=4 mode=5 p_angle=107 have_top=1 have_left=1 n_top=8 n_left=4 ft=0`,
52+ `EC_PREDOUT row0=415,431,453,471,467,442,408,397`.
53+ Ours (`EC_PRED=1`, `OUR_PRED x=152 y=164 bw=8 bh=4 mode=5 ad=-2`):
54+ `row0=[415,431,452,470,466,441,409,398]` — prediction, not residual.
55+
56+## Fixes applied and their effect
57+1. `decode.rs:7719` + `:10528` + `:10891` — a skipped intra block still predicts
58+ with CfL (libaom `predict_and_reconstruct_intra_block` predicts every plane
59+ and guards only the residual on `skip_txfm`). ss=2700 499 -> 0.
60+2. `decode.rs:7714` — the 1:4 pair reads `smooth_uv_neighbour` at `pair_mi` (the
61+ chroma reference), not at the closing strip: libaom
62+ `get_intra_edge_filter_type` uses `chroma_above_mbmi`/`chroma_left_mbmi`. The
63+ wrong filter type flipped `av1_use_intra_edge_upsample` (`blk_wh = 8+4 = 12
64+ <= 16` upsamples for type 0, never for type 1). ss=5400 46 -> 0; every
65+ remaining seek point -> 0.
66+3. `gate_coverage.rs` — `enable-cfl-intra` retired from BOTH never-exercised
67+ lists, and `covers_both_depths` learned the `for depth in [8usize, 10]`
68+ spelling (a gate with a `yuv420p10le` arm was being classified 10-bit only).
69+
70+## Hypotheses RULED OUT (do not re-spend rounds on these)
71+* Entropy desync / wrong CDF row: luma bit-exact on all ten frames.
72+* CDEF / loop restoration / deblock at a 128 superblock (the charter's leading
73+ suspects): the prefilter dump already carries the whole defect (ss=2700
74+ prefilter 467 diffs, postdeblock 499) and luma is exact through every filter.
75+* `delta_q` / `delta_lf` read at the 128 root: a wrong plane qindex would move
76+ the residual, not the prediction, and would not leave luma exact.
77+* Intra edge availability at 128 (`has_tr_128x128`/`has_bl_128x128`): `Reach` is
78+ two booleans computed from luma geometry, which libaom reuses for chroma; the
79+ ss=5400 `EC_PRED` line agrees (`n_tr=-1 n_bl=-1`).
80+* `Reach::of_rect(pw, ph, ...)` being luma-scaled while the chroma block is half
81+ the size: checked, correct — libaom computes availability once, in luma mi.
82+
83+## Gate
84+`cargo test -p ec-av1 --lib a_real_aomenc_sb128_stream_whose_skipped_cfl -- --nocapture`
85+-> pixel-exact at 8-bit AND 10-bit, `directional_1to4_chroma_pairs=11` per arm,
86+`skipped_cfl=0`.
87+
88+## Exact next step for a successor
89+1. `grep -E "^test result|FAILED" $HOME/.cache/reelckf-suite-r1.log` — the suite
90+ was mid-run at the cap. If anything is red, it is a sibling of the two
91+ touched paths (grep `smooth_uv_neighbour` and `cfl_ac_q3`).
92+2. Defect 1 (skipped CfL) has NO synthetic gate. 20 aomenc recipes were swept
93+ (cq 40/44/46/50/52/55/58/62/63 x mandelbrot, blurred mandelbrot, noised
94+ mandelbrot, testsrc2, gradients, smptebars, cellauto, life, grey+noise;
95+ min-partition 4, max-partition 16/32/64, sb-size 128/64) and `skip_cfl`
96+ stayed 0 in every one. Either find a recipe that fires it (the counter is
97+ printed by the gate AND by `decode_probe`, so a hit is immediately visible)
98+ or commit a pinned single-frame stream fixture.
99+3. The two remaining ReelC seek points (8100, 9000) need lane-sb128c's 128-root
100+ non-SPLIT partition; re-run the 12-point table after that lands.