KR20240074735A - Video Encoding and Decoding Using Intra Prediction - Google Patents

Video Encoding and Decoding Using Intra Prediction Download PDF

Info

Publication number
KR20240074735A
KR20240074735A KR1020240064695A KR20240064695A KR20240074735A KR 20240074735 A KR20240074735 A KR 20240074735A KR 1020240064695 A KR1020240064695 A KR 1020240064695A KR 20240064695 A KR20240064695 A KR 20240064695A KR 20240074735 A KR20240074735 A KR 20240074735A
Authority
KR
South Korea
Prior art keywords
block
intra prediction
mode
chrominance
prediction mode
Prior art date
Application number
KR1020240064695A
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
Priority claimed from KR1020230002859A external-priority patent/KR102668525B1/en
Application filed by 에스케이텔레콤 주식회사 filed Critical 에스케이텔레콤 주식회사
Publication of KR20240074735A publication Critical patent/KR20240074735A/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/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • 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

Landscapes

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

Abstract

본 발명은 색차블록(chroma block)의 인트라 예측모드에 대한 정보를 부호화하는 방법에 관한 것으로, 상기 색차블록의 인트라 예측모드에 대한 복수의 후보를 포함하는 후보 집합을 구성하는 단계, 상기 복수의 후보는 상기 색차블록에 대응하는 휘도블록(luma block)으로부터 유도된 하나 이상의 인트라 예측모드를 포함함; 및 상기 후보 집합에 속하는 상기 복수의 후보 중에서 상기 색차블록의 인트라 예측모드를 지시하기 위한 색차 인트라 모드 정보를 부호화하는 단계를 포함하고, 상기 휘도블록이 복수의 서브블록으로 분할된 경우 상기 복수의 서브블록 중 적어도 일부의 서브블록들의 인트라 예측모드들로부터 상기 하나 이상의 후보를 선택하는 기술과 관련된다.The present invention relates to a method of encoding information about an intra prediction mode of a chroma block, comprising the steps of configuring a candidate set including a plurality of candidates for an intra prediction mode of the chroma block, the plurality of candidates includes one or more intra prediction modes derived from a luma block corresponding to the chrominance block; And encoding chrominance intra mode information for indicating an intra prediction mode of the chrominance block among the plurality of candidates belonging to the candidate set, wherein when the luminance block is divided into a plurality of sub-blocks, the plurality of sub-blocks It relates to a technique for selecting the one or more candidates from intra prediction modes of at least some subblocks of a block.

Description

인트라 예측을 이용한 영상의 부호화 및 복호화 {Video Encoding and Decoding Using Intra Prediction} Encoding and decoding video using intra prediction {Video Encoding and Decoding Using Intra Prediction}

본 발명은 인트라 예측을 이용한 영상의 부호화 또는 복호화에 관한 것이다.The present invention relates to encoding or decoding of images using intra prediction.

이 부분에 기술된 내용은 단순히 본 실시예에 대한 배경 정보를 제공할 뿐 종래 기술을 구성하는 것은 아니다. The content described in this section simply provides background information for this embodiment and does not constitute prior art.

현재 픽처 내의 픽셀 정보를 이용하여 현재 픽처에 포함된 픽셀 값을 예측하는 인트라 예측 및 코딩에는 복수의 인트라 예측모드가 존재한다. 영상 부호화 장치는 복수의 인트라 예측모드 중에 부호화 대상인 현재블록에 대한 최종 하나의 모드를 선정하여 영상 복호화 장치에 해당 모드에 대한 정보를 전달하게 된다. 이때, 선정된 인트라 모드를 효율적으로 표현하기 위해 최고 확률 모드(most probable mode, MPM)를 이용하게 된다.There are a plurality of intra prediction modes in intra prediction and coding that predict pixel values included in the current picture using pixel information in the current picture. The video encoding device selects a final mode for the current block to be encoded among a plurality of intra prediction modes and transmits information about the mode to the video decoding device. At this time, the most probable mode (MPM) is used to efficiently express the selected intra mode.

도 1은 HEVC에서 인트라 예측에 사용 가능한 인트라 모드들을 도시한 도면이다. HEVC의 경우, 도 11과 같이 방향성을 가진 33개의 각도 모드들 및 방향성이 없는 2개의 모드들로 포함하는 총 35개의 인트라 모드가 존재한다. Figure 1 is a diagram showing intra modes available for intra prediction in HEVC. In the case of HEVC, there are a total of 35 intra modes, including 33 directional angular modes and 2 non-directional modes, as shown in FIG. 11.

부호화 대상 블록에서 휘도(luminance) 성분으로 이루어진 휘도블록(luma block)의 경우, 최종 인트라 모드를 부호화하기 위해 해당 블록의 주변블록 및 통계적으로 가장 자주 사용되는 모드들을 이용하여 해당 블록을 위한 3개의 MPM을 선정한다.In the case of a luma block consisting of a luminance component in the encoding target block, three MPMs for the block are used using the neighboring blocks of the block and the statistically most frequently used modes to encode the final intra mode. Select .

해당 블록의 최종 모드가 MPM과 동일한지 여부를 나타내는 1 bit MPM 플래그(flag)를 전송하고, 최종 모드가 MPM 이라면, 추가로 MPM 인덱스(index) 값을 전송한다. 최종 모드가 MPM이 아니라면, 나머지 모드들 중 어느 모드인지를 명백하게 전송하게 된다.A 1-bit MPM flag indicating whether the final mode of the block is the same as MPM is transmitted, and if the final mode is MPM, an MPM index value is additionally transmitted. If the final mode is not MPM, which of the remaining modes is clearly transmitted.

한편, 색차(chrominance) 성분으로 이루어진 색차블록(chroma block)의 경우, 총 35개의 인트라 예측모드들 중 일부로 구성된 인트라 예측모드 후보들을 구성하고 그 후보들 중 색차 블록의 인트라 예측모드를 선택한다. 그리고, 그 후보들 중 선택된 후보를 지시하기 위한 정보가 시그널링된다. 이 인트라 예측모드 후보들은 planar 모드, 수직 모드, 수평 모드, DC 모드 및 색차 블록에 대응하는 휘도 블록의 인트라 예측모드(DM, direct mode)로 구성된다.Meanwhile, in the case of a chroma block consisting of a chrominance component, intra prediction mode candidates consisting of some of a total of 35 intra prediction modes are formed, and the intra prediction mode of the chrominance block is selected from among the candidates. And, information to indicate the candidate selected among the candidates is signaled. These intra prediction mode candidates consist of planar mode, vertical mode, horizontal mode, DC mode, and intra prediction mode (DM, direct mode) of the luminance block corresponding to the chrominance block.

영상의 해상도가 64x64에서 256x256 등으로 점점 커지면서 부호화 대상 블록의 단위도 점점 커지고 있으며, 그에 따라 많은 인트라 모드들이 추가될 가능성이 높아지고 있다. 본 발명은 이러한 배경에서 인트라 예측모드를 결정하는 개선된 방법을 제공하고자 한다.As the resolution of the video increases from 64x64 to 256x256, the unit of encoding target block also increases, and the possibility of adding more intra modes increases. Against this background, the present invention seeks to provide an improved method for determining an intra prediction mode.

본 발명은 인트라 예측 코딩에서, 현재블록의 인트라 예측모드를 결정하고 부호화하는 개선된 기술을 제공하는 것을 일 목적으로 한다.The purpose of the present invention is to provide an improved technology for determining and encoding the intra prediction mode of the current block in intra prediction coding.

본 발명의 일 측면은 대응하는 휘도 코딩트리블록과는 다른 블록 분할 구조를 가지는 색차 코딩트리블록으로부터 분할된 색차 블록(chroma block)을 인트라 예측하기 위해, 영상 복호화 장치에 의해, 수행되는 방법을 제공한다. 상기 방법은, 상기 색차 블록이 대응하는 휘도 블록 내의 복원된 픽셀 값들로부터 예측되는지 여부를 나타내는 플래그를 비트스트림으로부터 복호화하는 단계; 및 상기 플래그에 따라 상기 색차 블록의 인트라 예측모드를 결정하고 상기 색차 블록을 예측하는 단계를 포함하되, 상기 플래그가 상기 색차 블록이 상기 휘도 블록 내의 복원된 픽셀 값들로부터 예측되지 않음을 나타낼 때, 상기 색차 블록을 예측하는 단계는, 기정의된 인트라 예측모드들의 후보 세트(candidate set)로부터 상기 색차 블록의 인트라 예측모드를 선택하기 위한 모드 정보를 복호화하는 단계, 상기 후보 세트는 상기 휘도 블록으로부터 유도되는 인트라 예측모드인 DM 모드를 포함함; 및 상기 모드 정보를 이용하여 상기 색차 블록의 인트라 예측모드를 결정하는 단계를 포함한다.One aspect of the present invention provides a method performed by an image decoding apparatus to intra-predict a chroma block divided from a chrominance coding treeblock having a block division structure different from the corresponding luminance coding treeblock. do. The method includes decoding a flag indicating whether the chrominance block is predicted from reconstructed pixel values in a corresponding luminance block from a bitstream; and determining an intra prediction mode of the chrominance block according to the flag and predicting the chrominance block, when the flag indicates that the chrominance block is not predicted from reconstructed pixel values in the luminance block. Predicting a chrominance block includes decoding mode information for selecting an intra prediction mode of the chrominance block from a candidate set of predefined intra prediction modes, wherein the candidate set is derived from the luminance block. Includes DM mode, which is an intra prediction mode; and determining an intra prediction mode of the chrominance block using the mode information.

본 발명의 다른 측면은 대응하는 휘도 코딩트리블록과는 다른 블록 분할 구조를 가지는 색차 코딩트리블록으로부터 분할된 색차 블록(chroma block)을 인트라 예측하기 위해, 영상 부호화 장치에 의해, 수행되는 방법을 제공한다. 상기 방법은, 상기 색차 블록의 인트라 예측모드를 결정하는 단계; 상기 색차 블록의 인트라 예측모드를 이용하여 상기 색차 블록을 예측하는 단계; 및 상기 색차 블록의 인트라 예측모드에 대한 정보를 부호화하는 단계를 포함하되, 상기 색차 블록의 인트라 예측모드에 대한 정보를 부호화하는 단계는, 상기 색차 블록이 대응하는 휘도 블록 내의 복원된 픽셀 값들로부터 예측되는지 여부를 나타내는 플래그를 부호화하는 단계; 및 상기 플래그가 상기 색차 블록이 상기 휘도 블록 내의 복원된 픽셀 값들로부터 예측되지 않음을 나타낼 때, 기정의된 인트라 예측모드들의 후보 세트(candidate set)로부터 상기 색차 블록의 인트라 예측모드를 선택하기 위한 모드 정보를 부호화하는 단계를 포함하고, 상기 후보 세트는 상기 휘도 블록으로부터 유도되는 인트라 예측모드인 DM 모드를 포함한다.Another aspect of the present invention provides a method performed by an image encoding device to intra-predict a chroma block divided from a chrominance coding treeblock having a block division structure different from the corresponding luminance coding treeblock. do. The method includes determining an intra prediction mode of the chrominance block; predicting the chrominance block using an intra prediction mode of the chrominance block; and encoding information about the intra prediction mode of the chrominance block, wherein the step of encoding the information about the intra prediction mode of the chrominance block includes predicting the chrominance block from the reconstructed pixel values in the corresponding luminance block. Encoding a flag indicating whether or not and a mode for selecting an intra prediction mode of the chrominance block from a candidate set of predefined intra prediction modes when the flag indicates that the chrominance block is not predicted from reconstructed pixel values in the luminance block. and encoding information, wherein the candidate set includes a DM mode, which is an intra prediction mode derived from the luminance block.

본 발명의 또 다른 측면은 대응하는 휘도 코딩트리블록과는 다른 블록 분할 구조를 가지는 색차 코딩트리블록으로부터 분할된 색차 블록(chroma block)을 인트라 예측하는 부호화 방법에 의해 생성된 비트스트림을 저장하는, 디코더에 의해 판독 가능한, 기록 매체를 제공한다. 상기 부호화 방법은, 상기 색차 블록의 인트라 예측모드를 결정하는 단계; 상기 색차 블록의 인트라 예측모드를 이용하여 상기 색차 블록을 예측하는 단계; 및 상기 색차 블록의 인트라 예측모드에 대한 정보를 부호화하는 단계를 포함하되, 상기 색차 블록의 인트라 예측모드에 대한 정보를 부호화하는 단계는, 상기 색차 블록이 대응하는 휘도 블록 내의 복원된 픽셀 값들로부터 예측되는지 여부를 나타내는 플래그를 부호화하는 단계; 및 상기 플래그가 상기 색차 블록이 상기 휘도 블록 내의 복원된 픽셀 값들로부터 예측되지 않음을 나타낼 때, 기정의된 인트라 예측모드들의 후보 세트(candidate set)로부터 상기 색차 블록의 인트라 예측모드를 선택하기 위한 모드 정보를 부호화하는 단계를 포함하고, 상기 후보 세트는 상기 휘도 블록으로부터 유도되는 인트라 예측모드인 DM 모드를 포함한다.Another aspect of the present invention is to store a bitstream generated by an encoding method of intra-predicting a chroma block divided from a chrominance coding treeblock having a block division structure different from the corresponding luminance coding treeblock, A recording medium readable by a decoder is provided. The encoding method includes determining an intra prediction mode of the chrominance block; predicting the chrominance block using an intra prediction mode of the chrominance block; and encoding information about the intra prediction mode of the chrominance block, wherein the step of encoding the information about the intra prediction mode of the chrominance block includes predicting the chrominance block from the reconstructed pixel values in the corresponding luminance block. Encoding a flag indicating whether or not and a mode for selecting an intra prediction mode of the chrominance block from a candidate set of predefined intra prediction modes when the flag indicates that the chrominance block is not predicted from reconstructed pixel values in the luminance block. and encoding information, wherein the candidate set includes a DM mode, which is an intra prediction mode derived from the luminance block.

도 1은 HEVC에서 인트라 예측에 사용 가능한 인트라 모드들을 도시한 도면,
도 2는 본 발명의 일 실시예에 따른 영상 부호화 장치에 대한 블록도,
도 3은 QTBT 구조를 이용한 블록 분할의 예시도,
도 4는 본 발명의 일 실시예에 따른 복수의 인트라 예측모드에 대한 예시도,
도 5는 현재블록의 주변블록들을 나타내는 예시도,
도 6은 CTU의 휘도성분과 색차성분에 대한 블록 분할 구조를 나타내는 예시도,
도 7은 CTU의 휘도성분에 대한 블록 분할 구조에서 각 휘도블록들의 인트라 예측모드를 나타내는 예시도,
도 8은 z-스캔 순서를 나타내는 예시도,
도 9는 본 발명의 DM(direct mode)을 유도하기 위한 일 예시도,
도 10은 본 발명의 DM을 유도하기 위한 또 다른 예시도,
도 11는 본 발명의 DM을 유도하기 위한 또 다른 예시도,
도 12는 본 발명의 DM을 유도하기 위한 또 다른 예시도,
도 13은 본 발명의 DM을 유도하기 위한 또 다른 예시도,
도 14는 본 발명의 일 실시예에 따른 영상 복호화 장치에 대한 블록도이다.
1 is a diagram showing intra modes available for intra prediction in HEVC;
2 is a block diagram of an image encoding device according to an embodiment of the present invention;
Figure 3 is an example of block division using the QTBT structure,
Figure 4 is an illustration of a plurality of intra prediction modes according to an embodiment of the present invention;
Figure 5 is an example diagram showing neighboring blocks of the current block,
Figure 6 is an example diagram showing a block division structure for the luminance component and chrominance component of the CTU;
Figure 7 is an example diagram showing the intra prediction mode of each luminance block in the block division structure for the luminance component of the CTU;
Figure 8 is an example diagram showing the z-scan order;
Figure 9 is an example diagram for inducing DM (direct mode) of the present invention;
Figure 10 is another example for deriving DM of the present invention,
Figure 11 is another example for deriving DM of the present invention,
Figure 12 is another example for deriving DM of the present invention,
Figure 13 is another example for deriving DM of the present invention,
Figure 14 is a block diagram of an image decoding device according to an embodiment of the present invention.

이하, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성 요소들에 식별 부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail through illustrative drawings. In adding identification codes to components in each drawing, it should be noted that the same components are given the same codes as much as possible even if they are shown in different drawings. Additionally, in describing the present invention, if it is determined that a detailed description of a related known configuration or function may obscure the gist of the present invention, the detailed description will be omitted.

도 2는 본 발명의 일 실시예에 따른 영상 부호화 장치에 대한 블록도이다.Figure 2 is a block diagram of a video encoding device according to an embodiment of the present invention.

영상 부호화 장치는 블록 분할부(210), 예측부(220), 감산기(230), 변환부(240), 양자화부(245), 부호화부(250), 역양자화부(260), 역변환부(265), 가산기(270), 필터부(280) 및 메모리(290)를 포함한다. 영상 부호화 장치는 각 구성요소는 하드웨어 칩으로 구현될 수 있으며, 또는 소프트웨어로 구현되고 마이크로프로세서가 각 구성요소에 대응하는 소프트웨어의 기능을 실행하도록 구현될 수도 있다.The image encoding device includes a block division unit 210, a prediction unit 220, a subtractor 230, a transform unit 240, a quantization unit 245, an encoder 250, an inverse quantization unit 260, and an inverse transform unit ( 265), an adder 270, a filter unit 280, and a memory 290. Each component of the video encoding device may be implemented as a hardware chip, or may be implemented as software, with a microprocessor executing the software function corresponding to each component.

블록 분할부(210)는 영상을 구성하는 각 픽처(picture)를 복수의 CTU(Coding Tree Unit)로 분할한 이후에, CTU를 트리 구조(tree structure)를 이용하여 반복적으로(recursively) 분할한다. 트리 구조에서의 리프 노드(leaf node)가 부호화의 기본 단위인 CU (coding unit)가 된다. 트리 구조로는 상위 노드가 네 개의 하위 노드로 분할하는 쿼드트리(QuadTree, QT), 또는 QT 구조 및 상위 노드가 두 개의 하위 노드로 분할하는 바이너리트리(BinaryTree, BT) 구조를 혼용한 QTBT (QuadTree plus BinaryTree) 구조가 사용될 수 있다. The block division unit 210 divides each picture constituting the image into a plurality of CTUs (Coding Tree Units) and then recursively divides the CTUs using a tree structure. A leaf node in the tree structure becomes a CU (coding unit), the basic unit of encoding. The tree structure is either QuadTree (QT), where the upper node is divided into four lower nodes, or QTBT (QuadTree), which is a combination of the QT structure and BinaryTree (BT) structure, where the upper node is divided into two lower nodes. plus BinaryTree) structure can be used.

QTBT (QuadTree plus BinaryTree) 구조에서, CTU는 먼저 QT 구조로 분할된다. 이후, QT의 리프 노드들은 BT에 의해 추가로 더 분할될 수 있다. 블록 분할부(210)가 QTBT 구조에 의해 CTU를 분할하여 생성하는 분할 정보는 부호화부(250)에 의해 부호화되어 영상 복호화 장치로 전달된다. In the QTBT (QuadTree plus BinaryTree) structure, the CTU is first divided into the QT structure. Afterwards, the leaf nodes of QT can be further divided by BT. Segmentation information generated by the block division unit 210 by dividing the CTU using the QTBT structure is encoded by the encoder 250 and transmitted to the video decoding device.

QT에서는 해당 노드의 블록이 분할 여부를 지시하는 제1 플래그(QT 분할 플래그, QT_split_flag)가 부호화된다. 제1 플래그가 1이면 해당 노드의 블록이 동일 크기의 네 개의 블록으로 분할되고, 0이면 해당 노드는 QT에 의해 더 이상 분할되지 않는다. In QT, a first flag (QT split flag, QT_split_flag) indicating whether the block of the corresponding node is split is encoded. If the first flag is 1, the block of the node is divided into four blocks of the same size, and if the first flag is 0, the node is no longer divided by QT.

BT에서는 해당 노드의 블록의 분할 여부를 지시하는 제2 플래그(BT 분할 플래그, BT_split_flag)가 부호화된다. BT 에서는 복수의 분할 타입이 존재할 수 있다. 예컨대, 해당 노드의 블록을 동일 크기의 두 개 블록으로 가로로 분할하는 타입과 세로로 분할하는 타입 두 가지가 존재할 수 있다. 또는, 해당 노드의 블록을 서로 비대칭 형태의 두 개의 블록으로 분할하는 타입이 추가로 더 존재할 수도 있다. 비대칭 형태로는 해당 노드의 블록을 1:3의 크기 비율을 가지는 두 개의 직사각형 블록으로 분할하는 형태를 포함할 수 있고, 또는 해당 노드의 블록을 대각선 방향으로 분할하는 형태를 포함할 수도 있다. 이렇게 BT가 복수의 분할 타입을 가지는 경우에는, 블록이 분할됨을 의미하는 제2 플래그가 부호화되면, 해당 블록의 분할 타입을 지시하는 분할 타입 정보가 추가로 부호화된다.In BT, a second flag (BT split flag, BT_split_flag) indicating whether the block of the corresponding node is split is encoded. In BT, multiple split types may exist. For example, there may be two types: a type that divides the block of the node horizontally into two blocks of the same size and a type that divides it vertically. Alternatively, there may be an additional type that divides the block of the corresponding node into two asymmetric blocks. The asymmetric form may include dividing the block of the corresponding node into two rectangular blocks with a size ratio of 1:3, or may include dividing the block of the corresponding node diagonally. In this case, when the BT has multiple partition types, when the second flag indicating that the block is partitioned is encoded, partition type information indicating the partition type of the corresponding block is additionally encoded.

도 3은 QTBT 구조를 이용한 블록 분할의 예시도이다. 도 3의 (a)는 QTBT 구조에 의해 블록이 분할되는 예시이고, (b)는 이를 트리구조로 표현한 것이다. 도 3에서 실선은 QT 구조에 의한 분할을, 점선은 BT 구조에 의한 분할을 나타낸다. 또한, 도 3 (b)에서 layer 표기와 관련하여, 괄호가 없는 것은 QT의 레이어를, 괄호가 있는 것은 BT의 레이어를 나타낸다. 점선으로 표현된 BT 구조에서 숫자는 분할 타입 정보를 나타낸다. 1은 가로 분할을 0은 세로 분할을 나타낸다.Figure 3 is an example of block division using the QTBT structure. Figure 3 (a) is an example of a block being divided by the QTBT structure, and (b) is this expressed in a tree structure. In Figure 3, the solid line represents division by the QT structure, and the dotted line represents division by the BT structure. In addition, with respect to the layer notation in Figure 3 (b), those without parentheses indicate a QT layer, and those with parentheses indicate a BT layer. In the BT structure represented by a dotted line, numbers represent split type information. 1 represents horizontal division and 0 represents vertical division.

이하에서는, 부호화 또는 복호화하고자 하는 CU에 해당하는 블록을 '현재블록'이라 칭한다.Hereinafter, the block corresponding to the CU to be encoded or decoded is referred to as the 'current block'.

예측부(220)는 현재블록을 예측하여 예측블록을 생성한다. 예측부(220)는 인트라 예측부(222)와 인터 예측부(224)를 포함한다. The prediction unit 220 predicts the current block and generates a prediction block. The prediction unit 220 includes an intra prediction unit 222 and an inter prediction unit 224.

인트라 예측부(222)는 현재블록이 포함된 현재 픽처 내에서 현재블록의 주변에 위치한 픽셀(참조 픽셀)들을 이용하여 현재블록 내의 픽셀들을 예측한다. 예측 방향에 따라 복수의 인트라 예측모드가 존재하며, 각 예측모드에 따라 사용할 주변 픽셀과 연산식이 다르게 정의된다. 특히, 인트라 예측부(222)는 현재블록을 부호화하는데 사용할 인트라 예측모드를 결정할 수 있다. 일부 예들에서, 인트라 예측부(222)는 여러 인트라 예측모드들을 사용하여 현재블록을 인코딩하고, 테스트된 모드들로부터 사용할 적절한 인트라 예측모드를 선택할 수도 있다. 예를 들어, 인트라 예측부(222)는 여러 테스트된 인트라 예측모드들에 대한 레이트 왜곡(rate-distortion) 분석을 사용하여 레이트 왜곡 값들을 계산하고, 테스트된 모드들 중 최선의 레이트 왜곡 특징들을 갖는 인트라 예측모드를 선택할 수도 있다. The intra prediction unit 222 predicts pixels within the current block using pixels (reference pixels) located around the current block within the current picture including the current block. There are multiple intra prediction modes depending on the prediction direction, and the surrounding pixels and calculation formulas to be used are defined differently for each prediction mode. In particular, the intra prediction unit 222 can determine the intra prediction mode to be used to encode the current block. In some examples, intra prediction unit 222 may encode the current block using multiple intra prediction modes and select an appropriate intra prediction mode to use from the tested modes. For example, the intra prediction unit 222 calculates rate-distortion values using rate-distortion analysis for several tested intra prediction modes, and selects the rate-distortion value with the best rate-distortion characteristics among the tested modes. You can also select intra prediction mode.

도 4는 본 발명의 일 실시예에 따른 인트라 예측모드들에 대한 예시를 나타낸다. Figure 4 shows examples of intra prediction modes according to an embodiment of the present invention.

도 4에서 보는 바와 같이, 인트라 예측모드들은 2개의 비방향성 모드(planar 모드 및 DC 모드)와 65개의 방향성 모드를 포함할 수 있다. As shown in FIG. 4, intra prediction modes may include two non-directional modes (planar mode and DC mode) and 65 directional modes.

인트라 예측부(222)는 복수의 인트라 예측모드 중에서 하나의 인트라 예측모드를 선택하고, 선택된 인트라 예측모드에 따라 결정되는 주변 픽셀(참조 픽셀)과 연산식을 사용하여 현재블록을 예측한다. 선택된 인트라 예측모드에 대한 정보는 부호화부(250)에 의해 부호화되어 영상 복호화 장치로 전달된다. The intra prediction unit 222 selects one intra prediction mode from a plurality of intra prediction modes and predicts the current block using surrounding pixels (reference pixels) and an operation formula determined according to the selected intra prediction mode. Information about the selected intra prediction mode is encoded by the encoder 250 and transmitted to the video decoding device.

인터 예측부(224)는 현재 픽처보다 먼저 부호화 및 복호화된 참조 픽처 내에서 현재블록과 가장 유사한 블록을 탐색하고, 그 탐색된 블록을 이용하여 현재블록에 대한 예측블록을 생성한다. 그리고, 현재 픽처 내의 현재블록과 참조 픽처 내의 예측블록 간의 변위(displacement)에 해당하는 움직임벡터(motion vector)를 생성한다. 현재블록을 예측하기 위해 사용된 참조 픽처에 대한 정보 및 움직임벡터에 대한 정보를 포함하는 움직임 정보는 부호화부(250)에 의해 부호화되어 영상 복호화 장치로 전달된다.The inter prediction unit 224 searches for a block most similar to the current block in a reference picture that has been encoded and decoded before the current picture, and generates a prediction block for the current block using the searched block. Then, a motion vector corresponding to the displacement between the current block in the current picture and the prediction block in the reference picture is generated. Motion information including information about reference pictures and motion vectors used to predict the current block is encoded by the encoder 250 and transmitted to the video decoding device.

감산기(230)는 현재블록으로부터 인트라 예측부(222) 또는 인터 예측부(224)에 의해 생성된 예측블록을 감산하여 잔차 블록을 생성한다.The subtractor 230 generates a residual block by subtracting the prediction block generated by the intra prediction unit 222 or the inter prediction unit 224 from the current block.

변환부(240)는 공간 영역의 픽셀 값들을 가지는 잔차 블록 내의 잔차 신호를 주파수 도메인의 변환 계수로 변환한다. 변환부(240)는 잔차 블록 내의 잔차 신호들을 현재블록의 크기를 변환 단위로 사용하여 변환할 수 있으며, 또는 잔차 블록을 더 작은 복수의 서브블록을 분할하고 서브블록 크기의 변환 단위로 잔차 신호들을 변환할 수도 있다. 잔차 블록을 더 작은 서브블록으로 분할하는 방법은 다양하게 존재할 수 있다. 예컨대, 기정의된 동일한 크기의 서브블록으로 분할할 수도 있으며, 또는 잔차 블록을 루트 노드로 하는 QT(quadtree) 방식의 분할을 사용할 수도 있다. The converter 240 converts the residual signal in the residual block with pixel values in the spatial domain into a transform coefficient in the frequency domain. The conversion unit 240 may convert the residual signals in the residual block using the size of the current block as a conversion unit, or divide the residual block into a plurality of smaller subblocks and convert the residual signals into a conversion unit of the subblock size. You can also convert it. There may be various ways to divide the residual block into smaller subblocks. For example, it may be divided into predefined subblocks of the same size, or QT (quadtree) type division may be used with the residual block as the root node.

양자화부(245)는 변환부(240)로부터 출력되는 변환 계수들을 양자화하고, 양자화된 변환 계수들을 부호화부(250)로 출력한다.The quantization unit 245 quantizes the transform coefficients output from the transform unit 240 and outputs the quantized transform coefficients to the encoder 250.

부호화부(250)는 양자화된 변환 계수들을 CABAC 등의 부호화 방식을 사용하여 부호화하여 비트스트림을 생성한다. 또한, 부호화부(250)는 블록 분할과 관련된 CTU size, QT 분할 플래그, BT 분할 플래그, 분할 타입 등의 정보를 부호화하여, 영상 복호화 장치가 영상 부호화 장치와 동일하게 블록을 분할할 수 있도록 한다.The encoder 250 generates a bitstream by encoding the quantized transform coefficients using an encoding method such as CABAC. In addition, the encoder 250 encodes information such as CTU size, QT split flag, BT split flag, and split type related to block splitting, so that the video decoding device can split the block in the same way as the video coding device.

부호화부(250)는 현재블록이 인트라 예측에 의해 부호화되었는지 아니면 인터 예측에 의해 부호화되었는지 여부를 지시하는 예측 타입에 대한 정보를 부호화하고, 예측 타입에 따라 인트라 예측모드 또는 인터 예측정보에 대한 신택스 요소를 부호화한다. The encoder 250 encodes information about the prediction type indicating whether the current block is encoded by intra prediction or inter prediction, and syntax elements for the intra prediction mode or inter prediction information depending on the prediction type. Encode.

역양자화부(260)는 양자화부(245)로부터 출력되는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 생성한다. 역변환부(265)는 역양자화부(260)로부터 출력되는 변환 계수들을 주파수 도메인으로부터 공간 도메인으로 변환하여 잔차블록을 복원한다.The inverse quantization unit 260 inversely quantizes the quantized transform coefficients output from the quantization unit 245 to generate transform coefficients. The inverse transform unit 265 restores the residual block by converting the transform coefficients output from the inverse quantization unit 260 from the frequency domain to the spatial domain.

가산부(270)는 복원된 잔차블록과 예측부(220)에 의해 생성된 예측블록을 가산하여 현재블록을 복원한다. 복원된 현재블록 내의 픽셀들은 다음 순서의 블록을 인트라 예측할 때 참조 픽셀로서 사용된다.The addition unit 270 restores the current block by adding the restored residual block and the prediction block generated by the prediction unit 220. Pixels in the restored current block are used as reference pixels when intra-predicting the next block.

필터부(280)는 블록 단위의 부호화/복호화로 인해 발생하는 블록킹 현상(blocking artifact)을 제거하기 위해 복원된 블록 간의 경계를 디블록킹 필터링하고 메모리(290)에 저장한다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 부호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조 픽처로 사용된다.The filter unit 280 performs deblocking filtering on the boundaries between restored blocks to remove blocking artifacts caused by block-level encoding/decoding and stores them in the memory 290. When all blocks in one picture are reconstructed, the reconstructed picture is later used as a reference picture for inter prediction of blocks in the picture to be encoded.

한편, 현재블록의 픽셀들은 휘도 성분과 두 개의 색차 성분(Cb, Cr)으로 구성될 수 있다. 이 경우, 현재블록은 휘도 성분으로 구성된 하나의 휘도블록과 각각의 색차 성분으로 구성된 두 개의 색차블록을 포함한다. 휘도블록과 색차블록은 이상에서 설명한 부호화 방법에 따라 서로 독립적으로 예측되고 부호화될 수 있다. 즉, 휘도블록과 색차블록은 서로 독립적으로 예측되고 휘도블록과 색차블록의 잔차 신호도 독립적으로 부호화된다.Meanwhile, the pixels of the current block may be composed of a luminance component and two chrominance components (Cb, Cr). In this case, the current block includes one luminance block composed of luminance components and two chrominance blocks composed of respective chrominance components. The luminance block and the chrominance block can be predicted and encoded independently of each other according to the encoding method described above. That is, the luminance block and the chrominance block are predicted independently from each other, and the residual signals of the luminance block and the chrominance block are also encoded independently.

본 개시는 휘도블록과 색차블록의 부호화에 있어서, 휘도블록과 색차블록 각각의 인트라 예측모드를 결정하고 부호화하는 것과 관련된다. 휘도블록의 인트라 예측모드를 결정하는 방식과 색차블록의 인트라 예측모드를 결정하는 방식은 서로 다를 수 있다.The present disclosure relates to determining and encoding an intra prediction mode for each luminance block and chrominance block in encoding a luminance block and a chrominance block. The method of determining the intra prediction mode of a luminance block and the method of determining the intra prediction mode of a chrominance block may be different.

휘도블록의 경우, 영상 부호화 장치(200)는 휘도블록의 인트라 예측모드를 결정하고 전체 인트라 예측모드들을 복수의 후보 집합을 분류한다. 그리고 휘도블록의 인트라 예측모드가 복수의 후보 집합 중 어느 그룹에 속하는지에 대한 정보와 해당 그룹 내에서 휘도블록의 인트라 예측모드를 지시하기 위한 색인 정보를 휘도 인트라 모드 정보(luma intra mode information) 생성하고 부호화한다. 복수의 후보 집합은, 현재블록의 전체 인트라 예측모드들을 발생 빈도에 따라 분류함으로써 생성될 수 있다. 예컨대, 복수의 후보 집합은 다음의 그룹을 포함한다.In the case of a luminance block, the image encoding device 200 determines the intra prediction mode of the luminance block and classifies all intra prediction modes into a plurality of candidate sets. In addition, information about which group the intra prediction mode of the luminance block belongs to among a plurality of candidate sets and index information to indicate the intra prediction mode of the luminance block within the group are generated as luma intra mode information. Encode. A plurality of candidate sets can be created by classifying all intra prediction modes of the current block according to their frequency of occurrence. For example, the plurality of candidate sets includes the following groups.

(1) 제1 그룹 (MPM 그룹): (1) Group 1 (MPM Group):

휘도블록의 인트라 예측모드로 선택될 확률이 가장 높은 모드(MPM, most probable mode)들로 구성된다. MPM들은 휘도블록에 인접한 주변블록의 인트라 예측모드들로부터 유도된다. 주변블록은 휘도블록의 좌측에 인접한 휘도블록(L), 상단에 인접한 휘도블록(A), 좌측하단에 인접한 휘도블록(BL), 우측상단에 인접한 블록(AR), 좌측상단에 인접한 휘도블록(AL)을 포함한다.It consists of the modes with the highest probability of being selected as the intra prediction mode of the luminance block (MPM, most probable mode). MPMs are derived from the intra prediction modes of neighboring blocks adjacent to the luminance block. The surrounding blocks are the luminance block adjacent to the left of the luminance block (L), the luminance block adjacent to the top (A), the luminance block adjacent to the bottom left (BL), the block adjacent to the top right (AR), and the luminance block adjacent to the top left ( AL) includes.

(2) 제2 그룹 (Selected Mode 그룹): (2) Second group (Selected Mode group):

MPM들 이외의 모드들 중 자주 출현하는 모드들로 구성된다. 제2 그룹은, 전체 인트라 예측모드들 중 MPM을 제외하고 모드 번호를 오름차순으로 재정렬할 때 4의 배수의 모드 번호를 가지는 모드들, 또는 제1 그룹에 속한 방향성 모드들에 오프셋(예컨대, -1, +1)을 가산하여 생성한 모드들로 구성된다.It consists of modes that frequently appear among modes other than MPMs. The second group includes modes with mode numbers that are multiples of 4 when rearranging the mode numbers in ascending order, excluding MPM among all intra prediction modes, or an offset (e.g., -1) to the directional modes belonging to the first group. It consists of modes created by adding , +1).

(3) 제3 그룹 (non-Selected Mode 그룹):(3) Third group (non-Selected Mode group):

전체 인트라 예측모드들 중 제1 그룹과 제2 그룹에 속한 모드들을 제외한 나머지 모드들로 구성된다.It consists of the remaining modes excluding the modes belonging to the first and second groups among all intra prediction modes.

한편, 색차블록의 경우, 영상 부호화 장치(200)는 색차블록의 인트라 예측모드에 대한 복수 개의 후보들을 포함하는 후보 집합을 구성한다. 그리고 후보 집합에 속하는 복수의 후보들 중 색차블록의 인트라 예측모드를 결정하고 복수의 후보들 중 선택된 후보를 지시하기 위한 색차 인트라 모드 정보(chroma intra mode information)를 부호화한다. Meanwhile, in the case of a chrominance block, the image encoding device 200 configures a candidate set including a plurality of candidates for the intra prediction mode of the chrominance block. Then, the intra prediction mode of the chrominance block among the plurality of candidates belonging to the candidate set is determined, and chroma intra mode information to indicate the selected candidate among the plurality of candidates is encoded.

후보 집합은 다음의 네 가지 타입의 인트라 예측모드들로 구성될 수 있다.The candidate set may consist of the following four types of intra prediction modes.

(1) LM(linear mode): (1) LM(linear mode):

휘도블록 내의 복원된(reconstructed) 픽셀 값을 이용하여 색차블록에 대한 예측블록을 유도하는 인트라 모드이다. 휘도블록과 색차블록 사이의 상관 관계를 이용하여 scaling factor α 값 및 offset인 β값을 구한 후, 이 두 값과 휘도블록 내의 복원된(reconstructed) 픽셀 값을 이용하여 색차블록에 대한 예측블록을 유도한다. 구체적인 공식은 수학식 1과 같다.This is an intra mode that derives a prediction block for the chrominance block using reconstructed pixel values in the luminance block. After calculating the scaling factor α value and the offset β value using the correlation between the luminance block and the chrominance block, a prediction block for the chrominance block is derived using these two values and the reconstructed pixel value in the luminance block. do. The specific formula is as shown in Equation 1.

여기서, Pred c (i,j)는 현재블록에 대응하는 예측 색차블록을, rec L (i,j)는 현재블록에 대응하는 다운샘플된 복원된 휘도블록을, α는 scaling factor, β는 offset을 나타낸다. α 및 β는 인트라 예측이 수행되는 블록 단위, 또는 블록 파티션을 위한 트리 구조에서 루트 노드(root node)에 해당하는 최상위 레이어의 블록, 또는 슬라이스, 픽처, 다수의 픽처들의 그룹인 시퀀스 단위 중 어느 하나의 단위로 비트스트림에 포함되어 복호화 장치로 전달될 수 있다. 또는, α 및 β는 부호화 장치와 복호화 장치가 현재블록 주변의 이미 복원된 휘도블록 및 색차블록 내의 픽셀값들을 이용하여 동일하게 산출할 수도 있다. 이 경우 α 및 β에 대한 시그널링은 요구되지 않는다. Here, Pred c (i,j) is the predicted chrominance block corresponding to the current block, rec L (i,j) is the downsampled restored luminance block corresponding to the current block, α is the scaling factor, and β is the offset. represents. α and β are either a block unit on which intra prediction is performed, a block of the highest layer corresponding to the root node in a tree structure for block partition, or a sequence unit that is a slice, picture, or group of multiple pictures. It can be included in the bitstream in units of and transmitted to the decoding device. Alternatively, α and β may be equally calculated by the encoding device and the decoding device using pixel values in the already restored luminance block and chrominance block around the current block. In this case signaling for α and β is not required.

(2) DM (direct mode):(2) DM (direct mode):

색차블록에 대응하는 휘도블록의 인트라 예측모드를 의미한다. CTU로부터의 CU로의 트리 구조 분할에서, 휘도 성분과 색차 성분은 동일한 구조로 분할될 수 있다. 이 경우 색차블록에 대응하는 휘도블록은 하나이므로 DM은 1개이다. 그러나, 휘도 성분과 색차 성분이 서로 다른 구조로 분할될 수도 있다. 도 6을 참조하면, 도 6(a)는 휘도 성분으로 구성된 CTU의 블록 분할 구조를, 도 6(b)는 색차 성분으로 구성된 CTU의 블록 분할 구조를 나타낸다. 도 6(b)의 우측상단에 위치한 색차블록에 대응하는 도 6(a)의 우측상단에 위치한 휘도블록은 총 6개의 서브블록으로 분할되어 있음을 알 수 있다. 각 서브블록이 하나의 CU가 되므로 각 서브블록들은 서로 다른 인트라 예측모드들을 사용하여 인트라 예측될 수 있다. 따라서, 색차블록에 대응하는 휘도블록의 인트라 예측모드들은 복수 개일 수 있다. This refers to the intra prediction mode of the luminance block corresponding to the chrominance block. In the tree structure division from CTU to CU, the luminance component and chrominance component can be divided into the same structure. In this case, there is one luminance block corresponding to the chrominance block, so there is one DM. However, the luminance component and the chrominance component may be divided into different structures. Referring to FIG. 6, FIG. 6(a) shows a block division structure of a CTU composed of luminance components, and FIG. 6(b) shows a block division structure of a CTU composed of chrominance components. It can be seen that the luminance block located in the upper right corner of FIG. 6(a), which corresponds to the chrominance block located in the upper right corner of FIG. 6(b), is divided into a total of six subblocks. Since each subblock becomes one CU, each subblock can be intra predicted using different intra prediction modes. Accordingly, there may be a plurality of intra prediction modes of the luminance block corresponding to the chrominance block.

따라서 색차블록에 대응하는 휘도블록이 복수 개의 서브블록으로 분할된 경우 복수 개의 서브블록들의 인트라 예측모드들로부터 하나 이상의 인트라 예측모드들을 유도하는 방법이 요구되며, 이에 대한 상세한 설명은 후술한다.Therefore, when the luminance block corresponding to the chrominance block is divided into a plurality of subblocks, a method of deriving one or more intra prediction modes from the intra prediction modes of the plurality of subblocks is required, a detailed description of which will be described later.

(3) neighboring mode:(3) neighboring mode:

색차블록에 공간적으로 인접한 주변 색차블록들의 인트라 예측모드들을 의미한다. 예컨대, 주변 색차블록의 위치는 도 5와 같이 결정될 수 있다. 주변 색차블록들의 인트라 예측모드들로부터 후보들을 유도할 때, 주변 색차블록을 선택하는 우선 순위는 좌측(L), 상단(A), 좌측하단(BL), 우측상단(AR), 및 좌측상단(AL)의 순서일 수 있다.This refers to the intra prediction modes of surrounding color difference blocks that are spatially adjacent to the color difference block. For example, the positions of surrounding color difference blocks may be determined as shown in FIG. 5 . When deriving candidates from the intra prediction modes of surrounding color difference blocks, the priority for selecting the surrounding color difference blocks is left (L), top (A), bottom left (BL), top right (AR), and top left ( AL) may be the order.

(4) default mode:(4) default mode:

확률적으로 자주 사용되는 모드들로서, Planar, DC, 수직, 수평, 대각선 모드의 순서로 후보 집합에 포함될 수 있다. 또는, 먼저 Planar 및 DC 모드 순으로 후보 집합에 포함시킨 후, 후보 집합에 이미 포함된 각도 모드들(방향성 모드들)에 -1 또는 +1을 가하여 얻은 모드들을 후보 집합에 포함시킨다. 여전히 후보 집합 내의 후보의 개수가 부족하면 수직, 수평, 대각선 모드의 순서로 후보 집합을 채운다.Probabilistically frequently used modes can be included in the candidate set in the order of planar, DC, vertical, horizontal, and diagonal modes. Alternatively, planar and DC modes are first included in the candidate set in that order, and then modes obtained by adding -1 or +1 to the angular modes (directional modes) already included in the candidate set are included in the candidate set. If the number of candidates in the candidate set is still insufficient, the candidate set is filled in the order of vertical, horizontal, and diagonal modes.

이상에서 설명한 네 가지 타입으로 유도된 인트라 예측모드들을 이용하여 후보 집합을 구성한다. 후보 집합 내의 후보들의 개수 m은 5~8의 범위 내의 값을 가질 수 있다. 네 가지 타입 중 후보 집합에 색차블록의 인트라 예측모드를 채우는 순서는 다양하게 결정될 수 있다.A candidate set is constructed using the intra prediction modes derived from the four types described above. The number m of candidates in the candidate set may have a value in the range of 5 to 8. Among the four types, the order of filling the candidate set with the intra prediction mode of the color difference block can be determined in various ways.

하나의 예시로서, DM, LM, neighboring mode, default mode의 순서로 후보 집합에 색차블록의 인트라 예측모드 후보들을 채울 수 있다. 예컨대, 후보 집합의 개수가 6개로 정의되어 있고, 2개의 DM 및 1개의 LM가 유도되고 neighboring mode의 우선 순위에 근거하여 가용한(available) 주변 블록 L, AR, AL로부터 3개의 모드가 유도되었다면, 이미 총 6개의 후보들이 유도되었으므로 default mode는 사용하지 않는다. 따라서, 후보 집합은 2개의 DM, 1개의 LM, 주변 블록 L, AR, AL의 인트라 예측모드들의 순서로 채워진다. 만약 1개의 DM 및 1개의 LM와 가용한 주변 블록 A, AL으로부터 2개의 모드를 구했다면, default mode에서의 우선 순위에 근거하여 planar, DC 순으로 2개의 후보를 유도한다. 후보 집합은 1개의 DM 1개, 1개의 LM, 주변 블록 A, AL의 인트라 예측모드, planar, DC 순서로 채워진다. 만약 5개의 DM과 1개의 LM이 유도된 경우, 이미 6개의 후보들이 모두 유도되었으므로, neighboring mode과 default mode는 후보 집합에 포함되지 않는다. As an example, the intra prediction mode candidates of the color difference block can be filled in the candidate set in the order of DM, LM, neighboring mode, and default mode. For example, if the number of candidate sets is defined as 6, 2 DMs and 1 LM are derived, and 3 modes are derived from the available neighboring blocks L, AR, and AL based on the priority of the neighboring mode, , Since a total of 6 candidates have already been derived, the default mode is not used. Therefore, the candidate set is filled in the following order: two DMs, one LM, and the intra prediction modes of neighboring blocks L, AR, and AL. If two modes are obtained from one DM, one LM, and available surrounding blocks A and AL, two candidates are derived in the order of planar and DC based on the priority in the default mode. The candidate set is filled in the following order: 1 DM, 1 LM, surrounding block A, AL's intra prediction mode, planar, and DC. If 5 DMs and 1 LM are derived, all 6 candidates have already been derived, so the neighboring mode and default mode are not included in the candidate set.

다른 예시로서, LM, DM, neighboring mode, default mode의 순서로 후보 집합에 색차블록의 인트라 예측모드 후보들을 채울 수 있다.As another example, the intra prediction mode candidates of the color difference block can be filled in the candidate set in the order of LM, DM, neighboring mode, and default mode.

후보 집합에 속하는 m개의 인트라 예측모드 후보들은 중복되어서는 안 된다. 새로운 인트라 예측모드를 후보로서 후보 집합에 추가할 때, 그 새로운 인트라 예측모드가 후보 집합에 이미 존재하는지 확인하고 존재하지 않으면 그 새로운 인트라 예측모드를 후보 집합에 추가한다.The m intra prediction mode candidates belonging to the candidate set must not overlap. When adding a new intra prediction mode as a candidate to the candidate set, check whether the new intra prediction mode already exists in the candidate set, and if not, add the new intra prediction mode to the candidate set.

한편, LM은 항상 후보 집합에 포함되도록 할 수도 있다. 이 경우, 총 m개의 후보들 중에서 LM 모드를 제외한 일반적인(normal) 인트라 예측모드의 개수는 m-1개가 된다. 예컨대, 후보 집합의 개수가 6개로 기정의되어 있다면 DM, neighboring modes, 및 default modes로부터 최대 5개의 일반적인 인트라 예측모드들을 유도한다.Meanwhile, LM may always be included in the candidate set. In this case, among the total m candidates, the number of normal intra prediction modes excluding LM mode is m-1. For example, if the number of candidate sets is predefined as 6, up to 5 general intra prediction modes are derived from DM, neighboring modes, and default modes.

이하에서는 CTU의 휘도 성분과 색차 성분이 서로 다른 구조로 분할되는 경우, DM을 유도하는 방법에 대해 설명한다.Below, a method for deriving DM when the luminance component and chrominance component of the CTU are divided into different structures will be described.

하나 이상의 DM을 유도하기 위해, 영상 부호화 장치(200)는 휘도블록의 인트라 예측모드들을 저장해 두어야 한다. 각 휘도블록들의 인트라 예측모드들은 NxN 블록 크기로 메모리에 저장할 수 있다. N은 메모리 용량 등을 고려하여 적절하게 설정될 수 있다. 예컨대, N의 값은 1의 값을 가질 수도 있으며(즉, 필셀 단위로 휘도블록의 인트라 예측모드를 저장), 인트라 예측을 위해 이용 가능한 블록 크기들 중 최소 블록 크기를 가질 수도 있다. In order to derive one or more DMs, the image encoding device 200 must store intra prediction modes of the luminance block. The intra prediction modes of each luminance block can be stored in memory in an NxN block size. N can be set appropriately considering memory capacity, etc. For example, the value of N may have a value of 1 (that is, the intra prediction mode of the luminance block is stored on a pixel basis) and may have the minimum block size among block sizes available for intra prediction.

도 7은 도 6의 (a)의 블록 분할 구조에서 각 휘도블록들의 인트라 예측모드를 나타내는 예시도이다.FIG. 7 is an example diagram showing the intra prediction mode of each luminance block in the block division structure of FIG. 6(a).

도 7의 (a)는 각 휘도블록들의 인트라 예측모드들(A 내지 H)을 서로 다른 무늬로 표시하였다. 도 7의 (b)는 휘도블록들의 인트라 예측모드들을 4x4 블록크기 단위로 메모리에 저장하는 경우의 예시를 나타내고 있다. CTU의 크기가 32x32일 때, 총 64개 영역에 대한 인트라 예측모드가 저장된다. In Figure 7(a), the intra prediction modes (A to H) of each luminance block are displayed in different patterns. Figure 7(b) shows an example of storing intra prediction modes of luminance blocks in memory in 4x4 block size units. When the size of the CTU is 32x32, intra prediction modes for a total of 64 areas are stored.

본 실시예에서, 영상 부호화 장치(200)는 색차블록에 대응하는 휘도블록이 복수의 서브블록들로 분할되는 경우, 휘도블록 내에 존재하는 서브블록들 중 적어도 일부의 서브블록들의 인트라 예측모드들로부터 색차블록의 인트라 예측모드를 위한 하나 이상의 후보, 즉, DM을 선택한다. DM을 선택하는 규칙으로는, 적어도 일부의 서브블록들의 인트라 예측모드들의 우선 순위, 또는 적어도 일부의 서브블록들을 스캔하는 기정의된 순서 중 하나 이상이 사용될 수 있다. In this embodiment, when the luminance block corresponding to the chrominance block is divided into a plurality of subblocks, the image encoding device 200 uses intra prediction modes of at least some of the subblocks present in the luminance block. Select one or more candidates, that is, DM, for the intra prediction mode of the color difference block. As a rule for selecting a DM, one or more of the priorities of intra prediction modes of at least some subblocks or a predefined order for scanning at least some subblocks may be used.

여기서, 적어도 일부의 서브블록들은 휘도블록 내에 존재하는 복수의 서브블록 전부일 수도 있고 또는 기정의된 위치의 서브블록들일 수 있다. 기정의된 위치의 서브블록들은 색차블록에 대응하는 휘도블록의 중심점에 위치한 픽셀(center, CR), 휘도블록 내의 좌측상단에 위치한 픽셀(top left, TL), 휘도블록 내의 우측상단에 위치한 픽셀(top right, TR), 휘도블록 내의 좌측하단에 위치한 픽셀(bottom left, BL), 및 휘도블록 내의 우측하단에 위치한 픽셀(bottom right, BR)을 커버하는 서브블록들에서 선택될 수 있다. CR은 휘도블록의 중심점을 기준으로 좌측상단에 위치한 픽셀(top left center, TLC)을 의미한다. 그러나 이에 한정되는 것은 아니며, TLC 이외에 우측상단에 위치한 픽셀(top right center, TRC), 좌측하단에 위치한 픽셀(bottom left center, BLC), 우측하단에 위치한 픽셀(bottom right center, BRC) 중 하나 이상이 CR로서 선택될 수도 있다.Here, at least some of the subblocks may be all of a plurality of subblocks existing in the luminance block or may be subblocks at predefined positions. Subblocks at predefined positions include a pixel located at the center point of the luminance block corresponding to the chrominance block (center, CR), a pixel located at the top left within the luminance block (top left, TL), and a pixel located at the top right within the luminance block ( It can be selected from subblocks covering the top right (TR), the pixel located at the bottom left of the luminance block (bottom left, BL), and the pixel located at the bottom right of the luminance block (bottom right, BR). CR refers to the pixel (top left center, TLC) located at the top left based on the center point of the luminance block. However, it is not limited to this, and in addition to TLC, at least one of the pixels located in the upper right center (TRC), the pixel located in the lower left center (BLC), and the pixel located in the lower right center (bottom right center, BRC) It may also be selected as this CR.

한편, 우선 순위는 휘도블록 내에서 적어도 일부의 서브블록들 각각의 인트라 예측모드에 의해 커버되는 블록의 면적일 수 있다. 예컨대, 적어도 일부의 서브블록들이 CR, TL, TR, BL, BR에 위치한 픽셀을 커버하는 블록들이라고 가정하자. 도 11의 (a)를 참조하면, 도 6의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 CR, TL, TR, BL, BR의 인트라 예측모드는 CR(G), TL(C), TR(C), BL(A), BR(G)이다 (“위치(모드)”로 표현하였음). CR, TL, TR, BL, BR에 대응하는 인트라 예측모드는 총 3개(G, C, A)이며, 이 모드들이 휘도블록 내에서 차지하는 면적은 C, G, A의 순서이다. 따라서, 모드 C, G, A의 순서로 후보 집합에 포함된다.Meanwhile, the priority may be the area of the block covered by the intra prediction mode of each of at least some subblocks within the luminance block. For example, assume that at least some subblocks are blocks that cover pixels located in CR, TL, TR, BL, and BR. Referring to Figure 11 (a), the intra prediction modes of CR, TL, TR, BL, and BR within the luminance block corresponding to the chrominance block located in the upper right corner of Figure 6 (b) are CR(G), TL. (C), TR(C), BL(A), and BR(G) (expressed as “position (mode)”). There are a total of three intra prediction modes (G, C, A) corresponding to CR, TL, TR, BL, and BR, and the areas these modes occupy within the luminance block are in the order of C, G, and A. Therefore, modes C, G, and A are included in the candidate set in that order.

또는, 우선 순위는 휘도블록 내에서 적어도 일부의 서브블록들의 인트라 예측모드들 각각과 동일한 인트라 예측모드가 발생하는 빈도수일 수 있다. 예컨대, 적어도 일부의 서브블록들이 CR, TL, TR, BL, BR에 위치한 픽셀을 커버하는 블록들이라고 가정하자. 도 11의 (a)를 참조하면, 도 6의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 CR, TL, TR, BL, BR의 인트라 예측모드는 CR(G), TL(C), TR(C), BL(A), BR(G)이다. 따라서 CR, TL, TR, BL, BR에 대응하는 인트라 예측모드는 총 3개(G, C, A)이다. 휘도블록 내에서 각 인트라 예측모드와 동일한 모드가 발생하는 빈도수를 메모리에 저장되는 블록 크기 단위(예컨대, 도 7의 (b)와 같이 4x4 블록 단위)로 카운팅하는 경우, 이 모드들이 휘도블록 내에서 발생하는 빈도수는 모드 C가 8회, 모드 G가 4회, 모드 A가 1회이다. 빈도수가 큰 순서, 즉, 모드 C, G, A의 순서로 후보 집합에 포함된다. 여기서는 빈도수를 인트라 예측모드가 메모리에 저장되는 블록 크기 단위로 카운팅하는 것으로 설명하였으나, 본 발명이 반드시 이에 한정되는 것은 아니다. 예컨대, 휘도블록 내에서 트리 구조로 분할된 서브블록 단위로 카운팅될 수도 있다. Alternatively, the priority may be the frequency with which the same intra prediction mode as each of the intra prediction modes of at least some subblocks within the luminance block occurs. For example, assume that at least some subblocks are blocks that cover pixels located in CR, TL, TR, BL, and BR. Referring to Figure 11 (a), the intra prediction modes of CR, TL, TR, BL, and BR within the luminance block corresponding to the chrominance block located in the upper right corner of Figure 6 (b) are CR(G), TL. (C), TR(C), BL(A), and BR(G). Therefore, there are a total of three intra prediction modes (G, C, A) corresponding to CR, TL, TR, BL, and BR. If the frequency of occurrence of the same mode as each intra prediction mode within the luminance block is counted in unit of block size stored in memory (e.g., 4x4 block unit as shown in (b) of FIG. 7), these modes are generated within the luminance block. The frequency of occurrence is 8 times for mode C, 4 times for mode G, and 1 time for mode A. They are included in the candidate set in order of greatest frequency, that is, modes C, G, and A. Here, the frequency has been described as counting the intra prediction mode in units of the block size stored in the memory, but the present invention is not necessarily limited to this. For example, the luminance block may be counted in units of subblocks divided into a tree structure.

또는, 우선 순위는 적어도 일부의 서브블록들의 인트라 예측모드들 간의 중복 횟수로서 정의될 수도 있다. 예컨대, 도 11을 참조하면, 도 6의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 CR, TL, TR, BL, BR에 해당하는 인트라 예측모드는 CR(G), TL(C), TR(C), BL(A), BR(G)이다. 따라서 적어도 일부의 서브블록들의 인트라 예측모드들 간의 중복 횟수는 모드 C가 2번, 모드 G가 2번, 모드 A가 1번이다. 따라서, 모드 C와 모드 G가 모드 A보다 먼저 후보 집합에 포함된다.Alternatively, the priority may be defined as the number of overlaps between intra prediction modes of at least some subblocks. For example, referring to FIG. 11, the intra prediction modes corresponding to CR, TL, TR, BL, and BR within the luminance block corresponding to the chrominance block located in the upper right corner of (b) of FIG. 6 are CR(G), TL. (C), TR(C), BL(A), and BR(G). Therefore, the number of overlaps between the intra prediction modes of at least some subblocks is 2 for mode C, 2 for mode G, and 1 for mode A. Therefore, mode C and mode G are included in the candidate set before mode A.

기정의된 스캔 순서로는 z-스캔 순서(z-scan order)가 사용될 수 있다. z-스캔 순서는 좌상, 우상, 좌하, 우하의 순서를 의미한다. 도 8과 같이 어떤 블록이 서브블록으로 분할된 경우, sub-block 간의 처리 순서도 z-스캔 순서이고, sub-block 내에서의 처리 순서도 z-스캔 순서이다. 그러나 기정의된 스캔 순서가 z-스캔 순서로 한정되는 것은 아니다. 기정의된 위치의 서브블록들을 사용하는 경우에 그 기정의된 위치를 z-스캔 순서와는 다른 스캔 순서를 사용하여 스캔할 수도 있다. 예컨대, CR, TL, TR, BL, BR에 위치한 픽셀을 커버하는 서브블록 등의 경우에는 CR, TL, TR, BL, BR 순의 스캔 순서, 또는 TL, CR, TR, BL, BR의 스캔 순서가 사용될 수도 있다.As a predefined scan order, z-scan order can be used. The z-scan order means top left, top right, bottom left, and bottom right. When a block is divided into subblocks as shown in FIG. 8, the processing order between sub-blocks is also z-scan order, and the processing order within the sub-block is also z-scan order. However, the predefined scan order is not limited to the z-scan order. When using subblocks at predefined positions, the predefined positions may be scanned using a scan order different from the z-scan order. For example, in the case of subblocks covering pixels located in CR, TL, TR, BL, and BR, the scan order is CR, TL, TR, BL, and BR, or the scan order is TL, CR, TR, BL, and BR. may also be used.

이하에서는 우선 순위 또는 기정의된 스캔 순서에 따라 휘도블록 내의 복수의 서브블록들로부터 색차블록의 인트라 예측모드를 위한 후보들을 순차적으로 선택하는 방법을 다양한 실시예를 통해 설명한다. 설명의 편의를 위해, 휘도 성분으로 구성된 CTU와 색차 성분으로 구성된 CTU의 블록 분할 구조가 각각 도 6의 (a) 및 도 6의 (b)과 같다고 가정한다. 앞서 예시한 바와 같이, LM을 제외하고 DM, neighboring mode, 및 default mode로부터 최대 5개의 일반적인(normal) 인트라 예측모드를 선택할 수 있다고 가정할 때, 그 중 DM의 우선 순위가 가장 높으므로 최대 5개의 DM들을 후보로서 설정 할 수 있다.Hereinafter, a method of sequentially selecting candidates for the intra prediction mode of a chrominance block from a plurality of subblocks in a luminance block according to priority or a predefined scan order will be described through various embodiments. For convenience of explanation, it is assumed that the block division structures of the CTU composed of the luminance component and the CTU composed of the chrominance component are the same as Figure 6(a) and Figure 6(b), respectively. As previously exemplified, assuming that up to 5 normal intra prediction modes can be selected from DM, neighboring mode, and default mode excluding LM, among them, DM has the highest priority, so up to 5 DMs can be set as candidates.

실시예 #1Example #1

본 실시예는 휘도블록 내에 존재하는 모든 서브블록들의 모든 인트라 예측모드들로부터 z-스캔 순서에 따른 우선 순위에 근거하여 하나 이상의 DM을 선택한다. In this embodiment, one or more DMs are selected based on priority according to z-scan order from all intra prediction modes of all subblocks existing in the luminance block.

도 9는 실시예 1에 따른 DM을 유도하기 위한 예시도이다. 도 9의 (a)에 표기된 대문자 알파벳(A~H)는 인트라 예측모드를 나타내고, 도 9의 (b)에 기재된 숫자는 각 색차블록의 DM의 개수를 나타낸다.Figure 9 is an exemplary diagram for inducing DM according to Example 1. The uppercase letters (A to H) shown in (a) of FIG. 9 indicate the intra prediction mode, and the numbers shown in (b) of FIG. 9 indicate the number of DMs in each color difference block.

도 9의 (a)를 참조하면, 도 9의 (b)의 좌측상단에 위치한 색차블록에 대응하는 휘도블록은 서로 다른 인트라 예측모드를 가지는 두 개의 서브블록이 존재한다. z-스캔 순서에 따라 인트라 예측모드 A와 인트라 예측모드 B의 순서로 총 2개의 DM이 선택된다. 나머지 3개의 후보는 neighboring mode, 및 default mode로부터 선택된다. Referring to (a) of FIG. 9, the luminance block corresponding to the chrominance block located in the upper left corner of (b) of FIG. 9 has two subblocks having different intra prediction modes. A total of two DMs are selected in the order of intra prediction mode A and intra prediction mode B according to the z-scan order. The remaining three candidates are selected from neighboring mode and default mode.

한편, 도 9의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에는 총 6개의 서브블록이 존재하고, 6개의 서브블록들은 서로 다른 인트라 예측모드들을 가진다. 우측상단에 위치한 색차블록의 경우 인트라 예측모드 C, D, E, A, F의 순서로 총 5개의 DM이 선택된다. DM의 최대 개수는 5개이므로, 인트라 예측모드 G는 DM으로 선택되지 않는다.Meanwhile, there are a total of 6 sub-blocks in the luminance block corresponding to the chrominance block located in the upper right corner of Figure 9(b), and the 6 sub-blocks have different intra prediction modes. For the color difference block located in the upper right, a total of 5 DMs are selected in the order of intra prediction modes C, D, E, A, and F. Since the maximum number of DMs is 5, intra prediction mode G is not selected as a DM.

실시예 #2Example #2

본 실시예는 휘도블록 내에 존재하는 모든 서브블록들의 모든 인트라 예측모드들로부터 우선 순위 및 z-스캔 순서에 따라 순차적으로 하나 이상의 DM을 선택한다. DM은 우선 순위가 큰 순서로 선택되고, 우선 순위가 동일한 경우에는 z-스캔 순서에 따라 선택된다. 본 실시예는 전술한 블록 면적, 빈도수, 중복 횟수 중 어느 하나를 우선 순위로서 사용할 수 있으나, 여기서는 블록 면적을 기준으로 설명한다.In this embodiment, one or more DMs are sequentially selected according to priority and z-scan order from all intra prediction modes of all subblocks existing in the luminance block. DMs are selected in order of highest priority, and if the priorities are the same, they are selected in z-scan order. In this embodiment, any one of the above-described block area, frequency, and overlap count can be used as a priority, but here, the description is made based on the block area.

도 10은 실시예 2에 따른 DM을 유도하기 위한 예시도이다. 도 10의 (a)에 표기된 대문자 알파벳(A~H)는 인트라 예측모드를 나타내고, 도 10의 (b)에 기재된 숫자는 각 색차블록의 DM들의 개수를 나타낸다.Figure 10 is an exemplary diagram for inducing DM according to Example 2. The uppercase letters (A to H) shown in (a) of FIG. 10 indicate the intra prediction mode, and the numbers shown in (b) of FIG. 10 indicate the number of DMs in each color difference block.

도 10의 (a)를 참조하면, 도 10의 (b)의 좌측상단에 위치한 색차블록에 대응하는 휘도블록은 서로 다른 인트라 예측모드를 가지는 두 개의 서브블록이 존재한다. 휘도블록 내에서 두 개의 인트라 예측모드가 커버하는 블록의 면적은 동일하다. 따라서, z-스캔 순서에 따라 인트라 예측모드 A와 인트라 예측모드 B의 순서로 총 2개의 DM이 선택된다. 나머지 3개의 후보는 neighboring mode, 및 default mode로부터 선택된다. Referring to (a) of FIG. 10, the luminance block corresponding to the chrominance block located in the upper left corner of (b) of FIG. 10 has two subblocks having different intra prediction modes. The area of the block covered by the two intra prediction modes within the luminance block is the same. Therefore, a total of two DMs are selected in the order of intra prediction mode A and intra prediction mode B according to the z-scan order. The remaining three candidates are selected from neighboring mode and default mode.

한편, 도 10의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에는 총 6개의 서브블록이 존재하고, 6개의 서브블록들은 서로 다른 인트라 예측모드들을 가진다. 휘도블록 내에서 각 인트라 예측모드에 의해 커버되는 블록 면적은 인트라 예측모드 C, G 순서로 크다. 그리고, 인트라 예측모드 D, E, A, F에 의해 커버되는 블록 면적은 서로 동일하다. 본 실시예는 먼저 블록 면적에 따라 인트라 예측모드 C, G 순서로 2 개의 DM을 선택하고, 동일한 면적을 커버하는 인트라 예측모드 D, E, A, F 중에서 z-스캔 순서에 따라 인트라 예측모드 D, E, A 의 순서로 세 개의 DM을 선택한다. DM의 최대 개수는 5개이므로, 인트라 예측모드 F는 DM으로 선택되지 않는다. 따라서, 본 실시예는 인트라 예측모드 C, G, D, E, A의 순서로 총 5개의 DM을 선택한다.Meanwhile, there are a total of 6 sub-blocks in the luminance block corresponding to the chrominance block located in the upper right corner of Figure 10 (b), and the 6 sub-blocks have different intra prediction modes. The block area covered by each intra prediction mode within the luminance block is larger in the order of intra prediction modes C and G. And, the block areas covered by intra prediction modes D, E, A, and F are the same. In this embodiment, two DMs are first selected in the order of intra prediction modes C and G according to the block area, and among intra prediction modes D, E, A, and F that cover the same area, intra prediction mode D is selected according to z-scan order. Select three DMs in the following order: , E, and A. Since the maximum number of DMs is 5, intra prediction mode F is not selected as a DM. Therefore, in this embodiment, a total of five DMs are selected in the order of intra prediction modes C, G, D, E, and A.

실시예 #3Example #3

본 실시예는 휘도블록 내에 존재하는 모든 서브블록들 중 기정의된 위치의 서브블록들로부터 우선 순위 및 기정의된 스캔 순서에 근거하여 하나 이상의 DM을 선택한다. 기정의된 위치의 서브블록들은 휘도블록 내에서 CR, TL, TR, BL, BR에 위치한 픽셀을 커버하는 서브블록들을 포함한다. 본 실시예에서 DM은 우선 순위가 큰 순서로 선택되고, 우선 순위가 동일한 경우에는 기정의된 스캔 순서에 따라 선택된다. 본 실시예는 우선 순위로서 블록 면적, 빈도수, 또는 중복 횟수를 어느 하나를 사용할 수 있고, 기정의된 스캔 순서로서 Z-스캔 순서, 또는 CR, TL, TR, BL, BR 순의 스캔 순서, 또는 TL, CR, TR, BL, BR 의 스캔 순서 등이 사용될 수 있다. 이하에서는 기정의된 스캔 순서로서 Z-스캔 순서를 사용하고, 우선 순위로서 블록 면적 또는 중복 횟수를 사용하는 것을 예로 들어 설명한다.In this embodiment, one or more DMs are selected from subblocks at predefined positions among all subblocks existing in a luminance block based on priority and a predefined scan order. Subblocks at predefined positions include subblocks covering pixels located at CR, TL, TR, BL, and BR within the luminance block. In this embodiment, DMs are selected in order of highest priority, and if the priorities are the same, DMs are selected according to a predefined scan order. This embodiment can use any of the block area, frequency, or number of duplicates as the priority, and as a predefined scan order, the Z-scan order, or the scan order in the order of CR, TL, TR, BL, and BR, or The scan order of TL, CR, TR, BL, BR, etc. can be used. Hereinafter, an example will be given of using the Z-scan order as a predefined scan order and the block area or number of overlaps as the priority.

도 11은 실시예 3에 따른 DM을 유도하기 위한 예시도이다. 도 11의 (a)에 표기된 대문자 알파벳(A~H)는 인트라 예측모드를 나타내고, 도 11의 (b)에 기재된 숫자는 각 색차블록의 DM들의 개수를 나타낸다.Figure 11 is an exemplary diagram for inducing DM according to Example 3. The capital letters (A to H) shown in (a) of FIG. 11 indicate the intra prediction mode, and the numbers shown in (b) of FIG. 11 indicate the number of DMs in each color difference block.

우선 순위로서 블록 면적을 사용하는 경우, 도 11의 (a)를 참조하면, 도 11의 (b)의 좌측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 CR, TL, TR, BL, BR의 각 위치에 대응하는 인트라 예측모드들은 2개 존재한다. 휘도블록 내에서 두 인트라 예측모드에 의해 커버되는 블록 면적이 동일하므로, 본 실시예는 Z-스캔 순서에 따라 인트라 예측모드 A, B의 순서로 2개의 DM을 선택한다. 나머지 3개의 후보는 neighboring mode, 및 default mode로부터 선택된다. 한편, 도 11의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에는 CR, TL, TR, BL, BR의 위치에 대응하는 인트라 예측모드들은 총 3개이다. 휘도블록 내에서 각 인트라 예측모드가 커버하는 블록 면적에 따라 인트라 예측모드 C, G, A의 순서로 3개의 DM이 선택된다. 나머지 2개의 후보는 neighboring mode, 및 default mode로부터 선택된다. When using block area as a priority, referring to (a) of FIG. 11, the values of CR, TL, TR, BL, and BR within the luminance block corresponding to the chrominance block located at the upper left of FIG. 11 (b) There are two intra prediction modes corresponding to each location. Since the block area covered by the two intra prediction modes within the luminance block is the same, this embodiment selects two DMs in the order of intra prediction modes A and B according to the Z-scan order. The remaining three candidates are selected from neighboring mode and default mode. Meanwhile, in the luminance block corresponding to the chrominance block located in the upper right corner of Figure 11 (b), there are a total of three intra prediction modes corresponding to the positions of CR, TL, TR, BL, and BR. Within the luminance block, three DMs are selected in the order of intra prediction modes C, G, and A according to the block area covered by each intra prediction mode. The remaining two candidates are selected from neighboring mode and default mode.

한편, 우선 순위로서 블록 면적이 아닌 중복 횟수를 사용하는 경우, 도 11의 (b)의 좌측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 CR, TL, TR, BL, BR의 각 위치에 대응하는 인트라 예측모드들은 CR (B), TL (A), TR (B), BL (A), BR (B)와 같다. CR, TL, TR, BL, BR에서의 인트라 예측모드들 간의 중복 횟수는 모드 A가 2회, 모드 B가 3회이다. 따라서, 본 실시예는 인트라 예측모드 B, A의 순서로 2개의 DM을 선택한다. 나머지 3개의 후보는 neighboring mode, 및 default mode로부터 선택된다. 한편, 도 11의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에는 CR, TL, TR, BL, BR의 위치에 대응하는 인트라 예측모드들은 CR (G), TL (C), TR (C), BL (A), BR (G)와 같다. CR, TL, TR, BL, BR에서의 인트라 예측모드들 간의 중복 횟수는 모드 A가 1회, 모드 C가 2회, 모드 G가 2회이다. 따라서, 모드 A보다 모드 C와 G가 먼저 DM으로 선택된다. 중복 횟수가 동일한 모드 C와 G 간에는 Z-스캔 순서에 따라 인트라 예측모드 C가 먼저 DM으로 선택된다. 따라서, C, G, A의 순서로 3개의 DM이 선택된다. 나머지 2개의 후보는 neighboring mode, 및 default mode로부터 선택된다.On the other hand, when using the number of overlaps rather than the block area as the priority, each position of CR, TL, TR, BL, and BR within the luminance block corresponding to the chrominance block located in the upper left corner of Figure 11 (b) The intra prediction modes used are CR (B), TL (A), TR (B), BL (A), and BR (B). The number of overlaps between intra prediction modes in CR, TL, TR, BL, and BR is 2 times for mode A and 3 times for mode B. Therefore, in this embodiment, two DMs are selected in the order of intra prediction modes B and A. The remaining three candidates are selected from neighboring mode and default mode. Meanwhile, in the luminance block corresponding to the chrominance block located in the upper right corner of Figure 11 (b), the intra prediction modes corresponding to the positions of CR, TL, TR, BL, and BR are CR (G), TL (C), Same as TR (C), BL (A), BR (G). The number of overlaps between intra prediction modes in CR, TL, TR, BL, and BR is 1 time for mode A, 2 times for mode C, and 2 times for mode G. Therefore, modes C and G are selected as DM before mode A. Between modes C and G with the same number of overlaps, intra prediction mode C is selected as DM first according to the Z-scan order. Therefore, three DMs are selected in the order C, G, and A. The remaining two candidates are selected from neighboring mode and default mode.

이상에서 설명한 본 실시예에서는 우선 순위와 기정의된 스캔 순서를 모두 고려하는 것으로 설명하였으나, 본 실시예는 블록 면적을 고려하지 않고 기정의된 스캔 순서만을 사용할 수도 있다. 예컨대, CR, TL, TR, BL, BR 순의 스캔 순서, 또는 TL, CR, TR, BL, BR 순의 스캔 순서로 DM을 결정하는 것도 가능하다. CR, TL, TR, BL, BR 순의 스캔 순서를 사용하는 경우, 도 11의 (b)의 좌측상단에 위치한 색차블록의 DM은 인트라 예측모드 G, C, A의 순서로 선택된다.In the above-described embodiment, both the priority and the predefined scan order are considered, but this embodiment may use only the predefined scan order without considering the block area. For example, it is possible to determine the DM by the scan order of CR, TL, TR, BL, and BR, or by the scan order of TL, CR, TR, BL, and BR. When using the scan order of CR, TL, TR, BL, and BR, the DM of the color difference block located in the upper left of Figure 11 (b) is selected in the order of intra prediction modes G, C, and A.

실시예 #4Example #4

본 실시예는 휘도블록 내에 존재하는 모든 서브블록들 중 기정의된 위치의 서브블록들로부터 우선 순위와 기정의된 스캔 순서에 근거하여 하나 이상의 DM을 선택한다는 점에서 실시예 #3과 동일하다. 다만, 본 실시예에서는 기정의된 위치의 서브블록들로서 휘도블록 내에서 TL, TR, BL, BR뿐만 아니라 TLC, TRC, BLC, BRC에 위치한 픽셀들 커버하는 서브블록들을 사용한다. 이하에서는 기정의된 스캔 순서로서 z-스캔 순서를 사용하고 우선 순위로서 블록 면적 또는 중복 횟수를 사용하는 것을 예로 들어 설명한다.This embodiment is the same as embodiment #3 in that one or more DMs are selected from subblocks at predefined positions among all subblocks existing in the luminance block based on priority and a predefined scan order. However, in this embodiment, subblocks at predefined positions that cover pixels located at TLC, TRC, BLC, and BRC as well as TL, TR, BL, and BR within the luminance block are used. Below, an example will be given of using the z-scan order as a predefined scan order and the block area or number of overlaps as the priority.

도 12은 실시예 4에 따른 DM을 유도하기 위한 예시도이다. 도 9의 (a)에 표기된 대문자 알파벳(A~H)는 인트라 예측모드를 나타내고, 도 12의 (b)에 기재된 숫자는 각 색차블록의 DM들의 개수를 나타낸다.Figure 12 is an exemplary diagram for inducing DM according to Example 4. The capital letters (A to H) shown in (a) of FIG. 9 indicate the intra prediction mode, and the numbers shown in (b) of FIG. 12 indicate the number of DMs in each color difference block.

먼저, 우선 순위로서 블록 면적을 사용하는 경우를 설명한다. 도 12의 (a)를 참조하면, 도 12의 (b)의 좌측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 TL, TR, BL, BR, TLC, TRC, BLC, BRC의 위치에 대응하는 인트라 예측모드들은 2개 존재한다. 좌측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 두 개의 인트라 예측모드에 의해 커버되는 블록 면적이 동일하므로 Z-스캔 순서에 인트라 예측모드 A, B의 순서로 DM을 선택한다. 나머지 3개의 후보는 neighboring mode, 및/또는 default mode로부터 선택된다.First, the case of using block area as priority will be explained. Referring to (a) of FIG. 12, the positions of TL, TR, BL, BR, TLC, TRC, BLC, and BRC within the luminance block corresponding to the chrominance block located in the upper left corner of (b) of FIG. 12. There are two intra prediction modes. Since the block area covered by the two intra prediction modes within the luminance block corresponding to the chrominance block located in the upper left corner is the same, DM is selected in the order of intra prediction modes A and B in the Z-scan order. The remaining three candidates are selected from neighboring mode, and/or default mode.

한편, 도 12의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에는 TL, TR, BL, BR, TLC, TRC, BLC, BRC의 위치에 대응하는 인트라 예측모드들은 총 4개이다. 각 인트라 예측모드가 커버하는 블록 면적에 따라 인트라 예측모드 C, G의 순서로 먼저 2개의 DM이 선택된다. BL과 BLC 위치에 대응하는 인트라 예측모드들은 동일한 블록 면적을 커버하므로, Z-스캔 순서에 따라 BLC, BL의 순서로 인트라 예측모드 E와 A가 순차적으로 DM으로 선택된다. 즉, 본 실시예에서는 인트라 예측모드 C, G, E, A의 순서로 총 4개의 DM이 선택된다. 나머지 한 개의 후보는 neighboring mode 및/또는 default mode로부터 선택된다.Meanwhile, in the luminance block corresponding to the chrominance block located in the upper right corner of Figure 12 (b), there are a total of four intra prediction modes corresponding to the positions of TL, TR, BL, BR, TLC, TRC, BLC, and BRC. According to the block area covered by each intra prediction mode, two DMs are selected first in the order of intra prediction modes C and G. Since the intra prediction modes corresponding to the BL and BLC positions cover the same block area, intra prediction modes E and A are sequentially selected as DM in the order of BLC and BL according to the Z-scan order. That is, in this embodiment, a total of four DMs are selected in the order of intra prediction modes C, G, E, and A. The remaining candidate is selected from neighboring mode and/or default mode.

우선 순위로서 중복 횟수를 사용하는 경우를 설명하면, 도 12의 (b)의 좌측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 TL, TR, BL, BR, TLC, TRC, BLC, BRC의 위치에 대응하는 인트라 예측모드들은 TL (A), TR (B), BL (A), BR (B), TLC (A), TRC (B), BLC (A), BRC (B)와 같다. TL, TR, BL, BR, TLC, TRC, BLC, BRC의 위치에 대응하는 두 개의 인트라 예측모드들 간의 중복 횟수는 4회로 동일하므로 Z-스캔 순서에 인트라 예측모드 A, B의 순서로 DM을 선택한다. 나머지 3개의 후보는 neighboring mode, 및/또는 default mode로부터 선택된다.To explain the case of using the number of duplicates as priority, the positions of TL, TR, BL, BR, TLC, TRC, BLC, and BRC within the luminance block corresponding to the chrominance block located in the upper left corner of Figure 12 (b). The corresponding intra prediction modes are TL (A), TR (B), BL (A), BR (B), TLC (A), TRC (B), BLC (A), and BRC (B). Since the number of overlaps between the two intra prediction modes corresponding to the positions of TL, TR, BL, BR, TLC, TRC, BLC, and BRC is the same at 4, DM is performed in the order of intra prediction modes A and B in Z-scan order. Choose. The remaining three candidates are selected from neighboring mode, and/or default mode.

한편, 도 12의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에는 TL, TR, BL, BR, TLC, TRC, BLC, BRC의 위치에 대응하는 인트라 예측모드들은 TL (C), TR (C), BL (A), BR (G), TLC (C), TRC (C), BLC (E), BRC (G)와 같다. 각 위치에 대응하는 인트라 예측모드 간의 중복 횟수는 C가 4회, A가 1회, G가 2회, E가 1회이다. 중복 횟수에 따라 인트라 예측모드 C, G의 순서로 먼저 2개의 DM이 선택된다. BL과 BLC 위치에 대응하는 인트라 예측모드 A와 E는 중복 횟수가 동일하므로, Z-스캔 순서에 따라 BLC, BL의 순서로 인트라 예측모드 E와 A가 순차적으로 DM으로 선택된다. 즉, 본 실시예에서는 인트라 예측모드 C, G, E, A의 순서로 총 4개의 DM이 선택된다. 나머지 한 개의 후보는 neighboring mode 및/또는 default mode로부터 선택된다.Meanwhile, in the luminance block corresponding to the chrominance block located in the upper right corner of Figure 12 (b), the intra prediction modes corresponding to the positions of TL, TR, BL, BR, TLC, TRC, BLC, and BRC are TL (C) , TR (C), BL (A), BR (G), TLC (C), TRC (C), BLC (E), BRC (G). The number of overlaps between intra prediction modes corresponding to each position is 4 times for C, 1 time for A, 2 times for G, and 1 time for E. Depending on the number of overlaps, two DMs are selected first in the order of intra prediction mode C and G. Since the intra prediction modes A and E corresponding to the BL and BLC positions have the same number of overlaps, intra prediction modes E and A are sequentially selected as DM in the order of BLC and BL according to the Z-scan order. That is, in this embodiment, a total of four DMs are selected in the order of intra prediction modes C, G, E, and A. The remaining candidate is selected from neighboring mode and/or default mode.

실시예 #5Example #5

본 실시예는 휘도블록 내에 존재하는 모든 서브블록들 중 기정의된 위치의 서브블록들로부터 우선 순위와 기정의된 스캔 순서에 근거하여 하나 이상의 DM을 선택한다는 점에서 실시예 #3과 동일하다. 다만, 본 실시예에서는 기정의된 위치의 서브블록들로서 휘도블록 내에서 TLC, TRC, BLC, BRC에 위치한 픽셀들 커버하는 서브블록들을 사용한다. 이하에서는 기정의된 스캔 순서로서 z-스캔 순서를 사용하고 우선 순위로서 블록 면적 또는 중복 횟수를 사용하는 것을 예로 들어 설명한다.This embodiment is the same as embodiment #3 in that one or more DMs are selected from subblocks at predefined positions among all subblocks existing in the luminance block based on priority and a predefined scan order. However, in this embodiment, subblocks covering pixels located at TLC, TRC, BLC, and BRC within the luminance block are used as subblocks at predefined positions. Below, an example will be given of using the z-scan order as a predefined scan order and the block area or number of overlaps as the priority.

도 13은 실시예 5에 따른 DM을 유도하기 위한 예시도이다. 도 9의 (a)에 표기된 대문자 알파벳(A~H)는 인트라 예측모드를 나타내고, 도 13의 (b)에 기재된 숫자는 각 색차블록의 DM들의 개수를 나타낸다.Figure 13 is an exemplary diagram for inducing DM according to Example 5. The capital letters (A to H) shown in (a) of FIG. 9 indicate the intra prediction mode, and the numbers shown in (b) of FIG. 13 indicate the number of DMs in each color difference block.

먼저, 우선 순위로서 블록 면적을 사용하는 경우를 설명한다. 도 13의 (a)를 참조하면, 도 13의 (b)의 좌측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 TLC, TRC, BLC, BRC의 위치에 대응하는 인트라 예측모드들은 2개 존재한다. 좌측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 두 개의 인트라 예측모드에 의해 커버되는 블록 면적이 동일하므로 Z-스캔 순서에 인트라 예측모드 A, B의 순서로 DM을 선택한다. 나머지 3개의 모드는 neighboring mode 및/또는 default mode로부터 선택된다.First, the case of using block area as priority will be explained. Referring to Figure 13 (a), there are two intra prediction modes corresponding to the positions of TLC, TRC, BLC, and BRC within the luminance block corresponding to the chrominance block located in the upper left corner of Figure 13 (b). . Since the block area covered by the two intra prediction modes within the luminance block corresponding to the chrominance block located in the upper left corner is the same, DM is selected in the order of intra prediction modes A and B in the Z-scan order. The remaining three modes are selected from neighboring mode and/or default mode.

한편, 도 13의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에는 TLC, TRC, BLC, BRC의 위치에 대응하는 인트라 예측모드들은 총 3개이다. 각 인트라 예측모드가 커버하는 블록 면적은 서로 다르다. 따라서, 블록 면적에 따라 인트라 예측모드 C, G, E의 순서로 3개의 DM이 선택된다. 나머지 2개의 후보는 neighboring mode 및/또는 default mode로부터 선택된다.Meanwhile, in the luminance block corresponding to the chrominance block located in the upper right corner of Figure 13 (b), there are a total of three intra prediction modes corresponding to the positions of TLC, TRC, BLC, and BRC. The block area covered by each intra prediction mode is different. Therefore, three DMs are selected in the order of intra prediction modes C, G, and E according to the block area. The remaining two candidates are selected from neighboring mode and/or default mode.

우선 순위로서 중복 횟수를 사용하는 경우를 설명하면, 도 13의 (b)의 좌측상단에 위치한 색차블록에 대응하는 휘도블록 내에서 TLC, TRC, BLC, BRC의 위치에 대응하는 인트라 예측모드들은 2개 존재한다. 각 위치의 서브블록들의 인트라 예측모드를 살펴보면, TLC (A), TRC (B), BLC (A), BRC (B)와 같다. 각 위치에 대응하는 인트라 예측모드들 간의 중복 횟수는 동일하므로, Z-스캔 순서에 따라 인트라 예측모드 A, B의 순서로 DM을 선택한다. 나머지 3개의 모드는 neighboring mode 및/또는 default mode로부터 선택된다.To explain the case of using the number of duplicates as a priority, the intra prediction modes corresponding to the positions of TLC, TRC, BLC, and BRC in the luminance block corresponding to the chrominance block located in the upper left corner of Figure 13 (b) are 2. Dogs exist. Looking at the intra prediction modes of subblocks at each location, they are TLC (A), TRC (B), BLC (A), and BRC (B). Since the number of overlaps between intra prediction modes corresponding to each position is the same, DM is selected in the order of intra prediction modes A and B according to the Z-scan order. The remaining three modes are selected from neighboring mode and/or default mode.

한편, 도 13의 (b)의 우측상단에 위치한 색차블록에 대응하는 휘도블록 내에는 TLC, TRC, BLC, BRC의 위치에 대응하는 인트라 예측모드는 TLC (C), TRC (C), BLC (E), BRC (G)와 같다. 각 위치에서의 인트라 예측모드들 간의 중복 횟수는 C가 2회, E와 G가 각각 1회이다. 따라서, 중복 횟수에 따라 인트라 예측모드 C가 먼저 DM이 선택된다. BLC과 BRC 위치에 대응하는 인트라 예측모드의 중복 횟수는 동일하므로, Z-스캔 순서에 따라 BLC, BRL의 순서로 인트라 예측모드 E와 G가 순차적으로 DM으로 선택된다. 즉, 본 실시예에서는 인트라 예측모드 C, E, G의 순서로 총 3개의 DM이 선택된다. 나머지 2개의 후보는 neighboring mode 및/또는 default mode로부터 선택된다.Meanwhile, in the luminance block corresponding to the chrominance block located in the upper right corner of Figure 13 (b), the intra prediction modes corresponding to the positions of TLC, TRC, BLC, and BRC are TLC (C), TRC (C), and BLC ( E), same as BRC (G). The number of overlaps between intra prediction modes at each location is 2 times for C and 1 time each for E and G. Therefore, DM selects intra prediction mode C first according to the number of overlaps. Since the number of overlapping intra prediction modes corresponding to the BLC and BRC positions is the same, intra prediction modes E and G are sequentially selected as DM in the order of BLC and BRL according to the Z-scan order. That is, in this embodiment, a total of three DMs are selected in the order of intra prediction modes C, E, and G. The remaining two candidates are selected from neighboring mode and/or default mode.

영상 부호화 장치(200)는 후보 집합에 속한 기정의된 개수의 후보들에 대해 모드 인덱스(mode index)를 부여하고 색차블록의 인트라 예측모드로서 선택된 후보에 대응하는 인덱스를 색인 인트라 모드 정보로서 부호화한다. 여기서 모드 인덱스는, 전술한 바와 같은 방식으로, LM, DM, neighboring mode, default mode, 또는 DM, LM, neighboring mode, default mode의 순서로 부여된다. 모드 인덱스는 후보 집합에 먼저 선택된 후보의 인덱스가 나중에 선택된 후보의 인덱스보다 더 작은 비트수를 가지도록 이진화될 수 있다. 이 때, 상기 후보 집합에서 마지막으로 선택된 두 개의 후보에 대한 인덱스는 동일한 비트 수를 가지고 최하위 비트(LSB, Least Significant Bit)를 제외한 나머지 비트들은 서로 동일하도록 이진화될 수 있다.The image encoding apparatus 200 assigns a mode index to a predefined number of candidates belonging to the candidate set and encodes the index corresponding to the candidate selected as the intra prediction mode of the chrominance block as index intra mode information. Here, the mode index is given in the order of LM, DM, neighboring mode, default mode, or DM, LM, neighboring mode, default mode, in the same manner as described above. The mode index may be binarized so that the index of a candidate selected first in the candidate set has a smaller number of bits than the index of a candidate selected later. At this time, the indices for the two candidates last selected from the candidate set may be binarized so that they have the same number of bits and the remaining bits except the least significant bit (LSB) are the same.

아래의 표 3은 후보 집합에 속하는 후보의 개수가 6개일 때 모드 인덱스를 이진화하는 방법을 나타낸다.Table 3 below shows how to binarize the mode index when the number of candidates in the candidate set is 6.

코드워드(cordword) #1은 TU (truncated unary) 방식을 사용한 이진화 결과이다. 예컨대, LM, DM, neighboring mode, default mode의 순서로 인덱스를 부여한다고 할 때, 코드워드 #1의 첫 번째 bin은 색차블록의 인트라 예측모드가 LM인지 여부를 나타낸다. 첫 번째 bin이 제1값(표 1에서 0)을 가지면 LM임을 나타내고 제2값(표 1에서 1)을 가지면 LM이 아님을 나타낸다. 따라서, LM인 경우 모드 인덱스는 0으로 표현된다.Codeword #1 is the result of binarization using the TU (truncated unary) method. For example, when indexing is given in the order of LM, DM, neighboring mode, and default mode, the first bin of codeword #1 indicates whether the intra prediction mode of the color difference block is LM. If the first bin has the first value (0 in Table 1), it indicates that it is LM, and if it has the second value (1 in Table 1), it indicates that it is not LM. Therefore, in the case of LM, the mode index is expressed as 0.

색차블록의 인트라 예측모드가 LM 이 아니면, 첫 번째 bin은 1로 표현된다. DM, neighboring mode, default mode의 순서로 유도된 일반(normal) 모드들은 두 번째 이후의 bin들에 의해 식별한다. 일반 모드 중 첫 번째로 후보 집합에 포함된 인트라 예측모드에 대한 모드 인덱스는 총 2비트로 이진화되며 두 번째 bin이 0으로 표현되고, 첫 번째 후보보다 후순위의 후보들의 모드 인덱스들의 두 번째 bin은 모두 1로 표현된다. 일반 모드 중 두 번째로 후보 집합에 포함된 인트라 예측모드에 대한 모드 인덱스는 첫 번째 후보보다 비트 수가 1 증가하여 총 3비트로 이진화되며 세 번째 bin이 0으로 표현된다. 두 번째 후보보다 후순위의 후보들의 모드 인덱스들의 세 번째 bin은 모두 1로 표현된다. 일반 모드 중 세 번째로 후보 집합에 포함된 인트라 예측모드에 대한 모드 인덱스는 두 번째 후보보다 비트 수가 1 증가하여 총 4비트로 표현되고 네 번째 bin은 0으로 표현된다. 이와 같은 과정에 의해 후보 집합에 포함된 일반 모드들에 대한 모드 인덱스가 이진화된다. 다만, 일반 모드들 중 후보 집합에 마지막으로 포함된 두 개의 후보, 즉, 네 번째 후보와 다섯 번째 후보는 동일한 비트수로 이진화되며 최하위 bin를 제외한 나머지 비트가 동일하도록 이진화된다. 표 1을 참조하면, 일반 모드들 중 네 번째 후보와 다섯 번째 후보는 처음 네 개의 bin들이 1로 동일하고, 최하위 bin인 다섯 번째 bin만 비트는 각각 0과 1로 표현된다.If the intra prediction mode of the chrominance block is not LM, the first bin is expressed as 1. Normal modes derived in the order of DM, neighboring mode, and default mode are identified by the second and subsequent bins. Among general modes, the mode index for the intra prediction mode included in the first candidate set is binarized into a total of 2 bits, and the second bin is expressed as 0, and the second bins of the mode indices of candidates lower than the first candidate are all 1. It is expressed as Among the general modes, the mode index for the intra prediction mode included in the second candidate set is binarized to a total of 3 bits with the number of bits increased by 1 compared to the first candidate, and the third bin is expressed as 0. The third bin of the mode indices of candidates lower than the second candidate is all expressed as 1. Among the general modes, the mode index for the intra prediction mode included in the third candidate set is expressed as a total of 4 bits with the number of bits increased by 1 compared to the second candidate, and the fourth bin is expressed as 0. Through this process, the mode indexes for the general modes included in the candidate set are binarized. However, among the general modes, the last two candidates included in the candidate set, that is, the fourth candidate and the fifth candidate, are binarized to have the same number of bits, and the remaining bits except the lowest bin are binarized to be the same. Referring to Table 1, among the general modes, the fourth and fifth candidates have the same first four bins as 1, and the bits of only the fifth bin, which is the lowest bin, are expressed as 0 and 1, respectively.

이상에서는 네 가지 타입 (LM, DM, neighboring mode, default mode)을 순차적으로 적용하여 기 결정된 개수(예컨대, 6)의 후보들을 선정하고, 그 후보들 중 어느 후보가 색차블록의 인트라 예측모드로 사용되었는지를 지시하는 모드 인덱스를 부호화하는 것으로 설명하였다. 그러나, 본 발명이 반드시 이에 한정되는 것은 아니다. In the above, four types (LM, DM, neighboring mode, default mode) are sequentially applied to select a predetermined number (e.g., 6) of candidates, and which of the candidates is used as the intra prediction mode of the color difference block. It was explained that the mode index indicating is encoded. However, the present invention is not necessarily limited thereto.

예컨대, 전술한 표 1에서 첫 번째 bin은 LM이 색차블록의 인트라 예측모드로 사용되는지 여부를 나타낸다. 따라서, 첫 번째 bin 대신 별도의 플래그를 통해 LM이 색차블록의 인트라 예측모드로 사용되는지 여부를 나타내는 것도 가능하며, 이는 이 기술분야의 통상의 기술자에게 지극히 자명하다. 이 경우, 플래그가 LM이 색차블록의 인트라 예측모드로 사용되지 않음을 나타내면, DM, neighboring mode, default mode 순서로 기정의된 개수의 일반 모드들(normal modes)을 선정하고, 그 일반 모드들 중에서 중 어느 후보가 색차블록의 인트라 예측모드로 사용되었는지를 지시하는 모드 인덱스를 전술한 이진화 방식을 이용하여 이진화할 수 있다.For example, in the above-mentioned Table 1, the first bin indicates whether LM is used as the intra prediction mode of the color difference block. Therefore, it is also possible to indicate whether LM is used in the intra prediction mode of the chrominance block through a separate flag instead of the first bin, and this is extremely obvious to those skilled in the art. In this case, if the flag indicates that LM is not used as an intra prediction mode for the color difference block, a predefined number of normal modes are selected in the order of DM, neighboring mode, and default mode, and among the normal modes, The mode index indicating which of the candidates is used as the intra prediction mode of the color difference block can be binarized using the binarization method described above.

색차 인트라 예측 모드를 부호화하는 또 다른 예시로서, 영상 부호화 장치(200)는 색차블록의 인트라 예측모드로서 DM 의 사용 여부를 나타내는 정보(예컨대, 플래그)를 부호화한 이후에, DM이 사용된 경우에는 기 결정된 개수의 DM들을 선정하고 기 결정된 개수의 DM들 중에서 중 어느 후보가 색차블록의 인트라 예측모드로 사용되었는지를 지시하는 제1 인덱스를 전술한 이진화 방식을 이용하여 이진화할 수 있다. DM이 사용되지 않은 경우에는 LM, neighboring mode, default mode로부터 유도된 기 결정된 개수의 모드들 중 어느 후보가 색차블록의 인트라 예측모드로 사용되었는지를 지시하는 제2 인덱스를 전술한 이진화 방식을 이용하여 이진화할 수 있다.As another example of encoding the chrominance intra prediction mode, the image encoding device 200 encodes information (e.g., a flag) indicating whether DM is used as the intra prediction mode of the chrominance block, and then, if DM is used, A predetermined number of DMs may be selected, and the first index indicating which candidate among the predetermined number of DMs is used in the intra prediction mode of the color difference block may be binarized using the binarization method described above. If DM is not used, the second index indicating which candidate among the predetermined number of modes derived from LM, neighboring mode, and default mode was used as the intra prediction mode of the color difference block is used using the binarization method described above. It can be binarized.

도 8은 본 발명의 실시예에 따른 영상 복호화 장치를 도시한 것이다.Figure 8 shows an image decoding device according to an embodiment of the present invention.

영상 복호화 장치는 복호화부(1410), 역양자화부(1420), 역변환부(1430), 예측부(1440), 가산기(1450), 필터부(1460) 및 메모리(1470)를 포함한다. 도 2의 영상 부호화 장치와 마찬가지로, 영상 복호화 장치는 각 구성요소가 하드웨어 칩으로 구현될 수 있으며, 또는 소프트웨어로 구현되고 마이크로프로세서가 각 구성요소에 대응하는 소프트웨어의 기능을 실행하도록 구현될 수도 있다.The image decoding device includes a decoding unit 1410, an inverse quantization unit 1420, an inverse transform unit 1430, a prediction unit 1440, an adder 1450, a filter unit 1460, and a memory 1470. Like the video encoding device of FIG. 2, each component of the video decoding device may be implemented as a hardware chip, or may be implemented as software and a microprocessor may be implemented to execute the software function corresponding to each component.

복호화부(1410)는 영상 부호화 장치로부터 수신한 비트스트림을 복호화하여 블록 분할과 관련된 정보를 추출하여 복호화하고자 하는 현재블록을 결정하고, 현재블록을 복원하기 위해 필요한 예측 정보와 잔차신호에 대한 정보 등을 추출한다.The decoder 1410 decodes the bitstream received from the video encoding device, extracts information related to block division, determines the current block to be decoded, and provides prediction information and residual signal information necessary to restore the current block. Extract .

복호화부(1410)는 SPS (Sequence Parameter Set) 또는 PPS (Picture Parameter Set)로부터 CTU size에 대한 정보를 추출하여 CTU의 크기를 결정하고, 픽처를 결정된 크기의 CTU로 분할한다. 그리고 CTU를 트리 구조의 최상위 레이어, 즉, 루트 노드로 결정하고, CTU에 대한 분할 정보를 추출함으로써 CTU를 트리 구조를 이용하여 분할한다. 예컨대, QTBT 구조를 사용하여 CTU를 분할하는 경우, 먼저 QT의 분할과 관련된 제1 플래그(QT_split_flag)를 추출하여 각 노드를 하위 레이어의 네 개의 노드로 분할한다. 그리고, QT의 리프 노드에 해당하는 노드에 대해서는 BT의 분할과 관련된 제2 플래그(BT_split_flag) 및 분할 타입 정보를 추출하여 해당 리프 노드를 BT 구조로 분할한다.The decoder 1410 extracts information about the CTU size from the SPS (Sequence Parameter Set) or PPS (Picture Parameter Set), determines the size of the CTU, and divides the picture into CTUs of the determined size. Then, the CTU is determined as the highest layer of the tree structure, that is, the root node, and the CTU is divided using the tree structure by extracting the division information about the CTU. For example, when dividing a CTU using the QTBT structure, first extract the first flag (QT_split_flag) related to the division of the QT and split each node into four nodes of the lower layer. And, for the node corresponding to the leaf node of the QT, the second flag (BT_split_flag) and split type information related to the split of the BT are extracted and the leaf node is split into a BT structure.

한편, 복호화부(1410)는 트리 구조의 분할을 통해 복호화하고자 하는 현재블록을 결정하게 되면, 현재블록이 인트라 예측되었는지 아니면 인터 예측되었는지를 지시하는 예측 타입에 대한 정보를 추출한다. Meanwhile, when the decoder 1410 determines the current block to be decoded by dividing the tree structure, it extracts information about the prediction type indicating whether the current block is intra-predicted or inter-predicted.

예측 타입 정보가 인트라 예측을 지시하는 경우, 복호화부(1410)는 현재블록의 인트라 예측정보(인트라 예측모드)에 대한 신택스 요소를 복호화하여 인트라 예측부(1444)로 전달한다. When the prediction type information indicates intra prediction, the decoder 1410 decodes the syntax element for the intra prediction information (intra prediction mode) of the current block and transmits it to the intra prediction unit 1444.

또한, 복호화부(1410)는 잔차신호에 대한 정보로서 현재블록의 양자화된 변환계수들에 대한 정보를 추출한다.Additionally, the decoder 1410 extracts information about the quantized transform coefficients of the current block as information about the residual signal.

역양자화부(1420)는 양자화된 변환계수들을 역양자화하고 역변환부(1430)는 역양자화된 변환계수들을 주파수 도메인으로부터 공간 도메인으로 역변환하여 잔차신호들을 복원함으로써 현재블록에 대한 잔차블록을 생성한다.The inverse quantization unit 1420 inversely quantizes the quantized transform coefficients, and the inverse transformation unit 1430 inversely transforms the inverse quantized transform coefficients from the frequency domain to the spatial domain to restore the residual signals, thereby generating a residual block for the current block.

예측부(1440)는 인트라 예측부(642) 및 인터 예측부(644)를 포함한다. 인트라 예측부(1442)는 현재블록의 예측 타입인 인트라 예측일 때 활성화되고, 인터 예측부(1444)는 현재블록의 예측 타입인 인트라 예측일 때 활성화된다.The prediction unit 1440 includes an intra prediction unit 642 and an inter prediction unit 644. The intra prediction unit 1442 is activated when the prediction type of the current block is intra prediction, and the inter prediction unit 1444 is activated when the prediction type of the current block is intra prediction.

인트라 예측부(1442)는 복호화부(1410)로부터 추출된 인트라 예측모드에 대한 신택스 요소를 이용하여 현재블록의 인트라 예측 모드를 결정하고, 인트라 예측 모드에 따라 현재블록 주변의 참조 픽셀들을 이용하여 현재블록을 예측한다. The intra prediction unit 1442 determines the intra prediction mode of the current block using the syntax element for the intra prediction mode extracted from the decoder 1410, and uses reference pixels around the current block according to the intra prediction mode to predict the current block. Predict blocks.

인터 예측부(1444)는 복호화부(1410)로부터 추출된 인터 예측정보에 대한 신택스 요소를 이용하여 현재블록의 움직임정보를 결정하고, 결정된 움직임정보를 이용하여 현재블록을 예측한다.The inter prediction unit 1444 determines motion information of the current block using syntax elements for the inter prediction information extracted from the decoder 1410, and predicts the current block using the determined motion information.

가산기(1450)는 역변환부로부터 출력되는 잔차블록과 인터 예측부 또는 인트라 예측부로부터 출력되는 예측블록을 가산하여 현재블록을 복원한다. 복원된 현재블록 내의 픽셀들은 이후에 복호화할 블록을 인트라 예측할 때의 참조픽셀로서 활용된다.The adder 1450 restores the current block by adding the residual block output from the inverse transform unit and the prediction block output from the inter prediction unit or intra prediction unit. Pixels in the restored current block are used as reference pixels when intra-predicting a block to be decoded later.

필터부(1460)는 블록 단위의 복호화로 인해 발생하는 블록킹 현상(blocking artifact)를 제거하기 위해 복원된 블록 간의 경계를 디블록킹 필터링하고 메모리(1470)에 저장한다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 복호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조픽처로 사용된다.The filter unit 1460 deblocks and filters the boundaries between restored blocks to remove blocking artifacts that occur due to block-level decoding and stores them in the memory 1470. When all blocks in one picture are reconstructed, the reconstructed picture is later used as a reference picture for inter prediction of blocks in the picture to be decoded.

한편, 현재블록이 휘도 성분과 색차 성분으로 이루어진 경우, 현재블록의 휘도 성분과 색차 성분은 독립적으로 예측되고 복원된다. 이 경우, 복호화부(1410)에서 복호화되는 인트라 예측정보(인트라 예측모드)에 대한 신택스 요소는 현재블록의 휘도 성분으로 구성된 휘도 블록을 예측하기 위한 휘도 인트라 모드 정보와 색차 성분으로 구성된 색차 블록을 예측하기 위한 색차 인트라 모드 정보가 포함된다. Meanwhile, when the current block consists of a luminance component and a chrominance component, the luminance component and the chrominance component of the current block are predicted and restored independently. In this case, the syntax element for the intra prediction information (intra prediction mode) decoded by the decoder 1410 predicts a chrominance block composed of luminance intra mode information and chrominance components for predicting a luminance block composed of the luminance component of the current block. Color difference intra mode information is included for this purpose.

인트라 예측부(1442)는 휘도 인트라 모드 정보를 이용하여 휘도블록을 예측한다. 휘도 인트라 모드 정보는 휘도블록의 인트라 예측모드가 속하는 그룹을 지시하는 정보 및 그 그룹 내의 인트라 예측모드들 중 휘도블록의 인트라 예측모드를 지시하는 인덱스를 포함한다.The intra prediction unit 1442 predicts a luminance block using luminance intra mode information. The luminance intra mode information includes information indicating the group to which the intra prediction mode of the luminance block belongs and an index indicating the intra prediction mode of the luminance block among intra prediction modes within the group.

인트라 예측부(1442)는 휘도블록의 인트라 예측모드가 속하는 그룹을 지시하는 정보에 따라 영상 부호화 장치와 동일한 방식으로 해당 그룹을 구성하는 인트라 예측모드 후보들을 유도한다. 그룹을 지시하는 정보가 MPM 그룹을 나타내면 MPM 그룹을 생성하고, Selected Mode 그룹을 나타내면 Selected Mode 그룹을 생성하며, non-Selected Mode 그룹을 나타내면 non-Selected Mode 그룹을 생성한다. 그리고, 해당 그룹 내에서 인덱스에 의해 식별되는 후보를 휘도블록의 인트라 예측모드로 설정하고, 설정된 인트라 예측모드를 이용하여 휘도블록을 예측한다. 예측된 휘도블록은 휘도 성분에 대한 잔차블록과 가산되어 현재블록의 휘도 성분이 복원된다.The intra prediction unit 1442 derives intra prediction mode candidates constituting the group in the same manner as the image encoding device according to information indicating the group to which the intra prediction mode of the luminance block belongs. If the information indicating the group indicates an MPM group, an MPM group is created, if it indicates a Selected Mode group, a Selected Mode group is created, and if it indicates a non-Selected Mode group, a non-Selected Mode group is created. Then, the candidate identified by the index within the corresponding group is set to the intra prediction mode of the luminance block, and the luminance block is predicted using the set intra prediction mode. The predicted luminance block is added to the residual block for the luminance component, and the luminance component of the current block is restored.

또한, 인트라 예측부(1442)는 색차 인트라 모드 정보를 이용하여 색차블록을 예측한다. 인트라 예측부(1442)는 영상 부호화 장치(200)와 동일한 방식으로 색차블록의 인트라 예측모드에 대한 후보 집합을 구성한다. 즉, DM, LM, neighboring mode, default mode 중 적어도 하나의 타입을 이용하여 후보 집합을 구성한다. 각 타입의 모드들을 유도하는 방법은 영상 부호화 장치에서 이미 설명하였으므로 설명을 중복을 피하기 위해 상세한 설명은 생략한다. 인트라 예측부(1442)는 색차 인트라 모드 정보를 이용하여 후보 집합 내의 후보들 중에서 하나의 후보를 색차블록의 인트라 예측모드로 선택하고, 선택된 인트라 예측모드를 이용하여 색차블록을 예측한다.Additionally, the intra prediction unit 1442 predicts a chrominance block using chrominance intra mode information. The intra prediction unit 1442 configures a candidate set for the intra prediction mode of the chrominance block in the same manner as the image encoding device 200. That is, a candidate set is constructed using at least one type among DM, LM, neighboring mode, and default mode. Since the method for deriving each type of mode has already been described in the video encoding device, detailed description will be omitted to avoid duplication. The intra prediction unit 1442 selects one candidate from among the candidates in the candidate set as the intra prediction mode of the chrominance block using the chrominance intra mode information, and predicts the chrominance block using the selected intra prediction mode.

하나의 예시로서, DM, LM, neighboring mode, default mode 또는 LM, DM, neighboring mode, default mode의 순서로 m개의 후보들을 선정하는 경우, 복호화부(1410)으로부터 복호화되는 색차 인트라 모드 정보는 전체 m개의 후보들 중에서 색차블록의 인트라 예측모드를 지시하는 정보를 포함한다. 인트라 예측부(1442)는 DM, LM, neighboring mode, default mode 또는 LM, DM, neighboring mode, default mode의 순서로 순차적으로 m개의 후보들을 선정하여 후보 집합을 구성한다. 후보 집합 내의 m개의 후보들 중에서 색차 인트라 모드 정보에 의해 지시되는 후보를 색차블록의 인트라 예측모드로 결정한다.As an example, when m candidates are selected in the order of DM, LM, neighboring mode, default mode or LM, DM, neighboring mode, default mode, the color difference intra mode information decoded from the decoder 1410 is the total m. Among the candidates, it includes information indicating the intra prediction mode of the color difference block. The intra prediction unit 1442 constructs a candidate set by sequentially selecting m candidates in the following order: DM, LM, neighboring mode, default mode, or LM, DM, neighboring mode, default mode. Among the m candidates in the candidate set, the candidate indicated by the color difference intra mode information is determined as the intra prediction mode of the color difference block.

또 다른 예시로서, 색차 인트라 모드 정보는 색차블록의 인트라 예측모드가 LM인지 여부를 지시하는 정보, 및 LM이 아닌 경우 DM, neighboring mode, default mode로부터 유도된 기 결정된 개수의 일반 모드들(normal modes) 중에서 색차블록의 인트라 예측모드를 지시하는 정보를 포함할 수 있다. 이 경우, 인트라 예측부(1442)는 LM인지 여부를 지시하는 정보가 LM의 사용을 나타내는 경우, LM을 색차블록의 인트라 예측모드로 선택한다. LM인지 여부를 지시하는 정보가 LM의 사용을 나타내지 않는 경우, 인트라 예측부(1442)는 DM, neighboring mode, default mode로부터 순차적으로 기 결정된 개수의 일반 모드들을 선택함으로써 후보 집합을 구성한다. 그리고, 색차블록의 인트라 예측모드를 지시하는 정보에 따라 후보 집합 내의 후보들 중에서 색차블록의 인트라 예측모드를 선택한다.As another example, the color difference intra mode information is information indicating whether the intra prediction mode of the color difference block is LM, and if not LM, a predetermined number of normal modes derived from DM, neighboring mode, and default mode. ) may include information indicating the intra prediction mode of the color difference block. In this case, if the information indicating whether it is LM indicates the use of LM, the intra prediction unit 1442 selects LM as the intra prediction mode of the chrominance block. If the information indicating whether it is an LM does not indicate the use of the LM, the intra prediction unit 1442 constructs a candidate set by sequentially selecting a predetermined number of general modes from DM, neighboring mode, and default mode. Then, the intra prediction mode of the color difference block is selected from among the candidates in the candidate set according to the information indicating the intra prediction mode of the color difference block.

또 다른 예시로서, 색차 인트라 색차블록의 인트라 예측모드가 DM인지 여부를 지시하는 정보를 포함한다. 색차블록의 인트라 예측모드가 DM인 경우 색차 인트라 모드 정보는 기 결정된 개수의 DM들 중 색차블록의 인트라 예측모드를 지시하는 정보(제1 인덱스)를 포함하고, DM이 아닌 경우 LM, neighboring mode, default mode로부터 유도된 기 결정된 개수의 모드들 중에서 색차블록의 인트라 예측모드를 지시하는 정보(제2 인덱스)를 포함할 수 있다. 이 경우, 인트라 예측부(1442)는 DM인지 여부를 지시하는 정보가 DM의 사용을 나타내는 경우, 기결정된 개수의 DM들을 후보 집합으로서 유도하고 DM들 중에서 제1 인덱스에 의해 색차블록의 인트라 예측모드로 선택한다. 반면, DM인지 여부를 지시하는 정보가 DM의 사용을 나타내지 않는 경우, 인트라 예측부(1442)는 LM, neighboring mode, default mode로부터 순차적으로 기 결정된 개수의 일반 모드들을 선택함으로써 후보 집합을 구성한다. 그리고, 제2 인덱스에 의해 후보 집합 내의 후보들 중에서 색차블록의 인트라 예측모드를 선택한다.As another example, it includes information indicating whether the intra prediction mode of the color difference intra color difference block is DM. If the intra prediction mode of the color difference block is DM, the color difference intra mode information includes information (first index) indicating the intra prediction mode of the color difference block among a predetermined number of DMs, and if it is not DM, LM, neighboring mode, It may include information (second index) indicating the intra prediction mode of the color difference block among the predetermined number of modes derived from the default mode. In this case, when the information indicating whether it is a DM indicates the use of a DM, the intra prediction unit 1442 derives a predetermined number of DMs as a candidate set and determines the intra prediction mode of the color difference block by the first index among the DMs. Select. On the other hand, if the information indicating whether it is a DM does not indicate the use of a DM, the intra prediction unit 1442 constructs a candidate set by sequentially selecting a predetermined number of general modes from LM, neighboring mode, and default mode. Then, the intra prediction mode of the color difference block is selected from among the candidates in the candidate set based on the second index.

이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely an illustrative explanation of the technical idea of the present embodiment, and those skilled in the art will be able to make various modifications and variations without departing from the essential characteristics of the present embodiment. Accordingly, the present embodiments are not intended to limit the technical idea of the present embodiment, but rather to explain it, and the scope of the technical idea of the present embodiment is not limited by these examples. The scope of protection of this embodiment should be interpreted in accordance with the claims below, and all technical ideas within the equivalent scope should be interpreted as being included in the scope of rights of this embodiment.

Claims (7)

대응하는 휘도 코딩트리블록과는 다른 블록 분할 구조를 가지는 색차 코딩트리블록으로부터 분할된 색차 블록(chroma block)을 인트라 예측하기 위해, 영상 복호화 장치에 의해, 수행되는 방법에 있어서,
상기 색차 코딩트리블록의 분할 구조를 나타내는 분할 정보를 비트스트림으로부터 복호화하고, 상기 분할 정보에 기초하여 복호화 대상 색차 블록을 결정하는 단계;
상기 대상 색차 블록이 대응하는 휘도 블록 내의 복원된 픽셀 값들로부터 예측되는지 여부를 나타내는 플래그를 상기 비트스트림으로부터 복호화하는 단계; 및
상기 플래그에 따라 상기 대상 색차 블록의 인트라 예측모드를 결정하고 상기 대상 색차 블록을 예측하는 단계를 포함하되,
상기 플래그가 상기 대상 색차 블록이 상기 휘도 블록 내의 복원된 픽셀 값들로부터 예측되지 않음을 나타낼 때, 상기 대상 색차 블록을 예측하는 단계는,
기정의된 인트라 예측모드들의 후보 세트(candidate set)로부터 상기 대상 색차 블록의 인트라 예측모드를 선택하기 위한 모드 정보를 복호화하는 단계, 상기 후보 세트는 상기 휘도 블록으로부터 유도되는 인트라 예측모드인 DM(direct mode)을 포함함; 및
상기 모드 정보를 이용하여 상기 대상 색차 블록의 인트라 예측모드를 결정하는 단계를 포함하고,
상기 DM은 상기 휘도 블록 내의 적어도 하나의 기정의된 위치의 샘플을 커버하는 블록의 인트라 예측모드를 이용하여 설정되는 것을 특징으로 하는 방법.
In a method performed by an image decoding apparatus to intra-predict a chroma block divided from a chrominance coding treeblock having a block division structure different from the corresponding luminance coding treeblock,
Decoding partition information indicating a partition structure of the chrominance coding tree block from a bitstream, and determining a chrominance block to be decoded based on the partition information;
decoding a flag indicating whether the target chrominance block is predicted from reconstructed pixel values in a corresponding luminance block from the bitstream; and
Determining an intra prediction mode of the target chrominance block according to the flag and predicting the target chrominance block,
When the flag indicates that the target chrominance block is not predicted from reconstructed pixel values in the luminance block, predicting the target chrominance block includes:
Decoding mode information for selecting an intra prediction mode of the target chrominance block from a candidate set of predefined intra prediction modes, the candidate set being a DM (direct) intra prediction mode derived from the luminance block. includes mode); and
A step of determining an intra prediction mode of the target chrominance block using the mode information,
The method is characterized in that the DM is set using an intra prediction mode of a block covering samples at at least one predefined position in the luminance block.
제1항에 있어서,
상기 후보 세트는 플래너 모드(planar mode), DC 모드, 수평 방향 모드, 및 수직 방향 모드 중 적어도 두 개를 더 포함하는 것을 특징으로 하는 방법.
According to paragraph 1,
The method of claim 1, wherein the candidate set further includes at least two of a planar mode, a DC mode, a horizontal mode, and a vertical mode.
제1항에 있어서,
상기 플래그가 상기 대상 색차 블록이 상기 휘도 블록 내의 복원된 픽셀 값들로부터 예측됨을 나타낼 때, 상기 대상 색차 블록을 인트라 예측하는 단계는,
상기 대상 색차 블록 주변의 기복원된 색차 샘플들과 상기 휘도 블록 주변의 기복원된 휘도 샘플들을 이용하여 예측 파라미터들을 유도하는 단계; 및
상기 휘도 블록 내의 복원된 픽셀 값들 및 상기 예측 파라미터들을 이용하여 상기 대상 색차 블록을 예측하는 단계
를 포함하는 것을 특징으로 하는 방법.
According to paragraph 1,
When the flag indicates that the target chrominance block is predicted from reconstructed pixel values in the luminance block, intra-predicting the target chrominance block includes:
Deriving prediction parameters using the reconstructed chrominance samples around the target chrominance block and the reconstructed luminance samples around the luminance block; and
Predicting the target chrominance block using the restored pixel values in the luminance block and the prediction parameters.
A method comprising:
제1항에 있어서,
상기 적어도 하나의 기정의된 위치의 샘플은 상기 휘도 블록 내의 중심 샘플을 포함하는 것을 특징으로 하는 방법.
According to paragraph 1,
and wherein the at least one predefined location sample includes a center sample within the luminance block.
제1항에 있어서,
상기 DM은, 상기 적어도 하나의 기정의된 위치의 샘플을 각각 커버하는 블록들의 인트라 예측모드 후보들의 우선순위에 근거하여, 결정되되,
상기 우선순위는,
상기 인트라 예측모드 후보들 각각에 의해 커버되는 블록의 면적, 또는
상기 휘도블록 내에서 상기 인트라 예측모드 후보들 각각과 동일한 인트라 예측모드가 발생하는 빈도수, 또는
상기 인트라 예측모드 후보들 간의 중복 횟수
에 따라 결정되는 것을 특징으로 하는 방법.
According to paragraph 1,
The DM is determined based on the priorities of intra prediction mode candidates of blocks each covering a sample at the at least one predefined location,
The above priorities are:
The area of the block covered by each of the intra prediction mode candidates, or
The frequency with which the same intra prediction mode as each of the intra prediction mode candidates occurs within the luminance block, or
Number of overlaps between the intra prediction mode candidates
A method characterized in that it is determined according to.
대응하는 휘도 코딩트리블록과는 다른 블록 분할 구조를 가지는 색차 코딩트리블록으로부터 분할된 색차 블록(chroma block)을 인트라 예측하기 위해, 영상 부호화 장치에 의해, 수행되는 방법에 있어서,
상기 색차 코딩트리블록의 분할 구조 및 부호화 대상 색차 블록을 결정하는 단계;
상기 색차 코딩트리블록의 분할 구조를 나타내는 분할 정보를 비트스트림에 부호화하는 단계;
상기 대상 색차 블록의 인트라 예측모드를 결정하는 단계;
상기 대상 색차 블록의 인트라 예측모드를 이용하여 상기 대상 색차 블록을 예측하는 단계; 및
상기 대상 색차 블록의 인트라 예측모드에 대한 정보를 부호화하는 단계를 포함하되,
상기 대상 색차 블록의 인트라 예측모드에 대한 정보를 부호화하는 단계는,
상기 대상 색차 블록이 대응하는 휘도 블록 내의 복원된 픽셀 값들로부터 예측되는지 여부를 나타내는 플래그를 부호화하는 단계; 및
상기 플래그가 상기 대상 색차 블록이 상기 휘도 블록 내의 복원된 픽셀 값들로부터 예측되지 않음을 나타낼 때, 기정의된 인트라 예측모드들의 후보 세트(candidate set)로부터 상기 대상 색차 블록의 인트라 예측모드를 선택하기 위한 모드 정보를 부호화하는 단계를 포함하되,
상기 후보 세트는 상기 휘도 블록으로부터 유도되는 인트라 예측모드인 DM(direct mode)을 포함하고,
상기 DM은 상기 휘도 블록 내의 적어도 하나의 기정의된 위치의 샘플을 커버하는 블록의 인트라 예측모드를 이용하여 설정되는 것을 특징으로 하는 방법.
A method performed by an image encoding device to intra-predict a chroma block divided from a chrominance coding treeblock having a block division structure different from the corresponding luminance coding treeblock, comprising:
determining a division structure of the chrominance coding tree block and a chrominance block to be encoded;
Encoding segmentation information indicating a segmentation structure of the chrominance coding tree block into a bitstream;
determining an intra prediction mode of the target chrominance block;
predicting the target chrominance block using an intra prediction mode of the target chrominance block; and
Including encoding information about the intra prediction mode of the target chrominance block,
The step of encoding information about the intra prediction mode of the target chrominance block is:
encoding a flag indicating whether the target chrominance block is predicted from reconstructed pixel values in a corresponding luminance block; and
When the flag indicates that the target chrominance block is not predicted from reconstructed pixel values in the luminance block, for selecting an intra prediction mode of the target chrominance block from a candidate set of predefined intra prediction modes. Including the step of encoding mode information,
The candidate set includes a direct mode (DM), which is an intra prediction mode derived from the luminance block,
The method is characterized in that the DM is set using an intra prediction mode of a block covering samples at at least one predefined position in the luminance block.
대응하는 휘도 코딩트리블록과는 다른 블록 분할 구조를 가지는 색차 코딩트리블록으로부터 분할된 색차 블록(chroma block)에 대한 정보를 영상 복호화 장치에 전송하는 방법에 있어서,
인트라 예측을 이용하여 상기 색차 블록에 대한 정보를 비트스트림에 부호화하는 단계; 및
상기 비트스트림을 상기 영상 복호화 장치에 전송하는 단계를 포함하되,
상기 색차 블록에 대한 정보를 비트스트림에 부호화하는 단계는,
상기 색차 코딩트리블록의 분할 구조 및 부호화 대상 색차 블록을 결정하는 단계;
상기 색차 코딩트리블록의 분할 구조를 나타내는 분할 정보를 상기 비트스트림에 부호화하는 단계;
상기 대상 색차 블록의 인트라 예측모드를 결정하는 단계;
상기 대상 색차 블록의 인트라 예측모드를 이용하여 상기 대상 색차 블록을 예측하는 단계; 및
상기 대상 색차 블록의 인트라 예측모드에 대한 정보를 부호화하는 단계를 포함하되,
상기 대상 색차 블록의 인트라 예측모드에 대한 정보를 부호화하는 단계는,
상기 대상 색차 블록이 대응하는 휘도 블록 내의 복원된 픽셀 값들로부터 예측되는지 여부를 나타내는 플래그를 부호화하는 단계; 및
상기 플래그가 상기 대상 색차 블록이 상기 휘도 블록 내의 복원된 픽셀 값들로부터 예측되지 않음을 나타낼 때, 기정의된 인트라 예측모드들의 후보 세트(candidate set)로부터 상기 대상 색차 블록의 인트라 예측모드를 선택하기 위한 모드 정보를 부호화하는 단계를 포함하고,
상기 후보 세트는 상기 휘도 블록으로부터 유도되는 인트라 예측모드인 DM(direct mode)을 포함하고,
상기 DM은 상기 휘도 블록 내의 적어도 하나의 기정의된 위치의 샘플을 커버하는 블록의 인트라 예측모드를 이용하여 설정되는 것을 특징으로 하는, 방법.
In a method of transmitting information about a chroma block divided from a chrominance coding tree block having a block division structure different from the corresponding luminance coding tree block to an image decoding device,
Encoding information about the chrominance block into a bitstream using intra prediction; and
Including transmitting the bitstream to the video decoding device,
The step of encoding information about the chrominance block into a bitstream is:
determining a division structure of the chrominance coding tree block and a chrominance block to be encoded;
encoding segmentation information indicating a segmentation structure of the chrominance coding tree block into the bitstream;
determining an intra prediction mode of the target chrominance block;
predicting the target chrominance block using an intra prediction mode of the target chrominance block; and
Including encoding information about the intra prediction mode of the target chrominance block,
The step of encoding information about the intra prediction mode of the target chrominance block is:
encoding a flag indicating whether the target chrominance block is predicted from reconstructed pixel values in a corresponding luminance block; and
When the flag indicates that the target chrominance block is not predicted from reconstructed pixel values in the luminance block, for selecting an intra prediction mode of the target chrominance block from a candidate set of predefined intra prediction modes. Including encoding mode information,
The candidate set includes a direct mode (DM), which is an intra prediction mode derived from the luminance block,
The method is characterized in that the DM is set using an intra prediction mode of a block covering samples at at least one predefined position in the luminance block.
KR1020240064695A 2016-12-26 2024-05-17 Video Encoding and Decoding Using Intra Prediction KR20240074735A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR1020160179463 2016-12-26
KR20160179463 2016-12-26
KR1020230002859A KR102668525B1 (en) 2016-12-26 2023-01-09 Video Encoding and Decoding Using Intra Prediction

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020230002859A Division KR102668525B1 (en) 2016-12-26 2023-01-09 Video Encoding and Decoding Using Intra Prediction

Publications (1)

Publication Number Publication Date
KR20240074735A true KR20240074735A (en) 2024-05-28

Family

ID=62913322

Family Applications (5)

Application Number Title Priority Date Filing Date
KR1020170179413A KR102488123B1 (en) 2016-12-26 2017-12-26 Video Encoding and Decoding Using Intra Prediction
KR1020240064664A KR20240074733A (en) 2016-12-26 2024-05-17 Video Encoding and Decoding Using Intra Prediction
KR1020240064675A KR20240074734A (en) 2016-12-26 2024-05-17 Video Encoding and Decoding Using Intra Prediction
KR1020240064699A KR20240074736A (en) 2016-12-26 2024-05-17 Video Encoding and Decoding Using Intra Prediction
KR1020240064695A KR20240074735A (en) 2016-12-26 2024-05-17 Video Encoding and Decoding Using Intra Prediction

Family Applications Before (4)

Application Number Title Priority Date Filing Date
KR1020170179413A KR102488123B1 (en) 2016-12-26 2017-12-26 Video Encoding and Decoding Using Intra Prediction
KR1020240064664A KR20240074733A (en) 2016-12-26 2024-05-17 Video Encoding and Decoding Using Intra Prediction
KR1020240064675A KR20240074734A (en) 2016-12-26 2024-05-17 Video Encoding and Decoding Using Intra Prediction
KR1020240064699A KR20240074736A (en) 2016-12-26 2024-05-17 Video Encoding and Decoding Using Intra Prediction

Country Status (1)

Country Link
KR (5) KR102488123B1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102330704B1 (en) 2018-08-24 2021-12-01 삼성전자주식회사 Video decoding method and apparatus, video encoding method and apparatus
WO2020060077A1 (en) * 2018-09-20 2020-03-26 삼성전자 주식회사 Method and apparatus for video encoding, and method and apparatus for video decoding
CN109862353B (en) * 2018-12-29 2022-11-22 浙江大华技术股份有限公司 Chroma block prediction mode acquisition method and device, coder-decoder and storage device
WO2020135206A1 (en) 2018-12-29 2020-07-02 Zhejiang Dahua Technology Co., Ltd. Systems and methods for intra prediction
EP3941048A4 (en) 2019-03-13 2022-12-28 LG Electronics Inc. Image encoding/decoding method and device, and method for transmitting bitstream
KR20210006305A (en) * 2019-07-08 2021-01-18 현대자동차주식회사 Method and apparatus for intra prediction coding of video data
WO2021045491A1 (en) * 2019-09-02 2021-03-11 엘지전자 주식회사 Video encoding/decoding method and apparatus for performing intra prediction of chroma component, and method for transmitting bitstream
WO2022197139A1 (en) * 2021-03-19 2022-09-22 현대자동차주식회사 Method and device for video coding using intra-subblock prediction of chroma block
US20230079960A1 (en) * 2021-09-15 2023-03-16 Tencent America LLC On propagating intra prediction mode information of ibc block by using block vector
WO2023132590A1 (en) * 2022-01-04 2023-07-13 엘지전자 주식회사 Image encoding/decoding method, method of transmitting bitstream, and recording medium in which bitstream is stored

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10123008B2 (en) * 2011-06-17 2018-11-06 Hfi Innovation Inc. Method and apparatus for coding of intra prediction mode
KR101668575B1 (en) * 2011-06-23 2016-10-21 가부시키가이샤 제이브이씨 켄우드 Image decoding device, image decoding method and image decoding program

Also Published As

Publication number Publication date
KR20180075422A (en) 2018-07-04
KR20240074734A (en) 2024-05-28
KR20240074736A (en) 2024-05-28
KR102488123B1 (en) 2023-01-12
KR20240074733A (en) 2024-05-28

Similar Documents

Publication Publication Date Title
KR102488123B1 (en) Video Encoding and Decoding Using Intra Prediction
KR102613966B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
US11381815B2 (en) Apparatus and method for video encoding or decoding
CN110169065B (en) Apparatus and method for encoding or decoding image
US10812795B2 (en) Method for processing picture based on intra-prediction mode and apparatus for same
KR20190076918A (en) A method and an apparatus for processing a video signal
KR102668525B1 (en) Video Encoding and Decoding Using Intra Prediction
KR20190083948A (en) Method and Apparatus for Video Encoding or Decoding
KR20170116043A (en) Method and apparatus for processing video signals using graph-based transforms
KR102617953B1 (en) Method and apparatus for encoding/decoding image, recording medium for stroing bitstream
US11689718B2 (en) Apparatus and method for video encoding or decoding
WO2020175965A1 (en) Intra prediction-based video signal processing method and device
CN115623197A (en) Video signal processing method and apparatus using reference samples
KR20190042732A (en) Intra prediction mode based image processing method and apparatus therefor
KR20210058971A (en) Video signal processing method and apparatus using cross-component linear model
KR20180040577A (en) Intra prediction mode based image processing method and apparatus therefor
KR102453811B1 (en) Method and Apparatus for Expressing Position of Non-zero Coefficients
KR102489081B1 (en) Video Encoding and Decoding Using Intra Prediction
KR20230159255A (en) Method and Apparatus for Coding Intra Prediction Mode for Each Chroma Component
KR20240045089A (en) Method and Apparatus for Video Coding Based on Non-separable Primary Transform
KR20220071129A (en) Method for Encoding and Decoding Video Using Adaptive Reference Sample Selection
KR20200084746A (en) METHOD and apparatus FOR ENCODING/DECODING AN INTRA-PICTURE MODE IN INTRA-PICTURE PREDICTION
CN113892261A (en) Image decoding device using differential encoding
KR20200081186A (en) Method for deriving motion vector of temporal candidate and apparatus using the same

Legal Events

Date Code Title Description
A107 Divisional application of patent