#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
pub enum CpuDecodeParallelism {
#[default]
Auto,
Serial,
}
impl CpuDecodeParallelism {
pub(crate) const fn to_native(self) -> j2k_native::CpuDecodeParallelism {
match self {
Self::Auto => j2k_native::CpuDecodeParallelism::Auto,
Self::Serial => j2k_native::CpuDecodeParallelism::Serial,
}
}
pub(crate) const fn from_native(parallelism: j2k_native::CpuDecodeParallelism) -> Self {
match parallelism {
j2k_native::CpuDecodeParallelism::Auto => Self::Auto,
j2k_native::CpuDecodeParallelism::Serial => Self::Serial,
}
}
}