Skip to content

Commit 92ae59d

Browse files
committed
Update tests for MAD scale
1 parent c22fc77 commit 92ae59d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dssim-core/src/dssim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ fn png_compare() {
412412
let img2 = d.create_image(&Img::new(buf2, file2.width, file2.height)).unwrap();
413413

414414
let (res, _) = d.compare(&img1, img2);
415-
assert!((0.002214 - res).abs() < 0.001, "res is {}", res);
415+
assert!((0.001 - res).abs() < 0.0005, "res is {}", res);
416416

417417
let img1b = d.create_image(&Img::new(buf1, file1.width, file1.height)).unwrap();
418418
let (res, _) = d.compare(&img1, img1b);

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ fn image_load1() {
170170

171171
let strip_jpg = dssim::load_image(&attr, "tests/profile-stripped.jpg").unwrap();
172172
let (diff, _) = attr.compare(&strip_jpg, prof_jpg);
173-
assert!(diff > 0.011, "{}", diff);
173+
assert!(diff > 0.008, "{}", diff);
174174

175175
let strip_png = dssim::load_image(&attr, "tests/profile-stripped.png").unwrap();
176176
let (diff, _) = attr.compare(&strip_jpg, strip_png);
177-
assert!(diff > 0.012, "{}", diff)
177+
assert!(diff > 0.009, "{}", diff)
178178
}
179179

180180
#[test]

0 commit comments

Comments
 (0)