We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42c2634 commit 8e6e003Copy full SHA for 8e6e003
src/structs/vpx_bool_writer.rs
@@ -286,12 +286,11 @@ impl<W: Write> VPXBoolWriter<W> {
286
let mut tmp_value = self.low_value;
287
let stream_bits = 64 - tmp_value.leading_zeros() as i32 - 2;
288
289
- tmp_value <<= MAX_STREAM_BITS - stream_bits - 1;
290
- if (tmp_value & (1 << (MAX_STREAM_BITS - 1))) != 0 {
+ tmp_value <<= MAX_STREAM_BITS - stream_bits;
+ if (tmp_value & (1 << MAX_STREAM_BITS)) != 0 {
291
self.carry();
292
}
293
294
- tmp_value <<= 1;
295
let mut shift = MAX_STREAM_BITS - 8;
296
let mut stream_bytes = (stream_bits + 7) >> 3;
297
while stream_bytes > 0 {
0 commit comments