From 30ac5d4e78d02de793ba064c6c97aec8ac9e2c22 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Wed, 2 Aug 2017 11:06:36 +0200 Subject: [PATCH] ivi: fix off-by-one shift --- src/codecs/indeo/ivibr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codecs/indeo/ivibr.rs b/src/codecs/indeo/ivibr.rs index 35e1781..26f7874 100644 --- a/src/codecs/indeo/ivibr.rs +++ b/src/codecs/indeo/ivibr.rs @@ -261,7 +261,7 @@ fn decode_block4x4(br: &mut BitReader, blk_cb: &IVICodebook, rvmap: &RVMap, tabl run = (br.read_ivi_cb(blk_cb)? as isize) + 1; let lo = br.read_ivi_cb(blk_cb)?; let hi = br.read_ivi_cb(blk_cb)?; - let v = (hi << 5) + lo; + let v = (hi << 6) + lo; if v == 0 { val = 0; // should not happen but still... } else { -- 2.39.5