mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-22 18:22:26 +00:00
LR-IMP-FORMATS: word16_order reads sample pairs with as_chunks instead of indexing
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
d138236291
commit
e7da679cb3
1 file changed
+1
-2
Vendored
+1
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user