ec-av1: the seventh 4:2:2 corpus cell is pinned, and re-measured exact here
Browse files at this commitd6ceb79ee48b7775c8b932e557ebd86c42fbff92Parent: abb01bd1 changed file +58 -14
- crates/ec-av1/src/stream.rs +58 -14
crates/ec-av1/src/stream.rsmodified+58 -14
| @@ -3994,25 +3994,51 @@ pub(crate) mod tests { | |||
| 3994 | /// earned, and the one that replaces seven gates whose only behavioural | 3994 | /// earned, and the one that replaces seven gates whose only behavioural |
| 3995 | /// assertion was `err.contains(REFUSAL)`. | 3995 | /// assertion was `err.contains(REFUSAL)`. |
| 3996 | /// | 3996 | /// |
| 3997 | - /// **Why these six.** The measurement base | 3997 | + /// **Why these seven.** The measurement base |
| 3998 | /// (`lanes/av1422ffmpegbase.report.md` section 2.1) recorded seven 4:2:2 | 3998 | /// (`lanes/av1422ffmpegbase.report.md` section 2.1) recorded seven 4:2:2 |
| 3999 | /// cells that diverged from ffmpeg: `s422_320x246`, `s422_322x240`, | 3999 | /// cells that diverged from ffmpeg: `s422_320x246`, `s422_322x240`, |
| 4000 | /// `s422_322x246`, `s422_352x242_10b`, `s422_384x240`, | 4000 | /// `s422_322x246`, `s422_352x242_10b`, `s422_384x240`, |
| 4001 | - /// `s422_416x242_10b`, `s422_416x250_10b`. Six are closed and are pinned | 4001 | + /// `s422_416x242_10b`, `s422_416x250_10b`. ALL SEVEN are closed and are |
| 4002 | - /// here, each byte-exact against ffmpeg with the per-plane | 4002 | + /// pinned here, each byte-exact against ffmpeg with the per-plane |
| 4003 | - /// coefficient-unit census as its non-vacuity arm. All six are | 4003 | + /// coefficient-unit census as its non-vacuity arm. Six of them are |
| 4004 | /// CHROMA-only divergences at non-8-aligned geometries -- odd or | 4004 | /// CHROMA-only divergences at non-8-aligned geometries -- odd or |
| 4005 | /// 2-mod-4 luma dimensions, where `round_ss` and the chroma block walk | 4005 | /// 2-mod-4 luma dimensions, where `round_ss` and the chroma block walk |
| 4006 | /// disagree with a hardcoded `>> 1` -- which is why they are the rows a | 4006 | /// disagree with a hardcoded `>> 1` -- which is why they are the rows a |
| 4007 | /// lift cannot afford to leave unasserted: they are the cells that would | 4007 | /// lift cannot afford to leave unasserted: they are the cells that would |
| 4008 | /// go quietly wrong again. | 4008 | /// go quietly wrong again. |
| 4009 | /// | 4009 | /// |
| 4010 | - /// **The seventh, `s422_384x240`, is NOT here, on purpose.** It is the | 4010 | + /// **The seventh, `s422_384x240`, IS here now.** lane-av1422lift pinned six |
| 4011 | - /// reserved group-tail chroma SKIP arm (`decode.rs`; the risk study R4 | 4011 | + /// of the seven and deliberately left this one out: it was still red, and |
| 4012 | - /// flags it as owned elsewhere), it is still red, and pinning a red cell | 4012 | + /// pinning a red cell inside a green gate is how a gate stops being a gate |
| 4013 | - /// inside a green gate is how a gate stops being a gate. | 4013 | + /// ("THIS BRANCH MUST NOT LAND UNTIL THAT CELL CLOSES AND THE CORPUS |
| 4014 | - /// **THIS BRANCH MUST NOT LAND UNTIL THAT CELL CLOSES AND THE CORPUS | 4014 | + /// RE-MEASURES 51/51", `lanes/av1422lift.report.md` §7). The cell closed in |
| 4015 | - /// RE-MEASURES 51/51** -- see `lanes/av1422lift.report.md`. | 4015 | + /// lane-av1422tailskip, and NOT through the reserved group-tail chroma SKIP |
| 4016 | + /// arm the risk study's R4 blamed: that lane measured it byte-exact against | ||
| 4017 | + /// ffmpeg on all 16 displayed frames and all 17 decode-order frames, 0/0/0 | ||
| 4018 | + /// wrong samples in Y/U/V, with the fix's own counter | ||
| 4019 | + /// (`palette_422_unit_window_hits`) non-zero on this stream. | ||
| 4020 | + /// `lanes/av1422tailskip.report.md` §1 records the measurement and the | ||
| 4021 | + /// refutation of the arm attribution. | ||
| 4022 | + /// | ||
| 4023 | + /// That lane had already committed these exact bytes under the name | ||
| 4024 | + /// `422_palette_intra_in_inter_384x240_17f.obu` (sha256 `bf1c658e...a815b`, | ||
| 4025 | + /// the sweep artifact byte for byte), so the row below pins THAT file | ||
| 4026 | + /// rather than committing a second copy of one stream under a second name. | ||
| 4027 | + /// Unlike the other six, this cell sits at an 8- AND 16-aligned geometry | ||
| 4028 | + /// (384x240): it was the late-starting frame-1 alt-ref chroma residual | ||
| 4029 | + /// (`lanes/av1422late.report.md`), not the `round_ss` class -- which is why | ||
| 4030 | + /// it is pinned as its own row here rather than folded into that sentence. | ||
| 4031 | + /// | ||
| 4032 | + /// **The corpus re-measures 51/51**, which was the second half of the | ||
| 4033 | + /// condition the paragraph above quotes. Re-run for this row with the | ||
| 4034 | + /// ffmpeg-oracle census driver (`~/.cache/census422b/ffcensus.py`: display | ||
| 4035 | + /// order, shown frames, geometry from `ffprobe`, a count over zero frames | ||
| 4036 | + /// is a hard error) and a `dump_yuv` built from THIS lane's tree: | ||
| 4037 | + /// **51 of 51 4:2:2 cells BYTE-EXACT** -- `s422_384x240` among them at | ||
| 4038 | + /// 0/0/0 -- and, in the same run, all 44 4:2:0 / 4:4:4 controls BYTE-EXACT | ||
| 4039 | + /// (95/95 over the whole corpus). That run is a measurement of this tree, | ||
| 4040 | + /// not a re-reading of the closure report; the per-cell rows here are what | ||
| 4041 | + /// keep the seven named ones from drifting back. | ||
| 4016 | /// | 4042 | /// |
| 4017 | /// **The census arm, per row.** `assert_422_stream_pixel_exact` asserts | 4043 | /// **The census arm, per row.** `assert_422_stream_pixel_exact` asserts |
| 4018 | /// that all three planes read a non-zero number of coefficient units AND | 4044 | /// that all three planes read a non-zero number of coefficient units AND |
| @@ -4023,14 +4049,18 @@ pub(crate) mod tests { | |||
| 4023 | /// the same decode walked 4994 units, so a green here with no census | 4049 | /// the same decode walked 4994 units, so a green here with no census |
| 4024 | /// assert would have proven nothing about 4:2:2. | 4050 | /// assert would have proven nothing about 4:2:2. |
| 4025 | /// | 4051 | /// |
| 4026 | - /// **Provenance of the six pins.** All six are `aomenc --codec=av1 | 4052 | + /// **Provenance of the seven pins.** All seven are `aomenc --codec=av1 |
| 4027 | /// --profile=2 --input-bit-depth=<8|10> --cpu-used=0 --cq-level=24 | 4053 | /// --profile=2 --input-bit-depth=<8|10> --cpu-used=0 --cq-level=24 |
| 4028 | /// --limit=16 --auto-alt-ref=1 --enable-global-motion=1 --passes=1 | 4054 | /// --limit=16 --auto-alt-ref=1 --enable-global-motion=1 --passes=1 |
| 4029 | /// --obu` over a hand-built `C422` y4m (header line, then `FRAME\n` plus | 4055 | /// --obu` over a hand-built `C422` y4m (header line, then `FRAME\n` plus |
| 4030 | /// one frame of planes per frame -- libaom's y4minput requires those six | 4056 | /// one frame of planes per frame -- libaom's y4minput requires those six |
| 4031 | - /// bytes before EVERY frame), produced by the census sweep and copied in | 4057 | + /// bytes before EVERY frame), produced by the census sweep. The first six |
| 4032 | - /// from `~/.cache/census422b/sweep/`. They are ordinary libaom 4:2:2 | 4058 | + /// were copied in from `~/.cache/census422b/sweep/`; the seventh is the |
| 4033 | - /// streams with nothing bolted on. | 4059 | + /// same sweep's `s422_384x240.obu`, which lane-av1422tailskip had already |
| 4060 | + /// committed under the name in its own row (the two files are byte for | ||
| 4061 | + /// byte identical -- sha256 `bf1c658e9bfdc13ec1ed51e59049d2b81201941b6ef45\ | ||
| 4062 | + /// 71f8382f356ea4b815b`), so it is pinned under that name here. They are | ||
| 4063 | + /// ordinary libaom 4:2:2 streams with nothing bolted on. | ||
| 4034 | #[test] | 4064 | #[test] |
| 4035 | fn the_pinned_422_corpus_cells_decode_pixel_exact() { | 4065 | fn the_pinned_422_corpus_cells_decode_pixel_exact() { |
| 4036 | const NAME: &str = "the_pinned_422_corpus_cells_decode_pixel_exact"; | 4066 | const NAME: &str = "the_pinned_422_corpus_cells_decode_pixel_exact"; |
| @@ -4100,6 +4130,20 @@ pub(crate) mod tests { | |||
| 4100 | 10, | 4130 | 10, |
| 4101 | 16, | 4131 | 16, |
| 4102 | ), | 4132 | ), |
| 4133 | + ( | ||
| 4134 | + // Census cell `s422_384x240` -- the seventh previously | ||
| 4135 | + // diverging cell, closed by lane-av1422tailskip. Same bytes as | ||
| 4136 | + // the sweep's `s422_384x240.obu`, already in this fixtures dir | ||
| 4137 | + // under the name lane-av1422tailskip's own gate pins. | ||
| 4138 | + "422_palette_intra_in_inter_384x240_17f.obu", | ||
| 4139 | + 19344usize, | ||
| 4140 | + 0x923ccabfcb933e90u64, | ||
| 4141 | + "bf1c658e9bfdc13ec1ed51e59049d2b81201941b6ef4571f8382f356ea4b815b", | ||
| 4142 | + 384usize, | ||
| 4143 | + 240usize, | ||
| 4144 | + 8u8, | ||
| 4145 | + 16usize, | ||
| 4146 | + ), | ||
| 4103 | ] { | 4147 | ] { |
| 4104 | let row = format!("{NAME}[{file}]"); | 4148 | let row = format!("{NAME}[{file}]"); |
| 4105 | let path = crate_pin(file); | 4149 | let path = crate_pin(file); |