# US 2019/0246118 A1 · Method and apparatus for video coding in merge mode

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

- Number: US 2019/0246118 A1
- Document ID: US20190246118A1
- Status: Published application
- Kind: A1
- Application number: 16/205,053
- Filed: 2018-11-29
- Published: 2019-08-08
- Earliest claimed: 2018-02-06
- Assignees: Tencent America LLC
- Applicants: Tencent America LLC
- Inventors: Jing YE; Xiang Li; Shan Liu
- Web page: https://patentgrep.com/patent/US20190246118A1

## CPC

- H04N 19/176: the region being a block, e.g. a macroblock
- H04N 19/44: Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
- H04N 19/46: Embedding additional information in the video signal during the compression process (H04N19/517, H04N19/68, H04N19/70 take precedence)
- H04N 19/52: by predictive encoding
- 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 method for video coding using a merge mode by a decoder or encoder. An embodiment of the method includes receiving a current block having a block size, setting a grid pattern based on the block size of the current block, wherein the grid pattern partitions a search region adjacent to the current block into search blocks, and a size of the search blocks is determined according to the block size of the current block, and searching for one or more spatial merge candidates from candidate positions in the search blocks to construct a candidate list that includes the one or more spatial merge candidates.

## Claims

### Claim 1

A method for video coding using a merge mode by a decoder or encoder, comprising:
receiving a current block having a block size;
setting a grid pattern based on the block size of the current block, wherein the grid pattern partitions a search region adjacent to the current block into search blocks, and a size of the search blocks is determined according to the block size of the current block; and
searching for one or more spatial merge candidates from candidate positions in the search blocks to construct a candidate list that includes the one or more spatial merge candidates.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
when the block size of the current block is larger than a first threshold, determining the search block size to be a first size; and
when the block size of the current block is smaller than the first threshold, determining the search block size to be a second size that is smaller than the first size.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
searching a subset of the search blocks corresponding to a set of predetermined candidate positions for the one or more spatial merge candidates.

### Claim 4 (depends on 1)

The method of claim 1, wherein the searching for one or more spatial merge candidates from candidate positions in the search blocks to construct the candidate list comprises:
performing a first round of search over a first set of predetermined candidate positions in a nearest neighborhood of the current block, the first set of predetermined candidate positions including:
candidate position (d0) located at a bottom-left corner of the current block,
candidate position (a0) located at a left side of the current block and next to the candidate position (d0),
candidate position (c0) located at a top-right corner of the current block,
candidate position (b0) located at a top side of the current block and next to the reference position (c0), and
candidate position (e0) located at a top-left corner of the current block; and
performing a second round of search over a second set of predetermined candidate positions in a neighborhood that is one search block away from the current block and next to the nearest neighborhood of the current block, the second set of predetermined candidate positions including:
candidate position (d1) located one search block away leftwards from the candidate position (d0),
candidate position (a1) located one search block away leftwards from the candidate position (a0),
candidate position (c1) located one search block away upwards from the candidate position (c0),
candidate position (b1) located one search block away upwards from the candidate position (b0), and
candidate position (e1) located one search block away to the top-left direction of the candidate position (e0).

### Claim 5 (depends on 4)

The method of claim 4, wherein the searching for one or more spatial merge candidates from candidate positions in the search blocks to construct the candidate list further comprises:
determining whether the candidate list is fully filled after the first round of search;
when the candidate list is not fully filled, proceeding with the second round of search; and
when the candidate list is fully filled, terminating the operation of searching for one or more spatial merge candidates to construct the candidate list.

### Claim 6 (depends on 1)

The method of claim 1, wherein the searching for one or more spatial merge candidates from candidate positions in the search blocks to construct the candidate list comprises:
sequentially performing multiple rounds of search from a nearest neighborhood of the current block to a furthest neighborhood of the current block, each round of search being performed on a respective neighborhood, wherein:
(a) a first round of the multiple rounds of search is performed over the nearest neighborhood that includes the following predetermined candidate positions:
first candidate position (d0) located at a bottom-left corner of the current block,
second candidate position (a0) located at a left side of the current block and next to the candidate position (d0),
third candidate position (c0) located at a top-right corner of the current block,
fourth candidate position (b0) located at a top side of the current block and next to the reference position (c0), and
fifth candidate position (e0) located at a top-left corner of the current block; and
(b) a next round of the multiple rounds of search is performed over a next neighborhood after a previous round of the multiple rounds of search that is performed over a previous neighborhood, the next neighborhood is one search block away from the previous neighborhood of the current block, the next neighborhood includes the following predetermined candidate positions:
first candidate position (dN) located one search block away leftwards from the first candidate position (dP) of the previous neighborhood,
second candidate position (aN) located one search block away leftwards from the second candidate position (aP) of the previous neighborhood,
third candidate position (cN) located one search block away upwards from the third candidate position (cP) of the previous neighborhood,
fourth candidate position (bN) located one search block away upwards from the fourth candidate position (bP) of the previous neighborhood, and
fifth candidate position (eN) located one search block away to the top-left direction of the fifth candidate position (eP) of the previous neighborhood.

### Claim 7 (depends on 6)

The method of claim 6, wherein the searching for one or more spatial merge candidates from candidate positions in the search blocks to construct the candidate list comprises:
sequentially performing the multiple rounds of search from the nearest neighborhood of the current block to the furthest neighborhood of the current block until the candidate list is fully filled.

### Claim 8 (depends on 1)

The method of claim 1, wherein the search region includes a first set of candidate positions as defined in the high efficiency video coding (HEVC) standard in search blocks of a first neighborhood adjacent to the current block, and the candidate positions, from which the one or more spatial merge candidates are searched for, are extended, left-wards, top-wards and left-top-wards with respect to the first set of candidate positions at the left, top and left-top of the current block, respectively, from the first neighborhood adjacent to the current block to neighborhoods that are non-adjacent to the current block, and are a search block away from the current block.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
adding the one or more spatial merge candidates except a set of spatial merge candidates selected from the search blocks immediately adjacent to the current block to the candidate list at positions after a temporal merge candidate.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
comparing a merge candidate obtained by searching the search region with an existing merge candidate listed on the candidate list;
when a difference between the obtained merge candidate and the existing merge candidate is larger than a pruning threshold, adding the obtained merge candidate to the candidate list; and
when the difference between the obtained merge candidate and the existing merge candidate is smaller than the pruning threshold, not adding the obtained merge candidate on the candidate list.

### Claim 11 (depends on 1)

The method of claim 1, wherein the search blocks have a square and/or non-square shape.

### Claim 12 (depends on 1)

The method of claim 1, comprising:
signaling one of the following syntax elements from the encoder in sequence level, picture level, or slice level:
a first syntax element indicating an offset with respect to the current block for defining the search region, wherein an x coordinate and y coordinate of a top-left corner sample of the search region are equal with each other, and take the value of the offset;
a second syntax element indicating the size of the search blocks having a square shape;
a third syntax element indicating a pruning threshold;
a fourth syntax element and a fifth syntax element indicating an x direction offset and a y direction offset with respect to the current block for defining the search region, wherein the x coordinate and y coordinate of the top-left corner sample of the search region are not equal with each other, and take the values of the x direction offset and y direction offset, respectively; or
a sixth syntax element and a seventh syntax element indicating a width and a height of the search blocks having a rectangle shape.

### Claim 13

An apparatus for encoding or decoding video using a merge mode, comprising circuitry configured to:
receive a current block having a block size;
set a grid pattern based on the block size of the current block, wherein the grid pattern partitions a search region adjacent to the current block into search blocks, and a size of the search blocks is determined according to the block size of the current block; and search for one or more spatial merge candidates from candidate positions in the search blocks to construct a candidate list that includes the one or more spatial merge candidates.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the circuitry is further configured to:
when the block size of the current block is larger than a first threshold, determine the search block size to be a first size; and
when the block size of the current block is smaller than the first threshold, determine the search block size to be a second size that is smaller than the first size.

### Claim 15 (depends on 13)

The apparatus of claim 13, wherein the circuitry is further configured to:
perform a first round of search over a first set of predetermined candidate positions in a nearest neighborhood of the current block, the first set of predetermined candidate positions including:
candidate position (d0) located at a bottom-left corner of the current block,
candidate position (a0) located at a left side of the current block and next to the candidate position (d0),
candidate position (c0) located at a top-right corner of the current block,
candidate position (b0) located at a top side of the current block and next to the reference position (c0), and
candidate position (e0) located at a top-left corner of the current block; and
perform a second round of search over a second set of predetermined candidate positions in a neighborhood that is one search block away from the current block and next to the nearest neighborhood of the current block, the second set of predetermined candidate positions including:
candidate position (d1) located one search block away leftwards from the candidate position (d0),
candidate position (a1) located one search block away leftwards from the candidate position (a0),
candidate position (c1) located one search block away upwards from the candidate position (c0),
candidate position (b1) located one search block away upwards from the candidate position (b0), and
candidate position (e1) located one search block away to the top-left direction of the candidate position (e0).

### Claim 16 (depends on 13)

The apparatus of claim 13, wherein the search region includes a first set of candidate positions as defined in the high efficiency video coding (HEVC) standard in search blocks of a first neighborhood adjacent to the current block, and the candidate positions, from which the one or more spatial merge candidates are searched for, are extended, left-wards, top-wards and left-top-wards with respect to the first set of candidate positions at the left, top and left-top of the current block, respectively, from the first neighborhood adjacent to the current block to neighborhoods that are non-adjacent to the current block, and are a search block away from the current block.

### Claim 17

A computer-readable non-transitory medium storing instructions that, when executed by a processor, cause the processor to perform a method for video coding using a merge mode, the method comprising:
receiving a current block having a block size;
setting a grid pattern based on the block size of the current block, wherein the grid pattern partitions a search region adjacent to the current block into search blocks, and a size of the search blocks is determined according to the block size of the current block; and
searching for one or more spatial merge candidates from candidate positions in the search blocks to construct a candidate list that includes the one or more spatial merge candidates.

### Claim 18 (depends on 17)

The computer-readable non-transitory medium of claim 17, wherein the method further comprises:
when the block size of the current block is larger than a first threshold, determining the search block size to be a first size; and
when the block size of the current block is smaller than the first threshold, determining the search block size to be a second size that is smaller than the first size.

### Claim 19 (depends on 17)

The computer-readable non-transitory medium of claim 17, wherein the method further comprises:
performing a first round of search over a first set of predetermined candidate positions in a nearest neighborhood of the current block, the first set of predetermined candidate positions including:
candidate position (d0) located at a bottom-left corner of the current block,
candidate position (a0) located at a left side of the current block and next to the candidate position (d0),
candidate position (c0) located at a top-right corner of the current block,
candidate position (b0) located at a top side of the current block and next to the reference position (c0), and
candidate position (e0) located at a top-left corner of the current block; and
performing a second round of search over a second set of predetermined candidate positions in a neighborhood that is one search block away from the current block and next to the nearest neighborhood of the current block, the second set of predetermined candidate positions including:
candidate position (d1) located one search block away leftwards from the candidate position (d0),
candidate position (a1) located one search block away leftwards from the candidate position (a0),
candidate position (c1) located one search block away upwards from the candidate position (c0),
candidate position (b1) located one search block away upwards from the candidate position (b0), and
candidate position (e1) located one search block away to the top-left direction of the candidate position (e0).

### Claim 20 (depends on 17)

The computer-readable non-transitory medium of claim 17, wherein the method further comprises:
adding the one or more spatial merge candidates except a set of spatial merge candidates selected from the search blocks immediately adjacent to the current block to the candidate list at positions after a temporal merge candidate.
