KR102435502B1 - Method and apparatus for encoding or decoding video signal - Google Patents

Method and apparatus for encoding or decoding video signal Download PDF

Info

Publication number
KR102435502B1
KR102435502B1 KR1020170155365A KR20170155365A KR102435502B1 KR 102435502 B1 KR102435502 B1 KR 102435502B1 KR 1020170155365 A KR1020170155365 A KR 1020170155365A KR 20170155365 A KR20170155365 A KR 20170155365A KR 102435502 B1 KR102435502 B1 KR 102435502B1
Authority
KR
South Korea
Prior art keywords
neighboring blocks
current block
intra prediction
blocks
determined
Prior art date
Application number
KR1020170155365A
Other languages
Korean (ko)
Other versions
KR20180072539A (en
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 PCT/KR2017/015236 priority Critical patent/WO2018117686A2/en
Publication of KR20180072539A publication Critical patent/KR20180072539A/en
Application granted granted Critical
Publication of KR102435502B1 publication Critical patent/KR102435502B1/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/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Landscapes

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

Abstract

본 발명은 비디오 신호의 처리 방법 및 이의 장치에 관한 것이다. 본 발명의 일 실시예에 따른 처리 방법은, 현재 블록의 모양을 판단하는 단계; 상기 판단된 모양에 따라 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록들의 위치 및 개수 중 어느 하나 이상을 결정하는 단계; 및 상기 결정된 이웃 블록들의 화면내 예측 모드에 기초하여 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 단계를 포함하고, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함할 수 있다.The present invention relates to a method for processing a video signal and an apparatus therefor. A processing method according to an embodiment of the present invention includes: determining a shape of a current block; determining any one or more of positions and numbers of neighboring blocks that obtain the most probable intra prediction mode of the current block according to the determined shape; and constructing a list of most probable intra prediction modes of the current block based on the determined intra prediction modes of the neighboring blocks, wherein the neighboring blocks may include left neighboring blocks and upper neighboring blocks. .

Description

비디오 신호의 부호화 또는 복호화 방법 및 장치{METHOD AND APPARATUS FOR ENCODING OR DECODING VIDEO SIGNAL}A method and apparatus for encoding or decoding a video signal

본 발명은 비디오 신호의 부호화 또는 복호화 방법 및 장치에 관한 것으로서, 더욱 상세하게는, 예측 블록의 모양 및 주변 이웃 블록의 정보를 이용하여 가장 가능성 있는 화면내 예측 모드(MPM) 리스트를 구성하는 방법 및 이를 포함하는 비디오 신호의 부호화 및 복호화 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for encoding or decoding a video signal, and more particularly, to a method for constructing a most probable intra prediction mode (MPM) list using the shape of a prediction block and information on neighboring blocks, and The present invention relates to a method and apparatus for encoding and decoding a video signal including the same.

최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비하여 상대적으로 데이터량이 증가하기 때문에, 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용하여 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위하여 고효율의 영상 압축 기술들이 활용될 수 있다.Recently, the demand for high-resolution and high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images is increasing in various application fields. Since the amount of data increases relative to the existing image data as the image data becomes high-resolution and high-quality, when transmitting image data using a medium such as an existing wired/wireless broadband line or storing it using an existing storage medium, the transmission The cost and storage cost will increase. High-efficiency image compression techniques can be used to solve these problems that occur as image data becomes high-resolution and high-quality.

영상 압축 기술로 현재 블록의 정보를 그대로 전송하지 않고 현재 블록의 주변 블록들의 정보를 이용하여 예측하는 방법을 사용할 수 있으며, 이러한 예측 방법으로는 현재 픽처의 이전 또는 이후 픽처로부터 현재 픽처에 포함된 픽셀값을 예측하는 화면간 예측 기술, 현재 픽처 내의 픽셀 정보를 이용하여 현재 픽처에 포함된 픽셀값을 예측하는 화면내 예측 기술을 사용할 수 있다. 또한, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고, 이러한 영상 압축 기술을 이용하여 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.A method of predicting using information on neighboring blocks of the current block without transmitting the information of the current block as it is with image compression technology may be used. In this prediction method, pixels included in the current picture from pictures before or after the current picture are used. An inter prediction technique for predicting a value and an intra prediction technique for predicting a pixel value included in the current picture by using pixel information in the current picture may be used. In addition, various technologies exist, such as entropy encoding technology in which a short code is assigned to a value with a high frequency of occurrence and a long code is assigned to a value with a low frequency of occurrence. can

예측 방법 중 화면간 예측(inter prediction) 방법에서는 다른 픽처의 정보를 참조하여 현재 픽처(picture)의 픽셀값을 예측하며, 화면내 예측(intra prediction)에서는 동일한 픽처 내에서 픽셀 간 연관 관계를 이용하여 픽셀값을 예측한다. 즉, 화면내 예측을 수행하는 경우에는 현재 블록을 부호화하기 위하여 참조 픽처를 참조하는 것이 아니라, 부호화하려는 현재 블록과 공간적으로 인접한 픽셀값을 이용하여 현재 블록의 화면내 예측 모드를 결정하여 화면간 예측을 수행할 수 있다.Among the prediction methods, the inter prediction method predicts the pixel value of the current picture with reference to information on other pictures, and the intra prediction method uses the correlation between pixels within the same picture to predict the pixel value. Predict pixel values. That is, when intra prediction is performed, the inter prediction mode of the current block is determined using pixel values spatially adjacent to the current block to be encoded, rather than referring to a reference picture to encode the current block. can be performed.

한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 컨텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.Meanwhile, as the demand for high-resolution images increases, the demand for stereoscopic image contents as a new image service is also increasing. A video compression technique for effectively providing high-resolution and ultra-high-resolution stereoscopic image content is being discussed.

본 발명이 해결하고자 하는 과제는 영상의 부호화 및 복호화 효율을 증가시키기 위한 화면내 예측을 위한 가장 가능성 있는 화면내 예측 모드(MPM) 리스트를 구성하는 방법 및 이를 수행하는 비디오 신호의 부호화 및 복호화 장치를 제공하는 것이다.The problem to be solved by the present invention is to provide a method for constructing a list of most probable intra prediction modes (MPM) for intra prediction to increase video encoding and decoding efficiency, and a video signal encoding and decoding apparatus for performing the same. will provide

본 발명이 해결하고자 하는 다른 과제는 영상의 코딩 효율을 향상시키기 위해 다양한 방법으로 필터들을 이용하는 비디오 신호의 부호화 및 복호화 방법 및 장치를 제공하는 것이다.Another object to be solved by the present invention is to provide a method and apparatus for encoding and decoding a video signal using filters in various ways in order to improve coding efficiency of an image.

또한, 본 발명이 해결하고자 하는 다른 과제는 고해상도의 영상을 부호화 또는 복호화 하기 위한 비디오 신호의 부호화 및 복호화 방법 및 장치를 제공하는 것이다.Another object of the present invention is to provide a method and apparatus for encoding and decoding a video signal for encoding or decoding a high-resolution image.

상기 과제를 해결하기 위한 본 발명의 일 실시예에 따른 비디오 신호의 복호화 방법은, 현재 블록의 모양을 판단하는 단계; 상기 판단된 모양에 따라 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록들의 위치 및 개수 중 어느 하나 이상을 결정하는 단계; 및 상기 결정된 이웃 블록들의 화면내 예측 모드에 기초하여 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 단계를 포함하고, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함한다.According to an embodiment of the present invention, there is provided a method for decoding a video signal, comprising: determining a shape of a current block; determining any one or more of positions and numbers of neighboring blocks that obtain the most probable intra prediction mode of the current block according to the determined shape; and constructing a list of most probable intra prediction modes of the current block based on the determined intra prediction modes of the neighboring blocks, wherein the neighboring blocks include left neighboring blocks and upper neighboring blocks.

상기 판단하는 단계는, 상기 현재 블록의 가로 길이와 세로 길이를 비교하여 판단할 수 있다.The determining may be determined by comparing a horizontal length and a vertical length of the current block.

일 실시예에서, 상기 판단하는 단계는, 상기 현재 블록의 분할 정보, 방향 정보, 및 픽셀 정보 중 어느 하나 이상을 기초로 하여 판단할 수 있다.In an embodiment, the determining may include determining based on at least one of division information, direction information, and pixel information of the current block.

또한, 상기 현재 블록의 가로 길이가 세로 길이보다 긴 경우, 상기 좌측 이웃 블록들의 개수보다 상기 상측 이웃 블록들의 개수가 상기 이웃 블록들로서 더 많이 결정되고, 상기 현재 블록의 세로 길이가 가로 길이보다 긴 경우, 상기 상측 이웃 블록들의 개수보다 상기 좌측 이웃 블록들의 개수가 상기 이웃 블록들로서 더 많이 결정될 수 있다.Also, when the horizontal length of the current block is longer than the vertical length, the number of the upper neighboring blocks is determined as the neighboring blocks more than the number of the left neighboring blocks, and the vertical length of the current block is longer than the horizontal length , the number of the left neighboring blocks may be more determined as the neighboring blocks than the number of the upper neighboring blocks.

일 실시예에서, 상기 결정된 이웃 블록들에 적어도 두 개 이상의 필터를 적용하는 스무딩 단계를 더 포함할 수 있다. 상기 적어도 두 개 이상의 필터는 상기 현재 블록의 크기, 모양, 예측 방법, 및 상기 이웃 블록들의 위치 중 적어도 하나 이상을 고려하여 결정될 수 있다. 일 실시예에서, 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들에 상기 적어도 두 개 이상의 필터 중 상이한 필터가 각각 적용될 수 있다.In an embodiment, the method may further include a smoothing step of applying at least two filters to the determined neighboring blocks. The at least two filters may be determined in consideration of at least one of a size, a shape, a prediction method of the current block, and positions of the neighboring blocks. In an embodiment, different filters among the at least two filters may be applied to the left neighboring blocks and the upper neighboring blocks, respectively.

다른 실시예에서, 비디오 신호의 복호화 방법은, 현재 블록의 이웃 블록들의 모양을 판단하는 단계; 상기 판단된 모양에 따라 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록들의 스캔 순서를 결정하는 단계; 및 상기 결정된 순서에 따라 상기 이웃 블록들로부터 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 단계를 포함하고, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함할 수 있다.In another embodiment, a method of decoding a video signal includes: determining shapes of neighboring blocks of a current block; determining a scan order of neighboring blocks for obtaining the most probable intra prediction mode of the current block according to the determined shape; and constructing a list of most probable intra prediction modes of the current block from the neighboring blocks according to the determined order, wherein the neighboring blocks may include left neighboring blocks and upper neighboring blocks.

상기 판단하는 단계는, 상기 좌측 이웃 블록들과 상기 상측 이웃 블록들의 크기에 기초할 수 있다.The determining may be based on sizes of the left neighboring blocks and the upper neighboring blocks.

일 실시예에서, 상기 스캔 순서를 결정하는 단계는, 상기 좌측 이웃 블록들의 크기가 상기 상측 이웃 블록들의 크기보다 큰 경우, 상기 좌측 이웃 블록들의 화면내 예측 모드를 먼저 스캔하여 상기 가장 가능성 있는 화면내 예측 모드 리스트에 포함시키고, 상기 상측 이웃 블록들의 크기가 상기 좌측 이웃 블록들의 크기보다 큰 경우, 상기 상측 이웃 블록들의 화면내 예측 모드를 먼저 스캔하여 상기 가장 가능성 있는 화면내 예측 모드 리스트에 포함시킬 수 있다. 또한, 상기 이웃 블록들은 화면내 예측 모드로 결정된 블록들일 수 있다.In an embodiment, the determining of the scan order includes, when the size of the left neighboring blocks is larger than the size of the upper neighboring blocks, scan the intra prediction modes of the left neighboring blocks first and then the most probable within the picture. included in the prediction mode list, and when the size of the upper neighboring blocks is larger than the size of the left neighboring blocks, the intra prediction modes of the upper neighboring blocks are scanned first and included in the most probable intra prediction mode list have. Also, the neighboring blocks may be blocks determined as an intra prediction mode.

일 실시예에서, 상기 결정된 이웃 블록들에 적어도 두 개 이상의 필터를 적용하는 스무딩 단계를 더 포함할 수 있다. 상기 적어도 두 개 이상의 필터는 상기 현재 블록의 크기, 모양, 예측 방법, 및 상기 이웃 블록들의 위치 중 적어도 하나 이상을 고려하여 결정될 수 있다. 일 실시예에서, 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들에 상기 적어도 두 개 이상의 필터 중 상이한 필터가 각각 적용될 수 있다.In an embodiment, the method may further include a smoothing step of applying at least two filters to the determined neighboring blocks. The at least two filters may be determined in consideration of at least one of a size, a shape, a prediction method of the current block, and positions of the neighboring blocks. In an embodiment, different filters among the at least two filters may be applied to the left neighboring blocks and the upper neighboring blocks, respectively.

다른 실시예에서는, 비디오 신호의 복호화 방법이, 현재 블록의 이웃 블록의 예측 모드를 획득하는 단계; 상기 예측 모드에 기초하여 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 상기 이웃 블록의 스캔 순서를 결정하는 단계; 및 상기 결정된 순서에 따라 상기 이웃 블록들로부터 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 단계를 포함하고, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함할 수 있다.In another embodiment, a method of decoding a video signal includes: acquiring a prediction mode of a neighboring block of a current block; determining a scan order of the neighboring blocks for obtaining the most probable intra prediction mode of the current block based on the prediction mode; and constructing a list of most probable intra prediction modes of the current block from the neighboring blocks according to the determined order, wherein the neighboring blocks may include left neighboring blocks and upper neighboring blocks.

상기 스캔 순서를 결정하는 단계는. 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들 중 화면내 예측으로 획득된 블록들이 더 많은 이웃 블록들을 우선적으로 스캔할 수 있다.determining the scan order. Among the left neighboring blocks and the upper neighboring blocks, blocks obtained by intra prediction may preferentially scan more neighboring blocks.

상기 이웃 블록의 예측 모드를 획득하는 단계는, 상기 현재 블록의 주변을 서브 블록들로 분할하는 단계; 및 상기 분할된 서브 블록들의 예측 모드를 획득하는 단계를 포함할 수 있다.The obtaining of the prediction mode of the neighboring block may include: dividing a periphery of the current block into sub-blocks; and obtaining prediction modes of the divided sub-blocks.

일 실시예에서, 상기 결정된 이웃 블록들에 적어도 두 개 이상의 필터를 적용하는 스무딩 단계를 더 포함할 수 있다. 상기 적어도 두 개 이상의 필터는 상기 현재 블록의 크기, 모양, 예측 방법, 및 상기 이웃 블록들의 위치 중 적어도 하나 이상을 고려하여 결정될 수 있다. 일 실시예에서, 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들에 상기 적어도 두 개 이상의 필터 중 상이한 필터가 각각 적용될 수 있다.In an embodiment, the method may further include a smoothing step of applying at least two filters to the determined neighboring blocks. The at least two filters may be determined in consideration of at least one of a size, a shape, a prediction method of the current block, and positions of the neighboring blocks. In an embodiment, different filters among the at least two filters may be applied to the left neighboring blocks and the upper neighboring blocks, respectively.

또 다른 실시예에서, 비디오 신호의 복호화 방법은, 현재 블록의 모양을 판단하는 단계; 상기 판단된 모양에 따라 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록들의 스캔 순서를 결정하는 단계; 상기 결정된 스캔 순서에 따라, 상기 이웃 블록들의 화면내 예측 모드에 기초하여 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 단계를 포함하고, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함할 수 있다.In another embodiment, a method of decoding a video signal includes: determining a shape of a current block; determining a scan order of neighboring blocks for obtaining the most probable intra prediction mode of the current block according to the determined shape; constructing a list of most probable intra prediction modes of the current block based on intra prediction modes of the neighboring blocks according to the determined scan order, wherein the neighboring blocks are left neighboring blocks and upper neighboring blocks may include

상기 판단하는 단계는, 상기 현재 블록의 가로 길이와 상기 현재 블록의 세로 길이의 비교 결과, 상기 현재 블록의 분할 정보, 방향 정보, 및 픽셀 정보 중 어느 하나 이상을 기초로 하여 판단할 수 있다.The determining may include a result of comparing the horizontal length of the current block and the vertical length of the current block, and determining based on at least one of division information, direction information, and pixel information of the current block.

또한, 상기 스캔 방법을 결정하는 단계는, 상기 현재 블록의 가로 길이가 상기 현재 블록의 세로 길이보다 긴 경우, 상기 상측 이웃 블록들을 상기 좌측 이웃 블록들보다 먼저 스캔하고, 상기 현재 블록의 세로 길이가 상기 현재 블록의 가로 길이보다 긴 경우, 상기 좌측 이웃 블록들을 상기 상측 이웃 블록들보다 먼저 스캔하도록 결정할 수 있다.In addition, the determining of the scan method may include, when the horizontal length of the current block is longer than the vertical length of the current block, the upper neighboring blocks are scanned before the left neighboring blocks, and the vertical length of the current block is If it is longer than the horizontal length of the current block, it may be determined to scan the left neighboring blocks before the upper neighboring blocks.

일 실시예에서, 상기 결정된 이웃 블록들에 적어도 두 개 이상의 필터를 적용하는 스무딩 단계를 더 포함할 수 있다. 상기 적어도 두 개 이상의 필터는 상기 현재 블록의 크기, 모양, 예측 방법, 및 상기 이웃 블록들의 위치 중 적어도 하나 이상을 고려하여 결정될 수 있다. 일 실시예에서, 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들에 상기 적어도 두 개 이상의 필터 중 상이한 필터가 각각 적용될 수 있다.In an embodiment, the method may further include a smoothing step of applying at least two filters to the determined neighboring blocks. The at least two filters may be determined in consideration of at least one of a size, a shape, a prediction method of the current block, and positions of the neighboring blocks. In an embodiment, different filters among the at least two filters may be applied to the left neighboring blocks and the upper neighboring blocks, respectively.

또 다른 실시예에서, 비디오 신호의 복호화 방법은 현재 블록의 주변에 위치하는 블록들을 이웃 서브 블록들로 분할하는 단계; 및 상기 이웃 서브 블록들 각각의 화면내 예측 모드들을 획득하는 단계를 포함하며, 상기 이웃 서브 블록들은 좌측 이웃 서브 블록들 및 상측 이웃 서브 블록들을 포함하고, 상기 이웃 서브 블록들은 상기 현재 블록의 크기 및 모양 중 어느 하나 이상을 기초로 상기 이웃 서브 블록들의 위치 및 개수가 결정될 수 있다.In another embodiment, a method of decoding a video signal includes dividing blocks located in the vicinity of a current block into neighboring sub-blocks; and obtaining intra prediction modes of each of the neighboring subblocks, wherein the neighboring subblocks include left neighboring subblocks and upper neighboring subblocks, the neighboring subblocks having a size and The position and number of the neighboring sub-blocks may be determined based on any one or more of the shapes.

또한, 상기 획득된 화면내 예측 모드에 기초하여 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 가장 가능성 있는 화면내 예측 모드를 획득하는 순서를 결정하는 단계를 더 포함할 수 있다.The method may further include determining an order of obtaining the most probable intra prediction modes constituting the most probable intra prediction mode list of the current block based on the obtained intra prediction mode.

상기 과제를 해결하기 위한 본 발명의 또 다른 실시예에 따른 비디오 신호의 복호화 장치는, 현재 블록 또는 상기 현재 블록의 이웃 블록들의 모양 또는 예측 모드를 판단하는 블록 판단부; 상기 판단된 결과에 따라 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 상기 이웃 블록들의 위치, 개수 및 스캔 순서 중 어느 하나 이상을 결정하는 MPM 리스트 구성 방법 결정부; 및 상기 결정된 구성 방법에 따라 상기 이웃 블록들의 화면내 예측 모드에 기초하여 상기 현재 블록의 상기 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 MPM 리스트 구성부를 포함하고, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함할 수 있다.According to another aspect of the present invention, there is provided an apparatus for decoding a video signal, comprising: a block determiner configured to determine a shape or prediction mode of a current block or neighboring blocks of the current block; an MPM list construction method determining unit for determining at least one of a position, a number, and a scan order of the neighboring blocks for obtaining the most probable intra prediction mode of the current block according to the determined result; and an MPM list constructing unit for configuring the most probable intra prediction mode list of the current block based on the intra prediction modes of the neighboring blocks according to the determined configuration method, wherein the neighboring blocks include left neighboring blocks and It may include upper neighboring blocks.

일 실시예에서, 상기 결정된 이웃 블록들에 적어도 두 개 이상의 필터를 적용하는 스무딩부를 더 포함할 수 있다. 상기 적어도 두 개 이상의 필터는 상기 현재 블록의 크기, 모양, 예측 방법, 및 상기 이웃 블록들의 위치 중 적어도 하나 이상을 고려하여 결정될 수 있다. 일 실시예에서, 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들에 상기 적어도 두 개 이상의 필터 중 상이한 필터가 각각 적용될 수 있다.In an embodiment, a smoothing unit for applying at least two filters to the determined neighboring blocks may be further included. The at least two filters may be determined in consideration of at least one of a size, a shape, a prediction method of the current block, and positions of the neighboring blocks. In an embodiment, different filters among the at least two filters may be applied to the left neighboring blocks and the upper neighboring blocks, respectively.

본 발명의 실시예에 따르면, 현재 블록의 모양을 판단하여 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록들의 위치 및 개수 중 어느 하나 이상을 가변적으로 결정하거나, 상기 이웃 블록들로부터 가장 가능성 있는 화면내 예측 모드(MPM)를 획득하기 위하여 스캔하는 순서를 가변적으로 결정함으로써, 상기 현재 블록과 더 상관성이 높은 이웃 블록으로부터 가장 가능성 있는 화면내 예측 모드(MPM)를 획득하여 상기 현재 블록을 효율적인 부호화 방법으로 예측할 수 있는 리스트를 구성가능한 비디오 신호의 부호화 또는 복호화 방법 및 장치를 제공할 수 있다.According to an embodiment of the present invention, any one or more of the positions and the number of neighboring blocks for obtaining the most probable intra prediction mode of the current block is variably determined by determining the shape of the current block, or from the neighboring blocks. By variably determining the scanning order to obtain the most probable intra-prediction mode (MPM), the most probable intra-prediction mode (MPM) is obtained from a neighboring block having a higher correlation with the current block to obtain the current block. It is possible to provide a method and apparatus for encoding or decoding a video signal capable of constructing a list that can be predicted by an efficient encoding method.

또한, 본 발명의 다른 실시예에 따르면, 현재 블록의 이웃 블록들의 모양 또는 예측 모드를 기초로 하여, 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록들의 스캔 순서를 가변적으로 결정함으로써, 상기 현재 블록과 상관성이 높은 이웃 블록의 화면내 예측 모드를 가장 가능성 있는 화면내 예측 모드 리스트의 상대적으로 짧은 길이의 코드워드와 매핑되는 인덱스에 할당하여 코딩 효율을 향상시키는 비디오 신호의 부호화 또는 복호화 방법 및 장치를 제공할 수 있다. In addition, according to another embodiment of the present invention, based on the shape or prediction mode of the neighboring blocks of the current block, by variably determining the scan order of the neighboring blocks for obtaining the most probable intra prediction mode of the current block , encoding or decoding a video signal to improve coding efficiency by allocating the intra prediction mode of the neighboring block having high correlation with the current block to an index mapped with a codeword of a relatively short length of the most probable intra prediction mode list Methods and apparatus can be provided.

또한, 본 발명의 또 다른 실시예에 따르면, 현재 블록의 주변에 위치하는 이웃 서브 블록들로부터 상기 이웃 서브 블록들의 화면내 예측 모드를 획득하여 가장 가능성 있는 화면내 예측 모드 리스트를 구성함으로써, 예측 블록의 크기가 커짐에 따라 소수의 고정된 위치의 화면내 예측 모드가 현재 블록의 화면내 예측 모드와 상이할 수 있는 단점을 해결할 수 있는 비디오 신호의 부호화 또는 복호화 방법 및 장치를 제공할 수 있다.In addition, according to another embodiment of the present invention, the prediction block is obtained by obtaining the intra prediction modes of the neighboring sub-blocks from the neighboring sub-blocks located in the vicinity of the current block and constructing a list of the most probable intra prediction modes. It is possible to provide a method and apparatus for encoding or decoding a video signal that can solve the disadvantage that the intra prediction mode of a small number of fixed positions may be different from the intra prediction mode of the current block as the size of .

또한, 본 발명의 실시예들은, 상기 현재 블록의 크기, 모양, 예측 방법, 및 상기 이웃 블록들의 위치 중 적어도 하나 이상을 고려하여 상기 결정된 이웃 블록들에 적어도 두 개 이상의 필터를 적응적으로 적용함으로써, 상기 현재 블록의 코딩 효율을 향상시킬 수 있다. In addition, embodiments of the present invention provide by adaptively applying at least two filters to the determined neighboring blocks in consideration of at least one or more of the size, shape, prediction method, and position of the neighboring blocks of the current block. , it is possible to improve the coding efficiency of the current block.

도 1은 본 발명의 일 실시예에 따른 비디오 부호화 장치를 개략적으로 나타낸 블록도이다.
도 2는 본 발명의 일 실시예에 따른 비디오 복호화 장치를 개략적으로 나타낸 블록도이다.
도 3a 및 도 3b는 본 발명의 일 실시예에 따른 현재 블록의 다양한 모양을 설명하기 위한 개략도이다.
도 4a 내지 도 5b는 본 발명의 다양한 실시예에 따른 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하기 위한 이웃 블록들을 나타내는 개략도이다.
도 6 및 도 7은 본 발명의 다양한 실시예에 따른 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위한 순서도이다.
도 8은 본 발명의 다른 실시예에 따른 이웃 블록의 모양에 따른 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트 구성 방법을 설명하기 위한 개략도이다.
도 9는 본 발명의 다른 실시예에 따른 가장 가능성 있는 화면내 예측 모드 리스트 구성 방법을 설명하기 위한 순서도이다.
도 10은 본 발명의 또 다른 실시예에 따른 이웃 블록의 모양 및 예측 모드에 따른 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 방법을 설명하기 위한 개략도이다.
도 11은 본 발명의 또 다른 실시예에 따른 이웃 서브 블록들을 이용하여 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 방법을 설명하기 위한 개략도이다.
도 12 및 도 13은 본 발명의 일 실시예에 따른 이웃 블록의 모양 및 예측 모드에 따른 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 방법을 설명하기 위한 개략도 및 순서도이다.
도 14 내지 도 16은 본 발명의 다른 실시예에 따른 이웃 블록의 가로 및 세로 길이에 따른 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 방법을 설명하기 위한 개략도 및 순서도이다.
도 17 및 도 18은 본 발명의 또 다른 실시예에 따른 이웃 블록들을 서브 블록으로 재분할하여, 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 방법을 설명하기 위한 개략도 및 순서도이다.
1 is a block diagram schematically illustrating a video encoding apparatus according to an embodiment of the present invention.
2 is a block diagram schematically illustrating a video decoding apparatus according to an embodiment of the present invention.
3A and 3B are schematic diagrams for explaining various shapes of a current block according to an embodiment of the present invention.
4A to 5B are schematic diagrams illustrating neighboring blocks for obtaining the most probable intra prediction mode of the current block according to various embodiments of the present invention.
6 and 7 are flowcharts for constructing a list of most probable intra prediction modes according to various embodiments of the present invention.
8 is a schematic diagram for explaining a method of constructing a list of most probable intra prediction modes of a current block according to a shape of a neighboring block according to another embodiment of the present invention.
9 is a flowchart illustrating a method of constructing a list of most probable intra prediction modes according to another embodiment of the present invention.
10 is a schematic diagram for explaining a method of constructing a list of most probable intra prediction modes of a current block according to a shape and a prediction mode of a neighboring block according to another embodiment of the present invention.
11 is a schematic diagram for explaining a method of constructing a list of most probable intra prediction modes of a current block using neighboring sub-blocks according to another embodiment of the present invention.
12 and 13 are schematic diagrams and flowcharts for describing a method of constructing a list of most probable intra prediction modes of a current block according to a shape and a prediction mode of a neighboring block according to an embodiment of the present invention.
14 to 16 are schematic diagrams and flowcharts for explaining a method of constructing a list of most probable intra prediction modes of a current block according to horizontal and vertical lengths of neighboring blocks according to another embodiment of the present invention.
17 and 18 are schematic diagrams and flowcharts for explaining a method of constructing a list of most probable intra prediction modes of a current block by re-segmenting neighboring blocks into sub-blocks according to another embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

본 발명의 실시예들은 당해 기술 분야에서 통상의 지식을 가진 자에게 본 발명을 더욱 완전하게 설명하기 위하여 제공되는 것이며, 하기 실시예는 여러 가지 다른 형태로 변형될 수 있으며, 본 발명의 범위가 하기 실시예에 한정되는 것은 아니다. 오히려, 이들 실시예는 본 개시를 더욱 충실하고 완전하게 하고, 당업자에게 본 발명의 사상을 완전하게 전달하기 위하여 제공되는 것이다.Examples of the present invention are provided to more completely explain the present invention to those of ordinary skill in the art, and the following examples may be modified in various other forms, and the scope of the present invention is as follows It is not limited to an Example. Rather, these examples are provided so that this disclosure will be more thorough and complete, and will fully convey the spirit of the invention to those skilled in the art.

또한, 도면에서 각 유닛의 두께나 크기는 설명의 편의 및 명확성을 위하여 과장된 것이며, 도면상에서 동일 부호는 동일한 요소를 지칭한다. 본 명세서에서 사용된 바와 같이, 용어 "및/또는"은 해당 열거된 항목 중 어느 하나 및 하나 이상의 모든 조합을 포함한다.In addition, in the drawings, the thickness or size of each unit is exaggerated for convenience and clarity of description, and the same reference numerals in the drawings refer to the same elements. As used herein, the term “and/or” includes any one and any combination of one or more of those listed items.

본 명세서에서 사용된 용어는 특정 실시예를 설명하기 위하여 사용되며, 본 발명을 제한하기 위한 것이 아니다. 본 명세서에서 사용된 바와 같이, 단수 형태는 문맥상 다른 경우를 분명히 지적하는 것이 아니라면, 복수의 형태를 포함할 수 있다. 또한, 본 명세서에서 사용되는 경우 "포함한다 (comprise)" 및/또는 "포함하는 (comprising)"은 언급한 형상들, 숫자, 단계, 동작, 부재, 요소 및/또는 이들 그룹의 존재를 특정하는 것이며, 하나 이상의 다른 형상, 숫자, 동작, 부재, 요소 및/또는 그룹들의 존재 또는 부가를 배제하는 것이 아니다.The terminology used herein is used to describe specific embodiments, not to limit the present invention. As used herein, the singular form may include the plural form unless the context clearly dictates otherwise. Also, as used herein, "comprise" and/or "comprising" refers to the specified presence of the recited shapes, numbers, steps, actions, members, elements and/or groups thereof. and does not exclude the presence or addition of one or more other shapes, numbers, movements, members, elements and/or groups.

본 명세서에서 제 1, 제 2 등의 용어가 다양한 구성요소, 부재, 부품, 영역, 및/또는 부분들을 설명하기 위하여 사용되지만, 이들 구성요소, 부재, 부품, 영역, 및/또는 부분들은 이들 용어에 의해 한정되어서는 안됨은 자명하다. 이들 용어는 하나의 구성요소, 부재, 부품, 영역 또는 부분을 다른 영역 또는 부분과 구별하기 위하여만 사용된다. 따라서, 이하 상술할 제 1 구성요소, 부재, 부품, 영역 또는 부분은 본 발명의 가르침으로부터 벗어나지 않고서도 제 2 구성요소, 부재, 부품, 영역 또는 부분을 지칭할 수 있다. 또한, 및/또는 용어는 복수의 관련되어 기재되는 항목들의 조합 또는 복수의 관련되어 기재되는 항목들 중의 어느 항목을 포함한다.Although the terms first, second, etc. are used herein to describe various components, members, parts, regions, and/or portions, these components, members, parts, regions, and/or portions refer to these terms. It is obvious that it should not be limited by These terms are used only to distinguish one component, member, part, region or part from another region or part. Accordingly, a first component, member, component, region or portion discussed below may refer to a second component, member, component, region or portion without departing from the teachings of the present invention. Also, and/or terms include combinations of a plurality of related recited items or any of a plurality of related recited items.

어느 구성요소가 다른 구성요소에 "연결되어" 있거나 "접속되어" 있다고 언급되는 경우에는, 상기 다른 구성요소에 직접적으로 연결되어 있거나 접속되어 있는 경우 뿐만 아니라, 상기 어느 구성요소와 상기 다른 구성요소 사이에 다른 구성요소가 존재하는 경우를 포함하여 이해되어야 한다. 그러나, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있거나 "직접 접속되어" 있다고 지칭되는 경우에는, 중간에 다른 구성요소가 존재하지 아니하고 상기 어느 구성요소와 상기 다른 구성요소가 직접 연결 또는 접속된 것으로 이해되어야 할 것이다.When a component is referred to as being “connected” or “connected” to another component, it is not only directly connected or connected to the other component, but also between the component and the other component. It should be understood including the case where other components are present. However, when a component is referred to as being “directly connected” or “directly connected” to another component, there is no other component in the middle and the component and the other component are directly connected or connected. should be understood as being

이하, 본 발명의 실시예들은 본 발명의 이상적인 실시예들을 개략적으로 도시하는 도면들을 참조하여 설명한다. 도면들에 있어서, 예를 들면, 부재들의 크기와 형상은 설명의 편의와 명확성을 위하여 과장될 수 있으며, 실제 구현시, 도시된 형상의 변형들이 예상될 수 있다. 따라서, 본 발명의 실시예는 본 명세서에 도시된 영역의 특정 형상에 제한된 것으로 해석되어서는 아니된다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, embodiments of the present invention will be described with reference to the drawings schematically illustrating ideal embodiments of the present invention. In the drawings, for example, the size and shape of the members may be exaggerated for convenience and clarity of description, and in actual implementation, variations of the illustrated shape may be expected. Accordingly, embodiments of the present invention should not be construed as limited to the specific shapes of the regions shown herein.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치를 개략적으로 나타낸 블록도이다.1 is a block diagram schematically illustrating an image encoding apparatus according to an embodiment of the present invention.

도 1을 참조하면, 영상 부호화 장치(100)는 픽처 분할부(105), 화면간 예측부(110), 화면내 예측부(115), 변환부(120), 양자화부(125), 재정렬부(130), 엔트로피 부호화부(135), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함한다. Referring to FIG. 1 , the image encoding apparatus 100 includes a picture divider 105 , an inter prediction unit 110 , an intra prediction unit 115 , a transform unit 120 , a quantizer 125 , and a rearrangement unit. 130 , an entropy encoding unit 135 , an inverse quantization unit 140 , an inverse transform unit 145 , a filter unit 150 , and a memory 155 .

도 1에 나타난 각 구성요소들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위하여 독립적으로 도시한 것이며, 각 구성요소들이 분리된 하드웨어나 각각 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성요소는 설명의 편의상 각각의 구성요소로 나열하여 포함한 것으로 각 구성요소 중 적어도 두 개의 구성요소가 합쳐져 하나의 구성요소로 이루어지거나, 하나의 구성요소가 복수개의 구성요소로 나뉘어져 기능을 수행할 수 있다. 이러한 각 구성요소가 통합된 실시예 또는 분리된 실시예도 본 발명의 본질적인 측면에서 벗어나지 않는 한 본 발명의 권리범위에 포함될 수 있다.Each component shown in FIG. 1 is independently illustrated to represent different characteristic functions in the image encoding apparatus, and does not mean that each component is composed of separate hardware or one software component. That is, each component is included by listing as each component for convenience of description, and at least two components of each component are combined to form one component, or one component is divided into a plurality of components to provide a function can be done An embodiment in which each of these components is integrated or a separate embodiment may be included in the scope of the present invention without departing from the essential aspect of the present invention.

픽처 분할부(105)는 입력된 픽처를 적어도 하나의 처리 단위로 분할할 수 있다. 상기 처리 단위는 예측 단위(Prediction Unit, 이하 'PU'라 함)일 수 있고, 변환 단위(Transform Unit, 이하 'TU'라 함)일 수도 있으며, 코딩 단위(Coding Unit, 이하 'CU'라 함)일 수도 있다. 다만, 본 명세서에서는 설명의 편의를 위해, 예측 단위를 예측 블록, 변환 단위를 변환 블록, 부호화 또는 복호화 단위를 부호화 블록 또는 복호화 블록으로 표현할 수도 있다.The picture divider 105 may divide the input picture into at least one processing unit. The processing unit may be a prediction unit (hereinafter referred to as 'PU'), a transform unit (hereinafter referred to as 'TU'), or a coding unit (Coding Unit, hereinafter referred to as 'CU'). ) may be However, in the present specification, for convenience of description, a prediction unit may be expressed as a prediction block, a transformation unit may be expressed as a transform block, and a coding or decoding unit may be expressed as a coding block or a decoding block.

일 실시예에서, 픽처 분할부(105)는 하나의 픽처에 대하여 복수의 부호화 단위, 예측 단위, 및 변환 단위의 조합으로 분할하고, 소정의 기준(예를 들어, 비용 함수)에 기초하여 하나의 부호화 단위, 예측 단위, 및 변환 단위의 조합을 선택하여 픽처를 부호화할 수 있다.In an embodiment, the picture splitter 105 divides one picture into a combination of a plurality of coding units, prediction units, and transformation units, and divides one picture into one picture based on a predetermined criterion (eg, a cost function). A picture may be encoded by selecting a combination of a coding unit, a prediction unit, and a transformation unit.

예를 들어, 하나의 픽처는 복수 개의 부호화 단위로 분할될 수 있다. 일 실시예에서, 하나의 픽처는 쿼드 트리 구조(Quad Tree Structure) 또는 바이너리 트리 구조와 같은 재귀적인 트리 구조를 사용하여 상기 부호화 단위를 분할할 수 있으며, 하나의 영상 또는 최대 크기 부호화 단위(largest coding unit)를 루트로 하여 다른 부호화 단위로 분할되는 부호화 단위는 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 이러한 과정을 통하여 더 이상 분할되지 아니하는 부호화 단위는 리프 노드가 될 수 있다. 예를 들어, 하나의 부호화 단위에 대하여 정방형 분할만이 가능하다고 가정한 경우에는 하나의 부호화 단위는 최대 4개의 부호화 단위로 분할될 수 있다. 그러나, 본 발명에서는 상기 부호화 단위, 예측 단위 및/또는 변환 단위는 분할 시 대칭 분할에 한정하지 아니하고, 비대칭 분할(Asymmetric Partition)도 가능하며 4개의 분할 뿐만 아니라 2개의 분할도 가능하며, 이러한 분할 개수는 예시적일 뿐 본 발명이 이에 한정되는 것은 아니다. For example, one picture may be divided into a plurality of coding units. In an embodiment, one picture may divide the coding unit using a recursive tree structure such as a quad tree structure or a binary tree structure, and one image or a largest coding unit (largest coding unit). unit) as a root, a coding unit divided into other coding units may be divided having as many child nodes as the number of divided coding units. A coding unit that is no longer split through this process may become a leaf node. For example, if it is assumed that only square splitting is possible for one coding unit, one coding unit may be split into up to four coding units. However, in the present invention, the coding unit, the prediction unit, and/or the transformation unit are not limited to symmetric partitioning when partitioning, and an asymmetric partition is also possible, and not only four partitions but also two partitions are possible. is merely exemplary, and the present invention is not limited thereto.

예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태와 크기를 가지도록 분할될 수도 있다.A prediction unit may be split in the form of at least one square or rectangle of the same size within one coding unit, and one prediction unit among the split prediction units within one coding unit is a prediction of another. It may be divided to have a shape and size different from the unit.

예측부는 화면간 예측(inter prediction)을 수행하는 화면간 예측부(110) 및 화면내 예측(intra prediction)을 수행하는 화면내 예측부(115)를 포함할 수 있다. 코딩 효율을 높이기 위하여, 영상 신호를 그대로 부호화하는 것이 아니라, 이미 부호화 및 복호화가 완료된 픽처 내부의 특정 영역을 이용하여 영상을 예측하고, 원래의 영상과 예측 영상 사이의 레지듀얼 값을 부호화한다. 또한, 예측을 위하여 사용된 예측 모드 정보, 움직임 벡터 정보 등은 레지듀얼 값과 함께 엔트로피 부호화부(135)에서 부호화되어 복호화부에 전달될 수 있다. 특정한 부호화 모드를 이용하는 경우에는 예측부(110, 115)를 통하여 예측 블록을 생성하지 아니하고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.The prediction unit may include an inter prediction unit 110 performing inter prediction and an intra prediction unit 115 performing intra prediction. In order to increase coding efficiency, an image is predicted using a specific region inside a picture that has already been encoded and decoded, instead of encoding the image signal as it is, and a residual value between the original image and the predicted image is encoded. Also, prediction mode information, motion vector information, etc. used for prediction may be encoded by the entropy encoder 135 together with a residual value and transmitted to the decoder. When a specific encoding mode is used, it is also possible to encode the original block as it is without generating the prediction block through the prediction units 110 and 115 and transmit it to the decoder.

일 실시예에서, 예측부(110, 115)는 예측 단위에 대하여 화면간 예측을 수행할 것인지 화면내 예측을 수행할 것인지를 결정하고, 화면간 예측 모드, 움직임 벡터, 및 참조 픽쳐와 같은 상기 예측 방법 각각에 따른 구체적인 정보들을 결정할 수 있다. 이 경우, 예측이 수행되는 처리 단위와 예측 방법, 그리고 세부 처리 단위는 각각 다를 수 있다. 예를 들어, 예측 모드와 예측 방법은 예측 단위에 따라 결정되더라도, 예측의 수행은 변환 단위에 따라 수행될 수 있다.In an embodiment, the prediction units 110 and 115 determine whether inter prediction or intra prediction is to be performed on a prediction unit, and the prediction such as an inter prediction mode, a motion vector, and a reference picture. Specific information according to each method may be determined. In this case, a processing unit in which prediction is performed, a prediction method, and a detailed processing unit may be different. For example, although a prediction mode and a prediction method are determined according to a prediction unit, prediction may be performed according to a transformation unit.

부호화 블록을 부호화하기 위해 예측하는 방법에 따라 다양한 픽처 타입 또는 슬라이스 타입이 존재하는데, 구체적으로는 I 픽처(I 슬라이스), P 픽처(P 슬라이스), B 픽처(B 슬라이스) 등이 있다. I 슬라이스는 화면간 예측에 의해서만 부호화 및 복호화되는 슬라이스이고, P 슬라이스는 각 예측 블록의 샘플 값을 예측하기 위하여 하나의 움직임 벡터 및 참조 픽처 인덱스를 이용한 화면간 예측을 이용해서 복호화될 수 있는 슬라이스이다. B 슬라이스는 각 블록의 샘플 값을 예측하기 위하여 한 개 또는 두 개의 움직임 벡터들과 움직임 벡터들과 관련된 참조 픽처들의 인덱스들을 이용한 화면간 예측을 이용해서 부호화 또는 복호화될 수 있는 슬라이스이다. Various picture types or slice types exist according to a prediction method for encoding a coding block. Specifically, there are an I picture (I slice), a P picture (P slice), a B picture (B slice), and the like. An I slice is a slice that is encoded and decoded only by inter prediction, and a P slice is a slice that can be decoded using inter prediction using one motion vector and a reference picture index to predict a sample value of each prediction block. . A B slice is a slice that can be encoded or decoded using inter prediction using one or two motion vectors and indices of reference pictures related to the motion vectors to predict a sample value of each block.

예측부(110, 115)는, 픽처 분할부(105)에서 분할된 픽처의 처리 단위에 대하여 예측을 수행하여 예측된 샘플로 구성되는 예측 블록을 생성할 수 있다. 예측부(110, 115)에서의 픽처 처리 단위는 코딩 단위일 수 있고, 변환 단위일 수도 있으며, 예측 단위일 수도 있다.The prediction units 110 and 115 may generate a prediction block including samples predicted by performing prediction on a processing unit of the picture divided by the picture division unit 105 . The picture processing unit in the prediction units 110 and 115 may be a coding unit, a transformation unit, or a prediction unit.

화면간 예측부(110)는 현재 픽처의 이전 픽처 또는 이후 픽처 중 적어도 하나 이상의 픽처의 정보를 기초로 예측 단위를 예측할 수 있고, 경우에 따라 현재 픽처 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수 있다. 화면간 예측부(110)는 참조 픽처 보간부, 움직임 예측부, 및 움직임 보상부를 포함할 수 있다.The inter prediction unit 110 may predict a prediction unit based on information on at least one picture of a previous picture or a subsequent picture of the current picture, and in some cases, prediction based on information of a partial region in the current picture that has been encoded units can be predicted. The inter prediction unit 110 may include a reference picture interpolator, a motion prediction unit, and a motion compensator.

일 실시예에서, 화면간 예측부(110)에서 예측을 위하여 이용되는 상기 하나 이상의 픽처의 정보는 이미 부호화 및 복호화가 진행된 픽처들의 정보일 수 있고, 임의의 방법으로 변형되어 저장된 픽처들의 정보일 수 있다. 예를 들어, 상기 임의의 방법으로 변형되어 저장된 픽처는 부호화 및 복호화가 진행된 픽처를 확대 또는 축소한 픽처일 수 있고, 또는 픽처 내의 모든 픽셀 값의 밝기를 변형시키거나, 칼라 포맷을 변형시킨 픽처일 수도 있다. In an embodiment, the information on the one or more pictures used for prediction by the inter prediction unit 110 may be information about pictures that have already been encoded and decoded, or information about pictures that have been transformed and stored in an arbitrary method. have. For example, the picture transformed and stored by any of the above methods may be an enlarged or reduced picture of a picture that has been encoded and decoded, or a picture in which the brightness of all pixel values in the picture is changed or the color format is changed. may be

참조 픽처 보간부는 메모리(155)로부터 참조 픽처 정보를 제공받아 참조 픽처에서 정수 픽셀 이하의 픽셀 정보를 생성할 수 있다. 휘도 픽셀의 경우, 필터의 계수를 달리하는 DCT 기반의 8-탭 보간 필터(DCT-based Interpolation Filter)를 이용하여 1/4 픽셀 단위로 정수 이하의 픽셀 정보를 생성할 수 있다. 색차 신호의 경우에는 필터의 계수를 달리하는 DCT 기반의 4-탭 보간 필터(DCT-based Interpolation Filter)를 이용하여 1/8 픽셀 단위로 정수 이하의 픽셀 정보를 생성할 수 있다. 그러나, 필터의 종류 및 정수 이하의 픽셀 정보를 생성하는 단위는 이에 한정되지는 아니하고, 다양한 보간 필터를 이용하여 정수 이하의 픽셀 정보를 생성하는 단위가 결정될 수 있을 것이다.The reference picture interpolator may receive reference picture information from the memory 155 and generate pixel information of integer pixels or less in the reference picture. In the case of a luminance pixel, pixel information of less than an integer may be generated in units of 1/4 pixels by using a DCT-based 8-tap interpolation filter with different filter coefficients. In the case of a color difference signal, pixel information of less than an integer may be generated in units of 1/8 pixel by using a DCT-based interpolation filter that has different filter coefficients. However, the type of filter and the unit for generating pixel information less than an integer are not limited thereto, and a unit for generating pixel information less than or equal to an integer may be determined by using various interpolation filters.

움직임 예측부는 상기 참조 픽처 보간부에 의하여 보간된 참조 픽처를 기초로 하여 움직임 예측을 수행할 수 있다. 움직임 벡터를 산출하기 위하여 다양한 방법이 사용될 수 있다. 움직임 벡터는 보간된 픽셀을 기초로 하여 정수 픽셀 단위 또는 1/2 또는 1/4 픽셀 단위의 움직임 벡터값을 가질 수 있다. 일 실시예에서는, 움직임 예측부에서 움직임 예측 방법을 다르게 하여 현재 블록의 예측 단위를 예측할 수 있다. 상기 움직임 예측 방법은 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법, 및 스킵(Skip) 방법을 포함하여 다양한 방법이 사용될 수 있다. 이와 같이, 화면간 예측부(110)에서 선택된 참조 픽처의 인덱스, 움직임 벡터 예측자(MVP), 레지듀얼 신호를 포함하는 정보들은 엔트로피 코딩되어 복호화기로 전송될 수 있다.The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolator. Various methods may be used to calculate the motion vector. The motion vector may have a motion vector value in integer pixel units or in 1/2 or 1/4 pixel units based on interpolated pixels. In an embodiment, the motion prediction unit may predict the prediction unit of the current block by using a different motion prediction method. Various methods may be used as the motion prediction method, including a merge method, an advanced motion vector prediction (AMVP) method, and a skip method. As described above, information including the index of the reference picture selected by the inter prediction unit 110, the motion vector predictor (MVP), and the residual signal may be entropy-coded and transmitted to the decoder.

화면내 예측부(115)는 화면간 예측과 달리 현재 픽처 내의 픽셀 정보인 현재 블록 주변의 참조 픽셀 정보들을 기초로 하여 예측 단위를 생성할 수 있다. 상기 예측 단위의 주변 블록들은 화면간 예측을 수행한 블록인 경우, 즉, 참조 픽셀이 화면간 예측을 수행한 픽셀인 경우에는 화면간 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 화면내 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 상기 참조 픽셀이 가용되지 아니하는 경우(unavailable)에는 가용되지 않는 참조 픽셀을 가용되는 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다. 일 실시예에서, 화면내 예측부(115)는 화면내 블록 카피(Intra Block Copy) 방법을 포함하여 다양한 방법이 사용될 수 있다. Unlike inter prediction, the intra prediction unit 115 may generate a prediction unit based on reference pixel information around the current block, which is pixel information in the current picture. When the neighboring blocks of the prediction unit are blocks on which inter prediction is performed, that is, when the reference pixel is a pixel on which inter prediction is performed, the reference pixel included in the block on which inter prediction is performed is predicted as the neighboring blocks. It can be used by replacing it with reference pixel information of the block in which ? That is, when the reference pixel is unavailable, the unavailable reference pixel may be replaced with at least one reference pixel among available reference pixels. In an embodiment, the intra prediction unit 115 may use various methods including an intra block copy method.

또한, 화면내 예측부(115))는 화면내 예측 모드를 부호화하기 위하여 이웃 블록들로부터 획득한 가장 가능성 있는 화면내 예측 모드(MPM: Most Probable Mode)을 이용할 수 있다. 본 발명의 다양한 실시예에 따르면, 상기 가장 가능성 있는 화면내 예측 모드들로 구성되는 가장 가능성 있는 화면내 예측 모드 리스트(MPM list)를 다양한 방법으로 구성할 수 있다. 이를 위하여, 상기 이웃 블록들을 설정하는 방법 및 이들을 스캔하는 방법 등을 현재 블록 및 상기 현재 블록의 이웃 블록들을 참조하여 가변적으로 결정할 수 있는 바, 이와 관련한 자세한 설명은 후술하기로 한다.Also, the intra prediction unit 115 may use the most probable intra prediction mode (MPM) obtained from neighboring blocks to encode the intra prediction mode. According to various embodiments of the present invention, the most probable intra prediction mode list (MPM list) composed of the most probable intra prediction modes may be configured in various ways. To this end, a method of setting the neighboring blocks and a method of scanning them can be variably determined with reference to the current block and neighboring blocks of the current block, and a detailed description thereof will be given later.

화면내 예측부(115)가 화면내 예측을 수행하는 경우에도 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 서로 다를 수 있다. 예를 들어, 예측 모드가 예측 단위(PU)로 정해져서 상기 예측 단위로 예측이 수행될 수도 있고, 예측 모드는 예측 단위로 정해지되 예측의 수행은 변환 단위(TU)로 수행될 수도 있다.Even when the intra prediction unit 115 performs intra prediction, a processing unit in which prediction is performed and a processing unit in which a prediction method and specific content are determined may be different from each other. For example, a prediction mode may be determined as a prediction unit (PU) and prediction may be performed in the prediction unit, or the prediction mode may be determined as a prediction unit, but prediction may be performed in a transform unit (TU).

화면내 예측의 예측 모드는 33개의 방향성 예측 모드 및 적어도 2 개 이상의 비방향성 모드를 포함할 수 있다. 상기 비방향성 모드는 DC 예측 모드 및 플래너 모드(Planar Mode)를 포함할 수 있다. 상기 35개의 화면간 예측 모드의 개수는 예시적일 뿐, 본 발명이 이에 한정되는 것은 아니며, 다양한 방법으로 예측하기 위하여 더 많은 방향성 또는 비방향성 모드로 화면내 예측을 수행할 수 있다.The prediction mode of intra prediction may include 33 directional prediction modes and at least two non-directional modes. The non-directional mode may include a DC prediction mode and a planar mode. The number of the 35 inter prediction modes is only an example, and the present invention is not limited thereto. In order to make predictions in various ways, intra prediction may be performed in more directional or non-directional modes.

일 실시예에서, 화면내 예측은 참조 픽셀에 필터를 적용한 후 예측 블록을 생성할 수 있다. 이 경우, 상기 참조 픽셀에 필터를 적용할지 여부는 현재 블록의 화면내 예측 모드 및/또는 크기에 따라 결정될 수 있다.In an embodiment, intra prediction may generate a prediction block after applying a filter to a reference pixel. In this case, whether to apply the filter to the reference pixel may be determined according to the intra prediction mode and/or size of the current block.

예측 단위(PU)는 더 이상 분할되지 않는 코딩 유닛(CU)으로부터 다양한 사이즈 및 형태로 결정될 수 있다. 예를 들어, 화면간 예측의 경우 예측 단위는 2N x 2N, 2N x N, N x 2N 또는 N x N와 같은 크기를 가질 수 있다. 화면내 예측의 경우 예측 단위는 2N x 2N 또는 N x N (N은 정수)와 같은 크기를 가질 수 있으나, 이와 같은 정방향 크기 뿐만 아니라 비정방향 크기 모양으로도 화면내 예측을 수행할 수 있다. 이 경우, N x N 크기의 예측 단위는 특정한 경우에만 적용하도록 설정할 수도 있다. 또한, 상술한 크기의 예측 단위 이외에도, N x mN, mN x N, 2N x mN 또는 mN x 2N (m은 분수 또는 정수임) 와 같은 크기를 갖는 화면내 예측 단위를 더 정의하여 사용할 수도 있다.A prediction unit (PU) may be determined in various sizes and shapes from a coding unit (CU) that is no longer split. For example, in the case of inter prediction, the prediction unit may have a size such as 2N x 2N, 2N x N, N x 2N, or N x N. In the case of intra prediction, the prediction unit may have a size such as 2N x 2N or N x N (N is an integer). In this case, the N x N prediction unit may be set to be applied only in a specific case. In addition to the above-mentioned size of the prediction unit, an intra prediction unit having a size such as N x mN, mN x N, 2N x mN, or mN x 2N (m is a fraction or an integer) may be further defined and used.

화면내 예측부(115)에서 생성된 예측 블록과 원본 블록 사이의 레지듀얼 값(레지듀얼 블록 또는 레지듀얼 신호)은 변환부(120)에 입력될 수 있다. 또한, 예측을 위하여 사용되는 예측 모드 정보, 보간 필터 정보 등은 레지듀얼 값과 함께 엔트로피 부호화부(135)에서 부호화되어 복호화기로 전달될 수 있다.A residual value (a residual block or a residual signal) between the prediction block and the original block generated by the intra prediction unit 115 may be input to the transform unit 120 . Also, prediction mode information, interpolation filter information, etc. used for prediction may be encoded by the entropy encoder 135 together with a residual value and transmitted to a decoder.

또한, 일반적으로 화면내 예측시 현재 블록의 이웃 블록들의 위치에 상관없이 하나의 필터를 이용하여 현재 블록의 이웃 블록들을 스무딩시킨다. 그러나, 본 발명의 일 실시예에 따르면, 화면내 예측부(115)는 적어도 두 개 이상의 스무딩 필터를 이용하여 현재 블록의 이웃 블록들을 스무딩시킬 수 있다. 이러한 스무딩 방법에 대하여는 이하 도 3a 내지 도 18을 참조하여 설명하기로 한다.Also, in general, in intra prediction, the neighboring blocks of the current block are smoothed using one filter regardless of the positions of the neighboring blocks of the current block. However, according to an embodiment of the present invention, the intra prediction unit 115 may use at least two or more smoothing filters to smooth neighboring blocks of the current block. Such a smoothing method will be described below with reference to FIGS. 3A to 18 .

변환부(120)는 변환 단위로 원본 블록과 예측부(110, 115)를 통하여 생성된 예측 단위의 레지듀얼 값 정보를 포함하는 레지듀얼 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT(Karhunen Loeve Transform)과 같은 변환 방법을 이용하여 변환시킬 수 있다. 레지듀얼 블록을 변환하기 위하여 DCT, DST 또는 KLT 를 적용할지는 레지듀얼 블록을 생성하기 위하여 사용된 예측 단위의 화면내 예측 모드 정보를 기초로 결정할 수 있다.The transform unit 120 converts the original block as a transform unit and the residual block including residual value information of the prediction unit generated through the prediction units 110 and 115 to DCT (Discrete Cosine Transform), DST (Discrete Sine Transform) , can be transformed using a transformation method such as Karhunen Loeve Transform (KLT). Whether to apply DCT, DST, or KLT to transform the residual block may be determined based on intra prediction mode information of a prediction unit used to generate the residual block.

변환부(120)에서의 변환 단위는 TU일 수 있고, 쿼드 트리(quad tree) 구조를 가질 수 있다. 일 실시예에서, 변환 단위의 크기는 소정의 최대 및 최소 크기의 범위 내에서 정해질 수 있다.A transform unit in the transform unit 120 may be a TU, and may have a quad tree structure. In an embodiment, the size of the transformation unit may be determined within a range of a predetermined maximum and minimum size.

양자화부(125)는 변환부(120)에서 변환된 레지듀얼 값들을 양자화하여 양자화 계수를 생성할 수 있다. 일 실시예에서, 상기 변환된 레지듀얼 값들은 주파수 영역으로 변환된 값일 수 있다. 상기 양자화 계수는 변환 단위에 따라 또는 영상의 중요도에 따라 변경될 수 있으며, 양자화부(125)에서 산출된 값은 역양자화부(140) 및 재정렬부(130)에 제공될 수 있다.The quantizer 125 may quantize the residual values transformed by the transform unit 120 to generate a quantization coefficient. In an embodiment, the transformed residual values may be values transformed into a frequency domain. The quantization coefficient may be changed according to the transform unit or the importance of the image, and the value calculated by the quantization unit 125 may be provided to the inverse quantization unit 140 and the rearrangement unit 130 .

재정렬부(130)는 양자화부(125)로부터 제공된 양자화 계수를 재정렬할 수 있다. 재정렬부(130)는 상기 양자화 계수를 재정렬함으로써 엔트로피 부호화부(135)에서의 부호화 효율을 향상시킬 수 있다. 재정렬부(130)는 계수 스캐닝(Coefficient Scanning) 방법을 통하여 2차원 블록 형태의 양자화 계수들을 1차원의 벡터 형태로 재정렬할 수 있다. 상기 계수 스캐닝 방법은 변환 단위의 크기 및 화면내 예측 모드에 따라 어떠한 스캔 방법이 사용될지 여부가 결정될 수 있다. 상기 계수 스캐닝 방법은 지그-재그 스캔, 2차원의 블록 형태의 계수를 열 방향으로 스캔하는 수직 스캔, 및 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔을 포함할 수 있다. 일 실시예에서, 재정렬부(130)는 양자화부에서 전송되는 계수들의 확률적인 통계를 기반으로 계수 스캐닝의 순서를 변경함으로써 엔트로피 부호화부(135)에서의 엔트로피 부호화 효율을 높일 수도 있다.The reordering unit 130 may rearrange the quantization coefficients provided from the quantization unit 125 . The reordering unit 130 may improve encoding efficiency in the entropy encoding unit 135 by rearranging the quantization coefficients. The reordering unit 130 may rearrange the quantized coefficients in the form of a two-dimensional block into a form of a one-dimensional vector through a coefficient scanning method. As for the coefficient scanning method, it may be determined which scanning method is used according to the size of the transform unit and the intra prediction mode. The coefficient scanning method may include a zig-zag scan, a vertical scan for scanning two-dimensional block-shaped coefficients in a column direction, and a horizontal scan for scanning two-dimensional block-shaped coefficients in a row direction. In an embodiment, the reordering unit 130 may increase the entropy encoding efficiency of the entropy encoding unit 135 by changing the order of coefficient scanning based on probabilistic statistics of coefficients transmitted from the quantization unit.

엔트로피 부호화부(135)는 재정렬부(130)에 의하여 재정렬된 양자화 계수들에 대한 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Content-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 이용할 수 있다. The entropy encoding unit 135 may perform entropy encoding on the quantized coefficients rearranged by the reordering unit 130 . For entropy encoding, various encoding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Content-Adaptive Binary Arithmetic Coding (CABAC) may be used.

엔트로피 부호화부(135)는 재정렬부(130) 및 예측부(110, 115)로부터 전달받은 코딩 유닛의 양자화 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 유닛 정보 및 전송 단위 정보, 움직임 벡터 정보, 참조 픽처 정보, 블록의 보간 정보, 필터링 정보와 같은 다양한 정보를 부호화할 수 있다. 또한, 일 실시예에서 엔트로피 부호화부(135)는 필요한 경우에, 전송하는 파라미터 셋 또는 신택스에 일정한 변경을 가할 수도 있다. The entropy encoding unit 135 includes quantization coefficient information and block type information, prediction mode information, division unit information, prediction unit information and transmission unit information of the coding unit received from the reordering unit 130 and the prediction units 110 and 115, Various information such as motion vector information, reference picture information, block interpolation information, and filtering information may be encoded. Also, according to an embodiment, the entropy encoder 135 may apply a certain change to a transmitted parameter set or syntax, if necessary.

역양자화부(140)는 양자화부(125)에서 양자화된 값들을 역양자화하고, 역변환부(145)는 역양자화부(140)에서 역양자화된 값들을 역변화한다. 역양자화부(140) 및 역변환부(145)에서 생성된 레지듀얼 값은 예측부(110,115)에서 예측된 예측 블록과 합쳐져 복원 블록(Reconstructed Block)이 생성될 수 있다. 상기 생성된 복원 블록들로 구성된 영상은 움직임 보상 영상 또는 MC 영상(Motion Compensated Picture)일 수 있다.The inverse quantizer 140 inverse quantizes the values quantized by the quantizer 125 , and the inverse transform unit 145 inversely transforms the values inverse quantized in the inverse quantizer 140 . The residual values generated by the inverse quantizer 140 and the inverse transform unit 145 may be combined with the prediction blocks predicted by the predictors 110 and 115 to generate a reconstructed block. The image composed of the generated reconstructed blocks may be a motion compensated image or an MC image (Motion Compensated Picture).

상기 움직임 보상 영상은 필터부(150)에 입력될 수 있다. 필터부(150)는 디블록킹 필터부, 오프셋 보정부(Sample Adaptive Offset, SAO), 및 적응적 루프 필터부(Adaptive Loop Filter, ALF)를 포함할 수 있으며, 요약하자면, 상기 움직임 보상 영상는 디블록킹 필터부에서 디블록킹 필터가 적용되어 블록킹 잡음(blocking artifact)를 감소 또는 제거 시킨 후, 오프셋 보정부에 입력되어 오프셋을 보정시킬 수 있다. 상기 오프셋 보정부에서 출력된 픽처는 상기 적응적 루프 필터부에 입력되어 ALF(Adaptive Loop Filter) 필터를 통과하며, 상기 필터를 통과한 픽처는 메모리(155)로 전송될 수 있다.The motion compensation image may be input to the filter unit 150 . The filter unit 150 may include a deblocking filter unit, an offset correction unit (Sample Adaptive Offset, SAO), and an adaptive loop filter unit (ALF). In summary, the motion compensation image is deblocking After the deblocking filter is applied in the filter unit to reduce or remove blocking artifacts, it may be input to the offset correcting unit to correct the offset. The picture output from the offset correction unit may be input to the adaptive loop filter unit and pass through an adaptive loop filter (ALF) filter, and the picture passing through the filter may be transmitted to the memory 155 .

필터부(150)에 대하여 구체적으로 설명하면, 상기 디블록킹 필터부는 복원된 픽처에서 블록 간의 경계에 생성된 블록 내의 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해서는 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터를 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우, 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한, 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.In detail with respect to the filter unit 150 , the deblocking filter unit may remove distortion within a block generated at a boundary between blocks in a reconstructed picture. In order to determine whether to perform deblocking, it may be determined whether to apply a deblocking filter to the current block based on pixels included in several columns or rows included in the block. When a deblocking filter is applied 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 concurrently processed when performing vertical filtering and horizontal filtering.

오프셋 보정부는 디블록킹 필터가 적용된 레지듀얼 블록에 대하여, 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽처에 대한 오프셋을 보정하기 위하여 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후, 오프셋을 수행할 영역을 결정하고, 해당 영역에 오프셋을 적용하는 방법(Band Offset) 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법(Edge Offset)의 형태로 적용될 수 있다. 그러나, 일 실시예에서 화면간 예측에 사용되는 복원 블록에 대하여는 필터부(150)에서 필터링을 적용하지 아니할 수 있다.The offset correcting unit may correct an offset from the original image in units of pixels with respect to the residual block to which the deblocking filter is applied. In order to correct the offset for a specific picture, a method of dividing pixels included in an image into a certain number of regions, determining a region to be offset, and applying the offset to the region (Band Offset) or the edge of each pixel It may be applied in the form of a method of applying an offset in consideration of information (Edge Offset). However, in an embodiment, the filter unit 150 may not apply filtering to the reconstructed block used for inter prediction.

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

메모리(155)는 필터부(150)을 통하여 산출된 복원 블록 또는 픽처를 저장할 수 있다. 메모리(155)에 저장된 복원 블록 또는 픽처는 화면간 예측을 수행하는 화면간 예측부(110) 또는 화면내 예측부(115)에 제공될 수 있다. 화면내 예측부(115)에서 사용되는 복원 블록들의 화소값은 디블록킹 필터부, 오프셋 보정부, 및 적응적 루프 필터부가 적용되지 아니한 데이터들 일 수 있다.The memory 155 may store the reconstructed block or picture calculated through the filter unit 150 . The reconstructed block or picture stored in the memory 155 may be provided to the inter prediction unit 110 or the intra prediction unit 115 that performs inter prediction. The pixel values of the reconstructed blocks used in the intra prediction unit 115 may be data to which the deblocking filter unit, the offset corrector, and the adaptive loop filter unit are not applied.

도 2는 본 발명의 일 실시예에 따른 영상 복호화 장치를 개략적으로 나타낸 블록도이다. 도 2 를 참조하면, 영상 복호화 장치(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 화면간 예측부(230), 화면내 예측부(235), 필터부(240), 메모리(245)를 포함한다.2 is a block diagram schematically illustrating an image decoding apparatus according to an embodiment of the present invention. Referring to FIG. 2 , the image decoding apparatus 200 includes an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, an inter prediction unit 230, and intra prediction. It includes a unit 235 , a filter unit 240 , and a memory 245 .

영상 부호화 장치로부터 영상 비트스트림이 입력되는 경우, 입력된 비트스트림은 부호화 장치에서 영상 정보가 처리된 절차의 역과정으로 복호화될 수 있다. 예를 들어, 영상 부호화 장치에서 엔트로피 부호화를 수행하기 위하여 CAVLC와 같은 가변 길이 부호화(Variable Length Coding: VLC, 이하 'VLC'라 함)가 사용된 경우에는, 엔트로피 복호화부(210)도 부호화 장치에서 사용한 VLC 테이블과 동일한 VLC 테이블로 구현하여 엔트로피 복호화를 수행할 수 있다. 또한, 부호화 장치에서 엔트로피 부호화를 수행하기 위하여 CABAC을 이용한 경우에는 엔트로피 복호화부(210)에서 이에 대응하여 CABAC을 이용한 엔트로피 복호화를 수행할 수 있다.When an image bitstream is input from the image encoding apparatus, the input bitstream may be decoded by a reverse process of a procedure of processing image information in the encoding apparatus. For example, when variable length coding (VLC, hereinafter referred to as 'VLC') such as CAVLC is used to perform entropy encoding in the image encoding apparatus, the entropy decoding unit 210 also performs the entropy encoding in the encoding apparatus. Entropy decoding can be performed by implementing the same VLC table as the used VLC table. In addition, when CABAC is used to perform entropy encoding in the encoding apparatus, the entropy decoding unit 210 may perform entropy decoding using CABAC in response thereto.

엔트로피 복호화부(210)에서는 복호화된 정보 중 예측 블록을 생성하기 위한 정보를 화면간 예측부(230) 및 화면내 예측부(235)로 제공하고, 엔트로피 복호화부에서 엔트로피 복호화가 수행된 레지듀얼 값은 재정렬부(215)로 입력될 수 있다.The entropy decoding unit 210 provides information for generating a prediction block among the decoded information to the inter prediction unit 230 and the intra prediction unit 235, and the entropy decoding unit performs entropy decoding on the residual value. may be input to the rearrangement unit 215 .

재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 영상 부호화기에서 재정렬한 방법을 기초로 재정렬할 수 있다. 재졍럴부(215)는 부호화 장치에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 부호화 장치에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통하여 재정렬을 수행할 수 있다.The reordering unit 215 may rearrange the entropy-decoded bitstream by the entropy decoding unit 210 based on a method in which the image encoder rearranges the bitstream. The re-regulation unit 215 may receive information related to coefficient scanning performed by the encoding apparatus and perform rearrangement through a method of scanning inversely based on the scanning order performed by the encoding apparatus.

역양자화부(220)는 부호화 장치에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. 역변환부(225)는 영상 부호화 장치에서 수행된 양자화 결과에 대하여, 부호화 장치의 변환부가 수행한 DCT, DST, 또는 KLT 에 대해 역DCT, 역DST, 또는 역KLT를 수행할 수 있다. 역변환은 부호화 장치에서 결정된 전송 단위 또는 영상의 분할 단위를 기초로 수행될 수 있다. 인코딩 장치의 변환부에서는 예측 방법, 현재 블록의 크기 및 예측 방향과 같은 정보에 따라 DCT, DST, 또는 KLT를 선택적으로 수행할 수 있고, 복호화 장치의 역변환부(225)는 부호화 장치의 변환부에서 수행된 변환 정보를 기초로 역변환 방법이 결정되어 역변환을 수행할 수 있다.The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoding apparatus and the reordered coefficient values of the blocks. The inverse transform unit 225 may perform inverse DCT, inverse DST, or inverse KLT on the DCT, DST, or KLT performed by the transform unit of the encoding apparatus on the quantization result performed by the image encoding apparatus. The inverse transformation may be performed based on a transmission unit determined by the encoding apparatus or a division unit of an image. The transform unit of the encoding device may selectively perform DCT, DST, or KLT according to information such as a prediction method, a size of a current block, and a prediction direction, and the inverse transform unit 225 of the decoding device is configured in the transform unit of the encoding device. An inverse transformation method may be determined based on the performed transformation information to perform the inverse transformation.

예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성과 관련된 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 및/또는 픽처 정보를 기초로 예측 블록을 생성할 수 있다. 복원 블록은 예측부(230, 235)에서 생성된 예측 블록과 역변환부(225)에서 제공된 레지듀얼 블록을 이용하여 생성될 수 있다. 예측부(230, 235)에서 수행하는 구체적인 예측의 방법은 부호화 장치의 예측부(110, 115)에서 수행되는 예측의 방법과 동일할 수 있다.The prediction units 230 and 235 may generate a prediction block based on information related to generation of a prediction block provided from the entropy decoding unit 210 and previously decoded block and/or picture information provided from the memory 245 . The reconstructed block may be generated using the prediction block generated by the prediction units 230 and 235 and the residual block provided by the inverse transform unit 225 . The specific prediction method performed by the prediction units 230 and 235 may be the same as the prediction method performed by the prediction units 110 and 115 of the encoding apparatus.

예측부(230, 235)는 예측 단위 판별부(미도시), 화면간 예측부(230), 및 화면내 예측부(235)를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 화면내 예측 방법의 예측 모드 정보, 화면간 예측 방법의 움직임 예측 관련 정보와 같은 다양한 정보를 입력 받아, 현재 부호화 단위에서의 예측 단위를 구분하고, 예측 단위가 화면간 예측을 수행하는지 아니면 화면내 예측을 수행하는지 여부를 판별할 수 있다.The prediction units 230 and 235 may include a prediction unit determiner (not shown), an inter prediction unit 230 , and an intra prediction unit 235 . The prediction unit determining unit receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, and receives a prediction unit in the current coding unit. , and it is possible to determine whether the prediction unit performs inter prediction or intra prediction.

화면간 예측부(230)는 영상 부호화기에서 제공된 현재 예측 단위의 화면간 예측에 필요한 정보를 이용하여 현재 예측 단위가 포함된 현재 픽처의 이전 픽처 또는 이후 픽처 중 적어도 하나의 픽처에 포함된 정보를 기초로 현재 예측 단위에 대한 화면간 예측을 수행할 수 있다. The inter prediction unit 230 uses information required for inter prediction of the current prediction unit provided from the image encoder, and based on information included in at least one of a picture before or after the current picture including the current prediction unit. can perform inter-screen prediction for the current prediction unit.

구체적으로 화면간 예측에서는 현재 블록에 대하여, 참조 픽처를 선택하고 현재 블록과 동일한 크기의 참조 블록을 선택하여 현재 블록에 대한 예측 블록을 생성할 수 있다. 이 때, 참조 픽처의 정보를 이용하기 위하여, 현재 픽처의 주변 블록들의 정보를 이용할 수 있다. 예를 들어, 스킵(skip) 모드, 머지(merge) 모드, 및 AMVP(Advanced Motion Vector Prediction)와 같은 방법을 이용하여 주변 블록의 정보에 기반하여 현재 블록에 대한 예측 블록을 생성할 수 있다.Specifically, in inter prediction, a prediction block for the current block may be generated by selecting a reference picture for the current block and selecting a reference block having the same size as the current block. In this case, in order to use the information of the reference picture, information on neighboring blocks of the current picture may be used. For example, a prediction block for the current block may be generated based on information on the neighboring block using methods such as a skip mode, a merge mode, and advanced motion vector prediction (AMVP).

예측 블록은 1/2 픽셀 샘플 단위와 1/4 픽셀 샘플 단위와 같이 정수 이하의 샘플 단위로 생성될 수 있다. 이 경우, 움직임 벡터 역시 정수 픽셀 이하의 단위로 표현될 수 있다. 예를 들어, 휘도 픽셀에 대해서는 1/4 픽셀 단위로, 색차 픽셀에 대하여는 1/8 픽셀 단위로 표현될 수 있다.The prediction block may be generated in units of samples equal to or less than an integer, such as 1/2 pixel sample unit and 1/4 pixel sample unit. In this case, the motion vector may also be expressed in units of integer pixels or less. For example, the luminance pixel may be expressed in units of 1/4 pixels and the chrominance pixels may be expressed in units of 1/8 pixels.

현재 블록의 화면간 예측에 필요한 움직임 벡터 및 참조 픽처 인덱스를 포함하는 움직임 정보는 부호화 장치로부터 수신한 스킵 플래그, 머지 플래그 등을 확인하고 이에 대응하여 유도될 수 있다.Motion information including a motion vector and a reference picture index required for inter prediction of the current block may be derived by checking a skip flag, a merge flag, etc. received from the encoding apparatus, and corresponding thereto.

화면내 예측부(235)는 현재 픽처 내의 픽셀 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 화면내 예측을 수행한 예측 단위인 경우에는 영상 부호화기에서 제공된 예측 단위의 화면내 예측 모드 정보를 기초로 화면내 예측을 수행할 수 있다. 일 실시예에서, 화면내 예측부(235)는 화면간 블록 카피(Intra Block Copy) 방법을 포함하여 다양한 방법이 사용될 수 있다. The intra prediction unit 235 may generate a prediction block based on pixel information in the current picture. When the prediction unit is a prediction unit on which intra prediction is performed, intra prediction may be performed based on intra prediction mode information of the prediction unit provided by the image encoder. In an embodiment, the intra prediction unit 235 may use various methods including an intra block copy method.

화면내 예측부(235)는 화면내 예측 모드를 부호화하기 위하여 이웃 블록들로부터 획득한 가장 가능성 있는 화면내 예측 모드(MPM: Most Probable Mode)을 이용할 수 있다. 일 실시예에서, 상기 가장 가능성 있는 화면내 예측 모드는 현재 블록의 공간적 이웃 블록의 화면내 예측 모드를 이용할 수 있다. The intra prediction unit 235 may use the most probable intra prediction mode (MPM) obtained from neighboring blocks to encode the intra prediction mode. In an embodiment, the most probable intra prediction mode may use an intra prediction mode of a spatial neighboring block of the current block.

예를 들어, 먼저 현재 블록의 공간적으로 좌측과 상측 이웃 블록의 화면내 예측 블록을 비교하여, 두 개의 화면내 예측 모드가 다르면 좌측 이웃 블록의 화면내 예측 모드를 첫번째 가장 가능성 있는 화면내 예측 모드 인덱스에 할당하고, 상측 이웃 블록의 화면내 예측 모드를 두번째 가장 가능성 있는 화면내 예측 모드 인덱스에 할당한다. 상기 상측 이웃 블록 및 상기 좌측 이웃 블록의 화면내 예측 모드가 모두 플라나(planar) 또는 DC 모드가 아닌 경우에는, 세번째 가장 가능성 있는 화면내 예측 모드 인덱스에 플라나 또는 DC 모드를 할당할 수 있다.For example, first, spatially, the intra prediction blocks of the left and upper neighboring blocks of the current block are compared, and if the two intra prediction modes are different, the intra prediction mode of the left neighboring block is selected as the first most probable intra prediction mode index. and assigns the intra prediction mode of the upper neighboring block to the second most probable intra prediction mode index. When the intra prediction modes of the upper neighboring block and the left neighboring block are neither the planar nor the DC mode, the planar or DC mode may be assigned to the third most probable intra prediction mode index.

만일 상기 상측 이웃 블록 및 상기 좌측 이웃 블록의 화면내 예측 모드가 동일한 경우에는, 상기 좌측 이웃 블록의 화면내 예측 모드가 플라나 또는 DC 모드인지 판단하고, 플라나 또는 DC 모드인 경우에는 첫번째 가장 가능성 있는 화면내 예측 모드 인덱스에 플라나를 할당하고, 두번째 가장 가능성 있는 화면내 예측 모드 인덱스에 DC 모드를 할당할 수 있다. 이후, 세번째 가장 가능성 있는 화면내 예측 모드 인덱스에는 수직(Vertical) 모드를 할당할 수 있다. 만일 상기 좌측 이웃 블록의 화면내 예측 모드가 플라나 또는 DC 모드가 아닌 방향성 모드인 경우에는 세 개의 가장 가능성 있는 화면내 예측 모드 인덱스에 상기 좌측 이웃 블록의 화면내 예측 모드 및 상기 화면내 예측 모드의 주변 모드(±1)를 가장 가능성 있는 화면내 예측 모드 리스트의 인덱스에 할당할 수 있다.If the intra prediction modes of the upper neighboring block and the left neighboring block are the same, it is determined whether the intra prediction mode of the left neighboring block is the planar or DC mode, and in the case of the planar or DC mode, the first most probable picture Plana may be assigned to my prediction mode index, and DC mode may be assigned to the second most probable intra prediction mode index. Thereafter, a vertical mode may be assigned to the third most probable intra prediction mode index. If the intra prediction mode of the left neighboring block is a directional mode other than the planar or DC mode, the three most probable intra prediction mode indexes are the intra prediction mode of the left neighboring block and the vicinity of the intra prediction mode. Mode (±1) may be assigned to the index of the most probable intra prediction mode list.

그러나, 현재 블록을 더욱 원본 블록과 유사하게 예측하기 위하여는 상기 현재 블록의 화면내 예측 모드를 결정하기 위하여 더 많은 가장 가능성 있는 화면내 예측 모드들을 이용할 필요가 있다. 그러므로, 상기 방법 이외에도 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여, 다음과 같은 방법이 이용될 수 있다.However, in order to predict the current block more similarly to the original block, it is necessary to use more probable intra prediction modes to determine the intra prediction mode of the current block. Therefore, in addition to the above method, the following method may be used to construct the list of most probable intra prediction modes of the current block.

일 실시예에서, 현재 블록의 화면내 예측 모드를 부호화하기 위하여 6개의 가장 가능성 있는 화면내 예측 모드를 이용할 수 있다. 상기 가장 가능성 있는 화면내 예측 모드 획득을 위하여 이용되는 이웃 블록들은 현재 블록의 좌측 상측 블록, 상측 블록, 상측 우측 블록, 좌측 블록, 및 좌측 하측 블록일 수 있다. In one embodiment, the six most probable intra prediction modes may be used to encode the intra prediction mode of the current block. The neighboring blocks used for obtaining the most probable intra prediction mode may be a left upper block, an upper block, an upper right block, a left block, and a left lower block of the current block.

예를 들면, 상기 다섯 개의 이웃 블록들을 스캔하며 상기 이웃 블록들의 화면내 예측 모드를 가장 가능성 있는 화면내 예측 모드 리스트에 할당할 수 있다. 이 경우, 상기 다섯 개의 이웃 블록들로부터 화면내 예측 모드 이외에 플라나 모드 및 DC 모드를 가장 가능성 있는 화면내 예측 모드 리스트에 할당할 수 있다. 또한, 중복되는 가장 가능성 있는 화면내 예측 모드는 리스트에 중복하여 할당하지 아니한다. For example, the five neighboring blocks may be scanned and the intra prediction modes of the neighboring blocks may be allocated to the most probable intra prediction mode list. In this case, planar mode and DC mode in addition to the intra prediction mode from the five neighboring blocks may be allocated to the most probable intra prediction mode list. In addition, the most likely overlapping intra prediction mode is not repeatedly assigned to the list.

이와 같이 설정된 초기 가장 가능성 있는 화면내 예측 모드 리스트의 화면내 예측 모드가 6개가 되지 아니하면, 상기 초기 가장 가능성 있는 화면내 예측 모드 리스트에 포함된 화면내 예측 모드 중 방향성을 가지는 화면내 예측 모드의 주변(±1) 모드를 상기 가장 가능성 있는 화면내 예측 모드 리스트에 포함시킨다. 그럼에도 불구하고, 상기 리스트의 화면내 예측 모드가 6개가 되지 아니하는 경우에는, 수직 방향의 화면내 예측 모드, 수평 방향의 화면내 예측 모드, 제 1 대각선 방향의 화면내 예측 모드(2), 제 2 대각선 방향의 화면내 예측 모드(34) 순으로 상기 가장 가능성 있는 화면내 예측 모드 리스트에 포함시켜 완성할 수 있다.If the number of intra-prediction modes in the initial most probable intra-prediction mode list set as above is not six, the directional intra-prediction mode among the intra-prediction modes included in the initial most probable intra prediction mode list. Ambient (±1) mode is included in the list of most probable intra prediction modes. Nevertheless, if there are not six intra prediction modes in the list, the vertical intra prediction mode, the horizontal intra prediction mode, the first diagonal intra prediction mode (2), the second It can be completed by being included in the list of the most probable intra prediction modes in the order of the two diagonal intra prediction modes 34 .

상기 가장 가능성 있는 화면내 예측 모드 리스트를 설정하는 방법에서, 상기 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록의 개수 및 위치, 그리고 상기 이웃 블록을 스캔하는 방법은 기설정 되어 있다. 그러나, 현재 블록을 원본 블록에 더 유사하도록 예측하기 위하여는 다양한 방법으로 이웃 블록으로부터 가장 가능성 있는 화면내 예측 모드를 획득할 필요가 있다. In the method of setting the most probable intra prediction mode list, the number and positions of neighboring blocks for obtaining the most probable intra prediction mode, and a method of scanning the neighboring blocks are preset. However, in order to predict the current block to be more similar to the original block, it is necessary to obtain the most probable intra prediction mode from the neighboring block in various ways.

특히, 현재 블록이 정방형(square) 블록이 아닌 비정방형(non-square) 블록인 경우에는 상기 현재 블록의 주변에 위치하는 이웃 블록들 중 상대적으로 상관도가 높은 이웃 블록들이 존재할 수 있다. 이러한 상관도 높은 이웃 블록들을 활용하여 상기 현재 블록의 화면내 예측 모드를 획득하면 코딩 효율을 높일 뿐만 아니라, 원본 영상과 더 유사한 현재 블록을 획득할 수 있다. 상기 비정방형(non-square) 블록은 가로 길이와 세로 길이가 동일한 블록이 아닌, N*mN(여기서, m은 분수 및 정수)와 같은 다양한 세로 및 가로 비율의 블록들을 포함할 수 있다. 이와 관련된 이웃 블록의 설정 방법 및 가장 가능성 있는 화면내 예측 모드 리스트 구성 방법을 추후 도 3a 내지 도 18을 참조하여 설명하기로 한다.In particular, when the current block is a non-square block rather than a square block, neighboring blocks with relatively high correlation may exist among neighboring blocks located around the current block. If the intra prediction mode of the current block is obtained by using such highly correlated neighboring blocks, it is possible to not only increase coding efficiency but also obtain a current block more similar to the original image. The non-square block may include blocks having various vertical and horizontal ratios, such as N*mN (where m is a fraction and an integer), rather than a block having the same horizontal length and vertical length. A method of configuring a neighboring block related thereto and a method of configuring a list of most probable intra prediction modes will be described later with reference to FIGS. 3A to 18 .

일 실시예에서, 화면내 예측부(235)에서 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 서로 다를 수 있다. 예를 들어, 예측 단위로 예측 모드가 정해져 예측 단위로 예측이 수행될 수 있고, 예측 단위로 예측 모드가 정해지고 변환 단위로 화면내 예측이 수행될 수도 있다.In an embodiment, a processing unit in which prediction is performed by the intra prediction unit 235 and a processing unit in which a prediction method and specific content are determined may be different from each other. For example, a prediction mode may be determined in a prediction unit and prediction may be performed in a prediction unit, or a prediction mode may be determined in a prediction unit and intra prediction may be performed in a transformation unit.

화면내 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터부, 참조 픽셀 보간부, DC 필터부를 포함할 수 있다. 상기 AIS 필터부는 현재 블록의 참조 픽셀에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화기에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 픽셀에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 아니하는 모드인 경우에는, 상기 AIS 필터부는 현재 블록에 적용되지 아니할 수 있다.The intra prediction unit 235 may include an Adaptive Intra Smoothing (AIS) filter unit, a reference pixel interpolator unit, and a DC filter unit. The AIS filter unit is a part that performs filtering on the reference pixel of the current block, and may determine whether to apply the filter according to the prediction mode of the current prediction unit and apply the filter. AIS filtering may be performed on the reference pixel of the current block by using the prediction mode and AIS filter information of the prediction unit provided by the image encoder. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter unit may not be applied to the current block.

참조 픽셀 보간부는 예측 단위의 예측 모드가 참조 픽셀을 보간한 픽셀값을 기초로 화면내 예측을 수행하는 예측 단위인 경우에, 참조 픽셀을 보간하여 정수값 이하의 픽셀 단위의 참조 픽셀을 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 픽셀을 보간하지 아니하고 예측 블록을 생성하는 예측 모드인 경우, 참조 픽셀은 보간되지 아니할 수 있다. DC 필터부는 현재 블록의 예측 모드가 DC 모드인 경우에 필터링을 통하여 예측 블록을 생성할 수 있다.When the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on the pixel value obtained by interpolating the reference pixel, the reference pixel interpolator interpolates the reference pixel to generate the reference pixel of a pixel unit having an integer value or less. have. When the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. When the prediction mode of the current block is the DC mode, the DC filter unit may generate the prediction block through filtering.

또한, 일반적으로 화면내 예측시 현재 블록의 이웃 블록들의 위치에 상관없이 하나의 필터를 이용하여 현재 블록의 이웃 블록들을 스무딩시킨다. 그러나, 본 발명의 일 실시예에 따르면, 화면내 예측부(235)는 적어도 두 개 이상의 스무딩 필터를 이용하여 현재 블록의 이웃 블록들을 스무딩시킬 수 있다. 이러한 스무딩 방법에 대하여는 이하 도 3a 내지 도 18을 참조하여 설명하기로 한다.Also, in general, in intra prediction, the neighboring blocks of the current block are smoothed using one filter regardless of the positions of the neighboring blocks of the current block. However, according to an embodiment of the present invention, the intra prediction unit 235 may use at least two or more smoothing filters to smooth neighboring blocks of the current block. Such a smoothing method will be described below with reference to FIGS. 3A to 18 .

복원된 블록 및/또는 픽처는 필터부(240)로 제공될 수 있다. 필터부(240)는 복원된 블록 및/또는 픽처에 디블록킹 필터부, 오프셋 보정부(Sample Adaptive Offset) 및/또는 적응적 루프 필터부를 포함할 수 있다. 상기 디블록킹 필터부는 영상 부호화기로부터 해당 블록 또는 픽처에 디블록킹 필터가 적용되었는지 여부를 나타내는 정보 및 디블록킹 필터가 적용된 경우 강한 필터 또는 약한 필터를 적용하였는지를 나타내는 정보를 제공받을 수 있다. 상기 디블록킹 필터부는 영상 부호화기에서 제공된 디블록킹 필터 관련 정보를 제공받고, 영상 복호화기에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다.The reconstructed block and/or picture may be provided to the filter unit 240 . The filter unit 240 may include a deblocking filter unit, an offset correction unit (Sample Adaptive Offset), and/or an adaptive loop filter unit in the reconstructed block and/or picture. The deblocking filter unit may receive information indicating whether a deblocking filter is applied to a corresponding block or picture from an image encoder and information indicating whether a strong filter or a weak filter is applied when the deblocking filter is applied. The deblocking filter unit may receive the deblocking filter related information provided from the image encoder, and perform deblocking filtering on the corresponding block in the image decoder.

상기 오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다. 상기 적응적 루프 필터부는 부호화기로부터 제공된 적응적 루프 필터의 적용 여부에 관한 정보, 적응적 루프 필터의 계수 정보와 같은 정보들을 기초로 부호화 단위로 적용될 수 있다. 상기 적응적 루프 필터와 관련된 정보들은 특정 파라미터 셋(parameter set)에 포함되어 제공될 수 있다.The offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding and information on the offset value. The adaptive loop filter unit may be applied as a coding unit based on information such as information on whether the adaptive loop filter is applied and information on coefficients of the adaptive loop filter provided from the encoder. Information related to the adaptive loop filter may be provided in a specific parameter set.

메모리(245)는 복원된 픽처 또는 블록을 저장하여 이후에 참조 픽처 또는 참조 블록으로 사용할 수 있고, 또한 복원된 픽처를 출력부로 제공할 수 있다.The memory 245 may store the reconstructed picture or block to be later used as a reference picture or reference block, and may also provide the reconstructed picture to an output unit.

본 명세서에서는 설명의 편의를 위하여 생략하였지만, 복호화 장치에 입력되는 비트스트림은 파싱(parsing) 단계를 거쳐 엔트로피 복호화부로 입력될 수 있다. 또한, 엔트로피 복호화부에서 파싱 과정을 수행하도록 할 수 있다.Although omitted herein for convenience of description, the bitstream input to the decoding apparatus may be input to the entropy decoding unit through a parsing step. Also, the entropy decoding unit may perform a parsing process.

본 명세서에서 코딩은 경우에 따라 부호화 또는 복호화로 해석될 수 있고, 정보(information)는 값(values), 파라미터(parameter), 계수(coefficients), 성분(elements), 플래그(flag) 등을 모두 포함하는 것으로 이해될 수 있다. '화면' 또는 '픽처(picture)'는 일반적으로 특정 시간대의 하나의 영상을 나타내는 단위를 의미하며, '슬라이스(slice)', '프레임(frame)' 등은 실제 비디오 신호의 코딩에 있어서 픽처의 일부를 구성하는 단위이며, 필요에 따라서는 픽처와 서로 혼용되어 사용될 수 있다.In the present specification, coding may be interpreted as encoding or decoding in some cases, and information includes all values, parameters, coefficients, elements, flags, and the like. can be understood as doing 'Screen' or 'picture' generally means a unit representing a single image in a specific time period, and 'slice' and 'frame' are It is a unit constituting a part, and may be used interchangeably with a picture, if necessary.

'픽셀(pixel)', '픽셀' 또는 'pel'은 하나의 영상을 구성하는 최소의 단위를 나타낸다. 또한, 특정한 픽셀의 값을 나타내는 용어로서, '샘플(sample)'을 사용할 수 있다. 샘플은 휘도(Luma) 및 색차(Chroma) 성분으로 나누어질 수 있으나, 일반적으로는 이를 모두 포함하는 용어로 사용될 수 있다. 상기에서 색차 성분은 정해진 색상들 간의 차이를 나타내는 것으로 일반적으로 Cb 및 Cr로 구성된다.A 'pixel', 'pixel' or 'pel' represents the smallest unit constituting one image. In addition, as a term indicating a value of a specific pixel, a 'sample' may be used. A sample may be divided into a luminance (Luma) and a chroma (Chroma) component, but in general, a term including both of them may be used. In the above, the color difference component represents a difference between predetermined colors and is generally composed of Cb and Cr.

'유닛(unit)'은 상술한 부호화 유닛, 예측 유닛, 변환 유닛과 같이 영상 처리의 기본 단위 또는 영상의 특정 위치를 지칭하며, 경우에 따라서는 '블록' 또는 '영역(area)'등의 용어와 서로 혼용하여 사용될 수 있다. 또한, 블록은 M개의 열과 N개의 행으로 구성된 샘플들 또는 변환 계수(transform coefficient)들의 집합을 나타내는 용어로 사용될 수도 있다.A 'unit' refers to a basic unit of image processing or a specific position of an image, such as the above-described coding unit, prediction unit, and transformation unit, and in some cases, terms such as 'block' or 'area' and may be used interchangeably. Also, a block may be used as a term indicating a set of samples or transform coefficients composed of M columns and N rows.

도 3a 및 도 3b는 본 발명의 일 실시예에 따른 현재 블록의 다양한 모양을 설명하기 위한 개략도이다. 3A and 3B are schematic diagrams for explaining various shapes of a current block according to an embodiment of the present invention.

도 3a 및 도 3b를 참조하면, 현재 블록은 정방형(square)의 모양 뿐만 아니라 다양한 모양의 블록(301, 302)일 수 있다. 예를 들면, 도 3a에 나타낸 바와 같이, 현재 블록의 가로 길이(a)가 상기 현재 블록의 세로 길이(b)보다 긴 직사각형 형태(a>b)일 수 있고, 도 3b에 나타낸 바와 같이 현재 블록의 세로 길이(b)가 상기 현재 블록의 가로 길이(a)보다 긴 직사각형 형태(a<b)일 수도 있다. 일 실시예에서는, 현재 블록의 가로 길이 및 세로 길이를 비교하여 상기 현재 블록(301, 302)의 모양을 판단할 수 있으며, 상세하게는, 상기 현재 블록(301, 302)의 방향을 판단할 수 있다. Referring to FIGS. 3A and 3B , the current block may be blocks 301 and 302 having various shapes as well as a square shape. For example, as shown in FIG. 3A , the horizontal length (a) of the current block may be longer than the vertical length (b) of the current block (a > b), and as shown in FIG. 3B , the current block It may have a rectangular shape (a<b) in which the vertical length (b) of the current block is longer than the horizontal length (a) of the current block. In an embodiment, the shape of the current blocks 301 and 302 may be determined by comparing the horizontal length and the vertical length of the current block, and in detail, the direction of the current blocks 301 and 302 may be determined. have.

도 3a에 도시된 바와 같이, 상기 현재 블록(301)의 가로 길이가 세로 길이보다 더 긴 직사각형의 형태의 블록인 경우, 즉, 가로 방향의 현재 블록(301)은 현재 블록(301)의 좌측에 위치한 이웃 블록(이하, 좌측 이웃 블록이라 함)보다 현재 블록(301)의 상측에 위치한 이웃 블록(이하, 상측 이웃 블록이라 함)과 상관도가 더 높을 수 있다. 또한, 도 3b에 도시된 바와 같은 세로 방향의 현재 블록(302)의 경우에는 현재 블록(302)의 상측 이웃 블록보다 좌측 이웃 블록과 현재 블록(302)의 상관도가 더 높을 수 있다. 이러한 경우, 현재 블록(301, 302)의 가장 가능성 있는 화면내 예측 모드를 획득하기 위하여 보다 상관도가 높은 이웃 블록들을 상대적으로 많이 참조하는 것이 현재 블록(301, 302)의 화면내 예측 모드를 정확하게 결정하는데 도움이 될 수 있다.As shown in FIG. 3A , when the horizontal length of the current block 301 is a rectangular block longer than the vertical length, that is, the horizontal current block 301 is located on the left side of the current block 301 . A correlation may be higher with a neighboring block located above the current block 301 (hereinafter referred to as an upper neighboring block) than a located neighboring block (hereinafter referred to as a left neighboring block). In addition, in the case of the current block 302 in the vertical direction as shown in FIG. 3B , the correlation between the left neighboring block and the current block 302 may be higher than that of the upper neighboring block of the current block 302 . In this case, in order to obtain the most probable intra prediction mode of the current blocks 301 and 302 , it is necessary to refer to neighboring blocks with higher correlations relatively many to accurately determine the intra prediction mode of the current blocks 301 and 302 . It can help you decide.

즉, 가로 방향의 현재 블록(301)의 경우에는 상측 이웃 블록들을 더 많이 참조하고, 세로 방향의 현재 블록(302)의 경우에는 좌측 이웃 블록들을 더 많이 참조하여 현재 블록(301, 302)의 가장 가능성 있는 화면간 예측 모드들을 획득하는 것이 바람직하다. 본 발명에서는 현재 블록(301, 302)의 가로 길이 및 세로 길이를 비교하여 현재 블록(301, 302)의 방향을 판단하지만, 이에 한정되지 아니하고 다양한 방법으로 현재 블록(301, 302)의 방향을 판단할 수 있다. 예를 들어, 현재 블록(301, 302)의 모양 또는 방향은 인코더로부터 수신되거나 디코더에서 기 획득된 현재 블록(301, 302)의 분할 정보, 방향 정보, 및 픽셀 정보 중 어느 하나 이상을 기초로 하여 판단될 수 있다.That is, in the case of the current block 301 in the horizontal direction, more upper neighboring blocks are referred to, and in the case of the current block 302 in the vertical direction, the left neighboring blocks are more referenced, and the most of the current blocks 301 and 302 are It is desirable to obtain possible inter prediction modes. In the present invention, the direction of the current blocks 301 and 302 is determined by comparing the horizontal and vertical lengths of the current blocks 301 and 302, but the present invention is not limited thereto, and the direction of the current blocks 301 and 302 is determined in various ways. can do. For example, the shape or direction of the current blocks 301 and 302 is based on any one or more of segmentation information, direction information, and pixel information of the current blocks 301 and 302 received from an encoder or previously obtained at a decoder. can be judged.

상기의 방법으로 결정된 현재 블록(301, 302)의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위한 이웃 블록들의 개수 또는 위치는 현재 블록(301, 302)의 모양 또는 방향에 따라 가변적으로 결정될 수 있다. 상세하게는, 현재 블록(301, 302)의 모양에 따라 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위하여 참조되는 상측 이웃 블록 또는 좌측 이웃 블록들의 개수는 상이하게 결정될 수 있다. 예를 들어, 가로 방향의 현재 블록(301)은 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여 고려되는 상측 이웃 블록의 개수가 좌측 이웃 블록의 개수보다 많을 수 있다. 한편, 세로 방향의 현재 블록(302)는 상측 이웃 블록보다 더 많은 개수의 좌측 이웃 블록들을 고려하여 가장 가능성 있는 화면내 예측 모드 리스트를 구성할 수 있다.The number or positions of neighboring blocks for constituting the most probable intra prediction mode list of the current blocks 301 and 302 determined by the above method may be variably determined according to the shape or direction of the current blocks 301 and 302. . In detail, depending on the shape of the current blocks 301 and 302 , the number of upper neighboring blocks or left neighboring blocks referred to for constructing the most probable intra prediction mode list may be determined differently. For example, in the current block 301 in the horizontal direction, the number of upper neighboring blocks considered to construct the most probable intra prediction mode list may be greater than the number of left neighboring blocks. Meanwhile, the current block 302 in the vertical direction may construct the most probable intra prediction mode list in consideration of a larger number of left neighboring blocks than the upper neighboring blocks.

또한, 현재 블록(301, 302)의 모양에 따라 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위하여 참조되는 상측 이웃 블록 또는 좌측 이웃 블록들의 위치는 상이하게 결정될 수 있다. 예를 들어, 가로 방향의 현재 블록(301)은 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여 고려되는 상측 이웃 블록의 위치를 좌측 이웃 블록의 위치와 상이하게 고려될 수 있다. 한편, 세로 방향의 현재 블록(302)는 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여 고려되는 좌측 이웃 블록의 위치를 상측 이웃 블록의 위치와 상이하게 고려할 수 있다.Also, depending on the shape of the current blocks 301 and 302, positions of the upper neighboring blocks or the left neighboring blocks referred to for constructing the most probable intra prediction mode list may be determined differently. For example, in the current block 301 in the horizontal direction, the position of the upper neighboring block considered to construct the most probable intra prediction mode list may be considered to be different from the position of the left neighboring block. Meanwhile, the current block 302 in the vertical direction may consider the position of the left neighboring block to be considered to construct the most probable intra prediction mode list to be different from the position of the upper neighboring block.

도 4a 내지 도 5b는 본 발명의 다양한 실시예에 따른 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여 고려되는 이웃 블록들을 나타내는 개략도이고, 도 6 및 도 7은 본 발명의 다양한 실시예에 따른 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위한 순서도이다.4A to 5B are schematic diagrams illustrating neighboring blocks considered to construct a list of most probable intra prediction modes of a current block according to various embodiments of the present invention, and FIGS. 6 and 7 are various embodiments of the present invention; It is a flowchart for constructing a list of the most probable intra prediction modes of the current block according to

도 4a 및 도 4b와 함께 도 6 및 도 7을 참조하면, 먼저 현재 블록의 모양을 판단하고(S60), 상기 판단의 결과를 기초로 이웃 블록들의 위치 및/또는 개수를 결정할 수 있다(S61). 일 예로, 현재 블록의 모양 또는 방향은 상기 현재 블록의 가로 길이 및 상기 현재 블록의 세로 길이를 비교하여 판단될 수 있다(S71). 예를 들어, 현재 블록(401)이 가로 방향의 블록인 경우(S72), 현재 블록의 가로 길이(a)가 세로 길이(b)보다 크기 때문에, 이웃 블록들로서 고려되는 상측 이웃 블록들의 개수가 좌측 이웃 블록들의 개수보다 많을 수 있다(S72). 예를 들면, 좌측 이웃 블록들은 L0, L1 위치의 블록들이 고려되고, 상측 이웃 블록들은 A0, A1, A2, 및 A3 위치의 블록들이 고려될 수 있다. Referring to FIGS. 6 and 7 along with FIGS. 4A and 4B , the shape of the current block may be first determined (S60), and the location and/or the number of neighboring blocks may be determined based on the result of the determination (S61). . For example, the shape or direction of the current block may be determined by comparing the horizontal length of the current block and the vertical length of the current block (S71). For example, when the current block 401 is a block in the horizontal direction ( S72 ), since the horizontal length (a) of the current block is greater than the vertical length (b), the number of upper neighboring blocks considered as neighboring blocks is the left There may be more than the number of neighboring blocks (S72). For example, blocks at positions L0 and L1 may be considered for left neighboring blocks, and blocks at positions A0, A1, A2, and A3 may be considered for upper neighboring blocks.

또한, 현재 블록(402)이 세로 방향의 블록인 경우(S73), 현재 블록의 세로 길이(b)가 가로 길이(a)보다 크기 때문에, 가장 가능성있는 화면내 예측 모드 리스트 구성을 위하여 고려되는 이웃 블록들로서 상측 이웃 블록들보다 좌측 이웃 블록들이 더 많이 고려될 수 있다(S73). 예를 들면, 이웃 블록들 중 상측 이웃 블록들로는 A0 및 A1 위치의 블록들만이 고려되고, 좌측 이웃 블록들로는 L0, L1, L2, 및 L3 위치의 블록들이 고려될 수 있다. 이후, 결정된 상측 이웃 블록들 및 좌측 이웃 블록들을 포함하는 이웃 블록들로부터 현재 블록의 가장 가능성 있는 화면내 예측 모드(MPM)를 획득하여 가장 가능성 있는 화면내 예측 모드 리스트를 구성할 수 있다(S62, S74).In addition, when the current block 402 is a block in the vertical direction (S73), since the vertical length b of the current block is greater than the horizontal length a, the neighbor considered for constructing the most probable intra prediction mode list As blocks, more left neighboring blocks than upper neighboring blocks may be considered (S73). For example, among the neighboring blocks, only blocks at positions A0 and A1 may be considered as upper neighboring blocks, and blocks at positions L0, L1, L2, and L3 may be considered as left neighboring blocks. Thereafter, the most probable intra prediction mode list may be constructed by obtaining the most probable intra prediction mode (MPM) of the current block from the determined neighboring blocks including the upper neighboring blocks and the left neighboring blocks (S62, S74).

이와 같이, 현재 블록의 모양을 판단하여 이에 기초해 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여 고려되는 이웃 블록들의 위치 및 개수를 결정함으로써, 현재 블록과 더 상관도가 높은 이웃 블록들로부터 가장 가능성 있는 화면내 예측 모드(MPM)를 획득하여 현재 블록을 효율적으로 화면내 예측할 수 있다.In this way, by determining the shape of the current block and determining the position and number of neighboring blocks to be considered for constructing the most probable intra prediction mode list of the current block based on the determination of the shape of the current block, a neighbor having a higher correlation with the current block By obtaining the most probable intra prediction mode (MPM) from the blocks, the current block can be efficiently predicted within the picture.

또한, 상기 현재 블록을 인트라 예측 부호화하는 단계는 상기 현재 블록의 이웃 블록들에 스무딩 필터를 적용하여 스무딩하는 단계를 더 수행할 수 있다. 상기 스무딩 필터는 적어도 두 개 이상일 수 있으며, 상기 현재 블록의 이웃 블록들에 상기 적어도 두 개 이상의 스무딩 필터가 적응적으로 적용될 수 있다.In addition, the intra prediction encoding of the current block may further include smoothing by applying a smoothing filter to neighboring blocks of the current block. There may be at least two smoothing filters, and the at least two smoothing filters may be adaptively applied to neighboring blocks of the current block.

일 실시예에서, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함할 수 있으며, 상기 스무딩 필터는 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들 각각에 상이한 필터를 적용할 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 좌측 이웃 블록들에는 A 인트라 스무딩 필터를 사용할 수 있고, 상기 상측 이웃 블록들에는 B 인트라 스무딩 필터를 적용할 수 있다. 이와 같이, 상기 이웃 블록들의 공간적인 위치에 따라서 상기 적어도 두 개 이상의 필터가 각각 적용될 수 있다.In an embodiment, the neighboring blocks may include left neighboring blocks and upper neighboring blocks, and the smoothing filter may apply a different filter to each of the left neighboring blocks and the upper neighboring blocks. For example, when the current block has a rectangular shape, the A intra smoothing filter may be used for the left neighboring blocks, and the B intra smoothing filter may be applied to the upper neighboring blocks. In this way, the at least two filters may be applied according to spatial positions of the neighboring blocks.

일 실시예에서, 상기 인트라 스무딩 필터는 상기 화면내 예측을 수행하는 현재 블록의 크기 또는 모양에 따라 결정될 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 A 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 긴 방향의 이웃 블록에 적용되고, 상기 B 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 짧은 방향의 이웃 블록에 적용될 수 있다. 이 때, 상기 A 인트라 스무딩 필터는 상기 B 인트라 스무딩 필터에 비하여 신호를 더 많이 뭉그러뜨리는 경향이 있는 스무딩 필터일 수 있다. 또한, 상기 적어도 두 개 이상의 인트라 스무딩 필터에 관한 정보는 부호화 장치로부터 기설정되어 전송되거나 복호화 장치에서 기설정되어 있을 수도 있으나, 현재 블록의 크기, 모양, 및 현재 블록을 예측하는 예측 모드 중 적어도 하나 이상을 고려하여 복호화 장치에서 복수 개의 후보 필터 중 선택될 수도 있다. In an embodiment, the intra smoothing filter may be determined according to a size or shape of a current block for which the intra prediction is performed. For example, when the current block has a rectangular shape, the A intra-smoothing filter is applied to a neighboring block in the longest direction among the horizontal or vertical sides of the current block, and the B intra-smoothing filter is applied to the horizontal direction of the current block. Alternatively, it may be applied to a neighboring block in a direction having a shorter length among vertical sides. In this case, the A intra smoothing filter may be a smoothing filter that tends to compress a signal more than the B intra smoothing filter. Also, the information on the at least two or more intra smoothing filters may be preset and transmitted from the encoding device or preset in the decoding device, but at least one of a size, a shape, and a prediction mode for predicting the current block. In consideration of the above, the decoding apparatus may select a plurality of candidate filters.

도 5a 및 도 5b를 참조하면, 현재 블록의 모양을 기초로 하여 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위해 고려되는 이웃 블록들의 위치를 상이하게 결정할 수 있다. 도 5a에 나타난 바와 같이, 현재 블록(501)이 가로 방향인 경우에는 좌측 이웃 블록들은 현재 블록(501)의 좌측 아래 두 개의 위치(L, BL)를 이용하고, 상측 이웃 블록들은 상측 중간 위치(A) 및 상측 오른쪽 위치(AR)의 블록들을 사용하여 가장 가능성 있는 화면내 예측 모드 리스트를 구성할 수 있다. 또한, 도 5b에 나타난 바와 같이, 현재 블록(502)이 세로 방향인 경우에는 상측 오른쪽의 두 개 위치의 상측 이웃 블록(A, AR)을 이용하고, 좌측 중간 위치(L) 및 좌측 아래쪽 위치(BL)의 블록들을 사용할 수 있다. 하지만, 이와 같은 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여 고려되는 이웃 블록들의 개수 및 위치는 상술한 실시예들에 한정되지 아니하고, 다양한 방법으로 결정될 수 있다.Referring to FIGS. 5A and 5B , positions of neighboring blocks considered for constructing the most probable intra prediction mode list may be differently determined based on the shape of the current block. As shown in FIG. 5A , when the current block 501 is in the horizontal direction, the left neighboring blocks use the two lower left positions (L, BL) of the current block 501, and the upper neighboring blocks use the upper middle position ( A) and blocks in the upper right position (AR) can be used to construct the most probable intra prediction mode list. In addition, as shown in FIG. 5B , when the current block 502 is in the vertical direction, upper neighboring blocks (A, AR) at two upper and right positions are used, and the left middle position (L) and the left lower position ( BL) blocks can be used. However, the number and positions of neighboring blocks considered to construct the most probable intra prediction mode list are not limited to the above-described embodiments, and may be determined in various ways.

또한, 상기 현재 블록을 인트라 예측 부호화하는 단계는 상기 현재 블록의 이웃 블록들에 스무딩 필터를 적용하여 스무딩하는 단계를 더 수행할 수 있다. 상기 스무딩 필터는 적어도 두 개 이상일 수 있으며, 상기 현재 블록의 이웃 블록들에 상기 적어도 두 개 이상의 스무딩 필터가 적응적으로 적용될 수 있다.In addition, the intra prediction encoding of the current block may further include smoothing by applying a smoothing filter to neighboring blocks of the current block. There may be at least two smoothing filters, and the at least two smoothing filters may be adaptively applied to neighboring blocks of the current block.

일 실시예에서, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함할 수 있으며, 상기 스무딩 필터는 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들 각각에 상이한 필터를 적용할 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 좌측 이웃 블록들에는 A 인트라 스무딩 필터를 사용할 수 있고, 상기 상측 이웃 블록들에는 B 인트라 스무딩 필터를 적용할 수 있다. 이와 같이, 상기 이웃 블록들의 공간적인 위치에 따라서 상기 적어도 두 개 이상의 필터가 각각 적용될 수 있다.In an embodiment, the neighboring blocks may include left neighboring blocks and upper neighboring blocks, and the smoothing filter may apply a different filter to each of the left neighboring blocks and the upper neighboring blocks. For example, when the current block has a rectangular shape, the A intra smoothing filter may be used for the left neighboring blocks, and the B intra smoothing filter may be applied to the upper neighboring blocks. In this way, the at least two filters may be applied according to spatial positions of the neighboring blocks.

일 실시예에서, 상기 인트라 스무딩 필터는 상기 화면내 예측을 수행하는 현재 블록의 크기 또는 모양에 따라 결정될 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 A 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 긴 방향의 이웃 블록에 적용되고, 상기 B 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 짧은 방향의 이웃 블록에 적용될 수 있다. 이 때, 상기 A 인트라 스무딩 필터는 상기 B 인트라 스무딩 필터에 비하여 신호를 더 많이 뭉그러뜨리는 경향이 있는 스무딩 필터일 수 있다. 또한, 상기 적어도 두 개 이상의 인트라 스무딩 필터에 관한 정보는 부호화 장치로부터 기설정되어 전송되거나 복호화 장치에서 기설정되어 있을 수도 있으나, 현재 블록의 크기, 모양, 및 현재 블록을 예측하는 예측 모드 중 적어도 하나 이상을 고려하여 복호화 장치에서 복수 개의 후보 필터 중 선택될 수도 있다.In an embodiment, the intra smoothing filter may be determined according to a size or shape of a current block for which the intra prediction is performed. For example, when the current block has a rectangular shape, the A intra-smoothing filter is applied to a neighboring block in the longest direction among the horizontal or vertical sides of the current block, and the B intra-smoothing filter is applied to the horizontal direction of the current block. Alternatively, it may be applied to a neighboring block in a direction having a shorter length among vertical sides. In this case, the A intra smoothing filter may be a smoothing filter that tends to compress a signal more than the B intra smoothing filter. In addition, the information on the at least two or more intra smoothing filters may be preset and transmitted from the encoding device or preset in the decoding device, but at least one of a size, a shape, and a prediction mode for predicting the current block In consideration of the above, the decoding apparatus may select a plurality of candidate filters.

도 8은 본 발명의 다른 실시예에 따른 이웃 블록의 모양에 따른 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트 구성 방법을 설명하기 위한 개략도이고, 도 9는 도 8을 참조하여 설명한 가장 가능성 있는 화면내 예측 모드 리스트 구성 방법을 설명하기 위한 순서도이다.8 is a schematic diagram for explaining a method of constructing a list of most probable intra prediction modes of a current block according to the shape of a neighboring block according to another embodiment of the present invention, and FIG. 9 is the most probable screen described with reference to FIG. 8 It is a flowchart for explaining a method of configuring my prediction mode list.

도 8을 참조하면, 현재 블록(801)의 주변에 위치하는 이웃 블록들은 크기가 다양할 수 있다. 현재 블록(801)은 화면내 예측 모드로 부호화된 이웃 블록들(802, 803, 804, ..., 807) 중 상대적으로 크기가 큰 이웃 블록들과 상관도가 높을 수 있다. 예를 들어, 현재 블록(801)의 좌측 이웃 블록(802, 803, 804, 805) 보다 상측 이웃 블록(806, 807)의 크기가 더 큰 경우 현재 블록(801)은 상측 이웃 블록(806, 807)과 상관도가 높을 것이다. 이러한 경우, 종래의 방법으로 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 경우, 상측 이웃 블록(806, 807)의 화면내 예측 모드가 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트의 큰 인덱스에 할당되어 코딩 효율이 감소할 수 있다.Referring to FIG. 8 , neighboring blocks positioned around the current block 801 may have various sizes. The current block 801 may have a high correlation with neighboring blocks having a relatively large size among the neighboring blocks 802, 803, 804, ..., 807 encoded in the intra prediction mode. For example, when the size of the upper neighboring blocks 806 and 807 is larger than the size of the upper neighboring blocks 802, 803, 804, and 805 of the current block 801, the current block 801 is the upper neighboring blocks 806, 807. ) will be highly correlated. In this case, when the most probable intra prediction mode list is constructed by the conventional method, the intra prediction modes of the upper neighboring blocks 806 and 807 are assigned to the largest index of the most probable intra prediction mode list of the current block. Therefore, coding efficiency may be reduced.

그러므로, 본 발명은 현재 블록의 이웃 블록들의 크기에 따라 상관도 높은 이웃 블록의 화면내 예측 모드를 가장 가능성 있는 화면내 예측 모드 리스트의 낮은 인덱스에 할당할 수 있는 이웃 블록들의 스캔 방법을 제공할 수 있다. 상기 이웃 블록들의 스캔 방법을 제공하기 위하여, 일 실시예에서는, 먼저 현재 블록의 이웃 블록들의 모양을 판단한다(S91). 상세하게는, BL, L, A, AR, 및 AL 위치의 코딩 블록의 예측 모드와 크기에 따라 이웃 블록들의 크기 구성을 구분할 수 있다. Therefore, the present invention can provide a scanning method of neighboring blocks capable of allocating the intra prediction mode of the neighboring block with high correlation according to the size of the neighboring blocks of the current block to the low index of the most probable intra prediction mode list. have. In order to provide a method for scanning the neighboring blocks, in an embodiment, shapes of neighboring blocks of the current block are first determined ( S91 ). In detail, size configurations of neighboring blocks may be distinguished according to prediction modes and sizes of coding blocks at BL, L, A, AR, and AL positions.

일 실시예에서는, 이웃 블록들의 모양 또는 크기에 따라 이웃 블록들의 스캔 방법(순서)를 결정할 수 있다(S92). 예를 들면, 현재 블록(801)과 A 및 AR가 위치하는 이웃 블록들(806, 807)의 크기는 16 x 16 이고, L 및 BL이 위치하는 이웃 블록들(804, 805)의 크기가 8 x 8 인 경우, A 및 AR 가 위치하는 이웃 블록들(806, 807)을 L 및 BL이 위치하는 이웃 블록들(804, 805)보다 먼저 스캔하여 가장 가능성 있는 화면내 예측 모드 리스트를 구성(S93)함으로써 상관도가 높은 화면내 예측 모드를 작은 인덱스에 할당하여 코딩 효율을 높일 수 있다. In an embodiment, the scanning method (order) of the neighboring blocks may be determined according to the shape or size of the neighboring blocks ( S92 ). For example, the size of the current block 801 and the neighboring blocks 806 and 807 in which A and AR are located is 16 x 16, and the size of the neighboring blocks 804 and 805 in which L and BL are located is 8. In the case of x 8, the most probable intra prediction mode list is constructed by scanning the neighboring blocks 806 and 807 in which A and AR are located before the neighboring blocks 804 and 805 in which L and BL are located (S93). ), it is possible to increase the coding efficiency by assigning the intra prediction mode with high correlation to a small index.

다른 일예에서는, 좌측 이웃 블록들과 상측 이웃 블록들을 포함하는 화면내 예측 모드로 부호화된 이웃 블록들(802, 803, 804, ..., 807) 중 상대적으로 크기가 큰 이웃 블록부터 스캔하여 가장 가능성 있는 화면내 예측 모드 리스트를 구성(S93)함으로써 상관도가 높은 화면내 예측 모드를 작은 인덱스에 할당하여 코딩 효율을 높일 수 있다. 도 8의 현재 블록(801)은 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여, A->AR->L->BL->AL 의 순서로 이웃 블록들을 스캔할 수 있다. 이 경우, 수직 모드 및 플라나 모드와 같은 공간적 이웃 블록의 화면내 예측 모드 스캔 순서에서 추가로 고려되는 모드들의 종류 및 순서는 제한되지 아니하고 이용될 수 있다. 또한, 본 발명에서 이웃 블록들의 위치는 언급된 L, BL, A, AR, AL 위치에 제한되지 아니하며, 현재 블록의 모양에 따라 고려되는 이웃 블록들의 위치는 상측과 좌측에 제한하지 아니하고 사용 가능한 모든 위치를 고려할 수 있다.In another example, from among the neighboring blocks 802, 803, 804, ..., 807 encoded in the intra prediction mode including the left neighboring blocks and the upper neighboring blocks, a neighboring block having a relatively large size is scanned and the most By constructing a list of possible intra prediction modes ( S93 ), it is possible to increase coding efficiency by allocating intra prediction modes with high correlation to small indexes. The current block 801 of FIG. 8 may scan neighboring blocks in the order of A->AR->L->BL->AL to construct the most probable intra prediction mode list. In this case, the type and order of modes additionally considered in the intra prediction mode scan order of spatial neighboring blocks such as vertical mode and planar mode are not limited and may be used. In addition, in the present invention, the positions of the neighboring blocks are not limited to the L, BL, A, AR, and AL positions mentioned, and the positions of neighboring blocks considered according to the shape of the current block are not limited to the upper side and the left side, and all available positions are not limited. location can be considered.

또 다른 일예로는, 만약 이웃 블록들을 스캔하는 순서가 다른 기준들에 기초하여 결정된 경우, 가장 가능성 있는 화면내 예측 모드 리스트의 인덱스와 화면내 예측 모드들의 매핑 관계를 이웃 블록들의 모양 또는 크기에 따라 변경할 수 있다. 다른 기준들에 기초하여 결정된 스캔 순서를 사용하여 가장 가능성 있는 화면내 예측 모드 리스트의 제 1 가장 가능성 있는 화면내 예측 모드는 L위치의 이웃 블록(804)의 화면내 예측 모드이고 제 2 가장 가능성 있는 화면내 예측 모드는 A위치의 이웃 블록(806)의 화면내 예측 모드인 경우를 예시한다. 이 경우, A 위치의 이웃 블록(806)의 크기가 L위치의 이웃 블록(804)보다 크기 때문에 상관도가 더 높을 것으로 보고, 제 1 가장 가능성 있는 화면내 예측 모드로 제 2 가장 가능성 있는 화면내 예측 모드인 A위치의 이웃 블록(806)의 화면 내 예측 모드로 변경하고 제 2 가장 가능성 있는 화면내 예측 모드는 제 1 가장 가능성 있는 화면내 예측 모드인 L위치의 이웃 블록(804)의 화면내 예측 모드로 변경할 수 있다. 여기에서, 다른 기준들에 기초하여 결정된 스캔 순서는 항상 동일한 스캔 순서를 사용하는 것을 수반할 수 있거나, 어떤 다른 기준들을 수반할 수 있다.As another example, if the order of scanning neighboring blocks is determined based on other criteria, the mapping relationship between the index of the most probable intra prediction mode list and the intra prediction modes is determined according to the shape or size of the neighboring blocks. can be changed The first most probable intra-prediction mode in the list of most probable intra-prediction modes using the scan order determined based on other criteria is the intra-prediction mode of the neighboring block 804 at position L and the second most probable The intra prediction mode exemplifies the case of the intra prediction mode of the neighboring block 806 at position A. In this case, since the size of the neighboring block 806 at the A position is larger than the neighboring block 804 at the L position, the correlation is considered to be higher, and the second most probable intra prediction mode is the first most probable intra prediction mode. The prediction mode is changed to the intra prediction mode of the neighboring block 806 at position A, and the second most probable intra prediction mode is within the picture of the neighboring block 804 at position L which is the first most probable intra prediction mode. You can change to predictive mode. Here, the scan order determined based on different criteria may involve always using the same scan order, or may involve some other criteria.

또한, 상기 현재 블록을 인트라 예측 부호화 하는 단계는 상기 현재 블록의 이웃 블록들에 스무딩 필터를 적용하여 스무딩하는 단계를 더 수행할 수 있다. 상기 스무딩 필터는 적어도 두 개 이상일 수 있으며, 상기 현재 블록의 이웃 블록들(802, …, 807)에 상기 적어도 두 개 이상의 스무딩 필터가 적응적으로 적용될 수 있다.In addition, the intra prediction encoding of the current block may further include applying a smoothing filter to neighboring blocks of the current block to perform smoothing. There may be at least two smoothing filters, and the at least two smoothing filters may be adaptively applied to neighboring blocks 802, ..., 807 of the current block.

일 실시예에서, 상기 이웃 블록들은 좌측 이웃 블록들(802, …, 805) 및 상측 이웃 블록들(806, 807)을 포함할 수 있으며, 상기 스무딩 필터는 상기 좌측 이웃 블록들(802, …, 805) 및 상기 상측 이웃 블록들(806, 807) 각각에 상이한 필터를 이용할 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 좌측 이웃 블록들(802, …, 805)에는 A 인트라 스무딩 필터를 사용할 수 있고, 상기 상측 이웃 블록들(806, 807)에는 B 인트라 스무딩 필터를 적용할 수 있다. 이와 같이, 상기 이웃 블록들의 공간적인 위치에 따라서 상기 적어도 두 개 이상의 필터가 각각 적용될 수 있다.In one embodiment, the neighboring blocks may include left neighboring blocks 802, ..., 805 and upper neighboring blocks 806, 807, and the smoothing filter may include the left neighboring blocks 802, ..., 805) and a different filter may be used for each of the upper neighboring blocks 806 and 807. For example, when the current block has a rectangular shape, the A intra smoothing filter may be used for the left neighboring blocks 802 , ... , 805 , and the B intra smoothing filter may be used for the upper neighboring blocks 806 , 807 . can be applied. In this way, the at least two filters may be applied according to spatial positions of the neighboring blocks.

일 실시예에서, 상기 인트라 스무딩 필터는 상기 화면내 예측을 수행하는 현재 블록의 크기 또는 모양에 따라 결정될 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 A 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 긴 방향의 이웃 블록에 적용되고, 상기 B 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 짧은 방향의 이웃 블록에 적용될 수 있다. 이 때, 상기 A 인트라 스무딩 필터는 상기 B 인트라 스무딩 필터에 비하여 신호를 더 많이 뭉그러뜨리는 경향이 있는 스무딩 필터일 수 있다. 또한, 상기 적어도 두 개 이상의 인트라 스무딩 필터에 관한 정보는 부호화 장치로부터 기설정되어 전송되거나 복호화 장치에서 기설정되어 있을 수도 있으나, 현재 블록의 크기, 모양, 및 현재 블록을 예측하는 예측 모드 중 적어도 하나 이상을 고려하여 복호화 장치에서 복수 개의 후보 필터 중 선택될 수도 있다. In an embodiment, the intra smoothing filter may be determined according to a size or shape of a current block for which the intra prediction is performed. For example, when the current block has a rectangular shape, the A intra-smoothing filter is applied to a neighboring block in the longest direction among the horizontal or vertical sides of the current block, and the B intra-smoothing filter is applied to the horizontal direction of the current block. Alternatively, it may be applied to a neighboring block in a direction having a shorter length among vertical sides. In this case, the A intra smoothing filter may be a smoothing filter that tends to compress a signal more than the B intra smoothing filter. In addition, the information on the at least two or more intra smoothing filters may be preset and transmitted from the encoding device or preset in the decoding device, but at least one of a size, a shape, and a prediction mode for predicting the current block In consideration of the above, the decoding apparatus may select a plurality of candidate filters.

도 10 내지 도 13은 본 발명의 또 다른 실시예에 따른 이웃 블록의 모양 및 예측 모드에 기초하여 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 방법을 설명하기 위한 개략도 및 순서도이다.10 to 13 are schematic diagrams and flowcharts for explaining a method of constructing a list of most probable intra prediction modes of a current block based on a shape and a prediction mode of a neighboring block according to another embodiment of the present invention.

도 10을 참조하면, 현재 블록(1001)의 이웃 블록들(1002,..., 1007)을 참조하여 현재 블록(1001)의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 방법을 제안한다. 예를 들어, 현재 블록(1001)의 상측 이웃 블록들(1004, 1005, 1006, 1007)은 화면내 예측 모드로 부호화되고, 좌측 이웃 블록들(1002, 1003)은 화면간 예측 모드로 부호화된 경우, 현재 블록(1001)은 좌측 이웃 블록들(1002, 1003) 보다는 상측 이웃 블록들(1004, 1005, 1006, 1007)과 상관도가 더 높을 수 있다. Referring to FIG. 10 , a method of constructing the most probable intra prediction mode list of the current block 1001 with reference to the neighboring blocks 1002 , ..., 1007 of the current block 1001 is proposed. For example, when the upper neighboring blocks 1004, 1005, 1006, and 1007 of the current block 1001 are coded in the intra prediction mode, and the left neighboring blocks 1002 and 1003 are coded in the inter prediction mode. , the current block 1001 may have a higher correlation with the upper neighboring blocks 1004 , 1005 , 1006 , and 1007 than the left neighboring blocks 1002 and 1003 .

이 경우, 가장 가능성 있는 화면내 예측 모드 리스트를 종래의 방법으로 구성하게 되면 상측 이웃 블록들(1004, 1005, 1006, 1007)의 화면내 예측 모드가 상기 리스트의 큰 인덱스에 할당되므로 코딩 효율이 감소될 것이다. 그러므로, 현재 블록(1001)의 이웃 블록들(1002,..., 1007)의 예측 모드에 기초하여 가장 가능성 있는 화면내 예측 모드 리스트를 구성함으로써, 코딩 효율을 향상시킬 수 있다. In this case, when the most probable intra prediction mode list is constructed in the conventional way, the intra prediction modes of the upper neighboring blocks 1004, 1005, 1006, and 1007 are allocated to the large indexes of the list, so that the coding efficiency is reduced. will be Therefore, by constructing the most probable intra prediction mode list based on the prediction modes of the neighboring blocks 1002, ..., 1007 of the current block 1001, coding efficiency can be improved.

상술한 방법으로 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여, 먼저 현재 블록(1001)의 이웃 블록들(1002,..., 1007)의 모양 및 예측 모드에 관한 정보를 획득한다(S130). 상기 이웃 블록들의 예측 모드에 관한 정보는 각 이웃 블록들의 예측 모드를 나타내는 플래그 정보 및 예측 모드 인덱스 일 수 있으나, 이에 한정되지 아니하고 예측 모드를 나타낼 수 있는 정보이면 무방하다. In order to construct the most probable intra prediction mode list by the above-described method, first, information about shapes and prediction modes of neighboring blocks 1002, ..., 1007 of the current block 1001 is obtained (S130). . The information on the prediction mode of the neighboring blocks may be flag information and prediction mode index indicating the prediction mode of each neighboring block, but is not limited thereto, and any information capable of indicating the prediction mode may be used.

일 실시예에서는, 이웃 블록들의 모양 및 예측 모드 중 적어도 하나에 기초하는 상기 이웃 블록들의 스캔 방법을 결정할 수 있다(S131). 예를 들면, L 및 A 위치의 코딩 블록의 예측 모드와 크기에 따라 이웃 블록들의 스캔 방법을 결정하는 경우, L 위치의 이웃 블록(1002)이 화면간 모드이고 A 위치의 이웃 블록(1006)이 화면내 모드이면, 상측 이웃 블록들(1005, 1006, 1007)을 먼저 스캔하여 가장 가능성 있는 화면내 예측 모드 리스트를 구성(S132)함으로써 상관도가 높은 화면내 예측 모드를 작은 인덱스에 할당하여 코딩 효율을 높일 수 있다. 상기 L 및 A 위치의 코딩 블록들은 일 예일 뿐이며, 좌측 이웃 블록 및 상측 이웃 블록의 위치는 이에 제한되지 아니한다. In an embodiment, a scanning method of the neighboring blocks may be determined based on at least one of a shape and a prediction mode of the neighboring blocks ( S131 ). For example, when a scanning method of neighboring blocks is determined according to the prediction modes and sizes of the coding blocks at L and A positions, the neighboring block 1002 at the L position is an inter-picture mode, and the neighboring block 1006 at the A position is In the intra-picture mode, by first scanning the upper neighboring blocks 1005, 1006, and 1007 to construct a list of most probable intra-prediction modes (S132), the intra-prediction mode with high correlation is assigned to a small index for coding efficiency can increase The coding blocks at the L and A positions are only examples, and the positions of the left neighboring block and the upper neighboring block are not limited thereto.

다른 실시예에서는, 이웃 블록들의 모양 및 예측 모드 중 적어도 하나에 기초하는 상기 이웃 블록들의 스캔 방법을 결정할 수 있다(S131). 예를 들면, BL, L, AL, A, 및 AR 위치의 코딩 블록의 예측 모드와 상기 코딩 블록들의 화면내 예측 모드 빈도에 따라 이웃 블록들의 스캔 방법을 결정하는 경우, 상측 이웃 블록들(1006, 1007)의 예측 모드가 화면내 모드이고 좌측 이웃 블록들(1002, 1003)의 예측 모드가 화면간 모드이면, 상측 이웃 블록들(1005, 1006, 1007)을 먼저 스캔하고 좌측 이웃 블록들(1002, 1003)을 나중에 스캔한다. 여기에서 상측 이웃 블록들(1005, 1006, 1007)에 대한 스캔 순서는 상측 이웃 블록들 중 큰 크기의 이웃 블록부터 먼저 스캔하며, 좌측 이웃 블록들(1002, 1003) 에 대한 스캔 순서는 좌측 이웃 블록들 중 큰 크기의 이웃 블록부터 먼저 스캔하여 가장 가능성 있는 화면내 예측 모드 리스트를 구성(S132)함으로써 상관도가 높은 화면내 예측 모드를 작은 인덱스에 할당하여 코딩 효율을 높일 수 있다. 상기 BL, L, AL, A, 및 AR의 위치도 일 예일 뿐이며, 이에 한정되지 아니하는 것은 당연하다 할 것이다.In another embodiment, a scanning method of the neighboring blocks may be determined based on at least one of a shape and a prediction mode of the neighboring blocks ( S131 ). For example, when a scanning method of neighboring blocks is determined according to the prediction mode of the coding block at the BL, L, AL, A, and AR positions and the intra prediction mode frequency of the coding blocks, the upper neighboring blocks 1006, If the prediction mode of 1007 is the intra-picture mode and the prediction mode of the left neighboring blocks 1002 and 1003 is the inter-picture mode, the upper neighboring blocks 1005, 1006, 1007 are first scanned, and the left neighboring blocks 1002, 1002, 1003) will be scanned later. Here, the scan order of the upper neighboring blocks 1005 , 1006 , and 1007 scans first from among the upper neighboring blocks with a larger size, and the scan order of the left neighboring blocks 1002 and 1003 is the left neighboring block Among them, by first scanning a neighboring block of a larger size to construct a list of most probable intra prediction modes ( S132 ), intra prediction modes with high correlation are assigned to small indexes, thereby increasing coding efficiency. The positions of BL, L, AL, A, and AR are only examples, and it will be natural that the positions are not limited thereto.

또한, 상기 현재 블록을 인트라 예측 부호화하는 단계는 상기 현재 블록의 이웃 블록들에 스무딩 필터를 적용하여 스무딩하는 단계를 더 수행할 수 있다. 상기 스무딩 필터는 적어도 두 개 이상일 수 있으며, 상기 현재 블록의 이웃 블록들에 상기 적어도 두 개 이상의 스무딩 필터가 적응적으로 적용될 수 있다.In addition, the intra prediction encoding of the current block may further include smoothing by applying a smoothing filter to neighboring blocks of the current block. There may be at least two smoothing filters, and the at least two smoothing filters may be adaptively applied to neighboring blocks of the current block.

일 실시예에서, 상기 스무딩 필터는 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들의 예측 모드 및 크기 중 적어도 하나 이상을 고려하여 상이하게 결정될 수 있다. 또는, 상기 이웃 블록들의 공간적인 위치에 따라 상이하게 결정될 수도 있다. 또한, 상기 적어도 두 개 이상의 인트라 스무딩 필터에 관한 정보는 부호화 장치로부터 기설정되어 전송되거나 복호화 장치에서 기설정되어 있을 수도 있으나, 현재 블록의 크기, 모양, 및 현재 블록을 예측하는 예측 모드 중 적어도 하나 이상을 고려하여 복호화 장치에서 복수 개의 후보 필터 중 선택될 수도 있다. In an embodiment, the smoothing filter may be determined differently in consideration of at least one of a prediction mode and a size of the left neighboring blocks and the upper neighboring blocks. Alternatively, it may be determined differently according to spatial positions of the neighboring blocks. In addition, the information on the at least two or more intra smoothing filters may be preset and transmitted from the encoding device or preset in the decoding device, but at least one of a size, a shape, and a prediction mode for predicting the current block In consideration of the above, the decoding apparatus may select a plurality of candidate filters.

또 다른 실시예에서는, 현재 블록(1001)의 주변 블록들을 모두 서브 블록 단위로 분할하여 이웃 블록들의 예측 모드 구성을 판단할 수 있다. 도 11은 본 발명의 또 다른 실시예에 따른 이웃 서브 블록들을 이용하여 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 방법을 설명하기 위한 개략도이다. In another embodiment, the prediction mode configuration of the neighboring blocks may be determined by dividing all neighboring blocks of the current block 1001 into sub-block units. 11 is a schematic diagram for explaining a method of constructing a list of most probable intra prediction modes of a current block using neighboring sub-blocks according to another embodiment of the present invention.

도 11을 참조하면, 현재 블록(1101)의 주변에 위치하는 블록들을 서브 블록(Sub Block) 단위로 분할할 수 있다. 상기 서브 블록들은 상측 이웃 블록들을 분할하여 형성되는 예측 모드 구성 판별 영역 1과 좌측 이웃 블록들을 분할하여 형성되는 예측 모드 구성 판별 영역 2로 구성될 수 있다. 이웃 블록들의 예측 모드는 상기 예측 모드 구성 판별 영역 1에 포함되는 서브 블록들의 화면내 모드의 개수와 상기 예측 모드 구성 판별 영역 2에 포함되는 서브 블록들의 화면내 모드의 개수를 비교하여 판단될 수 있다. 예를 들면, 상기 예측 모드 구성 판별 영역 1에 포함되는 서브 블록들은 여섯 개의 화면내 모드를 가지고 있고, 상기 예측 모드 구성 판별 영역 2에 포함되는 서브 블록들은 네 개의 화면내 모드를 가지고 있는 경우, 현재 블록(1101)의 이웃 블록들은 상측 이웃 블록들이 좌측 이웃 블록들보다 더 많이 화면내 모드로 부호화 된 것으로 판단될 수 있다. Referring to FIG. 11 , blocks positioned around the current block 1101 may be divided into sub-block units. The sub-blocks may include a prediction mode configuration determination region 1 formed by dividing upper neighboring blocks and a prediction mode configuration determining region 2 formed by dividing left neighboring blocks. The prediction mode of the neighboring blocks may be determined by comparing the number of intra-picture modes of the sub-blocks included in the prediction mode configuration determination region 1 with the number of intra-picture modes of the sub-blocks included in the prediction mode configuration determination region 2. . For example, if the sub-blocks included in the prediction mode configuration determination region 1 have six intra-picture modes and the sub-blocks included in the prediction mode configuration determination region 2 have four intra-picture modes, the current In the neighboring blocks of the block 1101, it may be determined that the upper neighboring blocks are more coded in the intra-picture mode than the left neighboring blocks.

일 실시예에서, 상기 예측 모드 구성 판별 영역의 위치 및 크기는 현재 블록(1101)의 크기 및 모양에 따라 다양하게 변경될 수 있다. 상기 서브 블록들의 크기 및 위치도 현재 블록(1101)의 크기 및 모양에 따라 다양하게 변경될 수 있다. 또한, 상기 서브 블록들의 크기 및 위치, 및 상기 예측 모드 구성 판별 영역의 크기 및 위치는 일 예시일 뿐이며, 이에 한정되지 아니한다.In an embodiment, the location and size of the prediction mode configuration determination region may be variously changed according to the size and shape of the current block 1101 . The size and position of the sub-blocks may also be variously changed according to the size and shape of the current block 1101 . In addition, the size and position of the sub-blocks and the size and position of the prediction mode configuration determination region are merely examples, and are not limited thereto.

이후, 획득된 이웃 블록들의 예측 모드에 기초하여, 현재 블록(1101)의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위한 이웃 블록들의 스캔 방법을 결정한다(S131). 상세하게는, 상기 단계에서 상측 이웃 블록들 및 좌측 이웃 블록들 중 화면내 모드로 부호화된 이웃 블록들이 많은 위치의 이웃 블록들을 먼저 스캔하도록 고려할 수 있다. Thereafter, based on the obtained prediction modes of the neighboring blocks, a scanning method of neighboring blocks for constructing a list of the most probable intra prediction modes of the current block 1101 is determined ( S131 ). In detail, in the above step, it may be considered to first scan the neighboring blocks in positions where the neighboring blocks encoded in the intra-mode among the upper neighboring blocks and the left neighboring blocks are many.

도 12a를 참조하면, 현재 블록(1210)의 상측 이웃 블록 위치의 코딩 블록들(1216, 1217, 1215)은 화면내 모드로 부호화되고, 좌측 이웃 블록 위치의 코딩 블록들 중 2개 블록(1212, 1213)은 화면간 모드로 부호화되고 1개의 블록(1211)은 화면내 모드로 부호화됨을 확인할 수 있다. 이 경우, 현재 블록(1210)의 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위하여 상측 이웃 블록들(1216, 1217)을 먼저 스캔하도록 결정하고, 이후 좌측 이웃 블록들(1212, 1213)을 스캔하도록 결정할 수 있다. 예를 들어, 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위한 공간적 이웃 블록들(1211, ..., 1217)의 화면내 예측 모드 순서를 AR->A->AL->L->BL 으로 결정할 수 있다.Referring to FIG. 12A , the coding blocks 1216 , 1217 , and 1215 at the upper neighboring block position of the current block 1210 are coded in the intra-picture mode, and two blocks 1212 of the coding blocks at the left neighboring block position are coded. It can be seen that 1213 is coded in the inter-picture mode and one block 1211 is coded in the intra-picture mode. In this case, it is determined to scan the upper neighboring blocks 1216 and 1217 first, and then scan the left neighboring blocks 1212 and 1213 to construct the most probable intra prediction mode list of the current block 1210 . can For example, to determine the intra prediction mode order of the spatial neighboring blocks 1211, ..., 1217 for the most probable intra prediction mode list construction as AR->A->AL->L->BL can

도 12b를 참조하면, 현재 블록(1220)의 상측 이웃 블록 위치의 코딩 블록들 중 2개 블록(1225, 1226)은 화면간 모드로 부호화되고 1개 블록(1227)은 화면내 예측 모드로 부호화되고, 좌측 이웃 블록 위치의 코딩 블록들(1224, 1222, 1223)은 화면내 모드로 부호화됨을 확인할 수 있다. 이 경우, 현재 블록(1220)의 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위하여 좌측 이웃 블록들(1222, 1223)을 먼저 스캔하도록 결정하고, 이후 상측 이웃 블록들(1226, 1227)을 스캔하도록 결정할 수 있다. 예를 들어, 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위한 공간적 이웃 블록들(1221, ..., 1227)의 스캔 순서를 BL->L->AL->A->AR 으로 결정할 수 있다. 도 12a 및 도 12b를 참조하여 스캔 순서를 결정하는 경우, 추가적으로 고려되는 플라나 모드, DC 모드와 같은 화면내 예측 모드들의 종류 및 스캔 순서는 제한되지 아니하고 다양하게 추가될 수 있다.Referring to FIG. 12B , two blocks 1225 and 1226 of the coding blocks at the position of the upper neighboring block of the current block 1220 are coded in the inter picture mode, and one block 1227 is coded in the intra prediction mode. , it can be seen that the coding blocks 1224 , 1222 , and 1223 of the left neighboring block are coded in the intra-picture mode. In this case, it is determined to scan the left neighboring blocks 1222 and 1223 first, and then scan the upper neighboring blocks 1226 and 1227 to configure the most probable intra prediction mode list of the current block 1220 . can For example, the scan order of the spatial neighboring blocks 1221 , ..., 1227 for configuring the most probable intra prediction mode list may be determined as BL->L->AL->A->AR. When the scan order is determined with reference to FIGS. 12A and 12B , the types and scan order of intra prediction modes such as planar mode and DC mode that are additionally considered are not limited and may be variously added.

또한, 상기 현재 블록을 인트라 예측부호화 하는 단계는 상기 현재 블록의 이웃 블록들에 스무딩 필터를 적용하여 스무딩하는 단계를 더 수행할 수 있다. 상기 스무딩 필터는 적어도 두 개 이상일 수 있으며, 상기 현재 블록의 이웃 블록들에 상기 적어도 두 개 이상의 스무딩 필터가 적응적으로 적용될 수 있다.In addition, the intra prediction encoding of the current block may further include performing smoothing by applying a smoothing filter to neighboring blocks of the current block. There may be at least two smoothing filters, and the at least two smoothing filters may be adaptively applied to neighboring blocks of the current block.

일 실시예에서, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함할 수 있으며, 상기 스무딩 필터는 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들 각각에 상이한 필터를 이용할 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 좌측 이웃 블록들에는 A 인트라 스무딩 필터를 사용할 수 있고, 상기 상측 이웃 블록들에는 B 인트라 스무딩 필터를 적용할 수 있다. 이와 같이, 상기 이웃 블록들의 공간적인 위치에 따라서 상기 적어도 두 개 이상의 필터가 각각 적용될 수 있다.In an embodiment, the neighboring blocks may include left neighboring blocks and upper neighboring blocks, and the smoothing filter may use a different filter for each of the left neighboring blocks and the upper neighboring blocks. For example, when the current block has a rectangular shape, the A intra smoothing filter may be used for the left neighboring blocks, and the B intra smoothing filter may be applied to the upper neighboring blocks. In this way, the at least two filters may be applied according to spatial positions of the neighboring blocks.

일 실시예에서, 상기 인트라 스무딩 필터는 상기 화면내 예측을 수행하는 현재 블록의 크기 또는 모양에 따라 결정될 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 A 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 긴 방향의 이웃 블록에 적용되고, 상기 B 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 짧은 방향의 이웃 블록에 적용될 수 있다. 이 때, 상기 A 인트라 스무딩 필터는 상기 B 인트라 스무딩 필터에 비하여 신호를 더 많이 뭉그러뜨리는 경향이 있는 스무딩 필터일 수 있다. In an embodiment, the intra smoothing filter may be determined according to a size or shape of a current block for which the intra prediction is performed. For example, when the current block has a rectangular shape, the A intra-smoothing filter is applied to a neighboring block in the longest direction among the horizontal or vertical sides of the current block, and the B intra-smoothing filter is applied to the horizontal direction of the current block. Alternatively, it may be applied to a neighboring block in a direction having a shorter length among vertical sides. In this case, the A intra smoothing filter may be a smoothing filter that tends to compress a signal more than the B intra smoothing filter.

또한, 상기 스무딩 필터는 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들의 예측 모드 및 크기 중 적어도 하나 이상을 고려하여 상이하게 결정될 수 있다. 상기 적어도 두 개 이상의 인트라 스무딩 필터에 관한 정보는 부호화 장치로부터 기설정되어 전송되거나 복호화 장치에서 기설정되어 있을 수도 있으나, 현재 블록의 크기, 모양, 및 현재 블록을 예측하는 예측 모드 중 적어도 하나 이상을 고려하여 복호화 장치에서 복수 개의 후보 필터 중 선택될 수도 있다. Also, the smoothing filter may be determined differently in consideration of at least one of a prediction mode and a size of the left neighboring blocks and the upper neighboring blocks. The information on the at least two or more intra smoothing filters may be preset and transmitted from the encoding device or preset in the decoding device, but at least one or more of the size, shape, and prediction mode for predicting the current block In consideration of this, the decoding apparatus may select a plurality of candidate filters.

이와 같이, 본 발명의 일 실시예에 따른 비디오 신호의 복호화 방법 및 장치는, 현재 블록의 이웃 블록들의 모양 또는 예측 모드를 기초로 하여, 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록들의 스캔 순서를 가변적으로 결정함으로써, 상기 현재 블록과 상관성이 높은 이웃 블록의 화면내 예측 모드를 가장 가능성 있는 화면내 예측 모드 리스트의 낮은 인덱스에 할당하여 코딩 효율을 향상시킬 수 있다. As described above, in the method and apparatus for decoding a video signal according to an embodiment of the present invention, the neighbor obtains the most probable intra prediction mode of the current block based on the shape or prediction mode of the neighboring blocks of the current block. By variably determining the scan order of the blocks, it is possible to improve coding efficiency by allocating the intra prediction mode of the neighboring block having high correlation with the current block to the low index of the most probable intra prediction mode list.

도 14 내지 도 16은 본 발명의 다른 실시예에 따른 이웃 블록의 가로 및 세로 길이에 따른 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 방법을 설명하기 위한 개략도 및 순서도이다.14 to 16 are schematic diagrams and flowcharts for explaining a method of constructing a list of most probable intra prediction modes of a current block according to horizontal and vertical lengths of neighboring blocks according to another embodiment of the present invention.

도 14 및 도 16을 참조하면, 현재 블록(1410)은 비정방형 모양의 예측 블록일 수 있으며, 현재 블록(1410)의 상측에 위치하는 이웃 블록들(AL, A, AR)의 화면내 예측 모드가 좌측에 위치하는 이웃 블록들(L, BL)의 화면내 예측 모드보다 더 현재 블록(1410)과 상관도가 높아 현재 블록(1410)의 화면내 예측 모드와 유사할 확률이 높을 수 있다. 따라서, 현재 블록(1410)의 가장 가능성 있는 화면내 예측 모드 리스트를 효과적으로 구성하기 위하여, 먼저 현재 블록(1410)의 모양을 판단하여야 한다(S160).14 and 16 , the current block 1410 may be a prediction block having a non-square shape, and an intra prediction mode of neighboring blocks AL, A, and AR located above the current block 1410 . Since the correlation with the current block 1410 is higher than that of the intra prediction modes of neighboring blocks L and BL located on the left, the probability of similarity to the intra prediction mode of the current block 1410 may be high. Therefore, in order to effectively construct a list of the most probable intra prediction modes of the current block 1410, the shape of the current block 1410 must be determined (S160).

현재 블록(1410)의 모양을 판단하기 위하여 여러가지 방법이 이용될 수 있다. 예를 들어, 현재 블록(1410)의 가로 길이 및 세로 길이를 비교함으로써 현재 블록(1410)의 모양 또는 방향을 판단할 수 있다. 일 실시예에서, 현재 블록(1410)의 모양 또는 방향은 현재 블록(1410)의 시작 픽셀의 위치 값 및 종료 픽셀의 위치 값에 기초하여 현재 블록(1410)의 가로 길이 및 세로 길이를 비교함으로써 판단될 수 있고, 현재 블록(1410)의 가로 길이 및 세로 길이에 대한 정보를 획득하여 판단될 수 있으며, 현재 블록(1410)의 분할 정보 또는, 현재 블록(1410)의 세로 또는 가로 방향을 나타내는 방향 정보에 기초하여 획득할 수도 있다. 이러한 현재 블록(1410)의 모양 또는 방향을 판단하는 방법은 이에 한정되지 아니한다.Various methods may be used to determine the shape of the current block 1410 . For example, the shape or direction of the current block 1410 may be determined by comparing the horizontal length and the vertical length of the current block 1410 . In one embodiment, the shape or direction of the current block 1410 is determined by comparing the horizontal length and the vertical length of the current block 1410 based on the position value of the start pixel and the position value of the end pixel of the current block 1410 . It may be determined by obtaining information on the horizontal length and vertical length of the current block 1410 , and division information of the current block 1410 or direction information indicating the vertical or horizontal direction of the current block 1410 . It can also be obtained based on A method of determining the shape or direction of the current block 1410 is not limited thereto.

이후, 결정된 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위한 이웃 블록들의 스캔 순서에 따라, 화면내 예측 모드 후보들을 획득하여 리스트를 구성한다(S162). 도 15a를 참조하면, 현재 블록(1510)은 세로 길이보다 가로 길이가 더 길기 때문에, 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위하여 상측 이웃 블록들이 좌측 이웃 블록들보다 먼저 스캔하기로 결정될 수 있다. 예를 들면, 결정된 스캔 순서는 AR->A->AL->L->BL 로 상기 위치에 존재하는 블록들의 화면내 예측 모드를 획득하여 리스트를 구성할 수 있다. 또한, 상기 공간적 이웃 블록들 스캔 순서 사이에 플라나 모드 및 DC 모드를 추가하여, 예를 들어, AR->A->AL->플라나->DC->L->BL 순서로 스캔할 수 있다. 도 15b를 참조하면, 현재 블록(1520)은 가로 길이보다 세로 길이가 더 길기 때문에, 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위하여 좌측 이웃 블록들이 상측 이웃 블록들보다 먼저 스캔하기로 결정될 수 있다. 예를 들면, 결정된 스캔 순서는 BL->L->AL->A->AR 로 상기 위치에 존재하는 블록들의 화면내 예측 모드를 획득하여 리스트를 구성할 수 있다. 또한, 상기 공간적 이웃 블록들 스캔 순서 사이에 플라나 모드 및 DC 모드를 추가하여, 예를 들어, BL->L->AL->플라나->DC->A->AR 순서로 스캔할 수 있다. 그러나, 상기 공간적 이웃 블록들 스캔 순서 사이에 추가되는 화면내 예측 모드들의 순서는 이에 한정되지 아니하며, 상기 공간적 이웃 블록들의 스캔 순서 중 상측 이웃 블록들 또는 좌측 이웃 블록들 내의 스캔 순서도 이에 한정되지 아니한다.Thereafter, the list is constructed by obtaining intra prediction mode candidates according to the scan order of the neighboring blocks for constructing the determined most probable intra prediction mode list ( S162 ). Referring to FIG. 15A , since the horizontal length of the current block 1510 is longer than the vertical length, it may be determined that upper neighboring blocks are scanned before left neighboring blocks in order to construct the most probable intra prediction mode list. For example, the determined scan order may be AR->A->AL->L->BL to obtain an intra prediction mode of blocks existing at the position to configure a list. In addition, by adding the planar mode and the DC mode between the scan orders of the spatial neighboring blocks, for example, it is possible to scan in the order AR->A->AL->Plana->DC->L->BL. Referring to FIG. 15B , since the vertical length of the current block 1520 is longer than the horizontal length, it may be determined that the left neighboring blocks are scanned before the upper neighboring blocks in order to construct the most probable intra prediction mode list. For example, the determined scan order may be BL->L->AL->A->AR to obtain an intra prediction mode of blocks existing at the position to configure a list. In addition, by adding a planar mode and a DC mode between the scan orders of the spatial neighboring blocks, for example, BL->L->AL->planar->DC->A->AR may be scanned. However, the order of intra prediction modes added between the scan orders of the spatial neighboring blocks is not limited thereto, and the scan order of upper neighboring blocks or left neighboring blocks among the scan orders of the spatial neighboring blocks is not limited thereto.

하기 표 1은 종래의 스캔 방법 및 본 발명의 일실시예에 따른 가장 가능성 있는 화면내 예측 모드 리스트 구성의 비교표이다.Table 1 below is a comparison table between the conventional scanning method and the most probable intra prediction mode list configuration according to an embodiment of the present invention.

가장 가능성 있는 화면내 예측 모드 리스트의 인덱스(Idx_MPM_list)Index of the most probable intra prediction mode list (Idx_MPM_list) 가로 방향의 현재 블록
(도 15a)
current block in horizontal direction
(Fig. 15a)
세로 방향의 현재 블록
(도 15b)
current block in vertical direction
(Fig. 15b)
종래 방법
(JEM)
conventional method
(JEM)
본 발명의 일 실시예에 따른 방법Method according to an embodiment of the present invention 종래 방법
(JEM)
conventional method
(JEM)
본 발명의 일 실시예에 따른 방법Method according to an embodiment of the present invention
00 LL ARAR LL BLBL 1One AA AA AA LL 22 플라나playa ALAL 플라나playa ALAL 33 DCDC 플라나playa DCDC 플라나playa 44 BLBL DCDC BLBL DCDC 55 ARAR LL ARAR ARAR 66 ALAL BLBL ALAL AA

이 경우, 이웃 블록들의 스캔시 중복되는 화면내 예측 모드는 가장 가능성 있는 화면내 예측 모드 리스트에 추가하지 아니할 수 있다. 또한, 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트 구성을 위하여 고려되는 이웃 블록들의 위치 및 상기 이웃 블록들의 개수는 본 발명에 제한되지 아니할 수 있다. 상기 리스트를 구성하는 가장 가능성 있는 화면내 예측 모드의 개수도 본 발명의 실시예에 한정되지 아니한다.In this case, the overlapping intra prediction mode during scanning of neighboring blocks may not be added to the list of most probable intra prediction modes. In addition, the number of neighboring blocks and positions of neighboring blocks considered for constructing the list of most probable intra prediction modes of the current block may not be limited to the present invention. The number of most probable intra prediction modes constituting the list is not limited to the embodiment of the present invention.

또한, 상기 현재 블록을 인트라 예측하는 단계는 상기 현재 블록의 이웃 블록들에 스무딩 필터를 적용하여 스무딩하는 단계를 더 수행할 수 있다. 상기 스무딩 필터는 적어도 두 개 이상일 수 있으며, 상기 현재 블록의 이웃 블록들에 상기 적어도 두 개 이상의 스무딩 필터가 적응적으로 적용될 수 있다.In addition, the intra prediction of the current block may further include applying a smoothing filter to neighboring blocks of the current block to perform smoothing. There may be at least two smoothing filters, and the at least two smoothing filters may be adaptively applied to neighboring blocks of the current block.

일 실시예에서, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함할 수 있으며, 상기 스무딩 필터는 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들 각각에 상이한 필터를 이용할 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 좌측 이웃 블록들에는 A 인트라 스무딩 필터를 사용할 수 있고, 상기 상측 이웃 블록들에는 B 인트라 스무딩 필터를 적용할 수 있다. 이와 같이, 상기 이웃 블록들의 공간적인 위치에 따라서 상기 적어도 두 개 이상의 필터가 각각 적용될 수 있다.In an embodiment, the neighboring blocks may include left neighboring blocks and upper neighboring blocks, and the smoothing filter may use a different filter for each of the left neighboring blocks and the upper neighboring blocks. For example, when the current block has a rectangular shape, the A intra smoothing filter may be used for the left neighboring blocks, and the B intra smoothing filter may be applied to the upper neighboring blocks. In this way, the at least two filters may be applied according to spatial positions of the neighboring blocks.

일 실시예에서, 상기 인트라 스무딩 필터는 상기 화면내 예측을 수행하는 현재 블록의 크기 또는 모양에 따라 결정될 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 A 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 긴 방향의 이웃 블록에 적용되고, 상기 B 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 짧은 방향의 이웃 블록에 적용될 수 있다. 이 때, 상기 A 인트라 스무딩 필터는 상기 B 인트라 스무딩 필터에 비하여 신호를 더 많이 뭉그러뜨리는 경향이 있는 스무딩 필터일 수 있다. 또한, 상기 적어도 두 개 이상의 인트라 스무딩 필터에 관한 정보는 부호화 장치로부터 기설정되어 전송되거나 복호화 장치에서 기설정되어 있을 수도 있으나, 현재 블록의 크기, 모양, 및 현재 블록을 예측하는 예측 모드 중 적어도 하나 이상을 고려하여 복호화 장치에서 복수 개의 후보 필터 중 선택될 수도 있다. In an embodiment, the intra smoothing filter may be determined according to a size or shape of a current block for which the intra prediction is performed. For example, when the current block has a rectangular shape, the A intra-smoothing filter is applied to a neighboring block in the longest direction among the horizontal or vertical sides of the current block, and the B intra-smoothing filter is applied to the horizontal direction of the current block. Alternatively, it may be applied to a neighboring block in a direction having a shorter length among vertical sides. In this case, the A intra smoothing filter may be a smoothing filter that tends to compress a signal more than the B intra smoothing filter. In addition, the information on the at least two or more intra smoothing filters may be preset and transmitted from the encoding device or preset in the decoding device, but at least one of a size, a shape, and a prediction mode for predicting the current block In consideration of the above, the decoding apparatus may select a plurality of candidate filters.

도 17 및 도 18은 본 발명의 또 다른 실시예에 따른 이웃 블록들을 서브 블록으로 재분할하여, 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 방법을 설명하기 위한 개략도 및 순서도이다.17 and 18 are schematic diagrams and flowcharts for explaining a method of constructing a list of most probable intra prediction modes of a current block by re-segmenting neighboring blocks into sub-blocks according to another embodiment of the present invention.

도 17을 참조하면, 현재 블록(1710)의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여 먼저 현재 블록(1710)의 주변에 위치하는 블록들을 서브 블록 단위로 재분할할 수 있다(S180). 도 17에서는 상기 서브 블록 단위로 재분할하는 현재 블록(1710)의 주변에 위치하는 블록들을 현재 블록(1710)의 상측에 여덟 개 및 현재 블록(1710)의 좌측에 여덟 개의 서브 블록들이나, 상기 서브 블록의 위치, 개수, 및 크기는 이에 한정되지 아니한다. 일 실시예에서는, 상기 서브 블록들의 위치, 개수, 및 크기가 현재 블록(1710)의 모양 또는 크기에 기초하여 결정될 수 있다.Referring to FIG. 17 , in order to construct a list of the most probable intra prediction modes of the current block 1710 , first, blocks located around the current block 1710 may be sub-divided into sub-block units ( S180 ). In FIG. 17 , the blocks located around the current block 1710 that are re-divided in units of sub-blocks are eight on the upper side of the current block 1710 and eight sub-blocks on the left side of the current block 1710 , or the sub-blocks. The position, number, and size of the are not limited thereto. In an embodiment, the position, number, and size of the sub-blocks may be determined based on the shape or size of the current block 1710 .

이후, 서브 블록(Sub Block)들의 화면내 예측 모드를 획득할 수 있다(S181). 획득된 서브 블록들의 화면내 예측 모드에 따라 현재 블록(1710)의 가장 가능성 있는 화면내 예측 모드를 획득하기 위한 스캔 순서를 결정할 수 있다(S182). 예를 들면, 현재 블록(1710)의 상측에 위치하는 서브 블록들의 화면내 예측 모드 빈도수가 좌측에 위치하는 서브 블록들의 화면내 예측 모드 빈도수보다 큰 경우, 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위한 서브 블록들의 화면내 예측 모드 획득 순서는 상기 상측에 위치하는 서브 블록들로부터 시작하여 상기 좌측에 위치하는 서브 블록들일 수 있다. Thereafter, intra prediction modes of sub blocks may be obtained ( S181 ). A scan order for obtaining the most probable intra prediction mode of the current block 1710 may be determined according to the obtained intra prediction modes of the sub blocks ( S182 ). For example, when the frequency of intra prediction mode of sub-blocks located above the current block 1710 is greater than the frequency of intra prediction mode of sub-blocks located on the left, constructing the most probable intra prediction mode list The order of obtaining the intra prediction mode of the sub-blocks may be the sub-blocks located on the left, starting from the sub-blocks located on the upper side.

일 실시예에서는, 상기 스캔 순서가 현재 블록(1710)의 모양에 따라 변경될 수도 있다. 예를 들어, 현재 블록(1710)의 모양이 세로 방향의 블록인 경우에는 좌측에 위치하는 서브 블록들로부터 먼저 화면내 예측 모드를 획득하여 리스트를 구성할 수 있다. 또한, 다른 실시예에서는, 상기 스캔 순서를 현재 블록(1710)의 모양 또는 주변 서브 블록들의 화면내 예측 모드 빈도수와 관계없이 동일한 순서로 고정할 수도 있다. 예를 들면, 가장 가능성 있는 화면내 예측 모드 리스트를 구성하기 위하여, 항상 좌측의 서브 블록으로부터 상측 서브 블록의 순서로 스캔하거나, 상측 서브 블록으로부터 좌측 서브 블록으로 스캔하는 방법을 이용할 수도 있다.In an embodiment, the scan order may be changed according to the shape of the current block 1710 . For example, when the shape of the current block 1710 is a block in the vertical direction, the list may be constructed by first acquiring an intra prediction mode from sub-blocks located on the left. Also, in another embodiment, the scan order may be fixed in the same order regardless of the shape of the current block 1710 or the frequency of intra prediction modes of neighboring sub-blocks. For example, in order to construct the most probable intra prediction mode list, a method of always scanning from the left sub-block to the upper sub-block or scanning from the upper sub-block to the left sub-block may be used.

이와 같이, 현재 블록의 주변에 위치하는 이웃 서브 블록들로부터 상기 이웃 서브 블록들의 화면내 예측 모드를 획득하여 가장 가능성 있는 화면내 예측 모드 리스트를 구성함으로써, 예측 블록의 크기가 커짐에 따라 소수의 고정된 위치의 화면내 예측 모드가 현재 블록의 화면내 예측 모드와 상이할 수 있는 단점을 해결할 수 있는 비디오 신호의 부호화 또는 복호화 방법 및 장치를 제공할 수 있다.As described above, by obtaining the intra prediction modes of the neighboring sub-blocks from the neighboring sub-blocks located in the vicinity of the current block and constructing a list of the most probable intra prediction modes, as the size of the prediction block increases, a small number of fixed It is possible to provide a method and apparatus for encoding or decoding a video signal that can solve the disadvantage that the intra prediction mode of the current block may be different from the intra prediction mode of the current block.

또한, 상기 현재 블록을 인트라 예측 부호화하는 단계는 상기 현재 블록의 이웃 블록들에 스무딩 필터를 적용하여 스무딩하는 단계를 더 수행할 수 있다. 상기 스무딩 필터는 적어도 두 개 이상일 수 있으며, 상기 현재 블록의 이웃 블록들에 상기 적어도 두 개 이상의 스무딩 필터가 적응적으로 적용될 수 있다.In addition, the intra prediction encoding of the current block may further include smoothing by applying a smoothing filter to neighboring blocks of the current block. There may be at least two smoothing filters, and the at least two smoothing filters may be adaptively applied to neighboring blocks of the current block.

일 실시예에서, 상기 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함할 수 있으며, 상기 스무딩 필터는 상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들 각각에 상이한 필터를 이용할 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 좌측 이웃 블록들에는 A 인트라 스무딩 필터를 사용할 수 있고, 상기 상측 이웃 블록들에는 B 인트라 스무딩 필터를 적용할 수 있다. 이와 같이, 상기 이웃 블록들의 공간적인 위치에 따라서 상기 적어도 두 개 이상의 필터가 각각 적용될 수 있다.In an embodiment, the neighboring blocks may include left neighboring blocks and upper neighboring blocks, and the smoothing filter may use a different filter for each of the left neighboring blocks and the upper neighboring blocks. For example, when the current block has a rectangular shape, the A intra smoothing filter may be used for the left neighboring blocks, and the B intra smoothing filter may be applied to the upper neighboring blocks. In this way, the at least two filters may be applied according to spatial positions of the neighboring blocks.

일 실시예에서, 상기 인트라 스무딩 필터는 상기 화면내 예측을 수행하는 현재 블록의 크기 또는 모양에 따라 결정될 수 있다. 예를 들면, 상기 현재 블록이 직사각형 형상인 경우, 상기 A 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 긴 방향의 이웃 블록에 적용되고, 상기 B 인트라 스무딩 필터는 상기 현재 블록의 가로 또는 세로 변 중 길이가 짧은 방향의 이웃 블록에 적용될 수 있다. 이 때, 상기 A 인트라 스무딩 필터는 상기 B 인트라 스무딩 필터에 비하여 신호를 더 많이 뭉그러뜨리는 경향이 있는 스무딩 필터일 수 있다. 또한, 상기 적어도 두 개 이상의 인트라 스무딩 필터에 관한 정보는 부호화 장치로부터 기설정되어 전송되거나 복호화 장치에서 기설정되어 있을 수도 있으나, 현재 블록의 크기, 모양, 및 현재 블록을 예측하는 예측 모드 중 적어도 하나 이상을 고려하여 복호화 장치에서 복수 개의 후보 필터 중 선택될 수도 있다. In an embodiment, the intra smoothing filter may be determined according to a size or shape of a current block for which the intra prediction is performed. For example, when the current block has a rectangular shape, the A intra-smoothing filter is applied to a neighboring block in the longest direction among the horizontal or vertical sides of the current block, and the B intra-smoothing filter is applied to the horizontal direction of the current block. Alternatively, it may be applied to a neighboring block in a direction having a shorter length among vertical sides. In this case, the A intra smoothing filter may be a smoothing filter that tends to compress a signal more than the B intra smoothing filter. In addition, the information on the at least two or more intra smoothing filters may be preset and transmitted from the encoding device or preset in the decoding device, but at least one of a size, a shape, and a prediction mode for predicting the current block In consideration of the above, the decoding apparatus may select a plurality of candidate filters.

이상에서 설명한 본 발명이 전술한 실시예 및 첨부된 도면에 한정되지 않으며, 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러가지 치환, 변형 및 변경이 가능하다는 것은, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 명백할 것이다.It is common in the art to which the present invention pertains that the present invention described above is not limited to the above-described embodiments and the accompanying drawings, and that various substitutions, modifications, and changes are possible within the scope without departing from the technical spirit of the present invention. It will be clear to those who have knowledge.

Claims (22)

현재 블록의 모양을 판단하는 단계;
상기 판단된 모양에 따라 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록들의 위치 및 개수 중 어느 하나 이상을 결정하는 단계; 및
상기 결정된 이웃 블록들의 화면내 예측 모드에 기초하여 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 획득하는 단계를 포함하고,
상기 결정된 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 모두 포함하며,
상기 현재 블록의 가로 길이가 세로 길이보다 긴 경우, 상기 좌측 이웃 블록들의 개수보다 상기 상측 이웃 블록들의 개수가 상기 이웃 블록들로서 더 많이 결정되고,
상기 현재 블록의 세로 길이가 가로 길이보다 긴 경우, 상기 상측 이웃 블록들의 개수보다 상기 좌측 이웃 블록들의 개수가 상기 이웃 블록들로서 더 많이 결정되는 것을 특징으로 하는 비디오 신호의 복호화 방법.
determining the shape of the current block;
determining any one or more of positions and numbers of neighboring blocks that obtain the most probable intra prediction mode of the current block according to the determined shape; and
obtaining a list of most probable intra prediction modes of the current block based on the determined intra prediction modes of the neighboring blocks;
The determined neighboring blocks include both left neighboring blocks and upper neighboring blocks,
When the horizontal length of the current block is longer than the vertical length, the number of the upper neighboring blocks is more determined as the neighboring blocks than the number of the left neighboring blocks,
When the vertical length of the current block is longer than the horizontal length, the number of the left neighboring blocks is more determined as the neighboring blocks than the number of the upper neighboring blocks.
제 1 항에 있어서,
상기 판단하는 단계는,
상기 현재 블록의 가로 길이와 세로 길이를 비교하여 판단하는 것을 특징으로 하는 비디오 신호의 복호화 방법.
The method of claim 1,
The determining step is
and determining by comparing the horizontal length and the vertical length of the current block.
제 1 항에 있어서,
상기 판단하는 단계는, 상기 현재 블록의 가로 및 세로 길이 정보, 분할 정보, 방향 정보, 및 픽셀 정보 중 어느 하나 이상을 기초로 하여 판단하는 것을 특징으로 하는 비디오 신호의 복호화 방법.
The method of claim 1,
The determining comprises determining based on at least one of horizontal and vertical length information, division information, direction information, and pixel information of the current block.
삭제delete 제 1 항에 있어서,
상기 현재 블록의 이웃 블록들에 적어도 두 개 이상의 필터를 적용하여 상기 이웃 블록들을 스무딩하는 단계를 더 포함하는 비디오 신호의 복호화 방법.
The method of claim 1,
and smoothing the neighboring blocks by applying at least two filters to the neighboring blocks of the current block.
현재 블록의 이웃 블록들의 모양을 판단하는 단계;
상기 판단된 모양에 따라 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록들의 스캔 순서를 결정하는 단계; 및
상기 결정된 순서에 따라 상기 이웃 블록들로부터 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 획득하는 단계를 포함하고,
상기 결정된 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 모두 포함하며,
상기 스캔 순서를 결정하는 단계는,
상기 좌측 이웃 블록들의 크기가 상기 상측 이웃 블록들의 크기보다 큰 경우, 상기 좌측 이웃 블록들의 화면내 예측 모드를 먼저 스캔하여 상기 가장 가능성 있는 화면내 예측 모드 리스트에 포함시키고,
상기 상측 이웃 블록들의 크기가 상기 좌측 이웃 블록들의 크기보다 큰 경우, 상기 상측 이웃 블록들의 화면내 예측 모드를 먼저 스캔하여 상기 가장 가능성 있는 화면내 예측 모드 리스트에 포함시키는 것을 특징으로 하는 비디오 신호의 복호화 방법.
determining shapes of neighboring blocks of the current block;
determining a scan order of neighboring blocks for obtaining the most probable intra prediction mode of the current block according to the determined shape; and
obtaining a list of most probable intra prediction modes of the current block from the neighboring blocks according to the determined order;
The determined neighboring blocks include both left neighboring blocks and upper neighboring blocks,
The step of determining the scan order comprises:
When the size of the left neighboring blocks is larger than the size of the upper neighboring blocks, the intra prediction modes of the left neighboring blocks are first scanned and included in the most probable intra prediction mode list,
When the size of the upper neighboring blocks is larger than the size of the left neighboring blocks, the intra prediction modes of the upper neighboring blocks are scanned first and included in the list of the most probable intra prediction modes. Way.
제 6 항에 있어서,
상기 판단하는 단계는,
상기 좌측 이웃 블록들과 상기 상측 이웃 블록들의 크기에 기초하는 것을 특징으로 하는 비디오 신호의 복호화 방법.
7. The method of claim 6,
The determining step is
The decoding method of a video signal, characterized in that based on sizes of the left neighboring blocks and the upper neighboring blocks.
삭제delete 제 6 항에 있어서,
상기 이웃 블록들은 화면 내 예측 모드로 결정된 블록들인 것을 특징으로 하는 비디오 신호의 복호화 방법.
7. The method of claim 6,
The video signal decoding method, characterized in that the neighboring blocks are blocks determined by the intra prediction mode.
제 6 항에 있어서,
상기 현재 블록의 이웃 블록들에 적어도 두 개 이상의 필터를 적용하여 상기 이웃 블록들을 스무딩하는 단계를 더 포함하는 비디오 신호의 복호화 방법.
7. The method of claim 6,
and smoothing the neighboring blocks by applying at least two filters to the neighboring blocks of the current block.
현재 블록의 이웃 블록의 모양 및 예측 모드를 획득하는 단계;
상기 모양 및 예측 모드에 기초하여 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 상기 이웃 블록의 스캔 순서를 결정하는 단계; 및
상기 결정된 순서에 따라 상기 이웃 블록들로부터 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 획득하는 단계를 포함하고,
상기 결정된 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 포함하며,
상기 스캔 순서를 결정하는 단계는.
상기 좌측 이웃 블록들 및 상기 상측 이웃 블록들 중 화면내 예측으로 획득된 블록들이 더 많은 이웃 블록들을 우선적으로 스캔하는 것을 특징으로 하는 비디오 신호의 복호화 방법.
obtaining a shape and a prediction mode of a neighboring block of the current block;
determining a scan order of the neighboring blocks for obtaining the most probable intra prediction mode of the current block based on the shape and the prediction mode; and
obtaining a list of most probable intra prediction modes of the current block from the neighboring blocks according to the determined order;
The determined neighboring blocks include left neighboring blocks and upper neighboring blocks,
determining the scan order.
The decoding method of a video signal, characterized in that, among the left neighboring blocks and the upper neighboring blocks, neighboring blocks having more blocks obtained by intra prediction are preferentially scanned.
삭제delete 제 11 항에 있어서,
상기 이웃 블록의 예측 모드를 획득하는 단계는,
상기 현재 블록의 주변을 서브 블록들로 분할하는 단계; 및
상기 분할된 서브 블록들의 예측 모드를 획득하는 단계를 포함하는 것을 특징으로 하는 비디오 신호의 복호화 방법.
12. The method of claim 11,
The step of obtaining the prediction mode of the neighboring block comprises:
dividing the periphery of the current block into sub-blocks; and
and obtaining prediction modes of the divided sub-blocks.
제 11 항에 있어서,
상기 현재 블록의 이웃 블록들에 적어도 두 개 이상의 필터를 적용하여 상기 이웃 블록들을 스무딩하는 단계를 더 포함하는 비디오 신호의 복호화 방법.
12. The method of claim 11,
and smoothing the neighboring blocks by applying at least two filters to the neighboring blocks of the current block.
현재 블록의 모양을 판단하는 단계;
상기 판단된 모양에 따라 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 이웃 블록들의 스캔 순서를 결정하는 단계;
상기 결정된 스캔 순서에 따라, 상기 이웃 블록들의 화면내 예측 모드에 기초하여 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 획득하는 단계를 포함하고,
상기 결정된 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 모두 포함하며,
상기 스캔 방법을 결정하는 단계는,
상기 현재 블록의 가로 길이가 상기 현재 블록의 세로 길이보다 긴 경우,
상기 상측 이웃 블록들을 상기 좌측 이웃 블록들보다 먼저 스캔하고,
상기 현재 블록의 세로 길이가 상기 현재 블록의 가로 길이보다 긴 경우,
상기 좌측 이웃 블록들을 상기 상측 이웃 블록들보다 먼저 스캔하도록 결정하는 것을 특징으로 하는 비디오 신호의 복호화 방법.
determining the shape of the current block;
determining a scan order of neighboring blocks for obtaining the most probable intra prediction mode of the current block according to the determined shape;
obtaining a list of most probable intra prediction modes of the current block based on intra prediction modes of the neighboring blocks according to the determined scan order,
The determined neighboring blocks include both left neighboring blocks and upper neighboring blocks,
The step of determining the scanning method comprises:
When the horizontal length of the current block is longer than the vertical length of the current block,
scan the upper neighboring blocks before the left neighboring blocks,
When the vertical length of the current block is longer than the horizontal length of the current block,
and determining to scan the left neighboring blocks before the upper neighboring blocks.
제 15 항에 있어서,
상기 판단하는 단계는,
상기 현재 블록의 가로 길이와 상기 현재 블록의 세로 길이의 비교 결과, 상기 현재 블록의 분할 정보, 방향 정보, 및 픽셀 정보 중 어느 하나 이상을 기초로 하여 판단하는 것을 특징으로 하는 비디오 신호의 복호화 방법.
16. The method of claim 15,
The determining step is
and determining based on at least one of division information, direction information, and pixel information of the current block as a result of comparing the horizontal length of the current block and the vertical length of the current block.
삭제delete 제 15 항에 있어서,
상기 현재 블록의 이웃 블록들에 적어도 두 개 이상의 필터를 적용하여 상기 이웃 블록들을 스무딩하는 단계를 더 포함하는 비디오 신호의 복호화 방법.
16. The method of claim 15,
and smoothing the neighboring blocks by applying at least two filters to the neighboring blocks of the current block.
현재 블록의 주변에 위치하는 블록들을 이웃 서브 블록들로 분할하는 단계; 및
상기 이웃 서브 블록들 각각의 화면내 예측 모드들을 획득하는 단계를 포함하며,
상기 이웃 서브 블록들은 좌측 이웃 서브 블록들 및 상측 이웃 서브 블록들을 포함하고,
상기 이웃 서브 블록들은 상기 현재 블록의 크기 및 모양 중 어느 하나 이상을 기초로 상기 이웃 서브 블록들의 위치 및 개수가 결정되며,
상기 현재 블록의 가로 길이가 세로 길이보다 긴 경우, 상기 좌측 이웃 블록들의 개수보다 상기 상측 이웃 블록들의 개수가 상기 이웃 블록들로서 더 많이 결정되고,
상기 현재 블록의 세로 길이가 가로 길이보다 긴 경우, 상기 상측 이웃 블록들의 개수보다 상기 좌측 이웃 블록들의 개수가 상기 이웃 블록들로서 더 많이 결정되는 것을 특징으로 하는 비디오 신호의 복호화 방법.
dividing blocks located in the vicinity of the current block into neighboring sub-blocks; and
acquiring intra prediction modes of each of the neighboring sub-blocks,
The neighboring sub-blocks include left neighboring sub-blocks and upper neighboring sub-blocks,
For the neighboring sub-blocks, the location and number of the neighboring sub-blocks are determined based on any one or more of the size and shape of the current block,
When the horizontal length of the current block is longer than the vertical length, the number of the upper neighboring blocks is more determined as the neighboring blocks than the number of the left neighboring blocks,
When the vertical length of the current block is longer than the horizontal length, the number of the left neighboring blocks is more determined as the neighboring blocks than the number of the upper neighboring blocks.
제 19 항에 있어서,
상기 획득된 화면내 예측 모드에 기초하여 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 가장 가능성 있는 화면내 예측 모드를 획득하는 순서를 결정하는 단계를 더 포함하는 비디오 신호의 복호화 방법.
20. The method of claim 19,
and determining an order of obtaining a most probable intra prediction mode constituting a list of most probable intra prediction modes of the current block based on the obtained intra prediction mode.
제 19 항에 있어서,
상기 현재 블록의 이웃 서브 블록들에 적어도 두 개 이상의 필터를 적용하여 상기 이웃 서브 블록들을 스무딩하는 단계를 더 포함하는 비디오 신호의 복호화 방법.
20. The method of claim 19,
and smoothing the neighboring subblocks by applying at least two filters to the neighboring subblocks of the current block.
현재 블록 또는 상기 현재 블록의 이웃 블록들의 모양 또는 예측 모드를 판단하는 블록 판단부;
상기 판단된 결과에 따라 상기 현재 블록의 가장 가능성 있는 화면내 예측 모드를 획득하는 상기 이웃 블록들의 위치, 개수 및 스캔 순서 중 어느 하나 이상을 결정하는 MPM 리스트 구성 방법 결정부; 및
상기 결정된 구성 방법에 따라 상기 이웃 블록들의 화면내 예측 모드에 기초하여 상기 현재 블록의 상기 가장 가능성 있는 화면내 예측 모드 리스트를 구성하는 MPM 리스트 구성부를 포함하고,
상기 결정된 이웃 블록들은 좌측 이웃 블록들 및 상측 이웃 블록들을 모두 포함하며,
상기 현재 블록의 가로 길이가 세로 길이보다 긴 경우, 상기 좌측 이웃 블록들의 개수보다 상기 상측 이웃 블록들의 개수가 상기 이웃 블록들로서 더 많이 결정되고,
상기 현재 블록의 세로 길이가 가로 길이보다 긴 경우, 상기 상측 이웃 블록들의 개수보다 상기 좌측 이웃 블록들의 개수가 상기 이웃 블록들로서 더 많이 결정되는 것을 특징으로 하는 비디오 신호의 복호화 장치.
a block determination unit for determining the shape or prediction mode of the current block or neighboring blocks of the current block;
an MPM list construction method determining unit for determining at least one of a position, a number, and a scan order of the neighboring blocks for obtaining the most probable intra prediction mode of the current block according to the determined result; and
an MPM list construction unit configured to construct the most probable intra prediction mode list of the current block based on the intra prediction modes of the neighboring blocks according to the determined configuration method;
The determined neighboring blocks include both left neighboring blocks and upper neighboring blocks,
When the horizontal length of the current block is longer than the vertical length, the number of the upper neighboring blocks is more determined as the neighboring blocks than the number of the left neighboring blocks,
When the vertical length of the current block is longer than the horizontal length, the number of the left neighboring blocks is more determined as the neighboring blocks than the number of the upper neighboring blocks.
KR1020170155365A 2016-12-21 2017-11-21 Method and apparatus for encoding or decoding video signal KR102435502B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/KR2017/015236 WO2018117686A2 (en) 2016-12-21 2017-12-21 Method and device for encoding or decoding video signal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020160175214 2016-12-21
KR20160175214 2016-12-21

Publications (2)

Publication Number Publication Date
KR20180072539A KR20180072539A (en) 2018-06-29
KR102435502B1 true KR102435502B1 (en) 2022-08-24

Family

ID=62781307

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170155365A KR102435502B1 (en) 2016-12-21 2017-11-21 Method and apparatus for encoding or decoding video signal

Country Status (1)

Country Link
KR (1) KR102435502B1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10567752B2 (en) * 2018-07-02 2020-02-18 Tencent America LLC Method and apparatus for intra prediction for non-square blocks in video compression
KR20210000282A (en) * 2019-06-24 2021-01-04 현대자동차주식회사 Method and apparatus for intra prediction coding of video data
WO2023277577A1 (en) * 2021-06-30 2023-01-05 엘지전자 주식회사 Intra prediction method and device using mpm list

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101662411B1 (en) * 2011-06-03 2016-10-10 퀄컴 인코포레이티드 Intra prediction mode coding with directional partitions

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120129726A (en) * 2011-05-20 2012-11-28 주식회사 케이티 Methods of decoding intra prediction mode and decoder

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101662411B1 (en) * 2011-06-03 2016-10-10 퀄컴 인코포레이티드 Intra prediction mode coding with directional partitions

Also Published As

Publication number Publication date
KR20180072539A (en) 2018-06-29

Similar Documents

Publication Publication Date Title
KR102096423B1 (en) Methods of coding block information using quadtree and appararuses for using the same
US11107253B2 (en) Image processing method, and image decoding and encoding method using same
US11917149B2 (en) Method for constructing tile structure and apparatus therefor
KR102424419B1 (en) Method and apparatus for processing a video signal
KR101552632B1 (en) Method of coefficient scan based on partition mode of prediction unit and apparatus using the same
KR102617439B1 (en) Method for encoding/decoidng video signal and apparatus therefor
AU2012326895B2 (en) Adaptive transform method based on in-screen prediction and apparatus using the method
US20190289301A1 (en) Image processing method, and image encoding and decoding method using same
WO2012074344A2 (en) Method for indexing motion information lists and apparatus using same
JP7423624B2 (en) Video signal encoding/decoding method and equipment
KR20180086094A (en) Method and apparatus for encoding or decoding video signal
KR20180033030A (en) Method and apparatus for processing a video signal based on adaptive block patitioning
KR20230054805A (en) A method of decoding a video signal and an apparatus having the same
KR102435502B1 (en) Method and apparatus for encoding or decoding video signal
KR102345458B1 (en) A method of setting advanced motion vector predictor list and an apparatus having the same
KR20130069685A (en) Methods of derivation of temporal motion vector predictor and appratuses using the same
KR102447951B1 (en) A method of decoding a video signal and an apparatus having the same
KR102426131B1 (en) Method and apparatus for encoding or decoding video signal
KR102523384B1 (en) A method of decoding a video signal and an apparatus having the same
KR102410326B1 (en) Method and apparatus for encoding/decoding a video signal
KR20220108018A (en) Method and apparatus for encoding or decoding video signal
KR20240025580A (en) Methods of coding intra prediction mode using two candidate intra prediction modes and apparatuses using the same
KR20220134476A (en) Method for encoding/decoding a video signal and recording medium storing a bitsteram generated based on the method
KR20210118541A (en) Video signal encoding method and apparatus and video decoding method and apparatus
KR20210082877A (en) Method for encoding/decoding video signal and apparatus therefor

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right