Control: tags -1 patch On 2022-02-21 22:05:53, Sebastian Ramacher wrote: > On 2022-02-20 18:33:22, Dmitry Shachnev wrote: > > Control: reassign -1 libwebp7 1.2.1-7 > > Control: affects -1 src:qtimageformats-opensource-src > > > > Hi Sebastian and libwebp maintainers! > > > > On Fri, Feb 18, 2022 at 10:39:23PM +0100, Sebastian Ramacher wrote: > > > Source: qtimageformats-opensource-src > > > Version: 5.15.2-2 > > > Severity: serious > > > Tags: ftbfs > > > Justification: fails to build from source (but built successfully in the > > > past) > > > X-Debbugs-Cc: sramac...@debian.org > > > > > > qtimageformats-opensource-src FTBFS on mipsel: > > > > > > TIFFReadDirectory: Warning, Sum of Photometric type-related color > > > channels and ExtraSamples doesn't match SamplesPerPixel. Defining > > > non-color channels as ExtraSamples.. > > > TIFFReadDirectory: Warning, Sum of Photometric type-related color > > > channels and ExtraSamples doesn't match SamplesPerPixel. Defining > > > non-color channels as ExtraSamples.. > > > PASS : tst_qtiff::tiffGrayscale() > > > FAIL! : tst_qwebp::writeImage(kollada_noalpha-100) '!reread.isNull()' > > > returned FALSE. () > > > Loc: [tst_qwebp.cpp(174)] > > > PASS : tst_qwebp::cleanupTestCase() > > > Totals: 10 passed, 1 failed, 0 skipped, 0 blacklisted, 632ms > > > ********* Finished testing of tst_qwebp ********* > > > > > > See > > > https://buildd.debian.org/status/fetch.php?pkg=qtimageformats-opensource-src&arch=mipsel&ver=5.15.2-2%2Bb1&stamp=1645209225&raw=0 > > > > It looks to me like a bug in new libwebp version: encoder generates broken > > webp files on mipsel. > > > > I can reproduce it without any Qt code by encoding the attached PNG file and > > then trying to decode it back: > > > > (sid_mipsel-dchroot)mitya57@eller:~$ cwebp kollada_noalpha.png -lossless -o > > kollada_noalpha.webp > > Saving file 'kollada_noalpha.webp' > > File: kollada_noalpha.png > > Dimension: 436 x 160 > > Output: 37004 bytes (4.24 bpp) > > Lossless-ARGB compressed size: 37004 bytes > > * Header size: 636 bytes, image data size: 36342 > > * Precision Bits: histogram=3 transform=3 cache=1 > > (sid_mipsel-dchroot)mitya57@eller:~$ dwebp kollada_noalpha.webp > > Decoding of kollada_noalpha.webp failed. > > Status: 3(BITSTREAM_ERROR) > > > > I am also attaching the generated broken WEBP file. > > A git bisect run suggests that this issue was introduced upstream in > dea3e89983f299b3325898fa5b9474be258553b2 and is not yet fixed.
Disabling the mips specific optimizations works around this issue. See the attached patch for a temporary fix until this issue is properly fixed upstream. Cheers -- Sebastian Ramacher
diff --git a/src/dsp/dsp.h b/src/dsp/dsp.h index fafc2d05..d466893c 100644 --- a/src/dsp/dsp.h +++ b/src/dsp/dsp.h @@ -97,17 +97,17 @@ extern "C" { #if defined(__mips__) && !defined(__mips64) && \ defined(__mips_isa_rev) && (__mips_isa_rev >= 1) && (__mips_isa_rev < 6) -#define WEBP_USE_MIPS32 +/* #define WEBP_USE_MIPS32 */ #if (__mips_isa_rev >= 2) -#define WEBP_USE_MIPS32_R2 +/* #define WEBP_USE_MIPS32_R2 */ #if defined(__mips_dspr2) || (defined(__mips_dsp_rev) && __mips_dsp_rev >= 2) -#define WEBP_USE_MIPS_DSP_R2 +/* #define WEBP_USE_MIPS_DSP_R2 */ #endif #endif #endif #if defined(__mips_msa) && defined(__mips_isa_rev) && (__mips_isa_rev >= 5) -#define WEBP_USE_MSA +/* #define WEBP_USE_MSA */ #endif #endif /* EMSCRIPTEN */