forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits

scratch_bool.rs14 lines, 571 bytesHistoryRawDownload
1use crate::ivf;
2use ec_vp9::bool::BoolDecoder;
3
4#[test]
5fn probe_first_bools() {
6 let dir = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../..");
7 let bytes = std::fs::read(dir.join("fixtures/vp9/lossless-64.ivf")).unwrap();
8 let (_, _, _, frames) = ivf::parse_ivf(&bytes);
9 let frame = &frames[0].data;
10 println!("slice bytes: {:02x?}", &frame[18..26]);
11 let mut r = BoolDecoder::new(&frame[18..18 + 113]).unwrap();
12 let bits: Vec<u8> = (0..8).map(|_| u8::from(r.read_bool(128))).collect();
13 println!("first 8 bools(128): {bits:?}");
14}