Commits
Commits on
cbbd6e2ef6acafb00aeb55e460423f024126f90fFiltered to scripts/instrument-aom-oracle.shClear filter2026-09-02
2026-09-01
test(av1): every alt-ref gate now compares hidden frames -- decode-order compare at 13 sites + an --arnr-maxframes=0 second arm; finding: the gates' own recipes emit ~0 hidden frames (5 across 281 attempt-streams), the arm emits 1-3 each and all are pixel-exact; oracle rung 13 (EC_MODE_MV + EC_MODE_VAL stack=) lifted out of the hand-patched build tree into instrument-aom-oracle.shAhmet Kaan Gümüş · 33130e2
test(av1): every alt-ref gate now compares hidden frames -- decode-order compare at 13 sites + an --arnr-maxframes=0 second arm; finding: the gates' own recipes emit ~0 hidden frames (5 across 281 attempt-streams), the arm emits 1-3 each and all are pixel-exact; oracle rung 13 (EC_MODE_MV + EC_MODE_VAL stack=) lifted out of the hand-patched build tree into instrument-aom-oracle.sh
feat(av1): hidden-frame pixel oracle -- EC_AV1_FINAL_DUMP on both sides + the repo's first alt-ref gateAhmet Kaan Gümüş · 3f461cf
feat(av1): hidden-frame pixel oracle -- EC_AV1_FINAL_DUMP on both sides + the repo's first alt-ref gate Every pixel gate here compared decode_stream's output against ffmpeg/aomdec y4m, and both emit SHOWN frames only, so a hidden (show_frame=0) alt-ref frame -- which his films are full of, aomenc's default --lag-in-frames -- was decoded, stored into a reference slot and never compared to anything (class gate-blind-to-hidden-frames). - scripts/instrument-aom-oracle.sh rung 12: EC_AV1_FINAL_DUMP=<prefix> in the instrumented aomdec -> <prefix>.f<N> per DECODED frame (decode order, hidden included), after CDEF+superres+loop restoration, i.e. the frame as stored into the reference buffer; Y/U/V crop-sized rows, 8-bit u8 / high bitdepth u16 LE (bit-depth correct, unlike the u16->u8 narrowing debug dumps). - ec-av1 stream.rs: matching EC_AV1_FINAL_DUMP at the ref-slot store site, same layout; prefix from a thread-local (set_final_dump_prefix) falling back to the env var so a gate cannot race a sibling test's decode. - test helper decode_all_frames_vs_oracle() + gate a_real_aomenc_altref_sequence_hidden_frames_decode_pixel_exact: aomenc --auto-alt-ref=1 --lag-in-frames=25 --arnr-maxframes=0 on moving content, 8-bit and 10-bit, hard assert hidden >= 2, byte-exact per decode-order frame. Result: 43 frames / 3 hidden each depth, all pixel-exact. --arnr-maxframes=0 is load-bearing and measured: with libaom's temporal alt-ref filter on, the same recipe emits 0 hidden frames (vacuous gate).
2026-08-30
diag(av1): sbpart r7 -- per-symbol coeff range ladder localizes block2's true divergenceAhmet Kaan Gümüş · 36c2f06
diag(av1): sbpart r7 -- per-symbol coeff range ladder localizes block2's true divergence Rung 3's entry/exit EC_TRACE_COEFF proved block2's luma coefficient read (TxbSet::Luma64 corner, decode.rs:3214) is where the desync actually starts: entry rng=63764 matches the oracle exactly (confirming r6's mode-info prefix finding held all the way through skip/depth), but the luma read's own exit range (46984 ours vs 46344 oracle) diverges -- overturning r6's suspicion that around_rect's neighbour gather was the culprit; the gather only feeds skip_ctx/dc_sign_ctx, and both of those read identically (all_zero=0 both sides, dc_sign both agree). Added a new oracle rung (11, scripts/instrument-aom-oracle.sh, same EC_TRACE_COEFF flag) printing per-symbol rng inside read_coeffs_txb (eob/base_eob/after_bases/sign/post_golomb), plus matching entry/exit EC_COEFF/EC_COEFF_VAL markers at all 3 of decode_block_rect64's own read_coeffs/read_coeffs_rect call sites and rng on read_eob's own TRACE eob_pt/eob_extra lines. Range-laddered block2's luma block byte-for-byte against the oracle: eob (6) and base_eob (level=1) both match. First value divergence is the "base" symbol at scan position row=1,col=0 (pos=32) -- ours decodes value=3 (triggering an extra "br" read, final level 3), the oracle's equivalent position decodes level=1 with no br read at all. This is a NEW, sharper suspect than r6's around_rect/context-gather framing: the coefficient magnitude symbol itself (base_ctx's context computation, or the CDF row it indexes) for this specific scan position inside the 32x32 corner scan. Diagnostics only, no behavior change to the live gate (still red, same as r6 left it) -- sb_rect_hits()>0 unproven this round, not attempted since the fix itself wasn't reached within budget. cargo check -p ec-av1 --tests: clean, only pre-existing missing-doc warnings. Oracle rung env-gated, applied to the shared ~/.cache/aom-oracle tree and rebuilt (ninja aomdec clean), also captured in scripts/instrument-aom-oracle.sh so it reproduces from a fresh clone.
diag(av1): sbpart r6 -- merge main, build oracle rung 10, range-ladder block2Ahmet Kaan Gümüş · 75f3f89
diag(av1): sbpart r6 -- merge main, build oracle rung 10, range-ladder block2 Merged origin/main (170a5a3) into lane-sbpart; the only real conflict was stream.rs (adjacent test insertions from lane-realworld's deltaq gate and lane-tiles' tile-group/non-uniform-spacing gates landing next to this lane's sbpart tests) -- resolved by keeping both sides' complete functions in sequence, no interleaving. cargo check -p ec-av1 --tests: clean. Oracle rung 10 (scripts/instrument-aom-oracle.sh, EC_TRACE_MODE_STEP=1): per-symbol range ladder inside decodemv.c's ec_read_intra_frame_mode_info_impl (rung 5's renamed body) -- prints rng after skip, cdef, dq, mode, angle_y, uv_mode, angle_uv. Rung 9 was already taken by lane-lr on main by the time this round started; took 10. Matching istep instrumentation added to our own read_intra_mode_rect (decode.rs, same EC_TRACE_MODE_STEP gate, same "EC_ISTEP ... name=... rng=" format) so the two sides are directly diffable. Range-ladder result on the pinned mismatch (seed 42, EC_SBPART_GATE_ATTEMPTS=1): block2 (mi_row=0 mi_col=24)'s skip/cdef/dq/ mode/angle_y/uv_mode/angle_uv reads are BYTE-EXACT against the oracle -- same decoded values, same rng after every read. This overturns r5's "desync at block2's first symbol" framing: the desync is not in the mode- info prefix at all. It narrows the bug to what read_intra_mode_rect's caller (decode_block_rect64) does AFTER angle_uv returns: tx_select/depth, then the three coefficient reads (read_coeffs w/ TxbSet::Luma64 for the 32x32 luma corner, read_coeffs_rect w/ TxbSet::ChromaRect32x16 for each chroma plane), all keyed off Neighbours::around_rect's gathered skip_ctx/ dc_sign_ctx -- around_rect (decode.rs:2094) was NOT part of r5's inspection audit (which covered record_rect, the write side, and fill_skip_grid_rect/skip_txfm_ctx) and is the sharpest remaining suspect. Not fixed this round -- budget spent on the merge + building the range- ladder proof itself. See lanes/sbpart-r6.report.md.
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.