summaryrefslogtreecommitdiffstats
path: root/third_party/aom/aom_dsp/daalaboolwriter.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/aom/aom_dsp/daalaboolwriter.c')
-rw-r--r--third_party/aom/aom_dsp/daalaboolwriter.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/third_party/aom/aom_dsp/daalaboolwriter.c b/third_party/aom/aom_dsp/daalaboolwriter.c
index 59af2a243..b24ffbf3f 100644
--- a/third_party/aom/aom_dsp/daalaboolwriter.c
+++ b/third_party/aom/aom_dsp/daalaboolwriter.c
@@ -18,11 +18,14 @@ void aom_daala_start_encode(daala_writer *br, uint8_t *source) {
od_ec_enc_init(&br->ec, 62025);
}
-void aom_daala_stop_encode(daala_writer *br) {
+int aom_daala_stop_encode(daala_writer *br) {
+ int nb_bits;
uint32_t daala_bytes;
unsigned char *daala_data;
daala_data = od_ec_enc_done(&br->ec, &daala_bytes);
+ nb_bits = od_ec_enc_tell(&br->ec);
memcpy(br->buffer, daala_data, daala_bytes);
br->pos = daala_bytes;
od_ec_enc_clear(&br->ec);
+ return nb_bits;
}