Commits
Commits on
00c1b3ff2d80d84fef71bb6208110dedbbd95fc4Filtered to crates/ec-av1/src/warp.rsClear filter2026-09-02
fix(av1): per-frame stage dumps + MC trace, and re-localise the 192x128 frame-2 mismatch to a 64x64 INTRA blockAhmet Kaan Gümüş · f866759
fix(av1): per-frame stage dumps + MC trace, and re-localise the 192x128 frame-2 mismatch to a 64x64 INTRA block EC_AV1_POSTDEBLOCK_DUMP/EC_AV1_POSTCDEF_DUMP wrote .f0 for every frame, so any per-frame filter-stage bisection silently compared the last decoded frame; they are now keyed on the decode-order picture index like the prefilt dump. EC_MC_TRACE prints every mc::predict_with_filters / predict_compound_intermediate / warp_affine call with its q4 position, block size, subpel fractions and kernels, placed before the whole-pel fast path, plus EC_IB at decode_inter_block entry and is_inter/skip on EC_MODE -- an absent MC call is now visible. With that: the 192x128 8-bit stream's frame-2 luma-only mismatch at px(128,64) is a 64x64 PARTITION_NONE INTRA block in an inter frame, not the inter NEWMV block the charter described (that mv belongs to frame 1's split superblock, which is exact). Zero MC calls for the block in either decoder; chroma bit-exact, so the 64-length luma transform is the suspect. Stream pinned as a fixture because its aomenc recipe does not reproduce it.
2026-09-01
feat(av1): per-reference GLOBAL warp on compound blocks (was silently translational)Ahmet Kaan Gümüş · e67ae7f
feat(av1): per-reference GLOBAL warp on compound blocks (was silently translational) decode_inter_block's compound branch predicted both taps through mc::predict_compound_intermediate; libaom runs av1_init_warp_params per reference, so each ref of a GLOBAL_GLOBALMV block under a ROTZOOM/AFFINE model is filtered through av1_warp_plane into the compound intermediate. No refusal named this -- silently wrong pixels. warp.rs: warp_affine split into warp_inner + store closure, hardcoded BD=8 replaced by crate::decode::bit_depth(), new warp_affine_compound (av1_highbd_warp_affine_c's is_compound branch, unbiased to match this crate's intermediate domain). mc.rs: diffwtd_mask's round was missing libaom's (bd - 8) term. New gate a_real_compound_global_warp_stream_decodes_pixel_exact: 6/6 pixel-exact, compound_warp_hits=37. 10-bit arm ignored, blocked by a pre-existing 10-bit compound MC defect (ablation in its doc comment).
2026-08-30
wip(hbd): 42 -> 5 errors -- mc/warp/obmc/interintra call sites widened, only encode.rs+motion.rs remainAhmet Kaan Gümüş · 04357c7Browse files
wip(hbd): r1's u16 widen in flight at the cap (does not compile; error count is the progress metric)Ahmet Kaan Gümüş · 31976a1Browse files
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.
fix(av1): gm_get_motion_vector block-centre -1 offset; root-cause seed-43 wedge mismatch to missing global-warp prediction path (not fixed)Ahmet Kaan Gümüş · 75017f1
fix(av1): gm_get_motion_vector block-centre -1 offset; root-cause seed-43 wedge mismatch to missing global-warp prediction path (not fixed) Root-caused lane-gm r2's interintra-wedge gate mismatch (seed 43, frame 1 luma) via a pinned/self-decoded-twice reproduction and a msac range-ladder comparison against a patched aomdec: entropy is in sync at the divergent block (rng=38664 both sides), and this decoder's gm_get_motion_vector computes the spec-correct mv once block_center_x/y's missing "- 1" is fixed (found by diffing against the real oracle's mv.h). The remaining gap is real but unfixed this round: libaom predicts every is_global_mv_block (ROTZOOM/AFFINE GLOBALMV, >=8x8) with the full per-pixel affine global-motion warp (reconinter.c's allow_warp / global_warp_allowed), independent of motion_mode; this decoder only builds a warp prediction for local WARPED_CAUSAL and falls back to translational MC for every other GLOBALMV block. Whole-frame global_motion != IDENTITY refusal in stream.rs stays in place.
feat(av1): gm_get_motion_vector port (spec 7.10.2.1)Ahmet Kaan Gümüş · 9f844b1
feat(av1): gm_get_motion_vector port (spec 7.10.2.1) Pure port of libaom's gm_get_motion_vector: IDENTITY->0, TRANSLATION's swapped-axis shift-by-13, ROTZOOM/AFFINE's block-centre projection + convert_to_trans_prec, and force_integer_mv's integer_mv_precision rounding. Unit-tested with hand-computed arithmetic in each test's own doc comment. Not yet wired to any decode site.
2026-08-28
wip(av1): affine warp estimation + filter ported, wired into leaf16 -- COMPILING WIPAhmet Kaan Gümüş · efe3e65
wip(av1): affine warp estimation + filter ported, wired into leaf16 -- COMPILING WIP lane-warp round 2, budget-capped stop. Step 0 (verify r1's alphabet- selection change) ran clean first: warp/obmc(x2)/deblocking gates all green on e886150 before touching anything -- no desync from r1's num_proj_ref-gated 3-symbol motion_mode_cdf read. Ported this round (new module crates/ec-av1/src/warp.rs): - av1_findSamples in full: decode.rs's num_proj_ref (count-only) replaced by find_samples, which now also records each sample's own (pts1, pts2) 1/8-pel coordinates (record_samples, mvref_common.c) -- num_proj_ref is now find_samples(..).len(), a pure refactor kept bit-identical (verified: both OBMC gates + the warp refuse-or-match gate still green after it). - av1_selectSamples: MV-diff threshold filter (thresh = clamp(max(bw,bh), 16, 112)), run only when num_proj_ref > 1, matching decodemv.c's own gate. - find_affine_int + av1_get_shear_params -> find_projection: the full least-squares affine fit (LS_SQUARE/LS_PRODUCT1/LS_PRODUCT2, the 64-bit divisor-resolution div_lut, get_mult_shift_diag/ndiag) plus the shear decomposition/validity check (alpha/beta/gamma/delta, WARP_PARAM_REDUCE_ BITS, is_affine_shear_allowed). Returns None on a singular fit or non-representable shear -- both spec fallback cases collapse to "use the block's own translational MV" at the call site, matching libaom's own wm_params.invalid handling (reconinter.c allow_warp: global warp is never the fallback here since this decoder's global motion is always IDENTITY). - av1_warp_affine_c: the 8x8-tile, two-pass 8-tap affine filter (av1_warped_filter, 193 rows, transcribed verbatim from warped_motion.c), 8-bit non-compound only (this decoder's warp arm only ever reaches a single-ref, non-skip-mode block, so conv_params->is_compound is always false on this path -- the compound/highbd branches are dropped). Wired into decode_inter_block (the 16x16+ leaf) only: motion_mode == 2 no longer refuses by name. It computes samples via find_samples + select_samples, calls find_projection, and when Some(params) overrides the block's already-computed translational-MV prediction (pred_y/u/v) with warp_affine's own output (luma subsampling 0/0, chroma 1/1, 4:2:0) before the OBMC blend check (mutually exclusive with motion_mode==1). When find_projection returns None, the existing translational-MV prediction is left untouched -- exactly the spec's own invalid-warp fallback. NOT ported/wired this round (steps 5-6 remaining): - decode_inter_block8 (the 8x8 leaf): STILL refuses motion_mode == 2 by name unconditionally -- warp.rs's functions are leaf16-only so far. - The a_real_aomenc_stream_with_warped_motion_refuses_or_matches gate (stream.rs ~3255, "gradients" lavfi content, default aomenc flags) still reads "40 named refusals, 0 pixel-exact matches out of 40" after this round's wiring -- unchanged from before. NOT diagnosed within budget whether that's because (a) the gate's own content/encoder flags never actually reach a WARPED_CAUSAL-coded block on this decoder's supported path (matches the documented never-fired-gate class: gradients content + default flags is a different recipe from the charter's own --auto-alt-ref=1 --lag-in-frames=16 --enable-fwd-kf=0 --enable-ref-frame-mvs=0), or (b) it does reach one and either find_projection legitimately returns None every time (falls back to translational, no visible difference), or hits some OTHER named refusal first (interintra, screen-content-tools, sub-16 partition -- all seen in the OBMC gate's own refusal list on identical content). WARP_SELECTED_HITS was not read back this round to disambiguate -- next round's first move. - Gate itself not flipped to require pixel-exact + no self-pin added (step 6) -- premature until the above is diagnosed with real fire evidence. cargo check -p ec-av1 --lib: clean, 0 errors. Verified green this round: both OBMC gates (a_real_aomenc_stream_with_obmc_decodes_pixel_exact + _obmc_8x8), a_real_aomenc_stream_with_warped_motion_refuses_or_matches (still legally refuse-or-match, unchanged pass/fail shape). Deblocking gate verified green at step 0 before any edit this round (unaffected by this round's changes -- warp.rs is dead code on that path). NEXT: read WARP_SELECTED_HITS after a run against the charter's own aomenc flags (--auto-alt-ref=1 --lag-in-frames=16 --enable-fwd-kf=0 --enable-ref-frame-mvs=0, dims mult of 64) to get a real fire count before touching leaf8 or the gate; wire decode_inter_block8 the same way find_samples/select_samples/find_projection/warp_affine already support (the bw4/bw/bh plumbing is generic, only the call site inside decode_inter_block8's own motion_mode match needs the same three-call sequence copied over).