Commit c4e9e473 authored by Nathan E. Egge's avatar Nathan E. Egge
Browse files

Rename aom_read_tree_bits() to aom_read_tree_as_bits().

Rename the aom_read_tree_bits() function to match aom_read_tree_as_cdf().

Change-Id: I779f544615b1c19bb1f781c1f7a0f59dda7bd466
parent 912672b6
......@@ -50,8 +50,6 @@
aom_read_tree_(r, tree, probs ACCT_STR_ARG(ACCT_STR_NAME))
#define aom_read_literal(r, bits, ACCT_STR_NAME) \
aom_read_literal_(r, bits ACCT_STR_ARG(ACCT_STR_NAME))
#define aom_read_tree_bits(r, tree, probs, ACCT_STR_NAME) \
aom_read_tree_bits_(r, tree, probs ACCT_STR_ARG(ACCT_STR_NAME))
#define aom_read_cdf(r, cdf, nsymbs, ACCT_STR_NAME) \
aom_read_cdf_(r, cdf, nsymbs ACCT_STR_ARG(ACCT_STR_NAME))
#define aom_read_symbol(r, cdf, nsymbs, ACCT_STR_NAME) \
......@@ -189,14 +187,12 @@ static INLINE int aom_read_literal_(aom_reader *r, int bits ACCT_STR_PARAM) {
return literal;
}
static INLINE int aom_read_tree_bits_(aom_reader *r, const aom_tree_index *tree,
const aom_prob *probs ACCT_STR_PARAM) {
static INLINE int aom_read_tree_as_bits(aom_reader *r,
const aom_tree_index *tree,
const aom_prob *probs) {
aom_tree_index i = 0;
while ((i = tree[i + aom_read(r, probs[i >> 1], NULL)]) > 0) continue;
#if CONFIG_ACCOUNTING
if (ACCT_STR_NAME) aom_process_accounting(r, ACCT_STR_NAME);
#endif
return -i;
}
......@@ -274,7 +270,7 @@ static INLINE int aom_read_tree_(aom_reader *r, const aom_tree_index *tree,
#if CONFIG_EC_MULTISYMBOL
ret = aom_read_tree_as_cdf(r, tree, probs);
#else
ret = aom_read_tree_bits(r, tree, probs, NULL);
ret = aom_read_tree_as_bits(r, tree, probs);
#endif
#if CONFIG_ACCOUNTING
if (ACCT_STR_NAME) aom_process_accounting(r, ACCT_STR_NAME);
......
......@@ -137,9 +137,10 @@ static INLINE void aom_write_literal(aom_writer *w, int data, int bits) {
for (bit = bits - 1; bit >= 0; bit--) aom_write_bit(w, 1 & (data >> bit));
}
static INLINE void aom_write_tree_bits(aom_writer *w, const aom_tree_index *tr,
const aom_prob *probs, int bits, int len,
aom_tree_index i) {
static INLINE void aom_write_tree_as_bits(aom_writer *w,
const aom_tree_index *tr,
const aom_prob *probs, int bits,
int len, aom_tree_index i) {
do {
const int bit = (bits >> --len) & 1;
aom_write(w, bit, probs[i >> 1]);
......@@ -147,11 +148,9 @@ static INLINE void aom_write_tree_bits(aom_writer *w, const aom_tree_index *tr,
} while (len);
}
static INLINE void aom_write_tree_bits_record(aom_writer *w,
const aom_tree_index *tr,
const aom_prob *probs, int bits,
int len, aom_tree_index i,
TOKEN_STATS *token_stats) {
static INLINE void aom_write_tree_as_bits_record(
aom_writer *w, const aom_tree_index *tr, const aom_prob *probs, int bits,
int len, aom_tree_index i, TOKEN_STATS *token_stats) {
do {
const int bit = (bits >> --len) & 1;
aom_write_record(w, bit, probs[i >> 1], token_stats);
......@@ -243,7 +242,7 @@ static INLINE void aom_write_tree(aom_writer *w, const aom_tree_index *tree,
#if CONFIG_EC_MULTISYMBOL
aom_write_tree_as_cdf(w, tree, probs, bits, len, i);
#else
aom_write_tree_bits(w, tree, probs, bits, len, i);
aom_write_tree_as_bits(w, tree, probs, bits, len, i);
#endif
}
......@@ -256,7 +255,7 @@ static INLINE void aom_write_tree_record(aom_writer *w,
(void)token_stats;
aom_write_tree_as_cdf(w, tree, probs, bits, len, i);
#else
aom_write_tree_bits_record(w, tree, probs, bits, len, i, token_stats);
aom_write_tree_as_bits_record(w, tree, probs, bits, len, i, token_stats);
#endif
}
......
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