# US 10,771,783 B2 · Transforms for large video and image blocks

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

- Number: US 10,771,783 B2
- Document ID: US10771783B2
- Status: Granted
- Kind: B2
- Application number: 16/004,929
- Filed: 2018-06-11
- Published: 2019-12-12
- Granted: 2020-09-08
- Earliest claimed: 2018-06-11
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: Urvang Joshi; Debargha Mukherjee
- Web page: https://patentgrep.com/patent/US10771783B2

## CPC

- H04N 19/122: Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
- H04N 19/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/124: Quantisation
- H04N 19/157: Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/18: the unit being a set of transform coefficients
- H04N 19/82: involving filtering within a prediction loop
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Improved transforms are used to encode and decode large video and image blocks. During encoding, a prediction residual block having a large size (e.g., larger than 32×32) is generated. The pixel values of the prediction residual block are transformed to produce transform coefficients. After determining that the transform coefficients exceed a threshold cardinality representative of a maximum transform block size (e.g., 32×32), a number of the transform coefficients are discarded such that a remaining number of transform coefficients does not exceed the threshold cardinality. A transform block is then generated using the remaining number. During decoding, after determining that the transform coefficients exceed the threshold cardinality, a number of new coefficients are added to the transform coefficients such that a total number of transform coefficients exceeds the threshold cardinality. The transform coefficients are then inverse transformed into a prediction residual block having a large size.

## Claims

### Claim 1

A method for encoding a current block of a video frame, the method comprising:
generating a prediction residual block for the current block, the prediction residual block including pixel values, the prediction residual block having a first size;
at a transform stage of an encoder used for the encoding of the current block:
transforming the pixel values of the prediction residual block to produce transform coefficients;
determining that the transform coefficients exceed a threshold cardinality;
responsive to determining that the transform coefficients exceed the threshold cardinality, discarding a number of the transform coefficients such that a remaining number of the transform coefficients does not exceed the threshold cardinality; and
generating a transform block using the remaining number of the transform coefficients, the transform block having a second size smaller than the first size;
quantizing the remaining number of the transform coefficients within the transform block to produce quantized transform coefficients; and
encoding the quantized transform coefficients to a bitstream.

### Claim 2 (depends on 1)

The method of claim 1, wherein the threshold cardinality represents a maximum transform block size, wherein the first size of the prediction residual block is larger than the maximum transform block size.

### Claim 3 (depends on 2)

The method of claim 2, wherein determining that the transform coefficients exceed the threshold cardinality comprises:
comparing the first size of the prediction residual block to the maximum transform block size.

### Claim 4 (depends on 2)

The method of claim 2, wherein the first size of the prediction residual block is one of 64×64, 32×64, or 64×32, wherein the maximum transform block size is 32×32.

### Claim 5 (depends on 4)

The method of claim 4, wherein, when the first size of the prediction residual block is 64×64, discarding the number of the transform coefficients such that the remaining number of the transform coefficients does not exceed the threshold cardinality comprises:
discarding three quarters of the transform coefficients.

### Claim 6 (depends on 4)

The method of claim 4, wherein, when the first size of the prediction residual block is 32×64 or 64×32, discarding the number of the transform coefficients such that the remaining number of the transform coefficients does not exceed the threshold cardinality comprises:
discarding one half of the transform coefficients.

### Claim 7 (depends on 4)

The method of claim 4, wherein the transform block is a second transform block, wherein transforming the pixel values of the prediction residual block to produce the transform coefficients comprises:
generating a first transform block having the first size, the first transform block including the transform coefficients,
wherein the remaining number of the transform coefficients are located in a top-left 32×32 sub-block of the first transform block.

### Claim 8 (depends on 1)

The method of claim 1, wherein transforming the pixel values of the prediction residual block to produce the transform coefficients comprises:
transforming the pixel values using a discrete cosine transform.

### Claim 9

An apparatus for encoding a current block of a video frame, the apparatus comprising:
a processor configured to execute instructions stored in a non-transitory storage medium to:
generate a prediction residual block for the current block;
at a transform stage of an encoder used for the encoding of the current block:
transform pixel values of the prediction residual block to produce transform coefficients, the transform coefficients including a first portion and a second portion;
determine that the transform coefficients exceed a threshold cardinality representing a maximum transform block size for the transform coefficients; and
responsive to a determination that the transform coefficients exceed the threshold cardinality, generate a transform block without using the second portion of the transform coefficients, wherein the first portion of the transform coefficients does not exceed the threshold cardinality;
quantize the first portion of the transform coefficients within the transform block to produce quantized transform coefficients; and
encode the quantized transform coefficients to a bitstream.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein a size of the prediction residual block is larger than the maximum transform block size, wherein the instructions to determine that the transform coefficients exceed the threshold cardinality include instructions to:
compare the size of the prediction residual block to the maximum transform block size.

### Claim 11 (depends on 9)

The apparatus of claim 9, wherein the instructions to generate the transform block without using the second portion of the transform coefficients include instructions to:
discard the second portion of the transform coefficients; and
generate the transform block using the first portion of the transform coefficients.

### Claim 12 (depends on 9)

The apparatus of claim 9, wherein a size of the prediction residual block is one of 64×64, 32×64, or 64×32, wherein the maximum transform block size is 32×32.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein, when the size of the prediction residual block is 64×64, the first portion of the transform coefficients represents one quarter of the transform coefficients and the second portion of the transform coefficients represents three quarters of the transform coefficients.

### Claim 14 (depends on 12)

The apparatus of claim 12, wherein, when the size of the prediction residual block is 32×64 or 64×32, the first portion of the transform coefficients represents a first half of the transform coefficients and the second portion of the transform coefficients represents a second half of the transform coefficients.

### Claim 15 (depends on 12)

The apparatus of claim 12, wherein the transform block is a second transform block, wherein the instructions to transform the pixel values of the prediction residual block to produce the transform coefficients include instructions to:
generate a first transform block having the size of the prediction residual block, the first transform block including the first portion of the transform coefficients and the second portion of the transform coefficients,
wherein the first portion of the transform coefficients are located in a top-left 32×32 sub-block of the first transform block.

### Claim 16 (depends on 9)

The apparatus of claim 9, wherein the instructions to transform the pixel values of the prediction residual block to produce the transform coefficients include instructions to:
transform the pixel values using a discrete cosine transform.

### Claim 17

A method for encoding a current block of a video frame, the method comprising:
generating a prediction residual block for the current block, the prediction residual block having a first block size;
at a transform stage of an encoder used for the encoding of the current block:
transforming pixel values of the prediction residual to produce transform coefficients, the transform coefficients including a first portion and a second portion; and
generating a transform block using the first portion of the transform coefficients, the transform block having a second block size smaller than the first block size, wherein generating the transform block for the first portion of the transform coefficients includes discarding the second portion of the transform coefficients;
quantizing the first portion of the transform coefficients within the transform block to produce quantized transform coefficients; and
encoding the quantized transform coefficients to a bitstream.

### Claim 18 (depends on 17)

The method of claim 17, wherein generating the transform block using the first portion of the transform coefficients comprises:
determining that the transform coefficients exceed a threshold cardinality; and
responsive to determining that the transform coefficients exceed the threshold cardinality, discarding a number of the transform coefficients such that a remaining number of the transform coefficients does not exceed the threshold cardinality,
wherein the discarded number of the transform coefficients is the second portion of the transform coefficients, wherein the remaining number of the transform coefficients is the first portion of the transform coefficients.

### Claim 19 (depends on 18)

The method of claim 18, wherein the threshold cardinality represents a maximum transform block size, wherein the first block size of the prediction residual block is larger than the maximum transform block size.

### Claim 20 (depends on 19)

The method of claim 19, wherein the first block size of the prediction residual block is one of 64×64, 32×64, or 64×32, wherein the maximum transform block size is 32×32,
wherein, when the first block size of the prediction residual block is 64×64, discarding the number of the transform coefficients such that the remaining number of the transform coefficients does not exceed the threshold cardinality comprises discarding three quarters of the transform coefficients, and
wherein, when the first block size of the prediction residual block is 32×64 or 64×32, discarding the number of the transform coefficients such that the remaining number of the transform coefficients does not exceed the threshold cardinality comprises discarding one half of the transform coefficients.
