From 10d00c3c2c1baf64f465e90dd8d7e0c9f412f7b1 Mon Sep 17 00:00:00 2001 From: edgar Date: Sat, 1 Jun 2024 19:11:10 +0200 Subject: [PATCH 01/10] make turbojpeg optional --- .github/workflows/rust_test.yml | 2 +- Cargo.lock | 11 +- Cargo.toml | 9 +- examples/binarize.rs | 2 +- examples/color_detector.rs | 2 +- examples/hello_world.rs | 2 +- examples/histogram.rs | 2 +- examples/imgproc.rs | 2 +- examples/metrics.rs | 2 +- examples/normalize.rs | 2 +- examples/normalize_ii.rs | 2 +- examples/rerun_viz.rs | 2 +- examples/rotate.rs | 2 +- examples/std_mean.rs | 2 +- kornia-py/Cargo.lock | 1324 ------------------------------- kornia-py/Cargo.toml | 2 +- src/color/gray.rs | 2 +- src/io/functional.rs | 24 +- src/io/mod.rs | 1 + 19 files changed, 45 insertions(+), 1352 deletions(-) delete mode 100644 kornia-py/Cargo.lock diff --git a/.github/workflows/rust_test.yml b/.github/workflows/rust_test.yml index 1f3a0b68..00fe46bb 100644 --- a/.github/workflows/rust_test.yml +++ b/.github/workflows/rust_test.yml @@ -30,7 +30,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test - args: --target ${{ matrix.target }} --features "gstreamer" + args: --target ${{ matrix.target }} --all-features use-cross: true build_examples: name: Build Examples diff --git a/Cargo.lock b/Cargo.lock index c93c7ca3..b698e4e7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1999,6 +1999,12 @@ dependencies = [ "web-sys", ] +[[package]] +name = "examples" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f73a39643d27b2050f53782853471ec697142eb69edd874025192e6f8c94d41" + [[package]] name = "exr" version = "1.72.0" @@ -3125,6 +3131,7 @@ dependencies = [ "candle-core", "clap", "criterion", + "examples", "fast_image_resize", "gstreamer", "gstreamer-app", @@ -3659,9 +3666,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", diff --git a/Cargo.toml b/Cargo.toml index 89c9cd39..8e3fc1eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,17 +11,19 @@ license-file = "LICENSE" [dependencies] anyhow = "1.0.80" fast_image_resize = "3.0.4" +image = { version = "0.25.0" } +ndarray = { version = "0.15.6", features = ["rayon"] } +# optional dependencies gst = { version = "0.22.2", package = "gstreamer", optional = true } gst-app = { version = "0.22.0", package = "gstreamer-app", optional = true } -image = { version = "0.25.0" } memmap2 = "0.9.4" -ndarray = { version = "0.15.6", features = ["rayon"] } num-traits = "0.2.17" tokio = { version = "1", features = ["full"], optional = true } -turbojpeg = {version = "1.0.0"} +turbojpeg = { version = "1.0.0", optional = true } # this is experimental and only used for benchmarking, so it's optional # consider removing it in the future. candle-core = { version = "0.3.2", optional = true } +examples = "0.4.0" [dev-dependencies] clap = { version = "4.5.3", features = ["derive"] } @@ -36,6 +38,7 @@ walkdir = "2.5.0" [features] candle = ["candle-core"] gstreamer = ["gst", "gst-app", "tokio"] +jpegturbo = ["turbojpeg"] [[bench]] name = "bench_color" diff --git a/examples/binarize.rs b/examples/binarize.rs index c2597514..a2832807 100644 --- a/examples/binarize.rs +++ b/examples/binarize.rs @@ -4,7 +4,7 @@ use kornia_rs::io::functional as F; fn main() -> Result<(), Box> { // read the image let image_path = std::path::Path::new("tests/data/dog.jpeg"); - let image: Image = F::read_image_jpeg(image_path)?; + let image: Image = F::read_image_any(image_path)?; // binarize the image as u8 let _image_bin: Image = diff --git a/examples/color_detector.rs b/examples/color_detector.rs index 996eaea8..01f1e8e0 100644 --- a/examples/color_detector.rs +++ b/examples/color_detector.rs @@ -12,7 +12,7 @@ fn main() -> Result<(), Box> { let args = Args::parse(); // read the image - let rgb = kornia_rs::io::functional::read_image_jpeg(&args.image_path)?; + let rgb = kornia_rs::io::functional::read_image_any(&args.image_path)?; // binarize the image as u8 let hsv = kornia_rs::color::hsv_from_rgb(&rgb.clone().cast()?)?; // convert to u8 (0-255) diff --git a/examples/hello_world.rs b/examples/hello_world.rs index 2f753285..b81d7f67 100644 --- a/examples/hello_world.rs +++ b/examples/hello_world.rs @@ -4,7 +4,7 @@ use kornia_rs::io::functional as F; fn main() -> Result<(), Box> { // read the image let image_path = std::path::Path::new("tests/data/dog.jpeg"); - let image: Image = F::read_image_jpeg(image_path)?; + let image: Image = F::read_image_any(image_path)?; println!("Hello, world!"); println!("Loaded Image size: {:?}", image.size()); diff --git a/examples/histogram.rs b/examples/histogram.rs index b2d3c2d0..85d511e9 100644 --- a/examples/histogram.rs +++ b/examples/histogram.rs @@ -4,7 +4,7 @@ use kornia_rs::io::functional as F; fn main() -> Result<(), Box> { // read the image let image_path = std::path::Path::new("tests/data/dog.jpeg"); - let image: Image = F::read_image_jpeg(image_path)?; + let image: Image = F::read_image_any(image_path)?; // create a Rerun recording stream let rec = rerun::RecordingStreamBuilder::new("Kornia App").spawn()?; diff --git a/examples/imgproc.rs b/examples/imgproc.rs index 41b7df84..ec10ba54 100644 --- a/examples/imgproc.rs +++ b/examples/imgproc.rs @@ -4,7 +4,7 @@ use kornia_rs::io::functional as F; fn main() -> Result<(), Box> { // read the image let image_path = std::path::Path::new("tests/data/dog.jpeg"); - let image: Image = F::read_image_jpeg(image_path)?; + let image: Image = F::read_image_any(image_path)?; let image_f32: Image = image.cast_and_scale::(1.0 / 255.0)?; diff --git a/examples/metrics.rs b/examples/metrics.rs index 35e4f455..795198b6 100644 --- a/examples/metrics.rs +++ b/examples/metrics.rs @@ -4,7 +4,7 @@ use kornia_rs::io::functional as F; fn main() -> Result<(), Box> { // read the image let image_path = std::path::Path::new("tests/data/dog.jpeg"); - let image: Image = F::read_image_jpeg(image_path)?; + let image: Image = F::read_image_any(image_path)?; // convert the image to f32 and scale it let image: Image = image.cast_and_scale::(1.0 / 255.0)?; diff --git a/examples/normalize.rs b/examples/normalize.rs index d670f611..6dc52d75 100644 --- a/examples/normalize.rs +++ b/examples/normalize.rs @@ -4,7 +4,7 @@ use kornia_rs::io::functional as F; fn main() -> Result<(), Box> { // read the image let image_path = std::path::Path::new("tests/data/dog.jpeg"); - let image: Image = F::read_image_jpeg(image_path)?; + let image: Image = F::read_image_any(image_path)?; // cast the image to floating point let image_f32: Image = image.clone().cast::()?; diff --git a/examples/normalize_ii.rs b/examples/normalize_ii.rs index ad7a1597..66a253d3 100644 --- a/examples/normalize_ii.rs +++ b/examples/normalize_ii.rs @@ -4,7 +4,7 @@ use kornia_rs::io::functional as F; fn main() -> Result<(), Box> { // read the image let image_path = std::path::Path::new("tests/data/dog.jpeg"); - let image: Image = F::read_image_jpeg(image_path)?; + let image: Image = F::read_image_any(image_path)?; // cast the image to floating point let image_f32: Image = image.clone().cast_and_scale::(1.0 / 255.0)?; diff --git a/examples/rerun_viz.rs b/examples/rerun_viz.rs index 1a8b9b07..b7821d1c 100644 --- a/examples/rerun_viz.rs +++ b/examples/rerun_viz.rs @@ -4,7 +4,7 @@ use kornia_rs::io::functional as F; fn main() -> Result<(), Box> { // read the image let image_path = std::path::Path::new("tests/data/dog.jpeg"); - let image: Image = F::read_image_jpeg(image_path)?; + let image: Image = F::read_image_any(image_path)?; // create a Rerun recording stream let rec = rerun::RecordingStreamBuilder::new("Kornia App").spawn()?; diff --git a/examples/rotate.rs b/examples/rotate.rs index 3c8fc32d..86b9b83f 100644 --- a/examples/rotate.rs +++ b/examples/rotate.rs @@ -5,7 +5,7 @@ fn main() -> Result<(), Box> { // read the image let image_path = std::path::Path::new("tests/data/dog.jpeg"); - let image: Image = F::read_image_jpeg(image_path)?; + let image: Image = F::read_image_any(image_path)?; let image = image.cast::()?; let rec = rerun::RecordingStreamBuilder::new("Kornia App").spawn()?; diff --git a/examples/std_mean.rs b/examples/std_mean.rs index 2b84ebbb..fec1b07d 100644 --- a/examples/std_mean.rs +++ b/examples/std_mean.rs @@ -69,7 +69,7 @@ fn main() -> Result<(), Box> { .progress_with(pb) .for_each(|image_path| { // read the image - let image = F::read_image_jpeg(&image_path).expect("Failed to read image"); + let image = F::read_image_any(&image_path).expect("Failed to read image"); // compute the std and mean let (std, mean) = kornia_rs::core::std_mean(&image); diff --git a/kornia-py/Cargo.lock b/kornia-py/Cargo.lock deleted file mode 100644 index 7bf86fae..00000000 --- a/kornia-py/Cargo.lock +++ /dev/null @@ -1,1324 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aligned-vec" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1" - -[[package]] -name = "anyhow" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" - -[[package]] -name = "arbitrary" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" - -[[package]] -name = "arg_enum_proc_macro" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "autocfg" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" - -[[package]] -name = "av1-grain" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf" -dependencies = [ - "anyhow", - "arrayvec", - "log", - "nom", - "num-rational", - "v_frame", -] - -[[package]] -name = "avif-serialize" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2" -dependencies = [ - "arrayvec", -] - -[[package]] -name = "bit_field" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitstream-io" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c9989a51171e2e81038ab168b6ae22886fe9ded214430dbb4f41c28cf176da" - -[[package]] -name = "built" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d17f4d6e4dc36d1a02fbedc2753a096848e7c1b0772f7654eab8e2c927dd53" - -[[package]] -name = "bumpalo" -version = "3.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" - -[[package]] -name = "bytemuck" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "cc" -version = "1.0.90" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cfg-expr" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa50868b64a9a6fda9d593ce778849ea8715cd2a3d2cc17ffdb4a2f2f2f1961d" -dependencies = [ - "smallvec", - "target-lexicon", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "exr" -version = "1.72.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4" -dependencies = [ - "bit_field", - "flume", - "half", - "lebe", - "miniz_oxide", - "rayon-core", - "smallvec", - "zune-inflate", -] - -[[package]] -name = "fast_image_resize" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d450fac8a334ad72825596173f0f7767ff04dd6e3d59c49c894c4bc2957e8b" -dependencies = [ - "cfg-if", - "num-traits", - "thiserror", -] - -[[package]] -name = "fdeflate" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" -dependencies = [ - "simd-adler32", -] - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "flume" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" -dependencies = [ - "spin", -] - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gif" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" -dependencies = [ - "color_quant", - "weezl", -] - -[[package]] -name = "half" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" -dependencies = [ - "cfg-if", - "crunchy", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "image" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b4f005360d32e9325029b38ba47ebd7a56f3316df09249368939562d518645" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "exr", - "gif", - "image-webp", - "num-traits", - "png", - "qoi", - "ravif", - "rayon", - "rgb", - "tiff", - "zune-core", - "zune-jpeg", -] - -[[package]] -name = "image-webp" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a84a25dcae3ac487bc24ef280f9e20c79c9b1a3e5e32cbed3041d1c514aa87c" -dependencies = [ - "byteorder", - "thiserror", -] - -[[package]] -name = "imgref" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126" - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "indoc" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" - -[[package]] -name = "interpolate_name" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "jobserver" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" -dependencies = [ - "libc", -] - -[[package]] -name = "jpeg-decoder" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" - -[[package]] -name = "kornia-py" -version = "0.1.2" -dependencies = [ - "anyhow", - "kornia-rs", - "numpy", - "pyo3", -] - -[[package]] -name = "kornia-rs" -version = "0.1.2" -dependencies = [ - "anyhow", - "fast_image_resize", - "image", - "memmap2", - "ndarray", - "num-traits", - "turbojpeg", -] - -[[package]] -name = "lebe" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "libfuzzer-sys" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7" -dependencies = [ - "arbitrary", - "cc", - "once_cell", -] - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "loop9" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" -dependencies = [ - "imgref", -] - -[[package]] -name = "matrixmultiply" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7574c1cf36da4798ab73da5b215bbf444f50718207754cb522201d78d1cd0ff2" -dependencies = [ - "autocfg", - "rawpointer", -] - -[[package]] -name = "maybe-rayon" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" -dependencies = [ - "cfg-if", - "rayon", -] - -[[package]] -name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "memmap2" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", - "simd-adler32", -] - -[[package]] -name = "ndarray" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb12d4e967ec485a5f71c6311fe28158e9d6f4bc4a447b474184d0f91a8fa32" -dependencies = [ - "matrixmultiply", - "num-complex", - "num-integer", - "num-traits", - "rawpointer", - "rayon", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "noop_proc_macro" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "numpy" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef41cbb417ea83b30525259e30ccef6af39b31c240bda578889494c5392d331" -dependencies = [ - "libc", - "ndarray", - "num-complex", - "num-integer", - "num-traits", - "pyo3", - "rustc-hash", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "png" -version = "0.17.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" -dependencies = [ - "bitflags", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro2" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "profiling" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" -dependencies = [ - "profiling-procmacros", -] - -[[package]] -name = "profiling-procmacros" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "pyo3" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233" -dependencies = [ - "cfg-if", - "indoc", - "libc", - "memoffset", - "parking_lot", - "portable-atomic", - "pyo3-build-config", - "pyo3-ffi", - "pyo3-macros", - "unindent", -] - -[[package]] -name = "pyo3-build-config" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7" -dependencies = [ - "once_cell", - "target-lexicon", -] - -[[package]] -name = "pyo3-ffi" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa" -dependencies = [ - "libc", - "pyo3-build-config", -] - -[[package]] -name = "pyo3-macros" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158" -dependencies = [ - "proc-macro2", - "pyo3-macros-backend", - "quote", - "syn", -] - -[[package]] -name = "pyo3-macros-backend" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "pyo3-build-config", - "quote", - "syn", -] - -[[package]] -name = "qoi" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rav1e" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9" -dependencies = [ - "arbitrary", - "arg_enum_proc_macro", - "arrayvec", - "av1-grain", - "bitstream-io", - "built", - "cfg-if", - "interpolate_name", - "itertools", - "libc", - "libfuzzer-sys", - "log", - "maybe-rayon", - "new_debug_unreachable", - "noop_proc_macro", - "num-derive", - "num-traits", - "once_cell", - "paste", - "profiling", - "rand", - "rand_chacha", - "simd_helpers", - "system-deps", - "thiserror", - "v_frame", - "wasm-bindgen", -] - -[[package]] -name = "ravif" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc13288f5ab39e6d7c9d501759712e6969fcc9734220846fc9ed26cae2cc4234" -dependencies = [ - "avif-serialize", - "imgref", - "loop9", - "quick-error", - "rav1e", - "rayon", - "rgb", -] - -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags", -] - -[[package]] -name = "rgb" -version = "0.8.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_spanned" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" -dependencies = [ - "serde", -] - -[[package]] -name = "simd-adler32" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" - -[[package]] -name = "simd_helpers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" -dependencies = [ - "quote", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - -[[package]] -name = "syn" -version = "2.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "system-deps" -version = "6.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" -dependencies = [ - "cfg-expr", - "heck 0.5.0", - "pkg-config", - "toml", - "version-compare", -] - -[[package]] -name = "target-lexicon" -version = "0.12.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" - -[[package]] -name = "thiserror" -version = "1.0.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tiff" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" -dependencies = [ - "flate2", - "jpeg-decoder", - "weezl", -] - -[[package]] -name = "toml" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "turbojpeg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9af71fa2654444c8dcb711ecbb8f9202778f8421badf71c3d5a118f1570391ed" -dependencies = [ - "libc", - "thiserror", - "turbojpeg-sys", -] - -[[package]] -name = "turbojpeg-sys" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa6daade3b979fb7454cce5ebcb9772ce7a1cf476ea27ed20ed06e13d9bc983" -dependencies = [ - "anyhow", - "cmake", - "libc", - "pkg-config", -] - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unindent" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" - -[[package]] -name = "v_frame" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b" -dependencies = [ - "aligned-vec", - "num-traits", - "wasm-bindgen", -] - -[[package]] -name = "version-compare" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "weezl" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "winnow" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" -dependencies = [ - "memchr", -] - -[[package]] -name = "zune-core" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" - -[[package]] -name = "zune-inflate" -version = "0.2.54" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" -dependencies = [ - "simd-adler32", -] - -[[package]] -name = "zune-jpeg" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec866b44a2a1fd6133d363f073ca1b179f438f99e7e5bfb1e33f7181facfe448" -dependencies = [ - "zune-core", -] diff --git a/kornia-py/Cargo.toml b/kornia-py/Cargo.toml index 5b4ed852..851408dc 100644 --- a/kornia-py/Cargo.toml +++ b/kornia-py/Cargo.toml @@ -9,6 +9,6 @@ crate-type = ["cdylib"] [dependencies] anyhow = "1.0.80" -kornia-rs = { path = "../" } +kornia-rs = { path = "../", features = ["jpegturbo"] } pyo3 = { version = "0.20", features = ["extension-module"] } numpy = { version = "0.20" } diff --git a/src/color/gray.rs b/src/color/gray.rs index 2d2ec78c..cbadde8d 100644 --- a/src/color/gray.rs +++ b/src/color/gray.rs @@ -71,7 +71,7 @@ mod tests { #[test] fn gray_from_rgb() -> Result<()> { let image_path = std::path::Path::new("tests/data/dog.jpeg"); - let image = F::read_image_jpeg(image_path)?; + let image = F::read_image_any(image_path)?; let image_norm = image.cast_and_scale::(1. / 255.0)?; let gray = super::gray_from_rgb(&image_norm.cast::()?)?; assert_eq!(gray.num_channels(), 1); diff --git a/src/io/functional.rs b/src/io/functional.rs index e5e9b2e8..550177d2 100644 --- a/src/io/functional.rs +++ b/src/io/functional.rs @@ -3,8 +3,10 @@ use std::path::Path; use crate::image::{Image, ImageSize}; +#[cfg(feature = "jpegturbo")] use super::jpeg::{ImageDecoder, ImageEncoder}; +#[cfg(feature = "jpegturbo")] /// Reads a JPEG image from the given file path. /// /// The method reads the JPEG image data directly from a file leveraging the libjpeg-turbo library. @@ -60,6 +62,7 @@ pub fn read_image_jpeg(file_path: &Path) -> Result> { Ok(image) } +#[cfg(feature = "jpegturbo")] /// Writes the given JPEG data to the given file path. /// /// # Arguments @@ -134,16 +137,17 @@ pub fn read_image_any(file_path: &Path) -> Result> { #[cfg(test)] mod tests { use anyhow::Result; - use std::fs; use std::path::Path; - use tempfile::tempdir; - use crate::io::functional::{read_image_any, read_image_jpeg, write_image_jpeg}; + use crate::io::functional::read_image_any; + + #[cfg(feature = "jpegturbo")] + use crate::io::functional::{read_image_jpeg, write_image_jpeg}; #[test] - fn read_jpeg() -> Result<()> { + fn read_any() -> Result<()> { let image_path = Path::new("tests/data/dog.jpeg"); - let image = read_image_jpeg(image_path)?; + let image = read_image_any(image_path)?; assert_eq!(image.size().width, 258); assert_eq!(image.size().height, 195); @@ -151,9 +155,10 @@ mod tests { } #[test] - fn read_any() -> Result<()> { + #[cfg(feature = "jpegturbo")] + fn read_jpeg() -> Result<()> { let image_path = Path::new("tests/data/dog.jpeg"); - let image = read_image_any(image_path)?; + let image = read_image_jpeg(image_path)?; assert_eq!(image.size().width, 258); assert_eq!(image.size().height, 195); @@ -161,10 +166,11 @@ mod tests { } #[test] + #[cfg(feature = "jpegturbo")] fn read_write_jpeg() -> Result<()> { let image_path_read = Path::new("tests/data/dog.jpeg"); - let tmp_dir = tempdir()?; - fs::create_dir_all(tmp_dir.path())?; + let tmp_dir = tempfile::tempdir()?; + std::fs::create_dir_all(tmp_dir.path())?; let file_path = tmp_dir.path().join("dog.jpeg"); let image_data = read_image_jpeg(image_path_read)?; write_image_jpeg(&file_path, &image_data)?; diff --git a/src/io/mod.rs b/src/io/mod.rs index 31e4c484..ba945394 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -1,5 +1,6 @@ pub mod fps_counter; pub mod functional; +#[cfg(feature = "jpegturbo")] pub mod jpeg; #[cfg(feature = "gstreamer")] pub mod webcam; From 84f17f71b3a2c55a7075607ee45dce6c0ffe2f87 Mon Sep 17 00:00:00 2001 From: edgar Date: Sat, 1 Jun 2024 19:14:08 +0200 Subject: [PATCH 02/10] fix ci --- .github/workflows/rust_lint.yml | 7 ------- Cargo.lock | 7 ------- Cargo.toml | 1 - 3 files changed, 15 deletions(-) diff --git a/.github/workflows/rust_lint.yml b/.github/workflows/rust_lint.yml index 7df7fed4..5e049408 100644 --- a/.github/workflows/rust_lint.yml +++ b/.github/workflows/rust_lint.yml @@ -32,18 +32,11 @@ jobs: #- name: Install system dependencies # run: sudo apt-get install -y cmake nasm libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: clippy - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features name: Clippy Output - use-cross: true check: name: Check diff --git a/Cargo.lock b/Cargo.lock index b698e4e7..5a7406c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1999,12 +1999,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "examples" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f73a39643d27b2050f53782853471ec697142eb69edd874025192e6f8c94d41" - [[package]] name = "exr" version = "1.72.0" @@ -3131,7 +3125,6 @@ dependencies = [ "candle-core", "clap", "criterion", - "examples", "fast_image_resize", "gstreamer", "gstreamer-app", diff --git a/Cargo.toml b/Cargo.toml index 8e3fc1eb..470c7af4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ turbojpeg = { version = "1.0.0", optional = true } # this is experimental and only used for benchmarking, so it's optional # consider removing it in the future. candle-core = { version = "0.3.2", optional = true } -examples = "0.4.0" [dev-dependencies] clap = { version = "4.5.3", features = ["derive"] } From 7ce5951b81d0f8a40eb14fccd0d35c0115eb0d8e Mon Sep 17 00:00:00 2001 From: edgar Date: Sat, 1 Jun 2024 19:17:00 +0200 Subject: [PATCH 03/10] fix clippy ci --- .github/workflows/rust_lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust_lint.yml b/.github/workflows/rust_lint.yml index 5e049408..2132d1aa 100644 --- a/.github/workflows/rust_lint.yml +++ b/.github/workflows/rust_lint.yml @@ -36,7 +36,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features - name: Clippy Output check: name: Check From 3c073999a25c674d98cb8779c82135eb54efce60 Mon Sep 17 00:00:00 2001 From: edgar Date: Sat, 1 Jun 2024 19:21:49 +0200 Subject: [PATCH 04/10] second attempt clippy --- .github/workflows/rust_lint.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/rust_lint.yml b/.github/workflows/rust_lint.yml index 2132d1aa..0f22ddec 100644 --- a/.github/workflows/rust_lint.yml +++ b/.github/workflows/rust_lint.yml @@ -32,6 +32,14 @@ jobs: #- name: Install system dependencies # run: sudo apt-get install -y cmake nasm libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev - uses: actions/checkout@v4 + - id: component + uses: actions-rs/components-nightly@v1 + with: + component: clippy + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ steps.component.outputs.toolchain }} + override: true - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} From 61825679b8e1435dd55d106e15e4c07122a63de2 Mon Sep 17 00:00:00 2001 From: edgar Date: Sat, 1 Jun 2024 19:22:54 +0200 Subject: [PATCH 05/10] third attempt clippy --- .github/workflows/rust_lint.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust_lint.yml b/.github/workflows/rust_lint.yml index 0f22ddec..88f29225 100644 --- a/.github/workflows/rust_lint.yml +++ b/.github/workflows/rust_lint.yml @@ -32,13 +32,10 @@ jobs: #- name: Install system dependencies # run: sudo apt-get install -y cmake nasm libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev - uses: actions/checkout@v4 - - id: component - uses: actions-rs/components-nightly@v1 - with: - component: clippy - uses: actions-rs/toolchain@v1 with: - toolchain: ${{ steps.component.outputs.toolchain }} + toolchain: nightly + components: clippy override: true - uses: actions-rs/clippy-check@v1 with: From 9e557f9f7ae5a3ef158f991ef711022c6e68854b Mon Sep 17 00:00:00 2001 From: edgar Date: Sat, 1 Jun 2024 19:26:20 +0200 Subject: [PATCH 06/10] fix attempt clippy --- .github/workflows/rust_lint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/rust_lint.yml b/.github/workflows/rust_lint.yml index 88f29225..27af2ef5 100644 --- a/.github/workflows/rust_lint.yml +++ b/.github/workflows/rust_lint.yml @@ -37,9 +37,8 @@ jobs: toolchain: nightly components: clippy override: true - - uses: actions-rs/clippy-check@v1 + - uses: clechasseur/rs-clippy-check@v3 with: - token: ${{ secrets.GITHUB_TOKEN }} args: --all-features check: From 668517329450073fe7544a61dc1e43e79f6f3457 Mon Sep 17 00:00:00 2001 From: edgar Date: Sat, 1 Jun 2024 19:27:42 +0200 Subject: [PATCH 07/10] fix attempt clippy --- .github/workflows/rust_lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust_lint.yml b/.github/workflows/rust_lint.yml index 27af2ef5..78dd6c35 100644 --- a/.github/workflows/rust_lint.yml +++ b/.github/workflows/rust_lint.yml @@ -40,6 +40,7 @@ jobs: - uses: clechasseur/rs-clippy-check@v3 with: args: --all-features + use-cross: true check: name: Check From 0f3b23361ac4720c5b866c271cab5b8dbf13f513 Mon Sep 17 00:00:00 2001 From: edgar Date: Sat, 1 Jun 2024 19:30:53 +0200 Subject: [PATCH 08/10] fix attempt clippy --- .github/workflows/rust_lint.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust_lint.yml b/.github/workflows/rust_lint.yml index 78dd6c35..13f33a0d 100644 --- a/.github/workflows/rust_lint.yml +++ b/.github/workflows/rust_lint.yml @@ -32,15 +32,13 @@ jobs: #- name: Install system dependencies # run: sudo apt-get install -y cmake nasm libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly - components: clippy - override: true - - uses: clechasseur/rs-clippy-check@v3 + components: clippy + - uses: giraffate/clippy-action@v1 with: - args: --all-features - use-cross: true + reporter: 'github-pr-review' + github_token: ${{ secrets.GITHUB_TOKEN }} check: name: Check From 1380441deb97f877bebe50e8e5112b10e05af64b Mon Sep 17 00:00:00 2001 From: edgar Date: Sat, 1 Jun 2024 19:35:06 +0200 Subject: [PATCH 09/10] disable macos python tests --- .github/workflows/python_test.yml | 59 ++++++++++++++++--------------- .github/workflows/rust_lint.yml | 3 +- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/python_test.yml b/.github/workflows/python_test.yml index ca5aa37c..62123d76 100644 --- a/.github/workflows/python_test.yml +++ b/.github/workflows/python_test.yml @@ -25,33 +25,34 @@ jobs: run: sudo apt-get install -y cmake nasm - name: Build and test run: make test-python - test-python-macos: - runs-on: macos-latest - steps: - - uses: ilammy/setup-nasm@v1 - - uses: actions/checkout@v4 - - name: Set up Python 3.8 - uses: actions/setup-python@v5 - with: - python-version: 3.8 - architecture: x64 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - target: x86_64-apple-darwin - override: true - - uses: messense/maturin-action@v1 - with: - command: build - maturin-version: latest - args: --target x86_64-apple-darwin --out dist -m kornia-py/Cargo.toml - - name: Install dependencies - run: | - python -m pip install --upgrade pip | - python -m pip install dist/*.whl | - python -m pip install pytest numpy | - python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cpu + # NOTE: there's a systematic fail with the ci on macos + # test-python-macos: + # runs-on: macos-latest + # steps: + # - uses: ilammy/setup-nasm@v1 + # - uses: actions/checkout@v4 + # - name: Set up Python 3.8 + # uses: actions/setup-python@v5 + # with: + # python-version: 3.8 + # architecture: x64 + # - uses: actions-rs/toolchain@v1 + # with: + # profile: minimal + # toolchain: stable + # target: x86_64-apple-darwin + # override: true + # - uses: messense/maturin-action@v1 + # with: + # command: build + # maturin-version: latest + # args: --target x86_64-apple-darwin --out dist -m kornia-py/Cargo.toml + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip | + # python -m pip install dist/*.whl | + # python -m pip install pytest numpy | + # python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cpu - - name: Build and test - run: pytest kornia-py/tests + # - name: Build and test + # run: pytest kornia-py/tests diff --git a/.github/workflows/rust_lint.yml b/.github/workflows/rust_lint.yml index 13f33a0d..f3143344 100644 --- a/.github/workflows/rust_lint.yml +++ b/.github/workflows/rust_lint.yml @@ -29,8 +29,6 @@ jobs: name: Clippy runs-on: ubuntu-latest steps: - #- name: Install system dependencies - # run: sudo apt-get install -y cmake nasm libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: @@ -39,6 +37,7 @@ jobs: with: reporter: 'github-pr-review' github_token: ${{ secrets.GITHUB_TOKEN }} + clippy_flags: -- -D warnings check: name: Check From 23133f11acfbbf2d870b3bd34771b126090be9ce Mon Sep 17 00:00:00 2001 From: edgar Date: Sat, 1 Jun 2024 19:51:13 +0200 Subject: [PATCH 10/10] specify more the features --- .github/workflows/rust_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust_test.yml b/.github/workflows/rust_test.yml index 00fe46bb..8ce41c68 100644 --- a/.github/workflows/rust_test.yml +++ b/.github/workflows/rust_test.yml @@ -30,7 +30,7 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test - args: --target ${{ matrix.target }} --all-features + args: --target ${{ matrix.target }} --features "gstreamer,jpegturbo" use-cross: true build_examples: name: Build Examples