forge
Explore
Log in

Don't you dare go Hollow

R8 report -- reference-height and LR crop fixes, three blockers measured on the straddle arms

Browse files at this commit

c0ba2959937f8f4ba0b92694558153b52b242dd2Ahmet Kaan GümüşParent: 570d099
  • docs
    • r8 report -- reference-height and LR crop fixes, three blockers measured on the straddle arms
Show full message
docs(golomb): r8 report -- reference-height and LR crop fixes, three blockers measured on the straddle arms
lanes/golomb-r8.report.mdadded+98 -0
@@ -0,0 +1,98 @@
1+# lane-golomb r8 -- two true-size defects fixed, straddle arms STILL not addable
2+
3+Tip: `97de75e` on `lane-golomb` (merge `3a08902` of main `85887c7`, then the fix).
4+
5+## (1) Suite r7 -- no result line, superseded
6+`$HOME/.cache/golomb-suite-r7.log` was still `active` at **226/404** tests with **no**
7+`test result:` line and **zero** `FAILED`/`panicked` lines. It was measuring the PRE-merge
8+tree (main has since advanced to 85887c7), so r8 stopped the unit to take the target dir.
9+Owed artifact carried forward to r8's own suite.
10+
11+## (2) Merge of main 85887c7
12+`git merge --no-commit main` was a CLEAN auto-merge (decode.rs + stream.rs auto-merged, no
13+conflict, no hand resolution). Byte-compared against main afterwards:
14+`mvstack.rs`, `cdf.rs`, `cdf_state.rs`, `refusal_inventory.rs` are all **IDENTICAL to main**
15+(`git diff --quiet main -- <file>`). Only decode.rs and stream.rs carry lane content.
16+Merge commit `3a08902`.
17+
18+EVIDENCE: $HOME/.cache/golomb-gate-r8h.log | edge32 gate on the merged tree, all 8 cq arms x
19+{192x80, 80x192} x {8,10}-bit + the 5-frame inter arm | `test result: ok`, 38 pixel-exact
20+attempts, 64-level edge bits [horz_or_vert=7 split=197] right-VERT=7, 2 named refusals --
21+byte-identical totals to r7's green run.
22+
23+## (3a) FIXED: a same-size reference at a height that is not a multiple of 8
24+`crates/ec-av1/src/decode.rs`, `decode_inter_frame_tile_with_cdfs`: the guard compared
25+`reference.height` against `true_height = (mi_rows * 4)` (mi-rounded). A decoded `Picture`
26+is cropped to the header's `fh`, so at height 68 (`mi_rows = 2*((68+7)>>3) = 18` -> 72) it
27+compared **68 against 72** and refused every same-size reference.
28+libaom compares references on the CROPPED dimensions --
29+`av1_setup_scale_factors_for_frame(&sf, ref->y_crop_width, ref->y_crop_height, cm->width,
30+cm->height)` -- and calls a reference *scaled* only when those differ (`av1_is_scaled`).
31+Height must still match (AV1 superres never scales height). Class `av1-truesize-lane`.
32+
33+EVIDENCE: $HOME/.cache/golomb-gate-r8{b,f}.log | `arms.push((192, 68, 5, false))`, cq sweep |
34+BEFORE: 8/8 attempts refuse "a reference picture whose height does not match this frame's own
35+true size"; AFTER: 0/8 do.
36+
37+## (3b) NOT the cause of the 68x192 column defect -- charter hypothesis REFUTED at the source
38+The charter proposed our reference plane replicates from the mi-rounded column 71 instead of
39+the true column 67. Read `aom_scale/generic/yv12extend.c`: `aom_yv12_extend_frame_borders_c`
40+calls `extend_plane(..., ybf->crop_widths[is_uv], ybf->crop_heights[is_uv], ...,
41+right = plane_border + widths - crop_widths)` and `extend_plane` memsets from
42+`src + width - 1` -- i.e. libaom OVERWRITES the decoded columns 68..71 with column 67.
43+Our `mc::sample` clamps at `true_width - 1` of the CROPPED reference `Picture` (68) -->
44+already identical. No fix needed; the 141-px defect is elsewhere.
45+
46+## (3c) FIXED (source-cited, UNEXERCISED): loop restoration ran over the mi-rounded plane
47+`decode.rs::apply_loop_restoration` passed each plane's `true_width`/`true_height`. LR is the
48+one post-decode filter that does not walk the mi grid: libaom sizes every plane with
49+`av1_get_upsampled_plane_size` (`plane_w = ROUND_POWER_OF_TWO(cm->superres_upscaled_width,
50+ss_x)`, `av1/common/restoration.c:47`), **asserts** it equals the buffer's crop width
51+(`restoration.c:1106`) and `av1_extend_frame(..., plane_w, plane_h, ...)` replicates the
52+border from that cropped edge before any unit is filtered (`restoration.c:1109`). Deblock and
53+CDEF DO walk the mi grid, which is why this survived until a non-multiple-of-8 size.
54+Now takes `(frame_width, frame_height)`, chroma `div_ceil(2)`.
55+DISCLOSURE: **no gate exercises this** -- every straddle recipe in `edge32_gate` runs
56+`--enable-restoration=0`, and the 68x192 defect was byte-identical before and after
57+($HOME/.cache/golomb-gate-r8{c,d}.log, both `141 pixels differ, first at row 0 col 64`).
58+It is a source-cited correctness alignment, verified only by the suite staying green.
59+
60+## (4) The straddle arms are STILL not addable -- three separate blockers, each measured
61+Charter asked for `(192,68,5)` and `(68,192,5)` arms at 8+10 bit with a straddling-TU counter.
62+DEVIATION: no arm was added, because every cq level of both is vacuous, panicking or red.
63+The measurements are now recorded verbatim in the `edge32_gate` comment block:
64+* `192x68` cq35 8-bit: no longer the height refusal -- refuses LATER by another lane's name,
65+ "an inter SB-level AB partition (HORZ_A/HORZ_B/VERT_A/VERT_B)". Vacuous
66+ (class `counter-from-refused-stream`).
67+* `192x68` cq40 8-bit: **PANICS** in `decode_inter_block8` -- `from_switchable_symbol` handed a
68+ 4th symbol, `mc.rs:203`. That is lane-sub8's own open below-8x8 desync (already named in
69+ `decode.rs`'s scaled-reference-8x8 refusal comment). A panic cannot be tolerated as a named
70+ refusal, so the arm cannot even be added with an Err-tolerating recipe.
71+* `192x68` cq59 8-bit: RED, `frame 1 plane Y: 217 pixels differ, first at row 60 col 170
72+ (ours 172 vs ffmpeg 173)`.
73+* `192x68` cq35 10-bit: RED, `frame 1 plane Y: 305 pixels differ, first at row 56 col 48
74+ (ours 530 vs ffmpeg 531)`.
75+* `68x192` cq35 8-bit: RED, `frame 1 plane Y: 141 pixels differ, first at row 0 col 64
76+ (ours 167 vs ffmpeg 166)` -- unchanged from r7 by either fix this round.
77+
78+NEW FACT for the successor: all four red cases are **+-1** bands, on **frame 1** (the first
79+INTER frame -- frame 0 is bit-exact in every one), and they sit in or immediately beside the
80+4-px straddling band (rows 56..63 next to straddling rows 64..67; columns 64..67 are the
81+straddling columns themselves). That is one straddling-band INTER reconstruction defect with
82+two orientations, not four defects -- and it is not the reference border (3b), not LR (3c) and
83+not intra (frame 0 exact).
84+
85+The gate now prints each attempt under `EC_GATE_VERBOSE=1` (`stream.rs`), because a desync
86+otherwise surfaces as a bare panic in `mc.rs` with no arm named.
87+
88+## Test totals
89+`cargo test -p ec-av1 --lib` -> `$HOME/.cache/golomb-suite-r8.log` (unit `golomb-suite-r8`).
90+See the handoff for the result line.
91+
92+## Residue disposition
93+* 68x192 / 192x68 straddling-band +-1 INTER defect -- **fix-now, next round**; it is this
94+ lane's whole remaining job and the successor has the four measurements above.
95+* `192x68` cq40 below-8x8 panic -- **deferred(lane-sub8's open desync)**; not this lane's code.
96+* `192x68` cq35 inter SB-level AB partition refusal -- **deferred(the AB-partition lane)**.
97+* LR cropped-plane fix ungated -- **deferred(a straddle gate arm with
98+ `--enable-restoration=1`)**; the base recipe disables restoration for every arm.