]> git.nihav.org Git - nihav.git/commitdiff
h263: add missing calls for backward MV predictor keeper
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 24 Feb 2018 14:04:25 +0000 (15:04 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 24 Feb 2018 17:35:29 +0000 (18:35 +0100)
src/codecs/h263/decoder.rs

index cba6ef9b0c556b5d49dab3aed19b16b12b44eea4..85d9eeaa5cbe510935c4273571b8ee710e45f30a 100644 (file)
@@ -365,9 +365,15 @@ impl H263BaseDecoder {
                         bdsp.idct(&mut blk[i]);
                     }
                     blockdsp::add_blocks(&mut buf, mb_x, mb_y, &blk);
+                    if is_b {
+                        mvi2.set_zero_mv(mb_x);
+                    }
                 } else if binfo.mode != Type::B {
                     self.mv_data.push(BlockMVInfo::Inter_1MV(ZERO_MV));
                     mvi.set_zero_mv(mb_x);
+                    if is_b {
+                        mvi2.set_zero_mv(mb_x);
+                    }
                     if let Some(ref srcbuf) = self.ipbs.get_lastref() {
                         bdsp.copy_blocks(&mut buf, srcbuf, mb_x * 16, mb_y * 16, 16, 16, ZERO_MV);
                     }
@@ -483,6 +489,9 @@ impl H263BaseDecoder {
                 }
             }
             mvi.update_row();
+            if is_b {
+                mvi2.update_row();
+            }
             cbpi.update_row();
             sstate.new_row();
         }