Fix redundancy in delta_q signalling.
rem_bits-1 not rem_bits should be transmitted so that
2 cannot be coded in two ways.
BUG=aomedia:811
Change-Id: Iaa0203214bbe6fc6775e05fe4b6e976d568f54b3
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 7db0afc..a3879d4 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -533,7 +533,7 @@
if (!smallval) {
rem_bits = OD_ILOG_NZ(abs - 1) - 1;
thr = (1 << rem_bits) + 1;
- aom_write_literal(w, rem_bits, 3);
+ aom_write_literal(w, rem_bits - 1, 3);
aom_write_literal(w, abs - thr, rem_bits);
}
if (abs > 0) {
@@ -557,7 +557,7 @@
if (!smallval) {
rem_bits = OD_ILOG_NZ(abs - 1) - 1;
thr = (1 << rem_bits) + 1;
- aom_write_literal(w, rem_bits, 3);
+ aom_write_literal(w, rem_bits - 1, 3);
aom_write_literal(w, abs - thr, rem_bits);
}
if (abs > 0) {