diff --git a/Cargo.toml b/Cargo.toml index 0fc6bcb..dea9e1a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ sha2 = { version = "0.10.6", features = ["asm"] } spinoff = "0.8.0" once_cell = "1.17.1" threadpool = "1.8.1" -image = { version = "0.24.6", default-features = false, features = [ +image = { version = "0.24.7", default-features = false, features = [ "rgb", "png", "jpeg", @@ -43,13 +43,6 @@ avif-serialize = "0.8.1" notify-rust = { version = "4.8.0", features = ["images"] } thread-priority = "0.13.1" notify = "6.0.1" - - -[package.metadata.archlinux_pkgbuild] -arch = ["x86_64", "aarch64"] -makedepends = ["cargo", "nasm", "libwebp", "lcms2"] -pkgrel = 1 - [profile.release] lto = false opt-level = 3 diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index 5d56faf..0000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,2 +0,0 @@ -[toolchain] -channel = "nightly" diff --git a/src/encoders/avif/encode.rs b/src/encoders/avif/encode.rs index ff538b9..27fff7c 100644 --- a/src/encoders/avif/encode.rs +++ b/src/encoders/avif/encode.rs @@ -1,4 +1,3 @@ -use std::simd::u8x32; use std::time::Instant; use color_eyre::eyre::Result; @@ -225,25 +224,7 @@ impl Encoder { // Isolate only the alpha channel. let pixel_alpha = Vec::from_iter(image.iter().map(|pixel| pixel.a)); - let (_, sd, _) = pixel_alpha.as_simd::<32>(); - let alpha_mask = u8x32::splat(255); - - sd.iter().all(|pixel| { - // let cmp = unsafe { - // let alpha_reg = _mm256_loadu_si256(pxl.as_ptr() as *const __m256i); - // let alpha_mask = _mm256_set1_epi8(-1); - - // // Whatever happens, this thing generates 4 bytes that I need to check if they are 0b11111111 (-1) - // let alpha_cmp = _mm256_cmpeq_epi8(alpha_reg, alpha_mask); - - // // Yup, this is the one. Not sure why I would only want to compare the leftmost bit, but seems faster. - // _mm256_movemask_epi8(alpha_cmp) - // }; - - // cmp.eq(&-1) - - pixel == &alpha_mask - }) + pixel_alpha.iter().any(|px| px != &255) } #[inline(never)] diff --git a/src/main.rs b/src/main.rs index c384502..390e80b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,3 @@ -#![feature(portable_simd)] use cli::{commands::Commands, Args}; use color_eyre::eyre::Result;