# US 12,120,345 B2 · Intra prediction for image and video compression

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

- Number: US 12,120,345 B2
- Document ID: US12120345B2
- Status: Granted
- Kind: B2
- Application number: 17/793,620
- Filed: 2020-05-14
- Published: 2023-02-16
- Granted: 2024-10-15
- Earliest claimed: 2020-02-13
- Assignees: Google Inc.
- Applicants: Google LLC
- Inventors: James Bankoski; Debargha Mukherjee
- Web page: https://patentgrep.com/patent/US12120345B2

## CPC

- H04N 19/593: involving spatial prediction techniques
- H04N 19/105: Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
- H04N 19/11: among a plurality of spatial predictive coding modes
- H04N 19/136: Incoming video signal characteristics or properties
- H04N 19/159: Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
- H04N 19/167: Position within a video image, e.g. region of interest [ROI]
- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/182: the unit being a pixel
- H04N 19/196: being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters (processing of motion vectors H04N19/513)
- H04N 19/46: Embedding additional information in the video signal during the compression process (H04N19/517, H04N19/68, H04N19/70 take precedence)
- H04N 19/59: involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A method for intra-prediction of a current block includes selecting peripheral pixels of the current block, where the peripheral pixels are used to generate a prediction block for the current block; for each prediction pixel of the prediction block, performing steps including selecting two respective pixels of the peripheral pixels; and calculating the prediction pixel by interpolating at least the two respective pixels; and coding a residual block corresponding to a difference between the current block and the prediction block.

## Claims

### Claim 1

A method for intra-prediction of a current block, comprising:
selecting peripheral pixels of the current block, wherein the peripheral pixels are used to generate a prediction block for the current block;
for each prediction pixel of the prediction block, performing steps comprising:
selecting, based on intra-prediction mode parameters, two respective pixels of the peripheral pixels, wherein the intra-prediction mode parameters result in adjusting positions along a peripheral pixel line and in varying prediction angles such that different prediction pixels of the prediction block have different prediction angles; and
calculating the prediction pixel by interpolating at least the two respective pixels; and
coding a residual block corresponding to a difference between the current block and the prediction block.

### Claim 2 (depends on 1)

The method of claim 1, wherein selecting the two respective pixels of the peripheral pixels comprises:
selecting first two respective pixels of the peripheral pixels for calculating a first prediction pixel of the prediction block; and
selecting second two respective pixels of the peripheral pixels for calculating a second prediction pixel of the prediction block,
wherein the second prediction pixel is a neighboring pixel of the first prediction pixel along a first dimension,
wherein the first two respective pixels and the second two respective pixels are selected according to the intra-prediction mode parameters.

### Claim 3 (depends on 2)

The method of claim 2, wherein the intra-prediction mode parameters comprise at least two of a first offset along a first direction, a first step along the first direction, or a first acceleration along the first dimension,
wherein the first offset indicates an initial prediction angle for predicting a first pixel of a top row or a left-most column of the prediction block,
wherein the first step indicates an initial pixel position, along a line of the peripheral pixels, from which to derive a respective value of a next pixel of a new row k or column k as compared to a position of a preceding pixel of a row or column k−1, and
wherein the first acceleration indicates a change to the first step that is added to each subsequent first step.

### Claim 4 (depends on 3)

The method of claim 3, wherein the first offset is selected from a limited range of values based on a step value.

### Claim 5 (depends on 3)

The method of claim 3, wherein the first step is selected from a range of −4 to +4 using a step value of 0.25.

### Claim 6 (depends on 3)

The method of claim 3, wherein the first acceleration is 0 or 1.

### Claim 7 (depends on 3)

The method of claim 3, wherein:
the first direction is a horizontal direction,
the intra-prediction mode parameters further comprise at least two of a vertical offset, a vertical step, or a vertical acceleration,
wherein the vertical offset is indicative of a first change to the first offset to be applied to each subsequent row of the prediction block,
wherein the vertical step is indicative of a second change to the first step to be applied to the each subsequent row of the prediction block, and
wherein the vertical acceleration is indicative of a third change to the first acceleration to be applied to the each subsequent row of the prediction block.

### Claim 8 (depends on 7)

The method of claim 7, wherein calculating the prediction pixel by interpolating at least the two respective pixels comprises:
calculating the prediction pixel using bilinear interpolation.

### Claim 9 (depends on 2)

The method of claim 2, further comprising:
decoding the intra-prediction mode parameters from a compressed bitstream.

### Claim 10 (depends on 2)

The method of claim 2, wherein the intra-prediction mode parameters are derived by predicting the peripheral pixels from other pixels of a previously reconstructed block that includes the peripheral pixels.

### Claim 11

An apparatus for intra-prediction of a current block, comprising:
a memory; and
a processor, the processor configured to execute instructions stored in the memory to:
select first peripheral pixels of the current block, wherein the first peripheral pixels are along a first edge of the current block;
for each prediction pixel of a prediction block for the current block, perform instructions to:
determine, based on intra-prediction mode parameters, a first intercept along a first continuous line that includes the first peripheral pixels at respective integer locations, wherein the intra-prediction mode parameters result in adjusting positions along a peripheral pixel line and in varying prediction angles such that different prediction pixels of the prediction block have different prediction angles;
determine, using a location of the each prediction pixel and the first intercept, a second intercept along a second continuous line,
wherein the second continuous line includes second peripheral pixels,
wherein the second peripheral pixels are along a second edge of the current block, and
wherein the second edge is perpendicular to the first edge; and
calculate, using at least one of the first intercept and the second intercept,
a value for the each prediction pixel; and
code a residual block corresponding to a difference between the current block and the prediction block.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein to calculate, using at least one of the first intercept and the second intercept, the value for the each prediction pixel comprises to:
calculate the value for the each prediction pixel as a weighted sum of the first intercept and the second intercept.

### Claim 13 (depends on 11)

The apparatus of claim 11, wherein to calculate, using at least one of the first intercept and the second intercept, the value for the each prediction pixel comprises to:
calculate the value for the each prediction pixel using the one of the first intercept or the second intercept that is nearest to a location of the each prediction pixel.

### Claim 14 (depends on 11)

The apparatus of claim 11, wherein the instructions further comprise instructions to:
receive, in a compressed bitstream, a first indication of which of the first peripheral pixels or the second peripheral pixels to use as primary pixels for generating the prediction block; and
receive, in the compressed bitstream, a second indication of a function to combine the first peripheral pixels and the second peripheral pixels to obtain the prediction block.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein the second indication indicates at least one of using a weighted sum or a nearest distance.

### Claim 16

A method of generating a prediction block for a current block using intra-prediction, comprising:
determining peripheral pixels for generating the prediction block of the current block, wherein the peripheral pixels is integer pixel locations along a peripheral pixel line;
determining, based on intra-prediction mode parameters, a respective sub-pixel location of the peripheral pixel line for each pixel of the prediction block, wherein the intra-prediction mode parameters result in adjusting positions along the peripheral pixel line and in varying prediction angles such that different prediction pixels of the prediction block have different prediction angles; and
for each prediction pixel of the prediction block, calculating the prediction pixel as an interpolation of nearest integer pixels of the peripheral pixels corresponding to the respective sub-pixel location of the each prediction pixel.

### Claim 17 (depends on 16)

The method of claim 16, wherein determining the respective sub-pixel location of the peripheral pixels for each pixel of the prediction block, comprising:
for each row pixel of a first row of the prediction block, determining the respective sub-pixel location using the intra-prediction mode parameters comprising at least two of a horizontal offset, a horizontal step, or a horizontal acceleration,
wherein the horizontal offset is indicative of an initial prediction angle,
wherein the horizontal step is used as a subsequent horizontal offset for subsequent prediction pixels of a same row, and
wherein the horizontal acceleration is indicative of a change to the horizontal offset that is added to each subsequent horizontal step.

### Claim 18 (depends on 17)

The method of claim 17, wherein determining the respective sub-pixel location of the peripheral pixels for each pixel of the prediction block comprises:
determining the respective sub-pixel location of each pixel of a second row of the prediction block, wherein the intra-prediction mode parameters further comprise at least two of a vertical offset, a vertical step, or a vertical acceleration,
wherein the vertical offset is indicative of a first change to the horizontal offset to be applied to each subsequent row of the prediction block,
wherein the vertical step is indicative of a second change to the horizontal step to be applied to the each subsequent row of the prediction block, and wherein the vertical acceleration is indicative of a third change to the horizontal acceleration to be applied to the each subsequent row of the prediction block.

### Claim 19 (depends on 18)

The method of claim 18, wherein the method is implemented by a decoder, the method further comprising:
decoding the intra-prediction mode parameters from a compressed bitstream.

### Claim 20 (depends on 19)

The method of claim 19, wherein decoding the intra-prediction mode parameters from the compressed bitstream comprises:
decoding parameter differences;
deriving predicted parameter values; and
for each parameter of the intra-prediction mode parameters, adding a respective parameter difference to a respective predicted parameter value.
