1#![allow(dead_code)]
5#![allow(non_camel_case_types)]
6#![allow(non_snake_case)]
7#![allow(non_upper_case_globals)]
8#![cfg_attr(feature = "neon", feature(stdsimd))]
11#![cfg_attr(
12 feature = "neon",
13 feature(arm_target_feature, raw_ref_op)
14
15)]
16
17#[repr(C)]
19#[derive(Clone, Copy, Debug)]
20pub enum Intent {
21 AbsoluteColorimetric = 3,
22 Saturation = 2,
23 RelativeColorimetric = 1,
24 Perceptual = 0,
25}
26
27use Intent::*;
28
29impl Default for Intent {
30 fn default() -> Self {
31 Perceptual
35 }
36}
37
38pub(crate) type s15Fixed16Number = i32;
39
40#[inline]
43fn s15Fixed16Number_to_float(a: s15Fixed16Number) -> f32 {
44 a as f32 / 65536.0
45}
46
47#[inline]
48fn double_to_s15Fixed16Number(v: f64) -> s15Fixed16Number {
49 (v * 65536f64) as i32
50}
51
52#[cfg(feature = "c_bindings")]
53extern crate libc;
54#[cfg(feature = "c_bindings")]
55pub mod c_bindings;
56mod chain;
57mod gtest;
58mod iccread;
59mod matrix;
60mod transform;
61pub use iccread::qcms_CIE_xyY as CIE_xyY;
62pub use iccread::qcms_CIE_xyYTRIPLE as CIE_xyYTRIPLE;
63pub use iccread::Profile;
64pub use transform::DataType;
65pub use transform::Transform;
66#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
67mod transform_avx;
68#[cfg(all(any(target_arch = "aarch64", target_arch = "arm"), feature = "neon"))]
69mod transform_neon;
70#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
71mod transform_sse2;
72mod transform_util;