X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihav-indeo%2Fsrc%2Fcodecs%2Findeo3enc%2Fcell.rs;h=582293b92a349ea968de5198673e345811070d97;hb=5f9bf7648f667952b787c77afde07d23ac7c01de;hp=e5ad44c13110885458d29b0744c4c5f3af0f8e4e;hpb=f5c61879b56145c3fe371edeb58fb3b7abd94851;p=nihav.git diff --git a/nihav-indeo/src/codecs/indeo3enc/cell.rs b/nihav-indeo/src/codecs/indeo3enc/cell.rs index e5ad44c..582293b 100644 --- a/nihav-indeo/src/codecs/indeo3enc/cell.rs +++ b/nihav-indeo/src/codecs/indeo3enc/cell.rs @@ -176,7 +176,7 @@ impl CellEncoder { buf: [0; MAX_CELL_SIZE + 160], rbuf: [0; MAX_CELL_SIZE + 160], deltas: [0; MAX_CELL_SIZE], - cell: Indeo3Cell::new(0, 0, false), + cell: Indeo3Cell::new(0, 0), out: [0; MAX_CELL_SIZE / 2 + 1], osize: 0, @@ -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; }