Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropped i8mm #38

Merged
merged 3 commits into from
Jan 10, 2025
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
1 change: 0 additions & 1 deletion .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- run: rustup target add aarch64-unknown-linux-gnu x86_64-unknown-linux-gnu i686-unknown-linux-gnu powerpc-unknown-linux-gnu riscv64gc-unknown-linux-gnu
- run: RUSTFLAGS="-C target-feature=+neon,-fp16" cargo build --target aarch64-unknown-linux-gnu --features half
- run: RUSTFLAGS="-C target-feature=+neon,+fp16" cargo build --target aarch64-unknown-linux-gnu --features half
- run: RUSTFLAGS="-C target-feature=+neon,+fp16" cargo build --target aarch64-unknown-linux-gnu --features half,nightly_i8mm
- run: RUSTFLAGS="-C target-feature=+sse4.1" cargo build --target i686-unknown-linux-gnu
- run: cargo build --target powerpc-unknown-linux-gnu
- run: cargo build --target riscv64gc-unknown-linux-gnu
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ libc = "0.2.158"
default = ["colorspaces"]
colorspaces = ["dep:colorutils-rs"]
nightly_avx512 = []
nightly_i8mm = []
nightly_avx512fp16 = ["nightly_avx512"]
16 changes: 8 additions & 8 deletions app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn main() {
.decode()
.unwrap();
let dimensions = img.dimensions();
let transient = img.to_luma_alpha8();
let transient = img.to_rgb8();
let mut bytes = Vec::from(transient.as_bytes());

let mut scaler = Scaler::new(ResamplingFunction::Lanczos3);
Expand All @@ -60,7 +60,7 @@ fn main() {

//
let store =
ImageStore::<u8, 2>::from_slice(&bytes, dimensions.0 as usize, dimensions.1 as usize)
ImageStore::<u8, 3>::from_slice(&bytes, dimensions.0 as usize, dimensions.1 as usize)
.unwrap();

let dst_size = ImageSize::new(dimensions.0 as usize / 4, dimensions.1 as usize / 4);
Expand All @@ -75,15 +75,15 @@ fn main() {
// )
// .unwrap();

let mut dst_store = ImageStoreMut::<u8, 2>::alloc_with_depth(
dimensions.0 as usize / 3,
dimensions.1 as usize / 3,
let mut dst_store = ImageStoreMut::<u8, 3>::alloc_with_depth(
dimensions.0 as usize / 3 * 2,
dimensions.1 as usize / 3 * 2,
10,
);

// for i in 0..25 {
let start_time = Instant::now();
scaler.resize_cbcr8(&store, &mut dst_store).unwrap();
scaler.resize_rgb(&store, &mut dst_store).unwrap();

let elapsed_time = start_time.elapsed();
// Print the elapsed time in milliseconds
Expand Down Expand Up @@ -189,11 +189,11 @@ fn main() {
.unwrap();
} else {
image::save_buffer(
"converted.webp",
"converted_o.png",
&dst,
dst_store.width as u32,
dst_store.height as u32,
image::ColorType::La8,
image::ColorType::Rgb8,
)
.unwrap();
}
Expand Down
1 change: 0 additions & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ libfuzzer-sys = "0.4"
pic-scale = { path = "../" }

[features]
nightly_i8mm = ["pic-scale/nightly_i8mm"]
nightly_avx512 = ["pic-scale/nightly_avx512"]

[[bin]]
Expand Down
6 changes: 0 additions & 6 deletions src/avx2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ mod alpha_u16;
mod alpha_u8;
mod check_alpha;
mod rgb_u8;
#[cfg(feature = "nightly_avx512")]
mod rgb_u8_dot_i8;
#[cfg(feature = "half")]
mod rgba_f16;
mod rgba_f32;
Expand All @@ -59,10 +57,6 @@ pub(crate) use check_alpha::{
avx_has_non_constant_cap_alpha_rgba16, avx_has_non_constant_cap_alpha_rgba8,
};
pub(crate) use rgb_u8::{convolve_horizontal_rgb_avx_row_one, convolve_horizontal_rgb_avx_rows_4};
#[cfg(feature = "nightly_avx512")]
pub(crate) use rgb_u8_dot_i8::{
convolve_horizontal_rgb_avx_row_i8_one, convolve_horizontal_rgb_avx_rows_4_i8,
};
#[cfg(feature = "half")]
pub(crate) use rgba_f16::{
convolve_horizontal_rgba_avx_row_one_f16, convolve_horizontal_rgba_avx_rows_4_f16,
Expand Down
Loading
Loading