From e3ace094c509bd04b3b15109c943a4a2419530e1 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 24 Feb 2018 15:09:08 +0100 Subject: [PATCH] realvideo2: fix dequant for I-frames --- src/codecs/h263/rv20.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)?; -- 2.39.5