Patent ID: 8705623

Claim:
A method of compressing digital image data comprising: selecting an entropy code for encoding a line of pixels in the digital image data, wherein the entropy code is selected from a plurality of variable length entropy codes; using spatial prediction to compute a pixel predictor and a pixel residual for a pixel in the line of pixels, wherein using spatial prediction comprises computing a minimum absolute sample difference (MASD) for the pixel based on neighboring pixels, wherein the neighboring pixels are a left neighboring pixel in the line of pixels, a top left neighboring pixel in a previous line of pixels, and a top neighboring pixel in the previous line of pixels, and wherein computing the MASD comprises computing an absolute sample difference (ASD) between the top left neighboring pixel and the top neighboring pixel, an ASD between the top left neighboring pixel and the left neighboring pixel, and an ASD between the top left neighboring pixel and an interpolated pixel value computed from the top neighboring pixel and the left neighboring pixel; and computing the pixel predictor and the pixel residual based on the MASD; and selectively encoding the pixel residual using one of the entropy code or run mode encoding.