Skip to content

Commit

Permalink
LUV bugfixes, improve LCh
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Jun 5, 2024
1 parent 5196f7f commit 9e195e4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ half = "2.4.1"

[features]
default = []
avx2 = []
2 changes: 1 addition & 1 deletion src/app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ version = "0.1.0"
edition = "2021"

[dependencies]
colorutils-rs = {path = "../../", features = ["avx2"]}
colorutils-rs = { path = "../../" }
image = "0.25.1"
6 changes: 3 additions & 3 deletions src/image_to_linear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ fn channels_to_linear<const CHANNELS_CONFIGURATION: u8, const USE_ALPHA: bool>(
let channels = image_configuration.get_channels_count();

#[cfg(target_arch = "x86_64")]
let mut has_sse = false;
let mut _has_sse = false;

#[cfg(all(target_arch = "x86_64", target_feature = "sse4.1"))]
if is_x86_feature_detected!("sse4.1") {
has_sse = true;
_has_sse = true;
}

for _ in 0..height as usize {
let mut cx = 0usize;

#[cfg(target_arch = "x86_64")]
unsafe {
if has_sse {
if _has_sse {
cx = sse_channels_to_linear::<CHANNELS_CONFIGURATION, USE_ALPHA>(
cx,
src.as_ptr(),
Expand Down

0 comments on commit 9e195e4

Please sign in to comment.