From 4726ca2c24097a4545b92c8e95556166def945c5 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Thu, 6 Feb 2020 18:44:32 +0100 Subject: [PATCH] vp7: skip DC transform for empty block --- nihav-duck/src/codecs/vp7.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nihav-duck/src/codecs/vp7.rs b/nihav-duck/src/codecs/vp7.rs index ea423ad..50fe5db 100644 --- a/nihav-duck/src/codecs/vp7.rs +++ b/nihav-duck/src/codecs/vp7.rs @@ -552,7 +552,7 @@ impl VP7Decoder { } if has_ac[24] { idct4x4(y2block); - } else { + } else if y2block[0] != 0 { idct4x4_dc(y2block); } for i in 0..16 { @@ -562,7 +562,7 @@ impl VP7Decoder { for i in 0..24 { if has_ac[i] { idct4x4(&mut self.coeffs[i]); - } else { + } else if self.coeffs[i][0] != 0 { idct4x4_dc(&mut self.coeffs[i]); } } -- 2.39.5