Re-add the intra 16x4/4x16-in-inter-1:4 refusal -- its witness counters were phantoms of a desync
Browse files at this commit543ce265813f9e30a37ccc45e348cfe553b7c2e5Parent: 663bb80- fix
- re-add the intra 16x4/4x16-in-inter-1:4 refusal -- its witness counters were phantoms of a desync
4 changed files +209 -40
- crates/ec-av1/src/decode.rs +28 -3
- crates/ec-av1/src/refusal_inventory.rs +6 -0
- crates/ec-av1/src/stream.rs +64 -37
- lanes/wit16x4-r1.report.md +111 -0
crates/ec-av1/src/decode.rsmodified+28 -3
| @@ -6938,7 +6938,10 @@ fn decode_rect_split( | |||
| 6938 | // first 50 frame OBUs of the 10-bit 3840x1608 stream's head decode | 6938 | // first 50 frame OBUs of the 10-bit 3840x1608 stream's head decode |
| 6939 | // all 33 frames pixel-exact against ffmpeg while this arm fires 90x | 6939 | // all 33 frames pixel-exact against ffmpeg while this arm fires 90x |
| 6940 | // 64x32 + 5x 32x64 -- pinned as `fixtures/reelb_rect64_intra16x4_witness.obu` | 6940 | // 64x32 + 5x 32x64 -- pinned as `fixtures/reelb_rect64_intra16x4_witness.obu` |
| 6941 | - // and gated by `a_10bit_film_frames_with_intra_16x4_strips_and_rect64_corner_tus_decode_pixel_exact`. | 6941 | + // and gated by `a_10bit_film_frames_with_rect64_corner_tus_decode_pixel_exact`. |
| 6942 | + // lane-wit16x4 r1 re-measured that fixture on the merged tip: this arm | ||
| 6943 | + // fires 64x32=148 32x64=123 (the 90/5 above were counted out of the | ||
| 6944 | + // frame-33 desync lane-frame36 r2 fixed), all 33 frames pixel-exact. | ||
| 6942 | (64, 32) | (32, 64) => None, | 6945 | (64, 32) | (32, 64) => None, |
| 6943 | _ => { | 6946 | _ => { |
| 6944 | return Err(unsupported(format!( | 6947 | return Err(unsupported(format!( |
| @@ -22082,13 +22085,35 @@ fn decode_inter_block( | |||
| 22082 | // the first 50 frame OBUs of the 10-bit 3840x1608 stream's head decode | 22085 | // the first 50 frame OBUs of the 10-bit 3840x1608 stream's head decode |
| 22083 | // all 33 frames pixel-exact while this arm fires 31x 16x4 + 17x 4x16 | 22086 | // all 33 frames pixel-exact while this arm fires 31x 16x4 + 17x 4x16 |
| 22084 | // (23 of them chroma-paired). Pinned as | 22087 | // (23 of them chroma-paired). Pinned as |
| 22085 | - // `fixtures/reelb_rect64_intra16x4_witness.obu`, gated by | 22088 | + // `fixtures/reelb_rect64_intra16x4_witness.obu` -- MEASURED WRONG, see |
| 22086 | - // `a_10bit_film_frames_with_intra_16x4_strips_and_rect64_corner_tus_decode_pixel_exact`. | 22089 | + // the lane-wit16x4 note below. |
| 22087 | // The refusal below is NARROWED, not deleted: it still stands for a | 22090 | // The refusal below is NARROWED, not deleted: it still stands for a |
| 22088 | // 16x4/4x16 strip with no chroma-pair record and for every other | 22091 | // 16x4/4x16 strip with no chroma-pair record and for every other |
| 22089 | // sub-8 shape. | 22092 | // sub-8 shape. |
| 22093 | + // | ||
| 22094 | + // lane-wit16x4 r1: RE-WIDENED to the whole shape, because r3's witness | ||
| 22095 | + // was a PHANTOM (class `counter-from-refused-stream`): the pinned | ||
| 22096 | + // fixture was measured while decode-order frame 33 was desynced, and | ||
| 22097 | + // on the merged tip (lane-frame36 r2 fixed that desync) the very same | ||
| 22098 | + // fixture decodes all 33 frames pixel-exact with `intra16x4_in_inter` | ||
| 22099 | + // 16x4=0 4x16=0 chroma_ref=0 -- the 31/17/23 were counted out of a | ||
| 22100 | + // wrong decode. Re-measured this round: NO stream anywhere decodes | ||
| 22101 | + // exactly while this arm fires. Two 2 s 10-bit film cuts (3840x1608 at | ||
| 22102 | + // 0 s: OK, 48 frames exact, 0 hits; at 300 s: 138/559 hits but frames | ||
| 22103 | + // 1 and 2 mismatch ffmpeg by 14105680 / 12470780 bytes), four 1920x792 | ||
| 22104 | + // 128-SB cuts (hits only inside frames that refuse or are never shown | ||
| 22105 | + // -- the 6300 s cut's key frame is exact with 0 hits and its no-show | ||
| 22106 | + // frame 1 carries 169/445 with no display frame reachable before the | ||
| 22107 | + // 128x64-intra-on-inter refusal), and the aomenc gate | ||
| 22108 | + // `a_real_aomenc_inter_sequence_with_intra_16x4_strips_in_1to4_partitions_decodes_pixel_exact` | ||
| 22109 | + // (run `--include-ignored` on this tip: FAILED, 0 pixel-exact attempts | ||
| 22110 | + // carrying the strip, per-arm [0, 0, 0]). A lifted refusal with no | ||
| 22111 | + // witness is a capability claim (class `refusal-lifted-without-a-gate`), | ||
| 22112 | + // so the decode path stays behind `EC_INTRA16X4_DECODE` for the round | ||
| 22113 | + // that finds a witness. | ||
| 22090 | let strip16 = strip_chroma | 22114 | let strip16 = strip_chroma |
| 22091 | .filter(|_| write_w.min(write_h) == 4 && write_w.max(write_h) == 16) | 22115 | .filter(|_| write_w.min(write_h) == 4 && write_w.max(write_h) == 16) |
| 22116 | + .filter(|_| std::env::var_os("EC_INTRA16X4_DECODE").is_some()) | ||
| 22092 | .map(|s| (s.horz, s.has_chroma)); | 22117 | .map(|s| (s.horz, s.has_chroma)); |
| 22093 | if write_w.min(write_h) < 8 && strip16.is_none() { | 22118 | if write_w.min(write_h) < 8 && strip16.is_none() { |
| 22094 | if std::env::var_os("EC_INTRA16X4").is_some() { | 22119 | if std::env::var_os("EC_INTRA16X4").is_some() { |
crates/ec-av1/src/refusal_inventory.rsmodified+6 -0
| @@ -85,6 +85,12 @@ const REFUSALS: &[&str] = &[ | |||
| 85 | // r2 residue: `decode_intra_rect_in_inter` codes chroma at the strip's own | 85 | // r2 residue: `decode_intra_rect_in_inter` codes chroma at the strip's own |
| 86 | // halved footprint, which for a 16x4 strip is an 8x2 transform libaom | 86 | // halved footprint, which for a 16x4 strip is an 8x2 transform libaom |
| 87 | // never wrote (its chroma is the PAIR's 8x4, coded by the odd strip). | 87 | // never wrote (its chroma is the PAIR's 8x4, coded by the odd strip). |
| 88 | + // lane-sub8x4 r3 narrowed this to "a strip with no chroma-pair record"; | ||
| 89 | + // lane-wit16x4 r1 put it back at FULL width: r3's witness counters were | ||
| 90 | + // phantoms of a desync, no stream on this tree decodes pixel-exact while | ||
| 91 | + // the arm fires, and the decode path now needs `EC_INTRA16X4_DECODE` | ||
| 92 | + // (class `refusal-lifted-without-a-gate`; numbers in decode.rs's `strip16` | ||
| 93 | + // note and lanes/wit16x4-r1.report.md). | ||
| 88 | "an intra 16x4/4x16 strip inside an inter 16x16-level 1:4 partition (its 4:2:0 chroma pair is coded once for two strips; only the inter path implements that pairing)", | 94 | "an intra 16x4/4x16 strip inside an inter 16x16-level 1:4 partition (its 4:2:0 chroma pair is coded once for two strips; only the inter path implements that pairing)", |
| 89 | "an intra mode this decoder does not code (round 2)", | 95 | "an intra mode this decoder does not code (round 2)", |
| 90 | // lane-intrarect r1 lifted the whole-shape refusal that stood here (the | 96 | // lane-intrarect r1 lifted the whole-shape refusal that stood here (the |
crates/ec-av1/src/stream.rsmodified+64 -37
| @@ -11170,14 +11170,18 @@ mod tests { | |||
| 11170 | 11170 | ||
| 11171 | 11171 | ||
| 11172 | #[test] | 11172 | #[test] |
| 11173 | - #[ignore = "RED at lane-intra16x4 r2, but NOT on this lane's shape: the r2 OBMC \ | 11173 | + #[ignore = "RED, RE-MEASURED lane-wit16x4 r1 on the merged tip (with sub-8x8 intra, \ |
| 11174 | - pair-merge fix makes the decode entropy-exact through the intra 16x4 strips \ | 11174 | + the mvstack/OBMC and the lane-frame36 r2 txfm-band fixes all in): \ |
| 11175 | - (620/620 all_zero symbols match aomdec, value and range), and the new arm 4 \ | 11175 | + `cargo test -p ec-av1 --lib ..._1to4_partitions -- --include-ignored` \ |
| 11176 | - (bar_h, cq63, --min-partition-size=8, 192x128, 5 strips) decodes 6 frames \ | 11176 | + FAILS at stream.rs's arm assert with `0 named refusals, 0 pixel-exact \ |
| 11177 | - bit-exact vs ffmpeg outside the harness. Attempt 0 (noise, cq60, 128x128) \ | 11177 | + attempts carrying an intra 1:4 strip, per-arm attempts \ |
| 11178 | - still mismatches from (122, 13) -- 99 rows ABOVE its first strip, measured in \ | 11178 | + 16x4/4x16/chroma-reference=[0, 0, 0], 2 attempts carried none (2 of them \ |
| 11179 | - r1 as another shape's defect -- and panics before arm 4 runs. Un-ignore once \ | 11179 | + mismatched)`; attempts 1..3 mismatch ffmpeg from frame 1 or 2 (max |delta| \ |
| 11180 | - attempt 0's defect is owned -- lanes/intra16x4-r2.handoff.md"] | 11180 | + up to 248) and attempts 0/4 mismatch while carrying NO 1:4 strip at all -- \ |
| 11181 | + another shape's defect, unchanged since r2. The 16x4/4x16-in-inter refusal \ | ||
| 11182 | + is re-added this round, so the shape now refuses by name unless \ | ||
| 11183 | + `EC_INTRA16X4_DECODE` is set: un-ignore only together with a witness \ | ||
| 11184 | + (lanes/wit16x4-r1.report.md)"] | ||
| 11181 | // lane-intra16x4 r1: an INTRA-coded 16x4 / 4x16 strip inside an INTER | 11185 | // lane-intra16x4 r1: an INTRA-coded 16x4 / 4x16 strip inside an INTER |
| 11182 | // frame's 16x16-level 1:4 partition -- the wall all six of his film cuts | 11186 | // frame's 16x16-level 1:4 partition -- the wall all six of his film cuts |
| 11183 | // stopped at once lane-rectres landed. The shape's chroma is the pair's: | 11187 | // stopped at once lane-rectres landed. The shape's chroma is the pair's: |
| @@ -30028,7 +30032,26 @@ mod tests { | |||
| 30028 | /// lane-sub8x4 r3: un-`#[ignore]`d. The sibling refusal it waited on (the | 30032 | /// lane-sub8x4 r3: un-`#[ignore]`d. The sibling refusal it waited on (the |
| 30029 | /// un-split TX_64X32/TX_32X64 corner unit) is lifted in this round, so the | 30033 | /// un-split TX_64X32/TX_32X64 corner unit) is lifted in this round, so the |
| 30030 | /// frame this gate exists for now finishes. | 30034 | /// frame this gate exists for now finishes. |
| 30035 | + /// | ||
| 30036 | + /// lane-wit16x4 r1, MEASURED: this gate is blind to the frame it counts | ||
| 30037 | + /// (class `gate-blind-to-hidden-frames`). The fixture has two frame OBUs | ||
| 30038 | + /// and ONE shown frame, and `decode_probe` on the fixture truncated to its | ||
| 30039 | + /// first frame OBU reads `intra_rect4_in_inter 0/0/0/0` and | ||
| 30040 | + /// `intra16x4_in_inter 0/0/0` while matching ffmpeg exactly -- so all of | ||
| 30041 | + /// 4/23/28/72 (and the 4 intra 16x4 strips with them) live in the SECOND, | ||
| 30042 | + /// NO-SHOW frame, whose pixels ffmpeg never emits and this gate never | ||
| 30043 | + /// compares. Since that hidden frame also carries the intra 16x4/4x16 | ||
| 30044 | + /// strip whose refusal this round re-adds (no stream anywhere decodes | ||
| 30045 | + /// pixel-exact while that arm fires -- lanes/wit16x4-r1.report.md), the | ||
| 30046 | + /// decode now stops by name here. Un-`#[ignore]` it together with the | ||
| 30047 | + /// witness: a prefix of the same film whose LATER frame displays this ARF | ||
| 30048 | + /// makes both counters pixel-backed at once. | ||
| 30031 | #[test] | 30049 | #[test] |
| 30050 | + #[ignore = "lane-wit16x4 r1: every strip this gate counts is in the fixture's NO-SHOW \ | ||
| 30051 | + second frame (truncated to one frame OBU the counters read 0/0/0/0 and the \ | ||
| 30052 | + shown frame is exact), and that frame now stops at the re-added intra \ | ||
| 30053 | + 16x4/4x16-in-inter refusal -- needs a prefix that DISPLAYS the frame, \ | ||
| 30054 | + lanes/wit16x4-r1.report.md"] | ||
| 30032 | fn a_10bit_film_inter_frame_with_intra_1to4_strips_decodes_pixel_exact() { | 30055 | fn a_10bit_film_inter_frame_with_intra_1to4_strips_decodes_pixel_exact() { |
| 30033 | const NAME: &str = "a_10bit_film_inter_frame_with_intra_1to4_strips_decodes_pixel_exact"; | 30056 | const NAME: &str = "a_10bit_film_inter_frame_with_intra_1to4_strips_decodes_pixel_exact"; |
| 30034 | if !have_ffmpeg() { | 30057 | if !have_ffmpeg() { |
| @@ -30080,35 +30103,39 @@ mod tests { | |||
| 30080 | eprintln!("{NAME}: {fired} intra 1:4 strips in an inter frame, the shown frame pixel-exact"); | 30103 | eprintln!("{NAME}: {fired} intra 1:4 strips in an inter frame, the shown frame pixel-exact"); |
| 30081 | } | 30104 | } |
| 30082 | 30105 | ||
| 30083 | - /// lane-sub8x4 r3: the FILM witness that lifts BOTH the intra 16x4/4x16 | 30106 | + /// lane-sub8x4 r3 / lane-wit16x4 r1: the FILM witness for the un-split |
| 30084 | - /// strip inside an inter 16x16-level 1:4 partition and the un-split | ||
| 30085 | /// TX_64X32/TX_32X64 corner unit of a split intra strip. | 30107 | /// TX_64X32/TX_32X64 corner unit of a split intra strip. |
| 30086 | /// | 30108 | /// |
| 30109 | + /// r3 wrote this gate as a witness for TWO arms; its intra 16x4/4x16 | ||
| 30110 | + /// numbers were PHANTOMS (class `counter-from-refused-stream`), counted | ||
| 30111 | + /// while decode-order frame 33 of this very prefix was desynced. On the | ||
| 30112 | + /// merged tip (lane-frame36 r2 fixed that desync) the fixture decodes all | ||
| 30113 | + /// 33 frames pixel-exact and `intra16x4_in_inter` reads 0/0/0, so the gate | ||
| 30114 | + /// panicked "the intra 16x4/4x16 strip arm did not fire". lane-wit16x4 r1 | ||
| 30115 | + /// re-measured every counter, split the claim, and re-added the | ||
| 30116 | + /// 16x4/4x16-in-inter refusal (no stream on this tree decodes exactly | ||
| 30117 | + /// while that arm fires -- see the note at `decode.rs`'s `strip16`). | ||
| 30118 | + /// | ||
| 30087 | /// `crates/ec-av1/fixtures/reelb_rect64_intra16x4_witness.obu`, 23472 bytes, | 30119 | /// `crates/ec-av1/fixtures/reelb_rect64_intra16x4_witness.obu`, 23472 bytes, |
| 30088 | /// sha256 `c9e721088766163b9dbeb9fa8dd8b257ff0ec7f9157fc350de4d3c33cd9ec4e4`: | 30120 | /// sha256 `c9e721088766163b9dbeb9fa8dd8b257ff0ec7f9157fc350de4d3c33cd9ec4e4`: |
| 30089 | /// the first 50 frame-carrying OBUs of `ffmpeg -ss 0 -t 2 -i <3840x1608 | 30121 | /// the first 50 frame-carrying OBUs of `ffmpeg -ss 0 -t 2 -i <3840x1608 |
| 30090 | /// 10-bit AV1 HDR10 mkv> -c:v copy -f obu`, cut twice from independent | 30122 | /// 10-bit AV1 HDR10 mkv> -c:v copy -f obu`, cut twice from independent |
| 30091 | /// ffmpeg runs that hashed identically. 33 decode-order frames. | 30123 | /// ffmpeg runs that hashed identically. 33 decode-order frames. |
| 30092 | /// | 30124 | /// |
| 30093 | - /// MEASURED, and why no earlier round had this: r1/r2 of two lanes | 30125 | + /// MEASURED on the merged tip (`decode_probe`, EC_PROBE_OUT16 vs |
| 30094 | - /// reported "no firing witness exists" because every film frame that fires | 30126 | + /// `ffmpeg -pix_fmt yuv420p10le`): all 33 frames 0 differing bytes, and |
| 30095 | - /// these two arms ALSO carries a sub-8x8 intra leaf, which refused until | 30127 | + /// `rect64_corner_tu` fires 64x32=148 32x64=123 (r3's 90/5 came out of the |
| 30096 | - /// this lane's r2 lifted it. On that tip the whole 33-frame prefix decodes | 30128 | + /// desynced decode). `intra16x4_in_inter` reads 0/0/0 here and is asserted |
| 30097 | - /// with no refusal and matches ffmpeg on every plane of every frame, while | 30129 | + /// as such -- if a later change makes that arm fire on this stream, the |
| 30098 | - /// both arms fire: `intra16x4_in_inter` 16x4=31 4x16=17 chroma_ref=23 and | 30130 | + /// refusal that now guards it moved and this gate says so. |
| 30099 | - /// `rect64_corner_tu` 64x32=90 32x64=5. (The full 48-frame 2 s segment | ||
| 30100 | - /// diverges at decode-order frame 36, which is a separate wall; the | ||
| 30101 | - /// fixture is the exact prefix, not a truncation chosen to hide it.) | ||
| 30102 | /// | 30131 | /// |
| 30103 | - /// Both refusal strings stay in `refusal_inventory` because both are | 30132 | + /// Refusal strings: "a split intra strip whose transform unit is |
| 30104 | - /// NARROWED, not deleted: "a split intra strip whose transform unit is | 30133 | + /// {tx_w}x{tx_h}" stays NARROWED (every shape other than 64x32/32x64 -- |
| 30105 | - /// {tx_w}x{tx_h}" still stands for every shape other than 64x32/32x64, and | 30134 | + /// that is what this gate lifts), and "an intra 16x4/4x16 strip inside an |
| 30106 | - /// "an intra 16x4/4x16 strip inside an inter 16x16-level 1:4 partition" | 30135 | + /// inter 16x16-level 1:4 partition" is back to its FULL width. |
| 30107 | - /// still stands for a strip with no chroma-pair record. | ||
| 30108 | #[test] | 30136 | #[test] |
| 30109 | - fn a_10bit_film_frames_with_intra_16x4_strips_and_rect64_corner_tus_decode_pixel_exact() { | 30137 | + fn a_10bit_film_frames_with_rect64_corner_tus_decode_pixel_exact() { |
| 30110 | - const NAME: &str = | 30138 | + const NAME: &str = "a_10bit_film_frames_with_rect64_corner_tus_decode_pixel_exact"; |
| 30111 | - "a_10bit_film_frames_with_intra_16x4_strips_and_rect64_corner_tus_decode_pixel_exact"; | ||
| 30112 | if !have_ffmpeg() { | 30139 | if !have_ffmpeg() { |
| 30113 | eprintln!("SKIP {NAME}: no ffmpeg"); | 30140 | eprintln!("SKIP {NAME}: no ffmpeg"); |
| 30114 | return; | 30141 | return; |
| @@ -30137,14 +30164,14 @@ mod tests { | |||
| 30137 | crate::decode::rect64_corner_tu_hits(0) - before64.0, | 30164 | crate::decode::rect64_corner_tu_hits(0) - before64.0, |
| 30138 | crate::decode::rect64_corner_tu_hits(1) - before64.1, | 30165 | crate::decode::rect64_corner_tu_hits(1) - before64.1, |
| 30139 | ); | 30166 | ); |
| 30140 | - // Hard counter asserts: neither lift may rest on a stream that stopped | 30167 | + // Hard counter asserts: the lift may not rest on a stream that stopped |
| 30141 | // carrying its shape (class `tool-disabled-in-every-gate`). | 30168 | // carrying its shape (class `tool-disabled-in-every-gate`). |
| 30142 | - assert!( | 30169 | + assert_eq!( |
| 30143 | - fired16.0 > 0 && fired16.1 > 0 && fired16.2 > 0, | 30170 | + fired16, |
| 30144 | - "{NAME}: the intra 16x4/4x16 strip arm did not fire (16x4={} 4x16={} chroma_ref={})", | 30171 | + (0, 0, 0), |
| 30145 | - fired16.0, | 30172 | + "{NAME}: this stream carries NO intra 16x4/4x16 strip in an inter 1:4 \ |
| 30146 | - fired16.1, | 30173 | + partition (r3's 31/17/23 were phantoms of the frame-33 desync); a \ |
| 30147 | - fired16.2 | 30174 | + non-zero count here means the refusal guarding that arm moved" |
| 30148 | ); | 30175 | ); |
| 30149 | assert!( | 30176 | assert!( |
| 30150 | fired64.0 > 0 && fired64.1 > 0, | 30177 | fired64.0 > 0 && fired64.1 > 0, |
| @@ -30168,9 +30195,9 @@ mod tests { | |||
| 30168 | assert_eq!(ours.v, theirs.v, "{NAME}: frame {i} V vs ffmpeg"); | 30195 | assert_eq!(ours.v, theirs.v, "{NAME}: frame {i} V vs ffmpeg"); |
| 30169 | } | 30196 | } |
| 30170 | eprintln!( | 30197 | eprintln!( |
| 30171 | - "{NAME}: 33 frames pixel-exact, intra16x4_in_inter 16x4={} 4x16={} chroma_ref={}, \ | 30198 | + "{NAME}: 33 frames pixel-exact, rect64_corner_tu 64x32={} 32x64={} \ |
| 30172 | - rect64_corner_tu 64x32={} 32x64={}", | 30199 | + (intra16x4_in_inter {} {} {}, refused shape)", |
| 30173 | - fired16.0, fired16.1, fired16.2, fired64.0, fired64.1 | 30200 | + fired64.0, fired64.1, fired16.0, fired16.1, fired16.2 |
| 30174 | ); | 30201 | ); |
| 30175 | } | 30202 | } |
| 30176 | 30203 | ||
lanes/wit16x4-r1.report.mdadded+111 -0
| @@ -0,0 +1,111 @@ | |||
| 1 | +# lane-wit16x4 r1 report (branch `lane-wit16x4`, off main 5d81a67) | ||
| 2 | + | ||
| 3 | +## Verdict | ||
| 4 | + | ||
| 5 | +The intra 16x4/4x16-in-inter lift had NO witness. The refusal is RE-ADDED | ||
| 6 | +(narrow: only that shape, on the inter path, behind `EC_INTRA16X4_DECODE`). | ||
| 7 | +The film gate is split and kept as the rect64 corner-TU witness only. | ||
| 8 | + | ||
| 9 | +## 1. The pinned fixture, re-measured on this tree | ||
| 10 | + | ||
| 11 | +`crates/ec-av1/fixtures/reelb_rect64_intra16x4_witness.obu` (10-bit 3840x1608, | ||
| 12 | +33 decode-order frames), `decode_probe`: | ||
| 13 | + | ||
| 14 | +``` | ||
| 15 | +OK: 33 frames decoded, 3840x1608 diff vs ffmpeg: all 33 frames 0 bytes | ||
| 16 | +rect64_corner_tu: 64x32=148 32x64=123 (r3 claimed 90 / 5) | ||
| 17 | +intra16x4_in_inter: 16x4=0 4x16=0 chroma_ref=0 (r3 claimed 31 / 17 / 23) | ||
| 18 | +intra_rect4_in_inter: 64x16=24 16x64=28 32x8=0 8x32=0 | ||
| 19 | +inter_rect: 64x32=1996 32x64=152 64x16=24 16x64=28 | ||
| 20 | +inter_edge_strip: h64=1822 v64=0 h32=279 v32=0 h16=59 v16=0 | ||
| 21 | +rect_inter: tu=429 txsplit=0 obmc_leaf=4 | ||
| 22 | +sub8_intra_rect: 0/0/0/0/0 inter16_1to4: 0/0/0/0 | ||
| 23 | +vartx_rect_leaf: 0/0 vartx_rect_leaf4: 0/0 rect32x8_inter_tu: 0/0 | ||
| 24 | +cdef_band: rect_skip_writes=1797 mixed_skip_units=0 rect_intrabc_reads: 0 | ||
| 25 | +``` | ||
| 26 | + | ||
| 27 | +So r3's two hard asserts were both wrong numbers off a desynced decode | ||
| 28 | +(class `counter-from-refused-stream`): the rect64 arm fires ~1.7x more than | ||
| 29 | +claimed, and the intra-16x4 arm does not fire at all. | ||
| 30 | + | ||
| 31 | +## 2. Witness hunt for intra 16x4/4x16 in an inter 1:4 partition -- NONE | ||
| 32 | + | ||
| 33 | +| stream | decode | intra16x4 16x4/4x16/chroma_ref | pixel | | ||
| 34 | +|---|---|---|---| | ||
| 35 | +| 2 s 10-bit 3840x1608 head cut | OK, 48 frames | 0 / 0 / 0 | (exact, frame36 r2) | | ||
| 36 | +| same title, 300 s cut | REFUSED (Golomb tail), 8 frames | 158 / 603 / 379 | truncated to its 8 frames: 3 shown, frame 0 exact, frames 1/2 differ by 14105680 / 12470780 bytes -> counters are phantoms | | ||
| 37 | +| 1920x792 128-SB cut @900 s | REFUSED (128x64 intra on inter path) after 1 frame | 58 / 68 / 64 | only the key frame decodes; no inter frame reachable | | ||
| 38 | +| same @5400 s | REFUSED, 1 frame | 18 / 26 / 24 | same | | ||
| 39 | +| same @6300 s | REFUSED, 2 frames | 187 / 560 / 365 | trunc(2): 1 shown frame, 0 differing bytes, counters 169/445/300 -- but trunc(1) (that same key frame alone) fires 0/0/0, so EVERY hit lives in the NO-SHOW frame 1, which no display frame reaches: trunc(3)/(4)/(5) all refuse on the 128x64 intra block (class `gate-blind-to-hidden-frames`) | | ||
| 40 | +| same @8100 s | REFUSED, 1 frame | 0 / 4 / 2 | only the key frame decodes | | ||
| 41 | +| aomenc gate `a_real_aomenc_inter_sequence_with_intra_16x4_strips_in_1to4_partitions_decodes_pixel_exact` | FAILED with `--include-ignored` | per-arm attempts `[0, 0, 0]` | 0 named refusals, 0 pixel-exact attempts carrying an intra 1:4 strip; attempts 1..3 mismatch ffmpeg from frame 1-2 (max abs delta 248), attempts 0/4 mismatch while carrying no 1:4 strip at all (another shape's defect, unchanged since intra16x4 r2) | | ||
| 42 | + | ||
| 43 | +No exact, firing witness exists on this tree. Per class | ||
| 44 | +`refusal-lifted-without-a-gate` the refusal goes back in. | ||
| 45 | + | ||
| 46 | +## 3. Changes | ||
| 47 | + | ||
| 48 | +- `crates/ec-av1/src/decode.rs` (`strip16` in the intra arm of the inter block | ||
| 49 | + path): the chroma-pair record that let a 16x4/4x16 strip past the refusal is | ||
| 50 | + now `.filter(|_| std::env::var_os("EC_INTRA16X4_DECODE").is_some())` -- the | ||
| 51 | + shape refuses by name again by default; the decode path (and its counter) | ||
| 52 | + stay wired for the round that finds a witness. Full measured note in place. | ||
| 53 | +- `crates/ec-av1/src/decode.rs` (rect64 corner-TU comment): re-measured | ||
| 54 | + counters 148 / 123 and the new gate name. | ||
| 55 | +- `crates/ec-av1/src/refusal_inventory.rs`: string unchanged, note records the | ||
| 56 | + re-widening and why. | ||
| 57 | +- `crates/ec-av1/src/stream.rs`: gate renamed | ||
| 58 | + `a_10bit_film_frames_with_intra_16x4_strips_and_rect64_corner_tus_decode_pixel_exact` | ||
| 59 | + -> `a_10bit_film_frames_with_rect64_corner_tus_decode_pixel_exact`; hard | ||
| 60 | + assert kept on `rect64_corner_tu` both orientations, the intra-16x4 assert | ||
| 61 | + replaced by `assert_eq!(fired16, (0, 0, 0))` (a non-zero count means the | ||
| 62 | + refusal guarding that arm moved); doc block rewritten with the measured | ||
| 63 | + numbers. | ||
| 64 | +- `crates/ec-av1/src/stream.rs` (aomenc 1:4 gate): stays `#[ignore]d`, reason | ||
| 65 | + replaced by this round's measured failure output. | ||
| 66 | + | ||
| 67 | +## 4. Gates | ||
| 68 | + | ||
| 69 | +Command: `EC_NOMEMGUARD=1 EC_AV1_REQUIRE_AOMENC=1 CARGO_TARGET_DIR=$HOME/.cache/cargo-target-wit16x4 nice -n 10 cargo test -p ec-av1 --lib -j3 <filter> -- --nocapture` | ||
| 70 | + | ||
| 71 | +| filter | result | | ||
| 72 | +|---|---| | ||
| 73 | +| `a_10bit_film_frames_with_rect64_corner_tus` | ok, 1 passed, 63.37 s -- `33 frames pixel-exact, rect64_corner_tu 64x32=148 32x64=123 (intra16x4_in_inter 0 0 0, refused shape)` | | ||
| 74 | +| `a_10bit_film_hidden_arf` | ok, 1 passed, 89.48 s (`rect64_split_txfm_publish=4`) | | ||
| 75 | +| `refusal_inventory` | ok, 3 passed | | ||
| 76 | +| `gate_coverage` | ok, 9 passed | | ||
| 77 | +| `sub8` | ok, 7 passed, 35.16 s | | ||
| 78 | +| `1to4` | 9 passed, 1 FAILED, 3 ignored (see below), 118.75 s | | ||
| 79 | + | ||
| 80 | +The `1to4` red was `a_10bit_film_inter_frame_with_intra_1to4_strips_decodes_pixel_exact`, | ||
| 81 | +which stopped at the re-added refusal. MEASURED before deciding: its fixture | ||
| 82 | +`reelb_intra14_witness.obu` has 2 frame OBUs and ONE shown frame; truncated to its | ||
| 83 | +first frame OBU it decodes exact with `intra_rect4_in_inter 0/0/0/0` and | ||
| 84 | +`intra16x4_in_inter 0/0/0`. So all of the 4/23/28/72 strips it asserts -- and | ||
| 85 | +the 4 intra 16x4 strips with them -- live in the SECOND, NO-SHOW frame, whose | ||
| 86 | +pixels ffmpeg never writes and the gate never compared (class | ||
| 87 | +`gate-blind-to-hidden-frames`); the gate was green on a counter nothing backed. | ||
| 88 | +It is `#[ignore]`d with that measured reason, to be un-ignored by a prefix of | ||
| 89 | +the same film that DISPLAYS that frame -- which would make both this gate and | ||
| 90 | +the intra-16x4 lift pixel-backed at once. | ||
| 91 | + | ||
| 92 | +Suite (systemd unit, `cargo test -p ec-av1 --lib -j3`): `test result: ok. 425 passed; 0 failed; 38 ignored; 0 measured; 0 filtered out; finished in 730.11s` | ||
| 93 | + | ||
| 94 | +## 5. EVIDENCE | ||
| 95 | + | ||
| 96 | +EVIDENCE: ~/.cache/wit16x4-tmp/{o.raw,r.raw} | `decode_probe EC_PROBE_OUT16` on the pinned fixture vs `ffmpeg -pix_fmt yuv420p10le`, diff16.py 3840x1608 | 33 frames, all 0 differing bytes; rect64_corner_tu 148/123, intra16x4_in_inter 0/0/0 | ||
| 97 | +EVIDENCE: ~/.cache/wit16x4-tmp/census.txt | `decode_probe` on 2 film cuts + 4 1920x792 cuts under 6G scopes | only the 0 s cut decodes without a refusal, and it fires 0 intra 16x4/4x16 strips | ||
| 98 | +EVIDENCE: ~/.cache/wit16x4-tmp/{h300t.obu,o3.raw,r3.raw} | 300 s cut truncated to its 8 decoded frame OBUs, decoded and compared | frames 1 and 2 differ by 14105680 / 12470780 bytes -> its 138/559/347 hits are phantoms | ||
| 99 | +EVIDENCE: ~/.cache/wit16x4-tmp/{t6300.1.obu,o5.raw,r5.raw} + tcensus.txt | 6300 s cut truncated to 1 vs 2 frame OBUs | 1 OBU: exact, 0 hits; 2 OBUs: exact shown frame but 169/445/300 hits, all inside the no-show frame; 3/4/5 OBUs refuse | ||
| 100 | +EVIDENCE: ~/.cache/wit16x4-tmp/ig.log | aomenc 1:4 gate `--include-ignored --nocapture` | FAILED, per-arm attempts [0, 0, 0], 0 pixel-exact attempts carrying the strip | ||
| 101 | + | ||
| 102 | +## 6. Residue | ||
| 103 | + | ||
| 104 | +- deferred(a witness): the intra 16x4/4x16-in-inter decode path is written and | ||
| 105 | + believed correct but unproven -- the unblockers are the 128x64-intra-on-inter | ||
| 106 | + refusal (a display frame would then follow the 6300 s cut's no-show frame | ||
| 107 | + that carries 169/445 strips) or the Golomb-tail refusal + whatever desyncs | ||
| 108 | + the 300 s cut's frame 1. | ||
| 109 | +- accepted: `a_real_aomenc_inter_sequence_with_intra_16x4_strips_in_1to4_partitions_decodes_pixel_exact` | ||
| 110 | + stays `#[ignore]d`; its attempts 0/4 mismatch with NO 1:4 strip present, an | ||
| 111 | + open defect of another shape (lanes/intra16x4-r2.handoff.md). | ||