From 7588f4f2f381f948993daa01683d7a995e259c39 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Fri, 3 Apr 2020 11:56:57 +0200 Subject: [PATCH] codec_support/h263: allocate more space in MV predictor In case of left neigbour access wraparound this will always return zero MV. --- nihav-codec-support/src/codecs/h263/decoder.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nihav-codec-support/src/codecs/h263/decoder.rs b/nihav-codec-support/src/codecs/h263/decoder.rs index 2707e76..a78bf4f 100644 --- a/nihav-codec-support/src/codecs/h263/decoder.rs +++ b/nihav-codec-support/src/codecs/h263/decoder.rs @@ -22,7 +22,7 @@ impl MVInfo { fn reset(&mut self, mb_w: usize, mb_start: usize, mvmode: MVMode) { self.mb_start = mb_start; self.mb_w = mb_w; - self.mb_stride = mb_w * 2; + self.mb_stride = mb_w * 2 + 2; self.mv.resize(self.mb_stride * 3, ZERO_MV); self.mvmode = mvmode; } -- 2.39.5