Use aom_reader / aom_writer API to code rest.
The functions aom_encode_pvq_split() and aom_decode_pvq_split() 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: Iee79777f35aebbb23043a7efa7fe439af70348ba
This commit is contained in:
Родитель
f1e2fbdc9b
Коммит
25007c889a
|
@ -43,11 +43,7 @@ static int aom_decode_pvq_split_(aom_reader *r, od_pvq_codeword_ctx *adapt,
|
|||
fctx = 7*ctx + (sum >> shift) - 1;
|
||||
msbs = aom_decode_cdf_adapt(r, adapt->pvq_split_cdf[fctx],
|
||||
(sum >> shift) + 1, adapt->pvq_split_increment, ACCT_STR);
|
||||
#if CONFIG_DAALA_EC
|
||||
if (shift) count = od_ec_dec_bits(&r->ec, shift, ACCT_STR);
|
||||
#else
|
||||
# error "CONFIG_PVQ currently requires CONFIG_DAALA_EC."
|
||||
#endif
|
||||
if (shift) count = aom_read_literal(r, shift, ACCT_STR);
|
||||
count += msbs << shift;
|
||||
if (count > sum) {
|
||||
count = sum;
|
||||
|
|
|
@ -39,11 +39,7 @@ static void aom_encode_pvq_split(aom_writer *w, od_pvq_codeword_ctx *adapt,
|
|||
fctx = 7*ctx + sum - 1;
|
||||
aom_encode_cdf_adapt(w, count, adapt->pvq_split_cdf[fctx], sum + 1,
|
||||
adapt->pvq_split_increment);
|
||||
#if CONFIG_DAALA_EC
|
||||
if (shift) od_ec_enc_bits(&w->ec, rest, shift);
|
||||
#else
|
||||
# error "CONFIG_PVQ currently requires CONFIG_DAALA_EC."
|
||||
#endif
|
||||
if (shift) aom_write_literal(w, rest, shift);
|
||||
}
|
||||
|
||||
void aom_encode_band_pvq_splits(aom_writer *w, od_pvq_codeword_ctx *adapt,
|
||||
|
|
Загрузка…
Ссылка в новой задаче