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
3 changes: 2 additions & 1 deletion crates/j2k-metal/src/batch/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ use j2k_core::{BackendRequest, Downscale, PixelFormat, Rect};

use crate::{Error, MetalSession};

use super::execute::complete_repeated_device_failure;
#[cfg(target_os = "macos")]
use super::execute::{complete_repeated_device_failure, process_batch};
use super::execute::process_batch;
#[cfg(target_os = "macos")]
use super::heuristics::GroupedRequests;
use super::heuristics::{
Expand Down
4 changes: 3 additions & 1 deletion crates/j2k-metal/src/encode/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ use super::stage_accelerator::{
use super::MetalEncodeStageAccelerator;
#[cfg(target_os = "macos")]
use crate::compute;
#[cfg(target_os = "macos")]
use j2k::encode_j2k_lossless;
use j2k::{
encode_j2k_lossless, encode_j2k_lossless_with_accelerator, EncodeBackendPreference, EncodedJ2k,
encode_j2k_lossless_with_accelerator, EncodeBackendPreference, EncodedJ2k,
J2kLosslessEncodeOptions, J2kLosslessSamples,
};
#[cfg(target_os = "macos")]
Expand Down
9 changes: 8 additions & 1 deletion crates/j2k-metal/src/routing.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use j2k_core::{BackendRequest, CompressedTransferSyntax, PixelFormat};
#[cfg(any(target_os = "macos", test))]
use j2k_core::CompressedTransferSyntax;
use j2k_core::{BackendRequest, PixelFormat};
#[cfg(target_os = "macos")]
use j2k_metal_support::metal_kernel_route;
use j2k_metal_support::{
Expand All @@ -15,11 +17,16 @@ pub(crate) const AUTO_DECODE_CPU_FALLBACK_REASON: &str =

// Minimum qualified cells from verified Auto-routing artifact
// 162a47f7a96b2be88abebc100aab672513af04895532863fa1a293660546f879.
#[cfg(any(target_os = "macos", test))]
const AUTO_REPEATED_DECODE_MIN_COUNT: usize = 16;
#[cfg(any(target_os = "macos", test))]
const AUTO_REPEATED_GRAY8_MIN_PIXELS: u64 = 2_960_793;
#[cfg(any(target_os = "macos", test))]
const AUTO_REPEATED_RGB8_LOSSY_MIN_PIXELS: u64 = 307_200;
#[cfg(any(target_os = "macos", test))]
const AUTO_REPEATED_RGB8_LOSSLESS_MIN_PIXELS: u64 = 5_038_848;

#[cfg(any(target_os = "macos", test))]
pub(crate) fn auto_repeated_decode_uses_metal(
dimensions: (u32, u32),
fmt: PixelFormat,
Expand Down
1 change: 1 addition & 0 deletions crates/j2k-t803/src/runner/metal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use crate::{ExecutionLocation, PlatformIdentity};
#[cfg(target_os = "macos")]
use super::{cases, encoder, execute};

#[cfg(target_os = "macos")]
const METAL_CLAIM: &str = "Profile-1 Cclass-1 adapter IUT; Profile-1 Cclass-1HF adapter IUT; Annex G JP2 reader via j2k CPU stages (candidate evidence)";

#[cfg(target_os = "macos")]
Expand Down
Loading