From 754210ba6ef73535c11c0241f1968d2d0bc958d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 20 Sep 2026 05:27:01 +0300 Subject: [PATCH] ec-av1: refuse using_qmatrix by name (third silent-garbage field) + census table The re-verifier refuted the report's "exactly two parsed-but-never-read pixel-affecting fields": QuantizationParams.using_qmatrix/qm_y/qm_u/qm_v are parsed by ec-av1-syntax (frame.rs:190-196, :1418-1426) and read by NOTHING on the decode path -- dequantisation is base_q_idx plus the plane DC/AC deltas -- so a spec-legal aomenc --enable-qm=1 stream decoded into silently wrong pixels. The same class the non-4:2:0 guard just closed for 4:4:4. - stream.rs decode_stream: refuse using_qmatrix=1 at the frame header, named, beside the non-4:2:0 guard. - Gate a_frame_using_quantisation_matrices_is_refused_by_name (stream.rs): real aomenc --enable-qm=0 control decodes; --enable-qm=1 refused by name. Fail-pre-fix measured: with the guard removed the gate panics "the --enable-qm=1 stream now decodes", and decode_probe shows those bytes byte-differ from ffmpeg while the qm-off twin is byte-exact. - refusal_inventory.rs: new REFUSALS entry + PROVEN pair; report 9.2's "exactly two" -> three, plus the field->consumer census table (every SequenceHeader / ColorConfig / QuantizationParams / FrameHeader field with its first production read or its disposition). - cdf_state.rs P3: wide()'s doc comment named the deleted txbset_for_inter, now inter_txbset_for. Gates: cargo test -p ec-av1 --lib -- refusal_inventory a_reader_told_not_to_adapt a_non_420 = 16 passed / 0 failed; cargo check -p ec-av1 --all-targets = 0 warnings. --- crates/ec-av1/src/cdf_state.rs | 6 +- crates/ec-av1/src/refusal_inventory.rs | 16 ++ crates/ec-av1/src/stream.rs | 70 ++++++++ lanes/av1txrouting.report.md | 238 +++++++++++++++++++++++-- 4 files changed, 315 insertions(+), 15 deletions(-) diff --git a/crates/ec-av1/src/cdf_state.rs b/crates/ec-av1/src/cdf_state.rs index 2ce94401..27c3e006 100644 --- a/crates/ec-av1/src/cdf_state.rs +++ b/crates/ec-av1/src/cdf_state.rs @@ -322,9 +322,9 @@ impl TxbSet { /// lane-txi: this set's `reduced_tx_set == 0` counterpart -- the WIDER /// `tx_type` alphabet the same coefficient tables are read with when the - /// frame header's bit is off. Every pair here is the one - /// `decode::txbset_for`/`txbset_for_inter`/`inter_txbset_for` resolve off - /// that bit, transcribed from the DECODER's own map so writer and reader + /// frame header's bit is off. Every pair here is the counterpart + /// `decode::txbset_for`/`inter_txbset_for` resolve off that bit, + /// transcribed from the DECODER's own map so writer and reader /// cannot drift (class `table-and-reader-move-together`); a set with no /// counterpart -- intra 16x16 and 32x32, inter 32x32, 64x64, every /// chroma set -- is its own, and widening an already-wide set is the diff --git a/crates/ec-av1/src/refusal_inventory.rs b/crates/ec-av1/src/refusal_inventory.rs index 5b453875..c214bfab 100644 --- a/crates/ec-av1/src/refusal_inventory.rs +++ b/crates/ec-av1/src/refusal_inventory.rs @@ -70,6 +70,14 @@ const REFUSALS: &[&str] = &[ // at the sequence header. Gate: // `a_non_420_subsampled_sequence_header_is_refused_by_name`. "a chroma format other than 4:2:0 (subsampling_x/y != 1/1): every chroma extent in this decoder is hardcoded to 4:2:0 and the probe emits 4:2:0 planes only, so a 4:4:4/4:2:2 stream would decode silently wrong pixels", + // lane-av1txr-r2: the third member of the same silent-garbage family. + // `using_qmatrix`/`qm_y`/`qm_u`/`qm_v` are parsed by `ec-av1-syntax` but + // read by NOTHING on the decode path -- dequantisation is `base_q_idx` + + // the plane DC/AC deltas only -- so a real `aomenc --enable-qm=1` stream + // decoded with no refusal and wrong pixels (measured: byte-diff vs ffmpeg + // while the qm-off control is byte-exact). Refused at the frame header. + // Gate: `a_frame_using_quantisation_matrices_is_refused_by_name`. + "a frame using quantisation matrices (using_qmatrix=1): dequantisation here is base_q_idx plus the plane DC/AC deltas only, so qm_y/qm_u/qm_v would be ignored and the frame would decode silently wrong pixels", // lane-lossless/lane-lossless2: a lossless frame (base_q_idx 0) decodes // sample-exact, KEY and INTER -- TX_4X4 with the Walsh-Hadamard transform // on every plane, no `tx_type` symbol, `is_cfl_allowed` narrowed to a @@ -321,6 +329,14 @@ const PROVEN: &[(&str, &str)] = &[ "a chroma format other than 4:2:0 (subsampling_x/y != 1/1): every chroma extent in this decoder is hardcoded to 4:2:0 and the probe emits 4:2:0 planes only, so a 4:4:4/4:2:2 stream would decode silently wrong pixels", "a_non_420_subsampled_sequence_header_is_refused_by_name", ), + // lane-av1txr-r2: the gate encodes the same source twice with real aomenc + // (`--enable-qm=1` and `--enable-qm=0`), asserts the qm-off CONTROL decodes + // and the qm-on stream is refused by name -- so the refusal is exercised + // against the exact encoder path it names, not merely present. + ( + "a frame using quantisation matrices (using_qmatrix=1): dequantisation here is base_q_idx plus the plane DC/AC deltas only, so qm_y/qm_u/qm_v would be ignored and the frame would decode silently wrong pixels", + "a_frame_using_quantisation_matrices_is_refused_by_name", + ), ( "intra block copy on a HORZ/VERT/1:4 rect intra strip (reconstruction is not ported at this shape)", "a_real_aomenc_screen_key_frame_reads_use_intrabc_on_rect_strips", diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index ec58e236..2ccf86ae 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -1631,6 +1631,24 @@ fn decode_frame( "a chroma format other than 4:2:0 (subsampling_x/y != 1/1): every chroma extent in this decoder is hardcoded to 4:2:0 and the probe emits 4:2:0 planes only, so a 4:4:4/4:2:2 stream would decode silently wrong pixels", )); } + // lane-av1txr-r2: `quantization_params.using_qmatrix` (spec 5.9.12) is + // parsed by `ec-av1-syntax` along with `qm_y`/`qm_u`/`qm_v` (frame.rs + // :190-196, :1418-1426), but this decoder reads NONE of them: every + // dequantisation below is `base_q_idx` plus the plane DC/AC deltas only + // (`Quantizer::new`), so a stream that applies quantisation matrices + // dequantises every coefficient off the wrong table. The same + // silent-garbage class as the non-4:2:0 guard above. Measured: a real + // `aomenc --enable-qm=1` key frame (`using_qmatrix = 1`, `qm_y/u/v = 5`) + // decodes with NO refusal and its planes byte-differ from ffmpeg, while + // the `--enable-qm=0` control of the same source and recipe is + // byte-exact. Refuse by name rather than return garbage. Gate: + // `a_frame_using_quantisation_matrices_is_refused_by_name` below. + if header.quantization.using_qmatrix { + return Err(Error::unsupported( + "AV1 decode_stream", + "a frame using quantisation matrices (using_qmatrix=1): dequantisation here is base_q_idx plus the plane DC/AC deltas only, so qm_y/qm_u/qm_v would be ignored and the frame would decode silently wrong pixels", + )); + } // lane-dpm1: a LOSSLESS frame (`qindex == 0` with zero deltas, spec 5.9.12) // is a different tile syntax, and this decoder has none of it: libaom // forces TX_4X4 with the WALSH-HADAMARD transform over every block (so no @@ -2099,6 +2117,58 @@ pub(crate) mod tests { assert_eq!(frames.len(), 1, "{NAME}: the 4:2:0 control decoded no frame"); } + /// lane-av1txr-r2: a frame using quantisation matrices is refused by name + /// -- the THIRD member of the silent-garbage family the non-4:2:0 gate + /// above opened (the verifier's census miss). + /// + /// `using_qmatrix`/`qm_y`/`qm_u`/`qm_v` are parsed by `ec-av1-syntax` + /// (frame.rs:190-196, :1418-1426) but have NO consumer anywhere on the + /// decode path -- every dequantisation is `base_q_idx` plus the plane + /// DC/AC deltas only. Measured on a real aomenc pair (same source and + /// recipe, only `--enable-qm` flipped): the qm-OFF control decodes + /// byte-exact vs ffmpeg, the qm-ON stream used to decode with NO refusal + /// and byte-differ from ffmpeg (silent garbage; class + /// `refusal-hides-a-defect` read the other way -- a silent wrong decode + /// is worse than a named gap). + /// + /// Both arms are real encoder output, so this is a reachability gate, not + /// a hand-built construction: the qm-on arm carries `using_qmatrix = 1` + /// (`qm_y/u/v = 5` on the measured fixture) and the refusal names the + /// field rather than desyncing. + #[test] + fn a_frame_using_quantisation_matrices_is_refused_by_name() { + const NAME: &str = "a_frame_using_quantisation_matrices_is_refused_by_name"; + const REFUSAL: &str = "a frame using quantisation matrices"; + if !have_ffmpeg() || !have_aomenc() { + eprintln!( + "SKIP {NAME}: needs ffmpeg + an aomenc oracle at {}", + aomenc_path().display() + ); + return; + } + // CONTROL: the same source and recipe with quantisation matrices OFF + // still decodes -- so the refusal below is about the qm bit, not about + // the source or the encoder settings. + let (_, control) = census_attempt("testsrc2", 128, 96, 3, &["--enable-qm=0"]); + let frames = control.unwrap_or_else(|e| { + panic!("{NAME}: the --enable-qm=0 control must decode, got: {e}") + }); + assert!(frames >= 1, "{NAME}: the qm-off control decoded no frame"); + // The qm-on stream is the new refusal. + let (_, qm) = census_attempt("testsrc2", 128, 96, 3, &["--enable-qm=1"]); + let err = qm.err().unwrap_or_else(|| { + panic!("{NAME}: the --enable-qm=1 stream now decodes -- flip this gate to a witness") + }); + assert!( + err.contains(REFUSAL), + "{NAME}: the qm-on stream stopped without the named refusal {REFUSAL:?} \ + -- re-measure before trusting this gate. got: {err}" + ); + eprintln!( + "{NAME}: qm-off control {frames} frames, qm-on refused by name ({REFUSAL})" + ); + } + /// lane-av1-decode (pilot resume, 2026-09-19): a real libaom MONOCHROME key /// frame is currently REFUSED BY NAME, and this gate pins that as today's /// measured first stop for a real encoder stream. diff --git a/lanes/av1txrouting.report.md b/lanes/av1txrouting.report.md index a757b0a8..9c75e67c 100644 --- a/lanes/av1txrouting.report.md +++ b/lanes/av1txrouting.report.md @@ -206,13 +206,15 @@ Evidence: ### 9.2 Parsed-but-unread pixel-affecting header field sweep -A census of every `SequenceHeader`/`ColorConfig`/frame-header field against the -decoder's reads (scout report, re-derivable by grep) found exactly two -pixel-affecting fields the decoder never consumed; both are now closed: +A per-field census of every `SequenceHeader` / `ColorConfig` / +`QuantizationParams` / `FrameHeader` field against the decoder's PRODUCTION +reads (`crates/ec-av1/src/{stream,decode}.rs`, test modules excluded; each row +re-derivable by `grep -n "\.\b"`) found **three** pixel-affecting fields +the decoder never consumed. All three are now closed: 1. `subsampling_x/y` — §9.1 (refusal). -2. **`disable_cdf_update`** (the new find): spec 8.3.2 skips ALL per-symbol CDF - adaptation when set, and libaom's tile entry does exactly that +2. **`disable_cdf_update`** (the second find): spec 8.3.2 skips ALL per-symbol + CDF adaptation when set, and libaom's tile entry does exactly that (`decodeframe.c:2909`, `allow_update_cdf && !disable_cdf_update`). The decoder adapted unconditionally. Fixed at the one authoring point: `msac::SymbolDecoder::adapt` (per READER, not global — frames decode on @@ -230,13 +232,163 @@ pixel-affecting fields the decoder never consumed; both are now closed: and its tables stay untouched; the default reader does not (flag load-bearing). -Everything else never-read is dispositioned as metadata (color_primaries / -transfer_characteristics / color_range / chroma_sample_position, timing and -frame-id fields, `showable_frame`, `render_width/height` — deliberate per -`encode.rs:15917-15921`), or consumed indirectly by the parser (seq gates forced -into the frame header: superres/CDEF/restoration/warped/enable_ref_frame_mvs, -`separate_uv_delta_q`, `seq_force_*`). `mono_chrome`/`num_planes` is the sibling -lane-av1-mono's. +3. **`using_qmatrix` + `qm_y`/`qm_u`/`qm_v`** — the census MISS this section + previously claimed did not exist (found by the re-verifier; lane-av1txr-r2). + Parsed by `ec-av1-syntax` (`frame.rs:190-196`, `:1418-1426`), read by + NOTHING on the decode path: every dequantisation is `base_q_idx` plus the + plane DC/AC deltas. A real `aomenc --enable-qm=1` stream + (`using_qmatrix = 1`, `qm_y/u/v = 5` on the measured fixture) decoded with NO + refusal and byte-differed from ffmpeg, while the `--enable-qm=0` control of + the same source and recipe was byte-exact — the same silent-garbage class as + §9.1. Refused by name at the frame header (`stream.rs`, beside the non-4:2:0 + guard); gate `a_frame_using_quantisation_matrices_is_refused_by_name`, which + fails pre-fix (with the guard removed it panics "the --enable-qm=1 stream now + decodes"). + +The table below is the audit artifact the re-verifier asked for: every field of +those four structs, its first production read, or its disposition when unread. +It is the source of the "three" above, so the census is checkable rather than a +grep claim. Dispositions: `consumed` (a decoder read exists), +`refused` (a named guard refuses the case), `parser-forced` (a seq flag +`ec-av1-syntax` folds into a frame-header field the decoder DOES read), +`parser-internal` (used only while reading the header), `metadata` (no pixel +effect), `sibling-lane` (`mono_chrome`/`num_planes`, lane-av1-mono), and +`internal-equivalent` (`ref_order_hint`/`order_hints`, which the decoder +rebuilds from its own saved reference state — `stream.rs:1344`). + + +**SequenceHeader** + +| field | disposition | first prod read | +|---|---|---| +| `seq_profile` | parser-internal | sequence.rs parse; effect surfaced via subsampling_x/y + bit_depth guards | +| `still_picture` | parser-internal | parse branch | +| `reduced_still_picture_header` | parser-internal | parse branch | +| `timing_info` | metadata | display timing | +| `decoder_model_info` | metadata | display timing | +| `initial_display_delay_present_flag` | metadata | display timing | +| `operating_points` | metadata | op selection; decoder decodes all | +| `operating_point` | metadata | op selection | +| `operating_point_idc` | metadata | op selection | +| `frame_width_bits` | parser-internal | frame-size read width | +| `frame_height_bits` | parser-internal | frame-size read width | +| `max_frame_width` | parser-internal | frame-size validation | +| `max_frame_height` | parser-internal | frame-size validation | +| `frame_id_numbers_present_flag` | parser-internal | display_frame_id read | +| `delta_frame_id_length` | parser-internal | display_frame_id read | +| `additional_frame_id_length` | parser-internal | display_frame_id read | +| `use_128x128_superblock` | consumed | `stream.rs:1267` | +| `enable_filter_intra` | consumed | `stream.rs:1261` | +| `enable_intra_edge_filter` | consumed | `stream.rs:1263` | +| `enable_interintra_compound` | consumed | `stream.rs:1266` | +| `enable_masked_compound` | consumed | `stream.rs:1264` | +| `enable_warped_motion` | parser-forced | syntax/frame.rs:1053 -> h.allow_warped_motion | +| `enable_dual_filter` | consumed | `stream.rs:1262` | +| `enable_order_hint` | parser-forced | syntax/frame.rs:919,1068 -> order_hint_bits / ref_frame_sign_bias | +| `enable_jnt_comp` | consumed | `stream.rs:1265` | +| `enable_ref_frame_mvs` | parser-forced | syntax/frame.rs:970 -> h.use_ref_frame_mvs | +| `seq_force_screen_content_tools` | parser-forced | syntax/frame.rs:853 -> h.allow_screen_content_tools | +| `seq_force_integer_mv` | parser-forced | syntax/frame.rs:859 -> h.force_integer_mv | +| `order_hint_bits` | consumed | `stream.rs:1269` | +| `enable_superres` | parser-forced | syntax/frame.rs:1100 -> h.use_superres | +| `enable_cdef` | parser-forced | syntax/frame.rs:1576 -> h.cdef | +| `enable_restoration` | parser-forced | syntax/frame.rs:1605 -> h.loop_restoration | +| `color_config` | consumed | `stream.rs:724` | +| `film_grain_params_present` | parser-forced | syntax/frame.rs:809,1866 -> h.film_grain | + +**ColorConfig** + +| field | disposition | first prod read | +|---|---|---| +| `bit_depth` | consumed | `stream.rs:678` | +| `mono_chrome` | sibling-lane | lane-av1-mono; a mono stream is currently refused by the Golomb tripwire | +| `num_planes` | sibling-lane | lane-av1-mono | +| `color_primaries` | metadata | H.273 display | +| `transfer_characteristics` | metadata | H.273 display | +| `matrix_coefficients` | consumed | `stream.rs:727` | +| `color_range` | metadata | output range; probe emits limited-range 4:2:0 | +| `subsampling_x` | consumed | `stream.rs:1248` | +| `subsampling_y` | consumed | `stream.rs:1272` | +| `chroma_sample_position` | metadata | display | +| `separate_uv_delta_q` | parser-internal | decides qm_v coding, syntax/frame.rs:1422 | + +**FrameHeader** + +| field | disposition | first prod read | +|---|---|---| +| `show_existing_frame` | consumed | `stream.rs:603` | +| `frame_to_show_map_idx` | consumed | `stream.rs:624` | +| `frame_presentation_time` | metadata | decoder-model bookkeeping | +| `display_frame_id` | metadata | frame-id bookkeeping | +| `frame_type` | consumed | `stream.rs:853` | +| `frame_is_intra` | parser-internal | derived from frame_type; decoder reads frame_type/show_frame | +| `show_frame` | consumed | `stream.rs:892` | +| `showable_frame` | metadata | output eligibility; film grain parse uses it | +| `error_resilient_mode` | parser-internal | controls header reads (refresh flags / primary_ref) | +| `disable_cdf_update` | consumed | `stream.rs:1687` | +| `allow_screen_content_tools` | consumed | `stream.rs:1796` | +| `force_integer_mv` | consumed | `stream.rs:1833` | +| `current_frame_id` | metadata | frame-id bookkeeping | +| `frame_size_override_flag` | parser-internal | frame-size read | +| `order_hint` | consumed | `stream.rs:989` | +| `primary_ref_frame` | consumed | `stream.rs:1312` | +| `buffer_removal_time` | metadata | decoder-model bookkeeping | +| `refresh_frame_flags` | consumed | `stream.rs:644` | +| `ref_order_hint` | internal-equivalent | decoder keeps its own ref_order_hints from saved ref state (stream.rs:1344) | +| `frame_width` | consumed | `stream.rs:1786` | +| `frame_height` | consumed | `stream.rs:1787` | +| `upscaled_width` | consumed | `stream.rs:1694` | +| `render_width` | metadata | deliberate (encode.rs:15917-15921); display crop only | +| `render_height` | metadata | deliberate (encode.rs:15917-15921); display crop only | +| `use_superres` | consumed | `stream.rs:1694` | +| `superres_denom` | consumed | `stream.rs:1695` | +| `mi_cols` | consumed | `stream.rs:1325` | +| `mi_rows` | consumed | `stream.rs:1324` | +| `allow_intrabc` | consumed | `stream.rs:1797` | +| `frame_refs_short_signaling` | parser-internal | parser derives ref_frame_idx (consumed) | +| `ref_frame_idx` | consumed | `stream.rs:876` | +| `delta_frame_id` | metadata | frame-id bookkeeping | +| `allow_high_precision_mv` | consumed | `stream.rs:1877` | +| `interpolation_filter` | consumed | `stream.rs:1703` | +| `is_motion_mode_switchable` | consumed | `stream.rs:1744` | +| `use_ref_frame_mvs` | consumed | `stream.rs:1317` | +| `order_hints` | internal-equivalent | derived by decoder from ref_order_hints | +| `ref_frame_sign_bias` | consumed | `stream.rs:1879` | +| `disable_frame_end_update_cdf` | consumed | `stream.rs:1369` | +| `tile_info` | consumed | `stream.rs:759` | +| `quantization` | consumed | `stream.rs:1370` | +| `segmentation` | consumed | `stream.rs:1405` | +| `delta` | consumed | `stream.rs:1798` | +| `coded_lossless` | parser-internal | computed by parser; h.lossless carries it (consumed) | +| `all_lossless` | parser-internal | computed by parser | +| `lossless` | consumed | `stream.rs:1671` | +| `loop_filter` | consumed | `stream.rs:1791` | +| `cdef` | consumed | `stream.rs:1747` | +| `loop_restoration` | consumed | `stream.rs:1748` | +| `tx_mode` | consumed | `stream.rs:1740` | +| `reference_select` | consumed | `stream.rs:1887` | +| `skip_mode_present` | consumed | `stream.rs:1746` | +| `skip_mode_frame` | consumed | `stream.rs:1892` | +| `allow_warped_motion` | consumed | `stream.rs:1743` | +| `reduced_tx_set` | consumed | `stream.rs:1742` | +| `global_motion` | consumed | `stream.rs:1880` | +| `film_grain` | consumed | `stream.rs:666` | +| `header_bits` | parser-internal | tile-group byte alignment | + +**QuantizationParams** + +| field | disposition | first prod read | +|---|---|---| +| `base_q_idx` | consumed | `stream.rs:1370` | +| `delta_q_y_dc` | consumed | `stream.rs:1780` | +| `delta_q_u_dc` | consumed | `stream.rs:1781` | +| `delta_q_u_ac` | consumed | `stream.rs:1782` | +| `delta_q_v_dc` | consumed | `stream.rs:1783` | +| `delta_q_v_ac` | consumed | `stream.rs:1784` | +| `using_qmatrix` | refused | read at `stream.rs:1634` and refused by name | +| `qm_y` | refused | only present under using_qmatrix=1, now refused by name | +| `qm_u` | refused | only present under using_qmatrix=1, now refused by name | +| `qm_v` | refused | only present under using_qmatrix=1, now refused by name | ### 9.3 transform.rs:1134 panic — ROOT-CAUSED AND FIXED (not a refusal) @@ -327,3 +479,65 @@ and is left standing. 3. Add the 4x8/8x4 intrabc witnesses to the media-gated corpus (a real stream that codes one: `warped.obu` reaches `RECT_INTRABC_VARTX_HITS == 1` and now decodes past the old divergence). + +## 10. Continuation r2 (2026-09-20): the refuted census + the third silent-garbage member + +The re-verifier REFUTED §9.2's "exactly two parsed-but-never-read +pixel-affecting fields". A third existed, and it was the same silent-garbage +class §9.1 had just closed for 4:4:4. This round is that finding. + +### 10.1 The fix: `using_qmatrix` refused by name + +`QuantizationParams.using_qmatrix` + `qm_y`/`qm_u`/`qm_v` are parsed +(`ec-av1-syntax/src/frame.rs:190-196`, `:1418-1426`) and read by NOTHING on the +decode path — dequantisation is `base_q_idx` + the plane DC/AC deltas only. A +spec-legal `aomenc --enable-qm=1` stream therefore decoded into silently wrong +pixels. + +`stream.rs`'s `decode_stream` now refuses it at the frame header, beside the +non-4:2:0 guard: + +``` +if header.quantization.using_qmatrix { + return Err(Error::unsupported( + "AV1 decode_stream", + "a frame using quantisation matrices (using_qmatrix=1): dequantisation here is \ + base_q_idx plus the plane DC/AC deltas only, so qm_y/qm_u/qm_v would be ignored \ + and the frame would decode silently wrong pixels", + )); +} +``` + +### 10.2 Evidence + +- Measured pair (real aomenc, same source / recipe, only `--enable-qm` flipped; + `~/.cache/aom-oracle/build/aomenc`): the qm-OFF stream is byte-exact vs + ffmpeg; the qm-ON stream (`using_qmatrix = 1`, `qm_y/u/v = 5`) decoded with NO + refusal and its planes byte-differed from ffmpeg. + `EC_AV1_PIN= ... scratch_isolate_pinned_mismatch --ignored` prints the + parsed `using_qmatrix = true` on every frame. +- Gate `a_frame_using_quantisation_matrices_is_refused_by_name` (stream.rs): + encodes `--enable-qm=0` and `--enable-qm=1` with real aomenc via + `census_attempt`, asserts the qm-off CONTROL decodes and the qm-on stream + refuses by name. +- **Fail-pre-fix**, measured: with the guard removed the gate panics + `the --enable-qm=1 stream now decodes -- flip this gate to a witness` (and the + decode_probe pair above shows those bytes are wrong). +- Inventory: new `REFUSALS` entry + `PROVEN` pair; P3 doc fix — + `cdf_state.rs`'s `wide()` comment named the deleted `txbset_for_inter`, now + `inter_txbset_for`. + +### 10.3 Gates (this round) + +- `cargo test -p ec-av1 --lib -- refusal_inventory + a_reader_told_not_to_adapt a_non_420`: 16 passed, 0 failed. +- fail-pre-fix run (guard removed): 1 failed, 0 passed — the gate is + non-vacuous. +- `cargo check -p ec-av1 --all-targets`: 0 warnings. +- The full 595-test suite re-run belongs to the re-verifier. + +### 10.4 Next steps + +Unchanged from §9.7. This round closes the census hole; the warped key-frame +tx-depth context (§9.4) and the 1:4-rect-strip intrabc (lane 3) are still open. +