From de817605a320cb0e1fd072195a2a0498ad68293a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 28 Aug 2026 21:03:03 +0300 Subject: [PATCH] fix(av1): suppress the interp-filter read for WARPED_CAUSAL blocks warp r5e ROOT CAUSE of the pinned mismatch chain (r3-r5e): libaom's av1_is_interp_needed derives the filter (Regular) instead of reading switchable_interp symbols when motion_mode == WARPED_CAUSAL -- keyed on the SYMBOL value, not projection validity. Our single-ref path only suppressed for GLOBALMV, so a warped block consumed 1-2 extra symbols and every read after it drifted: the hidden no-show altref (decode-order 13, display 23) desynced at its last 32x32 (phantom HORZ_B partition value=5 where libaom reads NONE), corrupting the stored ALTREF; shown frames 13+ then inherited the garbage through zero-mv skip compound copies -- the pin's 'frame 13 luma' failure (class gate-blind-to-hidden-frames, exactly). Localized with libaom examples/inspect ground truth (display frame 13 quad (1,1) = 32x32 NEAREST_NEARESTMV zero-mv skip; hidden altref = four 32x32s incl. NEWMV WARPED_CAUSAL skip at mi(8,0)) vs our EC_AV1_TRACE: B00/B01/B10 symbol-exact, divergence at B11's partition_w32. EVIDENCE: pinned_warp_stream_decodes_pixel_exact 24/24 pixel-exact vs ffmpeg, green twice, warp_selected_hits 0->1; ec-av1 lib suite 217 passed 0 failed. class: symbol-consumption-gap (conditional-read side: a symbol READ that the reference DERIVES is the same drift as an unread bit). --- crates/ec-av1/src/decode.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index 728b454b..edcfc491 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -5689,6 +5689,11 @@ fn decode_inter_block( // fallback here since this decoder's global motion is always // IDENTITY). let mut warp_params: Option = None; + // Tracks the SYMBOL value, not projection validity: libaom's + // `av1_is_interp_needed` suppresses the interp-filter read for + // `motion_mode == WARPED_CAUSAL` even when the projection later + // falls back to translation. + let mut warped_selected = false; if motion_mode_eligible { // `default_obmc_cdf`'s own index: square bsize 8/16/32/64 -> 0/1/2/3. let bsize_idx = (side.trailing_zeros() - 3) as usize; @@ -5706,6 +5711,7 @@ fn decode_inter_block( OBMC_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed); } _ => { + warped_selected = true; WARP_SELECTED_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed); let mut samples = find_samples( grid, @@ -5791,7 +5797,7 @@ fn decode_inter_block( cdfs, interp_fixed, enable_dual_filter, - is_globalmv, + is_globalmv || warped_selected, above_filter_ctx, left_filter_ctx, false,