edith_codecs
Clone
https://git.tahinli.com/Tahinli/edith_codecs.git
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
lane-av1422mi24 — the t422 inter ladder continued from mi(24,60): the
square/rect block chroma context gathers routed through the 4:2:2
every-second-above-cell sampling; frame-1 entropy now in FULL rng lockstep
and ALL frames' LUMA decodes exact; the residual is a chroma pixel-level
class (entropy-identical), first site named below
Outcome
- Reproduction at HEAD 95408ed3. The ctxgather lane's named residual reproduced exactly: frame 0 exact at prefilt/postdeb/postcdef; frame 1 prefilt first diffs Y (96,240) = mi(24,60), U chroma (2,44), V (0,44).
- The mi(24,60) divergence localized (rng-anchored lockstep,
EC_TRACE_PART + EC_AV1_TRACE pairing vs the oracle's EC_PART). 293
partition reads matched rng-for-rng; the walk first misaligned at the
NEXT 16x16 read (mi(24,60) pre-read rng 52112 vs oracle 64776). Window
diff (EC_ISTEP / EC_COEFF / EC_COEFF_STEP) pinned the first divergent
symbol: the U dc_sign read of the mi(24,56) 16x16 inter block — ours
dc_sign_cdf[0], oracle row 1. Every level read around it matched rng-for-rng: the coefficient scan placement is CORRECT (the codebase's row-major SCAN_8X16/SCAN_16X8 pair and libaom's column-major default_scan_8x16/default_scan_16x8 enumerate identical (row, col) orders; verified cell by cell against the oracle source). - Root cause, class
per-mi chroma context gather(the ctxgather lane's own rule, three more sites). At ss (1,0) one chroma 4-px column spans TWO luma mi columns; the plain [Neighbours::around_mi_rect]/[around_mi] walk samples the above span per luma mi and counts every chroma column's whole-unit dc sign twice, sodc_sign_ctx's vote sum lands one sign row off. Three block classes still gathered per-mi at ss (1,0):decode_inter_block's blockaround— single-TU arm AND the var-tx/mu arm (square blocks: the mi(24,56) 16x16; rect_tu strips: 16x8 pieces), previously only the strip-pairaround_cwas routed;decode_rect_split'schroma_tiledarm — the else branch kept the plain walk for every non-(4,32) unit, so a 16x8 intra-in-inter strip's (8, 8) chroma unit (mi(26,60), the frame-1 HORZ pair's second piece) read its U dc_sign one row high;decode_rect_split's unsplit single-TU chroma arm (line ~10863) anddecode_intrabc_rect's two chroma gathers — same class, fixed under the same ss (1,0) gate. The intrabc arms are UNREACHABLE on the pinned fixture (intrabc_hits: 0): verified by gating only, not by a 4:2:2-intrabc witness (per the intrabc inventory discipline the owning lane should witness them). Every edit is gatedss_x == 1 && ss_y == 0with the non-4:2:2 arm the original expression verbatim.
- Diagnostic parity (Main's request): [
around_mi_422_chroma] now prints the same env-gatedEC_DCDUMP422blockaround_mi_rectprints (sampled above cells), so a rerouted 4:2:2 chroma gather stays visible underEC_DCDUMP=1. - Oracle ground truth used: the instrumented aomdec's
EC_DBGCTXchroma context dump (cells + the built binary'sdc_sign_contextstable, extracted from the binary: signum semantics {neg:1, 0:0, pos:2}, matching ourdc_sign_ctx). The src tree's table literal differs from the built one; the binary is authoritative.
Verification
- Partition lockstep, frame 1, post-fix (decode_probe +
EC_TRACE_PART vs oracle EC_PART, 2-frame fixture): 300/300 oracle
partition reads match rng-for-rng in walk order (ours consumes 4 extra
gathered
EC_PARTGprints the oracle does not emit) — no rng mismatch anywhere in the frame. - t422 inter ladder re-measured (decode_probe +
EC_AV1_{PREFILT,POSTDEBLOCK,POSTCDEF}_DUMP vs the oracle stage dumps,
our dumps /tmp/i422/av1422mi24/*{prefilt,postdeb,postcdef}*8):
- frame 0: exact at all three stages;
- LUMA: 0 diffs on EVERY frame 1–15 at prefilt AND postdeb (frame 1 was 2146 diffs pre-lane; frame 3 was 25163). Frame 15 postcdef shows Y=5059 — a CDEF knock-on: CDEF decisions read the (still wrong) chroma, not a luma defect (postdeb f15 Y=0);
- chroma: frame 1 U 4346 → 4175, V 4974 → 4636; frames 3–14 chroma improved on every plane (e.g. f3 U 12610 → 4363); first U diff moved to chroma (4,44).
- Frame exactness claimed ONLY where measured 0: frame 0 all stages; frames 1–15 LUMA at prefilt/postdeb. Frames 1+ chroma are NOT claimed.
- The residual, site named (next lane's first diff). With entropy in
full lockstep (luma exact everywhere proves it), the remaining chroma
diffs are a PIXEL-level class, entropy-identical: first frame-1 diffs
U chroma (4,44) → luma (88,8) — the 8x8 inter leaf mi(0,22)'s chroma:
U rows 0..3 exact, rows 4..7 wrong; V col 44,45 rows 0..15. The oracle
reads NO U residual there (no
EC_COEFF plane=1at chroma cell (11,0)), so this is a chroma prediction/reconstruction defect for sub-8 4:2:2 leaves (chroma422_sub8/sub8_inter_splitterritory), not a context-gather defect. CDEF-stage luma diffs on f15 are downstream of it. - 4:2:0/4:4:4 identity: every edit is ss (1,0)-gated with the other
arm verbatim; the lossless gate battery stays green — 8 passed 0 failed
including
a_lossless_libaom_key_frame_decodes_sample_exact,a_lossless_libaom_inter_frame_decodes_sample_exact,a_real_aomenc_mixed_lossless_segment_frame_decodes_sample_exact. cargo check -p ec-av1(target dir~/.cache/cargo-target-av1422mi24): 0 warnings, 0 errors.- The
EC_AV1_ALLOW_422_PROBEbypass was applied to stream.rs for the probe runs and REVERTED;git statusnames only decode.rs. - Charter note: the s2.obu mandelbrot re-run was DONE by Agent104 (still panics at decode.rs:3709, empty pred slice — bigblock lane's defect); dropped from this lane per Main.
State
- Commit on lane-av1-422mi24 (no push): the ss (1,0) chroma-gather fixes
in
crates/ec-av1/src/decode.rs+ this report. - Next stop named for the owning lane: the chroma pixel-level class — first site the frame-1 8x8 inter leaf mi(0,22)'s chroma (U rows 4..7, V rows 0..7, chroma cols 44..47), prediction/reconstruction for sub-8 4:2:2 leaves with entropy in lockstep; and the f15 postcdef CDEF knock-on disappears with it.