Commits
Commits on
ca4790ff3ec50db2bcffb1751a3cbbc29771cd7eFiltered to scripts/instrument-aom-oracle.shClear filter2026-08-30
Merge branch 'main' into lane-lr; LR gate is GREEN after the SGR table fixAhmet Kaan Gümüş · aadcbfd
Merge branch 'main' into lane-lr; LR gate is GREEN after the SGR table fix r9 resolved every conflict and hit its turn cap before compiling. I finished it: three of main's newer gate call sites were missing this branch's LoopRestorationParams argument (git merged the text cleanly and the result did not compile -- same semantic-conflict shape as the delta_q merge), and main's "a frame with loop restoration enabled" refusal is retired by this branch, so refusal_inventory drops it. The result: a_real_aomenc_stream_with_restoration_reads_lr_symbols_correctly PASSES. The one-pixel SGR gap that survived rounds 5, 6 and 7 was 7ad6d77's mistranscribed SGR_X_BY_XPLUS1 entries, not a sampling or stripe-boundary defect. Suite 260 passed / 0 failed.
Merge branch 'lane-palette': palette-Y blocks decode pixel-exactAhmet Kaan Gümüş · 2195bbd
Merge branch 'lane-palette': palette-Y blocks decode pixel-exact Blocker (3) closed. Root cause was call ORDER, not a table: every symbol was already bit-exact through read_palette_colors_y, and the range diverged exactly at decode_color_index_map's entry because libaom reaches decode_color_map_tokens from parse_decode_block AFTER the whole mode-info decode, including UV palette mode_info and filter_intra. We called it inline after the Y colours and never read UV palette mode_info at all. Fix: read UV palette mode_info, defer the index map past filter_intra. UV palette reconstruction stays refused by name. enable-palette leaves NEVER_EXERCISED with positive evidence -- the new gate passes --enable-palette=1 -- so intrabc is now the last entry. Two conflicts resolved here, both additive-vs-additive: - Neighbours' delta_lf_grid (lane-realworld) and the palette neighbour cache (lane-palette) are independent fields; kept both. - Three lanes each numbered their new oracle instrumentation rung "6". lane-palette's two are renumbered 8 and 8b behind superres's 6 and 7. Suite 256 passed / 0 failed.
instrument(av1): SGR real per-tap A/B ground truth + LR gate stream pinAhmet Kaan Gümüş · fb35afc
instrument(av1): SGR real per-tap A/B ground truth + LR gate stream pin Adds rung 6 to instrument-aom-oracle.sh: drops `static` from libaom's calculate_intermediate_result (restoration.c) so an external harness can call it directly. Extends lr-sgr-pin-harness.c to call it with the same uint8->int32 border-extend copy av1_selfguided_restoration_c does, and print the real per-tap A/B for all 9 dense-arm neighbours of the r6 failing pixel (row=61,col=6, V plane, seed 46, ep=6/xqd=[-16,-32]). Result: real libaom's "u" tap (physical row 60) is (253,454), not the (254,303) r6 recorded -- but this round's live EC_LR_SAMPLE_DUMP trace (temporary, reverted) shows our own lr_sample already returns the correct raw bytes (111/154/194 at that column across the 3 box rows, matching the harness's own /tmp/lr_full.bin buffer bit for bit), and an independent Python replica of compute_ab's box-sum/z/A/B formula fed those exact 9 bytes reproduces libaom's (253,454) exactly. So neither the samples nor the formula, evaluated in isolation, are wrong -- r6's (254,303) could not be reproduced this round and needs re-derivation from a uniquely-identified call, not a coordinate-matched one (multiple frames/seeds share v_start=60). Also wires EC_AV1_GATE_DUMP into a_real_aomenc_stream_with_restoration_reads_lr_symbols_correctly (mirroring the masked-compound gate's existing pattern) so a mismatching seed writes its stream for direct, unambiguous re-decode -- ran once this round, pinned seed 46's stream to fixtures/lr-sgr-r7.obu (gitignored, not in this commit).
fix(av1): palette-Y refuses by name instead of decoding to wrong pixelsAhmet Kaan Gümüş · 71d8f67
fix(av1): palette-Y refuses by name instead of decoding to wrong pixels r3's gate proved a real palette-Y block reconstructs to pixels that mismatch libaom despite every symbol read (colours, index-map wavefront, context, CDF table) checked line-for-line correct -- and left the gate SKIPping on that mismatch, which hid a real stream decoding to silently wrong pixels from the whole suite. decode.rs's palette_y_mode arm now returns a named refusal right after decoding the colours/map (palette_hits still fires, so the read path stays proven non-vacuous) instead of handing the wrong reconstruction to the caller; all the landed reconstruction code stays in place, unreachable until the pixel desync is found. The gate (a_real_aomenc_stream_with_palette_y_refuses_by_name, renamed from ..._decodes_pixel_exact) now hard-asserts that refusal fires with palette_hits > 0, instead of SKIPping on a mismatch. Also adds an EC_TRACE_PALETTE=1 rung to the aom-oracle instrumentation (decode_color_map_tokens's per-pixel range + av1_read_uniform's map[0]) for the next round's range-ladder bisect, per charter job 2. EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib: 235 passed, 0 failed, 17 ignored.
feat(av1): pre-deblock full-buffer oracle rung -- EC_AV1_PREFILT_WIDE_DUMPAhmet Kaan Gümüş · e0104c4
feat(av1): pre-deblock full-buffer oracle rung -- EC_AV1_PREFILT_WIDE_DUMP Rung 7: same anchor as the existing EC_AV1_PREFILT_DUMP (before loop filter/CDEF/superres), but dumps y_width/y_height (full aligned buffer) instead of y_crop_width/y_crop_height, so the margin region [FrameWidth, true mi-aligned width) is visible pre-deblock too -- separates a reconstruction bug in the margin from a deblock bug in the margin. Additive/new env var; the existing EC_AV1_PREFILT_DUMP rung other lanes already use is untouched. Rebuilt and verified clean.
feat(av1): postdeblock oracle rung -- EC_AV1_POSTDEBLOCK_DUMPAhmet Kaan Gümüş · 894d3a5
feat(av1): postdeblock oracle rung -- EC_AV1_POSTDEBLOCK_DUMP Add rung 6 to instrument-aom-oracle.sh: dumps cm->cur_frame->buf right after av1_loop_filter_frame_mt returns and before CDEF/superres run, same shape as EC_AV1_PREFILT_DUMP (full coded-width rows, Y/U/V, one file per frame). Rebuilt and verified with ninja -C ~/.cache/aom-oracle/build aomdec -- clean. This is the ground truth r4 identified as missing: post-deblock, pre-superres row content over frame_width..true_width, to compare against decode.rs's stashed superres margin at the failing row (frame 2, rows 17/18, output col 62 -- 2/4096 luma pixels off by 1).
feat(av1): trace the oracle's intra key-frame mode info tooAhmet Kaan Gümüş · c8e7f7e
feat(av1): trace the oracle's intra key-frame mode info too The rect-strip desync could not be bisected because libaom's key-frame path had no traced symbol at all between the partition read and the first coefficient block -- EC_TRACE_MODE covered only decodemv.c's inter path. That gap is exactly where the defect hides. EC_TRACE_MODE now also wraps read_intra_frame_mode_info and prints the msac range either side, with the decoded mode, uv_mode, skip and tx size. Same wrapper-around-impl shape, same idempotence guard, still silent when unset -- verified emitting on a real stream and silent without the flag.
feat(av1): coefficient and mode-info range-ladder rungs for the oracleAhmet Kaan Gümüş · 3e41e62
feat(av1): coefficient and mode-info range-ladder rungs for the oracle Two lanes stalled on the same missing instrument: the oracle's aomdec traced only read_partition, so a desync inside a coefficient block or inside the mv-stack/DRL/mv reads had no ladder to walk. Partition granularity is far too coarse for either. EC_TRACE_COEFF=1 wraps av1_read_coeffs_txb and prints the msac range before and after every coefficient block, keyed by plane/row/col/tx_size. EC_TRACE_MODE=1 wraps read_inter_block_mode_info and prints the range either side of a block's mode info, with the resulting mode, both refs and mv0. Same wrapper-around-impl shape as the existing partition rung, same idempotence guard, and both are env-gated: an uninstrumented run emits nothing, verified. Building the instrument is the first subtask, not the excuse.
feat(av1): commit the oracle localization instrumentation (was lost with /tmp)Ahmet Kaan Gümüş · 6632737
feat(av1): commit the oracle localization instrumentation (was lost with /tmp)
scripts/instrument-aom-oracle.sh idempotently adds the two ladder rungs to the
oracle's aomdec, both env-gated so an uninstrumented run is unchanged:
EC_AV1_PREFILT_DUMP -> per-frame Y/U/V recon written after tile decode and
BEFORE loop filter/CDEF/LR (separates recon from filtering mismatches)
EC_TRACE=1 -> EC_PART/EC_PART_VAL with ctx, tell and msac RANGE per
partition symbol (the range ladder; compare ranges, never tell)
These existed only as hand edits in the reaped /tmp tree. Re-derived against
the pinned v3.13.3 source and verified byte-compatible with the pre-loss
instrument: EC_PART emits the identical rng values (frame 0 mi(0,0) bsize=9
rng=51744) and the dump is the same 4096+1024+1024 layout.
EVIDENCE: rect-flake-2.obu, oracle dump vs our EC_AV1_PREFILT_DUMP --
24/24 frames byte-identical.