Commit 103f3000 authored by Yaowu Xu's avatar Yaowu Xu

misc-fix: extend the range of delta Q values

This commit merges the fix that extends the range of delta Q values
from 4 bits to 6 bits.

Related tracking issue:
https://bugs.chromium.org/p/webm/issues/detail?id=1051
Original libvpx commit:
612104bb

Change-Id: I9930863a6c96bf33c48d26486c9171b9ce2c6e12
parent 32911c53
......@@ -849,9 +849,7 @@ static void setup_dering(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
#endif // CONFIG_DERING
static INLINE int read_delta_q(struct aom_read_bit_buffer *rb) {
return aom_rb_read_bit(rb)
? aom_rb_read_inv_signed_literal(rb, CONFIG_MISC_FIXES ? 6 : 4)
: 0;
return aom_rb_read_bit(rb) ? aom_rb_read_inv_signed_literal(rb, 6) : 0;
}
static void setup_quantization(AV1_COMMON *const cm,
......
......@@ -1502,7 +1502,7 @@ static void encode_dering(int level, struct aom_write_bit_buffer *wb) {
static void write_delta_q(struct aom_write_bit_buffer *wb, int delta_q) {
if (delta_q != 0) {
aom_wb_write_bit(wb, 1);
aom_wb_write_inv_signed_literal(wb, delta_q, CONFIG_MISC_FIXES ? 6 : 4);
aom_wb_write_inv_signed_literal(wb, delta_q, 6);
} else {
aom_wb_write_bit(wb, 0);
}
......
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