From: Kostya Shishkov Date: Sat, 24 Feb 2018 14:09:08 +0000 (+0100) Subject: realvideo2: fix dequant for I-frames X-Git-Url: https://git.nihav.org/?p=nihav.git;a=commitdiff_plain;h=e3ace094c509bd04b3b15109c943a4a2419530e1 realvideo2: fix dequant for I-frames --- diff --git a/src/codecs/h263/rv20.rs b/src/codecs/h263/rv20.rs index 3298fab..c734bc9 100644 --- a/src/codecs/h263/rv20.rs +++ b/src/codecs/h263/rv20.rs @@ -128,7 +128,7 @@ impl<'a> RealVideo20BR<'a> { }; let rl_cb = if sstate.is_iframe { &self.tables.aic_rl_cb } else { &self.tables.rl_cb }; - let q_add = if quant == 0 { 0i16 } else { ((quant - 1) | 1) as i16 }; + let q_add = if quant == 0 || sstate.is_iframe { 0i16 } else { ((quant - 1) | 1) as i16 }; let q = (quant * 2) as i16; while idx < 64 { let code = br.read_cb(rl_cb)?;