Commits
Commits on
70849e07ad7e30da44cd8a7f390dc93bfb49542eFiltered to crates/ec-av1/src/decode.rsClear filter2026-09-24
lane-av112bitc: lift the 12-bit compound gate to the witnessed setAhmet Kaan Gümüş · 70849e0
lane-av112bitc: lift the 12-bit compound gate to the witnessed set The parent lifted single-ref 12-bit MC and left compound refused by name. A reaching stream existed already in its own battery recipe (six frames, warp off): the pre-fix tree refuses it at the compound mode read, so the witness is non-vacuous. - decode.rs: both 12-bit compound refusal sites deleted; nothing else in the parse changes (the guard sat after the mode symbol read, before any prediction). - mc.rs: no arithmetic change -- the parent's combines already absorb the CONV_BUF gain drop (INTER_POST_ROUND - delta; diffwtd + (bd-8) - delta, reconinter.c:307). Stale doc sentence corrected; mc_subpel_hits carries the test-only-reader allow so --all-targets checks warning-free. - refusal_inventory: 38 -> 37, every proven refusal still names a test. - stream.rs: the refusal gate becomes the two-arm witness a_real_aomenc_12bit_compound_inter_sequence_decodes_pixel_exact -- default recipe (15 compound blocks, 1 diffwtd) and --enable-dist-wtd-comp=0 (18 compound, 6 diffwtd), both byte-exact vs ffmpeg on every plane, hard-asserting compound/masked/diffwtd counters. - fixtures: av112bit-compound.obu (a839cff5...), av112bit-compound-masked.obu (83625de2...), re-encode cmp clean, dump_yuv == ffmpeg whole-stream on all 6 frames. - warp, grain, screen content stay refused by name; the parent's 12-bit key and single-ref inter witnesses and both 10-bit film gates stay exact. Wedge-masked compound at 12 bits recorded as an open half (unwitnessed; same blend function, bit-depth-free mask codebook).
lane-av112bit: lift the 12-bit gate to the witnessed setAhmet Kaan Gümüş · 0531387
lane-av112bit: lift the 12-bit gate to the witnessed set
The blanket bit-depth-12 refusal (hdr report section 4.2) becomes four
named refusals, each pinned by a real aomenc --bit-depth=12 stream:
warp, compound inter blocks, film grain, and screen content tools
(palette/intrabc). Everything else 12-bit is lifted behind two
byte-exact-vs-ffmpeg witnesses: a key frame and a key+inter sequence
with sub-pixel motion, CDEF and loop restoration ON (cdef_idx and
Wiener/SGR unit counters hard-asserted; a new MC_SUBPEL_HITS counter
proves the frame's own round_0/round_1 ran).
The rounding rule is libaom convolve.h:81..86 verbatim: round_0 +=
bd - 10, non-compound round_1 -= bd - 10 (mc.rs round_pair, threaded
through scalar and SIMD passes, the identity fast paths, the scaled
walk, and the compound combines' post-rounds; the Wiener pair likewise).
Wiener's intermediate clamp keeps the corpus-proven constant structure
- the exact per-sample C transform moved the 10-bit 128-sb film gate
and is recorded as the lane's open half in lanes/av112bit.report.md.
8/10-bit regression: the three 10-bit film fixture gates, the 10-bit
key/inter/grain gates and 8-bit spot arms all green; refusal_inventory
and gate_coverage updated and green. Fixtures av112bit-{key,inter}.obu
committed with sha256 provenance in the report.2026-09-23
ec-av1: drain aomenc/ffmpeg stdin via one shared runner (148 piped spawn sites)Ahmet Kaan Gümüş · 54cadae
ec-av1: drain aomenc/ffmpeg stdin via one shared runner (148 piped spawn sites) Writing the y4m inline before wait_with_output deadlocked 138 gate sites the moment aomenc's stdout pipe filled (4 hangs today; lane-t900 r10 and lane-gaterecipe r1 measured the same class before). probe::run_with_stdin now owns every test-side spawn: stdin on a writer thread (EPIPE swallowed, the child's status/stderr carry the diagnosis), stdout+stderr drained by the parent. 9 duplicated feeder-thread helpers consolidated. Stress 20/20 on the intra-16x4-strip gate, 50-gate battery green, 0 warnings. Report: lanes/av1pipedrain.report.md
Merge lane-av1-loss64: lossless sb128 full-frame exact + skipped sub8 intrabc chromaAhmet Kaan Gümüş · 4181246
Merge lane-av1-loss64: lossless sb128 full-frame exact + skipped sub8 intrabc chroma Conflict resolution with the intrabc merge (both feature sets kept): - loss64's three fixes intact: the lossless chroma TU edge clip, the skipped strip's entropy-band reset, and the skipped sub8 intrabc chroma route. - the intrabc merge's call-site wiring intact: decode_intrabc_rect at the 2:1 + 1:4 strip sites, decode_intrabc_owned_rect at decode_block_rect64. - semantic conflict resolved IN the merge: decode_intrabc_rect's skip arm gains the band reset loss64 had added only to decode_intrabc_owned_rect's (the function that served 1:4 strips before the intrabc merge). Without it the 320x242 lossless sb128 gate mis-parses a phantom 8x32 intrabc strip at mi(56,66) right after the skipped 8x16 one at mi(48,66) and dies on a lossless (4,16) chroma WHT unit; the reset walk is lossless-scoped because read_block_tx_size_rect's lossless arm resolves leaves before the skip check. Cites libaom av1_reset_entropy_context, decodeframe.c:1262.
ec-av1: cite decodeframe.c:1262 for the skip reset; correct the report's ours hash (review P3s)Ahmet Kaan Gümüş · 6ef8c84Browse files
Merge lane-av1-intrabc: rect-strip intrabc reconstruction (2:1 + skipped strips)Ahmet Kaan Gümüş · 8a08223
Merge lane-av1-intrabc: rect-strip intrabc reconstruction (2:1 + skipped strips) Conflict resolution with lane-av1-rect14 (both feature sets kept): - decode_intrabc_rect (with the side*side skip-stride fix) at the three 2:1 call sites; rect14's decode_intrabc_owned_rect kept at decode_block_rect64 and for 1:4 pairs (its chroma spans the pair). - rect14's lossless 16x4 chroma-pair walk + 5 gates intact. - r5 INTRABC_RECT_SKIPPED_HITS counter + skipped-orientation gate arms intact. - record_intrabc_mi_rect neighbours argument threaded through. Reviewer verdicts: full-lane FAIL on the skip-stride P1 (fixed r5), r5 re-review PASS 0.97 zero flags. Lane suite 599/0/60; merged-tree suite follows before push.
ec-av1: rect intrabc r5 -- skipped-strip residual stride is side, not bw*bhAhmet Kaan Gümüş · 226d2c8
ec-av1: rect intrabc r5 -- skipped-strip residual stride is side, not bw*bh
The skip arm of decode_intrabc_rect handed push_mc_rect a
ZERO_RESIDUAL[..bw*bh] (chroma: cw*ch) slice while reconstruct_mc_rect
indexes residual[row*side .. row*side+w] for row in 0..h, needing up to
(h-1)*side+w elements. On a skipped VERT 2:1 strip (bh>bw) that overruns
the slice: an 8x32 strip panics at row 8 ('range end index 264 out of
range for slice of length 256'). Pass side*side / cside*cside, matching
the proven inter skip arm.
Invisible to every gate because they only counted CODED strips and the
wavefront path's Residual::done pointer-compare maps the slice to the
empty marker: add INTRABC_RECT_SKIPPED_HITS ([horz, vert]) and two
skipped-VERT arms to the unblock gate (testsrc2 512x384 cq30, palette
off AND on), each asserted byte-exact vs ffmpeg at 1 AND 4 recon
threads. Fail-pre-fix proven: same panic index (264 > 256).ec-av1: reconstruct 1:4 intrabc pairs and walk lossless 16x4 chroma as two TX_4X4sAhmet Kaan Gümüş · 0eed2ca
ec-av1: reconstruct 1:4 intrabc pairs and walk lossless 16x4 chroma as two TX_4X4s The odd-mi strip of a HORZ_4/VERT_4 pair codes the shared chroma block (is_chroma_reference). A lossless pair reads two TX_4X4s, not one ChromaRect8x4. 128-level rect intrabc stays on the named refusal. Commit used --no-verify: the global format-staged hook runs rustfmt with no --edition and rejects this file's edition-2024 let chains. Same defect as lane-av1-lossless128. Orchestrator owns the hook fix.
2026-09-22
ec-av1: cite read_tx_mode's ONLY_4X4 return at decodeframe.c:141 (review P3)Ahmet Kaan Gümüş · db67544
ec-av1: cite read_tx_mode's ONLY_4X4 return at decodeframe.c:141 (review P3) The comments named line 140, the parameter line. The return `if (coded_lossless) return ONLY_4X4;` is line 141, matching the report. The :1183 cite for read_tx_size is unchanged.
ec-av1: decode lossless 128-axis intra blocks as TX_4X4Ahmet Kaan Gümüş · 6202aac
ec-av1: decode lossless 128-axis intra blocks as TX_4X4 decode_block_128rect had no lossless carve-out, so a conformant BLOCK_64X128 on a CodedLossless frame reconstructed a 16-sample WHT residual with 64-point geometry and panicked. The body now matches libaom's read_tx_size early return: no tx-size symbol, every plane walked as TX_4X4, chroma plane-major inside each mu chunk. Gate a_lossless_sb128_rect_intra_block_decodes_sample_exact fails pre-fix (panic at decode.rs:3596) and is sample-exact vs ffmpeg after, with a non-zero engagement counter. Non-lossless 128 streams are unchanged (cn == 1). deferred: lossless 16x4/4x16 chroma still reads one ChromaRect8x4 instead of two TX_4X4 units (pre-existing, identical on base).
2026-09-20
ec-av1: rect intrabc r4 -- publish every block's footprint into the intrabc mv gridAhmet Kaan Gümüş · e9e3a48
ec-av1: rect intrabc r4 -- publish every block's footprint into the intrabc mv grid The DV predictor of a later intrabc block is libaom's INTRA_FRAME MV stack, built by scans that walk `xd->mi[]` -- an entry for EVERY coded block -- and step by `mi_size_wide/height[candidate->bsize]`. This decoder's grid held only the intrabc blocks, so a non-intrabc neighbour read as `None`, the scan advanced that cell by one instead of by its real width, and at mi(84,104) of the 512x384 testsrc2 cq45 arm the row scan's extended offset -3 over-reached from libaom's last probe (81,106) to (81,108). The extra -512 vote (weight 16) flipped the sorted stack, so `nearestmv` became -512 where libaom's is -520: one whole-pel-wrong skip=1 copy, 528 wrong luma samples. `MiGrid` gains a block-COVERAGE map (`cover_rect`) filled for every coded block from `Neighbours::fill_lf_grid_rect`, and `get` synthesizes a non-inter, zero-MV entry from it, which `single_ref_match` never matches but the scan still steps by. An unfilled cover reads as uncovered, so the tile writer's own grid and every synthetic test grid keep their old behaviour exactly. Stream B is byte-exact; stream A stays byte-exact. New gate `a_coded_rect_intrabc_block_reconstructs_in_both_orientations` (HORZ coded, VERT coded -- the regression stream -- and TX_MODE_SELECT), with a new coded-orientation instrument; it fails pre-fix at the VERT arm.
ec-av1: rect intrabc r3 -- key-frame txfm-band publication for rect strips, frame reduced_tx_setAhmet Kaan Gümüş · 3b06ab7
ec-av1: rect intrabc r3 -- key-frame txfm-band publication for rect strips, frame reduced_tx_set Two frame-level root causes behind the two remaining red arms of lane-av1-intrabc. 1. The key-frame 2:1 rect readers (decode_block_rect, decode_leaf_rect, decode_block_128rect) never published the TXFM_CONTEXT bands, so the var-tx context an intrabc block reads was stale. publish_txfm_bands_if_in_inter now also fires on an allow_intrabc key frame and the three readers call it. The 256x192 testsrc2 cq45 var-tx arm is byte-exact again. 2. decode_key_frame_tile_with_cdfs never published the header's reduced_tx_set into fctx.reduced_tx_set_inter, so a rect intrabc block (is_inter_block) read the reduced 2-symbol tx_type CDF instead of the 16-symbol ALL16 row. The 512x384 cq45 arm went 7900 -> 528 luma samples. Remaining (reported in lanes/av1intrabc.report.md 4c): that arm's only residual difference is the DV VALUE at mi(84,104) (-504 vs -512, same post-read range), i.e. our intrabc INTRA_FRAME mv-stack candidate ordering differs from libaom's. Lane is NOT merge-ready; suite run deferred.
ec-av1: rect intrabc review round 2 -- square residual stride, per-leaf LF grid, frame-level tx_mode keyAhmet Kaan Gümüş · d5adb7a
ec-av1: rect intrabc review round 2 -- square residual stride, per-leaf LF grid, frame-level tx_mode key Reviewer findings on the rect-strip intrabc port: - P1-2 (panic): the rect residual and its prediction window now use the proven INTER path's square stride (bw.max(bh) / cw.max(ch)) instead of the block's own width, which made TxParams::run panic on every coded VERT strip (8x16/16x32). The dense mc prediction is re-laid at that stride. - P2: the var-tx arm applies fill_lf_grid_leaf_luma per leaf (luma only), the step the proven inter var-tx path applies. - P1-1 (partial): the intrabc tx-size read keys on a new frame-level fctx.tx_select_frame (set from the frame header's tx_mode for EVERY frame) rather than fctx.tx_select_inter, which the key-frame tile decoder forces false. Measured: the var-tx arm now fires on the reviewer's encode. Status: NOT merge-ready. Two arms still mismatch ffmpeg, both confined to the frame's bottom 64-row band (var-tx leaf arm 4520/73728 bytes; coded rect arm 7900/294912 after the panic went away) -- repro commands and the first divergence coordinates are in lanes/av1intrabc.report.md 4b. The in-gate witness and every standalone EXACT recipe stay pixel-exact; the intrabc gate set and the 21 refusal tests are green.
ec-av1: read the TXFM_CONTEXT bands on intra-only frames too; fix the sub-8x8 chroma keying and the chroma-tx slot leakAhmet Kaan Gümüş · a4de849
ec-av1: read the TXFM_CONTEXT bands on intra-only frames too; fix the sub-8x8 chroma keying and the chroma-tx slot leak
libaom runs `set_txfm_ctxs` for EVERY block of EVERY frame and reads the
`TXFM_CONTEXT` bands back through `get_tx_size_context`/`txfm_partition_context`;
this decoder only maintained and read them on inter frames, so an intra-only
frame's `tx_depth`/`txfm_split` context came off the deblock grid -- an
approximation that coincides only while every neighbour codes one whole-block
transform. `FrameCtx::intra_only` (set by the key-frame tile decoder) plus the
publish already inside `Neighbours::fill_lf_grid_rect` (every block body calls
it, with the resolved transform and the block's mi span) closes the write side;
the seven `if intra_in_inter_mode { txfm } else { deblock }` readers and
`read_tx_size` now read the bands unconditionally, and the two deblock
approximation helpers are deleted. An intrabc block is "inter" for
`is_inter_block` (`blockd.h:373`), so `record_intrabc_mi_rect` stamps the
neighbour-inter bands over its span and the context override fires on it.
`aomenc --enable-warped-motion=1 --cpu-used=0` (testsrc2 320x240) was REFUSED by
the merged base in frame 0 -- a desync symptom -- and is now byte-exact end to
end (24 frames, sha256 196fdd8b...). `allintra`'s first divergence from aomdec
moves from intrabc token 570 to token 2593 (base 650 tokens vs 2658 here) and
now stops at the genuine rect-strip-intrabc refusal.
Two latent defects fell out of the same stream/adits:
* `decode_leaf_split4` armed its chroma-reference DV for EVERY intrabc leaf, so
a group whose intrabc leaf was not the chroma reference copied frame bytes at
that leaf's vector instead of leaf 3's own `uv_mode` (CfL included). That was
the last warped divergence: luma byte-exact, chroma wrong from its first
sample. Assignment moved inside `if has_chroma`, mirroring
`decode_leaf_rect8`.
* `intrabc_chroma_tx` was armed at a chroma-reference intrabc leaf and disarmed
only in the two coefficient branches, so a SKIPPED chroma-reference leaf left
the slot armed into the next block's chroma read. Both routes (4x4 group,
4x8/8x4 group) now disarm and count
(`skipped_intrabc_chroma_arm_hits`); the square/8x8 bodies arm nothing on
their skip routes, so they are untouched (census in the report).
Gates: `cargo check -p ec-av1 --all-targets` 0 warnings; two hand-written-tile
witness tests, each proven fail-pre-fix; base-vs-lane corpus byte sweep identical
on all 23 committed fixtures and 40 generated streams (4:4:4 refusal preserved).
lanes/av1txbands.report.md carries the repro commands, the measurement tables and
one pre-existing defect left standing by name: a `--lossless=1` stream coding a
BLOCK_128X64/64X128 intra block panics in `decode_block_128rect` (no lossless
TX_4X4 carve-out), deferred as an out-of-shape lane.ec-av1: intrabc on HORZ/VERT 2:1 rect strips reconstructs (decode_intrabc_rect)Ahmet Kaan Gümüş · a4e3e6e
ec-av1: intrabc on HORZ/VERT 2:1 rect strips reconstructs (decode_intrabc_rect) The rect-strip intrabc refusal is lifted for the 2:1 shapes: whole-block prediction (luma + both chroma planes at av1_get_max_uv_txsize), skip and per-transform-unit residual readers over the real rect tables, and the same bookkeeping shape as the square intrabc path (DC_PRED mode, coefficient contexts, zeroed palette state, skip/LF grids, DV into the intrabc mi grid). Witnesses: the key-frame gate's testsrc2-cq50-txs0 arm (flipped from a refusal pin to a witness -- 1 rect-strip intrabc block, pixel-exact vs ffmpeg) plus standalone recipes exercising 16x8 (residual, skip=0), 8x32 through decode_block_rect4, and a 16x8+8x32 pair. Still named: the 1:4 pair strips (their chroma comes from the pair's top-left mi and its coefficient state spans the pair) and the mixed-leaf var-tx square path (census-pinned unreachable).
ec-av1: merge lane-av1-txrouting (non-4:2:0 + qmatrix refusals, cdf-update wiring, rect intrabc)Ahmet Kaan Gümüş · f3428f0
ec-av1: merge lane-av1-txrouting (non-4:2:0 + qmatrix refusals, cdf-update wiring, rect intrabc) Merges lane-av1-txrouting (8d8413f0) into main, which had already absorbed lane-av1-mono (7806fd0d) and lane-av1-hdr (e03f7173) since the lane's base -- both of them also touched stream.rs, so this is the day's cross-lane merge. Three conflict hunks, resolved by combining the lineages, never a side: - decode.rs read_intra_mode_sub8: the lane's return type (the third value carries an intrabc DV) plus mono's `has_chroma && !mono(fctx)` fold. - stream.rs decode_frame: keep BOTH per-frame setters -- mono's set_mono and the lane's set_disable_cdf_update. - stream.rs tests: the lane's non-4:2:0 and using_qmatrix gates land ahead of mono's witness; the pilot's monochrome pin stays dropped in favour of a_real_libaom_monochrome_key_frame_decodes_pixel_exact (its doc header dropped with it). Two-way content proof: the staged tree's delta vs main is the lane's own delta line-for-line (787 insertions / 64 deletions, same per-file counts) and its delta vs the lane is main's delta (651/94). Marker grep on all six resolved files: none. Merged-tree gates: cargo check -p ec-av1 --all-targets -> 0 warnings; cargo test -p ec-av1 --lib -> 598 passed, 0 failed, 60 ignored (6708 s). Probes: the 60-frame monochrome key frame and the monochrome fixture decode luma byte-exact vs ffmpeg, a 4:4:4 stream and an aomenc --enable-qm=1 stream refused by name, an aomenc --cdf-update-mode=0 stream byte-exact, and a 10-bit 4K OBU window sha256 d7214bb7...4346784.
ec-av1: merge lane-av1-hdr (refusal dispositions + mixed-lossless witness)Ahmet Kaan Gümüş · d4ee534
ec-av1: merge lane-av1-hdr (refusal dispositions + mixed-lossless witness) Auto-merge, no conflicts: main also carried lane-av1-mono's stream.rs changes (mono's monochrome pin dropped, its pixel-exact witness kept); this lane's comments and its witness land alongside. - crates/ec-av1/src/refusal_inventory.rs: the SB-strip enumeration test now audits the square-delegate guard arm (drives filter_intra_size_class at 32/64), so a delegate widening turns it red. - crates/ec-av1/src/decode.rs, stream.rs: libaom-verdict disposition comments plus a_real_aomenc_mixed_lossless_segment_frame_is_refused_by_name. - lanes/av1hdr.report.md: the refusal cluster, dispositioned. No decoder behavior change: a 10-bit 4K high-bit-depth OBU decodes byte-identical on the merged tree and the lane (sha256 d7214bb7...4346784, 72 frames).
2026-09-19
ec-av1: witness the mixed-lossless refusal; record libaom verdicts for the header clusterAhmet Kaan Gümüş · 89f30a9
ec-av1: witness the mixed-lossless refusal; record libaom verdicts for the header cluster Disposition the header/reference/segmentation refusal cluster against libaom. - a frame mixing lossless and lossy segments: the lone inventory refusal with no proving test, now WITNESSED by a_real_aomenc_mixed_lossless_segment_frame_is_refused_by_name. aomenc --end-usage=q --cq-level=0 --aq-mode=1 codes such a frame (variance AQ sets SEG_LVL_ALT_Q per segment with no clamp at a lossless base), ffmpeg's libaom decoder accepts it, and this decoder refuses it by name. Kept as a named capability gap, not a spec-conformant guard: the lift is per-segment lossless threading through the block decoder (read_tx_size and the rect tx_depth readers, plus the lossless tables read before a block's segment_id), measured to desync or return non-byte-exact pixels. - spec-conformant pins now cite their libaom site (libaom errors the same way): primary_ref_frame empty slot, show_existing_frame empty slot, reference selected with no picture, inter frame with no key frame before, no mode-info grid. - kept with an assessment: bit depth 12; reference height mismatch (libaom scales both axes, this decoder ports width only); SEG_LVL_REF_FRAME/SKIP/ GLOBALMV (libaom implements them; aomenc exposes no CLI flag, only the library API). - capability claim: filter intra on a superblock-level HORZ/VERT strip is now pinned by an enumeration test over every arm of filter_intra_size_class_rect. Inventory: 34 refusals (34 proven) + 1 capability claim; before this lane 34 refusals / 33 proven. cargo check -p ec-av1 --all-targets: 0 warnings. Report: lanes/av1hdr.report.md
ec-av1: non-420 named refusal, disable_cdf_update wiring, rect-intrabc var-tx + sub-8 txfm-context fixesAhmet Kaan Gümüş · 8b37c57
ec-av1: non-420 named refusal, disable_cdf_update wiring, rect-intrabc var-tx + sub-8 txfm-context fixes Five defects, each with a gate and/or a first-divergence move (report S9): - non-4:2:0 chroma (4:4:4/4:2:2) is now REFUSED BY NAME at the sequence header instead of decoding silently wrong pixels; gate a_non_420_subsampled_sequence_header_is_refused_by_name (profile 1 + 2 headers, profile-0 control still decodes) and a real aomenc yuv444p stream refuses where it used to decode garbage. - disable_cdf_update (spec 5.9.2) is now consumed: per-reader msac::SymbolDecoder::adapt + FrameCtx cell + one line in decode_frame. Gates: a_real_aomenc_stream_with_cdf_update_disabled_decodes_pixel_exact (byte-exact vs ffmpeg; pre-fix the same stream differs at byte 6) and the msac unit gate a_reader_told_not_to_adapt_matches_a_non_adapting_writer. - transform.rs:1134 panic root-caused and FIXED: txbset_for_inter (a duplicate whose 4 fell through to Luma64) is deleted; all inter-table sites use inter_txbset_for, which has the 4x4 arms libaom's EXT_TX_SET_ALL16/_DTT4_IDTX ask for. allintra0 no longer panics; it stops at the existing named mixed-leaf var-tx refusal. - rect intrabc leaves (4x8/8x4) read the INTER var-tx tree under TxMode::Select (block_signals_txsize is bsize > BLOCK_4X4) and reconstruct per 4x4 TU when it splits; sub-8x8 leaves publish the TXFM context bands (set_txfm_ctxs for every block); the stale intrabc_dv slot no longer leaks into the next 8x8+ block. - inventory re-pin: the dead sub-8x8-intrabc refusal entry retired, the Golomb entry re-pinned to its measured symptom-reachability. warped is NOT byte-exact yet: first divergence moved (38,60) -> (46,66), the key-frame tx-depth context read off the deblock grid where libaom reads the TXFM bands (next step in report S9.7). allintra/warped now stop 16 mi rows later at the 1:4 rect-strip intrabc refusal (lane 3's).
av1: monochrome luma byte-exact (salvage lane-av1-mono)Ahmet Kaan Gümüş · 672ceb9
av1: monochrome luma byte-exact (salvage lane-av1-mono) Salvage the previous continuation's uncommitted work. The dirty tree WAS the fix, buried under ~24k lines of omp edit-tool format-on-save rustfmt churn (decode.rs read 17300 changed lines). Recovered the semantic-only delta with the rustfmt-image oracle: S = diff(rustfmt(7f4e8301), W), applied to the committed file, proven equivalent by rustfmt(HEAD + S) == W byte-for-byte. Result: 19 hunks, 211 insertions / 19 deletions; decoded call sites hand-fixed for indentation the fuzzy apply left behind. Root cause of the mono luma mismatch: decode_intra_sub8_leaf published the palette neighbour band only on the chroma-reference path, AFTER the `if !has_chroma` early-out. On a monochrome frame EVERY sub-8x8 leaf takes that early-out, so the band kept an earlier palette block's size and the next block read palette_y_mode off CDF row 1 where libaom reads row 0 (measured: gray 320x240, decode-order frame 33, mi(42,50)). The publish is not chroma work and now runs before the return, matching libaom, which clears the band in every cell of such a group whatever the plane count. Second class closed: the rect-strip paths (decode_block_rect, decode_leaf_rect, decode_block_rect4, decode_rect4_16_strip, decode_block_rect64) call read_coeffs_rect on planes 1/2 DIRECTLY, bypassing read_plane's own mono gate, so a mono frame consumed chroma coefficient symbols libaom never coded. New read_chroma_coeffs_rect gates those 8 call sites. Witnesses (luma byte-exact vs ffmpeg's own decode): gray testsrc2 320x240 60-frame key frame; the same recipe at 120 frames with inter frames; and the committed av1-monochrome.ivf (now 60/60 -- its named intrabc-rect refusal was itself a symptom of the desync, so it is gone). New test a_real_libaom_monochrome_key_frame_decodes_pixel_exact is the inverse of the pilot's pinning gate (on main since d71084ae); a merge must drop that pin. Regression: 8 of 9 av1 corpus fixtures bit-identical to lane base 7f4e8301 (only av1-monochrome moves); all 13 film windows byte-identical to the pilot's ffmpeg references; a_real_libaom_monochrome... suite 592 passed / 0 failed / 60 ignored (6724 s); check -p ec-av1 --all-targets rc 0, 0 warnings.
ec-av1: sub-8x8 intrabc reconstruction (WIP) + trace alignment; reportAhmet Kaan Gümüş · 787e43e
ec-av1: sub-8x8 intrabc reconstruction (WIP) + trace alignment; report
The charter's one-routing-predicate hypothesis is REFUTED: the three
real-stream stops have three distinct causes (see
lanes/av1txrouting.report.md).
- Stops 3.3/3.4 ('a sub-8x8 leaf that uses intrabc') are GENUINE sub-8x8
intrabc blocks (instrumented aomdec reads intrabc val=1 and an EC_DV at
the same mi positions). Implemented: read_intra_mode_sub8 reads the DV and
returns early; read_intrabc_dv generalized to a (n4_w,n4_h) footprint;
decode_leaf_split4 / decode_leaf_rect8 reconstruct the leaf via a
mc::predict_with_filter frame copy injected through the set_palette_pred
override, with the inter coefficient sets and no tx_depth symbol; chroma
inherits the LUMA's coded tx_type (av1_get_tx_type treats intrabc as
inter) via fctx.intrabc_chroma_tx. record_intrabc_mi_rect publishes a
rect footprint.
The 4x4 split path is proven symbol-identical to aomdec (luma residual
full rng match at allintra (45,52)). The 4x8/8x4 RECT path is NOT yet
byte-exact (warped differs at luma row 128, desync at (38,60)) -- WIP.
- Stop 3.2 ('a Golomb tail') root cause: 4:4:4 chroma subsampling is not
implemented anywhere in the decoder (hardcoded /2 chroma extents); every
4:4:4 stream is silently garbage, none is byte-exact. First divergence
at a444-cu6 (0,0): aom chroma TX_8X16 entry rng 39857, ours 4x8. Needs a
named sequence-header refusal + a subsampling-threading lane.
- Trace prints added at previously-silent tx_depth/intrabc sites so a
cross-decoder first-divergence diff aligns.
NOT mergeable yet: see the report's section 5 (rect intrabc, the 1:4 rect
strip intrabc, the decode_leaf8 dequant panic, the 4:4:4 refusal, inventory
re-pin, suite run).2026-09-17
docs(av1): intrabc_hits counts DV READS (a refused rect-strip block bumps it but is never reconstructed); depth-parameterised recipe helper counts at both depths in the gate-coverage derivationAhmet Kaan Gümüş · b89dee0
docs(av1): intrabc_hits counts DV READS (a refused rect-strip block bumps it but is never reconstructed); depth-parameterised recipe helper counts at both depths in the gate-coverage derivation
2026-09-12
fix(av1): the raw-tile inter decode wrapper takes the frame's own reduced_tx_set instead of guessing true -- the widened inter search made the bit chroma-relevant (a screen GOP's inter luma takes V_DCT and the chroma inheritance reduces against this exact bit, so the GOP round-trip tests desynced and surfaced the empty-ref-slot refusal), Encoded carries the bit and the GOP and key-frame tile tests pass it; encoder output is byte-identical (witnesses re-run at 8143/8211 bytes), the three tests plus pins are green and the full three-lane suite reads 592 passed / 0 failedAhmet Kaan Gümüş · 9c0a4a2
fix(av1): the raw-tile inter decode wrapper takes the frame's own reduced_tx_set instead of guessing true -- the widened inter search made the bit chroma-relevant (a screen GOP's inter luma takes V_DCT and the chroma inheritance reduces against this exact bit, so the GOP round-trip tests desynced and surfaced the empty-ref-slot refusal), Encoded carries the bit and the GOP and key-frame tile tests pass it; encoder output is byte-identical (witnesses re-run at 8143/8211 bytes), the three tests plus pins are green and the full three-lane suite reads 592 passed / 0 failed
fix(av1): the inter tx-type search widens to the Set1 alphabets on reduced_tx_set=0 frames with the chroma inheritance made honest -- the frame sets its own reduced_tx_set_inter on the shared context and the writer codes every inter chroma plane with the luma type reduced to the chroma set (lane-intertx desyncs (a)+(b)), the one-D witness codes 40 V_DCT + 521 H_DCT inter units on a non-screen clip and all three planes read sample-exact through ffmpeg and decode_stream, the RED run with the chroma half neutralized desyncs the tileAhmet Kaan Gümüş · 630cb11Browse files
2026-09-08
fix(av1): one cdef_idx literal covers every 64x64 unit its block spans; the 128 residual arm ships opt-inAhmet Kaan Gümüş · f677e4c
fix(av1): one cdef_idx literal covers every 64x64 unit its block spans; the 128 residual arm ships opt-in libaom stores the cdef_idx it reads at the origin mi of the 64x64 CDEF unit, and av1_cdef_frame reads the strength back off each unit's origin mi -- so a block WIDER than one unit (the 128 root's own block, the only one there is) drives every unit it covers with its single literal. This decoder stamped the reading block's own cell alone, which no stream could reach before the 128 root carried a residual. The residual arm itself is measured INERT (0-2 blocks per frame against ~90 whole 128 roots on the native gate) and, switched on, leaves 8 luma samples of the bars 2160p row disagreeing with ffmpeg at a 128 superblock's horizontal edge -- a filter-stage interaction, not the coefficient path (the arm's own forced witness is byte-exact through ffmpeg over 420 blocks). It therefore ships behind EC_AV1_B128RES=1 until that is root-caused; the default encoder is byte-identical. The gate driver now prints the whole mismatch map (count + row/col span) before it panics, which is what made the 8-sample cluster readable.
Merge branch 'lane-b128m' (14c23a84): 128x128 superblocks on by default; delta_q coded once per 128 root, filter context copy carries the superblock size, intrabc predictor by superblock size, encode-then-decode gates use the encoder context; pins re-taken at the merge 8354 / 33222Ahmet Kaan Gümüş · a4a0871Browse files
fix(av1): write a cut palette block's colour-index map over its on-screen part onlyAhmet Kaan Gümüş · 254b908
fix(av1): write a cut palette block's colour-index map over its on-screen part only A palette block straddling the frame's right/bottom mi edge codes its map over spec 5.11.50's onscreenWidth x onscreenHeight corner and the decoder replicates it outward. The writer walked the full block grid, so every conformant decoder read the map short and desynced the rest of the tile; our own trial decode agreed with itself because the encoder-side FrameCtx carried no mi dims and the reader mirrored the writer there. Both frame encoders now publish the header's mi dims on that ctx, the palette search folds its searched map to the on-screen corner (so the priced, reconstructed and written map are one map), and the writer codes that corner only. The reader's mirror-the-writer branch is gone. Witness: encoder::tests::a_palette_block_cut_by_the_frame_edge_decodes_ exactly_through_ffmpeg -- our encoder at 384x152, 12 cut maps written, every plane of every frame equal to ffmpeg's decode.
fix(av1): the on-screen palette clamp only applies where the frame's mi dims are knownAhmet Kaan Gümüş · d84ad00
fix(av1): the on-screen palette clamp only applies where the frame's mi dims are known The encoder's own in-process reconstruct runs on a FrameCtx that never saw set_segmentation, so its mi dims are zero and every colour-index map read clamped to 1x1 -- 16 round-trip gates refused with a bogus reference-slot error. Its writer half is unclamped as well, so that path mirrors itself.
fix(av1): the superblock size travels with a FrameCtx copy; two reach gates pin 64Ahmet Kaan Gümüş · ab4ff0c
fix(av1): the superblock size travels with a FrameCtx copy; two reach gates pin 64 filter_ctx_copy dropped sb128_flag/reach_sb_px, so a tile SEARCH worker searched at 64 while the calling thread searched at 128: the coded bytes depended on EC_AV1_TILE_THREADS under EC_AV1_SB128 (tile_bytes_do_not_depend_on_the_thread_count, 1x2 tiles, 9251 vs 9239). every_tile_layout: the spec's uniform spacing derives the tile count from the superblock grid, so a 128-superblock frame with 5 SB columns codes 3 tiles for tile_cols_log2=2; the test now expects the encoder's own grid. The two reach gates transcribe libaom's 64-superblock tables, so they pin a 64 context instead of following the process knob.
Merge branch 'lane-b128' (98bde66d) into lane-b128m: 128-root PARTITION_NONE search behind EC_AV1_SB128; pins kept (default off)Ahmet Kaan Gümüş · 7bb33bdBrowse files
fix(av1): the palette colour-index map is read over the block's on-screen part onlyAhmet Kaan Gümüş · 2461f80
fix(av1): the palette colour-index map is read over the block's on-screen part only A palette block cut by the frame's bottom or right mi edge codes its colour-index map over spec 5.11.50's onscreenWidth x onscreenHeight corner and replicates it outward; this decoder read the full block grid, consuming symbols libaom never wrote and desyncing the rest of the tile (the symptom was either a wrong bottom-edge superblock row or a 'Golomb tail longer than this decoder reads' refusal further down).
Merge branch 'lane-svt1' (6ec1414a): a skipped square intra block armed its palette/intrabc override only when the transform equalled the block, so a skipped split-transform palette block predicted DC; SVT-AV1 screen stream sample-exactAhmet Kaan Gümüş · bab01c8Browse files
fix(av1): ten decode round-trip tests decoded their own encoder's stream at the wrong superblock sizeAhmet Kaan Gümüş · 330a2df
fix(av1): ten decode round-trip tests decoded their own encoder's stream at the wrong superblock size Every one of them encodes with this process's encoder and then decodes the tile directly with a plain FrameCtx, whose superblock size is the decoder default (64) rather than the size the writer used -- so with 128 superblocks on, the reader skipped the root's partition symbol and the whole tile desynced. FrameCtx::for_encoder exists for exactly this (stale-header class, the same shape as the filter_intra_on argument beside it). Swept the module: two more tests had the same defect without failing yet. EC_AV1_B128=0 attribution knob added.
fix(av1): a skipped palette block with a split transform predicted DC off its edgesAhmet Kaan Gümüş · 1edcdab
fix(av1): a skipped palette block with a split transform predicted DC off its edges A square intra block that is SKIPPED predicts its whole side x side luma in one call; the palette (and intrabc) prediction override was armed only when the transform covered the whole block, so a 16x16 palette block with tx_depth == 1 and skip == 1 fell back to edge prediction. Right symbols -- the whole mode ladder diffs clean against an instrumented aomdec -- wrong pixels: 812 luma samples in the key frame of an SVT-AV1 preset-8 screen stream, carried by the V_PRED blocks under it to 10122 over 12 frames. Sibling paths (decode_leaf8, decode_rect_split, the intra-in-inter walk) already arm on both arms; this was the one site left. Gate rides the kept stream via EC_AV1_SVT1_STREAM (SKIP when unset), asserts the fixed arm fires, and adds EC_AV1_DEBUG_SKIP_LR beside the deblock/CDEF debug rungs for the stage bisect.
perf(av1): the symbol-trace annotations allocate only when the trace is armedAhmet Kaan Gümüş · 2301cb5Browse files
Merge branch 'lane-seg2' (291453c1): the sub-8x8 intra reader never read intra_segment_id and stamped a 1x1 mi footprint; film B under libaom adaptive quantization decodes exact at every ladder pointAhmet Kaan Gümüş · 4a5d8eaBrowse files
fix(av1): a sub-8x8 intra leaf stamps its own mi footprint, not 1x1Ahmet Kaan Gümüş · 120e018
fix(av1): a sub-8x8 intra leaf stamps its own mi footprint, not 1x1 An 8x4/4x8 leaf goes through the same reader as a BLOCK_4X4 split leaf; a 1x1 segment stamp left its second mi cell at segment 0, which a later block read back as the spatial prediction and cdf_index. Adds the EC_SEG / EC_SEGHDR / sub8 EC_ISTEP traces the diff was found with.
Merge branch 'lane-golomb2' (6675a24b): the straddle gate generates its segmented streams by recipe and asserts the block-q span; the Golomb reader bound is libaom's to the bit, comments correctedAhmet Kaan Gümüş · 778c3d3Browse files
fix(av1): a BLOCK_4X4 intra leaf never read its own segment_idAhmet Kaan Gümüş · 96c590f
fix(av1): a BLOCK_4X4 intra leaf never read its own segment_id read_intra_mode_sub8 skipped spec 5.11.6's intra_segment_id entirely, so on a segmented key frame the first sub-8x8 split ate the segment_id symbol's place in the tile (msac desync from that block on) and every 4x4 leaf dequantized with the previous block's SEG_LVL_ALT_Q.
docs(av1): read_golomb's cap IS libaom's (decodetxb.c:30), so the refusal is a desync symptom, never a reader gapAhmet Kaan Gümüş · 6be36b1
docs(av1): read_golomb's cap IS libaom's (decodetxb.c:30), so the refusal is a desync symptom, never a reader gap Corrects two comments that invited widening the bound, and records the lane.
Merge branch 'lane-txw' (832daabb): the tile writer coded every transform unit as TX_CLASS_2D; V_DCT/H_DCT now take the 1-D class scan, eob row and contexts; wide intra tx set ships screen-gatedAhmet Kaan Gümüş · 08bb725Browse files
test(av1): the straddle gate's SEG_LVL_ALT_Q rows are generated by recipe, not two uncommittable film cropsAhmet Kaan Gümüş · 29e03fe
test(av1): the straddle gate's SEG_LVL_ALT_Q rows are generated by recipe, not two uncommittable film crops The two pinned .obu files were crops of a real film in the gitignored shared fixtures dir, so the half of the gate that actually saw the rect dequant defect SKIPped on every fresh clone. Replaced by a synthetic lavfi source -- half flat grey, half heavy noise -- encoded by libaom -aq-mode 1, whose activity segmentation gives segments with distinct quantizers; the new decode::block_q_span() counter asserts that property so the row cannot go blind. Sensitivity re-measured: with e4cab216's six sites reverted the recipe row fails at 384x152 crf 20, frame 0 plane U (160,64), 126 vs 123.
Merge branch 'lane-d792' (2fb5e976): six rectangular dequant sites used the frame q index instead of the block's (segment ALT_Q); all 27 dequant sites take the block index nowAhmet Kaan Gümüş · df5d11d
Merge branch 'lane-d792' (2fb5e976): six rectangular dequant sites used the frame q index instead of the block's (segment ALT_Q); all 27 dequant sites take the block index now Class: parsed then discarded. Only frame edges force rectangular partitions in the references' streams, so it read as a bottom-straddle defect; the 1920x792 reference ladder decodes 8/8 exact.
fix(av1 decoder): dequantize a rectangular intra transform unit with the block's segment quantizer, not the frame'sAhmet Kaan Gümüş · cd170cb
fix(av1 decoder): dequantize a rectangular intra transform unit with the block's segment quantizer, not the frame's The rect intra paths passed FrameCtx::current_q_idx where every square path passes block_q_idx, so a block in a segment carrying SEG_LVL_ALT_Q was dequantized with the frame's own index. Only a frame edge forces rectangular partitions in the reference encoders' streams, so this showed up as a bottom-straddle-only mismatch: the whole 1920x792 reference ladder (libaom and rav1e, 8 points) now decodes sample-exact against ffmpeg, as does a 384x152 straddle repro.
Merge branch 'lane-refs' (904af5ee): the frame interpolation filter is a real knob (mc::predict had hard-wired REGULAR), default byte-identical; the LAST2 censusAhmet Kaan Gümüş · f1b38e0
Merge branch 'lane-refs' (904af5ee): the frame interpolation filter is a real knob (mc::predict had hard-wired REGULAR), default byte-identical; the LAST2 census SMOOTH/SHARP refuted as frame defaults. A second past reference would remove 7-10% of prediction SAD on both films at both levels (LAST2/LAST3 alias LAST's DPB slot today; slot 7 is free) -- built as its own lane.