Skip to content

Commit

Permalink
Fix assertion against entering lossless mode
Browse files Browse the repository at this point in the history
When skipping, we may ignore the quantizer value. Fixes #3209.
  • Loading branch information
barrbrain committed Oct 16, 2023
1 parent 77d2a08 commit 4343291
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2239,7 +2239,11 @@ pub fn write_tx_blocks<T: Pixel, W: Writer>(
let bw = bsize.width_mi() / tx_size.width_mi();
let bh = bsize.height_mi() / tx_size.height_mi();
let qidx = get_qidx(fi, ts, cw, tile_bo);
assert_ne!(qidx, 0); // lossless is not yet supported

// TODO: Lossless is not yet supported.
if !skip {
assert_ne!(qidx, 0);
}

let PlaneConfig { xdec, ydec, .. } = ts.input.planes[1].cfg;
// SAFETY: We write to the array below before reading from it.
Expand Down

0 comments on commit 4343291

Please sign in to comment.