]> git.nihav.org Git - nihav.git/commitdiff
vp3: fix fourmv address for VP4
authorKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 21 Jan 2020 14:42:14 +0000 (15:42 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 21 Jan 2020 14:42:14 +0000 (15:42 +0100)
nihav-duck/src/codecs/vp3.rs

index 08b1e704064b021c7c543ab599d6d2040d945b3c..7efb403c7dc0e43fd807161abf5bd9d939b666e2 100644 (file)
@@ -1131,7 +1131,7 @@ impl VP34Decoder {
                     last2_mv = last_mv;
                     let saddr = (self.blk_addr[cur_blk] >> 2).min(self.blk_addr[cur_blk + 1] >> 2).min(self.blk_addr[cur_blk + 2] >> 2).min(self.blk_addr[cur_blk + 3] >> 2);
                     for i in 0..4 {
-                        let blk = &mut self.blocks[saddr + (i & 1) + (i >> 1) * self.mb_w];
+                        let blk = &mut self.blocks[saddr + (i & 1) + (i >> 1) * self.mb_w * 2];
                         blk.mv.x = br.read_cb(x_cb)? as i16;
                         if x_sign {
                             blk.mv.x = -blk.mv.x;