If not at EOS, reload up to VP8L_LBITS byte-by-byte
| 320 | |
| 321 | // If not at EOS, reload up to VP8L_LBITS byte-by-byte |
| 322 | static void ShiftBytes(VP8LBitReader* const br) { |
| 323 | while (br->bit_pos_ >= 8 && br->pos_ < br->len_) { |
| 324 | br->val_ >>= 8; |
| 325 | br->val_ |= ((vp8l_val_t)br->buf_[br->pos_]) << (VP8L_LBITS - 8); |
| 326 | ++br->pos_; |
| 327 | br->bit_pos_ -= 8; |
| 328 | } |
| 329 | if (VP8LIsEndOfStream(br)) { |
| 330 | VP8LSetEndOfStream(br); |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | uint32_t VP8LReadBits(VP8LBitReader* const br, int n_bits) { |
| 335 | assert(n_bits >= 0); |
no test coverage detected