From 612104bb8dd3b40a635deebaca445f00aa069220 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 30 Sep 2015 22:01:41 -0400 Subject: [PATCH] vp10: extend range for delta Q values. See issue 1051. 6 bits is fairly arbitrary but at least allows writing delta Q values that are fairly normal in other codecs. I can extend to 8 if people want full range, although I personally don't have any need for that. Change-Id: I0a5a7c3d9b8eb3de4418430ab0e925d4a08cd7a0 --- vp10/decoder/decodeframe.c | 3 ++- vp10/encoder/bitstream.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vp10/decoder/decodeframe.c b/vp10/decoder/decodeframe.c index 2b0ef6430..62c294266 100644 --- a/vp10/decoder/decodeframe.c +++ b/vp10/decoder/decodeframe.c @@ -1125,7 +1125,8 @@ static void setup_loopfilter(struct loopfilter *lf, } static INLINE int read_delta_q(struct vpx_read_bit_buffer *rb) { - return vpx_rb_read_bit(rb) ? vpx_rb_read_inv_signed_literal(rb, 4) : 0; + return vpx_rb_read_bit(rb) ? + vpx_rb_read_inv_signed_literal(rb, CONFIG_MISC_FIXES ? 6 : 4) : 0; } static void setup_quantization(VP10_COMMON *const cm, MACROBLOCKD *const xd, diff --git a/vp10/encoder/bitstream.c b/vp10/encoder/bitstream.c index 9072e160c..485fc53c0 100644 --- a/vp10/encoder/bitstream.c +++ b/vp10/encoder/bitstream.c @@ -733,7 +733,7 @@ static void encode_loopfilter(struct loopfilter *lf, static void write_delta_q(struct vpx_write_bit_buffer *wb, int delta_q) { if (delta_q != 0) { vpx_wb_write_bit(wb, 1); - vpx_wb_write_inv_signed_literal(wb, delta_q, 4); + vpx_wb_write_inv_signed_literal(wb, delta_q, CONFIG_MISC_FIXES ? 6 : 4); } else { vpx_wb_write_bit(wb, 0); } -- 2.40.0