KR20210038289A - Method and apparatus for constructing reference sample - Google Patents

Method and apparatus for constructing reference sample Download PDF

Info

Publication number
KR20210038289A
KR20210038289A KR1020200061271A KR20200061271A KR20210038289A KR 20210038289 A KR20210038289 A KR 20210038289A KR 1020200061271 A KR1020200061271 A KR 1020200061271A KR 20200061271 A KR20200061271 A KR 20200061271A KR 20210038289 A KR20210038289 A KR 20210038289A
Authority
KR
South Korea
Prior art keywords
padding
value
reference sample
reference samples
flag
Prior art date
Application number
KR1020200061271A
Other languages
Korean (ko)
Inventor
김재일
신재섭
백아람
이선영
Original Assignee
에스케이텔레콤 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 에스케이텔레콤 주식회사 filed Critical 에스케이텔레콤 주식회사
Publication of KR20210038289A publication Critical patent/KR20210038289A/en

Links

Images

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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

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

Abstract

Disclosed are a method for constructing a reference sample and image decoder to improve the encoding and decoding efficiency by reflecting a correlation between reference samples in the configuration of reference samples. According to one embodiment of the present invention, the method for constructing reference samples used for the prediction of a current block comprises the steps of: determining the availability of a current reference sample to be constructed; determining the availability of other reference samples located around the current reference sample when the current reference sample is not available; and padding the current reference sample based on the correlation between the other reference samples when the other reference samples are available.

Description

참조샘플 구성 방법 및 영상 복호화 장치{METHOD AND APPARATUS FOR CONSTRUCTING REFERENCE SAMPLE}Reference sample composition method and video decoding device {METHOD AND APPARATUS FOR CONSTRUCTING REFERENCE SAMPLE}

본 발명은 영상의 부호화 및 복호화에 관한 것으로서, 더욱 구체적으로는 참조샘플을 더욱 정확하게 생성함으로써 부호화 및 복호화의 효율을 향상시킨 참조샘플 구성 방법 및 영상 복호화 장치에 관한 것이다.The present invention relates to encoding and decoding of an image, and more particularly, to a reference sample construction method and an image decoding apparatus in which the efficiency of encoding and decoding is improved by generating a reference sample more accurately.

동영상 데이터는 음성 데이터나 정지 영상 데이터 등에 비하여 많은 데이터량을 가지기 때문에, 압축을 위한 처리 없이 그 자체를 저장하거나 전송하기 위해서는 메모리를 포함하여 많은 하드웨어 자원을 필요로 한다. Since moving picture data has a larger amount of data than audio data or still image data, it requires a lot of hardware resources including memory in order to store or transmit itself without processing for compression.

따라서, 통상적으로 동영상 데이터를 저장하거나 전송할 때에는 부호화기를 사용하여 동영상 데이터를 압축하여 저장하거나 전송하며, 복호화기에서는 압축된 동영상 데이터를 수신하여 압축을 해제하고 재생한다. 이러한 동영상 압축 기술로는 H.264/AVC를 비롯하여, H.264/AVC에 비해 약 40% 정도의 부호화 효율을 향상시킨 HEVC(High Efficiency Video Coding)가 존재한다. Accordingly, when moving or transmitting moving picture data, the moving picture data is compressed and stored or transmitted using an encoder, and the decoder receives the compressed moving picture data, decompresses and reproduces the compressed moving picture data. As such video compression techniques, there are H.264/AVC and HEVC (High Efficiency Video Coding), which improves coding efficiency by about 40% compared to H.264/AVC.

그러나, 영상의 크기 및 해상도, 프레임율이 점차 증가하고 있고, 이에 따라 부호화해야 하는 데이터량도 증가하고 있으므로 기존의 압축 기술보다 더 부호화 효율이 좋고 화질 개선 효과도 높은 새로운 압축 기술이 요구된다.However, the size, resolution, and frame rate of an image are gradually increasing, and accordingly, the amount of data to be encoded is also increasing. Accordingly, a new compression technique having higher encoding efficiency and higher quality improvement effect than the existing compression technique is required.

이러한 요구에 부응하기 위해 본 발명은 개선된 영상 부호화 및 복호화 기술을 제공하는 것을 목적으로 하며, 특히, 본 발명의 일 측면은 참조샘플의 구성에 참조샘플들 간의 상관관계를 반영함으로써 부호화 및 복호화의 효율을 향상시키는 기술과 관련된다.In order to meet these needs, an object of the present invention is to provide an improved video encoding and decoding technology. In particular, an aspect of the present invention reflects the correlation between reference samples in the configuration of a reference sample. It relates to technology that improves efficiency.

본 발명의 일 측면은, 현재블록의 예측에 이용되는 참조샘플들을 구성하는 방법으로서, 구성 대상인 현재 참조샘플의 사용 가능성 여부를 판단하는 단계; 상기 현재 참조샘플이 사용 가능하지 않은 경우, 상기 현재 참조샘플의 주변에 위치하는 다른 참조샘플들의 사용 가능성 여부를 판단하는 단계; 및 상기 다른 참조샘플들이 사용 가능한 경우, 상기 다른 참조샘플들 간의 상관관계에 기초하여, 상기 현재 참조샘플을 패딩(padding)하는 단계를 포함하는, 참조샘플 구성 방법을 제공한다.An aspect of the present invention is a method of constructing reference samples used for prediction of a current block, the method comprising: determining whether or not a current reference sample to be constructed is available; If the current reference sample is not available, determining whether other reference samples located around the current reference sample are available; And if the other reference samples are available, padding the current reference sample based on a correlation between the other reference samples.

본 발명의 다른 일 측면은, 현재블록의 예측에 이용되는 참조샘플들을 구성하는 영상 복호화 장치로서, 구성 대상인 현재 참조샘플의 사용 가능성 여부를 판단하고, 상기 현재 참조샘플이 사용 가능하지 않은 경우에 상기 현재 참조샘플의 주변에 위치하는 다른 참조샘플들의 사용 가능성 여부를 판단하는 판단부; 및 상기 다른 참조샘플들이 사용 가능한 경우, 상기 다른 참조샘플들 간의 상관관계에 기초하여, 상기 현재 참조샘플을 패딩(padding)하는 패딩부를 포함하는, 영상 복호화 장치를 제공한다.Another aspect of the present invention is an image decoding apparatus that configures reference samples used for prediction of a current block, and determines whether a current reference sample as a configuration target is available, and when the current reference sample is not available, the A determination unit that determines whether other reference samples located in the vicinity of the current reference sample can be used; And a padding unit for padding the current reference sample based on a correlation between the other reference samples when the other reference samples are available.

이상에서 설명한 바와 같이 본 발명의 일 실시예에 의하면, 참조샘플들 간의 상관관계를 반영하여 참조샘플을 패딩함으로써 참조샘플을 구성하는 과정에 대한 정확성을 향상시킬 수 있다.As described above, according to an embodiment of the present invention, the accuracy of the process of constructing the reference sample may be improved by padding the reference sample by reflecting the correlation between the reference samples.

또한, 본 발명의 다른 일 실시예에 의하면, 참조샘플을 더욱 정확하게 구성할 수 있으므로, 예측의 정확도는 물론 압축 성능을 향상시킬 수 있다.In addition, according to another embodiment of the present invention, since a reference sample can be more accurately configured, it is possible to improve not only prediction accuracy but also compression performance.

도 1은 본 개시의 기술들을 구현할 수 있는 영상 부호화 장치에 대한 예시적인 블록도이다.
도 2는 QTBTTT 구조를 이용하여 블록을 분할하는 방법을 설명하기 위한 도면이다.
도 3은 복수의 인트라 예측 모드들을 설명하기 위한 도면이다.
도 4는 본 개시의 기술들을 구현할 수 있는 영상 복호화 장치의 예시적인 블록도이다.
도 5는 인트라 예측에 이용되는 참조샘플들 및 이 참조샘플들을 구성하는 종래 방법을 설명하기 위한 도면이다.
도 6은 인터 예측에 이용되는 참조샘플들을 구성하는 방법을 설명하기 위한 도면이다.
도 7은 참조샘플 구성 방법을 구현할 수 있는 영상 복호화 장치의 예시적인 블록도이다.
도 8은 참조샘플 구성 방법에 대한 일 예를 설명하기 위한 순서도이다.
도 9는 선형관계에 기초하여 참조샘플을 구성하는 방법에 대한 일 예를 설명하기 위한 순서도이다.
도 10은 그래디언트에 기초하여 참조샘플을 구성하는 방법에 대한 일 예를 설명하기 위한 순서도이다.
도 11은 선형관계와 그래디언트에 기초하여 참조샘플을 구성하는 방법에 대한 일 예를 설명하기 위한 순서도이다.
도 12는 참조샘플 구성 방법에 대한 신택스 구조를 설명하기 위한 순서도이다.
도 13은 참조샘플이 모두 사용 불가능한 경우에 참조샘플을 구성하는 방법을 설명하기 위한 순서도이다.
1 is an exemplary block diagram of an image encoding apparatus capable of implementing the techniques of the present disclosure.
2 is a diagram for explaining a method of dividing a block using a QTBTTT structure.
3 is a diagram for describing a plurality of intra prediction modes.
4 is an exemplary block diagram of an image decoding apparatus capable of implementing the techniques of the present disclosure.
5 is a diagram for explaining reference samples used for intra prediction and a conventional method of configuring the reference samples.
6 is a diagram for describing a method of configuring reference samples used for inter prediction.
7 is an exemplary block diagram of an image decoding apparatus capable of implementing a method of constructing a reference sample.
8 is a flowchart illustrating an example of a method of configuring a reference sample.
9 is a flowchart illustrating an example of a method of constructing a reference sample based on a linear relationship.
10 is a flowchart illustrating an example of a method of configuring a reference sample based on a gradient.
11 is a flowchart illustrating an example of a method of configuring a reference sample based on a linear relationship and a gradient.
12 is a flowchart illustrating a syntax structure for a method of constructing a reference sample.
13 is a flowchart illustrating a method of constructing a reference sample when all reference samples are not available.

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

도 1은 본 개시의 기술들을 구현할 수 있는 영상 부호화 장치에 대한 예시적인 블록도이다. 이하에서는 도 1을 참조하여 영상 부호화 장치와 이 장치의 하위 구성들에 대하여 설명하도록 한다.1 is an exemplary block diagram of an image encoding apparatus capable of implementing the techniques of the present disclosure. Hereinafter, an image encoding apparatus and sub-elements of the apparatus will be described with reference to FIG. 1.

영상 부호화 장치는 블록 분할부(110), 예측부(120), 감산기(130), 변환부(140), 양자화부(145), 부호화부(150), 역양자화부(160), 역변환부(165), 가산기(170), 필터부(180) 및 메모리(190)를 포함하여 구성될 수 있다.The image encoding apparatus includes a block division unit 110, a prediction unit 120, a subtractor 130, a transform unit 140, a quantization unit 145, an encoding unit 150, an inverse quantization unit 160, and an inverse transform unit ( 165, an adder 170, a filter unit 180, and a memory 190 may be included.

영상 부호화 장치의 각 구성요소는 하드웨어 또는 소프트웨어로 구현되거나, 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. 또한, 각 구성요소의 기능이 소프트웨어로 구현되고 마이크로프로세서가 각 구성요소에 대응하는 소프트웨어의 기능을 실행하도록 구현될 수도 있다.Each component of the image encoding apparatus may be implemented as hardware or software, or may be implemented as a combination of hardware and software. In addition, functions of each component may be implemented as software, and a microprocessor may be implemented to execute a function of software corresponding to each component.

하나의 영상(비디오)는 복수의 픽처들로 구성된다. 각 픽처들은 복수의 영역으로 분할되고 각 영역마다 부호화가 수행된다. 예를 들어, 하나의 픽처는 하나 이상의 타일(Tile) 또는/및 슬라이스(Slice)로 분할된다. 여기서, 하나 이상의 타일을 타일 그룹(Tile Group)으로 정의할 수 있다. 각 타일 또는/슬라이스는 하나 이상의 CTU(Coding Tree Unit)로 분할된다. 그리고 각 CTU는 트리 구조에 의해 하나 이상의 CU(Coding Unit)들로 분할된다. 각 CU에 적용되는 정보들은 CU의 신택스로서 부호화되고, 하나의 CTU에 포함된 CU들에 공통적으로 적용되는 정보는 CTU의 신택스로서 부호화된다. 또한, 하나의 타일 내의 모든 블록들에 공통적으로 적용되는 정보는 타일의 신택스로서 부호화되거나 다수 개의 타일을 모아 놓은 타일 그룹의 신택스로서 부호화되며, 하나의 픽처들을 구성하는 모든 블록들에 적용되는 정보는 픽처 파라미터 셋(PPS, Picture Parameter Set) 혹은 픽처 헤더에 부호화된다. 나아가, 복수의 픽처가 공통으로 참조하는 정보들은 시퀀스 파라미터 셋(SPS, Sequence Parameter Set)에 부호화된다. 그리고, 하나 이상의 SPS가 공통으로 참조하는 정보들은 비디오 파라미터 셋(VPS, Video Parameter Set)에 부호화된다.One image (video) is composed of a plurality of pictures. Each picture is divided into a plurality of regions, and encoding is performed for each region. For example, one picture is divided into one or more tiles or/and slices. Here, one or more tiles may be defined as a tile group. Each tile or/slice is divided into one or more Coding Tree Units (CTUs). And each CTU is divided into one or more CUs (Coding Units) by a tree structure. Information applied to each CU is encoded as the syntax of the CU, and information commonly applied to CUs included in one CTU is encoded as the syntax of the CTU. In addition, information commonly applied to all blocks in one tile is encoded as the syntax of a tile or is encoded as a syntax of a tile group in which a plurality of tiles are collected, and information applied to all blocks constituting one picture is It is encoded in a picture parameter set (PPS) or a picture header. Furthermore, information commonly referred to by a plurality of pictures is encoded in a sequence parameter set (SPS). In addition, information commonly referred to by one or more SPSs is encoded in a video parameter set (VPS).

블록 분할부(110)는 CTU(Coding Tree Unit)의 크기를 결정한다. CTU의 크기에 대한 정보(CTU size)는 SPS 또는 PPS의 신택스로서 부호화되어 영상 복호화 장치로 전달된다. The block dividing unit 110 determines the size of a coding tree unit (CTU). Information on the size of the CTU (CTU size) is encoded as the syntax of the SPS or PPS and transmitted to the video decoding apparatus.

블록 분할부(110)는 영상을 구성하는 각 픽처(picture)를 미리 결정된 크기를 가지는 복수의 CTU(Coding Tree Unit)들로 분할한 이후에, 트리 구조(tree structure)를 이용하여 CTU를 반복적으로(recursively) 분할한다. 트리 구조에서의 리프 노드(leaf node)가 부호화의 기본 단위인 CU(coding unit)가 된다. The block dividing unit 110 divides each picture constituting an image into a plurality of coding tree units (CTUs) having a predetermined size, and then repeatedly divides the CTU using a tree structure. Split (recursively). A leaf node in a tree structure becomes a coding unit (CU), which is a basic unit of coding.

트리 구조로는 상위 노드(혹은 부모 노드)가 동일한 크기의 네 개의 하위 노드(혹은 자식 노드)로 분할되는 쿼드트리(QuadTree, QT), 또는 상위 노드가 두 개의 하위 노드로 분할되는 바이너리트리(BinaryTree, BT), 또는 상위 노드가 1:2:1 비율로 세 개의 하위 노드로 분할되는 터너리트리(TernaryTree, TT), 또는 이러한 QT 구조, BT 구조 및 TT 구조 중 둘 이상을 혼용한 구조일 수 있다. 예컨대, QTBT(QuadTree plus BinaryTree) 구조가 사용될 수 있고, 또는 QTBTTT(QuadTree plus BinaryTree TernaryTree) 구조가 사용될 수 있다. 여기서, BTTT를 합쳐서 MTT(Multiple-Type Tree)라 칭할 수 있다. In a tree structure, a quadtree (QuadTree, QT) in which an upper node (or parent node) is divided into four lower nodes (or child nodes) of the same size, or a binary tree (BinaryTree) in which an upper node is divided into two lower nodes. , BT), or a ternary tree (TT) in which an upper node is divided into three lower nodes in a 1:2:1 ratio, or a structure in which two or more of these QT structures, BT structures, and TT structures are mixed. have. For example, a QTBT (QuadTree plus BinaryTree) structure may be used, or a QTBTTT (QuadTree plus BinaryTree TernaryTree) structure may be used. Here, BTTT may be collectively referred to as MTT (Multiple-Type Tree).

도 2는 QTBTTT 분할 트리 구조를 보인다. 도 2에서 보는 바와 같이, CTU는 먼저 QT 구조로 분할될 수 있다. 쿼드트리 분할은 분할 블록(splitting block)의 크기가 QT에서 허용되는 리프 노드의 최소 블록 크기(MinQTSize)에 도달할 때까지 반복될 수 있다. QT 구조의 각 노드가 하위 레이어의 4개의 노드들로 분할되는지 여부를 지시하는 제1 플래그(QT_split_flag)는 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 시그널링된다. QT의 리프 노드가 BT에서 허용되는 루트 노드의 최대 블록 크기(MaxBTSize)보다 크지 않은 경우, BT 구조 또는 TT 구조 중 어느 하나 이상으로 더 분할될 수 있다. BT 구조 및/또는 TT 구조에서는 복수의 분할 방향이 존재할 수 있다. 예컨대, 해당 노드의 블록이 가로로 분할되는 방향과 세로로 분할되는 방향 두 가지가 존재할 수 있다. 도 2와 같이, MTT 분할이 시작되면, 노드들이 분할되었는지 여부를 지시하는 제2 플래그(mtt_split_flag)와, 분할이 되었다면 추가적으로 분할 방향(vertical 혹은 horizontal)을 나타내는 플래그 및/또는 분할 타입(Binary 혹은 Ternary)을 나타내는 플래그가 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 시그널링된다.2 shows a QTBTTT split tree structure. As shown in FIG. 2, the CTU may be first divided into a QT structure. The quadtree division may be repeated until the size of a splitting block reaches the minimum block size (MinQTSize) of a leaf node allowed in QT. A first flag (QT_split_flag) indicating whether each node of the QT structure is divided into four nodes of a lower layer is encoded by the encoder 150 and signaled to the image decoding apparatus. If the leaf node of the QT is not larger than the maximum block size (MaxBTSize) of the root node allowed in BT, it may be further divided into one or more of a BT structure or a TT structure. In the BT structure and/or the TT structure, a plurality of division directions may exist. For example, there may be two directions in which a block of a corresponding node is divided horizontally and a direction vertically divided. As shown in FIG. 2, when MTT splitting starts, a second flag (mtt_split_flag) indicating whether nodes are split, and if split, a flag indicating a split direction (vertical or horizontal) and/or a split type (Binary or Ternary). A flag indicating) is encoded by the encoder 150 and signaled to the image decoding apparatus.

트리 구조의 다른 예로서, QTBTTT 구조를 사용하여 블록을 분할하는 경우, 먼저 분할 되었음을 나타내는 CU 분할 플래그(split_cu_flag) 및 분할 타입이 QT 분할인지를 지시하는 QT 분할 플래그(split_qt_flag) 정보가 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 시그널링된다. CU 분할 플래그(split_cu_flag) 값이 분할되지 않았음을 지시하는 경우, 해당 노드의 블록이 분할 트리 구조에서의 리프 노드(leaf node)가 되어 부호화의 기본 단위인 CU(coding unit)가 된다. CU 분할 플래그(split_cu_flag) 값이 분할되었음을 지시하는 경우, QT 분할 플래그(split_qt_flag) 값을 통해 분할 타입이 QT 혹은 MTT인지를 구분한다. 분할 타입이 QT인 경우에는 더 이상의 추가 정보가 없으며, 분할 타입이 MTT인 경우에는 추가적으로 MTT 분할 방향(vertical 혹은 horizontal)을 나타내는 플래그(mtt_split_cu_vertical_flag) 및/또는 MTT 분할 타입(Binary 혹은 Ternary)을 나타내는 플래그(mtt_split_cu_binary_flag)가 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 시그널링된다.As another example of the tree structure, when a block is divided using a QTBTTT structure, information about a CU split flag (split_cu_flag) indicating that the block has been split first and a QT split flag (split_qt_flag) indicating whether the split type is QT splitting is information from the encoding unit 150 ) And signaled to the video decoding apparatus. When it is indicated that the value of the CU split flag (split_cu_flag) is not split, the block of the corresponding node becomes a leaf node in the split tree structure and becomes a coding unit (CU), which is a basic unit of encoding. When indicating that the value of the CU split flag (split_cu_flag) is split, whether the split type is QT or MTT is distinguished through the value of the QT split flag (split_qt_flag). If the split type is QT, there is no additional information, and if the split type is MTT, additionally, a flag indicating the MTT split direction (vertical or horizontal) (mtt_split_cu_vertical_flag) and/or a flag indicating the MTT split type (Binary or Ternary) (mtt_split_cu_binary_flag) is encoded by the encoder 150 and signaled to the video decoding apparatus.

트리 구조의 다른 예시로서 QTBT가 사용되는 경우, 해당 노드의 블록을 동일 크기의 두 개 블록으로 가로로 분할하는 타입(즉, symmetric horizontal splitting)과 세로로 분할하는 타입(즉, symmetric vertical splitting) 두 가지가 존재할 수 있다. BT 구조의 각 노드가 하위 레이어의 블록으로 분할되는지 여부를 지시하는 분할 플래그(split_flag) 및 분할되는 타입을 지시하는 분할 타입 정보가 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 전달된다. 한편, 해당 노드의 블록을 서로 비대칭 형태의 두 개의 블록으로 분할하는 타입이 추가로 더 존재할 수도 있다. 비대칭 형태에는 해당 노드의 블록을 1:3의 크기 비율을 가지는 두 개의 직사각형 블록으로 분할하는 형태가 포함될 수 있고, 혹은 해당 노드의 블록을 대각선 방향으로 분할하는 형태가 포함될 수도 있다.When QTBT is used as another example of the tree structure, there are two types of horizontally splitting a block of a corresponding node into two blocks of the same size (i.e., symmetric horizontal splitting) and a type splitting vertically (i.e., symmetric vertical splitting). Branches can exist. A split flag indicating whether each node of the BT structure is divided into blocks of a lower layer and split type information indicating a type to be divided are encoded by the encoder 150 and transmitted to the image decoding apparatus. Meanwhile, there may be additional types of dividing the block of the corresponding node into two blocks of an asymmetric form. The asymmetric form may include a form of dividing a block of a corresponding node into two rectangular blocks having a size ratio of 1:3, or a form of dividing a block of a corresponding node in a diagonal direction.

CU는 CTU로부터의 QTBT 또는 QTBTTT 분할에 따라 다양한 크기를 가질 수 있다. 이하에서는, 부호화 또는 복호화하고자 하는 CU(즉, QTBTTT의 리프 노드)에 해당하는 블록을 '현재블록'이라 칭한다.The CU may have various sizes according to the QTBT or QTBTTT split from the CTU. Hereinafter, a block corresponding to a CU to be encoded or decoded (ie, a leaf node of QTBTTT) is referred to as a'current block'.

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

일반적으로, 픽처 내 현재블록들은 각각 예측적으로 코딩될 수 있다. 일반적으로 현재블록의 예측은 (현재블록을 포함하는 픽처로부터의 데이터를 사용하는) 인트라 예측 기술 또는 (현재블록을 포함하는 픽처 이전에 코딩된 픽처로부터의 데이터를 사용하는) 인터 예측 기술을 사용하여 수행될 수 있다. 인터 예측은 단방향 예측과 양방향 예측 모두를 포함한다.In general, each of the current blocks in a picture can be predictively coded. In general, prediction of the current block is performed using an intra prediction technique (using data from a picture containing the current block) or an inter prediction technique (using data from a picture coded before a picture containing the current block). Can be done. Inter prediction includes both one-way prediction and two-way prediction.

인트라 예측부(122)는 현재블록이 포함된 현재 픽처 내에서 현재블록의 주변에 위치한 픽셀(참조 픽셀)들을 이용하여 현재블록 내의 픽셀들을 예측한다. 예측 방향에 따라 복수의 인트라 예측모드가 존재한다. 예컨대, 도 3에서 보는 바와 같이, 복수의 인트라 예측모드는 planar 모드와 DC 모드를 포함하는 비방향성 모드와 65개의 방향성 모드를 포함할 수 있다. 각 예측모드에 따라 사용할 주변 픽셀과 연산식이 다르게 정의된다.The intra prediction unit 122 predicts pixels in the current block by using pixels (reference pixels) located around the current block in the current picture including the current block. There are a plurality of intra prediction modes according to the prediction direction. For example, as shown in FIG. 3, the plurality of intra prediction modes may include a non-directional mode including a planar mode and a DC mode, and 65 directional modes. Depending on each prediction mode, the surrounding pixels to be used and the calculation expression are defined differently.

인트라 예측부(122)는 현재블록을 부호화하는데 사용할 인트라 예측 모드를 결정할 수 있다. 일부 예들에서, 인트라 예측부(122)는 여러 인트라 예측 모드들을 사용하여 현재블록을 인코딩하고, 테스트된 모드들로부터 사용할 적절한 인트라 예측 모드를 선택할 수도 있다. 예를 들어, 인트라 예측부(122)는 여러 테스트된 인트라 예측 모드들에 대한 레이트 왜곡(rate-distortion) 분석을 사용하여 레이트 왜곡 값들을 계산하고, 테스트된 모드들 중 최선의 레이트 왜곡 특징들을 갖는 인트라 예측 모드를 선택할 수도 있다.The intra prediction unit 122 may determine an intra prediction mode to be used to encode the current block. In some examples, the intra prediction unit 122 may encode the current block using several intra prediction modes, and select an appropriate intra prediction mode to use from the tested modes. For example, the intra prediction unit 122 calculates rate distortion values using rate-distortion analysis for several tested intra prediction modes, and has the best rate distortion characteristics among the tested modes. It is also possible to select an intra prediction mode.

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

인터 예측부(124)는 움직임 보상 과정을 통해 현재블록에 대한 예측블록을 생성한다. 현재 픽처보다 먼저 부호화 및 복호화된 참조픽처 내에서 현재블록과 가장 유사한 블록을 탐색하고, 그 탐색된 블록을 이용하여 현재블록에 대한 예측블록을 생성한다. 그리고, 현재 픽처 내의 현재블록과 참조픽처 내의 예측블록 간의 변위(displacement)에 해당하는 움직임벡터(motion vector)를 생성한다. 일반적으로, 움직임 추정은 루마(luma) 성분에 대해 수행되고, 루마 성분에 기초하여 계산된 모션 벡터는 루마 성분 및 크로마 성분 모두에 대해 사용된다. 현재블록을 예측하기 위해 사용된 참조픽처에 대한 정보 및 움직임벡터에 대한 정보를 포함하는 움직임 정보는 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 전달된다.The inter prediction unit 124 generates a prediction block for the current block through a motion compensation process. A block that is most similar to a current block is searched for in a reference picture that is coded and decoded before the current picture, and a prediction block for the current block is generated using the searched block. Then, a motion vector corresponding to a displacement between the current block in the current picture and the prediction block in the reference picture is generated. In general, motion estimation is performed on a luma component, and a motion vector calculated based on the luma component is used for both the luma component and the chroma component. Motion information including information on a reference picture used to predict a current block and information on a motion vector is encoded by the encoder 150 and transmitted to an image decoding apparatus.

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

변환부(140)는 공간 영역의 픽셀 값들을 가지는 잔차블록 내의 잔차 신호를 주파수 도메인의 변환 계수로 변환한다. 변환부(140)는 잔차블록의 전체 크기를 변환 단위로 사용하여 잔차블록 내의 잔차 신호들을 변환할 수 있으며, 또는 잔차블록을 변환 영역 및 비변환 영역인 두 개의 서브블록으로 구분하여, 변환 영역 서브블록만 변환 단위로 사용하여 잔차 신호들을 변환할 수 있다. 여기서, 변환 영역 서브블록은 가로축 (혹은 세로축) 기준 1:1의 크기 비율을 가지는 두 개의 직사각형 블록 중 하나일 수 있다. 이런 경우, 서브블록 만을 변환하였음을 지시하는 플래그(cu_sbt_flag), 방향성(vertical/horizontal) 정보(cu_sbt_horizontal_flag) 및/또는 위치 정보(cu_sbt_pos_flag)가 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 시그널링된다. 또한, 변환 영역 서브블록의 크기는 가로축 (혹은 세로축) 기준 1:3의 크기 비율을 가질 수 있으며, 이런 경우 해당 분할을 구분하는 플래그(cu_sbt_quad_flag)가 추가적으로 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 시그널링된다. The transform unit 140 converts the residual signal in the residual block having pixel values in the spatial domain into transform coefficients in the frequency domain. The transform unit 140 may transform residual signals in the residual block using the total size of the residual block as a transform unit, or divide the residual block into two sub-blocks, which are transform regions and non-transform regions, Residual signals can be transformed using only a block as a transform unit. Here, the transform region subblock may be one of two rectangular blocks having a size ratio of 1:1 based on the horizontal axis (or vertical axis). In this case, a flag indicating that only the subblock has been transformed (cu_sbt_flag), directional (vertical/horizontal) information (cu_sbt_horizontal_flag), and/or location information (cu_sbt_pos_flag) are encoded by the encoder 150 and signaled to the video decoding apparatus. . In addition, the size of the transform region subblock may have a size ratio of 1:3 based on the horizontal axis (or vertical axis), and in this case, a flag (cu_sbt_quad_flag) that separates the division is additionally encoded by the encoder 150 to decode the image. Signaled to the device.

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

부호화부(150)는 양자화된 변환 계수들을 CABAC(Context-based Adaptive Binary Arithmetic Code) 등의 부호화 방식을 사용하여 부호화함으로써 비트스트림을 생성한다. 부호화부(150)는 블록 분할과 관련된 CTU size, CU 분할 플래그, QT 분할 플래그, MTT 분할 방향, MTT 분할 타입 등의 정보를 부호화하여, 영상 복호화 장치가 영상 부호화 장치와 동일하게 블록을 분할할 수 있도록 한다.The encoding unit 150 generates a bitstream by encoding the quantized transform coefficients using an encoding method such as Context-based Adaptive Binary Arithmetic Code (CABAC). The encoder 150 encodes information such as a CTU size related to block division, a CU division flag, a QT division flag, an MTT division direction, and an MTT division type, so that the video decoding apparatus can divide the block in the same manner as the video encoding apparatus. To be there.

또한, 부호화부(150)는 현재블록이 인트라 예측에 의해 부호화되었는지 아니면 인터 예측에 의해 부호화되었는지 여부를 지시하는 예측 타입에 대한 정보를 부호화하고, 예측 타입에 따라 인트라 예측정보(즉, 인트라 예측 모드에 대한 정보) 또는 인터 예측정보(참조픽처 및 움직임벡터에 대한 정보)를 부호화한다.In addition, the encoder 150 encodes information on a prediction type indicating whether the current block is encoded by intra prediction or inter prediction, and intra prediction information (ie, intra prediction mode) according to the prediction type. Information) or inter prediction information (information on a reference picture and a motion vector) is encoded.

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

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

필터부(180)는 블록 기반의 예측 및 변환/양자화로 인해 발생하는 블록킹 아티팩트(blocking artifacts), 링잉 아티팩트(ringing artifacts), 블러링 아티팩트(blurring artifacts) 등을 줄이기 위해 복원된 픽셀들에 대한 필터링을 수행한다. 필터부(180)는 디블록킹 필터(182)와 SAO(Sample Adaptive Offset) 필터(184)를 포함할 수 있다.The filter unit 180 filters reconstructed pixels to reduce blocking artifacts, ringing artifacts, blurring artifacts, etc. that occur due to block-based prediction and transformation/quantization. Perform. The filter unit 180 may include a deblocking filter 182 and a sample adaptive offset (SAO) filter 184.

디블록킹 필터(180)는 블록 단위의 부호화/복호화로 인해 발생하는 블록킹 현상(blocking artifact)을 제거하기 위해 복원된 블록 간의 경계를 필터링하고, SAO 필터(184)는 디블록킹 필터링된 영상에 대해 추가적인 필터링을 수행한다. SAO 필터(184)는 손실 부호화(lossy coding)로 인해 발생하는 복원된 픽셀과 원본 픽셀 간의 차이를 보상하기 위해 사용되는 필터이다.The deblocking filter 180 filters the boundary between reconstructed blocks to remove blocking artifacts caused by block-based encoding/decoding, and the SAO filter 184 is additionally applied to the deblocking filtered image. Perform filtering. The SAO filter 184 is a filter used to compensate for a difference between a reconstructed pixel and an original pixel caused by lossy coding.

디블록킹 필터(182) 및 SAO 필터(184)를 통해 필터링된 복원블록은 메모리(190)에 저장된다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 부호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조 픽처로 사용된다.The reconstructed block filtered through the deblocking filter 182 and the SAO filter 184 is stored in the memory 190. When all blocks in one picture are reconstructed, the reconstructed picture is used as a reference picture for inter prediction of a block in a picture to be encoded later.

도 4는 본 개시의 기술들을 구현할 수 있는 영상 복호화 장치의 예시적인 블록도이다. 이하에서는 도 4를 참조하여 영상 복호화 장치와 이 장치의 하위 구성들에 대하여 설명하도록 한다.4 is an exemplary block diagram of an image decoding apparatus capable of implementing the techniques of the present disclosure. Hereinafter, an image decoding apparatus and sub-elements of the apparatus will be described with reference to FIG. 4.

영상 복호화 장치는 복호화부(410), 역양자화부(420), 역변환부(430), 예측부(440), 가산기(450), 필터부(460) 및 메모리(470)를 포함하여 구성될 수 있다. The image decoding apparatus may include a decoding unit 410, an inverse quantization unit 420, an inverse transform unit 430, a prediction unit 440, an adder 450, a filter unit 460, and a memory 470. have.

도 1의 영상 부호화 장치와 마찬가지로, 영상 복호화 장치의 각 구성요소는 하드웨어 또는 소프트웨어로 구현되거나, 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다. 또한, 각 구성요소의 기능이 소프트웨어로 구현되고 마이크로프로세서가 각 구성요소에 대응하는 소프트웨어의 기능을 실행하도록 구현될 수도 있다.Like the image encoding apparatus of FIG. 1, each component of the image decoding apparatus may be implemented as hardware or software, or may be implemented as a combination of hardware and software. In addition, functions of each component may be implemented as software, and a microprocessor may be implemented to execute a function of software corresponding to each component.

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

복호화부(410)는 SPS(Sequence Parameter Set) 또는 PPS(Picture Parameter Set)로부터 CTU size에 대한 정보를 추출하여 CTU의 크기를 결정하고, 픽처를 결정된 크기의 CTU로 분할한다. 그리고, CTU를 트리 구조의 최상위 레이어, 즉, 루트 노드로 결정하고, CTU에 대한 분할정보를 추출함으로써 트리 구조를 이용하여 CTU를 분할한다. The decoder 410 determines the size of the CTU by extracting information on the CTU size from a sequence parameter set (SPS) or a picture parameter set (PPS), 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 partition information for the CTU.

예컨대, QTBTTT 구조를 사용하여 CTU를 분할하는 경우, 먼저 QT의 분할과 관련된 제1 플래그(QT_split_flag)를 추출하여 각 노드를 하위 레이어의 네 개의 노드로 분할한다. 그리고, QT의 리프 노드에 해당하는 노드에 대해서는 MTT의 분할과 관련된 제2 플래그(MTT_split_flag) 및 분할 방향(vertical / horizontal) 및/또는 분할 타입(binary / ternary) 정보를 추출하여 해당 리프 노드를 MTT 구조로 분할한다. 이를 통해 QT의 리프 노드 이하의 각 노드들을 BT 또는 TT 구조로 반복적으로(recursively) 분할한다.For example, in the case of splitting the CTU using the QTBTTT structure, a first flag (QT_split_flag) related to the splitting of the QT is first extracted, and each node is split into four nodes of a lower layer. And, for the node corresponding to the leaf node of QT, the second flag (MTT_split_flag) related to the splitting of the MTT and the splitting direction (vertical / horizontal) and/or split type (binary / ternary) information are extracted and the corresponding leaf node is MTT. Divide into structure. Through this, each node below the leaf node of the QT is recursively divided into a BT or TT structure.

또 다른 예로서, QTBTTT 구조를 사용하여 CTU를 분할하는 경우, 먼저 CU의 분할 여부를 지시하는 CU 분할 플래그(split_cu_flag)를 추출하고, 해당 블록이 분할된 경우, QT 분할 플래그(split_qt_flag)를 추출한다. 분할 타입이 QT가 아니고 MTT인 경우, MTT 분할 방향(vertical 혹은 horizontal)을 나타내는 플래그(mtt_split_cu_vertical_flag) 및/또는 MTT 분할 타입(Binary 혹은 Ternary)을 나타내는 플래그(mtt_split_cu_binary_flag)를 추가적으로 추출한다. 분할 과정에서 각 노드는 0번 이상의 반복적인 QT 분할 후에 0번 이상의 반복적인 MTT 분할이 발생할 수 있다. 예컨대, CTU는 바로 MTT 분할이 발생하거나, 반대로 다수 번의 QT 분할만 발생할 수도 있다. As another example, when a CTU is split using a QTBTTT structure, first, a CU split flag indicating whether to split a CU (split_cu_flag) is extracted, and when the corresponding block is split, a QT split flag (split_qt_flag) is extracted. . If the split type is not QT but MTT, a flag indicating the MTT split direction (vertical or horizontal) (mtt_split_cu_vertical_flag) and/or a flag indicating the MTT split type (Binary or Ternary) (mtt_split_cu_binary_flag) is additionally extracted. In the partitioning process, each node may have zero or more repetitive MTT partitions after zero or more repetitive QT partitions. For example, in the CTU, MTT division may occur immediately, or, conversely, only multiple QT divisions may occur.

다른 예로서, QTBT 구조를 사용하여 CTU를 분할하는 경우, QT의 분할과 관련된 제1 플래그(QT_split_flag)를 추출하여 각 노드를 하위 레이어의 네 개의 노드로 분할한다. 그리고, QT의 리프 노드에 해당하는 노드에 대해서는 BT로 더 분할되는지 여부를 지시하는 분할 플래그(split_flag) 및 분할 방향 정보를 추출한다.As another example, when the CTU is divided using the QTBT structure, each node is divided into four nodes of a lower layer by extracting the first flag (QT_split_flag) related to the division of the QT. In addition, a split flag indicating whether or not the node corresponding to the leaf node of the QT is further split into BT and split direction information are extracted.

한편, 복호화부(410)는 트리 구조의 분할을 통해 복호화하고자 하는 현재블록을 결정하게 되면, 현재블록이 인트라 예측되었는지 아니면 인터 예측되었는지를 지시하는 예측 타입에 대한 정보를 추출한다. 예측 타입 정보가 인트라 예측을 지시하는 경우, 복호화부(410)는 현재블록의 인트라 예측정보(인트라 예측 모드)에 대한 신택스 요소를 추출한다. 예측 타입 정보가 인터 예측을 지시하는 경우, 복호화부(410)는 인터 예측정보에 대한 신택스 요소, 즉, 움직임벡터 및 그 움직임벡터가 참조하는 참조픽처를 나타내는 정보를 추출한다.On the other hand, when determining the current block to be decoded through division of the tree structure, the decoder 410 extracts information on a prediction type indicating whether the current block is intra predicted or inter predicted. When the prediction type information indicates intra prediction, the decoder 410 extracts a syntax element for intra prediction information (intra prediction mode) of the current block. When the prediction type information indicates inter prediction, the decoder 410 extracts a syntax element for the inter prediction information, that is, information indicating a motion vector and a reference picture referenced by the motion vector.

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

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

또한, 역변환부(430)는 변환블록의 일부 영역(서브블록)만 역변환하는 경우, 변환블록의 서브블록만을 변환하였음을 지시하는 플래그(cu_sbt_flag), 서브블록의 방향성(vertical/horizontal) 정보(cu_sbt_horizontal_flag) 및/또는 서브블록의 위치 정보(cu_sbt_pos_flag)를 추출하여, 해당 서브블록의 변환계수들을 주파수 도메인으로부터 공간 도메인으로 역변환함으로써 잔차신호들을 복원하고, 역변환되지 않은 영역에 대해서는 잔차신호로 "0" 값을 채움으로써 현재블록에 대한 최종 잔차블록을 생성한다.In addition, when the inverse transform unit 430 inverse transforms only a partial region (subblock) of the transform block, a flag indicating that only the subblock of the transform block has been transformed (cu_sbt_flag), and the direction (vertical/horizontal) information of the subblock (cu_sbt_horizontal_flag) ) And/or sub-block location information (cu_sbt_pos_flag), and inverse transform coefficients of the sub-block from the frequency domain to the spatial domain to restore residual signals. By filling in, the final residual block for the current block is created.

예측부(440)는 인트라 예측부(442) 및 인터 예측부(444)를 포함할 수 있다. 인트라 예측부(442)는 현재블록의 예측 타입이 인트라 예측일 때 활성화되고, 인터 예측부(444)는 현재블록의 예측 타입이 인터 예측일 때 활성화된다.The prediction unit 440 may include an intra prediction unit 442 and an inter prediction unit 444. The intra prediction unit 442 is activated when the prediction type of the current block is intra prediction, and the inter prediction unit 444 is activated when the prediction type of the current block is inter prediction.

인트라 예측부(442)는 복호화부(410)로부터 추출된 인트라 예측 모드에 대한 신택스 요소로부터 복수의 인트라 예측 모드 중 현재블록의 인트라 예측 모드를 결정하고, 인트라 예측 모드에 따라 현재블록 주변의 참조 픽셀들을 이용하여 현재블록을 예측한다.The intra prediction unit 442 determines an intra prediction mode of the current block among a plurality of intra prediction modes from a syntax element for the intra prediction mode extracted from the decoder 410, and a reference pixel around the current block according to the intra prediction mode. The current block is predicted by using them.

인터 예측부(444)는 복호화부(410)로부터 추출된 인트라 예측 모드에 대한 신택스 요소를 이용하여 현재블록의 움직임벡터와 그 움직임벡터가 참조하는 참조픽처를 결정하고, 움직임벡터와 참조픽처를 이용하여 현재블록을 예측한다.The inter prediction unit 444 determines a motion vector of the current block and a reference picture referenced by the motion vector using the syntax element for the intra prediction mode extracted from the decoding unit 410, and uses the motion vector and the reference picture. To predict the current block.

가산기(450)는 역변환부로부터 출력되는 잔차블록과 인터 예측부 또는 인트라 예측부로부터 출력되는 예측블록을 가산하여 현재블록을 복원한다. 복원된 현재블록 내의 픽셀들은 이후에 복호화할 블록을 인트라 예측할 때의 참조픽셀로서 활용된다.The adder 450 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 the intra prediction unit. The pixels in the reconstructed current block are used as reference pixels for intra prediction of a block to be decoded later.

필터부(460)는 디블록킹 필터(462) 및 SAO 필터(464)를 포함할 수 있다. 디블록킹 필터(462)는 블록 단위의 복호화로 인해 발생하는 블록킹 현상(blocking artifact)를 제거하기 위해, 복원된 블록 간의 경계를 디블록킹 필터링한다. SAO 필터(464)는 손실 부호화(lossy coding)으로 인해 발생하는 복원된 픽셀과 원본 픽셀 간의 차이를 보상하기 위해, 디블록킹 필터링 이후의 복원된 블록에 대해 추가적인 필터링을 수행한다. 디블록킹 필터(462) 및 SAO 필터(464)를 통해 필터링된 복원블록은 메모리(470)에 저장된다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 부호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조 픽처로 사용된다.The filter unit 460 may include a deblocking filter 462 and an SAO filter 464. The deblocking filter 462 performs deblocking filtering on the boundary between reconstructed blocks in order to remove blocking artifacts occurring due to block-by-block decoding. The SAO filter 464 performs additional filtering on the reconstructed block after deblocking filtering in order to compensate for the difference between the reconstructed pixel and the original pixel caused by lossy coding. The reconstructed block filtered through the deblocking filter 462 and the SAO filter 464 is stored in the memory 470. When all blocks in one picture are reconstructed, the reconstructed picture is used as a reference picture for inter prediction of a block in a picture to be encoded later.

참조샘플(reference sample)을 패딩(padding)하는 방법은 영상의 부호화 및 복호화를 위한 다양한 과정들에 적용될 수 있다. 예를 들어, 참조샘플 패딩 방법은 현재블록의 인트라 예측을 위해 참조샘플들을 구성하는 과정에 적용될 수 있으며, 현재블록의 인터 예측을 위해 참조샘플들을 구성하는 과정에도 적용될 수 있다.The method of padding a reference sample can be applied to various processes for encoding and decoding an image. For example, the reference sample padding method may be applied to a process of configuring reference samples for intra prediction of a current block, and may also be applied to a process of configuring reference samples for inter prediction of a current block.

인트라 예측에서는 현재블록의 주변에 위치하는 이미 복원된 샘플들을 이용하여 예측이 수행되며, 인트라 예측에 이용되는 주변샘플을 참조샘플이라고 한다.In intra prediction, prediction is performed using samples that have already been reconstructed around a current block, and a surrounding sample used for intra prediction is called a reference sample.

HEVC(High Efficiency Video Coding)의 인트라 예측에 사용되는 PU(Prediction Unit)는 도 5a에 표현된 바와 같이 NxN 크기의 정사각형으로 구성된다. PU의 좌측에 위치하는 참조샘플들(좌측 참조샘플들), PU의 상측에 위치하는 참조샘플들(상측 참조샘플들) 및, PU의 좌상측에 위치하는 참조샘플(좌상측 참조샘플)이 현재블록의 인트라 예측을 위해 요구되는 참조샘플들이다.A PU (Prediction Unit) used for intra prediction of HEVC (High Efficiency Video Coding) is composed of a square having a size of NxN as shown in FIG. 5A. Reference samples located on the left side of the PU (left reference samples), reference samples located above the PU (top reference samples), and a reference sample located on the upper left side of the PU (top left reference sample) are currently These are reference samples required for intra prediction of a block.

도 5a에서, 점선의 블록은 참조샘플들을 나타내며, R0,1, R0,2, …, R0,2N은 좌측 참조샘플들을 나타내고, R0,0은 좌상측 참조샘플을 나타내며, R1,0, R2,0, …, R2N,0은 상측 참조샘플들을 나타낸다. 참조샘플들이 이와 같이 구성된 상태에서, PU의 좌하측 영역은 좌측 참조샘플들을 이용하여 예측샘플들(prediction samples or prediction pixels)의 값이 설정되며, PU의 우상측 영역은 상측 참조샘플들을 이용하여 예측샘플들의 값이 설정된다. 여기서, 좌상측 참조샘플은 두 영역(좌하측 영역 및 우상측 영역) 모두를 위한 참조샘플로 이용되거나, 이용되지 않을 수도 있다.In Fig. 5A, a dotted block represents reference samples, and R0,1, R0,2, ... , R0,2N denote left reference samples, R0,0 denote upper left reference samples, R1,0, R2,0, ... , R2N,0 denotes upper reference samples. When the reference samples are configured in this way, the values of prediction samples or prediction pixels are set in the lower left region of the PU using the left reference samples, and the upper right region of the PU is predicted using the upper reference samples. The values of the samples are set. Here, the upper left reference sample may or may not be used as a reference sample for both regions (lower left region and upper right region).

HEVC에서는 참조샘플들이 사용 가능하지 않은 경우에(또는, 존재하지 않는 경우에) 패딩을 통해 사용 가능하지 않은 참조샘플을 생성 또는 구성하여 인트라 예측을 수행한다. 참조샘플들이 사용 가능하지 않은 경우에는 참조샘플들의 일부가 사용 가능하지 않은 경우(참조샘플들의 일부가 사용 가능한 경우)와, 참조샘플들의 전부가 사용 가능하지 않은 경우가 포함될 수 있다.In HEVC, when the reference samples are not available (or do not exist), intra prediction is performed by generating or configuring a non-usable reference sample through padding. When the reference samples are not available, a case in which some of the reference samples are not available (a case in which some of the reference samples are available) and a case in which all of the reference samples are not available may be included.

참조샘플들의 전부가 사용 가능하지 않은 경우(현재블록의 경계가 픽처의 최좌상측 경계인 경우)에는 표현 가능한 비트 뎁스(BitDepthY)의 중간 값인 1<<(BitDepthY)으로 참조샘플들이 채워진다. 참조샘플들의 일부가 사용 가능하지 않은 경우에는 사용 불가능한 참조샘플의 위치로부터 가장 가까운 참조샘플(사용 가능한)의 값을 사용하여, 사용 불가능한 참조샘플이 패딩된다.When not all of the reference samples are available (when the boundary of the current block is the upper leftmost boundary of the picture), the reference samples are filled with 1<<(BitDepth Y ), which is the intermediate value of the expressible bit depth (BitDepth Y ). When some of the reference samples are not usable, the unusable reference sample is padded by using the value of the nearest reference sample (usable) from the position of the unusable reference sample.

사용 불가능한 일부 참조샘플의 값을 패딩하는 방법에 대한 일 예가 도 5b에 나타나 있다. 도 5b의 (a)와 같이, 사용 가능한 참조샘플(빗금으로 표시된 블록)인 A와 B 사이에 사용 불가능한 참조샘플들(빗금으로 표시되지 않은 블록)이 위치하는 경우, 가장 가까이 위치하는 A의 값을 화살표 방향으로 패딩하여 사용 불가능한 참조샘플들이 구성될 수 있다. 도 5b의 (b)와 같이, A의 값을 좌하단 블록으로부터 화살표 방향으로 패딩하여 A의 좌측과 좌하측에 위치하는 사용 불가능한 참조샘플들이 구성될 수 있으며, B의 값을 B의 우측 방향으로 패딩하여 B의 우측에 위치하는 사용 불가능한 참조샘플이 구성될 수 있다.An example of a method of padding the values of some unusable reference samples is shown in FIG. 5B. As shown in (a) of FIG. 5B, when unusable reference samples (blocks not indicated by shaded lines) are located between A and B, which are usable reference samples (blocks indicated by shaded lines), the value of A that is closest to Unusable reference samples may be constructed by padding in the direction of the arrow. As shown in (b) of FIG. 5B, by padding the value of A in the direction of the arrow from the lower left block, unusable reference samples located at the left and lower left of A can be constructed, and the value of B is moved to the right of B. By padding, an unusable reference sample located on the right side of B may be constructed.

한편, 현재블록이 인터 예측 모드에 해당하는 BDOF(Bi-directional optical flow)를 이용하여 예측되는 경우에도 참조샘플 패딩이 수행될 수 있다. BDOF를 위한 참조샘플 패딩 방법을 설명하기 위한 도면이 도 6에 나타나 있다.Meanwhile, even when the current block is predicted using a bi-directional optical flow (BDOF) corresponding to an inter prediction mode, reference sample padding may be performed. A diagram for explaining a reference sample padding method for BDOF is shown in FIG. 6.

현재블록을 BDOF로 예측하기 위해서는, 현재블록의 예측을 위한 참조픽처 내 참조샘플들(또는, 예측샘플들) 간의 그래디언트 값이 요구된다. 도 6에서, 실선으로 표시된 샘플들이 현재블록의 예측을 위한 참조픽처 내 참조샘플들을 나타내며, 이 참조샘플들로 구성된 블록이 현재블록에 대응되는 참조블록(또는, 예측블록)을 나타낸다. 여기서, 참조블록의 경계는 현재픽처 내 현재블록의 경계와 같이 취급될 수 있다.In order to predict the current block with BDOF, a gradient value between reference samples (or prediction samples) in a reference picture for prediction of the current block is required. In FIG. 6, samples indicated by solid lines represent reference samples in a reference picture for prediction of a current block, and a block composed of the reference samples represents a reference block (or prediction block) corresponding to the current block. Here, the boundary of the reference block may be treated like the boundary of the current block in the current picture.

참조샘플들 간의 그래디언트 값을 계산하기 위해서는, 참조블록의 경계를 벗어난 자리에 위치하는(현재블록의 경계 외부에 위치하는) 참조샘플의 값이 요구될 수 있다. 도 6에서, 점선으로 표시된 샘플들이 참조블록의 경계를 벗어난 자리에 위치하는 참조샘플(경계 외부 참조샘플)들을 나타내며, 경계 외부 참조샘플들로 이루어지는 영역은 확장된 영역으로 취급될 수 있다.In order to calculate a gradient value between reference samples, a value of a reference sample located outside the boundary of the reference block (located outside the boundary of the current block) may be required. In FIG. 6, samples indicated by dotted lines represent reference samples (border-external reference samples) positioned outside the boundary of a reference block, and an area composed of border-external reference samples may be treated as an extended area.

경계 외부 참조샘플들 중에서 사용 가능하지 않은 경계 외부 참조샘플은 주변의 정수 위치(경계 내부에 위치하는 참조샘플들 또는, 사용 가능한 참조샘플들)로부터 샘플 값을 가져오는 방법(복사하는 방법)을 통해 패딩될 수 있다. 도 6에서, 화살표는 경계 외부 참조샘플들의 패딩을 위해 주변의 정수 위치로부터 샘플 값을 복사하는 방향(패딩 방향)을 나타낸다.Boundary external reference samples that are not usable among the boundary external reference samples are obtained through a method (copying method) of obtaining a sample value from an integer location (reference samples located inside the boundary or available reference samples). Can be padded. In FIG. 6, an arrow indicates a direction (padding direction) of copying a sample value from an integer position around the boundary external reference samples for padding.

이와 같이, 종래의 인트라 예측 방법은 단순히 가장 인접하게 위치하는 사용 가능한 참조샘플의 값을 사용 불가능한 참조샘플에 그대로 채워 넣는 방식으로 패딩을 수행하며, BDOF는 단순히 주변에 위치하는 샘플 값을 경계 외부 참조샘플에 채워 넣는 방식으로 패딩을 수행하므로, 참조샘플의 구성에 대한 정확성이 저하될 수 있다.As described above, in the conventional intra prediction method, padding is performed by simply filling the value of the nearest available reference sample into the unusable reference sample, and the BDOF simply refers to the surrounding sample value outside the boundary. Since padding is performed by filling the sample, the accuracy of the configuration of the reference sample may be degraded.

본 명세서에서는 사용 가능한 참조샘플들 간의 상관관계를 이용하여 참조샘플을 더욱 정확하게 구성함으로써 종래 방법의 문제점을 해결할 수 있는 다양한 방법들이 제안된다.In the present specification, various methods that can solve the problems of the conventional method are proposed by more accurately constructing a reference sample by using a correlation between the available reference samples.

도 7에 도시된 바와 같이, 참조샘플 구성 방법을 구현할 수 있는 영상 복호화 장치는 복호화부(410), 판단부(710) 및 패딩부(720)를 포함하여 구성될 수 있다. 판단부(710)와 패딩부(720)는 예측부(440)를 구성할 수 있다. 도 7에는 판단부(710)와 패딩부(720)가 영상 복호화 장치의 예측부(440)에 포함되는 예만이 나타나 있으나, 판단부(710)와 패딩부(720)는 영상 부호화 장치의 예측부(120)에도 포함될 수 있다. 즉, 판단부(710)와 패딩부(720)에서 수행되는 이하의 과정들은 영상 복호화 장치의 예측부(440)와 영상 부호화 장치의 예측부(120) 모두에서 수행될 수 있다.As shown in FIG. 7, an image decoding apparatus capable of implementing a reference sample construction method may include a decoding unit 410, a determination unit 710, and a padding unit 720. The determination unit 710 and the padding unit 720 may constitute a prediction unit 440. 7 shows only an example in which the determination unit 710 and the padding unit 720 are included in the prediction unit 440 of the image decoding apparatus, but the determination unit 710 and the padding unit 720 are the prediction units of the image encoding apparatus. It may also be included in (120). That is, the following processes performed by the determination unit 710 and the padding unit 720 may be performed by both the prediction unit 440 of the image decoding apparatus and the prediction unit 120 of the image encoding apparatus.

판단부(710)는 현재 참조샘플의 사용 가능성 여부를 판단할 수 있다(S810).The determination unit 710 may determine whether or not the current reference sample is available (S810).

현재 참조샘플은 현재블록의 인트라 예측에 이용되는 참조샘플들 중에서 어느 하나에 해당하거나, BDOF의 경계 외부 참조샘플에 해당할 수 있다. 또한, 현재 참조샘플은 현재블록의 인트라 예측 또는 BDOF에 이용되는 참조샘플들 중에서 사용 가능성 여부의 판단 대상이 되는(구성 대상이 되는) 참조샘플에 해당할 수 있다. 따라서, 현재 참조샘플은 도 5a의 좌측 참조샘플들(R0,1, R0,2, …, R0,2N), 좌상측 참조샘플(R0,0) 및, 상측 참조샘플들(R1,0, R2,0, …, R2N,0) 중에서 어느 하나일 수 있으며, 도 6의 경계 외부 참조샘플들 중에서 어느 하나에 해당할 수 있다.The current reference sample may correspond to any one of reference samples used for intra prediction of the current block, or may correspond to a boundary external reference sample of the BDOF. In addition, the current reference sample may correspond to a reference sample that is an object of determination (to be a configuration object) of availability among reference samples used for intra prediction or BDOF of the current block. Accordingly, the current reference sample is the left reference samples R0,1, R0,2, …, R0,2N, the upper left reference sample R0,0, and the upper reference samples R1,0, R2 of FIG. 5A. ,0, ..., R2N, 0), and may correspond to any one of the border external reference samples of FIG. 6.

판단부(710)는 현재 참조샘플의 사용이 불가능한 경우에 다른 참조샘플들의 사용 가능성 여부를 판단할 수 있다(S820).When the current reference sample is not available, the determination unit 710 may determine whether other reference samples are available (S820).

다른 참조샘플들은 현재블록의 인트라 예측 또는 BDOF의 그래디언트 계산을 위한 참조샘플로서, 현재 참조샘플의 주변에 위치할 수 있다. 예를 들어, 다른 참조샘플들은 현재 참조샘플과 같은 행(row) 또는 같은 열(column)에 위치할 수 있다. 다른 참조샘플들은 현재 참조샘플로부터 연속하게 위치하거나, 연속하지 않게 위치할 수도 있다. 다른 참조샘플들은 서로 간에 이웃하거나 이웃하지 않게 위치할 수 있다.Other reference samples are reference samples for intra prediction of the current block or gradient calculation of the BDOF, and may be located around the current reference sample. For example, other reference samples may be located in the same row or column as the current reference sample. Other reference samples may be continuously located from the current reference sample or may be located non-contiguous. Other reference samples may or may not be located adjacent to each other.

사용 불가능한 현재 참조샘플이 좌측 참조샘플들에 포함되는 경우, 다른 참조샘플들은 좌측 참조샘플들에 포함된 참조샘플들일 수 있다. 사용 불가능한 현재 참조샘플이 상측 참조샘플들에 포함되는 경우, 다른 참조샘플들은 상측 참조샘플들에 포함된 참조샘플들일 수 있다. 사용 가능성 여부의 판단 대상인 다른 참조샘플들의 개수는 복수 개일 수 있다.When the currently unavailable reference sample is included in the left reference samples, other reference samples may be reference samples included in the left reference samples. When the currently unavailable reference sample is included in the upper reference samples, other reference samples may be reference samples included in the upper reference samples. The number of other reference samples to be determined whether or not the availability is available may be a plurality.

패딩부(720)는 다른 참조샘플들이 사용 가능한 경우에 다른 참조샘플들 간의 상관관계에 기초하여 현재 참조샘플을 패딩할 수 있다(S830).When other reference samples are available, the padding unit 720 may pad the current reference sample based on a correlation between the other reference samples (S830).

인접한 화소들(샘플들)은 일정한 변화량을 가질 수 있으며, 상관관계는 사용 가능한 참조샘플들(다른 참조샘플들) 간의 일정한 변화량을 의미할 수 있다. 상관관계에는 사용 가능한 참조샘플들 간의 선형관계와, 사용 가능한 참조샘플들 간의 그래디언트(gradient)가 포함될 수 있다.Adjacent pixels (samples) may have a certain amount of change, and the correlation may mean a certain amount of change between usable reference samples (other reference samples). The correlation may include a linear relationship between usable reference samples and a gradient between usable reference samples.

만약, 다른 참조샘플들이 사용 불가능한 경우에는 사용 가능한 최인접 참조샘플의 값으로 현재 참조샘플이 패딩될 수 있다.If other reference samples are not available, the current reference sample may be padded with the value of the nearest available reference sample.

참조샘플들을 구성하는 방법에 대한 일 예가 도 9에 나타나 있다.An example of a method of configuring reference samples is shown in FIG. 9.

도 9에서, 상측 참조샘플들(R1,0, R2,0, …, R2N,0) 중에서 R1,0 내지 RN,0은 사용 가능(Available reference samples)하며, RN+1,0 내지 R2N,0은 사용 불가능(Unavailable reference samples)한 것으로 가정한다. 또한, 좌측 참조샘플들(R0,1, R0,2, …, R0,2N) 중에서 R0,1 내지 R0,N은 사용 가능하며, R0,N+1 내지 R0,2N은 사용 불가능한 것으로 가정한다.In FIG. 9, among upper reference samples R1,0, R2,0, ..., R2N,0, R1,0 to RN,0 are available reference samples, and RN+1,0 to R2N,0 Is assumed to be unavailable (Unavailable reference samples). In addition, it is assumed that among the left reference samples R0,1, R0,2, …, R0,2N, R0,1 to R0,N can be used, and R0,N+1 to R0,2N cannot be used.

상측 참조샘플들을 구성하는 경우에, 현재 참조샘플(RN+1,0)이 사용 불가능하므로 다른 참조샘플들(R1,0 내지 RN,0 중에서 복수 개)에 대한 사용 가능성 여부가 판단된다. 다른 참조샘플들이 사용 가능하므로, 이 다른 참조샘플들 간의 상관관계에 기초하여 현재 참조샘플(RN+1,0)이 패딩될 수 있다. 이와 같은 과정이 반복적으로 수행되면, 사용 불가능한 상측 참조샘플들(RN+1,0 내지 R2N,0)이 생성 또는 구성될 수 있다. In the case of configuring the upper reference samples, since the current reference sample (RN+1,0) is not available, it is determined whether or not other reference samples (a plurality of R1,0 to RN,0) can be used. Since other reference samples can be used, the current reference sample RN+1,0 may be padded based on the correlation between the other reference samples. If such a process is repeatedly performed, unusable upper reference samples RN+1,0 to R2N,0 may be generated or configured.

좌측 참조샘플들을 구성하는 경우에, 현재 참조샘플(R0,N+1)이 사용 불가능하므로 다른 참조샘플들(R0,1 내지 R0,N 중에서 복수 개)에 대한 사용 가능성 여부가 판단된다. 다른 참조샘플들이 사용 가능하므로, 이 다른 참조샘플들 간의 상관관계에 기초하여 현재 참조샘플(R0,N+1)이 패딩될 수 있다. 이와 같은 과정이 반복적으로 수행되면, 사용 불가능한 좌측 참조샘플들(R0,N+1 내지 R0,2N)이 생성 또는 구성될 수 있다.When configuring the left reference samples, since the current reference samples R0 and N+1 are not available, it is determined whether or not other reference samples (a plurality of R0,1 to R0,N) can be used. Since other reference samples can be used, the current reference samples R0 and N+1 may be padded based on the correlation between the other reference samples. When such a process is repeatedly performed, unusable left reference samples R0,N+1 to R0,2N may be generated or configured.

본 발명에서 제안하는 실시예들은 크게 1) 선형관계에 기반한 패딩 방법, 2) 그래디언트에 기반한 패딩 방법, 3) 패딩 방법의 선택에 대한 정보를 전송하기 위한 신택스들의 구성 방법 및, 4) 참조샘플들의 전부가 사용 불가능한 경우에 대한 패딩 방법들로 나뉘어질 수 있다. 이하에서는, 각 방법들에 대한 실시예들에 대해 구체적으로 설명하도록 한다.Embodiments proposed in the present invention are largely 1) a padding method based on a linear relationship, 2) a padding method based on a gradient, 3) a method of constructing syntax for transmitting information on selection of a padding method, and 4) reference samples. It can be divided into padding methods for cases where all of them are unavailable. Hereinafter, embodiments for each method will be described in detail.

실시예 1Example 1

실시예 1은 참조샘플들 간의 상관관계에 기초하여 현재 참조샘플을 구성하는 방법이다. 실시예 1은 상관관계로 이용되는 파라미터의 종류에 따라 아래와 같은 하위 실시예들로 구분될 수 있다.Embodiment 1 is a method of constructing a current reference sample based on a correlation between reference samples. Embodiment 1 may be classified into the following sub-embodiments according to the type of parameter used as a correlation.

실시예 1-1Example 1-1

실시예 1-1에서는 다른 참조샘플들 간의 선형관계가 상관관계로 이용된다. 실시예 1-1에서 이용되는 다른 참조샘플들의 개수는 최소 3개일 수 있다.In Example 1-1, a linear relationship between different reference samples is used as a correlation. The number of other reference samples used in Example 1-1 may be at least three.

판단부(710)는 구성 대상에 해당하는 현재 참조샘플을 확인하고(S1010), 현재 참조샘플이 사용 가능한지 여부를 판단할 수 있다(S1020).The determination unit 710 may check the current reference sample corresponding to the configuration target (S1010) and determine whether the current reference sample is available (S1020).

현재 참조샘플이 사용 가능한 경우에는 다음 참조샘플로 이동한 후(S1030), 이 다음 참조샘플을 새로운 현재 참조샘플로 하여 구성 과정이 수행되게 된다. 현재 참조샘플이 사용 불가능한 경우에는 다른 참조샘플들의 사용 가능성 여부에 따라 선형관계에 기초한 패딩 과정 또는 최인접 참조샘플 값을 이용한 패딩 과정이 수행되게 된다.If the current reference sample is available, after moving to the next reference sample (S1030), the next reference sample is used as a new current reference sample to perform a configuration process. If the current reference sample is not available, a padding process based on a linear relationship or a padding process using the nearest reference sample value is performed according to availability of other reference samples.

구체적으로, 판단부(710)는 현재 참조샘플이 사용 불가능한 경우에 다른 참조샘플들의 사용 가능성 여부를 판단할 수 있다(S1040). 패딩부(720)는 다른 참조샘플들이 사용 불가능한 경우에 사용 가능한 최인접 참조샘플의 값으로 현재 참조샘플을 패딩하여(사용 가능한 최인접 참조샘플의 값을 현재 참조샘플로 복사) 현재 참조샘플을 구성할 수 있다(S1060). 이와 달리, 패딩부(720)는 다른 참조샘플들이 사용 가능한 경우에 다른 참조샘플들 간의 선형관계로부터 도출되는 값(선형관계 값)을 이용하여 현재 참조샘플을 패딩할 수 있다(S1050).Specifically, when the current reference sample is not available, the determination unit 710 may determine whether other reference samples are available (S1040). The padding unit 720 pads the current reference sample with the value of the nearest reference sample that can be used when other reference samples are not available (copying the value of the available nearest reference sample to the current reference sample) to configure the current reference sample. It can be done (S1060). In contrast, when other reference samples are available, the padding unit 720 may pad the current reference sample using a value (linear relationship value) derived from a linear relationship between other reference samples (S1050).

다른 참조샘플들 간의 선형관계는 수학식 1과 같은 1차 방정식으로 나타낼 수 있다.The linear relationship between different reference samples can be expressed by a linear equation such as Equation 1.

Figure pat00001
Figure pat00001

수학식 1에서, X와 Y 각각은 참조샘플을 나타내고, a와 b 각각은 기울기와 절편을 나타낸다.In Equation 1, each of X and Y represents a reference sample, and each of a and b represents a slope and an intercept.

상측 참조샘플들의 경우, 다른 참조샘플들 중 N번째 다른 참조샘플(RN,0)과 N-1번째 다른 참조샘플(RN-1,0)을 수학식 1에 적용한 결과는 수학식 2와 같으며, N-1번째 다른 참조샘플과 N-2번째 다른 참조샘플(RN-2,0)을 수학식 1에 적용한 결과는 수학식 3과 같다.In the case of upper reference samples, the result of applying the N-th other reference sample (R N,0 ) and the N-1-th other reference sample (R N-1,0) to Equation 1 among other reference samples is shown in Equation 2 It is the same, and the result of applying the N-1th other reference sample and the N-2th other reference sample (R N-2,0) to Equation 1 is as Equation 3.

Figure pat00002
Figure pat00002

Figure pat00003
Figure pat00003

수학식 3을 이용하여 b를 유도하면 수학식 4와 같으며, 수학식 4를 수학식 1에 대입하면 수학식 5와 같고, 수학식 5를 통해 a를 유도하면 수학식 6과 같으며, 수학식 6의 a를 수학식 2에 대입하여 b를 다시 유도하면 수학식 7과 같다.If b is derived using Equation 3, it is the same as Equation 4, and if Equation 4 is substituted into Equation 1, it is the same as Equation 5, and if a is derived through Equation 5, it is the same as Equation 6, and Substituting a in Equation 6 into Equation 2 to induce b again is equivalent to Equation 7.

Figure pat00004
Figure pat00004

Figure pat00005
Figure pat00005

Figure pat00006
Figure pat00006

Figure pat00007
Figure pat00007

1차 방정식(선형관계)의 기울기와 절편이 유도되었으므로, N번째 다른 참조샘플을 1차 방정식에 대입하여(X에 대입) 도출되는 값(Y)으로 현재 참조샘플(RN+1,0)이 패딩될 수 있다. Since the slope and intercept of the linear equation (linear relationship) are derived, the current reference sample (R N+1,0 ) is the value (Y) derived by substituting the Nth other reference sample into the linear equation (substituting it for X). It can be padded.

이와 같은 과정들이 반복적으로 수행되면, 사용 불가능한 현재 참조샘플들(RN+1,0 내지 R2N,0 또는, R0,N+1 내지 R0,2N)이 모두 생성 또는 구성될 수 있다.If such processes are repeatedly performed, all currently unavailable reference samples (R N+1,0 to R 2N,0 or R 0,N+1 to R 0,2N ) may be generated or configured.

이상에서는 서로 연속하여 위치하는 다른 참조샘플들(RN,0 내지 RN-2,0 또는, R0,N 내지 R0,N-2)을 이용하여 현재 참조샘플을 패딩하는 방법을 기준으로 실시예 1-1에 대해 설명하였으나, 다른 참조샘플들은 서로 연속하지 않게 위치할 수도 있다.In the above, based on the method of padding the current reference sample using other reference samples (R N,0 to R N-2,0 or R 0,N to R 0,N-2 ) that are located in succession with each other. Although Example 1-1 has been described, other reference samples may be positioned not to be continuous with each other.

실시예 1-2Example 1-2

실시예 1-2에서는 다른 참조샘플들 간의 그래디언트가 상관관계로 이용된다. 실시예 1-2에서 이용되는 다른 참조샘플들의 개수는 최소 2개일 수 있다.In Example 1-2, gradients between different reference samples are used as correlations. The number of other reference samples used in Example 1-2 may be at least two.

판단부(710)는 구성 대상에 해당하는 현재 참조샘플을 확인하고(S1110), 현재 참조샘플이 사용 가능한지 여부를 판단할 수 있다(S1120).The determination unit 710 may check the current reference sample corresponding to the configuration target (S1110) and determine whether the current reference sample is available (S1120).

현재 참조샘플이 사용 가능한 경우에는 다음 참조샘플로 이동한 후(S1130) 이 다음 참조샘플을 새로운 현재 참조샘플로 하여 구성 과정이 수행되게 된다. 현재 참조샘플이 사용 불가능한 경우에는 다른 참조샘플들의 사용 가능성 여부에 따라 그래디언트에 기초한 패딩 과정 또는 최인접 참조샘플 값을 이용한 패딩 과정이 수행되게 된다.If the current reference sample is available, after moving to the next reference sample (S1130), the next reference sample is used as a new current reference sample to perform a configuration process. If the current reference sample is not available, a padding process based on a gradient or a padding process using the nearest reference sample value is performed depending on whether other reference samples are available.

구체적으로, 판단부(710)는 현재 참조샘플이 사용 불가능한 경우에 다른 참조샘플들의 사용 가능성 여부를 판단할 수 있다(S1140). 패딩부(720)는 다른 참조샘플들이 사용 불가능한 경우에 사용 가능한 최인접 참조샘플의 값으로 현재 참조샘플을 패딩하여(사용 가능한 최인접 참조샘플의 값을 현재 참조샘플로 복사) 현재 참조샘플을 구성할 수 있다(S1160). 이와 달리, 패딩부(720)는 다른 참조샘플들이 사용 가능한 경우에, 다른 참조샘플들 간의 그래디언트 값을 평균한 값에 현재 참조샘플에 이웃하는 다른 참조샘플의 값을 합산한 값(그래디언트 관계 값)을 이용하여 현재 참조샘플을 패딩할 수 있다(S1150).Specifically, when the current reference sample is not available, the determination unit 710 may determine whether other reference samples are available (S1140). The padding unit 720 pads the current reference sample with the value of the nearest reference sample that can be used when other reference samples are not available (copying the value of the available nearest reference sample to the current reference sample) to configure the current reference sample. It can be done (S1160). In contrast, when other reference samples are available, the padding unit 720 is a value obtained by summing the value of the average of the gradient values between the other reference samples and the values of other reference samples adjacent to the current reference sample (gradient relationship value). The current reference sample may be padded by using (S1150).

S1150 과정은 수학식 8에 의해 수행될 수 있다.The S1150 process may be performed by Equation 8.

Figure pat00008
Figure pat00008

수학식 8에서, RN+1,0은 현재 참조샘플을 나타내며, RN,0은 현재 참조샘플에 이웃하는 다른 참조샘플을 나타내고,

Figure pat00009
은 다른 참조샘플들 간의 그래디언트 값을 평균한 값을 나타낸다. 또한, W는 현재 참조샘플의 구성을 위해 이용되는 다른 참조샘플들의 수를 나타낸다. In Equation 8, R N+1,0 represents a current reference sample, R N,0 represents another reference sample neighboring the current reference sample,
Figure pat00009
Represents the average of the gradient values between different reference samples. In addition, W represents the number of other reference samples used to construct the current reference sample.

이와 같은 과정들이 반복적으로 수행되면, 사용 불가능한 현재 참조샘플들(RN+1,0 내지 R2N,0 또는, R0,N+1 내지 R0,2N)이 모두 생성 또는 구성될 수 있다.If such processes are repeatedly performed, all currently unavailable reference samples (R N+1,0 to R 2N,0 or R 0,N+1 to R 0,2N ) may be generated or configured.

이상에서는 서로 연속하여 위치하는 다른 참조샘플들(RN,0 및 RN-1,0 또는, R0,N 및 R0,N-1)을 이용하여 현재 참조샘플을 패딩하는 방법을 기준으로 실시예 1-2에 대해 설명하였으나, 다른 참조샘플들은 서로 연속하지 않게 위치할 수도 있다.In the above, based on the method of padding the current reference sample using other reference samples (R N,0 and R N-1,0 or R 0,N and R 0,N-1 ) located in succession with each other. Although Example 1-2 has been described, other reference samples may be positioned not to be continuous with each other.

실시예 1-3Example 1-3

실시예 1-3은 실시예 1-1과 실시예 1-2가 결합된 방법이다.Example 1-3 is a method in which Example 1-1 and Example 1-2 are combined.

앞서 설명된 바와 같이, 선형관계에 기초하여 현재 참조샘플을 패딩하는 방법(실시예 1-1)은 최소 3개의 다른 참조샘플들을 이용하며, 그래디언트에 기초하여 현재 참조샘플을 패딩하는 방법(실시예 1-2)은 최소 2개의 다른 참조샘플들을 이용할 수 있다. 실시예 1-3은 이와 같은 차이점을 기반으로 실시예 1-1과 실시예 1-2를 구분하도록 구성될 수 있다. As described above, a method of padding a current reference sample based on a linear relationship (Example 1-1) uses at least three different reference samples, and a method of padding the current reference sample based on a gradient (Example 1-2) can use at least two different reference samples. Embodiment 1-3 may be configured to distinguish between Embodiment 1-1 and Embodiment 1-2 based on such differences.

판단부(710)는 현재 참조샘플을 확인하고(S1210), 현재 참조샘플이 사용 가능하지 여부를 판단할 수 있다(S1220). 현재 참조샘플이 사용 가능한 경우에는 다음 참조샘플로 이동된 후(S1230) 이 다음 참조샘플을 새로운 현재 참조샘플로 하여 구성 과정이 수행되게 된다. The determination unit 710 may check the current reference sample (S1210) and determine whether the current reference sample is available (S1220). If the current reference sample is available, the next reference sample is moved to the next reference sample (S1230), and then the next reference sample is used as a new current reference sample to perform a configuration process.

판단부(710)는 현재 참조샘플이 사용 불가능한 경우에 최소 3개의 다른 참조샘플들의 사용 가능성 여부(사용 가능한 다른 참조샘플들의 개수가 최소 3개인지 여부)를 판단할 수 있다(S1240). 사용 가능한 다른 참조샘플들의 개수가 최소 3개인 경우, 패딩부(720)는 다른 참조샘플들 간의 선형관계로부터 도출되는 값(선형관계 값)으로 현재 참조샘플을 패딩할 수 있다(S1250). 이와 달리, 사용 가능한 다른 참조샘플들의 개수가 3개 미만인 경우에는 아래와 같이 그래디언트에 기초한 패딩 방법의 적용 여부가 판단될 수 있다.When the current reference sample is not available, the determination unit 710 may determine whether at least three other reference samples are available (whether the number of available other reference samples is at least three) (S1240). When the number of available other reference samples is at least three, the padding unit 720 may pad the current reference sample with a value (linear relationship value) derived from a linear relationship between the other reference samples (S1250). In contrast, when the number of available other reference samples is less than three, it may be determined whether to apply a padding method based on a gradient as follows.

판단부(710)는 사용 가능한 다른 참조샘플들의 개수가 2개인지 여부를 판단할 수 있다(S1260). 사용 가능한 다른 참조샘플들의 개수가 2개인 경우, 패딩부(720)는 다른 참조샘플들 간의 그래디언트 값을 평균한 값에 현재 참조샘플에 이웃하는 다른 참조샘플의 값을 합산한 값으로 현재 참조샘플을 패딩할 수 있다(S1270).The determination unit 710 may determine whether the number of available other reference samples is two (S1260). When the number of available other reference samples is two, the padding unit 720 calculates the current reference sample as a value obtained by summing the value of the average of the gradient values between the other reference samples and the values of other reference samples adjacent to the current reference sample. It can be padded (S1270).

이와 달리, 사용 가능한 다른 참조샘플들의 개수가 2개 미만인 경우에는 사용 가능한 최인접 참조샘플의 값으로 현재 참조샘플을 패딩하여 현재 참조샘플이 구성될 수 있다(S1280).In contrast, when the number of available other reference samples is less than two, the current reference sample may be configured by padding the current reference sample with the value of the nearest available reference sample (S1280).

실시예 1-4Example 1-4

실시예 1-4는 선형관계에 기초한 패딩 방법, 그래디언트에 기초한 패딩 방법 및, 최인접 참조샘플 값에 기초한 패딩 방법들을 비교하여, 위 세 가지 방법들 중에서 어느 하나의 방법(최적의 방법)을 선택하는 실시예이다.Example 1-4 compares the padding method based on a linear relationship, a padding method based on a gradient, and the padding method based on the nearest reference sample value, and selects one of the three methods (the optimal method). This is an example.

영상 부호화/복호화 장치는 현재 참조샘플이 사용 불가능한 경우에, 선형관계에 기반한 패딩, 그래디언트에 기반한 패딩 및, 최인접 참조샘플의 값에 기반한 패딩을 각각 수행하고, 각 과정들로부터 도출되는 값을 비교하여 이들 중에서 어느 하나의 값으로 현재 참조샘플을 패딩할 수 있다.When the current reference sample is not available, the video encoding/decoding apparatus performs padding based on a linear relationship, padding based on a gradient, and padding based on the value of the nearest reference sample, respectively, and compares values derived from each process. Thus, the current reference sample can be padded with any one of these values.

선형관계에 기반하여 도출되는 값, 그래디언트에 기반하여 도출되는 값 및, 최인접 참조샘플의 값에 기반하여 도출되는 값들 간의 비교 기준은, 각각의 값들을 이용하여 얻어진 예측 픽셀과 원본 픽셀 사이의 SAD이다. 구체적으로, 각 과정들로부터 도출되는 값들 중에서, 가장 작은 SAD를 가지는 값에 기반하여 현재 참조샘플이 패딩될 수 있다.The comparison standard between the values derived based on the linear relationship, the values derived based on the gradient, and the values derived based on the value of the nearest reference sample is the SAD between the predicted pixel obtained using each value and the original pixel. to be. Specifically, the current reference sample may be padded based on a value having the smallest SAD among values derived from each of the processes.

한편, 이상에서 설명된 실시예들은 인에이블(enabled) 플래그에 의해 인에이블 여부가 결정될 수 있다.Meanwhile, in the embodiments described above, whether to be enabled may be determined by an enable flag.

영상 부호화 장치는 최인접 참조샘플의 값에 기반한 패딩 방법만이 허용되는 경우에 인에이블 플래그의 값을 “0”으로 설정하여 시그널링할 수 있다. 또한, 영상 부호화 장치는 상관관계에 기반한 패딩 방법도 허용되는 경우에 인에이블 플래그의 값을 “1”로 설정하여 시그널링할 수 있다.When only the padding method based on the value of the nearest reference sample is allowed, the video encoding apparatus may signal by setting the value of the enable flag to “0”. In addition, when a padding method based on a correlation is also allowed, the video encoding apparatus may signal by setting the value of the enable flag to “1”.

인에이블 플래그는 VPS(Video Parameter Set), SPS(Sequence Parameter Set), PPS(Picture Parameter Set), Slice header, CTU(Coding Tree Unit) 중 어느 하나의 위치에서 정의되어 시그널링될 수 있다. Slice header에서 정의되어 시그널링되는 인에이블 플래그(multi_padding_enabled_flag)에 대한 일 예가 표 1에 나타나 있다.The enable flag may be defined and signaled at one of a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, and a coding tree unit (CTU). Table 1 shows an example of the enable flag (multi_padding_enabled_flag) defined and signaled in the Slice header.

Figure pat00010
Figure pat00010

영상 복호화 장치는 multi_padding_enabled_flag를 비트스트림으로부터 복호화하고, multi_padding_enabled_flag이 지시하는 바에 따라 패딩 방법의 인에이블 여부를 판단할 수 있다.The video decoding apparatus may decode multi_padding_enabled_flag from the bitstream and determine whether to enable the padding method according to the indication of the multi_padding_enabled_flag.

예를 들어, multi_padding_enabled_flag=0인 경우에는 최인접 참조샘플의 값에 기반한 패딩 방법만이 인에이블되며, multi_padding_enabled_flag=1인 경우에는 최인접 참조샘플의 값에 기반한 패딩 방법, 상관관계(선형관계 및 그래디언트)에 기반한 패딩 방법이 모두 인에이블될 수 있다.For example, when multi_padding_enabled_flag=0, only the padding method based on the value of the nearest reference sample is enabled, and when multi_padding_enabled_flag=1, the padding method based on the value of the nearest reference sample, correlation (linear relationship and gradient )-Based padding methods can all be enabled.

실시예 2Example 2

실시예 2는 패딩 방법의 선택에 대한 정보를 시그널링하기 위한 신택스들의 구성 방법이다.Embodiment 2 is a method of constructing syntaxes for signaling information on selection of a padding method.

영상 부호화 장치는 현재 참조샘플을 구성하기 위해 사용된 패딩 방법에 대한 정보를 신택스(패딩 모드 신택스)의 값으로 설정하여 영상 복호화 장치로 시그널링할 수 있다.The image encoding apparatus may signal to the image decoding apparatus by setting information on the padding method used to configure the current reference sample as a value of a syntax (padding mode syntax).

패딩 모드 신택스(padding_mode_flag)에 대한 일 예가 표 2에 나타나 있다.Table 2 shows an example of the padding mode syntax (padding_mode_flag).

Figure pat00011
Figure pat00011

padding_mode_flag는 1차 플래그(first)와 2차 플래그(second)로 구분될 수 있다. 1차 플래그는 최인접 참조샘플의 값에 기반한 패딩 방법(Copy the nearest available reference sample)의 적용 여부(또는, 상관관계에 기반한 패딩 방법의 적용 여부)를 지시할 수 있으며, 2차 플래그는 선형관계에 기반한 패딩 방법(Padding method based on the linear equation)과 그래디언트에 기반한 패딩 방법(Padding method based on gradients) 중에서 어느 하나의 적용 여부를 지시할 수 있다.The padding_mode_flag may be divided into a first flag (first) and a second flag (second). The first flag can indicate whether to apply the copy the nearest available reference sample (or whether to apply the padding method based on correlation), and the second flag is a linear relationship. Whether to apply any one of a padding method based on the linear equation and a padding method based on gradients may be indicated.

1차 플래그=0은 최인접 참조샘플의 값에 기반한 패딩 방법이 적용됨을 지시하며, 1차 플래그=1은 최인접 참조샘플의 값에 기반한 패딩 방법이 적용되지 않음(상관관계에 기반한 패딩 방법이 적용됨)을 지시할 수 있다. 2차 플래그=0은 선형관계에 기반한 패딩 방법이 적용됨을 지시하며, 2차 플래그=1은 그래디언트에 기반한 패딩 방법이 적용됨을 지시할 수 있다.The first flag = 0 indicates that the padding method based on the value of the nearest reference sample is applied, and the first flag = 1 indicates that the padding method based on the value of the nearest reference sample is not applied. Applicable). The second flag = 0 may indicate that the padding method based on the linear relationship is applied, and the second flag = 1 may indicate that the padding method based on the gradient is applied.

최인접 참조샘플의 값에 기반한 패딩 방법이 적용된 경우에는 “0” 값으로 설정된 1차 플래그가 시그널링될 수 있다. 선형관계에 기반한 패딩 방법이 적용된 경우에는 “1” 값으로 설정된 1차 플래그와 “0” 값으로 설정된 2차 플래그가 시그널링될 수 있다. 그래디언트에 기반한 패딩 방법이 적용된 경우에는 “1” 값으로 설정된 1차 플래그와 “1” 값으로 설정된 2차 플래그가 시그널링될 수 있다. When the padding method based on the value of the nearest reference sample is applied, a primary flag set to a value of “0” may be signaled. When a padding method based on a linear relationship is applied, a primary flag set to a value of “1” and a secondary flag set to a value of “0” may be signaled. When a padding method based on a gradient is applied, a primary flag set to a value of “1” and a secondary flag set to a value of “1” may be signaled.

영상 복호화 장치(복호화부)는 1차 플래그를 비트스트림으로부터 복호화하여(S1310) 상관관계에 기반한 패딩 방법의 적용 여부를 판단할 수 있다(S1320). 1차 플래그=0인 경우에는 최인접 참조샘플의 값에 기반한 패딩 방법이 수행될 수 있다(S1330).The image decoding apparatus (decoder) may determine whether to apply the padding method based on the correlation by decoding the primary flag from the bitstream (S1310) (S1320). When the first flag = 0, a padding method based on the value of the nearest reference sample may be performed (S1330).

영상 복호화 장치는 1차 플래그=1인 경우에 2차 플래그를 비트스트림으로부터 복호화하여(S1340) 선형관계에 기반한 패딩 방법과 그래디언트에 기반한 패딩 방법 중에서 어느 하나의 적용 여부를 판단할 수 있다(S1350). 2차 플래그=0인 경우에 선형관계에 기반한 패딩 방법이 수행되며(S1370), 2차 플래그=1인 경우에는 그래디언트에 기반한 패딩 방법이 수행될 수 있다(S1350).When the first flag = 1, the video decoding apparatus may decode the second flag from the bitstream (S1340) and determine whether to apply any one of a padding method based on a linear relationship and a padding method based on a gradient (S1350). . When the second flag = 0, a padding method based on a linear relationship may be performed (S1370), and if the second flag = 1, a padding method based on a gradient may be performed (S1350).

실시예 3Example 3

실시예 3은 사용 가능한 참조샘플들이 존재하지 않는 경우에 현재 참조샘플을 패딩하는 방법이다.Embodiment 3 is a method of padding a current reference sample when there are no available reference samples.

HEVC에서는 참조샘플들이 존재하지 않는 경우에 표현 가능한 비트 뎁스의 중간 값인 1<<(BitDepthY)으로 참조샘플들이 채워진다. 이러한 종래 방법은 해당 영상 또는 블록의 밝기 값에 따라서 부정확한 결과를 발생시킬 수 있다. 본 발명에서는 1/2 밝기 값(제1패딩 값), 1/4 밝기 값(제2패딩 값) 및 3/4 밝기 값(제3패딩 값) 중에서 어느 하나를 선택적으로 시그널링함으로써 부호화/복호화 성능을 향상시키는 방법을 제안한다.In HEVC, reference samples are filled with 1<<(BitDepth Y ), which is an intermediate value of a bit depth that can be expressed when there are no reference samples. Such a conventional method may generate inaccurate results according to the brightness value of a corresponding image or block. In the present invention, encoding/decoding performance is performed by selectively signaling any one of 1/2 brightness value (first padding value), 1/4 brightness value (second padding value), and 3/4 brightness value (third padding value). Suggest a way to improve.

영상 부호화 장치는 모든 참조샘플들이 존재하지 않는 경우에(사용 가능하지 않은 경우) 제1패딩 값, 제2패딩 값 및 제3패딩 값 중에서 어느 하나를 패딩 값으로 하여 영상 복호화 장치로 시그널링할 수 있다. 영상 복호화 장치는 패딩 값을 복호화하고, 복호화된 패딩 값에 기초하여 현재 참조샘플을 패딩할 수 있다.When all the reference samples do not exist (if not available), the video encoding apparatus may signal to the video decoding apparatus using any one of a first padding value, a second padding value, and a third padding value as a padding value. . The image decoding apparatus may decode the padding value and pad the current reference sample based on the decoded padding value.

제1패딩 값, 제2패딩 값 및 제3패딩 값 중에서 시그널링되는 패딩 값에 포함되는 값은 패딩정보에 의해 지시될 수 있다. 패딩정보는 VPS(Video Parameter Set), SPS(Sequence Parameter Set), PPS(Picture Parameter Set), Slice header, CTU(Coding Tree Unit) 중 하나 이상의 위치에서 정의되어 시그널링될 수 있다. 패딩정보(padding_value_flag)에 대한 일 예가 표 3에 나타나 있다.A value included in the signaled padding value among the first padding value, the second padding value, and the third padding value may be indicated by the padding information. The padding information may be defined and signaled at one or more positions of a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, and a coding tree unit (CTU). Table 3 shows an example of padding information (padding_value_flag).

Figure pat00012
Figure pat00012

padding_value_flag는 3차 플래그(third)와 4차 플래그(fourth)로 구분될 수 있다. 3차 플래그는 제1패딩 값이 포함되는지 여부를 나타내며, 4차 플래그는 제2패딩 값 및 제3패딩 값 중에서 패딩 값에 포함되는 값을 나타낼 수 있다.The padding_value_flag may be divided into a third flag and a fourth flag. The third flag indicates whether the first padding value is included, and the fourth flag may indicate a value included in the padding value among the second padding value and the third padding value.

3차 플래그=0은 제1패딩 값이 포함됨을 지시하며, 3차 플래그=1은 제1패딩 값이 포함되지 않음(제2패딩 값 및 제3패딩 값 중에서 어느 하나가 포함됨)을 지시할 수 있다. 4차 플래그=0은 제2패딩 값이 포함됨을 지시하며, 4차 플래그=1은 제3패딩 값이 포함됨을 지시할 수 있다.The third flag = 0 indicates that the first padding value is included, and the third flag = 1 indicates that the first padding value is not included (any one of the second padding value and the third padding value is included). have. The fourth flag = 0 may indicate that the second padding value is included, and the fourth flag = 1 may indicate that the third padding value is included.

제1패딩 값이 포함된 경우에는 “0” 값으로 설정된 3차 플래그가 시그널링될 수 있다. 제2패딩 값이 포함된 경우에는 “1” 값으로 설정된 3차 플래그와 “0” 값으로 설정된 4차 플래그가 시그널링될 수 있다. 제3패딩 값이 포함된 경우에는 “1” 값으로 설정된 3차 플래그와 “1” 값으로 설정된 4차 플래그가 시그널링될 수 있다.When the first padding value is included, a third flag set to a value of “0” may be signaled. When the second padding value is included, a third flag set to a value of “1” and a fourth flag set to a value of “0” may be signaled. When the third padding value is included, a third flag set to a value of "1" and a fourth flag set to a value of "1" may be signaled.

영상 복호화 장치는 3차 플래그를 비트스트림으로부터 복호화하여(S1410) 제1패딩 값의 포함 여부를 판단할 수 있다(S1420). 3차 플래그=0인 경우에는 제1패딩 값이 복호화될 수 있다(S1430).The image decoding apparatus may determine whether the first padding value is included by decoding the third flag from the bitstream (S1410) (S1420). When the third flag = 0, the first padding value may be decoded (S1430).

영상 복호화 장치는 3차 플래그=1인 경우에 4차 플래그를 비트스트림으로부터 복호화하여(S1440) 제2패딩 값 및 제3패딩 값 중에서 어느 하나의 포함 여부를 판단할 수 있다(S1450). 4차 플래그=0인 경우에 제2패딩 값이 복호화되며(S1470), 4차 플래그=1인 경우에는 제3패딩 값이 복호화될 수 있다(S1460).When the third flag = 1, the image decoding apparatus may decode the fourth flag from the bitstream (S1440) to determine whether any one of the second padding value and the third padding value is included (S1450). If the fourth flag = 0, the second padding value may be decoded (S1470), and if the fourth flag = 1, the third padding value may be decoded (S1460).

이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present embodiment, and those of ordinary skill in the technical field to which the present embodiment pertains 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 to explain the technical idea, and the scope of the technical idea of the present embodiment is not limited by these embodiments. The scope of protection of this embodiment should be interpreted by the following claims, and all technical ideas within the scope equivalent thereto should be construed as being included in the scope of the present embodiment.

120, 440: 예측부 130: 감산기
170, 450: 가산기 180, 460: 필터부
120, 440: prediction unit 130: subtractor
170, 450: adder 180, 460: filter unit

Claims (14)

현재블록의 예측에 이용되는 참조샘플들을 구성하는 방법으로서,
구성 대상인 현재 참조샘플의 사용 가능성 여부를 판단하는 단계;
상기 현재 참조샘플이 사용 가능하지 않은 경우, 상기 현재 참조샘플의 주변에 위치하는 다른 참조샘플들의 사용 가능성 여부를 판단하는 단계; 및
상기 다른 참조샘플들이 사용 가능한 경우, 상기 다른 참조샘플들 간의 상관관계에 기초하여, 상기 현재 참조샘플을 패딩(padding)하는 단계를 포함하는, 참조샘플 구성 방법.
As a method of constructing reference samples used for prediction of a current block,
Determining whether or not a current reference sample to be configured is available;
If the current reference sample is not available, determining whether other reference samples located around the current reference sample are available; And
And if the other reference samples are available, padding the current reference sample based on a correlation between the other reference samples.
제1항에 있어서,
상기 상관관계는,
상기 다른 참조샘플들 간의 선형관계이며,
상기 패딩하는 단계는,
상기 다른 참조샘플들 간의 선형관계로부터 도출되는 선형관계 값을 이용하여, 상기 현재 참조샘플을 패딩하는, 참조샘플 구성 방법.
The method of claim 1,
The correlation is,
Is a linear relationship between the other reference samples,
The padding step,
The reference sample construction method of padding the current reference sample by using a linear relationship value derived from a linear relationship between the other reference samples.
제2항에 있어서,
상기 상관관계에 기초한 패딩의 적용 여부를 지시하는 제1플래그를 비트스트림으로부터 복호화하고, 상기 제1플래그가 상기 상관관계에 기초한 패딩이 적용됨을 지시하는 경우에 상기 선형관계에 기초한 패딩의 적용 여부를 지시하는 제2플래그를 상기 비트스트림으로부터 복호화하는 단계를 더 포함하고,
상기 패딩하는 단계는,
상기 제2플래그가 상기 선형관계에 기초한 패딩이 적용됨을 지시하는 경우에, 상기 선형관계 값을 이용하여 상기 현재 참조샘플을 패딩하는, 참조샘플 구성 방법.
The method of claim 2,
When the first flag indicating whether padding based on the correlation is applied or not is decoded from the bitstream, and when the first flag indicates that padding based on the correlation is applied, whether or not padding based on the linear relationship is applied is determined. Further comprising the step of decoding the indicated second flag from the bitstream,
The padding step,
When the second flag indicates that the padding based on the linear relationship is applied, the current reference sample is padded by using the linear relationship value.
제1항에 있어서,
상기 상관관계는,
상기 다른 참조샘플들 간의 그래디언트(gradient)이며,
상기 패딩하는 단계는,
상기 다른 참조샘플들 간의 그래디언트 값들을 평균한 값에, 상기 다른 참조샘플들 중에서 상기 현재 참조샘플에 이웃하는 다른 참조샘플의 값을 합산한 그래디언트 관계 값을 이용하여, 상기 현재 참조샘플을 패딩하는, 참조샘플 구성 방법.
The method of claim 1,
The correlation is,
It is a gradient between the different reference samples,
The padding step,
Padding the current reference sample by using a gradient relationship value obtained by summing a value obtained by averaging gradient values between the other reference samples and a value of another reference sample neighboring the current reference sample among the other reference samples, How to construct a reference sample.
제4항에 있어서,
상기 상관관계에 기초한 패딩의 적용 여부를 지시하는 제1플래그를 비트스트림으로부터 복호화하고, 상기 제1플래그가 상기 상관관계에 기초한 패딩이 적용됨을 지시하는 경우에 상기 그래디언트에 기초한 패딩의 적용 여부를 지시하는 제2플래그를 상기 비트스트림으로부터 복호화하는 단계를 더 포함하고,
상기 패딩하는 단계는,
상기 제2플래그가 상기 그래디언트에 기초한 패딩이 적용됨을 지시하는 경우에 상기 그래디언트 관계 값을 이용하여 상기 현재 참조샘플을 패딩하는, 참조샘플 구성 방법.
The method of claim 4,
When the first flag indicating whether padding based on the correlation is applied or not is decoded from the bitstream, and when the first flag indicates that the padding based on the correlation is applied, indicating whether to apply the padding based on the gradient Further comprising the step of decoding the second flag to be performed from the bitstream,
The padding step,
When the second flag indicates that padding based on the gradient is applied, the current reference sample is padded by using the gradient relationship value.
제1항에 있어서,
상기 현재블록의 예측에 이용되는 참조샘플들이 사용 가능하지 않은 경우, 비트스트림으로부터 패딩 값을 복호화하는 단계를 더 포함하고,
상기 패딩하는 단계는,
상기 다른 참조샘플들이 사용 가능하지 않은 경우, 상기 복호화된 패딩 값에 기초하여, 상기 현재 참조샘플을 패딩하는, 참조샘플 구성 방법.
The method of claim 1,
If reference samples used for prediction of the current block are not available, decoding a padding value from the bitstream,
The padding step,
When the other reference samples are not available, the current reference sample is padded based on the decoded padding value.
제6항에 있어서,
상기 패딩 값은
표현 가능한 비트 뎁스의 1/2인 제1패딩 값, 상기 표현 가능한 비트 뎁스의 1/4인 제2패딩 값 및, 상기 표현 가능한 비트 뎁스의 3/4인 제3패딩 값 중에서 어느 하나를 포함하고,
상기 복호화하는 단계는,
상기 제1패딩 값의 포함 여부를 지시하는 제3플래그를 복호화하는 단계;
상기 제3플래그가 상기 제1패딩 값이 포함되지 않음을 지시하는 경우에, 상기 제2패딩 값 및 상기 제3패딩 값 중에서 어느 하나의 포함 여부를 지시하는 제4플래그를 복호화하는 단계; 및
상기 제4플래그가 지시하는 바에 따라, 상기 제2패딩 값 및 상기 제3패딩 값 중에서 어느 하나를 복호화하는 단계를 포함하는, 참조샘플 구성 방법.
The method of claim 6,
The padding value is
Including any one of a first padding value that is 1/2 of the representable bit depth, a second padding value that is 1/4 of the representable bit depth, and a third padding value that is 3/4 of the representable bit depth, and ,
The decoding step,
Decoding a third flag indicating whether the first padding value is included;
When the third flag indicates that the first padding value is not included, decoding a fourth flag indicating whether any one of the second padding value and the third padding value is included; And
And decoding any one of the second padding value and the third padding value as indicated by the fourth flag.
현재블록의 예측에 이용되는 참조샘플들을 구성하는 영상 복호화 장치로서,
구성 대상인 현재 참조샘플의 사용 가능성 여부를 판단하고, 상기 현재 참조샘플이 사용 가능하지 않은 경우에 상기 현재 참조샘플의 주변에 위치하는 다른 참조샘플들의 사용 가능성 여부를 판단하는 판단부; 및
상기 다른 참조샘플들이 사용 가능한 경우, 상기 다른 참조샘플들 간의 상관관계에 기초하여, 상기 현재 참조샘플을 패딩(padding)하는 패딩부를 포함하는, 영상 복호화 장치.
As an image decoding apparatus configuring reference samples used for prediction of a current block,
A determination unit that determines whether or not a current reference sample to be configured is available, and when the current reference sample is not available, determines whether or not other reference samples located in the vicinity of the current reference sample are available; And
And a padding unit for padding the current reference sample based on a correlation between the other reference samples when the other reference samples are available.
제8항에 있어서,
상기 상관관계는,
상기 다른 참조샘플들 간의 선형관계이며,
상기 패딩부는,
상기 다른 참조샘플들 간의 선형관계로부터 도출되는 선형관계 값을 이용하여, 상기 현재 참조샘플을 패딩하는, 영상 복호화 장치.
The method of claim 8,
The correlation is,
Is a linear relationship between the other reference samples,
The padding part,
An image decoding apparatus for padding the current reference sample by using a linear relationship value derived from a linear relationship between the other reference samples.
제9항에 있어서,
상기 상관관계에 기초한 패딩의 적용 여부를 지시하는 제1플래그를 비트스트림으로부터 복호화하고, 상기 제1플래그가 상기 상관관계에 기초한 패딩이 적용됨을 지시하는 경우에 상기 선형관계에 기초한 패딩의 적용 여부를 지시하는 제2플래그를 상기 비트스트림으로부터 복호화하는 복호화부를 더 포함하고,
상기 패딩부는,
상기 제2플래그가 상기 선형관계에 기초한 패딩이 적용됨을 지시하는 경우에, 상기 선형관계 값을 이용하여 상기 현재 참조샘플을 패딩하는, 영상 복호화 장치.
The method of claim 9,
When the first flag indicating whether padding based on the correlation is applied or not is decoded from the bitstream, and when the first flag indicates that padding based on the correlation is applied, whether or not padding based on the linear relationship is applied is determined. Further comprising a decoding unit for decoding the indicated second flag from the bitstream,
The padding part,
When the second flag indicates that padding based on the linear relationship is applied, the current reference sample is padded by using the linear relationship value.
제8항에 있어서,
상기 상관관계는,
상기 다른 참조샘플들 간의 그래디언트(gradient)이며,
상기 패딩부는,
상기 다른 참조샘플들 간의 그래디언트 값들을 평균한 값에, 상기 다른 참조샘플들 중에서 상기 현재 참조샘플에 이웃하는 다른 참조샘플의 값을 합산한 그래디언트 관계 값을 이용하여, 상기 현재 참조샘플을 패딩하는, 영상 복호화 장치.
The method of claim 8,
The correlation is,
It is a gradient between the different reference samples,
The padding part,
Padding the current reference sample by using a gradient relationship value obtained by summing a value obtained by averaging gradient values between the other reference samples and a value of another reference sample neighboring the current reference sample among the other reference samples, Video decoding device.
제11항에 있어서,
상기 상관관계에 기초한 패딩의 적용 여부를 지시하는 제1플래그를 비트스트림으로부터 복호화하고, 상기 제1플래그가 상기 상관관계에 기초한 패딩이 적용됨을 지시하는 경우에 상기 그래디언트에 기초한 패딩의 적용 여부를 지시하는 제2플래그를 상기 비트스트림으로부터 복호화하는 복호화부를 더 포함하고,
상기 패딩부는,
상기 제2플래그가 상기 그래디언트에 기초한 패딩이 적용됨을 지시하는 경우에, 상기 그래디언트 관계 값을 이용하여, 상기 현재 참조샘플을 패딩하는, 영상 복호화 장치.
The method of claim 11,
When the first flag indicating whether padding based on the correlation is applied or not is decoded from the bitstream, and when the first flag indicates that the padding based on the correlation is applied, indicating whether to apply the padding based on the gradient Further comprising a decoding unit for decoding the second flag to be decoded from the bitstream,
The padding part,
When the second flag indicates that padding based on the gradient is applied, the current reference sample is padded by using the gradient relationship value.
제8항에 있어서,
상기 현재블록의 예측에 이용되는 참조샘플들이 사용 가능하지 않은 경우, 비트스트림으로부터 패딩 값을 복호화하는 복호화부를 더 포함하고,
상기 패딩부는,
상기 다른 참조샘플들이 사용 가능하지 않은 경우, 상기 복호화된 패딩 값에 기초하여, 상기 현재 참조샘플을 패딩하는, 영상 복호화 장치.
The method of claim 8,
If the reference samples used for prediction of the current block are not available, further comprising a decoding unit for decoding a padding value from the bitstream,
The padding part,
When the other reference samples are not available, the current reference sample is padded based on the decoded padding value.
제13항에 있어서,
상기 패딩 값은
표현 가능한 비트 뎁스의 1/2인 제1패딩 값, 상기 표현 가능한 비트 뎁스의 1/4인 제2패딩 값 및, 상기 표현 가능한 비트 뎁스의 3/4인 제3패딩 값 중에서 어느 하나를 포함하고,
상기 복호화부는,
상기 제1패딩 값의 포함 여부를 지시하는 제3플래그를 복호화하며, 상기 제3플래그가 상기 제1패딩 값이 포함되지 않음을 지시하는 경우에 상기 제2패딩 값 및 상기 제3패딩 값 중에서 어느 하나의 포함 여부를 지시하는 제4플래그를 복호화하고, 상기 제4플래그가 지시하는 바에 따라 상기 제2패딩 값 및 상기 제3패딩 값 중에서 어느 하나를 복호화하는, 영상 복호화 장치.
The method of claim 13,
The padding value is
Including any one of a first padding value that is 1/2 of the representable bit depth, a second padding value that is 1/4 of the representable bit depth, and a third padding value that is 3/4 of the representable bit depth, and ,
The decryption unit,
Decodes a third flag indicating whether the first padding value is included, and when the third flag indicates that the first padding value is not included, any one of the second padding value and the third padding value A video decoding apparatus for decoding a fourth flag indicating whether or not one is included, and decoding any one of the second padding value and the third padding value according to the indication of the fourth flag.
KR1020200061271A 2019-09-27 2020-05-22 Method and apparatus for constructing reference sample KR20210038289A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020190119349 2019-09-27
KR20190119349 2019-09-27

Publications (1)

Publication Number Publication Date
KR20210038289A true KR20210038289A (en) 2021-04-07

Family

ID=75469459

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200061271A KR20210038289A (en) 2019-09-27 2020-05-22 Method and apparatus for constructing reference sample

Country Status (1)

Country Link
KR (1) KR20210038289A (en)

Similar Documents

Publication Publication Date Title
KR20230173065A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
CN113574877B (en) Method and apparatus for efficiently decoding residual block
KR20210018137A (en) Method and apparatus for intra prediction coding of video data
CN113273204B (en) Inter prediction method and picture decoding apparatus using the same
KR20190083959A (en) Method for partitioning chroma block and apparatus using the same
KR20220118334A (en) Video Coding Method and Apparatus Using Intra Prediction Based on Subblock Partitioning
KR102649287B1 (en) Sign Data Hiding for Transform Coefficient
KR20210038289A (en) Method and apparatus for constructing reference sample
KR20210037508A (en) Method and apparatus for processing escape sample
KR20200132761A (en) Method and apparatus for parallel encoding and decoding of video data
KR20210002321A (en) Method and apparatus for adaptively setting resolution
KR20200073117A (en) Method and apparatus for setting coding tool
CN113841403A (en) Inverse quantization apparatus and method used in image decoding apparatus
CN118250476A (en) Method performed by video encoding/decoding apparatus and method of providing video data
CN118200597A (en) Inter prediction apparatus and apparatus for transmitting bit stream
CN113875255B (en) Method for restoring sub-block unit and image decoding apparatus
KR102688470B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
CN114009031A (en) Method for restoring chrominance block and apparatus for decoding image
KR20210037506A (en) Method and apparatus for reconstructing residual block of chroma block
KR20220071129A (en) Method for Encoding and Decoding Video Using Adaptive Reference Sample Selection
KR20200081186A (en) Method for deriving motion vector of temporal candidate and apparatus using the same
KR20240078343A (en) Method and Apparatus for Video Encoding and Decoding for Predicting and Modifying Split Structure of Coding Tree Unit
KR20230038097A (en) Method and apparatus for video encoding and decoding
KR20230005763A (en) Method and apparatus for video encoding and decoding
KR20220017373A (en) Method and apparatus for patchbook-based encoding and decoding of video data