summaryrefslogtreecommitdiffstats
path: root/third_party/aom/aom_dsp/bitwriter.h
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
committertrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
commitec910d81405c736a4490383a250299a7837c2e64 (patch)
tree4f27cc226f93a863121aef6c56313e4153a69b3e /third_party/aom/aom_dsp/bitwriter.h
parent01eb57073ba97b2d6cbf20f745dfcc508197adc3 (diff)
downloadUXP-ec910d81405c736a4490383a250299a7837c2e64.tar
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.gz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.lz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.xz
UXP-ec910d81405c736a4490383a250299a7837c2e64.zip
Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
Diffstat (limited to 'third_party/aom/aom_dsp/bitwriter.h')
-rw-r--r--third_party/aom/aom_dsp/bitwriter.h17
1 files changed, 12 insertions, 5 deletions
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,