qoi-bench: only abort on r/t fail if it's qoi-fast
This commit is contained in:
parent
a9b369e585
commit
4f0bce5fca
1 changed files with 6 additions and 6 deletions
|
@ -250,12 +250,12 @@ impl ImageBench {
|
||||||
let encoded = encoded?;
|
let encoded = encoded?;
|
||||||
let (decoded, t_decode) = timeit(|| C::decode(&encoded, img));
|
let (decoded, t_decode) = timeit(|| C::decode(&encoded, img));
|
||||||
let decoded = decoded?;
|
let decoded = decoded?;
|
||||||
assert_eq!(
|
let roundtrip = decoded.as_slice() == img.data.as_slice();
|
||||||
decoded.as_slice(),
|
if C::name() == "qoi-fast" {
|
||||||
img.data.as_slice(),
|
assert!(roundtrip, "{}: decoded data doesn't roundtrip", C::name());
|
||||||
"{}: decoded data doesn't roundtrip",
|
} else {
|
||||||
C::name()
|
ensure!(roundtrip, "{}: decoded data doesn't roundtrip", C::name());
|
||||||
);
|
}
|
||||||
|
|
||||||
let n_encode = (sec_allowed / 2. / t_encode.as_secs_f64()).max(2.).ceil() as usize;
|
let n_encode = (sec_allowed / 2. / t_encode.as_secs_f64()).max(2.).ceil() as usize;
|
||||||
let mut encode_tm = Vec::with_capacity(n_encode);
|
let mut encode_tm = Vec::with_capacity(n_encode);
|
||||||
|
|
Loading…
Reference in a new issue