forge
Explore
Log in

Don't you dare go Hollow

lanes/av1sb128chroma: the SB128 chroma arm is already correct -- cu_tx=64 is a panic, and its witness never reaches the arm

Browse files at this commit

00bda1c68da67220c608c9c77cdbc6c795ee4707Ahmet Kaan GümüşParent: bd8cc17
The ticket named the `side > 64` mu-chunk chroma arm of the intra-in-inter
128 root (decode.rs:43568, the `EC_TMP_SB128CHROMA` site) and asked for
`cu_tx = 64` at ss (0,0) with a per-chunk chroma origin. None of that is
a defect, and the central premise is false.

`av1_get_max_uv_txsize` (blockd.h:1372) is
`av1_get_adjusted_tx_size(max_txsize_rect_lookup[get_plane_block_size(...)])`,
and `av1_get_adjusted_tx_size` (blockd.h:1361) maps TX_64X64 -> TX_32X32
UNCONDITIONALLY -- it takes no subsampling argument, so the 64 -> 32 step
fires at ss (0,0) too. `av1_get_max_uv_txsize(BLOCK_128X128, 0, 0)` is
TX_32X32, not TX_64X64. The site already reads `cu_tx = 32`,
`cu_tx << ss` for the luma span, and a per-chunk AND per-unit origin; that
form landed on main in c0727d64 (lane-av1txsizeaudit r5).

The ticket's evidence stream also cannot witness the arm. Its recipe
(testsrc2 128x96 yuv444p, --sb-size=128 --cq-level=20, 24 frames, sha256
84de4280...) reads intra_128_in_inter=0, mu_chroma=0, chroma_split_tx=0:
on clean testsrc2 the encoder's RD never picks INTRA over inter for a whole
128 root. The "20 fires" was the other `side > 64` chroma walk (the INTER
twin) or a count inflated under the removed masking fork -- re-measured, it
is 0.

Mutation proof on a pinned 4:4:4 witness that DOES reach the arm
(sha256 f5999bd9..., 3570 B, 3 frames, intra_128_in_inter=1,
intra_128_in_inter_mu_chroma_hits=4):

  A. the ticket's full change -> HARD PANIC at decode.rs:7197,
     "no default scan for a 64-point transform" -- libaom has no 64-point
     chroma scan table.
  B. its luma-span + per-chunk-origin halves alone -> RED, Y 12537,
     U 16696, V 16667 wrong of 98304 per plane, first at Y(90,120) ours
     142 vs oracle 141, all on decode-order frame 2, counters still 1/4.

So: no source change (`git diff crates/ec-av1/src/decode.rs` is empty).
What the ticket was right about is the fixture gap -- the arm had no
committed 4:4:4 bytes, only a live-encode gate that silently skips without
ffmpeg/aomenc. This commit closes it.

Gate `a_444_intra_in_inter_128root_muchroma_pinned_stream_decodes_pixel_exact`
pins the witness (len + fnv1a64), asserts the ss (0,0) 128-superblock
header, asserts the full-resolution chroma shape, the byte-exact compare
through the oracle aomdec, and non-vacuity via the two arm counters
(>= 1 root, >= 4 mu-chunk chroma reads). Its COUNTER-PROOF arm pins the
ticket's own stream as a control and asserts it decodes 24/24 byte-exact
while reading (0, 0) -- so the refutation stays reproducible in-crate with
no encoder on the host.

Identity: all 44 4:4:4/4:2:0 gates and the 128-root/lossless families
(55 passed, 0 failed, 11 pre-existing ignored) green against this
decode.rs; cargo check --all-targets clean.
crates/ec-av1/fixtures/444_intra_in_inter_128root_mu_chroma.obuadded+0 -0

Binary file changed

crates/ec-av1/fixtures/444_sb128cq20_tsrc2_control.obuadded+0 -0

Binary file changed

crates/ec-av1/src/stream.rsmodified+202 -0
@@ -38022,6 +38022,208 @@ pub(crate) mod tests {
38022 );38022 );
38023 }38023 }
38024 38024
38025+ /// lane-av1sb128chroma: the PINNED half of
38026+ /// [`a_real_aomenc_444_intra_in_inter_128_root_codes_chroma_per_mu_chunk_unit_pixel_exact`].
38027+ /// That gate re-encodes its fixture on every run, so the arm it names had
38028+ /// NO committed 4:4:4 bytes at all: a host without ffmpeg/aomenc silently
38029+ /// skips it, and the whole committed 4:4:4 base is lossless 8-bit, so
38030+ /// nothing else in the crate decoded one of these streams. This gate is
38031+ /// the pin, and it also carries the COUNTER-PROOF arm: the recipe a
38032+ /// proposed 4:4:4 `--sb-size=128` chroma repair was argued from reads
38033+ /// ZERO on both the arm's own counters, so its green is vacuous.
38034+ ///
38035+ /// **Witness** `fixtures/444_intra_in_inter_128root_mu_chroma.obu`,
38036+ /// sha256 `f5999bd996fef820472dc7846e42cad3e62bd1f816fafd7f218e34b77786394a`,
38037+ /// 3570 bytes, 3 decode-order frames. Recipe (verified byte-reproducible):
38038+ /// ```text
38039+ /// ffmpeg -v error -f lavfi -i "gradients=size=128x256:c0=0xa1128f:c1=0xd98c48:\
38040+ /// c2=0x120601:c3=0x4abfba:seed=63:duration=0.12:rate=25,\
38041+ /// noise=all_seed=63:alls=6:allf=t" -pix_fmt yuv444p -t 0.12 -f yuv4mpegpipe - > in.y4m
38042+ /// aomenc --codec=av1 --profile=1 --passes=1 --end-usage=q --cq-level=62 \
38043+ /// --cpu-used=0 --threads=1 --row-mt=0 --sb-size=128 --limit=3 \
38044+ /// --max-partition-size=128 --min-partition-size=64 \
38045+ /// --enable-rect-partitions=0 --enable-ab-partitions=0 \
38046+ /// --enable-1to4-partitions=0 --enable-palette=0 --enable-intrabc=0 \
38047+ /// --deltaq-mode=0 --enable-tx-size-search=0 --obu -o out.obu in.y4m
38048+ /// ```
38049+ /// `duration=0.12:rate=25` and `--limit=3` are load-bearing (the
38050+ /// `gradients`/`noise` patterns are time-parameterised, and at `--limit=2`
38051+ /// the encoder stops choosing INTRA over inter for a whole 128 root).
38052+ ///
38053+ /// **Measured on this witness** (unpatched `main` `57834ee2`): the arm
38054+ /// fires `intra_128_in_inter_hits = 1` root and
38055+ /// `intra_128_in_inter_mu_chroma_hits = 4` mu-chunk chroma reads (a 4:4:4
38056+ /// 64x64 mu chunk is FOUR TX_32X32 units per plane, two chunks, one
38057+ /// plane reached before the other), and all 3 frames are byte-exact
38058+ /// against the oracle. The claimed `cu_tx = 64` repair is refuted by two
38059+ /// independent measurements: (a) with `cu_tx` at 64 this arm PANICS --
38060+ /// `no default scan for a 64-point transform` at `decode.rs:7197`, because
38061+ /// libaom's `av1_get_adjusted_tx_size` (blockd.h:1361) maps TX_64X64 to
38062+ /// TX_32X32 unconditionally, so a 4:4:4 chroma unit is never 64 and
38063+ /// `av1_scan_orders` has no 64-point chroma table; (b) with only the
38064+ /// luma-span and per-chunk-origin halves of that repair applied (`cu_tx`
38065+ /// left at 32 so the mutation reaches the pixels), this same witness goes
38066+ /// RED: Y 12537, U 16696, V 16667 wrong samples of 98304 per plane,
38067+ /// first at Y(90,120) ours 142 vs oracle 141, U(65,120) 153 vs 152,
38068+ /// V(64,120) 145 vs 146 -- all of it on decode-order frame 2, and the
38069+ /// counters still read 1/4, so the damage is on PIXELS.
38070+ #[test]
38071+ fn a_444_intra_in_inter_128root_muchroma_pinned_stream_decodes_pixel_exact() {
38072+ const NAME: &str =
38073+ "a_444_intra_in_inter_128root_muchroma_pinned_stream_decodes_pixel_exact";
38074+ const WITNESS_LEN: usize = 3570;
38075+ const WITNESS_FNV: u64 = 0xe455_060d_f685_86dd;
38076+ const CONTROL_LEN: usize = 31602;
38077+ const CONTROL_FNV: u64 = 0xc542_f45f_f3a5_d494;
38078+ const W: usize = 128;
38079+ const H: usize = 256;
38080+ const FRAMES: usize = 3;
38081+ let dir = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("fixtures");
38082+ let read_pinned = |name: &str, len: usize, fnv: u64| -> Vec<u8> {
38083+ let path = dir.join(name);
38084+ let bytes = std::fs::read(&path).unwrap_or_else(|e| {
38085+ panic!(
38086+ "{NAME}: pinned fixture {} is missing ({e}) -- the gate cannot run, \
38087+ which is a failure, not a skip",
38088+ path.display()
38089+ )
38090+ });
38091+ assert_eq!(bytes.len(), len, "{NAME}: {name} length moved");
38092+ assert_eq!(fnv1a64(&bytes), fnv, "{NAME}: {name} bytes moved");
38093+ bytes
38094+ };
38095+ let stream = read_pinned(
38096+ "444_intra_in_inter_128root_mu_chroma.obu",
38097+ WITNESS_LEN,
38098+ WITNESS_FNV,
38099+ );
38100+
38101+ let _gate_lock = lock_gate_counters();
38102+ // The shape claim first: a stream that silently came back 4:2:0 would
38103+ // leave the arm unexercised while every other assert still passed.
38104+ let header = {
38105+ let mut parser = ec_av1_syntax::Av1Parser::new();
38106+ let mut pos = 0usize;
38107+ while let Ok(obu) = parser.parse_obu(&stream[pos..]) {
38108+ pos += obu.total_size;
38109+ if pos >= stream.len() {
38110+ break;
38111+ }
38112+ }
38113+ parser.sequence_header().map(|q| {
38114+ (
38115+ q.use_128x128_superblock,
38116+ q.color_config.subsampling_x,
38117+ q.color_config.subsampling_y,
38118+ q.color_config.mono_chrome,
38119+ )
38120+ })
38121+ };
38122+ assert_eq!(
38123+ header,
38124+ Some((true, 0, 0, false)),
38125+ "{NAME}: the witness is not a 4:4:4 (ss 0/0, non-mono) 128x128-superblock stream \
38126+ -- {header:?}, so the arm under test is not the one that ran"
38127+ );
38128+ let before = (
38129+ crate::decode::intra_128_in_inter_hits(),
38130+ crate::decode::intra_128_in_inter_mu_chroma_hits(),
38131+ );
38132+ let (decoded, hidden) = decode_all_frames_vs_oracle(&stream, NAME);
38133+ let (roots, units) = (
38134+ crate::decode::intra_128_in_inter_hits() - before.0,
38135+ crate::decode::intra_128_in_inter_mu_chroma_hits() - before.1,
38136+ );
38137+ assert_eq!(decoded, FRAMES, "{NAME}: decode-order frame count");
38138+ // At 4:4:4 the chroma planes are full resolution; a decoder that kept
38139+ // the 4:2:0 extent would hand quarter-size chroma to the byte compare,
38140+ // which cannot pass. Say it here rather than let the compare stand in
38141+ // for the shape claim.
38142+ for f in crate::stream::decode_stream(&stream)
38143+ .unwrap_or_else(|e| panic!("{NAME}: the witness no longer decodes cleanly: {e}"))
38144+ {
38145+ assert_eq!((f.width, f.height), (W, H), "{NAME}: frame dimensions");
38146+ assert_eq!(
38147+ f.u.len(),
38148+ W * H,
38149+ "{NAME}: chroma plane is {} samples",
38150+ f.u.len()
38151+ );
38152+ }
38153+ assert!(
38154+ roots >= 1,
38155+ "{NAME}: no INTRA-coded 128x128 root inside an inter frame -- the arm under \
38156+ test never ran"
38157+ );
38158+ assert!(
38159+ units >= 4,
38160+ "{NAME}: only {units} mu-chunk chroma reads across {roots} intra-in-inter 128 \
38161+ root(s) -- a 4:4:4 64x64 mu chunk is FOUR TX_32X32 units per plane, so fewer \
38162+ than four means the per-unit walk this gate names did not run"
38163+ );
38164+ eprintln!(
38165+ "{NAME}: {decoded} decode-order frame(s) pixel-exact ({hidden} hidden), \
38166+ intra_128_in_inter={roots} mu_chunk_chroma_reads={units}"
38167+ );
38168+
38169+ // The COUNTER-PROOF arm. The 4:4:4 `--sb-size=128 --cq-level=20`
38170+ // `testsrc2` recipe a 64-point-chroma repair was argued from is
38171+ // byte-exact on all 24 frames AND reads ZERO on both of the arm's
38172+ // counters: on clean `testsrc2` the encoder's RD never picks INTRA
38173+ // over inter for a whole 128 root, so that stream cannot witness this
38174+ // arm at all. Pinning it keeps the refutation reproducible in-crate
38175+ // with no encoder on the host.
38176+ let control = read_pinned("444_sb128cq20_tsrc2_control.obu", CONTROL_LEN, CONTROL_FNV);
38177+ let ctl_header = {
38178+ let mut parser = ec_av1_syntax::Av1Parser::new();
38179+ let mut pos = 0usize;
38180+ while let Ok(obu) = parser.parse_obu(&control[pos..]) {
38181+ pos += obu.total_size;
38182+ if pos >= control.len() {
38183+ break;
38184+ }
38185+ }
38186+ parser.sequence_header().map(|q| {
38187+ (
38188+ q.use_128x128_superblock,
38189+ q.color_config.subsampling_x,
38190+ q.color_config.subsampling_y,
38191+ )
38192+ })
38193+ };
38194+ assert_eq!(
38195+ ctl_header,
38196+ Some((true, 0, 0)),
38197+ "{NAME}: the control stream is not the 4:4:4 128-superblock stream its recipe \
38198+ names -- {ctl_header:?}"
38199+ );
38200+ let ctl_before = (
38201+ crate::decode::intra_128_in_inter_hits(),
38202+ crate::decode::intra_128_in_inter_mu_chroma_hits(),
38203+ );
38204+ let ctl_frames = crate::stream::decode_stream(&control)
38205+ .unwrap_or_else(|e| panic!("{NAME}: the control stream no longer decodes: {e}"))
38206+ .len();
38207+ let ctl = (
38208+ crate::decode::intra_128_in_inter_hits() - ctl_before.0,
38209+ crate::decode::intra_128_in_inter_mu_chroma_hits() - ctl_before.1,
38210+ );
38211+ assert_eq!(ctl_frames, 24, "{NAME}: control frame count");
38212+ assert_eq!(
38213+ ctl,
38214+ (0, 0),
38215+ "{NAME}: the control stream now reaches the arm ({ctl:?}) -- the witness's \
38216+ non-vacuity argument rested on `testsrc2` never choosing an \
38217+ intra-coded 128 root, and that is no longer true, so the two \
38218+ fixtures no longer separate the cells"
38219+ );
38220+ if aomdec_available(NAME) {
38221+ let (ctl_decoded, ctl_hidden) = decode_all_frames_vs_oracle(&control, NAME);
38222+ assert_eq!(ctl_decoded, 24, "{NAME}: control decode-order frame count");
38223+ eprintln!("{NAME}: control {ctl_decoded} frame(s) pixel-exact ({ctl_hidden} hidden)");
38224+ }
38225+ }
38226+
38025 /// lane-sbpart r2: a real `aomenc` stream whose superblock-level38227 /// lane-sbpart r2: a real `aomenc` stream whose superblock-level
38026 /// partition decision is genuinely HORZ/VERT (not NONE/SPLIT) must38228 /// partition decision is genuinely HORZ/VERT (not NONE/SPLIT) must
38027 /// decode pixel-exact through [`crate::decode::decode_block_rect64`] --38229 /// decode pixel-exact through [`crate::decode::decode_block_rect64`] --
lanes/av1sb128chroma.report.mdadded+280 -0
@@ -0,0 +1,280 @@
1+# lane-av1sb128chroma — the ticket's `cu_tx = 64` repair is REFUTED; the arm is pinned and gated
2+
3+Base: `main` `57834ee2` ("Merge lane-av1chromarect-r2 …"). Branch
4+`lane-av1sb128chroma`, worktree `/home/user/.cache/wt/av1sb128chroma`.
5+Oracle `~/.cache/aom-oracle` (aom `v3.13.3-7-g9bb526a`, instrumented), read-only.
6+
7+**Verdict: no source fix — there is nothing to fix.** The site named by the
8+ticket is *already* the repaired form, and the repair itself is a hard panic
9+plus a 45 900-sample pixel divergence when applied. What the ticket's premise
10+was right about is the *fixture* gap: this arm had no committed bytes, so I
11+pinned the witness, added the gate, and closed the ticket on evidence.
12+
13+---
14+
15+## 0. The prerequisite is on `main` — here is the commit
16+
17+The ticket's stated unblock was `lane-av1444rect` `f92776ba` (the H1 fix).
18+
19+```
20+$ git merge-base --is-ancestor f92776ba main && echo YES
21+YES
22+$ git show -s --format='%H %ad %s' f92776ba
23+f92776bab2442319e32d4f56844af6956e2fc18b Mon Sep 28 21:32:43 2026 +0300
24+ ec-av1: lane-av1444rect -- a 1:4 inter strip's chroma context was gathered
25+ at the 4:2:0 pair extent at ss (0,0), forking the coder (H1)
26+```
27+
28+Confirmed on `main`. H1 is the `decode_inter_block` `around_c` context
29+geometry, a **different arm** from the one under test (see §2).
30+
31+---
32+
33+## 1. The site, re-located
34+
35+The ticket says "around 41930, re-locate with grep". Line numbers have drifted.
36+The `EC_TMP_SB128CHROMA` counter that report line names is `lanes/av1tilerows.report.md:192`;
37+grepping the crate for it finds nothing (it was removed), and its successor
38+counter is `INTRA_128_IN_INTER_MU_CHROMA_HITS` (decode.rs:5591, hit at 43576).
39+
40+The arm is the **`side > 64` mu-chunk chroma walk of the INTRA-in-inter 128
41+root**, `decode.rs:43568-43772`, inside `decode_inter_block`. Its three
42+claimed defects are all present in the *repaired* form:
43+
44+| line | ticket says it is | actually is |
45+|---|---|---|
46+| 43592 | `cu_tx = 32` is the 4:2:0 answer, must be `64` at ss (0,0) | `cu_tx = 32` — **correct at every subsampling** (§3) |
47+| 43599-43600 | `luma_span = cu_tx * 2` is the 4:2:0 answer | `cu_tx << ss_x(fctx)` — already ss-aware |
48+| 43667-43670 | the origin is per-chunk, should be `cpx + cc * 64` | `cpx + cc * chunk_chroma_w + uc * cu_tx` — per-chunk **and** per-unit |
49+
50+`git log -L 43568,43620:crates/ec-av1/src/decode.rs` names the commit that put
51+it there: **`c0727d64` "lanes/av1txsizeaudit r5: re-re-base onto ec4e9528,
52+declare provenance of the foreign work"**, which is
53+`git merge-base --is-ancestor c0727d64 main` → **ON MAIN**. That same commit
54+added the live-encode gate
55+`a_real_aomenc_444_intra_in_inter_128_root_codes_chroma_per_mu_chunk_unit_pixel_exact`
56+(stream.rs:37893) with the counter-argument already written out at
57+stream.rs:37883-37891.
58+
59+---
60+
61+## 2. Which arm the ticket's `20 fires` was counting — NOT this one
62+
63+The ticket's evidence is a 4:4:4 lossy `--sb-size=128 --cq-level=20` stream
64+with "20 fires at ss=(0,0) side=128". I encoded exactly that and measured both
65+sets of counters on it (throwaway probe, since removed):
66+
67+```
68+$ aomenc --codec=av1 --profile=1 --passes=1 --end-usage=q --cq-level=20 \
69+ --cpu-used=2 --threads=1 --row-mt=0 --lag-in-frames=0 --kf-max-dist=100 \
70+ --limit=24 --sb-size=128 --obu -o ts444_cq20.obu testsrc2_128x96.y4m
71+sha256 84de42800452d69f5db8dfec7c538ef34d66b26dce7eb428c1960f80df3a103a, 31602 B, 24 frames
72+header: (sb128=true, ss_x=0, ss_y=0, mono=false) -> 4:4:4 confirmed
73+
74+frames oracle=24 ours=24
75+intra_128_in_inter=0 mu_chroma=0 chroma_split_tx=0 <-- the arm NEVER runs
76+per-plane wrong Y=0 U=0 V=0 per-frame wrong [0,0,... x24]
77+```
78+
79+**Zero fires, not 20.** On clean `testsrc2` the encoder's RD never picks INTRA
80+over inter for a whole 128 root, so this recipe cannot reach the arm at all —
81+and `lanes/av1txsizeaudit`'s author already measured the same thing
82+("measured over 24 recipe/cell combinations, three of which fired and none of
83+them `testsrc2`", stream.rs:37863-37865). The 20 was a count of the *other*
84+`side > 64` chroma walk (the INTER twin, `chroma_split_tx_hits`), or a count
85+inflated under the now-removed masking fork; either way it is not this arm.
86+The ticket's own instruction — "re-measure rather than adopt either number" —
87+is what produced 0.
88+
89+So the ticket's proposed evidence stream is **vacuous for the arm it names**.
90+That is the finding.
91+
92+---
93+
94+## 3. `av1_get_max_uv_txsize(BLOCK_128X128, 0, 0)` is `TX_32X32`, not `TX_64X64`
95+
96+The ticket's central "known fact" is the whole basis for `cu_tx = 64`. It is
97+false. Read from the oracle tree:
98+
99+```c
100+/* av1/common/blockd.h:1361-1370 */
101+static inline TX_SIZE av1_get_adjusted_tx_size(TX_SIZE tx_size) {
102+ switch (tx_size) {
103+ case TX_64X64:
104+ case TX_64X32:
105+ case TX_32X64: return TX_32X32; /* <-- unconditional 64 -> 32 */
106+ case TX_64X16: return TX_32X16;
107+ case TX_16X64: return TX_16X32;
108+ default: return tx_size;
109+ }
110+}
111+
112+/* av1/common/blockd.h:1372-1379 */
113+static inline TX_SIZE av1_get_max_uv_txsize(BLOCK_SIZE bsize, int subsampling_x,
114+ int subsampling_y) {
115+ const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, subsampling_x, subsampling_y);
116+ const TX_SIZE uv_tx = max_txsize_rect_lookup[plane_bsize];
117+ return av1_get_adjusted_tx_size(uv_tx);
118+}
119+```
120+
121+`av1_get_adjusted_tx_size` takes **no subsampling argument**. At ss (0,0),
122+`get_plane_block_size(BLOCK_128X128, 0, 0) == BLOCK_128X128` and
123+`max_txsize_rect_lookup[BLOCK_128X128] == TX_64X64`, so the answer is
124+`adjusted(TX_64X64) == TX_32X32`. The 64→32 step fires **at ss (0,0) too**,
125+which is exactly the point the ticket's derivation misses.
126+`lanes/av1txsizeaudit.report.md` §0.1 measured the same table with a C probe
127+linked against the oracle's own `libaom.a`
128+(`DIRECT bsize=BLOCK_128X128 ss=00 … adjusted=3 (32x32)`), and §0.2 measured
129+it at runtime from the oracle's `EC_TRACE_COEFF` on a 4:4:4 `--sb-size=128`
130+stream: **chroma reads 0 units of any 64-axis shape, 49 units of `tx=3`
131+(TX_32X32)**.
132+
133+Two independent confirmations from my own runs below: `cu_tx = 64` makes this
134+crate **panic on a 64-point scan table that libaom does not have**
135+(§5, mutation A), and the arm's own live-encode gate measured
136+`mu_chunk_chroma_reads = 4` on the firing witness — four TX_32X32 units, not
137+one TX_64X64.
138+
139+---
140+
141+## 4. The witness (pinned) and the counter
142+
143+**Fixture** `crates/ec-av1/fixtures/444_intra_in_inter_128root_mu_chroma.obu`
144+— sha256 `f5999bd996fef820472dc7846e42cad3e62bd1f816fafd7f218e34b77786394a`,
145+3570 bytes, 3 decode-order frames, fnv1a64 `0xe455_060d_f685_86dd`.
146+
147+**Recipe**, re-run and `cmp`-confirmed byte-reproducible:
148+
149+```text
150+ffmpeg -v error -f lavfi -i \
151+ "gradients=size=128x256:c0=0xa1128f:c1=0xd98c48:c2=0x120601:c3=0x4abfba:\
152+seed=63:duration=0.12:rate=25,noise=all_seed=63:alls=6:allf=t" \
153+ -pix_fmt yuv444p -t 0.12 -f yuv4mpegpipe - > in.y4m
154+
155+aomenc --codec=av1 --profile=1 --passes=1 --end-usage=q --cq-level=62 \
156+ --cpu-used=0 --threads=1 --row-mt=0 --sb-size=128 --limit=3 \
157+ --max-partition-size=128 --min-partition-size=64 \
158+ --enable-rect-partitions=0 --enable-ab-partitions=0 \
159+ --enable-1to4-partitions=0 --enable-palette=0 --enable-intrabc=0 \
160+ --deltaq-mode=0 --enable-tx-size-search=0 --obu -o out.obu in.y4m
161+```
162+
163+`duration=0.12:rate=25` and `--limit=3` are load-bearing (the `gradients` /
164+`noise` patterns are time-parameterised, and at `--limit=2` the encoder stops
165+choosing the shape at all).
166+
167+**Counter, quoted** — the arm fires on the pinned witness:
168+
169+```
170+$ cargo test -p ec-av1 --lib -- a_444_intra_in_inter_128root_muchroma_pinned --nocapture
171+a_444_intra_in_inter_128root_muchroma_pinned_stream_decodes_pixel_exact:
172+ 3 decode-order frame(s) pixel-exact (0 hidden),
173+ intra_128_in_inter=1 mu_chunk_chroma_reads=4
174+a_444_intra_in_inter_128root_muchroma_pinned_stream_decodes_pixel_exact:
175+ control 24 frame(s) pixel-exact (0 hidden)
176+test result: ok. 1 passed; 0 failed
177+```
178+
179+`intra_128_in_inter_hits = 1` (one intra-coded 128x128 root inside an inter
180+frame) and `intra_128_in_inter_mu_chroma_hits = 4` (mu-chunk chroma reads:
181+a 4:4:4 64x64 mu chunk is FOUR TX_32X32 units per plane, and the walk
182+`continue`s after the first chunk's arms). The gate asserts `roots >= 1` and
183+`units >= 4`, so it is non-vacuous by construction. The pre-existing
184+live-encode gate independently reports the same `1` / `4` on the same recipe,
185+so the pin matches it byte-for-byte.
186+
187+**Control, also pinned** —
188+`crates/ec-av1/fixtures/444_sb128cq20_tsrc2_control.obu`, sha256
189+`84de42800452d69f5db8dfec7c538ef34d66b26dce7eb428c1960f80df3a103a`, 31602 B,
190+24 frames, fnv1a64 `0xc542_f45f_f3a5_d494`. This is the ticket's own recipe
191+(§2). The gate asserts it decodes 24 frames byte-exact **and** reads
192+`(0, 0)` on both arm counters, which is what pins the refutation in-crate
193+with no encoder on the host.
194+
195+---
196+
197+## 5. Red / green
198+
199+**GREEN, unpatched `main` `57834ee2`:** all 3 decode-order frames of the
200+pinned witness byte-exact vs the oracle `aomdec`; per-plane wrong
201+**Y 0, U 0, V 0**; 24/24 frames of the control byte-exact.
202+
203+There is no red-before *of the site*, because the site is already correct.
204+The red is therefore measured on the **ticket's proposed change**, applied to
205+the site and then reverted. Two directions, both of which make the new gate
206+fail:
207+
208+### Mutation A — the ticket's full change (`cu_tx = 64` at ss (0,0),
209+plus `unit_luma_w/h = cu_tx * 2`, plus `(cpx + cc * 64, cpy + cr * 64)`)
210+
211+```
212+thread 'stream::tests::a_444_intra_in_inter_128root_muchroma_pinned_stream_decodes_pixel_exact'
213+panicked at crates/ec-av1/src/decode.rs:7197:5:
214+no default scan for a 64-point transform
215+test result: FAILED. 0 passed; 1 failed
216+```
217+
218+Not a pixel divergence — a **hard panic**. libaom's `av1_scan_orders` has no
219+64-point chroma table (a 64-axis transform codes only its 32x32 corner;
220+scan.c aliases TX_64X64 to `default_scan_32x32`), so asking for one asserts.
221+This is the decisive single measurement: the ticket's answer does not decode.
222+
223+### Mutation B — the ticket's luma-span and per-chunk-origin halves only
224+(`cu_tx` left at 32, so the mutation reaches the pixels instead of the assert)
225+
226+```
227+thread '…muchroma_pinned_stream_decodes_pixel_exact' panicked at
228+ crates/ec-av1/src/stream.rs:9767:17:
229+ decode-order frame 2 of 3 (3 shown, 0 hidden) differs from the oracle at
230+ byte 15450 (ours 142 vs 141), 45900 bytes differ
231+test result: FAILED. 0 passed; 1 failed
232+```
233+
234+Per-plane wrong samples over the 3 frames (98 304 per plane), from the
235+throwaway probe that measured them plane-by-plane:
236+
237+| plane | wrong samples | first differing sample | ours | oracle |
238+|---|---|---|---|---|
239+| Y | 12 537 | (x=90, y=120) | 142 | 141 |
240+| U | 16 696 | (x=65, y=120) | 153 | 152 |
241+| V | 16 667 | (x=64, y=120) | 145 | 146 |
242+
243+Per-frame wrong: `[0, 0, 45900]` — all of it on decode-order frame 2, and the
244+arm's counters still read `intra_128_in_inter=1`,
245+`mu_chunk_chroma_reads=4`, so the damage is on **pixels**, not on the counter
246+(class `gate-blind-to-feature`, avoided).
247+
248+**GREEN after revert:** both mutations reverted; `git diff crates/ec-av1/src/decode.rs`
249+is **empty** — the decoder is byte-identical to `main`. The only source
250+change in this lane is the new test in `stream.rs` plus the two pinned
251+fixtures.
252+
253+---
254+
255+## 6. Gates re-run
256+
257+| scope | command | result |
258+|---|---|---|
259+| the new pinned gate | `cargo test -p ec-av1 --lib -- a_444_intra_in_inter_128root_muchroma_pinned` | **1 passed / 0 failed** (witness 1 root / 4 mu-chunk chroma reads, 3/3 frames byte-exact; control 24/24 byte-exact, 0 fires) |
260+| the pre-existing live-encode twin | `… -- a_real_aomenc_444_intra_in_inter_128_root` | **passed**, same `1` / `4` |
261+| every 4:4:4 and 4:2:0 gate in the crate (44) | `cargo test -p ec-av1 --lib -- <44 names matching 444\|420>` | **44 passed / 0 failed** |
262+| the 128-root / lossless families (66 names) | `cargo test -p ec-av1 --lib -- <66 names matching 128\|lossless\|ll444\|mu_chunk>` | **55 passed / 0 failed / 11 ignored** — the 11 are pre-existing `#[ignore]`d probes, none of them this lane's gate |
263+| compile | `cargo check -p ec-av1 --all-targets` | **clean**, no warnings |
264+
265+No full suite, no formatters — sibling lanes are live in this box.
266+
267+---
268+
269+## 7. What is left for whoever picks this up
270+
271+Nothing on the source side. The arm is correct, gated, and now pinned. The one
272+thing this lane could not close, and hands on unchanged:
273+
274+- **`decode.rs:43568`'s `around_mi` is the square-gather form.** The inter
275+ twins at 40904/43661 already use `around_mi_rect(unit_mi, unit_luma_w,
276+ unit_luma_h)`; this arm passes one `side`. With `w == h` the two are
277+ byte-identical, and `unit_luma_w != unit_luma_h` only at 4:2:2, which the
278+ sequence header refuses by name — so it is **unreachable**, not a defect.
279+ Left as is; `lanes/av1txsizeaudit.report.md` §1.4 names it as its own
280+ (already-known) row.