indeo3: fix fill_block8x8
authorKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 18 Feb 2019 12:52:24 +0000 (13:52 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Mon, 18 Feb 2019 12:52:24 +0000 (13:52 +0100)
nihav-indeo/src/codecs/indeo3.rs

index f4b2d3c01da2b52c2fe72b531e592a00a39cedf2..a30cd1f2917d0890ad91593b3b81d8bf427f969d 100644 (file)
@@ -237,6 +237,9 @@ fn fill_block8x8(bufs: &mut Buffers, doff: usize, stride: usize, h: usize, topli
     }
 
     let start = if !topline { 0 } else { 1 };
+    if topline {
+        didx += stride;
+    }
     if bufs.fbuf {
         for _ in start..h {
             for i in 0..8 { bufs.buf1[didx + i] = buf[i]; }