AuburnSounds / gamut

Image encoding and decoding library for D. Detailed layout control. Experimental codec QOIX.
Boost Software License 1.0
41 stars 2 forks source link

commit 2bc035c4b4384e460ffad7e9fa32b24918648e0d seems to have introduced a regression in jpeg decoding #49

Closed gizmomogwai closed 1 year ago

gizmomogwai commented 1 year ago

I found an joeg in a jpeg testsuite, that works with version 2.1.1, but not with 2.1.2 or 2.1.3. I uploaded the image to https://github.com/gizmomogwai/gamut/blob/main/examples/test-suite/test-images/316be81dfdeeb942e904feb3a77f4f83.jpg When I run the decoder on it with newer versions I get just grey output, with 2.1.1 all is as expected.

p0nce commented 1 year ago

Interesting I have probably botched an optimization lately

gizmomogwai commented 1 year ago

I fear that was the jpeg non return refactoring as that's exactly the commit when it's starting for me ...

p0nce commented 1 year ago

OK, the test is supposed to be a valid JPEG or invalid? In the latter case probably a missing decoding exit.

p0nce commented 1 year ago

OK so only the first 8192 bytes gets read, investigation just starting

p0nce commented 1 year ago

Progressive JPEG working again in v2.1.4

gizmomogwai commented 1 year ago

Thanks for this super quick fix! Works for me now as well!

p0nce commented 1 year ago

My pleasure! This was a dangerous regression. Thanks for reporting :)