Experiments with a Lossless JPEG Codec

The ISO JPEG Still Image Compression Standard is popularly known for its DCT-based compression technique, but its non-DCT based lossless mode of operation is less well known. Lossless JPEG uses a form of discrete pulse code modulation (DPCM) [3]. That is, a linear combination of a pixel’s left, upper and upper left neighbors is used to predict the pixel’s value, and the difference between the pixel and its predictor is coded through either Huffman or Arithmetic coding. Lossless JPEG defines seven linear combination known as prediction selection values (PSV).