Commits
Commits on
5591c0e1dfbc7e0137f2c8d4fb224bfcb05d01baFiltered to crates/ec-av1/src/decode.rsClear filter2026-08-30
feat(av1): wire read_lr into both SB loops; narrow the whole-frame LR refusal to 'filters not applied'Ahmet Kaan Gümüş · dc215f7
feat(av1): wire read_lr into both SB loops; narrow the whole-frame LR refusal to 'filters not applied' decode_key_frame_tile_with_cdfs/decode_inter_frame_tile_with_cdfs now take &LoopRestorationParams and call crate::restoration::read_lr once per superblock, before decode_partition, storing per-unit Wiener/SGR filters into a per-plane RestorationGrid (never yet applied to pixels). Public one-star wrappers pass &LoopRestorationParams::default() unchanged. stream.rs threads header.loop_restoration through both call sites; the refusal string is renamed to name the true remaining gap (pixel filters not applied) now that the partition walk survives a real LR stream. 235 passed / 0 failed (232 baseline + 3 new subexp/recenter tests), EC_AV1_REQUIRE_AOMENC=1.
Merge branch 'lane-rectwire2': rect coefficient decode lands, pixel-exactAhmet Kaan Gümüş · 94033af
Merge branch 'lane-rectwire2': rect coefficient decode lands, pixel-exact The desync that held this lane for three rounds was an extra symbol, not a wrong table. decode_block_rect read the tx-depth symbol unconditionally, where both square paths gate their read_tx_size on `tx_select`. That symbol exists only under TX_MODE_SELECT, and several gate recipes pass --enable-tx-size-search=0, so the encoder wrote none and the decoder consumed one that was never there -- desyncing the tile from that point, which is why both 32x16 strips of the pinned quadrant were wrong from their first pixel. r4's own range ladder had already named it without recognising it: the oracle's range was unchanged across its whole block, 58692 either side, while ours moved 58692 -> 43570. Equal ranges either side of a symbol mean the symbol was never consumed -- a cheaper conclusion than a near-certain CDF, and it needed no further instrumentation. r4 read it as a wrong CDF row and refused to land on an unconfirmed suspect, which was the right call on the evidence it had. Free-partition gate: 15 pixel-exact matches of 40 with zero mismatches and rect_coeff_hits=38, against 11 matches and rect_coeff_hits=0 under the refuse-by-name posture. The firing count is a hard assert again. Full lib suite 232 passed / 0 failed.
fix(av1): gate the rect strip's tx-depth read on tx_selectAhmet Kaan Gümüş · 8a896ab
fix(av1): gate the rect strip's tx-depth read on tx_select The tx-depth symbol exists only under TX_MODE_SELECT. Both square paths gate their read_tx_size on `tx_select`; decode_block_rect read it unconditionally. Several gate recipes pass --enable-tx-size-search=0, so the encoder wrote no such symbol and the decoder consumed one that was never there, desyncing the tile from that point -- which is why both 32x16 strips of the pinned quadrant came out wrong from their very first pixel. r4's own range ladder had already named it without realising: the oracle's range was UNCHANGED across its whole block (58692 either side) while ours moved 58692 -> 43570. Equal ranges either side of a symbol mean the symbol was never consumed. r4 read it as a wrong CDF row and refused to land on an unconfirmed suspect, which was right on the evidence it had. With the read gated, the real coefficient decode is pixel-exact: the free-partition gate reports rect_coeff_hits=38 and 15 pixel-exact matches of 40 with zero mismatches, where the refuse-by-name posture gave 11 matches and rect_coeff_hits=0. The hard assert on the firing count is restored. Full lib suite 231 passed / 0 failed in this worktree.
fix(av1): make the gate hit-counters thread-local so a delta is the test's ownAhmet Kaan Gümüş · 5c21ffa
fix(av1): make the gate hit-counters thread-local so a delta is the test's own The firing counters were process-global atomics and cargo runs tests in parallel threads, so a gate's `hits() > before` delta could be satisfied by a SIBLING gate's increments -- the gate would pass without its own feature ever firing, which is the vacuous-gate failure this batch has already fixed twice by other means. Eleven gates took that delta without holding the counter lock. Measured before the fix: the free-partition gate reported rect_partition_hits=9 and partab_hits=2 alone, and 18 and 4 inside the full suite. Same stream, same decode, double the count -- the difference was other tests. Serializing those eleven on the existing lock fixed the correctness and took the suite from 67 s to over 600 s, because it serializes every slow aomenc gate against every other. Thread-local counters give the same isolation with no serialization at all: the decoder runs single-threaded, so each test thread's counts are inherently its own, and the added locks come back out. After: the same gate reports 9 and 2 in both contexts. Full lib suite 232 passed / 0 failed in 67 s.
wip(av1): rect strip bisection (orchestrator-committed at the turn cap)Ahmet Kaan Gümüş · 2ea3bfcBrowse files
Merge branch 'lane-rectwire': rect coefficient infrastructure, decode still refusedAhmet Kaan Gümüş · 7e312c0
Merge branch 'lane-rectwire': rect coefficient infrastructure, decode still refused Three rounds, landing on a refusal rather than a decode, which is the correct outcome for what was proven. r1 did the recon and deliberately did not land code with the budget it had left -- the right call for a coefficient-decode edit, where the failure mode is a silent desync. Its recon narrowed the job sharply: decode_block_rect is called from only four sites at fixed size pairs, get_txsize_entropy_ctx reduces to txsize_sqr_up_map so most TxbSet fields reuse the square ones, and the only genuinely new pieces are two eob CDF table sets. r2 landed the wiring: those two CDF sets at all four sites, the four literal scan tables (verified byte-for-byte, and confirmed NOT reproducible from the square zigzag formula generalized -- the transcription was necessary, not lazy), the rect context helpers, and a real non-skip decode path. r3 triaged the mismatch r2 reported honestly rather than shipped. It is a real deterministic desync, not an attempt-selection flake: 93.5% of the frame's luma mismatches concentrate in the one PARTITION_HORZ quadrant, and both 32x16 strips are wrong from their first pixel. All three of r2's own suspects were cleared against libaom source. So the non-skip branch refuses by name again and the decode logic stays in the file, unreachable, for the round that isolates the divergence. The gate's RECT_COEFF_HITS assert is downgraded to a note, since it is now zero by construction -- a hard assert that cannot fire is the vacuous-gate trap this batch already fixed once. Full lib suite 231 passed / 0 failed; the free-partition gate is green with zero mismatches.
fix(av1): revert rect coeff decode to refuse-by-name -- desync found, not isolatedAhmet Kaan Gümüş · 3bebc9d
fix(av1): revert rect coeff decode to refuse-by-name -- desync found, not isolated lane-rectwire r3: pinned stream rectwire-flake-1.obu (seed 55) reproduces deterministically and shows a genuine desync in r2's real (non-skip) 32x16/16x32 coefficient decode (93.5% of frame-0 luma mismatches land inside the one HORZ-split quadrant, both strips ~100% wrong from their first pixel). r2's three named suspects (base_ctx_rect offsets, chroma skip-ctx formula, dc_sign_ctx index) all cross-checked byte-for-byte against real libaom source and cleared. Range-ladder bisection stalled on the intra key-frame path having no traced symbol between partition and first coefficient in the oracle; next round's first move is patching that into aomdec. Reverted decode_block_rect's non-skip branch to refuse by name (r1 behavior); RECT_COEFF_HITS gate assert downgraded back to a SOFT-NOTE. Free-partition gate green (29 refusals incl. 3 new named ones, 11 matches, 0 desyncs), full lib suite 231/0.
wip(av1): rect coefficient wiring (in progress, orchestrator-committed at the turn cap)Ahmet Kaan Gümüş · a27a535Browse files
feat(av1): thread allow_screen_content_tools palette consumption into inter-frame intra sub-blocksAhmet Kaan Gümüş · ad21245
feat(av1): thread allow_screen_content_tools palette consumption into inter-frame intra sub-blocks decode_inter_block/decode_inter_block8's intra-sub-block branches (libaom's read_intra_block_mode_info) now read the same PALETTE_Y_MODE/PALETTE_UV_MODE symbols read_intra_mode already consumes for key frames, gated by the same av1_allow_palette bsize check, reusing the palette_bsize_ctx(side)/0-ctx corner-cut. Confirmed against decodemv.c: read_intra_block_mode_info has NO use_intrabc call at all (intra-frame-only symbol, av1_read_mode_info dispatches on frame_is_intra_only) -- narrowed charter's intrabc scope for this path accordingly. Removed stream.rs:169's remaining frame_type != Key && allow_screen_content_tools whole-frame refusal now that both key and non-key intra paths consume the syntax. 231/0 lib suite unchanged (bit clear on every existing stream -> inert).
Merge branch 'lane-gm': non-IDENTITY global motion decodes through the warp pathAhmet Kaan Gümüş · 384a874
Merge branch 'lane-gm': non-IDENTITY global motion decodes through the warp path Four rounds. The first three ported the syntax correctly -- gm_get_motion_vector, the mvstack neighbour substitution, the is_global_mv_block vs is_nontrans_global_motion split -- and the wedge gate still mismatched, because every check that compared mv VALUES passed. A range ladder settled it: our msac range and the instrumented aomdec's were both 38664 at the offending block, so entropy was in sync and the defect was prediction-side. libaom's allow_warp has a global_warp_allowed branch that predicts every is_global_mv_block block with the full per-pixel affine warp, independent of motion_mode; this decoder only ever warped for local WARPED_CAUSAL and fell back to translational MC on the block-centre mv -- a centre-point approximation whose error grows with distance from the centre, which is exactly the error shape that was observed. r4 implements that path, reusing the existing warp_affine and shear machinery rather than writing a second one. The seed-43 pin's frame 1 luma, the divergence r3 root-caused, now matches, as do frames 0-13. The blanket "any non-IDENTITY global motion" refusal is replaced by two named ones: AFFINE models, and more than one concurrently active ROTZOOM/AFFINE ref slot -- the latter is a real residue r4 localized but did not root-cause, and refusing it beats guessing. Also fixed en route: gm_get_motion_vector was missing the -1 on both block-centre offsets that libaom's block_center_x/y apply. Full lib suite 231 passed / 0 failed. The wedge gate's match count is 11-16 of 40 across runs -- it selects a different aomenc attempt each run, so single-run counts from any one round are not comparable.
feat(av1): global-warp prediction for single-ref GLOBALMV (allow_warp's global_warp_allowed branch)Ahmet Kaan Gümüş · eed6f8c
feat(av1): global-warp prediction for single-ref GLOBALMV (allow_warp's global_warp_allowed branch) Wires global_motion[ref] into crate::warp::global_warp_params (reuses find_projection's get_shear_params, no second warp implementation) for every single-ref is_global_mv_block, gated independent of motion_mode matching libaom's allow_warp exactly (local WARPED_CAUSAL short-circuits first, else-if global). Pin gm-seed43.obu: frame 1 luma mismatch (r3's root cause) now MATCH; frames 0-13 all match. Frame 14+ hits a NEW, narrower, distinct shape (two ref slots concurrently ROTZOOM) -- refused by name rather than guess-fixed. stream.rs's whole-frame refusal narrowed from "any non-IDENTITY global motion" to two named remaining gaps: AFFINE models, and more-than-one concurrently active ROTZOOM/AFFINE ref slot. Wedge gate: 27/40->30/40 other-capability refusals (10 matches, wii_hits=4), full lib suite 227/0 unchanged.
Merge branch 'lane-screen': consume palette/intrabc syntax on key framesAhmet Kaan Gümüş · 31f684b
Merge branch 'lane-screen': consume palette/intrabc syntax on key frames Screen-content key frames decode now. The decoder does not reconstruct a palette -- it consumes the syntax so the arithmetic decoder stays in sync, and a block that genuinely uses palette or intrabc refuses by name. The whole-frame refusal is narrowed rather than removed: decode_inter_block's intra-sub-block branches have no palette wiring at all, so inter frames with the bit set keep refusing until a follow-up lane threads the same two flags there. Two integration points this merge had to settle: Rect intra strips (lane-intradisp) do not consume palette syntax -- the square reader's palette_bsize_ctx is keyed on a single side -- so a strip in a screen-content frame would skip symbols the encoder wrote and desync. It refuses by name instead. The filter_intra gate was eaten by the old whole-frame refusal and skipped for its whole life; now that it runs, it turned out not to pin --threads=1 the way every sibling gate does, and a multi-threaded aomenc is not deterministic, so each run encoded a different stream and the gate flaked against whichever features that run happened to pick. Pinned, plus EC_FI_SEED/EC_FI_CQ hooks so the recipe can be searched without a rebuild. It fired in 6 consecutive runs and in 14 of 15 points of a (cq, seed) sweep; the one failure was a real "use_filter_intra never fired" assert at cq=60, not a mismatch. Full lib suite 224 passed / 0 failed, twice.
fix(av1): derive the key-frame skip context; refuse a split-transform rect stripAhmet Kaan Gümüş · 0b6be16
fix(av1): derive the key-frame skip context; refuse a split-transform rect strip Two defects an adversarial source review found in the intra HORZ/VERT strip merge, both confirmed against libaom. The key-frame intra path read `skip` from `cdfs.skip[0]` unconditionally, while av1_get_skip_txfm_context (pred_common.h:175-181) is above_skip + left_skip. That was latent -- key frames rarely skip -- but the rect strips are skip-only, so every strip this decoder accepts guarantees a skip=1 neighbour, and the second strip of a HORZ pair would have read the wrong CDF row and desynced the rest of the tile. Fixed at all three intra call sites, not just the rect one: the defect is the class, and the pre-existing square site is now load-bearing. The context comes off the mi skip grid, which every path already fills, with an absent neighbour contributing 0 the way an absent above_mi/left_mi does. Second, tx_depth was read and then ignored: the predictor ran over the whole strip regardless, where libaom predicts per transform unit with each unit taking its edges from the previous unit's reconstruction. That is a silent pixel mismatch, and it violates this change's own skip-only contract, so a split transform now refuses by name until the per-TU loop is ported. Full lib suite 224 passed / 0 failed -- the skip-context fix is inert for every existing stream, as it must be.
feat(av1): thread allow_screen_content_tools/allow_intrabc through decode_key_frame_tile[_with_cdfs]; narrow whole-frame refusal to non-key framesAhmet Kaan Gümüş · 818f85d
feat(av1): thread allow_screen_content_tools/allow_intrabc through decode_key_frame_tile[_with_cdfs]; narrow whole-frame refusal to non-key frames decode_block/decode_leaf8/read_intra_mode already consumed palette/intrabc syntax on key frames (prior builder). This wires the two bools the rest of the way: through decode_key_frame_tile_with_cdfs and the public decode_key_frame_tile wrapper, stream.rs's real production call (header.allow_screen_content_tools/allow_intrabc), and the 7 test call sites (false, false -- none of those fixtures use screen content tools). Narrows stream.rs:169's whole-frame refusal to `frame_type != Key && allow_screen_content_tools`: decode_inter_block/ decode_inter_block8's intra-sub-block branches have no palette/intrabc wiring at all, so removing the refusal for inter frames would desync them silently.
feat(av1): gm r2 -- non-IDENTITY global motion decode compilesAhmet Kaan Gümüş · 9018cff
feat(av1): gm r2 -- non-IDENTITY global motion decode compiles Threads frame_header.global_motion through decode_inter_frame_tile_with_cdfs to every decode_inter_block call site (stream.rs + both decode.rs wrappers + leaf8's compile-only NO_GM_MV/((0,0),(0,0)) stub, gm-inert by design). Single-ref path: is_global_mv_block (blockd.h:421-429, mode > TRANSLATION, IDENTITY excluded) and is_nontrans_global_motion (reconinter.h:420-425, model != TRANSLATION, IDENTITY counts) computed as separate locals, not unified. is_global_mv_block gates motion_mode_eligible (implicit SIMPLE_TRANSLATION under free mv, spec motion_mode_allowed) and MiInfo::is_global_mv0; gm_nontrans gates the interp-filter suppress arg (av1_is_interp_needed).
Merge branch 'lane-intradisp': intra HORZ/VERT strip dispatch (skip-only)Ahmet Kaan Gümüş · 0a532b3
Merge branch 'lane-intradisp': intra HORZ/VERT strip dispatch (skip-only) 32x16 and 16x32 intra strips now read every symbol the spec requires -- skip, y_mode, angle_delta, uv_mode, cfl_alphas, filter_intra, tx_depth -- so the arithmetic decoder stays in sync, and reconstruct pixels when the block is skipped. A non-skip strip, and a strip that selects filter_intra, each refuse by name. The ceiling is not this dispatch: chroma on these bsizes gets a genuinely rectangular TX_16X8 / TX_8X16 out of av1_get_max_uv_txsize with no square escape, and transform.rs has no rectangular transform at all. lane-recttx builds that primitive. Full lib suite 224 passed / 0 failed on the merge. The free-partition gate is flaky by construction (aomenc attempt selection): three runs gave 32/35/33 refusals and 8/5/7 pixel-exact of 40, no clean directional move, reported as such rather than as a win.
wip(av1): palette/intrabc syntax consumption (in progress, threading not finished)Ahmet Kaan Gümüş · b46f7d8
wip(av1): palette/intrabc syntax consumption (in progress, threading not finished) Committed by the orchestrator: the builder hit its turn cap mid-threading.
wip(av1): gm r2 -- compound mvstack gm threading, GLOBALMV real mv, interp two-predicate split (does not compile yet)Ahmet Kaan Gümüş · 5417eab
wip(av1): gm r2 -- compound mvstack gm threading, GLOBALMV real mv, interp two-predicate split (does not compile yet) Committed by the orchestrator: the builder wrote ~9 edits deep and hit its turn cap before it could commit. Known-incomplete, recorded verbatim so it survives.
wip(av1): intra HORZ/VERT strip dispatch (skip-only), recovered from stashAhmet Kaan Gümüş · 770cfc0
wip(av1): intra HORZ/VERT strip dispatch (skip-only), recovered from stash Builder hit its turn cap with the whole implementation sitting in a stash; committed verbatim as recovered so it cannot be lost. Gate ladder, report and scope-down rationale still owed.
fix(av1): bound the 8x8-OBMC gate's ffmpeg source with -t; correct a false refusal claimAhmet Kaan Gümüş · 90aeec8
fix(av1): bound the 8x8-OBMC gate's ffmpeg source with -t; correct a false refusal claim The gate's EC_AV1_OBMC8_SOURCE override lets a caller supply a lavfi source that carries no `duration=` of its own; `testsrc2` is endless, so the y4m pipe never closed and the gate hung to its 300 s timeout. `-t` is the bound that holds for every source. Third instance of the class (mandelbrot `end_pts` twice before): bound the trim inside ffmpeg on decode, bound the duration with `-t` on generate. With the bound in place the gate runs 80 attempts in 7 s and shows why it has never fired one 8x8 OBMC block: decode.rs refuses every inter partition below 16x16. Its message claimed "this encoder never writes one", which the run disproves -- reworded to name the real gap.
wip(av1): mvstack global-motion substitution plumbing (inert: NO_GM_MV, all flags false)Ahmet Kaan Gümüş · 149fd7a
wip(av1): mvstack global-motion substitution plumbing (inert: NO_GM_MV, all flags false) MiInfo gains is_global_mv0/1 (all ctors false), GmMvTable threaded through the single-ref scans, and the TPL zero_mv_ctx comparison now measures against gm_mv instead of zero (mvref_common.c:369-370). decode.rs still passes NO_GM_MV, so behaviour is unchanged until the wiring lands.
Merge branch 'lane-intrarect': rectangular intra prediction (opus-verified vs libaom; 568-case C-dump proof, square paths bit-identical)Ahmet Kaan Gümüş · e33ddfaBrowse files
fix(av1): inter frames' intra blocks inherited a stale enable_intra_edge_filterAhmet Kaan Gümüş · d1585d0
fix(av1): inter frames' intra blocks inherited a stale enable_intra_edge_filter ENABLE_EDGE_FILTER is a thread-local set only by decode_key_frame_tile_with_cdfs; decode_inter_frame_tile never set it, so an inter frame's intra blocks read whatever the last key frame decoded on that thread left behind. Within one stream that is inert (its own key frame sets it first), but it makes decode impure across streams sharing a thread -- a real contamination path, and the shape that produces a suite-only flake. decode_stream now sets it from the sequence header for every stream, covering inter frames. Also teaches build-aom-oracle.sh to reconfigure a build tree that was configured under a different path instead of failing to regenerate.
feat(av1): widen intra::predict/Edges to rect (bw != bh)Ahmet Kaan Gümüş · 24d69ed
feat(av1): widen intra::predict/Edges to rect (bw != bh) Predictor + Edges::build now take (bw, bh) instead of one side: DC's dc_predictor_rect multiply-shift divide (derived, not tabulated, per libaom's own comment -- AV1's only rect ratios 1:2/1:4 leave d==3/5), smooth's separate width/height weight rows, and the directional walk's bw+bh reach with cross-axis edge-filter/upsample extensions (above extends by bh, left by bw -- reconintra.c's txwpx/txhpx swap). Also fixes a latent bug this widening surfaced: intra_edge_filter_strength was missing the blk_wh<=12 branch, unreachable for any square side sum but live for e.g. a 4x8 block. All 21 call sites still pass (side, side); full lib suite green (223/223) proves square behaviour is bit-identical. Tile dispatch still refuses rect/AB partitions -- next lane's job.
2026-08-29
Merge branch 'lane-wii': wedge-interintra blend decodes (opus-verified vs libaom; gate fires wii_hits 2-7 per run, hard-asserted)Ahmet Kaan Gümüş · f03f2a3Browse files
feat(av1): wedge-interintra blend (adapting wedge_idx symbol, fixed sign 0, box-averaged chroma mask); dedicated gateAhmet Kaan Gümüş · 841cf14
feat(av1): wedge-interintra blend (adapting wedge_idx symbol, fixed sign 0, box-averaged chroma mask); dedicated gate Flash-builder r2 output, orchestrator-committed: builder hit its cap without committing. Lib 221/0 + 14 pins green re-run by orchestrator; the slow wedge gate runs separately.
wip(lane-partab): HORZ_A/VERT_A/VERT_B INTER arms decode; PARTAB_HITS atomic; dedicated AB gate (7 exact, hits=6)Ahmet Kaan Gümüş · edca059Browse files
2026-08-28
fix(av1): overlappable_left steps by the neighbour's heightAhmet Kaan Gümüş · f1a6012
fix(av1): overlappable_left steps by the neighbour's height The OBMC left-column walk stepped by MiInfo.size (width); a 32x16 left strip swallowed the strip below it and its band blended the wrong neighbour prediction (rect-flake-3, +-2 in the second strip's band). Class sweep: all other grid walks step by the matching axis. Pin added; lib 221/0.
fix(av1): mvstack scan weight inc mins by the candidate's cross axisAhmet Kaan Gümüş · d6cb150
fix(av1): mvstack scan weight inc mins by the candidate's cross axis libaom's scan_row_mbmi mins inc by mi_size_high (candidate height), scan_col by width; ours used the scan's own axis at all 4 sites (single + compound). Square candidates hide it; a 32x16 strip above tied weights, reordering DRL entry 1 and suppressing the -5 extended row scan. rect-flake-2 byte-exact, pin added to the default list; lib 220/0.
fix(av1): rect-flake-1 byte-exact -- MiInfo size_h, rect warp samples/projection dims, OBMC per-pass overlap, deblock tx-height gridAhmet Kaan Gümüş · 8e2b541
fix(av1): rect-flake-1 byte-exact -- MiInfo size_h, rect warp samples/projection dims, OBMC per-pass overlap, deblock tx-height grid Three prediction-side root causes after the CDF rows: (1) neighbour records carry true height (size_h) so a rect strip donates warp samples at ITS center and col scans step/weight by height; find_projection gets the strip's true dims -- wmmat now matches aomdec exactly. (2) obmc_blend: per-pass neighbour caps (width-log2 above, height-log2 left) and overlaps (bh/2 above, bw/2 left). (3) tx_h_grid: deblock horizontal edges gate by transform HEIGHT; the single-scalar grid deblocked the strip seam wrong (1-px chroma drift).
fix(av1): motion_mode/obmc CDFs gain BLOCK_16X32/32X16 rows; rect strips index their own bsize rowAhmet Kaan Gümüş · ab0445e
fix(av1): motion_mode/obmc CDFs gain BLOCK_16X32/32X16 rows; rect strips index their own bsize row rect-flake-1 strip 1's motion_mode read diverged on the square-class row; with the true rows the whole HORZ block is entropy-exact (range ladder exact everywhere) -- residual pixel diff is prediction-side (warp).
feat(av1): wire the COMPOUND_WEDGE blend (comp_group_idx==1, compound_type==0); gate fires wedge live (mandelbrot diagonal content, dist-wtd-comp=0), 20/20 pixel-exact, 475 wedge hitsAhmet Kaan Gümüş · 2803580
feat(av1): wire the COMPOUND_WEDGE blend (comp_group_idx==1, compound_type==0); gate fires wedge live (mandelbrot diagonal content, dist-wtd-comp=0), 20/20 pixel-exact, 475 wedge hits
wip(av1): rect bw4/bh4 derivation + grid stamp fix, HORZ/VERT arms resurrected -- pin narrows but not byte-exact yetAhmet Kaan Gümüş · 4a33f95Browse files
Merge branch 'lane-maskcomp2' into lane-partitions (integration)Ahmet Kaan Gümüş · 9dc3c1eBrowse files
feat(av1): rect write-footprint plumbing; HORZ/VERT strips refuse by name pending rectangular mvstack (r2)Ahmet Kaan Gümüş · ebb03bd
feat(av1): rect write-footprint plumbing; HORZ/VERT strips refuse by name pending rectangular mvstack (r2) Square-context strip decode desyncs (pin rect-flake-1.obu, frame 16 strip 2: NEARMV picked a different DRL entry -- a 32x16 block's stack weights use n4_h=4). Full strip decode kept in history (4782e57) for r2; free gate recipe re-clamped, green 3/3; lib 220/0; 11 pins byte-exact. HORZ_B's top strip carries the same latent corner-cut -- r2 scope.
wip(av1): decode HORZ/VERT rect partitions (32x16/16x32 skip strips), rect-footprint neighbour/grid writesAhmet Kaan Gümüş · 1d71087Browse files
feat(av1): port the DIFFWTD masked-compound blend (comp_group_idx==1), wedge still refusedAhmet Kaan Gümüş · ddb5bef
feat(av1): port the DIFFWTD masked-compound blend (comp_group_idx==1), wedge still refused diffwtd_mask/blend_masked_compound in mc.rs, algebraically re-derived onto this crate's unbiased predict_compound_intermediate domain (libaom's round_offset bias cancels exactly in both the mask diff and the blend weight sum, proven in the doc comments -- no offset bookkeeping needed). Both comp_group_idx==1 decode.rs sites now build+apply the real blend for COMPOUND_DIFFWTD; COMPOUND_WEDGE still refuses by name (wedge codebook out of r2 scope per the charter's mergeable-partial fallback). Fixed a real latent bug while wiring this in: compound_idx was read unconditionally, missing libaom's comp_group_idx==0 outer gate (dead code before this round since the masked path always errored earlier). Gate a_real_aomenc_stream_with_masked_compound_decodes_pixel_exact flipped to hard assert (masked_compound_hits() > 0) with DIFFWTD refusals now forbidden; hammered 8/8 green, zero pixel mismatches. Full ec-av1 lib suite: 220 passed, 0 failed, 17 ignored.
Merge branch 'lane-rectgate' into lane-maskcomp: both gates kept (integration merge)Ahmet Kaan Gümüş · 18b88dcBrowse files
wip(av1): consume compound_type/wedge_idx/wedge_sign/mask_type on masked compound (comp_group_idx==1); blend still refusedAhmet Kaan Gümüş · 09ba66a
wip(av1): consume compound_type/wedge_idx/wedge_sign/mask_type on masked compound (comp_group_idx==1); blend still refused lane-maskcomp r1. Syntax entropy-exact per libaom decodemv.c 1634-1656: compound_type (COMPOUND_WEDGE/COMPOUND_DIFFWTD), then wedge_index+wedge_sign or mask_type. New CDF tables (COMPOUND_TYPE, WEDGE_IDX) wired through the 4-site checklist (cdf.rs default, cdf_state.rs field/init/reset_counts). Prediction (wedge/diffwtd mask blend) is NOT ported -- both refusal sites still return Err, now after consuming the symbols and naming the blend as the gap. New gate a_real_aomenc_stream_with_masked_compound_decodes_pixel_exact + MASKED_COMPOUND_HITS proves the syntax fires without desyncing surrounding blocks (pixel-exact matches every non-masked-compound attempt). All 11 existing pins + full ec-av1 --lib suite unaffected.
feat(av1): rect/ab free-partition gate; localize real coverage gapAhmet Kaan Gümüş · a3f46bc
feat(av1): rect/ab free-partition gate; localize real coverage gap New gate lets aomenc pick a free partition instead of every prior gate's pinned min=max=32. Finding: charter's "extended partitions landed" premise was wrong -- decode_frame's inter-tile match only handles NONE/SPLIT/HORZ_B; HORZ/VERT/HORZ_A/VERT_A/VERT_B/HORZ_4/VERT_4 all correctly refuse (no silent miscoding). Empirically swept 3 recipes (120 aomenc attempts); no decode defect found, only a genuine 7-of-10-partition-type coverage gap plus an aomenc-side --enable-1to4-partitions=0 quirk (doesn't suppress VERT_4). Diversity counter added but its assertion shipped soft, not a hard panic, since PARTITION_HORZ_B never fires for this fixture regardless of clamp (confirmed against the already-green warp gate too). ec-av1 lib 219/0. Details in lanes/rectgate-r1.report.md.
feat(av1): decode non-wedge interintra prediction; fix warp-sample interintra exclusion; reset switchable_interp CDF counterAhmet Kaan Gümüş · a5a10f4
feat(av1): decode non-wedge interintra prediction; fix warp-sample interintra exclusion; reset switchable_interp CDF counter - interintra syntax (flag -> 4-ary mode -> wedge flag, wedge==1 stays a named refusal) + non-wedge smooth blend (II_DC/V/H/SMOOTH, ii_weights1d, all planes) on the 16/32 single-ref path and the 8x8 leaf - interintra blocks record ref_frame1 = INTRA_FRAME(0) in the mi grid so find_samples/num_proj_ref exclude them (libaom av1_findSamples requires ref_frame[1] == NONE_FRAME); mvstack ref-diff scan guards rf1 > 0 - ii-flake-9: switchable_interp was the one Cdfs field missing from reset_counts -- unreset counter saturated past 15 reads and slowed the adaptation rate to >>5 while libaom (per-frame counter reset, av1_reset_cdf_symbol_counters) stays >>4; rows drifted a few counts and the gate flaked on read-dense streams. Field-list audit: no other gap. - new gate a_real_aomenc_stream_with_interintra_decodes_pixel_exact (interintra refusals forbidden, hits counter asserted); pinned-stream test extended to 11 fixtures (ii-flake-1..9) Evidence: 11/11 pins byte-exact; interintra gate 12/12 hammer clean (hits 11-22 per run); warp gate 3/3; ec-av1 lib 218 passed / 0 failed.
docs(av1): verification report + is_interp_needed caveat commentAhmet Kaan Gümüş · 46511ffBrowse files
fix(av1): suppress the interp-filter read for skip_mode compound blocksAhmet Kaan Gümüş · 497de2d
fix(av1): suppress the interp-filter read for skip_mode compound blocks Same conditional-read contract as the WARPED_CAUSAL fix one commit back: av1_is_interp_needed==0 for skip_mode, libaom derives Regular. Our compound path read 1-2 switchable_interp symbols on every skip_mode block; range ladder on pinned warp-flake-7.obu decode-16 diverged inside its B01 skip_mode block (part-read rng 45276 exact, next part 46380 vs 44416). Fixes pinned warp-flake-7 (frame 15 luma); original warp pin stays green. Also: part32_pre range trace under EC_AV1_TRACE (inert). class: symbol-consumption-gap (conditional-read side).
fix(av1): suppress the interp-filter read for WARPED_CAUSAL blocksAhmet Kaan Gümüş · de81760
fix(av1): suppress the interp-filter read for WARPED_CAUSAL blocks warp r5e ROOT CAUSE of the pinned mismatch chain (r3-r5e): libaom's av1_is_interp_needed derives the filter (Regular) instead of reading switchable_interp symbols when motion_mode == WARPED_CAUSAL -- keyed on the SYMBOL value, not projection validity. Our single-ref path only suppressed for GLOBALMV, so a warped block consumed 1-2 extra symbols and every read after it drifted: the hidden no-show altref (decode-order 13, display 23) desynced at its last 32x32 (phantom HORZ_B partition value=5 where libaom reads NONE), corrupting the stored ALTREF; shown frames 13+ then inherited the garbage through zero-mv skip compound copies -- the pin's 'frame 13 luma' failure (class gate-blind-to-hidden-frames, exactly). Localized with libaom examples/inspect ground truth (display frame 13 quad (1,1) = 32x32 NEAREST_NEARESTMV zero-mv skip; hidden altref = four 32x32s incl. NEWMV WARPED_CAUSAL skip at mi(8,0)) vs our EC_AV1_TRACE: B00/B01/B10 symbol-exact, divergence at B11's partition_w32. EVIDENCE: pinned_warp_stream_decodes_pixel_exact 24/24 pixel-exact vs ffmpeg, green twice, warp_selected_hits 0->1; ec-av1 lib suite 217 passed 0 failed. class: symbol-consumption-gap (conditional-read side: a symbol READ that the reference DERIVES is the same drift as an unread bit).
wip(av1): warp r5d -- HORZ_B strip mvstack query bw4=8,bh4=4 (spec-correct; frame 13 unchanged)Ahmet Kaan Gümüş · 7efc3c5Browse files
wip(av1): warp r5b UNVERIFIED trial -- HORZ_B bottom-leaf coords to mi convention (r32*2+1)Ahmet Kaan Gümüş · e7c9731
wip(av1): warp r5b UNVERIFIED trial -- HORZ_B bottom-leaf coords to mi convention (r32*2+1) Behavior-neutral on the pin (frames 1-12 pass before and after; frame-13 fail is intra-walk, untouched). r5b flash builder capped out before verifying and misreported the worktree clean; committed by orchestrator, adjudication owed.
wip(av1): warp r5 -- extended inter partitions (HORZ_B/VERT_A/VERT_B) implemented; pin refusal GONE, decodes 24/24, frame-13 luma mismatch remains (intra path, quadrant (1,1), unrelated to warp)Ahmet Kaan Gümüş · d57b460
wip(av1): warp r5 -- extended inter partitions (HORZ_B/VERT_A/VERT_B) implemented; pin refusal GONE, decodes 24/24, frame-13 luma mismatch remains (intra path, quadrant (1,1), unrelated to warp) flash builder round, HANDOFF at tool cap; determination: refusal was case (b), the pinned aomenc stream really uses extended partition types. Frames 1-2 (the only frames with warp blocks) PASS. charter lanes/warp-r5.charter.md.
wip(av1): EC_WARP_DEBUG sample dump -- MAJOR REFRAME, mismatch predates warpAhmet Kaan Gümüş · 3a8a953
wip(av1): EC_WARP_DEBUG sample dump -- MAJOR REFRAME, mismatch predates warp
lane-warp round 4, budget-capped stop.
DECISIVE INSTRUMENT (r3's planned next move): added EC_WARP_DEBUG-gated
printf at libaom's av1_find_projection call site (decodemv.c ~1546/1637,
local /tmp/libaom-src checkout, not this repo) dumping mi_row/mi_col,
findSamples' pts/pts_inref, and the resulting wmmat/alpha/beta/gamma/delta;
matching EC_WARP_DEBUG eprintln added here (decode.rs ~5579, in the leaf16
WARPED_CAUSAL arm) dumping our own find_samples/find_projection output at
the same call site. Rebuilt aomdec (decoder-debug preset), ran both sides
on the pinned warp-mismatch.obu fixture.
RESULT: the warp math itself is NOT provably at fault this round -- the
sample coordinates and even the resulting wmmat matched in shape (x/y
sample values identical: pts=(120,-136) both sides), consistent with r3's
line-audit finding warp.rs's arithmetic faithful.
MAJOR REFRAME: cross-referencing libaom's unconditional EC_TRACE
(decodemv.c:1717, fires every inter block, no env gate) against our own
EC_AV1_TRACE (decode.rs:5655, leaf16 only) for the WHOLE 24-frame stream
shows only two real (non-degenerate-skip) content frames exist in decode
order: frame index 1 (ref=LAST_FRAME) and a much later frame (ref=
GOLDEN_FRAME, where WARP_SELECTED_HITS actually fires). ffprobe confirms
this stream has NO reordering (pict_type P for all 23 inter frames, no
hidden altref) -- decode order IS display order, so "frame 1" in the
pinned test's mismatch report is the LAST_FRAME frame, NOT the GOLDEN/warp
frame several frames later. The warp block (mi_row=8,mi_col=0 in libaom's
real stream, motion_mode=2) fires on a frame that is never even reached
by the time the test's assert_eq fails at i=1.
Concretely, on frame index 1 (LAST_FRAME, all four 32x32 leaves):
libaom: (0,0) skip=0 NEARESTMV mv=(0,0); (0,8) skip=1 NEARESTMV mv=(0,0)
motion_mode=0 (SIMPLE_TRANSLATION, overlappable=1); (8,0) skip=1
NEARESTMV mv=(0,0); (8,8) skip=1 NEWMV mv=(-32,0) motion_mode=1 (OBMC)
ours: (0,0) skip=0 mv=(0,0) is_new_mv=false [MATCHES]; (0,8) skip=1
mv=(0,0) is_new_mv=false motion_mode_eligible=1 obmc_selected=1
[DIVERGES -- we select OBMC, libaom does not]; (8,0) skip=0 mv=(24,0)
is_new_mv=true [DIVERGES]; (8,8) skip=1 mv=(2,-2) ref=4 [DIVERGES,
even ref_frame differs]
(0,0) matches on skip/mv/is_new_mv (mv=(0,0) is a trivial integer-pel
copy, so an interp-filter bug there is structurally inert regardless).
r3's ASCII diff mask ("small-magnitude errors, diagonal band, upper-left
half") is consistent with (0,0)'s own RESIDUAL/coefficient decode being
subtly off (skip=0, so real coefficients are coded) rather than any
motion-mode/OBMC/warp symbol bug -- a wrong coefficient desyncs the tile
exactly where we see it: (0,8)'s OBMC symbol reads a different value
than libaom's not because obmc_cdf/context is wrong, but because the bit
reader is already at the wrong position by the time it gets there.
NEXT ROUND'S FIRST MOVE: stop auditing warp.rs -- the fixture's frame-1
mismatch is provably upstream of any warp code. Verify (0,0)'s residual
path first: dump libaom's coefficient levels for this exact leaf (add an
EC_WARP_DEBUG-style printf in decodetxb.c/reconinter around the (0,0)
32x32 block's dequant+inverse-transform) vs our own dequant_and_inverse_
typed's existing EC_AV1_TRACE dequant printout (decode.rs ~1704,
"TRACE dequant plane=... levels=... residual=..."), same block. If levels
differ, it's a coefficient-context/EOB bug; if levels match but residual
differs, it's the inverse-transform/rounding chain. Once (0,0) round-trips
exactly, re-run the pinned test -- the warp block many frames later may
turn out to already be correct, or a fresh independent bug once the tile
is back in sync that far downstream.
Gate/test changes this round: none (only the env-gated debug eprintln in
leaf16's WARPED_CAUSAL arm, dead code on any non-diagnostic run). cargo
check -p ec-av1 --lib clean.
tmpfs: 65% at session start (not yet re-measured this round).