U5: remove unused ec-vp8 BoolDecoder::byte_offset and read_tree_no_root_eob
Browse files at this commitb0cfde89c4ed03aa7af4e38b6ce8a36fca8da7b6Parent: 1e371cb1 changed file +0 -21
- crates/ec-vp8/src/bool.rs +0 -21
crates/ec-vp8/src/bool.rsmodified+0 -21
| @@ -67,11 +67,6 @@ impl<'a> BoolDecoder<'a> { | |||
| 67 | self.overreads | 67 | self.overreads |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | - /// Offset of the next unread input byte, for desync diagnostics. | ||
| 71 | - pub fn byte_offset(&self) -> usize { | ||
| 72 | - self.pos | ||
| 73 | - } | ||
| 74 | - | ||
| 75 | fn next_byte(&mut self) -> u32 { | 70 | fn next_byte(&mut self) -> u32 { |
| 76 | match self.data.get(self.pos) { | 71 | match self.data.get(self.pos) { |
| 77 | Some(&b) => { | 72 | Some(&b) => { |
| @@ -170,22 +165,6 @@ impl<'a> BoolDecoder<'a> { | |||
| 170 | } | 165 | } |
| 171 | } | 166 | } |
| 172 | 167 | ||
| 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 | - } | ||
| 189 | } | 168 | } |
| 190 | 169 | ||
| 191 | /// The RFC 6386 §7.3 reference `bool_encoder`, test-only: it lets the tests | 170 | /// The RFC 6386 §7.3 reference `bool_encoder`, test-only: it lets the tests |