[go: up one dir, main page]

KR102726470B1 - A method of decoding a video signal and an apparatus having the same - Google Patents

A method of decoding a video signal and an apparatus having the same Download PDF

Info

Publication number
KR102726470B1
KR102726470B1 KR1020230049183A KR20230049183A KR102726470B1 KR 102726470 B1 KR102726470 B1 KR 102726470B1 KR 1020230049183 A KR1020230049183 A KR 1020230049183A KR 20230049183 A KR20230049183 A KR 20230049183A KR 102726470 B1 KR102726470 B1 KR 102726470B1
Authority
KR
South Korea
Prior art keywords
transform
block
unit
transformation
prediction
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
KR1020230049183A
Other languages
Korean (ko)
Other versions
KR20230054805A (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
Priority claimed from KR1020220035103A external-priority patent/KR102523384B1/en
Application filed by 코닌클리케 필립스 엔.브이. filed Critical 코닌클리케 필립스 엔.브이.
Publication of KR20230054805A publication Critical patent/KR20230054805A/en
Priority to KR1020240146911A priority Critical patent/KR20240157009A/en
Application granted granted Critical
Publication of KR102726470B1 publication Critical patent/KR102726470B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/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/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • 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/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

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

Abstract

본 발명은 비디오 신호의 복호화 방법 및 이의 장치에 관한 것이다. 본 발명의 일 실시예에 따른 비디오 신호의 복호화 방법 및 이의 장치는, 복수 개의 변환 계수 그룹을 포함하는 변환 블록을 스캔하는 방법에 있어서, 상기 변환 블록에 포함되는 적어도 하나 이상의 변환 영역을 나타내는 변환 영역 정보를 획득하는 단계; 상기 변환 영역 정보에 기초하여 제 1 변환 영역에 포함되는 복수 개의 변환 계수 그룹을 스캔하는 단계; 상기 변환 블록 내의 제 2 변환 영역에 포함되는 복수 개의 변환 계수 그룹을 스캔하는 단계를 포함한다.The present invention relates to a method for decoding a video signal and a device thereof. A method for decoding a video signal and a device thereof according to one embodiment of the present invention comprises the steps of: obtaining transform region information indicating at least one transform region included in the transform block, based on the transform region information; scanning a plurality of transform coefficient groups included in a first transform region; and scanning a plurality of transform coefficient groups included in a second transform region within the transform block.

Description

비디오 신호의 복호화 방법 및 이의 장치 {A METHOD OF DECODING A VIDEO SIGNAL AND AN APPARATUS HAVING THE SAME}{A METHOD OF DECODING A VIDEO SIGNAL AND AN APPARATUS HAVING THE SAME}

본 발명은 비디오 신호의 복호화 방법 및 이의 장치에 관한 것으로서, 더욱 상세하게는, 복수 개의 변환 영역별로 변환 계수 그룹을 스캔하는 비디오 신호의 복호화 방법 및 이의 장치에 관한 것이다.The present invention relates to a method for decoding a video signal and a device thereof, and more particularly, to a method for decoding a video signal and a device thereof for scanning a group of transform coefficients for each of a plurality of transform areas.

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

비디오 압축 기술들에서는, 종래의 압축 기술에 비하여 2 배 이상으로 압축률을 향상시키기 위하여 다양한 효과적인 방법들을 채택하고 있다. 화면간 예측 기술로는 모션 벡터 예측자(Motion Vector Predictor)를 이용하는 방법, 머지 모드 및 스킵 모드를 이용하는 방법들이 사용된다. 이는 모두 화면간 예측을 효율적으로 하기 위한 기술들이다.In video compression technologies, various effective methods are adopted to improve the compression ratio by more than two times compared to conventional compression technologies. As inter-screen prediction technologies, methods using motion vector predictors, merge mode, and skip mode are used. These are all technologies for efficient inter-screen prediction.

또한, 기존의 비디오 코덱들은 하나의 픽쳐를 16x16 크기 블록 단위인 매크로 블록(Macro Block)으로 분할하여 분할하였으나, 최근 HEVC 에서는 부호화 기본단위로서 코딩 유닛(Coding Unit: CU)을 이용하고 있다. 상기 코딩 유닛은 시퀀스 파라미터 셋에 저장된 파라미터값이 지정하는 최대 및 최소 크기까지 분할될 수 있다. 예측 부호화를 위한 기본 단위는 예측 유닛(Prediction Unit: PU)로 정의되며, 상기 하나의 코딩 유닛은 복수 개의 상기 예측 유닛으로 분할되어 예측되다. 또한, 각 코딩 유닛의 부호화 및 복호화 순서는 래스터 스캔(Raster scan) 방식을 이용한다.In addition, existing video codecs divided a picture into macro blocks, which are 16x16 sized blocks, and divided them, but recently, HEVC uses a coding unit (CU) as the basic encoding unit. The coding unit can be divided up to the maximum and minimum sizes specified by the parameter values stored in the sequence parameter set. The basic unit for predictive encoding is defined as a prediction unit (PU), and one coding unit is divided into a plurality of prediction units and predicted. In addition, the encoding and decoding order of each coding unit uses the raster scan method.

이와 같이, HEVC 에서는 다양한 크기의 코딩 유닛을 이용함으로써, 영상의 공간 해상도 및 블록 특성을 효과적으로 고려하여 부호화할 수 있다. 일반적으로 영상의 해상도가 작거나 화소값들이 국지적으로 크게 변화하는 경우에는 작은 크기의 코딩 유닛들을 이용하여 화면내 및 화면간 예측을 수행하는 것이 효율적일 수 있다. 이와 같이, 작은 크기의 코딩 유닛을 이용하는 경우, 부호화에 필요한 헤더 비트량은 증가하지만, 상대적으로 예측이 정밀하게 이루어져 양자화 에러와 변환 계수의 부호화에 필요한 비트량이 감소하는 장점이 있다. In this way, HEVC can effectively consider the spatial resolution and block characteristics of an image for encoding by using coding units of various sizes. In general, when the resolution of an image is small or pixel values change locally greatly, it can be efficient to perform intra-screen and inter-screen prediction using coding units of small sizes. In this way, when coding units of small sizes are used, the amount of header bits required for encoding increases, but there is an advantage in that the prediction is relatively precise, so that the quantization error and the amount of bits required for encoding transform coefficients are reduced.

반대로, 영상의 공간 해상도가 크거나 화소값들의 변화가 적은 영역에서는 큰 코딩 유닛을 이용하는 것이 부호화 효율을 높일 수 있다. 이 경우, 큰 코딩 유닛을 이용하여도 작은 코딩 유닛을 이용하여 예측하는 경우에 비하여 예측 오차가 크게 증가하지 않는 경향이 있으므로 이러한 블록들을 부호화하는 경우, 큰 코딩 유닛을 이용하여 전송 비트량을 절약하는 것이 효율적일 수 있다. 그러나, 종래의 다양한 코딩 유닛을 이용하더라도 높은 해상도를 갖는 다양한 이미지를 효율적으로 코딩하기 어려운 단점이 있다.On the other hand, in areas where the spatial resolution of the image is large or where the changes in pixel values are small, using a large coding unit can increase the encoding efficiency. In this case, even if a large coding unit is used, the prediction error tends not to increase significantly compared to when predicting using a small coding unit, so when encoding these blocks, it can be efficient to save the transmission bit amount by using a large coding unit. However, even if various conventional coding units are used, there is a disadvantage in that it is difficult to efficiently code various images with high resolution.

본 발명이 해결하고자 하는 과제는 다양한 모양의 변환 블록을 이용하여 화면내 예측의 코딩 효율을 향상시키는 비디오 신호의 복호화 방법 및 이의 장치를 제공하는 것이다.The problem to be solved by the present invention is to provide a method for decoding a video signal and a device therefor that improves the coding efficiency of intra-screen prediction by using transform blocks of various shapes.

또한, 본 발명이 해결하고자 하는 다른 과제는 고주파 영역보다 저주파 영역의 변환 계수 그룹을 먼저 코딩함으로써, 코딩 효율을 높일 수 있는 비디오 신호의 복호화 방법 및 이의 장치를 제공하는 것이다.In addition, another problem to be solved by the present invention is to provide a method for decoding a video signal and a device therefor, which can increase coding efficiency by coding a group of transform coefficients in a low-frequency region before a high-frequency region.

상기 과제를 해결하기 위한 본 발명의 일 실시예에 따른 비디오 신호의 복호화 방법은, 복수 개의 변환 계수 그룹을 포함하는 변환 블록을 스캔하는 방법에 있어서, 상기 변환 블록에 포함되는 적어도 하나 이상의 변환 영역을 나타내는 변환 영역 정보를 획득하는 단계; 상기 변환 영역 정보에 기초하여 제 1 변환 영역에 포함되는 복수 개의 변환 계수 그룹을 스캔하는 단계; 상기 변환 블록 내의 제 2 변환 영역에 포함되는 복수 개의 변환 계수 그룹을 스캔하는 단계를 포함한다.According to one embodiment of the present invention for solving the above problem, a method for decoding a video signal comprises: a method for scanning a transform block including a plurality of transform coefficient groups, the step of obtaining transform region information indicating at least one transform region included in the transform block; a step of scanning a plurality of transform coefficient groups included in a first transform region based on the transform region information; and a step of scanning a plurality of transform coefficient groups included in a second transform region within the transform block.

상기 복수 개의 변환 계수 그룹은 저주파 영역의 변환 계수 그룹이 고주파 영역의 변환 계수 그룹보다 선행하여 스캔될 수 있다.The above multiple transform coefficient groups can be scanned such that the transform coefficient group of the low frequency region precedes the transform coefficient group of the high frequency region.

일 실시예에서, 상기 변환 영역 정보는 인코더로부터 수신되거나 시퀀스 파라미터 셋(SPS) 및 슬라이스 헤더 중 적어도 하나 이상으로부터 획득될 수 있다. 또한, 상기 변환 영역 정보는 복호화기에서 기결정된 방법으로 획득될 수 있다.In one embodiment, the transform domain information may be received from an encoder or obtained from at least one of a sequence parameter set (SPS) and a slice header. Additionally, the transform domain information may be obtained from a decoder in a predetermined manner.

상기 변환 영역 정보를 획득하는 단계 이전에, 상기 변환 블록이 비정방형 블록인지 판단하는 단계를 더 포함할 수 있다. 상기 판단하는 단계는 상기 변환 블록의 가로의 길이 및 세로의 길이에 기초하여 수행될 수 있다.Before the step of obtaining the above transformation area information, a step of determining whether the transformation block is a non-square block may be further included. The determining step may be performed based on the horizontal length and the vertical length of the transformation block.

상기 다른 과제를 해결하기 위한 본 발명의 일 실시예에 따른 비디오 신호의 복호화 장치는, 변환 블록에 포함되는 적어도 하나 이상의 변환 영역을 나타내는 변환 영역 정보를 획득하는 변환 영역 정보 획득부; 및 상기 변환 영역 정보에 기초하여 상기 적어도 하나 이상의 변환 영역별로 상기 변환 영역에 포함되는 복수 개의 변환 계수 그룹을 차례로 스캔하는 변환 계수 그룹 스캔부를 포함할 수 있다.According to one embodiment of the present invention for solving the above-described other problem, a video signal decoding device may include a transform region information obtaining unit that obtains transform region information indicating at least one transform region included in a transform block; and a transform coefficient group scanning unit that sequentially scans a plurality of transform coefficient groups included in each of the at least one transform region based on the transform region information.

본 발명의 실시예에 따르면, 변환 블록이 비정방형 블록인 경우 상기 변환 블록을 복수 개의 변환 계수 그룹 중 일부를 포함하는 적어도 하나 이상의 변환 영역으로 분할하여 상기 변환 영역 내에 포함된 변환 계수 그룹들을 차례로 스캔함으로써, 화면내 예측의 코딩 효율을 향상시키는 비디오 신호의 복호화 방법 및 이의 장치를 제공하는 것이다.According to an embodiment of the present invention, a method for decoding a video signal and a device therefor are provided, which improve the coding efficiency of intra-screen prediction by dividing the transform block into at least one transform area including some of a plurality of transform coefficient groups when the transform block is a non-square block and sequentially scanning the transform coefficient groups included in the transform area.

또한, 본 발명의 다른 실시예에 따르면, 변환 블록을 적어도 하나 이상의 변환 영역으로 분할하고, 상기 분할된 변환 영역 내에 포함된 변환 계수 그룹들을 차례로 스캔함으로써, 고주파 영역보다 저주파 영역의 변환 계수 그룹을 먼저 코딩함으로써 코딩 효율을 높일 수 있는 비디오 신호의 복호화 방법 및 이의 장치를 제공하는 것이다.In addition, according to another embodiment of the present invention, a method for decoding a video signal and a device thereof are provided, which can increase coding efficiency by dividing a transform block into at least one transform area and sequentially scanning transform coefficient groups included in the divided transform areas, thereby coding transform coefficient groups in a low-frequency area before those in a high-frequency area.

도 1은 본 발명의 일 실시예에 따른 비디오 부호화 장치를 개략적으로 나타낸 블록도이다.
도 2는 본 발명의 일 실시예에 따른 비디오 복호화 장치를 개략적으로 나타낸 블록도이다.
도 3은 종래의 변환 블록의 구조를 설명하기 위한 것이다.
도 4는 종래의 16x16 변환 블록을 구성하는 변환 계수 그룹을 설명하기 위한 것이다.
도 5는 일반적인 방법에 따른 변환 계수 그룹 및 상기 변환 계수 그룹의 변환 스캔 방법을 설명하기 위한 것이다.
도 6a 내지 도 6d는 일반적인 방법에 따른 변환 계수 그룹 및 상기 변환 계수 그룹의 스캔 방법의 종류를 설명하기 위한 것이다.
도 7a 및 도 7b는 본 발명의 일 실시예에 따른 변환 블록에 일반적인 스캔 방법을 적용한 예를 설명하기 위한 것이다.
도 8은 16x8 변환 블록의 변환 계수에 대하여 일반적인 스캔 방법을 적용한 예를 설명하기 위한 것이다.
도 9는 본 발명의 일 실시예에 따른 변환 계수 그룹을 스캔하는 방법을 나타내는 순서도이다.
도 10는 본 발명의 일 실시예에 따른 변환 계수 그룹을 스캔하는 장치를 도시한 것이다.
도 11a 및 도 11b는 본 발명의 일 실시예에 따른 비정방형 변환 블록을 위한 변환 계수 그룹을 스캔하는 방법을 설명하기 위한 것이다.
도 12a 내지 도 13d는 본 발명의 일 실시예에 따른 비정방형 변환 블록을 위한 변환 계수 그룹을 스캔하는 다양한 방법을 설명하기 위한 예이다.
FIG. 1 is a block diagram schematically illustrating a video encoding device according to one embodiment of the present invention.
FIG. 2 is a block diagram schematically illustrating a video decoding device according to one embodiment of the present invention.
Figure 3 is intended to explain the structure of a conventional conversion block.
Figure 4 is for explaining a group of transform coefficients that constitute a conventional 16x16 transform block.
Figure 5 is for explaining a group of conversion coefficients according to a general method and a conversion scan method of the group of conversion coefficients.
FIGS. 6A to 6D are for explaining types of transformation coefficient groups and scanning methods of the transformation coefficient groups according to a general method.
FIGS. 7A and 7B illustrate examples of applying a general scan method to a conversion block according to one embodiment of the present invention.
Figure 8 is an example of applying a general scan method to the transform coefficients of a 16x8 transform block.
FIG. 9 is a flowchart illustrating a method for scanning a group of conversion coefficients according to one embodiment of the present invention.
FIG. 10 illustrates a device for scanning a group of conversion coefficients according to one embodiment of the present invention.
FIGS. 11A and 11B illustrate a method of scanning a transform coefficient group for a non-square transform block according to one embodiment of the present invention.
FIGS. 12A to 13D are examples for explaining various methods of scanning a transform coefficient group for a non-square transform block according to one embodiment of the present invention.

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

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

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

본 명세서에서 사용된 용어는 특정 실시예를 설명하기 위하여 사용되며, 본 발명을 제한하기 위한 것이 아니다. 본 명세서에서 사용된 바와 같이, 단수 형태는 문맥상 다른 경우를 분명히 지적하는 것이 아니라면, 복수의 형태를 포함할 수 있다. 또한, 본 명세서에서 사용되는 경우 "포함한다 (comprise)" 및/또는 "포함하는 (comprising)"은 언급한 형상들, 숫자, 단계, 동작, 부재, 요소 및/또는 이들 그룹의 존재를 특정하는 것이며, 하나 이상의 다른 형상, 숫자, 동작, 부재, 요소 및/또는 그룹들의 존재 또는 부가를 배제하는 것이 아니다.The terminology used herein is used to describe particular embodiments and is not intended to be limiting of the invention. As used herein, the singular forms "a", "an" and "the" include plural forms unless the context clearly dictates otherwise. Also, when used herein, the words "comprise" and/or "comprising" specify the presence of stated features, numbers, steps, operations, elements, elements and/or groups thereof, but do not preclude the presence or addition of one or more other features, numbers, operations, elements, elements and/or groups thereof.

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

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

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

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

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

도 1에 나타난 각 구성요소들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위하여 독립적으로 도시한 것이며, 각 구성요소들이 분리된 하드웨어나 각각 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성요소는 설명의 편의상 각각의 구성요소로 나열하여 포함한 것으로 각 구성요소 중 적어도 두 개의 구성요소가 합쳐져 하나의 구성요소로 이루어지거나, 하나의 구성요소가 복수개의 구성요소로 나뉘어져 기능을 수행할 수 있다. 이러한 각 구성요소가 통합된 실시예 또는 분리된 실시예도 본 발명의 본질적인 측면에서 벗어나지 않는 한 본 발명의 권리범위에 포함될 수 있다.Each component shown in Fig. 1 is independently depicted to indicate different characteristic functions in the video encoding device, and does not mean that each component is composed of separate hardware or a single software configuration unit. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or a single component may be divided into multiple components to perform a function. Embodiments in which each of these components is integrated or separated may also be included in the scope of the present invention as long as they do not deviate from the essential aspects of the present invention.

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

일 실시예에서, 영상 분할부(105)는 하나의 영상에 대하여 복수의 부호화 블록, 예측 블록, 및 변환 블록의 조합으로 분할하고, 소정의 기준(예를 들어, 비용 함수)에 기초하여 하나의 부호화 블록, 예측 블록, 및 변환 블록의 조합을 선택하여 영상을 부호화할 수 있다.In one embodiment, the image segmentation unit (105) can segment an image into a plurality of combinations of encoding blocks, prediction blocks, and transform blocks, and encode the image by selecting a combination of the encoding blocks, prediction blocks, and transform blocks based on a predetermined criterion (e.g., a cost function).

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

예측 블록도 하나의 코딩 블록 내에서 동일한 크기의 적어도 하나의 정방형(square) 또는 비정방형(non-square) 등의 형태를 가지고 분할된 것일 수 있고, 하나의 코딩 블록 내에서 분할된 예측 블록 중 어느 하나의 예측 블록이 다른 하나의 예측 블록과 상이한 형태와 크기를 가지도록 분할될 수도 있다. 일 실시예에서는, 코딩 블록과 예측 블록이 동일할 수 있다. 즉, 코딩 블록과 예측 블록을 구분하지 아니하고, 분할된 코딩 블록을 기준으로 예측이 수행될 수도 있다. A prediction block may also be divided into at least one square or non-square shape of the same size within one coding block, and may be divided such that one prediction block among the divided prediction blocks within one coding block has a different shape and size from another prediction block. In one embodiment, the coding block and the prediction block may be the same. That is, prediction may be performed based on the divided coding block without distinguishing between the coding block and the prediction block.

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

일 실시예에서, 화면간 예측부(110) 및 화면내 예측부(115)는 예측 블록에 대하여 화면간 예측을 수행할 것인지 화면내 예측을 수행할 것인지를 결정하고, 화면간 예측 모드, 모션 벡터, 및 참조 영상과와 같은 상기 예측 방법 각각에 따른 구체적인 정보들을 결정할 수 있다. 이 경우, 예측이 수행되는 처리 단위와 예측 방법, 그리고 세부 처리 단위는 각각 다를 수 있다. 예를 들어, 예측 모드와 예측 방법은 예측 블록에 따라 결정되더라도, 예측의 수행은 변환 블록에 따라 수행될 수 있다.In one embodiment, the inter-screen prediction unit (110) and the intra-screen prediction unit (115) can determine whether to perform inter-screen prediction or intra-screen prediction for a prediction block, and can determine specific information according to each of the above prediction methods, such as an inter-screen prediction mode, a motion vector, and a reference image. In this case, the processing unit where prediction is performed, the prediction method, and the detailed processing unit may be different. For example, even if the prediction mode and the prediction method are determined according to the prediction block, the prediction may be performed according to the transformation block.

화면간 예측부(110) 및 화면내 예측부(115)는, 영상 분할부(105)에서 분할된 영상의 처리 단위에 대하여 예측을 수행하여 예측된 샘플로 구성되는 예측 블록을 생성할 수 있다. 화면간 예측부(110) 및 화면내 예측부(115)에서의 영상 처리 단위는 코딩 블록 단위일 수 있고, 변환 블록 단위일 수도 있으며, 예측 블록 단위일 수도 있다.The inter-screen prediction unit (110) and the intra-screen prediction unit (115) can perform prediction on the processing units of the images divided by the image segmentation unit (105) and generate prediction blocks composed of predicted samples. The image processing units in the inter-screen prediction unit (110) and the intra-screen prediction unit (115) can be coding block units, transformation block units, or prediction block units.

화면간 예측부(110)는 현재 영상의 이전 영상 또는 이후 영상 중 적어도 하나 이상의 영상의 정보를 기초로 예측 블록을 예측할 수 있고, 경우에 따라 현재 영상 내의 코딩이 완료된 일부 영역의 정보를 기초로 예측 블록을 예측할 수 있다. 화면간 예측부(110)는 참조 영상 보간부, 모션 예측부, 및 모션보상부를 포함할 수 있다.The inter-screen prediction unit (110) can predict a prediction block based on information of at least one image among the previous or subsequent images of the current image, and in some cases, can predict a prediction block based on information of a portion of the current image where coding has been completed. The inter-screen prediction unit (110) can include a reference image interpolation unit, a motion prediction unit, and a motion compensation unit.

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

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

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

화면내 예측부(115)는 화면간 예측과 달리 현재 영상 내의 픽셀 정보인 현재 블록 주변의 참조 픽셀 정보들을 기초로 하여 예측 블록을 생성할 수 있다. 상기 예측 블록의 주변 블록들은 화면간 예측을 수행한 블록인 경우, 즉, 참조 픽셀이 화면간 예측을 수행한 픽셀인 경우에는 화면간 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 화면내 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수도 있다. Unlike inter-screen prediction, the intra-screen prediction unit (115) can generate a prediction block based on reference pixel information surrounding the current block, which is pixel information within the current image. If the surrounding blocks of the prediction block are blocks that have performed inter-screen prediction, that is, if the reference pixel is a pixel that has performed inter-screen prediction, the reference pixel included in the block that has performed inter-screen prediction can be replaced with reference pixel information of a surrounding block that has performed intra-screen prediction.

또한, 화면내 예측부(115)는 화면내 예측 모드를 부호화하기 위하여 이웃 블록들로부터 획득한 가장 가능성 있는 화면내 예측 모드(MPM : Most Probable mode)를 이용할 수 있다. 본 발명의 다양한 실시예에 따르면, 상기 가장 가능성 있는 화면내 예측 모드들로 구성되는 가장 가능성 있는 화면내 예측 모드 리스트(MPM List)는 다양한 방법으로 구성될 수 있다. In addition, the intra-screen prediction unit (115) can use the most probable intra-screen prediction mode (MPM: Most Probable mode) obtained from neighboring blocks to encode the intra-screen prediction mode. According to various embodiments of the present invention, the most probable intra-screen prediction mode list (MPM List) composed of the most probable intra-screen prediction modes can be composed in various ways.

화면내 예측부(115)가 화면내 예측을 수행하는 경우에도 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 서로 다를 수 있다. 예를 들어, 예측 모드가 예측 단위(PU)로 정해져서 상기 예측 단위로 예측이 수행될 수도 있고, 예측 모드는 예측 단위로 정해지되 예측의 수행은 변환 단위(TU)로 수행될 수도 있다. 일 실시예에서, 예측 모드가 코딩 블록(CU) 단위로 결정되고, 상기 코딩 블록 단위와 예측 단위가 동일하여 상기 코딩 블록 단위로 예측이 수행될 수도 있다.Even when the on-screen prediction unit (115) performs on-screen prediction, the processing unit where the prediction is performed and the processing unit where the prediction method and specific content are determined may be different from each other. For example, the prediction mode may be determined as a prediction unit (PU), so that the prediction may be performed in the prediction unit, or the prediction mode may be determined as a prediction unit, but the prediction may be performed in a transformation unit (TU). In one embodiment, the prediction mode may be determined as a coding block (CU) unit, and the coding block unit and the prediction unit may be the same, so that the prediction may be performed in the coding block unit.

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

일 실시예에서, 화면내 예측은 참조 픽셀에 필터를 적용한 후 예측 블록을 생성할 수 있다. 이 경우, 상기 참조 픽셀에 필터를 적용할지 여부는 현재 블록의 화면내 예측 모드 및/또는 크기에 따라 결정될 수 있다.In one embodiment, intra-screen prediction may generate a prediction block after applying a filter to a reference pixel. In this case, whether to apply a filter to the reference pixel may be determined based on the intra-screen 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) can be determined from a coding unit (CU) that is no longer divided into various sizes and shapes. For example, in the case of inter-picture prediction, the prediction unit can have a size such as 2N x 2N, 2N x N, N x 2N, or N x N. In the case of intra-picture prediction, the prediction unit can have a size such as 2N x 2N or N x N (N is an integer), but intra-picture prediction can be performed not only in the forward size but also in the non-forward size shape. In this case, the prediction unit with the size of N x N can be set to be applied only in a specific case. In addition to the prediction units with the sizes described above, intra-picture prediction units with sizes such as N x mN, mN x N, 2N x mN, or mN x 2N (m is a fraction or an integer) can be further defined and used.

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

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

변환부(120)에서의 변환 블록은 TU일 수 있고, 상기 변환 블록은 정방형(square) 모양의 블록 및/또는 비정방형(non-square) 모양의 블록을 포함할 수 있고, 상기 변환 블록들은 정방형 쿼드 트리(square quad tree) 구조, 비정방형 쿼드 트리(non-square quad tree) 구조 또는 바이너리 트리(binary tree) 구조를 가질 수 있다. 일 실시예에서, 변환 단위의 크기는 소정의 최대 및 최소 크기의 범위 내에서 정해질 수 있다. 또한, 하나의 변환 블록은 서브 변환 블록으로 더 분할될 수 있으며, 상기 서브 변환 블록들은 정방형(square) 모양의 블록 및/또는 비정방형(non-square) 모양의 블록을 포함할 수 있고, 상기 서브 변환 블록들은 정방형 쿼드 트리(square quad tree) 구조, 비정방형 쿼드 트리(non-square quad tree) 구조 또는 바이너리 트리(binary tree) 구조를 가질 수 있다. 상기와 같은 다양한 크기, 모양, 및 구조를 갖는 변환 블록은 잔차 신호의 지역적 특성을 효과적으로 고려하여 부호화하기 위하여 이용될 수 있다. A transform block in a transform unit (120) may be a TU, and the transform block may include a square block and/or a non-square block, and the transform blocks may have a square quad tree structure, a non-square quad tree structure, or a binary tree structure. In one embodiment, the size of a transform unit may be determined within a range of predetermined maximum and minimum sizes. In addition, one transform block may be further divided into sub-transform blocks, and the sub-transform blocks may include a square block and/or a non-square block, and the sub-transform blocks may have a square quad tree structure, a non-square quad tree structure, or a binary tree structure. Transform blocks having various sizes, shapes, and structures as described above may be used to effectively consider local characteristics of a residual signal and encode it.

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

재정렬부(130)는 양자화부(125)로부터 제공된 양자화 계수를 재정렬할 수 있다. 재정렬부(130)는 상기 양자화 계수를 재정렬함으로써 엔트로피 부호화부(135)에서의 부호화 효율을 향상시킬 수 있다. 재정렬부(130)는 계수 스캐닝(Coefficient Scanning) 방법을 통하여 2차원 블록 형태의 양자화 계수들을 1차원의 벡터 형태로 재정렬할 수 있다. 상기 계수 스캐닝 방법은 변환 단위의 크기 및 화면내 예측 모드에 따라 어떠한 스캔 방법이 사용될지 여부가 결정될 수 있다. 상기 계수 스캐닝 방법은 지그-재그 스캔, 2차원의 블록 형태의 계수를 열 방향으로 스캔하는 수직 스캔, 및 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔을 포함할 수 있다. 일 실시예에서, 재정렬부(130)는 양자화부에서 전송되는 계수들의 확률적인 통계를 기반으로 계수 스캐닝의 순서를 변경함으로써 엔트로피 부호화부(135)에서의 엔트로피 부호화 효율을 높일 수도 있다.The rearrangement unit (130) can rearrange the quantization coefficients provided from the quantization unit (125). The rearrangement unit (130) can improve the encoding efficiency in the entropy encoding unit (135) by rearranging the quantization coefficients. The rearrangement unit (130) can rearrange the quantization coefficients in a two-dimensional block shape into a one-dimensional vector shape through a coefficient scanning method. The coefficient scanning method can determine which scan method is used depending on the size of the transformation unit and the prediction mode within the screen. The coefficient scanning method can include a zig-zag scan, a vertical scan that scans the coefficients in a two-dimensional block shape in the column direction, and a horizontal scan that scans the coefficients in a two-dimensional block shape in the row direction. In one embodiment, the rearrangement unit (130) can also improve the entropy encoding efficiency in the entropy encoding unit (135) by changing the order of coefficient scanning based on probabilistic statistics of the 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) can perform entropy encoding on the quantized coefficients rearranged by the rearrangement unit (130). The entropy encoding can utilize various encoding methods, such as, for example, Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Content-Adaptive Binary Arithmetic Coding).

엔트로피 부호화부(135)는 재정렬부(130) 및 예측부(110, 115)로부터 전달받은 코딩 유닛의 양자화 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 유닛 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 영상 정보, 블록의 보간 정보, 필터링 정보와 같은 다양한 정보를 부호화할 수 있다. 또한, 일 실시예에서 엔트로피 부호화부(135)는 필요한 경우에, 전송하는 파라미터 셋 또는 신택스에 일정한 변경을 가할 수도 있다. The entropy encoding unit (135) can encode various information such as quantization coefficient information of the coding unit received from the rearrangement unit (130) and the prediction unit (110, 115), block type information, prediction mode information, division unit information, prediction unit information, transmission unit information, motion vector information, reference image information, block interpolation information, and filtering information. In addition, in one embodiment, the entropy encoding unit (135) can also make certain changes to the parameter set or syntax to be transmitted, if necessary.

역양자화부(140)는 양자화부(125)에서 양자화된 값들을 역양자화하고, 역변환부(145)는 역양자화부(140)에서 역양자화된 값들을 역변화한다. 역양자화부(140) 및 역변환부(145)에서 생성된 레지듀얼 값은 예측부(110,115)에서 예측된 예측 블록과 합쳐져 복원 블록(Reconstructed Block)이 생성될 수 있다. 상기 생성된 복원 블록들로 구성된 영상은 모션보상 영상 또는 MC 영상(Motion Compensated Picture)일 수 있다.The inverse quantization unit (140) inversely quantizes the values quantized in the quantization unit (125), and the inverse transformation unit (145) inversely transforms the values inversely quantized in the inverse quantization unit (140). The residual values generated in the inverse quantization unit (140) and the inverse transformation unit (145) can be combined with the predicted blocks predicted in the prediction units (110, 115) to generate a reconstructed block. The image composed of the generated reconstructed blocks can 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 above motion compensation image can be input to a filter unit (150). The filter unit (150) can include a deblocking filter unit, an offset correction unit (Sample Adaptive Offset, SAO), and an adaptive loop filter unit (Adaptive Loop Filter, ALF). In summary, the motion compensation image can be input to an offset correction unit to correct an offset after a deblocking filter is applied to the motion compensation image in the deblocking filter unit to reduce or remove blocking artifacts. The image output from the offset correction unit is input to the adaptive loop filter unit to pass through an ALF (Adaptive Loop Filter) filter, and the image passing through the filter can be transmitted to a memory (155).

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

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

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

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

도 2는 본 발명의 일 실시예에 따른 영상 복호화 장치를 개략적으로 나타낸 블록도이다. 도 2 를 참조하면, 영상 복호화 장치(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 화면간 예측부(230), 화면내 예측부(235), 필터부(240), 메모리(245)를 포함한다.FIG. 2 is a block diagram schematically illustrating an image decoding device according to one embodiment of the present invention. Referring to FIG. 2, an image decoding device (200) includes an entropy decoding unit (210), a reordering unit (215), an inverse quantization unit (220), an inverse transformation unit (225), an inter-screen prediction unit (230), an intra-screen prediction 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 an image encoding device, the input bitstream can be decoded by the reverse process of the procedure in which the image information is processed in the encoding device. For example, when a variable length coding (VLC, hereinafter referred to as “VLC”) such as CAVLC is used to perform entropy encoding in the image encoding device, the entropy decoding unit (210) can also perform entropy decoding by implementing the same VLC table as the VLC table used in the encoding device. In addition, when CABAC is used to perform entropy encoding in the encoding device, the entropy decoding unit (210) can perform entropy decoding using CABAC in response thereto.

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

재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 영상 부호화기에서 재정렬한 방법을 기초로 재정렬할 수 있다. 재정렬부(215)는 부호화 장치에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 부호화 장치에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통하여 재정렬을 수행할 수 있다.The reordering unit (215) can reorder the bitstream that has been entropy decoded by the entropy decoding unit (210) based on the method used to reorder the video encoder. The reordering unit (215) can perform reordering by receiving information related to coefficient scanning performed by the encoding device and performing reverse scanning based on the scanning order performed by the encoding device.

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

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

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

화면간 예측부(230)는 영상 부호화기에서 제공된 현재 예측 블록의 화면간 예측에 필요한 정보를 이용하여 현재 예측 블록이 포함된 현재 영상의 이전 영상 또는 이후 영상 중 적어도 하나의 영상에 포함된 정보를 기초로 현재 예측 블록에 대한 화면간 예측을 수행할 수 있다. The inter-screen prediction unit (230) can perform inter-screen prediction for the current prediction block based on information included in at least one image among the previous or subsequent images of the current image including the current prediction block, using information required for inter-screen prediction of the current prediction block provided by the image encoder.

구체적으로 화면간 예측에서는 현재 블록에 대하여, 참조 영상을 선택하고 현재 블록에 대한 참조 블록을 선택하여 현재 블록에 대한 예측 블록을 생성할 수 있다. 이 때, 참조 영상의 정보를 이용하기 위하여, 현재 영상의 주변 블록들의 정보를 이용할 수 있다. 예를 들어, 스킵(skip) 모드, 머지(merge) 모드, 및 AMVP(Advanced Motion Vector Prediction)와 같은 방법을 이용하여 주변 블록의 정보에 기반하여 현재 블록에 대한 예측 블록을 생성할 수 있다.Specifically, in inter-screen prediction, a reference image can be selected for the current block, and a reference block for the current block can be selected to generate a prediction block for the current block. At this time, in order to use the information of the reference image, information of surrounding blocks of the current image can be used. For example, a method such as skip mode, merge mode, and AMVP (Advanced Motion Vector Prediction) can be used to generate a prediction block for the current block based on the information of the surrounding blocks.

AMVP 모드에서는 현재 블록의 시간상 및 공간상 주변 블록을 이용하여 모션 정보 후보자를 선택하여 예측 모션 벡터 리스트를 구성할 수 있다. 또한, 부호화 장치로부터 수신한 현재 블록의 예측 모션 벡터로 선택된 모션 정보 후보자에 대한 인덱스 정보 및 차분 모션 벡터(MVD)를 이용하여 현재 블록의 모션 벡터를 복호화할 수 있다. In AMVP mode, a list of predicted motion vectors can be constructed by selecting motion information candidates using temporally and spatially surrounding blocks of the current block. In addition, the motion vector of the current block can be decoded using index information and differential motion vectors (MVDs) for motion information candidates selected as predicted motion vectors of the current block received from the encoding device.

또한, Merge 모드에서도 현재 블록의 시간상 및 공간상 주변 블록을 이용하여 머지 후보로서 모션 정보 후보자들을 획득할 수 있다. 이들 중 부호화 장치로부터 수신한 현재 블록의 모션 정보 후보자에 대한 인덱스 정보를 이용하여 현재 블록의 모션 벡터를 획득할 수 있다. 상기 모션 벡터 후보자들은 현재 블록의 공간적 이웃 블록으로부터 공간적 모션 벡터 후보자로서 획득되거나 상기 현재 블록의 참조 영상에 포함되는 대응 블록으로부터 시간적 모션 벡터 후보자로서 획득될 수 있다.In addition, in the Merge mode, motion information candidates can be obtained as merge candidates by using temporally and spatially neighboring blocks of the current block. Among these, the motion vector of the current block can be obtained by using index information about the motion information candidates of the current block received from the encoding device. The motion vector candidates can be obtained as spatial motion vector candidates from spatial neighboring blocks of the current block or as temporal motion vector candidates from corresponding blocks included in the reference image of the current block.

예측 블록은 1/2 픽셀 샘플 단위와 1/4 픽셀 샘플 단위와 같이 정수 이하의 샘플 단위로 생성될 수 있다. 이 경우, 모션 벡터 역시 정수 픽셀 이하의 단위로 표현될 수 있다. 예를 들어, 휘도 픽셀에 대해서는 1/4 픽셀 단위로, 색차 픽셀에 대하여는 1/8 픽셀 단위로 표현될 수 있다.Prediction blocks can be generated in units of samples less than an integer, such as 1/2 pixel sample units and 1/4 pixel sample units. In this case, motion vectors can also be expressed in units less than an integer pixel. For example, they can be expressed in units of 1/4 pixel for luminance pixels and in units of 1/8 pixel for chrominance pixels.

현재 블록의 화면간 예측에 필요한 모션 벡터 및 참조 영상 인덱스를 포함하는 모션정보는 부호화 장치로부터 수신한 스킵 플래그, 머지 플래그 등을 확인하고 이에 대응하여 유도될 수 있다.Motion information including motion vectors and reference image indices required for inter-screen prediction of the current block can be derived by checking skip flags, merge flags, etc. received from an encoding device and responding thereto.

화면내 예측부(235)는 현재 영상 내의 픽셀 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 화면내 예측을 수행한 예측 단위인 경우에는 영상 부호화기에서 제공된 예측 단위의 화면내 예측 모드 정보를 기초로 화면내 예측을 수행할 수 있다. 상기 예측 단위의 주변 블록들은 화면간 예측을 수행한 블록인 경우, 즉, 참조 픽셀이 화면간 예측을 수행한 픽셀인 경우에는 화면간 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 화면내 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수도 있다. The intra-screen prediction unit (235) can generate a prediction block based on pixel information in the current image. If the prediction unit is a prediction unit that has performed intra-screen prediction, intra-screen prediction can be performed based on intra-screen prediction mode information of the prediction unit provided by the image encoder. If the surrounding blocks of the above-mentioned prediction unit are blocks that have performed inter-screen prediction, that is, if the reference pixel is a pixel that has performed inter-screen prediction, the reference pixel included in the block that has performed inter-screen prediction can be replaced with reference pixel information of the surrounding blocks that have performed intra-screen prediction.

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

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

이 경우, 예측 블록(PU)은 더 이상 분할되지 않는 코딩 블록(CU)으로부터 다양한 사이즈 및 형태로 결정될 수 있다. 예를 들어, 화면내 예측의 경우 예측 블록은 2N x 2N 또는 N x N (N은 정수)와 같은 크기를 가질 수 있으나, 이와 같은 정방향 크기 뿐만 아니라 비정방향 크기 모양인 N x mN, mN x N, 2N x mN 또는 mN x 2N (m은 분수 또는 정수임)으로도 화면내 예측을 수행할 수 있다. 이 경우, N x N 크기의 예측 단위는 특정한 경우에만 적용하도록 설정할 수도 있다. In this case, the prediction block (PU) can be determined in various sizes and shapes from the coding block (CU) that is no longer divided. For example, in the case of intra-picture prediction, the prediction block can have a size such as 2N x 2N or N x N (N is an integer), but the intra-picture prediction can also be performed with non-normal size shapes such as N x mN, mN x N, 2N x mN or mN x 2N (m is a fraction or an integer). In this case, the prediction unit of size N x N can also be set to be applied only in specific cases.

또한, 변환 블록(TU)도 다양한 사이즈 및 형태로 결정될 수 있다. 예를 들어, 변환 블록은 2N x 2N 또는 N x N (N은 정수)와 같은 크기를 가질 수 있으나, 이와 같은 정방향 크기 뿐만 아니라 비정방향 크기 모양인 N x mN, mN x N, 2N x mN 또는 mN x 2N (m은 분수 또는 정수임)으로도 화면내 예측을 수행할 수 있다. 이 경우, N x N 크기의 예측 단위는 특정한 경우에만 적용하도록 설정할 수도 있다. 일 실시예에서, 변환 블록은 정방형(square) 구조, 비정방형(non-square) 구조, 정방형 쿼드 트리(square quad tree) 구조, 비정방형 쿼드 트리(non-square quad tree) 구조, 또는 바이너리 트리(binary tree) 구조로 갖는 블록들 중 하나일 수 있다. 일 실시예에서, 변환 블록의 크기는 소정의 최대 및 최소 크기의 범위 내에서 정해질 수 있다. 또한, 하나의 변환 블록은 서브 변환 블록으로 분할될 수 있으며, 이 경우 상기 서브 변환 블록들도 정방형(square) 구조, 비정방형(non-square) 구조, 정방형 쿼드 트리(square quad tree) 구조, 비정방형 쿼드 트리(non-square quad tree) 구조, 또는 바이너리 트리(binary tree) 구조로 분할될 수 있다. In addition, the transform block (TU) can also be determined in various sizes and shapes. For example, the transform block can have a size such as 2N x 2N or N x N (N is an integer), but can also perform intra-picture prediction not only in the regular size but also in non-regular size shapes such as N x mN, mN x N, 2N x mN or mN x 2N (m is a fraction or an integer). In this case, the prediction unit of size N x N can be set to be applied only in a specific case. In one embodiment, the transform block can be one of blocks having a square structure, a non-square structure, a square quad tree structure, a non-square quad tree structure, or a binary tree structure. In one embodiment, the size of the transform block can be determined within a range of predetermined maximum and minimum sizes. Additionally, a single transform block may be split into sub-transform blocks, in which case the sub-transform blocks may also be split into a square structure, a non-square structure, a square quad tree structure, a non-square quad tree structure, or a binary tree structure.

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

참조 픽셀 보간부는 예측 단위의 예측 모드가 참조 픽셀을 보간한 샘플값을 기초로 화면내 예측을 수행하는 예측 단위인 경우에, 참조 픽셀을 보간하여 정수값 이하의 픽셀 단위의 참조 픽셀을 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 픽셀을 보간하지 아니하고 예측 블록을 생성하는 예측 모드인 경우, 참조 픽셀은 보간되지 아니할 수 있다. DC 필터부는 현재 블록의 예측 모드가 DC 모드인 경우에 필터링을 통하여 예측 블록을 생성할 수 있다.The reference pixel interpolation unit can generate a reference pixel of a pixel unit less than an integer value by interpolating the reference pixel when the prediction mode of the prediction unit is a prediction unit that performs prediction within the screen based on the sample value interpolated with the reference pixel. 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. The DC filter unit can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.

복원된 블록 및/또는 영상은 필터부(240)로 제공될 수 있다. 필터부(240)는 복원된 블록 및/또는 영상에 디블록킹 필터부, 오프셋 보정부(Sample Adaptive Offset) 및/또는 적응적 루프 필터부를 포함할 수 있다. 상기 디블록킹 필터부는 영상 부호화기로부터 해당 블록 또는 영상에 디블록킹 필터가 적용되었는지 여부를 나타내는 정보 및 디블록킹 필터가 적용된 경우 강한 필터 또는 약한 필터를 적용하였는지를 나타내는 정보를 제공받을 수 있다. 상기 디블록킹 필터부는 영상 부호화기에서 제공된 디블록킹 필터 관련 정보를 제공받고, 영상 복호화기에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다.The restored block and/or image 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 for the restored block and/or image. The deblocking filter unit may receive information indicating whether a deblocking filter has been applied to a corresponding block or image from an image encoder, and information indicating whether a strong filter or a weak filter has been applied if the deblocking filter has been applied. The deblocking filter unit may receive information related to the deblocking filter provided from the image encoder, and perform deblocking filtering on the corresponding block from an image decoder.

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

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

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

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

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

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

도 3 및 도 4는 일반적인 방법에 따른 변환 블록의 구조 및 16x16 변환 블록을 구성하기 위한 변환 계수 그룹을 설명하기 위한 것이다. Figures 3 and 4 are for explaining the structure of a transform block according to a general method and a transform coefficient group for configuring a 16x16 transform block.

도 3을 참조하면, 하나의 코딩 블록(CB)은 복수 개의 변환 블록들(TB0, TB1,...,TB12)을 포함할 수 있다. 상기 복수 개의 변환 블록들은 다양한 모양 및/또는 크기를 갖는 변환 블록들을 포함할 수 있다. 상기 변환 블록은 정방형 모양의 블록 및 비정방형 모양의 블록을 포함할 수 있고, 상기 변환 블록은 정방형 쿼드 트리(square quad tree) 구조, 비정방형 쿼드 트리(non-square quad tree) 구조, 또는 바이너리 트리(binary tree) 구조로 갖는 블록들 중 하나일 수 있다.Referring to FIG. 3, one coding block (CB) may include a plurality of transform blocks (TB0, TB1, ..., TB12). The plurality of transform blocks may include transform blocks having various shapes and/or sizes. The transform block may include a square block and a non-square block, and the transform block may be one of blocks having a square quad tree structure, a non-square quad tree structure, or a binary tree structure.

도 4를 참조하면, 변환 블록(10)은 적어도 하나 이상의 변환 계수 그룹(CG0,CG1,...,CG15)을 포함할 수 있다. 예를 들어, 변환 블록(10)이 16x16 크기의 블록이고, 상기 변환 블록에 포함되는 변환 계수 그룹의 크기는 4x4 일 수 있다. 즉, 16x16 크기의 변환 블록은 16 개의 4x4 크기의 변환 계수 그룹을 포함할 수 있으며, 상기 변환 계수 그룹의 인덱스는 도 4에 나타낸 바와 같은 변환 계수 스캔 순서를 따를 수 있다.Referring to FIG. 4, the transform block (10) may include at least one transform coefficient group (CG0, CG1, ..., CG15). For example, the transform block (10) may be a block having a size of 16x16, and the size of the transform coefficient group included in the transform block may be 4x4. That is, the transform block having a size of 16x16 may include 16 transform coefficient groups having a size of 4x4, and the index of the transform coefficient group may follow the transform coefficient scan order as shown in FIG. 4.

도 5는 일반적인 방법에 따른 변환 계수 그룹 및 상기 변환 계수 그룹의 변환 스캔 방법을 설명하기 위한 것이다.Figure 5 is for explaining a group of conversion coefficients according to a general method and a conversion scan method of the group of conversion coefficients.

도 5를 참조하면, 일반적으로는 변환 블록(20)의 변환 계수 그룹 스캔 순서는 변환 계수의 스캔 순서와 동일할 수 있다. 예를 들면, 변환 블록(20)이 8x8 크기이고, 변환 계수 그룹의 크기가 4x4 크기의 블록이며, 변환 블록(20)에 대하여 업-라이트 다이아고날(Up-right diagonal) 스캔 방법을 사용하는 경우, 변환 계수 그룹은 변환 계수와 동일한 스캔 방법을 적용한다. 도 5에서 나타낸 바와 같이, 변환 블록(20)의 우측 하단의 변환 계수 그룹인 CG3에 포함된 변환 계수 15 부터 0까지 업-라이트 다이아고날 방법으로 변환 계수를 스캔하고, 이후 우측 상단의 변환 계수 그룹인 CG2에 대하여 동일한 방법으로 변환 계수를 스캔한 후, 좌측 하단의 변환 계수 그룹 CG1, 좌측 상단의 변환 계수 그룹 CG0의 순서로 상기 변환 계수 그룹에 포함된 변환 계수들을 동일한 방법으로 스캔할 수 있다. Referring to FIG. 5, in general, the scan order of the transform coefficient group of the transform block (20) may be the same as the scan order of the transform coefficients. For example, if the transform block (20) has a size of 8x8, the size of the transform coefficient group is a block of a size of 4x4, and an up-right diagonal scan method is used for the transform block (20), the transform coefficient group applies the same scan method as the transform coefficients. As shown in FIG. 5, the transform coefficients included in the transform coefficient group CG3 at the lower right of the transform block (20) are scanned from the transform coefficients 15 to 0 using the up-right diagonal method, and then the transform coefficients included in the transform coefficient group CG2 at the upper right are scanned using the same method, and then the transform coefficients included in the transform coefficient group CG1 at the lower left and the transform coefficient group CG0 at the upper left are scanned using the same method.

도 6a 내지 도 6d는 일반적인 방법에 따른 변환 계수 그룹 및 상기 변환 계수 그룹의 스캔 방법의 다양한 예를 설명하기 위한 것이다. 도 6a 내지 도 6c는 화면내 예측 모드에서의 변환 계수 그룹의 스캔 방법을 나타내며, 도 6d는 화면간 예측 모드에서 변환 계수 그룹의 스캔 방법을 나타낸다.Figures 6a to 6d are provided to explain various examples of a transform coefficient group according to a general method and a scanning method of the transform coefficient group. Figures 6a to 6c illustrate a scanning method of a transform coefficient group in an intra-screen prediction mode, and Figure 6d illustrates a scanning method of a transform coefficient group in an inter-screen prediction mode.

도 6a 내지 도 6c를 참조하면, 화면내 예측의 경우 우측 하단으로부터 좌측 상단 순서로 스캔하는 업-라이트 다이아고날 스캔(Up-right diagonal scan, 도 6a), 우측으로부터 좌측으로, 하단으로부터 상단의 방향으로 스캔하는 호리젠탈 스캔(Horizontal scan, 도 6b), 및 하단으로부터 상단으로, 우측으로부터 좌측의 방향으로 스캔하는 버티칼 스캔(Vertical scan, 도 6c) 방법들을 이용할 수 있다. 도 6d를 참조하면, 화면간 예측의 경우는 업-라이트 다이아고날 스캔 방법만을 이용할 수 있다.Referring to FIGS. 6a to 6c, for intra-screen prediction, an up-right diagonal scan (FIG. 6a) that scans from the lower right to the upper left, a horizontal scan (FIG. 6b) that scans from the right to the left and from the bottom to the top, and a vertical scan (FIG. 6c) that scans from the bottom to the top and from the right to the left can be used. Referring to FIG. 6d, for inter-screen prediction, only an up-right diagonal scan method can be used.

일 실시예에서, 화면내 예측에서의 변환 계수 그룹의 스캔 방법은 화면내 예측 모드에 따라 결정될 수 있다. 예를 들어, 화면내 예측 모드가 가로 방향으로의 예측인 화면내 예측 모드 인덱스 6 내지 14인 경우는 버티컬 스캔 방법을 이용하여 변환 계수 그룹이 스캔될 수 있고, 화면내 예측 모드가 세로 방향의 예측인 인덱스 22 내지 30인 경우에는 호리젠탈 스캔 방법이 이용되며, 나머지 화면내 예측 모드에 대해서는 업-라이트 다이아고날 스캔 방법이 이용될 수 있다.In one embodiment, a method of scanning a transform coefficient group in intra-screen prediction may be determined according to an intra-screen prediction mode. For example, when the intra-screen prediction mode is a horizontal prediction mode index of 6 to 14, a vertical scan method may be used to scan a transform coefficient group, when the intra-screen prediction mode is a vertical prediction mode index of 22 to 30, a horizontal scan method may be used, and for the remaining intra-screen prediction modes, an up-right diagonal scan method may be used.

최근까지의 비디오 코딩에서는 변환 블록으로 항상 정방향 변환 블록을 고려하고 있다. 그러므로, 변환 계수 그룹 및 상기 변환 계수 그룹 내의 변환 계수의 스캔 방법으로도 정방향 변환 블록에 적합하도록 설계되어왔다. 그러나, 변환 블록을 비정방형 변환 블록을 이용하는 경우에는 기존의 변환 계수 그룹 및 변환 계수의 스캔 방법을 적용하는 경우 코딩 효율이 저하될 수 있다. 따라서, 이하 도 7a 내지 도 12b에서는 본 발명의 일 실시예에 따른 코딩 효율을 개선할 수 있는 변환 계수 그룹을 스캔하는 방법에 대하여 설명하기로 한다.Until recently, video coding has always considered a forward transform block as a transform block. Therefore, a transform coefficient group and a scanning method of transform coefficients within the transform coefficient group have also been designed to be suitable for a forward transform block. However, when a non-square transform block is used as a transform block, the coding efficiency may be reduced when applying the existing transform coefficient group and the scanning method of the transform coefficients. Therefore, a method of scanning a transform coefficient group that can improve coding efficiency according to an embodiment of the present invention will be described below with reference to FIGS. 7A to 12B.

도 7a 및 도 7b는 본 발명의 일 실시예에 따른 변환 블록에 일반적인 스캔 방법을 적용한 예를 설명하기 위한 것이다.FIGS. 7A and 7B illustrate examples of applying a general scan method to a conversion block according to one embodiment of the present invention.

도 7a를 참조하면, 현재 변환 블록 TB1 (30a)이 비정방형 블록이고, 8x16 의 크기를 갖는 경우에 변환 계수 그룹 및 변환 계수를 스캔하는 방법으로 기존의 방법을 적용하면 3 가지 스캔 방법 중 선택될 수 있다. 예를 들면, 현재 변환 블록(30a)에 기존의 3 가지 스캔 방법을 적용하여 변환 계수 그룹을 스캔하는 도시한 예 중에 좌측으로부터 업-라이트 스캔 방법, 버티컬 스캔 방법, 및 호리젠탈 스캔 방법을 적용하여 변환 계수 그룹을 스캔할 수 있다. Referring to FIG. 7a, if the current transform block TB1 (30a) is a non-square block and has a size of 8x16, when applying the existing method as a method for scanning the transform coefficient group and the transform coefficients, three scan methods can be selected. For example, among the illustrated examples of scanning the transform coefficient group by applying the existing three scan methods to the current transform block (30a), the transform coefficient group can be scanned by applying the up-right scan method, the vertical scan method, and the horizontal scan method from the left.

도 7b를 참조하면, 현재 변환 블록 TB2 (30b)가 비정방형 블록이고, 16x8 의 크기를 갖는 경우에 변환 계수 그룹 및 변환 계수를 스캔하는 방법으로 기존의 방법을 적용하면 3 가지 스캔 방법 중 선택될 수 있다. 예를 들면, 현재 변환 블록(30b)에 기존의 3 가지 스캔 방법을 적용하여 변환 계수 그룹을 스캔하는 도시한 예 중에 좌측으로부터 업-라이트 스캔 방법, 버티컬 스캔 방법, 및 호리젠탈 스캔 방법을 적용하여 변환 계수 그룹을 스캔할 수 있다.Referring to FIG. 7b, if the current transform block TB2 (30b) is a non-square block and has a size of 16x8, when applying the existing method as a method for scanning the transform coefficient group and the transform coefficients, three scan methods can be selected. For example, among the examples illustrating scanning the transform coefficient group by applying the existing three scan methods to the current transform block (30b), the transform coefficient group can be scanned by applying the up-right scan method, the vertical scan method, and the horizontal scan method from the left.

도 8은 16x8 변환 블록의 변환 계수에 대하여 일반적인 스캔 방법을 적용한 예를 설명하기 위한 것이다.Figure 8 is an example of applying a general scan method to the transform coefficients of a 16x8 transform block.

도 8을 참조하면, 현재 변환 블록 TB2(30b)에 호리젠탈 스캔 방법을 적용하는 경우 변환 계수 및 변환 계수 그룹은 동일한 스캔 방법인 호리젠탈 방식이 적용될 수 있다. 예를 들면, 복수 개의 변환 계수를 포함하는 복수 개의 변환 계수 그룹은 각 변환 계수 그룹 단위로 스캔될 수 있다. 변환 블록 중 가장 우측 하단에 있는 변환 계수 그룹에 포함된 변환 계수들을 호리젠탈 방식으로 스캔한 후, 상기 가장 우측 하단에 있는 변환 계수 그룹의 좌측에 위치하는 변환 계수 그룹에 포함된 변환 계수들을 호리젠탈 방식으로 스캔할 수 있다. 이후 동일한 방식으로 상기 변환 계수 그룹 단위에서도 호리젠탈 방식으로 스캔될 수 있다.Referring to Fig. 8, when applying the horizontal scan method to the current transform block TB2 (30b), the transform coefficients and the transform coefficient groups can be applied with the same scan method, the horizontal method. For example, the multiple transform coefficient groups including the multiple transform coefficients can be scanned for each transform coefficient group unit. After the transform coefficients included in the transform coefficient group located at the rightmost bottom among the transform blocks are scanned in the horizontal method, the transform coefficients included in the transform coefficient group located to the left of the rightmost bottom transform coefficient group can be scanned in the horizontal method. Afterwards, the transform coefficient group unit can also be scanned in the horizontal method in the same manner.

이러한 변환 과정을 통하여 레지듀얼 신호의 대부분의 에너지는 좌측 상단의 DC 영역으로 모일 수 있다. 그러므로, 엔트로피 코딩의 효율을 위하여는 저주파 영역의 변환 계수 및/또는 변환 계수 그룹들이 작은 값의 스캔 순서를 나타내는 인덱스를 갖는 것이 효율적일 수 있다. 그러나, 비정방형 변환 블록에 대하여 도 7a 내지 도 8에서 나타난 바와 같은 일반적인 변환 계수 그룹의 스캔 순서를 적용하는 경우 저주파 영역의 변환 계수 그룹 이전에 고주파 영역의 변환 계수 그룹이 먼저 코딩될 수 있으므로 코딩 효율이 떨어질 수 있다.Through this transformation process, most of the energy of the residual signal can be gathered in the DC region at the upper left. Therefore, for the efficiency of entropy coding, it may be efficient for the transform coefficients and/or transform coefficient groups of the low-frequency region to have indices indicating a scan order of small values. However, when applying the scan order of the general transform coefficient groups as shown in FIGS. 7a to 8 to the non-square transform block, the transform coefficient groups of the high-frequency region may be coded before the transform coefficient groups of the low-frequency region, which may result in a decrease in coding efficiency.

그러므로, 본 발명의 일 실시예에 따른 변환 스캔 계수의 스캔 방법은 변환 블록을 복수 개의 변환 스캔 계수를 포함하는 상위 영역인 변환 영역으로 분할하고, 상기 분할된 변환 영역별로 변환 스캔 계수를 스캔하는 방법을 포함할 수 있다. Therefore, a method for scanning transform scan coefficients according to one embodiment of the present invention may include a method of dividing a transform block into a transform region, which is an upper region including a plurality of transform scan coefficients, and scanning the transform scan coefficients for each of the divided transform regions.

도 9 및 도 10은 본 발명의 일 실시예에 따른 변환 계수 그룹을 스캔하는 방법을 나타내는 순서도 및 장치를 나타내는 것이다.FIGS. 9 and 10 are flowcharts and devices illustrating a method for scanning a group of conversion coefficients according to one embodiment of the present invention.

도 9 및 도 10을 참조하면, 변환부는 변환 계수 그룹을 스캔하기 위하여 변환 영역 정보 획득부(40)에서 변환 블록에 포함되는 복수 개의 변환 계수 그룹을 적어도 하나 이상의 구획으로 분할하는 변환 영역을 나타내는 변환 영역 정보를 획득할 수 있다(S10). 상기 변환 블록은 다양한 크기 및/또는 모양을 가질 수 있다. 일 실시예에서, 상기 변환 블록은 비정방형 모양의 변환 블록일 수 있다. Referring to FIGS. 9 and 10, the transform unit may obtain transform area information indicating a transform area that divides a plurality of transform coefficient groups included in a transform block into at least one or more sections in order to scan the transform coefficient group (S10). The transform block may have various sizes and/or shapes. In one embodiment, the transform block may be a non-square-shaped transform block.

상기 변환 영역 정보는 상기 변환 블록을 적어도 하나 이상의 영역으로 분할할 수 있으며, 각 변환 영역은 복수 개의 변환 계수 그룹을 포함할 수 있다. 상기 변환 계수 그룹은 복수 개의 변환 계수들을 포함하는 것은 물론이다. 또한, 상기 변환 영역 정보는 인코더로부터 수신되는 정보일 수 있다. 예를 들면, 상기 변환 영역 정보는 시퀀스 파라미터 셋(SPS) 및 슬라이스 헤더 중 적어도 하나 이상으로부터 획득될 수 있으며, 본 발명은 이에 한정되지는 아니하고 어떠한 형태로 어떠한 레벨의 신택스에 포함되어 있는지를 한정하지 아니하고 인코더로부터 수신된 정보이면 무방하다The above transform domain information can divide the transform block into at least one region, and each transform domain can include a plurality of transform coefficient groups. It goes without saying that the transform coefficient group includes a plurality of transform coefficients. In addition, the transform domain information can be information received from an encoder. For example, the transform domain information can be obtained from at least one of a sequence parameter set (SPS) and a slice header, and the present invention is not limited thereto, and the present invention does not limit the form and level of syntax included in it, and any information received from an encoder may be sufficient.

일 실시예에서, 상기 변환 영역 정보는 복호화 장치에서 기결정된 방법으로 획득될 수 있다. 예를 들면, 상기 변환 영역 정보는 변환 블록의 가로 길이 및 세로 길이를 바탕으로 변환 영역의 가로 길이 및 세로 길이를 산출하여 변환 영역의 크기 및 개수를 결정함으로써 획득될 수 있다. 또는, 상기 변환 영역 정보는 변환 블록의 가로 및 세로 길이 중 작은 길이를 변환 계수 그룹의 블록 크기로 나눔으로써 변환 영역의 크기 및 개수를 결정할 수도 있다. 이러한 상기 변환 영역 정보가 나타내는 변환 영역의 가로 및 세로의 길이, 모양, 및 개수는 복호화 장치에서 결정된 방법을 따를 수 있으며, 상술한 예에 한정되지 아니한다. In one embodiment, the transform region information can be obtained by a method determined by the decoding device. For example, the transform region information can be obtained by calculating the horizontal and vertical lengths of the transform region based on the horizontal and vertical lengths of the transform block, thereby determining the size and number of the transform regions. Alternatively, the transform region information can also determine the size and number of the transform regions by dividing the smaller length among the horizontal and vertical lengths of the transform block by the block size of the transform coefficient group. The horizontal and vertical lengths, shape, and number of the transform regions indicated by the transform region information can follow a method determined by the decoding device, and are not limited to the examples described above.

이후, 변환 계수 그룹 스캔부(50)는 상기 변환 영역 정보에 기초하여 분할된 적어도 하나 이상의 변환 영역 내의 복수 개의 변환 계수 그룹을 스캔할 수 있다. 변환 계수 그룹 스캔부(50)는 분할된 변환 영역들의 변환 계수 그룹들을 스캔하기 위하여, 제 1 변환 영역 스캔부(51) 및 제 2 변환 영역 스캔부(52)를 포함할 수 있다. 상기 변환 영역 스캔부는 제 1 변환 영역 스캔부(51) 및 제 2 변환 영역 스캔부(52)에 한정되지 아니하며, 상기 변환 블록이 분할된 변환 영역의 개수에 대응하여 포함될 수 있다. Thereafter, the transform coefficient group scan unit (50) can scan multiple transform coefficient groups within at least one transform area divided based on the transform area information. The transform coefficient group scan unit (50) can include a first transform area scan unit (51) and a second transform area scan unit (52) to scan the transform coefficient groups of the divided transform areas. The transform area scan unit is not limited to the first transform area scan unit (51) and the second transform area scan unit (52), and the number of transform blocks can be included corresponding to the number of divided transform areas.

먼저, 제 1 변환 영역 스캔부(51)는 상기 변환 영역 정보에 기초하여 분할된 복수 개의 변환 영역 중 제 1 변환 영역에 포함되는 복수 개의 변환 계수 그룹들을 스캔할 수 있다(S20). 이후, 제 2 변환 영역 스캔부(52)가 제 2 변환 영역에 포함되는 복수 개의 변환 계수 그룹들을 스캔할 수 있다. 만일 변환 영역 스캔부가 세 개 이상 포함되는 경우에는, 차례로 변환 영역에 포함되는 변환 계수 그룹들을 스캔한다 할 것이다.First, the first transformation area scan unit (51) can scan a plurality of transformation coefficient groups included in the first transformation area among the plurality of transformation areas divided based on the transformation area information (S20). Thereafter, the second transformation area scan unit (52) can scan a plurality of transformation coefficient groups included in the second transformation area. If three or more transformation area scan units are included, the transformation coefficient groups included in the transformation areas will be scanned in sequence.

일 실시예에서, 제 1 변환 영역 스캔부(51)는 제 2 변환 영역 스캔부(52)보다 저주파 영역의 변환 계수 그룹들을 포함할 수 있다. 이와 같이, 본 발명의 변환 계수 그룹들의 스캔 방법은 저주파 영역의 변환 계수 그룹들이 고주파 영역의 변환 계수 그룹들보다 먼저 스캔되도록 스캔 오더가 결정됨으로써, 고주파 영역의 변환 계수 그룹이 먼저 코딩되어 전송되고, 저주파 영역의 변환 계수 그룹들이 큰 값의 스캔 오더 인덱스를 갖아 코딩 효율을 저해시키는 단점을 해소할 수 있게 된다.In one embodiment, the first transform domain scan unit (51) may include more transform coefficient groups in the low frequency domain than the second transform domain scan unit (52). In this way, the method for scanning transform coefficient groups of the present invention determines the scan order so that the transform coefficient groups in the low frequency domain are scanned before the transform coefficient groups in the high frequency domain, thereby resolving the disadvantage that the transform coefficient groups in the high frequency domain are coded and transmitted first and the transform coefficient groups in the low frequency domain have a large scan order index, thereby lowering the coding efficiency.

또한, 일 실시예에서는 변환 영역 정보를 획득하기 이전에 상기 변환 블록이 비정방형 블록인지 여부를 먼저 판단할 수 있다. 고주파 영역에 해당하는 변환 계수 그룹이 저주파 영역에 해당하는 변환 계수 그룹이 비하여 먼저 스캔되어 코딩 효율을 저해시키는 것은, 변환 블록이 비정방형 블록인 경우 빈번하게 발생할 수 있다. 그러므로, 변환 영역 정보를 획득하기 이전에 현재 변환 블록이 비정방형 블록인지 여부를 먼저 판단할 수 있다. In addition, in one embodiment, it is possible to first determine whether the transform block is a non-square block before acquiring transform domain information. When the transform block is a non-square block, it is possible to frequently cause the transform coefficient group corresponding to the high-frequency region to be scanned earlier than the transform coefficient group corresponding to the low-frequency region, thereby lowering the coding efficiency. Therefore, it is possible to first determine whether the current transform block is a non-square block before acquiring transform domain information.

일 실시예에서, 상기 변환 블록이 비정방형 블록인지 판단하기 위하여 다양한 방법을 채택할 수 있다. 예를 들면, 상기 변환 블록의 가로 길이 및 세로 길이를 비교함으로써 상기 변환 블록이 비정방형 블록인지 판단할 수 있다. 또는, 상기 변환 블록의 크기 및 모양에 대한 정보를 부호화 장치로부터 수신하거나 복호화 장치치에서 기획득된 상기 변환 블록의 분할 정보, 방향 정보, α, β및 픽셀 정보 중 어느 하나 이상을 기초로 하여 판단될 수 있다. In one embodiment, various methods may be adopted to determine whether the transform block is a non-square block. For example, it may be determined whether the transform block is a non-square block by comparing the horizontal and vertical lengths of the transform block. Alternatively, information about the size and shape of the transform block may be received from an encoding device or may be determined based on one or more of the segmentation information, direction information, α, β, and pixel information of the transform block acquired by a decoding device.

또한, 상기 변환 블록의 타입을 나타내는 변환 블록 타입 정보에 기초하여 판단될 수도 있다. 상기 변환 블록 타입 정보는 부호화 장치로부터 수신될 수도 있으나, 복호화 장치에서 상기 변환 블록의 분할 정보, 방향 정보, 픽셀 정보, 및 가로 길이와 세로 길이 정보 중 어느 하나 이상을 기초로 하여 산출될 수도 있다. 이와 같은 방법으로 상기 변환 블록이 비정방형 블록으로 판단되는 경우, 도 9 및 도 10을 참조하여 상술한 방법으로 변환 블록의 변환 영역별로 상기 변환 영역에 포함된 변환 계수 그룹을 스캔할 수 있다. In addition, it may be determined based on the transform block type information indicating the type of the transform block. The transform block type information may be received from the encoding device, but may also be calculated by the decoding device based on one or more of the segmentation information, direction information, pixel information, and horizontal and vertical length information of the transform block. In this way, when the transform block is determined to be a non-square block, the transform coefficient group included in the transform area of each transform area of the transform block can be scanned by the method described above with reference to FIGS. 9 and 10.

도 11a 및 도 11b는 본 발명의 일 실시예에 따른 비정방형 변환 블록을 위한 변환 계수 그룹을 스캔하는 방법을 설명하기 위한 것이다.FIGS. 11A and 11B illustrate a method of scanning a transform coefficient group for a non-square transform block according to one embodiment of the present invention.

도 11a를 참조하면, 본 발명의 비정방형 변환 블록(60a, 60b)은 가로 길이(A) 및 세로 길이(B)를 가질 수 있다. AxB 크기를 갖는 비정방형 변환 블록(60a, 60b)은 복수 개의 변환 계수 그룹을 포함하며, αxβ 크기의 변환 블록 영역으로 분할될 수 있다. 상기 α 및 β는 변환 블록에 포함되는 변환 계수 그룹의 수를 나타낸다. 즉, αxβ 크기의 영역은 가로 방향에 대하여 α 개의 변환 계수 그룹이 있고, 세로 방향에 대하여 β 개의 변환 계수 그룹이 있는 영역을 나타낼 수 있다. 일 실시예에서, 변환 영역 정보는 상기 α 및 β에 대한 정보를 포함할 수 있다. 또한, 변환 영역 정보는 변환 영역의 가로 및 세로 크기를 나타내는 정보를 포함할 수 있다. 예를 들면, 비정방형 변환 블록(60a)이 8x16 의 크기를 갖는 경우, 변환 영역의 구조를 나타내는 αxβ 는 2x2 이고, 변환 블록(60a)을 분할하는 변환 영역의 크기는 8x8 일 수 있다. Referring to FIG. 11A, the non-square transform block (60a, 60b) of the present invention may have a horizontal length (A) and a vertical length (B). The non-square transform block (60a, 60b) having a size of AxB includes a plurality of transform coefficient groups and may be divided into transform block regions of a size of αxβ. The α and β represent the number of transform coefficient groups included in the transform block. That is, the region of the size of αxβ may represent a region having α transform coefficient groups in the horizontal direction and β transform coefficient groups in the vertical direction. In one embodiment, the transform region information may include information about the α and β. In addition, the transform region information may include information indicating the horizontal and vertical sizes of the transform region. For example, if a non-square transform block (60a) has a size of 8x16, αxβ representing the structure of the transform area is 2x2, and the size of the transform area dividing the transform block (60a) can be 8x8.

이러한 변환 영역 정보는 상위 파라미터나 이전의 복호화 과정에서 산출될 수 있고, 간단하게는, 비정방형 변환 블록의 가로 및 세로 길이 중 작은 길이를 변환 계수 블록의 크기로 나눈 수로부터 산출될 수 있다. 그러나, 본 발명에서 변환 영역 정보를 획득하는 방법은 이에 제한되지 아니한다.Such transform domain information can be derived from upper parameters or a previous decoding process, and simply, can be derived from a number obtained by dividing the smaller of the width and height of a non-square transform block by the size of the transform coefficient block. However, the method of obtaining transform domain information in the present invention is not limited thereto.

도 11b를 참조하면, 복수 개의 변환 영역으로 분할된 변환 블록(60a, 60b)은, 각 변환 영역마다 상위 파라미터 또는 상위 과정으로부터 결정된 스캔 방법을 적용하여 변환 계수 그룹을 스캔할 수 있다. 예를 들어, 16x8의 크기를 갖는 변환 블록(60b)가 8x8 의 크기를 갖는 변환 영역(αxβ = 2x2)으로 분할되고, 업-라이트 스캔 방법으로 변환 영역 및 변환 계수 그룹이 스캔되는 경우, CG Region 1 내의 변환 계수 그룹이 먼저 업-라이트 스캔 방법으로 스캔되고, 이후 CG Region 2 내의 변환 계수 그룹이 업-라이트 스캔 방법으로 스캔될 수 있다.Referring to FIG. 11b, a transform block (60a, 60b) divided into a plurality of transform regions can scan a transform coefficient group by applying a scan method determined from an upper parameter or an upper process to each transform region. For example, if a transform block (60b) having a size of 16x8 is divided into transform regions (αxβ = 2x2) having a size of 8x8, and the transform region and the transform coefficient group are scanned by the up-right scan method, the transform coefficient group in CG Region 1 can be scanned first by the up-right scan method, and then the transform coefficient group in CG Region 2 can be scanned by the up-right scan method.

도 12a 내지 도 13d는 본 발명의 일 실시예에 따른 비정방형 변환 블록을 위한 변환 계수 그룹을 스캔하는 다양한 방법을 설명하기 위한 것이다.FIGS. 12A to 13D illustrate various methods of scanning a transform coefficient group for a non-square transform block according to one embodiment of the present invention.

도 12a 내지 도 12d를 참조하면, 변환 블록(70)이 변환 블록의 작은 변 길이를 갖는 변환 영역으로 분할된 경우의 변환 계수 그룹은 다양한 방법으로 스캔될 수 있다. 도 12a에서 나타난 바와 같이, 변환 블록(70)이 16x32 의 크기를 갖는 경우, 각각의 변환 영역 CG Region 0, CG Region 1 (71, 72)은 16x16 의 크기를 가질 수 있다. 여기서 가로 및 세로 방향으로의 변환 영역의 크기를 나타내는 α 및 β는 α=β=4 일 수 있다. Referring to FIGS. 12A to 12D, a transform coefficient group when a transform block (70) is divided into transform regions having small side lengths of the transform block can be scanned in various ways. As shown in FIG. 12A, when the transform block (70) has a size of 16x32, each of the transform regions CG Region 0 and CG Region 1 (71, 72) can have a size of 16x16. Here, α and β representing the sizes of the transform regions in the horizontal and vertical directions can be α=β=4.

일 실시예에서, 변환 블록(70)은 변환 영역별로 각각의 변환 영역에 포함된 변환 계수 그룹을 차례로 스캔할 수 있다. 예를 들면, 도 12b에 나타난 바와 같이, 변환 블록(70)이 업-라이트 스캔 방법으로 스캔되는 경우에는 하단의 제 2 변환 영역(CG Region 1)에 포함된 제 32 변환 계수 그룹(CG 31)으로부터 제 17 변환 계수 그룹(CG 16)이 차례로 스캔되고, 이후 제 1 변환 영역(CG Region 0)에 포함된 제 16 변환 계수 그룹(CG 15)으로부터 제 1 변환 계수 그룹(CG 0)이 차례로 스캔될 수 있다. 또한, 변환 블록이 두 개의 변환 영역으로 분할되고, 버티컬 스캔 방법 및 호리젠탈 스캔 방법을 상기 변환 블록에 적용하는 경우는 도 12c 및 도 12d에 나타난 것과 동일하다.In one embodiment, the transform block (70) may sequentially scan the transform coefficient groups included in each transform region for each transform region. For example, as shown in FIG. 12b, when the transform block (70) is scanned by the up-right scan method, the 17th transform coefficient group (CG 16) may be sequentially scanned from the 32nd transform coefficient group (CG 31) included in the second transform region (CG Region 1) at the bottom, and then the 1st transform coefficient group (CG 0) may be sequentially scanned from the 16th transform coefficient group (CG 15) included in the first transform region (CG Region 0). In addition, when the transform block is divided into two transform regions and the vertical scan method and the horizontal scan method are applied to the transform block, the case is the same as shown in FIGS. 12c and 12d.

도 13a 내지 도 13d를 참조하면, 변환 블록(80)이 변환 블록(80)의 작은 변 길이를 갖는 변환 영역으로 분할된 경우의 변환 계수 그룹은 다양한 방법으로 스캔될 수 있다. 도 13a에서 나타난 바와 같이, 변환 블록(80)이 32x16 의 크기를 갖는 경우, 각각의 변환 영역 CG Region 0, CG Region 1 (81, 82)은 16x16 의 크기를 가질 수 있다. 여기서 가로 및 세로 방향으로의 변환 영역의 개수를 나타내는 α 및 β는 α=β=4 일 수 있다. Referring to FIGS. 13A to 13D, a group of transform coefficients when a transform block (80) is divided into transform regions having small side lengths of the transform block (80) can be scanned in various ways. As shown in FIG. 13A, when the transform block (80) has a size of 32x16, each of the transform regions CG Region 0 and CG Region 1 (81, 82) can have a size of 16x16. Here, α and β representing the number of transform regions in the horizontal and vertical directions can be α=β=4.

일 실시예에서, 변환 블록(80)은 변환 영역별로 각각의 변환 영역에 포함된 변환 계수 그룹을 차례로 스캔할 수 있다. 예를 들면, 도 13b에 나타난 바와 같이, 변환 블록(80)이 업-라이트 스캔 방법으로 스캔되는 경우에는 우측의 제 2 변환 영역(82)에 포함된 제 32 변환 계수 그룹(CG 31)으로부터 제 17 변환 계수 그룹(CG 16)이 업라이트 방식에 따라 차례로 스캔되고, 이후 제 1 변환 영역(CG Region 0)에 포함된 제 16 변환 계수 그룹(CG 15)으로부터 제 1 변환 계수 그룹(CG 0)이 차례로 스캔될 수 있다. 또한, 도 13c에 나타난 바와 같이, 변환 블록(80)이 버티컬 스캔 방법으로 스캔되는 경우에는 우측의 제 2 변환 영역(82)에 포함된 제 32 변환 계수 그룹(CG 31)으로부터 제 17 변환 계수 그룹(CG 16)이 버티컬 방식에 따라 차례로 스캔되고, 이후 제 1 변환 영역(CG Region 0)에 포함된 제 16 변환 계수 그룹(CG 15)으로부터 제 1 변환 계수 그룹(CG 0)이 차례로 스캔될 수 있다. 변환 블록이 두 개의 변환 영역으로 분할되고, 호리젠탈 스캔 방법을 상기 변환 블록에 적용하는 경우는 도 13d에 나타난 것과 동일하다. In one embodiment, the transform block (80) may sequentially scan the transform coefficient groups included in each transform region for each transform region. For example, as shown in FIG. 13b, when the transform block (80) is scanned in an up-right scan manner, the 17th transform coefficient group (CG 16) from the 32nd transform coefficient group (CG 31) included in the second transform region (82) on the right may be sequentially scanned in an up-right manner, and then the 1st transform coefficient group (CG 0) from the 16th transform coefficient group (CG 15) included in the first transform region (CG Region 0) may be sequentially scanned. In addition, as shown in FIG. 13c, when the transform block (80) is scanned in the vertical scan method, the 17th transform coefficient group (CG 16) from the 32nd transform coefficient group (CG 31) included in the second transform region (82) on the right may be scanned in sequence in the vertical manner, and then the 1st transform coefficient group (CG 0) may be scanned in sequence from the 16th transform coefficient group (CG 15) included in the first transform region (CG Region 0). The case where the transform block is divided into two transform regions and the horizontal scan method is applied to the transform block is the same as shown in FIG. 13d.

이와 같이 변환 블록을 복수 개의 변환 계수 그룹을 포함하는 적어도 하나 이상의 변환 영역으로 분할하고 상기 변환 영역별로 스캔하는 방법에 따르면, 저주파 영역의 변환 계수 그룹을 고주파 영역의 변환 계수 그룹보다 먼저 스캔하여 전송하게 되므로 코딩 효율을 높일 수 있다.According to the method of dividing a transform block into at least one transform area including a plurality of transform coefficient groups and scanning each transform area, the transform coefficient group of a low-frequency area is scanned and transmitted before the transform coefficient group of a high-frequency area, so that coding efficiency can be increased.

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

Claims (6)

변환 블록에 포함되며, 가로 방향 또는 세로 방향으로 적어도 2 개 이상으로 상기 변환 블록이 분할되는 변환 영역들을 나타내는 변환 영역 정보를 포함하는 비트스트림을 수신하는 단계;
상기 변환 영역 정보를 이용하여 상기 변환 블록을 상기 적어도 2개 이상의 변환 영역들로 분할하는 단계;
상기 변환 영역 정보로부터 상기 분할된 변환 영역들 각각의 스캔 방법을 획득하는 단계;
상기 스캔 방법을 이용하여 저주파 영역의 제 1 변환 영역에 포함된 제 1 복수 개의 변환 계수 그룹들을 스캔함으로써 변환 계수들을 획득하는 단계; 및
상기 스캔 방법을 이용하여 고주파 영역의 제 2 변환 영역에 포함된 제 2 복수 개의 변환 계수 그룹들을 스캔함으로써 변환 계수들을 획득하는 단계를 포함하며,
상기 제 1 복수의 변환 계수 그룹들이 상기 제 2 복수의 변환 계수 그룹들보다 먼저 스캔되고,
상기 제 1 복수의 변환 계수 그룹들을 스캔하기 위한 제 1 스캔 방법과 상기 제 2 복수의 변환 계수 그룹들을 스캔하기 위한 제 2 스캔 방법은 서로 다르고,
상기 변환 계수 그룹은 복수의 변환 계수들을 포함하며,
상기 변환 영역 정보는 시퀀스 파라미터 셋(SPS) 및 슬라이스 헤더 중 적어도 하나 이상으로부터 결정되며, 인코더로부터 수신되는 비디오 신호의 복호화 방법.
A step of receiving a bitstream including transform area information included in a transform block and indicating transform areas into which the transform block is divided in at least two or more horizontal or vertical directions;
A step of dividing the transformation block into at least two transformation areas using the transformation area information;
A step of obtaining a scanning method for each of the divided transformation areas from the transformation area information;
A step of obtaining transform coefficients by scanning a first plurality of transform coefficient groups included in a first transform area of a low-frequency area using the above scanning method; and
A step of obtaining transform coefficients by scanning a second plurality of transform coefficient groups included in a second transform area of a high-frequency area using the above scanning method,
The first plurality of transform coefficient groups are scanned before the second plurality of transform coefficient groups,
The first scanning method for scanning the first plurality of transformation coefficient groups and the second scanning method for scanning the second plurality of transformation coefficient groups are different from each other,
The above transformation coefficient group includes multiple transformation coefficients,
A method for decoding a video signal received from an encoder, wherein the above transformation area information is determined from at least one of a sequence parameter set (SPS) and a slice header.
제 1 항에 있어서,
상기 변환 블록의 타입을 결정하는 단계를 더 포함하는 것을 특징으로 하는 비디오 신호의 복호화 방법.
In paragraph 1,
A method for decoding a video signal, characterized in that it further comprises a step of determining the type of the above transformation block.
제 2 항에 있어서,
상기 변환 블록의 타입을 결정하는 단계는 상기 변환 블록의 가로 길이 및 세로 길이를 기초로 하여 수행되는 것을 특징으로 하는 비디오 신호의 복호화 방법.
In the second paragraph,
A method for decoding a video signal, characterized in that the step of determining the type of the above transformation block is performed based on the horizontal length and vertical length of the above transformation block.
변환 블록에 포함되며, 가로 방향 또는 세로 방향으로 적어도 2 개 이상으로 상기 변환 블록이 분할되는 변환 영역들을 나타내는 변환 영역 정보를 포함하는 비트스트림을 수신하고, 상기 변환 영역 정보를 이용하여 상기 변환 블록을 상기 적어도 2개 이상의 변환 영역들로 분할하는 변환 영역 분할부; 및
상기 변환 영역 정보로부터 상기 분할된 변환 영역들 각각의 스캔 방법을 획득하고, 상기 스캔 방법에 따라 저주파 영역의 제 1 변환 영역에 포함된 제 1 복수 개의 변환 계수 그룹들을 스캔함으로써 변환 계수들을 획득하고, 고주파 영역의 제 2 변환 영역에 포함된 제 2 복수 개의 변환 계수 그룹들을 스캔함으로써 변환 계수들을 획득하는 변환 계수 스캔부를 포함하며,
상기 제 1 복수의 변환 계수 그룹들이 상기 제 2 복수의 변환 계수 그룹들보다 먼저 스캔되고,
상기 제 1 복수의 변환 계수 그룹들을 스캔하기 위한 제 1 스캔 방법과 상기제 2 복수의 변환 계수 그룹들을 스캔하기 위한 제 2 스캔 방법은 서로 다르고,
상기 변환 계수 그룹은 복수의 변환 계수들을 포함하며,
상기 변환 영역 정보는 시퀀스 파라미터 셋(SPS) 및 슬라이스 헤더 중 적어도 하나 이상으로부터 결정되며, 인코더로부터 수신되는 비디오 신호의 복호화 장치.
A transform region division unit that receives a bitstream including transform region information indicating transform regions into which the transform block is divided in at least two or more horizontal or vertical directions, and divides the transform block into the at least two or more transform regions using the transform region information; and
A transform coefficient scanning unit is included that obtains a scanning method of each of the divided transform areas from the transform area information, obtains transform coefficients by scanning a first plurality of transform coefficient groups included in a first transform area of a low-frequency area according to the scanning method, and obtains transform coefficients by scanning a second plurality of transform coefficient groups included in a second transform area of a high-frequency area.
The first plurality of transform coefficient groups are scanned before the second plurality of transform coefficient groups,
The first scanning method for scanning the first plurality of transformation coefficient groups and the second scanning method for scanning the second plurality of transformation coefficient groups are different from each other,
The above transformation coefficient group includes multiple transformation coefficients,
A decoding device for a video signal received from an encoder, wherein the above transformation area information is determined from at least one of a sequence parameter set (SPS) and a slice header.
제 4 항에 있어서,
상기 비트스트림은 상기 변환 블록의 타입에 대한 정보를 더 포함하는 것을 특징으로 하는 비디오 신호의 복호화 장치.
In paragraph 4,
A video signal decoding device, characterized in that the bitstream further includes information about the type of the transform block.
제 5 항에 있어서,
상기 변환 블록의 타입에 대한 정보는 상기 변환 블록의 가로 길이 및 세로 길이를 기초로 하며,
상기 변환 영역 분할부는 상기 변환 블록의 타입에 대한 정보를 기초로 하여 상기 변환 블록의 타입을 결정하는 것을 특징으로 하는 비디오 신호의 복호화 장치.
In paragraph 5,
Information about the type of the above transformation block is based on the horizontal and vertical lengths of the above transformation block.
A video signal decoding device, characterized in that the above transformation region division unit determines the type of the transformation block based on information about the type of the transformation block.
KR1020230049183A 2016-06-17 2023-04-14 A method of decoding a video signal and an apparatus having the same Active KR102726470B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020240146911A KR20240157009A (en) 2016-06-17 2024-10-24 A method of decoding a video signal and an apparatus having the same

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR1020160075787 2016-06-17
KR20160075787 2016-06-17
KR1020220035103A KR102523384B1 (en) 2016-06-17 2022-03-22 A method of decoding a video signal and an apparatus having the same

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020220035103A Division KR102523384B1 (en) 2016-06-17 2022-03-22 A method of decoding a video signal and an apparatus having the same

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020240146911A Division KR20240157009A (en) 2016-06-17 2024-10-24 A method of decoding a video signal and an apparatus having the same

Publications (2)

Publication Number Publication Date
KR20230054805A KR20230054805A (en) 2023-04-25
KR102726470B1 true KR102726470B1 (en) 2024-11-05

Family

ID=60939601

Family Applications (3)

Application Number Title Priority Date Filing Date
KR1020170060576A Active KR102378803B1 (en) 2016-05-28 2017-05-16 A method of decoding a video signal and an apparatus having the same
KR1020230049183A Active KR102726470B1 (en) 2016-06-17 2023-04-14 A method of decoding a video signal and an apparatus having the same
KR1020240146911A Pending KR20240157009A (en) 2016-06-17 2024-10-24 A method of decoding a video signal and an apparatus having the same

Family Applications Before (1)

Application Number Title Priority Date Filing Date
KR1020170060576A Active KR102378803B1 (en) 2016-05-28 2017-05-16 A method of decoding a video signal and an apparatus having the same

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020240146911A Pending KR20240157009A (en) 2016-06-17 2024-10-24 A method of decoding a video signal and an apparatus having the same

Country Status (1)

Country Link
KR (3) KR102378803B1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11350093B2 (en) 2018-06-11 2022-05-31 Hanwha Techwin Co., Ltd. Residual coefficient encoding/decoding method and device
KR102030384B1 (en) 2018-06-19 2019-11-08 광운대학교 산학협력단 A method and an apparatus for encoding/decoding residual coefficient
KR102390731B1 (en) * 2018-06-19 2022-04-25 한화테크윈 주식회사 A method and an apparatus for encoding/decoding residual coefficient
US12081774B2 (en) 2019-05-29 2024-09-03 Electronics And Telecommunications Research Institute Image encoding/decoding method and apparatus, and recording medium having stored bitstream thereon

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101719448B1 (en) * 2010-09-27 2017-03-23 엘지전자 주식회사 Method for partitioning block and decoding device
KR101712103B1 (en) * 2011-01-13 2017-03-03 삼성전자 주식회사 Method and appratus for encoding video using selective scan mode, method and appratus for decoding video using selective scan mode
US11102494B2 (en) * 2011-03-03 2021-08-24 Electronics And Telecommunication Research Institute Method for scanning transform coefficient and device therefor
KR20130049524A (en) * 2011-11-04 2013-05-14 오수미 Method for generating intra prediction block

Also Published As

Publication number Publication date
KR20230054805A (en) 2023-04-25
KR20170142870A (en) 2017-12-28
KR20240157009A (en) 2024-10-31
KR102378803B1 (en) 2022-03-25

Similar Documents

Publication Publication Date Title
US11107253B2 (en) Image processing method, and image decoding and encoding method using same
KR101552635B1 (en) Method of coefficient scan based on partition mode of prediction unit and apparatus using the same
JP7391958B2 (en) Video signal encoding/decoding method and equipment used in the method
KR102726470B1 (en) A method of decoding a video signal and an apparatus having the same
KR20170108367A (en) Method and apparatus for processing a video signal based on intra prediction
KR101468078B1 (en) Method and apparatus for intra prediction
US11736712B2 (en) Method and apparatus for encoding or decoding video signal
KR102698394B1 (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
KR20180086094A (en) Method and apparatus for encoding or decoding video signal
KR20210035062A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20180032775A (en) Method and apparatus for processing a video signal based on adaptive block patitioning
KR102435502B1 (en) Method and apparatus for encoding or decoding video signal
EP4589945A1 (en) Video signal processing method and device therefor
KR102447951B1 (en) Video signal decoding method and apparatus therefor
KR102523384B1 (en) A method of decoding a video signal and an apparatus having the same
KR20220134476A (en) Method for encoding/decoding a video signal and recording medium storing a bitsteram generated based on the method
KR102410326B1 (en) Method and apparatus for encoding/decoding a video signal
KR102746463B1 (en) Method and apparatus for encoding or decoding video signal
KR102534604B1 (en) Method and apparatus for encoding or decoding video signal
KR102835516B1 (en) Method and apparatus for encoding or decoding video signal
KR20210082876A (en) Method for encoding/decoding video signal and apparatus therefor
KR20180000886A (en) Method and apparatus for processing a video signal

Legal Events

Date Code Title Description
A107 Divisional application of patent
PA0107 Divisional application

St.27 status event code: A-0-1-A10-A16-div-PA0107

St.27 status event code: A-0-1-A10-A18-div-PA0107

PA0201 Request for examination

St.27 status event code: A-1-2-D10-D11-exm-PA0201

PG1501 Laying open of application

St.27 status event code: A-1-1-Q10-Q12-nap-PG1501

E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

St.27 status event code: A-1-2-D10-D21-exm-PE0902

T11-X000 Administrative time limit extension requested

St.27 status event code: U-3-3-T10-T11-oth-X000

E601 Decision to refuse application
PE0601 Decision on rejection of patent

St.27 status event code: N-2-6-B10-B15-exm-PE0601

P11-X000 Amendment of application requested

St.27 status event code: A-2-2-P10-P11-nap-X000

P13-X000 Application amended

St.27 status event code: A-2-2-P10-P13-nap-X000

PX0901 Re-examination

St.27 status event code: A-2-3-E10-E12-rex-PX0901

PX0701 Decision of registration after re-examination

St.27 status event code: A-3-4-F10-F13-rex-PX0701

X701 Decision to grant (after re-examination)
PN2301 Change of applicant

St.27 status event code: A-3-3-R10-R11-asn-PN2301

St.27 status event code: A-3-3-R10-R13-asn-PN2301

A107 Divisional application of patent
PA0107 Divisional application

St.27 status event code: A-0-1-A10-A16-div-PA0107

St.27 status event code: A-0-1-A10-A18-div-PA0107

PR0701 Registration of establishment

St.27 status event code: A-2-4-F10-F11-exm-PR0701

PR1002 Payment of registration fee

Fee payment year number: 1

St.27 status event code: A-2-2-U10-U11-oth-PR1002

PG1601 Publication of registration

St.27 status event code: A-4-4-Q10-Q13-nap-PG1601