edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-maskcomp r1 report
VERDICT: PARTIAL -- entropy-exact syntax ported and gated; wedge/diffwtd mask blend (prediction) is NOT ported, refused by name (charter's hard-rule fallback: mergeable r1 progress).
What landed
crates/ec-av1/src/cdf.rs:COMPOUND_TYPE(default_compound_type_cdf, 22xBLOCK_SIZES_ALL) andWEDGE_IDX(default_wedge_idx_cdf, 22x16-ary) tables, transcribed value-for-value from/tmp/libaom-src/av1/common/entropymode.c.crates/ec-av1/src/cdf_state.rs: 4-site CDF wiring (default table already above;Cdfsstruct fieldscompound_type/wedge_idx;Cdfs::newinit;reset_counts-- per memorycdf-counter-not-reset, all 4 sites hit this round).crates/ec-av1/src/decode.rs: at bothcomp_group_idx == 1refusal sites (decode_inter_block's 16x16/32x32 leaf,decode_inter_block8's 8x8 leaf), replaced the bare refusal with the real syntax port:compound_typesymbol (cdfs.compound_type[bsize], alphabet never collapses at this decoder's square 8x8/16x16/32x32 leaves --av1_is_wedge_used/av1_wedge_params_lookuphaswedge_types > 0for bsize indices 3/6/9), then eitherwedge_index(16-arycdfs.wedge_idx[bsize]) +wedge_sign(literal bit) forCOMPOUND_WEDGE, ormask_type(literal bit,MAX_DIFFWTD_MASK_BITS == 1) forCOMPOUND_DIFFWTD-- then still refuses (mask blend unbuilt), now naming the syntax as consumed. NewMASKED_COMPOUND_HITSatomic (mirrorsINTERINTRA_HITS/WARP_SELECTED_HITS) counts real syntax-consumption hits.crates/ec-av1/src/stream.rs: new gatea_real_aomenc_stream_with_masked_compound_decodes_pixel_exact, cloned from the interintra gate with--enable-masked-comp=1 --enable-dist-wtd-comp=1added (warp/obmc/interintra flags kept as-is). Because the blend is unported, the masked-compound refusal is EXPECTED this round (not forbidden like the interintra gate treats its own capability) -- only OTHER named refusals (screen content tools) skip a seed silently;masked_compound_hits() > 0is asserted so the gate proves the new syntax actually fired and did not desync the rest of the stream (23-49/... pixel-exact matches every run, zero pixel mismatches observed).
Scope item 3 (grid/neighbour sweep)
Not applicable this round: comp_group_idx == 1 always hits return Err(...) before reaching record_compound_ctx/the compound_ctx = Some(...) assignment on both leaves, so no masked-compound block's own bit is ever recorded into Neighbours yet (same as before this round -- neighbour propagation only matters once the block actually completes). Revisit once the blend lands and the function stops early-returning.
Evidence
cargo check -p ec-av1 --release: clean (only pre-existing missing-doc warnings).- New gate, single run (n=80, EC_MASKCOMP_GATE_ATTEMPTS overridable):
30 other-capability refusals, 1 expected masked-compound refusal (r1: blend unported), 49 pixel-exact matches out of 80, masked_compound_hits=1--ok. - Full
cargo test -p ec-av1 --release --lib: 218 passed, 0 failed, 17 ignored (before the last gate-attempts bump; re-ran the new gate alone afterward, green) -- all 11 existing pinned bit-exact regression tests unaffected. - KNOWN FLAKE (not a decode bug): at
n_attempts=40the new gate hitmasked_compound_hits() == 0once in ~5 runs --allow_screen_content_tools(aomenc's own nondeterministic cpu-used=0 RD choice on synthetic gradients content) ate 13-16 of the 40 seeds and the remainder happened to never pickcomp_group_idx == 1. This is the documentedgate-recipe-confound/never-fired-gatesampling class (memory), not a pixel mismatch and not a desync -- every attempt across every run that DID reach a real block decoded either pixel-exact or hit the named masked-compound refusal cleanly, never a wrong-pixel or panic-outside-the-hits-assert failure. Mitigation landed: bumped defaultn_attempts40->80 (halves the zero-hits probability, does not eliminate it).EC_MASKCOMP_GATE_ATTEMPTS=200for a more robust one-off run if this flakes in CI.
Deferred
- deferred: wedge/diffwtd mask-based blend prediction (reconinter.c
av1_make_masked_inter_predictor/build_compound_diffwtd_mask/wedge master-mask tables + chroma subsampling) -- explicitly out of r1 per the charter's hard-rule fallback; unblocks by porting the wedge codebook tables (wedge_codebook_16_*,wedge_signflip_lookup,wedge_masks) andbuild_compound_diffwtd_mask's clamp-38..64 shape, then flipping the two refusal sites'return Errto build+apply the mask and forbidding the refusal in the gate (matching how the interintra gate forbids its own non-wedge refusal). - deferred: gate zero-hits flake fully eliminated -- unblocks by either a higher-yield encoder recipe (force
comp_group_idxmore reliably, e.g. explicit two-reference synthetic content with strong local motion boundaries) or acceptingEC_MASKCOMP_GATE_ATTEMPTSas a CI-tunable knob.
Commit
wip(av1): consume compound_type/wedge_idx/wedge_sign/mask_type on the masked-compound path (comp_group_idx==1), blend still refused on branch lane-maskcomp.