Closed quilan1 closed 3 years ago
It occurs to me that the created jpeg file causes an error (bad huffman decode), not a panic; would this be better placed in the reftest images?
Yes, crashtest
is for regressions that previously panicked and ignores the result. If you want to test success or a particular decoding response then the reftests are the appropriate place.
Thank you!
As detailed in the commits, the issue had to do with the way the old code treated MCUs in non-interleaved streams, with channels having a greater-than-1 sampling factor. In a non-interleaved stream, MCUs should be treated as single blocks instead of as the group of HxV blocks.
Future work might be considered to simplify the coding of batching rows together for the worker threads; currently it only accepts the full HxV set of blocks for a 'row', instead of an image row, and I didn't touch that code.
Solves #173 and addresses #89