Skip to content

Commit

Permalink
More precise bit depth expanding
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Nov 2, 2024
1 parent 7f78d82 commit 092879c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codecs/avif/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ impl<R: Read> AvifDecoder<R> {
// Expand current bit depth to target 16
let target_expand_bits = 16u32 - self.picture.bit_depth() as u32;
for item in target.iter_mut() {
*item <<= target_expand_bits;
*item = (*item << target_expand_bits) | (*item >> (16 - target_expand_bits));
}

Ok(())
Expand Down

0 comments on commit 092879c

Please sign in to comment.