forge
Explore
Log in

Don't you dare go Hollow

Clear apply_deblock for the GOLDEN residue, isolate to MC

Browse files at this commit

c672fef55dba8e20dc5de0efbba75f0b0bda07c9Ahmet Kaan GümüşParent: 5dc880b
  • fix
    • clear apply_deblock for the GOLDEN residue, isolate to MC
Show full message
fix(av1): clear apply_deblock for the GOLDEN residue, isolate to MC

Bisected the pinned 3-pixel GOLDEN-live residue against a patched
aomdec's pre/post-loop-filter frame dumps: our own decoder's luma is
already wrong at those exact 3 pixels before apply_deblock runs, byte-
identical to the loop filter's post-filter mismatch -- the wide
deblock kernel (round 6's suspect) is cleared. All 3 pixels sit inside
one skip=1 32x32 GOLDEN_FRAME NEWMV block, mv=(-7,-7) 1/8-pel (both
axes fraction 2/16), REGULAR/REGULAR resolved filter -- pure MC output,
no residual. The golden reference bytes that block reads are already
proven bit-exact (frames 0-2 match ffmpeg), so the defect is inside
mc::predict_with_filters's 2D convolution or filter-symbol resolution
for this exact combination, not yet isolated further this round.
Re-masked with an updated round-7 comment recording the bisect.
crates/ec-av1/src/decode.rsmodified+29 -10
@@ -3764,20 +3764,39 @@ fn decode_inter_block(
37643764 // computed level 3) and a LAST_FRAME block (ref_idx 1, level 4) --
37653765 // `edge_params`/`lf_level`'s own math checks out against spec 7.14.4
37663766 // by hand (`base=4`, `ref_deltas[4]=-1`, `mode_deltas=[0,0]` all
3767- // match the default table), so the residue is unproven: either a
3768- // narrow rounding/flatness-threshold defect in the wide deblock
3769- // kernel (`filter8`/`filter14`) that any GOLDEN/LAST level split
3770- // happens to be the first content to reach, or a golden-side pixel
3771- // one narrow filter tap upstream of the edge. Refused again pending
3772- // that isolation -- do not re-litigate the `lf_level` arithmetic
3773- // itself, it was checked by hand this round.
3767+ // match the default table).
3768+ //
3769+ // round 7 (lane-av1golden5): un-masked again, bisected with a
3770+ // patched aomdec (`EC_AV1_PREFILT_DUMP`/`EC_AV1_POSTFILT_DUMP` env
3771+ // dumps already in `/tmp/libaom-src`'s `decodeframe.c`) against the
3772+ // same pin. Dumped this decoder's own pre-`apply_deblock` luma rows
3773+ // 30-36 for frame 3 and diffed them against aomdec's pre-filter
3774+ // dump for the same bytes: the exact same 3 pixels (row32 col37,
3775+ // row33 col39, row33 col54) already mismatch BEFORE the loop filter
3776+ // runs, by the exact same +-1 the final assertion sees --
3777+ // `apply_deblock` itself is now CLEARED, both this round's kernel
3778+ // hypothesis and round 6's are ruled out. All 3 pixels are inside
3779+ // the single `GOLDEN_FRAME` 32x32 NEWMV block at (px=32,py=32),
3780+ // mv=(-7,-7) 1/8-pel (x_q4=y_q4=498, both axes fraction 2/16),
3781+ // `skip=1` (no residual, so the mismatch is pure MC output),
3782+ // REGULAR/REGULAR resolved filter, `enable_dual_filter=true`. The
3783+ // reference plane bytes this block reads (dumped, rows 28-37) match
3784+ // the picture the outer per-frame ffmpeg assertion already proved
3785+ // bit-exact for frames 0-2, so it is not a stale/wrong golden
3786+ // picture either -- the divergence is inside
3787+ // `mc::predict_with_filters`'s own 2D convolution or the
3788+ // switchable-filter symbol resolution for this exact (dual axis,
3789+ // non-globalmv, GOLDEN_FRAME) combination, unproven past that.
3790+ // Re-masked pending that isolation -- do not re-litigate
3791+ // `apply_deblock`/`lf_level` again, both are cleared for this pin.
37743792 let (py_ref, pu_ref, pv_ref) = match ref_frame {
37753793 LAST_FRAME => (ref_y, ref_u, ref_v),
37763794 _ => {
37773795 return Err(unsupported(
3778- "a reference frame other than LAST_FRAME (round 6: GOLDEN_FRAME's decode \
3779- path exists but is masked -- a narrow deblock-edge residue at GOLDEN/LAST \
3780- boundaries keeps real GOLDEN streams from pixel-exact)",
3796+ "a reference frame other than LAST_FRAME (round 7: GOLDEN_FRAME's decode \
3797+ path exists but is masked -- a narrow +-1 MC residue on a dual-axis \
3798+ subpel GOLDEN block, isolated to pre-deblock this round, keeps real \
3799+ GOLDEN streams from pixel-exact)",
37813800 ));
37823801 }
37833802 };