Guaranteed data compression
AssigneeImagination Technologies Limited
InventorsIlaria Martinelli, Jeff Bond, Simon Fenney, Peter Malcolm Lacey, Gregory Clark
Life of this patent
Estimating the term…
Abstract
A method of converting 10-bit pixel data (e.g. 10:10:10:2 data) into 8-bit pixel data involves converting the 10-bit values to 7-bits or 8-bits and generating error values for each of the converted values. Two of the 8-bit output channels comprise a combination of a converted 7-bit value and one of the bits from the fourth input channel. A third 8-bit output channel comprises the converted 8-bit value and the fourth 8-bit output channel comprises the error values. In various examples, the bits of the error values may be interleaved when they are packed into the fourth output channel.
Claims19
A method of converting 10:10:10:2 format pixel data into 8888 format data, the method comprising, for each pixel:
- truncating the three 10-bit input data channels such that a first truncated channel and a third truncated channel each comprises 7 bits and a second truncated channel comprises 8 bits;
- appending a different bit from the 2-bit input data channel to each of the truncated first and third channels;
- generating an error value for each of the 10-bit input data channels by comparing, for each of the first and third channels, three LSBs of the input data channel and three bits derived from the truncated channel, and for the second channel, two LSBs of the input data channel and two bits derived from the truncated channel;
- outputting a first 8-bit channel comprising the truncated first channel with the appended bit from the 2-bit input data channel, a second 8-bit channel comprising the truncated second channel, a third 8-bit channel comprising the truncated third channel with the appended bit from the 2-bit input data channel and a fourth 8-bit channel comprising the three error values.
A method of decompressing a block of compressed RGBA 10:10:10:2 format pixel data, the method comprising:
- decompressing a compressed data block using a lossless decompression method, to generate a first decompressed data block, wherein the first decompressed data block comprises four channels of data and wherein the first, second and third channels are 8-bit channels;
- determining whether the fourth channel is an 8-bit channel and in response to determining that the fourth channel comprises fewer than 8-bits per pixel, converting the fourth channel into an 8-bit channel by adding one or more zeros to data for each pixel;
- removing an MSB from each of the first and third channels and combining them to form a 2-bit alpha channel;
- using bit replication to increase each of the first, second and third channels to 10-bit channels;
- for each of the first and third channels, modifying three LSBs by combining them with corresponding bits from the fourth channel to generate a 10-bit red output channel and a 10-bit blue output channel respectively and for the second channel, modifying two LSBs by combining them with corresponding bits from the fourth channel to generate a 10-bit green output channel.
A data compression unit arranged to convert 10:10:10:2 format pixel data into 8888 format data, the hardware comprising:
- truncation logic arranged, for each pixel, to truncate the three 10-bit input data channels such that a first truncated channel and a third truncated channel each comprises 7 bits and a second truncated channel comprises 8 bits;
- hardware logic arranged, for each pixel, to append a different bit from the 2-bit input data channel to each of the truncated first and third channels;
- hardware logic arranged, for each pixel, to generate an error value for each of the 10-bit input data channels by comparing, for each of the first and third channels, three LSBs of the input data channel and three bits derived from the truncated channel, and for the second channel, two LSBs of the input data channel and two bits derived from the truncated channel;
- hardware logic arranged, for each pixel, to output a first 8-bit channel comprising the truncated first channel with the appended bit from the 2-bit input data channel, a second 8-bit channel comprising the truncated second channel, a third 8-bit channel comprising the truncated third channel with the appended bit from the 2-bit input data channel and a fourth 8-bit channel comprising the three error values.
Dependencies are inferred from the claim text.