diff --git a/crates/ec-vp8/src/bool.rs b/crates/ec-vp8/src/bool.rs index 58293009..82bccdc2 100644 --- a/crates/ec-vp8/src/bool.rs +++ b/crates/ec-vp8/src/bool.rs @@ -67,11 +67,6 @@ impl<'a> BoolDecoder<'a> { self.overreads } - /// Offset of the next unread input byte, for desync diagnostics. - pub fn byte_offset(&self) -> usize { - self.pos - } - fn next_byte(&mut self) -> u32 { match self.data.get(self.pos) { Some(&b) => { @@ -170,22 +165,6 @@ impl<'a> BoolDecoder<'a> { } } - /// Decode a tree-coded value, skipping the root's `dct_eob` branch — - /// used for every token after a `DCT_0`, since EOB cannot follow a - /// zero token (RFC §13.2). `tree` must be the full coefficient tree; - /// decoding starts at interior node 1. - pub fn read_tree_no_root_eob(&mut self, tree: &[i8], probs: &[u8]) -> u8 { - // The coefficient tree's layout puts the EOB leaf at the root's - // left branch; descending the right branch first is exactly - // "start at the root with a read 1". - let mut i: i32 = i32::from(tree[1]); // interior node reached on the "1" branch - while { - let b = self.read_bool(probs[(i >> 1) as usize]); - i = i32::from(tree[(i + i32::from(b as i8)) as usize]); - i > 0 - } {} - (-i) as u8 - } } /// The RFC 6386 §7.3 reference `bool_encoder`, test-only: it lets the tests