-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
Our reference tests for lossy WebP images currently check that 90+% of pixels are bit-exact with the output:
Lines 87 to 97 in af3d0f3
// NOTE: WebP lossy images are stored in YUV format. The conversion to RGB is not precisely | |
// defined, but we currently attempt to match the dwebp's "-nofancy" conversion option. | |
// | |
// TODO: Investigate why we don't get bit exact output for all pixels. | |
let num_bytes_different = data | |
.iter() | |
.zip(reference_data.iter()) | |
.filter(|(a, b)| a != b) | |
.count(); | |
let percentage_different = 100 * num_bytes_different / data.len(); | |
if percentage_different >= 10 { |
This is because there are still some small fraction of pixels that differ from the references produced by libwebp despite our attempts to exactly match its output. In particular, the actual percentage differences are:
reftest_animated_random_lossy: 0.016%
reftest_gallery1_2: 0.15%
reftest_gallery1_4: 0.1%
reftest_gallery1_5: 0.0035%
reftest_gallery2_1_webp_a: 5.3%
reftest_gallery2_2_webp_a: 1.4%
reftest_gallery2_3_webp_a: 0.96%
reftest_gallery2_4_webp_a: 1.7%
reftest_gallery2_5_webp_a: 1.6%
Metadata
Metadata
Assignees
Labels
No labels