edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-maskcomp r2 report
VERDICT: MERGEABLE PARTIAL -- DIFFWTD masked-compound blend ported and gated (hard assert, forbidden refusal, 8/8 hammer green, no pixel mismatches); wedge blend NOT ported, still refused by name (charter's mergeable-partial fallback: "land DIFFWTD alone").
What landed
crates/ec-av1/src/mc.rs:diffwtd_mask(build_compound_diffwtd_mask, reconinter.c) andblend_masked_compound(aom_lowbd_blend_a64_d16_mask_c, blend_a64_mask.c), both algebraically re-derived onto this crate's unbiasedi32predict_compound_intermediatedomain instead of libaom's biased CONV_BUF representation -- proved on paper (doc comments) that libaom'sround_offsetbias cancels exactly in both functions (abs(src0-src1)for the mask,m + (64-m) == 64for the blend weight sum), so no offset bookkeeping is needed on our side.round = 2*FILTER_BITS - round_0 - round_1 + (bd-8)reduces to the crate's existingINTER_POST_ROUND(4) for 8-bit content, confirmed against the crate's ownINTER_ROUND_0/INTER_ROUND_1_COMPOUNDconstants (3/7) rather than hand-copied.crates/ec-av1/src/decode.rs: bothcomp_group_idx == 1sites (decode_inter_block's 16x16/32x32 leaf,decode_inter_block8's 8x8 leaf) now split oncompound_type:COMPOUND_WEDGE(compound_type == 0) still refuses by name (wedge mask codebook out of scope this round);COMPOUND_DIFFWTD(compound_type == 1) readsmask_typeand falls through to build+apply the real blend instead of erroring. Real bug fixed while wiring this in:compound_idx(the distance-weighted-average symbol) was being read unconditionally on!skip_mode && enable_jnt_comp, missing libaom'scomp_group_idx == 0outer gate (decodemv.c:1606) -- dead code before this round (the masked path always errored earlier so it never executed withcomp_group_idx == 1in practice), now gated correctly at both sites.crates/ec-av1/src/stream.rs:a_real_aomenc_stream_with_masked_compound_decodes_pixel_exactflipped from r1's soft-skip/expected-refusal shape to r2's hard shape:masked_compound_hits() > 0is now a hardassert!(was a soft-skip), aCOMPOUND_DIFFWTDrefusal is now FORBIDDEN (asserted against, matching how the interintra gate treats its own ported capability), and aCOMPOUND_WEDGErefusal is still counted as expected/unasserted (r2 scope boundary).
Verification
cargo check -p ec-av1 --release: clean (only pre-existing missing-doc warnings, same set as before this round).- Gate
a_real_aomenc_stream_with_masked_compound_decodes_pixel_exact, hammered 8/8 (freshEC_AV1_GATE_DUMPself-pin path per run,/tmp/claude-1000/mc-flake/mc-flake-{1..8}.obu): all 8 green,masked_compound_hitsin {2,3,3,3,4,3,5,3} per run (never zero), zeroCOMPOUND_WEDGErefusals fired in any run (content never picked wedge for this synthetic-gradients recipe, so the wedge-still-refuses path is untested live this round -- syntax-level only, per r1), zero pixel mismatches across all 80-attempt runs x 8 (23-30 other-capability refusals[screen-content-tools RD flake, pre-existing/documented],50-64 pixel-exact matchesper run). cargo test -p ec-av1 --release --lib(full scoped suite): 220 passed, 0 failed, 17 ignored, finished in 140.58s -- includes all pre-existing pinned bit-exact regression tests, unaffected.
Deferred
- deferred: wedge mask codebook (
av1_wedge_params_lookup+init_wedge_master_masks/init_wedge_masks, reconinter.c) -- explicitly out of r2 per the charter's mergeable-partial fallback ("DIFFWTD alone... is mergeable; an unverified wedge table is not"). Unblocks by transcribingwedge_master_oblique_even/odd/wedge_master_vertical+wedge_codebook_16_*+wedge_signflip_lookup, building the 64x64 master masks and cropping/flipping perwedge_index/wedge_sign, verifying a handful of mask rows against a live C-side printf dump (per charter, not a hand transcription unchecked), then flipping theCOMPOUND_WEDGErefusal the same way this round flippedCOMPOUND_DIFFWTD. - deferred: a live gate run that actually exercises the
COMPOUND_WEDGE-still-refuses path (to prove the r2 gate's ownassert!(msg.contains("COMPOUND_WEDGE"))line is reachable, not just syntactically present) -- unblocks by a higher wedge-yield encoder recipe (aomenc's cpu-used=0 RD never picked wedge over diffwtd/plain-average in any of this round's 8x80 = 640 attempts).
Commit
feat(av1): port the DIFFWTD masked-compound blend (comp_group_idx==1), wedge still refused on
branch lane-maskcomp2.