# US 2021/0344954 A1 · Encoding method and device thereof, and decoding method and device thereof

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

- Number: US 2021/0344954 A1
- Document ID: US20210344954A1
- Status: Published application
- Kind: A1
- Application number: 17/375,769
- Filed: 2021-07-14
- Published: 2021-11-04
- Earliest claimed: 2019-01-14
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Narae CHOI; Minsoo PARK; Minwoo Park; Anish TAMSE; Seungsoo JEONG; Kiho CHOI; Woongil CHOI; Yinji PIAO
- Web page: https://patentgrep.com/patent/US20210344954A1

## CPC

- H04N 19/117: Filters, e.g. for pre-processing or post-processing (sub-band filter banks H04N19/635)
- 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/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- 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/176: the region being a block, e.g. a macroblock
- H04N 19/82: involving filtering within a prediction loop
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A video decoding method includes predicting a current block according to an intra prediction mode of the current block, determining whether to apply position dependent intra prediction filtering to the current block according to the intra prediction mode of the current block, when the position dependent intra prediction filtering is applied to the current block, determining at least one of an upper reference sample, a left reference sample, an upper weight, and a left weight for the position dependent intra prediction filtering of a current sample of the current block according to the intra prediction mode of the current block, and applying the position dependent intra prediction filtering to the current sample of the current block according to at least one of the upper reference sample, the left reference sample, the upper weight, and the left weight.

## Claims

### Claim 1

A video decoding method comprising:
predicting a current block according to an intra prediction mode of the current block;
determining whether to apply position dependent intra prediction filtering to the current block according to the intra prediction mode of the current block;
when the intra prediction mode of the current block is a lower left directional intra prediction mode and the position dependent intra prediction filtering is applied to the current block, determining an upper reference sample of the current block according to a sample closest to an upper reference position in a direction opposite to a prediction direction of the lower left directional intra prediction mode from a current sample, determining an upper weight according to a distance between the current sample and an upper surface of the current block, and applying the position dependent intra prediction filtering to the current sample of the current block according to the upper reference sample and the upper weight; and
when the intra prediction mode of the current block is an upper right directional intra prediction mode and the position dependent intra prediction filtering is applied to the current block, determining a left reference sample of the current sample according to a sample closest to a left reference position in a direction opposite to a prediction direction of the upper right directional intra prediction mode from the current sample, determining a left weight according to a distance between the current sample and a left surface of the current block, and applying the position dependent intra prediction filtering to the current sample of the current block according to the left reference sample and the left weight.

### Claim 2 (depends on 1)

The video decoding method of claim 1, wherein the determining whether to apply the position dependent intra prediction filtering to the current block according to the intra prediction mode of the current block comprises:
determining to apply the position dependent intra prediction filtering to the current block when the intra prediction mode of the current block corresponds to a DC mode, a planar mode, a vertical mode, a horizontal mode, a lower left diagonal mode, an upper right diagonal mode, an intra prediction mode between the horizontal mode and the lower left diagonal mode, or an intra prediction mode between the vertical mode and the upper right diagonal mode.

### Claim 3 (depends on 1)

The video decoding method of claim 1, wherein, when the intra prediction mode of the current block is the lower left directional intra prediction mode, the upper weight is determined to be 0 when the distance between the current sample and the upper surface of the current block is equal to or greater than a threshold value,
when the intra prediction mode of the current block is the upper right directional intra prediction mode, the left weight is determined to be 0 when the distance between the current sample and the left surface of the current block is equal to or greater than the threshold value, and
wherein the threshold value is determined according to a size of the current block.

### Claim 4 (depends on 1)

The video decoding method of claim 1, wherein the applying of the position dependent intra prediction filtering to the current sample of the current block according to at least one of the upper reference sample, the left reference sample, the upper weight, and the left weight comprises:
determining weights of the upper reference sample and the left reference sample, respectively according to the upper weight and the left weight;
determining a weight of the current sample according to the upper weight and the left weight;
determining a weighted average value of the current sample, the upper reference sample, and the left reference sample, based on the weights of the upper reference sample, the left reference sample, and the current sample; and
determining a position dependent intra prediction filtered current sample, according to the weighted average value of the current sample, the upper reference sample, and the left reference sample.

### Claim 5 (depends on 1)

A video decoding apparatus comprising:
a memory configured to store one or more instructions for performing the video decoding method of claim 1; and
a processor configured to execute the one or more instructions.

### Claim 6

A video encoding method comprising:
predicting a current block according to each of a plurality of intra prediction modes;
determining whether to apply position dependent intra prediction filtering to the current block according to each of the plurality of intra prediction modes;
applying the position dependent intra prediction filtering to the current block, for an intra prediction mode to which the position dependent intra prediction filtering is applied; and
determining an intra prediction mode of the current block according to a prediction result according to each intra prediction mode to which the position dependent intra prediction filtering is applied,
wherein, when the intra prediction mode of the current block is a lower left directional intra prediction mode, an upper reference sample of a current sample is determined according to a sample closest to an upper reference position in a direction opposite to a prediction direction of the lower left directional intra prediction mode from the current sample, an upper weight is determined according to a distance between the current sample and an upper surface of the current block, and the position dependent prediction filtering is applied to the current sample of the current block according to the upper reference sample and the upper weight, and
when the intra prediction mode of the current block is an upper right directional intra prediction mode, a left reference sample of the current sample is determined according to a sample closest to a left reference position in a direction opposite to a prediction direction of the upper right directional intra prediction mode from the current sample, a left weight is determined according to a distance between the current sample and a left surface of the current block, and the position dependent intra prediction filtering is applied to the current sample of the current block according to the left reference sample and the left weight.
