forge
Explore
Log in

Don't you dare go Hollow

R6 report -- merge of main + lane-golomb, the has_top_right over-gating regression, the 128-root partition sweep and the film's gathered-HORZ blocker

Browse files at this commit

335552939b357d301585b7aa504b92b234754f3dAhmet Kaan GümüşParent: 76749a1
  • docs
    • r6 report -- merge of main + lane-golomb, the has_top_right over-gating regression, the 128-root partition sweep and the film's gathered-HORZ blocker
Show full message
docs(sb128c): r6 report -- merge of main + lane-golomb, the has_top_right over-gating regression, the 128-root partition sweep and the film's gathered-HORZ blocker
lanes/sb128c-r6.report.mdadded+121 -0
@@ -0,0 +1,121 @@
1+# lane-sb128c r6 report
2+
3+Branch `lane-sb128c`, worktree `edith_codecs-sb128c`.
4+Tip `cf0bd84` (merges: `363ab1e` main 727f29a, `5230f4c` lane-golomb 173b793).
5+
6+## Verdict: GREEN on the merge + the five 128 arms; the partition work is NOT started (see below)
7+
8+## (1) Merge (charter step 1) -- done, and it found a real regression
9+
10+`git merge --no-commit main` (main tip 727f29a, which does NOT contain lane-golomb),
11+then `git merge --no-commit 173b793` directly, as chartered.
12+
13+Resolutions (all in `crates/ec-av1/src/decode.rs`):
14+- var-tx leaves are main's general `(row, col, tw, th)`; the lane's 128-root mu-chunk
15+ chroma interleave (`side > 64`, one 32x32 uv unit per 64x64 chunk) is kept, appended
16+ after main's `record_mi_luma_rect` (:17540 and :18670, both leaf loops).
17+- `default_scan(tx_px.min(32))` kept over main's `default_scan(tx_px)` -- a TX_64X64
18+ codes only its top-left 32x32 (r5 root cause c).
19+- the per-vartx-leaf lf grid write is golomb's LUMA-ONLY `fill_lf_grid_leaf_luma`
20+ (:19477), called with `(tw, th)`; this is exactly the r5 arm-3 defect (a 16x16 luma
21+ leaf was publishing a chroma TU extent of 8 and inventing a chroma edge at chroma
22+ x=56), so arm 3 needed no new code of mine.
23+- the lane's skip-inter `suppress_internal_lf_edges` is kept, narrowed to the 128 root.
24+- leaf ceiling is per root: main's TX_32X32 refusal below 128, TX_64X64 at the 128 root.
25+- `cdf.rs` diff vs 173b793 is ONLY the lane's own three rows in `MOTION_MODE`/`OBMC`
26+ (BLOCK_64X128 / 128X64 / 128X128), 18 changed lines vs main; no hand-resolution.
27+
28+REGRESSION FOUND AND FIXED (class `fix-trades-sibling-gate`): r5's mv-stack change wired
29+libaom's WHOLE `has_top_right`, position mask included, without its three shape
30+refinements (`is_last_vertical_rect`, `is_first_horizontal_rect`, the `PARTITION_VERT_A`
31+bottom-left square) that `mvstack::has_top_right`'s own doc calls a corner-cut. Correct
32+at 128 (`bs > 64` -> no candidate) and WRONG below it once main decodes rect/AB inter
33+leaves: `a_real_aomenc_stream_with_ab_partitions`, `..._with_free_partitions` and
34+`real_aomenc_1to4_streams...` all lost frame 16 luma (seed 48), and the
35+`all_same_mv_neighbourhood_dedupes_to_one_entry` unit test lost the corner weight
36+(648 vs 652). Now gated on the size half only (`mvstack::top_right_scan_allowed`,
37+`bw4.max(bh4) <= 16`), with the ceiling and upgrade path named at the helper.
38+
39+EVIDENCE: $HOME/.cache/sb128c-gate-r6e.log | cargo test -p ec-av1 --lib -- ab_partitions
40+free_partitions real_aomenc_1to4_streams inter_128x128_none_root
41+key_frame_with_a_128x128_none_partition a_real_aomenc_128x128_superblock_stream
42+all_same_mv_neighbourhood | test result: ok. 9 passed; 0 failed
43+
44+The five 128 arms the charter asks for, from $HOME/.cache/sb128c-gate-r6a.log (all green
45+already at the merge commit, i.e. arm 3 was fixed by the golomb merge):
46+- inter 128 NONE arm 1 (yuv420p, tx_search=0, seed 61): 9/9 decode-order frames exact,
47+ `inter_sb128_none_hits=14 chroma_units=16 intra_128_in_inter=0`
48+- arm 2 (yuv420p10le, tx_search=0, seed 61): 9/9 exact, `hits=29 chroma_units=28
49+ intra_128_in_inter=1`
50+- arm 3 (yuv420p, tx_search=1, seed 62): 9/9 exact, `hits=15 chroma_units=24` -- was RED
51+ (7 bytes, a phantom chroma deblock edge) at r5.
52+- `a_real_aomenc_key_frame_with_a_128x128_none_partition_decodes_pixel_exact`: ok
53+- `a_real_aomenc_128x128_superblock_stream_decodes_pixel_exact`: ok
54+
55+## (2) 128-level HORZ/VERT + AB partitions -- NOT STARTED, but scoped by measurement
56+
57+deferred: the whole of charter step 2 -- fix-now for r7, unblocked by nothing; the round's
58+budget went to the merge, the has_top_right regression and the measurements below.
59+`refusal_inventory.rs:45` is untouched, no refusal lifted this round.
60+
61+What r6 measured instead (this is what r7 should build against, full detail in
62+`lanes/sb128c-r6.handoff.md`):
63+- 72 aomenc streams (6 seeds x 256x256/384x384 x cq 40/55/63 x 8+10-bit, `--sb-size=128
64+ --cpu-used=0 --min-partition-size=64 --enable-rect-partitions=1 --enable-ab-partitions=1`):
65+ the 128-root partition symbol is ONLY 0 (NONE) or 3 (SPLIT). aomenc picks no 128-level
66+ HORZ/VERT/AB on that recipe at all -- a gate built on it would be vacuous.
67+- 18 further streams with sources designed for the arms (512x512): an AB-shaped source
68+ DOES produce `value=1` = PARTITION_HORZ at the 128 root, at cq 32/50/63 and both
69+ min-partition-size 64 and 16. Recipe + kept streams in the handoff.
70+- Whether VERT / the four AB values are reachable stays UNKNOWN: our decoder stops at the
71+ first refusing root, so nothing past it is observable. Any "aomenc never picks it"
72+ claim needs a re-sweep AFTER HORZ decodes.
73+
74+EVIDENCE: $HOME/.cache/sb128c-work/sweep.out + sweep2 stdout | 90 aomenc encodes decoded
75+with EC_AV1_TRACE=1 | partition_w128 value histogram: {0,3} in all 72 sweep-A streams,
76+{0,1} in the 6 abshape streams
77+
78+## (3) Full suite
79+
80+`cargo test -p ec-av1 --lib` (systemd unit, MemoryMax=10G) at the merge commit:
81+**381 passed / 4 failed / 35 ignored** -- the four failures are the has_top_right
82+regression described above. Re-run at tip cf0bd84: **385 passed / 0 failed / 35 ignored**
83+(1125.89 s), log `$HOME/.cache/sb128c-suite-r6.log`.
84+
85+EVIDENCE: $HOME/.cache/sb128c-suite-r6.log | systemd-run --user --unit=sb128c-suite2-...
86+-p MemoryMax=10G cargo test -p ec-av1 --lib -j3 | test result: ok. 385 passed; 0 failed;
87+35 ignored
88+
89+## (4) Film re-probe (1080p 10-bit AV1, four extracts)
90+
91+| stream | bytes | stop string | FINAL_DUMP frames |
92+|---|---|---|---|
93+| `sb128c-work/reelc2s.obu` | 1428 | 128x128 superblock HORZ/VERT or AB partition | 1 |
94+| `~/.cache/reelc-head.obu` | 1428 | same | 1 |
95+| `sb128c-work/reelc-8100.obu` (`-ss 8100 -t 2`) | 326696 | same | 0 |
96+| `sb128c-work/reelc-9000.obu` (`-ss 9000 -t 2`) | 1287780 | same | 0 |
97+
98+The one shown frame the head extract does decode is byte-identical to ffmpeg's 10-bit
99+output. No film grain on this title.
100+
101+NEW, decisive for r7: on all four extracts `EC_AV1_TRACE=1 | grep partition_w128` shows
102+values 0 and 3 ONLY right up to the stop. The full-alphabet symbol traces every value it
103+reads, so the refusing partition came from `read_sb128_root`'s GATHERED branch
104+(decode.rs:13317, untraced): 1080 luma rows -> `mi_rows = 270`, the bottom 128 row has
105+`mi_r128 = 256`, `256 + 16 > 270`, one gathered bit, and the film codes it
106+`PARTITION_HORZ` -- a 128x64 block at the frame's bottom edge. Width 1920 = 15*128
107+exactly, so the VERT gathered arm is unreachable on this title. The film's minimum ask is
108+therefore the 128x64 block, not the whole 128-level partition set.
109+
110+EVIDENCE: $HOME/.cache/sb128c-work/fd/o.f0 vs reelc-ff.yuv | EC_AV1_FINAL_DUMP decode of
111+reelc2s.obu + `ffmpeg -pix_fmt yuv420p10le -frames:v 1` | cmp: identical, 4561920 B
112+
113+## Open residue
114+
115+- fix-now (r7): 128-level HORZ (128x64) on the key and inter paths, gated on the abshape
116+ recipe; then re-sweep for VERT/AB and keep the unreached arms refused BY NAME.
117+- accepted: `top_right_scan_allowed`'s corner-cut (mask half unported) -- identical to
118+ main's behaviour below 128, ceiling named in the doc comment.
119+- deferred: the three `has_top_right` shape refinements -- unblocked by nothing, but only
120+ observable once a gate exercises a rect/AB inter leaf whose top-right differs; none of
121+ the 416 lib tests does today.