Bug 2069212. Regenerate the JXL gtest reference so we can ask for an exact match. r=saschanaz
large-jxl-reference.webp held libjxl's decode of large.jxl. jxl-rs changed its dither pattern again in https://github.com/libjxl/jxl-rs/commit/b76fd1421ed675bd35a4996fecafc124bf47f75e and now it is different from libjxl (it used to match). I want this test case in particular to be an exact match (or as close as we can get) so I regenerated it from jxl-rs. webp was used because I wanted a different format decoder to check against and because this is a big file (necessary for testing multithreaded decoding) and webp produced the smallest lossless file from a decoder that wasn't jxl. Differential Revision: https://phabricator.services.mozilla.com/D325239
This commit is contained in:
committed by
tnikkel@mozilla.com
parent
d3da296c00
commit
42921bac93
@@ -1057,8 +1057,11 @@ ImageTestCase LargeJXLTestCase() {
|
||||
TEST_CASE_IGNORE_OUTPUT);
|
||||
}
|
||||
|
||||
// The pixels of large.jxl, as libjxl decodes them, in a lossless format some
|
||||
// other decoder can read back exactly.
|
||||
// The pixels of large.jxl, as a known good jxl-rs decodes them, in a lossless
|
||||
// format some other decoder can read back exactly. Matches libjxl's decode to
|
||||
// within 1 per channel, the two dithering 8-bit output differently. Regenerate
|
||||
// with `jxl_cli --data-type u8 large.jxl ref.png` and `cwebp -z 9 ref.png -o
|
||||
// large-jxl-reference.webp`.
|
||||
ImageTestCase LargeJXLReferenceWebPTestCase() {
|
||||
return ImageTestCase("large-jxl-reference.webp", "image/webp",
|
||||
IntSize(1200, 660), TEST_CASE_IGNORE_OUTPUT);
|
||||
|
||||
@@ -1181,8 +1181,16 @@ TEST_F(ImageDecoders, JXLParallelDecodeMatchesSerial) {
|
||||
{
|
||||
// Compare to the same image in another format to make sure it's the right
|
||||
// reference.
|
||||
const uint32_t kLibjxlMaxDifferingPixels = 18;
|
||||
const uint8_t kLibjxlMaxChannelDiff = 1;
|
||||
#if defined(XP_WIN) && !defined(HAVE_64BIT_BUILD)
|
||||
const uint32_t kReferenceMaxDifferingPixels = 7;
|
||||
const uint8_t kReferenceMaxChannelDiff = 1;
|
||||
#elif defined(ANDROID)
|
||||
const uint32_t kReferenceMaxDifferingPixels = 4;
|
||||
const uint8_t kReferenceMaxChannelDiff = 1;
|
||||
#else
|
||||
const uint32_t kReferenceMaxDifferingPixels = 0;
|
||||
const uint8_t kReferenceMaxChannelDiff = 0;
|
||||
#endif
|
||||
ImageTestCase referenceCase = LargeJXLReferenceWebPTestCase();
|
||||
RefPtr<SourceSurface> webpReference;
|
||||
WithSingleChunkDecode(referenceCase, Nothing(), /* aUseDecodePool */ false,
|
||||
@@ -1190,8 +1198,9 @@ TEST_F(ImageDecoders, JXLParallelDecodeMatchesSerial) {
|
||||
webpReference =
|
||||
CheckDecoderState(referenceCase, aDecoder);
|
||||
});
|
||||
ExpectSurfacesSimilar(webpReference, reference, kLibjxlMaxDifferingPixels,
|
||||
kLibjxlMaxChannelDiff);
|
||||
ExpectSurfacesSimilar(webpReference, reference,
|
||||
kReferenceMaxDifferingPixels,
|
||||
kReferenceMaxChannelDiff);
|
||||
}
|
||||
|
||||
for (bool useDecodePool : {false, true}) {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 668 KiB After Width: | Height: | Size: 679 KiB |
Reference in New Issue
Block a user