| 1 | use crate::ivf; |
| 2 | use ec_vp9::bool::BoolDecoder; |
| 3 | |
| 4 | #[test] |
| 5 | fn 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 | } |