forge
Explore
Log in

Don't you dare go Hollow

Suppress the interp-filter read for WARPED_CAUSAL blocks

Browse files at this commit

de817605a320cb0e1fd072195a2a0498ad68293aAhmet Kaan GümüşParent: 385e0d9
  • fix
    • suppress the interp-filter read for WARPED_CAUSAL blocks
Show full message
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.rsmodified+7 -1
@@ -5689,6 +5689,11 @@ fn decode_inter_block(
5689 // fallback here since this decoder's global motion is always5689 // fallback here since this decoder's global motion is always
5690 // IDENTITY).5690 // IDENTITY).
5691 let mut warp_params: Option<crate::warp::WarpParams> = None;5691 let mut warp_params: Option<crate::warp::WarpParams> = None;
5692+ // Tracks the SYMBOL value, not projection validity: libaom's
5693+ // `av1_is_interp_needed` suppresses the interp-filter read for
5694+ // `motion_mode == WARPED_CAUSAL` even when the projection later
5695+ // falls back to translation.
5696+ let mut warped_selected = false;
5692 if motion_mode_eligible {5697 if motion_mode_eligible {
5693 // `default_obmc_cdf`'s own index: square bsize 8/16/32/64 -> 0/1/2/3.5698 // `default_obmc_cdf`'s own index: square bsize 8/16/32/64 -> 0/1/2/3.
5694 let bsize_idx = (side.trailing_zeros() - 3) as usize;5699 let bsize_idx = (side.trailing_zeros() - 3) as usize;
@@ -5706,6 +5711,7 @@ fn decode_inter_block(
5706 OBMC_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);5711 OBMC_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
5707 }5712 }
5708 _ => {5713 _ => {
5714+ warped_selected = true;
5709 WARP_SELECTED_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);5715 WARP_SELECTED_HITS.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
5710 let mut samples = find_samples(5716 let mut samples = find_samples(
5711 grid,5717 grid,
@@ -5791,7 +5797,7 @@ fn decode_inter_block(
5791 cdfs,5797 cdfs,
5792 interp_fixed,5798 interp_fixed,
5793 enable_dual_filter,5799 enable_dual_filter,
5794- is_globalmv,5800+ is_globalmv || warped_selected,
5795 above_filter_ctx,5801 above_filter_ctx,
5796 left_filter_ctx,5802 left_filter_ctx,
5797 false,5803 false,