KR20200141703A - Video signal encoding method and apparatus and video decoding method and apparatus - Google Patents

Video signal encoding method and apparatus and video decoding method and apparatus Download PDF

Info

Publication number
KR20200141703A
KR20200141703A KR1020190068552A KR20190068552A KR20200141703A KR 20200141703 A KR20200141703 A KR 20200141703A KR 1020190068552 A KR1020190068552 A KR 1020190068552A KR 20190068552 A KR20190068552 A KR 20190068552A KR 20200141703 A KR20200141703 A KR 20200141703A
Authority
KR
South Korea
Prior art keywords
intra
block
prediction
coding
coding unit
Prior art date
Application number
KR1020190068552A
Other languages
Korean (ko)
Inventor
이배근
Original Assignee
주식회사 엑스리스
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 엑스리스 filed Critical 주식회사 엑스리스
Priority to KR1020190068552A priority Critical patent/KR20200141703A/en
Publication of KR20200141703A publication Critical patent/KR20200141703A/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Provided are a method and device for encoding a video using an intra prediction mode signaling and encoding method. Therefore, the coding efficiency of a video signal is improved.

Description

비디오 신호 처리 방법 및 장치 {Video signal encoding method and apparatus and video decoding method and apparatus}Video signal processing method and apparatus TECHNICAL FIELD [Video signal encoding method and apparatus and video decoding method and apparatus]

본 발명은 비디오 신호 처리 방법 및 장치에 관한 것이다. The present invention relates to a video signal processing method and apparatus.

비디오 영상은 시공간적 중복성 및 시점 간 중복성을 제거하여 압축 부호화되며, 이는 저장 매체에 적합한 형태로 저장되거나 통신 회선을 통해 전송될 수 있다. Video images are compression-encoded by removing spatio-temporal redundancy and inter-view redundancy, which can be stored in a format suitable for a storage medium or transmitted through a communication line.

본 발명은 비디오 신호의 코딩 효율을 향상시키고자 함에 있다. The present invention is to improve the coding efficiency of a video signal.

상기 과제를 해결하기 위하여 본 발명은 인트라 예측 모드 시그날링 방법을 이용한 비디오 부호화 방법 및 장치를 제공한다. In order to solve the above problems, the present invention provides a video encoding method and apparatus using an intra prediction mode signaling method.

본 발명에 따른 비디오 신호 처리 방법 및 장치는 인트라 예측 모드 시그날링 방법을 통해 비디오 신호 코딩 효율을 향상 시킬 수 있다.The video signal processing method and apparatus according to the present invention can improve video signal coding efficiency through the intra prediction mode signaling method.

1One 기본 코딩 블록 구조Basic coding block structure

픽쳐는 그림 1과 같이 복수개의 기본 코딩 유닛(Coding Tree Unit, 이하, CTU)으로 나누어진다. A picture is divided into a plurality of basic coding units (Coding Tree Units, hereinafter, CTU) as shown in Figure 1 .

Figure pat00001
Figure pat00001

그림 1Picture 1

다른 CTU와 겹치지 않도록 구성되어 있다. 예를 들어, 전체 시퀀스에서 CTU 사이즈를 128x128로 설정할 수 있고, 픽쳐 단위로 128x128 내지 256x256 중 어느 하나를 선택해서 사용할 수도 있다. It is configured not to overlap with other CTUs. For example, in the entire sequence, the CTU size can be set to 128x128, and any one of 128x128 to 256x256 can be selected and used in picture units.

CTU를 계층적으로 분할하여 코딩 블록/코딩 유닛(Coidng Unit, 이하 CU)을 생성할 수 있다. 코딩 유닛 단위로 예측 및 변환을 수행할 수 있으며, 예측 부호화 모드를 결정하는 기본 단위가 된다. 예측 부호화 모드는 예측 영상을 생성하는 복수개의 방법을 나타내며, 화면 내 예측 (intra prediction, 이하, 인트라 예측), 화면 간 예측(inter prediction, 이하, 인터 예측) 또는 복합 예측(combined prediction)등을 예로 들수 있다. 구체적으로 예를 들어, 코딩 유닛 단위로 인트라 예측, 인터 예측 또는 복합 예측 중 적어도 어느 하나의 예측 부호화 모드를 이용하여 예측 블록(prediction block)을 생성할 수 있다. 화면 간 예측 모드에서 참조 픽쳐가 현재 픽쳐를 가리키는 경우에는 이미 복호화된 현재 픽쳐 내 영역에서 예측 블록을 생성할 수 있다. 참조 픽쳐 인덱스와 모션 벡터를 이용하여 예측 블록을 생성하기 때문에 화면 간 예측에 포함할 수 있다. 인트라 예측은 현재 픽쳐의 정보를 이용하여 예측 블록을 생성하는 방법이고, 인터 예측은 이미 복호화된 다른 픽쳐의 정보를 이용하여 예측 블록을 생성하는 방법이며, 복합 예측은 인터 예측과 인트라 예측을 혼합하여 사용하는 방법이다. A coding block/coding unit (CU) may be generated by hierarchically dividing the CTU. Prediction and transformation may be performed in units of coding units, and become a basic unit that determines a prediction coding mode. The prediction encoding mode represents a plurality of methods of generating a predicted image, such as intra prediction (intra prediction, hereinafter, intra prediction), inter prediction (hereinafter, inter prediction), or combined prediction. Can be mentioned. Specifically, for example, a prediction block may be generated by using at least one of intra prediction, inter prediction, and composite prediction in a coding unit unit. In the inter prediction mode, when the reference picture indicates the current picture, a prediction block may be generated in an area within the current picture that has already been decoded. Because a prediction block is generated using a reference picture index and a motion vector, it can be included in inter prediction. Intra prediction is a method of generating a prediction block using information of the current picture, inter prediction is a method of generating a prediction block using information of another picture that has already been decoded, and composite prediction is a method of mixing inter prediction and intra prediction. This is how to use.

CTU는 그림 2와 같이 쿼드 트리 ,바이너리 트리 또는 트리플 트리 형태로 분할 (파티셔닝)될 수 있다. 분할된 블록은 다시 쿼드 트리, 바이너리 트리 또는 트리플 트리 형태로 추가 분할 될수 있다. 현재 블록을 4개의 정방 형태 파티션으로 나누는 방법을 쿼드 트리 파티셔닝이라고 부르고, 현재 블록을 2개의 비정방 형태 파티션으로 나누는 방법을 바이너리 트리 파티셔닝이라고 부르며, 현재 블록을 3개의 비정방 형태 파티션으로 나누는 방법을 바이너리 트리 파티셔닝이라고 정의 한다. The CTU can be divided (partitioned) into a quad tree, binary tree or triple tree as shown in Figure 2 . The divided block can be further divided into a quad tree, binary tree, or triple tree. The method of dividing the current block into 4 square partitions is called quad tree partitioning, the method of dividing the current block into 2 irregular partitions is called binary tree partitioning, and the method of dividing the current block into 3 irregular partitions It is defined as binary tree partitioning.

수직 방향으로 바이너리 파티셔닝(그림 2의 SPLIT_BT_VER)을 수직 바이너리 트리 파티셔닝이라고 부르며, 수평 방향으로 바이너리 트리 파티셔닝 (그림 2의 SPLIT_BT_HOR)을 수평 바이너리 트리 파티셔닝이라고 정의 한다. Binary partitioning in the vertical direction (SPLIT_BT_VER in Figure 2 ) is called vertical binary tree partitioning, and binary tree partitioning in the horizontal direction (SPLIT_BT_HOR in Figure 2 ) is defined as horizontal binary tree partitioning.

수직 방향으로 트리플 파티셔닝 (그림 2의 SPLIT_TT_VER)을 수직 트리플 트리 파티셔닝이라고 부르며, 수평 방향으로 트리플 트리 파티셔닝 (그림 2의 SPLIT_TT_HOR)을 수평 트리플 트리 파티셔닝이라고 정의 한다. Triple-tree partitioning in the vertical direction (SPLIT_TT_VER in Figure 2 ) is called vertical triple-tree partitioning, and triple-tree partitioning in the horizontal direction (SPLIT_TT_HOR in Figure 2 ) is defined as horizontal triple-tree partitioning.

추가 분할 횟수를 파티셔닝 뎁스(partitioning depth)라고 부르며, 시퀀스 내지 픽쳐/타일 세트 별로 파티셔닝 뎁스가 최대치를 서로 다르게 설정할 수도 있으며, 파티셔닝 트리 형태(쿼드 트리/바이너리 트리/트리플 트리)에 따라 서로 다른 파티셔닝 뎁스를 가지도록 설정할 수 있으며, 이를 나타내는 신택스를 시그날링할 수도 있다. The number of additional divisions is called partitioning depth, and the maximum value of the partitioning depth for each sequence or picture/tile set can be set differently, and different partitioning depths according to the partitioning tree type (quad tree/binary tree/triple tree) It can be set to have, and a syntax indicating this can be signaled.

Figure pat00002
Figure pat00002

그림 2Picture 2

분할된 코딩 블록은 쿼드 파티셔닝, 바이너리 파니셔닝 또는 멀티 파티셔닝과 같은 방법으로 추가로 분할하여 코딩 유닛을 구성하거나 추가 분할 없이 코딩 유닛을 구성할 수도 있다.The divided coding block may be further divided by a method such as quad partitioning, binary partitioning, or multi-partitioning to configure a coding unit, or may configure a coding unit without further partitioning.

Figure pat00003
Figure pat00003

그림 3Figure 3

그림 3 과 같이 하나의 CTU를 계층적으로 코딩 유닛을 설정할 수 있으며, 바이너리 트리 파티셔닝, 쿼드 트리 파티셔닝/트리플 트리 파티셔닝을 이용하여 코딩 유닛을 중 적어도 어느 하나를 이용하여 코딩 유닛을 분할할 수 있다. 이와 같은 방법을 멀티 트리 파티셔닝(Multi tree partitioning)이라고 정의 한다. As shown in Figure 3 , a coding unit can be hierarchically configured for one CTU, and a coding unit can be partitioned using at least one of a coding unit using binary tree partitioning, quad tree partitioning/triple tree partitioning. This method is defined as multi tree partitioning.

파티셔닝 뎁스가 k인 임의의 코딩 유닛을 분할하여 생성된 코딩 유닛을 하위 코딩 유닛이라하며, 파티셔닝 뎁스는 k+1이 된다. 파티셔닝 뎁스 k+1인 하위 코딩 유닛을 포함하고 있는 파티셔닝 뎁스 k인 코딩 유닛을 상위 코딩 유닛이라 한다. A coding unit generated by dividing an arbitrary coding unit having a partitioning depth of k is referred to as a lower coding unit, and the partitioning depth is k+1. A coding unit having a partitioning depth k including a lower coding unit having a partitioning depth k+1 is referred to as an upper coding unit.

상위 코딩 유닛의 파티셔닝 타입 및/또는 현재 코딩 유닛의 주변에 있는 코딩 유닛의 파티셔닝 타입에 따라 현재 코딩 유닛의 파티셔닝 타입이 제한될 수도 있다. The partitioning type of the current coding unit may be limited according to the partitioning type of the upper coding unit and/or the partitioning type of the coding units surrounding the current coding unit.

여기서, 파티셔닝 타입은 바이너리 트리 파티셔닝, 쿼드 트리 파티셔닝/트리플 트리 파티셔닝 중 어느 파티셔닝을 사용했는지를 알려주는 지시자를 나타낸다. Here, the partitioning type represents an indicator indicating which partitioning is used among binary tree partitioning, quad tree partitioning/triple tree partitioning.

22 예측 영상 생성 방법How to generate predictive image

비디오 부호화에서 예측 영상은 복수 개의 방법으로 생성할 수 있으며, 예측 영상을 생성하는 방법을 예측 부호화 모드라고 한다. In video encoding, a prediction image can be generated by a plurality of methods, and a method of generating a prediction image is called a prediction encoding mode.

예측 부호화 모드는 인트라 예측 부호화 모드, 인터 예측 부호화 모드, 현재 픽쳐 레퍼런스 부호화 모드 또는 결합 부호화 모드 (combined prediction)등으로 구성될 수 있다. The prediction encoding mode may include an intra prediction encoding mode, an inter prediction encoding mode, a current picture reference encoding mode, or a combined prediction mode.

인터 예측 부호화 모드는 이전 픽쳐의 정보를 이용하여 현재 블록의 예측 블록(예측 영상)을 생성하는 예측 부호화 모드라고 하고, 인트라 예측 부호화 모드는 현재 블록과 이웃한 샘플을 이용하여 예측 블록을 생성하는 예측 부호화 모드라 한다. 현재 픽쳐의 이미 복원된 영상을 이용하여 예측 블록을 생성할 수도 있으며, 이를 현재 픽쳐 레퍼런스 모드 또는 인트라 블록 카피 모드라고 정의 한다. The inter prediction coding mode is a prediction coding mode that generates a prediction block (prediction image) of the current block using information of a previous picture, and the intra prediction coding mode is a prediction that generates a prediction block using samples adjacent to the current block. It is called an encoding mode. A prediction block may be generated using an image that has already been reconstructed of the current picture, and this is defined as a current picture reference mode or an intra block copy mode.

인터 예측 부호화 모드, 인트라 예측 부호화 모드 또는 현재 픽쳐 레퍼런스 부호화 모드 중 적어도 2개 이상의 예측 부호화 모드를 사용하여 예측 블록을 생성할 수도 있으며, 이를 결합 부호화 모드(Combined prediction)이라고 정의 한다. A prediction block may be generated using at least two or more of an inter prediction encoding mode, an intra prediction encoding mode, or a current picture reference encoding mode, which is referred to as a combined prediction mode.

2.12.1 인트라 예측 부호화 방법 Intra prediction coding method

인트라 예측은 그림 4와 같이 현재 블록 주변에 있는 이미 부호화된 경계 샘플을 인트라 예측을 생성하는데 사용하며, 이를 인트라 레퍼런스 샘플이라고 정의 한다. In intra prediction, as shown in Fig. 4 , an already coded boundary sample around the current block is used to generate intra prediction, and this is defined as an intra reference sample.

인트라 레퍼런스 샘플의 평균값을 예측 블록 전체 샘플의 값을 설정하거나 (DC 모드), 수평 방향 레퍼런스 가중 예측을 수행하여 생성한 수평 방향 예측 샘플과 수직 방향 레퍼런스 샘플을 가중 예측하여 생성한 수직 방향 예측 샘플을 생성한 후, 수평 방향 예측 샘플과 수직 방향 예측 샘플을 가중 예측하여 예측 샘플을 생성하거나(Planar 모드), 방향성 인트라 예측 모드등을 이용하여 인트라 예측을 수행할 수 있다. The average value of the intra reference samples is predicted by setting the value of all samples in the prediction block (DC mode), or the vertical direction prediction sample generated by weighted prediction of the horizontal direction prediction sample and the vertical direction reference sample generated by performing horizontal reference weighted prediction After generation, a prediction sample may be generated by weighted prediction of a horizontal direction prediction sample and a vertical direction prediction sample (Planar mode), or intra prediction may be performed using a directional intra prediction mode.

Figure pat00004
Figure pat00004

그림 4Figure 4

그림 5의 왼쪽 그림과 같이 33개의 방향을 사용(총 35개 인트라 예측 모드)하여 인트라 예측을 수행할 수 있고, 그림 5의 오른쪽 그림과 같이 65개의 방향을 사용(총 67개 인트라 예측 모드)할 수도 있다. 방향성 인트라 예측을 사용하는 경우에는 인트라 예측 모드의 방향성을 고려하여 인트라 레퍼런스 샘플(레퍼런스 참조 샘플)을 생성하고, 이로 부터 인트라 예측을 수행할 수 있다. As shown in the left figure of Figure 5 , intra prediction can be performed using 33 directions (a total of 35 intra prediction modes), and 65 directions (a total of 67 intra prediction modes) as shown in the right figure of Figure 5 May be. When directional intra prediction is used, an intra reference sample (reference reference sample) may be generated in consideration of the direction of the intra prediction mode, and intra prediction may be performed therefrom.

코딩 유닛의 좌측에 있는 인트라 레퍼런스 샘플을 좌측 인트라 레퍼런스 샘플이라하고, 코딩 유닛의 상측에 있는 인트라 레퍼런스 샘플을 상측 인트라 레퍼런스 샘플이라 한다. An intra reference sample on the left side of the coding unit is called a left intra reference sample, and an intra reference sample on the upper side of the coding unit is called an upper intra reference sample.

방향성 인트라 예측을 수행하는 경우에는 표 1과 같이 인트라 예측 모드에 따라 예측 방향(또는 예측 각도)을 나타내는 파라미터인 인트라 방향 파라미터 (intraPredAng)를 설정할 수 있다. 아래 표 3은 35개 인트라 예측 모드를 사용할 때 2 내지 34의 값을 가지는 방향성 인트라 예측 모드를 기반으로 하는 일예에 불과하다. 방향성 인트라 예측 모드의 예측 방향(또는 예측 각도)은 더 세분화되어 33개보다 많은 개수의 방향성 인트라 예측 모드가 이용될 수 있음은 물론이다. When directional intra prediction is performed, as shown in Table 1, an intra direction parameter (intraPredAng), which is a parameter indicating a prediction direction (or a prediction angle), may be set according to the intra prediction mode. Table 3 below is only an example based on a directional intra prediction mode having a value of 2 to 34 when 35 intra prediction modes are used. It goes without saying that the prediction directions (or prediction angles) of the directional intra prediction modes are further subdivided, so that more than 33 directional intra prediction modes can be used.

Figure pat00005
Figure pat00005

그림 5Picture 5

표 1Table 1

Figure pat00006
Figure pat00006

Figure pat00007
Figure pat00007

그림 6Figure 6

intraPredAng이 음수인 경우 (예를 들어, 인트라 예측 모드 인덱스가 11과 25 사이인 경우)에는 그림 6과 같이 현재 블록에 좌측 인트라 레퍼런스 샘플과 상측 인트라 레퍼런스 샘플을 인트라 예측 모드의 각도에 따라 1D로 구성된 일차원 레퍼런스 샘플 (Ref_1D)로 재구성할 수 있다. When intraPredAng is negative (for example, when the intra prediction mode index is between 11 and 25), as shown in Figure 6 , the left intra reference sample and the upper intra reference sample are configured in 1D according to the angle of the intra prediction mode. It can be reconstructed as a one-dimensional reference sample (Ref_1D).

Figure pat00008
Figure pat00008

그림 7Figure 7

인트라 예측 모드 인덱스가 11과 18 사이인 경우에는 그림 7과 같이 현재 블록의 상변 우측에 위치한 인트라 레퍼런스 샘플부터 좌변 하단에 위치한 인트라 레퍼런스 샘플까지 반 시계 방향으로 일차원 레퍼런스 샘플을 생성할 수 있다. When the intra prediction mode index is between 11 and 18, a one-dimensional reference sample can be generated in a counterclockwise direction from an intra reference sample located on the upper right side of the current block to an intra reference sample located on the lower left side as shown in Figure 7 .

그 외의 모드에서는 상변 인트라 레퍼런스 샘플 또는 좌변 인트라 레퍼런스 샘플만 이용하여 일차원 레퍼런스 샘플을 생성할 수 있다.In other modes, a one-dimensional reference sample may be generated using only the upper side intra reference sample or the left side intra reference sample.

Figure pat00009
Figure pat00009

그림 8Figure 8

인트라 예측 모드 인덱스가 19 와 25 사이인 경우에는 그림 8과 같이 현재 블록의 좌변 하단에 위치한 인트라 레퍼런스 샘플부터 상변 우측에 위치한 인트라 레퍼런스 샘플까지 시계 방향으로 일차원 레퍼런스 샘플을 생성할 수 있다. When the intra prediction mode index is between 19 and 25, a one-dimensional reference sample can be generated in a clockwise direction from an intra reference sample located at the lower left side of the current block to an intra reference sample located at the right side of the current block, as shown in Figure 8 .

참조 샘플 결정 인덱스 iIdx와 iIdx에 기초하여 결정되는 적어도 하나의 참조 샘플에 적용되는 가중치 관련 파라미터 ifact를 다음 식 (1) 내지 (2)와 같이 유도할 수 있다. iIdx와 ifact는 방향성 인트라 예측 모드의 기울기에 따라 가변적으로 결정되며, iIdx에 의해 특정되는 참조 샘플은 정수 펠(integer pel)에 해당할 수 있다.A weight-related parameter ifact applied to at least one reference sample determined based on the reference sample determination index iIdx and iIdx may be derived as in Equations (1) to (2) below. iIdx and i fact are variably determined according to the slope of the directional intra prediction mode, and a reference sample specified by iIdx may correspond to an integer pel.

iIdx = (y+1) * PiIdx = (y+1) * P angang /32 /32 (1)(One)

ii factfact = [ (y+1) * P = [(y+1) * P angang ] & 31] & 31 (2)(2)

예측 샘플 별로 적어도 하나 이상의 일차원 레퍼런스 샘플을 특정하여 예측 영상을 유도 할 수도 있다. 예를 들어, 방향성 인트라 예측 모드의 기울기 값을 고려하여 예측 샘플 생성에 사용할 수 있는 일차원 레퍼런스 샘플의 위치를 특정할 수 있다. 예측 샘플 별로 상이한 방향성 인트라 예측 모드를 가질 수도 있다. 하나의 예측 블록에 대해 복수의 인트라 예측 모드가 이용될 수도 있다. 복수의 인트라 예측 모드는 복수의 비방향성 인트라 예측 모드의 조합으로 표현될 수도 있고, 하나의 비방향성 인트라 예측 모드와 적어도 하나의 방향성 인트라 예측 모드의 조합으로 표현될 수도 있고, 또는 복수의 방향성 인트라 예측 모드의 조합으로 표현될 수도 있다. 하나의 예측 블록 내의 소정의 샘플 그룹 별로 상이한 인트라 예측 모드가 적용될 수 있다. 소정의 샘플 그룹은 적어도 하나의 샘플로 구성될 수 있다. 샘플 그룹의 개수는 현재 예측 블록의 크기/샘플 개수에 따라 가변적으로 결정될 수도 있고, 예측 블록의 크기/샘플 개수와는 독립적으로 부호화기/복호화기에 기-설정된 고정된 개수일 수도 있다. The prediction image may be derived by specifying at least one one-dimensional reference sample for each prediction sample. For example, a position of a one-dimensional reference sample that can be used to generate a prediction sample may be specified in consideration of a slope value of a directional intra prediction mode. Each prediction sample may have a different directional intra prediction mode. A plurality of intra prediction modes may be used for one prediction block. The plurality of intra prediction modes may be represented by a combination of a plurality of non-directional intra prediction modes, a combination of one non-directional intra prediction mode and at least one directional intra prediction mode, or a plurality of directional intra prediction modes. It can also be expressed as a combination of modes. A different intra prediction mode may be applied for each predetermined sample group in one prediction block. A predetermined sample group may consist of at least one sample. The number of sample groups may be variably determined according to the size/number of samples of the current prediction block, or may be a fixed number pre-set in the encoder/decoder independently of the size/number of samples of the prediction block.

구체적으로 예를 들어, 참조 샘플 결정 인덱스 iIdx를 이용하여 일차원 레퍼런스 샘플의 위치를 특정할 수 있다. Specifically, for example, the position of the one-dimensional reference sample may be specified using the reference sample determination index iIdx.

인트라 예측 모드의 기울기에 따라 하나의 일차원 레퍼런스 샘플만으로는 인트라 예측 모드의 기울기를 표현할 수 없을 때는 식 (3)와 같이 인접한 일차원 레퍼런스 샘플을 보간하여 제 1 예측 영상을 생성할 수 있다. 인트라 예측 모드의 기울기/각도에 따른 angular line이 정수 펠에 위치한 레퍼런스 샘플을 지나가지 않는 경우, 해당 angular line에 좌/우 또는 상/하에 인접한 레퍼런스 샘플을 보간하여 제1 예측 영상을 생성할 수 있다. 이때 이용되는 보간 필터의 필터 계수는 ifact에 기초하여 결정될 수 있다. 예를 들어, 보간 필터의 필터 계수는 angular line 상에 위치한 소수 펠과 상기 정수 펠에 위치한 레퍼런스 샘플 간의 거리에 기초하여 유도될 수 있다. When the slope of the intra prediction mode cannot be expressed using only one one-dimensional reference sample according to the slope of the intra prediction mode, a first prediction image may be generated by interpolating adjacent one-dimensional reference samples as shown in Equation (3). When the angular line according to the slope/angle of the intra prediction mode does not pass the reference sample located in the integer pel, the first prediction image may be generated by interpolating the reference sample adjacent to the left/right or above/below the corresponding angular line. . The filter coefficient of the interpolation filter used at this time may be determined based on i fact . For example, the filter coefficient of the interpolation filter may be derived based on a distance between a fractional pel located on an angular line and a reference sample located on the integer pel.

P(x,y) = ((32-iP(x,y) = ((32-i factfact )/32)* Ref_1D(x+iIdx+1) + (i)/32)* Ref_1D(x+iIdx+1) + (i factfact /32)* Ref_1D(x+iIdx+2)/32)* Ref_1D(x+iIdx+2) (3)(3)

하나의 일차원 레퍼런스 샘플만으로 인트라 예측 모드의 기울기를 표현할 수 있을 때 (ifact 값이 0 일때) 는 다음 식 (4)와 같이 제 1 예측 영상을 생성할 수 있다. When the slope of the intra prediction mode can be expressed with only one one-dimensional reference sample (when i fact is 0), the first prediction image can be generated as shown in Equation (4) below.

P(x,y) = Ref_1D(x+iIdx+1)P(x,y) = Ref_1D(x+iIdx+1) (4)(4)

2.22.2 와이드 앵글 인트라 예측 부호화 방법Wide-angle intra prediction coding method

방향성 인트라 예측 모드의 예측 각도는 그림 9와 같이 45 내지 -135 사이로 설정될 수 있다. The prediction angle of the directional intra prediction mode may be set between 45 and -135 as shown in Figure 9 .

Figure pat00010
Figure pat00010

그림 9Figure 9

비정방 형태 코딩 유닛에서 인트라 예측 모드를 수행하는 경우 기 정의된 예측 각도 때문에 현재 샘플과 가까운 인트라 레퍼런스 샘플 대신 현재 샘플과 거리가 먼 인트라 레퍼런스 샘플에서 현재 샘플을 예측하는 단점이 발생할 수 있다. When the intra prediction mode is performed in the amorphous coding unit, a disadvantage of predicting a current sample from an intra reference sample far from the current sample instead of an intra reference sample close to the current sample may occur due to a predefined prediction angle.

예를 들어, 그림 10의 왼쪽 그림과 같이 코딩 유닛의 너비가 코딩 유닛의 높이보다 큰 코딩 유닛(이하, 수평 방향 코딩 유닛)에서는 거리가 가까운 샘플 T 대신에 거리가 먼 L에서 인트라 예측을 수행할 수 있다. 또 다른 예를 들어, 그림 10의 오른쪽 그림과 같이 코딩 유닛의 높이가 코딩 유닛의 너비보다 큰 코딩 유닛(이하, 수직 방향 코딩 유닛)에서는 거리가 가까운 샘플 L 대신에 거리가 먼 샘플 T로 부터 인트라 예측을 수행할 수 있다. For example, as shown in the left figure of Figure 10 , in a coding unit whose width is larger than the height of the coding unit (hereinafter, a horizontal coding unit), intra prediction is performed at a far distance L instead of a close sample T. I can. As another example, as shown in the right figure of Figure 10, in a coding unit whose height is greater than the width of the coding unit (hereinafter, the vertical coding unit), the intra-distance sample T from the distant sample T is You can make predictions.

Figure pat00011
Figure pat00011

그림 10Figure 10

비정방 형태 코딩 유닛에서는 기 정의된 예측 각도보다 더 넓은 예측 각도에서 인트라 예측을 수행할 수도 있으며, 이를 와이드 앵글 인트라 예측 모드라고 정의 한다. In the amorphous coding unit, intra prediction may be performed at a prediction angle wider than a predefined prediction angle, and this is defined as a wide angle intra prediction mode.

와이드 앵글 인트라 예측 모드는

Figure pat00012
내지
Figure pat00013
의 예측 각도를 가질 수 있으며, 기존 인트라 예측 모드에서 사용된 각도를 벗어나는 예측 각도를 와이드 앵글 각도라고 정의 한다. The wide angle intra prediction mode
Figure pat00012
To
Figure pat00013
It can have a prediction angle of, and a prediction angle that deviates from the angle used in the existing intra prediction mode is defined as a wide angle angle.

그림 10의 좌측 그림에서 수평 방향 코딩 유닛에 있는 샘플 A는 와이드 앵글 인트라 예측 모드를 사용하여 인트라 레퍼런스 샘플 T로 부터 예측할 수 있다. In the left figure of Fig. 10 , sample A in the horizontal direction coding unit can be predicted from the intra reference sample T using the wide-angle intra prediction mode.

그림 10의 우측 그림에서 수직 방향 코딩 유닛에 있는 샘플 A는 와이드 앵글 인트라 예측 모드를 사용하여 인트라 레퍼런스 샘플 L로 부터 예측할 수 있다. In the right figure of Fig. 10 , sample A in the vertical direction coding unit can be predicted from the intra reference sample L using the wide-angle intra prediction mode.

기존 인트라 예측 모드 N개에 M개의 와이드 앵글 각도를 더해 N+M 개의 인트라 예측 모드가 정의될 수 있다. 구체적으로 예를 들어, 표 2와 같이 67개 인트라 모드에 28개 와이드 앵글 각도를 더해 총 95개 인트라 예측 모드가 정의될 수 있다. N+M intra prediction modes may be defined by adding M wide angle angles to N existing intra prediction modes. Specifically, as shown in Table 2, a total of 95 intra prediction modes may be defined by adding 28 wide angle angles to 67 intra modes.

현재 블록이 이용할 수 있는 인트라 예측 모드는 현재 블록의 형태에 따라 결정될 수 있다. 일 예로, 현재 블록의 크기, 종횡비(예컨대, 너비와 높이의 비율), 레퍼런스 라인 인덱스 중 적어도 하나에 기초하여, 95개의 방향성 인트라 예측 모드 중 65개의 방향성 인트라 예측 모드를 선택할 수 있다. The intra prediction mode that the current block can use may be determined according to the shape of the current block. For example, 65 directional intra prediction modes may be selected from among 95 directional intra prediction modes based on at least one of a size of a current block, an aspect ratio (eg, a ratio of width and height), and a reference line index.

표 2Table 2

Figure pat00014
Figure pat00014

표 2에 나타난 인트라 예측 모드 각도는, 현재 블록의 형태, 레퍼런스 라인 인덱스 중 적어도 하나에 기초하여 적응적으로 결정될 수 있다. 일 예로, Mode 15의 intraPredAngle은 현재 블록이 비정방형인 경우보다 현재 블록이 정방형인 경우에 더 큰 값을 갖도록 설정될 수 있다. 또는, Mode 75의 intraPredAngle은 인접 레퍼런스 라인이 선택된 경우보다 비인접 레퍼런스 라인이 선택된 경우 더 큰 값을 갖도록 설정될 수 있다.The intra prediction mode angle shown in Table 2 may be adaptively determined based on at least one of a shape of a current block and a reference line index. For example, the intraPredAngle of Mode 15 may be set to have a larger value when the current block is a square than when the current block is an amorphous. Alternatively, the intraPredAngle of Mode 75 may be set to have a larger value when a non-adjacent reference line is selected than when an adjacent reference line is selected.

와이드 앵글 인트라 예측 모드를 사용하는 경우 그림 11과 같이 상측 인트라 레퍼런스 샘플의 길이를 2W+1로 설정하고, 좌측 인트라 레퍼런스 샘플의 길이를 2H+1로 설정할 수 있다. When using the wide-angle intra prediction mode, the length of the upper intra reference sample can be set to 2W+1 and the length of the left intra reference sample can be set to 2H+1, as shown in Figure 11 .

Figure pat00015
Figure pat00015

그림 11Figure 11

와이드 앵글 인트라 예측을 사용하는 경우에 와이드 앵글 인트라 예측 모드의 인트라 예측 모드를 부호화 하는 경우에는 인트라 예측 모드의 개수가 많아져서 부호화 효율이 낮아 질수 있다. 와이드 앵글 인트라 예측 모드는 와이드 앵글 인트라에서 사용되지 않는 기존 인트라 예측 모드로 대체하여 부호화 할 수 있으며, 대체되는 예측 모드를 와이드 앵글 대체 모드라고 한다. 와이드 앵글 대체 모드는 와이드 앵글 인트라 예측 모드와 반대 방향인 인트라 예측 모드일 수 있다.In the case of using wide-angle intra prediction, when the intra prediction mode of the wide-angle intra prediction mode is encoded, the number of intra prediction modes increases, and thus encoding efficiency may be lowered. The wide-angle intra prediction mode can be encoded by replacing the existing intra prediction mode that is not used in the wide-angle intra prediction mode, and the replaced prediction mode is called a wide-angle replacement mode. The wide angle replacement mode may be an intra prediction mode in a direction opposite to the wide angle intra prediction mode.

구체적으로 예를 들어, 그림 12와 같이 35개 인트라 예측을 사용하는 경우 와이드 앵글 인트라 예측 모드 35는 와이드 앵글 대체 모드인 인트라 예측 모드 2로 부호화할 수 있고, 와이드 앵글 인트라 예측 모드 36은 와이드 앵글 대체 모드인 인트라 예측 모드 3으로 부호화 할 수 있다. Specifically, for example, when 35 intra predictions are used as shown in Figure 12 , wide-angle intra prediction mode 35 can be encoded using intra prediction mode 2, which is a wide-angle replacement mode, and wide-angle intra prediction mode 36 is used for wide-angle replacement. It can be encoded in intra prediction mode 3, which is a mode.

Figure pat00016
Figure pat00016

그림 12Figure 12

코딩 블록의 형태 또는 코딩 블록 높이대 너비의 비에 따라 대체하는 모드와 개수를 다르게 설정할 수 있다. 구체적으로 예를 들어, 표 3은 코딩 블록의 너비와 높이의 비에 따라 사용되는 인트라 예측 모드를 나타낸다. The replacement mode and number may be differently set according to the shape of the coding block or the ratio of the height to the width of the coding block. Specifically, for example, Table 3 shows intra prediction modes used according to the ratio of the width and height of a coding block.

3 Table 3

Figure pat00017
Figure pat00017

2.32.3 멀티 라인 인트라 예측 부호화 방법 Multi-line intra prediction coding method

다음 그림 13과 같이 복수 개의 인트라 레퍼런스 라인에서 인트라 예측을 수행할 수도 있으며, 이를 멀티 라인 인트라 예측 부호화 방법이라고 한다.

Figure pat00018
As shown in Figure 13 below, intra prediction may be performed on a plurality of intra reference lines, which is called a multi-line intra prediction coding method.
Figure pat00018

그림 13Fig. 13

인접한 인트라 페러런스 라인과 비인접 인트라 레퍼런스 라인으로 구성된 복수개의 인트라 레퍼런스 라인 중 어느 하나를 선택해서 인트라 예측을 수행할 수 있으며, 이를 복수 라인 인트라 예측 방법이라고 한다. 비인접 인트라 레퍼런스 라인은 제 1 비인접 인트라 레퍼런스 라인(비인접 레퍼런스 라인 인덱스 1), 제 2 비인접 인트라 레퍼런스 라인(비인접 레퍼런스 라인 인덱스 2), 제 3 비인접 인트라 레퍼런스 라인(비인접 레퍼런스 라인 인덱스 3)으로 구성할 수 있다. 비인접 인트라 레퍼런스 라인 중 일부만 사용할 수도 있다. 일 예로, 제 1 비인접 인트라 레퍼런스 라인 과 제 2 비인접 인트라 레퍼런스 라인만 사용할 수도 있고, 제 1비인접 인트라 레퍼런스 라인과 제 3 비인접 인트라 레퍼런스 라인만 사용할 수도 있다. Intra prediction may be performed by selecting any one of a plurality of intra reference lines composed of an adjacent intra parallel line and a non-adjacent intra reference line, and this is called a multi-line intra prediction method. The non-adjacent intra reference line is a first non-adjacent intra reference line (non-adjacent reference line index 1), a second non-adjacent intra reference line (non-adjacent reference line index 2), and a third non-adjacent intra reference line (non-adjacent reference line). It can be composed of index 3). Only some of the non-adjacent intra reference lines may be used. For example, only a first non-adjacent intra reference line and a second non-adjacent intra reference line may be used, or only a first non-adjacent intra reference line and a third non-adjacent intra reference line may be used.

인트라 예측에 사용된 레퍼런스 라인을 특정하는 신택스인 인트라 레퍼런스 라인 인덱스(intra_luma_ref_idx)를 코딩 유닛 단위로 시그날링 할 수 있다. An intra reference line index (intra_luma_ref_idx), a syntax specifying a reference line used for intra prediction, may be signaled in units of coding units.

구체적으로 인접 인트라 레퍼런스 라인, 제 1 비인접 인트라 레퍼런스 라인, 제 3 비인접 인트라 레퍼런스 라인을 사용하는 경우에 다음 표 4와 같이 intra_luma_ref_idx를 정의할 수도 있다. Specifically, when using the adjacent intra reference line, the first non-adjacent intra reference line, and the third non-adjacent intra reference line, intra_luma_ref_idx may be defined as shown in Table 4 below.

표 4Table 4

Figure pat00019
Figure pat00019

비인접 인트라 레퍼런스 라인을 사용하는 경우에는 비방향성 인트라 예측 모들를 사용하지 않도록 설정할 수도 있다. 즉, 비인접 인트라 레퍼런스 라인을 사용하는 경우에는 DC 모드 내지 플래너 모드 (Planar mode)를 사용하지 않도록 제한 할 수도 있다. When a non-adjacent intra reference line is used, it may be set not to use a non-directional intra prediction mode. That is, when a non-adjacent intra reference line is used, it may be limited not to use the DC mode or the planar mode.

비인접 인트라 레퍼런스 라인에 속한 샘플의 개수는 인접 인트라 페러런스 라인의 샘플 개수보다 크게 설정할 수 있다. 또한 제 i 비인접 인트라 레퍼런스 라인의 샘플 개수보다 제 i+1 비인접 인트라 레퍼런스 라인의 샘플 개수가 더 많게 설정할 수도 있다. 제 i 비인접 인트라 레퍼런스 라인의 상측 샘플 개수와 제 i-1 비인접 인트라 레퍼런스 라인의 상측 샘플 개수 차이는 레퍼런스 샘플 개수 오프셋 offsetX[i]로 나타낼 수 있다. The number of samples belonging to the non-adjacent intra reference line may be set to be larger than the number of samples of the adjacent intra parallel line. Also, the number of samples of the i+1th non-adjacent intra reference line may be set to be greater than the number of samples of the ith non-adjacent intra reference line. The difference between the number of upper samples of the i-th non-adjacent intra reference line and the number of upper samples of the i-1th non-adjacent intra reference line may be expressed as a reference sample number offset offsetX[i].

offsetX[1]은 제 1 비인접 인트라 레퍼런스 라인의 상측 샘플 개수와 인접 인트라 레퍼런스 라인의 상측 샘플 개수의 차분 값을 나타낸다. 제 i 비인접 인트라 레퍼런스 라인의 좌측샘플 개수와 제 i-1 비인접 인트라 레퍼런스 라인의 좌측 샘플 개수 차이는 레퍼런스 샘플 개수 오프셋 offsetY[i]로 나타낼 수 있다. offsetY[1]은 제 1 비인접 인트라 레퍼런스 라인의 좌측 샘플 개수와 인접 인트라 레퍼런스 라인의 좌측 샘플 개수의 차분 값을 나타낸다.offsetX[1] represents a difference value between the number of upper samples of the first non-adjacent intra reference line and the number of upper samples of the adjacent intra reference line. The difference between the number of left samples of the i-th non-adjacent intra reference line and the number of left samples of the i-1th non-adjacent intra reference line may be expressed as a reference sample number offset offsetY[i]. OffsetY[1] represents a difference between the number of left samples of the first non-adjacent intra reference line and the number of left samples of the adjacent intra reference line.

인트라 레퍼런스 라인 인덱스가 i인 비인접 인트라 레퍼런스 라인은 상측 비인접 레퍼런스 라인 refW + offsetX[i] 와 좌측 비인접 레퍼런스 라인 refH+ offsetY[i] 그리고 좌상단 샘플로 구성될 수 있으며, 비인접 인트라 레퍼런스 라인에 속한 샘플의 개수는 refW + refH + offsetX[i] + offsetY[i] +1 로 구성될 수 있다. A non-adjacent intra reference line with an intra reference line index of i may be composed of an upper non-adjacent reference line refW + offsetX[i], a left non-adjacent reference line refH+ offsetY[i], and an upper left sample. The non-adjacent intra reference line The number of included samples may consist of refW + refH + offsetX[i] + offsetY[i] +1.

refW =2* nTbWrefW =2* nTbW (5)(5)

refH =2* *nTbHrefH =2* *nTbH (6)(6)

식 (5) 내지 (6)에서 nTbW는 코딩 유닛의 너비를 나타내고, nTbH는 코딩 유닛의 높이를 나타내며, whRatio는 다음 식 (7)과 같이 정의 할 수 있다. In equations (5) to (6), nTbW represents the width of the coding unit, nTbH represents the height of the coding unit, and whRatio can be defined as in the following equation (7).

whRatio = Min(log2(nTbW/nTbH),2)whRatio = Min(log2(nTbW/nTbH),2) (7)(7)

멀티 라인 인트라 예측 부호화 방법에서는 비인접 인트라 레퍼런스 라인을 사용하는 경우에는 와이드 앵글 인트라 모드는 사용하지 않도록 설정할 수도 있다. 또는 현재 코딩 유닛의 MPM 모드가 와이드 앵글 인트라 모드이면 멀티 라인 인트라 예측 부호화 방법을 사용하지 않도록 설정할 수도 있다. In the multi-line intra prediction coding method, when a non-adjacent intra reference line is used, the wide-angle intra mode may be set not to be used. Alternatively, if the MPM mode of the current coding unit is a wide-angle intra mode, the multi-line intra prediction coding method may be set not to be used.

이 경우 인트라 레퍼런스 라인 인덱스가 i인 비인접 인트라 레퍼런스 라인은 상측 비인접 레퍼런스 라인 W + H + offsetX[i] 와 좌측 비인접 레퍼런스 라인 H + W + offsetY[i] 그리고 좌상단 샘플로 구성될 수 있으며, 비인접 인트라 레퍼런스 라인에 속한 샘플의 개수는 2W + 2H + offsetX[i] + offsetY[i] +1 로 구성될 수 있으며, whRatio 값에 따라서 offsetX[i]와 offsetY[i] 값이 달라질 수 있다. In this case, a non-adjacent intra reference line with an intra reference line index of i may consist of an upper non-adjacent reference line W + H + offsetX[i], a left non-adjacent reference line H + W + offsetY[i], and an upper left sample. , The number of samples belonging to the non-adjacent intra reference line may be composed of 2W + 2H + offsetX[i] + offsetY[i] +1, and the values of offsetX[i] and offsetY[i] may vary depending on the whRatio value. have.

예를 들어, whRatio 값이 1 보다 큰 경우에는 offsetX[i] 값을 1, offsetY[i] 값을 0 으로 설정할 수 있고, whRatio 값이 1 보다 작은 경우에는 offsetX[i] 값을 0, offsetY[i] 값을 1로 설정할 수도 있다. For example, if the whRatio value is greater than 1, the offsetX[i] value can be set to 1 and the offsetY[i] value can be set to 0. If the whRatio value is less than 1, the offsetX[i] value can be set to 0, offsetY[ i] You can also set the value to 1.

2.42.4 서브 파티션 인트라 예측 부호화 및 복호화 방법 Sub-partition intra prediction coding and decoding method

Figure pat00020
Figure pat00020

그림 14Figure 14

그림 14와 같이 코딩 유닛 단위로 인트라 예측을 수행하고, 코딩 유닛을 서브 블록 단위로 파티션 한 후에, 각각 변환 및 양자화를 수행할 수 있으며, 이를 서브 파티션 인트라 부호화 방법이라 한다. As shown in Fig. 14, after intra prediction is performed in units of coding units, and after partitioning the coding units in units of sub-blocks, transformation and quantization may be performed, respectively, and this is called a sub-partition intra coding method.

서브 파티션 인트라 부호화 방법에서, 코딩 유닛 내 모든 서브 블록들은 동일한 인트라 예측 모드를 사용하도록 제한될 수 있다. In the sub-partition intra coding method, all sub-blocks in the coding unit may be restricted to use the same intra prediction mode.

또는, 서브 파티션 인트라 부호화 방법에서, 코딩 유닛 내 서브 블록들 중 적어도 하나의 인트라 예측 모드는 다른 서브 블록과 상이할 수 있다. 일 예로, n번째 서브 블록의 인트라 예측모드는 n-1번째 서브 블록의 인트라 예측 모드에서 오프셋을 가산/감산하여 유도될 수 있다. 오프셋은 부호화기/복호화기에서 기 정의되어 있을 수도 있고, 코딩 유닛의 형태, 크기, 인트라 예측 모드, 서브 파티션의 형태, 크기에 따라 유도될 수도 있다. 또는, 오프셋을 결정하기 위한 정보가 비트스트림을 통해 시그날링될 수도 있다.Alternatively, in the sub-partition intra coding method, at least one intra prediction mode among sub-blocks in the coding unit may be different from other sub-blocks. For example, the intra prediction mode of the nth subblock may be derived by adding/subtracting an offset in the intra prediction mode of the n-1th subblock. The offset may be predefined in the encoder/decoder, or may be derived according to the shape and size of the coding unit, the intra prediction mode, and the shape and size of the sub-partition. Alternatively, information for determining the offset may be signaled through a bitstream.

또는, 복수의 서브 블록 중 일부는 방향성 인트라 예측 모드를 사용하고, 나머지는 비방향성 예측 모드를 사용할 수 있다. 이때, 제1 서브 블록의 방향성 예측 모드가 기 정의된 인트라 예측 모드인 경우에 한하여, 제2 서브 블록에서 비방향성 예측 모드가 사용될 수 있다.Alternatively, some of the plurality of sub-blocks may use a directional intra prediction mode, and others may use a non-directional prediction mode. In this case, only when the directional prediction mode of the first sub-block is a predefined intra prediction mode, the non-directional prediction mode may be used in the second sub-block.

또는, 서브 파티션 인트라 부호화 방법에서, 코딩 유닛 내 서브 블록들의 인트라 예측 모드는 기 정의된 후보들 중에서 선택될 수 있다. 여기서, 기 정의된 후보는 수평 방향 인트라 예측 모드, 수직 방향 인트라 예측 모드, 대각 방향 인트라 예측 모드(예컨대, 좌상단, 우상단, 좌하단 인트라 예측 모드), 비방향성 예측 모드 중 적어도 하나를 포함할 수 있다. Alternatively, in the sub-partition intra coding method, an intra prediction mode of sub-blocks in a coding unit may be selected from predefined candidates. Here, the predefined candidate may include at least one of a horizontal intra prediction mode, a vertical intra prediction mode, a diagonal intra prediction mode (eg, an upper left, an upper right, and a lower left intra prediction mode), and a non-directional prediction mode. .

또는, 서브 파티션 인트라 부호화 방법에서, 코딩 유닛 내 서브 블록들의 인트라 예측 모드는 MPM 후보들에서만 유도될 수 있다.Alternatively, in the sub-partition intra coding method, the intra prediction mode of sub-blocks in the coding unit may be derived only from MPM candidates.

또는, 코딩 유닛의 인트라 예측 모드에 따라, 서브 파티션 인트라 부호화 방법의 사용이 제한될 수 있다. 예컨대, 코딩 유닛의 인트라 예측 모드가 비방향성 예측 모드(예컨대, Planar 또는 DC)인 경우, 또는, 기 정의된 방향성 예측 모드(예컨대, 수평, 수직 또는 대각 방향)인 경우 서브 파티션 인트라 부호화 방법이 사용되지 않도록 설정될 수 있다. 또는, 코딩 유닛의 인트라 예측 모드가, 이웃하는 서브 파티션을 참조 샘플로서 활용할 수 없는 인트라 예측 모드인 경우(예컨대, 대각 방향 또는 와이드 앵글 인트라 예측 모드), 서브 파티션 인트라 부호화 방법이 사용되지 않도록 설정될 수 있다.Alternatively, the use of the sub-partition intra coding method may be restricted according to the intra prediction mode of the coding unit. For example, when the intra prediction mode of the coding unit is a non-directional prediction mode (eg, Planar or DC), or when a predefined directional prediction mode (eg, horizontal, vertical or diagonal direction), the sub-partition intra coding method is used. Can be set not to be. Alternatively, when the intra prediction mode of the coding unit is an intra prediction mode in which a neighboring sub-partition cannot be utilized as a reference sample (eg, a diagonal direction or a wide-angle intra prediction mode), the sub-partition intra coding method may be set not to be used. I can.

또는, 코딩 유닛의 크기 또는 형태에 따라, 서브 파티션 인트라 부호화 방법의 사용이 제한될 수 있다. 예컨대, 코딩 유닛의 높이-너비비가 문턱값 이상인 경우 또는 현재 블록의 너비 또는 높이 중 적어도 하나가 문턱값 이하인 경우, 서브 파티션 인트라 부호화 방법이 사용되지 않도록 설정될 수 있다.Alternatively, the use of the sub-partition intra coding method may be limited according to the size or shape of the coding unit. For example, when the height-width ratio of the coding unit is greater than or equal to the threshold value, or when at least one of the width or height of the current block is less than or equal to the threshold value, the sub-partition intra encoding method may be set not to be used.

각 서브 블록 단위로 서로 다른 양자화 파라미터 값을 사용할 수도 있으며, 이전 서브 블록의 양자화 파라미터 값과 현재 서브 블록의 양자화 파라미터 값의 차분을 부호화 할 수도 있다. Different quantization parameter values may be used for each subblock, and a difference between a quantization parameter value of a previous subblock and a quantization parameter value of a current subblock may be encoded.

인트라 서브 파티션 형태는 수직 방향 파티션 내지 수평 방향 파티션으로 나눌 수 있다. 수직 방향 파티션은 적어도 하나의 수직선을 이용하여 코딩 블록을 분할함으로써 생성되고, 수평 방향 파티션은 적어도 하나의 수평선을 이용하여 코딩 블록을 분할함으로써 생성될 수 있다.The intra sub-partition can be divided into a vertical partition or a horizontal partition. The vertical partition is generated by dividing the coding block using at least one vertical line, and the horizontal partition may be generated by dividing the coding block using at least one horizontal line.

파티션의 개수는 코딩 유닛의 크기/형태에 따라 결정될 수 있다. 일 예로, 4x4 코딩 유닛에서는 서브 파티션을 나누지 않고, 8x4 내지 4x8 코딩 유닛에서는 2개의 서브 파티션으로 나눌 수 있으며, 그 외의 코딩 유닛에서는 4개의 파티션으로 나눌수 있다. The number of partitions may be determined according to the size/type of the coding unit. For example, in a 4x4 coding unit, a sub-partition is not divided, in an 8x4 to 4x8 coding unit, it can be divided into two sub-partitions, and in other coding units, it can be divided into four partitions.

또는, 파티션의 개수, 크기 또는 형태를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 시그날링되는 정보에 의해 결정되는 파티션의 개수에 따라, 파티션의 크기 또는 형태가 결정되거나, 시그날링되는 정보에 의해 결정되는 파티션의 크기/형태에 따라, 파티션의 개수가 결정될 수 있다.Alternatively, information indicating the number, size, or shape of partitions may be signaled through a bitstream. The size or shape of the partition may be determined according to the number of partitions determined by signaled information, or the number of partitions may be determined according to the size/type of the partition determined by signaled information.

그림 15와 같이 코딩 유닛을 수직 방향 파티션 내지 수평 방향 파티션으로 나눌 수 있다. 수직 방향 파티션으로 나눌지 수평 방향 파티션으로 나눌지를 나타내는 인트라 파티션 타입 플래그 (intra_subpart_type_flag)을 비트스트림을 통해 전송할 수 있다. intra_subPart_type_flag 값이 1이면 수평 방향 파티션으로 나누어 서브 파티션을 구성할 수 있음을 나타내고, intra_subPart_type_flag 값이 0이면 수직 방향 파티션으로 나누어 서브 파티션을 구성할 수 있음을 나타낸다. As shown in Figure 15, the coding unit can be divided into a vertical partition or a horizontal partition. An intra partition type flag (intra_subpart_type_flag) indicating whether to divide into a vertical partition or a horizontal partition may be transmitted through a bitstream. If the intra_subPart_type_flag value is 1, it indicates that a sub-partition can be configured by dividing into horizontal partitions, and if the intra_subPart_type_flag value is 0, it indicates that a sub-partition can be configured by dividing into vertical partitions.

또는, 코딩 유닛의 크기/형태에 기초하여, 인트라 서브 파티션의 형태를유도할 수 있다. 예컨대, 코딩 유닛의 형태비 (whRatio)를 이용하여 인트라 서브 파티션 형태를 비트스트림에 신택스를 시그날링하지 않고 유도할 수도 있다. Alternatively, based on the size/shape of the coding unit, the shape of the intra sub-partition may be derived. For example, it is possible to derive the intra sub-partition type without signaling syntax in the bitstream by using the shape ratio (whRatio) of the coding unit.

예를 들어, whRatio가 특정 값 N (이하, 양의 서브 파티션 임계값)보다 작거나 같은 경우에는 수직 방향 파티션을 사용하고, whRatio가 특정 값 -N(이하, 음의 서브 파티션 임계값) 보다 작거나 같은 경우에는 수평 방향 파티션을 사용할 수 있다. 일 예로, 서브 파티션 임계 값은 1 내지 2 내지 3과 같은 기 정의된 값으로 설정할 수도 있고, 시퀀스 단위로 정의된 값으로 설정할 수도 있다. For example, if whRatio is less than or equal to a specific value N (hereinafter, a positive sub-partition threshold), a vertical partition is used, and whRatio is less than a specific value -N (hereinafter, a negative sub-partition threshold). In the case of or, you can use horizontal partitions. For example, the sub-partition threshold may be set to a predefined value such as 1 to 2 to 3, or a value defined in units of a sequence.

또는, 코딩 유닛의 인트라 예측 모드에 따라, 인트라 서브 파티션의 형태를 결정할 수 있다. 일 예로, 코딩 유닛의 인트라 예측 모드가 수평 방향인 경우, 수직 파티셔닝(또는, 수평 파티셔닝)을 적용하고, 코딩 유닛의 인트라 예측 모드가 수직 방향인 경우, 수평 파티셔닝(또는, 수직 파티셔닝)을 적용할 수 있다.Alternatively, the type of the intra sub-partition may be determined according to the intra prediction mode of the coding unit. For example, when the intra prediction mode of the coding unit is in the horizontal direction, vertical partitioning (or horizontal partitioning) is applied, and when the intra prediction mode of the coding unit is in the vertical direction, horizontal partitioning (or vertical partitioning) is applied. I can.

Figure pat00021
Figure pat00021

그림 15Figure 15

또는 서브 파티션의 너비 또는 높이 중 어느 하나의 값이 기 정의된 값보다 작아지지 않도록 제한할 수도 있다. 기 정의된 값은, 2, 4, 8 등일 수 있다. 예를 들어, 기 정의된 값이 4인 경우, 그림 15의 상측 그림과 같이 4x8 형태의 코딩 유닛은 서브 파티션 타입을 시그날링하지 않고, 수직 파티셔닝을 사용하도록 제한할 수도 있다. 또 다른 예를 들어, 그림 15의 하측 그림과 같이 8x4 형태의 코딩 유닛은 서브 파티션 타입을 시그날링하지 않고, 수평 파티셔닝을 사용하도록 제한할 수도 있다. Alternatively, any one of the width or height of the sub-partition may be limited so as not to be smaller than a predefined value. The predefined values may be 2, 4, 8, and the like. For example, if the predefined value is 4, as shown in the upper figure of Fig. 15, the 4x8 coding unit may limit the use of vertical partitioning without signaling the sub-partition type. As another example, as shown in the lower figure of Fig. 15, the 8x4 type coding unit may limit the use of horizontal partitioning without signaling the sub-partition type.

Figure pat00022
Figure pat00022

그림 16Fig 16

구체적으로 예를 들어, 양의 서브 파티션 임계값이 2인 경우 그림 16의 상측 그림과 같이 whRatio가 1인 코딩 유닛은 수평 방향 파티션을 이용하여 코딩 유닛을 분할할 수 있고, 그림 16의 하측 그림과 같이 whRatio가 2인 코딩 유닛은 수직 방향 파티션을 이용하여 코딩 유닛을 분할할 수 있다. Specifically, for example, if the positive sub-partition threshold is 2, as shown in the upper figure of Figure 16, the coding unit with whRatio of 1 can divide the coding unit using a horizontal partition, and the lower figure of Figure 16 Likewise, the coding unit having whRatio of 2 may divide the coding unit using a vertical partition.

Figure pat00023
Figure pat00023

그림 17Figure 17

또 다른 예를 들어, 음의 서브 파티션 임계값이 2인 경우 그림 17의 좌측 그림과 같이 whRatio가 -1인 코딩 유닛은 수직 방향 파티션을 이용하여 코딩 유닛을 분할할 수 있고, 그림 17의 우측 그림과 같이 whRatio가 -2인 코딩 유닛은 수평 방향 파티션을 이용하여 코딩 유닛을 분할할 수 있다.For another example, if the negative sub-partition threshold is 2, as shown in the left figure of Figure 17, the coding unit with whRatio of -1 can divide the coding unit using a vertical partition, and the right figure of Figure 17 As described above, a coding unit having a whRatio of -2 may divide the coding unit using a horizontal partition.

서브 파티션의 인트라 예측은, 서브 파티션에 이웃하는 이웃 샘플로부터 유도된 참조 샘플을 기초로 수행될 수 있다. 일 예로, 제2 서브 파티션의 인트라 예측은, 제2 서브 파티션의 상단 또는 좌측에 이웃하는 제1 서브 파티션에 포함된 참조 샘플을 이용하여 수행될 수 있다. 여기서, 참조 샘플은, 제1 서브 파티션의 복원 샘플로부터 유도될 수 있다. 이에 따라, 서브 파티션 간에는 병렬 인트라 예측이 적용되지 않을 수 있다. 즉, 제1 서브 파티션의 부호화/복호화가 완료된 이후, 제2 서브 파티션에 대한 인트라 예측이 수행될 수 있다.Intra prediction of the sub-partition may be performed based on a reference sample derived from a neighboring sample neighboring the sub-partition. For example, intra prediction of the second sub-partition may be performed using a reference sample included in a first sub-partition adjacent to the top or left of the second sub-partition. Here, the reference sample may be derived from a reconstructed sample of the first sub-partition. Accordingly, parallel intra prediction may not be applied between sub-partitions. That is, after encoding/decoding of the first sub-partition is completed, intra prediction for the second sub-partition may be performed.

서브 파티션 인트라 부호화 방법에서 PDPC를 사용하지 않도록 제한할 수도 있다. 또는 서브 파티션 인트라 부호화 방법을 사용하는 경우, 일부 서브 블록에서만 PDPC를 적용할 수도 있다. 일 예로, 코딩 유닛의 상측 바운더리 또는 좌측 바운더리에 접한 서브 블록에서만 PDPC를 적용하거나, 하측 바운더리 또는 우측 바운더리에 접한 서브 블록에서만 PDPC를 적용할 수도 있다. In the sub-partition intra coding method, it may be restricted not to use the PDPC. Alternatively, when the sub-partition intra coding method is used, PDPC may be applied only to some sub-blocks. As an example, the PDPC may be applied only to the sub-blocks in contact with the upper boundary or the left boundary of the coding unit, or the PDPC may be applied only to the sub-blocks in contact with the lower boundary or the right boundary.

2.62.6 Matrix 기반 인트라 예측 부호화 방법 Matrix-based intra prediction coding method

Figure pat00024
Figure pat00024

그림 18Fig. 18

Figure pat00025
Figure pat00025

그림 19Figure 19

Figure pat00026
Figure pat00026

그림 20Figure 20

Figure pat00027
Figure pat00027

그림 21Fig. 21

그림 18 내지 그림 21과 같이 현재 코딩 블록에 인접한 주변 샘플들을 다운 샘플링하여 상측 바운더리 스무딩 샘플 bdryRed top 및 좌측 바운더리 스무딩 샘플 bdryRed Left를 생성할 수 있다. 상측 바운더리 스무딩 샘플은 N개의 상측 이웃 샘플들을 averaging 하여 생성되고, 좌측 바운더리 스무딩 샘플은 N개의 좌측 이웃 샘플들을 averaging 하여 생성될 수 있다. 상측 바운더리 스무딩 샘플과 좌측 바운더리 스무딩 샘플을 바운더리 스무딩 샘플 bdryRed이라 정의할 수 있다. As shown in Figs. 18 to 21, an upper boundary smoothing sample bdry red top and a left boundary smoothing sample bdry red left can be generated by down-sampling neighboring samples adjacent to the current coding block. The upper boundary smoothing sample may be generated by averaging the N upper neighboring samples, and the left boundary smoothing sample may be generated by averaging the N left neighboring samples. The upper boundary smoothing sample and the left boundary smoothing sample can be defined as the boundary smoothing sample bdry red .

샘플링 레이트(즉, N의 값)은 현재 코딩 블록의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나를 기초로 결정될 수 있다. 상측 바운더리 스무딩 샘플에 대한 샘플링 레이트는 코딩 블록의 너비를 기초로 결정되고, 좌측 바운더리 스무딩 샘플에 대한 샘플링 레이트는 코딩 블록의 높이를 기초로 결정될 수 있다. The sampling rate (ie, the value of N) may be determined based on at least one of the size, shape, or intra prediction mode of the current coding block. The sampling rate for the upper boundary smoothing sample may be determined based on the width of the coding block, and the sampling rate for the left boundary smoothing sample may be determined based on the height of the coding block.

일 예로, 코딩 블록의 너비 또는 높이에 따라, 스무딩을 수행하는 이웃 샘플의 개수가 상이할 수 있다. 코딩 블록의 너비 또는 높이가 4인 경우, 이웃하는 2개의 샘플들을 스무딩하여 바운더리 스무딩 샘플 bdryRed을 생성할 수 있다. 또 다른 예로, 코딩 블록의 너비 또는 높이가 16인 경우, 이웃하는 4개의 샘플들을 스무딩하여 바운더리 스무딩 샘플 bdryRed을 생성할 수 있다. For example, according to the width or height of the coding block, the number of neighboring samples to be smoothed may be different. When the width or height of the coding block is 4, a boundary smoothing sample bdry Red may be generated by smoothing two neighboring samples. As another example, when the width or height of the coding block is 16, the boundary smoothing sample bdry Red may be generated by smoothing four neighboring samples.

코딩 블록이 너비가 높이보다 큰 비정방형인 경우, 좌측 이웃 샘플들의 다운 샘플링 레이트는 상측 이웃 샘플들의 다운 샘플링 레이트보다 작을 수 있다. 반대로, 코딩 블록이 높이가 너비보다 큰 비정방형인 경우, 상측측 이웃 샘플들의 다운 샘플링 레이트는 좌측 이웃 샘플들의 다운 샘플링 레이트보다 작을 수 있다.When the coding block is amorphous in which the width is greater than the height, the downsampling rate of left neighboring samples may be smaller than the downsampling rate of upper neighboring samples. Conversely, when the coding block is amorphous whose height is greater than the width, a downsampling rate of upper neighboring samples may be smaller than a downsampling rate of left neighboring samples.

그림 18 내지 그림 21과 같이 현재 코딩 블록에 인접한 주변 샘플들을 다운 샘플링하여 상측 바운더리 스무딩 샘플 bdryRed top 및 좌측 바운더리 스무딩 샘플 bdryRed Left를 생성할 수 있다. 상측 바운더리 스무딩 샘플은 N개의 상측 이웃 샘플들을 averaging 하여 생성되고, 좌측 바운더리 스무딩 샘플은 N개의 좌측 이웃 샘플들을 averaging 하여 생성될 수 있다. 상측 바운더리 스무딩 샘플과 좌측 바운더리 스무딩 샘플을 바운더리 스무딩 샘플 bdryRed이라 정의할 수 있다. As shown in Figs. 18 to 21, an upper boundary smoothing sample bdry red top and a left boundary smoothing sample bdry red left can be generated by down-sampling neighboring samples adjacent to the current coding block. The upper boundary smoothing sample may be generated by averaging the N upper neighboring samples, and the left boundary smoothing sample may be generated by averaging the N left neighboring samples. The upper boundary smoothing sample and the left boundary smoothing sample can be defined as the boundary smoothing sample bdry red .

샘플링 레이트(즉, N의 값)은 현재 코딩 블록의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나를 기초로 결정될 수 있다. 상측 바운더리 스무딩 샘플에 대한 샘플링 레이트는 코딩 블록의 너비를 기초로 결정되고, 좌측 바운더리 스무딩 샘플에 대한 샘플링 레이트는 코딩 블록의 높이를 기초로 결정될 수 있다. The sampling rate (ie, the value of N) may be determined based on at least one of the size, shape, or intra prediction mode of the current coding block. The sampling rate for the upper boundary smoothing sample may be determined based on the width of the coding block, and the sampling rate for the left boundary smoothing sample may be determined based on the height of the coding block.

일 예로, 코딩 블록의 너비 또는 높이에 따라, 스무딩을 수행하는 이웃 샘플의 개수가 상이할 수 있다. 코딩 블록의 너비 또는 높이가 4인 경우, 이웃하는 2개의 샘플들을 스무딩하여 바운더리 스무딩 샘플 bdryRed을 생성할 수 있다. 또 다른 예로, 코딩 블록의 너비 또는 높이가 16인 경우, 이웃하는 4개의 샘플들을 스무딩하여 바운더리 스무딩 샘플 bdryRed을 생성할 수 있다. For example, according to the width or height of the coding block, the number of neighboring samples to be smoothed may be different. When the width or height of the coding block is 4, a boundary smoothing sample bdry Red may be generated by smoothing two neighboring samples. As another example, when the width or height of the coding block is 16, the boundary smoothing sample bdry Red may be generated by smoothing four neighboring samples.

코딩 블록이 너비가 높이보다 큰 비정방형인 경우, 좌측 이웃 샘플들의 다운 샘플링 레이트는 상측 이웃 샘플들의 다운 샘플링 레이트보다 작을 수 있다. 반대로, 코딩 블록이 높이가 너비보다 큰 비정방형인 경우, 상측측 이웃 샘플들의 다운 샘플링 레이트는 좌측 이웃 샘플들의 다운 샘플링 레이트보다 작을 수 있다.When the coding block is amorphous in which the width is greater than the height, the downsampling rate of left neighboring samples may be smaller than the downsampling rate of upper neighboring samples. Conversely, when the coding block is amorphous whose height is greater than the width, a downsampling rate of upper neighboring samples may be smaller than a downsampling rate of left neighboring samples.

Figure pat00028
(8)
Figure pat00028
(8)

식 (8)과 같이 바운더리 스무딩 샘플 bdryRed에 매트릭스 MWeight[iMode] 와 vBias[iMode]를 이용하여 서브 샘플링된 예측값 predMip을 생성할 수 있다.As shown in Equation (8), a sub-sampled prediction value predMip can be generated using mWeight[iMode] and vBias[iMode] on the boundary smoothing sample bdry Red .

매트릭스 MWeight[iMode]와 vBias[iMode]는 현재 코딩 블록의 인트라 예측 모드에 기초하여 결정될 수 있다. 일 예로, 인트라 예측 모드가 0 내지 3이면, MWeight[0]를 사용하고, 인트라 예측 모드가 4내지 7이면, MWeight[1]을 사용하도록 설정할 수 있다. The matrices MWeight[iMode] and vBias[iMode] may be determined based on the intra prediction mode of the current coding block. For example, if the intra prediction mode is 0 to 3, MWeight[0] may be used, and if the intra prediction mode is 4 to 7, MWeight[1] may be used.

그림 19 내지 그림 21에서 회색으로 표시된 샘플이 predMIP에 대응하는 위치를 나타낸다. 서브 샘플링된 예측값 predMIP을 선형 보간 (Linear interpolation) 또는 업샘플링함으로써, 현재 코딩 블록에 대한 최종 예측 영상 pred를 생성할 수 있다. In Figures 19-21, the grayed out samples represent locations corresponding to predMIP. By performing linear interpolation or up-sampling the sub-sampled prediction value predMIP, a final prediction image pred for the current coding block may be generated.

이와 같은 방법을 matrix 기반 인트라 예측 부호화 방법이라 한다. matrix 기반 인트라 예측 부호화 방법이 사용된 코딩 블록에서는 secondary transform 내지 RST를 사용하지 않도록 제한할 수도 있다. 또는, matrix 기반 인트라 예측 부호화 방법이 사용된 코딩 블록에 대한 primary transform시, 기 정의된 변환 코어를 이용하도록 강제할 수 있다. 또는, matrix 기반 인트라 예측 부호화 방법이 사용된 코딩 블록에 대해서는 transform_skip을 사용하지 않도록 제한할 수 있다.This method is called a matrix-based intra prediction coding method. In a coding block in which the matrix-based intra prediction coding method is used, it may be limited not to use the secondary transform or RST. Alternatively, when primary transforming a coding block using a matrix-based intra prediction coding method, a predefined transform core may be used. Alternatively, for a coding block in which the matrix-based intra prediction coding method is used, the use of transform_skip may be restricted.

코딩 블록에서 matrix 기반 인트라 예측 부호화 방법을 사용하는지를 나타내는 신택스 intra_mip_flag을 시그날링할 수 있다. A syntax intra_mip_flag indicating whether the matrix-based intra prediction coding method is used in the coding block may be signaled.

intra_mip_flag 값이 1이면, 코딩 블록에서 matrix 기반 인트라 예측 부호화 방법이 사용됨을 나타내고, intra_mip_flag 값이 0이면, 코딩 블록에서 matrix 기반 인트라 예측 부호화 방법 사용되지 않음을 나타낸다. If the intra_mip_flag value is 1, it indicates that the matrix-based intra prediction coding method is used in the coding block, and if the intra_mip_flag value is 0, it indicates that the matrix-based intra prediction coding method is not used in the coding block.

intra_mip_flag 값이 1이면, matrix 기반 인트라 예측 부호화 방법의 예측 모드(이하, matrix 인트라 예측 모드)가 mpm 모드인지를 나타내는 플래그 intra_mip_mpm_flag을 비트스트림을 통해 시그날링할 수 있다. intra_mip_mpm_flag 값이 1이면, matrix 인트라 예측 모드가 MPM 모드 중 어느 하나임을 나타내고, intra_mip_mpm_flag 값이 0이면, matrix 인트라 예측 모드가 MPM 모드가 아님을 나타낸다. If the intra_mip_flag value is 1, a flag intra_mip_mpm_flag indicating whether the prediction mode (hereinafter, matrix intra prediction mode) of the matrix-based intra prediction encoding method is an mpm mode may be signaled through a bitstream. If the intra_mip_mpm_flag value is 1, it indicates that the matrix intra prediction mode is any one of the MPM modes, and if the intra_mip_mpm_flag value is 0, it indicates that the matrix intra prediction mode is not the MPM mode.

현재 코딩 블록의 좌측 주변 블록의 인트라 예측 모드를 candMipModeA 라하고, 현재 코딩 블록의 상측 주변 블록의 인트라 예측 모드를 candMipModeB라 한다. The intra prediction mode of the left neighboring block of the current coding block is referred to as candMipModeA, and the intra prediction mode of the upper neighboring block of the current coding block is referred to as candMipModeB.

좌측 주변 블록의 인트라 예측 모드가 가용하지 않은 경우 candMipModeA 값은 -1로 설정할 수 있고, 상측 주변 블록의 인트라 예측 모드가 가용하지 않은 경우 candMipModeB 값은 -1로 설정할 수 있다. 현재 코딩 블록과 주변 블록의 크기 또는 SizeID가 동일하지 않은 경우, 주변 블록의 인트라 예측 모드가 가용하지 않은 것으로 결정될 수 있다. SizeID는 블록의 크기에 따라 결정될 수 있다.If the intra prediction mode of the left neighboring block is not available, the candMipModeA value may be set to -1, and if the intra prediction mode of the upper neighboring block is not available, the candMipModeB value may be set to -1. If the size or SizeID of the current coding block and the neighboring block are not the same, it may be determined that the intra prediction mode of the neighboring block is not available. SizeID can be determined according to the size of the block.

candMipModeA와 candMipModeB가 모두 -1인 경우, MPM 후보는 기 정의된 디폴트 모드(이하, MIP MPM 디폴트 모드)로 설정될 수도 있다. When both candMipModeA and candMipModeB are -1, the MPM candidate may be set to a predefined default mode (hereinafter, referred to as MIP MPM default mode).

MIP MPM 디폴트 모드는 블록의 사이즈에 따라 서로 다르게 설정할 수도 있다. The MIP MPM default mode may be set differently according to the size of the block.

표 5는 SizeID별 디폴트 모드를 나타낸 것이다. SizeID 0은 코딩 블록의 크기가 4x4인 경우를 나타내고, SizeID 1은 코딩 블록의 크기가 4x8 또는 8x4인 경우를 나타낸다. SizeID 2는 코딩 블록의 크기가 8x8 또는 너비/높이가 8보다 큰 경우를 나타낸다. 일 예로, 표 5와 같이 코딩 블록의 4x4이면, candModeList[0]는 17, candModeList[1]는 34, candModeList[2]는 5로 설정하고, 코딩 블록의 8x4 내지 4x8이면, candModeList[0]는 0, candModeList[1]는 7, candModeList[2]는 16으로 설정하고, 그 외의 경우에는 candModeList[0]는 1, candModeList[1]는 4, candModeList[2]는 6으로 설정할 수 있다. Table 5 shows the default mode for each SizeID. SizeID 0 indicates a case where the size of a coding block is 4x4, and SizeID 1 indicates a case where the size of a coding block is 4x8 or 8x4. SizeID 2 represents a case where the size of the coding block is 8x8 or the width/height is greater than 8. For example, as shown in Table 5, if the coding block is 4x4, candModeList[0] is set to 17, candModeList[1] is set to 34, and candModeList[2] is set to 5, and if the coding block is 8x4 to 4x8, candModeList[0] is 0, candModeList[1] is 7, candModeList[2] is set to 16, in other cases, candModeList[0] is set to 1, candModeList[1] is set to 4, and candModeList[2] is set to 6.

표 5Table 5

Figure pat00029
Figure pat00029

또는 코딩 블록의 사이즈에 관계 없이 표 6과 같이 하나의 MIP MPM 디폴트 모드를 사용할 수도 있다. Alternatively, one MIP MPM default mode as shown in Table 6 may be used regardless of the size of the coding block.

표 6Table 6

Figure pat00030
Figure pat00030

candMipModeA와 candMipModeB가 같거나, candMipModeA와 candMipModeB 중 어느 하나의 값이 -1인 경우, MPM 후보는 다음 식 (9) 내지 (11)과 같이 유도할 수 있다. When candMipModeA and candMipModeB are the same, or when any one of candMipModeA and candMipModeB is -1, the MPM candidate can be derived as shown in Equations (9) to (11) below.

candMipModeList[ 0 ] = ( candMipModeA != -1 )  ?  candMipModeA  :  candMipModeBcandMipModeList[ 0 ] = ( candMipModeA != -1 )  ? candMipModeA  :  candMipModeB (9)(9)

candMipModeList[ 1 ] = mipMpmCand[ sizeId ][ 1 ] (10)candMipModeList[ 1 ] = mipMpmCand[ sizeId ][ 1 ] (10)

candMipModeList[ 2 ] = mipMpmCand[ sizeId ][ 2 ] (11)candMipModeList[ 2 ] = mipMpmCand[ sizeId ][ 2 ] (11)

candMipModeList[0] 이 mipMpmCand[ sizeId ][ 0 ] 와 같은 값을 가지는 경우에는 식 (10) 내지 (11)을 이용하여 candMipModeList[1]과 candMipModeList[2]를 유도할 수 있고, 그 외의 경우에는 식 (12) 내지 (13)을 이용하여 candMipModeList[1]과 candMipModeList[2]를 유도할 수 있다. If candMipModeList[0] has the same value as mipMpmCand[ sizeId ][ 0 ], candMipModeList[1] and candMipModeList[2] can be derived using equations (10) to (11). CandMipModeList[1] and candMipModeList[2] can be derived using (12) to (13).

candMipModeList[ 1 ] = mipMpmCand[ sizeId ][ 0 ] (12)candMipModeList[ 1 ] = mipMpmCand[ sizeId ][ 0 ] (12)

candMipModeList[ 2 ] = ( candMipModeList[ 0 ] != mipMpmCand[ sizeId ][ 1 ] )  ?  candMipModeList[ 2 ] = ( candMipModeList[ 0 ] != mipMpmCand[ sizeId ][ 1 ] )  ?

mipMpmCand[ sizeId ][ 1 ]  :  mipMpmCand[ sizeId ][ 2 ]mipMpmCand[ sizeId ][ 1 ]  :  mipMpmCand[ sizeId ][ 2 ] (13)(13)

식 (9) 내지 (13)의 mipMpmCand는 표 5 내지 표 6에서 유도할 수도 있다. 즉 복수개의 MIP MPM 디폴트 모드를 사용하거나 하나의 MIP MPM 디폴트 모들 사용할 수도 있다. The mipMpmCand of formulas (9) to (13) can also be derived from Tables 5 to 6. That is, a plurality of MIP MPM default modes or one MIP MPM default mode may be used.

MIP 인트라 예측 모드가 디폴트 모드인지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 MIP 인트라 예측 모드가 특정 인트라 예측 모드인지 또는 MIP 인트라 예측 모드가 디폴트 모드 중 어느 하나인지 여부를 나타낸다. 특정 인트라 예측 모드는, Planar, DC, 수평 방향 예측 모드, 수직 방향 예측 모드, 대각 방향 예측 모드 또는 기 결정된 인덱스 값을 갖는 방향성 모드일 수 있다. 디폴트 모드는 Planar, DC, 수직 방향, 수평 방향, 대각 방향 중 적어도 하나의 인트라 예측 모드를 포함할 수 있다. Information indicating whether the MIP intra prediction mode is a default mode may be signaled through a bitstream. The information indicates whether the MIP intra prediction mode is a specific intra prediction mode or whether the MIP intra prediction mode is a default mode. The specific intra prediction mode may be a planar, DC, horizontal direction prediction mode, vertical direction prediction mode, diagonal direction prediction mode, or a directional mode having a predetermined index value. The default mode may include at least one intra prediction mode of planar, DC, vertical direction, horizontal direction, and diagonal direction.

일 예로, MIP 인트라 예측 모드가 플래너 모드인지를 나타내는 플래그 intra_mip_not_planar_flag 또는 MIP 인트라 예측 모드가 디폴트 모드 중 어느 하나인지를 나타내는 플래그 intra_mip_not_default_flag가 시그날링될 수 있다. For example, a flag intra_mip_not_planar_flag indicating whether the MIP intra prediction mode is a planar mode or a flag intra_mip_not_default_flag indicating whether the MIP intra prediction mode is a default mode may be signaled.

intra_mip_not_default_flag가 MIP 인트라 예측 모드가 디폴트 모드임을 나타내는 경우, 디폴트 모드 중 어느 하나를 특정하기 위한 인덱스가 더 시그날링될 수 있다.When intra_mip_not_default_flag indicates that the MIP intra prediction mode is a default mode, an index for specifying any one of the default modes may be further signaled.

또는, 특정 방향은 부호화기 및 복호화기에서 기 정의된 것일 수 있다. 또는, 시퀀스, 픽처 또는 슬라이스 헤더를 통해 특정 방향을 특정하는 정보가 시그날링될 수 있다. 일 예로, 시퀀스 파라미터 헤더를 통해 특정 방향 N이 결정되면, 블록 레벨에서 intra_mip_not_N_flag가 시그날링될 수 있다. 상기 intra_mip_not_N_flag는 현재 블록의 인트라 예측 모드가 N 인지 여부를 나타낸다.Alternatively, the specific direction may be predefined by an encoder and a decoder. Alternatively, information specifying a specific direction may be signaled through a sequence, picture, or slice header. For example, when a specific direction N is determined through a sequence parameter header, an intra_mip_not_N_flag may be signaled at a block level. The intra_mip_not_N_flag indicates whether the intra prediction mode of the current block is N.

표 7은 matrix 인트라 예측 모드가 플래너 모드인지를 나타내는 플래그 intra_mip_not_planar_flag가 시그날링되는 예를 나타낸다. Table 7 shows an example in which a flag intra_mip_not_planar_flag indicating whether the matrix intra prediction mode is a planar mode is signaled.

intra_mip_not_planar_flag 값이 1이면, matrix 인트라 예측 모드가 플래너 모드가 아님을 나타내고, intra_mip_not_planar_flag 값이 0이면 matrix 인트라 예측 모드가 플래너 모드임을 나타낸다.If the intra_mip_not_planar_flag value is 1, it indicates that the matrix intra prediction mode is not the planar mode, and if the intra_mip_not_planar_flag value is 0, it indicates that the matrix intra prediction mode is the planar mode.

표 7Table 7

Figure pat00031
Figure pat00031

Figure pat00032
Figure pat00032

표 8과 같이 intra_mip_flag 값이 1인 경우에 intra_mip_not_planar_flag을 시그날링할 수 있다. MIP 인트라 예측 모드가 planar가 아닌 경우(즉, intra_mip_not_planar_flag 값이 1인 경우), 추가로, intra_mip_mpm_flag을 시그날링할 수 있다. Intra_mip_not_planar_flag의 값이 1인 경우, Planar 모드는 mpm 후보로서 포함되지 않는다. As shown in Table 8, when the intra_mip_flag value is 1, the intra_mip_not_planar_flag may be signaled. When the MIP intra prediction mode is not planar (ie, when the intra_mip_not_planar_flag value is 1), the intra_mip_mpm_flag may be additionally signaled. When the value of Intra_mip_not_planar_flag is 1, the Planar mode is not included as an mpm candidate.

표 8Table 8

Figure pat00033
Figure pat00033

Figure pat00034
Figure pat00034

matrix 기반 인트라 예측 부호화 방법의 예측 모드(이하, matrix 인트라 예측 모드)에서는 MPM 모드만을 기초로 현재 블록의 인트라 예측 모드를 유도할 수 있다. 즉, MPM 후보로 설정되지 않은 인트라 예측 모드는 현재 블록의 인트라 예측 모드로 이용될 수 없다. In the prediction mode of the matrix-based intra prediction encoding method (hereinafter, matrix intra prediction mode), the intra prediction mode of the current block may be derived based only on the MPM mode. That is, an intra prediction mode that is not set as an MPM candidate cannot be used as an intra prediction mode of the current block.

구체적으로 예를 들어, 표 9와 같이 intra_mip_flag 값이 1 인 경우에 MIP MPM 인덱스를 시그날링할 수 있다.Specifically, for example, as shown in Table 9, when the intra_mip_flag value is 1, the MIP MPM index may be signaled.

또는, 현재 블록의 인트라 예측 모드가 특정 모드인지 여부를 결정한 뒤, 현재 블록의 인트라 예측 모드가 특정 모드가 아닌 경우에 한하여, MIP MPM 인덱스를 시그날링할 수도 있다. 이 경우, 특정 모드와 MPM 후보로 설정되는 인트라 예측 모드들만이 현재 블록의 인트라 예측 모드로 이용될 수 있다.Alternatively, after determining whether the intra prediction mode of the current block is a specific mode, the MIP MPM index may be signaled only when the intra prediction mode of the current block is not a specific mode. In this case, only a specific mode and intra prediction modes set as MPM candidates may be used as intra prediction modes of the current block.

표 9 Table 9

Figure pat00035
Figure pat00035

Figure pat00036
Figure pat00036

2.62.6 인트라 예측 모드 시그날링 방법 Intra prediction mode signaling method

코딩 블록의 예측 영상을 생성하고, 현재 행의 예측 영상에서 이전 행의 예측 영상을 차분하거나, 현재 열의 예측 영상에서 이전 열의 예측 영상을 차분한 잔차 신호를 생성할 수 있으며, 이 잔차 신호의 변환 계수 또는 변환 스킵 계수를 비트스트림을 통해 전송할 수 있다. 이와 같은 방법을 intra bdpcm이라 정의 한다. A prediction image of the coding block may be generated, and a residual signal obtained by differentiating the prediction image of the previous row from the prediction image of the current row or the prediction image of the previous column from the prediction image of the current column may be generated. Transform skip coefficients may be transmitted through a bitstream. This method is defined as intra bdpcm.

intra bdpcm이 사용되는 경우, 기 정의된 인트라 예측 방법을 사용하도록 제한할 수도 있다. 예를 들어, 수평 예측 모드 또는 수직 예측 모드만 사용하도록 제한할 수도 있다. When intra bdpcm is used, it may be restricted to use a predefined intra prediction method. For example, it may be limited to use only the horizontal prediction mode or the vertical prediction mode.

intra bdpcm이 사용되는 경우, 변환 스킵 (transform skip)을 사용하도록 제한할 수도 있다. When intra bdpcm is used, it may be restricted to use transform skip.

intra_bdpcm_flag 값이 1이면, 코딩 블록에서 intra bdpcm을 수행함을 나타낸다. If the intra_bdpcm_flag value is 1, it indicates that intra bdpcm is performed in the coding block.

intra_bdpcm_dir_flag 값이 0이면 BDPCM 예측 방향이 수평임을 나타낸다. 여기서 BDPCM 예측 방향이 수평이라 함은 현재 현재 행의 예측 영상에서 이전 행의 예측 영상을 차분하여 잔차 신호를 생성함을 나타낸다. If the intra_bdpcm_dir_flag value is 0, it indicates that the BDPCM prediction direction is horizontal. Here, that the BDPCM prediction direction is horizontal indicates that a residual signal is generated by differentiating the prediction image of the previous row from the prediction image of the current row.

intra_bdpcm_dir_flag 값이 1이면 BDPCM 예측 방향이 수직임을 나타낸다. 여기서 BDPCM 예측 방향이 수직이라 함은 현재 현재 열의 예측 영상에서 이전 열의 예측 영상을 차분하여 잔차 신호를 생성함을 나타낸다. If the intra_bdpcm_dir_flag value is 1, it indicates that the BDPCM prediction direction is vertical. Here, that the BDPCM prediction direction is vertical indicates that a residual signal is generated by differentiating the prediction image of the previous column from the prediction image of the current row.

Regular intra mode를 정의할 수 있다. Regular intra mode는 Matrix 기반 인트라 예측 사용 여부, 참조 샘플 라인 인덱스, 서브 파티션 인트라 예측 사용 여부, intra bdpcm 사용 여부 또는 인트라 예측 모드 중 적어도 하나가 디폴트값으로 설정되는 인트라 예측 모드를 나타낸다. Regular intra mode인 경우, matrix 기반 인트라 예측을 사용하는지 여부를 나타내는 정보, 참조 샘플 라인 인덱스를 나타내는 정보, 서브 파티션 인트라 예측의 사용 여부를 나타내는 플래그, intra bdpcm 사용 여부 또는 인트라 예측 모드를 결정하기 위한 정보 중 적어도 하나의 부호화/복호화가 생략될 수 있다.Regular intra mode can be defined. The regular intra mode indicates an intra prediction mode in which at least one of whether Matrix-based intra prediction is used, a reference sample line index, sub-partition intra prediction is used, intra bdpcm is used, or an intra prediction mode is set as a default value. In the case of regular intra mode, information indicating whether matrix-based intra prediction is used, information indicating a reference sample line index, a flag indicating whether sub-partition intra prediction is used, information for determining whether to use intra bdpcm or an intra prediction mode At least one of the encoding/decoding may be omitted.

일 예로, regular intra는 matrix 기반 인트라 예측, 멀티 라인 인트라 및 서브 파티션 인트라, intra bdpcm을 사용하지 않는 인트라 예측 방법을 나타낼 수 있다. 즉 regular intra 에서는 최대 67개 인트라 예측 모드 중 어느 하나 및 현재 블록에 인접하는 참조 샘플들에 기초하는 인트라 예측 방법을 가리킨다. For example, regular intra may represent a matrix-based intra prediction, a multi-line intra and sub-partition intra, and an intra prediction method that does not use intra bdpcm. That is, in regular intra, it refers to an intra prediction method based on one of a maximum of 67 intra prediction modes and reference samples adjacent to the current block.

표 10과 같이 코딩 블록에서 regular intra를 사용했는지를 나타내는 플래그 regular_intra_flag을 시그날링할 수 있다. regular_intra_flag 값이 1이면, 코딩 블록에서 regular intra를 사용했음을 나타내고, regular_intra_flag 값이 0이면, 코딩 블록에서 regular intra를 사용하지 않았음을 나타낸다. As shown in Table 10, a flag regular_intra_flag indicating whether regular intra has been used in a coding block may be signaled. If the value of regular_intra_flag is 1, it indicates that regular intra is used in the coding block, and if the value of regular_intra_flag is 0, it indicates that regular intra is not used in the coding block.

regular_intra_flag 값이 0인 경우에 한정하여, intra_mip_flag , intra_luma_ref_idx 또는 intra_subpartitions_mode_flag 등을 시그날링할 수 있다. When the regular_intra_flag value is 0, the intra_mip_flag, intra_luma_ref_idx, or intra_subpartitions_mode_flag, etc. may be signaled.

표 10Table 10

Figure pat00037
Figure pat00037

Figure pat00038
Figure pat00038

Regular_intra_flag의 허용 여부는 현재 블록의 크기/형태에 기초하여 결정될 수 있다. 일 예로, 현재 블록이 정방형인 경우 및/또는 현재 블록의 크기가 문턱값 이하인 경우에 한하여, regular_intra_flag가 시그날링될 수 있다. Whether to allow the Regular_intra_flag may be determined based on the size/type of the current block. For example, only when the current block is a square and/or when the size of the current block is less than or equal to a threshold value, regular_intra_flag may be signaled.

2.62.6 인터 예측 부호화 및 복호화 방법Inter prediction coding and decoding method

이전 픽쳐의 정보를 이용하여 현재 픽쳐에 있는 블록의 예측 블록(예측 영상)을 생성하는 방법을 인터 예측 부호화 모드라고 한다. A method of generating a prediction block (prediction image) of a block in a current picture using information of a previous picture is called an inter prediction encoding mode.

현재 블록의 이전 픽쳐 내에 있는 특정 블록으로 부터 예측 블록을 생성할 수도 있다. A prediction block may be generated from a specific block in a previous picture of the current block.

부호화 단계에서 이전 픽쳐 내 블록 중 복원 에러가 가장 작은 블록을 콜 블록( collocated block)을 중심으로 탐색하여 선택할 수 있으며, 현재 블록의 좌상단 샘플과 선택된 블록의 좌상단 샘플 사이의 x축 차분 및 y축 차분을 모션 벡터(motion vector)라 정의하고, 이를 비트스트림에 전송하여 시그날링할 수 있다. 모션 벡터가 특정하는 참조 픽쳐의 특정 블록에서 인터폴레이션 등을 통해 생성한 블록을 움직임 보상 예측 블록(motion compensated predictor block)이라 한다. In the encoding step, the block with the smallest reconstruction error among the blocks in the previous picture can be selected by searching around a collocated block, and the x-axis difference and y-axis difference between the upper left sample of the current block and the upper left sample of the selected block Is defined as a motion vector, and can be signaled by transmitting it to a bitstream. A block generated through interpolation from a specific block of a reference picture specified by a motion vector is called a motion compensated predictor block.

콜 블록은 그림 22와 같이 현재 블록과 좌상단 샘플의 위치 및 크기가 같은 해당 픽쳐의 블록을 나타낸다. 해당 픽쳐는 참조 픽쳐 레퍼런스와 같은 신택스로 부터 특정 될 수 있다. As shown in Figure 22 , the collocated block represents the block of the picture with the same location and size of the current block and the upper left sample. The corresponding picture may be specified from the same syntax as the reference picture reference.

Figure pat00039
Figure pat00039

그림 22Figure 22

인터 예측 부호화 모드에서는 오브젝트의 움직임을 고려하여 예측 블록을 생성할 수 있다. In the inter prediction encoding mode, a prediction block may be generated in consideration of the motion of an object.

예를 들어, 이전 픽쳐에 있는 오브젝트가 현재 픽쳐에서 어느 방향으로 어느 정도 움직였는지 알면 현재 블록에서 움직임을 고려한 블록을 차분하여 예측 블록(예측 영상)을 생성할 수 있으며, 이를 움직임 예측 블록이라고 정의한다. For example, if you know how and in which direction an object in the previous picture has moved in the current picture, a prediction block (prediction image) can be generated by differentiating a block considering motion from the current block, and this is defined as a motion prediction block. .

현재 블록에서 움직임 예측 블록 또는 해당 예측 블록을 차분하여 잔차 블록을 생성할 수 있다. A residual block may be generated by differentiating a motion prediction block or a corresponding prediction block from the current block.

오브젝트에 움직임이 발생하면, 해당 예측 블록보다 움직임 예측 블록을 사용하면 잔차 블록의 에너지가 작아져서 압축 성능이 좋아질 수 있다. When motion occurs in an object, if a motion prediction block is used rather than a corresponding prediction block, the energy of the residual block decreases, and compression performance may be improved.

이와 같이 움직임 예측 블록을 이용하는 방법을 움직임 보상 예측이라고 부르며, 대부분의 인터 예측 부호화에서는 움직임 보상 예측을 사용한다. This method of using a motion prediction block is called motion compensation prediction, and most inter prediction coding uses motion compensation prediction.

이전 픽쳐에 있는 오브젝트가 현재 픽쳐에서 어느 방향으로, 어느 정도 움직였는지를 나타내는 값을 모션 벡터라고 한다. 모션 벡터는 시퀀스 단위 또는 타일 그룹 단위 또는 블록 단위로 서로 다른 화소 정밀도를 갖는 모션벡터를 사용할 수 있다. 예를 들어, 특정 블록에서 모션 벡터의 화소 정밀도는 octor-pel,Quarter-Pel, Half-Pel, Integer pel, 4 Integer pel 중 적어도 어느 하나 일수 있다. A value indicating in which direction and to what extent the object in the previous picture has moved in the current picture is called a motion vector. As the motion vector, motion vectors having different pixel precisions may be used in units of sequences, groups of tiles, or blocks. For example, the pixel precision of a motion vector in a specific block may be at least one of octor-pel, quarter-pel, half-pel, integer pel, and 4 integer pel.

인터 예측 모드는 translaton 모션을 이용한 인터 예측 방법과 affine 모션을 이용한 affine 인터 예측 방법이 선택적으로 사용될 수도 있다. As the inter prediction mode, an inter prediction method using translaton motion and an affine inter prediction method using affine motion may be selectively used.

2.6.12.6.1 어파인 인터 예측 부호화 및 복호화 방법Afine inter prediction coding and decoding method

비디오에서 특정 물체(object)의 움직임이 선형적으로 나타나지 않는 경우가 많이 발생한다. 예를 들어, 그림 23와 같이 카메라 줌인 (Zoom-in), 줌 아웃(Zoom-out), 회전(roation), 임의 형태로 변환을 가능하게 하는 affine 변환 등의 affine motion이 사용된 영상에서는 오브젝트의 움직임을 translation 움직임 벡터만 사용하는 경우 물체의 움직임을 효과적으로 표현할 수 없으며, 부호화 성능이 낮아질 수 있다. There are many cases in which the motion of a specific object does not appear linearly in a video. For example, as shown in Figure 23, camera zoom (Zoom-in), zoom out (Zoom-out), rotation (roation), such as affine transformation, which enables the conversion to any type of affine motion of the image using the object If only translation motion vectors are used for motion, the motion of an object cannot be effectively expressed, and coding performance may be degraded.

Figure pat00040
Figure pat00040

그림 23Figure 23

어파인 모션은 다음 식 (14)과 같이 표현할 수 있다. Affine motion can be expressed as the following equation (14).

Figure pat00041
(14)
Figure pat00041
(14)

어파인 모션을 총 6개의 파라미터를 사용하여 표현하는 것은 복잡한 움직임이 있는 영상에 효과적이지만, 어파인 모션 파라미터를 부호화하는데 사용하는 비트가 많아서 부호화 효율이 떨어질 수도 있다. Expressing affine motion using a total of six parameters is effective for images with complex motion, but encoding efficiency may be degraded due to the large number of bits used to encode affine motion parameters.

이에, 4개의 파라미터로 어파인 모션을 간략화하여 표현할 수 있으며,, 이를 4 파라미터 어파인 모션 모델이라고 정의한다. 식 (15)는 4개의 파라미터로 어파인 모션을 표현한 것이다.Accordingly, affine motion can be simplified and expressed with four parameters, and this is defined as a four-parameter afine motion model. Equation (15) expresses affine motion with four parameters.

Figure pat00042
(15)
Figure pat00042
(15)

4 파라미터 어파인 모션 모델은 현재 블록의 두 컨트롤 포인트에서의 움직임 벡터를 포함할 수 있다. 컨트롤 포인트는 현재 블록의 좌상단 코너, 우상단 코너 및 좌하단 코너를 포함할 수 있다. 일 예로, 4파라미터 어파인 모션 모델은 그림 24의 좌측 그림과 같이 코딩 유닛의 좌상단 샘플 (x0,y0)에서의 모션 벡터 sv0 와 코딩 유닛의 우상단 샘플 (x1,y1)에서의 모션 벡터 sv1에 의해서 결정 될 수 있으며, sv0와 sv1을 어파인 시드 벡터라고 정의한다. 이하, 좌상단에 위치한 어파인 시드 벡터 sv0를 제 1 어파인 시드 벡터라 가정하고, 우상단에 위치한 어파인 시드 벡터 sv1를 제 2 어파인 시드 벡터라 가정하기로 한다. 4파라미터 어파인 모션 모델에서 제1/2 어파인 시드 벡터 중 하나를 좌하단에 위치한 어파인 시드 벡터로 교체하여 사용하는 것도 가능하다. The four-parameter affine motion model may include motion vectors at two control points of the current block. The control point may include an upper left corner, an upper right corner, and a lower left corner of the current block. For example, 4-parameter affine motion model to the motion vector sv1 in the upper left sample of the coding unit as shown in the left figure of Figure 2. 4 (x0, y0) top right samples of the motion vector sv0 the coding unit in the (x1, y1) It can be determined by, and sv 0 and sv 1 are defined as affine seed vectors. Hereinafter, it is assumed that an affine seed vector sv 0 located in the upper left corner is a first affine seed vector, and an affine seed vector sv 1 located in the upper right corner is a second affine seed vector. In the 4-parameter affine motion model, it is possible to replace one of the 1/2 affine seed vectors with the affine seed vector located in the lower left corner.

Figure pat00043
Figure pat00043

그림 24Figure 24

6 파라미터 어파인 모션 모델은 그림 24의 우측 그림과 같이 4 파라미터 어파인 모션 모델에 잔여 컨트롤 포인트(예컨대, 좌하단에 샘플 (x2,y2))의 모션 벡터 sv2가 추가된 어파인 모션 모델이다. 이하, 좌상단에 위치한 어파인 시드 벡터 sv0를 제 1 어파인 시드 벡터라 가정하고, 우상단에 위치한 어파인 시드 벡터 sv1를 제 2 어파인 시드 벡터라 가정하고, 좌하단에 위치한 어파인 시드 벡터 sv2를 제3 어파인 시드 벡터라 가정한다.The 6-parameter affine motion model is an affine motion model in which the motion vector sv 2 of the residual control point (e.g., sample (x2,y2) in the lower left corner) is added to the 4-parameter affine motion model as shown in the right figure of Figure 24 . . Hereinafter, assuming that the affine seed vector sv 0 located at the top left is the first affine seed vector, the affine seed vector sv 1 located at the top right is the second affine seed vector, and the affine seed vector located at the bottom left Assume that sv 2 is the third affine seed vector.

어파인 모션을 표현하기 위한 파라미터의 개수에 관한 정보가 비트스트림에 부호화될 수 있다. 예컨대, 6 파라미터의 사용 여부를 나타내는 플래그, 4 파라미터의 사용 여부를 나타내는 플래그가 타일 그룹, 타일, 코딩 유닛 또는 CTU 단위로 부호화될 수 있다. 이에 따라, 타일 그룹, 코딩 유닛 또는 CTU 단위로 4 파라미터 어파인 모션 모델 내지 6 파라미터 어파인 모션 모델을 선택적으로 사용할 수도 있다. Information on the number of parameters for expressing affine motion may be encoded in the bitstream. For example, a flag indicating whether 6 parameters are used and a flag indicating whether 4 parameters are used may be encoded in a tile group, a tile, a coding unit, or a CTU unit. Accordingly, a 4-parameter affine motion model to a 6-parameter affine motion model may be selectively used in units of tile groups, coding units, or CTUs.

어파인 시드 벡터를 이용하여 그림 25와 같이 코딩 유닛의 서브 블록 별로 모션 벡터를 유도할 수 있으며, 이를 어파인 서브 블록 벡터라고 정의한다. _A motion vector can be derived for each sub-block of the coding unit using the affine seed vector as shown in Figure 25, and this is defined as an affine sub-block vector. _

Figure pat00044
Figure pat00044

그림 25Figure 25

어파인 서브 블록 벡터는 다음 식 (16)와 같이 유도할 수도 있다. 여기서 서브 블록의 기준 샘플 위치(x,y)는 블록의 코너에 위치한 샘플(예컨대, 좌상단 샘플)일 수도 있고, x축 또는 y축 중 적어도 하나가 중앙인 샘플(예컨대, 중앙 샘플)일 수도 있다. The affine sub-block vector can also be derived as in Equation (16) below. Here, the reference sample position (x,y) of the sub-block may be a sample located at a corner of the block (eg, an upper left sample), or a sample (eg, a center sample) in which at least one of the x-axis or y-axis is centered. .

Figure pat00045
(16)
Figure pat00045
(16)

어파인 서브 블록 벡터를 이용하여 코딩 유닛 단위 내지 코딩 유닛 내 서브 블록 단위로 움직임 보상을 수행할 수 있으며, 이를 어파인 인터 예측 모드라고 정의한다. 식 (16)에서 (x1-x0)는 코딩 유닛의 너비와 같은 값을 가질 수 있다. Motion compensation may be performed in units of coding units or sub-blocks within the coding unit using the afine sub-block vector, and this is defined as an afine inter prediction mode. In Equation (16), (x 1 -x 0 ) may have the same value as the width of the coding unit.

2.6.22.6.2 머지 모드 부호화 방법 Merge mode coding method

현재 코딩 유닛의 모션 정보(모션 벡터, 참조 픽쳐 인덱스 등)를 부호화 하지 않고, 주변 블록의 모션 정보로 부터 유도할 수 있다. 주변 블록 중 어느 하나의 모션 정보를 현재 코딩 유닛의 모션 정보로 설정할 수 있으며, 이를 머지 모드(merge mode)라고 정의 한다. Motion information (motion vector, reference picture index, etc.) of the current coding unit is not encoded, and can be derived from motion information of neighboring blocks. Motion information of any one of the neighboring blocks can be set as motion information of the current coding unit, and this is defined as a merge mode.

머지 모드에 사용되는 주변 블록은 그림 26의 머지 후보 인덱스 0 내지 4 와 같이 현재 코딩 유닛과 인접한 블록 (현재 코딩 유닛의 경계와 맞닿은 블록)일 수도 있고, 그림 26의 머지 후보 인덱스 5 내지 26과 같이 인접하지 않은 블록일 수도 있다. Neighboring blocks used for the remaining mode may be a picture 26 remaining candidate indices from 0 to 4 and the block are adjacent to the coding unit as the (current boundary with the abutting block of the coded unit), as shown in Figure 26, the remaining candidate index from 5 to 26 of the It may be a non-adjacent block.

Figure pat00046
Figure pat00046

그림 26Fig. 26

머지 후보가 현재 블록과의 거리가 기정의된 임계값을 넘어가면 가용(available)하지 않은 것으로 설정할 수 있다. If the distance of the merge candidate to the current block exceeds a predefined threshold, it may be set as not available.

예를 들어, 기 정의된 임계값을 CTU의 높이(ctu_height) 또는 ctu_height+N으로 설정할 수도 있으며, 이를 머지 후보 가용 임계값이라고 정의 한다. 즉 머지 후보의 y축 좌표(yi)와 현재 코딩 유닛의 좌상단 샘플(이하, 현재 코딩 유닛 기준 샘플)의 y축 좌표 차분 (y0) (즉, yi - y0)이 머지 후보 가용 임계값 보다 큰 경우에는 머지 후보를 가용(Available)하지 않은 것으로 설정할 수 있다. 여기서 N은 기 정의된 오프셋 값이다. 구체적으로 예를 들어, N을 16으로 설정할 수도 있고, ctu_height으로 설정할 수도 있다. For example, a predefined threshold may be set to the height of the CTU (ctu_height) or ctu_height+N, and this is defined as a merge candidate available threshold. That is, the y-axis coordinate (y i ) of the merge candidate and the y-axis coordinate difference (y 0 ) (i.e., y i- y 0 ) of the upper left sample of the current coding unit (hereinafter, the reference sample of the current coding unit) are the merge candidate available threshold If it is larger than the value, the merge candidate may be set as not available. Here, N is a predefined offset value. Specifically, for example, N may be set to 16 or ctu_height may be set.

Figure pat00047
Figure pat00047

그림 27Fig. 27

CTU 경계 (CTU boundary)를 넘어가는 머지 후보가 많은 경우에는 비가용 머지 후보가 많이 발생하여, 부호화 효율이 낮아질 수도 있다. 코딩 유닛의 위쪽에 존재하는 머지 후보(이하, 상측 머지 후보) 는 가능한 작게 설정하고, 코딩 유닛의 좌측 및 하단(이하, 좌하단 머지 후보)에 존재하는 머지 후보는 가능한 많게 설정할 수도 있다. When there are many merge candidates crossing the CTU boundary, many unusable merge candidates occur, and encoding efficiency may be lowered. Merge candidates existing above the coding unit (hereinafter, upper merge candidates) may be set as small as possible, and merge candidates existing at the left and lower sides of the coding unit (hereinafter, lower left merge candidates) may be set as many as possible.

그림 27과 같이 현재 코딩 유닛 기준 샘플의 y축 좌표와 상측 머지 후보의 y축 좌표의 차가 코딩 유닛 높이의 2배가 넘지 않도록 설정할 수도 있다. As shown in Fig. 27, the difference between the y-axis coordinate of the current coding unit reference sample and the y-axis coordinate of the upper merge candidate may not exceed twice the height of the coding unit.

그림 27과 현재 코딩 유닛 기준 샘플의 x축 좌표와 좌하단 머지 후보의 x축 좌표의 차가 코딩 유닛 너비의 2배가 넘지 않도록 설정할 수도 있다. As shown in Figure 27, the difference between the x-axis coordinate of the current coding unit reference sample and the x-axis coordinate of the lower-left merge candidate may not exceed twice the width of the coding unit.

현재 코딩 유닛과 인접한 머지 후보를 인접 머지 후보라고 부르고, 현재 코딩 유닛과 인접하지 않은 머지 후보를 비인접 머지 후보라고 정의 한다. A merge candidate adjacent to the current coding unit is called an adjacent merge candidate, and a merge candidate that is not adjacent to the current coding unit is defined as a non-adjacent merge candidate.

현재 코딩 유닛의 머지 후보가 인접 머지 후보인지 여부를 나타내는 플래그 isAdjacentMergeflag을 시그날링할 수 있다. A flag isAdjacentMergeflag indicating whether a merge candidate of the current coding unit is an adjacent merge candidate may be signaled.

isAdjacentMergeflag값이 1 이면 현재 코딩 유닛의 모션 정보는 인접 머지 후보에서 유도할 수 있음을 나타내고, isAdjacentMergeflag값이 0 이면 현재 코딩 유닛의 모션 정보는 비인접 머지 후보에서 유도할 수 있음을 나타낸다. If the isAdjacentMergeflag value is 1, it indicates that motion information of the current coding unit can be derived from an adjacent merge candidate, and if the isAdjacentMergeflag value is 0, it indicates that the motion information of the current coding unit can be derived from a non-adjacent merge candidate.

2.6.3 인터 복호화 영역 머지 방법 2.6.3 Inter decoding area merge method

현재 픽쳐에서 이미 인터 예측으로 부호화된 코딩 유닛의 모션 정보(움직임 벡터 및 참조 픽쳐 인덱스)를 기 정의된 크기의 리스트에 저장할 수 있으며, 이를 인터 영역 모션 정보 리스트이라고 정의한다. Motion information (motion vector and reference picture index) of a coding unit already encoded by inter prediction in the current picture can be stored in a list having a predefined size, and this is defined as an inter-region motion information list.

인터 영역 모션 정보 리스트에 있는 모션 정보(움직임 벡터 및 참조 픽쳐 인덱스)를 인터 복호화 영역 머지 후보라고 한다. Motion information (motion vector and reference picture index) in the inter-region motion information list is called an inter-decoding region merge candidate.

인터 복호화 영역 머지 후보를 현재 코딩 유닛의 머지 후보로 사용할 수 있으며, 이런 방법을 인터 복호화 영역 머지 방법이라고 정의한다. The inter decoding region merge candidate may be used as a merge candidate of the current coding unit, and this method is defined as an inter decoding region merge method.

타일 그룹이 초기화 되면 인터 영역 모션 정보 리스트는 비어 있으며, 픽쳐의 일부 영역을 부호화/복호화되면 인터 영역 모션 정보 리스트에 추가할 수 있다. 타일 그룹 헤더를 통해 인터 영역 모션 정보 리스트의 초기 인터 복호화 영역 머지 후보를 시그널링할 수도 있다. When the tile group is initialized, the inter-region motion information list is empty, and when a partial region of a picture is encoded/decoded, it can be added to the inter-region motion information list. The initial inter decoding region merge candidate of the inter region motion information list may be signaled through the tile group header.

코딩 유닛이 인터 예측으로 부호화/복호화 되면 그림 28과 같이 상기 코딩 유닛의 움직임 정보를 인터 영역 모션 정보 리스트에 업데이트 할 수 있다. 인터 영역 모션 정보 리스트에 있는 인터 복호화 영역 머지 후보의 개수가 최대값인 경우에는, 인터 영역 모션 정보 리스트 인덱스가 가장 작은 값 (가장 먼저 인터 영역 모션 정보 리스트에 있는 인터 복호화 영역 머지 후보)을 제거하고, 가장 최근에 부호화/복호화된 인터 영역의 모션 벡터를 인터 복호화 영역 머지 후보로 추가할 수 있다. When the coding unit is encoded/decoded by inter prediction, motion information of the coding unit may be updated in the inter-region motion information list as shown in Fig. 28 . If the number of inter-decoding region merge candidates in the inter-region motion information list is the maximum value, the value with the smallest inter-region motion information list index (first, the inter-decoding region merge candidate in the inter-region motion information list) is removed. , The motion vector of the most recently encoded/decoded inter-region may be added as an inter-decoding region merge candidate.

Figure pat00048
Figure pat00048

그림 28Fig. 28

디코딩 된 코딩 유닛의 모션 정보 mvCand를 인터 영역 모션 정보 리스트 HmvpCandList에 업데이트 할수 있다. 이 때 디코딩 된 코딩 유닛의 모션 정보가 인터 영역 모션 정보 리스트에 있는 모션 정보 중 어느 하나와 같은 경우(모션 벡터와 레퍼런스 인덱스가 모두 같은 경우)에는 인터 영역 모션 정보 리스트를 업데이트 하지 않거나, 그림 30과 같이 디코딩 된 코딩 유닛의 모션 벡터 mvCand을 인터 영역 모션 정보 리스트의 제일 마지막에 저장할 수 있다. 이 때 mvCand과 같은 모션 정보를 가지고 있는 HmvpCandList의 인덱스를 hIdx이면, 그림 30과 같이 hIdx 보다 큰 모든 i에 대해 HMVPCandList [i]를 HVMPCandList[i-1]로 설정할 수도 있다. 현재 디코딩된 코딩 유닛에서 서브 블록 머지 후보 (sub-block merge candidates)가 사용된 경우에는 코딩 유닛 내 대표 서브 블록의 모션 정보를 인터 영역 모션 정보 리스트에 저장할 수도 있다. The motion information mvCand of the decoded coding unit may be updated in the inter-region motion information list HmvpCandList. At this time, if the motion information of the decoded coding unit is the same as any one of the motion information in the inter-region motion information list (when both the motion vector and the reference index are the same), the inter-region motion information list is not updated, or as shown in Figure 30 . The motion vector mvCand of the coding unit decoded together may be stored at the end of the inter-region motion information list. At this time, if the index of HmvpCandList that has the same motion information as mvCand is hIdx, HMVPCandList[i] can be set to HVMPCandList[i-1] for all i larger than hIdx as shown in Figure 30 . When sub-block merge candidates are used in the currently decoded coding unit, motion information of the representative sub-block in the coding unit may be stored in the inter-region motion information list.

일 예로, 코딩 유닛 내 대표 서블 블록은 그림 29와 같이 코딩 유닛 내 좌상단 서브 블록으로 설정하거나, 코딩 유닛 내 중간 서브 블록으로 설정할 수도 있다. As an example, the representative sub-block in the coding unit may be set as an upper left sub-block in the coding unit or as a middle sub-block in the coding unit as shown in FIG. 29 .

Figure pat00049
Figure pat00049

그림 29Fig. 29

서브 블록 단위 머지 후보는 다음 프로세스와 같이 유도할 수 있다. The sub-block unit merge candidate can be derived as follows.

1. 현재 블록의 주변 머지 후보 블록의 모션 벡터로 부터 초기 쉬프트 벡터 (shVector)를 유도할 수 있다. 1. An initial shift vector (shVector) can be derived from a motion vector of a merge candidate block adjacent to the current block.

2. 식 (17)과 같이 코딩 유닛 내 서브 블록의 좌상단 샘플 (xSb,ySb)에 초기 쉬프트 벡터를 가산하여 좌상단 샘플의 위치가 (xColSb, yColSb)인 쉬프트 서브 블록을 유도할 수 있다. 2. As shown in Equation (17), an initial shift vector can be added to the upper left sample (xSb,ySb) of the subblock in the coding unit to derive the shifted subblock having the upper left sample position (xColSb, yColSb).

(xColSb, yColSb) = (xSb + shVector[0]>> 4,ySb+shVector[1]>> 4)(xColSb, yColSb) = (xSb + shVector[0]>> 4,ySb+shVector[1]>> 4) (17)(17)

3. (xColSb, yColSb)를 포함하고 있는 서브 블록의 센터 포지션과 대응되는 collocated block의 모션 벡터를 좌상단 샘플 (xSb,ySb)를 포함하고 있는 서브 블록의 모션 벡터로 유도할 수 있다. 3. The motion vector of the collocated block corresponding to the center position of the sub-block containing (xColSb, yColSb) can be derived as the motion vector of the sub-block containing the upper left sample (xSb,ySb).

Figure pat00050
Figure pat00050

그림 30Fig. 30

인터 영역 모션 정보 리스트에 총 NumHmvp 개의 모션 정보(움직임 벡터 및 참조 픽쳐 인덱스) 를 저장할 수 있으며, NumHmvp을 인터 영역 모션 정보 리스트 크기라고 정의한다. A total of NumHmvp motion information (motion vector and reference picture index) can be stored in the inter-region motion information list, and NumHmvp is defined as the size of the inter-region motion information list.

인터 영역 모션 정보 리스트 크기는 기 정의된 값을 사용할 수 있다. 타일 그룹 헤더에 인터 영역 모션 정보 리스트 크기를 시그날링할 수도 있다. 일 예로, 인터 영역 모션 정보 리스트 크기는 16으로 정의할 수도 있고, 6으로 정의할 수도 있다. The size of the inter-region motion information list may use a predefined value. The inter-region motion information list size may be signaled in the tile group header. For example, the size of the inter-region motion information list may be defined as 16 or 6.

인터 예측이면서 어파인 모션 벡터를 갖는 코딩 유닛에서는 인터 영역 모션 정보 리스트를 갖지 않도록 한정할 수도 있다. In a coding unit that is inter prediction and has an affine motion vector, it may be limited not to have an inter-region motion information list.

또는 인터 예측이면서 어파인 모션 벡터를 갖는 경우에는 어파인 서브 블록 벡터를 인터 영역 모션 정보 리스트에 추가할 수도 있다. 이 때 서브 블록의 위치는 좌상단 또는 우상단, 또는 중앙 서브 블록 등으로 설정할 수도 있다. Alternatively, in the case of inter prediction and having an affine motion vector, the affine sub-block vector may be added to the inter-region motion information list. In this case, the position of the sub-block may be set to the upper left or upper right, or the center sub-block.

또는, 각 컨트롤 포인트의 모션 벡터 평균값을 인터 영역 머지 후보 리스트에 추가할 수도 있다.Alternatively, the average motion vector value of each control point may be added to the inter-region merge candidate list.

특정 코딩 유닛을 부호화/복호화를 수행해서 유도한 움직임 벡터 MV0가 인터 복호화 영역 머지 후보 중 어느 하나와 동일한 경우에는 MV0를 인터 영역 모션 정보 리스트에 추가하지 않을 수 있다. 또는, MV0와 동일한 움직임 벡터를 갖는 기존의 인터 복호화 영역 머지 후보를 삭제하고, MV0를 새롭게 복호화 영역 머지 후보에 포함시켜, MV0에 할당되는 인덱스를 갱신할 수 있다.When the motion vector MV0 derived by encoding/decoding a specific coding unit is the same as any one of the inter-decoding region merge candidates, MV0 may not be added to the inter-region motion information list. Alternatively, an existing inter-decoding region merge candidate having the same motion vector as MV0 may be deleted, and the index allocated to MV0 may be updated by newly including MV0 in the decoding region merge candidate.

인터 영역 모션 정보 리스트 이외에 인터 영역 모션 정보 롱텀 리스트 HmvpLTList를 구성할 수도 있다. 인터 영역 모션 정보 롱텀 리스트 크기는 인터 영역 모션 정보 리스트 크기와 같게 설정하거나, 상이한 값으로 설정할 수 있다. In addition to the inter-region motion information list, an inter-region motion information long term list HmvpLTList may be configured. The inter-region motion information long term list size may be set to be the same as the inter-region motion information list size, or may be set to a different value.

인터 영역 모션 정보 롱텀 리스트는 타일 그룹 시작 위치에 처음 추가한 인터 복호화 영역 머지 후보로 구성될 수 있다. 인터 영역 모션 정보 롱텀 리스트가 모두 가용한 값으로 구성된 이후에 인터 영역 모션 정보 리스트를 구성하거나, 인터 영역 모션 정보 리스트 내 모션 정보를 인터 영역 모션 정보 롱텀 리스트의 모션 정보로 설정할 수도 있다. The inter-region motion information long term list may be composed of an inter-decoding region merge candidate initially added to the tile group start position. After the inter-region motion information long term list is configured with all available values, the inter-region motion information list may be configured, or motion information in the inter-region motion information list may be set as motion information of the inter-region motion information long term list.

이 때 한 번 구성된 인터 영역 모션 정보 롱텀 리스트는 업데이트를 수행하지 않거나, 타일 그룹 중 복호화된 영역이 전체 타일 그룹의 반 이상일 때 다시 업데이트 하거나, m개 CTU 라인마다 업데이트 하도록 설정할 수도 있다. 인터 영역 모션 정보 리스트는 인터 영역으로 복호화될 때마다 업데이트 하거나, CTU 라인 단위로 업데이트 하도록 설정할 수 있다. In this case, the inter-region motion information long-term list configured once may be updated again when no update is performed, a decoded region of the tile group is more than half of the entire tile group, or may be set to be updated every m CTU lines. The inter-region motion information list may be updated whenever the inter-region is decoded, or may be set to be updated in units of CTU lines.

인터 영역 모션 정보 리스트에 모션 정보와 코딩 유닛의 파티션 정보 또는 형태를 저장할 수도 있다. 현재 코딩 유닛과 파티션 정보 및 형태가 유사한 인터 영역 머지 후보만 사용하여 인터 복호화 영역 머지 방법을 수행할 수도 있다. The motion information and partition information or type of the coding unit may be stored in the inter-region motion information list. The inter-decoding region merging method may be performed using only inter-region merge candidates having a similar partition information and shape as the current coding unit.

또는, 블록 형태에 따라 개별적으로 인터 영역 머지 후보 리스트을 구성할 수도 있다. 이 경우, 현재 블록의 형태에 따라, 복수의 인터 영역 머지 후보 리스트 중 하나를 선택하여 사용할 수 있다.Alternatively, an inter-region merge candidate list may be individually configured according to the block type. In this case, one of a plurality of inter-region merge candidate lists may be selected and used according to the shape of the current block.

Figure pat00051
Figure pat00051

그림 31Fig. 31

그림 31과 같이 인터 영역 어파인 모션 정보 리스트와 인터 영역 모션 정보 리스트로 구성할 수도 있다. 복호화된 코딩 유닛이 어파인 인터 또는 어파인 머지 모드인 경우에는 인터 영역 어파인 모션 정보 리스트 HmvpAfCandList에 제1 어파인 시드 벡터와 제 2 어파인 시드 벡터를 저장할 수도 있다. 인터 영역 어파인 머지 후보 리스트에 있는 모션 정보를 인터 복호화 영역 어파인 머지 후보라고 한다. As shown in Figure 31 , it can be composed of an inter-area affine motion information list and an inter-area motion information list. When the decoded coding unit is in affine inter or afine merge mode, the first affine seed vector and the second affine seed vector may be stored in the inter-region afine motion information list HmvpAfCandList. Motion information in the inter-region affine merge candidate list is called an inter-decoding region affine merge candidate.

현재 코딩 유닛에서 사용 가능한 머지 후보는 다음과 같이 구성할 수 있으며, 구성 순서와 같은 탐색 순서를 가질 수 있다. The merge candidates usable in the current coding unit may be configured as follows, and may have the same search order as the configuration order.

1. 공간적 머지 후보 (코딩 블록 인접 머지 후보 및 코딩 블록 비인접 머지 후보)1. Spatial merge candidate (coding block adjacent merge candidate and coding block non-adjacent merge candidate)

2. 시간적 머지 후보 (이전 참조 픽쳐에서 유도한 머지 후보)2. Temporal merge candidate (merge candidate derived from previous reference picture)

3. 인터 복호화 영역 머지 후보3. Inter-decoding domain merge candidate

4. 인터 복호화 영역 어파인 머지 후보4. Inter decoding domain affine merge candidate

5. Zero motion 머지 후보5. Zero motion merge candidate

먼저 머지 후보 리스트는 mergeCandList는 공간적 머지 후보 및 시간적 머지 후보로 구성할 수 있다. 가용한 공간적 머지 후보 및 시간적 머지 후보의 개수를 가용 머지 후보 개수 (NumMergeCand)라고 정의한다. 가용 머지 후보 개수가 머지 최대 허용 개수보다 작은 경우에는 인터 복호화 영역 머지 후보를 머지 후보 리스트 mergeCandList에 추가할 수 있다. First, the merge candidate list mergeCandList may be composed of a spatial merge candidate and a temporal merge candidate. The number of available spatial merge candidates and temporal merge candidates is defined as the number of available merge candidates (NumMergeCand). When the number of available merge candidates is less than the maximum allowable merge number, an inter-decoding region merge candidate may be added to the merge candidate list mergeCandList.

인터 영역 모션 정보 리스트 HmvpCandList를 머지 후보 리스트 mergeCandList에 추가할 때는 인터 영역 모션 정보 리스트 내 인터 복호화 영역 머지 후보의 모션 정보가 기존 머지 리스트 mergeCandList의 모션 정보와 동일한지 여부를 체크할 수 있다. 모션 정보가 동일한 경우에는 머지 리스트 mergeCandList에 추가하지 않고, 모션 정보가 동일하지 않은 경우에는 머지 리스트 mergeCandList에 인터 복호화 영역 머지 후보를 추가할 수 있다.When adding the inter-region motion information list HmvpCandList to the merge candidate list mergeCandList, it may be checked whether motion information of the inter-decoding region merge candidate in the inter-region motion information list is the same as the motion information of the existing merge list mergeCandList. If the motion information is the same, it is not added to the merge list mergeCandList, and if the motion information is not the same, the inter-decoding region merge candidate may be added to the merge list mergeCandList.

인터 복호화 영역 머지 후보 중 인덱스가 큰 것 부터 머지 후보 리스트 mergeCandList에 추가하거나 인덱스가 작은 것 부터 머지 후보 리스트 mergeCandList에 추가할 수 있다. Among the merge candidates of the inter-decoding area, a large index may be added to the merge candidate list mergeCandList, or a small index may be added to the merge candidate list mergeCandList.

인터 복호화 영역 모션 후보를 현재 코딩 유닛의 움직임 정보 예측자 (Motion vector predictor, MVP) 후보로 사용할 수 있으며, 이런 방법을 인터 복호화 영역 움직임 정보 예측 방법이라고 정의한다. The inter decoding region motion candidate can be used as a motion vector predictor (MVP) candidate of the current coding unit, and this method is defined as an inter decoding region motion information prediction method.

인터 복호화 영역 어파인 모션 후보를 현재 코딩 유닛의 움직임 정보 예측자 (Motion vector predictor, MVP) 후보로 사용할 수 있으며, 이런 방법을 인터 복호화 영역 움직임 정보 어파인 예측 방법이라고 정의한다. An inter-decoding region affine motion candidate can be used as a motion vector predictor (MVP) candidate of the current coding unit, and this method is defined as an inter-decoding region motion information affine prediction method.

현재 코딩 유닛에서 사용 가능한 움직임 정보 예측자 후보는 다음과 같이 구성할 수 있으며, 구성 순서와 같은 탐색 순서를 가질 수 있다. Motion information predictor candidates usable in the current coding unit may be configured as follows, and may have the same search order as the configuration order.

1. 공간적 움직임 예측자 후보 (코딩 블록 인접 머지 후보 및 코딩 블록 비인접 머지 후보와 동일)1. Spatial motion predictor candidate (same as the coding block adjacent merge candidate and the coding block non-adjacent merge candidate)

2. 시간적 머지 후보 (이전 참조 픽쳐에서 유도한 움직임 예측자 후보)2. Temporal merge candidate (motion predictor candidate derived from previous reference picture)

3. 인터 복호화 영역 머지 후보3. Inter-decoding domain merge candidate

4. 인터 복호화 영역 어파인 머지 후보4. Inter decoding domain affine merge candidate

5. Zero motion 움직임 예측자 후보5. Zero motion motion predictor candidate

2.72.7 삼각 예측 유닛 부호화 방법Triangular prediction unit coding method

코딩 유닛을 복수의 예측 유닛으로 분할할 수 있다. 구체적으로, 수직선, 수평선 또는 대각선 등 적어도 하나의 라인을 이용하여, 코딩 유닛을 복수의 예측 유닛으로 부호화할 수 있다. 코딩 유닛을 분할하는 라인의 개수, 각도 중 적어도 하나에 대한 정보가 비트스트림을 통해 시그널링될 수 있다. 또는, 코딩 유닛의 인트라 예측 모드, 인터 예측 모드, 이용 가능한 머지 후보의 위치 등에 따라, 코딩 유닛을 분할하는 라인의 개수, 각도 중 적어도 하나가 적응적으로 결정될 수 있다. 코딩 유닛을 복수의 예측 유닛으로 분할하고, 분할된 예측 유닛 단위로, 인트라 예측 또는 인터 예측을 수행할 수 있다.The coding unit can be divided into a plurality of prediction units. Specifically, the coding unit may be encoded as a plurality of prediction units using at least one line such as a vertical line, a horizontal line, or a diagonal line. Information on at least one of the number and angle of the number of lines dividing the coding unit may be signaled through the bitstream. Alternatively, at least one of the number of lines and angles for dividing the coding unit may be adaptively determined according to the intra prediction mode, the inter prediction mode, and the position of an available merge candidate of the coding unit. The coding unit may be divided into a plurality of prediction units, and intra prediction or inter prediction may be performed in units of the divided prediction units.

그림 4는 대각선을 이용하여 코딩 유닛을 2개의 예측 유닛으로 분할한 예를 나타낸다. 대각선을 이용하여 코딩 유닛을 2개의 예측 유닛으로 분할하는 것을 대각 파티셔닝이라 정의할 수 있다. 그림 4에서는 코딩 유닛이 크기가 같은 2개의 삼각 형태 예측 유닛으로 분할된 것으로 도시되었다. 도시된 예에서와 달리, 코딩 유닛을 크기가 상이한 2개의 예측 유닛으로 분할할 수도 있다. 예컨대, 코딩 유닛을 분할하는 대각선의 좌상단이 코딩 블록의 좌상단 코너가 아닌 코딩 유닛의 좌측 경계 또는 상단 경계를 만나도록 설정하거나, 대각선의 좌상단이 코딩 블록의 우하단 코너가 아닌 코딩 유닛의 우측 경계 또는 하단 경계를 지나도록 설정할 수 있다. Fig. 4 shows an example of dividing a coding unit into two prediction units using a diagonal line. Dividing a coding unit into two prediction units using a diagonal line may be defined as diagonal partitioning. In Figure 4, it is shown that the coding unit is divided into two triangular shape prediction units having the same size. Unlike in the illustrated example, the coding unit may be divided into two prediction units having different sizes. For example, the upper left corner of the diagonal that divides the coding unit is set to meet the left boundary or the upper boundary of the coding unit other than the upper left corner of the coding block, or It can be set to cross the lower boundary.

그림 32의 좌측 그림을 좌삼각 파티셔닝이라고 부르고, 그림 32의 오른쪽 그림을 우삼각 파티셔닝이라고 부른다. 코딩 유닛의 좌상단 또는 좌하단 샘플이 속한 예측 유닛을 좌삼각 예측 유닛이라고 부르고, 코딩 유닛의 우상단 또는 우하단 샘플이 속한 예측 유닛을 우삼각 예측 유닛이라고 부르며, 우삼각 예측 유닛 또는 좌삼각 예측 유닛을 통칭하여 삼각 예측 유닛이라고 부른다. The left figure in Figure 32 is called the left triangular partitioning, and the right figure in Figure 32 is called the right triangular partitioning. The prediction unit to which the upper left or lower left sample of the coding unit belongs is called a left triangular prediction unit, the prediction unit to which the upper right or lower right sample of the coding unit belongs is called a right triangular prediction unit, and the right triangular prediction unit or left triangular prediction unit is called It is collectively called a triangular prediction unit.

Figure pat00052
Figure pat00052

그림 32Fig. 32

하드웨어 구현상 64x64 형태의 데이터 유닛보다 큰 영역의 움직임 형태를 가지는 경우에는 64x64 데이터 유닛을 중복해서 엑세스해야하는 단점이 발생한다. 이에, 코딩 유닛의 너비 또는 높이 중 적어도 어느 하나가 64보다 큰 경우(예컨대, 너비 또는 높이 중 적어도 어느 하나가 128인 경우)에는 삼각 예측 유닛을 사용하지 않도록 제한할 수도 있다. 구체적으로 예를 들어, 그림 33과 같이 128xN 형태의 코딩 유닛 또는 Nx128 형태의 코딩 유닛에서는 삼각 예측 유닛을 사용하지 않도록 제한할 수도 있다. 여기서 N은 64보다 작거나 같은 값을 나타낸다. In hardware implementation, when the motion type of the area is larger than that of the 64x64 data unit, there is a disadvantage that the 64x64 data unit must be accessed repeatedly. Accordingly, when at least one of the width or height of the coding unit is greater than 64 (eg, when at least one of the width or height is 128), the use of the triangular prediction unit may be restricted. Specifically, for example, in a 128xN coding unit or an Nx128 coding unit, as shown in Figure 33 , it may be restricted not to use a triangular prediction unit. Here, N represents a value less than or equal to 64.

Figure pat00053
Figure pat00053

그림 33Fig. 33

또는, 코딩 블록의 너비 또는 높이 중 적어도 하나가 문턱값보다 큰 경우 대각 파티셔닝을 허용하지 않을 수 있다. 여기서, 문턱값은 인코더/디코더에서 기 정의된 값일 수도 있고, 문턱값에 관한 정보가 비트스트림을 통해 시그널링될 수도 있다.Alternatively, when at least one of the width or height of the coding block is greater than the threshold value, diagonal partitioning may not be allowed. Here, the threshold value may be a value predefined in the encoder/decoder, or information about the threshold value may be signaled through a bitstream.

또는, 병렬 처리 영역(Merge Estimation Region)의 크기와 코딩 블록의 크기에 따라, 대각 파티셔닝의 허용 여부를 결정할 수도 있다. 예컨대, 코딩 블록이 병렬 처리 영역보다 큰 경우, 대각 파티셔닝을 허용하지 않을 수 있다.Alternatively, it may be determined whether to allow diagonal partitioning according to the size of the Merge Estimation Region and the size of the coding block. For example, when the coding block is larger than the parallel processing region, diagonal partitioning may not be allowed.

또는, 코딩 유닛에 포함된 샘플 개수에 따라 대각 파티셔닝의 허용 여부를 결정할 수도 있다. 예컨대, 코딩 유닛에 포함된 샘플 개수가 M개 이하인 경우 또는 코딩 유닛에 포함된 샘플 개수가 N개 이상인 경우, 대각 파티셔닝이 허용되지 않을 수 있다.Alternatively, it may be determined whether to allow diagonal partitioning according to the number of samples included in the coding unit. For example, when the number of samples included in the coding unit is M or less, or when the number of samples included in the coding unit is N or more, diagonal partitioning may not be allowed.

코딩 유닛의 형태에 따라, 대각 파티셔닝의 허용 여부를 결정할 수 있다. 구체적으로, 코딩 유닛의 너비가 코딩 유닛의 높이 비가 큰 경우에는 또는 코딩 유닛 형태 비율 (whRatio)이 특정 범위일때만 대각 예측 유닛 부호화 방법을 사용하도록 제한할 수도 있다. 여기서 코딩 유닛 형태 비율은 다음 식 (18)과 같이 (코딩 유닛의 너비(cbWsize) : 코딩 유닛의 높이 비(cbHSize))로 정의할 수 있다. Depending on the type of coding unit, it is possible to determine whether to allow diagonal partitioning. Specifically, it may be limited to use the diagonal prediction unit coding method only when the width of the coding unit is a high ratio of the height of the coding unit or the coding unit type ratio (whRatio) is within a specific range. Here, the coding unit type ratio can be defined as (coding unit width (cbWsize): coding unit height ratio (cbHSize)) as shown in the following equation (18).

whRatio_CU = cbWSize/cbHSizewhRatio_CU = cbWSize/cbHSize (18)(18)

whRatio_CU 가 k보다 작거나 1/k 보다 큰 경우에만 대각 예측 유닛 부호화 방법을 사용하도록 제한할 수 있다. 구체적으로 예를 들어, k값을 16으로 설정하는 경우에는 64x4 크기 또는 4x64의 코딩 유닛에서는 대각 예측 유닛 부호화를 사용하지 않도록 제한할 수도 있다. The diagonal prediction unit encoding method may be limited to be used only when whRatio_CU is smaller than k or larger than 1/k. Specifically, for example, when the k value is set to 16, it may be limited not to use diagonal prediction unit coding in a coding unit of 64x4 size or 4x64.

리프 노드인 코딩 유닛의 부모 노드의 분할 방법에 따라 대각 파티셔닝의 허용 여부가 결정될 수 있다. 예컨대, 부모 노드가 QT 분할된 경우, 리프 노드인 코딩 유닛에는 대각 파티셔닝이 허용되는 한편, 부모 노드가 BT/TT 분할된 경우, 리프 노드인 코딩 유닛에는 대각 파티셔닝이 허용되지 않을 수 있다.Whether to allow diagonal partitioning may be determined according to a method of dividing a parent node of a coding unit that is a leaf node. For example, when the parent node is QT-divided, diagonal partitioning may be allowed for a coding unit that is a leaf node, while when the parent node is BT/TT-divided, diagonal partitioning may not be allowed for a coding unit that is a leaf node.

또는 정방형태 코딩 유닛에서만 삼각 예측 유닛을 사용하고, 비정방 형태 코딩 유닛에서는 삼각 예측 유닛을 사용하지 않도록 제한할 수도 있다. Alternatively, the triangular prediction unit may be used only in the square coding unit, and the triangular prediction unit may not be used in the amorphous coding unit.

또는, 코딩 트리 유닛, 타일, 타일 세트(타일 그룹), 픽처 또는 시퀀스 단위로 대각 파티셔닝의 허용 여부를 나타내는 정보가 시그널링될 수 있다. Alternatively, information indicating whether diagonal partitioning is allowed in units of coding tree units, tiles, tile sets (tile groups), pictures or sequences may be signaled.

또는, 코딩 유닛이 인트라 예측으로 부호화된 경우, 코딩 유닛이 인터 예측으로 부호화된 경우, 또는 코딩 유닛이 특정 인터 예측 모드(예컨대, 머지 모드, AMVP 모드, ATMVP 모드, 또는 어파인 모드 중 어느 하나)로 부호화된 경우에 한하여, 대각 파티셔닝이 허용될 수 있다.Or, when the coding unit is coded by intra prediction, when the coding unit is coded by inter prediction, or when the coding unit is a specific inter prediction mode (e.g., any one of merge mode, AMVP mode, ATMVP mode, or afine mode) Diagonal partitioning may be allowed only in the case of coded as.

코딩 유닛에 대각 파티셔닝을 적용할 것인지 여부를 나타내는 정보가 비트스트림을 통해 시그널링될 수 있다. 예컨대, 코딩 유닛에 대각 파티셔닝이 적용되는지 여부를 나타내는 신택스인 트라이앵글 파티션 플래그(merge_triangle_flag)를 CU 단위로 시그널링할 수 있다.Information indicating whether to apply diagonal partitioning to the coding unit may be signaled through a bitstream. For example, a triangle partition flag (merge_triangle_flag), which is a syntax indicating whether diagonal partitioning is applied to the coding unit, may be signaled in units of CU.

또한, 대각 파티셔닝의 방향을 나타내는 정보가 비트스트림을 통해 시그널링될 수 있다. 예컨대, CU 단위로 좌삼각 파티셔닝을 사용했는지 우삼각 파티셔닝을 사용했는지를 나타 내는 신택스인 트라이앵글 파티션 타입 플래그 (merge_triangle_split_dir)를 CU 단위로 시그날링할 수도 있다. triangle_partion_type_flag 값이 0 이면, 좌삼각 파티션을 나타내고, merge_triangle_split_dir 값이 1 이면, 우삼각 파티션을 나타낸다. 또는, 코딩 트리 유닛 단위, 타일 단위 또는 타일 세트(타일 그룹) 단위로 대각 파티셔닝의 방향을 나타내는 정보가 시그널링될 수 있다. 이 경우, 상기 정보가 시그널링되는 레벨에 포함된 코딩 유닛들 중 대각 파티셔닝이 적용되는 코딩 유닛들은 동일한 파티션 형태를 가질 수 있다.In addition, information indicating the direction of diagonal partitioning may be signaled through a bitstream. For example, a triangle partition type flag (merge_triangle_split_dir), a syntax indicating whether the left triangular partitioning is used or the right triangular partitioning is used in units of CU, may be signaled in units of CU. If the triangle_partion_type_flag value is 0, it indicates the left triangular partition, and if the merge_triangle_split_dir value is 1, it indicates the right triangular partition. Alternatively, information indicating the direction of diagonal partitioning may be signaled in units of coding tree units, in units of tiles, or in units of tile sets (tile groups). In this case, among the coding units included in the level at which the information is signaled, the coding units to which the diagonal partitioning is applied may have the same partition shape.

다른 예로, 코딩 유닛의 삼각 파티셔닝 타입은, 코딩 유닛에 이웃하는 이웃 코딩 유닛의 삼각 파티셔닝 타입을 기초로 결정될 수 있다. 일 예로, 코딩 유닛의 삼각 파티셔닝 타입은 이웃 코딩 유닛의 삼각 파티셔닝 타입과 동일하게 결정될 수 있다. 여기서, 이웃 코딩 유닛은, 현재 코딩 유닛의 대각 방향에 인접 위치하는 이웃 블록, 현재 코딩 유닛의 상단 또는 좌측에 인접 위치하는 이웃 블록을 포함할 수 있다.As another example, the triangular partitioning type of the coding unit may be determined based on the triangular partitioning type of a neighboring coding unit adjacent to the coding unit. For example, the triangular partitioning type of the coding unit may be determined to be the same as the triangular partitioning type of the neighboring coding unit. Here, the neighboring coding unit may include a neighboring block positioned adjacent to the diagonal direction of the current coding unit, and a neighboring block positioned adjacent to the top or left of the current coding unit.

CTU 내 첫번째 삼각 파티셔닝이 적용되는 코딩 유닛에 대해서는 대각 파티셔닝의 방향을 나타내는 정보를 시그널링하는 한편, 삼각 파티셔닝이 적용되는 두번째 이후 코딩 유닛에는 첫번째 코딩 유닛과 동일한 대각 파티셔닝 방향을 적용할 수 있다. Information indicating the direction of diagonal partitioning is signaled to the coding unit to which the first triangular partitioning is applied in the CTU, while the same diagonal partitioning direction as the first coding unit may be applied to the second and subsequent coding units to which the triangular partitioning is applied.

좌삼각 예측 유닛과 우삼각 예측 유닛은 각각 움직임 벡터와 참조 픽쳐 인덱스를 가질 수 있다. 삼각 예측 유닛의 움직임 벡터는 그림 34와 같이 공간적 머지 후보 리스트와 시간적 머지 후보 리스트로 구성된 삼각 머지 후보 리스트에서 유도할 수 있다. 최대 M개의 삼각 머지 후보를 가질 수 있으며, M을 삼각 머지 후보 최대 값이라고 부른다. The left triangular prediction unit and the right triangular prediction unit may each have a motion vector and a reference picture index. The motion vector of the triangular prediction unit can be derived from a triangular merge candidate list consisting of a spatial merge candidate list and a temporal merge candidate list as shown in Figure 34 . It can have a maximum of M triangular merge candidates, and M is called a triangular merge candidate maximum value.

삼각 예측 유닛들은 상이한 머지 후보 리스트를 이용할 수 있다. 일 예로, 우삼각 예측 유닛의 머지 후보 리스트는, 좌삼각 예측 유닛의 머지 후보들 중 좌삼각 예측 유닛의 머지 후보 인덱스가 가리키는 머지 후보를 제외한 나머지 머지 후보들을 이용하여 구성될 수 있다. 좌삼각 예측 유닛과 우삼각 예측 유닛의 삼각 머지 후보 최대값을 상이하게 설정할 수 있다. 일 예로, 좌삼각 예측 유닛은 M개의 삼각 머지 후보를 갖는 한편, 우삼각 예측 유닛은 좌삼각 예측 유닛의 머지 후보 인덱스가 가리키는 머지 후보를 제외한 M-1개의 삼각 머지 후보를 가질 수 있다.Triangular prediction units may use different merge candidate lists. As an example, the merge candidate list of the right triangular prediction unit may be constructed using the remaining merge candidates excluding the merge candidate indicated by the merge candidate index of the left triangular prediction unit among merge candidates of the left triangular prediction unit. The triangular merge candidate maximum values of the left triangular prediction unit and the right triangular prediction unit may be differently set. As an example, the left triangular prediction unit may have M triangular merge candidates, while the right triangular prediction unit may have M-1 triangular merge candidates excluding merge candidates indicated by the merge candidate index of the left triangular prediction unit.

다른 예로, 삼각 예측 유닛들은 하나의 머지 후보 리스트를 공유할 수 있다.As another example, triangular prediction units may share one merge candidate list.

삼각 머지 후보는 기 정의된 순서로 머지 후보 리스트에 추가될 수 있다. 일 예로 그림 34의 머지 후보 중 다음 순서를 사용할 수도 있다. The triangular merge candidates may be added to the merge candidate list in a predefined order. As an example, the following order among the merge candidates in Figure 34 may be used.

0 --> 1 --> 2 --> 3 --> 7 --> 4 --> 6 0 --> 1 --> 2 --> 3 --> 7 --> 4 --> 6

삼각 머지 후보 리스트에서 선택된 후보 블록은 삼각 머지 후보 인덱스(merge_triangle_idx)로 나타낼 수 있다. 삼각 머지 후보 인덱스는 좌삼각 머지 후보 인덱스(merge_triangle_idx0) 및 우삼각 머지 후보 인덱스(merge_triangle_idx1)로 구성할 수 있다. The candidate block selected from the triangular merge candidate list may be represented by a triangular merge candidate index (merge_triangle_idx). The triangular merge candidate index may consist of a left triangular merge candidate index (merge_triangle_idx0) and a right triangular merge candidate index (merge_triangle_idx1).

Figure pat00054
Figure pat00054

그림 34Fig. 34

좌삼각 머지 후보 인덱스 또는 우삼각 머지 후보 인덱스 중 어느 하나만 시그날링하고, 다른 삼각 머지 후보 인덱스는 시그날링된 머지 후보 인덱스로부터 유도할 수 있다.Only one of the left triangular merge candidate index or the right triangular merge candidate index may be signaled, and the other triangular merge candidate index may be derived from the signaled merge candidate index.

일 예로, 좌삼각 머지 후보 인덱스만 시그날링하고, 좌삼각 머지 후보 인덱스와 이웃한 머지 후보 인덱스를 우삼각 머지 후보 인덱스로 유도할 수 있다. As an example, only a left triangular merge candidate index may be signaled, and a left triangular merge candidate index and a neighboring merge candidate index may be derived as a right triangular merge candidate index.

구체적으로 예를 들어, 좌삼각 머지 후보 인덱스가 N이면, 우삼각 머지 후보 인덱스를 N+1로 유도할 수 있다. 좌삼각 머지 후보 인덱스만 부호화할 수 있고, 우삼각 머지 후보 인덱스는 부호화 하지 않고, 좌삼각 머지 후보 인덱스에서 유도할 수 있다. Specifically, for example, if the left triangular merge candidate index is N, the right triangular merge candidate index may be derived as N+1. Only the left triangular merge candidate index can be encoded, the right triangular merge candidate index is not encoded, and can be derived from the left triangular merge candidate index.

좌삼각 머지 후보 인덱스 N이 삼각 머지 후보 최대 값인 경우에는, 우삼각 머지 후보 인덱스는 N-1로 유도하거나, 0으로 유도할 수도 있다. When the left triangular merge candidate index N is the triangular merge candidate maximum value, the right triangular merge candidate index may be derived as N-1 or 0.

또는, 좌삼각 머지 후보 인덱스가 가리키는 머지 후보와 동일한 참조 픽처를 갖는 머지 후보로부터 우삼각 예측 유닛의 움직임 정보를 유도할 수 있다. 여기서, 동일한 참조 픽처는 L0 참조 픽처 또는 L1 참조 픽처 중 적어도 하나가 동일한 머지 후보를 나타낼 수 있다. 참조 픽처가 동일한 머지 후보가 복수개인 경우, 양방향 예측 여부 또는 좌삼각 머지 후보 인덱스가 가리키는 머지 후보와의 인덱스 차분값을 기초로 어느 하나를 선택할 수 있다.Alternatively, motion information of the right triangular prediction unit may be derived from a merge candidate having the same reference picture as the merge candidate indicated by the left triangular merge candidate index. Here, the same reference picture may represent a merge candidate in which at least one of the L0 reference picture and the L1 reference picture is the same. When there are a plurality of merge candidates having the same reference picture, either one may be selected based on whether bi-directional prediction or an index difference value with the merge candidate indicated by the left triangular merge candidate index.

좌삼각 머지 후보 인덱스(merge_triangle_idx0) 및 우삼각 머지 후보 인덱스(merge_triangle_idx1)를 각각 시그날링할 수도 있다.. 좌삼각 예측 유닛이 움직임 정보는 제1 머지 후보 인덱스에 의해 시그널링되는 머지 후보로부터 유도되고, 우삼각 예측 유닛의 움직임 정보는 제2 머지 후보 인덱스에 의해 시그널링되는 머지 후보로부터 유도될 수 있다. The left triangular merge candidate index (merge_triangle_idx0) and the right triangular merge candidate index (merge_triangle_idx1) may be signaled, respectively. The motion information of the left triangular prediction unit is derived from the merge candidate signaled by the first merge candidate index and is derived from the right triangular merge candidate index. The motion information of the triangular prediction unit may be derived from the merge candidate signaled by the second merge candidate index.

이때, 좌삼각 예측 유닛의 제1 머지 후보 인덱스가 가리키는 머지 후보는 우삼각 예측 유닛의 머지 후보로 이용 가능하지 않도록 설정될 수 있다. 이에 따라, 제2 머지 후보 인덱스는 제1 머지 후보 인덱스가 가리키는 머지 후보를 제외한 잔여 머지 후보들 중 어느 하나를 가리킬 수 있다. 일 예로, 제2 머지 후보 인덱스의 값이 제1 머지 후보 인덱스의 값보다 작은 경우, 우삼각 예측 유닛의 움직임 정보는 머지 후보 리스트에 포함된 머지 후보들 중 제2 머지 후보 인덱스와 동일한 인덱스를 갖는 머지 후보로부터 유도될 수 있다. 반면, 제2 머지 후보 인덱스의 값이 제1 머지 후보 인덱스의 값과 동일하거나, 제1 머지 후보 인덱스보다 큰 경우, 우삼각 예측 유닛의 움직임 정보는 머지 후보 리스트에 포함된 머지 후보들 중 제2 머지 후보 인덱스보다 1이 큰 인덱스를 갖는 머지 후보로부터 유도될 수 있다.In this case, the merge candidate indicated by the first merge candidate index of the left triangular prediction unit may be set not to be usable as a merge candidate of the right triangular prediction unit. Accordingly, the second merge candidate index may indicate any one of the remaining merge candidates excluding the merge candidate indicated by the first merge candidate index. As an example, when the value of the second merge candidate index is smaller than the value of the first merge candidate index, the motion information of the right triangular prediction unit is a merge having the same index as the second merge candidate index among merge candidates included in the merge candidate list. Can be derived from candidates. On the other hand, when the value of the second merge candidate index is the same as the value of the first merge candidate index or is greater than the first merge candidate index, the motion information of the right triangular prediction unit is the second merge candidate among merge candidates included in the merge candidate list. It can be derived from a merge candidate having an index of 1 greater than the candidate index.

2.82.8 크로마 샘플 공유 유닛 Chroma sample sharing unit

크로마 샘플의 개수 또는 크로마 성분 코딩 블록의 크기/형태 중 적어도 하나에 기초하여 코딩 블록에 대한 분할의 허용 여부를 결정할 수 있다. 여기서, 코딩 블록의 크기는, 코딩 블록의 너비, 코딩 블록의 높이 또는 코딩 블록의 너비와 높이의 곱을 기초로 산출된 값 중 적어도 하나를 의미할 수 있다.Whether to allow partitioning of the coding block may be determined based on at least one of the number of chroma samples or the size/type of the chroma component coding block. Here, the size of the coding block may mean at least one of a width of a coding block, a height of a coding block, or a value calculated based on a product of a width and a height of the coding block.

일 예로, 크로마 샘플의 개수가 특정 임계값 (이하, 크로마 허용 샘플 임계값)보다 작아지는 코딩 블록의 분할 형태는 허용하지 않을 수도 있다. 또는, 크로마 코딩 블록의 너비 또는 높이가 특정 임계값보다 작아지는 코딩 블록의 분할 형태는 허용하지 않을 수 있다. As an example, a partitioning form of a coding block in which the number of chroma samples is smaller than a specific threshold (hereinafter, a chroma-allowable sample threshold) may not be allowed. Alternatively, a division type of a coding block in which the width or height of the chroma coding block is smaller than a specific threshold value may not be allowed.

또는, 루마 성분과 크로마 성분의 파티션 타입이 상이한 경우(즉, separate tree를 사용하는 경우), 크로마 샘플의 개수가 크로마 허용 샘플 임계값보다 작아지는 코딩 블록의 분할 형태는 허용하지 않을 수 있다. Alternatively, when the partition types of the luma component and the chroma component are different (ie, when a separate tree is used), the partitioning form of the coding block in which the number of chroma samples is smaller than the chroma-permissible sample threshold may not be allowed.

또는, 예측 모드와 크로마 허용 샘플 임계값에 기초하여 크로마 코딩 블록의 분할 허용 여부가 결정될 수 있다. 일 예로, 인트라 예측 모드이면, 크로마 샘플의 개수가 크로마 허용 샘플 임계값보다 작아지는 코딩 블록의 분할 형태를 허용하지 않을 수 있다. 반면, 인터 예측 모드이면, 크로마 샘플의 개수가 크로마 허용 샘플 임계값보다 작아지는 코딩 블록의 분할 형태가 허용될 수 있다.Alternatively, whether to allow division of the chroma coding block may be determined based on the prediction mode and the chroma allowed sample threshold. As an example, in the intra prediction mode, a partitioning form of a coding block in which the number of chroma samples is smaller than a chroma-allowable sample threshold value may not be allowed. On the other hand, in the inter prediction mode, a partitioning form of a coding block in which the number of chroma samples is smaller than a chroma-allowable sample threshold may be allowed.

일 예로, 크로마 허용 샘플 임계값이 16인 경우 크로마 샘플의 개수가 16 보다 크거나 같은 크기로 크로마 코딩 블록을 생성할 수 있다. 크로마 샘플의 개수가 크로마 허용 샘플 임계값과 동일한 코딩 블록을 크로마 최소 단위 코딩 블록이라 정의할 수 있다. For example, when the chroma-allowable sample threshold is 16, the number of chroma samples may be greater than or equal to 16 to generate a chroma coding block. A coding block in which the number of chroma samples is the same as the chroma-permitted sample threshold may be defined as a chroma minimum unit coding block.

크로마 최소 단위 코딩 블록에 대응되는 루마 블록은 추가 파티셔닝이 허용될 수 있다. 그림 31은 루마 블록과 크로마 블록의 분할 양상을 나타낸다. 얇은 실선은 루마 블록의 분할 양상을 나타낸 것이고, 두꺼운 실선은 크로마 블록의 분할 양상을 나타낸 것이다. 크로마 허용 샘플 임계값이 16인 경우, 그림 35와 같이 최소 16개 이상의 샘플을 포함하도록 크로마 코딩 블록을 생성할 수 있다. 그림 35와 같이, 크로마 코딩 블록에 대응하는 루마 코딩 블록은 추가 분할될 수 있다. Additional partitioning may be allowed for the luma block corresponding to the chroma minimum unit coding block. Fig. 31 shows the partitioning pattern of luma block and chroma block. The thin solid line shows the division pattern of the luma block, and the thick solid line shows the division pattern of the chroma block. If the chroma-tolerant sample threshold is 16, a chroma coding block can be generated to include at least 16 samples as shown in Figure 35. As shown in Figure 35, the luma coding block corresponding to the chroma coding block can be further divided.

Figure pat00055
Figure pat00055

그림 35Fig. 35

루마 코딩 블록의 분할을 크로마 코딩 블록의 분할에 적용할 것인지는 루마 코딩 블록의 분할 결과로 생성된 파티션 중 적어도 하나의 크로마 샘플의 개수가 크로마 허용 샘플 임계값보다 작은지 여부를 기초로 결정될 수 있다. 일 예로, 그림 35에서 32개의 크로마 샘플에 대응하는 루마 코딩 블록이 트리플 트리 분할된 것으로 가정할 때, 크로마 코딩 블록에도 상기 트리플 트리 분할을 적용하게 되면, 트리플 트리 분할 결과로 생성되는 2x4 형태의 파티션들은 크로마 허용 샘플 임계값보다 작은 개수의 크로마 샘플을 포함하게 된다. 이에 따라, 루마 코딩 블록에 적용되었던 트리플 트리 분할을 크로마 코딩 블록에는 적용하지 않을 수 있다. Whether to apply the division of the luma coding block to the division of the chroma coding block may be determined based on whether the number of at least one chroma sample among the partitions generated as a result of the division of the luma coding block is less than the chroma-allowable sample threshold. As an example, assuming that the luma coding block corresponding to 32 chroma samples in Figure 35 is triple-tree partitioned, if the triple-tree partitioning is applied to the chroma coding block as well, a 2x4 type partition generated as a result of triple-tree partitioning Are included in the number of chroma samples smaller than the chroma-tolerant sample threshold. Accordingly, the triple tree division applied to the luma coding block may not be applied to the chroma coding block.

크로마 허용 샘플 임계값은 픽쳐 파라미터 헤더, 슬라이스 헤더 또는 CTU (Coding Tree Unit) 단위 중 적어도 어느 하나의 위치에 크로마 허용 샘플 임계값을 나타내는 신택스 smallest_chroma_unit_minus4를 비트스트림을 통해 시그날링할 수 있다. 이 때, 크로마 허용 샘플 임계값은 1 << (smallest_chroma_unit_minus4 +4) 로 설정할 수 있다. The chroma-allowable sample threshold may signal a syntax smallest_chroma_unit_minus4 indicating a chroma-allowable sample threshold at at least one of a picture parameter header, a slice header, or a CTU (Coding Tree Unit) unit through a bitstream. In this case, the chroma-allowable sample threshold may be set to 1 << (smallest_chroma_unit_minus4 +4).

일 예로, 크로마 허용 샘플 임계값이 32인 경우에는 smallest_chroma_unit_minus4를 1로 설정할 수 있다. For example, when the chroma-allowed sample threshold is 32, smallest_chroma_unit_minus4 may be set to 1.

또는, 칼라 포맷에 기초하여 크로마 허용 샘플 임계값이 결정될 수 있다.Alternatively, a chroma acceptable sample threshold may be determined based on the color format.

크로마 최소 단위 코딩 블록에서는 서브 파티션 인트라 예측 방법(ISP), 위치 기반 예측 샘플 보정 방법(PDPC) 또는 복수 참조 샘플 라인 중 적어도 하나를 사용하지 않도록 설정할 수도 있다. In the chroma minimum unit coding block, at least one of a sub-partition intra prediction method (ISP), a position-based prediction sample correction method (PDPC), or a plurality of reference sample lines may be set not to be used.

33 변환 및 양자화Transform and quantization

원본 영상에서 예측 영상을 차분한 영상을 잔차 영상(residual)이라 한다. An image obtained by subtracting the predicted image from the original image is called a residual image.

잔차 영상에 DCT(Discrete cosine transform)와 같은 2차원 변환(Transform)을 통하여 2원 주파수 성분으로 분해할 수 있다. 영상에서 고주파 성분을 제거해도 시각적으로 왜곡이 크게 발생하지 않는 특성이 있다. 고주파에 해당하는 값을 작게 하거나 0으로 설정하면 시각적 왜곡이 크지 않으면서도 압축 효율을 크게 할 수 있다. The residual image can be decomposed into binary frequency components through a two-dimensional transform such as a discrete cosine transform (DCT). Even if high-frequency components are removed from an image, there is a characteristic that significant distortion does not occur visually. If the value corresponding to the high frequency is decreased or set to 0, the compression efficiency can be increased while the visual distortion is not large.

예측 블록의 크기나 예측 모드에 따라 DST (Discrete sine transform)을 사용할 수도 있다. 구체적으로 예를 들어, 인트라 예측 모드이고, 예측 블록/코딩 블록의 크기가 NxN 보다 작은 크기인 경우에는 DST 변환을 사용하도록 설정하고, 그 외의 예측 블록/코딩 블록에서는 DCT를 사용하도록 설정할 수도 있다. Discrete sine transform (DST) may be used according to the size of the prediction block or the prediction mode. Specifically, for example, when the prediction block/coding block is in an intra prediction mode and the size of the prediction block/coding block is smaller than NxN, the DST transform may be used, and other prediction blocks/coding blocks may be set to use DCT.

DCT는 영상을 코사인 (cosine) 변환을 이용하여 2차원 주파수 성분으로 분해(변환)하는 처리이고, 그 때의 주파수 성분들은 기저 영상으로 표현된다. 예를 들어, NxN 블록에서 DCT 변환을 수행하면 N2 개의 기본 패턴 성분을 얻을 수 있다. DCT 변환을 수행한다는 것은 원화소 블록에 포함된 기본 패턴 성분들 각각의 크기를 구하는 것이다. 각 기본 패턴 성분들의 크기는 DCT 계수라고 정의 한다. DCT is a process that decomposes (transforms) an image into 2D frequency components using a cosine transform, and the frequency components at that time are expressed as a base image. For example, if DCT transformation is performed in an NxN block, N 2 basic pattern components can be obtained. Performing DCT transformation is to obtain the size of each of the basic pattern components included in the original pixel block. The size of each basic pattern component is defined as a DCT coefficient.

대체적으로 저주파에 0이 아닌 성분들이 많이 분포하는 영상에서는 이산 여현 변환(Discrete Cosine Transform, DCT)을 주로 사용하고, 고주파 성분이 많이 분포하는 영상에서는 DST (Discrete Sine Transform)을 사용할 수도 있다. In general, a discrete cosine transform (DCT) is mainly used for an image in which many non-zero components are distributed in a low frequency, and a Discrete Sine Transform (DST) may be used for an image in which a large number of high-frequency components are distributed.

DST는 영상을 sin 변환을 이용하여 2차원 주파수 성분으로 분해(변환)하는 처리를 나타낸다. DCT 또는 DST 변환 이외의 변환 방법을 사용하여 2차원 영상을 2차원 주파수 성분으로 분해(변환)할 수 있으며, 이를 2차원 영상 변환이라고 정의 한다. DST represents a process of decomposing (converting) an image into 2D frequency components using sin transformation. A 2D image can be decomposed (transformed) into 2D frequency components using a transformation method other than DCT or DST transformation, and this is defined as 2D image transformation.

잔차 영상 중 특정 블록에서는 2차원 영상 변환을 수행하지 않을 수 있으며, 이를 변환 스킵(transform skip)이라고 정의 한다. 변환 스킵 이후에 양자화를 적용할 수 있다. 변환 스킵의 허용 여부는, 코딩 유닛의 크기 또는 형태 중 적어도 하나에 기초하여 결정될 수 있다. 일 예로, 변환 스킵은 특정 크기 이하의 코딩 유닛에서만 사용하도록 제한할 수도 있다. 예를 들어, 32x32보다 작은 블록에서만 변환 스킵을 사용하도록 설정할 수도 있다. 또는, 정방형태 블록에서만 변환 스킵을 사용하도록 제한할 수도 있다. 구체적으로 예를 들어, 32x32, 16x16, 8x8, 4x4 블록 단위로 변환 스킵을 적용할 수도 있다. Among the residual images, a 2D image transformation may not be performed in a specific block, and this is defined as transform skip. Quantization can be applied after the transform skip. Whether to allow the transform skip may be determined based on at least one of the size or shape of the coding unit. As an example, the transform skip may be limited to be used only in coding units of a specific size or less. For example, it is possible to set the transform skip to be used only in blocks smaller than 32x32. Alternatively, it is also possible to restrict the use of transform skip to only a square block. Specifically, for example, transformation skip may be applied in units of 32x32, 16x16, 8x8, and 4x4 blocks.

2차원 영상 내에 있는 임의의 블록을 DCT 또는 DST 또는 2차원 영상 변환을 적용할 수 있으며, 이 때 사용된 변환을 제 1 변환이라고 정의 한다. 제 1 변환을 수행 후 변환 블록의 일부 영역에서 변환을 다시 수행할 수 있으며, 이를 제 2 변환(Secondary transform)이라고 정의 한다. DCT, DST, or 2D image transformation may be applied to an arbitrary block in the 2D image, and the transformation used in this case is defined as a first transformation. After performing the first transformation, transformation may be performed again in a partial region of the transformation block, and this is defined as a second transformation.

제 1 변환(Primary transform)은 복수개의 변환 코어 중 하나를 사용할 수 있다. 구체적으로 예를 들어, 변환 블록에서 DCT2 , DCT8 또는 DST7 중 어느 하나를 선택하여 사용할 수 있다. 또는 변환 블록의 수평 방향 변환과 수직 방향 변환의 변환 코어를 개별적으로 결정할 수 있다. 이에 따라, 수평 방향 변환 및 수직 방향 변환은 상호 동일할 수도 있고, 상이할 수도 있다. 수평 방향 변환과 수직 방향 변환에서 서로 다른 변환 코어를 사용할 수도 있으며, 이를 복수 변환 코어 부호화 방법(Multiple Transform Selection, MTS)이라 정의 한다. The first transform may use one of a plurality of transform cores. Specifically, for example, one of DCT2, DCT8, or DST7 may be selected and used in the transform block. Alternatively, the transform cores of the horizontal direction transformation and the vertical direction transformation of the transformation block may be individually determined. Accordingly, the horizontal direction transformation and the vertical direction transformation may be the same or different. Different transform cores may be used in horizontal and vertical transforms, and this is defined as a multiple transform core encoding method (Multiple Transform Selection, MTS).

제 1변환과 제 2 변환을 수행하는 블록 단위가 서로 다르게 설정할 수도 있다. 구체적으로 예를 들어, 잔차 영상의 8x8 블록에서 제 1 변환을 수행한 후, 4x4 서브 블록 별로 제 2 변환을 각각 수행할 수도 있다. 또 다른 예를 들어, 각 4x4 블록에서 제 1 변환을 수행한 후, 8x8 크기의 블록에서 제 2 변환을 각각 수행할 수도 있다. Block units for performing the first transformation and the second transformation may be set differently. Specifically, for example, after performing the first transform in an 8x8 block of the residual image, the second transform may be performed for each 4x4 sub-block. For another example, after performing the first transformation in each 4x4 block, the second transformation may be performed in each 8x8 size block.

제 1 변환이 적용된 잔차 영상을 제 1 변환 잔차 영상이라고 정의한다. The residual image to which the first transform is applied is defined as a first transform residual image.

제 1 변환 잔차 영상에 DCT 또는 DST 또는 2차원 영상 변환을 적용할 수 있으며, 이 때 사용된 변환을 제 2 변환이라고 정의한다. 제 2 변환이 적용된 2차원 영상을 제 2 변환 잔차 영상이라고 정의한다. DCT, DST, or 2D image transformation may be applied to the first transform residual image, and the transform used in this case is defined as a second transform. The 2D image to which the second transformation is applied is defined as a second transformation residual image.

제 1 변환 및/또는 제 2 변환을 수행한 후의 블록 내 샘플 값 또는 변환 스킵을 수행한 후 블록 내 샘플 값을 변환 계수라고 정의한다. 양자화는 블록의 에너지를 줄이기 위해 변환 계수를 기 정의된 값으로 나누는 과정을 말한다. 변환 계수에 양자화를 적용하기 위해 정의된 값을 양자화 파라미터라고 정의한다. A sample value in the block after performing the first transformation and/or the second transformation or the sample value in the block after performing the transformation skip is defined as a transform coefficient. Quantization refers to the process of dividing a transform coefficient by a predefined value to reduce the energy of a block. A value defined to apply quantization to a transform coefficient is defined as a quantization parameter.

시퀀스 단위 또는 블록 단위로 기 정의된 양자화 파라미터를 적용할 수 있다. 통상적으로 1에서 64 사이의 값으로 양자화 파라미터를 정의할 수 있다. A predefined quantization parameter may be applied in units of sequences or blocks. Typically, a quantization parameter can be defined with a value between 1 and 64.

변환 및 양자화를 수행한 후에, 역양자화 및 역변환을 수행하여 잔차 복원 영상을 생성 할 수 있다. 잔차 복원 영상에 예측 영상을 더해서 제 1 복원 영상을 생성할 수 있다. After performing transformation and quantization, inverse quantization and inverse transformation may be performed to generate a residual reconstructed image. A first reconstructed image may be generated by adding a prediction image to the residual reconstructed image.

3.13.1 서브 변환 블록 부호화 방법 Sub transform block coding method

Figure pat00056
Figure pat00056

그림 36Fig. 36

Figure pat00057
Figure pat00057

그림 37Fig. 37

그림 36 내지 그림 37과 코딩 유닛 내 일부 영역만 변환을 수행할 수도 있으며, 이를 서브 변환 블록 부호화 방법이라 정의 한다. 서브 변환 블록 부호화가 사용되었는지를 나타내는 서브 변환 블록 플래그 cu_sbt_flag를 비트스트림을 통해 전송할 수도 있다. cu_sbt_flag이 1이면, 서브 변환 블록 부호화 방법이 사용되었음을 나타낸다. Transformation may be performed on only a partial region within the coding unit as shown in Figs. 36 to 37, and this is defined as a sub-transform block coding method. A sub-transform block flag cu_sbt_flag indicating whether sub-transformation block coding is used may be transmitted through a bitstream. If cu_sbt_flag is 1, it indicates that the sub transform block encoding method is used.

코딩 유닛/코딩 블록의 너비가 기정의된 값(이하, 서브 변환 블록 최대 너비)보다 작거나 같고, 코딩 유닛/코딩 블록의 높이가 기정의된 값 (이하, 서브 변환 블록 최대 높이)보다 작거나 같을 때 서브 변환 블록 부호화 방법을 사용할 수도 있다. The width of the coding unit/coding block is less than or equal to a predefined value (hereinafter, the maximum width of the sub-transformation block), and the height of the coding unit/coding block is less than the predefined value (hereinafter, the maximum height of the sub-transformation block), or When they are the same, the sub-transform block encoding method may be used.

예를 들어, 서브 변환 블록 부호화가 사용되는 경우에 그림 36과 같이, 코딩 유닛을 수평 방향 바이너리 파티션 또는 수직 방향 바이너리 파티션으로 나눌 수 있다. 좌측 또는 상측에 있는 바이너리 파티션을 제 1 서브 변환 바이너리 파티션이라 하고, 우측 또는 하측에 있는 바이너리 파티션을 제 2 서브 변환 바이너리 파티션이라 한다. 제 1 서브 변환 바이너리 파티션과 제 2 서브 변환 바이너리 파티션 중 어느 하나의 파티션(이하 변환 바이너리 파티션)에서만 변환 및 양자화를 수행할 수 있으며, 이를 변환 바이너리 파티션 부호화 방법이라 한다. For example, when sub-transform block coding is used, the coding unit can be divided into a horizontal direction binary partition or a vertical direction binary partition as shown in Figure 36. A binary partition on the left or upper side is referred to as a first sub-transformed binary partition, and a binary partition on the right or lower side is referred to as a second sub-transformed binary partition. Transformation and quantization may be performed only in one of the first sub-transform binary partition and the second sub-transform binary partition (hereinafter, referred to as transform binary partition), and this is referred to as a transform binary partition encoding method.

코딩 유닛이 수평 방향 바이너리 파티션으로 분할 되었는지 수직 방향 바이너리 파티션으로 분할 되었는지를 나타내는 플래그 cu_sbt_horizontal_flag를 비트스트림을 통해 전송할 수 있다. A flag cu_sbt_horizontal_flag indicating whether the coding unit is divided into a horizontal direction binary partition or a vertical direction binary partition may be transmitted through a bitstream.

cu_sbt_horizontal_flag 값이 1 이면, 수평 방향 바이너리 파티션으로 분할됨을 나타내고, cu_sbt_horizontal_flag 값이 0 이면, 수직 방향 바이너리 파티션으로 분할됨을 나타낸다. If the cu_sbt_horizontal_flag value is 1, it indicates that it is divided into horizontal binary partitions, and if the cu_sbt_horizontal_flag value is 0, it indicates that it is divided into vertical binary partitions.

또 다른 예를 들어, 그림 37과 같이 코딩 유닛을 4개의 쿼터너리 파티션으로 나눌 수 있으며, 이를 쿼터너리 변환 파티션 부호화 방법이라 한다. 쿼터너리 변환 파티션 부호화 방법이 사용되었는지를 나타내는 플래그 cu_sbt_quad_flag를 비트스트림을 통해 시그날링할 수 있다. For another example, as shown in Figure 37, the coding unit can be divided into four quaternary partitions, which is called a quaternary transform partition coding method. A flag cu_sbt_quad_flag indicating whether the quaternary transform partition encoding method is used may be signaled through a bitstream.

좌상측에 있는 쿼터너리 파티션을 제 1 서브 변환 쿼터너리 파티션, 우상측에 있는 쿼터너리 파티션을 제 2 서브 변환 쿼터너리 파티션, 좌하측에 있는 쿼터너리 파티션을 제 3 서브 변환 쿼터너리 파티션 그리고 우하측에 있는 쿼터너리 파티션을 제 4 서브 변환 쿼터너리 파티션이라 한다. The upper left quaternary partition is the first sub-transformation quaternary partition, the upper right quaternary partition is the second sub-transformation quaternary partition, the lower left quaternary partition is the third sub-transformation quaternary partition, and the lower right The quaternary partition in is referred to as the fourth sub-transformation quaternary partition.

제 1 서브 변환 쿼터너리 파티션 내지 제 4 서브 쿼터너리 변환 파티션 중 어느 하나의 파티션(이하, 변환 쿼터너리 파티션)에서만 변환 및 양자화를 수행할 수 있다. Transformation and quantization may be performed only in one of the first to fourth sub-quaternary transform partitions (hereinafter, transformed quaternary partition).

변환 쿼너터리 파티션 또는 변환 바이너리 파티션을 특정하기위한 플래그 cu_sbt_pos_flag를 비트스트림을 통해 시그날링할 수 있다. A flag cu_sbt_pos_flag for specifying a transform quaternary partition or a transform binary partition may be signaled through a bitstream.

예를 들어, 쿼너터리 변환 부호화 방법을 사용하고, cu_sbt_pos_flag 값이 0이면, 변환 쿼너터리 파티션은 제 1 서브 변환 쿼터너리 파티션으로 설정할 수 있다.For example, if the quaternary transform coding method is used and the value of cu_sbt_pos_flag is 0, the transform quaternary partition may be set as the first sub transform quaternary partition.

또 다른 예를 들어, 쿼너터리 변환 파티션 부호화 방법을 사용하고, cu_sbt_pos_flag 값이 2이면, 변환 쿼너터리 파티션은 제 3 서브 변환 쿼터너리 파티션으로 설정할 수 있다.As another example, if the quaternary transform partition encoding method is used and the cu_sbt_pos_flag value is 2, the transform quaternary partition may be set as the third sub transform quaternary partition.

또 다른 예를 들어, 변환 바이너리 파티션 부호화 방법을 사용하고, cu_sbt_pos_flag 값이 1이면, 변환 바이너리 파티션은 제 1 서브 변환 바이너리 파티션으로 설정할 수 있다. For another example, if the transform binary partition encoding method is used and the cu_sbt_pos_flag value is 1, the transform binary partition may be set as the first sub transform binary partition.

코딩 유닛의 너비가 특정 값(이하, 수직 바이너리 임계값)보다 크거나 같은 경우에만 수직 방향 변환 바이너리 파티션을 허용할 수 있고, 코딩 유닛의 높이가 특정 값(이하, 수평 바이너리 임계값)보다 큰 경우에만 수평 방향 변환 바이너리 파티션을 허용할 수 있다. Vertical direction conversion binary partitions can be allowed only when the width of the coding unit is greater than or equal to a specific value (hereinafter, referred to as vertical binary threshold), and if the height of the coding unit is greater than a specific value (hereinafter, referred to as the horizontal binary threshold) Only horizontal translation binary partitions can be allowed.

코딩 유닛의 너비 및 높이가 특정 값(이하, 쿼터너리 임계값)보다 크거나 같은 경우에만 쿼터너리 변환 파티션 부호화 방법을 사용할 수 있고, cu_sbt_quad_flag를 비트스트림을 통해 전송할 수 있다. The quaternary transform partition encoding method may be used only when the width and height of the coding unit are greater than or equal to a specific value (hereinafter, referred to as the quaternary threshold), and cu_sbt_quad_flag may be transmitted through a bitstream.

예를 들어, 쿼터너리 임계값이 16이고, 코딩 유닛의 너비가 16, 높이가 8인 경우, 코딩 유닛의 높이가 쿼터너리 임계값보다 작기 때문에, 쿼터너리 변환 파티션 부호화 방법을 사용하지 않도록 설정하며, 표 11과 같이 cu_sbt_quad_flag를 시그날링하지 않을 수 있다. For example, if the quaternary threshold is 16, the width of the coding unit is 16, and the height is 8, since the height of the coding unit is less than the quaternary threshold, the quaternary transform partition coding method is not used. , As shown in Table 11 , cu_sbt_quad_flag may not be signaled.

표 11Table 11

Figure pat00058
Figure pat00058

3.23.2 Reduced secondary transform 부호화 방법 Reduced secondary transform coding method

NxN 변환 블록에서 제 1 변환을 수행하여 생성된 제 1 변환 블록의 좌상단의 기 정의된 크기/형태의 서브 영역에 secondary transform을 수행할 수 있다. 상기 서브 영역의 크기/형태는, 4x4 또는 8x8의 정방 형태 또는, 4x8, 8x4의 비정방 형태일 수 있다. 서브 영역의 크기/형태는 제1 변환 블록의 크기/형태에 따라 결정될 수 있다. 일 예로, 서브 영역의 크기/형태는 제1 변환 블록을 4개로 균등 분할하였을 때 어느 하나의 파티션에 대응하는 크기/형태일 수 있다. Secondary transform은 non-separable 형태로 적용할 수도 있으며, 이를 Non-separable secondary transform이라 정의한다. A secondary transform may be performed on a sub-region of a predefined size/shape at the upper left of the first transform block generated by performing the first transform in the NxN transform block. The size/shape of the sub-region may be a 4x4 or 8x8 square shape, or a 4x8 or 8x4 amorphous shape. The size/shape of the sub-region may be determined according to the size/shape of the first transform block. As an example, the size/shape of the sub-region may be a size/shape corresponding to any one partition when the first transform block is equally divided into four. Secondary transform can also be applied in a non-separable form, and this is defined as a non-separable secondary transform.

제1 변환 블록의 좌상단에 위치하는 정방형 서브 영역 NxN에 non-separable transform을 수행하는 경우 좌상단 NxN 영역의 잔차 계수를 N2x1 크기의 행렬 A로 재정렬 할 수 있다. 행렬 A에 N2x N2 non-separable transform 행렬 T를 적용하여 식 (19)와 같이 secondary transform 행렬인 A'(N2x1 행렬)를 생성할 수 있다. When performing a non-separable transform on a square sub-region NxN located at the upper left of the first transform block, the residual coefficients of the upper left NxN region may be rearranged into a matrix A having a size of N 2 x1. By applying the N 2 x N 2 non-separable transform matrix T to the matrix A, a secondary transform matrix A'(N 2 x 1 matrix) can be generated as shown in Equation (19).

A' = T*AA'= T*A (19)(19)

Secondary transform 행렬 A'을 좌상단 NxN 영역의 크기에 맞춰 재정렬 할 수 있다. The secondary transform matrix A'can be rearranged according to the size of the upper left NxN region.

행렬 A 또는 행렬 A의 부분 행렬 A'(예컨대, (N2/2)x(N2/2) 또는 (N2/2)x(N2/2)) 에 k x l non-separable transform 행렬 T를 적용하여 식 (20)과 같이 reduced secondary transform 행렬인 AR(kx1 행렬)을 생성할 수 있으며, 이를 Reduced secondary transform이라고 정의한다. k는 N2 또는 N2보다 작은 정수(예컨대, N2/2, N2/4 또는 N2/4)일 수 있다. l은 N2 또는 N2보다 작은 정수(예컨대, N2/2, N2/4 또는 N2/4)일 수 있다.Matrix A or partial matrix A'of matrix A (e.g., (N 2 /2)x(N 2 /2) or (N 2 /2)x(N 2 /2)) with kxl non-separable transform matrix T By applying it, a reduced secondary transform matrix A R (kx1 matrix) can be generated as shown in Equation (20), and this is defined as a reduced secondary transform. k is N 2 or It may be an integer less than N 2 (eg, N 2 /2, N 2 /4 or N 2 /4). l is N 2 or It may be an integer less than N 2 (eg, N 2 /2, N 2 /4 or N 2 /4).

AA RR = R*A = R*A (20)(20)

Non-separable transform 행렬 T 또는 R의 크기는 현재 블록의 크기/형태, 양자화 파라미터 또는 변환 스킴(scheme) 중 적어도 하나에 기초하여 결정될 수 있다. 또는, 복수 Non-separable transform 행렬들 중 어느 하나를 특정하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다.The size of the non-separable transform matrix T or R may be determined based on at least one of the size/shape of the current block, a quantization parameter, or a transform scheme. Alternatively, information for specifying any one of a plurality of non-separable transform matrices may be signaled through a bitstream.

(kx1) 크기의 Reduced secondary transform 행렬 AR을 제 1 변환 블록 중 좌상단 MxM 블록(M은 N보다 작은 정수)으로 재정렬 할 수 있다. The (kx1) sized Reduced secondary transform matrix A R may be rearranged into an upper left MxM block (M is an integer smaller than N) among the first transform blocks.

그림 37은 N이 8이고, k가 16인 Reduced secondary transform의 순서도를 나타낸다. (kx1)크기의 Reduced secondary transform행렬 AR은 제1 변환 블록 중 좌상단 4x4 블록에 재정렬될 수 있다. Figure 37 shows the flow chart of the Reduced secondary transform where N is 8 and k is 16. The reduced secondary transform matrix A R of size (kx1) may be rearranged in the upper left 4x4 block among the first transform blocks.

서브 영역의 크기가 기 정의된 값보다 작은 경우, Reduced secondary transform 을 적용하지 않도록 설정할 수 있다. 일 예로, 좌상단 4x4 영역에서는 Reduced secondary transform을 적용하지 않도록 설정할 수도 있다. If the size of the sub-region is smaller than the predefined value, it can be set not to apply the Reduced secondary transform. For example, in the upper left 4x4 area, it may be set not to apply the Reduced secondary transform.

Figure pat00059
Figure pat00059

그림 37Fig. 37

예를 들어, 그림 38과 같이 64x16 또는 48x16 non-separable matrix를 이용하여 제 2 변환을 수행할 수도 있다. For example, as shown in Figure 38 , the second transformation may be performed using a 64x16 or 48x16 non-separable matrix.

Figure pat00060
Figure pat00060

그림 38Fig. 38

또는 그림 39과 같이 32x16 non-separable matrix를 이용하여 제 2 변환을 수행할 수도 있다. Alternatively, as shown in Figure 39 , the second transformation may be performed using a 32x16 non-separable matrix.

Figure pat00061
Figure pat00061

그림 39Fig. 39

또는 ISP를 사용하는 경우에만 32x16 non-separable matrix를 사용하도록 제한할 수도 있다. Alternatively, you can limit the use of a 32x16 non-separable matrix only when using an ISP.

ISP에서는 Secondary Transform 또는 RST (Reduced Secondary Transform)를 적용하지 않도록 설정할 수도 있다. 또는 ISP가 4xL 또는 Lx4 형태의 서브 파티션인 경우에만 ST 또는 RST를 적용하도록 설정할 수도 있다. 여기서 L은 4보다 큰 정수로 설정할 수 있다. The ISP may be configured not to apply Secondary Transform or Reduced Secondary Transform (RST). Alternatively, it is possible to set to apply ST or RST only when the ISP is a 4xL or Lx4 sub-partition. Here, L can be set to an integer greater than 4.

이 때 그림 39와 같이 32x16 RST matrix를 사용할 수도 있다. In this case, a 32x16 RST matrix can be used as shown in Figure 39 .

4xL 형태의 서브 파티션을 사용하는 경우 그림 40의 왼쪽 그림과 같은 32x16 RST matrix를 사용할 수 있고, Lx4 형태의 서브 파티션을 사용하는 경우, 그림 40의 오른쪽 그림과 같은 32x16 RST matrix를 사용할 수도 있다. When using a 4xL type sub-partition, a 32x16 RST matrix as shown in the left figure of Figure 40 can be used, and when using an Lx4 type sub-partition, a 32x16 RST matrix as shown in the right figure of Figure 40 can be used.

Secondary transform 또는 RST 가 적용되는 서브 영역은 ISP가 적용되는 코딩 블록 단위로 결정될 수 있다. 일 예로, 서브 파티션들 중 최상단 또는 최좌측에 위치하는 서브 파티션에만 ST 또는 RST를 적용하도록 설정할 수 있다. 또는, 코딩 블록 중 좌측 상단에 위치한 4x8 또는 8x4 크기의 영역을 ST 또는 RST 적용을 위한 서브 영역으로 정의할 수 있다. The sub-region to which the secondary transform or RST is applied may be determined in units of coding blocks to which the ISP is applied. As an example, it may be set to apply ST or RST only to a sub-partition located at the top or left of the sub-partitions. Alternatively, an area having a size of 4x8 or 8x4 located at the upper left of the coding block may be defined as a sub-region for applying ST or RST.

인트라 블록의 형태 또는 서브 파티션의 형태가 4xN 또는 Nx4인 경우에는 4x8 또는 8x4 서브 영역을 32x1 형태의 행렬 AISP로 재정렬 할 수 있다. When the form of the intra block or the form of the sub-partition is 4xN or Nx4, the 4x8 or 8x4 subregion can be rearranged into a 32x1 matrix A ISP .

행렬 AISP에 32 x 32 non-separable transform 행렬 TISP를 적용하여 식 (21)와 같이 (reduced) secondary transform 행렬인 AR(32x1 행렬)을 생성할 수 있으며, 이를 ISP 기반 (Reduced) secondary transform이라고 정의한다. By applying a 32 x 32 non-separable transform matrix T ISP to matrix A ISP , you can create a (reduced) secondary transform matrix A R (32x1 matrix) as shown in Equation (21), which is based on ISP (Reduced) secondary transform. Is defined as

AA ISPISP = T = T ISPISP *A*A (21)(21)

ISP 기반 (Reduced) secondary transform 행렬 AISP를 제 1 변환 블록 중 좌상단 4x8 또는 8x4 블록으로 재정렬 할 수 있다. ISP-based (Reduced) secondary transform matrix A ISP may be rearranged into the upper left 4x8 or 8x4 block among the first transform blocks.

결합 예측 부호화 모드 중 머지-인트라 결합 예측 하에서는, 머지 모드로 부터 생성한 예측 영상(이하, 머지 예측 영상)과 인트라 예측 방법을 통해 생성한 예측(이하, 인트라 예측 영상)을 가중 예측하여 최종 예측 영상을 생성할 수 있다. 머지-인트라 결합 예측을 사용했는지를 나타내는 플래그 머지-인트라 결합 예측 플래그 (ciip_flag)을 비트스트림을 통해 시그날링 할 수 있다. ciip_flag 값이 1이면, merge_idx에서 특정한 모션 정보를 기초로 획득된 머지 예측 영상과 인트라 예측 모드에 기초하여 획득된 인트라 예측 영상을 가중 예측하여 머지-인트라 예측 영상을 생성할 수 있다. Among the combined prediction coding modes, under merge-intra combined prediction, the final prediction image by weighted prediction of the prediction image generated from the merge mode (hereinafter, the merge prediction image) and the prediction generated by the intra prediction method (hereinafter, the intra prediction image). Can be created. A flag indicating whether merge-intra-combination prediction has been used A merge-intra-combination prediction flag (ciip_flag) may be signaled through a bitstream. If the ciip_flag value is 1, a merge-intra prediction image may be generated by weighted prediction of a merge prediction image acquired based on specific motion information in merge_idx and an intra prediction image acquired based on an intra prediction mode.

ciip_flag 값이 1인 코딩 블록에서도 Secondary transform 또는 RST 가 허용될 수 있다. 즉, ciip_flag의 값이 1인 경우라 하더라도, 현재 코딩 블록의 크기, 형태 또는 인트라 예측 모드를 따라 적응적으로 Secondary transform 또는 RST의 수행 여부가 결정될 수 있다. 또는, ciip_flag의 값이 1인 경우에도, secondary transform 또는 RST 수행 여부를 나타내는 신택스가 시그날링될 수 있다. Secondary transform or RST may be allowed even in a coding block having a ciip_flag value of 1. That is, even when the value of ciip_flag is 1, whether to perform secondary transform or RST may be adaptively determined according to the size, shape, or intra prediction mode of the current coding block. Alternatively, even when the value of ciip_flag is 1, a syntax indicating whether to perform secondary transform or RST may be signaled.

44 인루프 필터링 (In-loop filtering)In-loop filtering

인루프 필터링(In-loop filtering)은 양자화 및 부호화 과정에서 발생하는 정보의 손실을 줄이기 위해 복호화 된 영상에 적응적으로 필터링을 수행하는 기술이다. 디블록킹 필터(Deblocking filter), 샘플 적응적 오프셋 필터(sample adaptive offset filter, SAO), 적응적 루프 필터(adaptive loop filter, ALF)는 인루프 필터링의 한 예이다. In-loop filtering is a technique that adaptively performs filtering on a decoded image in order to reduce the loss of information that occurs during quantization and encoding. A deblocking filter, a sample adaptive offset filter (SAO), and an adaptive loop filter (ALF) are examples of in-loop filtering.

제 1 복원 영상에 디블록킹 필터 , 샘플 적응적 오프셋(Sample Adaptive Offset, SAO) 또는 적응적 루프 필터(adaptive loop filter, ALF) 중 적어도 어느 하나를 수행하여 제 2 복원 영상을 생성할 수 있다. A second reconstructed image may be generated by performing at least one of a deblocking filter, a sample adaptive offset (SAO), or an adaptive loop filter (ALF) on the first reconstructed image.

복원 영상에 디블록킹 필터를 적용한 후, SAO 및 ALF를 적용할 수 있다. After applying the deblocking filter to the reconstructed image, SAO and ALF may be applied.

비디오 부호화 과정에서 블록 단위로 변환과 양자화를 수행한다. 양자화 과정에서 발생한 손실이 발생하고, 이를 복원한 영상의 경계에서는 불연속이 발생한다. 블록 경계에 나타난 불연속 영상을 블록 화질 열화(blocking artifact)라고 정의 한다. In the video encoding process, transformation and quantization are performed in units of blocks. A loss occurs during the quantization process, and a discontinuity occurs at the boundary of the reconstructed image. Discontinuous images appearing at the boundary of a block are defined as blocking artifacts.

Deblocking filter는 제 1 영상의 블록 경계에서 발생하는 블록 화질 열화(blocking artifact)를 완화시키고, 부호화 성능을 높여주는 방법이다. The deblocking filter is a method of mitigating block quality deterioration (blocking artifact) occurring at a block boundary of a first image and enhancing encoding performance.

Figure pat00062
Figure pat00062

그림 40Figure 40

블록 경계에서 필터링을 수행하여 블록 화질 열화를 완화 시킬수 있으며, 그림 40과 같이 블록이 인트라 예측 모드로 부호화 되었는지 여부, 또는 이웃한 블록의 모션 벡터 절대값의 차이가 기 정의된 소정의 문턱값 보다 큰지 여부, 이웃한 블록의 참조 픽쳐가 서로 동일한 지 여부 중 적어도 어느 하나에 기초하여 블록 필터 강도 (blocking strength, 이하 BS) 값을 결정할 수 있다. BS 값이 0이면 필터링을 수행하지 않으며, BS 값이 1 또는 2인 경우에 블록 경계에서 필터링을 수행할 수 있다. Block quality deterioration can be alleviated by performing filtering at the block boundary, and whether the block is coded in intra prediction mode as shown in Figure 40 , or whether the difference between the absolute values of the motion vectors of neighboring blocks is greater than a predefined threshold. A block filter strength (BS) value may be determined based on at least one of whether or not reference pictures of neighboring blocks are identical to each other. When the BS value is 0, filtering is not performed, and when the BS value is 1 or 2, filtering may be performed at a block boundary.

변환 계수에 양자화를 수행하므로 주파수 영역에서 양자화를 수행하기 때문에, 물체 가장 자리에 링이 현상 (ringing artifact)를 발생시키거나, 화소 값이 원본에 비해 일정한 값만큼 커지거나 작아기게 된다. SAO는 제 1 복원 영상의 패턴을 고려하여 블록 단위로 특정 오프셋을 더하거나 빼는 방법으로 링잉 현상을 효과적으로 줄일 수 있다. SAO는 복원 영상의 특징에 따라 에지 오프셋(Edge offset, 이하 EO)과 밴드 오프셋(Band offset, BO)으로 구성된다. 에지 오프셋은 주변 화소 샘플 패턴에 따라 현재 샘플에 오프셋을 다르게 더해주는 방법이다. 밴드 오프셋은 영역 안의 비슷한 화소 밝기 값을 가진 화소 집합에 대해 일정 값을 더해 부호화 오류를 줄이는 것이다. 화소 밝기를 32개의 균일한 밴드로 나눠 비슷한 밝기 값을 가지는 화소를 하나의 집합이 되도록 할 수 있다. 예를 들어, 인접한 4개의 밴드를 하나의 범주로 묶을 수 있다. 하나의 범주에서는 동일한 오프셋 값을 사용하도록 설정할 수 있다. Since quantization is performed on a transform coefficient, a ringing artifact occurs at the edge of an object, or a pixel value increases or decreases by a certain value compared to the original because quantization is performed in the frequency domain. The SAO can effectively reduce the ringing phenomenon by adding or subtracting a specific offset in units of blocks in consideration of the pattern of the first reconstructed image. SAO is composed of an edge offset (hereinafter referred to as EO) and a band offset (BO) according to characteristics of a reconstructed image. The edge offset is a method of adding an offset to the current sample differently according to the surrounding pixel sample pattern. Band offset is to reduce coding errors by adding a certain value to a set of pixels with similar pixel brightness values in a region. By dividing the pixel brightness into 32 uniform bands, pixels having similar brightness values can be made into one set. For example, four adjacent bands can be grouped into one category. One category can be set to use the same offset value.

ALF (Adaptive Loop Filter)는 식 (22)과 같이 제 1 복원 영상 또는 제 1 복원 영상에 deblocking filtering을 수행한 복원 영상에 기 정의된 필터 중 어느 하나를 사용하여 제 2 복원 영상을 생성하는 방법이다. ALF (Adaptive Loop Filter) is a method of generating a second reconstructed image using one of predefined filters for a first reconstructed image or a reconstructed image that has subjected deblocking filtering to the first reconstructed image as shown in Equation (22). .

Figure pat00063
(22)
Figure pat00063
(22)

Figure pat00064
Figure pat00064

그림 41Fig. 41

이 때 필터는 픽쳐 단위 또는 CTU 단위로 선택할 수 있다. In this case, the filter can be selected in units of pictures or units of CTU.

Luma 성분에서는 다음 그림 41과 같이 5x5, 7x7 또는 9x9 다이아몬드 형태 중 어느 하나를 선택할 수 있다. Chroma 성분에서는 5x5 다이아몬드 형태만 사용할 수 있도록 제한할 수도 있다. In the Luma component, you can select any of the 5x5, 7x7 or 9x9 diamond shapes as shown in Figure 41 below. In the chroma component, it may be limited to use only the 5x5 diamond shape.

55 비디오 부호화 구조Video coding structure

Figure pat00065
Figure pat00065

그림 42Fig. 42

그림 42는 비디오 부호화 구조를 나타내는 다이아그램이다. 입력 비디오 신호는 Rate distortion 값이 가장 작은 소정의 코딩 유닛으로 나눌수 있다. 코딩 유닛 별로 인터 예측 또는 인트라 예측 또는 복합 예측 중 적어도 어느 하나를 수행하여 예측 영상을 생성할 수 있다. 부호화 단계에서 인터 예측을 수행하기 위해서는 움직임 추정 (Motion estimaition)을 수행할 수도 있다. 원본 영상에서 예측 영상을 차분하여 잔차 영상을 생성할 수 있다. Figure 42 is a diagram showing the video coding structure. The input video signal can be divided into a predetermined coding unit with the smallest rate distortion value. A prediction image may be generated by performing at least one of inter prediction, intra prediction, or complex prediction for each coding unit. In order to perform inter prediction in the encoding step, motion estimation may be performed. A residual image may be generated by differentiating the predicted image from the original image.

잔차 영상을 제 1 변환 및/또는 제 2 변환을 수행하여 변환 계수를 생성하거나 변환 스킵을 수행하여 변환 스킵 계수를 생성할 수 있다. 변환 계수 또는 변환 스킵 계수에 양자화를 수행하여 양자화된 변환 계수 내지 양자화된 변환 스킵 계수를 생성할 수 있다. A transform coefficient may be generated by performing a first transform and/or a second transform on the residual image, or a transform skip coefficient may be generated by performing a transform skip. Quantization may be performed on a transform coefficient or a transform skip coefficient to generate a quantized transform coefficient or a quantized transform skip coefficient.

양자화된 변환 계수 내지 양자화된 변환 스킵 계수를 역양자화 및 역 변환을 수행하여 복원 영상을 생성할 수 있다. 이 복원 영상에 인루프 필터링을 수행하여 필터링 복원 영상을 생성할 수 있다. 이 필터링 복원 영상이 인코딩 단계에서 최종 아웃풋 (output) 영상이 된다. 필터링 복원 영상은 참조 픽쳐 버퍼 (Decoded picture buffer)로 저장되어 다른 픽쳐에서 참조 픽쳐로 사용할 수 있다.A reconstructed image may be generated by performing inverse quantization and inverse transformation on the quantized transform coefficient or the quantized transform skip coefficient. In-loop filtering may be performed on the reconstructed image to generate a filtered reconstructed image. This filtered reconstructed image becomes the final output image in the encoding step. The filtered reconstructed image is stored as a reference picture buffer and can be used as a reference picture in another picture.

Claims (1)

인트라 예측 모드 시그날링 부호화를 이용한 비디오 부호화 및 복호화 방법





Video coding and decoding method using intra prediction mode signaling coding





KR1020190068552A 2019-06-11 2019-06-11 Video signal encoding method and apparatus and video decoding method and apparatus KR20200141703A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190068552A KR20200141703A (en) 2019-06-11 2019-06-11 Video signal encoding method and apparatus and video decoding method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190068552A KR20200141703A (en) 2019-06-11 2019-06-11 Video signal encoding method and apparatus and video decoding method and apparatus

Publications (1)

Publication Number Publication Date
KR20200141703A true KR20200141703A (en) 2020-12-21

Family

ID=74090484

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190068552A KR20200141703A (en) 2019-06-11 2019-06-11 Video signal encoding method and apparatus and video decoding method and apparatus

Country Status (1)

Country Link
KR (1) KR20200141703A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210266568A1 (en) * 2019-06-25 2021-08-26 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Mapping method, encoder, decoder and computer storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210266568A1 (en) * 2019-06-25 2021-08-26 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Mapping method, encoder, decoder and computer storage medium
US11546608B2 (en) * 2019-06-25 2023-01-03 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Mapping method, encoder, decoder and computer storage medium
US11902538B2 (en) 2019-06-25 2024-02-13 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Mapping method, encoder, decoder and computer storage medium

Similar Documents

Publication Publication Date Title
KR20200141703A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200141896A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200141696A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200078252A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200113346A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200145998A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200141700A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200145160A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20210060109A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200132393A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200132395A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200141691A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200132397A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20210030801A (en) Video encoding method and apparatus and video decoding method and apparatus
KR20210030800A (en) Video encoding method and apparatus and video decoding method and apparatus
KR20200107262A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200107260A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20210030802A (en) Video encoding method and apparatus and video decoding method and apparatus
KR20210030803A (en) Video encoding method and apparatus and video decoding method and apparatus
KR20210035677A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20200107265A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20210046504A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20210030816A (en) Video encoding method and apparatus and video decoding method and apparatus
KR20210042440A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20210034860A (en) Video signal encoding method and apparatus and video decoding method and apparatus