Commits
Commits on
214cdf2befd543569feaaaf45888fe80e40318dfFiltered to crates/ec-av1/src/stream.rsClear filter2026-08-28
feat(av1): wire comp_mode/comp_ref reads into both inter-block decodersAhmet Kaan Gümüş · 14ea0a6
feat(av1): wire comp_mode/comp_ref reads into both inter-block decoders reference_select now threads from the frame header through decode_inter_frame_tile(_with_cdfs) into decode_inter_block and decode_inter_block8: when set, each inter block reads comp_mode (spec 5.11.25) first and, on COMPOUND_REFERENCE, reads comp_ref_type/ comp_ref/comp_bwdref via read_compound_ref_frames before refusing the block by name -- two-reference motion compensation is not wired yet. This keeps the arithmetic decoder in sync for reference_select streams that never actually pick compound, and replaces the old blanket frame-level reference_select refusal with a comp_mode-count-verified per-block one. skip_mode_present (a separate header bit) gets its own frame-level refusal since no block-level reader for it exists yet. Added COMP_MODE_HITS/comp_mode_hits() and a real-aomenc gate (a_real_aomenc_stream_with_reference_select_reads_comp_mode_correctly) proving both outcomes: a fully-decoded reference_select stream that never fired compound, or a refusal that names COMPOUND_REFERENCE with comp_mode_hits having advanced. Live run: every aomenc attempt in this recipe hit skip_mode_present or allow_screen_content_tools first (both separate unimplemented capabilities), so comp_mode itself has not yet fired live -- next round needs a recipe/attempt-count that clears both before reaching a bidirectional-reference block.
WIP(av1): temporal MV wiring + gate — r2 capped at final compile checkAhmet Kaan Gümüş · 253fdd8Browse files
feat(av1): pixel-exact single-ref decode for LAST2/LAST3/BWDREF/ALTREF2/ALTREFAhmet Kaan Gümüş · 1719c8e
feat(av1): pixel-exact single-ref decode for LAST2/LAST3/BWDREF/ALTREF2/ALTREF Adds per-reference hit counters (decode::ref_hits) so a gate can prove the SPECIFIC reference it targets fired, not just non_last_ref_hits. Adds 5 targeted real-aomenc gates (dropping the golden gate's own --max-reference-frames=3/--reduced-reference-set=1 narrowing, which suppresses exactly these references; backward refs additionally need --auto-alt-ref=1/--lag-in-frames for aomenc to code them at all). All 5 decode pixel-exact against ffmpeg across 3 repeated runs (15/15), proving the WIP's sign_bias threading for BWDREF/ALTREF2/ALTREF is correct. Also cherry-picks b650420 (--enable-ref-frame-mvs=0 swept into every recipe) and a668c49 (film-grain gate pinned below the same fix) from main, which this branch had forked before -- fixes the 3 real-aomenc gates that were failing on the WIP alone.
fix(av1): pin the film-grain gate below use_ref_frame_mvs's unimplemented pathAhmet Kaan Gümüş · 25e8a4f
fix(av1): pin the film-grain gate below use_ref_frame_mvs's unimplemented path real_aomenc_film_grain_streams_decode_pixel_exact's frame-1 mismatch was never a grain bug: aomenc turns on temporal MV projection (use_ref_frame_mvs) by default once order hints are enabled, and mvstack.rs's documented corner-cut always computes zero_mv_ctx and the mode-context GLOBALMV_OFFSET bit as if it were off, desyncing the symbol stream from the first NEARESTMV block that inherits a temporal-adjusted context. Add --enable-ref-frame-mvs=0 alongside this gate's other disabled features so it isolates grain synthesis as its own comment already claims, matching every real-aomenc gate's envelope pattern. Temporal MV projection stays a separate, unimplemented capability.
fix(av1): sweep --enable-ref-frame-mvs=0 into every aomenc test recipeAhmet Kaan Gümüş · 6836b28
fix(av1): sweep --enable-ref-frame-mvs=0 into every aomenc test recipe use_ref_frame_mvs (temporal MV projection) is unimplemented; mvstack computes zero_mv_ctx/GLOBALMV_OFFSET as if it were off, so any real aomenc stream with it enabled desyncs the symbol decoder on inter frames. The film-grain gate hit this (frame-1 luma mismatch pinned to this, grain falsified); the remaining 7 aomenc recipes carried the same latent flake and are now pinned inside the supported envelope. The ffmpeg single-frame helper is keyframe-only and unaffected.
WIP(av1): single-ref LAST2/LAST3/BWDREF/ALTREF2/ALTREF decode — agent capped mid-verificationAhmet Kaan Gümüş · 96e6529Browse files
Merge branch 'lane-filmgrain': spec 7.18.3 film grain synthesis, pixel-exactAhmet Kaan Gümüş · 1ce9f54Browse files
fix(av1): port libaom's exact single-ref MV stack extensionAhmet Kaan Gümüş · 81de048
fix(av1): port libaom's exact single-ref MV stack extension Replace the hand-written GOLDEN-fix extension pass (mvref_common.c reduction guessed by hand: gated on the 8-entry stack cap, flat unconditional weight=2 adds) with an exact port of process_single_ref_mv_candidate + setup_ref_mv_list's single-reference extension: real gate is MAX_MV_REF_CANDIDATES (2, not 8), real reach is the query block's own bw4/bh4 (not a flat 16), dedup/weight/ sign-bias now match libaom's function precisely. Fixes the 3 real-clip encoder regressions the hand-written pass caused (stack contents diverged from what a real decoder derives, desyncing DRL/MV coding). All 3 pinned/hand-built golden tests still green; full ec-av1 suite green (179 passed); forwarding gate 20/20 clean, 0 mismatches. Golden gate fires=0/20 live (aomenc's fixed seeds never select GOLDEN_FRAME in this environment) -- GOLDEN arm stays unmasked since the pinned fixtures and forwarding gate already prove it correct; re-masking per the fires=0 contingency would break those pinned tests, a direct conflict flagged rather than resolved silently.
test(av1): drive the film-grain sweep with the repo aomenc and the supported-envelope recipeAhmet Kaan Gümüş · 4da5dbf
test(av1): drive the film-grain sweep with the repo aomenc and the supported-envelope recipe The sweep probed bare `aomenc` on PATH (always absent) and so always skipped; it now uses aomenc_path() like every other gate. The recipe adopts the forwarding gate's constraint set so the streams stay inside the decoder's supported envelope, with --tune-content=film as the one flag under test. At 64x64 the streams now reach the GOLDEN_FRAME refusal on this branch; the test goes green once the mvstack extension-pass fix (lane-av1golden8) merges and unmasks GOLDEN.
feat(av1): implement spec 7.18.3 film grain synthesis, flip the refusalAhmet Kaan Gümüş · 84e41d9
feat(av1): implement spec 7.18.3 film grain synthesis, flip the refusal Port the AR-filtered grain template generation, piecewise-linear scaling LUT, and 32x32/16x16 tiled overlap-blend application from libaom's reference synthesis (crates/ec-av1/src/film_grain.rs), wired into decode_stream's frame-finalize path so the reference bank keeps the clean pre-grain decode (spec 7.18.3.1) while only the caller's output picture carries grain. Header parsing (ec-av1-syntax FilmGrainParams, load_grain_params ref-slot forwarding) was already spec-complete -- no changes needed there. Replaces the apply_grain refusal with a pixel-exact gate against ffmpeg's own AV1 decoder on the pinned aomenc fixture (frame 0, the span the original mismatch was traced to; later frames in that fixture hit an unrelated pre-existing GOLDEN_FRAME MC gap, out of this lane's scope), plus an aomenc multi-seed sweep gate that skips gracefully when aomenc is unavailable.
fix(av1): re-mask GOLDEN_FRAME behind the LAST_FRAME refusal arm, pin round-9 residualAhmet Kaan Gümüş · 2e169ef
fix(av1): re-mask GOLDEN_FRAME behind the LAST_FRAME refusal arm, pin round-9 residual Round 9's own forwarding gate still shows GOLDEN_FRAME motion compensation mismatching a real aomenc stream once the film-grain refusal is in place (1/20, frame 3 luma, apply_grain=false). Collapse the GOLDEN_FRAME arm back into the single LAST_FRAME/_ refusal match so it refuses by name again, and add an #[ignore]d pinned_golden7_stream_decodes_pixel_exact test (same shape as golden4's) against the pinned repro fixture for round 10. Also drops the debug-only probe_env_stream test.
fix(av1): gate switchable_interp neighbour ctx by ref_frame, keep GOLDEN_FRAME maskedAhmet Kaan Gümüş · 71a371f
fix(av1): gate switchable_interp neighbour ctx by ref_frame, keep GOLDEN_FRAME masked resolve_interp_filter fed a block's above/left filter context straight from Neighbours regardless of which reference frame each neighbour coded -- a different-ref neighbour's filter choice was corrupting the symbol read for this block's own filter, instead of reading as unset ([3,3], the same sentinel intra neighbours already produce). Gate both above_filter and left_filter on above_ref/left_ref matching this block's ref_frame. Round 8's GOLDEN_FRAME unmask attempt with this ctx fix still produces a real mismatch: a golden gate run 20x reproduces a frame-0 (intra keyframe) luma diff against ffmpeg whenever GOLDEN_FRAME actually fires later in the same stream (seeds 57, 59, both live-reproduced). The ctx fix itself is not the cause -- decode_inter_block8 never resolves switchable_interp context at all (it refuses non-LAST_FRAME before reaching any filter code), so this bug is golden-adjacent elsewhere, unproven past that. GOLDEN_FRAME stays a named refusal; added the same EC_AV1_GATE_DUMP pin-on-mismatch pattern the CDF forwarding gate already has to the golden gate test, and captured the reproducing stream for the next round.
2026-08-27
fix(av1): re-derive the GOLDEN_FRAME loop-filter residue, re-mask with a pinAhmet Kaan Gümüş · d02f017
fix(av1): re-derive the GOLDEN_FRAME loop-filter residue, re-mask with a pin Un-masked decode_inter_block's GOLDEN_FRAME arm this round and re-ran the forwarding + golden-reference gates: two real aomenc streams mismatched (30-run forwarding gate: 4/30 real failures, all a real aomenc GOLDEN stream, not the documented flake). Pinned one (seed 43, frame 3 luma) as stream::tests::pinned_golden4_stream_decodes_pixel_exact (#[ignore]d) and traced it: 3 of 4096 luma pixels off by exactly +-1, all inside the loop filter's edge window at a GOLDEN_FRAME/LAST_FRAME block boundary. Hand- checked lf_level's ref_deltas/mode_deltas arithmetic against spec 7.14.4 at that edge -- it matches the default table exactly, so the residue is still open: a narrow deblock-kernel rounding defect, or a golden-side pixel one filter tap upstream. Re-narrowed the mask (decode_inter_block's GOLDEN_FRAME arm refuses by name again) and reverted a_hand_built_golden_reference_refuses_by_name to its refusal-asserting form -- no fix proven this round, but the pinned fixture and the narrowed-down suspect (deblock edge, not lf_level's own math) carry forward.
fix(av1): loop filter level must not forward from the primary ref frameAhmet Kaan Gümüş · 3024af4
fix(av1): loop filter level must not forward from the primary ref frame read_loop_filter_params only re-reads loop_filter_level[2]/[3] (chroma) when a luma level is nonzero (spec 5.9.11); the whole LoopFilterParams struct -- including level/sharpness -- was being seeded from the primary reference frame's saved params before that read, so a frame whose own luma levels are both 0 kept the PREVIOUS frame's nonzero chroma level instead of the spec's implicit 0. Spec 7.20's load_previous only forwards ref_deltas/mode_deltas, never level/sharpness. Isolated with a pinned mismatching stream (seed 47, frame 1 chroma vs ffmpeg): bisected pre/post-deblock dumps to prove the loop filter kernel itself untouched by the bug, then a level sweep on the exact failing pixel's 6-tap window showed a threshold flip precisely between level<=2 (matches ffmpeg) and level>=3 (our observed wrong output) -- our decoder computed level=8 (carried from frame 0's key frame header) where the true value is 0. Adds an env-gated EC_AV1_GATE_DUMP pin to the forwarding gate test plus an #[ignore]d fast-reproduce test reading that pinned stream.
fix(av1): GLOBALMV loop-filter mode delta; mask GOLDEN behind its stacked defectAhmet Kaan Gümüş · ef03524
fix(av1): GLOBALMV loop-filter mode delta; mask GOLDEN behind its stacked defect lane-av1golden2 round 5. The round-4 GOLDEN flip's hand-built fixture proved the symbol path and a whole-pel skip copy -- the first real aomenc GOLDEN streams through the live arm mismatched. Symbol-trace vs a patched aomdec isolated one cause on the LAST_FRAME-reachable side: lf_level applied mode_deltas[1] to every inter block, but spec 7.14.4's mode_lf_lut maps GLOBALMV to mode_deltas[0]. Fixed by packing the GLOBALMV bit into ref_grid's sign; that moved the forwarding gate's failure from seed 42 frame 1 to seed 48 frame 3 -- at least one more stacked defect on the GOLDEN-live path, so the GOLDEN arm narrows back to a named refusal (threading kept, unread) and the hand-built fixture now asserts the mask by name instead of pixel exactness. A rare (~1/10..1/30) all-LAST mismatch on the forwarding gate remains reachable even with the mask -- present with semantics identical to the previously pushed baseline -- pinned as this lane's next round.
feat(av1): flip the GOLDEN_FRAME refusal, proven by a hand-built OBU fixtureAhmet Kaan Gümüş · 5fb6ee3
feat(av1): flip the GOLDEN_FRAME refusal, proven by a hand-built OBU fixture 120+ real aomenc attempts never produced a decodable stream that fired GOLDEN_FRAME before hitting an unrelated refusal first. A hand-built 3-frame stream (real key frame; a hand-coded intra "different content" frame refreshing LAST_FRAME's slot; a hand-coded frame whose lone block codes single_ref out to GOLDEN_FRAME and a skip zero-MV NEARESTMV) drives decode_stream directly and is cross-checked against ffmpeg's own decode of the identical wire bytes, 4 consecutive runs. decode_inter_block now threads GOLDEN_FRAME to the golden_y/u/v planes already passed to it instead of refusing every non-LAST_FRAME reference; LAST2/LAST3/BWDREF/ ALTREF2/ALTREF still refuse, unproven. intra_inter_ctx made pub(crate) so the fixture can compute the exact context the decoder does.
guard(av1): GOLDEN decode stays refused until a stream proves it liveAhmet Kaan Gümüş · ed5f4c7
guard(av1): GOLDEN decode stays refused until a stream proves it live The full single-non-LAST implementation stays (reference tree, MC threading, mvstack filter, deblock ref deltas), but decode_stream refuses GOLDEN narrowly again: 120 recipe attempts never produced a decodable stream that actually fires the path, and an accepted-but- unproven decode is the silent-miscode shape this repo does not ship. The gate documents the refusal and the firing hunt continues.
feat(av1): decode a single non-LAST_FRAME reference (GOLDEN_FRAME)Ahmet Kaan Gümüş · 8a443b2
feat(av1): decode a single non-LAST_FRAME reference (GOLDEN_FRAME) Round 2 continuation: read_single_ref threads the full single_ref_p1..p6 spec tree (context from the block's real above/left reference via Neighbours::above_ref/left_ref, not a bare is_inter bool), decode_inter_block threads a GOLDEN_FRAME picture down to motion compensation when the frame header's ref_frame_idx[3] names a live DPB slot, and the deblock filter's ref_frame_for_lf now indexes loop_filter_ref_deltas by the block's actual reference instead of assuming LAST_FRAME for every inter block. decode_stream widens its global-motion IDENTITY refusal to cover both LAST_FRAME and GOLDEN_FRAME's own entries, and adds a reference_select refusal (comp_mode/compound prediction stays out of scope; skip_mode is a spec-guaranteed consequence of that same refusal, not a separate check). mvstack's find_mv_stack candidate filtering and decode_inter_block8's straddling-8x8 leaf path were already ref_frame-generic/LAST-only respectively and needed no changes. Gate: a_real_aomenc_inter_sequence_with_a_golden_reference_decodes_pixel_exact (stream.rs) -- an 8-frame real-aomenc sequence with order-hint left on (the one flag the sibling CDF-forwarding test disables specifically to suppress GOLDEN_FRAME), asserting pixel-exact decode against ffmpeg whenever decode::non_last_ref_hits() actually advances. Across the attempt budgets tried this round, aomenc's RD never produced a stream that both fully decoded under this crate's existing round-2 refusals AND picked GOLDEN_FRAME -- the test SKIPs loudly rather than claim untested coverage, same pattern as its cdf-forwarding sibling. cargo test -p ec-av1 --release: 177 passed, 0 failed, 12 ignored.
feat(av1): implement the intra edge filter/upsample (spec 7.11.2.7-2.9)Ahmet Kaan Gümüş · 645882d
feat(av1): implement the intra edge filter/upsample (spec 7.11.2.7-2.9) r5 left directional()'s edge filter/upsample as an unimplemented corner-cut and left the two new predict() bool params half-plumbed (encode.rs call sites done, stream.rs/decode.rs test-module sites missing). This round: - finished the plumbing: decode.rs threads the sequence header's enable_intra_edge_filter through a thread-local (ENABLE_EDGE_FILTER, set once per decode_key_frame_tile_with_cdfs call, not per-block -- documented why a thread-local beats touching two dozen call sites) down to PlaneBuf::reconstruct's predict() call; stream.rs sets it from the parsed seq header; encode.rs sites already passed false (our encoder never turns it on, so round-trips stay bit-green regardless). - filter_intra_edge (5-tap kernel, 3 strength buckets via intra_edge_filter_strength's two smooth/non-smooth threshold tables), the filter_corner blend, and upsample_intra_edge (av1_upsample_intra_edge_c) were transcribed against libaom's reconintra.c and wired into directional()'s z1/z2/z3 walk (base/shift math doubled for the upsampled-density case). All present, none stubbed. - flipped the gate's --enable-intra-edge-filter=0 to =1 so a_real_aomenc_stream_with_directional_chroma_decodes_pixel_exact actually exercises the new path instead of the disabled one. The gate still fails, but NOT from this filter: patched-aomdec cross-checks (EC_UDUMP dqcoeff/pred/recon dumps, /tmp/libaom-src's decodeframe.c, not committed) prove the failing TU (chroma cpx=0/cpy=0, DC_PRED, tx_type DctDct, skip=1 both sides) reconstructs bit-identically pre-loop-filter in both decoders -- flat 128 either way, edge filter inapplicable there (no real neighbours, corner-filter's 2n>=24 gate doesn't fire at n=8). A PREDEBLOCK/POSTDEBLOCK trace (also not committed) localizes the actual divergence to apply_deblock: our decoder introduces a value our own pre-filter data does not justify at the row6-9/col6-9 TU-corner intersection, where both a horizontal and a vertical deblock edge are filtered back to back. r4/r5's "intra edge filter gap" and "tx_type path" suspects are both now falsified for this failure; the next round's target is deblock_plane's edge-intersection order/read-back (vertical-then-horizontal at a corner where an already-filtered vertical sample feeds the horizontal filter's taps). Suite: 174 passed, 1 failed (the known gate above) -- no regression from r5's own checkpoint of the same numbers; the cdffwd flake did not fire this run.
wip(av1): chroma tx_type derivation from Intra_Mode_To_Tx_Type, wires default_tx_typeAhmet Kaan Gümüş · 637d48a
wip(av1): chroma tx_type derivation from Intra_Mode_To_Tx_Type, wires default_tx_type read_coeffs already carried a default_tx_type parameter from a prior round; both call sites (read_plane's intra path and read_inter_plane's inter path) didn't pass it yet, so the tree didn't compile. Wires them: - read_plane (intra): plane_idx==0 or side>=32 -> DctDct (av1_get_tx_type, blockd.h: 64-and-up is unconditional, 32x32 chroma survives intra_mode_to_tx_type only to be re-forced by EXT_TX_SET_DCTONLY gating in av1_get_ext_tx_set_type); otherwise chroma takes default_intra_tx_type(predict_mode), a from-libaom transcription of intra_mode_to_tx_type's static table (D45_PRED is DCT_DCT, not an ADST mode -- transcribed exactly, no set-membership fallback needed since every entry the table can produce (DCT_DCT/ADST_DCT/DCT_ADST/ADST_ADST) is already inside both TX_SET_INTRA_1 and _2). - read_inter_plane: always DctDct -- Intra_Mode_To_Tx_Type only applies to an intra block's chroma plane per av1_get_tx_type's own is_inter branch. Cross-checked against a live patched aomdec (EC_CHROMA_TXTYPE trace in /tmp/libaom-src/av1/decoder/decodetxb.c, not committed here) on the lane's own seed-42 aomenc fixture: every uv_mode -> tx_type pair libaom picked for this stream's chroma matches default_intra_tx_type exactly. Suite: 174 passed, 1 failed (the new a_real_aomenc_stream_with_directional_chroma_decodes_pixel_exact) -- NOT the pre-existing cdffwd flake. Confirmed the failure predates and survives this fix: reverting default_tx_type to always-DctDct made the mismatch start at pixel row 0 (whole-plane wrong); with this fix it starts at row 6 and grows outward in a triangular fan, meaning the tx_type choice is not itself wrong (matches libaom's own choice byte-for-byte) but something downstream of it -- reconstruction/ directional-prediction propagation -- still diverges. Left failing, not silenced or adjusted, for the next round to chase with the two named suspects (intra edge filter gap, this tx_type path) now narrowed to one.
Merge branch 'lane-av1tx4': TX4 luma decode and the 1D transform classesAhmet Kaan Gümüş · 843a5a8
Merge branch 'lane-av1tx4': TX4 luma decode and the 1D transform classes Seven rounds: TX4 coefficient tables (transcription cross-verified), V_DCT/H_DCT scan orders and the class-split eob_pt CDF, the leaf8 scan-table fix, and a gate that fires the class-1 path on real aomenc bytes and decodes pixel-exact. The tx-class lesson: a transform class is a cross-cutting dimension -- scan, eob table, and context each carry it.
feat(av1): gate the V_DCT/H_DCT class-1 path on real aomenc bytesAhmet Kaan Gümüş · 5147651
feat(av1): gate the V_DCT/H_DCT class-1 path on real aomenc bytes The sub-8 refusal verdict, the fixture recipe, and a tx_class1_hits counter: a min/max-partition-8 horizontal-stripe stream fires H_DCT through the class-split eob path and decodes full-frame pixel-exact vs ffmpeg, 4/4 runs.
feat(av1): interpolation filters beyond REGULAR, incl. per-block SWITCHABLEAhmet Kaan Gümüş · 10f24e6
feat(av1): interpolation filters beyond REGULAR, incl. per-block SWITCHABLE The ~13% decodes-but-wrong inter flake was a whole missing filter family: motion compensation always used the REGULAR subpel tables, while real encoders pick SMOOTH/SHARP per frame -- or SWITCHABLE, reading a per-block filter symbol pair this decoder never read (the silently-unread class again; our own encoder writes one fixed filter). All four table sets land in mc.rs with an aomdec-pinned unit test, the switchable_interp CDFs and neighbour context follow libaom's read_mb_interp_filter, and the filter threads from the frame header through both inter block paths. The forwarding gate ran 10/10 with zero pixel mismatches and no vacuous skips.
diag(av1): report worst pixel delta in the pinned-mismatch scratch probeAhmet Kaan Gümüş · ddd8c16
diag(av1): report worst pixel delta in the pinned-mismatch scratch probe Re-measured the cdf-forwarding gate's flake on HEAD (4/30, ~13%, matches the prior ~17% sample -- not stale). Pinned a failing stream and used scratch_isolate_pinned_mismatch to triage it: frame 2 is small (+-1, MC-rounding shape); frame 3's much larger mismatch is downstream propagation through frame 3's own inter reference to frame 2's already-wrong pixels, not a second independent defect. Added worst-delta to the probe's report so this triage doesn't need a manual pass next time. Root cause not fixed this round -- see ledger for the numeric reproduction (a 16x16 chroma block, mv=(7,15) eighth-pel, subpel xfrac=15/yfrac=7) that lands outside the previously-fixed leaf8 4-tap case, still open.
feat(av1): the seven-type TX_SET_INTRA_1 tx_type row, V_DCT/H_DCT, gate firesAhmet Kaan Gümüş · 2411791
feat(av1): the seven-type TX_SET_INTRA_1 tx_type row, V_DCT/H_DCT, gate fires A reduced_tx_set=0 frame's 8x8-and-under intra transforms read tx_type from the seven-symbol TX_SET_INTRA_1, not the five-symbol reduced row our tables carried (the row-held-constant class, on the tx-set dimension -- our own encoder always writes reduced_tx_set=1, the same writer-never-needs-it trap as mv_hp). New set-1 CDF row, the set-1 symbol order from av1_ext_tx_inv, and the V_DCT/H_DCT inverse transforms (one-axis DCT, identity on the other). The tx-select gate now actually FIRES: mandelbrot content at min-partition 16 splits 16x16 blocks into TX8 TUs that read the set-1 rows and decode pixel-exact vs ffmpeg, 4/4 runs, no skips. Resolved 4x4 luma stays a named refusal (no TX4 coefficient tables yet).
feat(av1): read tx_depth under TxMode::Select on key framesAhmet Kaan Gümüş · ab94637
feat(av1): read tx_depth under TxMode::Select on key frames Threads a tx_select flag through decode_key_frame_tile's block walk so an intra frame using TxMode::Select reads the tx_depth symbol (cat0..3 CDFs, tx_size_context) instead of assuming TxMode::Largest, resolving to a per-TU split-luma decode path when the block's transform is smaller than its own side. A resolved 4x4 luma transform still refuses by name (no 4x4 coefficient tables yet). Narrows the old whole-stream TxMode::Select refusal to inter frames only, since decode_inter_frame's block loop does not thread tx_select yet. Adds tx_depth_hits() (before/after counter, same pattern as filter_intra_hits/deblock_hits) and a real-aomenc gate test proving a split transform actually decodes pixel-exact against ffmpeg -- currently SKIPs (no fixture recipe found in this session reliably lands a stream that both avoids this decoder's other named round-2 gaps and resolves a tx_depth split without exhausting to 4x4); it never fails, so the suite stays green while that fixture search continues. Investigated a reported suite regression on this branch first: it does not reproduce against this diff -- the cdf-forwarding inter-sequence gate (a_real_aomenc_inter_sequence_with_cdf_forwarding_decodes_pixel_exact) fails at the same ~17% rate with this diff fully reverted, confirmed over 30 stashed runs on HEAD. Pre-existing flake, not a regression.
fix(av1): predict from the slot ref_frame_idx names, not the last decodeAhmet Kaan Gümüş · 8f9acc8
fix(av1): predict from the slot ref_frame_idx names, not the last decode The reference picture was a single global overwritten every frame; LAST_FRAME names a slot via ref_frame_idx[0], and a frame whose predecessor refreshed a different slot must keep predicting from what is still stored there. Bit-exact motion vectors into the wrong picture made a luma-only small-magnitude residue that looked like rounding. Pictures now live in the same 8-slot array discipline the CDF states already use, both stored under refresh_frame_flags. The pinned forwarding stream decodes 4/4 frames pixel-exact on every plane; the live gate ran 6/6 green with no skips.
feat(av1): read the mv_hp/class0_hp bits real hp streams carryAhmet Kaan Gümüş · e192a62
feat(av1): read the mv_hp/class0_hp bits real hp streams carry The dropped-as-dead half-pel MV CDFs (our own writer never sets allow_high_precision_mv) were silently unread on foreign streams whose headers set the flag -- every later symbol shifted one bit, the same silently-unread-symbol shape as use_filter_intra. Tables restored, reads gated on the frame header's flag, plumbed through the inter tile path. On the pinned forwarding stream frame 3's desync drops from 2618 wrong luma pixels (worst 35) to 541 (all within 1, chroma exact) -- entropy now aligned, a luma-only reconstruction residue remains.
debug(av1): env-gated dump of frame-2 saved CDF tables, decisive negative resultAhmet Kaan Gümüş · a45ccae
debug(av1): env-gated dump of frame-2 saved CDF tables, decisive negative result EC_AV1_DUMP_TABLES dumps the reference-slot CDF tables a frame saves (partition_w64/w32/w16, skip, new_mv, zero_mv, ref_mv, mv_joint) in the spec's cumulative-probability orientation. Cross-checked against a matching libaom decodeframe.c dump (converting its inverted icdf storage back to the same orientation) on the pinned cdffwd stream: frame 2's saved tables are byte-identical between the two decoders across every table sampled. This falsifies the CDF-forwarding hypothesis (stale/never-adapted forwarded table, specifically the gathered-partition-never-adapted theory) for the frame-3 partition_w32[ctx=8] divergence — the bug is elsewhere (context computation entering frame 3, an untabled CDF, or an actual bitstream desync inside frame 3 itself). Also confirmed by libaom source (bitreader.h aom_read_symbol_ vs aom_read_cdf_) that libaom's own gathered partition reads never call update_cdf on the full table either, matching our symbol_fixed's behavior -- the gathered-adaptation theory was wrong on both sides independently.
test(av1): trace inter-block mv/skip; restructure the cdf-forwarding gate as a seed loopAhmet Kaan Gümüş · 82a96d2
test(av1): trace inter-block mv/skip; restructure the cdf-forwarding gate as a seed loop decode_inter_block now prints its skip/mv/is_new_mv decision under EC_AV1_TRACE, matching the key-frame path's existing tracing -- needed to diff against an instrumented aomdec when chasing the cdf-forwarding mismatch (still open: pinned streams show frame N+1's second same-context partition_w32 read choosing a different split than aomdec once frame N's forwarded, count-reset table has adapted through one prior read at that context, implying the forwarded state itself already differs going into the frame -- root cause not yet found). The cdf-forwarding gate now retries several aomenc seeds (RD is non-deterministic run to run) and requires the first stream that decodes to be pixel-exact, rather than depending on one fixed seed's RD choice.
fix(av1): reset every CDF's symbol counter before saving it forwardAhmet Kaan Gümüş · 6404564
fix(av1): reset every CDF's symbol counter before saving it forward Spec 7.20 save_cdfs (libaom av1_reset_cdf_symbol_counters, entropy.c) zeroes each table's adaptation-rate counter before storing the tile's end-of-tile state into a reference slot for cross-frame forwarding -- the probabilities carry forward, the counts do not. This decoder was forwarding the raw counts, so every table an inter frame resumed from adapted faster than the real decoder's for the rest of that frame: too small a drift to flip a symbol after one hop, but compounding across two into a genuine desync (a pinned aomenc stream showed frame 0/1 pixel-exact, then ~60% of frame 2's luma wrong by +-1 once the drift caught up). crates/ec-av1/src/cdf_state.rs adds Cdfs::reset_counts (and the MvComponentCdfs half it delegates to), zeroing the last entry of every adapting array without touching its probabilities. crates/ec-av1/src/stream.rs calls it on the saved (non- disable_frame_end_update_cdf) branch only, matching libaom's REFRESH_ FRAME_CONTEXT_BACKWARD path; the disable_frame_end_update_cdf branch already stores the untouched loaded state, which needs no reset. The forwarding-gate test is still flaky, but no longer on this bug: a 20-run sample after the fix shows zero pixel-mismatch failures (the class this commit targets); every failure left is a variant of the same pre-existing, already-documented round-2 refusal (aomenc's RD search occasionally choosing a reference other than LAST_FRAME or a partition/tx-type this decoder does not model), unaffected by CDF state. Full `cargo test -p ec-av1 --release` here: 170 passed, 1 failed (that same refusal), 12 ignored.
feat(av1): GLOBALMV under identity warp; the real inter gap was CDF forwardingAhmet Kaan Gümüş · 74ed1bd
feat(av1): GLOBALMV under identity warp; the real inter gap was CDF forwarding The 'partition type' refusal on real inter streams was misattributed: the tile's first partition symbol came back out-of-alphabet because a real encoder's inter frame loads its initial CDF state from the previous frame's adapted tables (primary_ref_frame + load_cdfs, spec 7.20) and this decoder starts every frame from the spec defaults. The deblocked inter-sequence gate now encodes with error-resilient frames (primary_ref_frame = NONE, a shape real low-latency encodes use) and decodes pixel-exact. GLOBALMV decodes as the zero vector under the IDENTITY warp model, with a named refusal for any other model.
feat(av1): implement the spec 7.14 in-loop deblocking filterAhmet Kaan Gümüş · 66b41fc
feat(av1): implement the spec 7.14 in-loop deblocking filter Fixes the two decode_key_frame_tile/decode_inter_frame_tile call sites in stream.rs (a prior round added the LoopFilterParams parameter without threading it through), then ports libaom's edge-level decision (av1_loopfilter.c) and pixel kernels (aom_dsp/loopfilter.c: filter4/6/8/14) restricted to this decoder's own invariants -- uniform level only (no segmentation/delta_lf, already refused upstream), and transform size always equal to block size, which collapses the PU-edge/TU-edge distinction and the both-sides-skipped suppression away entirely. Applied after tile reconstruction and before apply_cdef in both frame paths. Our own encoder never sets a nonzero loop_filter.level, so every existing round-trip is unaffected (verified: encode.rs never touches LoopFilterParams, suite green at 170/0/12). New gate: a_real_aomenc_intra_stream_with_deblocking_decodes_pixel_exact (pixel-exact vs ffmpeg, deblocking on, CDEF off, deblock_hits() counter proves the filter fired) and its inter-sequence counterpart, which SKIPs on this box -- the same real-aomenc stream hits a pre-existing partition-type gap this lane's decoder doesn't cover (lane-av1-rect territory per decode.rs's own module doc), not a deblocking defect.
fix(av1): filter-intra was already correct -- gate against a real aomenc streamAhmet Kaan Gümüş · 2adf290
fix(av1): filter-intra was already correct -- gate against a real aomenc stream The straddling-boundary mismatch against ffmpeg's decode was never the filter-intra predictor: it's a real AV1 deblocking-filter artifact, and this decoder has no in-loop deblocking at all. `--loopfilter-control=0` on the aomenc fixture makes the two decodes byte-exact with zero source changes to intra.rs/decode.rs's prediction math. Adds a permanent gate (crates/ec-av1/src/stream.rs) that shells out to a real standalone aomenc build (ffmpeg's own libaom-av1 wrapper on this box doesn't expose enable-tx-size-search/loopfilter-control through -aom-params), asserts the use_filter_intra symbol actually fired via a new process-global counter (decode::filter_intra_hits), and checks pixel-exact luma/U/V against ffmpeg's own decode of the identical bytes. The encoder's screen-content-tools decision is a real internal PSNR trial, occasionally flips even with palette/intrabc off; the test skips (not fails) the still-unsupported-gap runs the same way the existing CDEF gate test does.
feat(av1): finish CDEF in-loop filter (spec 7.15), close r1's borrow errorAhmet Kaan Gümüş · 8425e46
feat(av1): finish CDEF in-loop filter (spec 7.15), close r1's borrow error r1 left decode.rs with a full CDEF port (direction search, primary/ secondary taps, damping, chroma) but an E0502 borrow (closures captured `y.width`/`y.true_*` while `y` was mutably borrowed by the filter call) and several test call sites at the old decode_key_frame_tile/decode_inter_frame_tile arity. Fixed the borrow by copying the plane's stride/extent into locals before the closures, and threaded &CdefParams::default() through every in-crate test caller. Verified two real correctness bugs against libaom's cdef_block.c/cdef.c while porting: - is_skip_txfm only read one of the four 4x4 mi cells an 8x8 CDEF unit covers; libaom's is_8x8_block_skip requires all four skip (a sub-8x8 partition can straddle the unit with mixed skip flags). - av1_cdef_filter_fb zeroes the shared `dir` per plane when *that plane's own* frame-level primary strength is 0 (`pri_strength ? dir : 0`), independent of the per-block adjusted strength and of the other plane; the port was passing the same nonzero dir to both. New hard test (a_real_libaom_gradients_stream_with_cdef_decodes_pixel_exact) encodes a real libaom-av1 stream with CDEF left on (no -enable-cdef 0) and asserts pixel-exact against ffmpeg's own decode -- passed first run after the two fixes above. Full cargo test -p ec-av1 --release: 166 passed, 0 failed, 12 ignored.
fix(av1): read the unread use_filter_intra flag; audit the same blindness classAhmet Kaan Gümüş · beeeec5
fix(av1): read the unread use_filter_intra flag; audit the same blindness class lane-av1real r10 added the FILTER_INTRA/FILTER_INTRA_MODE CDF tables and Cdfs fields but stopped mid-wiring; this finishes threading enable_filter_intra (from the sequence header) through decode_key_frame_tile -> decode_block/decode_leaf8 -> read_intra_mode, which now reads use_filter_intra after DC_PRED at <=32x32 (spec 5.11.14, av1_filter_intra_allowed) and refuses use_filter_intra==1 blocks (this decoder does not implement the 5.11.14 recursive predictor) rather than silently miscoding. The pinned CfL stream's actual bug was exactly this: its block reads use_filter_intra=0, so the flag's own bits were never consumed before, desyncing every later symbol read self-consistently -- both the Python cross-checks and debug aomdec traces shared that blindness. With the flag read, the pin decodes pixel-exact (luma/U/V) against ffmpeg, and the previously-#[ignore]d a_real_libaom_cfl_stream_decodes_pixel_exact test now passes green with no split needed. Blindness-audit sweep of read_intra_frame_mode_info (libaom decodemv.c) found three more per-block/per-superblock symbols this crate silently never reads while accepting the header fields that would gate them: allow_screen_content_tools (intrabc/palette_mode_info), delta.q_present/ delta.lf_present (per-SB delta_q/delta_lf), and segmentation.enabled (per-block segment_id) -- named refusals added in decode_stream next to the existing CDEF/TxMode::Select refusals. Full ec-av1 suite: 165 passed, 0 failed, 12 ignored.
debug(av1): r9 falsifies hypothesis A and rules out qmatrix/delta_q/segmentationAhmet Kaan Gümüş · 120854a
debug(av1): r9 falsifies hypothesis A and rules out qmatrix/delta_q/segmentation Task 1 (frame inventory): manual byte-level OBU parse of pin_cfl.obu (77 bytes total) shows exactly TD(size 0) + SEQUENCE_HEADER(size 10) + one OBU_FRAME(type 6, size 61) to EOF -- no second frame OBU, no show_existing_frame, nothing hidden. ffprobe/ffmpeg (libdav1d) also read exactly 1 frame from the file. decode_stream returns 1 Picture; the test compares frames[0] against ffmpeg_frames[0], the same single frame both decoders parsed. Hypothesis A (ffmpeg showing a different frame) is FALSIFIED for this fixture -- three independent confirmations (manual OBU byte parse, ffprobe frame count, our own frame count) agree on single-frame-single-shown. Task 2 (reconstruction diff), new evidence this round: added EC_AV1_TRACE prints for quantization/segmentation/delta params to scratch_isolate_pinned_mismatch (stream.rs) and confirmed for pin_cfl.obu: using_qmatrix=false, delta_q_y_dc=0 and delta.q_present=false, segmentation.enabled=false, coded_lossless=false, tx_mode=Largest -- so none of those alternate-quantization paths (which decode.rs does not implement) are actually exercised by this stream; ruling them out removes several live hypotheses for the amplitude gap rather than leaving them open. Independently verified the transform math itself: for the block's proven levels ((0,0)=-2,(0,1)=-2,(0,2)=-2, dc_sign negative), dequant at base_q_idx=60 gives [-57,-67,-67], and BOTH a from-scratch scipy `idctn(norm='ortho')` computation and this crate's own `dequant_and_inverse` agree the resulting residual is [-2,-2,-2,-2,-2,-1, -1,-1,-1,-1,0,...,0] across the row -- i.e. our transform pipeline is mathematically self-consistent and correct *given* those coefficients. That residual added to DC_PRED=128 reconstructs to ~126, which is what this decoder outputs; ffmpeg's real decode of the identical bytes is a smooth 41-82 diagonal gradient that cannot come from this residual under any correct reconstruction. So the remaining gap is neither hypothesis A (ruled out above) nor a transform/dequant bug (ruled out here) -- it must be a symbol read upstream of the proven-clean coefficient values (partition_w32, most likely: a single 32x32 PARTITION_NONE forces the whole frame through one DC_PRED block, while a wrong partition context table could silently produce the same "coefficients bit-exact for the symbols we read" result while reading the wrong symbol in the first place). r10: re-derive partition_w32's CDF/context table from entropymode.c independently of both this crate's and r8's prior Python cross-check (which may share the same transcription error), and try forcing a SPLIT decode of this exact stream to see whether a 4-subblock reconstruction (each with its own propagated DC neighbour) produces ffmpeg's smooth gradient shape. Left the EC_AV1_TRACE prints (quantization/delta/segmentation/lossless) in scratch_isolate_pinned_mismatch and a new #[ignore]d scratch_probe_32x32_dequant in transform.rs documenting the independent math check -- both scratch/debug-only, gated behind #[ignore] or env vars, no behavior change. cargo test -p ec-av1 --release: 164 passed, 0 failed, 13 ignored.
debug(av1): r8 clears tile-offset and mode_info as the pinned CfL stream's bugAhmet Kaan Gümüş · fc77857
debug(av1): r8 clears tile-offset and mode_info as the pinned CfL stream's bug Independent from-spec OBU/frame-header parse in Python derives the tile group's start at byte 23 (obu_header -> leb128 -> full sequence_header -> full uncompressed_header bit-by-bit); EC_AV1_TRACE's new key_tile_bytes line proves decode_stream's obu_offset + tile.offset feeds decode_key_frame_tile that same byte 23, and r7's python literal agrees -- three-way match. Extended EC_AV1_TRACE to partition/skip/y_mode/uv_mode (decode.rs read_intra_mode + both partition sites) and cross-checked against an independent Python MSAC decoder whose partition_w32/kf_y_mode/uv_mode_cfl CDF literals this round re-verified byte-for-byte against /tmp/libaom-src/av1/common/entropymode.c (not inherited from a prior round): partition=NONE, skip=0, y_mode=DC_PRED, uv_mode=DC_PRED, matching ours exactly. Both r8 hypotheses from r7's handoff are falsified -- the bitstream genuinely codes DC_PRED with a near-zero residual for this block, and our decode of that is bit-exact. ffmpeg's real output (a smooth diagonal gradient) cannot come from that symbol sequence under any correct DC_PRED reconstruction, so the desync is downstream of symbol decode entirely: intra prediction or the inverse-transform/dequant path. Traces kept (not fixed yet); ignore reason on the pinned CFL test points r9 at crate::intra::predict and dequant_and_inverse_typed.
docs(av1): r7 closes the coefficient-decode hypothesis, points r8 at mode_info/tile offsetAhmet Kaan Gümüş · 222de20Browse files
debug(av1): symbol-level trace clears the coefficient decode, narrows the CfL desync upstreamAhmet Kaan Gümüş · 924ba44
debug(av1): symbol-level trace clears the coefficient decode, narrows the CfL desync upstream lane-av1real r7: added an EC_AV1_TRACE-gated trace to read_coeffs/read_eob and cross-checked the pinned CfL stream's entire Luma32 base/base_eob/br sequence against an independent Python decoder (real libaom default CDFs extracted from token_cdfs.h, get_nz_mag/get_nz_map_ctx_from_stats/get_br_ctx ported from txb_common.h, not from this crate's own code). Every symbol (ctx, value) matches ours bit-for-bit: eob_pt=5, eob_extra=1, eob=15, base_eob ctx=1→1, then base ctx sequence 21/21/21/21/6/6/6/7/7/6/6/1/2/0 with values 0,0,0,0,0,0,0,0,2,0,0,0,2,2 -- three nonzero levels (all magnitude 2) at pos 0/1/2, dc_sign ctx=0→negative. The coefficient decode and its context arithmetic are proven correct for this stream. The mismatch is downstream: dequant_and_inverse_typed on those exact levels (base_q_idx=60) produces a near-flat residual (row0 barely varies, rows 1-31 replicate it, matching what a DCT with energy confined to row 0 should do) landing luma at a uniform ~126 against ffmpeg's real ~50-and-varying output -- too large a gap for three magnitude-2 coefficients to ever close, even correctly transformed. That points to a desync *before* this trace starts (mode_info: partition/skip/y_mode/uv_mode, or the tile-group byte offset itself), not to the coefficient syntax this round instrumented. r8 should trace mode_info symbols the same way and cross-check tile-group start offset against the frame/OBU header parse, rather than the coefficient loop. Trace code is env-gated (EC_AV1_TRACE) and left in place, off by default, for r8 to reuse. CfL test stays #[ignore]d with an updated note.
docs(av1): r6 falsifies the scan-parity hypothesis; note the empirical test and reopen for a symbol-level traceAhmet Kaan Gümüş · 7e7c0c1
docs(av1): r6 falsifies the scan-parity hypothesis; note the empirical test and reopen for a symbol-level trace Read libaom's default_scan_4x4/8x8/32x32 arrays as row-major and found this crate's default_scan even/odd diagonal-walk parity backwards; swapping it in tile.rs and decode.rs regressed the previously ground-truth-exact a_real_libaom_gradients_stream_decodes_pixel_exact (Luma64 whole-SB) test while leaving the CfL/Luma32 test's failure unchanged. Reverted the scan change. Bug is not a pure scan-table parity flip; r7 should resume the symbol-by-symbol Python MSAC cross-check through base/base_eob/br/dc_sign against a temporary Rust trace instead of re-deriving table conventions.
fix(av1): pinned-mismatch scratch test used wrong frame dims; rule harness out, luma bug inAhmet Kaan Gümüş · 2e1d73a
fix(av1): pinned-mismatch scratch test used wrong frame dims; rule harness out, luma bug in scratch_isolate_pinned_mismatch hardcoded 64x64 for a stream that is actually 32x32 (confirmed via ffprobe + raw yuv size) -- an invalid wrong-region compare, now fixed. That was not the CfL gate test's own failure cause though: extending verification through the full coefficient loop rules out the ffmpeg harness (dims already correct there), every Luma32 q-context-1 CDF table (byte-exact vs libaom's token_cdfs.h), and this crate's base/br/eob context arithmetic (hand-verified against libaom's txb_common.h). A live trace found the pinned fixture's uv_mode decodes DC_PRED, not CfL, this run (libaom's already-documented cpu-used 8 nondeterminism), and the real luma mismatch is a genuine wrong-symbol decode inside read_coeffs's base/br loop for a TxbSet::Luma32 BLOCK-granularity transform -- narrowed for r6 in the updated ignore note.
fix(av1): refuse TxMode::Select streams instead of silently desyncingAhmet Kaan Gümüş · 93bc3b1
fix(av1): refuse TxMode::Select streams instead of silently desyncing decode_block never reads tx_depth symbols; a TxMode::Select stream decodes syntactically clean into low-energy garbage (the r3 flat-luma shape's sibling). Named refusal, same pattern as CDEF. The pinned CfL stream's symbols are cross-checked bit-for-bit through the EOB group via an independent from-scratch MSAC decoder; remaining suspects are the coefficient-level symbols and the harness itself (see ignore note).
wip(av1): CfL CDFs, alpha reads, and prediction math — r2 checkpointAhmet Kaan Gümüş · e37bffe
wip(av1): CfL CDFs, alpha reads, and prediction math — r2 checkpoint CfL sign/alpha CDFs converted from AOM_ICDF storage, read_cfl_alphas wired, cfl.c subsample/average/alpha math ported. The pinned CfL-stream gate stays ignored: its LUMA decodes near-flat where ffmpeg shows a gradient, so a bug upstream of the chroma math remains — r3 isolates.
fix(av1): refuse a decodes-but-wrong CDEF path instead of miscoding itAhmet Kaan Gümüş · cef0239
fix(av1): refuse a decodes-but-wrong CDEF path instead of miscoding it A real libaom-av1 stream with active CDEF strength decoded without error (cdef_bits==0 needs no per-block bitstream index) but produced wrong pixels -- neither tile decoder applies the in-loop CDEF filter (spec 7.15) at all. decode_stream now refuses any frame whose CDEF params would actually filter samples, naming the real gap instead of silently miscoding it. Pinned a deterministic real-libaom-av1 fixture (gradients + its own seed=, -threads 1/-row-mt 0/no tiling -- cpu-used 8's RD search is not otherwise stable run-to-run on this box) with CDEF disabled, and hardened the report-only E2E test into a pixel-exact assertion against ffmpeg's own decode of the identical bytes for that fixture. CfL (this round's other target) stays refused: implementing it needs libaom's cfl.c ported (subsample+average+alpha scale, spec 5.11.45/7.11.5) plus new cfl_sign/cfl_alpha CDFs, out of this round's remaining budget -- left as a named gap, not attempted half-done.
feat(av1): decode ADST_ADST/ADST_DCT/DCT_ADST/IDTX intra transformsAhmet Kaan Gümüş · a170052
feat(av1): decode ADST_ADST/ADST_DCT/DCT_ADST/IDTX intra transforms Ports av1_iadst4/8/16 and av1_iidentity4/8/16/32 from libaom's own av1_inv_txfm1d.c (stage-for-stage, not hand-derived), wires TxType through read_coeffs -> dequant_and_inverse_typed, and lifts the DCT_DCT-only refusal for TX_SET_INTRA_2's five members. Axis convention (row=htx_tab, col=vtx_tab) read directly off libaom's av1_inv_txfm2d.c tables and gated by an asymmetric-input test. Reference vectors for the 1D ports came from a C probe linked against libaom's own build/decoder-debug/libaom.a, not memory.
feat(av1dec): public decode_stream OBU walker, bench decode row, NEARMV liftAhmet Kaan Gümüş · 16b0ce0
feat(av1dec): public decode_stream OBU walker, bench decode row, NEARMV lift decode_stream(&[u8]) walks a raw AV1 stream via ec-av1-syntax's Av1Parser, extracts each Frame OBU's header + tile payload and dispatches to the existing decode_key_frame_tile/decode_inter_frame_tile, threading a single-slot DPB -- the first real entry point that does not need Encoded's pub(crate) fields. ec-bench's av1 row now times decode_stream instead of reporting "no decoder present". decode_inter_block also reconstructs NEARMV (mvstack already carries the second stack candidate), tested by hand-driving a symbol stream since this crate's own encoder never chooses that mode.