Commits
Commits on
552edc4cede0dfd9bebbc4e344242802802d15ccFiltered to crates/ec-av1/src/stream.rsClear filter2026-09-04
test(av1): a real screen key frame codes an unskipped intrabc block under TX_MODE_SELECTAhmet Kaan Gümüş · c72e315
test(av1): a real screen key frame codes an unskipped intrabc block under TX_MODE_SELECT The refusal "an intrabc block under TxMode::Select" was an unmeasured claim about the encoder. Spec-wise its premise is open (tx_mode is forced to ONLY_4X4 only under CodedLossless; allow_intrabc is an independent screen-content condition) and libaom leaves it open too -- select_tx_mode never consults allow_intrabc, and the only downgrade to TX_MODE_LARGEST is txb_split_count == 0. The census over 13 real --tune-content=screen --enable-intrabc=1 key frames settles it: ordinary sources never present the premise (with tx-size-search on, RD never picks intrabc and libaom clears allow_intrabc again; with it off the frame is TX_MODE_LARGEST), but an exact-repetition source -- a 2x2 tiling of one bar pattern -- codes allow_intrabc under TX_MODE_SELECT, and with the rect/1:4 partitions off its intrabc block lands on a square block unskipped and reaches the refusal by name. Twelve arms decode pixel-exact against ffmpeg; exactly one refuses. So the refusal is real and load-bearing, and the lift it names gets a waiting witness gate (ignored until the intra path reads the inter var-tx tree). The same recipe at cq=45 exposes the hole the refusal does NOT cover: those intrabc blocks are all skip, pass the `&& !skip` guard and decode WRONG against ffmpeg. That arm sits in the ignored gate with a note; narrowing the guard is a decode.rs edit this round could not make.
fix(av1): a chroma deblock edge must read the group's BOTTOM/RIGHT miAhmet Kaan Gümüş · 58b009b
fix(av1): a chroma deblock edge must read the group's BOTTOM/RIGHT mi `set_lpf_parameters` (libaom av1_loopfilter.c:245) indexes the mi grid for a CHROMA edge at `scale | ((coord << scale) >> MI_SIZE_LOG2)` -- the bottom/right mi of the co-located 8x8 luma group, the same cell that donates the group's chroma prediction -- steps to the previous cell by `1 << ss` mi, and prices `pu_edge` by testing the edge coordinate against the block size in the FILTERED plane's own pixels (chroma bottoms out at 4 px). This decoder dropped the `| 1`, stepped by one mi, and compared mi origins. All three are invisible while every block is 8x8 or larger -- all four mi of a group carry the same tx size, ref frame, skip flag and delta_lf -- and wrong the moment cpu-used=4 splits a group into 4x4 luma blocks: the top-left mi's filter level 12 fired filter4 on a U edge where the bottom/right block's level 8 leaves it alone. Class `context-read-from-one-cell`. Measured on fixtures/superres_alltools_sb128_320x180.obu against the instrumented libaom: post-deblock (EC_AV1_POSTDEBLOCK_DUMP) 1 wrong U sample in frame 2 growing to 137 U + 131 V by frame 9 -> 0 in all 10 frames, and the final output goes from 280 U + 331 V (max 9) to byte-exact vs ffmpeg. The prediction path was never at fault: every prefilt frame was already exact, and the frame-4 prefilt drift was the deblocked reference chain. `a_superres_all_tools_sb128_stream_decodes_pixel_exact` is un-ignored.
fix(av1): superres upscales between CDEF and loop restoration, not after LRAhmet Kaan Gümüş · 08a2542
fix(av1): superres upscales between CDEF and loop restoration, not after LR Spec 7.16 (libaom `superres_post_decode`, called in `decodeframe.c` between `av1_cdef_frame` and `av1_loop_restoration_filter_frame`): the horizontal upscale runs after CDEF and BEFORE loop restoration. This decoder ran the whole filter chain on the downscaled frame and upscaled last, in `stream.rs`, so under superres loop restoration filtered downscaled pixels through a unit grid sized from the downscaled width. Three widths were wrong, all in the same class (`wrong-stage-width`: each plane width in the filter chain is either the downscaled one -- deblock, CDEF and the mi grid -- or the upscaled one -- everything loop restoration does): * `RestorationGrid::new` sized its unit counts from `frame_width`; libaom sizes them with `av1_get_upsampled_plane_size` (upscaled width). * `read_lr`'s unit corners divided downscaled mi columns by the unit size; `av1_loop_restoration_corners_in_sb` scales by `superres_denom / SCALE_NUMERATOR` (`mi_to_num_x`/`denom_x`) when the frame is scaled. * The pixel filters ran on downscaled planes. Both the post-CDEF frame and the post-deblock frame LR substitutes at stripe boundaries are now upscaled first (libaom's `save_deblock_boundary_lines` runs `av1_upscale_normative_rows` over its saved rows when the frame is scaled). `decode::set_superres` carries the state per frame, like `set_bit_depth`, and the reconstruction buffer's own real columns past `frame_width` stay the upscale's right margin -- the `take_last_frame_wide_margin` hand-off to `stream.rs` is gone with the late upscale it fed. Gate: `fixtures/superres_kf_cdef_lr_64x64.obu`, a real aomenc key frame with CDEF and loop restoration under `--superres-denominator=12`, was 1873 wrong samples (max 7) and is now byte-exact against ffmpeg. Residual, pinned ignored: `fixtures/superres_alltools_sb128_320x180.obu` (10 frames, all tools, sb128, cpu-used=4) went from 37315 wrong samples/max 171 to 1620/max 11 -- what is left is CHROMA ONLY (luma exact in all 10 frames) and survives `--enable-cdef=0 --enable-restoration=0`, so it is a scaled-reference chroma prediction defect, not filtering.
feat(av1): all three scaled-reference (superres) refusals lifted -- 8x8 leaf, sub-8x8, warpAhmet Kaan Gümüş · 421ae92
feat(av1): all three scaled-reference (superres) refusals lifted -- 8x8 leaf, sub-8x8, warp
The 8x8-leaf guard's own comment blamed a below-8x8 desync ("a 4th symbol
out of a 3-symbol alphabet"). That premise was stale: deleting the guard
decodes the pinned --superres-denominator=12 stream straight through to the
NEXT refusal. One wrong alphabet was behind all three.
Root cause (class wrong-alphabet-same-value / branch-dropped-as-unreachable):
decode_inter_block8 read the 3-symbol motion_mode row under a SCALED
reference, where libaom motion_mode_allowed makes WARPED_CAUSAL eligible
only if (num_proj_ref >= 1 && (allow_warped_motion && !av1_is_scaled(sf))) --
so the alphabet shrinks to the 2-symbol obmc one (with OBMC off, no symbol
at all). The 16x16+ path already had `&& !ref_is_scaled`; the leaf's own
comment asked whoever lifted the refusal to add it, and nobody could reach
the code to notice. First-bad without it: 96x96 denom-12 warped stream,
decode-order frame 3, luma (15,54), 7652 samples wrong, max 155.
Lifted, each byte-exact vs ffmpeg with its own hit counter:
* "an 8x8 partition leaf under a scaled reference"
* "a sub-8x8 inter block under a scaled reference" (both sub8 readers)
* "warp prediction with a scaled reference" -- its translational fallback
was already implemented and the refusal sat in FRONT of it (class
refusal-short-circuits-its-own-code); the r1 mismatch that kept it alive
was the strip chroma piece below, not the fallback.
Same-shape sweep of "every caller that computes a scaled start position":
* mc::predict_maybe_scaled -- the one dispatch the sub-8x8 luma/chroma
callers now share instead of hardcoding the unscaled walk.
* the 16x4/4x16 strip's sub-8x8 chroma piece was SKIPPED entirely under a
scaled reference (silent wrong pixels, no refusal); it now rebuilds from
the PREVIOUS strip's own reference and that reference's own scale factor.
* allow_warp's scale bail-out was missing at the 8x8-leaf single-ref warp
and at both compound warp sites (PER SLOT: one tap can be scaled while
its sibling still warps).
Gate: real_superres_streams_with_sub8_leaf8_and_warp_decode_pixel_exact --
two 96x96 denom-12 streams, every unrelated tool off, pixel-exact vs ffmpeg;
arm A hard-asserts scaled leaf8 + sub8 hits, arm B asserts a WARPED_CAUSAL
eligibility was suppressed by scale. The r27 census now asserts none of the
three strings can come back. Inventory rows removed.test(av1): four more refusals proven -- empty ref slot, segmentation overrides, OBMC filter band, superres 8x8 leafAhmet Kaan Gümüş · baa89bd
test(av1): four more refusals proven -- empty ref slot, segmentation overrides, OBMC filter band, superres 8x8 leaf
Round 27 of the refusal-proving lane. 25 -> 29 proven of 40.
* "a reference frame selected with no picture at this frame's own
ref_frame_idx slot for it": negative gate on `ref_planes` over all six
non-LAST references. No stream-level witness exists with this crate's
writers -- a shown key frame refreshes all eight slots and nothing
clears one, and a stream opening on an inter frame is stopped one
guard earlier ("an inter frame with no key frame before it"). The
reachable premise is a HIDDEN key frame with a partial
refresh_frame_flags, which write_frame_header cannot write; that is
the open half, recorded in the inventory.
* "a frame whose segmentation enables SEG_LVL_REF_FRAME/SKIP/GLOBALMV":
negative gate (written key frame, three features x three segment ids,
refused by name with 0 pictures) plus a census of what aomenc emits.
Measured: --aq-mode=1/2 and --deltaq-mode=1 reproduce the baseline
stream byte for byte at this recipe (the flags change nothing);
--aq-mode=3 does code segment_id symbols (133 at cq40, 444 at cq10)
and never enables any of the three. No capability gap here.
* "an OBMC neighbour whose switchable interp filter was never recorded":
structural audit -- record_inter_rect_mi is the band's single writer
and no call site stamps the [3, 3] sentinel on an INTER cell (each
site's arguments tokenised, never substring-matched) -- plus a witness
gate on two real --enable-obmc --enable-dual-filter streams: 237 band
reads over ~115 OBMC blocks each, refusal 0x. --cpu-used=0 is
load-bearing: at speed 4 aomenc settles on a frame-level fixed filter
and the band is never read (0 reads, measured).
* superres trio census, six real streams: the four fixed-denominator
--superres-mode=1 encodes (denoms 10/12/16, warp + OBMC on) ALL stop
at "an 8x8 partition leaf under a scaled reference", and the two
--superres-mode=3 auto encodes pick denominator 8 and carry no scaling
at all (0 scaled MC blocks). The warp and sub-8x8 scaled refusals
never fire: the 8x8-leaf guard sits in front of them, so they stay
unproven until that gap is lifted. All three are real capability gaps.test(av1): four more refusals proven -- mi grid, ref height, primary_ref CDFs, intra modeAhmet Kaan Gümüş · 367c38e
test(av1): four more refusals proven -- mi grid, ref height, primary_ref CDFs, intra mode Two enumerations and two negative gates, taking the inventory's numerator from 21 to 25 of 40: * "a frame with no mode-info grid": `compute_image_size` (spec 5.9.9) is zero only for a zero frame width/height, and no path that sets one can produce that -- `frame_size()` is `+1`-coded, `superres_params()` divides by 9..=16 with rounding (enumerated over the whole 16-bit upscaled domain, minimum 1), and `show_existing_frame` / `frame_size_with_refs` copy a slot. Swept per axis through the REAL header reader over every size this crate's writers can express. * "a reference picture whose height does not match this frame's own true size": negative gate, a written 64x64 key frame followed by a 64x32 inter frame (`frame_size_override_flag` with error resilience on, the one combination the writer expresses) -- refused by name, one picture out. * "a frame naming primary_ref_frame at a reference slot with no saved CDF state": the picture and CDF slots are written by exactly two loops over the same refresh mask (enumerated from the source, so no slot holds a picture without CDFs), and the reachable case is a slot nothing has refreshed -- a stream opening on a non-error-resilient inter frame, gated at all eight slots. This refusal, not the missing-key-frame one, is what such a stream reaches: the CDF load happens in the header path. * "an intra mode this decoder does not code (round 2)": all three guards refuse `mode >= 13` on a symbol read from the 13-symbol `y_mode` CDF; the test finds each site by the refusal in its own body, resolves the CDF the symbol came from, and fails if a wider alphabet (`uv_mode_cfl` is 14) ever feeds one.
test(av1): three more refusals proven -- empty tile group, empty show_existing slot, key-less inter frameAhmet Kaan Gümüş · 2eab33d
test(av1): three more refusals proven -- empty tile group, empty show_existing slot, key-less inter frame * "a frame OBU with no tile group" -- ENUMERATION. `parse_tile_group` is the only producer of the `tiles` vector `decode_stream` tests, and its success path pushes one `Tile` per member of the inclusive range `tg_start..=tg_end`, which is never empty. A real frame OBU's tile payload truncated from empty upwards confirms it: every OBU that parses carries a tile, and none of them reaches the refusal. An empty payload parses into ONE zero-byte tile, not none, which is why the charter's "payload ends after the frame header" fixture cannot reach the string. * "a show_existing_frame header naming an empty reference slot" -- NEGATIVE GATE over all 8 slots. The header OBU is hand-written (spec 5.9.2 codes only show_existing_frame + frame_to_show_map_idx here) because the frame header writer writes shown key/inter frames only. A shown key frame refreshes every slot, so a stream that opens on this header is the only reachable shape -- the charter's "key frame with the bit clear" cannot be written. * "an inter frame with no key frame before it" -- NEGATIVE GATE, built from this crate's own writers (a shown inter frame is writable) instead of a stripped aomenc stream: no external tool, byte-identical every run. Both gates assert the refusal by name AND that the sink saw no picture.
feat(av1): reconstruct palette blocks on 8x8 leaves inside inter framesAhmet Kaan Gümüş · cdef95e
feat(av1): reconstruct palette blocks on 8x8 leaves inside inter frames `decode_inter_block8`'s intra arm read `palette_y_mode`/`palette_uv_mode` off hardcoded CDF row 0 and refused the moment either said "yes". It now reads the whole `read_palette_mode_info` syntax with this leaf's REAL `av1_get_palette_mode_ctx` and colour cache, decodes both colour-index maps after the mode info (`av1_visit_palette`) and predicts from them through the existing PALETTE_PRED slot, per transform unit when the leaf's `tx_depth` splits -- the same shape the >=16 intra-in-inter block already ran. A palette block on an 8x8 leaf also made a pre-existing hole in the palette neighbour bands reachable: a sub-8x8 group published nothing, so the row's `left_palette_size` kept an earlier 8x8 palette block's size and `av1_get_palette_mode_ctx` read 1 where libaom gathers 0 (decode-order frame 1, mi(30,30): palette size decoded as 8 instead of 2). All three sub-8x8 tails now publish the all-zero state, as does `decode_inter_block8`'s own compound early return (class early-return-skips-tail). New rung `EC_PALPUB=1` prints every publication into those bands, which is what named the gap. Gate `a_screen_stream_with_palette_8x8_leaves_in_inter_frames_decodes_pixel_exact`: 15 frames pixel-exact on every plane vs ffmpeg, 25 palette-Y and 12 palette-UV 8x8 leaves inside inter frames -- exactly the 25 `bsize=BLOCK_8X8 palette_size>0` blocks aomdec's `EC_PALSYN` counts past the key frame. The `(UV)` refusal string is gone from the decoder entirely (this leaf was its only site); the `(Y)` one survives only as the defensive `palette.is_none()` guard no caller can reach.
wip(av1): r23 palette on sub-8x8 leaves / 128-root screen strip, partial (committed by the orchestrator at the builder's turn cap)Ahmet Kaan Gümüş · 4b093b1Browse files
feat(av1): reconstruct palette blocks inside inter frames, and fix the palette colour-index CDF counter resetAhmet Kaan Gümüş · 6a16223
feat(av1): reconstruct palette blocks inside inter frames, and fix the palette colour-index CDF counter reset
An intra block in an inter frame refused by name the moment it actually used
a palette ("reconstruction is out of scope"), at both the square
(`decode_inter_block`) and the rect (`decode_intra_rect_in_inter`) path. Both
now read the real syntax -- mode/size/colours off this block's own
`av1_get_palette_mode_ctx` context and `av1_get_palette_cache` colour cache,
the two colour-index maps deferred past `filter_intra` exactly as
`av1_visit_palette` runs them -- and predict from the map (per transform unit
where the luma transform splits), the same machinery the key-frame paths use.
Every block of an inter frame now also stamps its palette state (all-zero for
an inter block) into the mi-granular neighbour bands, which is what libaom's
mode-info grid holds and what the next block's cache and mode context read.
The witness then desynced at the FIRST inter-frame palette block's colour
index map, third symbol: the two palette colour-index tables are this
decoder's only variable-alphabet CDFs (the reader takes `[..=n]` of a
`[u16; 9]` row, so `update_cdf`'s symbol counter lives at index `n`), and
`Cdfs::reset_counts` zeroed the array's last slot instead. Every colour-index
row therefore crossed a frame boundary with a saturated count and adapted at
rate 6 where libaom, counting from zero, adapts at 4 (class
cdf-counter-not-reset). Swept: those two are the only `[..=n]` readers here.
Also lifted, as a stale premise: the 16x4/4x16 arm of "a HORZ/VERT intra strip
in a screen-content frame (palette syntax is consumed for square blocks
only)" -- that arm routes through `decode_rect4_16_strip`, which takes
`allow_screen_content_tools` and reads the whole palette syntax already. The
128-root arm keeps the refusal (its body reads none, and no --sb-size=128
screen witness exists).
Gates (aomenc --tune-content=screen --enable-palette=1 --enable-intrabc=0
--sb-size=64, 15 frames, key + inter, 8-bit and 10-bit twins):
a_real_aomenc_screen_stream_with_palette_blocks_decodes_pixel_exact and
a_screen_stream_with_16x4_intra_strips_in_inter_frames_decodes_pixel_exact --
all 15 frames byte-exact vs ffmpeg on every plane, with inter-frame palette
counters y/uv > 0 so neither gate is vacuous.feat(av1): code the palette syntax on a rect intra strip inside a screen-content inter frameAhmet Kaan Gümüş · 7ee6680
feat(av1): code the palette syntax on a rect intra strip inside a screen-content inter frame read_palette_mode_info has no square-only term: a --tune-content=screen inter frame writes palette_y_mode (and palette_uv_mode) for every block whose shape palette_bsize_ctx_wh admits, intra strips included. The inter path's intra arm skipped both symbols and refused the whole case by name, and a real stream reaches that refusal -- measured with decode_probe on testsrc2 256x192 --tune-content=screen --enable-palette=0 --enable-intrabc=0: an 8x16 strip at 8-bit, a 16x8 one at 10-bit. The 2:1 reader now codes the syntax itself (mode context 0 and no cache: no block this decoder produces can USE a palette, and the arms it shares with the key-frame path refuse that by name), and the 1:4 arm goes through read_intra_mode_rect, which already did. Both arms of the new gate decode ten frames pixel-exact against ffmpeg with 63 strips counted each. Six earlier encodes with the palette SEARCH on never reach an inter frame at all: the key frame stops on the separate palette-reconstruction refusal first (class refusal-hides-a-defect).
test(av1): census-prove the intra 16x4/4x16 chroma-pairing refusal unreachableAhmet Kaan Gümüş · 48ada7f
test(av1): census-prove the intra 16x4/4x16 chroma-pairing refusal unreachable Refusal C fires for an intra footprint with a side below 8 that carries no chroma-pair record. The census says the only sub-8 footprints three real streams present are the 16x4/4x16 strips of a 16x16-level 1:4 partition, and that caller sets INTER_STRIP_CHROMA for every one of its four strips before the block is decoded; the sibling counter shows the SUPPORTED path firing 16x4=337 4x16=580 (439 chroma-paired) inside streams that decode with no refusal at all.
test(av1): census-prove the rect-residual refusal unreachable over three real streamsAhmet Kaan Gümüş · 81b0ef9
test(av1): census-prove the rect-residual refusal unreachable over three real streams
Refusal A ("a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs
rectangular residual coding") was an unmeasured claim about a SHAPE.
`inter_piece!` sets `reject_residual` only when the block's true footprint
differs from its square CDF context, so the refusal needs a footprint that is
both non-square-in-context and missing from `rect_inter_residual_supported`.
`INTER_BLOCK_SHAPES` + `inter_block_shape_mask()` record every
`(side, write_w, write_h)` triple decoded on the thread (bit 31 = a triple the
table does not list, so the gate is a census and not a restatement of itself).
Three real streams present exactly 18 triples -- four square ones, where
`reject_residual` is false, and all fourteen rectangular AV1 block shapes,
every one of them covered by the residual table.
Also adds `PROVEN` to the refusal inventory: which refusals have a proving
witness or census test, printed as the inventory's numerator.Merge branch 'lane-t900' (c14f0c99): loop-restoration coefficient reference reset per tile (spec decode_tile RefLrWiener/RefSgrXqd); multi-tile inter gate un-ignoredAhmet Kaan Gümüş · 5165af7Browse files
fix(av1): the loop-restoration coefficient reference must reset at every tileAhmet Kaan Gümüş · f546cd0
fix(av1): the loop-restoration coefficient reference must reset at every tile Spec 5.11.2 `decode_tile` resets `RefLrWiener` / `RefSgrXqd` to the midpoint filter at the top of EVERY tile. `decode.rs` declared that running state once per frame (both the key-frame and the inter tile loops), so every tile after the first decoded its Wiener/Sgrproj coefficients off the previous tile's reference. The symbol COUNT is unchanged, so entropy stayed in sync and reconstruction stayed byte-exact -- only the filtered pixels moved. On the multi-tile inter gate at seed 44, frame 0 (the key frame) had the whole right tile column wrong: luma x[128..255] y[0..91], 1330 samples, max delta 2, chroma exact. Stage ladder that named it, on the pinned 2x2-tile stream: `EC_AV1_PREFILT_DUMP` exact, `EC_AV1_POSTDEBLOCK_DUMP` exact, `EC_AV1_POSTCDEF_DUMP` exact -- leaving loop restoration as the only remaining stage. That last rung did not exist on the oracle; it was added to its `decodeframe.c` (8-bit and forced-highbitdepth safe) this round. Class: per-tile state not reset. Swept: both tile loops in `decode.rs` are the only ones, and `lr_reference` was the only spec `decode_tile` reset missing there (above context, `DeltaLF`, `CurrentQIndex` were already per-tile). `a_real_aomenc_multi_tile_inter_stream_decodes_pixel_exact` is un-ignored: 6/6 seeds, 16/16 frames pixel-exact.
test(av1): un-ignore 9 green gates whose ignore reasons were stale; reword 3 zero-firing gates; drop dead opt-in mentionsAhmet Kaan Gümüş · 8a26589
test(av1): un-ignore 9 green gates whose ignore reasons were stale; reword 3 zero-firing gates; drop dead opt-in mentions The 9 gates were ignored for defects/refusals that no longer exist on this tip; all 9 pass with their assertions untouched. The 3 gates whose recipe never fires the feature keep the attribute with the measured reason (class gate-blind-to-feature). Comment mentions of two decode opt-ins that were lifted now state the present default-on path and its gate.
feat(av1): lift the intra-128-in-inter opt-in -- a 128-root HORZ/VERT half coded INTRA inside an inter frame now decodes by default, gatedAhmet Kaan Gümüş · 0d45d3d
feat(av1): lift the intra-128-in-inter opt-in -- a 128-root HORZ/VERT half coded INTRA inside an inter frame now decodes by default, gated lane-t900 r18. The `EC_INTRA128_IN_INTER` opt-in (lane-inter128intra r1) had no witness: r16's 512x512 stream fired the arm only while desynced and fires it 0 times since r17's fix. What r16/r17 missed: libaom's RD does not PICK a 128-root HORZ/VERT in the frame interior at all -- the r16 witness codes its 128 roots as 96 NONE + 64 SPLIT and nothing else, and a textured 640x384 sweep the same. The shape exists where the frame EDGE forces it: a partial last superblock row makes `has_rows128 == false` so the 128x64 top half is implied, and a partial last column implies the 64x128 left half. Put content no reference holds in exactly those two bands of an inter frame and the encoder codes those forced halves INTRA. New fixture `intra128_in_inter_witness2.obu` (10-bit 704x320 = 5*128+64 by 2*128+64, panning noise interior, fresh smooth ramps in the two edge bands at frames 6/9/12, --lag-in-frames=0). Gate `an_intra_coded_128_half_inside_an_inter_frame_decodes_pixel_exact` asserts both arms fire (3x 128x64, 6x 64x128) and all 15 frames are byte-exact vs ffmpeg on every plane, with no env var set.
fix(av1): a skipped var-tx inter block never reset its own luma coefficient contextsAhmet Kaan Gümüş · 125b0a9
fix(av1): a skipped var-tx inter block never reset its own luma coefficient contexts `read_block_tx_size` hands back var-tx leaves for a skipped inter block whenever the block is a 128 root (every one of them under TX_MODE_LARGEST). `decode_inter_block` then takes its `if skip` arm, which reconstructs straight from the predictor and never enters the per-transform-unit luma loop -- and the block-level `record_split_luma_rect_mi` deliberately writes no plane 0, on the premise that the loop already did. So the block left the PREVIOUS block's luma entropy levels standing where libaom's `av1_reset_entropy_context` zeroes all three planes over the block's footprint (class early-return-skips-tail). Measured on the 10-bit 512x512 --sb-size=128 witness, decode-order frame 1: the 128x128 is_inter=1 skip=0 block at mi(32,64) read txb_skip ctx 2 where aomdec reads 1, with equal entry range on both decoders, because the skipped 128x128 block at mi(32,32) never cleared left[32..48] (ours level 1, aomdec 0). Publishing the all-zero `luma_grid` on that arm is exactly the reset; the filtered EC_TRACE_COEFF ladder (all_zero/eob/after_bases) now matches 1397/1397 steps over all 10 frames and every plane is byte-exact vs ffmpeg. Sweep: the other three `record_split_luma*` callers are the intra bodies (decode_rect_split, decode_block, decode_block_128rect); all three publish per transform unit inside their loop even when `skip`, so the inter tail was the only instance. Both inter var-tx arms share that tail. The gate that pinned this is `intra128_in_inter_witness.obu`, built last round as an intra-128-in-inter witness. r16 measured three hits of that arm in it; with the stream decoding exactly the arm fires ZERO times, so those were desync artifacts (class counter-from-refused-stream) -- the EC_INTRA128_IN_INTER opt-in therefore STAYS, still ungated, and the test is renamed and repointed at the reset it actually proves (new counter `skip_vartx_luma_reset_hits`, 66 on this stream). Rungs added: EC_ECDUMP (the above/left luma level arrays and resulting ctx at every txb_skip read, matched by the same env var on the instrumented aomdec) and EC_ECPUB (every block/TU coefficient-context publication).
test(av1): pin the first stream that codes a 128-root HORZ/VERT half INTRA inside an inter frameAhmet Kaan Gümüş · afb49c4
test(av1): pin the first stream that codes a 128-root HORZ/VERT half INTRA inside an inter frame Adds crates/ec-av1/fixtures/intra128_in_inter_witness.obu (13066 B, 10-bit 512x512, 10 frames) -- 128-wide horizontal bands in the left two superblock columns and 64-wide vertical bands in the right two, with two hard scene cuts and --kf-max-dist=9999, so the cuts must be coded as inter frames whose content no reference holds. It is the first recipe found that fires the intra128_in_inter arm at all: 1x 128x64 + 2x 64x128. The EC_INTRA128_IN_INTER opt-in is NOT lifted. All three hits land in a frame this decoder does not decode exactly, and a counter read out of a desynced frame proves nothing. The blocker is measured and separate from this arm: the same source with every optional tool disabled fires the arm 0 times and desyncs on exactly the same frames, and the same source at --sb-size=64 decodes all 10 frames byte-exact. First bad, from the coefficient ladder against instrumented aomdec: decode-order frame 1, the 128x128 is_inter=1 skip=0 block at mi(32,64), its first luma TU (TX_64X64, bc=0 br=0) -- aomdec reads txb_skip ctx 1 (top == 0 && left == 0) and gets all_zero=1, we read ctx 2 and get all_zero=0, with the entry range equal on both. So the defect is in the luma entropy levels the preceding 128x128 inter block publishes into above/left, not in the intra arm. The gate is #[ignore]d with those coordinates in its doc comment; decode.rs gains an EC_INTRA128 trace line (under the existing coefficient-trace switch) that prints the arm's mi position, which is what proved the hits sit in a desynced frame.
2026-09-03
test(av1): the last synthetic multi-tile residue is gone -- un-ignore the two-tile-column mv-stack gate and make the straddling gate's multi-tile twins non-vacuousAhmet Kaan Gümüş · 71319e8
test(av1): the last synthetic multi-tile residue is gone -- un-ignore the two-tile-column mv-stack gate and make the straddling gate's multi-tile twins non-vacuous Re-measured lane-tile2 r3's pinned 192x68 cq35 10-bit --tile-columns=1 stream on the merged tip: our decoder and the oracle aomdec now agree byte for byte over all 5 frames (195840 B, was 26 luma pixels differing on frame 3). The fixes that landed since (motion-field tile clamp, per-tile txfm/mode band resets, the 8x8 COMPOUND interp-filter read) already cover it, so nothing is fixed here -- the round converts the result into coverage: * a_real_aomenc_compound_mv_stack_across_two_tile_columns_decodes_pixel_exact loses its #[ignore] (it passes), with the doc comment rewritten from "known open defect" to the re-measurement. * edge32_gate counts compared MULTI-TILE attempts separately and hard-asserts it, class counter-from-refused-stream: the aggregate compared > 0 was carried by the single-tile arms, so the --tile-columns=1 twins were free to refuse everything and keep the gate green. * that gate's refusal census was stale -- all 64 attempts now compare with zero named refusals (was: all 32 multi-tile attempts refused by name). Suite: 431 passed; 0 failed; 37 ignored.
feat(av1): streaming decode entry point -- decode_stream_with emits each picture and drops itAhmet Kaan Gümüş · d994115
feat(av1): streaming decode entry point -- decode_stream_with emits each picture and drops it decode_stream returned every shown Picture in one Vec and decode_probe's EC_PROBE_OUT16 built a second full copy of the raw dump before one write, so peak RSS was 2x the whole decoded segment: an 8 s 4K 10-bit window exceeded 20 GiB and a whole-film decode was impossible. stream.rs: the decode loop is now decode_stream_with(data, sink), which hands each completed picture to the sink and drops it; only the 8 reference slots plus the current frame stay alive. decode_stream is a thin collecting wrapper, so every existing test and gate is unchanged. Hidden frames are reported with shown == false. decode_probe: writes each shown frame straight to EC_PROBE_OUT16/EC_PROBE_OUT (either may be a FIFO) as it completes; the OK/REFUSED/counter lines are unchanged.
test(av1): assert the frame-edge OBMC neighbour span fires on the 128-SB inter witnessAhmet Kaan Gümüş · 7aad309
test(av1): assert the frame-edge OBMC neighbour span fires on the 128-SB inter witness obmc_edge_span_hits counts OBMC neighbour strips whose span runs past mi_rows/ mi_cols -- the shape the previous commit fixed. The 10-bit 1920x792 128-SB witness (198 mi rows, so every bottom-row block overhangs) fires it 33 times and the gate now hard-asserts it, so the fix cannot silently regress.
2026-09-02
test(av1): witness the mi-granular uv_mode grid on the small-side GLOBALMV gateAhmet Kaan Gümüş · 86dc1a6
test(av1): witness the mi-granular uv_mode grid on the small-side GLOBALMV gate The r12 chroma edge-filter fix (uv_mode read off the mi grid instead of a one-slot-per-column map) shipped without a gate asserting it fired. The existing 10-bit 1920x792 warp-reach fixture fires it 138 times, so the gate now hard-asserts uv_mode_grid_override > 0 and reports the count; decode_probe prints the counter too. No new fixture needed.
fix(av1): the mv-stack frame-edge clamp window is signed -- a block overhanging the bottom/right edge was never clampedAhmet Kaan Gümüş · 3bd2894
fix(av1): the mv-stack frame-edge clamp window is signed -- a block overhanging the bottom/right edge was never clamped libaom's `mb_to_right_edge` / `mb_to_bottom_edge` (`set_mi_row_col`, av1_common_int.h) are signed: a block that overhangs the frame's right or bottom edge keeps its full `bw4`/`bh4`, so `mi_cols - bw4 - mi_col` and `mi_rows - bh4 - mi_row` go NEGATIVE and `clamp_mv_ref` (mvref_common.h) narrows the predictor window by exactly that much. Our port computed both terms with `usize::saturating_sub`, which clipped them to 0 and left the window up to two block sizes too wide, so an edge block's stack entry was never clamped. On a 10-bit 3840x1608 stream (`mi_rows == 402`) every bottom-row 64x64 block overhangs by 14 mi units: the 64x64 NEWMV block at mi(400,368) of decode frame 88 took `mv0=(224,568)` where libaom takes `(32,568)` -- the entropy stream is identical (same range at EC_MODE and EC_MODE_MV), only the reconstructed value differed -- and its MC then read the reference's replicated last row instead of real rows 1604..1606. That frame was the only non-exact one in the 100-frame 4K head prefix (221 bytes); it is now exact. New counter `mvstack::mv_clamp_edge_overhang_hits` (also printed by decode_probe) counts stack entries the negative-edge window actually moves. crates/ec-av1/fixtures/reelb_head_mvclamp_witness.obu (72158 bytes, sha256 451a9b138995e636f22308847a123b5c8621d4908cd93772cf5bbf2b37df39d7, truncated twice to identical hashes) is the smallest prefix of that head firing it (N=79 -> 0, N=80 -> 5); new gate `a_10bit_film_frames_with_frame_edge_mv_clamping_decode_pixel_exact` decodes its 52 shown frames pixel-exact against ffmpeg on every plane and hard-asserts the counter. `clamp_mv_ref_window_is_signed_at_the_frame_bottom_edge` pins the ladder's exact numbers.
test(av1): witness gate for the small-side GLOBALMV and rect warp-reach paths, and 7 gate helpers that deadlocked ffmpegAhmet Kaan Gümüş · 2696d88
test(av1): witness gate for the small-side GLOBALMV and rect warp-reach paths, and 7 gate helpers that deadlocked ffmpeg New fixture `crates/ec-av1/fixtures/gm_small_side_witness.obu` (1158066 bytes, sha256 f1cdbcbb8d6d469c7957d70252ab42b24ab75f48a717600ffa25991458775dca, truncated twice independently to the same hash): the first 50 frame-carrying OBUs of a 2 s 10-bit 1920x792 128-superblock cut -- 34 decode-order frames, 33 shown, ALL 34 byte-exact against instrumented aomdec. It is the smallest prefix of that cut which fires `gm_nontrans_small_side` at all (49 OBUs fires 0, 50 fires 1); no fixture already in the repository fires it. Gate `a_10bit_film_frames_with_small_side_globalmv_and_rect_warp_reach_decode_pixel_exact` compares the 33 shown frames against ffmpeg on every plane and hard-asserts `gm_nontrans_small_side_hits > 0` (1) and `tr_reach_longer_side_hits > 0` (2295). The 128-superblock inter witness gate additionally hard-asserts `tr_reach_longer_side` (600 there). Also: seven copies of one gate helper wrote the whole stream to ffmpeg's stdin INLINE and only afterwards read stdout, so any fixture whose raw output exceeds the 64 KiB stdout pipe buffer deadlocks before the input is fully written. The new 1.1 MB fixture (~150 MB of raw 10-bit frames) hung for 45 minutes with both processes at 0% CPU. All seven now write on a dedicated thread; the same test run finishes in 51.5 s.
fix(av1): the warp-sample top-right probe uses the block's LONGER side, plus EC_MM/EC_MM2/EC_PROJ/EC_PROBE_HDR rungsAhmet Kaan Gümüş · 864b5c6
fix(av1): the warp-sample top-right probe uses the block's LONGER side, plus EC_MM/EC_MM2/EC_PROJ/EC_PROBE_HDR rungs libaom `av1_findSamples` (mvref_common.c:1235) probes the top-right neighbour with `has_top_right(cm, xd, mi_row, mi_col, AOMMAX(xd->width, xd->height))`; we passed the block's WIDTH. A 64x128 block therefore collected a top-right warp sample libaom never sees, so `num_proj_ref >= 1` made `motion_mode_allowed` resolve to WARPED_CAUSAL and read the 3-symbol `motion_mode_cdf` where libaom reads the 2-symbol `obmc_cdf` -- same value, different narrowing (class wrong-alphabet-same-value). Localised on the 10-bit 1920x792 264-frame cut, decode frame 49, block mi(64,144) 64x128 NEWMV ref0=1: after the mv both decoders sit at rng 47868; aomdec's motion_mode lands at 45539 (47868 * 0.951, the BLOCK_64X128 obmc row 31014/32768) and ours at 41629 (47868 * 0.870, the motion_mode row 28898/32768). The offending sample was the top-right cell, a 64x16 neighbour that `has_top_right(.., bw4=16)` reaches and `has_top_right(.., 32)` does not. Counter `tr_reach_longer_side_hits()` counts only blocks where the two probes disagree (1942 on that cut). NOT yet gate-asserted and the named gates were NOT re-run after this hunk -- see lanes/t900-r9.handoff.md. New rungs, all env-gated: EC_PROBE_HDR (one EC_HDR line per decode-order frame: type/show/base_q/primary_ref/ref_idx/refresh/order_hint/tiles/txmode/ interp/allow_warp/cdef/lr), EC_MM + EC_MM2 under EC_TRACE_MODE_STEP (the motion_mode eligibility terms and which ALPHABET was read -- a suppressed symbol prints nothing otherwise), and EC_PROJ_MI=<row>,<col> listing a block's warp-sample candidates in libaom's order.
feat(av1): EC_TRACE_COEFF_FRAME rung, and the key-frame tile decoder clears TX_SELECT_INTERAhmet Kaan Gümüş · 42ede61
feat(av1): EC_TRACE_COEFF_FRAME rung, and the key-frame tile decoder clears TX_SELECT_INTER Cherry-picked from lane-frame80 c5b1020e WITHOUT its two tx_size_context delegations -- lane-frame80 r2 measured those redundant against this lane's per-call-site intra-in-inter switch (same wall, same golomb signature) and dropped them in d79559ab. EC_TRACE_COEFF_FRAME=<decode idx> narrows the EC_TRACE_COEFF rungs to one DECODE-order frame (a 4K stream prints gigabytes otherwise) and emits an EC_COEFF_FRAME marker per frame so our trace is splittable. decode_key_frame_tile_with_cdfs now clears TX_SELECT_INTER, which the inter tile decoder sets and ~15 sites read -- an independent thread-local leak.
Merge commit '434ac12c' into lane-t900: rect chroma warp guard deduped, rect interintra gate arm keptAhmet Kaan Gümüş · f5530c9
Merge commit '434ac12c' into lane-t900: rect chroma warp guard deduped, rect interintra gate arm kept Kept ONE copy of the per-plane warp guard: lane-t900 r5's `warp_plane_allowed(w, h)` call sites, dropping lane-midcut's equivalent `warp_luma_ok`/`warp_chroma_ok` bindings (same rule, same libaom source `av1_init_warp_params`). Kept lane-midcut's `intra_rect_in_inter_txctx_override_hits` counter and its interintra RECT ARM gate (the base recipe spells --enable-rect-partitions=0, so the rect delta assert was unsatisfiable without it).
fix(av1): an inter block never stamped the luma/chroma mode maps, so a later intra block's edge-filter type fell back to a stale SMOOTH modeAhmet Kaan Gümüş · cb1dc1f
fix(av1): an inter block never stamped the luma/chroma mode maps, so a later intra block's edge-filter type fell back to a stale SMOOTH mode
`get_intra_edge_filter_type` (spec 7.11.2, libaom `reconintra.h`'s
`is_smooth`) reads the above/left neighbour's `mode` (luma) and `uv_mode`
(chroma). For an INTER neighbour libaom answers "not smooth" by
construction: `mbmi->mode` holds an inter mode (>= NEARESTMV) and
`is_smooth(mbmi, plane > 0)` returns 0 outright ("uv_mode is not set for
inter blocks"). Our mi-exact mode maps were written only by intra paths,
so an intra block whose neighbour was an 8x8 inter leaf found no mi entry
and fell back to the coarse SUB-row band -- which still held a SMOOTH
mode from an earlier block in that pixel row. The directional edge filter
then ran at strength 3 where libaom uses 2, and `use_intra_edge_upsample`
can flip with it.
`record_inter_rect_mi` now stamps DC_PRED into both maps for every inter
block. New counter `inter_neighbour_not_smooth_hits` counts the reads
where the coarse band would have said SMOOTH and the mi-exact map does
not; the 128-SB inter witness gate asserts it (375 hits, still pixel-exact
on all 15 shown frames). The square-block `OUR_PRED` trace now prints
`ft=` like the rect one, which is what localised this.
Decode-order compare against aomdec on a 10-bit 1920x792 125-frame cut:
frame 11 luma+U now exact (was 28 luma / 3 U samples off), whole-cut
differing bytes 18108 -> 12780.test(av1): give the interintra gate an arm that can actually produce a rect interintra blockAhmet Kaan Gümüş · 30e3110
test(av1): give the interintra gate an arm that can actually produce a rect interintra block The interintra gate's recipe spells `--enable-rect-partitions=0 --min-partition-size=32`, so it cannot emit a rectangular block at all and lane-midcut r1's `interintra_rect_hits` delta assert was unsatisfiable on it (40 pixel-exact matches, counter 0 -- the gate disabled the very shape the assert claims to prove). Added a RECT ARM that re-encodes the same source with `--enable-rect-partitions=1 --min-partition-size=8 --max-partition-size=64` appended (aomenc keeps the LAST occurrence of a repeated flag) and compares every decode-order frame of that stream against aomdec, running per seed until the counter fires. Result: seed 46's rect arm decodes 24/24 decode-order frames pixel-exact with interintra_rect_hits=4, and the gate is green again (1 passed, 11.7 s).
fix(av1): a sub-8x8 inter group's chroma inherits the CHROMA-REFERENCE sub-block's tx_type, not the first sub-block'sAhmet Kaan Gümüş · 3898141
fix(av1): a sub-8x8 inter group's chroma inherits the CHROMA-REFERENCE sub-block's tx_type, not the first sub-block's `av1_get_tx_type` (libaom `av1/common/blockd.h:1291-1305`) scales the chroma transform's `blk_row`/`blk_col` back by the subsampling and indexes `xd->tx_type_map` -- which `set_mi_offsets` (`av1_common_int.h:1679`) re-points to the CURRENT sub-block's mi. For a sub-8x8 group the current block at the chroma read is the chroma-reference (last) sub-block, so the group's one 4x4 chroma unit per plane inherits THAT sub-block's first transform unit's tx_type. Both sub-8x8 inter paths took the group's FIRST sub-block instead. No chroma tx_type symbol is coded, so the entropy stream stayed perfectly in sync and the defect only inverted a chroma unit on the wrong basis: on the 10-bit 1920x792 128-superblock stream, decode-order frame 14 differed in exactly 14 U pixels inside one aligned 4x4 chroma TU (V exact -- its unit was all_zero), where instrumented aomdec reads tx_type=7 (ADST_FLIPADST, the bottom 8x4 sub-block's own) and we read DCT_DCT (the top 8x4 sub-block was skip). New counter `sub8_chroma_tx_from_ref_hits` counts the groups that tell the two rules apart: chroma-reference tx_type != first sub-block's AND the chroma unit codes coefficients. The 128-SB witness fixture is extended from 19 to 23 frame-carrying OBUs (14 -> 16 decode-order frames, 12 -> 15 shown, 177773 bytes, sha256 09d995946d27695ef4b7b1a24a4d7ad85f8e2c8176d58ee54e825efc061f9cbc, two independent cuts hash identically) so the gate covers frame 14, and it hard-asserts the new counter (2 hits) alongside the eight it already had.
test(av1): pin the 10-bit 1920x792 128-superblock inter witness and lift the intra 16x4/4x16-in-inter opt-inAhmet Kaan Gümüş · 27cd698
test(av1): pin the 10-bit 1920x792 128-superblock inter witness and lift the intra 16x4/4x16-in-inter opt-in `fixtures/reelc_sb128_inter_witness.obu` (166303 bytes, sha256 1191ce80e2c6c5855eaf7a8f5e8cda2cdf809f467b0dbc5e26df96dfa6b2c8bd) is the first 19 frame-carrying OBUs of a 2 s cut of a 10-bit 1920x792 AV1 stream with `use_128x128_superblock=1`: 14 decode-order frames, 12 shown. Cut twice independently from the source; both cuts hash identically. All 14 decode-order frames are byte-exact against instrumented aomdec (`EC_AV1_FINAL_DUMP`) and all 12 shown frames pixel-exact on every plane against ffmpeg. It is the first stream here that decodes exactly while the paths of the five defects this lane found in r2-r5 all fire, so the gate `a_10bit_128sb_film_frames_with_warp_cdef_and_interintra_decode_pixel_exact` hard-asserts every one: warp_plane_suppress=15, cdef_idx=763, inter_sb128_vert=68, interintra_rect=118, non_chroma_ref_ctx_skip=163, intra_in_inter_txctx=1946, edge_filter_mi_fix=195. Three of those counters are new (the r2 in-inter tx-depth context, the r3 non-chroma-reference context skip and the r4 mi-exact intra-edge-filter neighbour pair shipped with none). REFUSAL LIFTED: the `EC_INTRA16X4_DECODE` opt-in over an intra 16x4/4x16 strip in an inter 1:4 partition is gone. lane-wit16x4 r1 re-widened that refusal because r3's witness counters were phantoms of a desync (`counter-from-refused-stream`); here the arm fires 78x 16x4 + 149x 4x16 (108 chroma-paired) inside frames that are decoded AND compared exact. The named refusal itself stays for a strip with no chroma-pair record. The 128x64/64x128 intra-in-inter arm fires 0 times on this stream, so its opt-in is untouched.
fix(av1): interintra built a square intra predictor for rectangular blocksAhmet Kaan Gümüş · 9a73c30
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)).
docs(av1): lane-midcut r1 handoff -- mid-film cuts are a reconstruction desync (not alignment, not grain); rect interintra fixed, NEARMV mv-stack defect namedAhmet Kaan Gümüş · 3667e83
docs(av1): lane-midcut r1 handoff -- mid-film cuts are a reconstruction desync (not alignment, not grain); rect interintra fixed, NEARMV mv-stack defect named Adds the rect-interintra assert to the interintra gate (delta-counted, not yet run) and the r1 handoff: reproducer, the three measurements that ruled out frame alignment and film grain, the fixed defect, the next block-level witness (mi 112,288 NEARMV: ours (-40,-340) vs aomdec (-32,-350)) and the re-measured 24-offset table.
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)).
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.
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): gate B split-tx-8x4 arm keeps its unproven note, with a re-measured reasonAhmet Kaan Gümüş · 950504e
test(av1): gate B split-tx-8x4 arm keeps its unproven note, with a re-measured reason The 384x256 cq-10 stream it named now decodes pixel-exact with zero rectangular var-tx leaves, and 12 fresh streams of the gate own source family carry no TX_16X4/TX_4X16 split symbol at any quantiser. r2 report added.
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): 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 'lane-sub8x4' (8c74306): intra 8x4/4x8/4x4 leaves and intra 16x4/4x16 strips inside inter partitions, TX_64X32/32X64 corner TUs lifted with a pinned 10-bit 3840x1608 witness; the 4K head cut decodes 48 frames with no refusalAhmet Kaan Gümüş · c249957Browse files
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.