Commits
Commits on
00a6ca0f62175febd968d99add3b5cebe7e0e9a9Filtered to crates/ec-av1/src/decode.rsClear filter2026-09-02
fix(av1): a rect block's chroma warp was gated on the square prediction buffer's side, not the plane's block dimsAhmet Kaan Gümüş · 00a6ca0
fix(av1): a rect block's chroma warp was gated on the square prediction buffer's side, not the plane's block dims libaom `av1_init_warp_params` (reconinter.c) bails out per PLANE at `block_width < 8 || block_height < 8`, so the 8x4 / 4x8 chroma of a 16x8 / 8x16 luma block keeps the translational prediction even when the luma warps. `decode_inter_block` allocates a SQUARE prediction buffer and tested `chroma_side >= 8` -- the buffer's side -- so every rect block with a warp (local or global) warped its chroma where libaom does not, and a 4-wide or 4-tall luma block warped its luma. Guard on `write_chroma_w/h` and `write_w/h` instead (class rectchroma2 / narrow-block-sharp-kernel: dims read off the enclosing square buffer). Measured on the 2-frame cut of the 10-bit 3840x1608 stream (decode-order PREFILT16 compare vs instrumented aomdec, frame 0 already exact): frame 1 goes from 1317 wrong samples (Y 115, U 342, V 860) to 126 (Y 115, U 11, V 0).
refactor(av1): drop the duplicate in-inter tx-depth ctx override, keep the counter on the band readAhmet Kaan Gümüş · eec9297
refactor(av1): drop the duplicate in-inter tx-depth ctx override, keep the counter on the band read lane-t900 r2 fixed the same defect at every rect intra reader's call site (`tx_size_context_txfm_rect` under `INTRA_IN_INTER_MODE`), so this lane's override inside `tx_size_context_rect` is now unreachable: every remaining `tx_size_context_rect` call is in the `else` arm of exactly that condition. Removed it and moved `intra_rect_in_inter_txctx_override_hits` into `tx_size_context_txfm_rect`, where it still counts only the blocks whose CDF row the deblock-grid approximation would have read wrong. Verified on the 2-frame cut of the 10-bit 3840x1608 stream: with t900's call-site switch alone, decode-order frame 0 is EXACT and frame 1 has the same 1317 wrong samples (Y 115, U 342, V 860) this lane measured with its own override, i.e. the two fixes are equivalent and no site needs both.
feat(av1): counter for rect intra-in-inter blocks whose tx_depth CDF row moved under the inter-neighbour overrideAhmet Kaan Gümüş · a0c6951
feat(av1): counter for rect intra-in-inter blocks whose tx_depth CDF row moved under the inter-neighbour override `intra_rect_in_inter_txctx_override_hits()` counts only the blocks where libaom's "an INTER neighbour contributes its BLOCK size" override changes the `tx_size_cat*` row versus the key frame's deblock-grid approximation -- i.e. exactly the blocks the previous commit fixes. A plain "rect intra in an inter frame" tally is green on the buggy code too, so a gate has to assert this one. Not yet wired into a gate (turn cap); lanes/midcut-r2.handoff.md names the two gate call sites and the fallback aomenc arm.
fix(av1): rect intra blocks inside an inter frame read tx_depth off the key frame's deblock-grid ctxAhmet Kaan Gümüş · 1ca3e1b
fix(av1): rect intra blocks inside an inter frame read tx_depth off the key frame's deblock-grid ctx `tx_size_context_rect` is the KEY FRAME approximation of libaom `get_tx_size_context` (pred_common.h:342): it reads the deblock tx grid and never applies the "an INTER neighbour contributes its BLOCK size, not its transform size" override, which only matters once a neighbour's var-tx tree splits. The 1:4 16x4 strip already branched to `tx_size_context_txfm_rect` at its own call site; every other rect intra reader reached from an inter frame (the 2:1 strips, the 32-level and 64-level 1:4 bodies) did not. Fixed once in `tx_size_context_rect` itself, so all six call sites inherit it. Measured on a 2-frame cut of the 10-bit 3840x1608 stream: the 32x8 intra strip at mi(118,280) of frame 1 read tx_size_cat2 row 1 where aomdec reads row 2 (both val=0, ranges 55568 vs 63652) and desynced the tile from there. After the fix every one of the 6871 inter blocks aomdec reports in that frame matches ours on entry range, and the decode-order PREFILT16 compare goes from 4386319 wrong luma samples to 115 (chroma 342/860, all |delta|=1).
fix(av1): a non-chroma-reference inter block wiped its neighbours' chroma coefficient contextsAhmet Kaan Gümüş · 8b5425d
fix(av1): a non-chroma-reference inter block wiped its neighbours' chroma coefficient contexts libaom codes no chroma transform at all for a block that is not the chroma reference of its 4:2:0 pair (`av1_reset_entropy_context`: `nplanes = 1 + (num_planes - 1) * xd->is_chroma_ref`), so such a block leaves the above/left CHROMA entropy contexts exactly as it found them. Our inter block reader recorded all three planes unconditionally, and for those strips the chroma grids are all-zero -- so the even 4x16 strip of a VERT_4 pair cleared the real left-neighbour chroma state, and the PAIR's own `all_zero` symbol then read `txb_skip_ctx` one row low (base 1 where libaom gathers 2, i.e. ctx 1 vs 9 with the chroma offset). Measured on the 2-frame cut of the 10-bit 1920x792 128-superblock stream, decode-order frame 1, mi(40,220): the chroma `all_zero` entry range 37582 now leaves 51992, aomdec's value. The whole cut's coefficient ladder is exact: 15865 `all_zero` symbols in both decoders, identical value and range in order, both frames. The frame-1 reconstruction gap drops from 1924240 to 114374 differing bytes and is now pre-loop-filter (an MC/prediction defect, no longer entropy). Also: `EC_DCDUMP` now dumps all three planes, not plane 0 only -- without the chroma cells the wipe is invisible.
fix(av1): interintra built a square intra predictor for rectangular blocksAhmet Kaan Gümüş · f48ab1b
fix(av1): interintra built a square intra predictor for rectangular blocks `interintra_blend` took one `side` and used it for the edge fetch, the intra predictor's `(bw, bh)`, `ii_size_scales` and the blend bounds. On a rectangular block (`write_w != write_h`) `side` is the LONGER dimension, so a 32x16 block got a 32x32 SMOOTH/DC predictor built off 32 rows of left edge (16 of which are not yet decoded) instead of libaom's 32x16 one. The mask scale happened to come out right (`128 / max(bw,bh)` == `ii_size_scales`), the predictor did not: the blend error is zero on the block's first row and grows downward, exactly the `sm_weights_h` divergence between a height-32 and a height-16 SMOOTH_PRED. Blend now takes `(bw, bh, stride)`: `edges_rect`/`predict` at the true footprint, mask scale off `max(bw, bh)`, loop over `bh x bw`, `pred` indexed at the buffer's own stride. New `interintra_rect_hits()` counts the shape (every existing interintra gate passed with the bug, so the rect arm was vacuous) and `decode_probe` reports it. Also `EC_AV1_NO_GRAIN=1` in `decode_stream`, which splits a mismatch into reconstruction vs film-grain synthesis in one run (it is what ruled grain out here). Measured on a 2-frame cut of the 10-bit 3840x1608 stream (key frame + first hidden alt-ref, 59 rect interintra blocks): the alt-ref's pre-filter dump vs the instrumented aomdec goes from a first mismatch at luma (17,1088) to that superblock exact; first remaining mismatch moves to (448,1152), a separate NEARMV mv-stack defect (ours (-40,-340), aomdec (-32,-350)).
fix(av1): rect intra leaves inside an inter frame read the deblock-grid tx-depth context (sibling sweep)Ahmet Kaan Gümüş · a0c409b
fix(av1): rect intra leaves inside an inter frame read the deblock-grid tx-depth context (sibling sweep) Class sweep of the measured `decode_block_rect4` defect: `decode_leaf_rect` and `decode_leaf_rect8` still built their tx-depth CDF row from [`tx_size_context_rect`] (the key frame's deblock-grid approximation) where libaom's `get_tx_size_context` reads the `TXFM_CONTEXT` bands for every block of an inter frame. No-op unless `INTRA_IN_INTER_MODE` is set, i.e. key frames are byte-identical. Unmeasured on their own (the measured instance is the 32x8 strip at mi(48,176) of the 10-bit 1920x792 128-superblock stream) -- kept in a separate commit so it can be reverted without losing that fix. lanes/t900-r2.handoff.md carries the ladder state, the next divergence (a chroma txb_skip context row) and the gate that was red mid-suite when the round ended.
fix(av1): a 1:4 intra strip in an inter frame took its tx-depth CDF row from the key frame's deblock grid, not the TXFM_CONTEXT bandsAhmet Kaan Gümüş · 27250ff
fix(av1): a 1:4 intra strip in an inter frame took its tx-depth CDF row from the key frame's deblock grid, not the TXFM_CONTEXT bands `get_tx_size_context` reads `above_txfm_context`/`left_txfm_context` on an inter frame; the 2:1 and 16x4 intra-in-inter arms already switch to [`tx_size_context_txfm_rect`] for that, `decode_block_rect4` (32x8/8x32), `decode_block_rect64` (64x16/16x64) and `decode_block_rect`'s own cat-2 read did not. Measured on the 10-bit 1920x792 128-superblock stream, decode-order frame 1: the 32x8 HORZ_4 strip at mi(48,176) read `tx_size_cat2` row 1 where libaom reads row 2 (ours rng after the symbol did not occur anywhere in the oracle's frame trace), and every symbol after it was off. With the bands the cross-decoder ladder now runs from mi(0,320) to mi(40,221) inclusive. Also adds the missing `EC_TRACE_MODE_STEP` tx_depth rung to those three readers plus the 16x4 strip -- without it a range ladder cannot see the symbol at all, which is what made the earlier bisection stop one block short.
merge: main (5d81a67) into lane-t900 -- rect4/rect64 txfm-band tails meet the in-inter band publicationAhmet Kaan Gümüş · c11cb86
merge: main (5d81a67) into lane-t900 -- rect4/rect64 txfm-band tails meet the in-inter band publication Both writes carry the same (tx_w,tx_h) for the same footprint, so the split arms now publish twice with identical values; the in-inter publication stays because it also covers the non-split and refusing exits.
fix(av1): re-add the intra 16x4/4x16-in-inter-1:4 refusal -- its witness counters were phantoms of a desyncAhmet Kaan Gümüş · 543ce26
fix(av1): re-add the intra 16x4/4x16-in-inter-1:4 refusal -- its witness counters were phantoms of a desync The gate pinned last round asserted intra16x4_in_inter 16x4=31 4x16=17 chroma_ref=23 and rect64_corner_tu 64x32=90 32x64=5 on a 10-bit 3840x1608 prefix; all five numbers were counted while decode-order frame 33 of that same prefix was desynced (class counter-from-refused-stream). Re-measured on the merged tip: the fixture decodes all 33 frames pixel-exact and reads rect64_corner_tu 148/123 with intra16x4_in_inter 0/0/0. No stream on this tree decodes pixel-exact while the intra 16x4/4x16 arm fires: a 2 s 10-bit 3840x1608 head cut is exact with 0 hits; the 300 s cut's hits sit behind frames that mismatch by 14105680 / 12470780 bytes; four 1920x792 128-SB cuts carry their hits only in frames that refuse or are never shown; and the aomenc gate for the shape, run --include-ignored, fails with per-arm attempts [0, 0, 0]. So the decode path goes back behind a named refusal (opt-in via EC_INTRA16X4_DECODE) rather than standing as an unbacked capability claim. - decode.rs: strip16 chroma-pair record gated by EC_INTRA16X4_DECODE; measured notes on both the refusal and the rect64 corner-TU comment - refusal_inventory.rs: string re-widened to the whole shape (note only) - stream.rs: gate renamed a_10bit_film_frames_with_rect64_corner_tus_decode_pixel_exact, hard assert kept on rect64_corner_tu (148/123) and the intra-16x4 assert inverted to assert_eq!(0,0,0); the aomenc 1:4 gate's #[ignore] reason replaced by this round's failure output - stream.rs: a_10bit_film_inter_frame_with_intra_1to4_strips #[ignore]d -- every strip it counts is in its fixture's NO-SHOW second frame (truncated to one frame OBU the counters read 0/0/0/0), so it was green on a counter no pixel compare backed (class gate-blind-to-hidden-frames) Suite: 425 passed, 0 failed, 38 ignored.
fix(av1): a 1:4 intra strip in an inter frame publishes its TXFM_CONTEXT bandsAhmet Kaan Gümüş · d52f632
fix(av1): a 1:4 intra strip in an inter frame publishes its TXFM_CONTEXT bands libaom runs set_txfm_ctxs + txfm_partition_update for every block of an inter frame, intra ones included. The 2:1 and 16x4 intra-in-inter arms do that at their call sites; the 1:4 arms (decode_block_rect4 for 32x8/8x32, decode_block_rect64 for 64x16/16x64) keep their transform size inside and published nothing, so both neighbour bands stayed stale across the strip's footprint for the rest of the frame. Measured on a 2-frame cut of the 10-bit 1920x792 128-superblock stream: the HORZ_4 32x8 strip at mi(0,312) left left_txfm[0] at a stale 32 where libaom has 8, so the intra 8x16 block at mi(0,320) read tx_size_cat1 row 1 instead of row 0 -- same depth value, different CDF, range 39156 where aomdec has 54736. After the fix that superblock matches aomdec element for element and the cut walks to the known 128x64 intra-in-inter wall; with EC_INTRA128_IN_INTER=1 it decodes both frames (128x64=15) where it previously hit a Golomb-tail wall. Also adds y_mode/uv_mode/tx_depth EC_TRACE_MODE_STEP rungs to the rect intra-in-inter arm, which had none. Classes: tx-grid-published-block-side, early-return-skips-tail.
Merge branch 'lane-vartxsplit' (b1cc1c8): rect var-tx leaf gate re-recipe'd against aomdec (cq 44/46 product texture) with a pixel-compared firing assertAhmet Kaan Gümüş · 663bb80Browse files
feat(av1): decode the 128-root HORZ/VERT half coded INTRA in an inter frame (opt-in, ungated)Ahmet Kaan Gümüş · 37c9fd7
feat(av1): decode the 128-root HORZ/VERT half coded INTRA in an inter frame (opt-in, ungated) The shape routes through the key frame's own proven body (decode_block_128rect: square TX_64X64 luma units, one TX_32X32 chroma unit per 64x64 mu chunk on the offset-10 txb_skip rows, per-TU prediction, Reach::of_tu mu-chunk rule, frame-edge write clip) with the three inter-frame differences: the mode-info read (INTRA_IN_INTER_MODE -> y_mode[3] -- size_group_lookup puts BLOCK_128X64/64X128/128X128 in group 3 -- plus the skip the inter caller already read), the tx_depth context (the real TXFM_CONTEXT bands via tx_size_context_txfm_rect against max_txsize_rect_lookup's TX_64X64, hence min(64)), and the set_txfm_ctxs publication an intra block of an inter frame makes. CfL (>32), filter intra (>32) and palette (>64) do not exist at this size and stay refused by name inside that body. OPT-IN ONLY (EC_INTRA128_IN_INTER=1): the named refusal is NOT lifted, because nothing proves the arm yet. The three 2 s cuts of the 10-bit 1920x792 128-superblock stream that reach this shape reach it AFTER a pre-existing entropy desync -- their frame 2 diverges from instrumented aomdec inside the superblock at mi(0,320), hundreds of blocks before mi(128,416) -- and three aomenc recipes (256x256 noise / static-band-plus-noise-strips, cq 20/32/45/55, --sb-size=128 --min-partition-size=64 --enable-rect-partitions=1 --kf-max-dist=100) produced zero 128-root HORZ/VERT halves in an inter frame at all. Default decode behaviour is byte-for-byte unchanged.
Merge branch 'lane-frame36' (f52ae0d): split superblock-level strips publish their txfm bands; the 10-bit 3840x1608 head cut decodes 48/48 frames byte-exact, pinned hidden-ARF witnessAhmet Kaan Gümüş · f7859fbBrowse files
test(av1): pin the hidden-ARF witness and gate it; sweep the same missing TXFM_CONTEXT publication in the 32-level 1:4 strip readerAhmet Kaan Gümüş · 620173e
test(av1): pin the hidden-ARF witness and gate it; sweep the same missing TXFM_CONTEXT publication in the 32-level 1:4 strip reader `crates/ec-av1/fixtures/reelb_arf_witness.obu` (32126 bytes, sha256 7f3b060da5aa9c537633e760c4af71316237db7692f6ae0d459bd2c2dd867d37) is the 58-frame-OBU prefix of a 2 s head cut of the 10-bit 3840x1608 stream: 40 decode-order frames, 37 shown, decode-order frame 33 a hidden alt-ref with cdef_bits=1 and loop restoration [Switchable, Sgrproj, Switchable]. `a_10bit_film_hidden_arf_with_split_superblock_strips_decodes_pixel_exact` compares every plane of all 37 shown frames against ffmpeg and hard-asserts the new `rect64_split_txfm_publish_hits` counter (4 on this stream), so the gate cannot pass vacuously if a stream stops carrying the shape. Class sweep: `decode_block_rect4` (the 32-level 1:4 strip reader, and the inter frame's reader for an intra 32x8/8x32) published the TXFM_CONTEXT bands on none of its three exits. Fixed the same way. Not exercised by this stream (its 32x8/8x32 counters are 0 once frame 33 decodes correctly -- the 48 they showed before were phantoms of the desync), so it is a latent sibling fixed by inspection, with the 48-frame decode re-measured byte-exact after it.
test(av1): the 1:4 rect var-tx gate asserted leaves its recipe never codedAhmet Kaan Gümüş · 3032341
test(av1): the 1:4 rect var-tx gate asserted leaves its recipe never coded The firing arm ran a cq-10 384x256 recipe whose stream, per an aomdec EC_VARTX histogram, splits no rectangular transform at all; the leaves it used to count came out of an already-desynced decode. Re-measured: the same texture at cq 44/46 carries TX_32X8/TX_8X32 splits (16x8 + 8x16 leaves) and decodes pixel-exact on all six frames, so the arm now hard-asserts the PIXEL-COMPARED tally. Gate B split-tx-8x4 arm keeps its unproven note with the re-measured reason.
fix(av1): a split-transform superblock-level strip published no TXFM_CONTEXT bandAhmet Kaan Gümüş · 79abd1e
fix(av1): a split-transform superblock-level strip published no TXFM_CONTEXT band `decode_block_rect64`'s `depth != 0` arm returns early, past the tail `txfm_partition_update_rect` lane-frame36 r1 added, so a SPLIT 64x16/16x64/ 64x32/32x64 strip left the above/left TXFM_CONTEXT bands holding the row's init value 64. libaom runs `set_txfm_ctxs(mbmi->tx_size, ...)` for EVERY block, with the SPLIT unit's size. Measured on the 10-bit 3840x1608 stream (58-OBU prefix), decode-order frame 33 (the hidden ARF): after the split 16x64 strip at mi(192,140) (`tx_depth=1` -> TX_16X32) the 32x64 intra block at mi(192,144) read `left_txfm=64` and took `tx_size_cat3` row 2 where aomdec takes row 1 -- same value, different range, desync from there to the end of the frame. With the fix every superblock entry range of every traced frame equals aomdec's, and all 37 output frames of the prefix are byte-exact against ffmpeg (frame 36 was 765464 differing bytes at r1's tip, 1992768 before it). Also adds the oracle's own `EC_ISTEP ... name=tx_depth ... cat=` line to the 2:1 intra-in-inter arm, which is what named this defect.
fix(av1): the intra-in-inter shape refusal named a correlate, not the shapeAhmet Kaan Gümüş · 7d049f4
fix(av1): the intra-in-inter shape refusal named a correlate, not the shape EC_OBMCREC=1 on the three 2 s cuts of the 10-bit 1920x792 128-superblock stream shows every arrival at this site is a 128x64 block (a PARTITION_HORZ half of a 128 superblock coded INTRA inside an inter frame) at mi (128,416) / (192,0) / (192,0) -- never the 16x4/4x16 strip the message named (class refusal-names-a-correlate). The message now carries the measured shape; refusal_inventory follows it.
fix(av1): the 1:4 intra strip readers never published the TXFM_CONTEXT bandsAhmet Kaan Gümüş · a43f3c7
fix(av1): the 1:4 intra strip readers never published the TXFM_CONTEXT bands decode_block_rect64/decode_block_rect4 are also the INTER frame's readers for a 64x16/16x64 (and 32x8/8x32) intra strip, but unlike every other intra-in-inter path they skipped libaom's set_txfm_ctxs write, so the block after a strip read the row's init value 64 as its left transform height and took the tx_size_cat3 CDF row 1 where libaom takes row 0 -- a same-value/wrong-row desync. Measured on a 58-OBU prefix of the 10-bit 3840x1608 stream (40 decoded frames): the first silent wall is decode-order frame 33, first wrong pixel Y(1920,64), first diverging element tx_depth at mi(16,480) (ours ctx=1 rng=56472, aomdec ctx=0 cat=3 rng=34964). Output frame 36 differing bytes 1992768 -> 765464; the wall is narrowed, not closed (see lanes/frame36-r1.handoff.md). Also adds two triage rungs: EC_PROBE_HDR=1 prints one line per frame header from decode_probe, and EC_TXCTX now also dumps tx_size_context_txfm's inputs.
fix(av1): OBMC read a 1:4-strip neighbour's interp filter from the wrong miAhmet Kaan Gümüş · 7285f03
fix(av1): OBMC read a 1:4-strip neighbour's interp filter from the wrong mi libaom's foreach_overlappable_nb_above/left (reconinter.c 780/840) snaps a 4-wide/4-tall neighbour back to its chroma pair's even mi and takes the neighbour's whole mbmi -- mv, reference AND interp_filters -- from the pair's SECOND mi. Ours took the MiInfo from that second mi but read the switchable filter symbols from the FIRST one, a different block: whenever that half is intra its filter record is the [3, 3] "no filter" sentinel, and the decode refused with "an OBMC neighbour whose switchable interp filter was never recorded". Measured with a new EC_OBMCREC rung on three 2 s cuts of the 10-bit 1920x792 128-SB stream: cur (24,348) 16x16 left-neighbour 16x4, (150,340) 8x8 above-neighbour 4x8, (56,32) 16x32 above-neighbour 4x16 -- every one a pair whose first half is intra (cell_inter=false, ref=-1). overlappable_above/left now return the mi the MiInfo actually came from and obmc_blend reads that cell's filter. All three cuts pass the site; they now stop at the next frontier (the intra 16x4/4x16 strip on the inter block path, and a Golomb tail on one). Gate: a_real_aomenc_10bit_obmc_over_1to4_strip_neighbours_decodes_pixel_exact -- real aomenc, 10-bit 128x128x24, --enable-obmc=1 --enable-1to4-partitions=1 --min-partition-size=4, five seeds, every frame all planes exact vs ffmpeg, hard assert on the new obmc_pair_filter_hits counter (the pair-sourced neighbour shape). The refusal string stays as an upstream-desync guard.
Merge branch 'main' into lane-vartxsplitAhmet Kaan Gümüş · 4730c95
Merge branch 'main' into lane-vartxsplit # Conflicts: # crates/ec-av1/src/decode.rs
fix(av1): a compound 8x8 leaf whose transform split erased its four 4x4 TUs' coefficient contextAhmet Kaan Gümüş · 8fd6019
fix(av1): a compound 8x8 leaf whose transform split erased its four 4x4 TUs' coefficient context The split arm of read_inter_luma8 returns an all-zero placeholder luma grid because each 4x4 transform unit has already written its own plane-0 neighbour state through record_mi_luma. The compound leaf then recorded that placeholder over all three planes (record_mi), wiping the four cul_level/DC-sign cells; the single-ref twin decode_leaf8 has carried the saved_luma_ctx save/restore around the same call since lane-txselect. Measured on a pinned 8-bit 384x256 cq-10 1:4-partition stream (md5 842355ef494455ead0352f62f84f2c56): decode-order frame 2, block mi(8,16), first DC-sign symbol -- aomdec dcctx=0 rng=41828, ours dcctx=1 rng=41148, from an empty left band at mi rows 8-9 owned by the split compound leaf at mi(8,14). All 6 frames now byte-identical to ffmpeg (was 91201 luma samples wrong on frame 2, whole frames 3-5 desynced).
feat(av1): intra 16x4/4x16 strips in an inter 1:4 partition and the un-split 64x32/32x64 corner transform unit, both refusals narrowed behind one film gateAhmet Kaan Gümüş · ddc5714
feat(av1): intra 16x4/4x16 strips in an inter 1:4 partition and the un-split 64x32/32x64 corner transform unit, both refusals narrowed behind one film gate
Both arms were already written and both sat behind env switches (EC_INTRA16X4_DECODE,
EC_RECT64_SPLIT) because three earlier rounds across two lanes reported that no witness
stream exists: every frame of the 10-bit 3840x1608 stream that fires either arm ALSO
carries a sub-8x8 intra leaf, which refused, so no firing frame ever finished and no
pixel comparison was possible. That dead-end expired with this lane's r2 (the sub-8x8
intra leaves decode); re-measuring is all it took.
The first 50 frame-carrying OBUs of that stream's head now decode all 33 frames with no
refusal and match ffmpeg on every plane of every frame, while intra16x4_in_inter reads
16x4=31 4x16=17 chroma_ref=23 and rect64_corner_tu reads 64x32=90 32x64=5. Pinned as
crates/ec-av1/fixtures/reelb_rect64_intra16x4_witness.obu (23472 bytes, sha256
c9e721088766163b9dbeb9fa8dd8b257ff0ec7f9157fc350de4d3c33cd9ec4e4, cut twice from
independent ffmpeg runs that hashed identically) and gated by
a_10bit_film_frames_with_intra_16x4_strips_and_rect64_corner_tus_decode_pixel_exact,
which hard-asserts all five counters. The full 48-frame segment diverges at decode-order
frame 36; the fixture is the exact prefix, not a truncation chosen to hide that.
Neither refusal STRING leaves refusal_inventory: both are narrowed, not deleted. "a split
intra strip whose transform unit is {tx_w}x{tx_h}" still stands for every shape other
than 64x32/32x64, and the 16x4/4x16 one still stands for a strip with no chroma-pair
record.
Sibling sweep: a_10bit_film_inter_frame_with_intra_1to4_strips_decodes_pixel_exact was
#[ignore]d with the note "un-ignore when the 64x32/32x64 luma coefficient tables land",
so it is un-ignored here. Running it for the first time showed its untested
frames.len() == 2 assert was wrong -- a raw ffmpeg decode of that fixture writes exactly
one 3840x1608 10-bit frame, so the second frame OBU is a no-show. Corrected to 1 with an
added ffmpeg-frame-count equality so the compare cannot go vacuous; the gate is green
with 480 intra 1:4 strips and the shown frame pixel-exact.feat(av1): intra 8x4/4x8 and 4x4 leaves inside an inter frame's sub-8x8 partitions, refusals lifted behind a real-aomenc gateAhmet Kaan Gümüş · d94fd8e
feat(av1): intra 8x4/4x8 and 4x4 leaves inside an inter frame's sub-8x8 partitions, refusals lifted behind a real-aomenc gate Both sub-8x8 intra refusals and their `EC_SUB8INTRA_DECODE` bypass are gone: "an intra 4x4 block inside an inter frame's sub-8x8 split ..." "an intra 8x4/4x8 block inside an inter frame's sub-8x8 HORZ/VERT partition ..." New gate `a_real_aomenc_inter_sequence_with_intra_sub8x8_leaves_decodes_pixel_exact` (stream.rs) re-encodes 12 real aomenc streams -- 8/10-bit x cq 48/55/63 x 128x128/192x128, `--min-partition-size=4 --max-partition-size=8 --enable-1to4-partitions=0` -- and compares all 6 decode-order frames, all three planes, against ffmpeg. Continue-and-sweep: a named refusal is recorded, any other decode error or any pixel mismatch fails. The fixture recipe is encoded twice on the first arm and the two streams compared byte for byte. End-of-sweep assert reads all five `sub8_intra_rect_hits` cells, so neither lifted refusal rests on a stream that never carried its shape. Result: 12/12 arms pixel-exact, counters [8x4=362, 4x8=80, chroma_ref=156, mixed=153, split4x4=98]. `sub8_intra_rect_hits` grows a fifth cell for the PARTITION_SPLIT 4x4 arm (the second refusal's own witness); decode_probe prints it. NOT included, measured not assumed: the `--tile-columns=1` arm. That recipe desyncs at decode-order frame 4 -- and desyncs identically with `--min-partition-size=16 --max-partition-size=16`, i.e. with no sub-8x8 block in the stream at all, so it is a pre-existing multi-tile defect, not this lane's bands. Repro pinned in the gate comment. Sibling gates re-run: sub8/obmc/mv_stack/1to4/refusal_inventory/gate_coverage = 33 passed, 2 failed, 5 ignored -- both failures are the zero-counter RECIPE defects this branch already carried (16x16-level 1:4 VERT_4 arms, rect var-tx leaf arm), neither a pixel mismatch.
fix(av1): compound 8x8 leaf published transform width 8 to the deblock grid even when its var-tx split it into 4x4 unitsAhmet Kaan Gümüş · 315f5f2
fix(av1): compound 8x8 leaf published transform width 8 to the deblock grid even when its var-tx split it into 4x4 units
`decode_inter_block8`'s COMPOUND early return called `fill_lf_grid(leaf_mi, 2, 8, ..)`
with a literal 8 where the fall-through single-ref tail writes `if split8 { 4 } else { 8 }`.
libaom `get_transform_size` (av1_loopfilter.c:207) reads the per-TU `inter_tx_size` for a
non-skip inter luma block, so the leaf's interior vertical/horizontal edges at x % 8 == 4
are real filter edges. Ours skipped them and widened the neighbouring edge's filter from
4-tap to 8-tap. Class early-return-skips-tail, third instance in this same arm.
Witness (8-bit 128x128 6-frame inter stream, cq 63): entropy and the pre-filter picture were
already exact on every frame; the POSTDEBLOCK dump vs the instrumented aomdec's diverged on
decode frame 2 at luma (78..80, 58..63), 12 px, max delta 3, around the unfiltered x=60 edge
of the 8x8 at mi(20,14) -- our `EC_AV1_DEBLOCK_TRACE_V` printed no VEDGE at x0=60 there while
the block's four TX_4X4 units demand one. A 12-stream sub-8x8-intra probe sweep
(8/10-bit x cq 48/55/63 x 128x128/192x128) goes 10/12 -> 12/12 pixel-EXACT vs ffmpeg.fix(av1): compound 8x8 leaf's early return clobbered its own per-TU luma coefficient contextAhmet Kaan Gümüş · d0f01ab
fix(av1): compound 8x8 leaf's early return clobbered its own per-TU luma coefficient context `decode_leaf8`'s COMPOUND arm returns before the fall-through tail, and that tail is where the `split8` plane-0 save/restore around `record_mi` lives. A compound var-tx 8x8 leaf therefore published the whole-block luma grid (all-zero when the transform is split into 4x4 units, since `read_inter_luma8`'s `record_mi_luma` already wrote the per-unit state) to `above[..][0]`/`left[..][0]`, so the NEXT block's first transform unit read `get_txb_ctx`'s `skip_contexts[4][0] = 3` where aomdec reads `[4][4] = 6` (txb_common.h:330). Class early-return-skips-tail. Witness (8-bit 192x128 inter stream, aomdec ladder): frame 2 mi(14,12) first luma TU, ours ctx=3 rng=43376 vs reference ctx=6 rng=61310; the block left of it, mi(14,10), is a compound 8x8 whose four TX_4X4 units all read ctx=6 correctly and then had their published levels zeroed. A 12-stream sub-8x8-intra probe sweep keeps its 10/12 pixel-EXACT rows and one refusing stream now decodes all 6 frames.
merge(sub8x4)+fix(av1): one faithful copy of libaom's sub-8px mv-stack scans, and a sub-8x8 leaf that never saw its sibling's block sizeAhmet Kaan Gümüş · 35461bb
merge(sub8x4)+fix(av1): one faithful copy of libaom's sub-8px mv-stack scans, and a sub-8x8 leaf that never saw its sibling's block size Merge of lane-intra16x4 r3 and lane-sub8intra r2: both ported the same two clauses of libaom `scan_row_mbmi`/`scan_col_mbmi` (mvref_common.c:143-236) into `mvstack.rs`; the merge keeps ONE copy per scan (row, col and their compound twins) -- the odd-mi step-back under a sub-8px block and the `>= mi_size_wide[BLOCK_8X8]` half of the weight / `processed_rows|cols` guard. Fix on top (`decode_inter_sub8_rect2`): libaom's `xd->above_mbmi`/`left_mbmi` are the neighbour block as DECODED, so leaf 1 of an 8x8 HORZ/VERT group sees leaf 0's own bsize. We published the side bands only in the GROUP tail, so leaf 1 read the block preceding the whole group; `get_tx_size_context` (pred_common.h:342) takes `block_size_wide[above_mbmi->bsize]` from there, and an intra 8x4 leaf 1 read `tx_size_cat0` row 1 where aomdec reads row 2 (class tx-grid-published-block-side). 12-stream sub-8x8-intra probe sweep: 5/12 pixel-EXACT -> 10/12.
fix(av1): the saved motion field kept only the LAST tile's columns -- av1_copy_frame_mvs read the mi grid through the per-tile reach clampAhmet Kaan Gümüş · ba5351f
fix(av1): the saved motion field kept only the LAST tile's columns -- av1_copy_frame_mvs read the mi grid through the per-tile reach clamp `build_motion_field` (this crate's `av1_copy_frame_mvs`) walks the whole frame's mi grid AFTER the tile loop has finished, when `MiGrid`'s tile window is still narrowed to the last tile. `MiGrid::get` returns `None` outside that window, so every tile but the last saved no motion vectors at all: on the pinned 192x68 2-tile-column stream the saved field held only mi_col 32..47, and the next frame's temporal (MFMV) candidates over the whole left two thirds silently vanished from the MV stack. The entropy stream still matched symbol for symbol -- a missing weight-2 temporal vote only reorders the stack -- so a NEW_NEWMV block at mi(0,24) took stack[1] = (36,0) (the compound extension's zero-fill) instead of libaom's (0,0), predicting 32 px off and leaving a 32-px-wide wrong column band. New `MiGrid::get_frame` is the unclamped frame-level read; only `build_motion_field` uses it. Rungs added with it: `EC_TPL` (per frame: use_ref_frame_mvs + filled projected cells) and `EC_TRACE_TPL`'s new `EC_TPL_SAVED` occupancy map of the saved field, which is what showed the 16-column hole. Pre-filter reconstruction of all 6 decode-order frames of the pinned stream goes 1306/3358/5027/6622 wrong luma px (frames 2..5) -> 0.
feat(av1): intra 8x4/4x8 and 4x4 leaves of an inter frame's sub-8x8 partition decode behind EC_SUB8INTRA_DECODE (gate RED, refusals kept)Ahmet Kaan Gümüş · 2b05cf7
feat(av1): intra 8x4/4x8 and 4x4 leaves of an inter frame's sub-8x8 partition decode behind EC_SUB8INTRA_DECODE (gate RED, refusals kept) decode_intra_sub8_leaf reads read_intra_block_mode_info's syntax (y_mode[0], no angle delta below 8x8, uv_mode + CfL only on the chroma reference, filter_intra off the shape's own class row) and then decode_leaf_rect8's luma/chroma body, with the INTER frame's tx-depth context and set_txfm_ctxs publication. Both sub-8x8 callers guard their chroma tail when the chroma reference is intra, and predict the group's 4x4 chroma WHOLE from the chroma-reference block's mv when a sibling is intra (is_sub8x8_inter false). Measured: 5/6 film probes stop first on sub-block 0 of a HORZ/VERT pair, non-skip; under the switch all six move to the next wall. The path is NOT proven: on an 8-bit 128x128 aomenc witness the intra leaf itself is bit-exact (mode + tx_depth rng match the oracle) but the stream desyncs inside the next 8x8 group, so the refusals stay the default behaviour and no gate is added.
fix(av1): OBMC overlappable-neighbour walk never ported libaom's mi_step==1 chroma-pair mergeAhmet Kaan Gümüş · 0ee3ba4
fix(av1): OBMC overlappable-neighbour walk never ported libaom's mi_step==1 chroma-pair merge `overlappable_above`/`overlappable_left` (obmc.h `foreach_overlappable_nb_*`) skipped the "4-wide/4-tall neighbour is half of a chroma pair" case as unreachable; the 16x16-level 1:4 partitions made it reachable. The 16x16 block right of a HORZ_4 whose strip 0 is inter and strips 1..3 intra counted that inter strip as overlappable, so we read a motion_mode symbol libaom never wrote (its walk snaps back to the pair's even row and reads the INTRA strip 1), desyncing the tile at the next coefficient: first TU all_zero=1 vs the reference's eob=59. After the fix the 8-bit 192x128 witness matches aomdec on 620/620 all_zero symbols (value and range) up to another lane's sub-8x8 intra refusal, and a new gate recipe (horizontal-bar source, cq63, --min-partition-size=8, 192x128, 5 intra 16x4 strips) decodes 6 frames bit-exact vs ffmpeg. Gate run once with --include-ignored: still RED, on attempt 0 only -- a mismatch r1 measured as another shape (99 rows above that stream's first strip) which panics before the new arm runs, so the test stays #[ignore]d with that measurement and the refusal stays in place behind EC_INTRA16X4_DECODE.
feat(av1): intra 16x4/4x16 strip of an inter 16x16-level 1:4 partition decodes behind EC_INTRA16X4_DECODE (gate RED, refusal kept)Ahmet Kaan Gümüş · dfaeea5
feat(av1): intra 16x4/4x16 strip of an inter 16x16-level 1:4 partition decodes behind EC_INTRA16X4_DECODE (gate RED, refusal kept) The key frame's per-strip body is lifted out of decode_rect4_16 into decode_rect4_16_strip and run from the INTER block path with INTRA_IN_INTER_MODE = (size_group 0, the skip decode_inter_block already read), so a single intra strip of a partition whose other strips are inter decodes through the readers the key frame already proves -- including the 4:2:0 pairing (even strips read no chroma, the odd one codes one 8x4/4x8 unit at the pair's origin, predicted per the strip that carries it). The inter path additionally publishes set_txfm_ctxs + txfm_partition_update for the strip (the key-frame body has no var-tx tree) and reads the tx-depth symbol off the real TXFM_CONTEXT bands; without that the block after the strip broke while the strip itself was exact. Not pixel-proven: the r1 gate (real aomenc, 4 recipes x 8/10 bit, every frame Y/U/V vs ffmpeg) is RED and #[ignore]d with its measurement, so the named refusal stays the default and the new path is behind EC_INTRA16X4_DECODE=1. Measured with the switch on, all six 10-bit film probes leave this wall (five stop on the sub-8x8 intra block, another lane's shape).
feat(av1): the 32x32-level 1:4 inter strip codes its rectangular residual (32x8/8x32)Ahmet Kaan Gümüş · 0f5742b
feat(av1): the 32x32-level 1:4 inter strip codes its rectangular residual (32x8/8x32) MEASURED first: an env-gated print at the refusal site (EC_RECTRES=1) on both 10-bit 3840x1608 film cuts and four offsets of the 10-bit 1920x792 stream gives 6/6 refusals at w=32 h=8 or w=8 h=32, non-skip, inter -- nothing else. The 64-axis shapes the charter expected were already supported and never fire. TX_32X8 codes all 256 positions. New TxbSet::LumaRect32x8Inter = the intra LumaRect32x8 tables (get_txsize_entropy_ctx = TX_16X16, txsize_log2_minus4 = 4) plus a tx_type table the intra twin has none of: av1_get_ext_tx_set_type at tx_size_sqr_up == TX_32X32 is EXT_TX_SET_DCT_IDTX for inter with or without reduced_tx_set, read at the txsize_sqr_map[TX_32X8] == TX_8X8 row. Chroma pair is one 16x4/4x16 unit (ss_size_lookup[BLOCK_32X8] = BLOCK_16X4) = Chroma8's tables. Scans, sub_tx_size_map[TX_32X8] = TX_16X8 var-tx leaves and the rect coefficient reader were already shape-general. Gate a_real_aomenc_inter_sequence_with_32x32_level_1to4_strips_codes_their_rect_residual: real aomenc, --enable-1to4-partitions=1 --enable-tx-size-search=1 --min-partition-size=8 --max-partition-size=32, 16 attempts x 8/10-bit, both orientations, every decode-order frame Y/U/V vs ffmpeg, oos_mismatch == 0, one hard assert per lifted shape on the PIXEL-COMPARED counter: 32x8=7 8x32=8, 0 refusals, 0 mismatches. A 72-run recipe sweep found that only 32-pixel motion bands at cq >= 48 make aomenc code a NON-SKIP strip; narrower bands give the same partition with skip set and prove nothing about the residual. Film frontier: the 10-bit 3840x1608 cut still shows 33 frames -- the gain is inside frame 34, which now codes a 32x8 residual unit and stops on a different wall (an intra 16x4/4x16 strip inside an inter 16x16-level 1:4 partition). All six cuts moved to that same next refusal. The rect64 refusal is NOT lifted: the clean prefix reports rect64_corner_tu 0/0, so no witness exists yet.
Merge branch 'lane-rect64port' (d08f9c6): TX_64X32/TX_32X64 split-intra-strip luma corner ported onto main behind EC_RECT64_SPLIT (no film witness yet; the next wall is the inter rect-residual refusal)Ahmet Kaan Gümüş · 480a3f2Browse files
fix(av1): the loop filter ignored spec 7.14.2's skip/pu_edge suppression, filtering a var-tx interior edge lattice the reference never touchesAhmet Kaan Gümüş · fc0fe40
fix(av1): the loop filter ignored spec 7.14.2's skip/pu_edge suppression, filtering a var-tx interior edge lattice the reference never touches edge_params dropped the `!pv_skip || !curr_skipped || pu_edge` term on the invariant "a coded block's transform is always its own full size", which var-tx broke: every 8-px interior transform edge inside a skipped inter block was filtered. Adds a per-4x4-mi coded-block-origin band (written alongside the skip flag) for the pu_edge term. On the pinned 192x68 cq61 tile_cols=1 8-bit stream, decode-order frame 1 goes 7244 -> 0 wrong post-deblock luma px; its pre-filter reconstruction was already bit-exact, which disproves the compound-prediction premise this round started from. The 1:4 rect-vartx sibling gate stays green. The straddling gate still fails on a different, isolated defect: decode frame 2 is wrong pre-filter in the x=96..127 column band. (cherry picked from commit 6bc2c8b32c187d51e7723249c7eecbad9a298466)
feat(av1): TX_64X32/TX_32X64 luma corner read for a split intra strip, behind EC_RECT64_SPLIT=1 (no witness yet)Ahmet Kaan Gümüş · 42d7c39
feat(av1): TX_64X32/TX_32X64 luma corner read for a split intra strip, behind EC_RECT64_SPLIT=1 (no witness yet) Hand-port of the lane-intra64split decode hunk onto main 78d8ff7: a 64-level HORZ/VERT intra strip whose luma transform unit is the un-split TX_64X32 / TX_32X64 reads its coded 32x32 corner through TxbSet::Luma64 with default_scan(TX32) and the real rect shape passed to av1_nz_map_ctx_offset -- byte for byte decode_block_rect64's depth-0 key-frame arm. Per-orientation counter rect64_corner_tu_hits(0|1) exported through stream.rs and printed by decode_probe. NOT lifted: measured on both 10-bit 3840x1608 cuts, the arm fires (16x 64x32 + 2x 32x64 on the first cut, 2x 32x64 on the second) but the SAME frame then stops at "a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding", so no frame containing the shape ever completes and no pixel comparison exists. A refusal is lifted only with a gate, so the arm sits behind EC_RECT64_SPLIT=1 and the refusal stays the default; refusal_inventory and gate_coverage unchanged.
Merge branch 'lane-sb128c' (2432624): 128-root AB partitions, tx_size ctx against max_txsize_rect, per-unit reach above 64Ahmet Kaan Gümüş · 6f01e4dBrowse files
Merge branch 'lane-vert46' (3b4b9b6): per-transform-unit chroma entropy context above 64, var-tx bands stamped at the block's true dimsAhmet Kaan Gümüş · d4020b9Browse files
Cherry-pick lane-inter16ab (ee04373): every block of an inter frame publishes its txfm-partition bandAhmet Kaan Gümüş · de4295bBrowse files
Cherry-pick lane-mergefix (3b96a3a): reset the var-tx above/left txfm contexts per tile and per superblock rowAhmet Kaan Gümüş · 703bfadBrowse files
Merge branch 'lane-leaf8tx' (fe98aec): an 8x8 intra leaf in an inter frame whose tx_depth splits into 4x4 unitsAhmet Kaan Gümüş · b995924Browse files
Merge branch 'lane-pal8' (aec5aad): palette reconstruction on 8x8 intra leavesAhmet Kaan Gümüş · c206f61Browse files
Merge branch 'lane-cdefstrip' (092b124): the CDEF skip band on skipped rect inter stripsAhmet Kaan Gümüş · b8a5772Browse files
Merge branch 'lane-intrasplit' (a37a4bc): split transforms on intra HORZ/VERT strips in inter framesAhmet Kaan Gümüş · ebaad18Browse files
Merge branch 'lane-sb128c' (103b66f): the 128 partition root's intra rect arm and per-mu-chunk contextsAhmet Kaan Gümüş · d969cdcBrowse files
Merge branch 'lane-kf900' (fc7fca2): an 8x8 intra leaf ignored the use_intrabc it had just readAhmet Kaan Gümüş · c1efa28Browse files
fix(av1): rect tx-size context compared against the block side, not max_txsize_rectAhmet Kaan Gümüş · 606ff15
fix(av1): rect tx-size context compared against the block side, not max_txsize_rect get_tx_size_context resolves the above/left transform sizes against max_txsize_rect_lookup[bsize], which tops out at 64x64: a 64x128 or 128x64 block must compare against 64, never against its own 128 side. The rect helper passed the raw block dimensions, so the right 64x128 half of a 128-root VERT read the tx-depth symbol off CDF row 0 where libaom uses row 1 -- entropy desync from that block on (326839/393216 bytes of a 512x512 key frame). The square path already capped this way. After the fix the whole 5370-element all_zero coefficient ladder of a 512x512 sb128 stream is identical to the oracle's; the residual is reconstruction-only.