gate_coverage: correct four false claims and two stale counts
Browse files at this commitc7845675961f945ffda268b2f9dbc6ad3300111aParent: b93fec62 changed files +261 -22
- crates/ec-av1/src/gate_coverage.rs +141 -22
- lanes/av1distwtd.report.md +120 -0
crates/ec-av1/src/gate_coverage.rsmodified+141 -22
| @@ -2,14 +2,25 @@ | |||
| 2 | //! | 2 | //! |
| 3 | //! Every gate in [`crate::stream`] that runs a real `aomenc` picks its coding | 3 | //! Every gate in [`crate::stream`] that runs a real `aomenc` picks its coding |
| 4 | //! tools with `--enable-*=0/1` flags, and a flag left off the command line | 4 | //! tools with `--enable-*=0/1` flags, and a flag left off the command line |
| 5 | -//! takes aomenc's default (on, for the tools this decoder cares about). That | 5 | +//! takes aomenc's default. That default is `1` for essentially every tool in |
| 6 | -//! makes it possible -- and it happened -- for a coding tool to be switched | 6 | +//! [`TOOL_UNIVERSE`] on a non-realtime build -- `default_extra_cfg` in |
| 7 | -//! *off in every single gate*, so that no real stream in this repository ever | 7 | +//! `av1/av1_cx_iface.c` is all-ones across the seq-level tool fields, and this |
| 8 | -//! exercised it and a corner-cut in the decoder survived twenty gates | 8 | +//! oracle is built with `CONFIG_REALTIME_ONLY 0`. But a `1` default is NOT |
| 9 | -//! unnoticed: `reconstruct`'s `smooth_neighbor` was hardcoded `false`, wrong | 9 | +//! the same as the tool reaching the stream, and the rest of this file's |
| 10 | -//! whenever a directional block neighbours a smooth-mode one, and invisible | 10 | +//! "defaulted means unknown" rule rests on that gap: palette and intrabc are |
| 11 | -//! because all twenty gates passed `--enable-smooth-intra=0` | 11 | +//! gated on CONTENT (`encoder.c:2079` derives `allow_screen_content_tools` |
| 12 | -//! (lane-chroma r1, 2026-08-30). | 12 | +//! from block counts, and `seq_force_screen_content_tools` is left at the |
| 13 | +//! adaptive `SELECT_SCREEN_CONTENT_TOOLS`), and `speed_features.c` masks | ||
| 14 | +//! several tools OFF again per `--cpu-used`. A `1` default proves the encoder | ||
| 15 | +//! was ALLOWED the tool, never that any block used it. | ||
| 16 | +//! | ||
| 17 | +//! With that default in place it is possible -- and it happened -- for a | ||
| 18 | +//! coding tool to be switched *off in every single gate*, so that no real | ||
| 19 | +//! stream in this repository ever exercised it and a corner-cut in the | ||
| 20 | +//! decoder survived twenty gates unnoticed: `reconstruct`'s | ||
| 21 | +//! `smooth_neighbor` was hardcoded `false`, wrong whenever a directional | ||
| 22 | +//! block neighbours a smooth-mode one, and invisible because all twenty | ||
| 23 | +//! gates passed `--enable-smooth-intra=0` (lane-chroma r1, 2026-08-30). | ||
| 13 | //! | 24 | //! |
| 14 | //! The test below re-derives that set from the gate source and pins it. A tool | 25 | //! The test below re-derives that set from the gate source and pins it. A tool |
| 15 | //! that is switched off in every gate and on in none is *provably never | 26 | //! that is switched off in every gate and on in none is *provably never |
| @@ -22,8 +33,10 @@ | |||
| 22 | // keys on `--enable-<tool>=0/1`, and `--tile-columns=<log2>` has no such | 33 | // keys on `--enable-<tool>=0/1`, and `--tile-columns=<log2>` has no such |
| 23 | // shape -- a `--tile-columns=` presence check would also read `=0` (one tile) | 34 | // shape -- a `--tile-columns=` presence check would also read `=0` (one tile) |
| 24 | // as coverage, which is the opposite of what it would claim. It needs no | 35 | // as coverage, which is the opposite of what it would claim. It needs no |
| 25 | -// entry either: 13 gates spell `--tile-columns`/`--tile-rows` with a nonzero | 36 | +// entry either: measured 2026-09-29 (lane-av1distwtd r2), 19 of the 146 |
| 26 | -// log2 and assert the parsed `tile_info` really carries the grid, and | 37 | +// census-selected gate bodies spell `--tile-columns`/`--tile-rows` with a |
| 38 | +// nonzero log2 -- 9 assert the parsed `tile_info` in the same body and 10 | ||
| 39 | +// more delegate to a shared helper that asserts it -- and | ||
| 27 | // `run_multi_tile_gate` covers a 2D grid with the coding tools ON at both | 40 | // `run_multi_tile_gate` covers a 2D grid with the coding tools ON at both |
| 28 | // bit depths. | 41 | // bit depths. |
| 29 | 42 | ||
| @@ -107,12 +120,22 @@ enum On { | |||
| 107 | /// cover, listed with their aomenc default. | 120 | /// cover, listed with their aomenc default. |
| 108 | /// | 121 | /// |
| 109 | /// lane-covbd's derivation read `--enable-*` flags only, so a tool a gate pins | 122 | /// lane-covbd's derivation read `--enable-*` flags only, so a tool a gate pins |
| 110 | -/// off through another spelling was invisible: all 49 gates that name it pass | 123 | +/// off through another spelling was invisible: every gate that named |
| 111 | -/// `--enable-tx-size-search=0`, and the real-stream PANIC hiding behind that | 124 | +/// `--enable-tx-size-search` passed `--enable-tx-size-search=0` when this was |
| 112 | -/// pin was found by lane-ab16, not by this guard. `--loopfilter-control=0`, | 125 | +/// written, and the real-stream PANIC hiding behind that pin was found by |
| 126 | +/// lane-ab16, not by this guard. `--loopfilter-control=0`, | ||
| 113 | /// `--tile-columns=0` and a `--cpu-used` high enough to switch a search off are | 127 | /// `--tile-columns=0` and a `--cpu-used` high enough to switch a search off are |
| 114 | /// the same shape. | 128 | /// the same shape. |
| 115 | /// | 129 | /// |
| 130 | +/// The "all 49" count is GONE as of 2026-09-29 (lane-av1distwtd r2) and is | ||
| 131 | +/// deliberately not replaced by a number: the tool is no longer pinned off | ||
| 132 | +/// tree-wide, so any count would be a snapshot that rots the same way. | ||
| 133 | +/// Measured on this tree for the record: 113 of the 146 selected gate bodies | ||
| 134 | +/// name it, 88 pass `=0`, 15 pass `=1`, and 9 build the value into a | ||
| 135 | +/// `format!` variable the census cannot see -- so the historical claim no | ||
| 136 | +/// longer holds in EITHER direction, and the `enable-tx-size-search` entry | ||
| 137 | +/// below is a live question, not a settled one. | ||
| 138 | +/// | ||
| 116 | /// Each entry is `(tool, spellings, aomenc default, what counts as on)`. The | 139 | /// Each entry is `(tool, spellings, aomenc default, what counts as on)`. The |
| 117 | /// "defaulted means unknown" rule of [`NEVER_EXERCISED`] applies unchanged: a | 140 | /// "defaulted means unknown" rule of [`NEVER_EXERCISED`] applies unchanged: a |
| 118 | /// default of `1` does not prove the encoder picked the tool for any stream, so | 141 | /// default of `1` does not prove the encoder picked the tool for any stream, so |
| @@ -168,9 +191,17 @@ const DEFAULT_ON_TOOLS: &[(&str, &[&str], &str, On)] = &[ | |||
| 168 | 191 | ||
| 169 | /// Non-`--enable-*` spellings that drive a [`TOOL_UNIVERSE`] tool. | 192 | /// Non-`--enable-*` spellings that drive a [`TOOL_UNIVERSE`] tool. |
| 170 | /// | 193 | /// |
| 171 | -/// `--superres-mode=1` is how all three superres gates switch superres on; | 194 | +/// `--superres-mode=1` is how every superres gate switches superres on; |
| 172 | /// without this map they read as an `enable-superres` hole while a real stream | 195 | /// without this map they read as an `enable-superres` hole while a real stream |
| 173 | -/// exercises the tool (lane-covbd deferred exactly this). | 196 | +/// exercises the tool (lane-covbd deferred exactly this). The count was "all |
| 197 | +/// three" until 2026-09-29 (lane-av1distwtd r2), which measured SIX gates | ||
| 198 | +/// spelling a nonzero `--superres-mode` (5 among the 146 census-selected | ||
| 199 | +/// bodies, plus `a_superres_census_over_six_real_streams_...`). No count is | ||
| 200 | +/// given here for the same reason as `enable-tx-size-search` above: it rots. | ||
| 201 | +/// Worth noting the alias is the ONLY positive evidence for superres, and | ||
| 202 | +/// those gates do assert arrival -- `superres_hits` / `predict_scaled_hits` | ||
| 203 | +/// are read in five of them -- so this one is a healthy alias, not a | ||
| 204 | +/// spelling-only one. | ||
| 174 | #[cfg(test)] | 205 | #[cfg(test)] |
| 175 | const ALIASES: &[(&str, &str)] = &[("superres-mode", "enable-superres")]; | 206 | const ALIASES: &[(&str, &str)] = &[("superres-mode", "enable-superres")]; |
| 176 | 207 | ||
| @@ -205,13 +236,61 @@ const NEVER_EXERCISED_8BIT: &[(&str, &str)] = &[ | |||
| 205 | // The existing lane-cwarp compound-warp gates already SPELLED `=1` and | 236 | // The existing lane-cwarp compound-warp gates already SPELLED `=1` and |
| 206 | // the census still read this entry as open, so the hole was a missing | 237 | // the census still read this entry as open, so the hole was a missing |
| 207 | // witness, not a missing flag. | 238 | // witness, not a missing flag. |
| 239 | + // `enable-dual-filter` -- reason CORRECTED 2026-09-29 (lane-av1distwtd | ||
| 240 | + // r2). The old reason ("never spelled by any gate, so defaulted = | ||
| 241 | + // unknown; no stream is proven to carry per-direction interp filters") | ||
| 242 | + // was FALSE on both halves, and the entry does not describe a coverage | ||
| 243 | + // hole at all: | ||
| 244 | + // - it IS spelled, as `=0`, by 2 gates | ||
| 245 | + // (`real_aomenc_1to4_streams_...` and | ||
| 246 | + // `a_real_aomenc_inter_sequence_with_32x32_level_1to4_strips_...`), | ||
| 247 | + // so "never spelled" was wrong; | ||
| 248 | + // - a stream IS proven to carry the tool, and the default reaches the | ||
| 249 | + // header. Measured on this oracle (aom 3.13.3) with this crate's own | ||
| 250 | + // parser: one recipe, flag left off the command line, parses | ||
| 251 | + // `dual_filter=true` (6855 B); the same recipe with | ||
| 252 | + // `--enable-dual-filter=0` parses `dual_filter=false` and encodes | ||
| 253 | + // DIFFERENT bytes (6874 B). "Defaulted = unknown" is the right rule | ||
| 254 | + // for a tool whose default may not reach the header; for this one it | ||
| 255 | + // measurably does, so the rule was applied to a premise that does | ||
| 256 | + // not hold. | ||
| 257 | + // The real reason this entry survives: `gate_bodies()` (below) only sees | ||
| 258 | + // a `#[test]`-shaped segment that spells `--passes=1`, | ||
| 259 | + // `ten_bit_tool_gate(` or `encode_10bit_gradients`. A gate that hands | ||
| 260 | + // its recipe to a shared helper keeps its flags in the HELPER, so the | ||
| 261 | + // segment is filtered out and the census never sees the spelling. | ||
| 262 | + // `a_real_aomenc_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact` | ||
| 263 | + // spells `--enable-dual-filter=1` and hard-asserts | ||
| 264 | + // `decode::dual_filter_diff_hits()` moved, which is the arrival assert | ||
| 265 | + // this file's own rule demands ("an explicit `--enable-<tool>=1` in a | ||
| 266 | + // gate that then asserts the feature fired"). The tool is exercised. | ||
| 267 | + // Left in place ONLY because deleting it would redden this file's own | ||
| 268 | + // test while the selection blind spot stands -- fixing the filter is a | ||
| 269 | + // census change, out of scope for a claim-correction lane. | ||
| 208 | ( | 270 | ( |
| 209 | "enable-dual-filter", | 271 | "enable-dual-filter", |
| 210 | - "never spelled by any gate, so defaulted = unknown; no stream is proven to carry per-direction interp filters", | 272 | + "EXERCISED but invisible to this census: a_real_aomenc_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact spells =1 and asserts dual_filter_diff_hits() moved; gate_bodies() filters that gate out because its recipe lives in a shared helper. Delete once the filter counts helper-delegating gates", |
| 211 | ), | 273 | ), |
| 274 | + // `enable-flip-idtx` -- reason CORRECTED 2026-09-29 (lane-av1distwtd r2). | ||
| 275 | + // "never spelled" is FALSE: TWO gates spell `--enable-flip-idtx=1`, and | ||
| 276 | + // one of them is exactly the gate the 10-bit list's own comment names | ||
| 277 | + // (`a_real_aomenc_stream_with_a_1d_tx_class_on_a_rect_transform_decodes_pixel_exact`, | ||
| 278 | + // which hard-asserts `compared_class1 > 0` -- "--enable-flip-idtx=1 never | ||
| 279 | + // produced a V_DCT/H_DCT transform on a compared attempt"). That comment | ||
| 280 | + // claims the gate passes `=1` "at both depths", and MEASURED run of it: | ||
| 281 | + // 12 pixel-exact decodes, 6 of them 10-bit (so 6 at 8 bits), 219 rect | ||
| 282 | + // coefficient TUs on compared attempts of which 10 carry a 1D tx class. | ||
| 283 | + // So the 1D transform types are proven to reach a real 8-bit stream this | ||
| 284 | + // decoder reconstructs exactly. | ||
| 285 | + // It survives at 8 bits purely as a classification artefact: the gate | ||
| 286 | + // builds both depths from one `ten_bit` recipe, `is_ten_bit` sees the | ||
| 287 | + // `yuv420p10le` in its conditional and files it 10-bit-ONLY, and | ||
| 288 | + // `covers_both_depths` recognises only "if bit_depth == 10" / "if depth | ||
| 289 | + // == 10" / "for depth in [8usize, 10]" -- the lane-defon/reelckf blind | ||
| 290 | + // spot its own doc comment describes, reached through a third spelling. | ||
| 212 | ( | 291 | ( |
| 213 | "enable-flip-idtx", | 292 | "enable-flip-idtx", |
| 214 | - "never spelled; the flip/identity transform types are unproven by a real stream", | 293 | + "EXERCISED at 8 bits: a_real_aomenc_stream_with_a_1d_tx_class_on_a_rect_transform_decodes_pixel_exact spells =1, asserts tx_class1_hits moved, and 6 of its 12 pixel-exact decodes are 8-bit (measured). Mis-filed 10-bit-only by is_ten_bit, which covers_both_depths cannot see through a `ten_bit` recipe", |
| 215 | ), | 294 | ), |
| 216 | // `enable-global-motion` LEFT this list on 2026-09-25 (lane-av1gwarp12 r2): | 295 | // `enable-global-motion` LEFT this list on 2026-09-25 (lane-av1gwarp12 r2): |
| 217 | // `a_real_affine_global_motion_stream_decodes_pixel_exact` loops | 296 | // `a_real_affine_global_motion_stream_decodes_pixel_exact` loops |
| @@ -221,6 +300,23 @@ const NEVER_EXERCISED_8BIT: &[(&str, &str)] = &[ | |||
| 221 | // containing both the gate and this test until the ROTZOOM suite. | 300 | // containing both the gate and this test until the ROTZOOM suite. |
| 222 | // The 12-bit ROTZOOM gate rides the high-depth bucket via `encode_12bit(` | 301 | // The 12-bit ROTZOOM gate rides the high-depth bucket via `encode_12bit(` |
| 223 | // in `is_ten_bit`, so it plays no part in this retirement. | 302 | // in `is_ten_bit`, so it plays no part in this retirement. |
| 303 | + // `enable-rect-tx` -- reason RE-VERIFIED 2026-09-29 (lane-av1distwtd | ||
| 304 | + // r2), both halves still TRUE, and the second half is now PROVEN rather | ||
| 305 | + // than asserted. (1) "never spelled": measured across all 146 | ||
| 306 | + // census-selected gate bodies, zero spell `--enable-rect-tx` at either | ||
| 307 | + // depth -- the only `--enable-*` tool in [`TOOL_UNIVERSE`] with no | ||
| 308 | + // spelling anywhere. (2) "reach the decoder only through partition | ||
| 309 | + // shape": aom 3.13.3 has no sequence-header bit for it. `enable_rect_tx` | ||
| 310 | + // is an `AV1E_SET_ENABLE_RECT_TX` encoder-search control | ||
| 311 | + // (`av1_cx_iface.c:2125`, copied to `txfm_cfg->enable_rect_tx` at | ||
| 312 | + // `av1_cx_iface.c:1483`) and is read ONLY inside `tx_search.c` | ||
| 313 | + // (lines 2568/2662/2686/2710/2956); `bitstream.c` writes no such bit, and | ||
| 314 | + // this crate's `SequenceHeader` (`ec-av1-syntax/src/sequence.rs`) has no | ||
| 315 | + // such field. The decoder's own gate is `is_rect_tx_allowed`, derived | ||
| 316 | + // from partition shape -- exactly what this reason says. A gate can | ||
| 317 | + // therefore never prove this tool by naming the flag, only by proving a | ||
| 318 | + // rect transform unit fired (`rect_partition_hits` / | ||
| 319 | + // `rect_coeff_tu_hits`, which lane-rect1d's gate does assert). | ||
| 224 | ( | 320 | ( |
| 225 | "enable-rect-tx", | 321 | "enable-rect-tx", |
| 226 | "never spelled; rect transforms reach the decoder only through partition shape, never through a gate that names the tool", | 322 | "never spelled; rect transforms reach the decoder only through partition shape, never through a gate that names the tool", |
| @@ -236,10 +332,16 @@ const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ | |||
| 236 | // `enable-rect-partitions` and `enable-restoration` at 10 bits. All five | 332 | // `enable-rect-partitions` and `enable-restoration` at 10 bits. All five |
| 237 | // deleted together. | 333 | // deleted together. |
| 238 | 334 | ||
| 239 | - // Only 4 of the 45 real-aomenc gates encode at 10 bits, and they pin the | 335 | + // The "Only 4 of the 45 real-aomenc gates encode at 10 bits" sentence that |
| 240 | - // pixel filters and the intra tool set off. Every entry the 8-bit list | 336 | + // stood here is STALE (lane-av1distwtd r2, 2026-09-29), and understated |
| 241 | - // carries is a hole here too. lane-hbdgates r1 closed six of the seven | 337 | + // the high-depth bucket by more than an order of magnitude. Measured |
| 242 | - // 8-bit-only entries with real 10-bit gates (filter-intra, smooth-intra, | 338 | + // against this tree with `gate_bodies()`' own filter: 146 selected gate |
| 339 | + // bodies, of which 83 are classified 10-bit-or-higher by `is_ten_bit`. | ||
| 340 | + // The historical point stands -- those gates pin the pixel filters and | ||
| 341 | + // the intra tool set off far more often than not -- but the counts a | ||
| 342 | + // reader would check them against no longer exist. | ||
| 343 | + // Every entry the 8-bit list carries is a hole here too. lane-hbdgates r1 | ||
| 344 | + // closed six of the seven 8-bit-only entries with real 10-bit gates | ||
| 243 | // paeth-intra, intra-edge-filter, rect-partitions, ab-partitions); its | 345 | // paeth-intra, intra-edge-filter, rect-partitions, ab-partitions); its |
| 244 | // seventh, the 10-bit LR gate, was `#[ignore]`d on that branch and passes | 346 | // seventh, the 10-bit LR gate, was `#[ignore]`d on that branch and passes |
| 245 | // un-ignored on main, which carries the fix. | 347 | // un-ignored on main, which carries the fix. |
| @@ -252,9 +354,26 @@ const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ | |||
| 252 | // gate passes `=1` for both. `enable-1to4-partitions` left it on 2026-09-02: | 354 | // gate passes `=1` for both. `enable-1to4-partitions` left it on 2026-09-02: |
| 253 | // lane-tx64x16 r4's 32-level 1:4 gate has a 10-bit arm that asserts both | 355 | // lane-tx64x16 r4's 32-level 1:4 gate has a 10-bit arm that asserts both |
| 254 | // orientations and coded strips inside pixel-exact attempts. | 356 | // orientations and coded strips inside pixel-exact attempts. |
| 357 | + // `enable-dual-filter` -- reason CORRECTED 2026-09-29 (lane-av1distwtd | ||
| 358 | + // r2). "hole at both depths, see the 8-bit list" inherited the 8-bit | ||
| 359 | + // entry's false "never spelled" claim. The same named gate | ||
| 360 | + // (`a_real_aomenc_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact`) | ||
| 361 | + // spells `--enable-dual-filter=1` and hard-asserts | ||
| 362 | + // `dual_filter_diff_hits()` moved; it is simply invisible to | ||
| 363 | + // `gate_bodies()` because its recipe lives in a shared helper. Same | ||
| 364 | + // entry, same cause, both depths. | ||
| 365 | + // The two numbers in the `enable-flip-idtx` retirement below are | ||
| 366 | + // RE-MEASURED 2026-09-29 (lane-av1distwtd r2) by running the gate, and | ||
| 367 | + // both still hold exactly: "pixel-compares six 10-bit decodes" (the run | ||
| 368 | + // reports 12 pixel-exact decodes, 6 of them 10-bit) and "10 of its rect | ||
| 369 | + // coefficient TUs carry a 1D tx class" (the run reports 219 rect | ||
| 370 | + // coefficient TUs on compared attempts, 10 of them 1D). The gate also | ||
| 371 | + // hard-asserts `compared_class1 > 0`, so the claim that it "passes =1 at | ||
| 372 | + // both depths" is backed by an arrival assert, not just a spelling -- | ||
| 373 | + // which is what makes the 8-bit entry's "never spelled" untenable. | ||
| 255 | ( | 374 | ( |
| 256 | "enable-dual-filter", | 375 | "enable-dual-filter", |
| 257 | - "hole at both depths, see the 8-bit list", | 376 | + "EXERCISED but invisible to this census, at both depths -- see the 8-bit entry: a_real_aomenc_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact spells =1 and asserts dual_filter_diff_hits() moved, and gate_bodies() filters it out", |
| 258 | ), | 377 | ), |
| 259 | // `enable-flip-idtx` LEFT this list on 2026-09-02 (lane-rect1d r1): | 378 | // `enable-flip-idtx` LEFT this list on 2026-09-02 (lane-rect1d r1): |
| 260 | // `a_real_aomenc_stream_with_a_1d_tx_class_on_a_rect_transform_decodes_pixel_exact` | 379 | // `a_real_aomenc_stream_with_a_1d_tx_class_on_a_rect_transform_decodes_pixel_exact` |
lanes/av1distwtd.report.mdadded+120 -0
| @@ -0,0 +1,120 @@ | |||
| 1 | +# lane-av1distwtd | ||
| 2 | + | ||
| 3 | +Two rounds on one branch (`lane-av1distwtd`, base `a21f3680`). | ||
| 4 | + | ||
| 5 | +- **r1** — close the `enable-dist-wtd-comp` coverage hole. | ||
| 6 | +- **r2** — audit every CLAIM in `gate_coverage.rs` against the code and correct | ||
| 7 | + the false ones (appended below). | ||
| 8 | + | ||
| 9 | +--- | ||
| 10 | + | ||
| 11 | +## r1: `enable-dist-wtd-comp` | ||
| 12 | + | ||
| 13 | +`PRODUCIBLE`. The census entry's stated reason — "distance-weighted compound is | ||
| 14 | +unimplemented" — was **false**: `compound::dist_wtd_comp_weight_assign` | ||
| 15 | +(lane-av1comp) and `mc::combine_compound`'s weighted path have implemented it for | ||
| 16 | +a long time. What was missing was a stream *carrying* the tool, so no gate ever | ||
| 17 | +proved it fired. | ||
| 18 | + | ||
| 19 | +Closed with a witness gate `a_distance_weighted_compound_stream_decodes_pixel_exact` | ||
| 20 | +(25 oracle frames, 21 distance-weighted blocks, pixel-exact) plus the | ||
| 21 | +`gate_coverage.rs` entry deletion, commit `9cca1096`. See that commit message for | ||
| 22 | +the full red-before evidence. | ||
| 23 | + | ||
| 24 | +**12-bit / single-ref:** unaffected. 12-bit reaches the same arm independently | ||
| 25 | +(15 blocks measured); single-ref never reads `compound_idx` at all. | ||
| 26 | + | ||
| 27 | +--- | ||
| 28 | + | ||
| 29 | +# r2 appendix: gate_coverage.rs claim audit | ||
| 30 | + | ||
| 31 | +Every claim checked against the code, not against prose. Method per claim: | ||
| 32 | +find the deciding symbol and follow the call path from the feature-flag parse to | ||
| 33 | +the reconstruction site; for encoder claims, read `~/.cache/aom-oracle/src` | ||
| 34 | +(aom 3.13.3, `CONFIG_REALTIME_ONLY 0`) rather than `--help`; where a stream was | ||
| 35 | +needed, encode one and read the **parsed** header, never the flag. | ||
| 36 | + | ||
| 37 | +## Evidence table | ||
| 38 | + | ||
| 39 | +| # | entry / claim (file:line) | stated reason | verdict | deciding code | what it should say | | ||
| 40 | +|---|---|---|---|---|---| | ||
| 41 | +| 1 | `enable-dist-wtd-comp` 8-bit (retired r1, commit `9cca1096`) | "unimplemented" | **FALSE** (r1) | `compound.rs:36 dist_wtd_comp_weight_assign`; `mc.rs:2075 combine_compound` | retired; combine long implemented, witness gate added | | ||
| 42 | +| 2 | `enable-dist-wtd-comp` encoder default (`:5`) | "off in 11 gates" implies encoder default off | **FALSE** | `av1_cx_iface.c` `default_extra_cfg` = 1; `bitstream.c:2681` writes it | default is ON; the 11 gates pinned it `=0` themselves | | ||
| 43 | +| 3 | `enable-dual-filter` 8-bit (`:270`) | "never spelled by any gate … no stream proven to carry per-direction interp filters" | **FALSE** | gate `a_real_aomenc_dual_filter_obmc_8x8_inter_sequence_decodes_pixel_exact` spells `=1` and asserts `dual_filter_diff_hits()` (`decode.rs:35135`); default parses `dual_filter=true` | EXERCISED; census can't see it (helper-delegation filter) | | ||
| 44 | +| 4 | `enable-dual-filter` 10-bit (`:374`) | "hole at both depths" | **FALSE** | same gate as #3 | same as #3, both depths | | ||
| 45 | +| 5 | `enable-flip-idtx` 8-bit (`:291`) | "never spelled" | **FALSE** | gate `a_real_aomenc_stream_with_a_1d_tx_class_on_a_rect_transform_decodes_pixel_exact` spells `=1`, asserts `tx_class1_hits` | EXERCISED at 8 bits (6 of 12 measured decodes are 8-bit) | | ||
| 46 | +| 6 | `enable-flip-idtx` 10-bit numbers (`:366`) | "six 10-bit decodes", "10 rect TUs 1D" | **TRUE** (re-measured) | ran the gate: 12 decodes, 6 ten-bit, 219 rect TUs, 10 of them 1D | keep (now backed by an arrival assert) | | ||
| 47 | +| 7 | `enable-rect-tx` 8-bit (`:320`) | "never spelled; reached only via partition shape" | **TRUE** | 0 gates spell it; aom has no header bit — `av1_cx_iface.c:2125/1483` is search-only, read only in `tx_search.c`; decoder gate is `is_rect_tx_allowed` | keep; now proven, not asserted | | ||
| 48 | +| 8 | `enable-rect-tx` 10-bit (`:395`) | "hole at both depths" | **TRUE** | same | keep | | ||
| 49 | +| 9 | `enable-cfl-intra` 8-bit comment (`:190`) | "gate passes `=1` at 8 AND 10 bits, pixel-compares both arms" | **TRUE** | gate `a_real_aomenc_sb128_stream_whose_skipped_cfl_and_1to4_chroma_pairs_...` loops `for depth in [8usize, 10]`, spells `=1`, asserts `dir_pairs > 0` | keep | | ||
| 50 | +| 10 | same gate, name says "skipped_cfl" | — | **NOTE** | that gate asserts directional 1:4 pairs, **not** skipped-CfL; skipped-CfL evidence is a *different* gate (`a_real_film_key_frame_with_a_skipped_cfl_block_...`) | name overstates; comment doesn't repeat the error | | ||
| 51 | +| 11 | `enable-intrabc` 10-bit comment (`:~336`) | "hard-asserts a decoded intrabc block per depth" | **TRUE** | `an_sb128_screen_stream_with_intrabc_...` asserts `blocks_total > 0 && fired_arms > 0` | keep | | ||
| 52 | +| 12 | `enable-intrabc` NEVER_EXERCISED header (`:45`) | "counter asserted > 0" | **TRUE** | `a_real_aomenc_screen_key_frame_reads_use_intrabc_on_rect_strips` asserts `blocks_total > 0 && fired_arms > 0` | keep | | ||
| 53 | +| 13 | `enable-restoration` 10-bit comment (`:311`) | "asserts a real Wiener/SGR unit fired" | **TRUE** | `a_real_aomenc_10bit_restoration_stream_...` asserts `lr_stripe0_hits`/`lr_last_stripe_hits` | keep | | ||
| 54 | +| 14 | `enable-1to4-partitions` 10-bit comment (`:317`) | "10-bit arm asserts both orientations and coded strips" | **TRUE** | `a_real_aomenc_10bit_..._1to4...` gates assert `rect4_coeff_hits`/orientation counters | keep | | ||
| 55 | +| 15 | `enable-global-motion` 8-bit comment (`:264`) | "loops `for depth in [8u32, 10u32]`" | **TRUE** | `a_real_affine_global_motion_stream_decodes_pixel_exact`; `covers_both_depths` recognises that exact spelling | keep | | ||
| 56 | +| 16 | `DEFAULT_ON_TOOLS` doc (`:123`) | "all 49 gates that name it pass `--enable-tx-size-search=0`" | **STALE** | 113 of 146 name it: 88 `=0`, 15 `=1`, 9 via `format!` | claim no longer holds either way; count removed, not replaced | | ||
| 57 | +| 17 | module doc (`:5`) | "a flag off the line takes aomenc's default (on …)" | **TRUE but misleading** | default is 1, but palette/intrabc are content-gated (`encoder.c:2079`) and `speed_features.c` re-masks per cpu-used | reworded: default = *allowed*, not *arrived* | | ||
| 58 | +| 18 | module doc TILING (`:25`) | "13 gates … assert the parsed `tile_info`" | **STALE** | 19 gates spell nonzero tile log2; 9 assert in-body, 10 delegate to a helper that asserts | reworded to the measured split | | ||
| 59 | +| 19 | `ALIASES` (`:194`) | "all three superres gates" | **STALE (undercount)** | 6 gates spell nonzero `--superres-mode`; 5 read `superres_hits`/`predict_scaled_hits` | count removed (rots); alias marked healthy | | ||
| 60 | +| 20 | 10-bit list header (`:335`) | "Only 4 of the 45 real-aomenc gates encode at 10 bits" | **STALE** | 83 of 146 selected bodies are 10-bit-or-higher | reworded with the measured figure | | ||
| 61 | +| 21 | `DEFAULT_ON_TOOLS` default column (`:135-181`) | `1` for tx-size-search / directional-intra / smooth-interintra / interintra-wedge / diff-wtd-comp / onesided-comp | **TRUE** | `default_extra_cfg` (non-RT array) is 1 for all six; `CONFIG_REALTIME_ONLY 0` | keep | | ||
| 62 | +| 22 | `DEFAULT_ON_TOOLS` `deblocking`/`multi-tile`/`fwd-kf` defaults (`:181-189`), `multi-tile` `0`, `fwd-kf` `0` | — | **TRUE** | `LOOPFILTER_ALL` (non-zero), `tile_columns/rows = 0`, `fwd_kf = 0` | keep | | ||
| 63 | +| 23 | NEVER_EXERCISED doc (`:46`) | "palette and intrabc only come on for screen content" | **TRUE** | `encoder.c:2079` `allow_screen_content_tools` from block counts; `seq_force_screen_content_tools` adaptive | keep | | ||
| 64 | + | ||
| 65 | +## Claims-a-gate spot check (class: a passing gate that never reaches the feature) | ||
| 66 | + | ||
| 67 | +Main's "one level down" class. Each entry naming a gate was checked against that | ||
| 68 | +gate's own asserts: | ||
| 69 | + | ||
| 70 | +| entry | gate named | gate exists | gate asserts the firing | verdict | | ||
| 71 | +|---|---|---|---|---| | ||
| 72 | +| dist-wtd (r1) | `a_distance_weighted_compound_stream_...` | yes | yes — `dist_wtd_comp_hits() > 0` | **VERIFIED** | | ||
| 73 | +| dual-filter | `a_real_aomenc_dual_filter_obmc_8x8_...` | yes | yes — `dual_filter_diff_hits() > before` | **VERIFIED** (census blind to it) | | ||
| 74 | +| flip-idtx | `a_real_aomenc_stream_with_a_1d_tx_class_...` | yes | yes — `compared_class1 > 0` | **VERIFIED** | | ||
| 75 | +| cfl-intra | `a_real_aomenc_sb128_stream_whose_skipped_cfl_...` | yes | yes — `dir_pairs > 0` (not skipped-CfL) | **VERIFIED for 1:4 pairs; GAP for the name's skipped-CfL** | | ||
| 76 | +| intrabc | `an_sb128_screen_stream_with_intrabc_...` | yes | yes — `blocks_total > 0 && fired_arms > 0` | **VERIFIED** | | ||
| 77 | +| restoration | `a_real_aomenc_10bit_restoration_stream_...` | yes | yes — `lr_*_hits` | **VERIFIED** | | ||
| 78 | +| superres (alias) | 5 superres gates | yes | yes — `superres_hits`/`predict_scaled_hits` | **VERIFIED** | | ||
| 79 | +| global-motion | `a_real_affine_global_motion_...` | yes | yes — affine GM counter | **VERIFIED** | | ||
| 80 | + | ||
| 81 | +**GAP (one):** no gate in the tree names `enable-rect-tx`, because the tool has no | ||
| 82 | +header bit and no flag-shaped decoder gate — a *structural* gap, correctly | ||
| 83 | +described by entry #7, not a broken gate. | ||
| 84 | + | ||
| 85 | +## The two structural census defects this audit exposed | ||
| 86 | + | ||
| 87 | +Both are stated in the corrected comments but are **census logic**, deliberately | ||
| 88 | +NOT changed in this lane (the brief forbids behaviour changes; the entry deletions | ||
| 89 | +are left in place so the file's own tests stay green): | ||
| 90 | + | ||
| 91 | +1. **`gate_bodies()` helper-delegation blind spot** (`gate_coverage.rs:421`). | ||
| 92 | + The filter keeps only a `#[test]`-shaped segment containing `--passes=1` / | ||
| 93 | + `ten_bit_tool_gate(` / `encode_10bit_gradients`. A gate that hands its recipe | ||
| 94 | + to a shared helper keeps the flags in the *helper*, so the whole gate is | ||
| 95 | + invisible. Measured: 165 of 311 segments are filtered out, and 6 of those | ||
| 96 | + spell at least one `--enable-X=1` — including both gates that prove | ||
| 97 | + `enable-dual-filter` (#3, #4). This is why two live entries are wrong. | ||
| 98 | + | ||
| 99 | +2. **`covers_both_depths` blind spot, third spelling** (`gate_coverage.rs:599`). | ||
| 100 | + It recognises only `if bit_depth == 10` / `if depth == 10` / | ||
| 101 | + `for depth in [8usize, 10]`. `a_real_aomenc_stream_with_a_1d_tx_class_...` | ||
| 102 | + builds both depths from a `ten_bit` recipe, so `is_ten_bit` sees the | ||
| 103 | + `yuv420p10le` and files it 10-bit-ONLY — hiding its 8-bit arm and keeping the | ||
| 104 | + 8-bit `enable-flip-idtx` entry alive (#5). This is the lane-defon/reelckf blind | ||
| 105 | + spot the function's own doc comment describes, reached through a new spelling. | ||
| 106 | + | ||
| 107 | +**Loud, for the coverage matrix:** entries `enable-dual-filter` (8-bit `:270`, | ||
| 108 | +10-bit `:374`) and `enable-flip-idtx` (8-bit `:291`) are **stale coverage holes** | ||
| 109 | +— the tools are exercised by gates with hard arrival asserts. The census is | ||
| 110 | +wrong, not the coverage. If another lane's matrix counts these as open cells, | ||
| 111 | +that matrix overstates the holes. Correcting the two structural defects above | ||
| 112 | +would let all three entries be deleted and this file's own test stay green. | ||
| 113 | + | ||
| 114 | +## What changed in this lane | ||
| 115 | + | ||
| 116 | +`crates/ec-av1/src/gate_coverage.rs` only, and the diff is **comment/reason-text | ||
| 117 | +only**: verified — the only non-comment lines changed are 3 entry *reason | ||
| 118 | +strings* (`gate_coverage.rs:272, 293, 376`). No flag name, entry membership, | ||
| 119 | +counter, gate, or decoder behaviour was touched. All 9 `gate_coverage` tests | ||
| 120 | +green after the change. No stream, gate, or counter behaviour altered, per brief. | ||