diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2023-02-15 20:45:23 +0100 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2023-02-15 20:45:23 +0100 |
commit | a6627cc2d0a55f200fea53af94a89367e08e43f4 (patch) | |
tree | a1302d877ccc80bcf3efbd3092bd5001e4c9c180 | |
parent | 3ff976b20cc372c8230fa21bb05829abc33db66b (diff) | |
download | nihav-a6627cc2d0a55f200fea53af94a89367e08e43f4.tar.gz |
indeo3enc: requant input only in modes 0/3/10
-rw-r--r-- | nihav-indeo/src/codecs/indeo3enc/cell.rs | 6 |
1 files changed, 1 insertions, 5 deletions
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; } |