forge
Explore
Log in

Don't you dare go Hollow

Enc_probe prints the arfmode engagement counter per point -- the probe's arm rows must print a non-zero count under EC_AV1_ARFMODE itself, not rely on the in-process witness (take_arfmode_hits is pub now, was cfg(test))

Browse files at this commit

54adc86b2d75b5abfe085a8e6a207d3db913ea40Ahmet Kaan GümüşParent: 7ea5133
  • test
    • enc_probe prints the arfmode engagement counter per point -- the probe's arm rows must print a non-zero count under EC_AV1_ARFMODE itself, not rely on the in-process witness (take_arfmode_hits is pub now, was cfg(test))
    • the first probe sweep never exported the knob and every arm row came back byte-identical to the control, which is how that class looks from the outside
Show full message
test(av1): enc_probe prints the arfmode engagement counter per point -- the probe's arm rows must print a non-zero count under EC_AV1_ARFMODE itself, not rely on the in-process witness (take_arfmode_hits is pub now, was cfg(test)); the first probe sweep never exported the knob and every arm row came back byte-identical to the control, which is how that class looks from the outside
crates/ec-av1/examples/enc_probe.rsmodified+7 -0
@@ -73,6 +73,13 @@ fn main() {
7373 println!(" census luma SAD rank of RD winner: {}", pct(&luma_rank));
7474 println!(" census chroma SAD rank of RD winner: {}", pct(&chroma_rank));
7575 }
76+ // lane-arfmode: the engagement counter of the top ARF's offer-set
77+ // lever, taken once per point so an armed run PRINTS a non-zero count
78+ // (class gate-blind-to-feature; a BD number over a counter of zero
79+ // proves nothing). Zeros when `EC_AV1_ARFMODE` is unset, which is the
80+ // control's own expectation.
81+ let hits = ec_av1::encode::take_arfmode_hits();
82+ println!(" arfmode hits: {} {} {}", hits[0], hits[1], hits[2]);
7683 }
7784 println!("wall {:.3}s", start.elapsed().as_secs_f64());
7885 }
crates/ec-av1/src/encode.rsmodified+4 -6
@@ -7845,15 +7845,13 @@ fn arfmode_hit_and_no() -> bool {
78457845 false
78467846 }
78477847
7848-/// Takes (and clears) the counts.
7849-#[cfg(test)]
7850-pub(crate) fn take_arfmode_hits() -> [usize; 3] {
7848+/// Takes (and clears) the counts. `pub` for `examples/enc_probe`, so a
7849+/// probe point can print a non-zero engagement count under the env knob
7850+/// itself -- the counter the gate BD numbers are read against.
7851+pub fn take_arfmode_hits() -> [usize; 3] {
78517852 [0, 1, 2].map(|i| ARFMODE_HITS[i].swap(0, std::sync::atomic::Ordering::Relaxed))
78527853 }
78537854
7854-/// [`Search::top_k`]'s value: `None` keeps every mode's search unchanged
7855-/// (the default, until a lever's quality gate justifies pruning by default);
7856-/// `EC_AV1_PRUNE_K` sweeps it in a test build without touching callers.
78577855 fn prune_top_k() -> Option<usize> {
78587856 #[cfg(test)]
78597857 {