forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

t900-r4.handoff.md5.8 KiBHistoryRawDownload

lane-t900 r4 handoff -- two reconstruction root causes closed; frame 1 is now a chroma-only +/-1 residue

Branch lane-t900, tip d068c94. Worktree edith_codecs-t900. CARGO_TARGET_DIR=$HOME/.cache/cargo-target-t900-b carried the release decode_probe this round. Reproduction still needs BOTH EC_INTRA128_IN_INTER=1 and EC_INTRA16X4_DECODE=1.

STEP 0 -- git cherry-pick 43e9909 (lane-midcut r1, rect interintra)

Clean, no conflicts (decode_probe.rs, decode.rs, stream.rs), commit 5d323a6. cargo build -p ec-av1 --release --example decode_probe clean.

Effect on the 2-frame 10-bit 1920x792 128-SB cut ~/.cache/inter128intra-tmp/t900_2.obu, decode-order compare (~/.cache/t900-tmp/cmp.sh, both decoders under EC_AV1_FINAL_DUMP):

f0 f1 differing bytes
r3 tip f9720de EXACT 114374
after 5d323a6 EXACT 1549
after d068c94 EXACT 258 (chroma only)

So the r3 "next residue" (mi(24,248) 32x16 skip NEARESTMV ref1=INTRA_FRAME, all 512 px off by -2) WAS the square-only interintra blend: it is gone.

ROOT CAUSE 2 (fixed, d068c94) -- edge-filter neighbours of the FIRST half

Neighbours::modes_above_left(r, c) (decode.rs:5677) derives its mi-exact lookup key from the coarse 16x16 cell: mi_r = r * 4, mi_c = c * 4. The rect intra-in-inter site (decode.rs:7668) called it for BOTH 8x16 halves of a PARTITION_VERT 16x16, so the second half asked for the neighbours of the first. libaom's above_mbmi/left_mbmi are the block's own (mi[-mi_stride]/mi[-1]), so get_intra_edge_filter_type (reconintra.c:974) came out 0 where libaom has 1, and every directional half whose real above/left neighbour was SMOOTH* filtered its edge at the wrong strength.

Witness, decode-order frame 1, block mi(104,234) = px(936,416), 8x16, mode 5 (D113_PRED) angle_delta -1 -> p_angle 110, tx 8x16:

  • aomdec EC_PRED ... ft=1, EC_PREDOUT sum=43066->41767 row0=325,321,316,...
  • ours OUR_PRED ... ft=0 sum=41742 row0=[325,320,316,...]
  • re-running the spec walk in python from the (exact) neighbours with filter type 1 reproduces 41767 exactly, with type 0 reproduces 41742.
  • the smoking gun (temporary EC_FT rung, removed): mi_r=104 mi_c=232 ... above=11 mie=(11,0) / mi_r=104 mi_c=234 ... above=0 coarse=(0,0) mie=(9,0) -- the mi-exact pair for the block's OWN mi is SMOOTH_PRED(9), the coarse-cell one is DC.
  • the above neighbours are the two 8x32 strips at mi(96,232) SMOOTH_H(11) and mi(96,234) SMOOTH(9) -- aomdec prints them as EC_PREDND (the non-directional early-return), which is why they are missing from an EC_PRED-only grep.

Fix: modes_above_left_mi(mi_r, mi_c, modes_above_left(r, c)) at decode.rs:7668 -- the same wrapping decode.rs:26106 and decode_leaf8 already use. Luma frame-1 residue 1269 px -> 0.

OUR_PRED now also prints ft= so the filter type can be diffed against aomdec's EC_PRED ... ft= directly.

SIBLING SITES NOT SWEPT (do this first next round)

modes_above_left(r, c) has 8 more callers: decode.rs 7813, 9656, 11178, 11839, 12162, 13059, 22499, 23664. 12162 already wraps with modes_above_left_mi(leaf_mi..); 13059 has leaf_mi in scope and does NOT -- same shape, sub-8 4x8/8x4 leaves. CAUTION: at 7813 and 13059 the pair also feeds the intra-mode CDF row, so changing it moves the ENTROPY stream -- re-run the ladder, not just the pixels.

CURRENT FIRST-BAD BLOCK (decode order) -- chroma only

Pre-loop-filter compare ~/.cache/t900-tmp/pf.sh (both under EC_AV1_PREFILT_DUMP16), analysis sb.py/px.py/reg.py in the same dir: f0 EXACT, f1 Y 0 px, U 98 px, V 62 px, deltas -2..+3, spread over 11 superblocks, no luma anywhere.

First in decode order: SB(0,5), first differing chroma sample (365,48) = luma px(730,96) => mi(24,182).

  • EC_MODE mi_row=24 mi_col=182 rng=64328 is_inter=1 skip=0 side=16, EC_MODE_VAL mode=14 (NEARMV) ref0=1 ref1=-1 mv0=(22,-44) stack=3 rng=64888; the block is 8x16 luma (mi cols 182..183) => 4x8 chroma, i.e. the w <= 4 narrow-kernel branch. motion_mode/interp were not captured for it this round.
  • Signature: luma bit-exact, chroma +/-1 (a few +/-2) scattered -- the memory class narrow-block-sharp-kernel (chroma-only +/-1..3 where the chroma width is 4).
  • NOT captured yet: an EC_PRED-style per-stage split for INTER blocks. The r4 EC_PRED capture covers intra prediction only (EC_PRED / EC_PREDND / EC_PREDOUT are all in reconintra.c); it showed the intra stage, not the inter one, and it is what closed root cause 2.

EXACT NEXT STEP

  1. mc.rs:413/418 already picks h_narrow/v_narrow on kern_w <= 4 / kern_h <= 4; libaom (av1_get_interp_filter_params_with_block_size) tests the X filter against w and the Y filter against h, REGULAR and SHARP both mapping to av1_interp_4tap[0] and SMOOTH to [1]. Check what kern_w/kern_h the CHROMA call passes for an 8x16 luma block (decode.rs ~30542 is the test helper; find the real chroma mc::predict call) -- if it passes the LUMA dims, every 4-wide chroma block uses the 8-tap.
  2. If that is not it, instrument the chroma convolve on both sides (aomdec av1_convolve_2d_sr_c / av1_highbd_...) and diff the intermediate row for mi(24,182) plane 1.
  3. Then STEP 1 of the r4 charter (the four 2 s cuts ~/.cache/rectres-tmp/t900/t5400/t6300/t8100.obu, both env switches, cmp.sh), STEP 2 (pin the witness fixture), STEP 3 (named gates + suite). NONE of those ran this round.

Artifacts

~/.cache/t900-tmp/: cmp.sh (final dumps), pf.sh (NEW, prefilter dumps), px.py (per-plane diff histogram), sb.py (per-superblock decode-order first-bad table), reg.py (row-by-row diff span), a5.pred/o6.pred (aomdec EC_PRED and our OUR_PRED, both frames), a4.mode/o4.mode (mode traces), pf_t900_2/, d_t900_2/.