ref: 99d648b943b18b9a35c17d2c449df7408b18a1f3
parent: 74ec6fbeba816e5cdf3c6c0960b4629ca69f2e95
parent: dbd1184a5a4223a3b94ecdb758a6231e876a716b
author: Adrian Grange <[email protected]>
date: Wed Jun 18 10:02:06 EDT 2014
Merge "Improve vp9_rb_bytes_read"
--- a/vp9/decoder/vp9_read_bit_buffer.c
+++ b/vp9/decoder/vp9_read_bit_buffer.c
@@ -10,7 +10,7 @@
#include "vp9/decoder/vp9_read_bit_buffer.h"
size_t vp9_rb_bytes_read(struct vp9_read_bit_buffer *rb) {
- return rb->bit_offset / CHAR_BIT + (rb->bit_offset % CHAR_BIT > 0);
+ return (rb->bit_offset + CHAR_BIT - 1) / CHAR_BIT;
}
int vp9_rb_read_bit(struct vp9_read_bit_buffer *rb) {