From c43845a962a9d005435c3b5a7f8f6de7803ac0d7 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Thu, 12 Nov 2026 07:13:43 +0000 Subject: [PATCH] update tests for shared encoder output --- crates/export/tests/it/movie_bytes.rs | 14 ++++++-------- crates/lottie/src/tests.rs | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/crates/export/tests/it/movie_bytes.rs b/crates/export/tests/it/movie_bytes.rs index 00e19b396..95d67fd53 100644 --- a/crates/export/tests/it/movie_bytes.rs +++ b/crates/export/tests/it/movie_bytes.rs @@ -94,14 +94,12 @@ fn export_bytes(format: OutputFormat, name: &str) -> Vec { #[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] diff --git a/crates/lottie/src/tests.rs b/crates/lottie/src/tests.rs index 8656852de..35c52026d 100644 --- a/crates/lottie/src/tests.rs +++ b/crates/lottie/src/tests.rs @@ -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);