mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 00:37:19 +00:00
It runs but not really
This commit is contained in:
1
codecs/visdif/Cargo.lock
generated
1
codecs/visdif/Cargo.lock
generated
@@ -281,6 +281,7 @@ dependencies = [
|
|||||||
"console_error_panic_hook",
|
"console_error_panic_hook",
|
||||||
"dssim-core",
|
"dssim-core",
|
||||||
"imgref",
|
"imgref",
|
||||||
|
"rayon-core",
|
||||||
"rgb",
|
"rgb",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"wasm-bindgen-test",
|
"wasm-bindgen-test",
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ wasm-bindgen = "0.2.38"
|
|||||||
dssim-core = "2.11.3"
|
dssim-core = "2.11.3"
|
||||||
imgref = "1.7.0"
|
imgref = "1.7.0"
|
||||||
rgb = "0.8.24"
|
rgb = "0.8.24"
|
||||||
|
rayon-core = "1.7.1"
|
||||||
# The `console_error_panic_hook` crate provides better debugging of panics by
|
# The `console_error_panic_hook` crate provides better debugging of panics by
|
||||||
# logging them with `console.error`. This is great for development, but requires
|
# logging them with `console.error`. This is great for development, but requires
|
||||||
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
|
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ use wasm_bindgen::prelude::*;
|
|||||||
use dssim_core::{Dssim, ToRGBAPLU};
|
use dssim_core::{Dssim, ToRGBAPLU};
|
||||||
use imgref;
|
use imgref;
|
||||||
use rgb::FromSlice;
|
use rgb::FromSlice;
|
||||||
|
use rayon_core;
|
||||||
|
|
||||||
mod utils;
|
mod utils;
|
||||||
|
|
||||||
@@ -17,6 +18,7 @@ cfg_if! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn ssim(data_a: Vec<u8>, data_b: Vec<u8>, width: usize, height: usize) -> f64 {
|
pub fn ssim(data_a: Vec<u8>, data_b: Vec<u8>, width: usize, height: usize) -> f64 {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ cfg_if! {
|
|||||||
// For more details see
|
// For more details see
|
||||||
// https://github.com/rustwasm/console_error_panic_hook#readme
|
// https://github.com/rustwasm/console_error_panic_hook#readme
|
||||||
if #[cfg(feature = "console_error_panic_hook")] {
|
if #[cfg(feature = "console_error_panic_hook")] {
|
||||||
extern crate console_error_panic_hook;
|
use console_error_panic_hook;
|
||||||
pub use self::console_error_panic_hook::set_once as set_panic_hook;
|
pub use self::console_error_panic_hook::set_once as set_panic_hook;
|
||||||
} else {
|
} else {
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|||||||
Reference in New Issue
Block a user