diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index 0d33199b..3dc1d6d2 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -12395,6 +12395,12 @@ fn decode_inter_block( // per-frame value (spec 5.9.2: coded per frame only when // `seq_force_integer_mv == SELECT_INTEGER_MV`, threaded from // `FrameHeader::force_integer_mv`). + // libaom `av1_is_scaled` is `x_scale_fp != REF_NO_SCALE || + // y_scale_fp != REF_NO_SCALE`; the y half is unreachable here + // because a reference whose height differs from this frame's + // true size is refused before any tile decodes ("a reference + // picture whose height does not match this frame's own true + // size", ~14681). Whoever lifts that refusal adds the y term. let ref_is_scaled = mc::scale_factor(py_ref.width, frame_width) != mc::REF_NO_SCALE; let proj_ok = num_proj_ref( diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 3927809a..7e1d560a 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -8171,6 +8171,13 @@ mod tests { for cq in [32u32, 45, 55] { for step in [4u32, 8] { attempts += 1; + // lane-fimv r1: per-attempt snapshots. The aggregate + // assertions below are satisfied by a single lucky cq/step + // cell; these prove EVERY attempt that decoded and + // pixel-compared really carried the header state and the + // forced alphabet under test (class gate-blind-to-feature). + let attempt_fimv_before = crate::decode::fimv_frame_hits(); + let attempt_alphabet_before = crate::decode::fimv_alphabet_hits(); let duration = frame_count as f64 / 25.0; // Flat screen-content tiles with hard edges, translating by a // whole number of pixels per frame: static enough for @@ -8306,6 +8313,19 @@ mod tests { assert_eq!(got.u, want.u, "{name} frame {i} U vs ffmpeg (cq {cq} step {step})"); assert_eq!(got.v, want.v, "{name} frame {i} V vs ffmpeg (cq {cq} step {step})"); } + assert!( + crate::decode::fimv_frame_hits() > attempt_fimv_before, + "{name} (cq {cq} step {step}): decoded and compared all \ + frames but no frame header had force_integer_mv=1 -- \ + this attempt is vacuous" + ); + assert!( + crate::decode::fimv_alphabet_hits() > attempt_alphabet_before, + "{name} (cq {cq} step {step}): no block was forced onto the \ + 2-symbol obmc alphabet by force_integer_mv while \ + allow_warped_motion=1 and num_proj_ref>=1 -- this attempt \ + is vacuous" + ); matched += 1; } }