Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/driver/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ pub fn export_packed<'a>(
)?;
let target = Format::from_raw(format);

if matches!(target, Some(Format::Yuv420p) | Some(Format::Yuva420p)) {
if matches!(target, Some(Format::Yuv420p | Format::Yuva420p)) {
let want_alpha = target == Some(Format::Yuva420p);
let native = img.format;
let mut planar = if !img.chroma_full
Expand Down Expand Up @@ -559,7 +559,7 @@ pub fn export_still_lossless<'a>(
*converted_format = format;
};

if matches!(target, Some(Format::Yuv420p) | Some(Format::Yuva420p)) {
if matches!(target, Some(Format::Yuv420p | Format::Yuva420p)) {
let want_alpha = target == Some(Format::Yuva420p);

ensure_yuva_rows(dsp, output, img, want_alpha, first, upto)?;
Expand Down
2 changes: 1 addition & 1 deletion src/vp8/rac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ mod imp {

#[inline(always)]
fn set_range(&mut self, range: u32, pos: i32) {
let shift = range.leading_zeros() ^ 24;
let shift = range.leading_zeros() ^ 0b1_1000;

self.c.range = range;
self.shift = shift;
Expand Down
2 changes: 1 addition & 1 deletion src/vp8l/huffman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn next_key(key: u32, len: u32) -> u32 {
if inv == 0 {
return key;
}
let inv = 1u32 << (31 - inv.leading_zeros());
let inv = 1u32 << inv.ilog2();
(key & (inv - 1)) + inv
}

Expand Down