摘要 |
One embodiment of the present invention sets forth a technique for lossless compression of color data. Color data for a packet including multiple sub-pixel samples is compressed using a predictor map that is selected based on the sampling format specified for the graphics surface storing the color data. The predictor map defines one of the samples as an anchor that is represented exactly and a transform indicating which neighboring samples are used to compute difference samples for the other samples in the packet. The difference samples are truncated and tested to determine if the difference samples can fit into one or more compressed data formats, i.e., if the color data can be compressed without loss. When compression can be performed without loss, the transformed packet is output. Otherwise, the original packet is output. |