Commit 8c6bff6c authored by John Koleszar's avatar John Koleszar Committed by Gerrit Code Review
Browse files

Merge "Add marker bit to bool-coded partition start" into experimental

parents 0bb6da36 a425e2cc
......@@ -68,6 +68,9 @@ TEST(VP9, TestBitIO) {
vp9_stop_encode(&bw);
// First bit should be zero
GTEST_ASSERT_EQ(bw_buffer[0] & 0x80, 0);
vp9_reader br;
vp9_reader_init(&br, bw_buffer, buffer_size);
bit_rnd.Reset(random_seed);
......
......@@ -14,6 +14,8 @@
#include "vp9/decoder/vp9_dboolhuff.h"
int vp9_reader_init(vp9_reader *r, const uint8_t *buffer, size_t size) {
int marker_bit;
r->buffer_end = buffer + size;
r->buffer = buffer;
r->value = 0;
......@@ -24,7 +26,8 @@ int vp9_reader_init(vp9_reader *r, const uint8_t *buffer, size_t size) {
return 1;
vp9_reader_fill(r);
return 0;
marker_bit = vp9_read_bit(r);
return marker_bit != 0;
}
void vp9_reader_fill(vp9_reader *r) {
......
......@@ -47,6 +47,7 @@ void vp9_start_encode(vp9_writer *br, uint8_t *source) {
br->count = -24;
br->buffer = source;
br->pos = 0;
vp9_write_bit(br, 0);
}
void vp9_stop_encode(vp9_writer *br) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment