update tests for shared encoder output

This commit is contained in:
Dylan M. Taylor committed 2026-11-12 07:13:43 +00:00
1 parent d71ccdfc9d
commit c43845a962
2 files changed
+7 -9

No files matched your search

+6 -8
View File
@@ -94,14 +94,12 @@ fn export_bytes(format: OutputFormat, name: &str) -> Vec<u8> {
#[test]
fn h264_movie_bytes_are_pinned() {
let data = export_bytes(OutputFormat::H264, "/out/pinned.mp4");
// FilmCraft 09aaf9b's encoder lists its settings in the first frame's user-data SEI (211
// bytes where 0.1.1's name took 50): 161 bytes more than the FilmCraft 2c5ba7a pin. The encoder's
// version string "0.8.0" -> "0.12.0" in that SEI adds one more byte (and one to the size fields).
// craft-video's encoder (craft-libs) is that encoder at a later FilmCraft revision than the
// d5ead4b pin: it names itself "craft-h264enc 0.1.0" in the SEI (5 bytes fewer), and with these
// settings its packets match the pin's for the first ten frames and differ after (24 bytes more
// in all, with the size fields).
assert_eq!((data.len(), fnv1a(&data)), (104_366, 4_413_091_804_733_884_658), "H.264 MP4");
// The shared encoder revision includes craft-video's later motion-search work (four-axis
// sub-pel refinement and gating 16x8/8x16 searches on the 8x8 result). The app's encoder
// configuration and input path are unchanged, but its coded decisions and output bytes differ
// from the earlier craft-video pin. craft-video pins those decisions and checks bit-exact
// decoding against its reconstruction with FFmpeg/ffprobe oracles.
assert_eq!((data.len(), fnv1a(&data)), (102_462, 9_984_203_720_367_148_918), "H.264 MP4");
}
#[test]
+1 -1
View File
@@ -381,7 +381,7 @@ fn offset_paths_miter_uses_animatable_lottie_value() {
assert_eq!(shapes[0]["ml"]["k"][1]["s"], json!([9.0]));
assert_eq!(shapes[1]["ml"], json!({"a": 0, "k": 6.0}));
assert_eq!(shapes[2]["ty"], "st");
assert_eq!(shapes[2]["ml"], json!(7.0));
assert_eq!(shapes[2]["ml"].as_f64(), Some(7.0));
assert!(compare_comps(&p, cid, &q, nc) > 10);
let restored = &q.comp(nc).unwrap().layers[0];
assert_eq!(restored.props.group("contents/offset").unwrap().get("miter").unwrap().keys.len(), 2);