Pin the rect-partitioned 192x128 stream whose inter frame carries a 64x64 intra block
Browse files at this commit732ea3bb53996968d8bdd9105ac4cd76a96e1c7fParent: 300c046- test
- pin the rect-partitioned 192x128 stream whose inter frame carries a 64x64 intra block
1 changed file +42 -0
- crates/ec-av1/src/stream.rs +42 -0
crates/ec-av1/src/stream.rsmodified+42 -0
| @@ -7398,6 +7398,48 @@ mod tests { | ||
| 7398 | 7398 | } |
| 7399 | 7399 | } |
| 7400 | 7400 | |
| 7401 | + /// lane-mc64 r2: the RECT-ON twin of the square-only gate above, pinned | |
| 7402 | + /// as a stream fixture because its aomenc recipe is not reproducible | |
| 7403 | + /// (the r2 recipe re-encoded to a different file, measured md5 | |
| 7404 | + /// `278be00...` vs the fixture's `add55f6...`; class | |
| 7405 | + /// `seeded-fixture-not-reproducible`). | |
| 7406 | + /// | |
| 7407 | + /// `crates/ec-av1/fixtures/av1_192x128_8bit_intra64_in_inter.obu` | |
| 7408 | + /// (sha256 `e4cff46cb1700527c68efc866db27a2835705e949d646f73f0c9df577d594bd6`) | |
| 7409 | + /// carries a 64x64 `PARTITION_NONE` INTRA block inside an INTER frame at | |
| 7410 | + /// decode-order frame 2, mi(16,32), in a stream whose OTHER superblocks | |
| 7411 | + /// are rect-partitioned -- so the 64-axis `is_cfl_allowed` narrowing | |
| 7412 | + /// (`blockd.h`: `wide <= 32 && high <= 32`) has to hold on the intra | |
| 7413 | + /// arm that the rect recipe reaches, not only on the whole-superblock | |
| 7414 | + /// one. Before lane-sbrect10's fix this frame reconstructed with 3720 | |
| 7415 | + /// wrong luma samples (delta -12..+9, chroma bit-exact) and the decode | |
| 7416 | + /// then died at frame 3 on a phantom refusal of its own desync (class | |
| 7417 | + /// `refusal-from-own-desync`); all 6 decode-order frames are byte-exact | |
| 7418 | + /// against the oracle now. | |
| 7419 | + #[test] | |
| 7420 | + fn a_pinned_rect_stream_with_a_64x64_intra_block_in_an_inter_frame_decodes_pixel_exact() { | |
| 7421 | + const NAME: &str = | |
| 7422 | + "a_pinned_rect_stream_with_a_64x64_intra_block_in_an_inter_frame_decodes_pixel_exact"; | |
| 7423 | + let _gate_lock = lock_gate_counters(); | |
| 7424 | + if !have_aomenc() { | |
| 7425 | + eprintln!("SKIP {NAME}: no aomenc/aomdec oracle at {}", aomenc_path().display()); | |
| 7426 | + return; | |
| 7427 | + } | |
| 7428 | + let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) | |
| 7429 | + .join("fixtures/av1_192x128_8bit_intra64_in_inter.obu"); | |
| 7430 | + let stream = std::fs::read(&path) | |
| 7431 | + .unwrap_or_else(|e| panic!("{NAME}: reading {}: {e}", path.display())); | |
| 7432 | + let before = crate::decode::nocfl_uv_mode_hits(); | |
| 7433 | + let (frames, hidden) = decode_all_frames_vs_oracle(&stream, NAME); | |
| 7434 | + let hits = crate::decode::nocfl_uv_mode_hits() - before; | |
| 7435 | + assert_eq!(frames, 6, "{NAME}: expected 6 decode-order frames ({hidden} hidden)"); | |
| 7436 | + assert!( | |
| 7437 | + hits > 0, | |
| 7438 | + "{NAME}: no 64-axis intra block read the no-CFL uv_mode alphabet -- the fixture no \ | |
| 7439 | + longer carries the shape this test gates" | |
| 7440 | + ); | |
| 7441 | + } | |
| 7442 | + | |
| 7401 | 7443 | /// lane-inter4 r2: the 32x32-level inter `PARTITION_HORZ`/`PARTITION_VERT` |
| 7402 | 7444 | /// strips (32x16 / 16x32) carrying a REAL residual -- the capability r1 |
| 7403 | 7445 | /// found missing ("a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs |