Suggested edits

This commit is contained in:
Jonathan Behrens committed 2022-06-26 20:45:21 -07:00
1 parent 8e5c5b44c5
commit 5e7702a874
2 files changed
+5 -3

No files matched your search

+1 -1
View File
@@ -486,11 +486,11 @@ impl Image {
} else if padding.0 > 0 && self.predictor == Predictor::FloatingPoint {
// The floating point predictor shuffles the padding bytes into the encoded output, so
// this case is handled specially when needed.
let mut encoded = vec![0u8; chunk_dimensions.0 * samples * byte_len];
for row in 0..(chunk_dimensions.1 - padding.1) {
let row_start = row * output_width * samples;
let row_end = row_start + (chunk_dimensions.0 - padding.0) * samples;
let mut encoded = vec![0u8; chunk_dimensions.0 * samples * byte_len];
reader.read_exact(&mut encoded)?;
match buffer.subrange(row_start..row_end) {
DecodingBuffer::F32(buf) => fp_predict_f32(&mut encoded, buf, samples),