# US 11,309,907 B2 · Guaranteed data compression

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,309,907 B2
- Document ID: US11309907B2
- Status: Granted
- Kind: B2
- Application number: 17/076,182
- Filed: 2020-10-21
- Published: 2021-02-04
- Granted: 2022-04-19
- Earliest claimed: 2018-06-29
- Assignees: Imagination Technologies Limited
- Applicants: Imagination Technologies Limited
- Inventors: Simon Fenney; Linling Zhang
- Web page: https://patentgrep.com/patent/US11309907B2

## CPC

- H03M 7/3059: {Digital compression and data reduction techniques where the original information is represented by a subset or similar information, e.g. lossy compression}
- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06T 9/00: Image coding (bandwidth or redundancy reduction for static pictures H04N1/41; coding or decoding of static colour picture signals H04N1/64; methods or arrangements for coding, decoding, compressing or decompressing digital video signals H04N19/00)
- H03M 7/6005: {Decoder aspects}
- H03M 7/6011: {Encoder aspects}
- H04N 19/103: Selection of coding mode or of prediction mode
- H04N 19/119: Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
- H04N 19/12: Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
- H04N 19/136: Incoming video signal characteristics or properties
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/186: the unit being a colour or a chrominance component
- H04N 19/42: characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation (H04N19/635 takes precedence)
- H04N 19/85: using pre-processing or post-processing specially adapted for video compression
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Lossy methods and hardware for compressing data and the corresponding decompression methods and hardware are described. The lossy compression method comprises dividing a block of pixels into a number of sub-blocks and then analysing, for each sub-block, and selecting one of a candidate set of lossy compression modes. The analysis may, for example, be based on the alpha values for the pixels in the sub-block. In various examples, the candidate set of lossy compression modes comprises at least one mode that uses a fixed alpha channel value for all pixels in the sub-block and one or more modes that encode a variable alpha channel value.

## Claims

### Claim 1

A lossy method of compressing data comprising:
for each sub-block of a block of pixels:
analysing an alpha channel value for each pixel in the sub-block to select a lossy compression mode from a set of candidate lossy compression modes, wherein the set of candidate lossy compression modes comprises at least one compression mode which uses a fixed alpha channel value for all pixels in the sub-block.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the method further comprises:
for each sub-block of the block of pixels:
compressing the sub-block using the selected lossy compression mode,
wherein analysing an alpha channel value for each pixel in the sub-block to select a lossy compression mode from a set of candidate lossy compression modes comprises:
determining a minimum alpha channel value and a maximum alpha channel value from the alpha channel values for all the pixels in the sub-block;
in response to determining that a difference between the maximum alpha channel value and the minimum alpha channel value is larger than a difference value, selecting a compression mode which uses a variable alpha channel value for the pixels in the sub-block; and
in response to determining that the difference between the maximum alpha channel value and the minimum alpha channel value is not larger than the difference value, selecting a compression mode which uses a fixed alpha channel value for all pixels in the sub-block and determining the fixed alpha channel value.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the difference value is a maximum error value.

### Claim 4 (depends on 2)

The method according to claim 2, wherein determining the fixed alpha channel value comprises:
in response to determining that the maximum alpha channel value is a maximum possible value, setting the fixed alpha channel value equal to the maximum alpha channel value;
in response to determining that the minimum alpha channel value is zero, setting the fixed alpha channel value equal to zero; and
in response to determining both that the maximum alpha channel value is not a maximum possible value and that the minimum alpha channel value is not zero, setting the fixed alpha channel value equal to an average of the alpha channel values for all pixels in the sub-block.

### Claim 5 (depends on 2)

The method according to claim 2, wherein compressing the sub-block using the selected lossy compression mode comprises, for a compression mode which uses a fixed alpha channel value for all pixels in the sub-block:
for each of the pixels in the sub-block, converting each of a red channel value, a green channel value and a blue channel value, from 8-bits to 5-bits; and
packing the 5-bit red, green and blue channel values for the pixels in the sub-block and the fixed alpha channel value together to form compressed data for the sub-block.

### Claim 6 (depends on 2)

The method according to claim 2, wherein compressing the sub-block using the selected lossy compression mode comprises, for a compression mode which uses a variable alpha channel value for the pixels in the sub-block:
sub-dividing the sub-block into a plurality of mini-blocks;
for each of the mini-blocks:
calculating a colour difference value for each pixel pair in the mini-block;
comparing a smallest of the colour difference values to a threshold; and
in response to determining that the smallest of the colour difference values exceeds the threshold, converting pixel data for each pixel in the mini-block from a first format to a second format comprising fewer bits than the first format; and
in response to determining that the smallest of the colour difference values does not exceed the threshold, selecting one of a plurality of encoding modes based on the colour difference values, determining two or three pixel values for the selected encoding mode, allocating one of the pixel values to each pixel in the mini-block and converting the pixel values from the first format to a third format comprising fewer bits than the first format.

### Claim 7 (depends on 2)

The method according to claim 2, wherein compressing the sub-block using the selected lossy compression mode comprises, for a compression mode which uses a fixed alpha channel value for all pixels in the sub-block:
sub-dividing the sub-block into a plurality of mini-blocks;
for each of the mini-blocks:
calculating a colour difference value for each pixel pair in the mini-block;
comparing a smallest of the colour difference values to a threshold; and
in response to determining that the smallest of the colour difference values exceeds the threshold, converting pixel data for each pixel in the mini-block from a first format to a second format comprising fewer bits than the first format; and
in response to determining that the smallest of the colour difference values does not exceed the threshold, selecting one of a plurality of encoding modes based on the colour difference values, determining two or three pixel values for the selected encoding mode, allocating one of the pixel values to each pixel in the mini-block and converting the pixel values from the first format to a third format comprising fewer bits than the first format.

### Claim 8 (depends on 6)

The method according to claim 6, wherein selecting one of a plurality of encoding modes based on the colour difference values, determining two or three pixel values for the selected encoding mode, allocating one of the pixel values to each pixel in the mini-block and converting the pixel values from the first format to a third format comprising fewer bits than the first format comprises:
identifying a pixel pair in the mini-block having a smallest colour difference (908), representing the pixel pair as a single new pixel value and a pixel pattern code that identifies the pixel pair and converting pixel data for the single new pixel value and for each other pixel in the mini-block aside from the identified pixel pair, from the first format to a third format comprising fewer bits than the first format.

### Claim 9 (depends on 1)

A data compression unit configured to perform the method as set forth in claim 1.

### Claim 10

A method of data compression comprising:
for each sub-block of a plurality of sub-blocks, generating compressed data from a compressed data block:
identifying a compression mode from a block mode field within the compressed data block, wherein the compression mode is one of a set of candidate lossy compression modes, the set of candidate lossy compression modes comprising at least one compression mode which uses a fixed alpha channel value for all pixels in the sub-block.

### Claim 11 (depends on 10)

The method of data compression according to claim 10, further comprising:
decompressing the sub-block using a decompression mode corresponding to the selected compression mode.

### Claim 12 (depends on 10)

A data compression unit configured to perform the method as set forth in claim 10.

### Claim 13 (depends on 1)

A non-transitory computer readable storage medium having stored thereon computer readable code configured to cause the method as set forth in claim 1 to be performed when the code is run on at least one processor.

### Claim 14 (depends on 10)

A non-transitory computer readable storage medium having stored thereon computer readable code configured to cause the method as set forth in claim 10 to be performed when the code is run on at least one processor.

### Claim 15 (depends on 10)

A non-transitory computer readable storage medium having stored thereon a computer readable dataset description of an integrated circuit that, when processed in an integrated circuit manufacturing system, causes the integrated circuit manufacturing system to manufacture a data compression unit configured to perform the method as set forth in claim 10.

### Claim 16 (depends on 10)

An integrated circuit manufacturing system configured to manufacture a data compression unit as claimed in claim 10.

### Claim 17

An integrated circuit manufacturing system comprising:
a non-transitory computer readable storage medium having stored thereon a computer readable dataset description of an integrated circuit that describes a data compression unit,
a layout processing system configured to process the integrated circuit description so as to generate a circuit layout description of an integrated circuit embodying the data compression unit; and
an integrated circuit generation system configured to manufacture the data compression unit according to the circuit layout description,
wherein the data compression unit comprises:
hardware logic arranged, for each sub-block of a block of pixels, to analyse an alpha channel value for each pixel in the sub-block to select a lossy compression mode from a set of candidate lossy compression modes, wherein the set of candidate lossy compression modes comprises at least one compression mode which uses a fixed alpha channel value for all pixels in the sub-block.

### Claim 18 (depends on 17)

The integrated circuit manufacturing system as set forth in claim 17, wherein the data compression unit further comprises:
a data compression element arranged to compress the sub-block using the selected lossy compression mode.
