From ec910d81405c736a4490383a250299a7837c2e64 Mon Sep 17 00:00:00 2001 From: trav90 Date: Thu, 18 Oct 2018 21:53:44 -0500 Subject: Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614 --- third_party/aom/aom_dsp/bitwriter.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'third_party/aom/aom_dsp/bitwriter.h') diff --git a/third_party/aom/aom_dsp/bitwriter.h b/third_party/aom/aom_dsp/bitwriter.h index 68bc1c8f8..7d3b34306 100644 --- a/third_party/aom/aom_dsp/bitwriter.h +++ b/third_party/aom/aom_dsp/bitwriter.h @@ -62,9 +62,8 @@ static INLINE void init_token_stats(TOKEN_STATS *token_stats) { static INLINE void aom_start_encode(aom_writer *bc, uint8_t *buffer) { #if CONFIG_ANS - (void)bc; - (void)buffer; - assert(0 && "buf_ans requires a more complicated startup procedure"); + aom_buf_ans_alloc(bc, /* error context*/ NULL); + buf_ans_write_init(bc, buffer); #else aom_daala_start_encode(bc, buffer); #endif @@ -72,8 +71,8 @@ static INLINE void aom_start_encode(aom_writer *bc, uint8_t *buffer) { static INLINE void aom_stop_encode(aom_writer *bc) { #if CONFIG_ANS - (void)bc; - assert(0 && "buf_ans requires a more complicated shutdown procedure"); + aom_buf_ans_flush(bc); + bc->pos = buf_ans_write_end(bc); #else aom_daala_stop_encode(bc); #endif @@ -143,6 +142,14 @@ static INLINE void aom_write_symbol(aom_writer *w, int symb, aom_cdf_prob *cdf, update_cdf(cdf, symb, nsymbs); } +#if CONFIG_LV_MAP +static INLINE void aom_write_bin(aom_writer *w, int symb, aom_cdf_prob *cdf, + int nsymbs) { + aom_write_cdf(w, symb, cdf, nsymbs); + update_cdf(cdf, symb, nsymbs); +} +#endif + static INLINE void aom_write_tree_as_cdf(aom_writer *w, const aom_tree_index *tree, const aom_prob *probs, int bits, -- cgit v1.2.3