Turning the HEIC decoder into a SHA-256 computer

The final frame decoded by stock Apple ImageIO, displaying the HEIC file's SHA-256

The final ImageIO-decoded picture spells the SHA-256 of the exact HEIC bytes that contain it.

In our last article we turned a JPEG XL decoder into an artificial CPU and used it to build the first JXL SHA-256 hashquine. This time we did it with HEIC. It was much harder. The JXL decoder hands you a decision tree and tagged 31-bit words; HEVC hands you pixels and motion vectors, so we ended up writing a compiler from scratch instead of patching an encoder.

The exact 536,870,946-byte file has this SHA-256:

802cc6d654ad15aafbb1ca5db4824292cc39fd72cf23fd80e1230d90679b9ff1

Decode the final image in that same file with stock Apple ImageIO and its pixels spell: