forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

scratch_synth.rs21 lines, 751 bytesHistoryRawDownload
1//! [scratch] Parse a synthetic keyframe header dump.
2//!
3//! The dump was produced ad hoc in an earlier session and lives in tmpfs
4//! (`/tmp/synth-kf-frame.bin`), so the test skips - loudly - when it is gone:
5//! a missing tmpfs fixture is not a regression.
6use ec_vp9_syntax::Vp9Parser;
7#[test]
8fn synth() {
9 let Ok(frame) = std::fs::read("/tmp/synth-kf-frame.bin") else {
10 println!("SKIP: /tmp/synth-kf-frame.bin absent (tmpfs fixture)");
11 return;
12 };
13 let mut p = Vp9Parser::new();
14 match p.parse_frame(&frame) {
15 Ok(h) => println!(
16 "w={} h={} uhs={} hsib={}",
17 h.width, h.height, h.uncompressed_header_size, h.header_size_in_bytes
18 ),
19 Err(e) => println!("ERR {e}"),
20 }
21}