From: Kostya Shishkov Date: Wed, 15 Feb 2023 19:45:23 +0000 (+0100) Subject: indeo3enc: requant input only in modes 0/3/10 X-Git-Url: https://git.nihav.org/?p=nihav.git;a=commitdiff_plain;h=a6627cc2d0a55f200fea53af94a89367e08e43f4 indeo3enc: requant input only in modes 0/3/10 --- diff --git a/nihav-indeo/src/codecs/indeo3enc/cell.rs b/nihav-indeo/src/codecs/indeo3enc/cell.rs index 9104189..582293b 100644 --- a/nihav-indeo/src/codecs/indeo3enc/cell.rs +++ b/nihav-indeo/src/codecs/indeo3enc/cell.rs @@ -368,10 +368,6 @@ impl CellEncoder { } } self.out[0] = (mode << 4) | (idx as u8); - - if idx >= 8 { - requant_idx = Some(idx - 8); - } } else { self.out[0] = (mode << 4) | (cb_no1 as u8); @@ -379,7 +375,7 @@ impl CellEncoder { requant_idx = Some(cb_no1 - 8); } } - if self.cell.get_y() == 0 { + if self.cell.get_y() == 0 || !matches!(mode, 0 | 3 | 10) { requant_idx = None; }