forge
Explore
Log in

Don't you dare go Hollow

Suppress the interp-filter read for skip_mode compound blocks

Browse files at this commit

497de2d79bf4cce12da3fd7858e666aa939ed839Ahmet Kaan GümüşParent: 8d5c79f
  • fix
    • suppress the interp-filter read for skip_mode compound blocks
Show full message
fix(av1): suppress the interp-filter read for skip_mode compound blocks

Same conditional-read contract as the WARPED_CAUSAL fix one commit back:
av1_is_interp_needed==0 for skip_mode, libaom derives Regular. Our compound
path read 1-2 switchable_interp symbols on every skip_mode block; range
ladder on pinned warp-flake-7.obu decode-16 diverged inside its B01
skip_mode block (part-read rng 45276 exact, next part 46380 vs 44416).
Fixes pinned warp-flake-7 (frame 15 luma); original warp pin stays green.
Also: part32_pre range trace under EC_AV1_TRACE (inert).

class: symbol-consumption-gap (conditional-read side).
crates/ec-av1/src/decode.rsmodified+13 -1
@@ -5309,12 +5309,16 @@ fn decode_inter_block(
5309 // (lane-av1blend r5) from its old position ahead of those reads,5309 // (lane-av1blend r5) from its old position ahead of those reads,
5310 // which stole their bits for a Switchable-filter compound block5310 // which stole their bits for a Switchable-filter compound block
5311 // and desynced every symbol read after it in the tile.5311 // and desynced every symbol read after it in the tile.
5312+ // `av1_is_interp_needed` is also 0 for `skip_mode` blocks: the
5313+ // filter is derived (Regular), never read -- same
5314+ // conditional-read contract as the WARPED_CAUSAL suppression on
5315+ // the single-ref path below.
5312 let (h_filter, v_filter, resolved_filter) = resolve_interp_filter(5316 let (h_filter, v_filter, resolved_filter) = resolve_interp_filter(
5313 dec,5317 dec,
5314 cdfs,5318 cdfs,
5315 interp_fixed,5319 interp_fixed,
5316 enable_dual_filter,5320 enable_dual_filter,
5317- is_globalmv,5321+ is_globalmv || skip_mode,
5318 above_filter_ctx,5322 above_filter_ctx,
5319 left_filter_ctx,5323 left_filter_ctx,
5320 true,5324 true,
@@ -7367,6 +7371,14 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs(
7367 has_half(r32 * BLOCK_MI, BLOCK_MI, mi_rows),7371 has_half(r32 * BLOCK_MI, BLOCK_MI, mi_rows),
7368 );7372 );
7369 let part32 = if has_cols32 && has_rows32 {7373 let part32 = if has_cols32 && has_rows32 {
7374+ if std::env::var_os("EC_AV1_TRACE").is_some() {
7375+ eprintln!(
7376+ "TRACE part32_pre mi=({},{}) rng={}",
7377+ r32 * BLOCK_MI,
7378+ c32 * BLOCK_MI,
7379+ dec.debug_state().0
7380+ );
7381+ }
7370 let p = dec.symbol(&mut cdfs.partition_w32[ctx32]);7382 let p = dec.symbol(&mut cdfs.partition_w32[ctx32]);
7371 if std::env::var_os("EC_AV1_TRACE").is_some() {7383 if std::env::var_os("EC_AV1_TRACE").is_some() {
7372 eprintln!(7384 eprintln!(