Commits
Commits on
main2026-09-30
lane-av1422llinter2: a lossless chroma plane block is per-axis, so the 8x8 leaf's TX_4X4 walk is gated on its SHAPE, not on 4:4:4Ahmet Kaan Gümüş · 3685753
lane-av1422llinter2: a lossless chroma plane block is per-axis, so the 8x8 leaf's TX_4X4 walk is gated on its SHAPE, not on 4:4:4 libaom's read_tx_size (av1/decoder/decodeframe.c:1197) returns TX_4X4 for EVERY plane of a lossless block, and get_txb_ctx (av1/common/txb_common.h, the chroma branch) reads txb_skip_ctx = combine_entropy_contexts(a,l) + ctx_offset with ctx_offset 10 whenever the plane block is bigger than the transform. The plane block is per-axis -- av1_ss_size_lookup[BLOCK_8X8][ss_x][ss_y] is 8x8 at 4:4:4, 4x8 at 4:2:2, 4x4 at 4:2:0 -- so a lossless 8x8 inter leaf codes a 2x2 raster of TX_4X4 units at 4:4:4, a 1x2 raster at offset 10 at 4:2:2, and a SINGLE unit at offset 7 only at 4:2:0. All three 8x8-leaf lossless arms (single-ref inter, compound inter, intra-in-inter) gated that walk on `chroma_w == 8`, i.e. on ss_x == 0, so 4:2:2 fell through to the one-unit TX_4X8 read at offset 7. The first 4:2:2 chroma unit's txb_skip symbol then came out of the wrong CDF row against an identical coder state, which desynchronises the rest of the frame. The intra-in-inter arm additionally passed (chroma_w, chroma_w) where the plane block is (chroma_w, chroma_h). Gated on `chroma_w > 4 || chroma_h > 4` -- the same predicate read_inter_chroma_lossless already uses to pick the offset-10 rows -- and threaded the per-axis plane block and the composed grid's row pitch through leaf8_inter_chroma_lossless and the intra call.
Merge lane-av1422llinter (REPORT ONLY): the lossless 4:2:2 inter divergence is localised, isolated to 4:2:2, and its whole magnitude is pre-filterAhmet Kaan Gümüş · b510942
Merge lane-av1422llinter (REPORT ONLY): the lossless 4:2:2 inter divergence is localised, isolated to 4:2:2, and its whole magnitude is pre-filter Zero source change. Main verified the report-only claim: the branch's commit touches lanes/av1422llinter.report.md and nothing else, and the primary checkout was left clean. GEOMETRY CORRECTED: W_intrabc and X_intrabc_tiled are 320x240 4:2:2 (153,600 B/frame), NOT 300x256 -- the byte totals coincide, which is how a wrong guess stays plausible. Y_intrabc_10b is 300x256 10-bit. DECODE-vs-DISPLAY ORDER, which the brief asked for and which changes the reading: display frame 1 is DECODE frame 4. In decode order, decode frame 0 (shown; type=Key, intra, intrabc) is BYTE-EXACT, and decode frame 1 -- HIDDEN (show=false), the FIRST inter frame -- is 138,708 of 153,600 bytes (90%) wrong, with frames 2/3/4 at 127,180 / 83,617 / 123,247. So the divergence TRACKS THE HIDDEN FRAMES, exactly the mis-localisation the brief warned about; the 16-frame YUV is display order and EC_AV1_FINAL_DUMP is decode order (17 files each side, with a full display->decode map in the report). WHAT FRAME 0 EXONERATES: frame 0 is pure intra + intrabc -- no reference-slot read, no MV, no interp filter, no OBMC, no warp. Its exactness therefore exonerates the whole intra+intrabc path, and frame 1 is where the first reference read, the first motion vector, the first interpolation, the first OBMC and the first warp all happen. STAGE ATTRIBUTION, by identity not assumption: every post-reconstruction filter is INERT on these cells -- every frame header carries deltalf=false, lf_level=[0,0,0,0], cdef_bits=0, lr=[None,None,None], superres=false -- and measured: our PREFILT == POSTDEBLOCK == POSTCDEF on f0..f3, the oracle's FINAL == PREFILT, and PREFILTER-vs-FINAL on decode frame 1 differs by exactly the same 138,708 bytes as FINAL-vs- oracle, so 100% of the divergence is present BEFORE any filter. INSTRUMENT TRAP FOUND: the oracle's POSTDEBLOCK.f1 and POSTCDEF.f1 are byte-identical to PREFILT.f2 -- those rungs are FRAME-OFFSET BY ONE, so the apparent 29,775-byte 'deblock delta' is a scheduling artefact. TWO DISCREPANCIES FLAGGED, not asserted: Y_intrabc_10b does NOT refuse at frame 0 -- it emits 4 of the oracle's 17 decode frames and stops SILENTLY, and the 'Golomb tail longer than this decoder reads' string did not reproduce in three invocations of a freshly built bypassed binary (earlier the dc_sign lane saw it on its build). And a census of 27 corpus cells puts 22 exact, with the 242-tall odd-height cells failing at decode frame 0 in the intra key frame -- recorded as a SEPARATE defect.
lane-av1422llinter: the lossless 4:2:2 inter divergence is localised and isolated to 4:2:2Ahmet Kaan Gümüş · 677fb74
lane-av1422llinter: the lossless 4:2:2 inter divergence is localised and isolated to 4:2:2 Not fixed, not gated. The 4:2:2 sequence-header refusal means no committed test can reach the inter coefficient path, so the evidence is measurement plus a single-variable control, and this lane does not dress that up as a gate. Localised: the first bad frame is DECODE frame 1 (hidden), not display frame 1; every post-recon filter is proven inert; the divergence is entirely pre-filter. The first divergent unit is the 2nd inter block of decode frame 1 (mapping to luma (0,16)), where the decoded values still agree but the msac rng does not -- the offending read is in block 1's tx-size / 4:2:2 chroma coefficient region. Isolated by one source, one encoder, one setting, three chroma formats: 4:2:0 lossless 25/25 byte-exact, 4:4:4 lossless 25/25 byte-exact, 4:2:2 lossless bad at decode frame 1. Census of 27 corpus cells: 22 exact. The odd-height cells (242 tall) fail at decode frame 0 in the intra key frame and are a SEPARATE defect.
Merge lane-av1422llpred2: a chroma plane's reach is answered against the PLANE-SCALED block -- ll422_allintra now BYTE-EXACTAhmet Kaan Gümüş · ec5451f
Merge lane-av1422llpred2: a chroma plane's reach is answered against the PLANE-SCALED block -- ll422_allintra now BYTE-EXACT Root cause: libaom answers a CHROMA plane's has_top_right/has_bottom_left against scale_chroma_bsize(mbmi->bsize, ss_x, ss_y) (reconintra.c:1649 called from :1823), not the luma block's shape -- so at ss (1,0) a BLOCK_4X4 leaf is answered as BLOCK_8X4. That widens blk_col_in_sb to 0 where the one-mi-wide luma leaf reads column 1, taking libaom's 'leftmost column of superblock' arm (reconintra.c:429-435), which the per-block has_bl_4x4 table denies to us. Ours took the table's FALSE, never copied the below-left column, and the directional predictor's base term came off a replicated tail -- which is exactly why row0/col0 and both plane edges stayed byte-identical while the interior moved. Fix: Reach::of_tu_chroma with mi_bw/mi_bh from chroma_mi_shape(leaf_shape, ss_x, ss_y), a transcription of scale_chroma_bsize; only the 4x4/4x8/8x4/4x16/16x4 family is remapped, so ss (0,0) and any block of 8 or more pass through unchanged. Main verified on the branch with a bypassed release build vs aomdec --rawvideo: ll422_allintra is BYTE-EXACT (was Y 0 / U 2984 / V 3067), prediction-sum disagreements 453 of 9600 -> 0, and the ll420 / ll444 controls stay byte-exact. W_intrabc 917974/474453/487693 and X_intrabc_tiled 864325/421720/414871 -- the 16-frame lossless INTER cells barely move; they are a different mechanism. Oracle-flip control +1. Placement was ruled out before the reach was blamed (mi_col 49 is the odd-column chroma-reference leaf and setup_pred_plane snaps the origin to the even column; placement verified identical on both sides). NOT GATEABLE: 4:2:2 is refused at the header, so no committed test reaches the path -- measurement plus flip control is the evidence, and the change is not described as gated. Regression: 180 passed, 0 failed, 2 ignored (420/422/444/lossless/warp/intra).
lane-av1422llpred2: a chroma plane's reach is answered against the PLANE-SCALED block -- ll422_allintra is byte-exactAhmet Kaan Gümüş · 8530c01
lane-av1422llpred2: a chroma plane's reach is answered against the PLANE-SCALED block -- ll422_allintra is byte-exact ROOT CAUSE (named expression): libaom computes `bsize = scale_chroma_bsize(mbmi->bsize, ss_x, ss_y)` (reconintra.c:1649, called from av1_predict_intra_block at :1823), so a CHROMA plane's has_top_right/has_bottom_left are answered against the PLANE-SCALED block shape, not the luma block's. At ss (1,0) a BLOCK_4X4 luma leaf is answered as BLOCK_8X4 = 2 mi wide, 1 mi tall. MECHANISM: that widening puts `blk_col_in_sb = (mi_col & (sb_mi_size - 1)) >> bw_in_mi_log2` at 0 where the one-mi-wide luma BLOCK_4X4 reads column 1 (reconintra.c:421), so libaom takes the "leftmost column of superblock" arm (reconintra.c:429-435) -- `8 + 0 + 1 < 16 >> 0` is TRUE -- which the per-block has_bl_4x4 table denies. Ours was `Reach::of(4, px, py, ...)` -> `Reach::bottom_left` -> has_bl_4x4 at (row 8, col 1, per_side 16), index 257 -> HAS_BOTTOM_LEFT[3][32] = 84 = 0b0101_0100, bit 1 CLEAR -> below_left = FALSE, so the below-left column was never copied and the directional predictor's base term came off a replicated tail. FIX: `Reach::of_tu_chroma(..)` with mi_bw/mi_bh from `chroma_mi_shape(leaf_shape, ss_x, ss_y)` (encode.rs), the Rust transcription of scale_chroma_bsize -- only the BLOCK_4X4/4X8/8X4/4X16/16X4 family is remapped, every other size passes through, so at ss (0,0) and for any block of 8 or more this is the block's own (bw/4, bh/4). For the failing unit: bw_log2 = 1, blk_col = (49 & 15) >> 1 = 0, from_block = 8, sb_height = 16 - 8 = 8, `0 + 4 < 8 << 2 = 32` -> below_left TRUE. WHY THE SIGNATURE WAS INTERIOR-ONLY: build_directional_and_filter_intra_predictors (reconintra.c:1150-1158) copies n_left_px into left_col[0..3] and, only `if (n_bottomleft_px > 0)`, the next n_bottomleft_px into left_col[4..7]; with the reach denied left_col[4..7] is never copied. av1_dr_prediction_z3_c reads left_col[base]/[base+1] with base = (23*(c+1)+r) >> 6 (dr_intra_derivative[70] = 23). At p_angle 203 row 0 is above-driven and col 0 reads only left_col[0..3], so row0/col0 stay byte-identical and only the interior base term moves -- coefficients untouched, hence a bit-identical stream. PLACEMENT WAS RULED OUT FIRST, not assumed: the oracle's rung reports mi_col=49 while the unit lands at chroma x 96 -- both are right (49 is the ODD-column chroma-reference leaf, `is_chroma_reference`, av1_common_int.h:1454, and setup_pred_plane snaps the plane origin back to the even column, reconinter.h:392-393). Verified placement identical (both U planes agree byte-for-byte at chroma x 96..99 on the failing rows; 2400 chroma units per plane = a perfect 160x240 tiling on both sides) BEFORE blaming the reach. MEASURED BY MAIN on this branch, bypassed release build vs `aomdec --rawvideo`, `cmp`: - ll422_allintra: BYTE-EXACT (was Y 0 / U 2984 / V 3067); prediction-sum disagreements 453 of 9600 -> 0. - controls ll420_allintra and ll444_allintra: still BYTE-EXACT. - W_intrabc (16 frames): Y 917974 / U 474453 / V 487693 (U -53); X_intrabc_tiled: 864325/421720/414871 (unchanged within a few samples) -- the 16-frame lossless INTER cells are a different mechanism. Oracle-flip control: one oracle byte rotated moves the count by exactly +1. NOT GATEABLE, stated plainly: 4:2:2 is refused at the sequence header, so no committed test build can reach the fixed path; the evidence is the measurement table plus the flip control, and this change is NOT described as gated. Regression: 420/422/444/lossless/warp/intra -- see the merge message.
lane-stackbox: box the by-value fields in ec-opus, ec-ac3 and ec-vp9, and gate each crate on a measured boundAhmet Kaan Gümüş · 06c89bf
lane-stackbox: box the by-value fields in ec-opus, ec-ac3 and ec-vp9, and gate each crate on a measured bound
Same class as ec-av1's stack sweep (d202b8b4): a large struct returned BY VALUE from a public
constructor is a stack cost the CALLER pays. The inventory from that lane named these; this lane re-measured
each one, boxed the dominant fields, proved no output changed, and added a per-crate gate.
ec-opus::Encoder 87,024 -> 4,072 (21.4x) silk_nb/mb/wb, silk_stereo_nb/mb/wb, silk_buf
ec-opus::Decoder 7,576 -> 1,280 (5.9x) silk (it was already at 92.5% of budget)
ec-ac3::Ac3Decoder 20,024 -> 3,160 (6.3x) Core::exps/bap/coeffs/delay
ec-vp9::Decoder 10,944 -> 768 (14.3x) frame_ctxs: Box<[FrameContext; 4]>, ctx: Box<FrameContext>
API COMPATIBILITY: no public field type changed in any of the three crates -- ec-opus::Encoder/Decoder
and ec-vp9::Decoder have private fields, ec-ac3::decode::Core is pub(crate) and Core itself is
crate-private, and every public method signature (Encoder::new, Decoder::new, Ac3Decoder::new,
Ac3Decoder::with_options, vp9::Decoder::new) is untouched. The only observable change is a few extra
heap allocations AT CONSTRUCTION, not on the per-frame path.
NO OUTPUT CHANGE, per crate, before vs after: ec-opus lib 36/0 -> 42/0 (the +6 are the new gates) and
conformance 28/0/16 -> 28/0/16 unchanged (its closed-loop range-state-exact gate against the
RFC-vector-verified decoder); ec-ac3 lib 36/0 -> 43/0 and both matrices 8/0 and 6/0 unchanged; ec-vp9
lib 10/0 -> 16/0 and ALL eight bit-exactness integration families unchanged (keyframe 3, inter_pixels 3,
hbd 1, subsampling 3, odd_dimensions 2, scaledref 3, intraonly 1). Main re-ran the three crates' lib
suites on the branch: 42/0, 16/0, 43/0.
DELIBERATELY LEFT INLINE: ec-opus::Encoder::analysis (2,168) + celt (1,592) -- together already under
budget, so a Box per field buys no bound and costs a per-frame indirection on a hot path. ec-vp9::Picture's
public fields are 96 B of Vec handles, not a stack cost. A measurement, not a shrug.
Gate modules: crates/{ec-opus,ec-ac3,ec-vp9}/src/stack_budget.rs, same shape as ec-av1's (inventory
printer, bound asserted by name, a real small-thread capability arm, non-vacuity control).
PRE-EXISTING REDS CARRIED, not caused here: ec-ac3
encode_matrix::real_fixtures_round_trip_through_our_decoder_and_the_oracle and ec-vp9
keyframe_exact::lossless_64_matches_ffmpeg both fail NotFound on a missing fixture (the same
fixture-root shape the fixture-library verifier complains about); and ec-vp9 generates 5 warnings
(unused read_partition, TM_PRED, partition_probs, x_mis, y_mis) which are present on main too.lane-stackbox: box the by-value fields in ec-opus, ec-ac3 and ec-vp9, and gate each crate on a measured boundAhmet Kaan Gümüş · 958901b
lane-stackbox: box the by-value fields in ec-opus, ec-ac3 and ec-vp9, and gate each crate on a measured bound
Same class as ec-av1's stack sweep (d202b8b4): a large struct returned BY VALUE from a public
constructor is a stack cost the CALLER pays. The inventory from that lane named these; this lane re-measured
each one, boxed the dominant fields, proved no output changed, and added a per-crate gate.
ec-opus::Encoder 87,024 -> 4,072 (21.4x) silk_nb/mb/wb, silk_stereo_nb/mb/wb, silk_buf
ec-opus::Decoder 7,576 -> 1,280 (5.9x) silk (it was already at 92.5% of budget)
ec-ac3::Ac3Decoder 20,024 -> 3,160 (6.3x) Core::exps/bap/coeffs/delay
ec-vp9::Decoder 10,944 -> 768 (14.3x) frame_ctxs: Box<[FrameContext; 4]>, ctx: Box<FrameContext>
API COMPATIBILITY: no public field type changed in any of the three crates -- ec-opus::Encoder/Decoder
and ec-vp9::Decoder have private fields, ec-ac3::decode::Core is pub(crate) and Core itself is
crate-private, and every public method signature (Encoder::new, Decoder::new, Ac3Decoder::new,
Ac3Decoder::with_options, vp9::Decoder::new) is untouched. The only observable change is a few extra
heap allocations AT CONSTRUCTION, not on the per-frame path.
NO OUTPUT CHANGE, per crate, before vs after: ec-opus lib 36/0 -> 42/0 (the +6 are the new gates) and
conformance 28/0/16 -> 28/0/16 unchanged (its closed-loop range-state-exact gate against the
RFC-vector-verified decoder); ec-ac3 lib 36/0 -> 43/0 and both matrices 8/0 and 6/0 unchanged; ec-vp9
lib 10/0 -> 16/0 and ALL eight bit-exactness integration families unchanged (keyframe 3, inter_pixels 3,
hbd 1, subsampling 3, odd_dimensions 2, scaledref 3, intraonly 1). Main re-ran the three crates' lib
suites on the branch: 42/0, 16/0, 43/0.
DELIBERATELY LEFT INLINE: ec-opus::Encoder::analysis (2,168) + celt (1,592) -- together already under
budget, so a Box per field buys no bound and costs a per-frame indirection on a hot path. ec-vp9::Picture's
public fields are 96 B of Vec handles, not a stack cost. A measurement, not a shrug.
Gate modules: crates/{ec-opus,ec-ac3,ec-vp9}/src/stack_budget.rs, same shape as ec-av1's (inventory
printer, bound asserted by name, a real small-thread capability arm, non-vacuity control).
PRE-EXISTING REDS CARRIED, not caused here: ec-ac3
encode_matrix::real_fixtures_round_trip_through_our_decoder_and_the_oracle and ec-vp9
keyframe_exact::lossless_64_matches_ffmpeg both fail NotFound on a missing fixture (the same
fixture-root shape the fixture-library verifier complains about); and ec-vp9 generates 5 warnings
(unused read_partition, TM_PRED, partition_probs, x_mis, y_mis) which are present on main too.rename the odd-height pin to match its state, and make three pin gates visible to the fixture censusAhmet Kaan Gümüş · 0cdc604
rename the odd-height pin to match its state, and make three pin gates visible to the fixture census
1. `420_oddheight_320x236_diverging.obu` -> `420_oddheight_320x236.obu` (git mv; the file's bytes are
untouched, and its sha256/fnv pins are unchanged). It stopped diverging this batch, so the old name
was a claim that had become false. The two comment sites that describe the historical divergence now
say "then diverging" so the record is not silently rewritten.
2. Three gates built their pin path as `crate_pin(FILE)` with a `const FILE`, so the fixture census
could not resolve the literal and reported all three as UNPROVEN (`FAIL [invariant 4]`):
- the_counting_oracle_diff_attributes_planes_per_frame
- the_pinned_420_oddheight_320x236_witness_decodes_byte_exact
- a_420_lossless_alt_ref_1to4_strip_witness_is_byte_exact_in_decode_order
Each now passes the literal through `crate_pin("...")`, which is the form the census can prove and the
form every older pin gate in this file already used. `verify-fixture-library.sh` no longer reports
invariant 4. The gates still assert size + fnv1a64 + byte-exactness; only the path expression moved.
3. `scripts/fixture-library.tsv` regenerated (line numbers shifted, plus the renamed path).
Still RED, and NOT from this commit: `verify-fixture-library.sh`'s invariant 2 (committed pins present
but not tracked by git) lists five scratch .obu files in the repo-root `fixtures/` directory -- which is
gitignored, and which is where `pin_dir()` resolves. It is RED identically on the pre-rename tree
(checked in a scratch worktree), so it is an environment/repo-shape issue for a separate batch, not a
regression here.Merge lane-av1oddheightfork3: the odd-height var-tx fork is CLOSED -- a whole-block TXFM_CONTEXT publish was overwriting a var-tx tree's per-leaf sizesAhmet Kaan Gümüş · a0ac615
Merge lane-av1oddheightfork3: the odd-height var-tx fork is CLOSED -- a whole-block TXFM_CONTEXT publish was overwriting a var-tx tree's per-leaf sizes REACHABLE IN PRODUCTION, no bypass and no refusal: this is an ordinary 4:2:0 stream from aomenc's DEFAULT multi-threaded encode. Main verified the fix independently: the committed pin `420_oddheight_320x236_diverging.obu` decodes BYTE-EXACT against `aomdec --rawvideo` on the branch (cmp of the 16-frame dumps, 1,812,480 bytes each), where it was Y 234349 / U 56957 / V 52981 with 0/16 frames exact. The sibling `322x248` (16131 B, sha256 9e8c9c6c..., reproduced from the documented recipe after validating that recipe against the committed 320x232 pin first) goes 0/0/0 too. THE MECHANISM, and the ticket's two candidate shapes were resolved by measurement (oracle rung EC_VARTXCTX, added through scripts/instrument-aom-oracle.sh as rung 18 -- which ALSO re-derives the previously HAND-ADDED EC_VARTX print that lived in the oracle tree but in no script, so the next rebuild cannot lose it): at mi(44,60) the oracle reads above=8 left=8 txw=8 txh=16 ctx=13, ours read above=8 left=16 ctx=12. `above` AGREES; `left` DIFFERS (8 vs 16). THE DEFECT: `Neighbours::fill_lf_grid_rect`'s intra-only `txfm_partition_update_rect` -- the `set_txfm_ctxs` stand-in -- was called by four INTRABC var-tx bodies (decode_intrabc_rect, decode_intrabc_128rect, decode_intrabc_owned_rect, decode_rect4_16_intrabc) and published the BLOCK's own footprint carrying the block's transform size. But libaom's `parse_decode_block` is an EITHER/OR (decodeframe.c:1227-1236): the var-tx branch calls `read_tx_size_vartx` and NEVER `set_txfm_ctxs`; inside that branch the only writer is the per-resolved- leaf `txfm_partition_update(above_ctx+blk_col, left_ctx+blk_row, tx_size, tx_size)` (av1_common_int.h:1684-1695). The whole-block write belongs to the ELSE branch. Concretely: the INTRABC 8x16 at mi(44,58) split into two 8x8 leaves (ctx=17 s=0 row 0, ctx=16 s=0 row 2 -- identical on both sides) and the tree put 8 into left_txfm[44..48]; the whole-block publish then put the block's 16 back over those same four cells, so the next block, the 8x16 INTRABC at mi(44,60), read ctx 12 instead of 13, decided is_split 0 instead of 1, and read no children where aomdec read two. (The ticket's suspected `txfm_partition_update_rect` rect-extent mistake is REFUTED and pinned by a new test: the primitive's extent is the NODE and its value is the LEAF, exactly like `txfm_partition_update`, and `mi_size_*[txsize_to_bsize[t]]*MI == tx_size_*[t]` holds for every TX_SIZE including the rect ones.) THE FIX: `fill_lf_grid_rect` split into a wrapper, `fill_lf_grid_rect_after_vartx` and `fill_lf_grid_rect_inner(.., publish_txfm_bands)`; the four var-tx bodies call the suppressing variant. ONLY the band publish is suppressed -- the LUMA/UV tx-size grids, skip grid, ref/delta-lf grids and the intrabc coverage stamp are unchanged, and no decode arithmetic moved (band init, context arithmetic and the reader recursion are untouched). SECOND LATENT FINDING, fixed with it: the two LOSSLESS tree-reader arms returned a 4x4 leaf grid and wrote NOTHING, where libaom's else branch runs `set_txfm_ctxs(TX_4X4, xd->width, xd->height, 0)`; both now publish. SIBLING GRID, swept with a throwaway comparator over 104 committed .obu fixtures against live aomdec --rawvideo: 62 comparable, 62/62 byte-exact on all three planes, every frame exact, NOTHING moved to a non-exact reading. 41 the throwaway could not compare (probe refuses by name, or 10/12-bit packing differs) and 1 the oracle refuses rest on the crate's own gates; the lane makes no claim on those.
lane-av1oddheightfork3: the odd-height var-tx fork is CLOSED -- a whole-block TXFM_CONTEXT publish was overwriting a var-tx tree's per-leaf sizesAhmet Kaan Gümüş · 685bcb0
lane-av1oddheightfork3: the odd-height var-tx fork is CLOSED -- a whole-block TXFM_CONTEXT publish was overwriting a var-tx tree's per-leaf sizes The 320x236 and 322x248 cells measured 0/16 frames exact (Y 234349/U 56957/ V 52981 and Y 36286/U 13359/V 13001). The divergent read is the `txfm_partition` symbol of the INTRABC 8x16 block at mi(44,60): ours read ctx 12 where aomdec reads 13. The new oracle rung EC_VARTXCTX (rung 18 of scripts/instrument-aom-oracle.sh, which also re-derives the hand-added EC_VARTX print so a rebuild cannot drop either) shows `above` agreeing at 8 on both sides and `left` differing: 16 against 8. The writer is Neighbours::fill_lf_grid_rect's intra-only TXFM_CONTEXT publish, reached from four bodies that had just run a var-tx tree. libaom's parse_decode_block is an either/or: the var-tx branch publishes per leaf through txfm_partition_update and never calls set_txfm_ctxs, so the whole-footprint write had no libaom counterpart -- it overwrote the two 8x8 leaves of the split 8x16 block at mi(44,58) with the block's own 16. Fix: fill_lf_grid_rect is split so the four var-tx bodies can suppress that publish; the two lossless tree-reader arms now publish TX_4X4 over the block, which is what libaom's else branch writes and what makes the suppression sound. No decode arithmetic changed. Both cells are byte-exact against live aomdec (0/0/0, 16/16 frames), measured both ways -- reverted and restored -- and 62/62 comparable committed fixtures stay byte-exact. New committed byte-exactness gate the_pinned_420_oddheight_320x236_witness_decodes_byte_exact, mutation-proved (reverting the four call sites reds it by name with 234349/56957/52981), plus txfm_partition_update_rect_extent_is_the_node_not_the_leaf, which pins the rect extent the ticket suspected and refutes it. Regression: 181 passed, 0 failed, 2 ignored.
Merge lane-av1stacksweep: the by-value class gets a measured bound and a biting gate, and the last two inline CDF snapshots are boxedAhmet Kaan Gümüş · cd17c30
Merge lane-av1stacksweep: the by-value class gets a measured bound and a biting gate, and the last two inline CDF snapshots are boxed THE CLASS, swept at last: a large struct returned BY VALUE from a public constructor is a stack cost the CALLER pays, and the constructors NEST -- so one value's size is the multiplier and the chain length is the other factor. lane-av1enchang fixed ONE struct (DpbSlot::cdfs) and gated ONE constructor; nothing said which other types were checked. This lane measured them. FIX (layout only, same shape as 99750756): - `Encoded`: 30,728 -> 280 bytes (start_cdfs + next_cdfs were 99.2% of it). - `Av1Encoder`: 18,168 -> 2,944 bytes. `carried_cdfs` was a SECOND inline 15,232-byte CdfSnapshot that the first lane missed because nobody had measured it. - `DpbSlot::cdfs` now reuses the already-boxed snapshot (pointer copy) instead of boxing again. API-COMPAT VERIFIED, not assumed: start_cdfs/next_cdfs and CdfSnapshot are all pub(crate); a grep over crates/ outside ec-av1 for those names and for Encoded is empty, and Encoded's public fields keep their types -- the edith integration lane has nothing to update. No bitstream effect (Box::new(x) stores the same x), and the encoder families re-ran identical: 108 passed / 0 failed / 40 ignored twice. BOUND: 8,192 bytes, down from the 32,768 the lane first picked -- that number had been calibrated to a crate-private 15,232-byte table no caller can reach. The bound applies only to what a public fn can make a caller owe (one by-value return x chain depth). Worst public return is Av1Encoder at 2,944 = 35.9% of budget, so 2.78x headroom rather than 1.07x; it still catches pre-fix Av1Encoder 17.09x over, ec_opus::Encoder 10.62x over and pre-boxing Encoded 3.75x over. Derivation is asserted IN-TEST (DEEPEST_PUBLIC_CHAIN(4, counted from source) * worst * 8 <= 2 MiB, and the 2,101,248-byte stack is measured from /proc/self/task/<tid>/maps), so the number cannot rot into something nobody re-derives. GATE: crates/ec-av1/src/stack_budget.rs, 8 tests, ~0.05s, behind #![cfg(test)] so a shipped build carries none of it. Verified by Main on the staged merge: 8 passed, 0 failed, check clean. It includes the sorted inventory printer, the bound asserted by name, a capability test that really constructs the deepest public chains on a 1 MiB thread, source scans (one of which immediately named 15 modules the scan had not been reading -- a real hole), and a non-vacuity control that caught a live matcher bug (cutting only at '>' parsed Result<Decoder, Error> as the name "Decoder, Error"). MUTATION-PROVED TWICE, re-proven after the refactor: unboxing DpbSlot::cdfs reds the bound BY NAME at 139,960 B (17.09x) plus a SIGABRT in the tight-stack arm; growing Encoded by 64 KiB reds at 96,264 B (11.75x) plus SIGABRT. THE CAP ANSWER, which was the deliverable: 799 of 799 lib tests at RUST_MIN_STACK=2097152, ZERO stack overflows, one process per test. The one test that used to need more -- encoder::tests::the_facade_codes_the_same_bytes_as_encode_sequence, red at 2,097,152 and green at 3,145,728 -- is fixed BY THIS BOXING and now passes at 2,097,152. So nothing in the ec-av1 lib suite needs the 64 MiB cap. The single non-OK entry is a 600s TIMEOUT on a test that passes in release, not a stack limit. `.cargo/config.toml` is NOT edited: its comment is wrong on mechanism (the state it blames is Vec/VecDeque, i.e. heap; the only fixed-size stack local in the encoder path is a const in film_grain.rs) though right on conclusion; the report carries the exact replacement wording. SELF-CAUGHT FALSE POSITIVE, named rather than hidden: the first sweep flagged `a_doubly_cut_superblock_root_round_trips_in_every_plane` as a 2 MiB overflow -- it was a STALE BINARY (the test binary was rebuilt while the sweep ran). Re-verified individually against a stable build it is ok at 2,097,152, and the whole sweep was re-run clean after that. OUT OF SCOPE, RECORDED, NOT SWEPT: ec_opus::Encoder 87,024 B (10.62x over the bound, SIGABRTs below 352 KiB) is the class's live instance in a sibling crate edith consumes -- left alone deliberately (different crate, its own bit-exactness gates, no evidence taken here). Next by size: ec-ac3::Ac3Decoder 20,024, ec-vp9::Decoder 10,944.
lane-av1stacksweep: the per-test cap answer -- 799/799 at 2 MiB, zero stack overflowsAhmet Kaan Gümüş · 928f2fe
lane-av1stacksweep: the per-test cap answer -- 799/799 at 2 MiB, zero stack overflows The chartered release run on the boxed tree: 108 passed, 0 failed, 40 ignored, 651 filtered out, 308.46s (and an independent re-run: 108/0/40, 307.03s). Same counts as the pre-boxing run, so the layout change moved no verdict. The per-test 2 MiB sweep, one process per test so a SIGABRT is attributable instead of swallowing the run: 799 of 799, ZERO stack overflows. The one non-OK entry is a TIMEOUT -- every_tile_layout_decodes_sample_exact_through_ both_decoders hit the sweep's own 600s per-test budget, not a stack limit, and it passes in release. So nothing in the ec-av1 lib suite needs the 64 MiB cap, and this lane removed the last test that did (the_facade_codes_the_same_bytes_as_encode_sequence, 2097152 red / 3145728 green before, ok at 2097152 after). Report carries the full inventory table, the 8 KiB bound with both ends of its derivation asserted, both mutation proofs, the stale-binary false positive and how it was caught, and the exact replacement wording for the .cargo/config.toml comment -- which this lane does not edit.
lane-av1stacksweep: sweep the by-value class, gate it on a measured budget, box Encoded and Av1Encoder::carried_cdfsAhmet Kaan Gümüş · 74a9f69
lane-av1stacksweep: sweep the by-value class, gate it on a measured budget, box Encoded and Av1Encoder::carried_cdfs
THE CLASS, NAMED: a large struct returned BY VALUE from a public constructor is
a stack cost paid by the CALLER, and the constructors NEST, so one value's size
is the multiplier and the chain length is the other factor. Av1Encoder was
139960 bytes by value and aborted on libtest's 2 MiB thread, twice, on
unmodified main. lane-av1enchang fixed that ONE struct and gated that ONE
constructor. Nobody swept the class, and nothing said which types were checked.
THE FIX, same shape as lane-av1enchang (99750756) which boxed DpbSlot::cdfs.
Boxing the per-slot CdfSnapshot left two more copies of the same 15232-byte
table sitting inline, and nobody had measured either:
Encoded::start_cdfs / next_cdfs CdfSnapshot -> Box<CdfSnapshot>
Av1Encoder::carried_cdfs Option<CdfSnapshot> -> Option<Box<..>>
Encoded 30728 -> 280 bytes (99.2% was those two fields)
Av1Encoder 18168 -> 2944 bytes (15232 of it was carried_cdfs)
The VALUES are untouched, so the bitstream is byte-identical. The two fields
and CdfSnapshot itself are pub(crate), so this is NOT a breaking API change:
grep over crates/ finds no reader of either field outside ec-av1, and Encoded's
public fields (stream, reconstruction, modes, inter_block_share) keep their
types. refresh() now hands the already-boxed snapshot to the DPB slot instead
of boxing a second time.
THE SWEEP, crates/ec-av1/src/stack_budget.rs, 8 tests, 0.10s:
the_measured_inventory_is_accurate 21 by-value types, measured, and the
table PRINTS sorted so one command
reproduces the whole inventory
every_by_value_type_fits_the_stack_budget the bound, asserted BY NAME
the_deepest_by_value_constructors_fit_on_a_tight_stack
capability: both deepest public
chains really constructed on a 1 MiB
thread, so a regression ABORTS
every_by_value_public_return_is_in_the_inventory
source scan over 38 modules; a new
by-value pub return reds unmeasured
every_by_value_module_is_scanned the scan's file list derived from
lib.rs -- it immediately named 15
modules the scan was not reading
the_inventory_scan_is_not_vacuous control; it caught a live bug in the
matcher (Result<T, E> parsed as the
name "T, E")
the_crate_private_cdf_tables_stay_behind_a_box
pins the four Box<> declarations
test_threads_get_the_stack_they_are_given
the 2101248-byte floor the bound is
derived from, read from /proc, not
assumed
THE BOUND: 8192 bytes, derived from measurement at BOTH ends and asserted at
both ends. Bounded quantity is what a caller can owe: 2101248 bytes (measured,
/proc/self/task/<tid>/maps) x a 4-deep public chain x an eighth-of-the-stack
share, with the worst public return at 2944 B = 35.9% of budget. The test
asserts DEEPEST_PUBLIC_CHAIN * worst * 8 <= 2 MiB so the derivation cannot rot.
Catches: pre-fix Av1Encoder 17.1x over, Encoded-before-this-lane 3.75x over,
and ec_opus::Encoder (measured in a sibling crate by the same sweep) 10.6x
over. The crate-private Cdfs/CdfSnapshot are measured and listed but NOT
bounded, because no pub fn returns them -- bounding them would calibrate the
number to something no caller can reach.
MUTATION-PROVEN, both reverted and both re-run after the refactor:
unbox DpbSlot::cdfs (revert 99750756) -> "Av1Encoder is 139960 bytes, over
the 8192-byte by-value stack budget (17.09x)" by name, plus SIGABRT
grow Encoded by a 64 KiB inline payload -> "Encoded is 96264 bytes, over
the ... budget (11.75x)" by name, plus SIGABRT
THE CAP: the 64 MiB RUST_MIN_STACK in .cargo/config.toml was protecting
exactly this and no longer needs to. One debug test genuinely needed >2 MiB --
encoder::tests::the_facade_codes_the_same_bytes_as_encode_sequence, 2097152
red / 3145728 green -- and THIS COMMIT FIXES IT: it now passes at 2 MiB. A
799-test per-test sweep at RUST_MIN_STACK=2097152 is in the lane report. I am
not editing .cargo/config.toml, as chartered; the report carries the exact
replacement comment and states that its current wording is wrong (the state it
blames is Vec/VecDeque, i.e. heap; the only fixed-size stack local in the
encoder path is a `const` in film_grain.rs).
Measured deepest chain: 786432 bytes before, 475136 after (1 MiB gate is now
2.2x margin, was 1.33x). The ~470 KB that remains is the encode search's own
frames.
No decode.rs. No bitstream change. No .cargo/config.toml edit. No rustfmt.
Lane report: lanes/av1stacksweep.report.md.Merge lane-av1422llpred: per-axis reach for 4:2:2 chroma -- ll422_allintra U 3126 -> 2984, V 3139 -> 3067; plus a two-site class sweepAhmet Kaan Gümüş · 6f83d9c
Merge lane-av1422llpred: per-axis reach for 4:2:2 chroma -- ll422_allintra U 3126 -> 2984, V 3139 -> 3067; plus a two-site class sweep THE FIX: read_intra_chroma_lossless called tu_reach(side, side, col_off, row_off, 4 << ss_x(fctx), ...), and tu_reach passes ONE transform size as BOTH tx_w and tx_h -- so a TX_4x4 chroma unit's HEIGHT came from ss_x instead of ss_y. A chroma unit is 4 << ss_x luma px wide but 4 << ss_y tall; the two shifts coincide at 4:2:0 and 4:4:4, which is why only 4:2:2 could ever reach this. Now tu_reach_rect with tx_h = 4 << ss_y(fctx). The reach itself is libaom's has_bottom_left (reconintra.c:411, row_off + tx_size_high_unit[TX_4X4] < AOMMAX(mi_size_high[bsize] >> ss_y, 1)): 0 + 8 < 8 was false before, 0 + 4 < 8 is true now. The interior-only signature follows: build_directional_and_filter_intra_ predictors fills left_col[0..3] and extends to [4..7] only when n_bottomleft_px > 0, so with the reach denied our edge builder replicated left_col[3]; z3 reads [0..3] for row0/col0 (byte-identical) and the replicated tail for the interior. Feeding libaom's formula the 8-sample column reproduces the oracle's col0 exactly -- the arithmetic was right, the edge was short. MEASURED BY MAIN on a bypassed release build of the branch, per plane, vs aomdec --rawvideo: ll422_allintra Y 0 / U 3126 -> 2984 / V 3139 -> 3067; prediction-sum disagreements 490 -> 453 of 9600. W_intrabc (917974/474506/487694) and X_intrabc_tiled unchanged -- inter/intrabc streams do not reach the function. Oracle-flip control: rotating one oracle V byte moves V by exactly +1. CLASS SWEEP: two more instances of the same one-size-for-two-axes shape, both in decode_rect4_16_strip (18985, 19072), converted the same way. Measured a NO-OP on both 4:2:2 cells we have -- recorded as correct-for-the-4:2:2-port, NOT as a win; they are an identity at 4:2:0/4:4:4 where ss_x == ss_y, which is the only reason they are safe to land without a measurement. The remaining 15 tu_reach sites pass no subsampled size, and four sites already using separate sizes were already correct. NOT GATEABLE: 4:2:2 is refused at the sequence header, so no committed test can reach the fixed path; the evidence is the measurement table plus an isolation control, and the change is not described as gated. Regression: 175 passed, 0 failed, 2 ignored (422/lossless/444/warp/intra).
lane-av1422llpred: per-axis reach for lossless 4:2:2 chroma (r1: the found fix; r2: the class sweep)Ahmet Kaan Gümüş · 177f6ca
lane-av1422llpred: per-axis reach for lossless 4:2:2 chroma (r1: the found fix; r2: the class sweep) r1 -- THE FIX (lane-av1422llpred). read_intra_chroma_lossless computed the per-TU Reach with tu_reach(side, side, col_off, row_off, 4 << ss_x(fctx), ...), and tu_reach takes ONE transform size and passes it as BOTH tx_w and tx_h, so the transform HEIGHT came from ss_x instead of ss_y. A TX_4x4 chroma unit is 4 << ss_x luma px WIDE but 4 << ss_y luma px TALL; at 4:2:0 and 4:4:4 the two shifts are identical, which is exactly why both formats have been byte-exact and only 4:2:2 could reach it. Now tu_reach_rect with tx_h = 4 << ss_y(fctx) (decode.rs:37568). The sibling walk in decode_block already did this correctly with separate spans. libaom: av1_dr_prediction_z3_c (reconintra.c:609) with the reach decided by has_bottom_left (reconintra.c:411) -- row_off + tx_size_high_unit[TX_4X4] < AOMMAX(mi_size_high[bsize] >> ss_y, 1). Ours before: row_off + tx_h < bh -> 0 + 8 < 8 -> false, so below_left was denied. After: 0 + 4 < 8 -> true. WHY INTERIOR-ONLY: build_directional_and_filter_intra_predictors (reconintra.c:1150) fills left_col[0..3] and only extends to [4..7] when n_bottomleft_px > 0; with the reach denied our Edges::build replicated left_col[3] across 4..7. z3 reads left_col[base]/[base+1] with base = (23*(c+1)+r)>>6, so row0 and col0 only read [0..3] (byte-identical) while the interior reads the replicated tail. Feeding libaom's own formula the 8-sample left column reproduces the oracle's col0 exactly -- the arithmetic was right, the edge was short. MEASURED by Main on a bypassed release build of this branch vs the oracle (aomdec --rawvideo, per plane, 320x240 4:2:2 intra): ll422_allintra Y 0 / U 3126 -> 2984 / V 3139 -> 3067. Prediction-sum disagreements 490 -> 453 of 9600 paired units. W_intrabc and X_intrabc_tiled UNCHANGED (917974/474506/487694 and 864325/421718/414871) -- both are inter/intrabc streams and the changed function is reached only from intra lossless 4:2:2. Oracle-flip control: one oracle V byte rotated moves V by exactly +1. r2 -- THE CLASS SWEEP, done by Main, because r1 fixed one instance of a shape with more. tu_reach takes ONE size for two axes; grepping every call site for a subsampled single size found TWO more, both in decode_rect4_16_strip (18985 and 19072), both converted to tu_reach_rect with tx_h = 4 << ss_y(fctx). The remaining 15 tu_reach sites pass no subsampled size, and the sites that already used separate sizes (19022/19116/37613/37783) were already correct. MEASURED: a no-op on both 4:2:2 cells we have (W_intrabc byte-for-byte the same counts; ll422_allintra unchanged), so those two are recorded as correct-for-the-4:2:2-port and NOT as a measured win -- they are provably an identity at 4:2:0 and 4:4:4 where ss_x == ss_y, which is the only reason they are safe to land unmeasured. NOT GATEABLE, stated plainly: 4:2:2 is refused at the sequence header (stream.rs:1803), so no committed test build can reach read_intra_chroma_lossless at ss (1,0) and no committed test can gate this. The evidence is the measurement table plus the oracle-flip isolation control -- no source-scan substitute, and this change is NOT described as gated. Regression: 422/lossless/444/warp/intra -> 175 passed, 0 failed, 2 ignored.
Merge lane-av1oddheightfork2 (INSTRUMENT ONLY): the rect coefficient ladder now has aomdec's shape, and the 320x236 fork is REFUTED as an artefact and re-localisedAhmet Kaan Gümüş · 2177457
Merge lane-av1oddheightfork2 (INSTRUMENT ONLY): the rect coefficient ladder now has aomdec's shape, and the 320x236 fork is REFUTED as an artefact and re-localised Main verified the claim: the lane's build produces BYTE-IDENTICAL output to main on the pinned cell (cmp of the 16-frame 320x236 dumps, 1812480 bytes each), so nothing here is a decode change. INSTRUMENT (trace only, reads no bits): - : ADDED the missing rung -- without it every RECT unit was one ladder step short of aomdec, which is what made every previous comparison in this defect unreliable. - : moved to the end of the loop body so it carries the POST-br level and POST-br rng, matching aomdec's rung (decodetxb.c:317-338). - : the rung now prints above=/left=/maxblk=/tx=. - report §2 writes out every rung's label space and what is deliberately NOT compared (the oracle's column-major vs our raster), so the next lane does not re-discover it. REFUTED: the ticket's 'entropic fork at coefficient read 6 / 312 extra bits inside one TX_8X4 luma unit at mi(0,4)'. With the corrected ladder, coefficient units 0..1060 of frame 0 pair 1:1 with aomdec -- same count, tags, values, ctx and msac rng at every step -- and state first differs at the ENTRY of unit 1061, i.e. BETWEEN blocks. The 312-bit figure came from a ladder that could not resolve a rect unit's step count at all. Two earlier report lines (av1labelspace:94-101, av1partadvance:88-98) fall with it. RE-LOCALISED: ONE read. The var-tx partition symbol of the INTRABC 8x16 luma block at mi(44,60) blk(0,0), frame 0: ours symbol 0 (no split) at decode.rs:30017, aomdec symbol 1 (split) at decodeframe.c:1130-1132 -- after which aomdec reads two children (ctx=15 s=0 at rows 0 and 2) and we read none and take one whole-block transform. The category arithmetic is IDENTICAL on both sides ( vs libaom are line-for-line the same shape; maxblk=16 tx=8x16 -> category 4 -> ctx = 12 + (above<8) + (left<16)); ours reads above=8 left=16, so aomdec's 13 requires one of ITS TXFM_CONTEXT neighbours to be STRICTLY SMALLER than ours. The defect is therefore neighbour STATE in the TXFM_CONTEXT grid, not a rule and not arithmetic -- and it is NOT an intrabc special case ( sets inter_block_tx = is_inter_block || is_intrabc_block and takes the same vartx branch; no use_intrabc case exists on the path). §6 names the single next measurement (an EC_VARTXCTX rung printing above/left/txw/txh/ctx) and the two possible shapes with their different fixes; a follow-up lane is already on it.
lane-av1oddheightfork2: INSTRUMENT ONLY -- make the rect coefficient ladder the shape aomdec's is, and name the 320x236 forkAhmet Kaan Gümüş · 39a61cc
lane-av1oddheightfork2: INSTRUMENT ONLY -- make the rect coefficient ladder the shape aomdec's is, and name the 320x236 fork
No decode logic is touched. Four trace rungs, all env-gated, all reading no bits:
1. read_coeffs_rect gains tag=post_golomb (the square reader already had one),
so a rect unit is no longer one ladder step short of aomdec.
2. read_coeffs_rect's tag=base_eob moves from the read site to the end of the
loop body, so it carries the POST-br level and rng. aomdec prints its
base_eob after that coefficient's br loop (decodetxb.c:317-338); printed at
the read site the rung labelled the pre-br read and every rect unit disagreed
with aomdec by exactly its br tail.
3. read_block_tx_size_rect's txfm_split_rect prints above/left/maxblk/tx, so a
ctx disagreement names WHICH neighbour is wrong.
With these, coefficient units 0..1060 of frame 0 pair 1:1 with aomdec and the
state first differs at the ENTRY of unit 1061 -- between blocks, not inside one.
The 'fork at coefficient read 6 / 312 extra bits' record is an artefact of a
ladder that could not resolve a rect unit's step count, and is refuted here.
The single divergent read is the var-tx partition symbol of the INTRABC block at
mi(44,60) blk(0,0): aomdec ctx=13 s=1, ours ctx=12 s=0. Same category, so the
category arithmetic is right and our TXFM_CONTEXT neighbour is not. Not fixed;
lanes/av1oddheightfork2.report.md names the one measurement that closes it.Merge lane-av1enchang: box the DPB CdfSnapshot (Av1Encoder 139960 -> 18168 bytes), a tight-stack gate, and a measured SLOW-not-hung backstopAhmet Kaan Gümüş · 63edf39
Merge lane-av1enchang: box the DPB CdfSnapshot (Av1Encoder 139960 -> 18168 bytes), a tight-stack gate, and a measured SLOW-not-hung backstop
THE HAZARD: Av1Encoder was 139,960 bytes BY VALUE (eight inline CdfSnapshot DPB slots) and is returned
by value through three nested Result<Self> constructors, so any caller on a normal 2 MiB thread stack
crashes -- reproduced twice on a pre-fix binary built from unmodified main ('fatal runtime error: stack
overflow, aborting' at Av1Encoder::new), and the repo hid it behind .cargo/config.toml's
RUST_MIN_STACK=64MiB, which only covers the workspace's own cargo runs. Boxed: 18,168 bytes.
THE ~7 HOUR TEST IS NOT A HANG: it terminates and passes (old pin ea8fa18f, same test, byte-identical
output, 275.53s RELEASE; Main independently ran the encoder tests in release on this branch: 41 passed
0 failed 10 ignored in 166.64s, and the round_trip family 20 passed 0 failed). evals per search are
61.3 / 64.5 / 64.9 across 384k / 1.5M / 2M bps = FLAT, equal to the search's designed bound, so the
search is not pathological; the cost is full search x 60 superblocks x 48 frames x 8 arms x ~13x debug
penalty, and the high-bitrate arms dominate because the rate loop must walk q_idx DOWN from seed 100
into the 20s to spend an 8000-byte budget. Three gdb backtraces 20s apart show different functions,
different blocks and a changing base_q_idx -- progress, not a spin.
GATE the_pyramid_constructors_fit_on_a_tight_stack (1 MiB thread, both constructors): red/green in
milliseconds. Main verified it bites -- with the Box removed it dies 'fatal runtime error: stack
overflow, aborting' (SIGABRT); with it, green in 0.00s. Post-fix clean from 384 KiB; pre-fix overflowed
up to 2 MiB.
BACKSTOP (a backstop, NOT a fix for the cost): per-CALL 1800s ceiling on a worker thread
(EC_AV1_ENCODE_CALL_BUDGET_SECS) = ~16x the worst honest debug call, 1730x the worst optimized one.
Red-proofed: budget=1 fails loudly with test name, arm name, elapsed seconds and 'SLOW, NOT HUNG'; an
injected spin fails at 5m00s where pre-fix it hangs forever.
No decoder or bitstream behaviour changes: the CDF tables' VALUES are untouched, and the bitrate gate's
8 arms are byte-identical to pre-fix.lane-av1enchang: box the DPB CdfSnapshot (Av1Encoder 139960 -> 18168 bytes), gate the tight-stack requirement, and add a measured SLOW-not-hung backstopAhmet Kaan Gümüş · a441af7
lane-av1enchang: box the DPB CdfSnapshot (Av1Encoder 139960 -> 18168 bytes), gate the tight-stack requirement, and add a measured SLOW-not-hung backstop THE REAL DEFECT: Av1Encoder was 139,960 bytes BY VALUE (eight inline CdfSnapshot DPB slots) and is returned by value through three nested Result<Self> constructors (with_pyramid_and_rate_target -> with_pyramid -> new). Any caller on a normal 2 MiB thread stack CRASHES: reproduced twice on the pre-fix binary built from unmodified main, 'fatal runtime error: stack overflow, aborting' at Av1Encoder::new (encoder.rs:1519), from coredumpctl. The repo HID this behind '.cargo/config.toml [env] RUST_MIN_STACK = 67108864' -- a 64 MiB stack for the workspace's own cargo runs only, which is also why 'cargo test' wedges instead of aborting when the test binary is invoked directly. Box the per-slot snapshot: 139960 -> 18168 bytes (7.7x). The tables' VALUES are untouched. GATE: the_pyramid_constructors_fit_on_a_tight_stack spawns a 1 MiB thread and constructs both the flat and the pyramid encoder. Red/green in milliseconds instead of a 6m35s debug run. Verified by Main: with the Box removed the gate dies 'fatal runtime error: stack overflow, aborting' (SIGABRT); with it, green in 0.00s. Post-fix clean from 384 KiB (2.7x margin at 1 MiB), pre-fix overflowed up to 2 MiB. THE ~7 HOUR TEST IS NOT A HANG, and this lane measured it rather than guessing: it terminates and passes (old pin ea8fa18f, same test, byte-identical output, 275.53s RELEASE). evals per search are 61.3 / 64.5 / 64.9 across 384k / 1.5M / 2M bps -- FLAT, equal to the search's designed bound, so the search is not pathological. The cost is full search x 60 superblocks x 48 frames x 8 arms x ~13x debug penalty, and the HIGH-BITRATE arms dominate because the rate loop must walk q_idx DOWN from seed 100 into the 20s to spend an 8000-byte budget. 3 gdb backtraces 20s apart show 3 different functions, 3 different blocks and a changing base_q_idx (32/32/30) -- progress, not a spin. BACKSTOP, reported as a backstop and NOT as a fix for the cost: a per-CALL wall-clock ceiling on a worker thread (1800s default, EC_AV1_ENCODE_CALL_BUDGET_SECS) = ~16x the worst honest debug call (~110s, derived) and 1730x the worst optimized call (1.04s, measured). Red-proofed both ways: EC_AV1_ENCODE_CALL_BUDGET_SECS=1 -> FAILED, exit 101, message carries the test name, the arm name, the arm's elapsed seconds, the stuck call index and the text 'SLOW, NOT HUNG'; an injected spin_loop in encode_frames fails at 5m00s where pre-fix it hangs forever (injection reverted, 0 grep hits). BIT-EXACTNESS: round_trip_encode 108 passed 0 failed 40 ignored after the Box change; the bitrate gate 8/8 arms byte-identical to pre-fix; pyramid decode gates (display order through both decoders, three- and four-level) all ok. Main re-ran the round_trip family in release: 20 passed 0 failed. Lane report: lanes/av1enchang.report.md.
Merge lane-av1422llintra: 4:2:2 dc_sign vote double-count FIXED (ll422 intra control luma 75210 -> 0, W/X frame 0 byte-exact), and the vacuous 4:2:2 witness gate re-documentedAhmet Kaan Gümüş · 893f668
Merge lane-av1422llintra: 4:2:2 dc_sign vote double-count FIXED (ll422 intra control luma 75210 -> 0, W/X frame 0 byte-exact), and the vacuous 4:2:2 witness gate re-documented GOAL A -- HONESTY. 1cd7c85f: the merged gate the_pinned_422_lossless_inter_chroma_panics_refuse_by_name falsely claimed a 'Golomb tail' refusal and implied it covered the seven-site fix; it is renamed to the_pinned_422_lossless_inter_witnesses_are_present_and_refuse_by_name, its doc now says it asserts the 4:2:2 HEADER refusal (identical on the pre-fix tree aef4fa67, so VACUOUS w.r.t. the fix) and that no committed test can reach a 4:2:2 decode because the EC_AV1_ALLOW_422_PROBE bypass must never be committed. The non-reproducing claim is retracted, the sibling source-scan gate gets the same 'spelling scan proves nothing about pixels' scope note, and collateral damage from 69a3a4df (which had spliced the lpf doc into the MIDDLE of the av1422warp gate's doc comment, orphaning that gate's docs) is repaired. GOAL B -- THE FIX. a347784b, three chroma gathers (decode_rect_split lossless walk 12735, the measured fork site; read_intrabc_rect_chroma_split 17802; decode_block_rect64 tiled walk 19922). libaom's get_txb_ctx_general sums ONE dc sign vote per CHROMA CELL over txb_w_unit above / txb_h_unit left entries -- one each for a TX_4X4 chroma unit. At ss (1,0) one chroma column spans TWO luma mi columns, so around_mi_rect summed that column's whole-unit dc sign twice. dc_sign_ctx reads only the signum, so the doubling is invisible EXCEPT when above and left cancel: a+l=0 (ctx 0) becomes 2a+l=+a (ctx 2). 4:2:0 and 4:4:4 are immune (square plane block, uniform scaling). MEASURED, and RE-VERIFIED INDEPENDENTLY BY MAIN with a bypassed build of both sides on ll422_allintra.obu (oracle aomdec --rawvideo, per-plane count): MAIN 9367642a = Y 75210 / U 38235 / V 38240; BRANCH = Y 0 / U 3126 / V 3139. W 1214609 -> 917974 luma, X 1072597 -> 864325, both now with frame 0 BYTE-EXACT. Coefficient stream paired 311484 vs 311484 symbols with zero disagreements; oracle flip moves each count by exactly +1. STATED REGRESSION, kept deliberately: Y_intrabc_10b now REFUSES at frame 0 -- 'unsupported: AV1 tile (a Golomb tail longer than this decoder reads)' (verified by Main on the branch build) -- where it used to decode 16/16 with 1227876 wrong luma samples. Isolation control: the dc gather alone causes it, and the two defects interact (the dc gather alone is neutral-to-worse; only the pair is a large win). Kept because a named refusal beats silently wrong pixels (the crate's own convention), because 4:2:2 is unreachable in production (header refusal) so this is probe-only behaviour, and because the alternative leaves a diagnosed defect unfixed with W/X 19-24% worse. NO GATE, and none is possible: 4:2:2 is refused at the sequence header and the bypass must never be committed, so no committed test can execute these arms. Evidence is the measurement plus the isolation control -- not a source-scan substitute, which is exactly what Goal A criticises. Regression sweep on the branch: 70 passed 0 failed across the 422/lossless/444 families; Main re-ran it on the merged tree.
lane-av1422llintra: fix the 4:2:2 dc_sign vote double-count + lane reportAhmet Kaan Gümüş · 14409e1
lane-av1422llintra: fix the 4:2:2 dc_sign vote double-count + lane report libaom's get_txb_ctx_general sums one dc sign vote per CHROMA cell, over txb_w_unit above entries and txb_h_unit left entries -- for a TX_4X4 chroma unit, ONE above entry and ONE left entry. At ss (1, 0) one chroma column spans TWO luma mi columns, so the plain around_mi_rect walk summed that column's whole-unit dc sign twice. dc_sign_ctx only reads the vote's SIGNUM, so the doubling is invisible except exactly when above and left cancel: a+l = 0 (ctx 0) becomes 2a+l = +a (ctx 2), and the DC sign symbol is then read off the wrong CDF row and comes out inverted. 4:2:0 and 4:4:4 are immune because the plane block is square there, so the doubling scales the vote uniformly. MEASURED on the pinned 4:2:2 all-intra lossless control ll422_allintra.obu, paired against the instrumented aomdec: the V 4x4 unit at chroma (24, 8) of the BLOCK_32X8 at mi(2,8). The oracle's EC_DBGCTX reads above0=23 left0=13, which sums to dc 0 and reads dc_sign_cdf[0]; ours (EC_DCDUMP) summed the above column twice, got vote +1, read dc_sign_cdf[2], and the tile desynced from that symbol. rng agreed to the bit beforehand (40604 on both sides) and the level read 2 on both sides, so this is a CDF-row difference, not a level or a bit-position one. Three gathers still called the plain around_mi_rect where twenty-odd sibling sites already route ss (1, 0) through around_mi_422_chroma (which samples every second above cell): decode_rect_split's lossless chroma walk at 12735 (the site that produced the fork), read_intrabc_rect_chroma_split at 17802, and decode_block_rect64's tiled chroma walk at 19922. Each guard is byte-identical to the existing ones at 12865/13069/14327/44920 and a no-op at 4:2:0 and 4:4:4. EFFECT (own comparator, per-cell oracle-flip control included): - ll422_allintra LUMA becomes BYTE-EXACT (74 162 wrong -> 0); the whole 311 484-symbol coefficient stream now pairs with no disagreement; chroma 38 235/38 240 wrong -> 3 126/3 139. - W_intrabc and X_intrabc_tiled: frame 0 becomes BYTE-EXACT (first divergence moves from frame 0 to frame 1), totals down 24 % / 19 %. - Y_intrabc_10b: REGRESSION, named in the report -- it now REFUSES at frame 0 with the Golomb-tail guard where it decoded 16/16 wrongly. An isolation control (this fix on main, without the previous lane's chroma-unit mechanism) shows the refusal is caused by the dc gather alone and that the two defects interact: the dc gather alone is neutral-to-worse. Main's call to keep. - 4:2:0 / 4:4:4 lossless and every pinned 4:2:2 refusal gate: 70 passed, 0 failed. NOT GATED, and not described as gated: 4:2:2 is refused at the sequence header and the probe bypass must never be committed, so no committed test can execute the arms this touches. The evidence is the measurement, and the revert moves the numbers (ll422 luma 0 -> 75 210, W/X frame 0 exact -> diverging).
lane-av1422llintra: rename the 4:2:2 witness gate to what it asserts, and say what it does NOT coverAhmet Kaan Gümüş · 20d10af
lane-av1422llintra: rename the 4:2:2 witness gate to what it asserts, and say what it does NOT cover the_pinned_422_lossless_inter_chroma_panics_refuse_by_name asserted the 4:2:2 HEADER refusal, which fires before any of the seven sites lane-av1422lpf fixed is reachable and fires IDENTICALLY on the pre-fix tree (aef4fa67 prints the same string). So with respect to that fix the gate was VACUOUS -- it passed before and after. Its only real content is the three fixture pins. Renamed to the_pinned_422_lossless_inter_witnesses_are_present_and_refuse_by_name, doc rewritten to state that, and to state that no committed test can reach a 4:2:2 decode at all (the EC_AV1_ALLOW_422_PROBE bypass is a patch-run-restore hack that must never be committed), so the panic fix's evidence is the bypassed manual measurement in lanes/av1422lpf.report.md. The false 'Golomb tail refusal at frame 2' claim, which does not reproduce, is named and retracted in the doc. The sibling source-scan arm gets the same scope statement: it is a SPELLING scan and proves nothing about pixels. Also repairs collateral damage from 69a3a4df: that commit appended its own doc block in the MIDDLE of the lane-av1422warp gate's doc comment, so the warp gate (the_pinned_422_residual_compound_warp_witness_is_present_and_refuses_by_name) had lost its documentation entirely and the two gates shared one comment. The warp doc is moved back onto its own gate. The three pins (W_intrabc.obu, X_intrabc_tiled.obu, Y_intrabc_10b.obu: size + fnv1a64) are unchanged.
Merge lane-av1444altref: the 8x8 compound leaf now warps CHROMA per plane like libaom -- ll444_c byte-exact (0 wrong, was 317)Ahmet Kaan Gümüş · 26c159d
Merge lane-av1444altref: the 8x8 compound leaf now warps CHROMA per plane like libaom -- ll444_c byte-exact (0 wrong, was 317) The 4:4:4 lossless alt-ref residual was NOT a rounding difference: decode_inter_block8's compound arm warped the luma intermediates and left both chroma planes TRANSLATIONAL, while libaom's dec_build_inter_predictor runs av1_init_warp_params + av1_warp_plane inside its PLANE loop (reconinter_template.inc:248/262 -> reconinter.c:156) with a per-plane bail at reconinter.c:61 (block_height < 8 || block_width < 8). An 8x8 GLOBALMV compound leaf therefore had its chroma predicted by translation from the block's top-left, which is exactly why every affected sample was +/-1 with a bottom-right gradient (the MV is the affine derivative at the block CENTRE) and why the luma of the same blocks was exact. Four chroma warp calls added (U ref0/ref1, V ref0/ref1), each guarded by warp_plane_allowed(chroma_w, chroma_h); the same-class sweep also closed a latent defect where the SINGLE-REF arm guarded on width only, so a 4:2:2 BLOCK_8X4 chroma block warped where libaom bails. Evidence: ll444_c 0 differing bytes (cmp -l empty), 18/18 decode-order pictures clean; gate a_lossless_444_altref_leaf8_warp_chroma_is_byte_exact (byte-exactness on all 3 planes, oracle-flip control arm, reachability counter, committed fixture sha256 999a41d8...); mutation proof reds by name with (0,147,170) vs (0,0,0). Main re-verified: check clean, gate green, lossless/444/422/warp/obmc 101 passed 0 failed. The oracle's rung now carries a picture index (aom_ec_pict_idx), closing the pairing hole the previous lane named.
lane-av1444altref: FIX the 4:4:4 lossless alt-ref cell -- the 8x8 compound leaf warped LUMA only and left both CHROMA planes translational (0 wrong bytes now, was 317)Ahmet Kaan Gümüş · 97cb2e0
lane-av1444altref: FIX the 4:4:4 lossless alt-ref cell -- the 8x8 compound leaf warped LUMA only and left both CHROMA planes translational (0 wrong bytes now, was 317) ROOT CAUSE, and it is not a rounding difference: decode_inter_block8's compound arm called warp_affine_compound on the LUMA intermediates (49205 ref0, 49239 ref1) and left the chroma arms (inter0_u/inter1_u/inter0_v/inter1_v) translational. libaom warps PER PLANE -- reconinter_template.inc:248 av1_init_warp_params + :262 build_one_inter_predictor -> reconinter.c:156 av1_warp_plane, both INSIDE dec_build_inter_predictor's plane loop (decodeframe.c:701-768), i.e. run for every plane with that plane's own subsampling/origin/extent -- with a per-plane bail at reconinter.c:61 'if (block_height < 8 || block_width < 8) return;'. So an 8x8 GLOBALMV (affine) compound leaf had its chroma predicted by TRANSLATION from the block's top-left corner. WHY THE SIGNATURE WAS +/-1 WITH A BOTTOM-RIGHT GRADIENT: a GLOBALMV block's MV is the affine's local derivative at the block CENTRE, so a translation agrees with the warp at the centre and diverges linearly with distance from it -- zero at the top-left, growing toward the bottom-right, 1-2 LSB on this content. A wrong reference/weight would give a uniform offset and a rounding difference a +/-1 scatter with NO spatial gradient; the LUMA of the very same blocks was exact, which is the sharpest refutation of the rounding class. FIX: four chroma warp calls -- U ref0 (49333), U ref1 (49369), V ref0 (49432), V ref1 (49468) -- each guarded by warp_plane_allowed(chroma_w, chroma_h) (mirrors reconinter.c:61) and passing the plane's own origin/extent/subsampling. SAME-CLASS SWEEP, and it found a latent defect: the 8x8 leaf's SINGLE-REF arm guarded its chroma warp on WIDTH only (chroma_w >= 8), so a rect chroma block 8 wide and under 8 high (4:2:2 BLOCK_8X4) warped where libaom bails on block_height < 8; now warp_plane_allowed(chroma_w, chroma_h) (50379). All four inter arms now warp per plane. RESULT: ll444_c 0 differing bytes (cmp -l vs aomdec --rawvideo empty), all 18 decode-order pictures 0 in EC_AV1_PREFILT_WIDE_DUMP; parent 317 (0 Y / 147 U / 170 V), first diff decode picture 8. PAIRING HOLE CLOSED: the oracle rung had no picture counter, so block identity was ambiguous -- the oracle now carries aom_ec_pict_idx (decodeframe.c:89, bumped at :5493) and the rung (EC_CPRED, decodeframe.c:691) prints picture + full block identity + every sample, moved to the end of the plane loop to match the our-side rung (EC_CPRED, decode.rs:37184 in reconstruct_mc_rect); join is per PIXEL. The 7 diff cells in decode picture 8 are all 8x8 blocks: mi(8,72), mi(20,28), mi(52,46) compound_idx=0 COMPOUND_WEDGE with GLOBALMV on BOTH refs, plus mi(20,30) the inter-intra leaf. GATE: stream::tests::a_lossless_444_altref_leaf8_warp_chroma_is_byte_exact (stream.rs:8395) -- all 3 planes of all 16 displayed frames vs aomdec --rawvideo through the shared count_rawvideo_diffs comparator (size mismatch is a failure, not a pass); arm 2 rotates ONE byte of the oracle's own output (first U sample of frame 0) and requires the same comparator to report (0,1,0); reachability from compound_warp_hits_8 delta > 0. Fixture committed byte for byte (crates/ec-av1/fixtures/ll444_c_altref_leaf8_warp.obu, 512220 B, sha256 999a41d88a092840456d5e9de83590ab819a8a14686a694889e63c2258ff2bb8); scripts/fixture-library.tsv regenerated. MUTATION PROOF: with the fix reverted (4 chroma warp blocks deleted, the single-ref guard back to chroma_w >= 8) the gate reds BY NAME -- left (0,147,170) right (0,0,0) at stream.rs:8437 -- and is green again after restore. Verified by Main: cargo check clean; the new gate passes; lossless/444/422/warp/obmc 101 passed, 0 failed.
Merge lane-av1labelspace: label-space class sweep CLOSED (one family broken+fixed, one proven correct, 12 rungs structurally correct), and the 320x236/322x248 fork is reachable from aomenc's DEFAULT threaded encodeAhmet Kaan Gümüş · 0cea07a
Merge lane-av1labelspace: label-space class sweep CLOSED (one family broken+fixed, one proven correct, 12 rungs structurally correct), and the 320x236/322x248 fork is reachable from aomenc's DEFAULT threaded encode The sweep over every env-gated rung that prints an mi coordinate, by family: - A, the main partition walk (decode.rs:34933-35107): the ONE broken family -- the 16-level rung printed at16 raw while its 32-level sibling printed at32*MI. Fixed in lane-av1partadvance (72aa9e73); pixels did not move, only the label. - B, the rect partition walk (52346/52692/52836): all three levels carry the same *4 conversion relative to their own index -> one space. PROVEN CORRECT, not the bug. - C, the 12 mi-printing rungs (OUR_PART, EC_LEAF, EC_RECT64TU, EC_INTRA128, EC_SPLITSTRIP, TRACE_RECT_COEFF x3, TRACE_RECT32_END, EC_HALV, TRACE_RECT64_END): every one prints raw with no multiplier -- ONE uniform convention with no sibling to disagree with, so the shape cannot occur. PROVEN CORRECT structurally. No second instance of the bug exists. Pixel-space rungs (OUR_PRED/EC_MCPUSH/EC_OBMCREC) print a different quantity and are correctly excluded. REACHABILITY, one variable: same y4m, same flags, only --threads=8 vs --threads=1 --row-mt=0. --threads=8 -> 16562 B (the diverging family), Y 234349 / U 56957 / V 52981, 0/16 exact. --threads=1 --row-mt=0 -> 16459 B sha256 dccfb20853ff1e8cb629590fdcc8380a7c4e58292477b8154a03eea05431178b, Y 0 U 0 V 0, 16/16 exact. Not tiles: both streams are cols=1 rows=1 uniform_spacing; threading changes the rate-control/RD decisions, so the two are genuinely different content. Since aomenc DEFAULTS to multi-threaded, an ordinary 'aomenc --codec=av1 ... --cpu-used=0' command produces the diverging content: the defect is reachable, not a fixture artifact. This strengthens, and does not contradict, lane-av1gapremeasure's finding that --threads=1 / --row-mt=0 / --end-usage=q all make it exact. No gate and no decoder change in this lane: the defect is not fixed and its mechanism is still not located in code (fork pinned at coefficient read 6, inside a V-plane 8x8 unit's sign/Golomb tail). A pixel gate for an unexplained defect would be the ratchet pattern this wave has been removing.
Merge lane-av1422lpf: the 4:2:2 lossless inter chroma panic family is SEVEN sites, all fixedAhmet Kaan Gümüş · 15ad394
Merge lane-av1422lpf: the 4:2:2 lossless inter chroma panic family is SEVEN sites, all fixed
The previous lane found five; this one found seven (two are the INTRA twins of sites 1 and 5) and
measured the previous lane's 'site 3' to be NOT a bug (those counts are already per-axis: on the
failing cell write=(8,16) ss=(1,0) gives 4 rows x 1 col against a (4,16) plane block). Per site the
change is an EXTENT, and every one of them is identical at 4:2:0 and 4:4:4 where the chroma plane block
is square -- the two exceptions are named: site 1's stride*blk_h differs for a 64x128 4:2:0 block
(32x64 plane block), and site 4's VERT arm (4,8)->(4,16) at ss_y==0, because a PARTITION_VERT_4 pair
pairs on COLUMNS while ss_x==1 so the pair is 8x16 luma and 4:2:2 subsamples X only (HORZ_4 needs no
third shape at 4:2:2: each 16x4 strip is its own chroma reference with an (8,4) plane block).
END STATE, all diffs against a PRISTINE-MAIN binary built in a separate worktree, not claims:
- panics remaining on the three cells: 0 (was 3). Two now REFUSE BY NAME ('Golomb tail'), one decodes.
- regressions over 33 cells: 0. 6/6 4:2:2 committed pins EXACT, 17/17 4:2:2 lossy EXACT, 4/4 4:2:0
lossless EXACT, 2/2 4:4:4 lossless EXACT, all-intra controls EXACT, and the pre-existing divergences
(AB/O/Q/S, ll444_c altref) show IDENTICAL counts.
- the three cells are NOT byte-exact, and the lane says why: the panic is gone but a single-key-frame
4:2:2 lossless stream diverges on the INTRA path with the SAME counts on this tree and on main -- a
separate pre-existing defect that seven extent sites cannot fix. Converting a LOUD PANIC into a
named refusal plus a separately-owned divergence is the improvement, and no gate was left asserting
the old behaviour.
Two new gates with per-site mutation proofs (every mutation reds by name) and three new pins
(W/X/Y_intrabc.obu).lane-av1422lpf: report -- seven sites fixed, all panics gone, the residual is the intra pathAhmet Kaan Gümüş · 9aefbc3Browse files
lane-av1422lpf: pin the three panic witnesses and gate all seven sitesAhmet Kaan Gümüş · d840e80
lane-av1422lpf: pin the three panic witnesses and gate all seven sites Committed code refuses 4:2:2 at the sequence header, so the decode-level half of this gate cannot run here. What is committed is the byte pin (size + fnv1a64) plus refusal-by-name for the three cells that used to panic, and a source-scan arm with one assertion per site. Every scan assertion has a forbidden twin and a required twin, so neither an unreverted site nor a matcher that stopped matching can pass. Two of the matchers (sites 5 and 6) were DEAD on first write -- the revert mutation still passed because the literal being searched for never matched even with the fix in place, since the line-anchored form cannot span the fix's own comment. Measured and corrected: the gate now also builds a whitespace-flattened form of each body for the matchers that span an argument list, and every site's revert mutation reds it.
Merge lane-arf-gm-lossless: FIX the user-reachable 4:2:0 lossless alt-ref divergence (one line in record_mi_chroma)Ahmet Kaan Gümüş · a153942
Merge lane-arf-gm-lossless: FIX the user-reachable 4:2:0 lossless alt-ref divergence (one line in record_mi_chroma) ROOT CAUSE, one line: a 4x4 CHROMA transform unit is 4 << ss luma px per axis, i.e. 1 << ss LUMA mi, so its context cell is the STEP-ALIGNED group of mi that a block may cover only PART of. A block starting mid-cell -- a 16x4 / 4x16 1:4 strip, whose mi row/col is ODD at 4:2:0 -- stamped its own origin plus the mi below it, so the strip above a block handed that block a 'left neighbour' libaom never had, and the block's chroma txb_skip context came off the wrong cell. record_mi_chroma now aligns the published origin to the chroma cell: (mi_r & !(step_y - 1), mi_c & !(step_x - 1)) -- which is also where libaom's per-plane 2-D left/above_context_map cell lives (indexed in the PLANE's own 4x4 units, not in luma mi). A CHROMA_MIDCELL_PUB_HITS [row, col, both] counter proves the witness really walks the realigned path, so the gate cannot pass on a stream whose chroma units all start on a cell boundary. THREE TICKET CORRECTIONS, all measured: global motion is NOT the trigger (--auto-alt-ref=1 --enable-global-motion=0 diverges too, and by MORE: 1242219 vs 1088573 wrong; every GM model in the headers is Identity); the 'ARF alone refuses' premise does not hold at 16 frames (that cell DIVERGES like ARF+GM; the refusal appears one knob away: --sb-size=64, --enable-dual-filter=0, --enable-intra-edge-filter=0, --max-reference-frames=3, or a shorter cut); the real trigger is lossless AND alt-ref AND a 1:4 rect strip (--enable-rect-partitions=0 / --enable-1to4-partitions=0 each make it exact). Lossy with alt-ref was already exact (cq30, 17/17). FIXED: five configurations of the 320x240 testsrc2 cell plus testsrc2 416x240 and mandelbrot 320x240 all go to 0 wrong, EXACT in decode order (17/17, 16/16), each with a per-cell control (a flip in the oracle's own aom.f2 moves Y by exactly +1 and knocks exactly one frame out). Pre-fix shape: first divergence at decode-order frame 2 (the first frame predicting from the ALTREF slot) at luma (264,0), only 299 of 1200 luma blocks wrong -- a wrong-PREDICTION wedge downstream of one wrong context read, not an entropy flood. NOTE: the lane's edit ALSO appeared as an uncommitted duplicate in the primary checkout (a worktree edit leak, the same 13-line hunk); it was saved to /tmp and discarded so the merge could proceed. The branch is the source of truth and carries the same line plus the counters.
lane-av1422lpf: fix the 4:2:2 lossless chroma extent family (7 sites)Ahmet Kaan Gümüş · 4058fb3
lane-av1422lpf: fix the 4:2:2 lossless chroma extent family (7 sites) The `--lossless=1` 4:2:2 inter chroma panic at decode.rs:37565 was a family, not one line. Seven sites each index a block's chroma PLANE BLOCK -- libaom's per-axis `(bw >> ss_x) x (bh >> ss_y)` shape -- with the ENCLOSING SQUARE `max(side >> ss_x, side >> ss_y)`. The two are the same number exactly when `ss_x == ss_y` (4:2:0 and 4:4:4 on a square block), so every fix below is byte-identical there; at 4:2:2 the square is the LUMA side and each site ran off its own buffer. 1. read_inter_chroma_lossless: mu_units(.., stride * stride) -> stride * blk_h. Not 4:2:2-only either: a 64x128 4:2:0 block's plane block is 32x64 and ll420_a.obu panicked on the old expression. 2. decode_inter_block's lossless TX_4x4 unit replay: index the composed grid at chroma_stride, not chroma_side. 3. NOT A BUG, measured: the replay's unit counts are already per-axis (`write_h >> ss_y(fctx)`). Recorded in the report, not changed. 4. the strip chroma rect's VERT arm: a PARTITION_VERT_4 strip pairs on columns while ss_x == 1, so the pair is 8x16 luma and at ss (1,0) its plane block is 4x16, not the 4:2:0 4x8. This changes chroma_stride and chroma_buf_h for the WHOLE of decode_inter_block at 4:2:2; the lossy 4:2:2 corpus is re-quoted in the lane report and is unchanged. 5. the mu-chunk lossless walk (single-ref and compound): pass the prediction buffer's own chroma_stride, not chroma_side. 6. the intra-in-inter twin of site 5, both call sites. 7. read_intra_chroma_lossless: stride * blk_h, the intra twin of site 1. All three cells stop panicking. They do not yet decode byte-exact: two now refuse with a Golomb-tail desync and one diverges, and an all-intra 4:2:2 lossless key frame diverges with the SAME Y count on this tree and on main, so that residual is a pre-existing intra-path defect outside this family. Numbers and controls in lanes/av1422lpf.report.md.
ec-av1: align a chroma unit's context publication to its chroma cellAhmet Kaan Gümüş · c84b51a
ec-av1: align a chroma unit's context publication to its chroma cell 4:2:0 lossless + alt-ref + 1:4 rect strips diverged in 15 of 16 shown frames (1 088 573 wrong samples) or refused with 'a Golomb tail longer than this decoder reads', one encoder knob away. record_mi_chroma published a transform unit's coefficient context at the BLOCK's mi origin, but a 4x4 chroma unit is 4 << ss luma px = 1 << ss luma mi per axis: a 16x4 / 4x16 1:4 strip starts mid-cell at 4:2:0 and stamped one mi row/col past the cell it owns. The block below then read a 'left neighbour' libaom never had (its per-plane left/above_context_map is indexed in the plane's own 4x4 units) and its chroma txb_skip context came out one base high: ours 2, libaom 8, pre-state identical, at frame 2 block mi (4,0) of the pinned 5-frame witness. Align the origin down to the cell (step from the unit's own luma span, so 4:2:0/4:2:2/4:4:4 each align by their own), add the chroma_midcell_pub_hits counter the gate needs to prove the realigned path is walked, and pin 420_lossless_arf_1to4_320x240_5f.obu (28394 B) behind a decode-order + shown-frame per-plane gate. Mutating the alignment back to the identity turns that gate red with the very refusal string above.
Merge lane-av1422h242map: NO height rule -- the 4:2:2 divergence is CONTENT-triggered and broad (report only)Ahmet Kaan Gümüş · aab99b0
Merge lane-av1422h242map: NO height rule -- the 4:2:2 divergence is CONTENT-triggered and broad (report only) Swept 18 frame heights at width 320 on the R-arm recipe: 13 of 18 DIVERGE. The exact-height set MOVES with the encoder recipe (exact at 236/240/250/254 without --end-usage=q, exact at 230/240/250 with it -- 236 passes in one arm and fails in the other, 230 the reverse), so height is not the variable. Three independent proofs of CONTENT: (1) the moving exact set above; (2) at height 242, smptebars is byte-exact 16/16 (decode order 17/17) while testsrc2 and mandelbrot both diverge at the same width and recipe; (3) 10 of 11 4:2:0 controls at the same geometries are byte-exact, so the class is 4:2:2's own, and the single 4:2:0 failure (320x236) reproduces av1oddluma's cell by sha256. This supersedes the '4/4 diverging at height 242' framing from the previous round: 242 is not special, it was a small-sample artifact of one recipe. Every cell carries the per-cell oracle-flip control (+1 in the named plane, one fewer exact frame). No bypass committed; report only.
lane-av1422h242map: 4:2:2's height-242 rule is CONTENT, not height; mechanism is the sub-8x8 chroma leaf DC_PRED left edge (report only)Ahmet Kaan Gümüş · ba1a576
lane-av1422h242map: 4:2:2's height-242 rule is CONTENT, not height; mechanism is the sub-8x8 chroma leaf DC_PRED left edge (report only)
Swept width 320 x heights 226..260, both the av1422re4222 recipe and
--end-usage=q, 52 cells, per-cell oracle-flip control on every one.
13 of 18 heights diverge (226 228 230 232 234 238 242 244 246 248 252
256 258 260); 236 240 250 254 are byte-exact. The exact-height set MOVES
with the recipe, and height 242 is byte-exact with smptebars while
diverging with testsrc2 and mandelbrot -- so the trigger is content, not
geometry. 10 of 11 4:2:0 controls at the same geometries are exact.
Localised on R422_320x242: pre-loop-filter (PREFILT), chroma-only, luma
byte-exact on every frame; wrong chroma is a bounded 42-row band at the
right of centre, not the whole plane (the previous report's 'whole plane'
was a padded-vs-cropped plane-split artefact). The first wrong unit is a
flat 4x4 chroma leaf whose DC_PRED reads its left edge FOUR ROWS TOO HIGH:
ours (above + left@rows 156..159)/8 = 182, libaom's = above alone = 202.
ss_y == 0 makes that displacement non-zero; at 4:2:0 it is a no-op.
Not the same mechanism as the 4:2:0 320x236/322x248 pair: that one has
11198 wrong luma on frame 0 and forks entropy at read 6; this one is
luma-exact and is a prediction value.
Also names a separate finding: five 4:2:2 cells intermittently emit
out-of-range samples (65280..65535) on an 8-bit stream, nondeterministic
across repeated decodes, never on 4:2:0.
Report only. No source change; the EC_AV1_ALLOW_422_PROBE bypass and the
cell driver were patch-run-restore, stream.rs:1803 reads
'if seq.subsampling_x != seq.subsampling_y {' again and git status is
clean.Merge lane-av1screen12: LIFT the 12-bit screen-content refusal -- both halves of its claim were falseAhmet Kaan Gümüş · 236ebb2
Merge lane-av1screen12: LIFT the 12-bit screen-content refusal -- both halves of its claim were false The refusal said a 12-bit frame with allow_screen_content_tools=1 is unsupported because 'neither palette nor intrabc has a 12-bit witness'. Both halves were false, and both are now witnessed: - 12-bit PALETTE (screen=true, allow_intrabc=false): screen12_palette.obu 3616 B sha256 adfe26c6..., 2 frames, 76 palette / 43 palette-UV blocks, 0 wrong vs BOTH the instrumented aomdec and ffmpeg. - 12-bit INTRABC: the standing note '12-bit intrabc has no producer' was a RECIPE artefact, then refuted -- --tune-content=screen does not decide the frame-header bit in this oracle build (libaom's content detector does, av1/encoder/encoder.c:2404); the same 8-bit source tiled with -vf tile=2x2 gives allow_intrabc=true at 8, 10 AND 12 bits. screen12_intrabc.obu 482 B sha256 a3b6b94c..., 1 frame, 11 intrabc / 36 palette blocks, 0 wrong vs aomdec and ffmpeg. - 12-bit LOSSLESS + palette (CodedLossless and screen content in one frame): screen12_lossless_palette.obu 11698 B sha256 ec7942c9..., 2 frames, 80 palette / 59 palette-UV, 0 wrong. Three gates, each asserting the stream's OWN sequence header is 12-bit, that a frame header really carries allow_screen_content_tools (and allow_intrabc for that arm), that the palette/palette-UV/ intrabc hit DELTAS are non-zero, and that the live recipe reproduces the committed pin byte for byte (length + fnv1a64) -- so a stream that merely set the header bit fails instead of passing untested. Pin names are literals. Control: flipping bit 0 of the ORACLE's 12-bit high byte (index 1, a bit that can never carry) gives exactly (1,0,0,frames,frames-1) -- +1 wrong luma, one fewer exact frame. Refusal inventory updated in both copies; 56 refusal-census tests green.
lane-av1screen12: lift the 12-bit screen-content refusal; three 12-bit palette/intrabc witnessesAhmet Kaan Gümüş · eeb5937
lane-av1screen12: lift the 12-bit screen-content refusal; three 12-bit palette/intrabc witnesses The guard read `bit_depth == 12 && header.allow_screen_content_tools` and its string claimed "neither palette nor intrabc has a 12-bit witness". Both halves were wrong: the bit only opens the palette-mode and `use_intrabc` SYMBOLS, and both reconstructions are already depth-parameterised (`read_palette_colors_y` / `_uv` read at `bit_depth(fctx)`, the colour-index map writes u16 samples). Measured, guard lifted, each arm byte-exact against the instrumented aomdec --rawvideo AND ffmpeg, 0 wrong samples, with a +1 control on the oracle's own frame-0 luma high byte (exactly +1 wrong luma byte, one fewer exact frame): arm pin frames palette/uv/intrabc palette screen12_palette.obu 2 76 / 43 / 0 palette + intrabc screen12_intrabc.obu 1 36 / 34 / 11 lossless + palette screen12_lossless_palette.obu 2 80 / 59 / 0 The "12-bit intrabc has no producer" note was a RECIPE artefact: --tune-content=screen does not decide that frame-header bit in this oracle build (libaom's content detector does, encoder.c:2404). An untiled smptebars=size=128x96 source reads allow_intrabc=0 with and without the flag; the 256x192 -vf tile=2x2 source the repo's own intrabc census uses reads =1 at 8, 10 and 12 bits. Mutation proof: truncating read_palette_colors_y's first colour to 8 bits (bit-preserving) reds the palette gate with 119726 differing bytes, first at byte 1. Inventory: both copies of the string (REFUSALS row and its PROVEN pair) are gone -- 33 refusals + 33 proven -> 32 + 32. refus: 56 passed; gate_coverage: 20 passed, 282 gates, NEVER_EXERCISED_8BIT 0 of 26, NEVER_EXERCISED_10BIT 0 of 26.
Merge lane-av1422losslesspanic: the 4:2:2 lossless INTER panic is a FIVE-site family, not one line (report only)Ahmet Kaan Gümüş · 1766d69
Merge lane-av1422losslesspanic: the 4:2:2 lossless INTER panic is a FIVE-site family, not one line (report only)
Reproduced: decode.rs:37565 via
read_inter_chroma_lossless -> decode_inter_block -> decode_inter_frame_tile_with_cdfs, on three cells
(W/X/Y_intrabc at 4:2:2 --lossless=1, 320x240, the last two tiled and 10-bit). Instrumented geometry:
cpx=12 cpy=0 org=(0,0) reg=(4,16) blk=(4,16) stride=4 tw=160 th=240 need=64 alloc=16.
WHY 4:2:2-ONLY, from our own contract: decode_inter_block hands the caller the PER-AXIS pair
(chroma_stride, chroma_buf_h) at ss(1,0) but the SQUARE chroma_side at 4:2:0 and 4:4:4, while
read_inter_chroma_lossless's doc says stride is 'the block's SQUARE chroma side, even for a 2:1 strip'
-- a contract that holds exactly when the chroma plane block is square, i.e. 4:2:0 (side/2) and 4:4:4
(side), NOT at 4:2:2 where an 8x16 luma strip's chroma is 4x16.
Measured discriminator: 4:2:0 lossless exact 16/16 in three configurations, the committed 4:4:4
lossless gates all pass, and the committed 4:2:2 lossless/IBC pins are byte-exact -- so the lossless
INTRA/IBC 4:2:2 chroma path is fine and the gap is specifically lossless INTER 4:2:2.
NOT FIXED, deliberately: only a one-line extent was asked for; measured, sites 1-3 only walk the panic
forward to sites 4 and 5. Site 4 changes chroma_stride/chroma_buf_h for the whole of decode_inter_block
at 4:2:2 INCLUDING the lossy arms that currently measure byte-exact (the first real regression
surface), and site 5 is a different layer entirely (a 4x4 chroma unit read at luma-plane strides 128
and 64). No cell decodes byte-exact with 1-3 applied, and a partial fix on a path no gate covers turns
a LOUD panic into silent corruption. No gate committed for the same reason.
TWO NEW 4:2:0 FINDINGS, outside this lane's scope and both user-reachable: 4:2:0 lossless with
--lag-in-frames=25 --auto-alt-ref=1 --enable-global-motion=1 DIVERGES (1254308 wrong, 1/16 exact), and
4:2:0 lossless with ARF and no global motion is REFUSED by name ('a Golomb tail longer than this
decoder reads'). Being chartered separately.lane-av1422losslesspanic: the --lossless=1 4:2:2 panic is a family of five extent sites, not a one-liner; report only, nothing fixedAhmet Kaan Gümüş · 9204526
lane-av1422losslesspanic: the --lossless=1 4:2:2 panic is a family of five extent sites, not a one-liner; report only, nothing fixed
Main asked for a one-line extent fix in read_inter_chroma_lossless. Measured,
it is not one line, so the tree is back at ef9d7c97 and this commit carries
the site inventory instead.
Reproduced on all three --lossless=1 4:2:2 cells (W_intrabc 130320 B,
X_intrabc_tiled 131696 B, Y_intrabc_10b 202281 B) at decode.rs:37565,
'range end index 20 out of range for slice of length 16'. Instrumented
geometry at the failing call: reg=(4,16) blk=(4,16) stride=4, 64 elements
needed against the square's 16.
4:2:2-only because decode_inter_block hands the caller the per-axis
(chroma_stride, chroma_buf_h) pair at ss (1,0) and the square at 4:2:0 and
4:4:4. Discriminator measured: four 4:2:0 lossless recipes are byte-exact or
refuse by name and never reach the line, the six a_lossless_444_* gates
pass, and the committed 4:2:2 lossless IBC pins decode exact -- so the gap
is lossless INTER 4:2:2 specifically.
Applying sites 1-3 in turn walks the panic forward through the inventory:
1. decode.rs:37580 mu_units(stride*stride) -> stride*blk_h
2. decode.rs:45037 unit split indexed at chroma_side -> chroma_stride
3. decode.rs:45023 unit rows/cols from the luma-per-ss height -> chroma_buf_h
4. decode.rs:39995 4:2:2 strip chroma rect handed the 4:2:0 pair's (8,4)/(4,8)
5. decode.rs:4366 4x4 CHROMA unit read at prediction strides 128 and 64,
failing prediction buffer empty -- not reached, measured
Each is format-preserving at 4:2:0 and 4:4:4. Site 4 changes chroma_stride
and chroma_buf_h for the whole of decode_inter_block at 4:2:2 including the
lossy arms that currently measure byte-exact; site 5 is the chroma
prediction source never having been resolved per axis on this path.
Sites 1-3 are reverted. No cell decodes byte-exact with them, and a partial
fix here would convert a loud panic into a plausible wrong picture on a path
no gate covers. No gate committed either: a gate whose only red is 'still
panics' is a ratchet on a defect, not a fix.
The height-242 4:2:2 divergence is untouched and still open, not chased.Merge lane-av1cmpframe: count_rawvideo_diffs attributes planes PER FRAME (instrument fix)Ahmet Kaan Gümüş · 27c1687
Merge lane-av1cmpframe: count_rawvideo_diffs attributes planes PER FRAME (instrument fix) The plane table is now built per frame from each decoded picture's OWN plane lengths (the same source pack_rawvideo lays bytes out from -- not a formula, not width*height, not the first picture), with a monotone cursor walking the spans as the byte index advances and frames_exact comparing each frame's own span instead of a fixed stride, so a stream whose frames differ in size is attributable too (the old form could not express it). Signature unchanged, no caller changed. The gate counts the truth ITSELF -- it re-runs aomdec --rawvideo, packs our pictures, walks its own per-frame table -- and asserts the helper agrees on three axes: the per-plane split equals the independent per-frame count with each plane <= its own capacity; frames_exact equals the independently counted exact frames; and a byte inside FRAME 5's U plane moves U by exactly +1 leaving Y and V at baseline -- the arm the old code cannot pass, since that byte is past every frame-0 threshold and the old attribution put it in V. Mutation (fix reverted to the first-picture form) reds it with the old numbers digit for digit, including V 330673 > its own 302080 capacity. Caller sweep: count_rawvideo_diffs was the ONLY mis-attributing site (oracle_plane_diffs and the ffmpeg control's per-plane counters are frame-aware; count8 is frame-0 by declared subject and is named, not changed; the byte-equality helpers do no attribution). Re-measured with the fixed instrument, each with the flip control: 320x236 234349/56957/52981 (0/16 exact, new pin 420_oddheight_320x236_diverging.obu 16562 B sha256 84e4d1ab...), 322x248 36286/13359/13001 (0/16), 320x232 0/0/0 16/16, 320x248 0/0/0, 324x236 0/0/0 -- i.e. the debt's own figures, now emitted by the crate's own instrument rather than a lane-local script. Three earlier reports quoted a per-plane split from the broken helper (lanes/av1422anom.report.md:90 and :176, lanes/av1422h232.report.md:31-35, lanes/av1cmpaudit2.report.md:71): their TOTALS and frames_exact stand and every zero is a zero under any attribution, but the non-zero U/V splits are unattributed; the debt records that.
count_rawvideo_diffs: attribute planes PER FRAME, from each picture's own plane lengthsAhmet Kaan Gümüş · 163eefd
count_rawvideo_diffs: attribute planes PER FRAME, from each picture's own plane lengths The helper packed frames correctly (pack_rawvideo walks decoded) and then attributed every differing byte with FRAME 0's thresholds forever, so on a multi-frame stream everything after frame 0's luma landed in plane V: the pinned 320x236 stream reported wrongV=330673 inside a 302080-byte plane. Every gate asserted zeros, so nothing could see it. The plane table is now built per frame from each decoded picture's own y/u/v lengths -- the source pack_rawvideo itself uses, not a formula and not the first picture -- and frames_exact compares each frame's own span instead of a fixed stride, so a stream whose frames differ in size is attributable too. New control the_counting_oracle_diff_attributes_planes_per_frame on a new committed pin 420_oddheight_320x236_diverging.obu (16562 B, sha256 84e4d1ab...): it counts the truth itself, then asserts the helper agrees -- per-plane split, frames_exact, and a byte inside frame 5's U plane moving U and not V. Reverting the fix to the first-picture form reds it with left [11198, 2416, 330673] against right [234349, 56957, 52981]. Caller sweep: oracle_plane_diffs (per-frame dump files) and the 10-bit ffmpeg control arm (per-picture plane Vecs) were already frame-aware; count8 scores frame 0 by its own declared scope. This was the only site. Re-measured with the fixed comparator: 320x236 -> 234349/56957/52981 0/16 and 322x248 -> 36286/13359/13001 0/16, which are the debt's own recorded figures; 320x232 / 320x248 / 324x236 -> 0/0/0 16/16. Control: flip byte 0 moves each count by exactly +1. INSTRUMENT fix: no decoder behaviour touched. Report in lanes/av1cmpframe.report.md, including the three earlier reports whose per-plane split was mis-attributed.
Merge lane-av1422re4222: the 4:2:2 refusal is STILL earning its keep, for two concrete reasons (report only)Ahmet Kaan Gümüş · b920c1a
Merge lane-av1422re4222: the 4:2:2 refusal is STILL earning its keep, for two concrete reasons (report only) 23 of 30 reachable 4:2:2 cells are byte-exact on the LIVE comparator pair (the crate's audited count_rawvideo_diffs + decode_all_frames_vs_oracle, both batch controls green before any cell was measured), with a PER-CELL control on the same comparator: every cell measured four times, clean plus one bit flipped in the ORACLE's own bytes at frame 0's first Y, U and V byte (indices derived from the first decoded picture, so the three really land in three planes). A cell reading 0 clean and 0 flipped does not occur once in 30 -- the comparator reads both sides. The seven that are not exact are narrow and specific, not coverage: 4 of 4 reachable cells at frame HEIGHT 242 diverge (chroma-only, up to 22988 wrong presented samples, whole chroma plane of the keyframe, luma exact, present pre-loop-filter), and 3 of 3 --lossless=1 4:2:2 cells PANIC at one named line (decode.rs:37565, for an arithmetically 4:2:2-only reason). The 4:2:0 controls at the same geometries are exact, so the retraction's premise (that this was the shared odd-height 4:2:0 defect) no longer holds now that lane-av1422chrtx has fixed that one. RECOMMENDATION: keep the refusal -- lifting would expose users to chroma-only corruption across a family of ordinary heights AND to a decoder panic on lossless content -- then (1) fix read_inter_chroma_lossless's stride for a non-square 4:2:2 plane block, (2) sweep 4:2:2 frame heights 232..250 at one width to map the remainder trigger, (3) re-run the table and only then decide between a narrowed refusal and a lift. The refusal string and header behaviour are NOT changed here: that is a shipped-capability call. No source change; the probe bypass was patch-run-restored.
lane-av1422re4222: re-measure the 4:2:2 surface on a live comparator; 23/30 exact, 4 diverge at height 242, 3 lossless cells panicAhmet Kaan Gümüş · d5d0289
lane-av1422re4222: re-measure the 4:2:2 surface on a live comparator; 23/30 exact, 4 diverge at height 242, 3 lossless cells panic Report only, no source change. The EC_AV1_ALLOW_422_PROBE bypass and the temporary cell driver were patch-run-restore and are not in this commit. The six committed 4:2:2 pins re-verify byte-exact (0 wrong samples on every plane of every frame, presented and decode order) with a per-cell oracle-byte flip control on each. 4 of the 12 previously-'exact' fresh cells were only ever measured by the retracted tautological counter; on the crate's own count_rawvideo_diffs, O_odd322x242 carries 1612 wrong presented samples. New coverage this round: odd width/height, tile columns alone, tile rows alone, 2x2 tiles at an odd geometry, screen content via --lossless=1, 40-frame alt-ref inter with warped motion and compound, and 4:2:0 controls at the same geometries. Result: 23/30 exact. Four cells at frame height 242 diverge, chroma-only, luma byte-exact, already differing at EC_AV1_PREFILT_DUMP (deblock, CDEF and LR exonerated). Three --lossless=1 4:2:2 cells panic at decode.rs:37565, where read_inter_chroma_lossless sizes its scratch by a square chroma side that a 4:2:2 4x8 plane block does not have. The retraction's premise is overturned: the odd-height 4:2:0 defect was fixed by lane-av1422chrtx, and 4:2:0 at 232/240/242/248 is exact here, so the 4:2:2 height-242 divergence is its own defect, not that one resurfacing. Recommendation: keep the refusal, for the 4/4 height-242 divergence and the 3/3 lossless panic rather than for the old coverage argument. The refusal string and header behaviour are unchanged.
Merge lane-av1gapremeasure: the odd-height cells are OPEN and reachable via ONE flag; the per-plane attribution of the shared comparator is brokenAhmet Kaan Gümüş · 52e14b7
Merge lane-av1gapremeasure: the odd-height cells are OPEN and reachable via ONE flag; the per-plane attribution of the shared comparator is broken Resolution of the contradicting measurements, and both sides were right: the single variable is aomenc's --end-usage=q. Without it (the encoder's DEFAULT rate mode, which ignores --cq-level: 8281 b/f vs 3393 b/f) the streams diverge; with it, or with --threads=1, or with --row-mt=0, they are exact. NOT the content (his webm demuxed and re-encoded with these flags is 0/0/0 in six arms) and NOT the remux (re-running his exact aomenc line with --obu -o file.obu is cmp-identical, same sha256). The default-end-usage recipe reproduces f0 16023 on 320x236 -- the same number I measured -- and f0 Y 2170 on 322x248, matching av1oddluma's recorded frame-0 count, so the entropy-fork narrowing stands. Re-measured family: 320x236 (16562 B sha256 84e4d1ab..) OPEN/reachable; 322x248 (16131 B sha256 9e8c9c6c..) OPEN/reachable; 320x232 (15773 B sha256 6832c3cd.. = the committed pin, byte-identical) CLOSED; 320x248 CLOSED; 324x236 CLOSED -- every cell with the +1 control. INSTRUMENT DEFECT FOUND (stream.rs:10424-10436): count_rawvideo_diffs attributes planes with ABSOLUTE, non-frame-scaled thresholds computed from the FIRST picture, so on a multi-frame stream every sample after frame 0's luma is counted as plane 2 -- which is why the diverging stream reports wrongV=330673 when V holds only 302080 bytes over 16 frames. Per-frame byte counts and frames_exact are sound (they sum to the reported total); ONLY the per-plane split is meaningless on multi-frame streams. Fix chartered to the same lane. Rest of the sweep: 12-bit decode CLOSED (7 pins, 27 dumps, 0 wrong), rect residual tables CLOSED (r512.obu 3/3 exact, and its recipe is the default-end-usage one so that row is not recipe-blind), SEG_LVL UNREACHABLE and the record CORRECT (census reproduces 162 seg-enabled frames; census control reports features 5/6/7 when enabled), the 4:4:4 64x64 sibling-DC row STALE.
lanes/av1gapremeasure: WITHDRAW the odd-height 'closed' row -- it was my recipeAhmet Kaan Gümüş · 167e8c7
lanes/av1gapremeasure: WITHDRAW the odd-height 'closed' row -- it was my recipe Cross-checked against Agent06-5's 320x236 fixture on the same comparator: my f0 diff (16023 bytes) equals Main's digit for digit, and both streams were measured in one run with a +1 flip control each. The variable is --end-usage=q, not the source, not the container round-trip and not threading: - his content + my flags: 0/0/0 16/16 in six arms; - his exact aomenc line with --obu output: cmp-IDENTICAL to his file, so the webm remux is byte-preserving; - his command + --threads=1 or + --row-mt=0: 16459 B, 0/0/0 16/16; - his command + --end-usage=q: 6787 B, 0/0/0 16/16 -- the defect disappears. aomenc's DEFAULT end-usage is the only configuration measured to reach it. Re-measured the family on that recipe: 320x236 (16562 B, sha256 84e4d1ab) and 322x248 (16131 B, sha256 9e8c9c6c, f0 Y 2170) are 0/16 frames exact -- OPEN; 320x232 (sha256 6832c3cd = the committed pin), 320x248 and 324x236 are 0/0/0 16/16 -- closed. Also records a defect in count_rawvideo_diffs: its plane split uses absolute thresholds, so on a multi-frame stream everything past frame 0's luma is attributed to V (it reported 330673 wrong V in a 302080-byte plane). Report only; no source change.
lane-av1labelspace: label-space class sweep done, and the two cells are reachable from aomenc's DEFAULT threaded encodeAhmet Kaan Gümüş · 052d1d3
lane-av1labelspace: label-space class sweep done, and the two cells are reachable from aomenc's DEFAULT threaded encode Class sweep over every env-gated rung that prints an mi coordinate: - Family A, the main partition walk (34933-35107): the one broken family. 32-level printed at32.0 * MI, 16-level printed at16.0 raw. Fixed in lane-av1partadvance; pixels did not move. - Family B, the rect partition walk (52346/52692/52836): PROVEN CORRECT. SB prints sb_r*16, 32 prints r32*8, 16 prints sr*4 -- all three carry the same *4 relative to their own at index, so one space. I had this down as un-audited last lane; it is clean. - Family C, twelve mi-printing rungs (OUR_PART, EC_LEAF, EC_RECT64TU, EC_INTRA128, EC_SPLITSTRIP, TRACE_RECT_COEFF x3, TRACE_RECT32_END, EC_HALV, TRACE_RECT64_END): PROVEN CORRECT structurally -- every one prints its mi position raw with no multiplier, one convention applied uniformly, so there is no sibling level to disagree with. - Pixel-space rungs (OUR_PRED, EC_MCPUSH, EC_OBMCREC) print pixels, a different quantity from an mi coordinate; right not to be in either space. No second instance of the bug exists. The bigger result: Agent08-2's 320x236 is exact on main and mine is not. Single variable experiment -- same source y4m, same flags except --threads=1 --row-mt=0 instead of --threads=8: --threads=8 16562 B Y 234349 U 56957 V 52981 0/16 exact --threads=1 row-mt=0 16459 B Y 0 U 0 V 0 16/16 exact Not tiles: both report cols=1 rows=1 uniform_spacing=true. aomenc threading changes RD decisions, not tiling, so it produces different content and THAT content walks the bug. So the defect is reachable from aomenc's DEFAULT configuration -- no --threads, no --row-mt=0 -- not a fixture artifact. Sparse and content-specific is still true, but the content is an ordinary multi-threaded encode. No gate committed: no decoder change in this lane. The anti-drift unit test Main asked for is NOT added and the gap is declared in the report, not buried -- it would need two rungs on a live stream plus an oracle comparison to mean anything, and the rungs already agree after the fix.
Merge lane-av1partadvance: the 16-level partition rung's LABEL was in a different label space (instrument fix)Ahmet Kaan Gümüş · e1c57ec
Merge lane-av1partadvance: the 16-level partition rung's LABEL was in a different label space (instrument fix) NOT a stride defect: the walk was already right. The 32-level rungs print at_mi * MI (r32 * BLOCK_MI), while the 16-level rungs printed their at_mi RAW -- the same walk, the same quantity, two label spaces 4x apart. lane-av1oddgolomb compared our TRACE partition_w16 mi=(0,1) against aomdec's EC_PART mi_row=0 mi_col=4 and read a 4x child-advance bug; it was an artifact of comparing across label spaces (the class this crate has been bitten by before). Fixed: the three 16-level rungs now print at16.0 * MI, at16.1 * MI. No walk change: sr/sc, at16, the bounds check (already using sr * SUB_MI), has_half(sc * SUB_MI, ..) and every decode_block call are untouched. Proof the fix moves ONLY the label: our label now equals the oracle's including the msac rng (mi_row=0 mi_col=4 bsize=6 ctx=0 rng=39176 both), and the pixels did not move -- I re-measured the divergence myself on this branch, byte for byte the same as main (o320x236.obu: f0 16023, f1 22751, f2 19846, f3 20473 differing bytes per frame, with the +1 control). Sweep extended to 51 cells: 49 / 51 exact. Every geometric hypothesis is now DEAD -- height 236 is not the trigger (318x236, 322x236, 324x236, 326x236, 330x236 all exact; only 320x236 fails), width 322 is not the trigger (322x232/236/240 exact; only 322x248 fails), and non-multiples of 8 are mostly exact. The two failures are SPARSE and CONTENT-SPECIFIC: two (width, height, content) triples of 51, with no geometric predicate separating them -- so the two cells are unexplained again, and that is the finding rather than a regression.
lane-av1partadvance: the 16-level partition rung's LABEL was in a different label space; the walk was rightAhmet Kaan Gümüş · f838878
lane-av1partadvance: the 16-level partition rung's LABEL was in a different label space; the walk was right Main was right to make me check the label before the decoder. It is a label defect. The 32-level arm prints its mi position as at32.0 * MI (r32 * BLOCK_MI, with at32.0 == r32 * 2). The 16-level arm, 130 lines down in the SAME walk, printed at16.0 raw -- same quantity, no * MI, so 4x smaller. Comparing 'partition_w16 mi=(0,1)' against aomdec's 'EC_PART mi_col=4' read as a child advance bug; it is two label spaces. Fix: let (lbl_r, lbl_c) = (at16.0 * MI, at16.1 * MI) on the three 16-level rungs. The walk -- sr/sc, at16, the bounds check, every decode_block call -- is untouched. Proof, independent of the trace: - Label now reads EC_PART mi_row=0 mi_col=4 bsize=6 ... rng=39176, matching aomdec's exactly including the msac rng. - Pixels byte-identical before and after: 320x236 Y234349/U56957/V52981 and 322x248 Y36286/U13359/V13001, both unchanged. A label fix moves the label and nothing else. So the mechanism I reported last lane DOES NOT EXIST, and that is the finding. The two cells are unexplained again: entropic fork at coefficient read 6 of frame 0, inside a V-plane 8x8 unit's sign/Golomb tail, with the walk, the partition values, the scan, the placement, all_zero, eob and every base ctx/level all verified equal to aomdec. Sweep: 51 cells now, 49 exact (27-cell core re-run unchanged at 25/27, plus 24 new cells all exact). Rate 2/51. The geometric hypothesis is dead -- 318x236, 324x236, 326x236, 330x236, 322x236 are all EXACT, and 318/322/324/ 326/330/236 are all non-multiples of 8. Sparse and content-specific. No gate committed: there is no decoder change to pin, and pinning an unexplained defect is what the ratchet pattern has been.
Merge lane-av1oddgolomb: candidate 1 REFUTED -- the fork points at the 32x32 SPLIT child advance (report only)Ahmet Kaan Gümüş · f7f488f
Merge lane-av1oddgolomb: candidate 1 REFUTED -- the fork points at the 32x32 SPLIT child advance (report only) The sign/Golomb tail I sent this lane to chase is a CONSEQUENCE, not the cause. Partition VALUES are identical on both sides (3, 3, 3, 0, 8, 2, 2, 3) and contexts agree, so the entropy decisions are right. What differs is the CHILD COORDINATE after step 3, a PARTITION_SPLIT at BLOCK_32X32: libaom's four 16x16 children sit at mi(0,0), mi(0,4), mi(4,0), mi(4,4) (16-px offsets) while our trace reads them at mi(0,0), mi(0,1), mi(1,0), mi(1,1). Step 8 still agrees (mi(0,8), the 32x32 sibling 32 px away), so the 32x32-level advance is CORRECT and only the 16x16-level advance is in question. Mechanism for the 312 bits: after our V-plane unit's eob=50 our trace goes straight to a dequant, a partition_w16 and an EC_PAL palette block with NO dc_sign/golomb for that unit, while libaom reads a full sign/Golomb tail for the same eob -- the two sides read different symbol streams from there on. Ruled out unchanged: walk order within a block, all_zero, eob, the scan, coefficient placement, base ctx/levels, every partition value. NO code change and NO gate committed: the lane declined to ratchet a mechanism it had not located in code, which is the right call. The line-level decision is the next lane's first task.
lanes/av1gapremeasure: the debt's remaining ec-av1 gap list, re-measured on mainAhmet Kaan Gümüş · 1129c84
lanes/av1gapremeasure: the debt's remaining ec-av1 gap list, re-measured on main 12-bit decode support, rect residual tables and the odd-height cells are CLOSED (0 wrong samples vs the instrumented aomdec on 27 + 9 + 80 frame-dumps, each with a one-flipped-oracle-byte +1 control). SEG_LVL is UNREACHABLE and the record is correct (census reproduces 162 seg-enabled frames, per-feature [96,0,0,0,0,0,0,0]; census control reports features 5/6/7 when enabled). The 12-bit allow_screen_content_tools refusal is OPEN but broader than its own string: lifted locally, 6 real aomenc 12-bit arms decode 0/0/0 2/2. Report only; no source change.
lane-av1oddgolomb: the fork is the partition walk's child advance after a 32x32 SPLIT; the sign/Golomb tail is a consequenceAhmet Kaan Gümüş · 46f2dab
lane-av1oddgolomb: the fork is the partition walk's child advance after a 32x32 SPLIT; the sign/Golomb tail is a consequence Candidate 1 is REFUTED. Oracle EC_TRACE partition symbols against our EC_AV1_TRACE, frame 0 of 320x236: step oracle value ours value 3 mi(0,0) bsize=9 (SPLIT) 3 partition_w32 mi=(0,0) 3 4 mi(0,0) bsize=6 0 partition_w16 mi=(0,0) 0 5 mi(0,4) bsize=6 8 partition_w16 mi=(0,1) 8 6 mi(4,0) bsize=6 2 partition_w16 mi=(1,0) 2 7 mi(4,4) bsize=6 2 partition_w16 mi=(1,1) 2 8 mi(0,8) bsize=9 3 partition_w32 mi=(0,8) 3 Every VALUE matches. Only the child COORDINATES differ, and only for the 16x16 children of a 32x32 SPLIT: libaom steps 16 px (4 mi), we step 4 px (1 mi), so our walk re-enters the interior of the leaf it just decoded and reads a PARTITION_HORZ_4 + a palette block that libaom never reads there. That is the 312 bits. The 32x32-level advance agrees (step 8), so the bug is one stride in one arm, not the whole walk. No decoder change; the tree matches 0224d10c. The exact line is NOT located and I did not edit blind -- the report names the arm and the deciding measurement (compare the SPLIT arm's stride against its HORZ/VERT siblings, which step correctly at the 32x32 level).
Merge lane-av1oddluma: the remaining two 4:2:0 cells are an ENTROPIC fork at read 6 (report only)Ahmet Kaan Gümüş · 9f86b7c
Merge lane-av1oddluma: the remaining two 4:2:0 cells are an ENTROPIC fork at read 6 (report only) Red-before with the live comparator and the +1 control (flipping oracle byte 0 moves Y by exactly +1 on both cells): 320x236 Y 234349 / U 56957 / V 52981, 0/16 frames exact, frame 0 Y 11198; 322x248 Y 36286 / U 13359 / V 13001, frame 0 Y 2170. Framing corrected: that is 15% and 2.7% of a frame, not whole-frame divergence -- sparse. Entropic, and pinned to a read: pairing EC_ECDUMP_IN by (value, range), reads 0-5 are identical with our constant +15 bit convention, and the offset BREAKS at read 6 -- inside the first TX_8X4 luma unit of the 8x8 block at mi (0,4), the unit right after the 16x16 block at mi(0,0). Our side consumes 312 extra bits inside that one unit. Ruled out WITH evidence, not assumption: block walk order (the 16x16 at mi(0,0) -> its U -> its V -> the next block at mi(0,4) matches the oracle's EC_ECDUMP mi/bc/br sequence); all_zero (1,1,1,0,0,0 both); eob (3, 50, 50 both); the scan table; the coefficient PLACEMENT (the oracle's positions transposed by (p%8)*8 + p/8 are EXACTLY ours); and the CDF row/context (c=48 ctx=22, c=46 ctx=21, c=42 ctx=21, c=38 ctx=22, c=49/47 level=1 all identical). Two candidates named for the deciding measurement, in order: the SIGN/GOLOMB TAIL of the V-plane 8x8 unit (eob=50 with mostly-zero base levels is tail-shaped, and 312 bits is tail-sized), else a unit count difference. No decoder change; the tree is byte-identical to 5b27ed79.