forge
Explore
Log in

Don't you dare go Hollow

U5: remove unused ec-vp8 BoolDecoder::byte_offset and read_tree_no_root_eob

Browse files at this commit

b0cfde89c4ed03aa7af4e38b6ce8a36fca8da7b6Ahmet Kaan GümüşParent: 1e371cb
No caller in edith, yumush or ec-vp8; rustc flags neither as used once the trace gate is gone.
crates/ec-vp8/src/bool.rsmodified+0 -21
@@ -67,11 +67,6 @@ impl<'a> BoolDecoder<'a> {
6767 self.overreads
6868 }
6969
70- /// Offset of the next unread input byte, for desync diagnostics.
71- pub fn byte_offset(&self) -> usize {
72- self.pos
73- }
74-
7570 fn next_byte(&mut self) -> u32 {
7671 match self.data.get(self.pos) {
7772 Some(&b) => {
@@ -170,22 +165,6 @@ impl<'a> BoolDecoder<'a> {
170165 }
171166 }
172167
173- /// Decode a tree-coded value, skipping the root's `dct_eob` branch —
174- /// used for every token after a `DCT_0`, since EOB cannot follow a
175- /// zero token (RFC §13.2). `tree` must be the full coefficient tree;
176- /// decoding starts at interior node 1.
177- pub fn read_tree_no_root_eob(&mut self, tree: &[i8], probs: &[u8]) -> u8 {
178- // The coefficient tree's layout puts the EOB leaf at the root's
179- // left branch; descending the right branch first is exactly
180- // "start at the root with a read 1".
181- let mut i: i32 = i32::from(tree[1]); // interior node reached on the "1" branch
182- while {
183- let b = self.read_bool(probs[(i >> 1) as usize]);
184- i = i32::from(tree[(i + i32::from(b as i8)) as usize]);
185- i > 0
186- } {}
187- (-i) as u8
188- }
189168 }
190169
191170 /// The RFC 6386 §7.3 reference `bool_encoder`, test-only: it lets the tests