1

I am reading a compressed JPEG bitstream bitwise to locate the EOB markers.

After each EOB, I would expect to find a Huffman code representing the DC coefficient bit-size.

In the vast majority of cases this I have found this to be true, but occasionally there will be a long (~10 bit) string of 1's followed by a similar string of 0's after an EOB. No DC Huffman code defined in the DHT of the image produces a match. Is it possible that this block has no DC coefficient? Why would this be the case? If not, is there another explanation?

Assuming I am right in thinking that all markers are byte-aligned, there are no restart markers in the image. All bytes with a value of 255 are followed by a zero once the scan has started.

Mike H
  • 21
  • 3

0 Answers0