forge
Explore
Log in

Don't you dare go Hollow

ec-av1: drop the vacuous aq-mode=2 lag16 census arm (lane-av1seglvl); scope census SEG_LVL imports to cfg(test)

Browse files at this commit

d884467623ea202a8ba6cd051449b4067886509aAhmet Kaan GümüşParent: abdbfa3
crates/ec-av1/src/stream.rsmodified+14 -10
@@ -17,8 +17,13 @@
1717
1818 use ec_av1_syntax::{
1919 Av1Parser, FrameHeader, FrameType, MAX_SEGMENTS, NUM_REF_FRAMES, ObuKind, PRIMARY_REF_NONE,
20- SEG_LVL_ALT_Q, SEG_LVL_GLOBALMV, SEG_LVL_MAX, SEG_LVL_REF_FRAME, SEG_LVL_SKIP, Tile, TxMode,
20+ SEG_LVL_GLOBALMV, SEG_LVL_REF_FRAME, SEG_LVL_SKIP, Tile, TxMode,
2121 };
22+// Census-only: read outside `mod tests` only in comments; the non-test lib
23+// target never touches them, so they ride in behind cfg(test) (via the test
24+// module's `use super::*`).
25+#[cfg(test)]
26+use ec_av1_syntax::{SEG_LVL_ALT_Q, SEG_LVL_MAX};
2227 use ec_core::{Error, Result};
2328
2429 use crate::cdf_state::Cdfs;
@@ -2889,7 +2894,7 @@ pub(crate) mod tests {
28892894 // REF_FRAME/SKIP/GLOBALMV, so an ALT_LF-only stream would decode
28902895 // silently past it -- but a direct parse of every frame header's
28912896 // `feature_enabled` table.
2892- let lag_recipes: [(&str, &str, usize, usize, Vec<&str>); 4] = [
2897+ let lag_recipes: [(&str, &str, usize, usize, Vec<&str>); 3] = [
28932898 (
28942899 "aq-mode=1 lag16 mandelbrot",
28952900 "mandelbrot",
@@ -2911,13 +2916,12 @@ pub(crate) mod tests {
29112916 128,
29122917 vec!["--cpu-used=4", "--aq-mode=1", "--cq-level=63", "--lag-in-frames=16", "--auto-alt-ref=1"],
29132918 ),
2914- (
2915- "aq-mode=2 lag16",
2916- "mandelbrot",
2917- 192,
2918- 128,
2919- vec!["--cpu-used=4", "--aq-mode=2", "--cq-level=45", "--lag-in-frames=16", "--auto-alt-ref=1"],
2920- ),
2919+ // `--aq-mode=2 lag16` (complexity AQ over an alt-ref group) was
2920+ // measured 2026-09-24: it encodes and decodes cleanly but codes
2921+ // ZERO segmentation-enabled frames -- complexity AQ never reaches
2922+ // the seg table at this recipe -- so as a census arm it measures
2923+ // nothing (class gate-blind-to-feature) and was dropped; the
2924+ // 1-pass `aq-mode=2` r27 arm above stays.
29212925 ];
29222926 let mut total_enabled = 0usize;
29232927 let mut total_inherited = 0usize;
@@ -2995,7 +2999,7 @@ pub(crate) mod tests {
29952999 );
29963000 }
29973001 eprintln!(
2998- "SEGCENSUS lag/twopass: {total_enabled} seg-enabled frames over 5 arms, {total_inherited} inherited-map frames, {total_alt_q} with ALT_Q, all other SEG_LVL features: 0 frames"
3002+ "SEGCENSUS lag/twopass: {total_enabled} seg-enabled frames over 4 arms, {total_inherited} inherited-map frames, {total_alt_q} with ALT_Q, all other SEG_LVL features: 0 frames"
29993003 );
30003004 }
30013005