# US 12,003,764 B2 · Prediction method for current block and electronic device

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

- Number: US 12,003,764 B2
- Document ID: US12003764B2
- Status: Granted
- Kind: B2
- Application number: 17/704,443
- Filed: 2022-03-25
- Published: 2022-07-07
- Granted: 2024-06-04
- Earliest claimed: 2019-09-27
- Assignees: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Applicants: Guangdong Oppo Mobile Telecommunications Corp., Ltd.
- Inventors: Fan Liang; Jian Cao
- Web page: https://patentgrep.com/patent/US12003764B2

## 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/593: involving spatial prediction techniques
- 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/513: Processing of motion vectors
- H04N 19/52: by predictive encoding
- H04N 19/61: in combination with predictive coding
- H04N 19/70: characterised by syntax aspects related to video coding, e.g. related to compression standards
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A prediction method for a current block and an electronic device are provided, where the method includes the following. Mode information of an intra block copy-mirror mode is obtained when in a non-merge mode of intra block copy. Determine whether to perform mirror transform on a reference block according to the mode information. A prediction block of the current block is obtained by performing mirror transform on the reference block when a determination result is performing mirror transform on the reference block.

## Claims

### Claim 1

A method of predicting a current block for a video encoder, the method comprising:
obtaining mode information of an intra block copy-minor mode when in a non-merge mode of intra block copy;
determining whether to perform minor transform on a reference block according to the mode information; and
obtaining a prediction block of the current block by performing mirror transform on the reference block when a determination result is performing mirror transform on the reference block.

### Claim 2 (depends on 1)

The method of claim 1, wherein obtaining the mode information of the intra block copy-minor mode when in the non-merge mode of the intra block copy comprises:
obtaining a valid block vector when in the non-merge mode, wherein the valid block vector represents that the reference block referenced by the current block is in a valid encoded reference region; and
obtaining the mode information according to the valid block vector.

### Claim 3 (depends on 2)

The method of claim 2, wherein obtaining the mode information according to the valid block vector comprises:
obtaining a first sample value of the reference block according to the valid block vector;
obtaining a predicted first sample value of the current block;
determining a first absolute difference between the first sample value of the current block and the first sample value of the reference block; and
determining the mode information according to the first absolute difference.

### Claim 4 (depends on 3)

The method of claim 3, wherein determining the mode information according to the first absolute difference comprises:
obtaining a position of the reference block according to the valid block vector;
performing horizontal mirror flipping on the reference block according to the position;
obtaining a second sample value of the reference block after horizontal mirror flipping;
performing vertical mirror flipping on the reference block according to the position;
obtaining a third sample value of the reference block after vertical mirror flipping;
determining a second absolute difference between the first sample value of the current block and the second sample value;
determining a third absolute difference between the first sample value of the current block and the third sample value; and
determining the mode information according to the first absolute difference, the second absolute difference, and the third absolute difference.

### Claim 5 (depends on 4)

The method of claim 4, wherein determining whether to perform mirror transform on the reference block according to the mode information comprises:
determining whether to perform minor transform on the reference block, and obtaining the determination result of performing minor transform on the reference block, when a minimum value among the first absolute difference, the second absolute difference, and the third absolute difference is not the first absolute difference.

### Claim 6 (depends on 4)

The method of claim 4, wherein determining whether to perform mirror transform on the reference block according to the mode information comprises:
determining whether to perform minor transform on the reference block, and obtaining the determination result of not performing minor transform on the reference block, when the first absolute difference is smaller than the second absolute difference and the first absolute difference is smaller than the third absolute difference.

### Claim 7 (depends on 5)

The method of claim 5, wherein obtaining the prediction block of the current block by performing mirror transform on the reference block when the determination result is performing minor transform on the reference block comprises:
the determination result being performing horizontal minor transform on the reference block and obtaining the prediction block by performing horizontal mirror transform on the reference block according to the position and the first sample value of the reference block, when the minimum value among the first absolute difference, the second absolute difference, and the third absolute difference is the second absolute difference.

### Claim 8 (depends on 5)

The method of claim 5, wherein obtaining the prediction block of the current block by performing mirror transform on the reference block when the determination result is performing minor transform on the reference block comprises:
the determination result being performing vertical minor transform on the reference block and obtaining the prediction block by performing vertical mirror transform on the reference block according to the position and the first sample value of the reference block, when the minimum value among the first absolute difference, the second absolute difference, and the third absolute difference is the third absolute difference.

### Claim 9 (depends on 7)

The method of claim 7, further comprising:
encoding, according to the position and the first sample value of the reference block, a parameter obtained by performing horizontal minor transform on the reference block and signalling the encoded parameter into a bitstream.

### Claim 10 (depends on 8)

The method of claim 8, further comprising:
encoding, according to the position and the first sample value of the reference block, a parameter obtained by performing vertical mirror transform on the reference block and signalling the encoded parameter into a bitstream.

### Claim 11 (depends on 1)

The method of claim 1, wherein the reference block is located in a current picture where the current block is located, or the reference block is located in an encoded picture before the current picture is encoded.

### Claim 12

A method of predicting a current block for a video decoder, the method comprising:
parsing a bitstream to obtain mode information of an intra block copy-mirror mode when in a non-merge mode of intra block copy;
determining whether to perform minor transform on a reference block according to the mode information; and
constructing a prediction block of the current block by performing minor transform on the reference block, when a determination result is performing mirror transform on the reference block.

### Claim 13 (depends on 12)

The method of claim 12, wherein determining whether to perform mirror transform on the reference block according to the mode information comprises:
obtaining a minor mode flag and a minor type flag contained in the mode information, wherein the mirror mode flag and the minor type flag are obtained by a video encoder based on a magnitude relationship of a first absolute difference, a second absolute difference, and a third absolute difference, wherein
the first absolute difference is an absolute difference between a first sample value of the current block and a first sample value of the reference block determined by the video encoder, the second absolute difference is an absolute difference between the first sample value of the current block and a second sample value of the reference block determined by the video encoder, and the third absolute difference is an absolute difference between the first sample value of the current block and a third sample value of the reference block determined by the video encoder; and
determining whether to perform minor transform on the reference block according to the minor mode flag and the mirror type flag.

### Claim 14 (depends on 13)

The method of claim 13, wherein
the method further comprises: obtaining a valid block vector of the current block during parsing the bitstream; and
accordingly, constructing the prediction block of the current block by performing mirror transform on the reference block when the determination result is performing mirror transform on the reference block comprises:
obtaining a position of the reference block and the first sample value of the reference block according to the valid block vector when the determination result is performing mirror transform on the reference block; and
constructing the prediction block of the current block by performing mirror transform on the reference block according to the position and the first sample value of the reference block.

### Claim 15 (depends on 14)

The method of claim 14, wherein
determining whether to perform minor transform on the reference block according to the minor mode flag and the mirror type flag comprises:
determining to perform horizontal minor transform on the reference block and obtaining the determination result, when the minor mode flag is a second identifier and the mirror type flag is the second identifier; and
accordingly, constructing the prediction block of the current block by performing mirror transform on the reference block according to the position and the first sample value of the reference block comprises:
constructing the prediction block of the current block by performing horizontal minor transform on the reference block according to the position and the first sample value of the reference block.

### Claim 16 (depends on 14)

The method of claim 14, wherein
determining whether to perform minor transform on the reference block according to the minor mode flag and the mirror type flag comprises:
determining to perform vertical minor transform on the reference block and obtaining the determination result, when the minor mode flag is a second identifier and the mirror type flag is a first identifier; and
accordingly, constructing the prediction block of the current block by performing mirror transform on the reference block according to the position and the first sample value of the reference block comprises:
constructing the prediction block of the current block by performing vertical minor transform on the reference block according to the position and the first sample value of the reference block.

### Claim 17 (depends on 13)

The method of claim 13, wherein determining whether to perform mirror transform on the reference block according to the mirror mode flag and the minor type flag comprises:
determining not to perform mirror transform on the reference block when the minor mode flag is a first identifier and the mirror type flag is the first identifier.

### Claim 18 (depends on 12)

The method of claim 12, wherein the reference block is located in a current picture where the current block is located, or the reference block is located in a decoded picture before the current picture is decoded.

### Claim 19

An electronic device, comprising:
at least one processor; and
a memory coupled to the at least one processor and storing at least one computer executable instruction thereon which, when executed by the at least one processor, causes the at least one processor to:
parse a bitstream to obtain mode information of an intra block copy-minor mode when in a non-merge mode of intra block copy;
determine whether to perform mirror transform on a reference block according to the mode information; and
construct a prediction block of a current block by performing minor transform on the reference block, when a determination result is performing mirror transform on the reference block.

### Claim 20 (depends on 19)

The electronic device of claim 19, wherein the at least one processor configured to determine whether to perform minor transform on the reference block according to the mode information is configured to:
obtain a minor mode flag and a mirror type flag contained in the mode information, wherein the mirror mode flag and the minor type flag are obtained by a video encoder based on a magnitude relationship of a first absolute difference, a second absolute difference, and a third absolute difference, wherein
the first absolute difference is an absolute difference between a first sample value of the current block and a first sample value of the reference block determined by the video encoder, the second absolute difference is an absolute difference between the first sample value of the current block and a second sample value of the reference block determined by the video encoder, and the third absolute difference is an absolute difference between the first sample value of the current block and a third sample value of the reference block determined by the video encoder; and
determine whether to perform mirror transform on the reference block according to the minor mode flag and the mirror type flag.
