diff --git a/crates/ec-av1/examples/enc_probe.rs b/crates/ec-av1/examples/enc_probe.rs index 4f9afc34..27684562 100644 --- a/crates/ec-av1/examples/enc_probe.rs +++ b/crates/ec-av1/examples/enc_probe.rs @@ -73,6 +73,13 @@ fn main() { println!(" census luma SAD rank of RD winner: {}", pct(&luma_rank)); println!(" census chroma SAD rank of RD winner: {}", pct(&chroma_rank)); } + // lane-arfmode: the engagement counter of the top ARF's offer-set + // lever, taken once per point so an armed run PRINTS a non-zero count + // (class gate-blind-to-feature; a BD number over a counter of zero + // proves nothing). Zeros when `EC_AV1_ARFMODE` is unset, which is the + // control's own expectation. + let hits = ec_av1::encode::take_arfmode_hits(); + println!(" arfmode hits: {} {} {}", hits[0], hits[1], hits[2]); } println!("wall {:.3}s", start.elapsed().as_secs_f64()); } diff --git a/crates/ec-av1/src/encode.rs b/crates/ec-av1/src/encode.rs index 7bdedba2..7aa68273 100644 --- a/crates/ec-av1/src/encode.rs +++ b/crates/ec-av1/src/encode.rs @@ -7845,15 +7845,13 @@ fn arfmode_hit_and_no() -> bool { false } -/// Takes (and clears) the counts. -#[cfg(test)] -pub(crate) fn take_arfmode_hits() -> [usize; 3] { +/// Takes (and clears) the counts. `pub` for `examples/enc_probe`, so a +/// probe point can print a non-zero engagement count under the env knob +/// itself -- the counter the gate BD numbers are read against. +pub fn take_arfmode_hits() -> [usize; 3] { [0, 1, 2].map(|i| ARFMODE_HITS[i].swap(0, std::sync::atomic::Ordering::Relaxed)) } -/// [`Search::top_k`]'s value: `None` keeps every mode's search unchanged -/// (the default, until a lever's quality gate justifies pruning by default); -/// `EC_AV1_PRUNE_K` sweeps it in a test build without touching callers. fn prune_top_k() -> Option { #[cfg(test)] {