Suppress the interp-filter read for skip_mode compound blocks
Browse files at this commit497de2d79bf4cce12da3fd7858e666aa939ed839Parent: 8d5c79f- fix
- suppress the interp-filter read for skip_mode compound blocks
1 changed file +13 -1
- crates/ec-av1/src/decode.rs +13 -1
crates/ec-av1/src/decode.rsmodified+13 -1
| @@ -5309,12 +5309,16 @@ fn decode_inter_block( | ||
| 5309 | 5309 | // (lane-av1blend r5) from its old position ahead of those reads, |
| 5310 | 5310 | // which stole their bits for a Switchable-filter compound block |
| 5311 | 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 | 5316 | let (h_filter, v_filter, resolved_filter) = resolve_interp_filter( |
| 5313 | 5317 | dec, |
| 5314 | 5318 | cdfs, |
| 5315 | 5319 | interp_fixed, |
| 5316 | 5320 | enable_dual_filter, |
| 5317 | - is_globalmv, | |
| 5321 | + is_globalmv || skip_mode, | |
| 5318 | 5322 | above_filter_ctx, |
| 5319 | 5323 | left_filter_ctx, |
| 5320 | 5324 | true, |
| @@ -7367,6 +7371,14 @@ pub(crate) fn decode_inter_frame_tile_with_cdfs( | ||
| 7367 | 7371 | has_half(r32 * BLOCK_MI, BLOCK_MI, mi_rows), |
| 7368 | 7372 | ); |
| 7369 | 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 | 7382 | let p = dec.symbol(&mut cdfs.partition_w32[ctx32]); |
| 7371 | 7383 | if std::env::var_os("EC_AV1_TRACE").is_some() { |
| 7372 | 7384 | eprintln!( |