Commit f1e2fbdc authored by Nathan E. Egge's avatar Nathan E. Egge Committed by Nathan Egge

Use aom_reader / aom_writer API to code raw bits.

The functions aom_laplace_encode_special() and
 aom_laplace_decode_special() code the rest value as raw bits using the
 od_ec_enc_bits() and od_ec_dec_bits() functions.
These code bits in the reverse order as the aom_write_literal() and
 aom_read_literal() functions, so both the encoder and decoder must
 be changed at the same time.
This commit has no impact on metrics but is a bitstream change.

Change-Id: I428d5a83dd108c3a54f3c1dbae2c7fd5e59f5726
parent 8a70919e
......@@ -139,12 +139,8 @@ int aom_laplace_decode_special_(aom_reader *r, unsigned decay,
ms -= 15;
}
while (sym >= 15 && ms != 0);
#if CONFIG_DAALA_EC
if (shift) pos = (xs << shift) + od_ec_dec_bits(&r->ec, shift, ACCT_STR);
if (shift) pos = (xs << shift) + aom_read_literal(r, shift, ACCT_STR);
else pos = xs;
#else
# error "CONFIG_PVQ currently requires CONFIG_DAALA_EC."
#endif
OD_ASSERT(pos >> shift <= max >> shift || max == -1);
if (max != -1 && pos > max) {
pos = max;
......
......@@ -125,9 +125,5 @@ void aom_laplace_encode_special(aom_writer *w, int x, unsigned decay, int max) {
ms -= 15;
}
while (sym >= 15 && ms != 0);
#if CONFIG_DAALA_EC
if (shift) od_ec_enc_bits(&w->ec, x & ((1 << shift) - 1), shift);
#else
# error "CONFIG_PVQ currently requires CONFIG_DAALA_EC."
#endif
if (shift) aom_write_literal(w, x & ((1 << shift) - 1), shift);
}
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