From 8fc2d7eca3f1516e0e51b658c65676d1b19851d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 2 Sep 2026 16:00:52 +0300 Subject: [PATCH] docs(mergefix): r4 handoff -- frame 1 is entropy AND prediction exact; the residual band is decode frame 2, x=96..127 --- lanes/mergefix-r4.handoff.md | 55 ++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/lanes/mergefix-r4.handoff.md b/lanes/mergefix-r4.handoff.md index 4acfbbc3..2bef6ae5 100644 --- a/lanes/mergefix-r4.handoff.md +++ b/lanes/mergefix-r4.handoff.md @@ -1,32 +1,37 @@ # lane-mergefix r4 handoff -Tip: lane-mergefix (this commit). Only change is the `EC_LFPARAMS` debug rung. +Tip: lane-mergefix 6bc2c8b (loop filter skip/pu_edge suppression + `blk_org_grid`). +Read `lanes/mergefix-r4.report.md`. -## Do not re-hunt: frame 1 is NOT a compound-prediction defect -Frame 1 pre-filter reconstruction is BIT-EXACT vs the oracle (0 px). The rung that showed -it: our `EC_AV1_PREFILT_DUMP16` (cropped 192x68, u16 LE) vs aomdec `EC_AV1_PREFILT_DUMP` -(cropped 192x68, u8). First differing prediction sample: NONE — there is none. -The divergence appears at the POSTDEBLOCK rung: aomdec's `EC_AV1_POSTDEBLOCK_DUMP` is the -mi-ALIGNED buffer (192x72 luma, 20736 bytes total), ours is the crop; crop to 68 rows -before comparing or you will read garbage. Frame 1 postdeblock: 7244 differing px, first -at row 0 col 0. Against the shared pre-filter picture libaom changes 718 px, we change -7345 — we filter 6753 px libaom leaves alone. +## Do not re-hunt: decode-order frame 1 is NOT a compound-prediction defect +Its pre-filter reconstruction is BIT-EXACT vs the oracle (0 px, both before and after +this round's fix). The r3 charter's "3376 px starting at row 0 col 64 = a 32x32 compound +skip block" was reading the GATE's frame numbering: the pixel gate compares SHOWN frames, +so its "frame 1" is DECODE-order frame 2. -## r5 job -1. Port spec 7.14.2 / libaom `set_lpf_parameters` suppression into `edge_params` - (decode.rs ~13276, whose comment states the now-false invariant): - filter only when `(curr_level || pv_lvl) && (!pv_skip || !curr_skipped || pu_edge)`, - `curr_skipped = skip_txfm && is_inter`. -2. Check the inter/var-tx LF TU grid: `EC_TXGRID_TRACE=1` shows all of frame 1's - `mi_row=16` publishing `w_mi=2 h_mi=2 tx_px=8` 8x8 TUs; libaom gives a skip-inter block - one whole-block `max_txsize_rect_lookup` TU. -Levels are ruled out: `EC_LFPARAMS=1` (new) prints frame 1 as -`level=[20,16,20,26] sharpness=0 delta_enabled=true delta_update=false -ref_deltas=[1,0,0,0,-1,0,-1,-1] mode_deltas=[0,0]`; max |delta| vs pre-filter is 10 in -BOTH decoders, so it is edge COUNT, not edge strength. +## First differing prediction sample, and the rung that showed it +Decode-order frame 2, pre-filter (rung: ours `EC_AV1_PREFILT_DUMP16` cropped 192x68 u16 LE +vs aomdec `EC_AV1_PREFILT_DUMP` cropped 192x68 u8): +`row 0 col 97: ours 42, aomdec 8` (col 96 MATCHES). All 1306 differing px lie in the +single 32-px column band x=96..127, rows 0..63 -- one 32-wide block column. Frames 0 and 1 +are 0 px at this rung. That band is the whole remaining straddling-gate failure. + +## Second, smaller residue (open) +Decode frame 1 post-deblock is 177 px off ON THE SHIPPED TREE, all in rows 61-67 +(bottom straddling band), cols 130-191: 143 px we filter that libaom leaves alone, 15 the +other way -- a y=64 horizontal-edge decision in the partial last mi row. Numbers this +round: 7244 (before the fix) -> 255 (suppression without `pu_edge`) -> 177 (shipped). + +## Rung gotchas (cost this round two runs) +- aomdec `EC_AV1_PREFILT_DUMP16`/`POSTDEBLOCK_DUMP16` SEGFAULT on an 8-bit stream; use the + 8-bit rungs there. +- aomdec `EC_AV1_POSTDEBLOCK_DUMP` writes the mi-ALIGNED buffer (192x72 luma, 20736 bytes + total) while its `EC_AV1_PREFILT_DUMP` writes the crop (192x68, 19584): crop before diffing. +- New rung `EC_LFPARAMS=1` prints the frame's loop filter params; frame 1 is + `level=[20,16,20,26] delta_enabled=true delta_update=false ref_deltas=[1,0,0,0,-1,0,-1,-1]`, + so levels are NOT the defect. ## Environment Stream `~/.cache/mergefix-tmp/str61.obu` md5 a14892ed0ba88b6ad2b566e251ea2d33 (`mkstr.sh`); -instrumented oracle `~/.cache/mergefix-tmp/aom-build/aomdec`. Note `EC_AV1_PREFILT_DUMP16` -SEGFAULTS on this 8-bit stream in aomdec — use the 8-bit rung there. -Artifacts: `~/.cache/mergefix-tmp/r4_{pre,ours,aom,apd}.f*`, `r4_lfgrid.txt`. +oracle `~/.cache/mergefix-tmp/aom-build/aomdec`; artifacts `~/.cache/mergefix-tmp/r4_*`; +gate logs `$HOME/.cache/mergefix-r4-gates.log`, `$HOME/.cache/mergefix-r4-sib.log`.