LR-IMP-FORMATS: word16_order reads sample pairs with as_chunks instead of indexing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-10 01:10:36 -04:00
co-authored by Claude Opus 5.5
parent d138236291
commit e7da679cb3
+1 -2
View File
@@ -429,8 +429,7 @@ fn word16_order(strip: &[u8], bits: u32, file: lightcraft_tiff::ByteOrder) -> li
let (mut n, mut over_file, mut over_other) = (0usize, 0usize, 0usize);
let words = strip.len() / 2;
let step = (words / 65536).max(1);
for i in (0..words).step_by(step) {
let b = [strip[2 * i], strip[2 * i + 1]];
for &b in strip.as_chunks::<2>().0.iter().step_by(step) {
n += 1;
over_file += usize::from(u32::from(file.u16(b)) >= limit);
over_other += usize::from(u32::from(other.u16(b)) >= limit);