forge
Explore
Log in

Don't you dare go Hollow

Intrabc_hits counts DV READS (a refused rect-strip block bumps it but is never reconstructed)

Browse files at this commit

b89dee040364ace8245196833c4cd743ab9090c4Ahmet Kaan GümüşParent: fe5d4c8
  • docs
    • intrabc_hits counts DV READS (a refused rect-strip block bumps it but is never reconstructed)
    • depth-parameterised recipe helper counts at both depths in the gate-coverage derivation
Show full message
docs(av1): intrabc_hits counts DV READS (a refused rect-strip block bumps it but is never reconstructed); depth-parameterised recipe helper counts at both depths in the gate-coverage derivation
crates/ec-av1/src/decode.rsmodified+4 -1
@@ -3583,7 +3583,10 @@ thread_local! {
3583 /// [`decode_block`] off the call stack (same idiom as [`PALETTE_PRED`],3583 /// [`decode_block`] off the call stack (same idiom as [`PALETTE_PRED`],
3584 /// which the alternative -- a tenth tuple member through every caller --3584 /// which the alternative -- a tenth tuple member through every caller --
3585 /// already avoids). Always `.take()`n by the block that reads it.3585 /// already avoids). Always `.take()`n by the block that reads it.
3586- /// How many blocks decoded `use_intrabc == 1` -- the gate's hit counter.3586+ /// How many blocks read `use_intrabc == 1` and took the DV path -- the
3587+ /// gate's hit counter. Bumped on the READ, before the rect-strip refusal
3588+ /// returns too, so it counts reads, not reconstructions (a refused block
3589+ /// is never reconstructed).
3587 static INTRABC_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };3590 static INTRABC_HITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
3588 }3591 }
3589 // The `tx_type` the last plane-0 [`read_plane`] actually coded, kept so3592 // The `tx_type` the last plane-0 [`read_plane`] actually coded, kept so
crates/ec-av1/src/gate_coverage.rsmodified+15 -4
@@ -50,9 +50,12 @@ const NEVER_EXERCISED: &[(&str, &str)] = &[
50 // spells `--enable-intrabc=1` and decodes three such 8-bit streams whole-50 // spells `--enable-intrabc=1` and decodes three such 8-bit streams whole-
51 // frame pixel-exact against ffmpeg, with the block counter asserted > 0.51 // frame pixel-exact against ffmpeg, with the block counter asserted > 0.
52 // Re-verified 2026-09-17 (lane-av1-intrabc) at main f715d70c: 185 rect52 // Re-verified 2026-09-17 (lane-av1-intrabc) at main f715d70c: 185 rect
53- // `use_intrabc` symbols read, 5 intrabc blocks decoded, 7 frames53+ // `use_intrabc` symbols read, and 5 blocks took the DV path -- 4 of them
54- // compared pixel-exact, 1 named refusal (rect-strip intrabc), 054+ // DECODED whole-frame pixel-exact across 4 arms (7 frames compared, 0
55- // mismatches -- the counts the assert above stands on.55+ // mismatches). The fifth is the testsrc2 rectangle-strip arm, which reads
56+ // the symbol and then refuses by name (the `intrabc_hits` bump happens on
57+ // the READ), so "5 blocks decoded" would overcount: 4 decoded + 1 refused,
58+ // exactly the single `refused == 1` the gate asserts.
56 ];59 ];
57 60
58 /// The `--enable-*` tools this decoder cares about, whether or not any gate61 /// The `--enable-*` tools this decoder cares about, whether or not any gate
@@ -417,8 +420,16 @@ mod tests {
417 /// that loops `for depth in [8usize, 10]` builds BOTH streams from one420 /// that loops `for depth in [8usize, 10]` builds BOTH streams from one
418 /// recipe, but its `yuv420p10le` arm made `is_ten_bit` classify it as421 /// recipe, but its `yuv420p10le` arm made `is_ten_bit` classify it as
419 /// 10-bit only, hiding `--enable-cfl-intra=1` from the 8-bit list.422 /// 10-bit only, hiding `--enable-cfl-intra=1` from the 8-bit list.
423+ /// lane-av1-intrabc r1: the shared recipe helper
424+ /// `screen_intrabc_stream_at_depth` is parameterised on `depth` and sits in
425+ /// the segment that opens at the PRECEDING gate's `#[test]`, so without
426+ /// this marker that gate's own 8-bit-only flags read as 10-bit-only -- the
427+ /// lane-defon/reelckf blind spot with `depth` spelled instead of
428+ /// `bit_depth`. Three gates share the helper, at both depths.
420 fn covers_both_depths(body: &str) -> bool {429 fn covers_both_depths(body: &str) -> bool {
421- body.contains("if bit_depth == 10") || body.contains("for depth in [8usize, 10]")430+ body.contains("if bit_depth == 10")
431+ || body.contains("if depth == 10")
432+ || body.contains("for depth in [8usize, 10]")
422 }433 }
423 434
424 /// Whether a gate body drives a stream at this depth.435 /// Whether a gate body drives a stream at this depth.
crates/ec-av1/src/stream.rsmodified+6 -4
@@ -177,10 +177,12 @@ pub fn leaf8_intrabc_hits() -> usize {
177 crate::decode::leaf8_intrabc_hits()177 crate::decode::leaf8_intrabc_hits()
178 }178 }
179 179
180-/// Blocks reconstructed with intra block copy at ANY shape: every block whose180+/// Blocks whose `use_intrabc` symbol came out 1 and took the DV path, at ANY
181-/// `use_intrabc` symbol came out 1 and was predicted from the current frame.181+/// shape -- the engagement counter the intrabc gates assert on. It counts
182-/// The engagement counter the intrabc gates assert on; [`leaf8_intrabc_hits`]182+/// "read a `use_intrabc` DV", not "reconstructed": a block the rect-strip
183-/// is its 8x8-leaf subset.183+/// reader REFUSES for an unported shape bumps it too (the symbol and the DV
184+/// are parsed before the refusal). [`leaf8_intrabc_hits`] is its 8x8-leaf
185+/// subset.
184 pub fn intrabc_hits() -> usize {186 pub fn intrabc_hits() -> usize {
185 crate::decode::intrabc_hits()187 crate::decode::intrabc_hits()
186 }188 }