summaryrefslogtreecommitdiffstats
path: root/third_party/aom/aom_dsp/bitreader_buffer.c
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-19 21:52:15 -0500
committertrav90 <travawine@palemoon.org>2018-10-19 21:52:20 -0500
commitbbcc64772580c8a979288791afa02d30bc476d2e (patch)
tree437ce94c3fdd7497508e5b55de06c6d011678597 /third_party/aom/aom_dsp/bitreader_buffer.c
parent14805f6ddbfb173c327768fff9f81f40ce5e81b0 (diff)
downloadUXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar
UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.gz
UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.lz
UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.xz
UXP-bbcc64772580c8a979288791afa02d30bc476d2e.zip
Update aom to v1.0.0
Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0.
Diffstat (limited to 'third_party/aom/aom_dsp/bitreader_buffer.c')
-rw-r--r--third_party/aom/aom_dsp/bitreader_buffer.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/third_party/aom/aom_dsp/bitreader_buffer.c b/third_party/aom/aom_dsp/bitreader_buffer.c
index e51b1cc3a..68fc381f2 100644
--- a/third_party/aom/aom_dsp/bitreader_buffer.c
+++ b/third_party/aom/aom_dsp/bitreader_buffer.c
@@ -8,8 +8,9 @@
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
-#include "./aom_config.h"
-#include "./bitreader_buffer.h"
+#include "config/aom_config.h"
+
+#include "aom_dsp/bitreader_buffer.h"
size_t aom_rb_bytes_read(struct aom_read_bit_buffer *rb) {
return (rb->bit_offset + 7) >> 3;
@@ -35,9 +36,13 @@ int aom_rb_read_literal(struct aom_read_bit_buffer *rb, int bits) {
return value;
}
-int aom_rb_read_signed_literal(struct aom_read_bit_buffer *rb, int bits) {
- const int value = aom_rb_read_literal(rb, bits);
- return aom_rb_read_bit(rb) ? -value : value;
+uint32_t aom_rb_read_unsigned_literal(struct aom_read_bit_buffer *rb,
+ int bits) {
+ uint32_t value = 0;
+ int bit;
+ for (bit = bits - 1; bit >= 0; bit--)
+ value |= (uint32_t)aom_rb_read_bit(rb) << bit;
+ return value;
}
int aom_rb_read_inv_signed_literal(struct aom_read_bit_buffer *rb, int bits) {