# US 2024/0205389 A1 · Complexity reduction and bit-width control for bi-directional optical flow

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

- Number: US 2024/0205389 A1
- Document ID: US20240205389A1
- Status: Published application
- Kind: A1
- Application number: 18/438,202
- Filed: 2024-02-09
- Published: 2024-06-20
- Earliest claimed: 2018-09-21
- Assignees: Vid Scale, Inc.
- Applicants: Vid Scale, Inc.
- Inventors: Xiaoyu Xiu; Yuwen He; Yan Ye; Jiancong Luo
- Web page: https://patentgrep.com/patent/US20240205389A1

## CPC

- 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/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/146: Data rate or code amount at the encoder output
- 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/513: Processing of motion vectors
- H04N 19/52: by predictive encoding
- H04N 19/577: Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
- H04N 19/563: Motion estimation with padding, i.e. with filling of non-object values in an arbitrarily shaped picture block or region for estimation purposes
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

Systems and methods are described for reducing the complexity of using bi-directional optical flow (BIO) in video coding. In some embodiments, bit-width reduction steps are introduced in the BIO motion refinement process to reduce the maximum bit-width used for BIO calculations. In some embodiments, simplified interpolation filters are used to generate predicted samples in an extended region around a current coding unit. In some embodiments, different interpolation filters are used for vertical versus horizontal interpolation. In some embodiments, BIO is disabled for coding units with small heights and/or for coding units that are predicted using a sub-block level inter prediction technique, such as advanced temporal motion vector prediction (ATMVP) or affine prediction.

## Claims

### Claim 1

A video decoding method comprising:
obtaining a first prediction signal array from a first reference picture;
obtaining a first array of first-component gradients including performing a right bit shift on two samples in the first prediction signal array and determining a difference between the two right-bit-shifted samples from the first prediction signal array;
obtaining a second prediction signal array from a second reference picture;
obtaining a second array of first-component gradients including performing a right bit shift on two samples in the second prediction signal array and determining a difference between the two right-bit-shifted samples from the second prediction signal array;
obtaining a first-component intermediate parameter array including determining a sum of the first array of first-component gradients and the second array of first-component gradients;
obtaining at least a first-component motion refinement based at least in part on the first-component intermediate parameter array; and
generating a prediction of a current block in a video with bi-directional optical flow using at least the first-component motion refinement.

### Claim 2 (depends on 1)

The method of claim 1, wherein obtaining the first-component intermediate parameter array includes performing a right bit shift on the sum of the first array of first-component gradients and the second array of first-component gradients.

### Claim 3 (depends on 1)

The method of claim 1, further comprising obtaining a signal-difference parameter array including performing a right bit shift on each of the first prediction signal array and the second prediction signal array before obtaining a difference between the first prediction signal array and the second prediction signal array, wherein the first-component motion refinement is further based at least in part on the signal-difference parameter array.

### Claim 4 (depends on 3)

The method of claim 3, wherein the first-component intermediate parameter array is a horizontal intermediate parameter array and the first-component motion refinement is a horizontal motion refinement, further comprising:
obtaining a signal-horizontal-gradient correlation parameter by summing components of an elementwise multiplication of the signal-difference parameter array with the horizontal intermediate parameter array;
wherein obtaining the horizontal motion refinement comprises bit-shifting the signal-horizontal-gradient correlation parameter to obtain the horizontal motion refinement.

### Claim 5 (depends on 1)

The method of claim 1, wherein the first-component gradients are horizontal gradients, and wherein:
for at least a plurality of the horizontal gradients in the first array having coordinates (i, j), the two samples in the first prediction signal array have coordinates (i+1, j) and (i−1, j); and
for at least a plurality of the horizontal gradients in the second array having coordinates (i, j), the two samples in the second prediction signal array have coordinates (i+1, j) and (i−1, j).

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
obtaining a first array of second-component gradients including performing a right bit shift on two samples in the first prediction signal array and determining a difference between the two right-bit-shifted samples from the first prediction signal array;
obtaining a second array of second-component gradients including performing a right bit shift on two samples in the second prediction signal array and determining a difference between the two right-bit-shifted samples from the second prediction signal array;
obtaining a second-component intermediate parameter array including determining a sum of the first array of second-component gradients and the second array of second-component gradients; and
obtaining a second-component motion refinement based at least in part on the second-component intermediate parameter array;
wherein the prediction of the current block further uses the second-component motion refinement.

### Claim 7 (depends on 1)

The method of claim 1, wherein the second-component gradients are vertical gradients, and wherein:
for at least a plurality of the vertical gradients in the first array having coordinates (i, j), the two samples in the first prediction signal array have coordinates (i, j+1) and (i, j−1); and
for at least a plurality of the vertical gradients in the second array having coordinates (i, j), the two samples in the second prediction signal array have coordinates (i, j+1) and (i, j−1).

### Claim 8

A video decoder apparatus comprising one or more processors configured to perform at least:
obtaining a first prediction signal array from a first reference picture;
obtaining a first array of first-component gradients including performing a right bit shift on two samples in the first prediction signal array and determining a difference between the two right-bit-shifted samples from the first prediction signal array;
obtaining a second prediction signal array from a second reference picture;
obtaining a second array of first-component gradients including performing a right bit shift on two samples in the second prediction signal array and determining a difference between the two right-bit-shifted samples from the second prediction signal array;
obtaining a first-component intermediate parameter array including determining a sum of the first array of first-component gradients and the second array of first-component gradients;
obtaining at least a first-component motion refinement based at least in part on the first-component intermediate parameter array; and
generating a prediction of a current block in a video with bi-directional optical flow using at least the first-component motion refinement.

### Claim 9 (depends on 8)

The apparatus of claim 8, wherein obtaining the first-component intermediate parameter array includes performing a right bit shift on the sum of the first array of first-component gradients and the second array of first-component gradients.

### Claim 10 (depends on 8)

The apparatus of claim 8, further comprising obtaining a signal-difference parameter array including performing a right bit shift on each of the first prediction signal array and the second prediction signal array before obtaining a difference between the first prediction signal array and the second prediction signal array, wherein the first-component motion refinement is further based at least in part on the signal-difference parameter array.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein the first-component intermediate parameter array is a horizontal intermediate parameter array and the first-component motion refinement is a horizontal motion refinement, further comprising:
obtaining a signal-horizontal-gradient correlation parameter by summing components of an elementwise multiplication of the signal-difference parameter array with the horizontal intermediate parameter array;
wherein obtaining the horizontal motion refinement comprises bit-shifting the signal-horizontal-gradient correlation parameter to obtain the horizontal motion refinement.

### Claim 12 (depends on 8)

The apparatus of claim 8, wherein the first-component gradients are horizontal gradients, and wherein:
for at least a plurality of the horizontal gradients in the first array having coordinates (i, j), the two samples in the first prediction signal array have coordinates (i+1, j) and (i−1, j); and
for at least a plurality of the horizontal gradients in the second array having coordinates (i, j), the two samples in the second prediction signal array have coordinates (i+1, j) and (i−1, j).

### Claim 13

A video encoding method comprising:
obtaining a first prediction signal array from a first reference picture;
obtaining a first array of first-component gradients including performing a right bit shift on two samples in the first prediction signal array and determining a difference between the two right-bit-shifted samples from the first prediction signal array;
obtaining a second prediction signal array from a second reference picture;
obtaining a second array of first-component gradients including performing a right bit shift on two samples in the second prediction signal array and determining a difference between the two right-bit-shifted samples from the second prediction signal array;
obtaining a first-component intermediate parameter array including determining a sum of the first array of first-component gradients and the second array of first-component gradients;
obtaining at least a first-component motion refinement based at least in part on the first-component intermediate parameter array; and
generating a prediction of a current block in a video with bi-directional optical flow using at least the first-component motion refinement.

### Claim 14 (depends on 13)

The method of claim 13, wherein obtaining the first-component intermediate parameter array includes performing a right bit shift on the sum of the first array of first-component gradients and the second array of first-component gradients.

### Claim 15 (depends on 13)

The method of claim 13, further comprising obtaining a signal-difference parameter array including performing a right bit shift on each of the first prediction signal array and the second prediction signal array before obtaining a difference between the first prediction signal array and the second prediction signal array, wherein the first-component motion refinement is further based at least in part on the signal-difference parameter array.

### Claim 16 (depends on 15)

The method of claim 15, wherein the first-component intermediate parameter array is a horizontal intermediate parameter array and the first-component motion refinement is a horizontal motion refinement, further comprising:
obtaining a signal-horizontal-gradient correlation parameter by summing components of an elementwise multiplication of the signal-difference parameter array with the horizontal intermediate parameter array;
wherein obtaining the horizontal motion refinement comprises bit-shifting the signal-horizontal-gradient correlation parameter to obtain the horizontal motion refinement.

### Claim 17

A video encoder apparatus comprising one or more processors configured to perform:
obtaining a first prediction signal array from a first reference picture;
obtaining a first array of first-component gradients including performing a right bit shift on two samples in the first prediction signal array and determining a difference between the two right-bit-shifted samples from the first prediction signal array;
obtaining a second prediction signal array from a second reference picture;
obtaining a second array of first-component gradients including performing a right bit shift on two samples in the second prediction signal array and determining a difference between the two right-bit-shifted samples from the second prediction signal array;
obtaining a first-component intermediate parameter array including determining a sum of the first array of first-component gradients and the second array of first-component gradients;
obtaining at least a first-component motion refinement based at least in part on the first-component intermediate parameter array; and
generating a prediction of a current block in a video with bi-directional optical flow using at least the first-component motion refinement.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein obtaining the first-component intermediate parameter array includes performing a right bit shift on the sum of the first array of first-component gradients and the second array of first-component gradients.

### Claim 19 (depends on 17)

The apparatus of claim 17, further comprising obtaining a signal-difference parameter array including performing a right bit shift on each of the first prediction signal array and the second prediction signal array before obtaining a difference between the first prediction signal array and the second prediction signal array, wherein the first-component motion refinement is further based at least in part on the signal-difference parameter array.

### Claim 20 (depends on 17)

The apparatus of claim 17, wherein the first-component gradients are vertical gradients, and wherein:
for at least a plurality of the vertical gradients in the first array having coordinates (i, j), the two samples in the first prediction signal array have coordinates (i, j+1) and (i, j−1); and
for at least a plurality of the vertical gradients in the second array having coordinates (i, j), the two samples in the second prediction signal array have coordinates (i, j+1) and (i, j−1).
