# US 2026/0039787 A1 · Encoding and decoding method, apparatus, and device

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

- Number: US 2026/0039787 A1
- Document ID: US20260039787A1
- Status: Published application
- Kind: A1
- Application number: 18/998,220
- Filed: 2023-07-25
- Published: 2026-02-05
- Earliest claimed: 2022-07-26
- Assignees: Hangzhou Hikvision Digital Technology Co., Ltd.
- Applicants: Hangzhou Hikvision Digital Technology Co., Ltd.
- Inventors: Dongping PAN; Xiaoyang WU; Yucheng SUN; Fangdong CHEN
- Web page: https://patentgrep.com/patent/US20260039787A1

## CPC

- H04N 19/103: Selection of coding mode or of prediction mode
- 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/176: the region being a block, e.g. a macroblock
- H04N 19/182: the unit being a pixel
- H04N 19/593: involving spatial prediction techniques
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

The present invention provides an encoding and decoding method, apparatus and device. The method comprises: when a reference pixel of a current block is not available, removing a target prediction mode from an initial prediction mode list corresponding to the current block, so as to obtain a target prediction mode list; and encoding and decoding the current block on the basis of the target prediction mode list. The present invention can improve the encoding performance and the decoding performance.

## Claims

### Claim 1

A decoding method, performed by a decoding device, wherein when an intra block copy prediction mode is enabled for a current block, the method comprises:
when reference pixels outside a left boundary of the current block are not available, and reference pixels outside an upper boundary of the current block are available, determining a first search region corresponding to a first sub block of the current block based on reconstructed pixels outside the upper boundary, and determining reconstructed pixels of the first sub block based on reference pixels of the first search region; and
after obtaining the reconstructed pixels of the first sub block, determining a second search region corresponding to a second sub block of the current block based on reconstructed pixels outside the upper boundary, and determining reconstructed pixels of the second sub block based on reference pixels of the second search region;
wherein the current block comprises the first sub block and the second sub block.

### Claim 2 (depends on 1)

The method according to claim 1, wherein
determining the first search region corresponding to the first sub block of the current block based on the reconstructed pixels outside the upper boundary comprises: determining the reconstructed pixels outside the upper boundary as the first search region corresponding to the first sub block; and
determining the second search region corresponding to the second sub block of the current block based on the reconstructed pixels outside the upper boundary comprises: determining the reconstructed pixels outside the upper boundary as the second search region corresponding to the second sub block.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the first sub block comprises at least one first prediction block; wherein
when the reference pixels outside the left boundary of the current block are not available, and the reference pixels outside the upper boundary of the current block are available, determining the first search region corresponding to the first sub block of the current block based on the reconstructed pixels outside the upper boundary, and determining the reconstructed pixels of the first sub block based on the reference pixels of the first search region comprises:
when the reference pixels outside the left boundary of the current block are not available and the reference pixels outside the upper boundary of the current block are available, determining the first search region corresponding to the first sub block of the current block based on the reconstructed pixels outside the upper boundary, and determining reconstructed pixels of each of the at least one first prediction block in the first sub block based on reference pixels of the first search region.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the second sub block comprises at least one second prediction block; wherein
after obtaining the reconstructed pixels of the first sub block, determining the second search region corresponding to the second sub block of the current block based on the reconstructed pixels outside the upper boundary, and determining the reconstructed pixels of the second sub block based on the reference pixels of the second search region comprises:
after obtaining the reconstructed pixels of the first sub block, determining the second search region corresponding to the second sub block of the current block based on the reconstructed pixels outside the upper boundary and/or the reconstructed pixels of the first sub block, and determining reconstructed pixels of each of the at least one second prediction block of the second sub block based on reference pixels of the second search region.

### Claim 5 (depends on 3)

The method according to claim 3, wherein determining the reconstructed pixels of each of the at least one first prediction block in the first sub block based on the reference pixels of the first search region comprises:
for each of the at least one first prediction block, finding a reference block that matches the first prediction block from the first search region, wherein a size of the reference block is same as a size of the first prediction block; and determining the reconstructed pixels of the first prediction block based on the reference block.

### Claim 6 (depends on 3)

The method according to claim 3, wherein when a size of the current block is 16*2 and a size of the first sub block is 8*2, a size of one of the at least one first prediction block is 4*1.

### Claim 7 (depends on 4)

The method according to claim 4, wherein determining the reconstructed pixels of each of the at least one second prediction block in the second sub block based on the reference pixels of the second search region comprises;
for each of the at least one second prediction block, finding a reference block that matches the second prediction block from the second search region, wherein a size of the reference block is same as a size of the second prediction block; and determining the reconstructed pixels of the second prediction block based on the reference block.

### Claim 8 (depends on 4)

The method according to claim 4, wherein a size of the at least one second prediction block is same as a size of the at least one first prediction block; wherein when a size of the current block is 16*2 and sizes of the first sub block and the second sub block are 8*2,
a size of each of the at least one first prediction block is 4*1, and a size of each of the at least one second prediction block is 4*1.

### Claim 9

An encoding method, performed by an encoding device, wherein when an intra block copy prediction mode is enabled for a current block, the method comprises:
when reference pixels outside a left boundary of the current block are not available, and reference pixels outside an upper boundary of the current block are available, determining a first search region corresponding to a first sub block of the current block based on reconstructed pixels outside the upper boundary, and determining reconstructed pixels of the first sub block based on reference pixels of the first search region; and
after obtaining the reconstructed pixels of the first sub block, determining a second search region corresponding to a second sub block of the current block based on reconstructed pixels outside the upper boundary, and determining reconstructed pixels of the second sub block based on reference pixels of the second search region;
wherein the current block comprises the first sub block and the second sub block.

### Claim 10

A decoding method, performed by a decoding device, comprising;
decoding a fixed length code corresponding to each sub block within a current block from a bitstream corresponding to the current block;
for each sub block within the current block, based on the fixed length code corresponding to the sub block, decoding a residual value corresponding to each position within the sub block from the bitstream corresponding to the current block;
determining whether to decode a sign bit corresponding to the sub block based on a value of the fixed length code corresponding to the sub block; in response to determining to decode the sign bit corresponding to the sub block, decoding the sign bit corresponding to the sub block from the bitstream corresponding to the current block; and
when a residual value corresponding to a target position within the sub block is a residual boundary value, determining a sign of the residual boundary value based on the sign bit, wherein the target position is any one position within the sub block.

### Claim 11 (depends on 10)

The method according to claim 10, wherein determining whether to decode the sign bit corresponding to the sub block based on the value of the fixed length code corresponding to the sub block comprises:
when the value of the fixed length code corresponding to the sub block is less than or equal to a target value K, determining to decode the sign bit corresponding to the sub block; and
when the value of the fixed length code corresponding to the sub block is greater than the target value K, determining not to decode the sign bit corresponding to the sub block.

### Claim 12 (depends on 11)

The method according to claim 11, wherein
the target value K is a fixed value agreed upon by the decoding device and an encoding device.

### Claim 13 (depends on 10)

The method according to claim 10, wherein determining the sign of the residual boundary value based on the sign bit comprises:
when the sign bit corresponding to the sub block is a first value, determining that the sign of the residual boundary value is negative; wherein each residual boundary value within the sub block is a negative value of 2 to a power of a value of subtracting 1 from the value of the fixed length code; and
when the sign bit corresponding to the sub block is a second value, determining that the sign of the residual boundary value is positive; wherein each residual boundary value within the sub block is a value of 2 to a power of a value of subtracting 1 from the value of the fixed length code;
wherein the value of the fixed length code is a length value parsed from a bitstream.

### Claim 14

(canceled)

### Claim 15 (depends on 1)

A decoding device, comprising;
one or more memories configured to store video data; and
a decoder configured to implement the method according to claim 1.

### Claim 16

(canceled)

### Claim 17

(canceled)

### Claim 18

(canceled)

### Claim 19

(canceled)

### Claim 20 (depends on 1)

A decoding device, comprising; one or more processors and one or more machine-readable storage media, wherein the one or more machine-readable storage media store machine executable instructions that can be executed by the one or more processors; and
the one or more processors are configured to execute the machine executable instructions to implement the method according to claim 1.

### Claim 21 (depends on 9)

An encoding device comprising: one or more processors and one or more machine-readable storage media, wherein the one or more machine-readable storage media store machine executable instructions that can be executed by the one or more processors, and the one or more processors execute the machine executable instructions to implement the method claim 9.

### Claim 22 (depends on 10)

A decoding device, comprising;
one or more memories configured to store video data; and
a decoder configured to implement the method according to claim 10.

### Claim 23 (depends on 10)

A decoding device, comprising; one or more processors and one or more machine- readable storage media, wherein the one or more machine-readable storage media store machine executable instructions that can be executed by the one or more processors; and
the one or more processors are configured to execute the machine executable instructions to implement the method according to claim 10.

### Claim 24 (depends on 1)

A non-transitory machine-readable storage medium storing instructions that are executable by one or more processors, wherein when the one or more processors execute the instructions, the method according to claim 1 is implemented.

### Claim 25 (depends on 10)

A non-transitory machine-readable storage medium storing instructions that are executable by one or more processors, wherein when the one or more processors execute the instructions, the method according to claim 10 is implemented.
