forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

dbg_first.rs18 lines, 630 bytesHistoryRawDownload
1// Decode frame 0 of an IVF with decision tracing (EC_VP8_TRACE=1).
2use ec_vp8::decode::Decoder;
3
4fn main() {
5 let path = std::env::args().nth(1).expect("ivf path");
6 let bytes = std::fs::read(path).unwrap();
7 let sz = u32::from_le_bytes([bytes[32], bytes[33], bytes[34], bytes[35]]) as usize;
8 let frame = &bytes[44..44 + sz];
9 let mut dec = Decoder::new();
10 match dec.decode(frame) {
11 Ok(Some(pic)) => println!(
12 "OUT {}x{} y[0..8]={:?}",
13 pic.width, pic.height, &pic.y[..8]
14 ),
15 Ok(None) => println!("OUT hidden"),
16 Err(e) => println!("OUT ERR {e}"),
17 }
18}