]> git.nihav.org Git - nihav.git/commitdiff
ivi: fix off-by-one shift
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 2 Aug 2017 09:06:36 +0000 (11:06 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 2 Aug 2017 09:06:36 +0000 (11:06 +0200)
src/codecs/indeo/ivibr.rs

index 35e1781ad3cd37d73cec7fc486bd8073f7b991c7..26f78744af41eb76467184e9f88fe31e831e9ea5 100644 (file)
@@ -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 {