From: Kostya Shishkov Date: Wed, 2 Aug 2017 09:06:36 +0000 (+0200) Subject: ivi: fix off-by-one shift X-Git-Url: https://git.nihav.org/?a=commitdiff_plain;h=30ac5d4e78d02de793ba064c6c97aec8ac9e2c22;p=nihav.git ivi: fix off-by-one shift --- 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 {