Skip to content

Commit bc1a817

Browse files
committed
Added test case for non-interleaved MCU crash
In cases of, eg. a 2x2 Y channel and two 1x1 chroma channels, a progressive pass on the Y channel would previously consume blocks at a rate of 4 blocks per MCU, instead of the correct 1 block per MCU. In this example image, once 8 blocks had been consumed from the stream, the decoder thought it was on just starting the third MCU, instead of the correct ninth MCU (starting on the second row). Thus, it thinks there are still 6 remaining MCUs before the next restart marker, and it tries to continue reading from the stream. Given that the rest of the byte are all 1 bits, this fails as the huffman tree consists of just a single 0b entry. Image was generated in GIMP and exported with the following settings: * Optimize * Use restart markers, interval 1 MCU row * Progressive * Subsampling 4:2:0 (chroma quartered)
1 parent 6d9fd3e commit bc1a817

File tree

2 files changed

+0
-0
lines changed

2 files changed

+0
-0
lines changed
572 Bytes
Loading
138 Bytes
Loading

0 commit comments

Comments
 (0)