KR20210003604A - Method and apparatus for intra prediction - Google Patents

Method and apparatus for intra prediction Download PDF

Info

Publication number
KR20210003604A
KR20210003604A KR1020190079612A KR20190079612A KR20210003604A KR 20210003604 A KR20210003604 A KR 20210003604A KR 1020190079612 A KR1020190079612 A KR 1020190079612A KR 20190079612 A KR20190079612 A KR 20190079612A KR 20210003604 A KR20210003604 A KR 20210003604A
Authority
KR
South Korea
Prior art keywords
intra prediction
block
current block
reconstructed
prediction mode
Prior art date
Application number
KR1020190079612A
Other languages
Korean (ko)
Inventor
정원식
전동산
Original Assignee
한국전자통신연구원
경남대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원, 경남대학교 산학협력단 filed Critical 한국전자통신연구원
Priority to KR1020190079612A priority Critical patent/KR20210003604A/en
Publication of KR20210003604A publication Critical patent/KR20210003604A/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/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock

Abstract

Provided are a method and a device for video encoding/decoding which can improve efficiency of intra prediction coding. The method for video decoding comprises the steps of: deriving an intra prediction mode for a current block; determining at least one reconstructed sample line for the current block based on the derived intra prediction mode; constructing a reference sample using the at least one reconstructed sample included in the determined reconstructed sample line; and performing intra prediction on the current block based on the intra prediction mode and the reference sample.

Description

화면내 예측 방법 및 장치{METHOD AND APPARATUS FOR INTRA PREDICTION}In-screen prediction method and apparatus {METHOD AND APPARATUS FOR INTRA PREDICTION}

본 발명은 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체에 관한 것이다. 구체적으로, 본 발명은 복수의 참조 샘플 라인을 기반으로 하는 영상 부호화/복호화하는 방법 및 장치에 관한 것이다.The present invention relates to a video encoding/decoding method, an apparatus, and a recording medium storing a bitstream. Specifically, the present invention relates to a method and apparatus for encoding/decoding an image based on a plurality of reference sample lines.

최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 더 높은 해상도 및 화질을 갖는 영상에 대한 고효율 영상 부호화(encoding)/복호화(decoding) 기술이 요구된다.Recently, the demand for high-resolution and high-quality images such as high definition (HD) images and ultra high definition (UHD) images is increasing in various application fields. The higher the resolution and quality of the video data, the higher the amount of data is compared to the existing video data. Therefore, if the video data is transmitted using a medium such as a wired/wireless broadband line or stored using an existing storage medium, the transmission cost and The storage cost increases. High-efficiency image encoding/decoding technology for an image having a higher resolution and image quality is required to solve these problems that occur as image data becomes high-resolution and high-quality.

영상 압축 기술로 현재 픽처의 이전 또는 이후 픽처로부터 현재 픽처에 포함된 화소값을 예측하는 화면간 예측 기술, 현재 픽처 내의 화소 정보를 이용하여 현재 픽처에 포함된 화소값을 예측하는 화면내 예측 기술, 잔여 신호의 에너지를 압축하기 위한 변환 및 양자화 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.An inter-screen prediction technology that predicts pixel values included in the current picture from a picture before or after the current picture with an image compression technology, an intra prediction technology that predicts a pixel value included in the current picture using pixel information in the current picture, Various technologies exist, such as transformation and quantization technology for compressing the energy of the residual signal, and entropy coding technology that allocates short codes to values with a high frequency of appearance and long codes to values with low frequency of appearance. Image data can be effectively compressed and transmitted or stored.

종래의 화면내 예측에서는 현재 블록에 바로 인접한 주변 복원 샘플 라인으로부터 참조 샘플을 구성하기 때문에 압축 성능을 보다 향상시키는데 제약이 있다.In the conventional intra-prediction, since reference samples are constructed from neighboring reconstructed sample lines immediately adjacent to the current block, there is a limitation in further improving the compression performance.

본 발명은 복수의 참조 샘플 라인을 이용한 영상 부호화/복호화 방법 및 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide a video encoding/decoding method and apparatus using a plurality of reference sample lines.

또한, 본 발명은 화면내 예측에 필요한 부호화 파라미터를 주변 블록의 부호화 파라미터로부터 묵시적으로 유도하는 영상 부호화/복호화 방법 및 장치를 제공하는 것을 목적으로 한다.Another object of the present invention is to provide a video encoding/decoding method and apparatus for implicitly deriving encoding parameters required for intra prediction from encoding parameters of neighboring blocks.

또한, 본 발명은 본 발명의 영상 부호화/복호화 방법 또는 장치에 의해 생성된 비트스트림을 저장한 기록 매체를 제공하는 것을 목적으로 한다.It is also an object of the present invention to provide a recording medium storing a bitstream generated by the video encoding/decoding method or apparatus of the present invention.

본 발명에 따르면, 현재 블록에 대한 화면내 예측 모드를 유도하는 단계; 상기 유도된 화면내 예측 모드에 기초하여 상기 현재 블록에 대한 적어도 하나 이상의 복원 샘플 라인을 결정하는 단계; 상기 결정된 복원 샘플 라인에 포함된 적어도 하나 이상의 복원 샘플을 이용하여 참조 샘플을 구성하는 단계; 및 상기 화면내 예측 모드 및 상기 참조 샘플에 기초하여 상기 현재 블록에 대한 화면내 예측을 수행하는 단계를 포함하는 영상 복호화 방법이 제공될 수 있다.According to the present invention, the method includes: inducing an intra prediction mode for a current block; Determining at least one reconstructed sample line for the current block based on the derived intra prediction mode; Constructing a reference sample using at least one reconstructed sample included in the determined reconstructed sample line; And performing intra prediction on the current block based on the intra prediction mode and the reference sample.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 현재 블록은 상기 현재 블록의 서브 블록을 포함할 수 있다.In the video decoding method according to the present invention, the current block may include a sub-block of the current block.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 적어도 하나 이상의 복원 샘플 라인은 부호화 트리 블록 내 상기 현재 블록의 위치에 기초하여 결정될 수 있다.In the image decoding method according to the present invention, the at least one reconstructed sample line may be determined based on a position of the current block in a coding tree block.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 적어도 하나 이상의 복원 샘플 라인은 상기 유도된 화면내 예측 모드가 방향성인지 여부에 기초하여 결정될 수 있다.In the image decoding method according to the present invention, the at least one reconstructed sample line may be determined based on whether the derived intra prediction mode is directional.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 적어도 하나 이상의 복원 샘플 라인은 상기 현재 블록의 크기 및 분할 정보 중 적어도 하나에 기초하여 결정될 수 있다.In the image decoding method according to the present invention, the at least one reconstructed sample line may be determined based on at least one of the size and division information of the current block.

본 발명에 따른 영상 복호화 방법에 있어서, 비트스트림으로부터 상기 적어도 하나 이상의 복원 샘플 라인에 관한 정보를 획득하는 단계를 더 포함할 수 있다.The image decoding method according to the present invention may further include obtaining information on the at least one reconstructed sample line from a bitstream.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 결정된 복원 샘플 라인에 기초하여 상기 현재 블록의 MPM 후보 리스트를 재구성하는 단계를 더 포함할 수 있다.The video decoding method according to the present invention may further include reconstructing an MPM candidate list of the current block based on the determined reconstructed sample line.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 현재 블록에 인접한 복원 블록에 관한 정보를 유도하는 단계를 더 포함하고, 상기 현재 블록에 대한 화면내 예측을 수행하는 단계는, 상기 유도된 상기 현재 블록에 인접한 복원 블록에 관한 정보에 기초하여 상기 복원 블록의 부호화 파라미터를 유도하는 단계를 포함할 수 있다.In the video decoding method according to the present invention, further comprising the step of deriving information on a reconstructed block adjacent to the current block, and performing intra prediction on the current block, the derived current block It may include the step of deriving an encoding parameter of the reconstructed block based on information on the adjacent reconstructed block.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 현재 블록에 인접한 복원 블록에 관한 정보는 화면내 머지 모드를 적용하기 위한 상기 현재 블록에 인접한 복원 블록을 나타내는 정보를 포함할 수 있다.In the image decoding method according to the present invention, information on a reconstructed block adjacent to the current block may include information indicating a reconstructed block adjacent to the current block for applying an intra-screen merge mode.

본 발명에 따른 영상 복호화 방법에 있어서, 상기 복원 블록의 부호화 파라미터는 휘도 성분 화면내 예측 모드, 멀티 참조 라인 인덱스, 트랜스폼 정보 및 색차 성분 화면내 예측 모드 중 적어도 하나를 포함할 수 있다.In the image decoding method according to the present invention, the encoding parameter of the reconstructed block may include at least one of a luminance component intra prediction mode, a multi reference line index, transform information, and a color difference component intra prediction mode.

또한, 본 발명에 따르면, 현재 블록에 대한 화면내 예측 모드를 결정하는 단계; 상기 유도된 화면내 예측 모드에 기초하여 상기 현재 블록에 대한 적어도 하나 이상의 복원 샘플 라인을 결정하는 단계; 상기 결정된 복원 샘플 라인에 포함된 적어도 하나 이상의 복원 샘플을 이용하여 참조 샘플을 구성하는 단계; 및 상기 화면내 예측 모드 및 상기 참조 샘플에 기초하여 상기 현재 블록에 대한 화면내 예측을 수행하는 단계를 포함하는 영상 부호화 방법이 제공될 수 있다.In addition, according to the present invention, the method includes: determining an intra prediction mode for a current block; Determining at least one reconstructed sample line for the current block based on the derived intra prediction mode; Constructing a reference sample using at least one reconstructed sample included in the determined reconstructed sample line; And performing intra prediction on the current block based on the intra prediction mode and the reference sample.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 현재 블록은 상기 현재 블록의 서브 블록을 포함할 수 있다.In the image encoding method according to the present invention, the current block may include a sub-block of the current block.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 적어도 하나 이상의 복원 샘플 라인은 부호화 트리 블록 내 상기 현재 블록의 위치에 기초하여 결정될 수 있다.In the image encoding method according to the present invention, the at least one reconstructed sample line may be determined based on a position of the current block in a coding tree block.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 적어도 하나 이상의 복원 샘플 라인은 상기 유도된 화면내 예측 모드가 방향성인지 여부에 기초하여 결정될 수 있다.In the image encoding method according to the present invention, the at least one reconstructed sample line may be determined based on whether the derived intra prediction mode is directional.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 적어도 하나 이상의 복원 샘플 라인은 상기 현재 블록의 크기 및 분할 정보 중 적어도 하나에 기초하여 결정될 수 있다.In the image encoding method according to the present invention, the at least one reconstructed sample line may be determined based on at least one of the size and division information of the current block.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 적어도 하나 이상의 복원 샘플 라인에 관한 정보를 부호화하는 단계를 더 포함할 수 있다.The image encoding method according to the present invention may further include encoding information on the at least one reconstructed sample line.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 결정된 복원 샘플 라인에 기초하여 상기 현재 블록의 MPM 후보 리스트를 재구성하는 단계를 더 포함할 수 있다.The video encoding method according to the present invention may further include reconstructing an MPM candidate list of the current block based on the determined reconstructed sample line.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 현재 블록에 인접한 복원 블록에 관한 정보를 유도하는 단계를 더 포함하고, 상기 현재 블록에 대한 화면내 예측을 수행하는 단계는, 상기 유도된 상기 현재 블록에 인접한 복원 블록에 관한 정보에 기초하여 상기 복원 블록의 부호화 파라미터를 유도하는 단계를 포함할 수 있다.In the video encoding method according to the present invention, further comprising the step of deriving information on a reconstructed block adjacent to the current block, and performing intra prediction on the current block, the derived current block It may include the step of deriving an encoding parameter of the reconstructed block based on information on the adjacent reconstructed block.

본 발명에 따른 영상 부호화 방법에 있어서, 상기 복원 블록의 부호화 파라미터는 휘도 성분 화면내 예측 모드, 멀티 참조 라인 인덱스, 트랜스폼 정보 및 색차 성분 화면내 예측 모드 중 적어도 하나를 포함할 수 있다.In the video encoding method according to the present invention, the encoding parameter of the reconstructed block may include at least one of a luminance component intra prediction mode, a multi reference line index, transform information, and a color difference component intra prediction mode.

또한, 본 발명에 따른 기록 매체는 본 발명에 따른 영상 부호화 방법에 의해 생성된 비트스트림을 저장할 수 있다.Further, the recording medium according to the present invention can store a bitstream generated by the video encoding method according to the present invention.

본 발명에 따르면, 복수의 참조 샘플 라인을 이용한 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.According to the present invention, a method and apparatus for encoding/decoding an image using a plurality of reference sample lines may be provided.

또한, 본 발명에 따르면 화면내 예측에 필요한 부호화 파라미터를 주변 블록의 부호화 파라미터로부터 묵시적으로 유도하는 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.In addition, according to the present invention, a video encoding/decoding method and apparatus for implicitly deriving encoding parameters required for intra prediction from encoding parameters of neighboring blocks can be provided.

또한, 본 발명에 따르면, 화면내 부호화를 위해 필요한 부호화 파라미터를 화면간 부호화의 머지 모드와 같이 주변 블록의 부호화 파라미터를 묵시적으로 유도함으로써 전송 비트를 줄이고 화면내 예측 부호화 효율을 향상시키는 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.In addition, according to the present invention, video encoding/decoding that reduces transmission bits and improves intra-prediction encoding efficiency by implicitly deriving encoding parameters of neighboring blocks, such as a merge mode of inter-picture encoding, for encoding parameters necessary for intra-picture encoding. Methods and apparatus can be provided.

또한, 본 발명에 따르면, 화면내 머지 모드에 대한 시그널링 방법, 화면내 머지 리스트 구성 방법을 이용하여 화면내 예측 모드에 필요한 부호화 파라미터의 발생 비트량을 줄이는 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.In addition, according to the present invention, a video encoding/decoding method and apparatus for reducing the amount of bits generated of encoding parameters necessary for an intra prediction mode by using a signaling method for an intra-merge mode and an intra-merge list construction method can be provided. have.

또한, 본 발명에 따르면, 본 발명의 영상 부호화/복호화 방법 또는 장치에 의해 생성된 비트스트림을 저장한 기록 매체가 제공될 수 있다.Further, according to the present invention, a recording medium storing a bitstream generated by the video encoding/decoding method or apparatus of the present invention can be provided.

또한, 본 발명에 따르면, 영상의 부호화 및/또는 복호화 효율을 향상시킬 수 있다.Further, according to the present invention, it is possible to improve the encoding and/or decoding efficiency of an image.

도 1은 본 발명이 적용되는 부호화 장치의 일 실시 예에 따른 구성을 나타내는 블록도이다.
도 2는 본 발명이 적용되는 복호화 장치의 일 실시 예에 따른 구성을 나타내는 블록도이다.
도 3은 영상을 부호화 및 복호화 할 때의 영상의 분할 구조를 개략적으로 나타내는 도면이다.
도 4는 본 발명의 일 실시 예에 따른 부호화 유닛(CU)이 포함할 수 있는 예측 유닛(PU)의 형태를 도시한 도면이다.
도 5는 본 발명의 일 실시 예에 따른 부호화 유닛(CU)이 포함할 수 있는 변환 유닛(TU)의 형태를 도시한 도면이다.
도 6은 본 발명의 일 실시 예에 따른 2차 변환이 수행되는 과정을 나타내는 도면이다.
도 7은 본 발명의 일 실시 예에 따른 MPM 후보 리스트(Candidate List)를 구성하기 위해 참조하는 주변 블록을 나타내는 도면이다.
도 8은 본 발명의 일 실시 예에 따른 화면내 예측 모드를 나타내는 도면이다.
도 9는 본 발명의 일 실시 예에 따른 현재 블록에 인접한 참조 샘플 라인을 이용하여 화면내 예측을 수행하는 과정을 나타내는 도면이다.
도 10은 본 발명의 일 실시 예에 따른 화면내 머지 모드 후보 리스트를 구성하는 과정을 나타내는 도면이다.
도 11은 본 발명의 일 실시 예에 따른 영상 복호화 방법을 나타내는 흐름도이다.
도 12는 본 발명의 일 실시 예에 따른 영상 부호화 방법을 나타내는 흐름도이다.
1 is a block diagram showing a configuration according to an embodiment of an encoding apparatus to which the present invention is applied.
2 is a block diagram showing a configuration according to an embodiment of a decoding apparatus to which the present invention is applied.
3 is a diagram schematically showing an image segmentation structure when an image is encoded and decoded.
4 is a diagram illustrating a shape of a prediction unit PU that may be included in the encoding unit CU according to an embodiment of the present invention.
5 is a diagram illustrating a shape of a transform unit TU that may be included in the encoding unit CU according to an embodiment of the present invention.
6 is a diagram illustrating a process of performing a quadratic transformation according to an embodiment of the present invention.
7 is a diagram illustrating neighboring blocks referenced to construct an MPM candidate list according to an embodiment of the present invention.
8 is a diagram illustrating an intra prediction mode according to an embodiment of the present invention.
9 is a diagram illustrating a process of performing intra prediction using a reference sample line adjacent to a current block according to an embodiment of the present invention.
10 is a diagram illustrating a process of configuring an intra-screen merge mode candidate list according to an embodiment of the present invention.
11 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.
12 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시 예를 가질 수 있는 바, 특정 실시 예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다. 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다. 후술하는 예시적 실시 예들에 대한 상세한 설명은, 특정 실시 예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시 예는 당업자가 실시 예를 실시할 수 있기에 충분하도록 상세히 설명된다. 다양한 실시 예들은 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시 예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시 예로 구현될 수 있다. 또한, 각각의 개시된 실시 예 내의 개별 구성요소의 위치 또는 배치는 실시 예의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 예시적 실시 예들의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다.In the present invention, various modifications may be made and various embodiments may be provided, and specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to a specific embodiment, it is to be understood to include all changes, equivalents, and substitutes included in the spirit and scope of the present invention. In the drawings, like reference numerals refer to the same or similar functions over several aspects. The shapes and sizes of elements in the drawings may be exaggerated for clearer explanation. For a detailed description of exemplary embodiments to be described later, reference is made to the accompanying drawings illustrating specific embodiments as an example. These embodiments are described in detail enough to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments are different from each other but need not be mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present invention in relation to one embodiment. In addition, it is to be understood that the position or arrangement of individual components in each disclosed embodiment may be changed without departing from the spirit and scope of the embodiment. Accordingly, the detailed description to be described below is not intended to be taken in a limiting sense, and the scope of exemplary embodiments, if appropriately described, is limited only by the appended claims, along with all scopes equivalent to those claimed by the claims.

본 발명에서 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.In the present invention, terms such as first and second may be used to describe various components, but the components should not be limited by the terms. These terms are used only for the purpose of distinguishing one component from another component. For example, without departing from the scope of the present invention, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element. The term and/or includes a combination of a plurality of related listed items or any of a plurality of related listed items.

본 발명의 어떤 구성 요소가 다른 구성 요소에 “연결되어” 있다거나 “접속되어” 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있으나, 중간에 다른 구성 요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component of the present invention is referred to as being “connected” or “connected” to another component, it may be directly connected or connected to the other component, but other components exist in the middle. It should be understood that there may be. On the other hand, when a component is referred to as being "directly connected" or "directly connected" to another component, it should be understood that no other component exists in the middle.

본 발명의 실시 예에 나타나는 구성부들은 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시되는 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수 개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시 예 및 분리된 실시 예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.Components shown in the embodiments of the present invention are independently shown to represent different characteristic functions, and does not mean that each component is formed of separate hardware or a single software component. That is, each constituent part is listed and included as a respective constituent part for convenience of explanation, and at least two of the constituent parts are combined to form one constituent part, or one constituent part is divided into a plurality of constituent parts to perform a function. An integrated embodiment and a separate embodiment of the component are also included in the scope of the present invention unless departing from the essence of the present invention.

본 발명에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 발명에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. 즉, 본 발명에서 특정 구성을 “포함”한다고 기술하는 내용은 해당 구성 이외의 구성을 배제하는 것이 아니며, 추가적인 구성이 본 발명의 실시 또는 본 발명의 기술적 사상의 범위에 포함될 수 있음을 의미한다. The terms used in the present invention are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In the present invention, terms such as "comprises" or "have" are intended to designate the presence of features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, but one or more other features. It is to be understood that the presence or addition of elements or numbers, steps, actions, components, parts, or combinations thereof, does not preclude in advance. That is, in the present invention, the description of “including” a specific configuration does not exclude configurations other than the corresponding configuration, and means that additional configurations may be included in the scope of the implementation of the present invention or the technical idea of the present invention.

본 발명의 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.Some of the constituent elements of the present invention are not essential constituent elements that perform essential functions in the present invention, but may be optional constituent elements merely for improving performance. The present invention can be implemented by including only the components essential to implement the essence of the present invention excluding components used for performance improvement, and a structure including only essential components excluding optional components used for performance improvement Also included in the scope of the present invention.

이하, 도면을 참조하여 본 발명의 실시 형태에 대하여 구체적으로 설명한다. 본 명세서의 실시 예를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략하고, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In describing the embodiments of the present specification, if it is determined that a detailed description of a related known configuration or function may obscure the subject matter of the present specification, the detailed description will be omitted, and the same reference numerals are used for the same components in the drawings. Used and redundant descriptions for the same components are omitted.

또한, 이하에서 영상은 동영상(video)을 구성하는 하나의 픽처를 의미할 수 있으며, 동영상 자체를 나타낼 수도 있다. 예를 들면, "영상의 부호화 및/또는 복호화"는 "비디오의 부호화 및/또는 복호화"를 의미할 수 있으며, "비디오를 구성하는 영상들 중 하나의 영상의 부호화 및/또는 복호화"를 의미할 수도 있다. 여기서, 픽처는 영상과 동일한 의미를 가질 수 있다.In addition, hereinafter, an image may mean one picture constituting a video, and may represent a video itself. For example, "encoding and/or decoding of an image" may mean "encoding and/or decoding of a video", and may mean "encoding and/or decoding of one image among images constituting a video" May be. Here, a picture may have the same meaning as an image.

용어 설명Glossary of terms

부호화기(Encoder): 부호화를 수행하는 장치를 의미할 수 있다.Encoder: It may mean a device that performs encoding.

복호화기(Decoder): 복호화를 수행하는 장치를 의미할 수 있다.Decoder: May mean a device that performs decoding.

파싱(Parsing): 엔트로피 복호화하여 구문 요소(Syntax Element)의 값을 결정하는 것을 의미하거나, 엔트로피 복호화 자체를 의미할 수 있다.Parsing: Entropy decoding may mean determining a value of a syntax element, or entropy decoding itself.

블록(Block): 샘플(Sample)의 MxN 배열이며, 여기서 M과 N은 양의 정수 값을 의미하며, 블록은 흔히 2차원 형태의 샘플 배열을 의미할 수 있다.Block: An MxN array of samples, where M and N mean positive integer values, and a block can often mean a two-dimensional sample array.

샘플: 블록을 구성하는 기본 단위이며, 비트 깊이 (bit depth, Bd)에 따라 0부터 2Bd - 1까지의 값을 표현 할 수 있다. 본 발명에서, 화소 및 픽셀은 샘플과 같은 의미로 사용될 수 있다. Sample: A basic unit that composes a block, and can represent a value from 0 to 2 Bd -1 according to the bit depth (Bd). In the present invention, pixels and pixels may be used in the same sense as samples.

유닛(Unit): 영상 부호화 및 복호화의 단위를 의미할 수 있다. 영상의 부호화 및 복호화에 있어서, 유닛은 하나의 영상의 분할에 의해 생성된 영역일 수 있다. 또한, 유닛은 하나의 영상을 세분화 된 유닛으로 분할하여 부호화 혹은 복호화 할 때 그 분할된 단위를 의미할 수 있다. 영상의 부호화 및 복호화에 있어서, 유닛 별로 기정의된 처리가 수행될 수 있다. 하나의 유닛은 유닛에 비해 더 작은 크기를 갖는 하위 유닛으로 더 분할될 수 있다. 기능에 따라서, 유닛은 블록(Block), 매크로블록(Macroblock), 부호화 트리 유닛(Coding Tree Unit), 부호화 트리 블록(Coding Tree Block), 부호화 유닛(Coding Unit), 부호화 블록(Coding Block), 예측 유닛(Prediction Unit), 예측 블록(Prediction Block), 변환 유닛(Transform Unit), 변환 블록(Transform Block) 등을 의미할 수 있다. 또한, 유닛은 블록과 구분하여 지칭하기 위해 휘도(Luma) 성분 블록과 그에 대응하는 색차(Chroma) 성분 블록 그리고 각 블록에 대한 구문 요소를 포함한 것을 의미할 수 있다. 유닛은 다양한 크기와 형태를 가질 수 있으며, 특히 유닛의 형태는 직사각형뿐만 아니라 정사각형, 사다리꼴, 삼각형, 오각형 등 2차원으로 표현할 수 있는 기하학적 도형을 포함할 수 있다. 또한, 유닛 정보에는 부호화 유닛, 예측 유닛, 변환 유닛 등을 가리키는 유닛의 타입, 유닛의 크기, 유닛의 깊이, 유닛의 부호화 및 복호화 순서 등 중 적어도 하나 이상을 포함할 수 있다.Unit: It may mean a unit of image encoding and decoding. In encoding and decoding of an image, the unit may be an area generated by division of one image. Further, a unit may mean a divided unit when one image is divided into subdivided units and encoded or decoded. In encoding and decoding of an image, a predefined process may be performed for each unit. One unit may be further divided into sub-units having a smaller size than the unit. Depending on the function, the units are Block, Macroblock, Coding Tree Unit, Coding Tree Block, Coding Unit, Coding Block, and Prediction. It may mean a unit (Prediction Unit), a prediction block (Prediction Block), a transform unit (Transform Unit), a transform block (Transform Block), and the like. In addition, the unit may mean including a luminance component block, a chrominance component block corresponding thereto, and a syntax element for each block in order to distinguish it from the block. The unit may have various sizes and shapes, and in particular, the shape of the unit may include a geometric figure that can be expressed in two dimensions, such as a square, trapezoid, triangle, and pentagon, as well as a rectangle. Also, the unit information may include at least one of a type of a unit indicating a coding unit, a prediction unit, a transformation unit, etc., a size of a unit, a depth of a unit, an order of encoding and decoding of the unit, and the like.

복원된 주변 유닛(Reconstructed Neighbor Unit): 부호화/복호화 대상 유닛 주변에 공간적(Spatial)/시간적(Temporal)으로 이미 부호화 혹은 복호화되어 복원된 유닛을 의미할 수 있다.Reconstructed Neighbor Unit: This may mean a unit that has already been encoded or decoded in a spatial/temporal manner around the encoding/decoding target unit and then reconstructed.

유닛 깊이(Depth): 유닛이 분할된 정도를 의미하며, 트리 구조(Tree Structure)에서 루트 노드(Root Node)는 깊이가 가장 얕고, 리프 노드(Leaf Node)는 깊이가 가장 깊다고 할 수 있다.Unit Depth: It means the degree to which the unit is divided. In a tree structure, the root node has the shallowest depth, and the leaf node has the deepest depth.

심볼(Symbol): 부호화/복호화 대상 유닛 구문 요소 및 부호화 파라미터(coding parameter), 변환 계수(Transform Coefficient)의 값 등을 의미할 수 있다.Symbol: may mean a syntax element to be encoded/decoded, a coding parameter, a value of a transform coefficient, and the like.

파라미터 세트(Parameter Set): 비트스트림 내의 구조 중 헤더 정보에 해당할 수 있으며, 비디오 파라미터 세트(video parameter set), 시퀀스 파라미터 세트(sequence parameter set), 픽처 파라미터 세트(picture parameter set), 적응 파라미터 세트(adaptation parameter set) 중 적어도 하나 이상이 파라미터 세트에 포함될 수 있다. 또한, 파라미터 세트에는 슬라이스(slice) 헤더 및 타일(tile) 헤더 정보를 포함한 의미를 가질 수 있다.Parameter Set: It may correspond to header information among structures in the bitstream, and is a video parameter set, sequence parameter set, picture parameter set, and adaptation parameter set. At least one or more of (adaptation parameter set) may be included in the parameter set. In addition, the parameter set may have a meaning including slice header and tile header information.

비트스트림(Bitstream): 부호화된 영상 정보를 포함하는 비트의 열을 의미할 수 있다.Bitstream: May mean a sequence of bits including coded image information.

예측 유닛(Prediction Unit): 화면 간 예측 또는 화면 내 예측 및 그에 대한 보상을 수행할 때의 기본 유닛이며, 하나의 예측 유닛은 크기가 작은 복수의 파티션(Partition)으로 분할 될 수도 있다. 이 경우, 복수의 파티션 각각이 상기 예측 및 보상 수행 시의 기본 유닛이 되며, 예측 유닛이 분할된 파티션도 예측 유닛이라고 할 수 있다. 예측 유닛은 다양한 크기와 형태를 가질 수 있으며, 특히 예측 유닛의 형태는 직사각형뿐만 아니라 정사각형, 사다리꼴, 삼각형, 오각형 등 2차원으로 표현할 수 있는 기하학적 도형을 포함할 수 있다. Prediction Unit: A basic unit when inter prediction or intra prediction and compensation are performed, and one prediction unit may be divided into a plurality of small sized partitions. In this case, each of the plurality of partitions becomes a basic unit when performing the prediction and compensation, and a partition in which the prediction unit is divided may also be referred to as a prediction unit. The prediction unit may have various sizes and shapes, and in particular, the shape of the prediction unit may include not only a rectangle but also a geometric figure that can be expressed in two dimensions, such as a square, a trapezoid, a triangle, and a pentagon.

예측 유닛 파티션(Prediction Unit Partition): 예측 유닛이 분할된 형태를 의미할 수 있다.Prediction Unit Partition: This may mean a form in which a prediction unit is divided.

참조 영상 리스트(Reference Picture List): 화면 간 예측 혹은 움직임 보상에 사용되는 하나 이상의 참조 영상이 포함된 리스트를 의미할 수 있다. 참조 영상 리스트의 종류는 LC (List Combined), L0 (List 0), L1 (List 1), L2 (List 2), L3 (List 3) 등이 있을 수 있으며, 화면 간 예측에는 1개 이상의 참조 영상 리스트가 사용될 수 있다.Reference Picture List: This may mean a list including one or more reference pictures used for inter prediction or motion compensation. The types of the reference image list may include LC (List Combined), L0 (List 0), L1 (List 1), L2 (List 2), L3 (List 3), and more than one reference image for inter prediction. Lists can be used.

화면 간 예측 지시자(Inter Prediction Indicator): 화면 간 예측 시에 부호화/복호화 대상 블록의 화면 간 예측 방향(단방향 예측, 쌍방향 예측 등)을 의미할 수 있으며, 부호화/복호화 대상 블록이 예측 블록을 생성할 때 사용하는 참조 영상 수를 의미할 수 있으며, 부호화/복호화 대상 블록이 화면 간 예측 혹은 움직임 보상을 수행할 때 사용하는 예측 블록의 수를 의미할 수 있다.Inter prediction indicator (Inter Prediction Indicator): Can mean an inter prediction direction (unidirectional prediction, bidirectional prediction, etc.) of an encoding/decoding target block during inter prediction, and the encoding/decoding target block generates a prediction block. It may refer to the number of reference images used when the encoding/decoding target block performs inter prediction or motion compensation, and may refer to the number of prediction blocks used when performing inter prediction or motion compensation.

참조 영상 색인(Reference Picture Index): 참조 영상 리스트에서 특정 참조 영상에 대한 색인을 의미할 수 있다.Reference Picture Index: It may mean an index for a specific reference picture in the reference picture list.

참조 영상(Reference Picture): 화면 간 예측 혹은 움직임 보상을 위해서 특정 유닛이 참조하는 영상을 의미할 수 있으며, 참조 영상을 참조 픽처라고도 지칭할 수 있다.Reference picture: It may mean an image referenced by a specific unit for inter prediction or motion compensation, and the reference image may also be referred to as a reference picture.

움직임 벡터(Motion Vector): 화면 간 예측 혹은 움직임 보상에 사용되는 2차원 벡터이며, 부호화/복호화 대상 영상과 참조 영상 사이의 오프셋을 의미할 수 있다. 예를 들어, (mvX, mvY)는 움직임 벡터를 나타낼 수 있으며, mvX는 가로(horizontal) 성분, mvY는 세로(vertical) 성분을 나타낼 수 있다.Motion Vector: A two-dimensional vector used for inter prediction or motion compensation, and may mean an offset between an encoding/decoding target image and a reference image. For example, (mvX, mvY) may represent a motion vector, mvX may represent a horizontal component, and mvY may represent a vertical component.

정보, 참조 영상, 움직임 벡터 후보, 움직임 벡터 후보 색인 등 중 적어도 하나 이상을 포함하는움직임 벡터 후보(Motion Vector Candidate): 움직임 벡터를 예측할 때 예측 후보가 되는 유닛 혹은 그 유닛의 움직임 벡터를 의미할 수 있다.Motion Vector Candidate including at least one of information, reference image, motion vector candidate, motion vector candidate index, etc.: It can mean a unit that is a prediction candidate when predicting a motion vector or a motion vector of the unit. have.

움직임 벡터 후보 리스트(Motion Vector Candidate List): 움직임 벡터 후보를 이용하여 구성된 리스트를 의미할 수 있다.Motion Vector Candidate List: This may mean a list constructed using motion vector candidates.

움직임 벡터 후보 색인(Motion Vector Candidate Index): 움직임 벡터 후보 리스트 내의 움직임 벡터 후보를 가리키는 지시자, 움직임 벡터 예측기(Motion Vector Predictor)의 색인(index)이라고도 할 수 있다.Motion Vector Candidate Index: An indicator indicating a motion vector candidate in a motion vector candidate list, and may also be referred to as an index of a motion vector predictor.

움직임 정보(Motion Information): 움직임 벡터, 참조 영상 색인, 화면 간 예측 지시자(Inter Prediction Indicator) 뿐만 아니라 참조 영상 리스트 정보를 의미할 수 있다.Motion Information: This may refer to information on a motion vector, a reference image index, an inter prediction indicator, as well as a reference image list.

머지 후보 리스트(Merge Candidate List): 머지 후보를 이용하여 구성된 리스트를 의미할 수 있다.Merge Candidate List: This may mean a list constructed using merge candidates.

머지 후보(Merge Candidate): 공간적 머지 후보, 시간적 머지 후보, 조합된 머지 후보, 조합된 양예측 머지 후보, 제로 머지 후보 등을 포함할 수 있으며, 머지 후보는 예측 종류 정보(prediction type information), 각 리스트에 대한 참조 영상 색인(reference picture index), 움직임 벡터(motion vector) 등의 움직임 정보를 포함할 수 있다.Merge Candidate: may include a spatial merge candidate, a temporal merge candidate, a combined merge candidate, a combined two-prediction merge candidate, a zero merge candidate, etc., and the merge candidate includes prediction type information, each It may include motion information such as a reference picture index and a motion vector for the list.

머지 색인(Merge Index): 머지 후보 리스트 내 머지 후보를 지시하는 정보를 의미할 수 있다. 또한, 머지 색인은 공간적/시간적으로 현재 블록과 인접하게 복원된 블록들 중 머지 후보를 유도한 블록을 지시할 수 있다. 또한, 머지 색인은 머지 후보가 가지는 움직임 정보 중 적어도 하나 이상을 지시할 수 있다.Merge Index: This may mean information indicating a merge candidate in the merge candidate list. Also, the merge index may indicate a block from which a merge candidate is derived from among blocks reconstructed spatially/temporally adjacent to the current block. In addition, the merge index may indicate at least one or more of motion information of the merge candidate.

변환 유닛(Transform Unit): 변환, 역변환, 양자화, 역양자화, 변환 계수 부호화/복호화와 같이 잔여 신호(residual signal) 부호화/복호화를 수행할 때의 기본 유닛을 의미할 수 있으며, 하나의 변환 유닛은 분할되어 크기가 작은 복수의 변환 유닛으로 분할될 수 있다. 변환 유닛은 다양한 크기와 형태를 가질 수 있으며, 특히 변환 유닛의 형태는 직사각형뿐만 아니라 정사각형, 사다리꼴, 삼각형, 오각형 등 2차원으로 표현할 수 있는 기하학적 도형을 포함할 수 있다. Transform Unit: It may mean a basic unit when encoding/decoding a residual signal, such as transform, inverse transform, quantization, inverse quantization, and transform coefficient encoding/decoding, and one transform unit is It can be divided into a plurality of conversion units having a small size. The conversion unit may have various sizes and shapes, and in particular, the shape of the conversion unit may include a geometric figure that can be expressed in two dimensions, such as a square, trapezoid, triangle, and pentagon, as well as a rectangle.

스케일링(Scaling): 변환 계수 레벨에 인수를 곱하는 과정을 의미할 수 있으며, 결과로 변환 계수를 생성할 수 있다. 스케일링을 역양자화(dequantization)라고도 부를 수 있다.Scaling: It may mean a process of multiplying the level of a transform coefficient by a factor, and a transform coefficient may be generated as a result. Scaling can also be called dequantization.

양자화 매개변수(Quantization Parameter): 양자화 및 역양자화에서 변환 계수 레벨(transform coefficient level)을 스케일링(scaling)할 때 사용하는 값을 의미할 수 있다. 이때, 양자화 매개변수는 양자화 스텝 크기(step size)에 매핑된 값일 수 있다.Quantization Parameter: This may mean a value used when scaling a transform coefficient level in quantization and inverse quantization. In this case, the quantization parameter may be a value mapped to a quantization step size.

잔여 양자화 매개변수(Delta Quantization Parameter): 예측된 양자화 매개변수와 부호화/복호화 대상 유닛의 양자화 매개변수의 차분된 값을 의미할 수 있다.Residual quantization parameter (Delta Quantization Parameter): This may mean a differential value between a predicted quantization parameter and a quantization parameter of an encoding/decoding target unit.

스캔(Scan): 블록 혹은 행렬 내 계수의 순서를 정렬하는 방법을 의미할 수 있으며, 예를 들어 2차원 배열을 1차원 배열 형태로 정렬하는 것을 스캔이라고 하며, 1차원 배열을 2차원 배열 형태로 정렬하는 것도 스캔 혹은 역 스캔(Inverse Scan)이라고 부를 수 있다.Scan: It can mean a method of sorting the order of coefficients in a block or matrix. For example, sorting a two-dimensional array into a one-dimensional array is called a scan, and a one-dimensional array into a two-dimensional array. Alignment can also be called a scan or an inverse scan.

변환 계수(Transform Coefficient): 변환을 수행하고 나서 생성된 계수 값, 본 발명에서는 변환 계수에 양자화를 적용한 양자화된 변환 계수 레벨(transform coefficient level)도 변환 계수의 의미에 포함될 수 있다.Transform Coefficient: A coefficient value generated after performing transformation, and in the present invention, a quantized transform coefficient level obtained by applying quantization to a transform coefficient may also be included in the meaning of the transform coefficient.

넌제로 변환 계수(Non-zero Transform Coefficient): 변환 계수 값의 크기가 0이 아닌 변환 계수 혹은 값의 크기가 0이 아닌 변환 계수 레벨을 의미할 수 있다.Non-zero transform coefficient (Non-zero Transform Coefficient): It may mean a transform coefficient in which the size of the transform coefficient value is not 0 or a transform coefficient level in which the size of the value is not 0.

양자화 행렬(Quantization Matrix): 영상의 주관적 화질 혹은 객관적 화질을 향상시키기 위해서 양자화 혹은 역양자화 과정에서 이용하는 행렬을 의미할 수 있다. 양자화 행렬을 스케일링 리스트(scaling list)라고도 부를 수 있다.Quantization Matrix: This may mean a matrix used in a quantization or inverse quantization process in order to improve subjective or objective quality of an image. The quantization matrix may also be called a scaling list.

양자화 행렬 계수(Quantization Matrix Coefficient): 양자화 행렬 내의 각 원소(element)를 의미할 수 있다. 양자화 행렬 계수를 행렬 계수(matrix coefficient)라고도 할 수 있다.Quantization Matrix Coefficient: May mean each element in a quantization matrix. The quantization matrix coefficient may also be referred to as a matrix coefficient.

기본 행렬(Default Matrix): 부호화기와 복호화기에서 미리 정의되어 있는 소정의 양자화 행렬을 의미할 수 있다.Default matrix: This may mean a predetermined quantization matrix defined in advance in an encoder and a decoder.

비 기본 행렬(Non-default Matrix): 부호화기와 복호화기에서 미리 정의되지 않고, 사용자에 의해서 전송/수신되는 양자화 행렬을 의미할 수 있다.Non-default Matrix: This may mean a quantization matrix that is not predefined in an encoder and a decoder, but is transmitted/received by a user.

부호화 트리 유닛(Coding Tree Unit): 하나의 휘도 성분(Y) 부호화 트리 블록과 관련된 두 색차 성분(Cb, Cr) 부호화 트리 블록들로 구성될 수 있다. 각 부호화 트리 유닛은 부호화 유닛, 예측 유닛, 변환 유닛 등의 하위 유닛을 구성하기 위하여 쿼드 트리(quad tree), 바이너리 트리(binary tree) 등 하나 이상의 분할 방식을 이용하여 분할될 수 있다. 입력 영상의 분할 처럼 영상의 복/부호화 과정에서 처리 단위가 되는 픽셀 블록을 지칭하기 위한 용어로 사용될 수 있다. Coding Tree Unit: It may be composed of one luminance component (Y) and two color difference component (Cb, Cr) coded tree blocks related to a coded tree block. Each coding tree unit may be divided using one or more partitioning methods such as a quad tree and a binary tree in order to construct sub-units such as coding units, prediction units, and transform units. Like segmentation of an input image, it can be used as a term to refer to a pixel block that becomes a processing unit in an image decoding/encoding process.

부호화 트리 블록(Coding Tree Block): Y 부호화 트리 블록, Cb 부호화 트리 블록, Cr 부호화 트리 블록 중 어느 하나를 지칭하기 위한 용어로 사용될 수 있다.Coding Tree Block: It can be used as a term for referring to any one of a Y-coded tree block, a Cb-coded tree block, and a Cr-coded tree block.

도 1은 본 발명이 적용되는 부호화 장치의 일 실시 예에 따른 구성을 나타내는 블록도이다.1 is a block diagram showing a configuration according to an embodiment of an encoding apparatus to which the present invention is applied.

부호화 장치(100)는 비디오 부호화 장치 또는 영상 부호화 장치일 수 있다. 비디오는 하나 이상의 영상들을 포함할 수 있다. 부호화 장치(100)는 비디오의 하나 이상의 영상들을 시간에 따라 순차적으로 부호화할 수 있다.The encoding device 100 may be a video encoding device or an image encoding device. A video may include one or more images. The encoding apparatus 100 may sequentially encode one or more images of a video according to time.

도 1을 참조하면, 부호화 장치(100)는 움직임 예측부(111), 움직임 보상부(112), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 부호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조 픽처 버퍼(190)를 포함할 수 있다.1, the encoding apparatus 100 includes a motion prediction unit 111, a motion compensation unit 112, an intra prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, and a quantization unit. A unit 140, an entropy encoder 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190 may be included.

부호화 장치(100)는 입력 영상에 대해 인트라 모드 및/또는 인터 모드로 부호화를 수행할 수 있다. 또한, 부호화 장치(100)는 입력 영상에 대한 부호화를 통해 비트스트림을 생성할 수 있고, 생성된 비트스트림을 출력할 수 있다. 예측 모드로 인트라 모드가 사용되는 경우 스위치(115)는 인트라로 전환될 수 있고, 예측 모드로 인터 모드가 사용되는 경우 스위치(115)는 인터로 전환될 수 있다. 여기서 인트라 모드는 화면 내 예측 모드를 의미할 수 있으며, 인터 모드는 화면 간 예측 모드를 의미할 수 있다. 부호화 장치(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성할 수 있다. 또한, 부호화 장치(100)는 예측 블록이 생성된 후, 입력 블록 및 예측 블록의 차분(residual)을 부호화할 수 있다. 입력 영상은 현재 부호화의 대상인 현재 영상으로 칭해질 수 있다. 입력 블록은 현재 부호화의 대상인 현재 블록 혹은 부호화 대상 블록으로 칭해질 수 있다.The encoding apparatus 100 may encode an input image in an intra mode and/or an inter mode. In addition, the encoding apparatus 100 may generate a bitstream through encoding of an input image, and may output the generated bitstream. When the intra mode is used as the prediction mode, the switch 115 may be switched to intra, and when the inter mode is used as the prediction mode, the switch 115 may be switched to inter. Here, the intra mode may refer to an intra prediction mode, and the inter mode may refer to an inter prediction mode. The encoding apparatus 100 may generate a prediction block for an input block of an input image. Also, after the prediction block is generated, the encoding apparatus 100 may encode a residual between the input block and the prediction block. The input image may be referred to as a current image that is a current encoding target. The input block may be referred to as a current block or a current block to be encoded.

예측 모드가 인트라 모드인 경우, 인트라 예측부(120)는 현재 블록의 주변에 이미 부호화된 블록의 픽셀 값을 참조 화소로서 이용할 수 있다. 인트라 예측부(120)는 참조 화소를 이용하여 공간적 예측을 수행할 수 있고, 공간적 예측을 통해 입력 블록에 대한 예측 샘플들을 생성할 수 있다. 여기서 인트라 예측은 화면 내 예측을 의미할 수 있다.When the prediction mode is an intra mode, the intra prediction unit 120 may use a pixel value of a block already coded around the current block as a reference pixel. The intra prediction unit 120 may perform spatial prediction using a reference pixel, and may generate prediction samples for an input block through spatial prediction. Here, intra prediction may mean intra prediction.

예측 모드가 인터 모드인 경우, 움직임 예측부(111)는, 움직임 예측 과정에서 참조 영상으로부터 입력 블록과 가장 매치가 잘 되는 영역을 검색할 수 있고, 검색된 영역을 이용하여 움직임 벡터를 도출할 수 있다. 참조 영상은 참조 픽처 버퍼(190)에 저장될 수 있다. When the prediction mode is the inter mode, the motion prediction unit 111 may search for an area that best matches the input block from the reference image in the motion prediction process, and may derive a motion vector using the searched area. . The reference image may be stored in the reference picture buffer 190.

움직임 보상부(112)는 움직임 벡터를 이용하는 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. 여기서, 움직임 벡터는 인터 예측에 사용되는 2차원 벡터일 수 있다. 또한 움직임 벡터는 현재 영상 및 참조 영상 간의 오프셋(offset)을 나타낼 수 있다. 여기서 인터 예측은 화면 간 예측을 의미할 수 있다.The motion compensation unit 112 may generate a prediction block by performing motion compensation using a motion vector. Here, the motion vector may be a 2D vector used for inter prediction. Also, the motion vector may represent an offset between the current image and the reference image. Here, inter prediction may mean inter prediction.

상기 움직임 예측부(111)와 움직임 보상부(112)는 움직임 벡터의 값이 정수 값을 가지지 않을 경우에 참조 영상 내의 일부 영역에 대해 보간 필터(Interpolation Filter)를 적용하여 예측 블록을 생성할 수 있다. 화면 간 예측 혹은 움직임 보상을 수행하기 위해 부호화 유닛을 기준으로 해당 부호화 유닛에 포함된 예측 유닛의 움직임 예측 및 움직임 보상 방법이 스킵 모드(Skip Mode), 머지 모드(Merge mode), AMVP 모드(AMVP Mode) , 현재 픽쳐 참조 모드 중 어떠한 방법인지 여부를 판단할 수 있고, 각 모드에 따라 화면 간 예측 혹은 움직임 보상을 수행할 수 있다. 여기서, 현재 픽쳐 참조 모드는 부호화 대상 블록이 속한 현재 픽쳐 내의 기-복원된 영역을 이용한 예측 모드를 의미할 수 있다. 상기 기-복원된 영역을 특정하기 위해 현재 픽쳐 참조 모드를 위한 움직임 벡터가 정의될 수 있다. 부호화 대상 블록이 현재 픽쳐 참조 모드로 부호화되는지 여부는 부호화 대상 블록의 참조 영상 색인을 이용하여 부호화될 수 있다.When the motion vector value does not have an integer value, the motion prediction unit 111 and the motion compensation unit 112 may generate a prediction block by applying an interpolation filter to a partial region of a reference image. . In order to perform inter prediction or motion compensation, the motion prediction and motion compensation method of the prediction unit included in the corresponding coding unit based on the coding unit is skip mode, merge mode, and AMVP mode. ), it is possible to determine which method is among the current picture reference modes, and to perform inter prediction or motion compensation according to each mode. Here, the current picture reference mode may mean a prediction mode using a pre-restored region in the current picture to which the encoding target block belongs. A motion vector for a current picture reference mode may be defined to specify the pre-restored region. Whether the encoding object block is encoded in the current picture reference mode may be encoded using a reference image index of the encoding object block.

감산기(125)는 입력 블록 및 예측 블록의 차분을 사용하여 잔여 블록(residual block)을 생성할 수 있다. 잔여 블록은 잔여 신호로 칭해질 수도 있다.The subtractor 125 may generate a residual block by using a difference between the input block and the prediction block. The residual block may be referred to as a residual signal.

변환부(130)는 잔여 블록에 대해 변환(transform)을 수행하여 변환 계수(transform coefficient)를 생성할 수 있고, 변환 계수를 출력할 수 있다. 여기서, 변환 계수는 잔여 블록에 대한 변환을 수행함으로써 생성된 계수 값일 수 있다. 변환 생략(transform skip) 모드가 적용되는 경우, 변환부(130)는 잔여 블록에 대한 변환을 생략할 수도 있다.The transform unit 130 may transform the residual block to generate a transform coefficient, and may output a transform coefficient. Here, the transform coefficient may be a coefficient value generated by performing transform on the residual block. When the transform skip mode is applied, the transform unit 130 may omit the transform of the residual block.

변환 계수에 양자화를 적용함으로써 양자화된 변환 계수 레벨(transform coefficient level)이 생성될 수 있다. 이하, 실시 예들에서는 양자화된 변환 계수 레벨도 변환 계수로 칭해질 수 있다.By applying quantization to a transform coefficient, a quantized transform coefficient level may be generated. Hereinafter, in embodiments, a quantized transform coefficient level may also be referred to as a transform coefficient.

양자화부(140)는 변환 계수를 양자화 매개변수에 따라 양자화함으로써 양자화된 변환 계수 레벨(transform coefficient level)을 생성할 수 있고, 양자화된 변환 계수 레벨을 출력할 수 있다. 이때, 양자화부(140)에서는 양자화 행렬을 사용하여 변환 계수를 양자화할 수 있다.The quantization unit 140 may generate a quantized transform coefficient level by quantizing a transform coefficient according to a quantization parameter, and may output a quantized transform coefficient level. In this case, the quantization unit 140 may quantize the transform coefficient using a quantization matrix.

엔트로피 부호화부(150)는, 양자화부(140)에서 산출된 값들 또는 부호화 과정에서 산출된 부호화 파라미터(coding parameter) 값들 등에 대하여 확률 분포에 따른 엔트로피 부호화를 수행함으로써 비트스트림(bitstream)을 생성할 수 있고, 비트스트림을 출력할 수 있다. 엔트로피 부호화부(150)는 영상의 픽셀의 정보 외에 영상의 복호화를 위한 정보에 대한 엔트로피 부호화를 수행할 수 있다. 예를 들면, 영상의 복호화를 위한 정보는 구문 요소(syntax element) 등을 포함할 수 있다. The entropy encoding unit 150 may generate a bitstream by performing entropy encoding according to a probability distribution on values calculated by the quantization unit 140 or values of a coding parameter calculated during an encoding process. Yes, and can output a bitstream. The entropy encoder 150 may perform entropy encoding on information for decoding an image in addition to information on pixels of an image. For example, information for decoding an image may include a syntax element or the like.

엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(symbol)에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 부호화 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 부호화를 통해서 영상 부호화의 압축 성능이 높아질 수 있다. 엔트로피 부호화부(150)는 엔트로피 부호화를 위해 지수 골롬(exponential golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법을 사용할 수 있다. 예를 들면, 엔트로피 부호화부(150)는 가변 길이 부호화(Variable Lenghth Coding/Code; VLC) 테이블을 이용하여 엔트로피 부호화를 수행할 수 있다. 또한 엔트로피 부호화부(150)는 대상 심볼의 이진화(binarization) 방법 및 대상 심볼/빈(bin)의 확률 모델(probability model)을 도출한 후, 도출된 이진화 방법 또는 확률 모델을 사용하여 산술 부호화를 수행할 수도 있다.When entropy coding is applied, a small number of bits are allocated to a symbol having a high probability of occurrence, and a large number of bits are allocated to a symbol having a low probability of occurrence, and the symbol is expressed. The size of the column can be reduced. Therefore, compression performance of image encoding may be improved through entropy encoding. The entropy encoding unit 150 may use an encoding method such as exponential golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) for entropy encoding. For example, the entropy encoding unit 150 may perform entropy encoding using a variable length encoding (VLC) table. In addition, the entropy encoder 150 derives a binarization method of a target symbol and a probability model of a target symbol/bin, and then performs arithmetic coding using the derived binarization method or a probability model. You may.

엔트로피 부호화부(150)는 변환 계수 레벨을 부호화하기 위해 변환 계수 스캐닝(Transform Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 업라이트(up right) 스캐닝을 이용하여 블록의 계수를 스캔함으로써 1차원 벡터 형태로 변경시킬 수 있다. 변환 유닛의 크기 및 화면 내 예측 모드에 따라 업라이트 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 유닛의 크기 및 화면 내 예측 모드에 따라 업라이트 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.The entropy encoder 150 may change a two-dimensional block shape coefficient into a one-dimensional vector shape through a transform coefficient scanning method in order to encode a transform coefficient level. For example, by scanning the coefficients of a block using upright scanning, it can be changed to a one-dimensional vector form. Depending on the size of the transform unit and the intra prediction mode, instead of upright scan, a vertical scan that scans a two-dimensional block shape coefficient in a column direction and a horizontal scan that scans a two-dimensional block shape coefficient in a row direction may be used. That is, depending on the size of the transform unit and the intra prediction mode, it is possible to determine which scan method is to be used among upright scan, vertical scan, and horizontal scan.

부호화 파라미터(Coding Parameter)는 구문 요소와 같이 부호화기에서 부호화되어 복호화기로 전송되는 정보뿐만 아니라, 부호화 혹은 복호화 과정에서 유추될 수 있는 정보를 포함할 수 있으며, 영상을 부호화하거나 복호화할 때 필요한 정보를 의미할 수 있다. 예를 들어, 화면 내 예측 모드, 화면 간 예측 모드, 화면 내 예측 방향, 움직임 정보, 움직임 벡터, 참조 영상 색인, 화면 간 예측 방향, 화면 간 예측 지시자, 참조 영상 리스트, 움직임 벡터 예측기, 움직임 병합 후보, 변환 종류, 변환 크기, 추가 변환 사용 유무, 루프 내 필터 정보, 잔여 신호 유무, 양자화 매개변수, 문맥 모델, 변환 계수, 변환 계수 레벨, 부호화 블록 패턴(Coded Block Pattern), 부호화 블록 플래그(Coded Block Flag), 영상 디스플레이/출력 순서, 슬라이스 정보, 타일 정보, 픽처 타입, 움직임 병합 모드 사용 유무, 스킵 모드 사용 유무, 블록 크기, 블록 깊이, 블록 분할 정보, 유닛 크기, 유닛 깊이, 유닛 분할 정보 등의 값 및/또는 통계 중 적어도 하나 이상이 부호화 파라미터에 포함될 수 있다.The coding parameter, like a syntax element, may include information that can be inferred during the encoding or decoding process, as well as information that is encoded by the encoder and transmitted to the decoder, and refers to information required when encoding or decoding an image. can do. For example, intra prediction mode, inter prediction mode, intra prediction direction, motion information, motion vector, reference image index, inter prediction direction, inter prediction indicator, reference image list, motion vector predictor, motion merge candidate , Transform type, transform size, use of additional transform, filter information in the loop, presence of residual signal, quantization parameter, context model, transform coefficient, transform coefficient level, coded block pattern, coded block flag Flag), image display/output order, slice information, tile information, picture type, whether motion merge mode is used, skip mode is used, block size, block depth, block segmentation information, unit size, unit depth, unit segmentation information, etc. At least one or more of values and/or statistics may be included in the encoding parameter.

잔여 신호는 원 신호 및 예측 신호 간의 차이(difference)를 의미할 수 있다. 또는, 잔여 신호는 원신호 및 예측 신호 간의 차이를 변환(transform) 함으로써 생성된 신호일 수 있다. 또는, 잔여 신호는 원 신호 및 예측 신호 간의 차이를 변환 및 양자화함으로써 생성된 신호일 수 있다. 잔여 블록은 블록 단위의 잔여 신호일 수 있다.The residual signal may mean a difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming a difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a residual signal in units of blocks.

부호화 장치(100)가 인터 예측을 통한 부호화를 수행할 경우, 부호화된 현재 영상은 이후에 처리되는 다른 영상(들)에 대하여 참조 영상으로서 사용될 수 있다. 따라서, 부호화 장치(100)는 부호화된 현재 영상을 다시 복호화할 수 있고, 복호화된 영상을 참조 영상으로 저장할 수 있다. 복호화를 위해 부호화된 현재 영상에 대한 역양자화 및 역변환이 처리될 수 있다.When the encoding apparatus 100 performs encoding through inter prediction, the encoded current image may be used as a reference image for other image(s) to be processed later. Accordingly, the encoding apparatus 100 may re-decode the encoded current image and store the decoded image as a reference image. Inverse quantization and inverse transformation of the current image encoded for decoding may be processed.

양자화된 계수는 역양자화부(160)에서 역양자화(dequantization)될 수 있고. 역변환부(170)에서 역변환(inverse transform)될 수 있다. 역양자화 및 역변환된 계수는 가산기(175)를 통해 예측 블록과 합해질 수 있다, 역양자화 및 역변환된 계수 및 예측 블록을 합함으로써 복원 블록(reconstructed block) 이 생성될 수 있다.The quantized coefficient may be dequantized in the inverse quantization unit 160. It may be inverse transformed by the inverse transform unit 170. The inverse quantized and inverse transformed coefficients may be summed with the prediction block through the adder 175, and a reconstructed block may be generated by summing the inverse quantized and inverse transformed coefficients and the prediction block.

복원 블록은 필터부(180)를 거칠 수 있다. 필터부(180)는 디블록킹 필터(deblocking filter), 샘플 적응적 오프셋(Sample Adaptive Offset; SAO), 적응적 루프 필터(Adaptive Loop Filter; ALF) 중 적어도 하나 이상을 복원 블록 또는 복원 영상에 적용할 수 있다. 필터부(180)는 인루프 필터(in-loop filter)로 칭해질 수도 있다.The restoration block may pass through the filter unit 180. The filter unit 180 applies at least one of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to a reconstructed block or a reconstructed image. I can. The filter unit 180 may also be referred to as an in-loop filter.

디블록킹 필터는 블록들 간의 경계에 생긴 블록 왜곡을 제거할 수 있다. 디블록킹 필터를 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.The deblocking filter can remove block distortion occurring at the boundary between blocks. In order to determine whether to perform the deblocking filter, it may be determined whether to apply the deblocking filter to the current block based on the pixels included in several columns or rows included in the block. When applying a deblocking filter to a block, a strong filter or a weak filter may be applied according to the required deblocking filtering strength. In addition, in applying the deblocking filter, horizontal filtering and vertical filtering may be processed in parallel when performing vertical filtering and horizontal filtering.

샘플 적응적 오프셋은 부호화 에러를 보상하기 위해 픽셀 값에 적정 오프셋(offset) 값을 더할 수 있다. 샘플 적응적 오프셋은 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽처에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.The sample adaptive offset may add an appropriate offset value to a pixel value to compensate for an encoding error. The sample adaptive offset may correct an offset from the original image in pixel units of the deblocking image. In order to perform offset correction for a specific picture, the pixels included in the image are divided into a certain number of areas, and then the area to be offset is determined and the offset is applied to the area, or offset by considering the edge information of each pixel. You can use the method of applying.

적응적 루프 필터는 복원 영상 및 원래의 영상을 비교한 값에 기반하여 필터링을 수행할 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. 적응적 루프 필터를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 유닛(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 적응적 루프 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 적응적 루프 필터가 적용될 수도 있다.The adaptive loop filter may perform filtering based on a value obtained by comparing the reconstructed image and the original image. After dividing the pixels included in the image into predetermined groups, one filter to be applied to the group may be determined, and filtering may be performed differentially for each group. Information regarding whether to apply the adaptive loop filter may be transmitted for each coding unit (CU) of the luminance signal, and the shape and filter coefficients of the adaptive loop filter to be applied may vary according to each block. In addition, the same type (fixed type) adaptive loop filter may be applied regardless of the characteristics of the block to be applied.

필터부(180)를 거친 복원 블록은 참조 픽처 버퍼(190)에 저장될 수 있다.The reconstructed block that has passed through the filter unit 180 may be stored in the reference picture buffer 190.

도 2는 본 발명이 적용되는 복호화 장치의 일 실시 예에 따른 구성을 나타내는 블록도이다.2 is a block diagram showing a configuration according to an embodiment of a decoding apparatus to which the present invention is applied.

복호화 장치(200)는 비디오 복호화 장치 또는 영상 복호화 장치일 수 있다.The decoding device 200 may be a video decoding device or an image decoding device.

도 2를 참조하면, 복호화 장치(200)는 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 움직임 보상부(250), 가산기(255), 필터부(260) 및 참조 픽처 버퍼(270)를 포함할 수 있다.Referring to FIG. 2, the decoding apparatus 200 includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra prediction unit 240, a motion compensation unit 250, and an adder 255. , A filter unit 260 and a reference picture buffer 270 may be included.

복호화 장치(200)는 부호화 장치(100)에서 출력된 비트스트림을 수신할 수 있다. 복호화 장치(200)는 비트스트림에 대하여 인트라 모드 또는 인터 모드로 복호화를 수행할 수 있다. 또한, 복호화 장치(200)는 복호화를 통해 복원 영상을 생성할 수 있고, 복원 영상을 출력할 수 있다.The decoding apparatus 200 may receive a bitstream output from the encoding apparatus 100. The decoding apparatus 200 may perform decoding on a bitstream in an intra mode or an inter mode. In addition, the decoding apparatus 200 may generate a reconstructed image through decoding, and may output a reconstructed image.

복호화에 사용되는 예측 모드가 인트라 모드인 경우 스위치가 인트라로 전환될 수 있다. 복호화에 사용되는 예측 모드가 인터 모드인 경우 스위치가 인터로 전환될 수 있다.When the prediction mode used for decoding is an intra mode, the switch may be switched to intra. When the prediction mode used for decoding is the inter mode, the switch may be switched to inter.

복호화 장치(200)는 입력된 비트스트림으로부터 복원된 잔여 블록(reconstructed residual block)을 획득할 수 있고, 예측 블록을 생성할 수 있다. 복원된 잔여 블록 및 예측 블록이 획득되면, 복호화 장치(200)는 복원된 잔여 블록과 및 예측 블록을 더함으로써 복호화 대상 블록인 복원 블록을 생성할 수 있다. 복호화 대상 블록은 현재 블록으로 칭해질 수 있다.The decoding apparatus 200 may obtain a reconstructed residual block from the input bitstream, and may generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding apparatus 200 may generate a reconstructed block that is a decoding object block by adding the reconstructed residual block and the prediction block. The block to be decoded may be referred to as a current block.

엔트로피 복호화부(210)는 비트스트림에 대한 확률 분포에 따른 엔트로피 복호화를 수행함으로써 심볼들을 생성할 수 있다. 생성된 심볼들은 양자화된 변환 계수 레벨(transform coefficient level) 형태의 심볼을 포함할 수 있다. 여기에서, 엔트로피 복호화 방법은 상술된 엔트로피 부호화 방법과 유사할 수 있다. 예를 들면, 엔트로피 복호화 방법은 상술된 엔트로피 부호화 방법의 역과정일 수 있다.The entropy decoding unit 210 may generate symbols by performing entropy decoding according to a probability distribution for a bitstream. The generated symbols may include a symbol in the form of a quantized transform coefficient level. Here, the entropy decoding method may be similar to the entropy encoding method described above. For example, the entropy decoding method may be a reverse process of the entropy encoding method described above.

엔트로피 복호화부(210)는 변환 계수 레벨을 복호화하기 위해 변환 계수 스캐닝(Transform Coefficient Scanning) 방법을 통해 1차원의 벡터 형태 계수를 2차원의 블록 형태로 변경할 수 있다. 예를 들어, 업라이트(up right) 스캐닝을 이용하여 블록의 계수를 스캔함으로써 2차원 블록 형태로 변경시킬 수 있다. 변환 유닛의 크기 및 화면 내 예측 모드에 따라 업라이트 스캔 대신 수직 스캔, 수평 스캔이 사용될 수도 있다. 즉, 변환 유닛의 크기 및 화면 내 예측 모드에 따라 업라이트 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.The entropy decoder 210 may change a one-dimensional vector form coefficient into a two-dimensional block form through a transform coefficient scanning method in order to decode a transform coefficient level. For example, by scanning the coefficients of a block using up-right scanning, it can be changed into a two-dimensional block shape. Vertical scan and horizontal scan may be used instead of upright scan according to the size of the transform unit and the intra prediction mode. That is, depending on the size of the transform unit and the intra prediction mode, it is possible to determine which scan method is to be used among upright scan, vertical scan, and horizontal scan.

양자화된 변환 계수 레벨은 역양자화부(220)에서 역양자화될 수 있고, 역변환부(230)에서 역변환될 수 있다. 양자화된 변환 계수 레벨이 역양자화 및 역변환 된 결과로서, 복원된 잔여 블록이 생성될 수 있다. 이때, 역양자화부(220)는 양자화된 변환 계수 레벨에 양자화 행렬을 적용할 수 있다.The quantized transform coefficient level may be inverse quantized in the inverse quantization unit 220 and may be inverse transformed in the inverse transform unit 230. As a result of inverse quantization and inverse transformation of the quantized transform coefficient level, a reconstructed residual block may be generated. In this case, the inverse quantization unit 220 may apply a quantization matrix to the quantized transform coefficient level.

인트라 모드가 사용되는 경우, 인트라 예측부(240)는 복호화 대상 블록 주변의 이미 복호화된 블록의 픽셀 값을 이용하는 공간적 예측을 수행함으로써 예측 블록을 생성할 수 있다.When the intra mode is used, the intra prediction unit 240 may generate a prediction block by performing spatial prediction using a pixel value of an already decoded block around the decoding object block.

인터 모드가 사용되는 경우, 움직임 보상부(250)는 움직임 벡터 및 참조 픽처 버퍼(270)에 저장되어 있는 참조 영상을 이용하는 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. 상기 움직임 보상부(250)는 움직임 벡터의 값이 정수 값을 가지지 않을 경우에 참조 영상 내의 일부 영역에 대해 보간 필터(Interpolation Filter)를 적용하여 예측 블록을 생성할 수 있다. 움직임 보상을 수행하기 위해 부호화 유닛을 기준으로 해당 부호화 유닛에 포함된 예측 유닛의 움직임 보상 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode), 현재 픽쳐 참조 모드 중 어떠한 방법인지 여부를 판단할 수 있고, 각 모드에 따라 움직임 보상을 수행할 수 있다. 여기서, 현재 픽쳐 참조 모드는 복호화 대상 블록이 속한 현재 픽쳐 내의 기-복원된 영역을 이용한 예측 모드를 의미할 수 있다. 상기 기-복원된 영역을 특정하기 위해 현재 픽쳐 참조 모드를 위한 움직임 벡터가 이용될 수 있다. 복호화 대상 블록이 현재 픽쳐 참조 모드로 부호화된 블록인지 여부를 나타내는 플래그 혹은 인덱스가 시그날링될 수도 있고, 복호화 대상 블록의 참조 영상 색인을 통해 유추될 수도 있다. 현재 픽쳐 참조 모드를 현재 픽쳐는 복호화 대상 블록을 위한 참조 영상 리스트 내에서 고정된 위치(예를 들어, refIdx=0인 위치 또는 가장 마지막 위치)에 존재할 수 있다. 또는, 참조 영상 리스트 내에 가변적으로 위치할 수도 있으며, 이를 위해 현재 픽쳐의 위치를 나타내는 별도의 참조 영상 색인이 시그날링될 수도 있다.When the inter mode is used, the motion compensation unit 250 may generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer 270. When the motion vector does not have an integer value, the motion compensation unit 250 may generate a prediction block by applying an interpolation filter to a partial region of a reference image. In order to perform motion compensation, the motion compensation method of the prediction unit included in the coding unit based on the coding unit is among the skip mode, merge mode, AMVP mode, and current picture reference mode. It is possible to determine what kind of method it is, and motion compensation may be performed according to each mode. Here, the current picture reference mode may mean a prediction mode using a pre-restored region in the current picture to which the decoding object block belongs. A motion vector for a current picture reference mode may be used to specify the pre-restored region. A flag or index indicating whether the decoding target block is a block encoded in the current picture reference mode may be signaled, or may be inferred through the reference image index of the decoding target block. In the current picture reference mode, the current picture may exist at a fixed position (eg, a position where refIdx = 0 or the last position) in a reference image list for a decoding object block. Alternatively, it may be variably located in the reference image list, and for this purpose, a separate reference image index indicating the position of the current picture may be signaled.

복원된 잔여 블록 및 예측 블록은 가산기(255)를 통해 더해질 수 있다. 복원된 잔여 블록 및 예측 블록이 더해짐에 따라 생성된 블록은 필터부(260)를 거칠 수 있다. 필터부(260)는 디블록킹 필터, 샘플 적응적 오프셋 및 적응적 루프 필터 중 적어도 하나 이상을 복원 블록 또는 복원 영상에 적용할 수 있다. 필터부(260)는 복원 영상을 출력할 수 있다. 복원 영상은 참조 픽처 버퍼(270)에 저장되어 인터 예측에 사용될 수 있다.The reconstructed residual block and prediction block may be added through an adder 255. As the reconstructed residual block and the prediction block are added, the generated block may pass through the filter unit 260. The filter unit 260 may apply at least one of a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or reconstructed image. The filter unit 260 may output a reconstructed image. The reconstructed image may be stored in the reference picture buffer 270 and used for inter prediction.

도 3은 영상을 부호화 및 복호화 할 때의 영상의 분할 구조를 개략적으로 나타내는 도면이다.3 is a diagram schematically showing an image segmentation structure when an image is encoded and decoded.

도 3은 하나의 유닛이 복수의 하위 유닛으로 분할되는 실시 예를 개략적으로 나타낸다.3 schematically shows an embodiment in which one unit is divided into a plurality of sub-units.

영상을 효율적으로 분할하기 위해, 부호화 및 복호화에 있어서, 부호화 유닛(Coding Unit; CU)이 사용될 수 있다. 여기서 부호화 유닛은 코딩 유닛을 의미할 수 있다. 유닛은 1) 구문 요소(syntax element) 및 2) 영상 샘플들을 포함하는 블록을 합쳐서 지칭하는 용어일 수 있다. 예를 들면, "유닛의 분할"은 "유닛에 해당하는 블록의 분할"을 의미할 수 있다. 블록 분할 정보에는 유닛의 깊이(depth)에 관한 정보가 포함될 수 있다. 깊이 정보는 유닛이 분할되는 회수 및/또는 정도를 나타낼 수 있다.In order to efficiently divide an image, a coding unit (CU) may be used in encoding and decoding. Here, the coding unit may mean a coding unit. A unit may be a term that refers to a block including 1) a syntax element and 2) an image sample. For example, "dividing a unit" may mean "dividing a block corresponding to a unit". The block division information may include information on the depth of the unit. The depth information may indicate the number and/or degree of division of the unit.

도 3을 참조하면, 영상(300)은 최대 부호화 유닛(Largest Coding Unit; LCU) 단위로 순차적으로 분할되고, LCU 단위로 분할 구조가 결정된다. 여기서, LCU는 부호화 트리 유닛(Coding Tree Unit; CTU)과 동일한 의미로 사용될 수 있다. 하나의 유닛은 트리 구조(tree structure)를 기초로 깊이 정보(depth)를 가지고 계층적으로 분할될 수 있다. 각각의 분할된 하위 유닛은 깊이 정보를 가질 수 있다. 상기 깊이 정보는 유닛이 분할된 회수 및/또는 정도를 나타내므로, 상기 하위 유닛의 크기에 관한 정보를 포함할 수도 있다.Referring to FIG. 3, an image 300 is sequentially segmented in units of a largest coding unit (LCU), and a segmentation structure is determined in units of an LCU. Here, the LCU may be used in the same meaning as a coding tree unit (CTU). One unit may be hierarchically divided with depth information based on a tree structure. Each divided sub-unit may have depth information. Since the depth information indicates the number and/or degree of division of the unit, it may include information on the size of the sub-unit.

분할 구조는 LCU(310) 내에서의 부호화 유닛(Coding Unit; CU)의 분포를 의미할 수 있다. CU는 영상을 효율적으로 부호화하기 위한 유닛일 수 있다. 이러한 분포는 하나의 CU를 복수(2, 4, 8, 16 등을 포함하는 2 이상의 양의 정수)의 CU들로 분할할지 여부에 따라 결정할 수 있다. 분할에 의해 생성된 CU의 가로 크기 및 세로 크기는 각각 분할 전의 CU의 가로 크기의 절반 및 세로 크기의 절반이거나, 분할된 개수에 따라 분할 전의 CU의 가로 크기보다 작은 크기 및 세로 크기보다 작은 크기를 가질 수 있다. 분할된 CU는 동일한 방식으로 가로 크기 및 세로 크기가 감소된 복수의 CU로 재귀적으로 분할될 수 있다.The split structure may mean a distribution of a coding unit (CU) within the LCU 310. The CU may be a unit for efficiently encoding an image. This distribution may be determined according to whether or not to divide one CU into a plurality (a positive integer of 2 or more including 2, 4, 8, 16, etc.). The horizontal and vertical dimensions of the CU generated by the division are either half the horizontal size and half the vertical size of the CU before division, or a size smaller than the horizontal size and the vertical size of the CU before division, depending on the number of divisions. Can have. The divided CU may be recursively divided into a plurality of CUs whose horizontal size and vertical size are reduced in the same manner.

이때, CU의 분할은 기 정의된 깊이까지 재귀적으로 이루어질 수 있다. 깊이 정보는 CU의 크기를 나타내는 정보일 수 있고 각 CU마다 저장될 수 있다. 예컨대, LCU의 깊이는 0일 수 있고, 최소 부호화 유닛(Smallest Coding Unit; SCU)의 깊이는 기정의된 최대 깊이일 수 있다. 여기서, LCU는 상술된 것과 같이 최대의 부호화 유닛 크기를 가지는 부호화 유닛일 수 있고, SCU는 최소의 부호화 유닛 크기를 가지는 부호화 유닛일 수 있다. In this case, the partitioning of the CU may be recursively performed up to a predefined depth. The depth information may be information indicating the size of the CU and may be stored for each CU. For example, the depth of the LCU may be 0, and the depth of the Smallest Coding Unit (SCU) may be a predefined maximum depth. Here, as described above, the LCU may be a coding unit having the largest coding unit size, and the SCU may be a coding unit having the smallest coding unit size.

LCU(310)로부터 분할이 시작되고, 분할에 의해 CU의 가로 크기 및 세로 크기가 줄어들 때마다 CU의 깊이는 1씩 증가한다. 각각의 깊이 별로, 분할되지 않는 CU는 2Nx2N 크기를 가질 수 있다. 분할되는 CU의 경우, 2Nx2N 크기의 CU가 NxN 크기를 가지는 복수의 CU들로 분할될 수 있다. N의 크기는 깊이가 1씩 증가할 때마다 절반으로 감소한다. The division starts from the LCU 310, and the depth of the CU increases by one whenever the horizontal size and the vertical size of the CU are reduced by the division. For each depth, a CU that is not divided may have a size of 2Nx2N. In the case of a divided CU, a CU having a size of 2Nx2N may be divided into a plurality of CUs having a size of NxN. The size of N decreases by half for every 1 increase in depth.

예를 들어, 하나의 부호화 유닛이 4개의 부호화 유닛으로 분할 될 경우, 분할된 4개의 부호화 유닛의 가로 및 세로 크기는 분할되기 전 부호화 유닛의 가로 및 세로 크기와 비교하여 각각 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 부호화 유닛이 4개의 부호화 유닛으로 분할 될 경우, 분할된 4개의 부호화 유닛은 각각 16x16의 크기를 가질 수 있다. 하나의 부호화 유닛이 4개의 부호화 유닛으로 분할 될 경우, 부호화 유닛은 쿼드트리(quad-tree) 형태로 분할되었다고 할 수 있다.For example, when one coding unit is split into four coding units, the horizontal and vertical sizes of the four split coding units may each have a size of half compared to the horizontal and vertical sizes of the coding units before being split. have. For example, when a 32x32 coding unit is divided into four coding units, each of the divided four coding units may have a size of 16x16. When one coding unit is split into four coding units, it can be said that the coding unit is split in a quad-tree form.

예를 들어, 하나의 부호화 유닛이 2개의 부호화 유닛으로 분할 될 경우, 분할된 2개의 부호화 유닛의 가로 혹은 세로 크기는 분할되기 전 부호화 유닛의 가로 혹은 세로 크기와 비교하여 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 부호화 유닛이 2개의 부호화 유닛으로 세로로 분할 될 경우, 분할된 2개의 부호화 유닛은 각각 16x32의 크기를 가질 수 있다. 일 예로, 32x32 크기의 부호화 유닛이 2개의 부호화 유닛으로 가로로 분할 될 경우, 분할된 2개의 부호화 유닛은 각각 32x16의 크기를 가질 수 있다. 하나의 부호화 유닛이 2개의 부호화 유닛으로 분할 될 경우, 부호화 유닛은 이진트리(binary-tree) 형태로 분할되었다고 할 수 있다.For example, when one coding unit is split into two coding units, the horizontal or vertical size of the two split coding units may have a size of half compared to the horizontal or vertical size of the coding unit before being split. . For example, when a 32x32 coding unit is vertically split into two coding units, each of the two split coding units may have a size of 16x32. For example, when a 32x32 coding unit is horizontally split into two coding units, the split two coding units may each have a size of 32x16. When one coding unit is split into two coding units, it can be said that the coding unit is split in a binary-tree form.

도 3을 참조하면, 깊이가 0인 LCU는 64x64 화소들일 수 있다. 0은 최소 깊이일 수 있다. 깊이가 3인 SCU는 8x8 화소들일 수 있다. 3은 최대 깊이일 수 있다. 이때, LCU인 64x64 화소들의 CU는 깊이 0으로 표현될 수 있다. 32x32 화소들의 CU는 깊이 1로 표현될 수 있다. 16x16 화소들의 CU는 깊이 2로 표현될 수 있다. SCU인 8x8 화소들의 CU는 깊이 3으로 표현될 수 있다. Referring to FIG. 3, an LCU having a depth of 0 may be 64x64 pixels. 0 can be the minimum depth. An SCU with a depth of 3 may be 8x8 pixels. 3 can be the maximum depth. In this case, a CU of 64x64 pixels, which is an LCU, may be expressed as a depth of 0. A CU of 32x32 pixels may be expressed as depth 1. A CU of 16x16 pixels may be expressed as depth 2. A CU of 8x8 pixels, which is an SCU, may be expressed as a depth of 3.

또한, CU가 분할되는지 여부에 대한 정보는 CU의 분할 정보를 통해 표현될 수 있다. 분할 정보는 1비트의 정보일 수 있다. SCU를 제외한 모든 CU는 분할 정보를 포함할 수 있다. 예를 들면, 분할 정보의 값이 0이면, CU가 분할되지 않을 수 있고, 분할 정보의 값이 1이면, CU가 분할될 수 있다.Also, information on whether the CU is divided may be expressed through partition information of the CU. The division information may be 1-bit information. All CUs except the SCU may include partition information. For example, if the value of the partition information is 0, the CU may not be partitioned, and if the value of the partition information is 1, the CU may be partitioned.

도 4는 본 발명의 일 실시 예에 따른 부호화 유닛(CU)이 포함할 수 있는 예측 유닛(PU)의 형태를 도시한 도면이다.4 is a diagram illustrating a shape of a prediction unit PU that may be included in the encoding unit CU according to an embodiment of the present invention.

LCU로부터 분할된 CU 중 더 이상 분할되지 않는 CU는 하나 이상의 예측 유닛(Prediction Unit; PU)들로 나뉘어질 수 있다. 이러한 처리 또한, 분할로 칭해질 수 있다.Among CUs divided from the LCU, CUs that are no longer divided may be divided into one or more prediction units (PUs). This treatment can also be referred to as division.

PU는 예측에 대한 기본 단위일 수 있다. PU는 스킵(skip) 모드, 화면 간 모드 및 화면 내 모드 중 어느 하나로 부호화 및 복호화될 수 있다. PU는 모드에 따라서 다양한 형태로 분할될 수 있다.PU may be a basic unit for prediction. The PU may be encoded and decoded in any one of a skip mode, an inter-screen mode, and an intra-screen mode. The PU can be divided into various types according to the mode.

또한, 부호화 유닛은 예측 유닛으로 분할되지 않고, 부호화 유닛과 예측 유닛은 동일한 크기를 가질 수 있다.Also, the coding unit is not divided into prediction units, and the coding unit and the prediction unit may have the same size.

도 4에서 도시된 것과 같이, 스킵 모드에서는, CU 내에 분할이 존재하지 않을 수 있다. 스킵 모드에서는 분할 없이 CU와 동일한 크기를 갖는 2Nx2N 모드(410)가 지원될 수 있다.As shown in FIG. 4, in the skip mode, partitioning may not exist in the CU. In the skip mode, a 2Nx2N mode 410 having the same size as the CU without division may be supported.

화면 간 모드에서는, CU 내에서 8가지로 분할된 형태들이 지원될 수 있다. 예를 들면, 화면 간 모드에서는 2Nx2N 모드(410), 2NxN 모드(415), Nx2N 모드(420), NxN 모드(425), 2NxnU 모드(430), 2NxnD 모드(435), nLx2N 모드(440) 및 nRx2N 모드(445)가 지원될 수 있다. 화면 내 모드에서는, 2Nx2N 모드(410) 및 NxN 모드(425)가 지원될 수 있다.In the inter-screen mode, eight types of divided forms may be supported within the CU. For example, in the inter-screen mode, 2Nx2N mode 410, 2NxN mode 415, Nx2N mode 420, NxN mode 425, 2NxnU mode 430, 2NxnD mode 435, nLx2N mode 440 and The nRx2N mode 445 may be supported. In the in-screen mode, the 2Nx2N mode 410 and the NxN mode 425 may be supported.

하나의 부호화 유닛은 하나 이상의 예측 유닛으로 분할될 수 있고, 하나의 예측 유닛도 하나 이상의 예측 유닛으로 분할 될 수 있다.One coding unit may be divided into one or more prediction units, and one prediction unit may be divided into one or more prediction units.

예를 들어, 하나의 예측 유닛이 4개의 예측 유닛으로 분할 될 경우, 분할된 4개의 예측 유닛의 가로 및 세로 크기는 분할되기 전 예측 유닛의 가로 및 세로 크기와 비교하여 각각 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 예측 유닛이 4개의 예측 유닛으로 분할 될 경우, 분할된 4개의 예측 유닛은 각각 16x16의 크기를 가질 수 있다. 하나의 예측 유닛이 4개의 예측 유닛으로 분할 될 경우, 예측 유닛은 쿼드트리(quad-tree) 형태로 분할되었다고 할 수 있다.For example, when one prediction unit is divided into 4 prediction units, the horizontal and vertical sizes of the divided four prediction units may have a size of half each compared to the horizontal and vertical sizes of the prediction units before being divided. have. For example, when a prediction unit having a size of 32x32 is divided into four prediction units, each of the divided four prediction units may have a size of 16x16. When one prediction unit is divided into four prediction units, it can be said that the prediction unit is divided into a quad-tree form.

예를 들어, 하나의 예측 유닛이 2개의 예측 유닛으로 분할 될 경우, 분할된 2개의 예측 유닛의 가로 혹은 세로 크기는 분할되기 전 예측 유닛의 가로 혹은 세로 크기와 비교하여 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 예측 유닛이 2개의 예측 유닛으로 세로로 분할 될 경우, 분할된 2개의 예측 유닛은 각각 16x32의 크기를 가질 수 있다. 일 예로, 32x32 크기의 예측 유닛이 2개의 예측 유닛으로 가로로 분할 될 경우, 분할된 2개의 예측 유닛은 각각 32x16의 크기를 가질 수 있다. 하나의 예측 유닛이 2개의 예측 유닛으로 분할 될 경우, 예측 유닛은 이진트리(binary-tree) 형태로 분할되었다고 할 수 있다.For example, when one prediction unit is divided into two prediction units, the horizontal or vertical size of the divided two prediction units may have a size of half compared to the horizontal or vertical size of the prediction unit before being divided. . For example, when a prediction unit having a size of 32x32 is vertically divided into two prediction units, each of the divided prediction units may have a size of 16x32. For example, when a prediction unit having a size of 32x32 is horizontally divided into two prediction units, the divided prediction units may each have a size of 32x16. When one prediction unit is divided into two prediction units, it can be said that the prediction unit is divided in a binary-tree form.

도 5는 본 발명의 일 실시 예에 따른 부호화 유닛(CU)이 포함할 수 있는 변환 유닛(TU)의 형태를 도시한 도면이다.5 is a diagram illustrating a shape of a transformation unit (TU) that may be included in the encoding unit (CU) according to an embodiment of the present invention.

변환 유닛(Transform Unit; TU)은 CU 내에서 변환, 양자화, 역변환 및 역양자화의 과정을 위해 사용되는 기본 단위일 수 있다. TU는 정사각형 형태 또는 직사각형 등의 형태를 가질 수 있다. TU는 CU의 크기 및/또는 형태에 의존적으로(dependent) 결정될 수도 있다.A transform unit (TU) may be a basic unit used for processes of transformation, quantization, inverse transformation, and inverse quantization in the CU. The TU may have a shape such as a square shape or a rectangle. The TU may be determined depending on the size and/or shape of the CU.

LCU로부터 분할된 CU 중, 더 이상 CU들로 분할되지 않는 CU는 하나 이상의 TU들로 분할될 수 있다. 이때, TU의 분할 구조는 쿼드트리(quad-tree) 구조일 수 있다. 예컨대, 도 5에서 도시된 것과 같이, 하나의 CU(510)가 쿼드트리 구조에 따라서 한 번 혹은 그 이상 분할될 수 있다. 하나의 CU가 한 번 이상으로 분할될 경우 재귀적으로 분할된다고 할 수 있다. 분할을 통해, 하나의 CU(510)는 다양한 크기의 TU들로 구성될 수 있다. 또는, CU를 분할하는 수직 선(vertical line) 및/또는 수평 선(horizontal line)의 개수에 기초하여 하나 이상의 TU로 분할될 수도 있다. CU는 대칭형의 TU로 분할될 수도 있고, 비대칭형의 TU로 분할될 수도 있다. 비대칭형의 TU로의 분할을 위해 TU의 크기/형태에 관한 정보가 시그널링될 수도 있고, CU의 크기/형태에 관한 정보로부터 유도될 수도 있다. 또한, 부호화 유닛은 변환 유닛으로 분할되지 않고, 부호화 유닛과 변환 유닛은 동일한 크기를 가질 수 있다.Among CUs divided from the LCU, CUs that are no longer divided into CUs may be divided into one or more TUs. In this case, the split structure of the TU may be a quad-tree structure. For example, as shown in FIG. 5, one CU 510 may be divided once or more according to the quadtree structure. When one CU is divided more than once, it can be said to be recursively divided. Through partitioning, one CU 510 may be composed of TUs of various sizes. Alternatively, the CU may be divided into one or more TUs based on the number of vertical lines and/or horizontal lines dividing the CU. The CU may be divided into symmetric type TUs or asymmetric type TUs. Information about the size/shape of the TU may be signaled for division into an asymmetric TU, or may be derived from information about the size/shape of the CU. Also, the encoding unit is not divided into transformation units, and the encoding unit and the transformation unit may have the same size.

하나의 부호화 유닛은 하나 이상의 변환 유닛으로 분할될 수 있고, 하나의 변환 유닛도 하나 이상의 변환 유닛으로 분할 될 수 있다.One encoding unit may be divided into one or more transform units, and one transform unit may be divided into one or more transform units.

예를 들어, 하나의 변환 유닛이 4개의 변환 유닛으로 분할 될 경우, 분할된 4개의 변환 유닛의 가로 및 세로 크기는 분할되기 전 변환 유닛의 가로 및 세로 크기와 비교하여 각각 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 변환 유닛이 4개의 변환 유닛으로 분할 될 경우, 분할된 4개의 변환 유닛은 각각 16x16의 크기를 가질 수 있다. 하나의 변환 유닛이 4개의 변환 유닛으로 분할 될 경우, 변환 유닛은 쿼드트리(quad-tree) 형태로 분할되었다고 할 수 있다.For example, when one transform unit is divided into four transform units, the horizontal and vertical sizes of the divided four transform units may each have a size of half compared to the horizontal and vertical sizes of the transform units before being divided. have. As an example, when a 32x32 transform unit is divided into four transform units, each of the divided four transform units may have a size of 16x16. When one transform unit is divided into four transform units, it can be said that the transform unit is divided into a quad-tree form.

예를 들어, 하나의 변환 유닛이 2개의 변환 유닛으로 분할 될 경우, 분할된 2개의 변환 유닛의 가로 혹은 세로 크기는 분할되기 전 변환 유닛의 가로 혹은 세로 크기와 비교하여 절반의 크기를 가질 수 있다. 일 예로, 32x32 크기의 변환 유닛이 2개의 변환 유닛으로 세로로 분할 될 경우, 분할된 2개의 변환 유닛은 각각 16x32의 크기를 가질 수 있다. 일 예로, 32x32 크기의 변환 유닛이 2개의 변환 유닛으로 가로로 분할 될 경우, 분할된 2개의 변환 유닛은 각각 32x16의 크기를 가질 수 있다. 하나의 변환 유닛이 2개의 변환 유닛으로 분할 될 경우, 변환 유닛은 이진트리(binary-tree) 형태로 분할되었다고 할 수 있다.For example, when one conversion unit is divided into two conversion units, the horizontal or vertical size of the two divided conversion units may have a size of half compared to the horizontal or vertical size of the conversion unit before division. . For example, when a 32x32 transform unit is vertically divided into two transform units, the divided two transform units may each have a size of 16x32. For example, when a 32x32 transform unit is horizontally divided into two transform units, the divided two transform units may each have a size of 32x16. When one transform unit is divided into two transform units, it can be said that the transform unit is divided into a binary-tree form.

변환 수행 시 잔여 블록을 기-정의된 복수의 변환 방법 중 적어도 하나를 사용하여 변환 시킬 수 있다. 일 예로, 기-정의된 복수의 변환 방법으로 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform) 또는 KLT 등이 이용될 수 있다. 잔여 블록을 변환하기 위해 어떤 변환 방법이 적용되는지는 예측 유닛의 화면 간 예측 모드 정보, 화면 내 예측 모드 정보, 변환 블록의 크기/형태 중 적어도 하나를 이용하여 결정될 수도 있고, 일정한 경우 변환 방법을 지시하는 정보가 시그널링 될 수 있다.When performing transformation, the residual block may be transformed using at least one of a plurality of pre-defined transformation methods. For example, as a plurality of pre-defined transformation methods, Discrete Cosine Transform (DST), Discrete Sine Transform (DST), or KLT may be used. Which transformation method is applied to transform the residual block may be determined using at least one of inter-prediction mode information, intra-prediction mode information, and size/type of the transform block of the prediction unit. Information can be signaled.

화면내 또는 화면간 예측 이후 생성된 잔차 신호는 양자화 과정의 일환으로 변환 과정을 통해 주파수 도메인으로 변환할 수 있다. 이때 변환은 DCT type 2 (DCT-II)외에 다양한 DCT, DST 커널을 사용할 수 있으며, 이러한 변환 커널들은 잔차 신호에 대해 1D transform을 수평 및 수직방향에 대해 각각 수행하는 Separable transform을 수행할 수도 있고, 또는 2D Non-separable transform을 수행할 수 있다. A residual signal generated after intra- or inter- prediction may be converted into a frequency domain through a transformation process as part of a quantization process. In this case, a variety of DCT and DST kernels other than DCT type 2 (DCT-II) can be used for transformation, and these transformation kernels may perform Separable transforms that perform 1D transform for the residual signal in the horizontal and vertical directions, respectively, Alternatively, 2D Non-separable transform may be performed.

일 예로, 변환에 사용되는 DCT, DST type은 표 1의 예와 같이 DCT-II 외에 DCT-V, DCT-VIII, DST-I, DST-VII를 1D 변환 시 적응적으로 사용할 수 있으며, Transform set을 구성하여 변환에 사용된 DCT 또는 DST 타입을 유도할 수 있다. 예를 들어, 화면내 예측모드에 따라 수평, 수직방향에 대해 서로 다른 Transform set을 기 정의한 후, 부/복호화기에서 현재 블록의 화면내 예측 모드 및 이에 대응하는 Transform set에 포함된 트랜스폼을 이용하여 변환 및 역변환을 수행할 수 있다. 이 경우, Transform set은 전송되지 않고 부/복호화기에서 아래 그림과 같이 동일한 규칙에 따라 매핑되며, 다만, 해당 Transform set에 속한 Transform 중에서 어떤 Transform 이 사용되었는지를 지시하는 정보가 전송될 수 있다. 이와 같이 다양한 Transform을 사용하는 방법은 화면내 또는 화면간 예측을 통한 잔차 신호에 적용할 수 있다. As an example, DCT and DST types used for transformation can be adaptively used when converting DCT-V, DCT-VIII, DST-I, and DST-VII to 1D in addition to DCT-II as shown in Table 1. Transform set The DCT or DST type used for conversion can be derived by configuring. For example, after pre-defining different transform sets for the horizontal and vertical directions according to the intra prediction mode, the encoder/decoder uses the intra prediction mode of the current block and the transform included in the corresponding transform set. Thus, transformation and inverse transformation can be performed. In this case, the transform set is not transmitted and is mapped by the encoder/decoder according to the same rules as shown in the figure below, but information indicating which transform is used among transforms belonging to the corresponding transform set may be transmitted. This method of using various transforms can be applied to a residual signal through intra- or inter-screen prediction.

1차 변환 (Primary transform, 또는 1D 방향 (수직, 수평) 각각에 대해 서로 다른 트랜스폼을 적용함에 따라 Multiple Transform Selection (MTS)을 잔차 신호에 적용할 수 있으며, 현재 부호화 블록에 대한 MTS 적용 여부를 나타내는 플래그 (tu_mts_flag) 및 표 1과 같이 수평 및/또는 수직 방향에 어떤 트랜스폼이 사용되었는지를 알려주는 MST 인덱스 (mts_idx) 정보가 명시적으로 전송되거나 또는 묵시적으로 적어도 하나 이상의 주변 복원 블록으로부터 유도될 수 있다. Multiple Transform Selection (MTS) can be applied to the residual signal by applying a different transform for each of the primary transform (Primary transform, or 1D direction (vertical, horizontal)), and whether to apply MTS to the current coding block Indicative flag (tu_mts_flag) and MST index (mts_idx) information indicating which transform is used in the horizontal and/or vertical direction as shown in Table 1 is explicitly transmitted or implicitly derived from at least one neighboring restoration block. I can.

Figure pat00001
Figure pat00001

도 6은 본 발명의 일 실시 예에 따른 2차 변환이 수행되는 과정을 나타내는 도면이다.6 is a diagram illustrating a process of performing a quadratic transformation according to an embodiment of the present invention.

표 1 및 관련 내용에서 상술한 MTS 변환이 수행된 후, 변환 계수에 대한 에너지 집중도를 높이기 위해 2차 변환 (Secondary transform)을 수행할 수 있다. 2차 변환도 1차 변환과 마찬가지로 separable 또는 Non-separable 변환 (NSST: Non separable secondary transform)을 통해 적용할 수 있으며, 2차 변환 사용 유무에 대한 플래그 및 인덱스 정보가 전송될 수 있다.After the MTS transform described above in Table 1 and related contents is performed, secondary transform may be performed to increase the energy concentration for the transform coefficient. Like the first transform, the second transform may be applied through a separable or non-separable secondary transform (NSST), and flag and index information about whether the second transform is used or not may be transmitted.

본 발명의 일 실시 예에 따를 때, 현재 부호화 블록에 대한 화면내 예측 부/복호화는 화면내 예측모드 유도 단계, 참조샘플 구성 단계, 화면내 예측 수행 단계로 구성될 수 있다.According to an embodiment of the present invention, the intra prediction encoding/decoding of the current coding block may include an intra prediction mode derivation step, a reference sample construction step, and an intra prediction operation step.

현재 블록에 대한 화면내 예측 모드를 유도함에 있어, 하나 이상의 주변 블록의 화면내 예측 모드를 이용하여 유도하는 방법, 현재 블록의 화면내 예측 모드를 엔트로피 부호화/복호화하여 유도하는 방법, 주변 블록의 부호화 파라미터 이용하는 방법 중 적어도 하나 이상을 이용하여 현재 블록의 화면내 예측 모드를 유도할 수 있다. 이때, 주변 블록은 현재 블록의 부/복호화 이전에 복원된 하나 이상의 블록일 수 있으며, 상기 주변 블록이 픽처, 슬라이스, 타일, CTU(Coding Tree Unit) 등 중 적어도 하나의 소정의 유닛의 경계 밖에 해당하거나 화면간 부/복호화 블록에 해당하여 가용하지 않은 경우, 상기 주변 블록에 해당하는 화면내 예측 모드를 DC 모드 또는 Planar 모드 또는 소정의 화면내 예측 모드로 대체할 수 있다. 이때, 현재 블록의 크기는 W x H 일 수 있으며, W 및 H 는 각각 양의 정수일 수 있으며, 예를 들어 2, 4, 8, 16, 32, 64, 128, 256, 512 중 적어도 하나일 수 있다.In deriving the intra prediction mode for the current block, a method of deriving using the intra prediction mode of one or more neighboring blocks, a method of deriving the intra prediction mode of the current block by entropy encoding/decoding, and encoding of neighboring blocks The intra prediction mode of the current block may be derived by using at least one of the parameters using methods. At this time, the neighboring block may be one or more blocks restored before encoding/decoding of the current block, and the neighboring block is outside the boundary of at least one predetermined unit among pictures, slices, tiles, and coding tree units (CTU). Or, if it corresponds to an inter-screen encoding/decoding block and is not available, the intra prediction mode corresponding to the neighboring block may be replaced with a DC mode, a planar mode, or a predetermined intra prediction mode. At this time, the size of the current block may be W x H, and W and H may be positive integers, respectively, for example, at least one of 2, 4, 8, 16, 32, 64, 128, 256, 512 have.

주변 블록의 화면내 예측 모드를 이용함에 있어, 주변 블록의 하나 이상의 모드를 조합함으로써 현재 블록의 화면내 예측 모드를 유도할 수 있다. 예를 들어, 주변 블록의 하나 이상의 화면내 예측 모드의 평균값, 중간값, 최대값, 최소값, 또는 평균값, 중간값, 최대값, 최소값에 해당하는 화면내 예측 모드에서 +N 또는 -N만큼 해당하는 화면내 예측 모드를 현재 블록의 화면내 예측 모드로 유도할 수 있다. 이때, 화면내 예측 모드는 모드 번호, 모드 값, 모드 각도 중 적어도 하나 이상으로 표현될 수 있다. 예를 들어, 두 개의 화면내 예측 모드의 평균은 두 개의 모드 번호의 중간 번호, 두 개의 모드 값의 중간 값, 두 개의 모드 각도 차이의 중간 각도 중 적어도 하나를 의미할 수 있다. 이때 N은 양의 정수를 의미할 수 있다.In using the intra prediction mode of the neighboring block, the intra prediction mode of the current block may be derived by combining one or more modes of the neighboring block. For example, the average value, median value, maximum value, minimum value, or average value, median value, maximum value, minimum value of one or more in-screen prediction modes of neighboring blocks corresponds to +N or -N in the in-screen prediction mode. The intra prediction mode can be derived as the intra prediction mode of the current block. In this case, the intra prediction mode may be expressed by at least one of a mode number, a mode value, and a mode angle. For example, the average of two intra prediction modes may mean at least one of an intermediate number of two mode numbers, an intermediate value of two mode values, and an intermediate angle between two mode angles. In this case, N may mean a positive integer.

주변 블록의 화면내 예측 모드를 이용함에 있어, MPM(Most Probable Mode)을 이용하여 현재 블록의 화면내 예측 모드를 유도할 수 있다. 상기 MPM을 이용함에 있어, MPM 리스트를 구성할 수 있으며 MPM 리스트에 포함되는 화면내 예측 모드는 주변 블록의 화면내 예측 모드에 기반하여 구성될 수 있다. 상기 리스트에 포함되는 후보 모드의 개수는 소정의 양의 개수 N개 일 수 있다. 상기 MPM 후보 모드의 개수는 블록의 크기/형태에 따라 다를 수 있다. 이때, MPM 리스트에 포함되는 적어도 한 개 이상의 화면내 예측모드들은 부/복호화가 완료된 적어도 하나 이상의 공간적 주변 블록의 화면내 예측 모드 및/또는 임의의 화면내 예측모드를 지정하여 MPM 리스트를 구성할 수 있다. In using the intra prediction mode of the neighboring block, the intra prediction mode of the current block may be derived using the Most Probable Mode (MPM). In using the MPM, an MPM list may be configured, and an intra prediction mode included in the MPM list may be configured based on an intra prediction mode of a neighboring block. The number of candidate modes included in the list may be a predetermined amount of N. The number of MPM candidate modes may vary according to the size/type of a block. At this time, the at least one or more intra prediction modes included in the MPM list can be configured by designating an intra prediction mode and/or an arbitrary intra prediction mode of at least one spatial neighboring block on which encoding/decoding has been completed. have.

상기 유도한 MPM 리스트에 현재 블록의 화면내 예측 모드와 동일한 모드가 존재하는 여부를 나타내는 지시자 intra_luma_mpm_flag를 부/복호화 할 수 있다.An indicator intra_luma_mpm_flag indicating whether the same mode as the intra prediction mode of the current block exists in the derived MPM list may be encoded/decoded.

상기 지시자가 MPM 리스트에 동일한 모드가 존재함을 나타내는 경우, MPM 리스트에 포함된 모드 중 어떤 모드인지를 나타내는 intra_luma_mpm_idx 정보를 부/복호화하여 현재 블록의 화면내 예측 모드를 유도할 수 있다. When the indicator indicates that the same mode exists in the MPM list, intra_luma_mpm_idx information indicating which mode is included in the MPM list may be encoded/decoded to induce an intra prediction mode of the current block.

상기 MPM flag가 0인 경우, 하나 이상의 화면내 예측 모드에 대해 2차 MPM 후보 리스트를 구성하고, 2차 MPM 색인(intra_luma_second_mpm_idx)을 통해 화면내 예측 모드를 유도할 수 있다. 상기 2차 MPM flag (intra_luma_second_mpm_flag)가 1인 경우, 휘도 성분의 화면내 예측 모드는 2차 MPM 색인(intra_luma_second_mpm_idx)와 부호화/복호화된 인접 유닛들의 화면내 예측 모드 중 적어도 하나 이상을 이용하여 유도될 수 있다.When the MPM flag is 0, a secondary MPM candidate list may be configured for one or more intra prediction modes, and an intra prediction mode may be derived through a secondary MPM index (intra_luma_second_mpm_idx). When the second MPM flag (intra_luma_second_mpm_flag) is 1, the intra prediction mode of the luminance component may be derived using at least one of a second MPM index (intra_luma_second_mpm_idx) and an intra prediction mode of encoded/decoded adjacent units. have.

화면내 예측모드 부/복호화를 위한 MPM 및 2nd MPM 리스트에 포함되는 하나 이상의 화면내 예측 후보 모드들을 구성하기 위해 주변 부호화된 정보를 이용할 수 있다. In order to configure the MPM for encoding/decoding the intra prediction mode and one or more intra prediction candidate modes included in the 2nd MPM list, surrounding coded information may be used.

상기 지시자가 MPM 리스트에 동일한 모드가 존재하지 않음을 나타내는 경우, 현재 블록의 화면내 예측 모드를 부/복호화하여 현재 블록의 화면내 예측 모드를 유도할 수 있다. 이때, MPM 리스트에 포함되지 않은 화면내 예측 모드를 오름 차순 또는 내림 차순 중 적어도 하나로 정렬할 수 있다.When the indicator indicates that the same mode does not exist in the MPM list, the intra prediction mode of the current block may be derived by encoding/decoding the intra prediction mode of the current block. In this case, intra prediction modes not included in the MPM list may be sorted in at least one of an ascending order or a descending order.

색차 성분의 화면내 예측 모드는, 색차 성분 화면내 예측 모드 색인(intra_chroma_pred_mode) 및/또는 대응하는 휘도 블록의 화면내 예측 모드 중 적어도 하나 이상을 이용하여 유도될 수 있다. The intra prediction mode of the chrominance component may be derived using at least one of an intra_chroma_pred_mode index of the chrominance component and/or an intra prediction mode of a corresponding luminance block.

또는 상기 유도한 MPM 리스트의 소정의 후보를 상기 현재 블록의 화면내 예측 모드로 유도할 수 있다. 예를 들어, 현재 블록의 화면내 예측 모드를 MPM 리스트의 첫 번째인 리스트 0에 해당하는 모드로 유도할 수 있다. 또는, 리스트 내의 소정의 모드에 해당하는 인덱스를 부/복호화하여 해당 모드를 현재 블록의 화면내 예측 모드로 유도할 수 있다.Alternatively, a predetermined candidate of the derived MPM list may be derived into an intra prediction mode of the current block. For example, the intra prediction mode of the current block may be derived to a mode corresponding to list 0, which is the first of the MPM list. Alternatively, by encoding/decoding an index corresponding to a predetermined mode in the list, the corresponding mode may be derived as an intra prediction mode of the current block.

현재 부호화 블록의 화면내 예측 모드가 MPM 리스트에 포함되지 않은 경우, MPM 리스트에 포함된 화면내 예측 모드를 제외한 나머지 화면내 예측 모드를 임의의 순서로 정렬하여 현재 부호화 블록의 화면내 예측 모드에 해당하는 인덱스 (intra_luma_mpm_remainder)를 명시적으로 전송할 수 있다.If the intra prediction mode of the current coding block is not included in the MPM list, the remaining intra prediction modes excluding the intra prediction modes included in the MPM list are arranged in a random order and correspond to the intra prediction mode of the current coding block. The index (intra_luma_mpm_remainder) can be explicitly transmitted.

현재 부호화 블록의 화면내 예측 모드가 MPM 리스트 및 2nd MPM 리스트에 포함되지 않은 경우, MPM 리스트 및/또는 2nd MPM 리스트에 포함된 화면내 예측 모드를 제외한 나머지 화면내 예측 모드를 임의의 순서로 정렬하여 현재 부호화 블록의 화면내 예측 모드에 해당하는 인덱스(intra_luma_mpm_remainder)를 명시적으로 전송할 수 있다.If the intra prediction mode of the current coding block is not included in the MPM list and the 2nd MPM list, the remaining intra prediction modes excluding the intra prediction modes included in the MPM list and/or the 2nd MPM list are arranged in a random order. An index (intra_luma_mpm_remainder) corresponding to the intra prediction mode of the current coding block may be explicitly transmitted.

현재 블록이 화면내 예측 모드로 부호화된 경우, MPM 리스트에 포함되는 적어도 한 개 이상의 화면내 예측 모드들은 부/복호화가 완료된 적어도 하나 이상의 공간적 주변 블록의 화면내 예측 모드 및/또는 임의의 화면내 예측 모드를 지정하여 MPM 리스트를 구성할 수 있다.When the current block is encoded in an intra prediction mode, at least one or more intra prediction modes included in the MPM list are an intra prediction mode of at least one or more spatial neighboring blocks for which encoding/decoding is completed and/or an arbitrary intra prediction. You can configure the MPM list by specifying the mode.

도 7은 본 발명의 일 실시 예에 따른 MPM 후보 리스트(Candidate List)를 구성하기 위해 참조하는 주변 블록을 나타내는 도면이다.7 is a diagram illustrating neighboring blocks referenced to construct an MPM candidate list according to an embodiment of the present invention.

예를 들어, MPM 리스트를 구성하는 화면내 예측 모드 수를 6개라 가정할 때, 도 7의 예와 같이 공간적 주변 블록으로부터 MPM 리스트에 포함되는 화면내 예측 모드를 최대 5개까지 순차적으로 유도할 수 있다. 이때, 주변 블록들로부터 화면내 예측모드를 유도하는 순서는 부/복호화기에서 임의로 설정할 수 있으며, 일 예로 left (L), above (A), below left (BL), above right (AR), and above left (AL) 순서로 유도할 수 있다. 이때, 비방향성 모드인 Planar 및/또는 DC 모드의 경우 발생확률이 높은 화면내 예측 모드로 간주할 수 있기 때문에 상기 공간적 주변 블록으로부터 유도된 5개의 화면내 예측모드 내에 Planar 및/또는 DC 모드가 포함되지 않은 경우, Planar 및/또는 DC 모드를 포함시켜 MPM 리스트를 구성할 수 있다. 이때, MPM 리스트상에 Planar 및/또는 DC 모드가 위치되는 순서는 부/복호화기에서 임의로 설정할 수 있으며, 일 예로 left, above, planar, DC, below left, above right, and above left 순서로 구성할 수 있으며, 상기 구성된 MPM 리스트 내의 화면내 예측모드가 서로 다른 예측 모드 값을 가지는지에 대한 중복성 검사를 수행할 수 있다. For example, assuming that the number of intra prediction modes constituting the MPM list is 6, as in the example of FIG. 7, up to 5 intra prediction modes included in the MPM list can be sequentially derived from spatial neighboring blocks. have. At this time, the order of inducing the intra prediction mode from the neighboring blocks can be arbitrarily set by the encoder/decoder, for example, left (L), above (A), below left (BL), above right (AR), and It can be derived in the above left (AL) order. In this case, the planar and/or DC mode, which is a non-directional mode, can be regarded as an intra prediction mode with a high probability of occurrence, so planar and/or DC mode are included in the five intra prediction modes derived from the spatial neighboring blocks. If not, it is possible to configure the MPM list by including the planar and/or DC mode. At this time, the order in which the planar and/or DC mode are located on the MPM list can be arbitrarily set by the encoder/decoder, and for example, the order of left, above, planar, DC, below left, above right, and above left. In addition, it is possible to perform a redundancy check on whether intra prediction modes in the configured MPM list have different prediction mode values.

도 8은 본 발명의 일 실시 예에 따른 화면내 예측 모드를 나타내는 도면이다.8 is a diagram illustrating an intra prediction mode according to an embodiment of the present invention.

도 7 및 관련 내용에서 상술한 중복성 검사 이후 구성된 MPM 리스트 내에 화면내 예측 모드 수가 부/복호화기에서 허용한 MPM 리스트에 포함되는 화면내 예측모드에 대한 최대 개수(예를 들어, 6개)보다 작은 경우, MPM 리스트에 포함된 화면내 예측 모드 중에서 방향성을 가지는 화면내 예측 모드에 +1, -1값에 해당하는 화면내 예측 모드를 할당할 수 있다. 만약, 상기의 과정을 통해서도 6개의 MPM 을 채우지 못하는 경우, 도 8에 표시된 vertical, horizontal, mode 2, diagonal mode를 순서대로 채워나감으로써 최대 6개의 서로 다른 화면내 예측 모드를 가지는 MPM 리스트를 구성할 수 있다. 이때, 부/복호화기에서 허용된 화면내 예측 모드 수가 최대 67인 경우, Planar (mode 0), DC (mode 1) 외에 모드 2부터 66까지가 방향성에 대한 화면내 예측 모드를 나타내며, vertical은 mode 50, horizontal은 mode 18, diagonal은 mode 34를 나타낼 수 있다. In FIG. 7 and related contents, the number of intra prediction modes in the MPM list configured after the redundancy check described above is smaller than the maximum number (eg, 6) of intra prediction modes included in the MPM list allowed by the encoder/decoder. In this case, an intra prediction mode corresponding to a value of +1 or -1 may be allocated to an intra prediction mode having a directionality among intra prediction modes included in the MPM list. If 6 MPMs cannot be filled through the above process, the vertical, horizontal, mode 2, and diagonal modes shown in FIG. 8 are filled in order to construct an MPM list having up to 6 different intra prediction modes. I can. At this time, if the number of intra prediction modes allowed by the encoder/decoder is up to 67, in addition to Planar (mode 0) and DC (mode 1), modes 2 to 66 represent intra prediction modes for directionality, and vertical is mode 50, horizontal may indicate mode 18, diagonal may indicate mode 34.

화면 내 예측 모드를 기반으로 현재 블록 또는 현재 블록보다 작은 크기/형태를 가지는 서브 블록에 대한 화면내 예측을 수행함에 있어, 예측을 위해 사용되는 참조 샘플을 구성할 수 있다. 이하 후술할 내용에서 현재 블록은 서브 블록을 의미할 수 있다. 상기 참조 샘플은 주변의 복원된 하나 이상의 샘플 또는 샘플 조합을 통하여 구성할 수 있으며, 상기 구성한 참조 샘플에 대하여 필터링을 적용할 수 있다. 참조 샘플 구성에 사용되는 복원 샘플 라인의 개수와 위치는 부호화 트리 블록 내 현재 블록의 위치에 따라 달라질 수 있다. 이때, 복수의 복원 샘플 라인 상의 각 복원 샘플들을 그대로 사용하거나, 동일 복원 샘플 라인 상의 샘플간 필터링 또는 서로 다른 복원 샘플 라인 상의 샘플간 필터링 후 참조 샘플을 생성하기 위한 계산에 이용할 수 있다. 상기 구성한 참조 샘플을 ref[m, n], 주변의 복원된 샘플 또는 이를 필터링한 샘플을 rec[m, n]으로 나타낼 수 있으며, 상기 m 또는 n은 소정의 정수 값일 수 있다. 현재 블록의 가로(W) 및 세로(H) 크기가 (W x H)인 경우, 현재 블록 내의 왼쪽 상단 샘플 위치는 (0, 0)일 때, 해당 샘플 위치를 기준으로 가장 근접한 왼쪽 상단의 참조샘플의 상대적인 위치를 (-1, -1)로 설정할 수 있다.When performing intra prediction on a current block or a subblock having a size/shape smaller than that of the current block based on the intra prediction mode, a reference sample used for prediction may be configured. In the following description, the current block may mean a sub-block. The reference sample may be configured through one or more reconstructed samples or a combination of samples, and filtering may be applied to the configured reference sample. The number and position of reconstructed sample lines used in the reference sample configuration may vary according to the position of the current block in the coding tree block. In this case, each of the reconstructed samples on the plurality of reconstructed sample lines may be used as it is, or may be used for calculation for generating a reference sample after filtering between samples on the same reconstructed sample line or filtering between samples on different reconstructed sample lines. The configured reference sample may be represented by ref[m, n], and a reconstructed sample or a filtered sample may be represented by rec[m,n], and m or n may be a predetermined integer value. If the current block's horizontal (W) and vertical (H) sizes are (W x H), the closest upper left reference to the sample position when the upper left sample position in the current block is (0, 0) You can set the relative position of the sample to (-1, -1).

도 9는 본 발명의 일 실시 예에 따른 현재 블록에 인접한 참조 샘플 라인을 이용하여 화면내 예측을 수행하는 과정을 나타내는 도면이다.9 is a diagram illustrating a process of performing intra prediction using a reference sample line adjacent to a current block according to an embodiment of the present invention.

화면내 예측 시, 현재 블록에 인접한 적어도 하나 이상의 복원 샘플 라인 중에서 적어도 하나 이상의 복원 샘플 라인을 현재 블록 또는 현재 블록의 서브 블록에 대한 참조 샘플로 설정할 수 있다. 예를 들어, 현재 블록에 대해 주변 복원이 완료된 양의 정수 N개의 복원 샘플 라인들을 현재 블록에 대한 화면내 예측을 위한 참조 샘플 라인 후보로 설정하고, 이 중에서 율-왜곡 측면에서 중에서 가장 최적의 참조 샘플 라인을 현재 블록의 참조 샘플 라인으로 구성할 수 있다. 이때, 참조 샘플 라인에 대한 인덱스는 명시적으로 전송되거나 또는 묵시적으로 유도될 수 있다. 일 예로, 도 9를 참조하면, 참조 샘플 라인 수가 4개일 수 있으며, 현재 블록은 화면내 예측을 위한 최적 참조 샘플 라인에 대한 인덱스 정보를 복호화기에 시그널링 하거나 현재 블록의 화면내 예측 모드 정보 및/또는 현재 부호화 블록의 크기/깊이 등의 정보를 이용하여 묵시적으로 유도할 수 있다. During intra prediction, at least one reconstructed sample line among at least one reconstructed sample line adjacent to the current block may be set as a reference sample for a current block or a subblock of the current block. For example, a positive integer N reconstructed sample lines for which peripheral restoration has been completed for the current block are set as reference sample line candidates for intra prediction for the current block, and among them, the most optimal reference in terms of rate-distortion A sample line can be configured as a reference sample line of the current block. In this case, the index for the reference sample line may be explicitly transmitted or may be implicitly derived. As an example, referring to FIG. 9, the number of reference sample lines may be 4, and the current block signals index information on an optimal reference sample line for intra prediction to a decoder, or intra prediction mode information of the current block and/or It can be implicitly derived using information such as the size/depth of the current coding block.

본 발명의 일 실시 예에 따를 때, 멀티 참조 라인을 이용한 화면내 예측은 특정 조건에서만 적용될 수 있다. 예를 들어, 참조 샘플 라인 인덱스에 대한 비트량을 절감하기 위해 MPM으로 결정된 현재 블록에 대해서만 추가적으로 멀티 참조 라인 기반 화면내 예측을 수행한 후, 멀티 참조 라인에 대한 인덱스 정보를 시그널링 할 수 있다.According to an embodiment of the present invention, intra prediction using multi-reference lines can be applied only under specific conditions. For example, in order to reduce the amount of bits for the reference sample line index, after multi-reference line-based intra prediction is additionally performed on only the current block determined as MPM, index information on the multi-reference line may be signaled.

본 발명의 일 실시 예에 따를 때, 멀티 참조 라인에 기반한 현재 부호화 블록에 대한 화면내 예측 부/복호화는 소정의 조건 및/또는 부호화 환경에서 적용할 수 있다. According to an embodiment of the present invention, intra prediction coding/decoding for a current coding block based on a multi-reference line may be applied under a predetermined condition and/or an encoding environment.

일 예로, 멀티 참조 라인 기반의 화면내 예측 부/복호화는 DC 및/또는 Planar 모드와 같이 특정 화면내 예측 모드에서 적용되거나 또는 적용되지 않을 수 있다. For example, the multi-reference line-based intra prediction encoding/decoding may or may not be applied in a specific intra prediction mode such as a DC and/or Planar mode.

다른 예로, 멀티 참조 라인 기반의 화면내 예측 부/복호화는 Wide angle prediction 및/또는 PDPC (Position dependent intra prediction combination)와 같은 화면내 예측 부호화 방법에만 적용되거나 또는 적용되지 않을 수 있다. As another example, multi-reference line-based intra prediction coding/decoding may or may not be applied only to intra prediction coding methods such as wide angle prediction and/or position dependent intra prediction combination (PDPC).

또 다른 예로, 멀티 참조 라인 기반의 화면내 예측 부/복호화는 현재 부호화 되는 블록(CU: Coding block)의 가로 및/또는 세로 크기, binary depth, ternary depth 부호화 파라미터 중 적어도 하나 이상의 부호화 파라미터의 값에 따라 조건적으로 적용되거나 또는 적용되지 않을 수 있다. As another example, the multi-reference line-based intra prediction coding/decoding is performed based on the values of at least one coding parameter among the horizontal and/or vertical size, binary depth, and ternary depth coding parameters of a currently coded block (CU). It may or may not be applied conditionally accordingly.

또 다른 예로, CTU 및/또는 CU 크기에 따라 멀티 참조 라인 기반의 화면내 예측이 적용되거나 또는 적용되지 않을 수 있다. As another example, multi-reference line-based intra prediction may or may not be applied according to the CTU and/or CU size.

또 다른 예로, quaternary tree leaf node의 최소값 (MinQTSize)에 기반하여 멀티 참조 라인을 이용한 화면내 예측이 적용되거나 또는 적용되지 않을 수 있다. As another example, intra prediction using multi-reference lines may or may not be applied based on the minimum value (MinQTSize) of a quaternary tree leaf node.

또 다른 예로, binary tree root node의 최대값 (MaxBtSize)에 기반하여 멀티 참조 라인을 이용한 화면내 예측이 적용되거나 또는 적용되지 않을 수 있다.As another example, intra prediction using multi-reference lines may or may not be applied based on the maximum value (MaxBtSize) of the binary tree root node.

또 다른 예로, binary tree root node의 최소값 (MinBtSize)에 기반하여 멀티 참조 라인을 이용한 화면내 예측이 적용되거나 또는 적용되지 않을 수 있다.As another example, intra prediction using multi-reference lines may or may not be applied based on the minimum value (MinBtSize) of the binary tree root node.

또 다른 예로, ternary tree root node의 최대값 (MaxTtSize)에 기반하여 멀티 참조 라인을 이용한 화면내 예측이 적용되거나 또는 적용되지 않을 수 있다.As another example, intra prediction using multi-reference lines may or may not be applied based on the maximum value (MaxTtSize) of the ternary tree root node.

또 다른 예로, ternary tree root node의 최소값 (MinTtSize)에 기반하여 멀티 참조 라인을 이용한 화면내 예측이 적용되거나 또는 적용되지 않을 수 있다.As another example, intra prediction using multi-reference lines may or may not be applied based on the minimum value (MinTtSize) of the ternary tree root node.

또 다른 예로, multi-type tree 분할의 최대 계층적 깊이값 (MaxMttDepth)에 기반하여 멀티 참조 라인을 이용한 화면내 예측이 적용되거나 또는 적용되지 않을 수 있다.As another example, intra prediction using multi-reference lines may or may not be applied based on the maximum hierarchical depth value (MaxMttDepth) of multi-type tree segmentation.

본 발명의 일 실시 예에 따를 때, 멀티 참조 라인 기반의 현재 부호화 블록에 대한 화면내 예측 부호화 시, 현재 부호화 블록에서 선택된 참조 라인 인덱스에 기반하여 MPM 후보 리스트를 재구성할 수 있다. 한편, 현재 블록의 최적 멀티 참조 라인 인덱스는 현재 블록에 대해 허용되는 화면내 예측을 위한 멀티 참조 라인 각각에 대해 율-왜곡 최적화를 수행한 후, 최소의 율-왜곡 비용값 (Rate-Distortion Cost)을 가지는 참조 라인 인덱스를 의미할 수 있다.According to an embodiment of the present invention, when intra prediction encoding a current coding block based on a multi-reference line, an MPM candidate list may be reconstructed based on a reference line index selected from the current coding block. Meanwhile, the optimal multi-reference line index of the current block is the minimum rate-distortion cost value after rate-distortion optimization is performed for each of the multi-reference lines for intra prediction allowed for the current block. May mean a reference line index having.

일 예로, 도 7에 도시된 주변 복원 블록들에 대해 기 정의된 스캐닝 순서에 따라 화면내 예측 모드를 유도하여 MPM 후보 리스트를 구성 한 후, 현재 블록의 최적 멀티 참조 라인 인덱스와 동일한 참조 라인 인덱스를 가지는 임의의 주변 블록의 화면내 예측 모드를 MPM 후보 리스트의 첫 번째 인덱스에 설정된 화면내 예측 모드와 교환할 수 있다. For example, after constructing an MPM candidate list by inducing an intra prediction mode according to a predefined scanning order for neighboring reconstructed blocks shown in FIG. 7, a reference line index equal to the optimal multi-reference line index of the current block is determined. The branch can exchange the intra prediction mode of an arbitrary neighboring block with the intra prediction mode set at the first index of the MPM candidate list.

다른 예로, 도 7에 도시된 주변 복원 블록들에 대해 기 정의된 스캐닝 순서에 따라 화면내 예측 모드를 유도하여 MPM 후보 리스트를 구성 한 후, 현재 블록의 최적 멀티 참조 라인 인덱스와 동일한 참조 라인 인덱스를 가지는 임의의 주변 블록의 화면내 예측 모드를 MPM 후보 리스트의 첫 번째 인덱스가 나타내는 화면내 예측 모드로 설정하고, 기존의 첫 번째 인덱스가 가리키는 화면내 예측 모드를 두 번째 인덱스가 나타내는 화면내 예측 모드로 설정함으로써 MPM 후보 리스트를 재구성할 수 있다.As another example, after constructing an MPM candidate list by inducing an intra prediction mode according to a predefined scanning order for neighboring reconstructed blocks shown in FIG. 7, a reference line index equal to the optimal multi-reference line index of the current block is determined. Branches set the intra prediction mode of an arbitrary neighboring block as the intra prediction mode indicated by the first index of the MPM candidate list, and the existing intra prediction mode indicated by the first index as the intra prediction mode indicated by the second index. By setting, the MPM candidate list can be reconstructed.

또 다른 예로, 도 7에 도시된 주변 복원 블록들에 대해 임의의 스캐닝 순서에 따라 화면내 예측 모드를 유도하여 MPM 후보 리스트를 구성 할 때, MPM 후보는 주변 블록의 화면내 예측 모드와 멀티 참조 라인 인덱스를 현재 부호화 블록의 화면내 예측 모드와 멀티 참조 라인 인덱스로 유도할 수 있다. 이때, 특정 MPM idx가 주변 복원 블록을 가리키지 않는 경우, 멀티 참조 라인 인덱스는 임의로 정의된 멀티 참조 라인 인덱스 값을 기본값으로 설정할 수 있다.As another example, when constructing an MPM candidate list by inducing an intra prediction mode for neighboring reconstructed blocks shown in FIG. 7 according to an arbitrary scanning order, the MPM candidate is an intra prediction mode and a multi-reference line of the neighboring block. The index can be derived from the intra prediction mode of the current coding block and the multi-reference line index. In this case, when a specific MPM idx does not indicate a neighboring restoration block, the multi-reference line index may set a randomly defined multi-reference line index value as a default value.

본 발명의 일 실시 예에 따를 때, 멀티 참조 라인 기반의 현재 부호화 블록에 대한 화면내 예측 부호화 시, 현재 부호화 블록의 화면내 예측을 위한 부호화 파라미터는 주변 복원 블록을 이용하여 유도할 수 있다. 예를 들어, 임의의 플래그 (imm_flag)를 정의하여 해당 플래그에 따라 주변 블록의 화면내 예측 부호화에 사용된 부호화 파라미터를 묵시적으로 유도할 수 있다. 상기 플래그의 명칭은 다를 수 있다.According to an embodiment of the present invention, when intra prediction encoding a current coded block based on a multi-reference line, a coding parameter for intra prediction of the current coded block may be derived using a neighboring reconstructed block. For example, by defining an arbitrary flag (imm_flag), encoding parameters used for intra prediction encoding of neighboring blocks may be implicitly derived according to the corresponding flag. The name of the flag may be different.

일 예로, MPM flag가 1일 때, imm_flag가 1이면 MPM idx가 가리키는 주변 블록의 화면내 예측 모드, 참조라인 인덱스, 1차 변환 플래그 및 인덱스, 2차 변환 플래그 및 인덱스 정보 중에서 적어도 하나 이상의 정보를 현재 블록의 화면내 예측 부호화 과정에서 묵시적으로 유도할 수 있다. As an example, when the MPM flag is 1, if imm_flag is 1, at least one of information from the intra prediction mode of the neighboring block indicated by the MPM idx, a reference line index, a first transform flag and index, a second transform flag, and index information It can be implicitly derived during the intra prediction encoding process of the current block.

다른 예로, imm_flag가 1이면 MPM 플래그를 전송할 필요 없이 MPM idx가 가리키는 주변 블록의 화면내 예측 모드, 참조라인 인덱스, 1차 변환 플래그 및 인덱스, 2차 변환 플래그 및 인덱스 정보 중에서 적어도 하나 이상의 정보를 현재 블록의 화면내 예측 부호화 과정에서 묵시적으로 유도할 수 있다. As another example, if imm_flag is 1, at least one of the intra prediction mode, reference line index, primary transformation flag and index, secondary transformation flag, and index information of the neighboring block indicated by MPM idx without the need to transmit the MPM flag It can be implicitly derived in the process of intra prediction coding of a block.

본 발명의 일 실시 예에 따를 때, 현재 부호화 블록을 화면내 부/복호화 시, 복원이 완료된 주변 블록들 중 적어도 하나 이상의 복원 블록으로부터 화면내 부/복호화에 필요한 휘도 성분에 대한 화면내 예측 모드(intra_luma_pred_mode), 멀티 참조 라인 인덱스(intra_luma_ref_idx), 트랜스폼 정보(tu_mts_flag, mts_idx), 색차 성분 화면내 예측 모드(intra_chroma_pred_mode)중 적어도 하나 이상의 부/복호화 정보를 유도할 수 있다.According to an embodiment of the present invention, when the current coding block is intra-/decoded, an intra-prediction mode for a luminance component required for intra/decoding from at least one reconstructed block among neighboring blocks that has been reconstructed ( At least one of intra_luma_pred_mode), multi reference line index (intra_luma_ref_idx), transform information (tu_mts_flag, mts_idx), and intra_chroma_pred_mode of color difference component encoding/decoding information may be derived.

예를 들어, 화면내 머지 모드 (intra_merge_mode, IMM)에 대한 플래그(imm_flag)를 명시적 및/또는 묵시적으로 정의한 후, 주변 복원 블록으로부터 화면내 예측을 위한 부/복호화 정보를 유도할 수 있다. 이때, imm_flag는 화면내 예측을 위한 부/복호화 정보를 유도하기 위한 주변 복원 블록을 나타내는 정보일 수 있으며, imm_idx는 명시적으로 전송하거나 묵시적으로 유도할 수 있다. 한편, 명시적으로 부/복호화 하는 경우, 적어도 아래의 엔트로피 부호화 방법 중 하나 이상을 사용할 수 있으며, 이진화 된 후에 CABAC(ae(v))으로 최종 부/복호화 될 수 있다. For example, after explicitly and/or implicitly defining a flag (imm_flag) for an intra_merge_mode (IMM), encoding/decoding information for intra prediction may be derived from a neighboring reconstructed block. In this case, imm_flag may be information indicating a neighboring reconstructed block for inducing encoding/decoding information for intra prediction, and imm_idx may be explicitly transmitted or implicitly derived. Meanwhile, when explicitly encoding/decoding, at least one or more of the following entropy encoding methods may be used, and after being binarized, the final encoding/decoding may be performed as CABAC (ae(v)).

절삭된 라이스(Truncated Rice) 이진화 방법Truncated Rice Binaryization Method

K차수 지수-골롬(K-th order Exp_Golomb) 이진화 방법K-th order Exp_Golomb binarization method

제한된 K차수 지수-골롬(K-th order Exp_Golomb) 이진화 방법Constrained K-th order Exp_Golomb binarization method

고정 길이(Fixed-length) 이진화 방법Fixed-length binarization method

단항(Unary) 이진화 방법Unary binarization method

절삭된 단항(Truncated Unary) 이진화 방법Truncated Unary Binaryization Method

화면내 머지 모드 (intra_merge_mode, IMM)를 현재 부호화 블록에 적용하는 방법에 대해 후술한다.A method of applying the intra_merge_mode (IMM) to the current coding block will be described later.

본 발명의 일 실시 예에 따를 때, imm_flag는 임의의 조건(예를 들어, 임의의 화면내 예측 모드, 동일한 멀티 참조 라인 인덱스)에 대해서만 시그널링 될 수 있다. According to an embodiment of the present invention, imm_flag may be signaled only for an arbitrary condition (eg, an arbitrary intra prediction mode, the same multi-reference line index).

일 예로, 현재 부호화 블록이 율-왜곡 최적화 과정에 기반하여 MPM 모드로 결정된 경우에만 imm_flag를 전송할 수 있다. 이 경우, 화면내 예측으로 부호화되는 모든 블록에 대해 imm_flag를 전송하지 않으므로 imm_flag에 대한 비트량을 절감할 수 있다. As an example, imm_flag may be transmitted only when the current coding block is determined as the MPM mode based on a rate-distortion optimization process. In this case, since imm_flag is not transmitted for all blocks encoded by intra prediction, the amount of bits for imm_flag can be reduced.

다른 예로, 현재 부호화 블록이 율-왜곡 최적화 과정에 기반하여 MPM 모드로 결정된 경우라 하더라도, intra_luma_mpm_idx가 공간적 주변 블록을 가리키지 않고 임의의 화면내 예측 모드(예를 들어, Planar, DC)로 채워지는 경우, imm_flag를 전송하지 않을 수 있다. As another example, even if the current coding block is determined as the MPM mode based on the rate-distortion optimization process, intra_luma_mpm_idx does not indicate a spatial neighboring block and is filled with an arbitrary intra prediction mode (e.g., Planar, DC). In this case, imm_flag may not be transmitted.

또 다른 예로, 현재 부호화 블록이 율-왜곡 최적화 과정에 기반하여 MPM 모드로 결정된 경우라 하더라도, intra_luma_mpm_idx가 공간적 주변 블록을 가리키지 않고 임의의 화면내 예측 모드(예를 들어,Planar, DC)로 채워지는 경우, 멀티 참조 라인 인덱스(intra_luma_ref_idx), 트랜스폼 정보(tu_mts_flag, mts_idx), 색차 성분 화면내 예측 모드(intra_chroma_pred_mode)중 적어도 하나 이상의 부호화 파라미터는 임의로 설정된 기본값을 가질 수 있다. As another example, even if the current coding block is determined as the MPM mode based on the rate-distortion optimization process, intra_luma_mpm_idx does not indicate a spatial neighboring block and is filled with an arbitrary intra prediction mode (e.g., Planar, DC). In the case of, at least one encoding parameter among the multi-reference line index (intra_luma_ref_idx), transform information (tu_mts_flag, mts_idx), and intra_chroma_pred_mode of the color difference component may have a randomly set default value.

또 다른 예로, 현재 부호화 블록이 율-왜곡 최적화 과정에 기반하여 MPM 모드로 결정되고 intra_luma_mpm_idx가 가리키는 공간적 주변 블록이 angular mode가 아닌 경우, imm_flag를 전송하지 않을 수 있다. As another example, when the current coding block is determined as the MPM mode based on the rate-distortion optimization process and the spatial neighboring block indicated by intra_luma_mpm_idx is not in the angular mode, imm_flag may not be transmitted.

또 다른 예로, imm_flag는 멀티 참조 라인이 사용된 경우에만 적용되거나 또는 적용되지 않을 수 있다. As another example, imm_flag may or may not be applied only when a multi-reference line is used.

도 10은 본 발명의 일 실시 예에 따른 화면내 머지 모드 후보 리스트를 구성하는 과정을 나타내는 도면이다.10 is a diagram illustrating a process of configuring an intra-screen merge mode candidate list according to an embodiment of the present invention.

본 발명의 일 실시 예에 따를 때, imm_flag가 전송된 후, imm_idx는 묵시적으로 유도될 수 있다. 이때, imm_idx가 가리키는 화면내 머지 모드 후보 리스트(IMMCL: IMM candidate list)는 양의 정수 K개의 후보를 가질 수 있으며, 임의의 정의된 스캐닝 순서에 따라 주변 복원 블록들로 한정하여 IMMCL을 구성할 수 있다. 예를 들어, K가 5일 때, 도 10을 참조하면, A1 → B1 → B0 → A0 → B2 순서에 따라 IMMCL을 구성할 수 있으며, IMMCL에 포함된 화면내 예측 모드와 동일한 화면내 예측 모드를 가지는 공간적 주변 블록은 IMMCL에 중복해서 포함시키지 못할 수 있다. 이때, 임의의 조건을 가지는 화면내 예측 모드에 대해 IMMCL을 구성할 수 있으며, 예컨대 angular mode를 가지는 공간적 주변 블록에 대해서만 IMMCL을 구성할 수 있다.According to an embodiment of the present invention, after imm_flag is transmitted, imm_idx may be implicitly derived. At this time, the intra-screen merge mode candidate list (IMMCL: IMM candidate list) indicated by imm_idx may have a positive integer K number of candidates, and IMMCL may be configured by limiting to neighboring restoration blocks according to a predefined scanning order. have. For example, when K is 5, referring to FIG. 10, IMMCL can be configured in the order of A1 → B1 → B0 → A0 → B2, and the same intra prediction mode as the intra prediction mode included in the IMMCL is used. Branched spatial neighboring blocks may not be duplicated in IMMCL. In this case, IMMCL may be configured for an intra prediction mode having an arbitrary condition, and for example, IMMCL may be configured only for spatial neighboring blocks having an angular mode.

일 예로, imm_flag가 on(“1”)으로 시그널링된 후, imm_idx는 묵시적으로 IMMCL을 구성하는 첫 번째 공간적 주변 블록을 나타낼 수 있으며, 해당 주변 블록의 화면내 부/복호화 정보를 현재 블록의 화면내 부/복호화 정보로 유도할 수 있다. As an example, after imm_flag is signaled as on (“1”), imm_idx may implicitly indicate the first spatial neighboring block constituting the IMMCL, and the internal/decoding information of the corresponding neighboring block is displayed within the screen of the current block. It can be derived from encoding/decryption information.

다른 예로, imm_flag가 on(“1”)으로 시그널링된 후, 현재 부호화 블록의 주변 블록들의 개수가 K개라 할 때, 적어도 M개의 주변 블록이 모두 동일한 화면내 예측 모드를 가지는 경우, imm_idx는 묵시적으로 imm 리스트 상의 첫 번째 블록의 화면내 예측 부/복호화 정보를 현재 블록의 부/복호화 정보로 사용할 수 있다. 이 때, M은 양의 정수이며, M은 K보다 같거나 작은 값을 가질 수 있다. As another example, after imm_flag is signaled as on (“1”), when the number of neighboring blocks of the current coding block is K, if all of at least M neighboring blocks have the same intra prediction mode, imm_idx is implicitly The intra prediction encoding/decoding information of the first block on the imm list can be used as the encoding/decoding information of the current block. In this case, M is a positive integer, and M may have a value equal to or smaller than K.

도 11은 본 발명의 일 실시 예에 따른 영상 복호화 방법을 나타내는 흐름도이다.11 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

도 11을 참조하면, 복호화기는 현재 블록에 대한 화면내 예측 모드를 유도할 수 있다(S1101).Referring to FIG. 11, the decoder may derive an intra prediction mode for a current block (S1101).

한편, 현재 블록은 상기 현재 블록의 서브 블록을 포함할 수 있다.Meanwhile, the current block may include a sub-block of the current block.

또한, 복호화기는 유도된 화면내 예측 모드에 기초하여 현재 블록에 대한 적어도 하나 이상의 복원 샘플 라인을 결정할 수 있다(S1102).Also, the decoder may determine at least one reconstructed sample line for the current block based on the derived intra prediction mode (S1102).

한편, 적어도 하나 이상의 복원 샘플 라인은 부호화 트리 블록 내 현재 블록의 위치에 기초하여 결정될 수 있다.Meanwhile, at least one or more reconstructed sample lines may be determined based on a location of a current block in a coding tree block.

한편, 적어도 하나 이상의 복원 샘플 라인은 유도된 화면내 예측 모드가 방향성인지 여부에 기초하여 결정될 수 있다.Meanwhile, at least one reconstructed sample line may be determined based on whether the derived intra prediction mode is directional.

한편, 적어도 하나 이상의 복원 샘플 라인은 현재 블록의 크기 및 분할 정보 중 적어도 하나에 기초하여 결정될 수 있다.Meanwhile, at least one reconstructed sample line may be determined based on at least one of the size of the current block and partition information.

또한, 복호화기는 결정된 복원 샘플 라인에 포함된 적어도 하나 이상의 복원 샘플을 이용하여 참조 샘플을 구성할 수 있다(S1103).In addition, the decoder may construct a reference sample using at least one or more reconstructed samples included in the determined reconstructed sample line (S1103).

또한, 복호화기는 화면내 예측 모드 및 참조 샘플에 기초하여 현재 블록에 대한 화면내 예측을 수행할 수 있다(S1104).Also, the decoder may perform intra prediction for the current block based on the intra prediction mode and the reference sample (S1104).

또한, 복호화기는 비트스트림으로부터 적어도 하나 이상의 복원 샘플 라인에 관한 정보를 획득할 수 있다.Also, the decoder may obtain information on at least one reconstructed sample line from the bitstream.

또한, 복호화기는 결정된 복원 샘플 라인에 기초하여 현재 블록의 MPM 후보 리스트를 재구성할 수 있다.Also, the decoder may reconstruct the MPM candidate list of the current block based on the determined reconstructed sample line.

또한, 복호화기는 현재 블록에 인접한 복원 블록에 관한 정보를 유도할 수 있다. 이때, 복호화기는 유도된 상기 현재 블록에 인접한 복원 블록에 관한 정보에 기초하여 복원 블록의 부호화 파라미터를 유도할 수 있다.In addition, the decoder may derive information on a reconstructed block adjacent to the current block. In this case, the decoder may derive encoding parameters of the reconstructed block based on the derived information on the reconstructed block adjacent to the current block.

한편, 현재 블록에 인접한 복원 블록에 관한 정보는 화면내 머지 모드를 적용하기 위한 현재 블록에 인접한 복원 블록을 나타내는 정보를 포함할 수 있다.Meanwhile, the information on the reconstructed block adjacent to the current block may include information indicating a reconstructed block adjacent to the current block for applying the intra-screen merge mode.

한편, 복원 블록의 부호화 파라미터는 휘도 성분 화면내 예측 모드, 멀티 참조 라인 인덱스, 트랜스폼 정보 및 색차 성분 화면내 예측 모드 중 적어도 하나를 포함할 수 있다.Meanwhile, the encoding parameter of the reconstructed block may include at least one of a luminance component intra prediction mode, a multi reference line index, transform information, and a color difference component intra prediction mode.

도 12는 본 발명의 일 실시 예에 따른 영상 부호화 방법을 나타내는 흐름도이다.12 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.

도 12를 참조하면, 부호화기는 현재 블록에 대한 화면내 예측 모드를 결정할 수 있다(S1201).Referring to FIG. 12, the encoder may determine an intra prediction mode for a current block (S1201).

한편, 현재 블록은 상기 현재 블록의 서브 블록을 포함할 수 있다.Meanwhile, the current block may include a sub-block of the current block.

또한, 부호화기는 유도된 화면내 예측 모드에 기초하여 상기 현재 블록에 대한 적어도 하나 이상의 복원 샘플 라인을 결정할 수 있다(S1202).Also, the encoder may determine at least one reconstructed sample line for the current block based on the derived intra prediction mode (S1202).

한편, 적어도 하나 이상의 복원 샘플 라인은 부호화 트리 블록 내 현재 블록의 위치에 기초하여 결정될 수 있다.Meanwhile, at least one or more reconstructed sample lines may be determined based on a location of a current block in a coding tree block.

한편, 적어도 하나 이상의 복원 샘플 라인은 유도된 화면내 예측 모드가 방향성인지 여부에 기초하여 결정될 수 있다.Meanwhile, at least one reconstructed sample line may be determined based on whether the derived intra prediction mode is directional.

한편, 적어도 하나 이상의 복원 샘플 라인은 현재 블록의 크기 및 분할 정보 중 적어도 하나에 기초하여 결정될 수 있다.Meanwhile, at least one reconstructed sample line may be determined based on at least one of the size of the current block and partition information.

또한, 부호화기는 결정된 복원 샘플 라인에 포함된 적어도 하나 이상의 복원 샘플을 이용하여 참조 샘플을 구성할 수 있다(S1203).In addition, the encoder may construct a reference sample using at least one reconstructed sample included in the determined reconstructed sample line (S1203).

또한, 부호화기는 화면내 예측 모드 및 참조 샘플에 기초하여 현재 블록에 대한 화면내 예측을 수행할 수 있다(S1204).In addition, the encoder may perform intra prediction on the current block based on the intra prediction mode and the reference sample (S1204).

또한, 부호화기는 적어도 하나 이상의 복원 샘플 라인에 관한 정보를 부호화할 수 있다.Also, the encoder may encode information on at least one reconstructed sample line.

또한, 부호화기는 결정된 복원 샘플 라인에 기초하여 현재 블록의 MPM 후보 리스트를 재구성할 수 있다.Also, the encoder may reconstruct the MPM candidate list of the current block based on the determined reconstructed sample line.

또한, 부호화기는 현재 블록에 인접한 복원 블록에 관한 정보를 유도할 수 있다. 이때, 부호화기는 유도된 상기 현재 블록에 인접한 복원 블록에 관한 정보에 기초하여 복원 블록의 부호화 파라미터를 유도할 수 있다.In addition, the encoder may derive information on a reconstructed block adjacent to the current block. In this case, the encoder may derive encoding parameters of the reconstructed block based on the derived information on the reconstructed block adjacent to the current block.

한편, 현재 블록에 인접한 복원 블록에 관한 정보는 화면내 머지 모드를 적용하기 위한 현재 블록에 인접한 복원 블록을 나타내는 정보를 포함할 수 있다.Meanwhile, the information on the reconstructed block adjacent to the current block may include information indicating a reconstructed block adjacent to the current block for applying the intra-screen merge mode.

한편, 복원 블록의 부호화 파라미터는 휘도 성분 화면내 예측 모드, 멀티 참조 라인 인덱스, 트랜스폼 정보 및 색차 성분 화면내 예측 모드 중 적어도 하나를 포함할 수 있다.Meanwhile, the encoding parameter of the reconstructed block may include at least one of a luminance component intra prediction mode, a multi reference line index, transform information, and a color difference component intra prediction mode.

또한, 상술한 영상 부호화 방법에 의해 생성되거나 영상 복호화 방법에 이용되는 비트스트림을 저장한 컴퓨터 판독가능한 기록 매체가 제공될 수 있다.Further, a computer-readable recording medium storing a bitstream generated by the above-described video encoding method or used in the video decoding method may be provided.

본 발명에 따르면, 화면내 부호화를 위해 필요한 부호화 파라미터를 화면간 부호화의 머지 모드와 같이 주변 블록의 부호화 파라미터를 묵시적으로 유도함으로써 전송 비트를 줄이고 화면내 예측 부호화 효율을 향상시키는 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.According to the present invention, an image encoding/decoding method for reducing transmission bits and improving intra-prediction encoding efficiency by implicitly deriving encoding parameters of neighboring blocks, such as a merge mode of inter-encoding, for encoding parameters necessary for intra-encoding, and An apparatus may be provided.

또한, 본 발명에 따르면, 화면내 머지 모드에 대한 시그널링 방법, 화면내 머지 리스트 구성 방법을 이용하여 화면내 예측 모드에 필요한 부호화 파라미터의 발생 비트량을 줄이는 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.In addition, according to the present invention, a video encoding/decoding method and apparatus for reducing the amount of bits generated of encoding parameters necessary for an intra prediction mode by using a signaling method for an intra-merge mode and an intra-merge list construction method can be provided. have.

또한, 본 발명에 따르면, 화면내 예측에서 요구되는 부호화 파라미터(예를 들어, 휘도 및/또는 화면내 예측 모드, 멀티참조라인 인덱스, 트랜스폼 변환 플래그, 트랜스폼 인덱스 중 적어도 하나 이상)를 주변 블록에서 묵시적으로 유도함에 따라 부호화 발생 비트량을 줄이는 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.In addition, according to the present invention, encoding parameters required for intra prediction (eg, at least one of a luminance and/or intra prediction mode, a multi-reference line index, a transform transform flag, and a transform index) are used as neighboring blocks. An image encoding/decoding method and apparatus for reducing the amount of encoding generated bits by implicitly inducing in may be provided.

휘도 및 색차 신호 각각에 대하여 상기 화면 내 부/복호화 과정을 수행할 수 있다. 예를 들어, 상기 화면 내 부/복호화 과정에서 화면 내 예측 모드 유도, 블록 분할, 참조 샘플 구성, 화면 내 예측 수행 중 적어도 하나 이상의 방법이 휘도 신호 및 색차 신호에 대해서 다르게 적용될 수 있다.The intra-screen encoding/decoding process may be performed for each of the luminance and color difference signals. For example, in the intra-screen encoding/decoding process, at least one or more methods of inducing an intra prediction mode, segmenting a block, configuring a reference sample, and performing intra prediction may be applied differently to the luminance signal and the color difference signal.

휘도 및 색차 신호에 대한 상기 화면 내 부/복호화 과정을 동일하게 수행할 수 있다. 예를 들어, 휘도 신호에 대하여 적용한 상기 화면 내 부/복호화 과정에서 화면 내 예측 모드 유도, 블록 분할, 참조 샘플 구성, 화면 내 예측 수행 중 적어도 하나를 색차 신호에 동일하게 적용할 수 있다. The intra-screen encoding/decoding process for the luminance and color difference signals may be performed in the same manner. For example, in the intra-screen encoding/decoding process applied to the luminance signal, at least one of inducing an intra prediction mode, segmenting a block, configuring a reference sample, and performing intra prediction may be equally applied to the color difference signal.

상기의 방법들은 부호화기 및 복호화기에서 같은 방법으로 수행할 수 있다. 예를 들어, 상기 화면 내 부/복호화 과정에서 화면 내 예측 모드 유도, 블록 분할, 참조 샘플 구성, 화면 내 예측 수행 중 적어도 하나 이상의 방법이 부호화기 및 복호화기에서 동일하게 적용될 수 있다. 또한, 상기 방법들 적용하는 순서는 부호화기와 복호화기에서 상이할 수 있다. 예를 들어, 상기 현재 블록에 대한 화면 내 부/복호화를 수행함에 있어 부호화기에서는 참조 샘플을 구성한 후, 하나 이상의 화면 내 예측을 수행하여 결정된 화면 내 예측 모드를 부호화할 수 있다.The above methods can be performed in the same way in an encoder and a decoder. For example, at least one method of deriving an intra prediction mode, segmenting a block, configuring a reference sample, and performing intra prediction in the intra-picture encoding/decoding process may be applied equally to the encoder and the decoder. In addition, the order of applying the above methods may be different between the encoder and the decoder. For example, in performing the intra prediction/decoding of the current block, the encoder may configure a reference sample and then perform one or more intra prediction to encode the determined intra prediction mode.

본 발명의 상기 실시 예들은 부호화 블록, 예측 블록, 변환 블록, 블록, 유닛 중 적어도 하나 이상의 크기에 따라 적용될 수 있다. 여기서의 크기는 상기 실시 예들이 적용되기 위해 최소 크기 및/또는 최대 크기로 정의될 수도 있고, 상기 실시 예가 적용되는 고정 크기로 정의될 수도 있다. 또한, 상기 실시 예들은 제1 크기에서는 제1의 실시 예가 적용될 수 있고, 제2 크기에서는 제2의 실시 예가 적용될 수 있다. 즉, 상시 실시 예들은 크기에 따라 복합적으로 적용될 수 있다. 또한, 본 발명의 상기 실시 예들은 최소 크기 이상 및 최대 크기 이하일 경우에만 적용될 수 있다. 즉, 상기 실시 예들을 블록 크기가 일정한 범위 내에 포함될 경우에만 적용될 수 있다.The above embodiments of the present invention may be applied according to the size of at least one of a coding block, a prediction block, a transform block, a block, and a unit. The size here may be defined as a minimum size and/or a maximum size in order to apply the embodiments, or may be defined as a fixed size to which the embodiments are applied. In addition, in the above embodiments, the first embodiment may be applied to the first size, and the second embodiment may be applied to the second size. That is, the always-on embodiments may be applied in combination according to the size. Further, the above embodiments of the present invention can be applied only when the size is greater than or equal to the minimum size and less than or equal to the maximum size. That is, the above embodiments can be applied only when the block size is within a certain range.

예를 들어, 부호화/복호화 대상 블록의 크기가 8x8 이상일 경우에만 상기 실시 예들이 적용될 수 있다.For example, the above embodiments can be applied only when the size of the encoding/decoding target block is 8x8 or more.

예를 들어, 부호화/복호화 대상 블록의 크기가 16x16 이하일 경우에만 상기 실시 예들이 적용될 수 있다.For example, the above embodiments can be applied only when the size of the encoding/decoding object block is 16x16 or less.

예를 들어, 부호화/복호화 대상 블록의 크기가 8x8 이상이고 16x16 이하일 경우에만 상기 실시 예들이 적용될 수 있다.For example, the above embodiments can be applied only when the size of the encoding/decoding target block is 8x8 or more and 16x16 or less.

본 발명의 상기 실시 예들은 시간적 계층(temporal layer)에 따라 적용될 수 있다. 상기 실시 예들이 적용 가능한 시간적 계층을 식별하기 위해 별도의 식별자(identifier)가 시그널링되고, 해당 식별자에 의해 특정된 시간적 계층에 대해서 상기 실시 예들이 적용될 수 있다. 여기서의 식별자는 상기 실시 예가 적용 가능한 최소 계층 및/또는 최대 계층으로 정의될 수도 있고, 상기 적용되는 특정 계층을 지시하는 것으로 정의될 수도 있다.The above embodiments of the present invention may be applied according to a temporal layer. A separate identifier is signaled to identify a temporal layer to which the above embodiments are applicable, and the above embodiments may be applied to a temporal layer specified by the corresponding identifier. Here, the identifier may be defined as a minimum layer and/or a maximum layer to which the embodiment is applicable, or may be defined as indicating the specific layer to which the embodiment is applied.

예를 들어, 현재 영상의 시간적 계층이 최하위 계층일 경우에만 상기 실시 예들이 적용될 수 있다.For example, the above embodiments can be applied only when the temporal layer of the current image is the lowest layer.

예를 들어, 현재 영상의 시간적 계층이 최상위 계층일 경우에만 상기 실시 예들이 적용될 수 있다.For example, the above embodiments can be applied only when the temporal layer of the current image is the highest layer.

본 발명의 상기 실시 예에 따라 디블록킹 필터(deblocking filter)에서 경계 강도(boundary strength) 산출 시 부호화/복호화 대상 블록의 화면 내 예측 모드를 사용할 수 있다. According to the above embodiment of the present invention, when calculating a boundary strength in a deblocking filter, an intra prediction mode of an encoding/decoding target block may be used.

화면 내 예측을 수행하는 경우, 참조 샘플을 이용한 예측 샘플이 정수-화소(integer-pel) 단위, 1/2-화소(1/2-pel) 단위, 1/4-화소(1/4-pel) 단위, 1/8-화소(1/8-pel) 단위, 1/16-화소(1/16-pel) 단위, 1/32-화소(1/32-pel) 단위, 1/64-화소(1/64-pel) 단위 중 적어도 하나 이상을 가질 때도 본 발명의 상기 실시 예들이 적용될 수 있다.When performing intra prediction, prediction samples using a reference sample are integer-pel units, 1/2-pixel units, and 1/4-pixel units (1/4-pel). ) Unit, 1/8-pixel (1/8-pel) unit, 1/16-pixel (1/16-pel) unit, 1/32-pixel (1/32-pel) unit, 1/64-pixel The above embodiments of the present invention may be applied even when at least one of the (1/64-pel) units is used.

본 발명의 상기 실시 예들이 적용되는 슬라이스 종류(slice type)가 정의되고, 해당 슬라이스 종류에 따라 본 발명의 상기 실시 예들이 적용될 수 있다. 예를 들어, 슬라이스 종류가 I-slice인 경우, 현재 블록을 서브 블록으로 분할하고 각 서브 블록에 대한 화면 내 예측 모드를 주변 블록으로부터 유도하여 화면 내 예측을 수행할 수 있다.A slice type to which the above embodiments of the present invention are applied is defined, and the above embodiments of the present invention may be applied according to the corresponding slice type. For example, when the slice type is I-slice, intra prediction may be performed by dividing the current block into sub-blocks and deriving an intra prediction mode for each sub-block from neighboring blocks.

본 발명의 상기 실시 예들이 적용되는 블록의 형태는 정방형(square) 형태 혹은 비정방형(non-square) 형태를 가질 수 있다. The shape of the block to which the above embodiments of the present invention are applied may have a square shape or a non-square shape.

상술한 실시 예들에서, 방법들은 일련의 단계 또는 유닛으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the above-described embodiments, the methods are described on the basis of a flow chart as a series of steps or units, but the present invention is not limited to the order of steps, and certain steps may occur in a different order or concurrently with those described above. have. In addition, those of ordinary skill in the art understand that the steps shown in the flowchart are not exclusive, other steps are included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention. You can understand.

상술한 실시 예는 다양한 양태의 예시들을 포함한다. 다양한 양태들을 나타내기 위한 모든 가능한 조합을 기술할 수는 없지만, 해당 기술 분야의 통상의 지식을 가진 자는 다른 조합이 가능함을 인식할 수 있을 것이다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.The above-described embodiments include examples of various aspects. Although not all possible combinations for representing the various aspects can be described, those of ordinary skill in the art will recognize that other combinations are possible. Accordingly, the present invention will be said to include all other replacements, modifications and changes falling within the scope of the following claims.

이상 설명된 본 발명에 따른 실시 예들은 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 컴퓨터 판독 가능한 기록 매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The embodiments according to the present invention described above may be implemented in the form of program instructions that can be executed through various computer components and recorded in a computer-readable recording medium. The computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded in the computer-readable recording medium may be specially designed and configured for the present invention, or may be known and usable to those skilled in the computer software field. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magnetic-optical media such as floptical disks. media), and a hardware device specially configured to store and execute program instructions such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those produced by a compiler but also high-level language codes that can be executed by a computer using an interpreter or the like. The hardware device may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.

이상에서 본 발명이 구체적인 구성요소 등과 같은 특정 사항들과 한정된 실시 예 및 도면에 의해 설명되었으나, 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명이 상기 실시 예들에 한정되는 것은 아니며, 본 발명이 속하는 기술분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형을 꾀할 수 있다.In the above, the present invention has been described by specific matters such as specific components and limited embodiments and drawings, but this is provided only to help a more general understanding of the present invention, and the present invention is not limited to the above embodiments, Those of ordinary skill in the art to which the present invention pertains can make various modifications and variations from these descriptions.

따라서, 본 발명의 사상은 상기 설명된 실시 예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등하게 또는 등가적으로 변형된 모든 것들은 본 발명의 사상의 범주에 속한다고 할 것이다.Therefore, the spirit of the present invention is limited to the above-described embodiments and should not be determined, and all modifications that are equally or equivalent to the claims as well as the claims to be described later fall within the scope of the spirit of the present invention I would say.

Claims (20)

영상 복호화 방법에 있어서,
현재 블록에 대한 화면내 예측 모드를 유도하는 단계;
상기 유도된 화면내 예측 모드에 기초하여 상기 현재 블록에 대한 적어도 하나 이상의 복원 샘플 라인을 결정하는 단계;
상기 결정된 복원 샘플 라인에 포함된 적어도 하나 이상의 복원 샘플을 이용하여 참조 샘플을 구성하는 단계; 및
상기 화면내 예측 모드 및 상기 참조 샘플에 기초하여 상기 현재 블록에 대한 화면내 예측을 수행하는 단계를 포함하는 영상 복호화 방법.
In the video decoding method,
Deriving an intra prediction mode for the current block;
Determining at least one reconstructed sample line for the current block based on the derived intra prediction mode;
Constructing a reference sample using at least one reconstructed sample included in the determined reconstructed sample line; And
And performing intra prediction on the current block based on the intra prediction mode and the reference sample.
제1항에 있어서,
상기 현재 블록은 상기 현재 블록의 서브 블록을 포함하는 영상 복호화 방법.
The method of claim 1,
The image decoding method wherein the current block includes a sub-block of the current block.
제1항에 있어서,
상기 적어도 하나 이상의 복원 샘플 라인은 부호화 트리 블록 내 상기 현재 블록의 위치에 기초하여 결정되는 영상 복호화 방법.
The method of claim 1,
The at least one reconstructed sample line is determined based on a position of the current block in a coding tree block.
제1항에 있어서,
상기 적어도 하나 이상의 복원 샘플 라인은 상기 유도된 화면내 예측 모드가 방향성인지 여부에 기초하여 결정되는 영상 복호화 방법.
The method of claim 1,
The at least one reconstructed sample line is determined based on whether the derived intra prediction mode is directional.
제1항에 있어서,
상기 적어도 하나 이상의 복원 샘플 라인은 상기 현재 블록의 크기 및 분할 정보 중 적어도 하나에 기초하여 결정되는 영상 복호화 방법.
The method of claim 1,
The at least one reconstructed sample line is determined based on at least one of the size and segmentation information of the current block.
제1항에 있어서,
비트스트림으로부터 상기 적어도 하나 이상의 복원 샘플 라인에 관한 정보를 획득하는 단계를 더 포함하는 영상 복호화 방법.
The method of claim 1,
And obtaining information on the at least one reconstructed sample line from a bitstream.
제1항에 있어서,
상기 결정된 복원 샘플 라인에 기초하여 상기 현재 블록의 MPM 후보 리스트를 재구성하는 단계를 더 포함하는 영상 복호화 방법.
The method of claim 1,
And reconstructing an MPM candidate list of the current block based on the determined reconstructed sample line.
제1항에 있어서,
상기 현재 블록에 인접한 복원 블록에 관한 정보를 유도하는 단계를 더 포함하고,
상기 현재 블록에 대한 화면내 예측을 수행하는 단계는,
상기 유도된 상기 현재 블록에 인접한 복원 블록에 관한 정보에 기초하여 상기 복원 블록의 부호화 파라미터를 유도하는 단계를 포함하는 영상 복호화 방법.
The method of claim 1,
Further comprising the step of deriving information on the reconstructed block adjacent to the current block,
The step of performing intra prediction on the current block,
And deriving encoding parameters of the reconstructed block based on the derived information on the reconstructed block adjacent to the current block.
제8항에 있어서,
상기 현재 블록에 인접한 복원 블록에 관한 정보는 화면내 머지 모드를 적용하기 위한 상기 현재 블록에 인접한 복원 블록을 나타내는 정보를 포함하는 영상 복호화 방법.
The method of claim 8,
The information on the reconstructed block adjacent to the current block includes information indicating a reconstructed block adjacent to the current block for applying an intra-screen merge mode.
제8항에 있어서,
상기 복원 블록의 부호화 파라미터는 휘도 성분 화면내 예측 모드, 멀티 참조 라인 인덱스, 트랜스폼 정보 및 색차 성분 화면내 예측 모드 중 적어도 하나를 포함하는 영상 복호화 방법.
The method of claim 8,
The encoding parameter of the reconstructed block includes at least one of a luminance component intra prediction mode, a multi reference line index, transform information, and a color difference component intra prediction mode.
영상 부호화 방법에 있어서,
현재 블록에 대한 화면내 예측 모드를 결정하는 단계;
상기 유도된 화면내 예측 모드에 기초하여 상기 현재 블록에 대한 적어도 하나 이상의 복원 샘플 라인을 결정하는 단계;
상기 결정된 복원 샘플 라인에 포함된 적어도 하나 이상의 복원 샘플을 이용하여 참조 샘플을 구성하는 단계; 및
상기 화면내 예측 모드 및 상기 참조 샘플에 기초하여 상기 현재 블록에 대한 화면내 예측을 수행하는 단계를 포함하는 영상 부호화 방법.
In the video encoding method,
Determining an intra prediction mode for the current block;
Determining at least one reconstructed sample line for the current block based on the derived intra prediction mode;
Constructing a reference sample using at least one reconstructed sample included in the determined reconstructed sample line; And
And performing intra prediction on the current block based on the intra prediction mode and the reference sample.
제11항에 있어서,
상기 현재 블록은 상기 현재 블록의 서브 블록을 포함하는 영상 부호화 방법.
The method of claim 11,
The image encoding method wherein the current block includes a sub-block of the current block.
제11항에 있어서,
상기 적어도 하나 이상의 복원 샘플 라인은 부호화 트리 블록 내 상기 현재 블록의 위치에 기초하여 결정되는 영상 부호화 방법.
The method of claim 11,
The at least one reconstructed sample line is determined based on a position of the current block in a coding tree block.
제11항에 있어서,
상기 적어도 하나 이상의 복원 샘플 라인은 상기 유도된 화면내 예측 모드가 방향성인지 여부에 기초하여 결정되는 영상 부호화 방법.
The method of claim 11,
The at least one reconstructed sample line is determined based on whether the derived intra prediction mode is directional.
제11항에 있어서,
상기 적어도 하나 이상의 복원 샘플 라인은 상기 현재 블록의 크기 및 분할 정보 중 적어도 하나에 기초하여 결정되는 영상 부호화 방법.
The method of claim 11,
The at least one reconstructed sample line is determined based on at least one of a size and split information of the current block.
제11항에 있어서,
상기 적어도 하나 이상의 복원 샘플 라인에 관한 정보를 부호화하는 단계를 더 포함하는 영상 부호화 방법.
The method of claim 11,
Encoding information about the at least one reconstructed sample line.
제11항에 있어서,
상기 결정된 복원 샘플 라인에 기초하여 상기 현재 블록의 MPM 후보 리스트를 재구성하는 단계를 더 포함하는 영상 부호화 방법.
The method of claim 11,
And reconstructing an MPM candidate list of the current block based on the determined reconstructed sample line.
제11항에 있어서,
상기 현재 블록에 인접한 복원 블록에 관한 정보를 유도하는 단계를 더 포함하고,
상기 현재 블록에 대한 화면내 예측을 수행하는 단계는,
상기 유도된 상기 현재 블록에 인접한 복원 블록에 관한 정보에 기초하여 상기 복원 블록의 부호화 파라미터를 유도하는 단계를 포함하는 영상 부호화 방법.
The method of claim 11,
Further comprising the step of deriving information on the reconstructed block adjacent to the current block,
The step of performing intra prediction on the current block,
And deriving an encoding parameter of the reconstructed block based on the derived information on the reconstructed block adjacent to the current block.
제18항에 있어서,
상기 복원 블록의 부호화 파라미터는 휘도 성분 화면내 예측 모드, 멀티 참조 라인 인덱스, 트랜스폼 정보 및 색차 성분 화면내 예측 모드 중 적어도 하나를 포함하는 영상 부호화 방법.
The method of claim 18,
The encoding parameter of the reconstructed block includes at least one of a luminance component intra prediction mode, a multi reference line index, transform information, and a color difference component intra prediction mode.
현재 블록에 대한 화면내 예측 모드를 결정하는 단계;
상기 유도된 화면내 예측 모드에 기초하여 상기 현재 블록에 대한 적어도 하나 이상의 복원 샘플 라인을 결정하는 단계;
상기 결정된 복원 샘플 라인에 포함된 적어도 하나 이상의 복원 샘플을 이용하여 참조 샘플을 구성하는 단계; 및
상기 화면내 예측 모드 및 상기 참조 샘플에 기초하여 상기 현재 블록에 대한 화면내 예측을 수행하는 단계를 포함하는 영상 부호화 방법에 의해 생성된 비트스트림을 저장하는 컴퓨터 판독가능한 기록 매체.
Determining an intra prediction mode for the current block;
Determining at least one reconstructed sample line for the current block based on the derived intra prediction mode;
Constructing a reference sample using at least one reconstructed sample included in the determined reconstructed sample line; And
A computer-readable recording medium storing a bitstream generated by a video encoding method comprising the step of performing intra prediction on the current block based on the intra prediction mode and the reference sample.
KR1020190079612A 2019-07-02 2019-07-02 Method and apparatus for intra prediction KR20210003604A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190079612A KR20210003604A (en) 2019-07-02 2019-07-02 Method and apparatus for intra prediction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190079612A KR20210003604A (en) 2019-07-02 2019-07-02 Method and apparatus for intra prediction

Publications (1)

Publication Number Publication Date
KR20210003604A true KR20210003604A (en) 2021-01-12

Family

ID=74129534

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190079612A KR20210003604A (en) 2019-07-02 2019-07-02 Method and apparatus for intra prediction

Country Status (1)

Country Link
KR (1) KR20210003604A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022149941A1 (en) 2021-01-11 2022-07-14 주식회사 엘지에너지솔루션 Battery module including expansion relaxation unit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022149941A1 (en) 2021-01-11 2022-07-14 주식회사 엘지에너지솔루션 Battery module including expansion relaxation unit

Similar Documents

Publication Publication Date Title
KR102555345B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR102645309B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR102424240B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR102410424B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR102397475B1 (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20230150921A (en) Method and apparatus for encoding/decoding image, recording medium for stroing bitstream
KR20220127801A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20230110237A (en) Method and apparatus for intra prediction
KR20230004401A (en) Method and apparatus for encoding and decoding image
KR20230074680A (en) Method and apparatus for encoding/decoding image, recording medium for stroing bitstream
KR20180001485A (en) Method and apparatus for encoding and decoding a video image based on transform
KR20170132682A (en) A method for encoding/decoding a video and a readable medium therefor
KR20210065051A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20200032657A (en) Method and apparatus for encoding/decoding image, recording medium for stroing bitstream
KR20200145749A (en) Method and Apparatus for Intra Prediction Mode and Entropy Encoding/Decoding Thereof
KR20200144509A (en) Method and Apparatus for Inter Prediction Information Encoding and Decoding Thereof
KR20200107867A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20200039591A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20210035067A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20200144480A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20200119744A (en) Method and apparatus for signaling signals related prediction mode in intra prediction
KR20210003604A (en) Method and apparatus for intra prediction
KR20210042841A (en) Method and apparatus for encoding/decoding image, recording medium for stroing bitstream
KR20210035761A (en) Method and apparatus for encoding/decoding image, recording medium for stroing bitstream
KR20200145750A (en) Method and apparatus for video encoding/decoding using spatial temporal prediction