KR20200005207A - A method for encoding and decoding video using a motion compensation and filtering - Google Patents

A method for encoding and decoding video using a motion compensation and filtering Download PDF

Info

Publication number
KR20200005207A
KR20200005207A KR1020180078639A KR20180078639A KR20200005207A KR 20200005207 A KR20200005207 A KR 20200005207A KR 1020180078639 A KR1020180078639 A KR 1020180078639A KR 20180078639 A KR20180078639 A KR 20180078639A KR 20200005207 A KR20200005207 A KR 20200005207A
Authority
KR
South Korea
Prior art keywords
block
motion compensation
mode
unit
prediction
Prior art date
Application number
KR1020180078639A
Other languages
Korean (ko)
Inventor
임정윤
임화섭
Original Assignee
가온미디어 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 가온미디어 주식회사 filed Critical 가온미디어 주식회사
Priority to KR1020180078639A priority Critical patent/KR20200005207A/en
Publication of KR20200005207A publication Critical patent/KR20200005207A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • 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/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

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

Abstract

According to an embodiment of the present invention, an image decoding method comprises: a step of dividing a picture of an image into a plurality of coding units which are basic units in which an inter prediction or an intra prediction is performed and determining a target block for decoding a coding unit by dividing the picture or the divided coding unit into a quad tree, binary tree, or ternary tree structure; and a step of adaptively determining a sub-block motion compensation mode corresponding to a sub-block of the target block on the basis of the division information of the target block. Therefore, coding efficiency for a high resolution image can be increased.

Description

움직임 보상 및 필터링을 처리하는 영상 복호화 및 부호화 방법{A METHOD FOR ENCODING AND DECODING VIDEO USING A MOTION COMPENSATION AND FILTERING}Image decoding and encoding method for processing motion compensation and filtering {A METHOD FOR ENCODING AND DECODING VIDEO USING A MOTION COMPENSATION AND FILTERING}

본 발명은 영상 부호화 및 복호화에 관한 것으로, 더욱 상세하게는 동영상 픽쳐(picture)를 복수의 블록(block)들로 분할하여 예측 및 변환을 수행하는 방법에 관한 것이다.The present invention relates to image encoding and decoding, and more particularly, to a method for performing prediction and transformation by dividing a moving picture into a plurality of blocks.

영상 압축 방법에서는 하나의 픽처(picture)를 소정 크기를 가지는 복수의 블록(block)으로 구분하여 부호화를 수행한다. 또한, 압축 효율을 높이기 위해 픽쳐들 사이의 중복도를 제거하는 인터 예측(inter prediction) 및 인트라 예측(intra prediction) 기술을 이용한다.In the image compression method, one picture is divided into a plurality of blocks having a predetermined size and encoding is performed. In addition, inter prediction and intra prediction techniques that remove redundancy between pictures are used to increase compression efficiency.

이 경우, 인트라 예측과 인터 예측을 이용하여 잔차 신호(residual signal)를 만들며, 잔차 신호를 구하는 이유는 잔차 신호를 가지고 코딩을 했을 때 데이터의 양이 작아서 데이터 압축률이 높아지고, 예측이 좋을수록 잔차 신호의 값이 작게 되기 때문이다.In this case, a residual signal is generated by using intra prediction and inter prediction, and the reason for obtaining the residual signal is that when coding with the residual signal, the amount of data is small and the data compression ratio is high, and the better the prediction, the residual signal. This is because the value of becomes small.

인트라 예측 방법은 현재 블록의 주변의 픽셀을 이용하여 현재 블록의 데이터를 예측한다. 실제 값과 예측 값의 차이를 잔차 신호 블록이라고 한다. HEVC의 경우는 인트라 예측 방법이 기존 H.264/AVC에서 사용되던 9개의 예측모드에서 35개의 예측모드로 증가하여 더욱 세분화하여 예측을 한다.The intra prediction method predicts data of the current block by using pixels around the current block. The difference between the actual value and the predicted value is called the residual signal block. In the case of HEVC, the intra prediction method is increased from nine prediction modes used in H.264 / AVC to 35 prediction modes to further refine the prediction.

인터 예측 방법의 경우는 현재 블록을 주변의 픽쳐들 내의 블록들과 비교하여 가장 비슷한 블록을 찾는다. 이때 찾은 블록에 대한 위치정보(Vx, Vy)를 모션 벡터라고 한다. 현재블록과 모션 벡터에 의하여 예측된 예측블록간의 블록내 화소 값들의 차이를 잔차 신호(residual signal) 블록이라고 한다 (motion-compensated residual block).In the case of the inter prediction method, the most similar block is found by comparing the current block with blocks in neighboring pictures. At this time, the position information (Vx, Vy) of the found block is called a motion vector. The difference between pixel values in a block between the current block and the prediction block predicted by the motion vector is called a residual signal block (motion-compensated residual block).

이와 같이 인트라 예측과 인터 예측이 더 세분화 되어 잔차 신호의 데이터 양이 줄어들고 있으나, 동영상의 처리를 위한 연산량은 크게 증가하였다.As the intra prediction and the inter prediction are further subdivided, the amount of data of the residual signal is reduced, but the amount of computation for processing a video has greatly increased.

특히, 영상 부호화 및 복호화를 위한 픽쳐 내 분할 구조를 결정하는 과정에서의 복잡도 증가량으로 인해 파이프라인 구현 등에 있어서의 어려움이 존재하며, 기존의 블록 분할 방법 및 그에 따라 분할된 블록의 크기가 고해상도 영상의 부호화에는 적합하지 않을 수 있다.In particular, there is a difficulty in implementing a pipeline due to the increased complexity in determining a segmentation structure in a picture for encoding and decoding an image. It may not be suitable for coding.

본 발명은 상기와 같은 과제를 해결하기 위한 것으로, 고해상도 영상의 부호화 및 복호화에 적합하며, 효율적 움직임 보상 및 필터링을 처리하는 영상 처리 방법, 그를 이용한 영상 복호화 및 부호화 방법을 제공하는데 그 목적이 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to provide an image processing method suitable for encoding and decoding a high resolution image and processing an efficient motion compensation and filtering, and an image decoding and encoding method using the same.

상기와 같은 과제를 해결하기 위한 본 발명의 실시 예에 따른 영상 복호화 방법은, 영상 복호화 방법에 있어서, 영상의 픽쳐가 인터 예측(inter prediction) 또는 인트라 예측(intra prediction)이 수행되는 기본 단위인 복수의 코딩 유닛(Coding Unit)들로 분할되고, 상기 픽쳐 또는 상기 분할된 코딩 유닛을 쿼드 트리(quad tree), 이진 트리(binary tree) 또는 삼진 트리(ternery tree) 구조로 분할한 코딩 유닛을 복호화하기 위한 대상 블록을 결정하는 단계; 및 상기 대상 블록의 분할 정보에 기초하여, 상기 대상 블록의 서브 블록에 대응하는 서브 블록 움직임 보상 모드를 적응적으로 결정하는 단계;를 포함한다.In the image decoding method according to an embodiment of the present invention for solving the above problems, in the image decoding method, a plurality of pictures of the picture is a basic unit in which inter prediction or intra prediction is performed; Decoding a coding unit that is divided into Coding Units of and dividing the picture or the divided coding unit into a quad tree, a binary tree, or a ternary tree structure Determining a target block for the; And adaptively determining a sub block motion compensation mode corresponding to the sub block of the target block based on the split information of the target block.

상기와 같은 과제를 해결하기 위한 본 발명의 실시 예에 따른 영상 복호화 장치는, 영상의 픽쳐가 인터 예측(inter prediction) 또는 인트라 예측(intra prediction)이 수행되는 기본 단위인 복수의 코딩 유닛(Coding Unit)들로 분할되고, 상기 픽쳐 또는 상기 분할된 코딩 유닛을 쿼드 트리(quad tree), 이진 트리(binary tree) 또는 삼진 트리(ternery tree) 구조로 분할한 코딩 유닛을 복호화하기 위한 대상 블록을 결정하는 분할부; 및 상기 대상 블록의 분할 정보에 기초하여, 상기 대상 블록의 서브 블록에 대응하는 서브 블록 움직임 보상 모드를 적응적으로 결정하는 서브 블록 움직임 보상 결정부를 포함한다.An image decoding apparatus according to an embodiment of the present invention for solving the above problems includes a plurality of coding units in which a picture of an image is a basic unit in which inter prediction or intra prediction is performed. And a target block for decoding a coding unit obtained by dividing the picture or the divided coding unit into a quad tree, a binary tree, or a ternary tree structure. Divider; And a subblock motion compensation determiner configured to adaptively determine a subblock motion compensation mode corresponding to the subblock of the target block based on the split information of the target block.

상기와 같은 과제를 해결하기 위한 본 발명의 실시 예에 따른 영상 부호화 방법은, 영상 부호화 방법에 있어서, 영상의 픽쳐가 인터 예측(inter prediction) 또는 인트라 예측(intra prediction)이 수행되는 기본 단위인 복수의 코딩 유닛(Coding Unit)들로 분할되고, 상기 픽쳐 또는 상기 분할된 코딩 유닛을 쿼드 트리(quad tree), 이진 트리(binary tree) 또는 삼진 트리(ternery tree) 구조로 분할한 코딩 유닛을 복호화하기 위한 대상 블록을 결정하는 단계; 및 상기 대상 블록의 분할 정보에 기초하여, 상기 대상 블록의 서브 블록에 대응하는 서브 블록 움직임 보상 모드를 적응적으로 결정하는 단계를 포함한다.In the image encoding method according to an embodiment of the present invention for solving the above problems, in the image encoding method, a plurality of pictures of the picture is a basic unit that is performed inter prediction or intra prediction (inter prediction) is performed; Decoding a coding unit that is divided into Coding Units of and dividing the picture or the divided coding unit into a quad tree, a binary tree, or a ternary tree structure Determining a target block for the; And adaptively determining a sub block motion compensation mode corresponding to the sub block of the target block based on the split information of the target block.

본 발명의 실시예에 따르면, 인터 예측 또는 인트라 예측이 수행되는 기본 단위인 코딩 유닛을 쿼드 트리, 이진 트리 및 삼진 트리를 포함하는 복합 트리 구조로 분할할 수 있으며, 대상 블록의 서브 블록에 대응하는 서브 블록 움직임 보상 모드를 적응적으로 결정함으로써, 다변화된 블록 형태에 대응한 움직임 보상 효율과 필터링 효과를 향상시킬 수 있고, 고해상도 영상에 대한 코딩 효율을 향상시킬 수 있다.According to an embodiment of the present invention, a coding unit, which is a basic unit on which inter prediction or intra prediction is performed, may be divided into a complex tree structure including a quad tree, a binary tree, and a ternary tree, and corresponding to a sub block of a target block. By adaptively determining the sub-block motion compensation mode, the motion compensation efficiency and the filtering effect corresponding to the diversified block shape can be improved, and the coding efficiency for the high resolution image can be improved.

또한, 본 발명의 실시예에 따르면, 코딩 유닛 및 서브 블록단위로 예측을 수행함에 있어 공간적으로 인접한 블록이 참조하는 위치에 대응하는 화소들을 일부 반영하여 예측하므로 다변화된 블록 형태에 대응한 움직임 보상 효율과 필터링 효과를 향상시킬 수 있고, 고해상도 영상에 대한 코딩 효율을 향상시킬 수 있다.In addition, according to an exemplary embodiment of the present invention, in performing prediction in units of coding units and sub-blocks, since prediction is performed by partially reflecting pixels corresponding to positions referenced by spatially adjacent blocks, motion compensation efficiency corresponding to diversified block types And the filtering effect can be improved and the coding efficiency for the high resolution image can be improved.

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치의 구성을 나타내는 블록도이다.
도 2 내지 도 5는 영상을 블록 단위로 분할하여 처리하는 방법에 대한 제1 실시예를 설명하기 위한 도면이다.
도 6은 영상 부호화 장치에서 인터 예측을 수행하는 방법에 대한 일실시예를 설명하기 위한 블록도이다.
도 7은 본 발명의 일실시예에 따른 영상 복호화 장치의 구성을 나타내는 블록도이다.
도 8은 영상 복호화 장치에서 인터 예측을 수행하는 방법에 대한 일실시예를 설명하기 위한 블록도이다.
도 9는 영상을 블록 단위로 분할하여 처리하는 방법에 대한 제2 실시예를 설명하기 위한 도면이다.
도 10은 영상을 블록 단위로 분할하여 처리하기 위해 사용되는 신택스(syntax) 구조에 대한 일실시예를 나타내는 도면이다.
도 11은 영상을 블록 단위로 분할하여 처리하는 방법에 대한 제3 실시예를 설명하기 위한 도면이다.
도 12는 코딩 유닛을 이진 트리 구조로 분할하여 변환 유닛을 구성하는 방법에 대한 일실시예를 설명하기 위한 도면이다.
도 13은 영상을 블록 단위로 분할하여 처리하는 방법에 대한 제4 실시예를 설명하기 위한 도면이다.
도 14 내지 도 16은 영상을 블록 단위로 분할하여 처리하는 방법에 대한 또 다른 실시예들을 설명하기 위한 도면들이다.
도 17 및 도 18은 RDO(Rate distortion Optimization)를 수행하여 변환 유닛의 분할 구조를 결정하는 방법에 대한 실시예들을 설명하기 위한 도면들이다.
도 19 내지 도 22는 본 발명의 다른 일 실시 예에 따른 복합 분할 구조를 설명하기 위한 도면들이다.
도 23은 본 발명의 다른 일 실시 예에 따른 복합 분할 처리 프로세스를 도시한다.
도 24는 본 발명의 다른 일 실시 예에 따른 움직임보상 예측부를 도시한 블록도이다.
도 25는 서브 블록 크기 및 분할 정보에 기초한 적응적 서브 블록 움직임 보상 프로세스를 나타내는 흐름도이다.
도 26은 본 발명의 실시 예에 따른 복호화 장치의 필터링 프로세스를 도시한 흐름도이며, 도 27은 본 발명의 실시 예에 따른 적응적 필터 적용을 나타낸다.
도 28 내지 도 29는 본 발명의 실시 예에 따른 블록 분할 정보의 시그널링과, 헤더 정보를 설명하기 위한 도면이다.
1 is a block diagram illustrating a configuration of an image encoding apparatus according to an embodiment of the present invention.
2 to 5 are diagrams for describing a first exemplary embodiment of a method of dividing and processing an image in block units.
6 is a block diagram illustrating an embodiment of a method of performing inter prediction in an image encoding apparatus.
7 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment of the present invention.
8 is a block diagram illustrating an embodiment of a method of performing inter prediction in an image decoding apparatus.
FIG. 9 is a diagram for describing a second exemplary embodiment of a method of dividing and processing an image into blocks.
FIG. 10 is a diagram illustrating an embodiment of a syntax structure used to divide and process an image in block units.
FIG. 11 is a diagram for describing a third exemplary embodiment of a method of dividing and processing an image into blocks.
12 is a diagram for describing an embodiment of a method of configuring a transform unit by dividing a coding unit into a binary tree structure.
FIG. 13 is a diagram for describing a fourth exemplary embodiment of a method of dividing and processing an image into blocks.
14 to 16 are diagrams for describing still another example of a method of dividing and processing an image into blocks.
17 and 18 are diagrams for describing embodiments of a method of determining a partition structure of a transform unit by performing rate distortion optimization (RDO).
19 to 22 are views for explaining a composite partition structure according to another embodiment of the present invention.
23 illustrates a complex splitting processing process according to another exemplary embodiment of the present invention.
24 is a block diagram illustrating a motion compensation predictor according to another embodiment of the present invention.
25 is a flowchart illustrating an adaptive subblock motion compensation process based on subblock size and partition information.
FIG. 26 is a flowchart illustrating a filtering process of a decoding apparatus, according to an embodiment of the present invention. FIG. 27 is a flowchart illustrating an adaptive filter application according to an embodiment of the present invention.
28 to 29 are diagrams for describing signaling of block division information and header information according to an embodiment of the present invention.

이하, 도면을 참조하여 본 발명의 실시 형태에 대하여 구체적으로 설명한다. 본 명세서의 실시 예를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.EMBODIMENT OF THE INVENTION Hereinafter, embodiment of this invention is described concretely with reference to drawings. In describing the embodiments of the present specification, when it is determined that a detailed description of a related well-known configuration or function may obscure the gist of the present specification, the detailed description thereof will be omitted.

어떤 구성 요소가 다른 구성 요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있으나, 중간에 다른 구성 요소가 존재할 수도 있다고 이해되어야 할 것이다. 아울러, 본 발명에서 특정 구성을 "포함"한다고 기술하는 내용은 해당 구성 이외의 구성을 배제하는 것이 아니며, 추가적인 구성이 본 발명의 실시 또는 본 발명의 기술적 사상의 범위에 포함될 수 있음을 의미한다. When a component is said to be "connected" or "connected" to another component, it may be directly connected to or connected to that other component, but it may be understood that another component may be present in between. Should be. In addition, the content described as "include" a specific configuration in the present invention does not exclude a configuration other than the configuration, it means that additional configuration may be included in the scope of the technical idea of the present invention or the present invention.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.Terms such as first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.

또한 본 발명의 실시예에 나타나는 구성부들은 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시되는 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수 개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.In addition, the components shown in the embodiments of the present invention are shown independently to represent different characteristic functions, and do not mean that each component is made of separate hardware or one software component unit. In other words, each component is included in each component for convenience of description, and at least two of the components may be combined into one component, or one component may be divided into a plurality of components to perform a function. Integrated and separate embodiments of the components are also included within the scope of the present invention without departing from the spirit of the invention.

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

도 1은 본 발명의 일실시예에 따른 영상 부호화 장치의 구성을 블록도로 도시한 것으로, 영상 부호화 장치(10)는 픽쳐 분할부(110), 변환부(120), 양자화부(130), 스캐닝부(131), 엔트로피 부호화부(140), 인트라 예측부(150), 인터 예측부(160), 역양자화부(135), 역변환부(125), 후처리부(170), 픽쳐 저장부(180), 감산부(190) 및 가산부(195)를 포함한다.1 is a block diagram illustrating a configuration of an image encoding apparatus according to an embodiment of the present invention. The image encoding apparatus 10 may include a picture divider 110, a transform unit 120, a quantization unit 130, and a scanning unit. The unit 131, the entropy encoder 140, the intra predictor 150, the inter predictor 160, the inverse quantizer 135, the inverse transformer 125, the post processor 170, and the picture storage 180 ), A subtractor 190 and an adder 195.

도 1을 참조하면, 픽쳐 분할부(110)는 입력되는 비디오 신호를 분석하여 픽쳐를 코딩 유닛으로 분할하여 예측 모드를 결정하고, 상기 코딩 유닛별로 예측 유닛의 크기를 결정한다.Referring to FIG. 1, the picture dividing unit 110 analyzes an input video signal, divides a picture into coding units, determines a prediction mode, and determines a size of a prediction unit for each coding unit.

또한, 픽쳐 분할부(110)는 부호화할 예측 유닛을 예측 모드(또는 예측 방법)에 따라 인트라 예측부(150) 또는 인터 예측부(160)로 보낸다. 또한, 픽쳐 분할부(110)는 부호화할 예측 유닛을 감산부(190)로 보낸다.In addition, the picture splitter 110 sends the prediction unit to be encoded to the intra predictor 150 or the inter predictor 160 according to a prediction mode (or a prediction method). In addition, the picture dividing unit 110 sends the prediction unit to be encoded to the subtracting unit 190.

여기서, 영상의 픽쳐(picture)는 복수의 슬라이스로 구성되고, 슬라이스는 픽쳐를 분할하는 기본 단위인 복수의 코딩 트리 유닛(Coding Tree Unit: CTU)들로 분할될 수 있다.Here, a picture of an image may be composed of a plurality of slices, and the slice may be divided into a plurality of coding tree units (CTUs) which are basic units for dividing a picture.

상기 코딩 트리 유닛은 인터 예측(inter prediction) 또는 인트라 예측(intra prediction)이 수행되는 기본 단위인 하나 또는 2 이상의 코딩 유닛(Coding Unit: CU)들로 분할될 수 있다.The coding tree unit may be divided into one or two coding units (CUs), which are basic units on which inter prediction or intra prediction is performed.

코딩 유닛(CU)은 예측이 수행되는 기본 단위인 하나 또는 그 이상의 예측 유닛(Prediction unit: PU)들로 분할될 수 있다.The coding unit (CU) may be divided into one or more prediction units (PUs), which are basic units on which prediction is performed.

이 경우, 부호화 장치(10)는 상기 분할된 코딩 유닛(CU)들 각각에 대해 인터 예측과 인트라 예측 중 어느 하나를 예측 방법으로 결정하나, 각각의 예측 유닛(PU)에 대해 서로 다르게 예측 블록을 생성할 수 있다.In this case, the encoding apparatus 10 determines one of inter prediction and intra prediction as a prediction method for each of the divided coding units (CUs), but differently predicts a prediction block for each prediction unit (PU). Can be generated.

한편, 코딩 유닛(CU)은 잔차 블록(residual block)에 대한 변환이 수행되는 기본 단위인 하나 또는 2 이상의 변환 유닛(Transform Unit: TU)들로 분할될 수 있다.Meanwhile, the coding unit CU may be divided into one or two transform units (TUs), which are basic units for transforming a residual block.

이 경우, 픽쳐 분할부(110)는 상기와 같이 분할된 블록 단위(예를 들어, 예측 유닛(PU) 또는 변환 유닛(TU))로 영상 데이터를 감산부(190)에 전달할 수 있다.In this case, the picture dividing unit 110 may transmit the image data to the subtracting unit 190 in a block unit (for example, a prediction unit (PU) or a transformation unit (TU)) divided as described above.

도 2를 참조하면, 최대 256x256 픽셀 크기를 가지는 코딩 트리 유닛(CTU)는 쿼드 트리(quad tree) 구조로 분할되어, 정사각형의 형태를 가지는 4개의 코딩 유닛(CU)들로 분할될 수 있다.Referring to FIG. 2, a coding tree unit (CTU) having a maximum size of 256 × 256 pixels may be divided into a quad tree structure and divided into four coding units (CUs) having a square shape.

상기 정사각형의 형태를 가지는 4개의 코딩 유닛(CU)들은 각각 쿼드 트리 구조로 재 분할될 수 있으며, 상기와 같이 쿼드 트리 구조로 분할되는 코딩 유닛(CU)의 깊이(Depth)는 0부터 3 중 어느 하나의 정수 값을 가질 수 있다.The four coding units (CUs) having the square shape may be re-divided into quad tree structures, respectively, and the depth of the coding units CU divided into quad tree structures as described above may be any one of 0 to 3. It can have one integer value.

코딩 유닛(CU)은 예측 모드에 따라 하나 또는 2 이상의 예측 유닛(PU)들로 분할될 수 있다.The coding unit CU may be divided into one or two or more prediction units (PUs) according to the prediction mode.

인트라 예측 모드의 경우, 코딩 유닛(CU)의 크기가 2Nx2N 일 때, 예측 유닛(PU)은 도 3의 (a)에 도시된 2Nx2N 또는 도 3의 (b)에 도시된 NxN의 크기를 가질 수 있다.In the case of the intra prediction mode, when the size of the coding unit CU is 2Nx2N, the prediction unit PU may have a size of 2Nx2N shown in FIG. 3A or NxN shown in FIG. 3B. have.

한편, 인터 예측 모드의 경우, 코딩 유닛(CU)의 크기가 2Nx2N 일 때, 예측 유닛(PU)은 도 4의 (a)에 도시된 2Nx2N, 도 4의 (b)에 도시된 2NxN, 도 4의 (c)에 도시된 Nx2N, 도 4의 (d)에 도시된 NxN, 도 4의 (e)에 도시된 2NxnU, 도 4의 (f)에 도시된 2NxnD, 도 4의 (g)에 도시된 nLx2N 및 도 4의 (h)에 도시된 nRx2N 중 어느 하나의 크기를 가질 수 있다.Meanwhile, in the inter prediction mode, when the size of the coding unit CU is 2Nx2N, the prediction unit PU is 2Nx2N shown in FIG. 4A, 2NxN shown in FIG. 4B, and FIG. 4. Nx2N shown in (c) of FIG. 4, NxN shown in (d) of FIG. 4, 2NxnU shown in (e) of FIG. 4, 2NxnD shown in (f) of FIG. 4, shown in (g) of FIG. It may have a size of any one of nLx2N and nRx2N shown in (h) of FIG.

도 5를 참조하면, 코딩 유닛(CU)는 쿼드 트리(quad tree) 구조로 분할되어, 정사각형의 형태를 가지는 4개의 변환 유닛(TU)들로 분할될 수 있다.Referring to FIG. 5, the coding unit CU may be divided into a quad tree structure and divided into four transform units TUs having a square shape.

상기 정사각형의 형태를 가지는 4개의 변환 유닛(TU)들은 각각 쿼드 트리 구조로 재 분할될 수 있으며, 상기와 같이 쿼드 트리 구조로 분할되는 변환 유닛(TU)의 깊이(Depth)는 0부터 3 중 어느 하나의 정수 값을 가질 수 있다.The four transform units (TUs) having a square shape may be re-divided into quad tree structures, and the depth of the transform units (TUs) divided into quad tree structures as described above may be any one of 0 to 3. It can have one integer value.

여기서, 코딩 유닛(CU)이 인터 예측 모드인 경우, 해당 코딩 유닛(CU)으로부터 분할된 예측 유닛(PU)와 변환 유닛(TU)은 서로 독립적인 분할 구조를 가질 수 있다.Here, when the coding unit CU is in the inter prediction mode, the prediction unit PU and the transform unit TU split from the coding unit CU may have a partition structure that is independent of each other.

코딩 유닛(CU)이 인트라 예측 모드인 경우, 해당 코딩 유닛(CU)으로부터 분할된 변환 유닛(TU)은 예측 유닛(PU)의 크기보다 클 수 없다.When the coding unit CU is in the intra prediction mode, the transform unit TU split from the coding unit CU cannot be larger than the size of the prediction unit PU.

또한, 상기와 같이 분할되는 변환 유닛(TU)은 최대 64x64 픽셀 크기를 가질 수 있다.In addition, the transform unit TU divided as described above may have a maximum size of 64x64 pixels.

변환부(120)는 입력된 예측 유닛(PU)의 원본 블록과 인트라 예측부(150) 또는 인터 예측부(160)에서 생성된 예측 블록 사이의 잔차 신호인 잔차 블록을 변환하며, 상기 변환은 변환 유닛(TU)을 기본 단위로 하여 수행될 수 있다.The transform unit 120 converts a residual block that is a residual signal between the original block of the input prediction unit PU and the prediction block generated by the intra predictor 150 or the inter predictor 160, and the transform is performed. It may be performed using the unit (TU) as a basic unit.

상기 변환 과정에서 예측 모드(intra or inter)에 따라 서로 다른 변환 매트릭스가 결정될 수 있으며, 인트라 예측의 잔차 신호는 인트라 예측 모드에 따라 방향성을 가지므로 인트라 예측 모드에 따라 적응적으로 변환 매트릭스가 결정될 수 있다.In the transformation process, different transform matrices may be determined according to a prediction mode (intra or inter), and since the residual signal of intra prediction has a direction according to the intra prediction mode, the transform matrix may be adaptively determined according to the intra prediction mode. have.

변환 단위는 2개(수평, 수직)의 1차원 변환 매트릭스에 의해 변환될 수 있으며, 예를 들어 인터 예측의 경우에는 미리 결정된 1개의 변환 매트릭스가 결정될 수 있다.The transform unit may be transformed by two (horizontal and vertical) one-dimensional transform matrices. For example, in the case of inter prediction, one predetermined transform matrix may be determined.

한편, 인트라 예측의 경우, 인트라 예측 모드가 수평인 경우에는 잔차 블록이 수직방향으로의 방향성을 가질 확률이 높아지므로, 수직방향으로는 DCT 기반의 정수 매트릭스를 적용하고, 수평방향으로는 DST 기반 또는 KLT 기반의 정수 매트릭스를 적용한다. 인트라 예측 모드가 수직인 경우에는 수직방향으로는 DST 기반 또는 KLT 기반의 정수 매트릭스를, 수평 방향으로는 DCT 기반의 정수 매트릭스를 적용할 수 있다.On the other hand, in the case of intra prediction, when the intra prediction mode is horizontal, the probability of the residual block having the directionality in the vertical direction increases, so a DCT-based integer matrix is applied in the vertical direction, and DST-based or in the horizontal direction. Apply KLT-based integer matrix. When the intra prediction mode is vertical, an integer matrix based on DST or KLT may be applied in the vertical direction and a DCT based integer matrix in the horizontal direction.

또한, DC 모드의 경우에는 양방향 모두 DCT 기반 정수 매트릭스를 적용할 수 있다.In addition, in the DC mode, a DCT based integer matrix may be applied in both directions.

그리고, 인트라 예측의 경우, 변환 유닛(TU)의 크기에 기초하여 변환 매트릭스가 적응적으로 결정될 수도 있다.In the case of intra prediction, a transform matrix may be adaptively determined based on the size of a transform unit (TU).

양자화부(130)는 상기 변환 매트릭스에 의해 변환된 잔차 블록의 계수들을 양자화하기 위한 양자화 스텝 사이즈를 결정하며, 양자화 스텝 사이즈는 미리 정해진 크기 이상의 양자화 유닛별로 결정될 수 있다.The quantization unit 130 determines a quantization step size for quantizing the coefficients of the residual block transformed by the transform matrix, and the quantization step size may be determined for each quantization unit having a predetermined size or more.

양자화 유닛의 크기는 8x8 또는 16x16일 수 있으며, 양자화부(130)는 양자화 스텝 사이즈 및 예측 모드에 따라 결정되는 양자화 매트릭스를 이용하여 변환 블록의 계수들을 양자화한다.The size of the quantization unit may be 8x8 or 16x16, and the quantization unit 130 quantizes coefficients of the transform block using a quantization matrix determined according to the quantization step size and the prediction mode.

또한, 양자화부(130)는 현재 양자화 유닛의 양자화 스텝 사이즈 예측자로서 현재 양자화 유닛에 인접한 양자화 유닛의 양자화 스텝 사이즈를 이용할 수 있다.In addition, the quantization unit 130 may use the quantization step size of the quantization unit adjacent to the current quantization unit as the quantization step size predictor of the current quantization unit.

양자화부(130)는 현재 양자화 유닛의 좌측 양자화 유닛, 상측 양자화 유닛, 좌상측 양자화 유닛 순서로 검색하여 1개 또는 2개의 유효한 양자화 스텝 사이즈를 이용하여 현재 양자화 유닛의 양자화 스텝 사이즈 예측자를 생성할 수 있다.The quantization unit 130 may search for the left quantization unit, the upper quantization unit, and the upper left quantization unit of the current quantization unit and generate a quantization step size predictor of the current quantization unit using one or two valid quantization step sizes. have.

예를 들어, 양자화부(130)는 상기 순서로 검색된 유효한 첫번째 양자화 스텝 사이즈를 양자화 스텝 사이즈 예측자로 결정하거나, 상기 순서로 검색된 유효한 2개의 양자화 스텝 사이즈의 평균값을 양자화 스텝 사이즈 예측자로 결정하거나, 또는 1개의 양자화 스텝 사이즈만이 유효한 경우에는 이를 양자화 스텝 사이즈 예측자로 결정할 수 있다.For example, the quantization unit 130 may determine a valid first quantization step size found in the order as a quantization step size predictor, or determine an average value of two valid quantization step sizes found in the order as a quantization step size predictor, or If only one quantization step size is valid, this may be determined as a quantization step size predictor.

상기 양자화 스텝 사이즈 예측자가 결정되면, 양자화부(130)는 현재 양자화 유닛의 양자화 스텝 사이즈와 양자화 스텝 사이즈 예측자 사이의 차분값을 엔트로피 부호화부(140)로 전송한다.When the quantization step size predictor is determined, the quantization unit 130 transmits a difference value between the quantization step size and the quantization step size predictor of the current quantization unit to the entropy encoder 140.

한편, 현재 코딩 유닛의 좌측 코딩 유닛, 상측 코딩 유닛, 좌상측 코딩 유닛 모두가 존재하지 않거나. 또는 최대 코딩 유닛 내의 부호화 순서 상으로 이전에 존재하는 코딩 유닛이 존재할 수 있다.On the other hand, the left coding unit, the upper coding unit, the upper left coding unit of the current coding unit does not all exist. Or there may be a coding unit previously present in the coding order within the largest coding unit.

따라서, 현재 코딩 유닛에 인접한 양자화 유닛들과 상기 최대 코딩 유닛 내에서는 부호화 순서상 바로 이전의 양자화 유닛의 양자화 스텝 사이즈가 후보자가 될 수 있다.Accordingly, candidates may be quantization step sizes of the quantization units adjacent to the current coding unit and the quantization unit immediately before the coding order within the maximum coding unit.

이 경우, 1) 현재 코딩 유닛의 좌측 양자화 유닛, 2) 현재 코딩 유닛의 상측 양자화 유닛, 3) 현재 코딩 유닛의 좌상측 양자화 유닛, 4) 부호화 순서상 바로 이전의 양자화 유닛 순서로 우선순위가 설정될 수 있다. 상기 순서는 바뀔 수 있고, 상기 좌상측 양자화 유닛은 생략될 수도 있다.In this case, priority is set in the order of 1) the left quantization unit of the current coding unit, 2) the upper quantization unit of the current coding unit, 3) the upper left quantization unit of the current coding unit, and 4) the quantization unit immediately preceding the coding order. Can be. The order may be reversed and the upper left quantization unit may be omitted.

한편, 상기와 같이 양자화된 변환 블록은 역양자화부(135)와 스캐닝부(131)로 전달된다.Meanwhile, the transform block quantized as described above is transferred to the inverse quantization unit 135 and the scanning unit 131.

스캐닝부(131)는 양자화된 변환 블록의 계수들을 스캐닝하여 1차원의 양자화 계수들로 변환하며, 이 경우 양자화 후의 변환 블록의 계수 분포가 인트라 예측 모드에 의존적일 수 있으므로 스캐닝 방식은 인트라 예측 모드에 따라 결정될 수 있다.The scanning unit 131 scans the coefficients of the quantized transform block and converts them into one-dimensional quantization coefficients. In this case, since the distribution of coefficients of the transform block after quantization may depend on the intra prediction mode, the scanning method is applied to the intra prediction mode. Can be determined accordingly.

또한, 계수 스캐닝 방식은 변환 단위의 크기에 따라 달리 결정될 수도 있고, 상기 스캔 패턴은 방향성 인트라 예측 모드에 따라 달라질 수 있으며, 이 경우 양자화 계수들의 스캔 순서는 역방향으로 스캔될 수 있다.Further, the coefficient scanning scheme may be determined differently according to the size of the transform unit, and the scan pattern may vary according to the directional intra prediction mode, in which case the scanning order of the quantization coefficients may be scanned in the reverse direction.

상기 양자화된 계수들이 복수의 서브셋(sub-set)들로 분할된 경우, 각각의 서브셋 내의 양자화 계수들에 동일한 스캔 패턴이 적용될 수 있으며, 서브셋 간의 스캔 패턴은 지그재그 스캔 또는 대각선 스캔이 적용될 수 있다.When the quantized coefficients are divided into a plurality of subsets, the same scan pattern may be applied to the quantization coefficients in each subset, and a zigzag scan or a diagonal scan may be applied to the scan patterns between the subsets.

한편, 상기 스캔 패턴은 DC를 포함하는 메인 서브셋으로부터 순방향으로 잔여 서브셋들로 스캔하는 것이 바람직하나, 그 역방향도 가능하다.Meanwhile, the scan pattern is preferably scanned in the forward direction from the main subset including DC to the remaining subsets, but the reverse direction is also possible.

또한, 서브셋 내의 양자화된 계수들의 스캔 패턴과 동일하게 서브셋 간의 스캔 패턴을 설정할 수도 있으며, 서브셋 간의 스캔 패턴은 인트라 예측 모드에 따라 결정될 수 있다.In addition, a scan pattern between subsets may be set to be identical to a scan pattern of quantized coefficients in a subset, and the scan pattern between subsets may be determined according to an intra prediction mode.

한편, 부호화 장치(10)는 상기 변환 유닛(PU) 내에서 0이 아닌 마지막 양자화 계수의 위치 및 각 서브셋 내의 0이 아닌 마지막 양자화 계수의 위치를 나타낼 수 있는 정보를 비트스트림에 포함시켜 복호화 장치(20)로 전송할 수 있다.Meanwhile, the encoding apparatus 10 may include information indicative of the position of the last non-zero quantization coefficient and the position of the last non-zero quantization coefficient in each subset in the transform unit PU to include the decoding apparatus ( 20).

역양자화부(135)는 상기와 같이 양자화된 양자화 계수를 역양자화하며, 역변환부(125)는 변환 유닛(TU) 단위로 역변환을 수행하여 상기 역양자화된 변환 계수를 공간 영역의 잔차 블록으로 복원할 수 있다.The inverse quantization unit 135 inverse quantizes the quantized coefficients as described above, and the inverse transform unit 125 performs inverse transformation in units of transform units (TUs) to restore the inverse quantized transform coefficients into a residual block of a spatial domain. can do.

가산기(195)는 상기 역변환부(125)에 의해 복원된 잔차 블록과 인트라 예측부(150) 또는 인터 예측부(160)로부터의 수신된 예측 블록을 합하여 복원 블록을 생성할 수 있다.The adder 195 may generate a reconstructed block by adding the residual block reconstructed by the inverse transform unit 125 and the received prediction block from the intra predictor 150 or the inter predictor 160.

또한, 후처리부(170)는 복원된 픽쳐에 발생하는 블록킹 효과를 제거하기 위한 디블록킹(deblocking) 필터링 과정, 화소 단위로 원본 영상과의 차이 값을 보완하기 위한 샘플 적응적 오프셋(Sample Adaptive Offset : SAO) 적용 과정 및 코딩 유닛으로 원본 영상과의 차이 값을 보완하기 위한 적응적 루프 필터링(Adaptive Loof Filtering : ALF) 과정 등의 후처리를 수행할 수 있다.In addition, the post-processing unit 170 may perform a deblocking filtering process to remove a blocking effect occurring in the reconstructed picture, and a sample adaptive offset to compensate for a difference value from the original image in units of pixels. The SAO) application process and the coding unit may perform post-processing such as an adaptive loop filtering (ALF) process to compensate for the difference from the original image.

디블록킹 필터링 과정은 미리 정해진 크기 이상의 크기를 갖는 예측 유닛(PU) 또는 변환 유닛(TU)의 경계에 적용될 수 있다.The deblocking filtering process may be applied to the boundary of the prediction unit (PU) or transform unit (TU) having a size of a predetermined size or more.

예를 들어, 디블록킹 필터링 과정은, 필터링할 경계(boundary)를 결정하는 단계, 상기 경계에 적용할 경계 필터링 강도(bounary filtering strength)를 결정하는 단계, 디블록킹 필터의 적용 여부를 결정하는 단계, 상기 디블록킹 필터를 적용할 것으로 결정된 경우, 상기 경계에 적용할 필터를 선택하는 단계를 포함할 수 있다.For example, the deblocking filtering process may include determining a boundary to filter, determining a boundary filtering strength to be applied to the boundary, determining whether to apply a deblocking filter, If it is determined to apply the deblocking filter, the method may include selecting a filter to be applied to the boundary.

한편, 상기 디블록킹 필터의 적용 여부는 i) 상기 경계 필터링 강도가 0보다 큰지 여부 및 ii) 상기 필터링할 경계에 인접한 2개의 블록(P 블록, Q블록) 경계 부분에서의 화소값들이 변화 정도를 나타내는 값이 양자화 파라미터에 의해 결정되는 제1 기준값보다 작은지 여부에 의해 결정될 수 있다.On the other hand, whether the deblocking filter is applied depends on whether i) the boundary filtering intensity is greater than 0 and ii) the degree of change of pixel values at the boundary portions of two blocks (P block, Q block) adjacent to the boundary to be filtered. The value represented may be determined by whether the value is smaller than the first reference value determined by the quantization parameter.

상기 필터는 적어도 2개 이상인 것이 바람직하다. 블록 경계에 위치한 2개의 화소들간의 차이값의 절대값이 제2 기준값보다 크거나 같은 경우에는 상대적으로 약한 필터링을 수행하는 필터를 선택한다.It is preferable that the said filter is at least 2 or more. When the absolute value of the difference between two pixels positioned at the block boundary is greater than or equal to the second reference value, a filter that performs relatively weak filtering is selected.

상기 제2 기준값은 상기 양자화 파라미터 및 상기 경계 필터링 강도에 의해 결정된다.The second reference value is determined by the quantization parameter and the boundary filtering intensity.

또한, 샘플 적응적 오프셋(SAO) 적용 과정은 디블록킹 필터가 적용된 영상 내의 화소와 원본 화소 간의 차이값(distortion)을 감소시키기 위한 것으로, 픽쳐 또는 슬라이스 단위로 샘플 적응적 오프셋(SAO) 적용 과정을 수행할지 여부가 결정될 수 있다.In addition, the sample adaptive offset (SAO) application process is to reduce the distortion (distortion) between the pixel and the original pixel in the image to which the deblocking filter is applied, the sample adaptive offset (SAO) application process in the unit of picture or slice. Whether to perform may be determined.

픽쳐 또는 슬라이스는 복수의 오프셋 영역들로 분할될 수 있고, 각 오프셋 영역별로 오프셋 타입이 결정될 수 있으며, 상기 오프셋 타입은 미리 정해진 개수(예를 들어, 4개)의 에지 오프셋 타입과 2개의 밴드 오프셋 타입을 포함할 수 있다.The picture or slice may be divided into a plurality of offset regions, and an offset type may be determined for each offset region, and the offset type may be a predetermined number of edge offset types (eg, four) and two band offsets. It can include a type.

예를 들어, 오프셋 타입이 에지 오프셋 타입일 경우, 각 화소가 속하는 에지 타입을 결정하여 이에 대응하는 오프셋을 적용하며, 상기 에지 타입은 현재 화소와 인접하는 2개의 화소값의 분포를 기준으로 결정될 수 있다.For example, when the offset type is an edge offset type, an edge type to which each pixel belongs is determined and an offset corresponding thereto is applied, and the edge type may be determined based on a distribution of two pixel values adjacent to the current pixel. have.

적응적 루프 필터링(ALF) 과정은 디블록킹 필터링 과정 또는 적응적 오프셋 적용 과정을 거친 복원된 영상과 원본 영상을 비교한 값을 기초로 필터링을 수행할 수 있다.The adaptive loop filtering (ALF) process may perform filtering based on a value obtained by comparing a reconstructed image and an original image that have undergone a deblocking filtering process or an adaptive offset application process.

픽쳐 저장부(180)는 후처리된 영상 데이터를 후처리부(170)로부터 입력받아 픽쳐(picture) 단위로 영상을 복원하여 저장하며, 픽쳐는 프레임 단위의 영상이거나 필드 단위의 영상일 수 있다.The picture storage unit 180 receives the post-processed image data from the post-processing unit 170 and restores the image in a picture unit, and the picture may be an image in a frame unit or an image in a field unit.

인터 예측부(160)는 픽쳐 저장부(180)에 저장된 적어도 하나 이상의 참조 픽쳐를 이용하여 움직임 추정을 수행하고, 참조 픽쳐를 나타내는 참조 픽쳐 인덱스 및 움직임 벡터를 결정할 수 있다.The inter prediction unit 160 may perform motion estimation using at least one or more reference pictures stored in the picture storage unit 180, and may determine a reference picture index and a motion vector indicating the reference picture.

이 경우, 결정된 참조 픽쳐 인덱스 및 움직임 벡터에 따라, 픽쳐 저장부(180)에 저장된 다수의 참조 픽쳐들 중 움직임 추정에 이용된 참조 픽쳐로부터, 부호화하고자 하는 예측 유닛에 대응하는 예측 블록이 추출될 수 있다.In this case, a prediction block corresponding to a prediction unit to be encoded may be extracted from a reference picture used for motion estimation among a plurality of reference pictures stored in the picture storage unit 180 according to the determined reference picture index and the motion vector. have.

인트라 예측부(150)는 현재 예측 유닛이 포함되는 픽처 내부의 재구성된 화소값을 이용하여 인트라 예측 부호화를 수행할 수 있다.The intra predictor 150 may perform intra prediction encoding by using the reconstructed pixel value inside the picture in which the current prediction unit is included.

인트라 예측부(150)는 예측 부호화할 현재 예측 유닛을 입력받아 현재 블록의 크기에 따라 미리 설정된 개수의 인트라 예측 모드 중에 하나를 선택하여 인트라 예측을 수행할 수 있다.The intra prediction unit 150 may receive the current prediction unit to be predictively encoded, and perform intra prediction by selecting one of a preset number of intra prediction modes according to the size of the current block.

인트라 예측부(150)는 인트라 예측 블록을 생성하기 위해 참조 화소를 적응적으로 필터링하며, 참조 화소가 이용 가능하지 않은 경우 이용 가능한 참조 화소들을 이용하여 참조 화소들을 생성할 수 있다.The intra predictor 150 adaptively filters the reference pixel to generate the intra prediction block, and generates reference pixels using the available reference pixels when the reference pixel is not available.

엔트로피 부호화부(140)는 양자화부(130)에 의해 양자화된 양자화 계수, 인트라 예측부(150)로부터 수신된 인트라 예측 정보, 인터 예측부(160)로부터 수신된 움직임 정보 등을 엔트로피 부호화할 수 있다.The entropy encoder 140 may entropy encode quantization coefficients quantized by the quantizer 130, intra prediction information received from the intra predictor 150, motion information received from the inter predictor 160, and the like. .

도 6은 부호화 장치(10)에서 인터 예측을 수행하는 구성에 대한 일실시예를 블록도로 도시한 것으로, 도시된 인터 예측 부호화기는 움직임 정보 결정부(161), 움직임 정보 부호화 모드 결정부(162), 움직임 정보 부호화부(163), 예측 블록 생성부(164), 잔차 블록 생성부(165), 잔차 블록 부호화부(166) 및 멀티플렉서(167)를 포함하여 구성될 수 있다.FIG. 6 is a block diagram illustrating an example of a configuration for performing inter prediction in the encoding apparatus 10. The inter prediction encoder illustrated in FIG. 6 includes a motion information determiner 161 and a motion information encoding mode determiner 162. FIG. , Motion information encoder 163, prediction block generator 164, residual block generator 165, residual block encoder 166, and multiplexer 167.

도 6을 참조하면, 움직임 정보 결정부(161)는 현재 블록의 움직임 정보를 결정하며, 움직임 정보는 참조 픽쳐 인덱스와 움직임 벡터를 포함하고, 참조 픽쳐 인덱스는 이전에 부호화되어 복원된 픽쳐 중 어느 하나를 나타낼 수 있다.Referring to FIG. 6, the motion information determiner 161 determines motion information of the current block, the motion information includes a reference picture index and a motion vector, and the reference picture index is any one of a previously coded and reconstructed picture. Can be represented.

현재 블록이 단방향 인터 예측 부호화되는 경우에는 리스트 0(L0)에 속하는 참조 픽쳐들 중의 어느 하나를 나타내며, 현재 블록이 양방향 예측 부호화되는 경우에는 리스트 0(L0)의 참조 픽쳐들 중 하나를 나타내는 참조 픽쳐 인덱스와 리스트 1(L1)의 참조 픽쳐들 중의 하나를 나타내는 참조 픽쳐 인덱스를 포함할 수 있다.When the current block is unidirectional inter prediction coded, it represents one of the reference pictures belonging to list 0 (L0), and when the current block is bidirectional predictively coded, it is a reference picture indicating one of the reference pictures of list 0 (L0). It may include an index and a reference picture index indicating one of the reference pictures of the list 1 (L1).

또한, 현재 블록이 양방향 예측 부호화되는 경우에는 리스트 0과 리스트 1을 결합하여 생성된 복합 리스트(LC)의 참조 픽쳐들 중의 1개 또는 2개의 픽쳐를 나타내는 인덱스를 포함할 수 있다.In addition, when the current block is bidirectional predictively coded, the current block may include an index indicating one or two pictures of reference pictures of the composite list LC generated by combining the list 0 and the list 1.

움직임 벡터는 각각의 참조 픽쳐 인덱스가 나타내는 픽쳐 내의 예측 블록의 위치를 나타내며, 상기 움직임 벡터는 화소 단위(정수 단위) 또는 서브 화소 단위일 수 있다.The motion vector indicates a position of a prediction block in a picture indicated by each reference picture index, and the motion vector may be in pixel units (integer units) or sub pixel units.

예를 들어, 상기 움직임 벡터는 1/2, 1/4, 1/8 또는 1/16 화소의 정밀도를 가질 수 있으며, 움직임 벡터가 정수단위가 아닐 경우 예측 블록은 정수 단위의 화소들로부터 생성될 수 있다.For example, the motion vector may have a precision of 1/2, 1/4, 1/8 or 1/16 pixels, and if the motion vector is not an integer unit, the prediction block may be generated from pixels of an integer unit. Can be.

움직임 정보 부호화 모드 결정부(162)는 현재 블록의 움직임 정보에 대한 부호화 모드를 결정할 수 있으며, 부호화 모드는 스킵 모드, 머지 모드 및 AMVP 모드 중 어느 하나로 예시될 수 있다.The motion information encoding mode determiner 162 may determine an encoding mode for the motion information of the current block, and the encoding mode may be exemplified as one of a skip mode, a merge mode, and an AMVP mode.

스킵 모드는 현재 블록의 움직임 정보와 동일한 움직임 정보를 갖는 스킵 후보자가 존재하고, 잔차 신호가 0인 경우에 적용되며, 상기 스킵 모드는 예측 유닛(PU)인 현재 블록이 코딩 유닛(CU)과 크기가 같을 때 적용될 수 있다.The skip mode is applied when there are skip candidates having the same motion information as the motion information of the current block and the residual signal is 0. The skip mode is that the current block, which is the prediction unit PU, has a size equal to that of the coding unit CU. Can be applied when

머지 모드는 현재 블록의 움직임 정보와 동일한 움직임 정보를 갖는 머지 후보자가 존재할 때 적용되며, 상기 머지 모드는 현재 블록이 코딩 유닛(CU)과 크기가 다르거나, 크기가 같을 경우에는 잔차 신호가 존재하는 경우에 적용된다. 한편, 머지 후보자와 스킵 후보자는 동일할 수 있다.The merge mode is applied when there is a merge candidate having the same motion information as the motion information of the current block, and the merge mode includes a residual signal when the current block has a different size or the same size as the coding unit CU. Applies in the case. Meanwhile, the merge candidate and the skip candidate may be the same.

AMVP 모드는 스킵 모드 및 머지 모드가 적용되지 않을 때 적용되며, 현재 블록의 움직임 벡터와 가장 유사한 움직임 벡터를 갖는 AMVP 후보자를 AMVP 예측자로 선택할 수 있다.The AMVP mode is applied when the skip mode and the merge mode are not applied, and an AMVP candidate having a motion vector most similar to the motion vector of the current block may be selected as an AMVP predictor.

다만, 상기 부호화 모드는 상기 예시된 방법 이외의 프로세스로서, 보다 세분화된 움직임 보상 예측 부호화 모드를 적응적으로 포함할 수 있다. 적응적으로 결정되는 움직임 보상 예측 모드는 전술한 AMVP 모드 및 머지 모드, 스킵 모드 뿐만 아니라, 현재 새로운 움직임 보상 예측 모드로 제안되고 있는 FRUC(FRAME RATE UP-CONVERSION) 모드, BIO(BI-DIRECTIONAL OPTICAL FLOW) 모드, AMP(AFFINE MOTION PREDICTION)모드, OBMC(OVERLAPPED BLOCK MOTION COMPENSATION) 모드, DMVR(DECODER-SIDE MOTION VECTOR REFINEMENT) 모드, ATMVP(Alternative temporal motion vector prediction) 모드, STMVP(Spatial-temporal motion vector prediction) 모드, LIC(Local Illumination Compensation) 모드 중 적어도 하나를 더 포함할 수 있으며, 사전 결정된 조건에 따라 블록 적응적으로 결정될 수 있다.However, the encoding mode is a process other than the illustrated method, and may adaptively include a more detailed motion compensation prediction encoding mode. The adaptively determined motion compensation prediction modes include the AMVP mode, merge mode, and skip mode described above, as well as FRUC (FRAME RATE UP-CONVERSION) mode and BIO (BI-DIRECTIONAL OPTICAL FLOW), which are currently proposed as a new motion compensation prediction mode. (AMP) mode, AMP (AFFINE MOTION PREDICTION) mode, OBMC (OVERLAPPED BLOCK MOTION COMPENSATION) mode, DMVR (DECODER-SIDE MOTION VECTOR REFINEMENT) mode, ATMVP (Alternative temporal motion vector prediction) mode, STMVP (Spatial-temporal motion vector prediction) mode The method may further include at least one of a mode and a local illumination compensation (LIC) mode, and may be adaptively determined according to a predetermined condition.

움직임 정보 부호화부(163)는 움직임 정보 부호화 모드 결정부(162)에 의해 결정된 방식에 따라 움직임 정보를 부호화할 수 있다.The motion information encoder 163 may encode motion information according to a method determined by the motion information encoding mode determiner 162.

예를 들어, 움직임 정보 부호화부(163)는 움직임 정보 부호화 모드가 스킵 모드 또는 머지 모드일 경우에는 머지 움직임 벡터 부호화 과정을 수행하며, AMVP 모드일 경우에는 AMVP 부호화 과정을 수행할 수 있다.For example, the motion information encoder 163 may perform a merge motion vector encoding process when the motion information encoding mode is a skip mode or a merge mode, and may perform an AMVP encoding process when the motion information encoding mode is an AMVP mode.

예측 블록 생성부(164)는 현재 블록의 움직임 정보를 이용하여 예측 블록을 생성하며, 움직임 벡터가 정수 단위일 경우 참조 픽쳐 인덱스가 나타내는 픽쳐 내의 움직임 벡터가 나타내는 위치에 대응하는 블록을 복사하여 현재 블록의 예측 블록을 생성한다.The prediction block generator 164 generates a prediction block by using the motion information of the current block. When the motion vector is an integer unit, the prediction block generator 164 copies the block corresponding to the position indicated by the motion vector in the picture indicated by the reference picture index, and then copies the current block. Generate a predictive block of.

한편, 움직임 벡터가 정수 단위가 아닌 경우, 예측 블록 생성부(164)는 참조 픽쳐 인덱스가 나타내는 픽쳐 내의 정수 단위 화소들로부터 예측 블록의 화소들을 생성할 수 있다.Meanwhile, when the motion vector is not an integer unit, the prediction block generator 164 may generate pixels of the prediction block from integer unit pixels in a picture indicated by the reference picture index.

이 경우, 휘도 화소에 대해 8탭의 보간 필터를 사용하여 예측 화소가 생성되며, 색차 화소에 대해서는 4탭 보간 필터를 사용하여 예측 화소가 생성될 수 있다.In this case, the prediction pixel may be generated using an 8-tap interpolation filter for the luminance pixel, and the prediction pixel may be generated using a 4-tap interpolation filter for the chrominance pixel.

잔차 블록 생성부(165)는 현재 블록과 현재 블록의 예측 블록을 이용하여 잔차 블록을 생성하며, 현재 블록의 크기가 2Nx2N인 경우 현재 블록과 현재 블록에 대응하는 2Nx2N 크기의 예측 블록을 이용하여 잔차 블록을 생성할 수 있다.The residual block generator 165 generates a residual block using the current block and the prediction block of the current block. When the size of the current block is 2Nx2N, the residual block generator 165 uses the prediction block having a size of 2Nx2N corresponding to the current block and the current block. You can create a block.

한편, 예측에 이용되는 현재 블록의 크기가 2NxN 또는 Nx2N인 경우, 2Nx2N을 구성하는 2개의 2NxN 블록 각각에 대한 예측 블록을 구한 후, 상기 2개의 2NxN 예측 블록을 이용하여 2Nx2N 크기의 최종 예측 블록이 생성될 수 있다.On the other hand, when the size of the current block used for prediction is 2NxN or Nx2N, after obtaining the prediction block for each of the two 2NxN blocks constituting the 2Nx2N, the last prediction block of 2Nx2N size using the two 2NxN prediction blocks Can be generated.

또한, 상기 2Nx2N 크기의 예측 블록을 이용하여 2Nx2N 크기의 잔차 블록이 생성될 수도 있으며, 2NxN 크기를 가지는 2개의 예측 블록들의 경계 부분의 불연속성을 해소하기 위해 경계 부분의 픽셀들에 대해 오버랩 스무딩이 적용될 수 있다.In addition, a 2Nx2N sized residual block may be generated using the 2Nx2N sized prediction block, and overlap smoothing is applied to the pixels of the boundary part to eliminate discontinuity of the boundary parts of two prediction blocks having 2NxN size. Can be.

잔차 블록 부호화부(166)는 상기 잔차 블록을 하나 이상의 변환 유닛(TU)들로 분할하여, 각각의 변환 유닛(TU)이 변환 부호화, 양자화 및 엔트로피 부호화될 수 있다.The residual block encoder 166 may divide the residual block into one or more transform units (TUs) so that each transform unit TU may be transform encoded, quantized, and entropy encoded.

잔차 블록 부호화부(166)는 인터 예측 방법에 의해 생성된 잔차 블록을 정수기반 변환 매트릭스를 이용하여 변환할 수 있으며, 상기 변환 매트릭스는 정수기반 DCT 매트릭스일 수 있다.The residual block encoder 166 may transform the residual block generated by the inter prediction method using an integer-based transform matrix, and the transform matrix may be an integer-based DCT matrix.

한편, 잔차 블록 부호화부(166)는 변환 매트릭스에 의해 변환된 잔차 블록의 계수들을 양자화하기 위해 양자화 매트릭스를 이용하며, 상기 양자화 매트릭스는 양자화 파라미터에 의해 결정될 수 있다.Meanwhile, the residual block encoder 166 uses a quantization matrix to quantize coefficients of the residual block transformed by the transform matrix, and the quantization matrix may be determined by a quantization parameter.

상기 양자화 파라미터는 미리 정해진 크기 이상의 코딩 유닛(CU) 별로 결정되며, 현재 코딩 유닛(CU)이 상기 미리 정해진 크기보다 작은 경우 상기 미리 정해진 크기 내의 코딩 유닛(CU)들 중 부호화 순서상 첫번째 코딩 유닛(CU)의 양자화 파라미터만을 부호화하고 나머지 코딩 유닛(CU)의 양자화 파라미터는 상기 파라미터와 동일하므로 부호화하지 않을 수 있다.The quantization parameter is determined for each coding unit CU having a predetermined size or more, and when the current coding unit CU is smaller than the predetermined size, the first coding unit in the coding order among the coding units CU within the predetermined size ( Since only the quantization parameter of the CU) is encoded and the quantization parameter of the remaining coding unit CU is the same as the above parameter, it may not be encoded.

또한, 상기 양자화 파라미터 및 예측 모드에 따라 결정되는 양자화 매트릭스를 이용하여 상기 변환 블록의 계수들이 양자화될 수 있다.In addition, coefficients of the transform block may be quantized using a quantization matrix determined according to the quantization parameter and the prediction mode.

상기 미리 정해진 크기 이상의 코딩 유닛(CU) 별로 결정되는 양자화 파라미터는 현재 코딩 유닛(CU)에 인접한 코딩 유닛(CU)의 양자화 파라미터를 이용하여 예측 부호화될 수 있다.The quantization parameter determined for each coding unit CU having a predetermined size or more may be predictively encoded using the quantization parameter of the coding unit CU adjacent to the current coding unit CU.

현재 코딩 유닛(CU)의 좌측 코딩 유닛(CU), 상측 코딩 유닛(CU) 순서로 검색하여 유효한 1개 또는 2개의 유효한 양자화 파라미터를 이용하여 현재 코딩 유닛(CU)의 양자화 파라미터 예측자를 생성할 수 있다.A quantization parameter predictor of the current coding unit CU may be generated by searching in the order of the left coding unit CU and the upper coding unit CU of the current coding unit CU using one or two valid quantization parameters. have.

예를 들어, 상기 순서로 검색된 유효한 첫번째 양자화 파라미터를 양자화 파라미터 예측자로 결정할 수 있으며, 또한 좌측 코딩 유닛(CU), 부호화 순서상 바로 이전의 코딩 유닛(CU) 순으로 검색하여 유효한 첫번째 양자화 파라미터를 양자화 파라미터 예측자로 결정할 수 있다.For example, the first valid quantization parameter found in the above order may be determined as a quantization parameter predictor, and the left first coding unit (CU) is searched in order of the coding unit immediately before the coding order to quantize the first valid quantization parameter. Can be determined by the parameter predictor.

양자화된 변환 블록의 계수들은 스캐닝되어 1차원의 양자화 계수들로 변환되며, 스캐닝 방식은 엔트로피 부호화 모드에 따라 다르게 설정될 수 있다.The coefficients of the quantized transform block are scanned and converted into one-dimensional quantization coefficients, and the scanning scheme may be set differently according to the entropy encoding mode.

예를 들어, CABAC으로 부호화될 경우 인터 예측 부호화된 양자화 계수들은 미리 정해진 하나의 방식(지그재그, 또는 대각선 방향으로의 래스터 스캔)으로 스캐닝될 수 있으며, CAVLC으로 부호화될 경우 상기 방식과 다른 방식으로 스캐닝될 수 있다.For example, inter prediction coded quantization coefficients may be scanned in a predetermined manner (zigzag or diagonal raster scan) when coded with CABAC, and different from the above method when coded with CAVLC. Can be.

예를 들어, 스캐닝 방식이 인터의 경우에는 지그재그, 인트라의 경우에는 인트라 예측 모드에 따라 결정될 수 있으며, 계수 스캐닝 방식은 변환 단위의 크기에 따라 상이하게 결정될 수도 있다.For example, the scanning method may be determined according to zigzag in case of inter, the intra prediction mode in case of intra, and the coefficient scanning method may be determined differently according to the size of a transform unit.

한편, 상기 스캔 패턴은 방향성 인트라 예측 모드에 따라 달라질 수 있으며, 양자화 계수들의 스캔 순서는 역방향으로 스캔 될 수 있다.Meanwhile, the scan pattern may vary according to the directional intra prediction mode, and the scanning order of the quantization coefficients may be scanned in the reverse direction.

멀티플렉서(167)는 상기 움직임 정보 부호화부(163)에 의해 부호화된 움직임 정보들과 상기 잔차 블록 부호화부(166)에 의해 부호화된 잔차 신호들을 다중한다.The multiplexer 167 multiplexes the motion information encoded by the motion information encoder 163 and the residual signals encoded by the residual block encoder 166.

상기 움직임 정보는 부호화 모드에 따라 달라질 수 있으며, 예를 들어 스킵 또는 머지일 경우에는 예측자를 나타내는 인덱스만을 포함하고, AMVP일 경우 현재 블록의 참조 픽쳐 인덱스, 차분 움직임 벡터 및 AMVP 인덱스를 포함할 수 있다.The motion information may vary according to an encoding mode. For example, in case of skip or merge, the motion information may include only an index indicating a predictor, and in the case of AMVP, the motion information may include a reference picture index, a differential motion vector, and an AMVP index of the current block. .

이하, 도 1에 도시된 인트라 예측부(150)의 동작에 대한 일실시예를 상세히 설명하기로 한다.Hereinafter, an embodiment of the operation of the intra predictor 150 shown in FIG. 1 will be described in detail.

먼저, 인트라 예측부(150)는 픽쳐 분할부(110)로부터 예측 모드 정보 및 예측 유닛(PU)의 크기를 수신하며, 예측 유닛(PU)의 인트라 예측 모드를 결정하기 위해 참조 화소를 픽쳐 저장부(180)로부터 읽어들일 수 있다.First, the intra prediction unit 150 receives the prediction mode information and the size of the prediction unit PU from the picture division unit 110, and stores the reference pixel in the picture storage unit to determine the intra prediction mode of the prediction unit PU. Read from 180.

인트라 예측부(150)는 이용 가능하지 않은 참조 화소가 존재하는지 여부를 검토하여 참조 화소 생성 여부를 판단하며, 상기 참조 화소들은 현재 블록의 인트라 예측 모드를 결정하는데 사용될 수 있다.The intra predictor 150 determines whether a reference pixel is generated by examining whether there is a reference pixel that is not available, and the reference pixels may be used to determine an intra prediction mode of the current block.

현재 블록이 현재 픽쳐의 상측 경계에 위치하는 경우에는 현재 블록의 상측에 인접한 화소들이 정의되지 않고, 현재 블록이 현재 픽쳐의 좌측 경계에 위치하는 경우에는 현재 블록의 좌측에 인접한 화소들이 정의되지 않으며, 상기 화소들은 이용 가능한 화소들이 아닌 것으로 판단될 수 있다.If the current block is located at the upper boundary of the current picture, pixels adjacent to the upper side of the current block are not defined. If the current block is located at the left boundary of the current picture, pixels adjacent to the left of the current block are not defined. It may be determined that the pixels are not available pixels.

또한, 현재 블록이 슬라이스 경계에 위치하여 슬라이스의 상측 또는 좌측에 인접하는 화소들이 먼저 부호화되어 복원되는 화소들이 아닌 경우에도 이용 가능한 화소들이 아닌 것으로 판단될 수 있다.In addition, even when the current block is located at the slice boundary and pixels adjacent to the upper or left side of the slice are not pixels that are first encoded and reconstructed, it may be determined that the pixels are not available pixels.

상기와 같이 현재 블록의 좌측 또는 상측에 인접한 화소들이 존재하지 않거나, 미리 부호화되어 복원된 화소들이 존재하지 않는 경우, 이용 가능한 화소들만을 이용하여 현재 블록의 인트라 예측 모드가 결정될 수도 있다.As described above, when there are no pixels adjacent to the left side or the upper side of the current block or there are no pre-coded and reconstructed pixels, the intra prediction mode of the current block may be determined using only the available pixels.

한편, 현재 블록의 이용 가능한 참조 화소들을 이용하여 이용 가능하지 않은 위치의 참조 화소가 생성될 수도 있으며, 예를 들어 상측 블록의 화소들이 이용 가능하지 않은 경우 좌측 화소들의 일부 또는 전부를 이용하여 상측 화소들을 생성할 수 있고, 그 역으로도 가능하다.On the other hand, a reference pixel of a position that is not available may be generated by using the available reference pixels of the current block, for example, when the pixels of the upper block are not available, the upper pixel using some or all of the left pixels. Can be generated and vice versa.

즉, 이용 가능하지 않은 위치의 참조 화소로부터 미리 정해진 방향으로 가장 가까운 위치의 이용 가능한 참조 화소를 복사하여 참조 화소가 생성되거나, 미리 정해진 방향에 이용 가능한 참조 화소가 존재하지 않는 경우 반대 방향의 가장 가까운 위치의 이용 가능한 참조 화소를 복사하여 참조 화소가 생성될 수 있다.That is, the reference pixel is generated by copying the available reference pixel at the position closest to the predetermined direction from the reference pixel at the position not available, or when the reference pixel is not available in the predetermined direction, the closest in the opposite direction. The reference pixel can be generated by copying the available reference pixel at the location.

한편, 현재 블록의 상측 또는 좌측 화소들이 존재하는 경우에도 상기 화소들이 속하는 블록의 부호화 모드에 따라 이용 가능하지 않은 참조 화소로 결정될 수 있다.Meanwhile, even when the upper or left pixels of the current block exist, it may be determined as a reference pixel that is not available according to the encoding mode of the block to which the pixels belong.

예를 들어, 현재 블록의 상측에 인접한 참조 화소가 속하는 블록이 인터 부호화되어 복원된 블록일 경우, 상기 화소들을 이용 가능하지 않은 화소들로 판단할 수 있다.For example, when a block to which a reference pixel adjacent to an upper side of the current block belongs is a block that is inter-coded and reconstructed, the pixels may be determined as not available pixels.

이 경우, 현재 블록에 인접한 블록이 인트라 부호화되어 복원된 블록에 속하는 화소들을 이용하여 이용 가능한 참조 화소들이 생성될 수 있으며, 부호화 장치(10)가 부호화 모드에 따라 이용 가능한 참조 화소를 판단한다는 정보를 복호화 장치(20)로 전송한다.In this case, reference pixels usable may be generated using pixels belonging to a block in which a block adjacent to the current block is intra-encoded, and information indicating that the encoding apparatus 10 determines available reference pixels according to an encoding mode. It transmits to the decoding apparatus 20.

인트라 예측부(150)는 상기 참조 화소들을 이용하여 현재 블록의 인트라 예측 모드를 결정하며, 현재 블록에 허용 가능한 인트라 예측 모드의 수는 블록의 크기에 따라 달라질 수 있다.The intra predictor 150 determines the intra prediction mode of the current block by using the reference pixels, and the number of intra prediction modes allowable in the current block may vary depending on the size of the block.

예를 들어, 현재 블록의 크기가 8x8, 16x16, 32x32인 경우에는 34개의 인트라 예측 모드가 존재할 수 있고, 현재 블록의 크기가 4x4인 경우에는 17개의 인트라 예측 모드가 존재할 수 있다.For example, if the size of the current block is 8x8, 16x16, 32x32, 34 intra prediction modes may exist, and if the size of the current block is 4x4, 17 intra prediction modes may exist.

상기 34개 또는 17개의 인트라 예측 모드는 적어도 하나 이상의 비방향성 모드(비 directional 모드)와 복수개의 방향성 모드들(directional 모드s)로 구성될 수 있다.The 34 or 17 intra prediction modes may be configured of at least one non-directional mode (non-directional mode) and a plurality of directional modes.

하나 이상의 비방향성 모드는 DC 모드 및/또는 플래너(planar) 모드일수 있다. DC 모드 및 플래너모드가 비방향성 모드로 포함되는 경우에는, 현재 블록의 크기에 관계없이 35개의 인트라 예측 모드가 존재할 수도 있다.One or more non-directional modes may be DC mode and / or planar mode. When the DC mode and the planner mode are included in the non-directional mode, there may be 35 intra prediction modes regardless of the size of the current block.

이 경우, 2개의 비방향성 모드(DC 모드 및 플래너 모드)와 33개의 방향성 모드가 포함될 수 있다.In this case, two non-directional modes (DC mode and planner mode) and 33 directional modes may be included.

플래너 모드의 경우, 현재 블록의 우하측(bottom-right)에 위치하는 적어도 하나의 화소값(또는 상기 화소값의 예측값, 이하 제1 참조값이라 함)과 참조 화소들을 이용하여 현재 블록의 예측 블록이 생성된다.In the planner mode, the prediction block of the current block is formed by using at least one pixel value (or a prediction value of the pixel value, hereinafter referred to as a first reference value) and reference pixels positioned at the bottom-right side of the current block. Is generated.

본 발명의 일실시예에 따른 영상 복호화 장치의 구성은 도 1 내지 도 6을 참조하여 설명한 영상 부호화 장치(10)의 구성으로부터 도출될 수 있으며, 예를 들어 도 1 내지 도 6을 참조하여 설명한 바와 같은 영상 부호화 방법의 과정들을 역으로 수행함으로써 영상을 복호화할 수 있다.The configuration of an image decoding apparatus according to an embodiment of the present invention may be derived from the configuration of the image encoding apparatus 10 described with reference to FIGS. 1 to 6. For example, as described with reference to FIGS. 1 to 6. By performing the same processes of the same image encoding method in reverse, the image can be decoded.

도 7은 본 발명의 일실시예에 따른 동영상 복호화 장치의 구성을 블록도로 도시한 것으로, 복호화 장치(20)는 엔트로피 복호화부(210), 역양자화/역변환부(220), 가산기(270), 후처리부(250), 픽쳐 저장부(260), 인트라 예측부(230), 움직임 보상 예측부(240) 및 인트라/인터전환 스위치(280)를 구비한다.7 is a block diagram illustrating a configuration of a video decoding apparatus according to an embodiment of the present invention. The decoding apparatus 20 includes an entropy decoding unit 210, an inverse quantization / inverse transform unit 220, an adder 270, The post processor 250, the picture storage unit 260, the intra predictor 230, the motion compensation predictor 240, and the intra / inter switch 280 are provided.

엔트로피 복호화부(210)는, 영상 부호화 장치(10)에서 부호화된 비트 스트림을 입력받아 복호화하여 인트라 예측 모드 인덱스, 움직임 정보, 양자화 계수 시퀀스 등으로 분리하며, 복호화된 움직임 정보를 움직임 보상 예측부(240)로 전달한다.The entropy decoder 210 receives and decodes a bit stream encoded by the image encoding apparatus 10, divides the bit stream into intra prediction mode indexes, motion information, quantization coefficient sequences, and the like, and decodes the decoded motion information into a motion compensation predictor ( 240).

엔트로피 복호화부(210)는 인트라 예측 모드 인덱스를 인트라 예측부(230)와 역양자화/역변환부(220)로 전달하여, 역양자화 계수 시퀀스를 역양자화/역변환부(220)로 전달한다.The entropy decoder 210 transmits the intra prediction mode index to the intra predictor 230 and the inverse quantization / inverse transform unit 220, and transmits the inverse quantization coefficient sequence to the inverse quantization / inverse transform unit 220.

역양자화/역변환부(220)는 상기 양자화 계수 시퀀스를 2차원 배열의 역양자화 계수로 변환하며, 상기 변환을 위해 복수의 스캐닝 패턴들 중 하나를 선택할 수 있으며 예를 들어 현재 블록의 예측 모드(즉, 인트라 예측 또는 인터 예측)와 인트라 예측 모드에 기초하여 스캐닝 패턴을 선택할 수 있다.The inverse quantization / inverse transform unit 220 converts the quantization coefficient sequence into inverse quantization coefficients of a two-dimensional array, and selects one of a plurality of scanning patterns for the transformation, for example, the prediction mode of the current block (ie, , Intra prediction or inter prediction), and a scanning pattern may be selected based on the intra prediction mode.

역양자화/역변환부(220)는 2차원 배열의 역양자화 계수에 대해 복수의 양자화 매트릭스들 중에서 선택된 양자화 매트릭스를 적용하여 양자화 계수를 복원한다.The inverse quantization / inverse transform unit 220 restores the quantization coefficients by applying a quantization matrix selected from a plurality of quantization matrices to the inverse quantization coefficients of the two-dimensional array.

한편, 복원하고자 하는 현재 블록의 크기에 따라 서로 다른 양자화 매트릭스가 적용되며, 동일 크기의 블록에 대해서도 상기 현재 블록의 예측 모드 및 인트라 예측 모드 중 적어도 하나에 기초하여 양자화 매트릭스가 선택될 수 있다.Meanwhile, different quantization matrices are applied according to the size of the current block to be reconstructed, and a quantization matrix may be selected based on at least one of the prediction mode and the intra prediction mode of the current block for the same size block.

역양자화/역변환부(220)는 상기 복원된 양자화 계수를 역변환하여 잔차 블록을 복원하며, 상기 역변환 과정은 변환 유닛(TU)을 기본 단위로 하여 수행될 수 있다.The inverse quantization / inverse transform unit 220 inversely transforms the reconstructed quantization coefficients to reconstruct the residual block, and the inverse transform process may be performed using a transform unit (TU) as a basic unit.

가산기(270)는 역양자화/역변환부(220)에 의해 복원된 잔차 블록과 인트라 예측부(230) 또는 움직임 보상 예측부(240)에 의해 생성되는 예측 블록을 합하여 영상 블록을 복원한다.The adder 270 reconstructs the image block by adding the residual block reconstructed by the inverse quantization / inverse transform unit 220 and the prediction block generated by the intra predictor 230 or the motion compensation predictor 240.

후처리부(250)는 가산기(270)에 의해 생성된 복원 영상에 후처리를 수행하여, 필터링 등에 의해 양자화 과정에 따른 영상 손실에 기인하는 디블록킹 아티펙트 등을 감소시킬 수 있다.The post processor 250 may perform post-processing on the reconstructed image generated by the adder 270 to reduce deblocking artifacts due to image loss due to quantization by filtering or the like.

픽쳐 저장부(260)는 후처리부(250)에 의해 필터 후처리가 수행된 로컬 복호 영상을 저장하기 위한 프레임 메모리이다.The picture storage unit 260 is a frame memory for storing a local decoded image that has been subjected to filter post-processing by the post-processor 250.

인트라 예측부(230)는 엔트로피 복호화부(210)로부터 수신된 인트라 예측 모드 인덱스에 기초하여 현재 블록의 인트라 예측 모드를 복원하고, 복원된 인트라 예측 모드에 따라 예측 블록을 생성한다.The intra predictor 230 restores the intra prediction mode of the current block based on the intra prediction mode index received from the entropy decoder 210, and generates a prediction block according to the restored intra prediction mode.

움직임 보상 예측부(240)는 움직임 벡터 정보에 기초하여 픽쳐 저장부(260)에 저장된 픽쳐로부터 현재 블록에 대한 예측 블록을 생성하며, 소수 정밀도의 움직임 보상이 적용될 경우 선택된 보간 필터를 적용하여 예측 블록을 생성할 수 있다.The motion compensation predictor 240 generates a prediction block for the current block from the picture stored in the picture storage unit 260 based on the motion vector information, and applies the selected interpolation filter when a motion compensation with a small precision is applied. Can be generated.

인트라/인터 전환 스위치(280)는 부호화 모드에 기초하여 인트라 예측부(230)와 움직임 보상 예측부(240)의 어느 하나에서 생성된 예측 블록을 가산기(270)에 제공할 수 있다.The intra / inter switch 280 may provide the adder 270 with the prediction block generated by either the intra predictor 230 or the motion compensation predictor 240 based on the encoding mode.

도 8는 영상 복호화 장치(20)에서 인터 예측을 수행하는 구성에 대한 일실시예를 블록도로 도시한 것으로, 인터 예측 복호화기는 디멀티플렉서(241), 움직임 정보 부호화 모드 판단부(242), 머지 모드 움직임 정보 복호화부(243), AMVP 모드 움직임 정보 복호화부(244), 선택 모드 움직임 정보 복호화부(248), 예측블록 생성부(245), 잔차 블록 복호화부(246) 및 복원블록 생성부(247)를 포함한다.FIG. 8 is a block diagram illustrating an example of a configuration of performing inter prediction in the image decoding apparatus 20. The inter prediction decoder includes a demultiplexer 241, a motion information encoding mode determiner 242, and a merge mode motion. An information decoder 243, an AMVP mode motion information decoder 244, a selection mode motion information decoder 248, a predictive block generator 245, a residual block decoder 246, and a reconstructed block generator 247. It includes.

도 8을 참조하면, 디-멀티플렉서(241)는 수신된 비트스트림으로부터 현재 부호화된 움직임 정보와 부호화된 잔차 신호들을 역다중화하여, 역다중화된 움직임 정보를 움직임 정보 부호화 모드 판단부(242)로 전송하고, 역다중화된 잔차신호를 잔차블록 복호화부(246)로 전송할 수 있다.Referring to FIG. 8, the de-multiplexer 241 demultiplexes the currently encoded motion information and the encoded residual signals from the received bitstream, and transmits the demultiplexed motion information to the motion information encoding mode determiner 242. The demultiplexed residual signal may be transmitted to the residual block decoder 246.

움직임 정보 부호화 모드 판단부(242)는 현재 블록의 움직임 정보 부호화 모드를 판단하며, 수신된 비트스트림의 skip_flag가 1의 값을 갖는 경우 현재 블록의 움직임 정보 부호화 모드가 스킵 부호화 모드로 부호화된 것으로 판단할 수 있다.The motion information encoding mode determiner 242 determines the motion information encoding mode of the current block. If the skip_flag of the received bitstream has a value of 1, the motion information encoding mode determiner 242 determines that the motion information encoding mode of the current block is encoded as the skip encoding mode. can do.

움직임 정보 부호화 모드 판단부(242)는 수신된 비트스트림의 skip_flag가 0의 값을 갖고, 디-멀티블렉서(241)로부터 수신된 움직임 정보가 머지 인덱스만을 갖는 경우, 현재 블록의 움직임 정보 부호화 모드가 머지 모드로 부호화된 것으로 판단할 수 있다.If the skip_flag of the received bitstream has a value of 0 and the motion information received from the de-multiplexer 241 has only a merge index, the motion information encoding mode determiner 242 determines the motion information encoding mode of the current block. It may be determined that is encoded in the merge mode.

또한, 움직임 정보 부호화 모드 판단부(242)는 수신된 비트스트림의 skip_flag가 0의 값을 갖고, 디멀티블렉서(241)로부터 수신된 움직임 정보가 참조 픽쳐 인덱스와 차분 움직임 벡터와 AMVP인덱스를 갖는 경우, 현재 블록의 움직임 정보 부호화 모드가 AMVP 모드로 부호화된 것으로 판단할 수 있다.In addition, the motion information encoding mode determiner 242 has a skip_flag of the received bitstream having a value of 0, and the motion information received from the demultiplexer 241 has a reference picture index, a differential motion vector, and an AMVP index. In this case, it may be determined that the motion information encoding mode of the current block is encoded in the AMVP mode.

머지 모드 움직임 정보 복호화부(243)는 움직임 정보 부호화 모드 판단부(242)가 현재 블록의 움직임 정보 부호화 모드를 스킵 또는 머지 모드로 판단한 경우에 활성화되며, AMVP 모드 움직임 정보 복호화부(244)는 움직임 정보 부호화 모드 판단부(242)가 현재 블록의 움직임 정보 부호화 모드를 AMVP 모드로 판단한 경우에 활성화될 수 있다.The merge mode motion information decoder 243 is activated when the motion information encoding mode determiner 242 determines that the motion information encoding mode of the current block is a skip or merge mode, and the AMVP mode motion information decoder 244 moves. The information encoding mode determiner 242 may be activated when the motion information encoding mode of the current block is determined to be an AMVP mode.

선택 모드 움직임 정보 복호화부(248)는 전술한 AMVP 모드, 머지 모드, 스킵 모드를 제외한 다른 움직임 보상 예측 모드 중 선택된 예측 모드로 움직임 정보를 복호화 처리할 수 있다. 선택 예측 모드는 AMVP 모드 대비 더 정밀한 움직임 예측 모드를 포함할 수 있으며, 미리 결정된 조건(예를 들어, 블록 크기 및 블록 분할 정보, 시그널링 정보 존재, 블록 위치 등)에 따라 블록 적응적으로 결정될 수 있다. 선택 예측 모드는 예를 들어, FRUC(FRAME RATE UP-CONVERSION) 모드, BIO(BI-DIRECTIONAL OPTICAL FLOW) 모드, AMP(AFFINE MOTION PREDICTION)모드, OBMC(OVERLAPPED BLOCK MOTION COMPENSATION) 모드, DMVR(DECODER-SIDE MOTION VECTOR REFINEMENT) 모드, ATMVP(Alternative temporal motion vector prediction) 모드, STMVP(Spatial-temporal motion vector prediction) 모드, LIC(Local Illumination Compensation) 모드 중 적어도 하나를 포함할 수 있다.The selection mode motion information decoder 248 may decode the motion information in a prediction mode selected from other motion compensation prediction modes except for the above-described AMVP mode, merge mode, and skip mode. The selection prediction mode may include a motion prediction mode that is more precise than the AMVP mode, and may be adaptively determined according to predetermined conditions (eg, block size and block partitioning information, signaling information present, block position, etc.). . Selective prediction modes are, for example, FRAME (FRAME RATE UP-CONVERSION) mode, BIO (BI-DIRECTIONAL OPTICAL FLOW) mode, AMP (AFFINE MOTION PREDICTION) mode, OBMC (OVERLAPPED BLOCK MOTION COMPENSATION) mode, DMVR (DECODER-SIDE) It may include at least one of a MOTION VECTOR REFINEMENT mode, an alternate temporal motion vector prediction (ATMVP) mode, a spatial-temporal motion vector prediction (STMVP) mode, and a local illumination compensation (LIC) mode.

예측블록 생성부(245)는 머지 모드 움직임 정보 복호화부(243) 또는 AMVP 모드 움직임 정보 복호화부(244)에 의해 복원된 움직임 정보를 이용하여 현재 블록의 예측 블록을 생성한다.The prediction block generator 245 generates the prediction block of the current block by using the motion information reconstructed by the merge mode motion information decoder 243 or the AMVP mode motion information decoder 244.

움직임 벡터가 정수 단위일 경우, 참조 픽쳐 인덱스가 나타내는 픽쳐 내의 움직임 벡터가 나타내는 위치에 대응하는 블록을 복사하여 현재 블록의 예측 블록이 생성될 수 있다.When the motion vector is an integer unit, the prediction block of the current block may be generated by copying a block corresponding to the position indicated by the motion vector in the picture indicated by the reference picture index.

한편, 움직임 벡터가 정수 단위가 아닐 경우, 참조 픽쳐 인덱스가 나타내는 픽쳐 내의 정수 단위 화소들로부터 예측 블록의 화소들이 생성되며, 이 경우 휘도 화소의 경우에는 8탭의 보간 필터를 사용하고 색차 화소의 경우 4탭 보간 필터를 사용하여 예측 화소가 생성될 수 있다.On the other hand, when the motion vector is not an integer unit, pixels of the prediction block are generated from integer unit pixels in the picture indicated by the reference picture index. In this case, an interpolation filter of 8 taps is used for a luminance pixel and a chrominance pixel is used. Predictive pixels may be generated using a 4-tap interpolation filter.

잔차 블록 복호화부(246)는 잔차 신호를 엔트로피 복호화하고, 엔트로피 복호화된 계수들을 역스캐닝하여 2차원의 양자화된 계수 블록을 생성하며, 역스캐닝 방식은 엔트로피 복호화 방식에 따라 달라질 수 있다.The residual block decoder 246 entropy decodes the residual signal and inversely scans the entropy decoded coefficients to generate a two-dimensional quantized coefficient block, and the inverse scanning scheme may vary according to an entropy decoding scheme.

예를 들어, CABAC 기반으로 복호화된 경우 대각선 방향의 래스터 역스캔 방식으로, CAVLC 기반으로 복호화된 경우에는 지그재그 역스캔 방식으로 상기 역스캐닝 방식이 적용될 수 있다. 또한, 예측 블록의 크기에 따라 상기 역스캐닝 방식이 상이하게 결정될 수도 있다.For example, when the CABAC-based decoding is performed, the reverse scanning method may be applied in a diagonal raster inverse scan manner and in the case of the CAVLC-based decoding in a zigzag inverse scanning manner. In addition, the inverse scanning scheme may be determined differently according to the size of the prediction block.

잔차블록 복호화부(246)는 상기와 같이 생성된 계수블록을 역양자화 매트릭스를 이용하여 역양자화하며, 상기 양자화 매트릭스를 유도하기 위해 양자화 파리미터를 복원할 수 있다. 여기서, 양자화 스텝 사이즈는 미리 정해진 크기 이상의 코딩 유닛별로 복원될 수 있다.The residual block decoder 246 dequantizes the coefficient block generated as described above using an inverse quantization matrix, and reconstructs a quantization parameter to derive the quantization matrix. Here, the quantization step size may be reconstructed for each coding unit of a predetermined size or more.

잔차블록 복호화부(260)는 상기 역양자화된 계수 블록을 역변환하여 잔차블록을 복원한다.The residual block decoder 260 inversely transforms the inverse quantized coefficient block to restore the residual block.

복원블록 생성부(270)는 상기 예측블록 생성부(250)에 의해 생성된 예측 블록과 상기 잔차블록 복호화부(260)에 의하여 생성된 잔차 블록을 더하여 복원 블록을 생성한다.The reconstruction block generation unit 270 generates a reconstruction block by adding the prediction block generated by the prediction block generation unit 250 and the residual block generated by the residual block decoding unit 260.

이하, 현재 블록을 인트라 예측을 통해 복원하는 과정에 대한 일실시예를 도 7을 다시 참조하여 설명한다.Hereinafter, an embodiment of a process of reconstructing the current block through intra prediction will be described with reference to FIG. 7 again.

먼저, 수신된 비트스트림으로부터 현재 블록의 인트라 예측 모드가 복호화되며, 그를 위해 엔트로피 복호화부(210)는 복수의 인트라 예측 모드 테이블들 중 하나를 참조하여 현재 블록의 제1 인트라 예측 모드 인덱스를 복원할 수 있다.First, the intra prediction mode of the current block is decoded from the received bitstream, and for this purpose, the entropy decoder 210 may reconstruct the first intra prediction mode index of the current block by referring to one of the plurality of intra prediction mode tables. Can be.

상기 복수의 인트라 예측 모드 테이블들 부호화 장치(10)와 복호화 장치(20)가 공유하는 테이블로서, 현재 블록에 인접한 복수 블록들에 대한 인트라 예측 모드의 분포에 따라 선택된 어느 하나의 테이블이 적용될 수 있다.As the table shared by the plurality of intra prediction mode tables encoding apparatus 10 and the decoding apparatus 20, any one table selected according to the distribution of intra prediction modes for a plurality of blocks adjacent to the current block may be applied. .

예를 들어, 현재 블록의 좌측 블록의 인트라 예측 모드와 현재 블록의 상측 블록의 인트라 예측 모드가 동일하면 제1 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원하고, 동일하지 않으면 제2 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원할 수 있다.For example, if the intra prediction mode of the left block of the current block and the intra prediction mode of the upper block of the current block are the same, the first intra prediction mode index of the current block is restored by applying the first intra prediction mode table, and not the same. Otherwise, the second intra prediction mode table may be applied to restore the first intra prediction mode index of the current block.

또 다른 예로써, 현재 블록의 상측 블록과 좌측 블록의 인트라 예측 모드가 모두 방향성 예측 모드(directional intra prediction 모드)일 경우, 상기 상측 블록의 인트라 예측 모드의 방향과 상기 좌측 블록의 인트라 예측 모드의 방향이 소정 각도 이내이면 제 1 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원하고, 소정 각도를 벗어나면 제2 인트라 예측 모드 테이블을 적용하여 현재 블록의 제 1 인트라 예측 모드 인덱스를 복원할 수도 있다.As another example, when the intra prediction modes of the upper block and the left block of the current block are both the directional intra prediction mode, the direction of the intra prediction mode of the upper block and the direction of the intra prediction mode of the left block. If within this predetermined angle, the first intra prediction mode index is restored by applying the first intra prediction mode table, and if outside the predetermined angle, the first intra prediction mode index is applied by applying the second intra prediction mode table. You can also restore.

엔트로피 복호화부(210)는 복원된 현재 블록의 제1 인트라 예측 모드 인덱스를 인트라 예측부(230)로 전송한다.The entropy decoder 210 transmits the first intra prediction mode index of the reconstructed current block to the intra predictor 230.

제1 인트라 예측 모드를 인덱스를 수신한 인트라 예측부(230)는, 상기 인덱스가 최소값을 가질 경우(즉, 0일 경우), 현재 블록의 최대 가능 모드를 현재 블록의 인트라 예측 모드로 결정할 수 있다.The intra prediction unit 230 that receives the index of the first intra prediction mode may determine the maximum possible mode of the current block as the intra prediction mode of the current block when the index has the minimum value (ie, 0). .

한편, 인트라 예측부(230)는, 상기 인덱스가 0 이외의 값을 가질 경우, 현재 블록의 최대 가능 모드가 나타내는 인덱스와 상기 제1 인트라 예측 모드 인덱스를 비교하고, 비교 결과 상기 제1 인트라 예측 모드 인덱스가 상기 현재 블록의 최대 가능 모드가 나타내는 인덱스보다 작지 않으면 상기 제1 인트라 예측 모드 인덱스에 1을 더한 제2 인트라 예측 모드 인덱스에 대응하는 인트라 예측 모드를 현재 블록의 인트라 예측 모드로 결정하고, 그렇지 않으면 상기 제1 인트라 예측 모드 인덱스에 대응하는 인트라 예측 모드를 현재 블록의 인트라 예측 모드로 결정할 수 있다.Meanwhile, when the index has a value other than 0, the intra prediction unit 230 compares the index indicated by the maximum possible mode of the current block with the first intra prediction mode index, and as a result of the comparison, the first intra prediction mode. If the index is not smaller than the index indicated by the maximum possible mode of the current block, the intra prediction mode corresponding to the second intra prediction mode index obtained by adding 1 to the first intra prediction mode index is determined as the intra prediction mode of the current block. Otherwise, the intra prediction mode corresponding to the first intra prediction mode index may be determined as the intra prediction mode of the current block.

현재 블록에 허용 가능한 인트라 예측 모드는 적어도 하나 이상의 비방향성 모드(비 directional 모드)와 복수 개의 방향성 모드들(directional 모드s)로 구성될 수 있다.The intra prediction mode allowable for the current block may consist of at least one non-directional mode (non-directional mode) and a plurality of directional modes.

하나 이상의 비방향성 모드는 DC 모드 및/또는 플래너(planar) 모드일수 있다. 또한, DC 모드와 플래너 모드 중 어느 하나가 적응적으로 상기 허용 가능한 인트라 예측 모드 셋에 포함될 수 있다.One or more non-directional modes may be DC mode and / or planar mode. In addition, either DC mode or planner mode may be adaptively included in the allowable intra prediction mode set.

이를 위해, 픽쳐 헤더 또는 슬라이스 헤더에 상기 허용 가능한 인트라 예측 모드 셋에 포함되는 비방향성 모드를 특정하는 정보가 포함될 수 있다.To this end, information specifying the non-directional mode included in the allowable intra prediction mode set may be included in the picture header or the slice header.

다음으로, 인트라 예측부(230)는 인트라 예측 블록을 생성하기 위해, 참조 화소들을 픽쳐 저장부(260)로터 읽어들이고, 이용 가능하지 않은 참조 화소가 존재하는지 여부를 판단한다.Next, the intra predictor 230 reads reference pixels from the picture storage unit 260 to generate an intra prediction block, and determines whether there is a reference pixel that is not available.

상기 판단은 현재 블록의 복호된 인트라 예측 모드를 적용하여 인트라 예측 블록을 생성하는데 이용되는 참조 화소들의 존재 여부에 따라 행해질 수도 있다.The determination may be performed according to the presence or absence of reference pixels used to generate the intra prediction block by applying the decoded intra prediction mode of the current block.

다음으로, 인트라 예측부(230)는 참조 화소를 생성할 필요가 있을 경우에는 미리 복원된 이용 가능한 참조 화소들을 이용하여 이용 가능하지 않은 위치의 참조 화소들을 생성할 수 있다.Next, when it is necessary to generate the reference pixel, the intra predictor 230 may generate reference pixels at positions that are not available using the available reference pixels reconstructed in advance.

이용 가능하지 않은 참조 화소에 대한 정의 및 참조 화소의 생성 방법은 도 1에 따른 인트라 예측부(150)에서의 동작과 동일할 수 있으나, 현재 블록의 복호화된 인트라 예측 모드에 따라 인트라 예측 블록을 생성하는데 이용되는 참조 화소들이 선택적으로 복원될 수도 있다.Definition of a reference pixel that is not available and a method of generating the reference pixel may be the same as the operation of the intra prediction unit 150 of FIG. 1, but generate an intra prediction block according to the decoded intra prediction mode of the current block. The reference pixels used to selectively recover may be selectively restored.

또한, 인트라 예측부(230)는 예측 블록을 생성하기 위해 참조 화소들에 필터를 적용할지 여부를 판단하며, 즉 현재 블록의 인트라 예측 블록을 생성하기 위하여 참조 화소들에 대해 필터링을 적용할지 여부를 상기 복호된 인트라 예측 모드 및 현재 예측 블록의 크기에 기초하여 결정할 수 있다.In addition, the intra prediction unit 230 determines whether to apply a filter to the reference pixels to generate the prediction block, that is, whether to apply filtering to the reference pixels to generate the intra prediction block of the current block. It may be determined based on the decoded intra prediction mode and the size of the current prediction block.

블록킹 아티펙트의 문제는 블록의 크기가 커질수록 커지므로, 블록의 크기가 커질수록 참조 화소를 필터링하는 예측모드의 수를 증가시킬 수 있으나, 블록이 소정 크기보다 커지는 경우 평탄한 영역으로 볼 수 있으므로 복잡도 감소를 위해 참조 화소를 필터링하지 않을 수도 있다.The problem of blocking artifacts is that the larger the block size is, the larger the block size can increase the number of prediction modes for filtering the reference pixels, but if the block is larger than the predetermined size can be seen as a flat area, the complexity is reduced The reference pixel may not be filtered for.

상기 참조 화소에 필터 적용이 필요하다고 판단된 경우, 인트라 예측부(230)는 필터를 이용하여 상기 참조 화소들을 필터링한다.If it is determined that the filter is required to be applied to the reference pixel, the intra predictor 230 filters the reference pixels by using a filter.

상기한 참조 화소들 간의 단차의 차이 정도에 따라 적어도 2개 이상의 필터를 적응적으로 적용할 수도 있다. 상기 필터의 필터계수는 대칭적인 것이 바람직하다.At least two or more filters may be adaptively applied according to the degree of difference between the steps between the reference pixels. The filter coefficient of the filter is preferably symmetrical.

또한, 상기한 2개 이상의 필터가 현재 블록의 크기에 따라 적응적으로 적용될 수도 있으며, 필터를 적용할 경우 크기가 작은 블록에 대해서는 대역폭이 좁은 필터가, 크기가 큰 블록들에 대해서는 대역폭이 넓은 필터가 적용될 수도 있다.In addition, the above two filters may be adaptively applied according to the size of the current block. When the filter is applied, a narrow bandwidth filter is used for a small block, and a wide bandwidth filter is used for a large block. May be applied.

DC 모드의 경우에는 참조 화소들의 평균값으로 예측 블록이 생성되므로 필터를 적용할 필요가 없으며, 상이 수직 방향으로 연관성(correlation)이 있는 수직 모드에서는 참조 화소에 필터를 적용할 필요가 없고, 영상이 수평 방향으로 연관성이 있는 수평 모드에서도 참조 화소에 필터를 적용할 필요가 없을 수 있다.In the DC mode, since the prediction block is generated with the average value of the reference pixels, there is no need to apply a filter. In the vertical mode where the correlation is in the vertical direction, the filter does not need to be applied to the reference pixel, and the image is horizontal. It may not be necessary to apply a filter to the reference pixel even in a horizontal mode that is correlated in the direction.

이와 같이, 필터링의 적용 여부는 현재 블록의 인트라 예측 모드와도 연관성이 있으므로, 현재 블록의 인트라 예측 모드 및 예측 블록의 크기에 기초하여 참조 화소를 적응적으로 필터링할 수 있다.As described above, whether filtering is applied is also related to the intra prediction mode of the current block, and thus, the reference pixel may be adaptively filtered based on the intra prediction mode of the current block and the size of the prediction block.

다음으로, 인트라 예측부(230)는 상기 복원된 인트라 예측 모드에 따라 참조 화소 또는 필터링된 참조 화소들을 이용하여 예측 블록을 생성하며, 상기 예측 블록의 생성은 부호화 장치(10)에서의 동작과 동일할 수 있으므로, 그에 대한 상세한 설명은 생략하기로 한다.Next, the intra prediction unit 230 generates a prediction block using reference pixels or filtered reference pixels according to the reconstructed intra prediction mode, and the generation of the prediction block is the same as the operation of the encoding apparatus 10. As such, detailed description thereof will be omitted.

인트라 예측부(230)는 상기 생성된 예측 블록을 필터링할지 여부를 판단하며, 상기 필터링 여부는 슬라이스 헤더 또는 부호화 유닛 헤더에 포함된 정보를 이용하거나 또는 현재 블록의 인트라 예측 모드에 따라 결정될 수 있다.The intra prediction unit 230 determines whether to filter the generated prediction block, and the filtering may be determined by using information included in a slice header or a coding unit header or according to an intra prediction mode of the current block.

상기 생성된 예측 블록을 필터링할 것으로 판단할 경우, 인트라 예측부(230)는 현재 블록에 인접한 이용 가능한 참조 화소들을 이용하여 생성된 예측 블록의 특정 위치의 화소를 필터링하여 새로운 화소를 생성할 수 있다.When determining that the generated prediction block is to be filtered, the intra predictor 230 may generate a new pixel by filtering pixels at a specific position of the generated prediction block by using available reference pixels adjacent to the current block. .

예를 들어, DC 모드에서는 예측 화소들 중 참조 화소들과 접하는 예측 화소는 상기 예측 화소와 접하는 참조 화소를 이용하여 필터링 될 수 있다.For example, in the DC mode, a prediction pixel in contact with reference pixels among the prediction pixels may be filtered using a reference pixel in contact with the prediction pixel.

따라서, 예측 화소의 위치에 따라 1개 또는 2개의 참조 화소를 이용하여 예측 화소가 필터링되며, DC 모드에서의 예측 화소의 필터링은 모든 크기의 예측 블록에 적용할 수 있다.Therefore, the prediction pixels are filtered using one or two reference pixels according to the positions of the prediction pixels, and the filtering of the prediction pixels in the DC mode may be applied to the prediction blocks of all sizes.

한편, 수직 모드에서는 예측 블록의 예측 화소들 중 좌측 참조 화소와 접하는 예측 화소들은 상기 예측블록을 생성하는데 이용되는 상측 화소 이외의 참조 화소들을 이용하여 변경될 수 있다.Meanwhile, in the vertical mode, prediction pixels in contact with the left reference pixel among the prediction pixels of the prediction block may be changed by using reference pixels other than the upper pixel used to generate the prediction block.

마찬가지로, 수평 모드에서는 생성된 예측 화소들 중 상측 참조 화소와 접하는 예측 화소들은 상기 예측블록을 생성하는데 이용되는 좌측 화소 이외의 참조 화소들을 이용하여 변경될 수 있다.Similarly, in the horizontal mode, the prediction pixels in contact with the upper reference pixel among the generated prediction pixels may be changed using reference pixels other than the left pixel used to generate the prediction block.

이와 같은 방식으로 복원된 현재 블록의 예측 블록과 복호화한 현재 블록의 잔차 블록을 이용하여 현재 블록이 복원될 수 있다.In this manner, the current block may be reconstructed using the prediction block of the current block reconstructed and the residual block of the decoded current block.

도 9는 영상을 블록 단위로 분할하여 처리하는 방법에 대한 제2 실시예를 설명하기 위한 도시한 것이다.FIG. 9 illustrates a second exemplary embodiment of a method of dividing and processing an image into blocks.

도 9를 참조하면, 최대 256x256 픽셀 크기를 가지는 코딩 트리 유닛(CTU)은 먼저 쿼드 트리(quad tree) 구조로 나뉘어, 정사각형의 형태를 가지는 4개의 코딩 유닛(CU)들로 분할될 수 있다.Referring to FIG. 9, a coding tree unit (CTU) having a maximum size of 256 × 256 pixels may be first divided into a quad tree structure and divided into four coding units (CUs) having a square shape.

여기서, 상기 쿼드 트리 구조로 분할된 코딩 유닛들 중 적어도 하나는 이진 트리(binary tree) 구조로 나뉘어, 직사각형의 형태를 가지는 2개의 코딩 유닛(CU)들로 재 분할될 수 있다.Here, at least one of the coding units divided into the quad tree structure may be divided into a binary tree structure and re-divided into two coding units (CUs) having a rectangular shape.

한편, 상기 쿼드 트리 구조로 분할된 코딩 유닛들 중 적어도 하나는 쿼드 트리 구조로 나뉘어, 정사각형의 형태를 가지는 4개의 코딩 유닛(CU)들로 재 분할될 수도 있다.Meanwhile, at least one of the coding units divided into the quad tree structure may be divided into a quad tree structure and re-divided into four coding units (CUs) having a square shape.

그리고 상기 이진 트리 구조로 재 분할된 코딩 유닛들 중 적어도 하나는 이진 트리 구조로 다시 나뉘어, 정사각형 또는 직사각형의 형태를 가지는 2개의 코딩 유닛(CU)들로 분할될 수 있다.At least one of the coding units re-divided into the binary tree structure may be divided into two binary tree structures and divided into two coding units (CUs) having a square or rectangular shape.

한편, 상기 쿼드 트리 구조로 재 분할된 코딩 유닛들 중 적어도 하나는 쿼드 트리 구조 또는 이진 크리 구조로 다시 나뉘어, 정사각형 또는 직사각형의 형태를 가지는 코딩 유닛(CU)들로 분할될 수도 있다.Meanwhile, at least one of the coding units re-divided into the quad tree structure may be divided into a quad tree structure or a binary tree structure and divided into coding units (CUs) having a square or rectangular shape.

상기와 같이 이진 트리 구조로 분할되어 구성된 CU들은 들은, 더 이상 분할되지 않고, 예측 및 변환에 이용될 수 있다. 이때, 이진 분할된 CU는 실제 부/복호화를 수행하는 블록 단위인 코딩 블록(Coding block: CB)과 해당 코딩 블록에 해당되는 신택스를 포함할 수 있다. 즉, 도 9에 도시된 바와 같은 코딩 블록(CB)에 속하는 예측 유닛(PU)과 변환 유닛(TU)의 크기는, 해당 코딩 블록(CB)의 크기와 동일할 수 있다.CUs divided and configured into a binary tree structure as described above may be used for prediction and transformation without being further divided. In this case, the binary partitioned CU may include a coding block (CB), which is a block unit that actually performs encoding / decoding, and syntax corresponding to the coding block. That is, the sizes of the prediction unit PU and the transform unit TU belonging to the coding block CB as shown in FIG. 9 may be equal to the size of the coding block CB.

상기와 같이 쿼드 트리 구조로 분할된 코딩 유닛은 도 3 및 도 4를 참조하여 설명한 바와 같은 방법을 이용하여 하나 또는 2 이상의 예측 유닛(PU)들로 분할될 수 있다.The coding unit split into the quad tree structure as described above may be split into one or two prediction units (PUs) using the method described with reference to FIGS. 3 and 4.

또한, 상기와 같이 쿼드 트리 구조로 분할된 코딩 유닛은 도 5를 참조하여 설명한 바와 같은 방법을 이용하여 하나 또는 2 이상의 변환 유닛(TU)들로 분할될 수 있으며, 상기 분할된 변환 유닛(TU)은 최대 64x64 픽셀 크기를 가질 수 있다.In addition, the coding unit divided into the quad tree structure as described above may be divided into one or more transform units (TUs) by using the method as described with reference to FIG. 5, and the divided transform units (TU) May have a maximum size of 64x64 pixels.

도 10은 영상을 블록 단위로 분할하여 처리하기 위해 사용되는 신택스(syntax) 구조에 대한 일실시예를 나타내는 것이다.FIG. 10 illustrates an embodiment of a syntax structure used to divide and process an image in block units.

도 10 및 도 9를 참조하면, 본 발명의 실시 예에 따른 블록 구조(block structure)는 쿼드 트리 분할 여부를 나타내는 split_cu_flag와 이진 트리 분할 여부를 나타내는 binary_split_flag를 통해 결정될 수 있다.10 and 9, a block structure according to an embodiment of the present invention may be determined through split_cu_flag indicating whether a quad tree is split and binary_split_flag indicating whether a binary tree is split.

예를 들어, 앞서 설명한 바와 같은 코딩 유닛(CU)의 분할 여부는 split_cu_flag를 이용하여 나타낼 수 있다. 그리고, 쿼드 트리 분할 이후 이진 분할된 CU에 대응하여, 이진 분할 여부를 나타내는 binary_split_flag 및 분할된 방향을 나타내는 신택스가 결정될 수 있다. 이 때, 이진 분할의 방향성을 나타내는 방법으로서, binary_split_hor과 binary_split_ver과 같이 복수개의 신택스를 복호화하여 이에 기초한 분할 방향을 결정하는 방법 또는 binary_split_mode와 같이 하나의 신택스와 이에 따른 신호 값을 복호화하여 Horizontal(0) 또는 Vertical(1) 방향으로의 분할을 처리하는 방법이 예시될 수 있다. For example, whether to split the coding unit CU as described above may be indicated using split_cu_flag. After the quad tree division, the binary_split_flag indicating whether the binary division is performed and the syntax indicating the division direction may be determined in response to the binary division CU. In this case, as a method of indicating the direction of binary division, a method of determining a split direction based on decoding a plurality of syntaxes such as binary_split_hor and binary_split_ver or decoding a syntax and a signal value thereof according to binary_split_mode, Horizontal (0) Alternatively, a method of processing division in the vertical (1) direction may be illustrated.

본 발명에 따른 또 다른 실시예로써, 이진 트리를 이용하여 분할되는 코딩 유닛(CU)의 깊이는 binary_depth를 이용하여 나타내어질 수 있다.As another embodiment according to the present invention, the depth of a coding unit (CU) split using a binary tree may be represented using binary_depth.

도 9 및 도 10을 참조하여 설명한 바와 같은 방법에 의해 분할된 블록들(예를 들어, 코딩 유닛(CU), 예측 유닛(PU) 및 변환 유닛(TU))에 대해 도 1 내지 도 8을 참조하여 설명한 바와 같은 방법들이 적용됨으로써, 영상에 대한 부호화 및 복호화가 수행될 수 있다.See FIGS. 1 through 8 for blocks divided by the method as described with reference to FIGS. 9 and 10 (eg, coding unit (CU), prediction unit (PU), and transform unit (TU)). By applying the methods as described above, encoding and decoding on an image may be performed.

이하에서는, 도 11 내지 도 16을 참조하여, 코딩 유닛(CU)을 하나 또는 2 이상의 변환 유닛(TU)들로 분할하는 방법에 대한 또 다른 실시예들을 설명하기로 한다.Hereinafter, other embodiments of a method of dividing a coding unit (CU) into one or more transform units (TUs) will be described with reference to FIGS. 11 through 16.

본 발명의 실시예에 따르면, 코딩 유닛(CU)은 이진 트리 구조로 나뉘어 잔차 블록에 대한 변환이 수행되는 기본 단위인 변환 유닛(TU)들로 분할될 수 있다.According to an embodiment of the present invention, the coding unit CU may be divided into a binary tree structure and divided into transform units (TUs) which are basic units for transforming a residual block.

예를 들어, 도 11을 참조하면, 이진 트리 구조로 분할되어 Nx2N 또는 2NxN의 크기를 가지는 직사각형의 코딩 블록들(CU0, Cu1) 중 적어도 하나는, 다시 이진 트리 구조로 나뉘어, NxN의 크기를 가지는 정사각형의 변환 유닛들(TU0, TU1)로 분할될 수 있다.For example, referring to FIG. 11, at least one of rectangular coding blocks CU 0 and Cu 1 divided into a binary tree structure and having a size of N × 2N or 2N × N may be divided into a binary tree structure and thus have a size of N × N. It can be divided into square transformation units (TU 0 , TU 1 ) having a.

상기한 바와 같이, 블록 기반의 영상 부호화 방법은, 예측, 변환, 양자화 및 엔트로피 부호화 단계들을 수행할 수 있다.As described above, the block-based image encoding method may perform prediction, transform, quantization, and entropy encoding steps.

상기 예측 단계에서는, 현재 부호화를 수행하는 블록과 기존의 부호화된 영상 또는 주변 영상을 참조하여 예측 신호를 생성하며, 이를 통해 현재 블록과의 차분 신호를 계산할 수 있다.In the prediction step, a prediction signal may be generated by referring to a block currently performing encoding and an existing coded image or a neighboring image, and thus a difference signal between the current block and the current block may be calculated.

한편, 변환 단계에서는, 상기 차분 신호를 입력으로 하여 다양한 변환 함수를 이용하여 변환을 수행하며, 상기 변환된 신호는 DC 계수와 AC 계수들로 분류되 에너지 집중(Energy compaction)되어 부호화 효율이 향상될 수 있다.On the other hand, in the transforming step, the difference signal is input, and the transform is performed using various transform functions. The transformed signal is classified into DC coefficients and AC coefficients and is energy compacted to improve encoding efficiency. Can be.

또한, 양자화 단계에서는 변환 계수(Transform coefficient)들을 입력으로 양자화가 수행하며, 이후 양자화된 신호에 대해 엔트로피 부호화가 수행됨으로써 영상이 부호화될 수 있다.In addition, in the quantization step, quantization may be performed by inputting transform coefficients, and then an image may be encoded by performing entropy encoding on the quantized signal.

한편, 영상 복호화 방법은 상기와 같은 부호화 과정의 역순으로 진행되며, 영상의 화질 왜곡 현상이 양자화 단계에서 발생할 수 있다.On the other hand, the image decoding method is performed in the reverse order of the above encoding process, the image quality distortion may occur in the quantization step.

부호화 효율을 향상시키면서 화질 왜곡 현상을 줄이기 위한 방법으로서, 변환 단계에서 입력으로 들어오는 차분 신호의 분포 및 영상의 특징에 따라 변환 유닛(TU)의 크기 또는 모양과 적용되는 변환 함수 종류를 다양하게 할 수 있다.As a method for reducing image distortion while improving encoding efficiency, the size or shape of a transform unit (TU) and the type of transform function to be applied may be varied according to the distribution of the differential signal input to the input and the characteristics of the image in the conversion step. have.

예를 들어, 예측 단계에서 블록 기반 움직임 추정 과정을 통해 현재 블록과 유사한 블록을 찾는 경우, SAD(Sum of Absolute Difference) 또는 MSE(Mean Square error) 등과 같은 코스트(cost) 측정 방법을 이용하여, 차분 신호의 분포는 영상의 특성에 따라 다양한 형태로 생길 수 있다.For example, in the case of finding a block similar to the current block through a block-based motion estimation process in a prediction step, a difference is measured using a cost measurement method such as a sum of absolute difference (SAD) or mean square error (MSE). The signal distribution may occur in various forms according to the characteristics of the image.

그에 따라, 다양한 차분 신호의 분포에 기초해 선택적으로 변환 유닛(CU)의 크기 또는 모양을 결정하여 변환을 수행함으로써, 효과적인 부호화가 수행될 수 있다.Accordingly, effective encoding can be performed by selectively determining the size or shape of the transform unit CU based on the distribution of various differential signals to perform the transform.

도 12를 참조하면, 임의의 코딩 유닛(CUx) 에서 (a)에 도시된 바와 같이 차분 신호가 발생하는 경우, (b)에 도시된 바와 같이 해당 코딩 유닛(CUx)을 이진 트리 구조로 나누어 2개의 변환 유닛(TU)들로 분할함으로써 효과적인 변환이 수행되도록 할 수 있다.Referring to FIG. 12, when a differential signal is generated as shown in (a) in any coding unit CUx, the coding unit CUx is divided into a binary tree structure as shown in (b). By dividing into two transform units (TUs), an efficient transform can be performed.

예를 들어, DC 값은 일반적으로 입력 신호의 평균값을 나타낸다고 말할 수 있으므로, 도 12의 (a)에 도시된 바와 같은 차분 신호가 변환 과정의 입력으로 수신되는 경우, 코딩 유닛(CUx)을 2개의 변환 유닛(TU)들로 분할함으로써 효과적으로 DC 값을 나타낼 수 있다.For example, it can be said that the DC value generally represents an average value of the input signal, so that when a differential signal as shown in FIG. 12A is received as an input of the conversion process, two coding units CUx are provided. By dividing into transform units (TUs) it is possible to effectively represent a DC value.

도 13을 참조하면, 2Nx2N의 크기를 가지는 정사각형의 코딩 유닛(CU0)이 이진 트리 구조로 나뉘어, Nx2N 또는 2NxN의 크기를 가지는 직사각형의 변환 유닛들(TU0, TU1)로 분할될 수 있다.Referring to FIG. 13, a square coding unit CU 0 having a size of 2N × 2N may be divided into a binary tree structure and divided into rectangular transform units TU 0 and TU 1 having a size of Nx2N or 2N × N. .

본 발명의 또 다른 실시예에 따르면, 상기한 바와 같이 코딩 유닛(CU)을 이진 트리 구조로 분할하는 단계를 2회 이상 반복해 수행하여, 복수의 변환 유닛(TU)들로 분할할 수 있다.According to another embodiment of the present invention, as described above, the step of dividing the coding unit (CU) into a binary tree structure may be repeated two or more times to divide the coding unit (CU) into a plurality of transform units (TUs).

도 14를 참조하면, Nx2N의 크기를 가지는 직사각형의 코딩 블록(CB1)을 이진 트리 구조로 분할하고, 상기 분할된 NxN의 크기를 가지는 블록을 다시 이진 트리 구조로 분할하여 N/2xN 또는 NxN/2의 크기를 가지는 직사각형의 블록을 구성한 후, 상기 N/2xN 또는 NxN/2의 크기를 가지는 블록을 다시 이진 트리 구조로 분할하여 N/2xN/2의 크기를 가지는 정사각형의 변환 유닛들(TU1, TU2, TU4, TU5)로 분할할 수 있다.Referring to FIG. 14, a rectangular coding block CB 1 having a size of Nx2N is divided into a binary tree structure, and a block having a size of the divided NxN is further divided into a binary tree structure to N / 2xN or NxN /. After configuring a rectangular block having a size of 2, the block having a size of N / 2xN or NxN / 2 is further divided into a binary tree structure and square transform units having a size of N / 2xN / 2 (TU 1). , TU 2 , TU 4 , and TU 5 ).

도 15를 참조하면, 2Nx2N의 크기를 가지는 정사각형의 코딩 유닛(CU0)을 이진 트리 구조로 분할하고, 상기 분할된 Nx2N의 크기를 가지는 블록을 다시 이진 트리 구조로 분할하여 NxN의 크기를 가지는 정사각형의 블록을 구성한 후, 상기 NxN의 크기를 가지는 블록을 다시 이진 트리 구조로 분할하여 N/2xN의 크기를 가지는 직사각형의 변환 유닛들(TU1, TU2)로 분할할 수 있다.Referring to FIG. 15, a square coding unit CU 0 having a size of 2N × 2N is divided into a binary tree structure, and a block having a size of Nx2N is further divided into a binary tree structure to have a square having a size of N × N. After configuring a block of, the block having the size of NxN may be divided into a binary tree structure and divided into rectangular transform units TU 1 and TU 2 having a size of N / 2xN.

도 16을 참조하면, 2NxN의 크기를 가지는 직사각형의 코딩 유닛(CU0)을 이진 트리 구조로 분할하고, 상기 분할된 NxN의 크기를 가지는 블록을 다시 쿼드 트리 구조로 분할하여 N/2xN/2의 크기를 가지는 정사각형의 변환 유닛들(TU1, TU2, TU3, TU4)로 분할할 수 있다.Referring to FIG. 16, a rectangular coding unit CU 0 having a size of 2N × N is divided into a binary tree structure, and a block having a size of the divided N × N is divided into a quad tree structure again to form N / 2 × N / 2. It can be divided into square transform units TU 1 , TU 2 , TU 3 , and TU 4 having a size.

도 11 내지 도 16을 참조하여 설명한 바와 같은 방법에 의해 분할된 블록들(예를 들어, 코딩 유닛(CU), 예측 유닛(PU) 및 변환 유닛(TU))에 대해 도 1 내지 도 8을 참조하여 설명한 바와 같은 방법들이 적용됨으로써, 영상에 대한 부호화 및 복호화가 수행될 수 있다.See FIGS. 1 through 8 for blocks divided by the method as described with reference to FIGS. 11 through 16 (eg, coding unit (CU), prediction unit (PU), and transform unit (TU)). By applying the methods as described above, encoding and decoding on an image may be performed.

이하에서는, 본 발명에 따른 부호화 장치(10)가 블록 분할 구조를 결정하는 방법에 대한 실시예들에 대해 설명한다.Hereinafter, embodiments of a method of determining, by the encoding apparatus 10 according to the present invention, a block division structure will be described.

영상 부호화 장치(10)에 구비된 픽쳐 분할부(110)는 미리 설정된 순서에 따라 RDO(Rate distortion Optimization)를 수행하여, 상기한 바와 같이 분할 가능한 코딩 유닛(CU), 예측 유닛(PU) 및 변환 유닛(TU)의 분할 구조를 결정할 수 있다.The picture division unit 110 included in the image encoding apparatus 10 performs rate distortion optimization (RDO) according to a preset order, and thus is capable of splitting a coding unit (CU), a prediction unit (PU), and a transform as described above. The partition structure of the unit TU may be determined.

예를 들어, 블록 분할 구조를 결정하기 위해, 픽쳐 분할부(110)는 RDO-Q(Rate distortion Optimization- Quantization)를 수행하면서 비트율(bitrate)와 왜곡(distortion) 측면에서 최적의 블록 분할 구조를 결정할 수 있다. For example, to determine the block division structure, the picture division unit 110 determines the optimal block division structure in terms of bitrate and distortion while performing rate distortion optimization-quantization (RDO-Q). Can be.

도 17을 참조하면, 코딩 유닛(CU)이 2Nx2N 픽셀 크기의 형태를 가지는 경우, (a)에 도시된 2Nx2N 픽셀 크기, (b)에 도시된 NxN 픽셀 크기, (c)에 도시된 Nx2N 픽셀 크기, (d)에 도시된 2NxN 픽셀 크기의 변환 유닛(PU) 분할 구조 순서로 RDO를 수행하여 변환 유닛(PU)의 최적 분할 구조를 결정할 수 있다.Referring to FIG. 17, when the coding unit CU has a form of 2Nx2N pixel size, the 2Nx2N pixel size shown in (a), the NxN pixel size shown in (b), and the Nx2N pixel size shown in (c) , RD may be performed in the order of transform unit (PU) partition structure of 2N × N pixel size shown in (d) to determine an optimal partition structure of the transform unit PU.

도 18을 참조하면, 코딩 유닛(CU)이 Nx2N 또는 2NxN 픽셀 크기의 형태를 가지는 경우, (a)에 도시된 Nx2N(또는, 2NxN)의 픽셀 크기, (b)에 도시된 NxN의 픽셀 크기, (c)에 도시된 N/2xN(또는, NxN/2)와 NxN의 픽셀 크기, (d)에 도시된 N/2xN/2, N/2xN 및 NxN의 픽셀 크기, (e)에 도시된 N/2xN의 픽셀 크기의 변환 유닛(PU) 분할 구조 순서로 RDO를 수행하여 변환 유닛(PU)의 최적 분할 구조를 결정할 수 있다.Referring to FIG. 18, when the coding unit CU has a form of Nx2N or 2NxN pixel size, the pixel size of Nx2N (or 2NxN) shown in (a), the pixel size of NxN shown in (b), N / 2xN (or NxN / 2) and NxN pixel sizes shown in (c), N / 2xN / 2, N / 2xN and NxN pixel sizes shown in (d), N shown in (e) An RDO may be performed in a transform unit (PU) partition structure order of a pixel size of 2 × N to determine an optimal partition structure of the transform unit PU.

상기에서는 RDO(Rate distortion Optimization)를 수행하여 블록 분할 구조가 결정되는 것을 예로 들어 본 발명의 블록 분할 방법을 설명하였으나, 픽쳐 분할부(110)는 SAD(Sum of Absolute difference) 또는 MSE(Mean Square Error)를 이용하여 블록 분할 구조를 결정함으로써 복잡도를 감소시키면서도 적절한 효율을 유지할 수 있다.In the above, the block division method of the present invention has been described with an example in which a block division structure is determined by performing RDO (Rate distortion Optimization). However, the picture division unit 110 may have a sum of absolute difference (SAD) or mean square error (MSE). ) Can be used to determine the block division structure to reduce the complexity and maintain the proper efficiency.

본 발명의 일실시예에 따르면, 상기한 바와 같이 분할된 코딩 유닛(CU), 예측 유닛(PU) 또는 변환 유닛(TU) 단위로 적응적 루프 필터링(Adaptive Loof Filtering: ALF)의 적용 여부가 결정될 수 있다.According to an embodiment of the present invention, whether to apply adaptive loop filtering (ALF) in units of a coding unit (CU), a prediction unit (PU), or a transform unit (TU) divided as described above may be determined. Can be.

예를 들어, 적응적 루프 필터(ALF)의 적용 여부는 코딩 유닛(CU) 단위로 결정될 수 있으며, 코딩 유닛(CU)에 따라 적용될 루프 필터의 크기 또는 계수는 달라질 수 있다.For example, whether the adaptive loop filter (ALF) is applied may be determined in units of a coding unit (CU), and the size or coefficient of the loop filter to be applied may vary according to the coding unit (CU).

이 경우, 코딩 유닛(CU) 별 상기 적응적 루프 필터(ALF)의 적용 여부를 나타내는 정보가 각 슬라이스 헤더에 포함될 수 있다.In this case, information indicating whether to apply the adaptive loop filter (ALF) for each coding unit (CU) may be included in each slice header.

색차 신호의 경우, 픽쳐 단위로 적응적 루프 필터(ALF)의 적용 여부를 결정할 수도 있으며, 루프 필터의 형태도 휘도와 달리 직사각형 형태를 가질 수 있다.In the case of a chrominance signal, whether the adaptive loop filter (ALF) is applied in units of pictures may be determined, and the loop filter may have a rectangular shape unlike luminance.

또한, 상기 적응적 루프 필터링(ALF)은 슬라이스별로 적용 여부를 결정할 수 있다. 따라서, 현재 슬라이스에 적응적 루프 필터링(ALF)이 적용되는지 여부를 나타내는 정보는 슬라이스 헤더 또는 픽쳐 헤더에 포함될 수 있다.In addition, the adaptive loop filtering (ALF) may determine whether to apply to each slice. Therefore, information indicating whether adaptive loop filtering (ALF) is applied to the current slice may be included in a slice header or a picture header.

현재 슬라이스에 적응적 루프 필터링이 적용됨을 나타내면, 슬라이스 헤더 또는 픽쳐 헤더는 추가적으로 적응적 루프 필터링 과정에 사용되는 휘도 성분의 수평 및/또는 수직 방향의 필터 길이를 나타내는 정보를 포함할 수 있다.Indicating that the adaptive loop filtering is applied to the current slice, the slice header or the picture header may additionally include information indicating the filter length in the horizontal and / or vertical direction of the luminance component used in the adaptive loop filtering process.

슬라이스 헤더 또는 픽쳐 헤더는 필터 세트의 수를 나타내는 정보를 포함할 수 있으며, 필터 세트의 수가 2 이상인 경우 필터 계수들이 예측 방법을 사용하여 부호화 될 수 있다.The slice header or the picture header may include information indicating the number of filter sets. When the number of filter sets is two or more, the filter coefficients may be encoded using a prediction method.

따라서, 슬라이스 헤더 또는 픽쳐 헤더는 필터 계수들이 예측 방법으로 부호화 되는지 여부를 나타내는 정보를 포함할 수 있으며, 예측 방법이 사용되는 경우에는 예측된 필터 계수를 포함할 수 있다.Accordingly, the slice header or the picture header may include information indicating whether filter coefficients are encoded by a prediction method, or may include predicted filter coefficients when the prediction method is used.

한편, 휘도 뿐만 아니라, 색차 성분들도 적응적으로 필터링 될 수 있으며, 이 경우 색차 성분 각각이 필터링 되는지 여부를 나타내는 정보가 슬라이스 헤더 또는 픽쳐 헤더에 포함될 수 있으며 비트 수를 줄이기 위해 Cr과 Cb에 대한 필터링 여부를 나타내는 정보와 함께 조인트 코딩(즉, 다중화 코딩)될 수 있다.Meanwhile, not only the luminance but also the chrominance components may be adaptively filtered. In this case, information indicating whether each of the chrominance components is filtered may be included in the slice header or the picture header. It may be joint coded (ie, multiplexed coding) together with information indicating whether to filter.

이 때, 색차 성분들의 경우에는 복잡도 감소를 위해 Cr과 Cb를 모두 필터링하지 않는 경우가 가장 빈번할 가능성이 높으므로, Cr과 Cb를 모두 필터링하지 않는 경우에 가장 작은 인덱스를 할당하여 엔트로피 부호화를 수행할 수 있다.In this case, in the case of chrominance components, it is most likely not to filter both Cr and Cb to reduce the complexity, so that entropy coding is performed by allocating the smallest index when not filtering both Cr and Cb. can do.

그리고, Cr 및 Cb를 모두 필터링하는 경우에 가장 큰 인덱스를 할당하여 엔트로피 부호화를 수행할 수 있다.In the case of filtering both Cr and Cb, entropy encoding may be performed by allocating the largest index.

도 19내지 도 21은 본 발명의 다른 일 실시 예에 따른 복합 분할 구조를 설명하기 위한 도면들이다.19 to 21 are diagrams for describing a composite partition structure according to another embodiment of the present invention.

한편, 도 19를 참조하면, 코딩 유닛(CU)이 이진 트리 구조로 분할됨에 따라, 도 19(A)와 같은 가로 길이 W가 세로 길이 H보다 긴 형태의 직사각형과, 도 19(B)와 같이 세로 길이 H가 가로 길이 W보다 긴 형태의 직사각형으로 분할된 코딩 유닛(CU)의 형태가 나타날 수 있다. 이와 같이 특정 방향의 길이가 긴 코딩 유닛의 경우, 중간 영역에 비하여 가장자리 좌우 또는 상하 경계 영역이 상대적으로 부호화 정보가 집중될 가능성이 높다.Meanwhile, referring to FIG. 19, as the coding unit CU is divided into a binary tree structure, the horizontal length W as shown in FIG. 19A is longer than the vertical length H, and as shown in FIG. 19B. The shape of the coding unit CU divided into a rectangle having a vertical length H longer than the horizontal length W may appear. As described above, in the case of a coding unit having a long length in a specific direction, it is highly likely that coding information is concentrated in the left, right, and top and bottom edge regions relatively to the middle region.

따라서, 보다 정밀하고 효율적인 부호화 및 복호화를 위하여, 본 발명의 실시 예에 따른 부호화 장치(10)는 쿼드 트리 및 이진 트리 분할에 의해, 특정 방향 길이가 길게 분할된 코딩 유닛의 가장자리 영역 등을 용이하게 분할하게 할 수 있는 삼진 트리(ternary tree) 또는 삼중 트리(triple tree) 구조로 코딩 유닛을 분할할 수 있다.Therefore, in order to encode and decode more precisely and efficiently, the encoding apparatus 10 according to an embodiment of the present invention easily divides an edge region of a coding unit having a long length in a specific direction by quad tree and binary tree splitting. The coding unit can be divided into a ternary tree or triple tree structure that can be split.

예를 들어, 도 19(A)는 분할 대상 코딩 유닛이 수평 분할된 코딩 유닛인 경우, 가로 W/8, 세로 H/4 길이인 좌측 가장자리의 제1 영역과, 가로 W/8*6, 세로 H/4 길이로서, 중간 영역인 제2 영역과, 가로 W/8, 세로 H/4 길이의 우측 가장자리의 제3 영역으로 삼진 분할될 수 있음을 나타내고 있다.For example, FIG. 19A illustrates a first region of a left edge having a horizontal W / 8 and a vertical H / 4 length, and a horizontal W / 8 * 6 and vertical when the splitting target coding unit is a horizontally divided coding unit. As H / 4 length, it is shown that it can be divided into the 2nd area | region which is an intermediate area | region, and the 3rd area | region of the right edge of the horizontal W / 8 and the vertical H / 4 length.

또한, 도 19(B)는 분할 대상 코딩 유닛이 수직 분할된 코딩 유닛인 경우, 가로 W/4, 세로 H/8 길이인 상단 가장자리의 제1 영역과, 가로 W/4, 세로 H/8*6 길이로서, 중간 영역인 제2 영역과, 가로 W/4, 세로 H/8 길이의 하단 가장자리의 제3 영역으로 분할될 수 있음을 나타내고 있다.19 (B) shows the first region of the upper edge of the horizontal W / 4 and the vertical H / 8 length, the horizontal W / 4 and the vertical H / 8 * when the coding unit to be divided is the vertically divided coding unit. As six lengths, it is shown that it can be divided into the 2nd area | region which is an intermediate area | region, and the 3rd area | region of the lower edge of length W / 4 and length H / 8.

그리고, 본 발명의 실시 예에 따른 부호화 장치(10)는, 픽쳐 분할부(110)를 통해 이와 같은 삼진 트리 구조의 분할을 처리할 수 있다. 이를 위해, 픽쳐 분할부(110)는 전술한 쿼드 트리 및 이진 트리 구조로의 분할을 부호화 효율에 따라 결정할 수 있을 뿐만 아니라, 삼진 트리 구조를 함께 고려하여 세분화된 분할 방식을 세결정할 수 있다.In addition, the encoding apparatus 10 according to an embodiment of the present invention may process such division of the ternary tree structure through the picture division unit 110. To this end, the picture dividing unit 110 may not only determine the division into the quad tree and the binary tree structure described above according to the coding efficiency, but also determine the subdivided division method in consideration of the ternary tree structure.

여기서, 삼진 트리 구조의 분할은 별도 제한 없이 모든 코딩 유닛에 대해 처리될 수 있다. 그러나, 전술한 바와 같이 부호화 및 복호화 효율을 고려하면, 특정 조건의 코딩 유닛에 대하여만 삼진 트리 구조를 허용하는 것이 바람직할 수 있다.Here, the division of the ternary tree structure can be processed for all coding units without any limitation. However, considering the encoding and decoding efficiency as described above, it may be desirable to allow the ternary tree structure only for the coding unit of a certain condition.

또한, 삼진 트리 구조는 코딩 트리 유닛에 대한 다양한 방식의 삼진 분할이 필요할 수 있으나, 부호화 및 복호화 복잡도 및 시그널링에 의한 전송 대역폭을 고려하여, 최적화된 소정 형태만이 허용되는 것이 바람직할 수 있다.In addition, the ternary tree structure may require ternary splitting in various manners for the coding tree unit, but in consideration of encoding and decoding complexity and transmission bandwidth by signaling, it may be preferable that only an optimized predetermined form is allowed.

따라서, 픽쳐 분할부(110)는 현재 코딩 유닛의 분할을 결정함에 있어서, 현재 코딩 유닛이 미리 설정된 조건에 대항하는 경우에만 특정 형태의 삼진 트리 구조로의 분할여부를 판단 및 결정할 수 있다. 또한, 이와 같은 삼진 트리의 허용에 따라, 바이너리 트리의 분할 비율도 1:1만이 아닌 3:1, 1:3 등으로 확장 및 가변될 수 있다. 따라서, 본 발명의 실시 예에 따른 코딩 유닛의 분할 구조는 비율에 따라 쿼드 트리, 이진 트리 또는 삼진 트리로 세분화 분할되는 복합 트리 구조를 포함할 수 있다.Accordingly, in determining the division of the current coding unit, the picture dividing unit 110 may determine and determine whether to split into a ternary tree structure of a specific type only when the current coding unit meets a preset condition. In addition, depending on the allowance of the ternary tree, the split ratio of the binary tree may also be extended and changed to 3: 1, 1: 3, etc., not just 1: 1. Accordingly, the split structure of the coding unit according to the embodiment of the present invention may include a complex tree structure divided into quadtrees, binary trees, or ternary trees according to a ratio.

도 20 내지 도 22는 본 발명의 실시 예에 따른 복합 트리 구조 분할을 결정하기 위한 분할 테이블을 도시한 것으로, 예를 들어, 픽쳐 분할부(110)는 상기한 분할 테이블에 기초하여, 분할 대상 코딩 유닛의 복합 분할 구조를 결정할 수 있다. 20 to 22 illustrate a partition table for determining a partition of a complex tree structure according to an embodiment of the present invention. For example, the picture partition unit 110 may perform partition target coding based on the partition table. The composite partition structure of the unit can be determined.

본 발명의 실시 예에 따르면, 픽쳐 분할부(110)는 블록의 최대 사이즈(예를 들어, 픽셀 기반 128 x 128, 256 x 256 등)에 대응하여, 쿼드 트리 분할을 처리하고, 쿼드 트리 분할된 단말 노드에 대응하는 이중 트리 구조 및 삼중 트리 구조 분할 중 적어도 하나를 처리하는 복합 분할 처리를 수행할 수 잇다. According to an embodiment of the present disclosure, the picture division unit 110 processes quad tree division in response to a maximum size of a block (eg, pixel-based 128 x 128, 256 x 256, etc.), and quad tree division. A complex partitioning process for processing at least one of a dual tree structure and a triple tree structure partition corresponding to the terminal node may be performed.

특히, 본 발명의 실시 예에 따르면 픽쳐 분할부(110)는 분할 테이블에 따라, 현재 블록의 특성 및 사이즈에 대응하는 이진 트리 분할인 제1 이진 분할(BINARY 1), 제2 이진 분할(BINARY 2)과, 삼진 트리 분할인 제1 삼진 분할(TRI 1) 또는 제2 삼진 분할(TRI 2) 중 어느 하나의 분할 구조를 결정할 수 있다.In particular, according to an embodiment of the present invention, the picture partition unit 110 may be a first binary partition (BINARY 1) and a second binary partition (BINARY 2), which are binary tree partitions corresponding to the characteristics and sizes of the current block, according to the partition table. ) And a partition structure of any one of the first ternary partition TRI 1 and the second ternary partition TRI 2.

여기서, 제1 이진 분할은 N:N의 비율을 갖는 수직 또는 수평 분할에 대응할 수 있으며, 제2 이진 분할은 3N:N 또는 N:3N의 비율을 갖는 수직 또는 수평 분할에 대응될 수 있고, 각 이진 분할된 root CU는 분할 테이블에 명시된 각 사이즈의 CU0 및 CU1으로 분할될 수 있다.Here, the first binary division may correspond to a vertical or horizontal division having a ratio of N: N, and the second binary division may correspond to a vertical or horizontal division having a ratio of 3N: N or N: 3N, and each The binary partitioned root CU may be divided into CU0 and CU1 of each size specified in the partition table.

한편, 제1 삼진 분할은 N:2N:N의 비율을 갖는 수직 또는 수평 분할에 대응할 수 있으며, 제2 삼진 분할은 N:6N:N의 비율을 갖는 수직 또는 수평 분할에 대응될 수 있고, 각 삼진 분할된 root CU는 분할 테이블에 명시된 각 사이즈의 CU0, CU1 및 CU2로 분할될 수 있다.Meanwhile, the first ternary division may correspond to a vertical or horizontal division having a ratio of N: 2N: N, and the second ternary division may correspond to a vertical or horizontal division having a ratio of N: 6N: N and each The ternary divided root CU may be divided into CU0, CU1, and CU2 of each size specified in the partition table.

이에 따라, 도 20 내지 도 22는 분할 대상 코딩 유닛의 사이즈에 대응하여, 각각의 처리 가능한 분할 구조 및 분할된 경우의 코딩 유닛 사이즈를 나타내는 분할 테이블이다.Accordingly, FIGS. 20 to 22 are partition tables showing respective processable partition structures and coding unit sizes in the case of division, corresponding to the sizes of the division target coding units.

다만, 본 발명의 실시 예에 따른 픽쳐 분할부(110)는, 상기 제1 이진 분할, 제2 이진 분할, 제1 삼진 분할 또는 제2 삼진 분할을 적용하기 위한 최대 코딩 유닛 크기 및 최소 코딩 유닛 크기를 각각 설정할 수 있다.However, the picture division unit 110 according to an exemplary embodiment of the present invention may include a maximum coding unit size and a minimum coding unit size for applying the first binary division, the second binary division, the first ternary division, or the second ternary division. You can set each.

이는, 최소 크기, 예를 들어 2 이하의 가로 또는 세로 픽셀을 갖는 블록에 대응하는 부호화 및 복호화 처리를 수행하는 것은 복잡도 측면에서 비효율적일 수 있게 때문이며, 따라서, 본 발명의 실시 예에 따른 분할 테이블은 각 코딩 유닛의 사이즈별 허용 가능한 분할 구조를 사전 정의할 수 있다.This is because performing an encoding and decoding process corresponding to a block having a minimum size, for example, a horizontal or vertical pixel of 2 or less may be inefficient in terms of complexity, and thus, a partition table according to an embodiment of the present invention An allowable partition structure for each size of each coding unit may be predefined.

이에 따라, 픽쳐 분할부(110)는 최소 크기, 예를 들어 4 미만의 사이즈로서 가로 또는 세로 픽셀 사이즈가 2인 경우로 분할되는 경우등을 사전 방지할 수 있으며, 이를 위해, 분할 대상 블록의 사이즈로부터 제1 이진 분할, 제2 이진 분할, 제1 삼진 분할 또는 제2 삼진 분할에 대응하는 허용 여부를 미리 판단하고, 허용 가능한 분할 구조에 대응하는 RDO 성능 연산을 처리 비교하여 최적의 분할 구조를 결정할 수 있다.Accordingly, the picture dividing unit 110 may prevent a case in which the picture dividing unit 110 is divided into a minimum size, for example, a size less than 4 and the horizontal or vertical pixel size is 2, and the like, and for this purpose, the size of the target block to be divided. Determines in advance whether to allow the first binary division, the second binary division, the first ternary division, or the second ternary division, and then compares the RDO performance operations corresponding to the allowable division structure to determine an optimal division structure. Can be.

이에 따라, 도 20을 참조하면, 최대 크기의 루트 코딩 유닛 CU 0가 이진 분할된 경우, 이진 분할 구조는 1:1, 3:1 또는 1:3 수직 분할 중 어느 하나의 구조를 구성하는 CU0, CU1으로 분할될 수 있고, 삼진 분할 구조는 1:2:1 또는 1:6:1 수직 분할 중 어느 하나의 구조를 구성하는 CU0, CU1 및 CU2로 분할 될 수 있다.Accordingly, referring to FIG. 20, when the root coding unit CU 0 having the maximum size is binary divided, the binary division structure includes CU0 constituting any one of 1: 1, 3: 1, and 1: 3 vertical divisions. The three-part division structure may be divided into CU0, CU1, and CU2 constituting any one of 1: 2: 1 or 1: 6: 1 vertical division.

특히, 도 20에 도시된 바와 같이, 분할 대상 코딩 유닛의 사이즈에 따라, 허용 가능한 수직 분할 구조가 제한적으로 결정될 수 있다. 예를 들어, 64X64 코딩 유닛 및 32X32 코딩 유닛의 수직 분할구조는 제1 이진 분할, 제2 이진 분할, 제1 삼진 분할 및 제2 삼진 분할이 모두 허용될 수 있으나, 16X16 코딩 유닛의 수직 분할 구조 중 제2 삼진 분할은 불가능한 것으로 제한될 수 있다. 또한, 8X8 코딩 유닛의 수직 분할 구조는 제1 이진 분할만이 제한적으로 허용될 수도 있다. 이에 따라 복잡성을 야기시키는 최소 크기 미만의 블록으로의 분할은 사전에 방지될 수 있다.In particular, as shown in FIG. 20, according to the size of the coding target coding unit, an allowable vertical division structure may be limited. For example, the vertical division structure of the 64X64 coding unit and the 32X32 coding unit may allow all of the first binary division, the second binary division, the first ternary division, and the second ternary division, but among the vertical division structures of the 16X16 coding unit. The second ternary division may be limited to impossible. In addition, the vertical division structure of the 8X8 coding unit may be limited to allow only the first binary division. Thus, splitting into blocks of a minimum size that causes complexity can be prevented in advance.

마찬가지로, 도 21을 참조하면, 최대 크기의 루트 코딩 유닛 CU 0가 이진 분할된 경우, 이진 분할 구조는 1:1, 3:1 또는 1:3 수평 분할 중 어느 하나의 구조를 구성하는 CU0, CU1으로 분할될 수 있고, 삼진 분할 구조는 1:2:1 또는 1:6:1 수평 분할 중 어느 하나의 구조를 구성하는 CU0, CU1 및 CU2로 분할 될 수 있다.Similarly, referring to FIG. 21, when the root coding unit CU 0 of the maximum size is binary divided, the binary division structure constitutes one of 1: 1, 3: 1, or 1: 3 horizontal division. The ternary division structure may be divided into CU0, CU1 and CU2 constituting any one of 1: 2: 1 or 1: 6: 1 horizontal division.

마찬가지로, 도 21에 도시된 바와 같이, 분할 대상 코딩 유닛의 사이즈에 따라, 허용 가능한 수평 분할 구조가 제한적으로 결정될 수 있다. 예를 들어, 64X64 코딩 유닛 및 32X32 코딩 유닛의 수평 분할구조는 제1 이진 분할, 제2 이진 분할, 제1 삼진 분할 및 제2 삼진 분할이 모두 허용될 수 있으나, 16X16 코딩 유닛의 수평 분할 구조 중 제2 삼진 분할은 불가능한 것으로 제한될 수 있다. 또한, 8X8 코딩 유닛의 수평 분할 구조는 제1 이진 분할만이 제한적으로 허용될 수도 있다. 이에 따라 복잡성을 야기시키는 최소 크기 미만의 블록으로의 분할은 사전에 방지될 수 있다.Likewise, as shown in FIG. 21, according to the size of the coding target coding unit, an allowable horizontal division structure may be limited. For example, the horizontal division structure of the 64X64 coding unit and the 32X32 coding unit may allow all of the first binary division, the second binary division, the first ternary division, and the second ternary division, but among the horizontal division structures of the 16X16 coding unit. The second ternary division may be limited to impossible. In addition, the horizontal division structure of the 8X8 coding unit may be limited to only the first binary division. Thus, splitting into blocks of a minimum size that causes complexity can be prevented in advance.

한편, 도 22는 먼저 수직 분할된 코딩 유닛에 대응하는 수평 분할이 처리되는 경우의 분할 형태를 예시한 도면이다.Meanwhile, FIG. 22 is a diagram illustrating a division form when the horizontal division corresponding to the coding unit vertically divided is processed.

도 22를 참조하면, 픽쳐 분할부(110)는 분할 테이블에 따라, 수직 분할된 코딩 유닛을 제1 이진 분할 또는 제2 이진 분할로 수평 분할 처리하거나, 제1 삼진 분할 또는 제2 삼진 분할로 수평 분할 처리할 수 있다.Referring to FIG. 22, the picture division unit 110 horizontally processes a vertically divided coding unit into a first binary division or a second binary division or horizontally processes a first ternary division or a second ternary division according to a division table. Can be split.

예를 들어, 32X64 로 수직 분할된 코딩 유닛에 대응하여, 픽쳐 분할부(110)는 제1 이진 분할에 따라 32X32의 CU0, CU1으로 분할하거나, 제2 이진 분할에 따라 32X48, 32X16의 C0, CU1으로 분할하거나, 제1 삼진 분할에 따라, 32X32, 32X16, 32X16의 CU0, CU1, CU2로 분할하거나, 제2 삼진 분할에 따라 32X8, 64X48, 32X8의 CU0, CU1, CU2로 분할할 수 있다.For example, in response to the coding unit vertically divided into 32X64, the picture division unit 110 divides the CU0 and CU1 of 32X32 according to the first binary division, or the C0 and CU1 of 32X48 and 32X16 according to the second binary division. Or divided into 32X32, 32X16, and 32X16 CU0, CU1, and CU2 according to the first ternary division, or divided into 32X8, 64X48, and 32X8, CU0, CU1, and CU2, according to the second ternary division.

또한, 픽쳐 분할부(110)는 수평 분할된 코딩 유닛을 제1 이진 분할 또는 제2 이진 분할로 수직 분할 처리하거나, 제1 삼진 분할 또는 제2 삼진 분할로 수직 분할 처리할 수 있다.In addition, the picture division unit 110 may vertically divide the horizontally divided coding unit into the first binary division or the second binary division, or vertically divide the horizontal division coding unit into the first ternary division or the second ternary division.

예를 들어, 32X16 으로 수평 분할된 코딩 유닛에 대응하여, 픽쳐 분할부(110)는 제1 이진 분할에 따라 16X16의 CU0, CU1으로 분할하거나, 제2 이진 분할에 따라 24X16 8X16의 C0, CU1으로 분할하거나, 제1 삼진 분할에 따라, 8X16, 16X16, 8X16의 CU0, CU1, CU2로 분할하거나, 제2 삼진 분할에 따라 4X16, 24X16, 4X16의 CU0, CU1, CU2로 분할할 수 있다.For example, in response to a coding unit horizontally divided into 32X16, the picture division unit 110 divides the CU0 and the CU1 of 16X16 according to the first binary division, or the C0 and CU1 of 24X16 8X16 according to the second binary division. The image may be divided into CU0, CU1, and CU2 of 8X16, 16X16, and 8X16 according to the first ternary division, or CU0, CU1, and CU2 of 4X16, 24X16, and 4X16, according to the second ternary division.

이러한 분할 허용 구조는 CTU의 크기, CTU 그룹 단위 및 슬라이스 단위와, 수직 및 수평 방향별로 상이하게 조건부로 결정될 수 있는 바, 제1 이진 분할, 제2 이진 분할, 제1 삼진 분할 및 제2 삼진 분할 처리되는 경우의 각 CU 분할 비율 및 결정 크기 정보가 분할 테이블에 의해 정의되거나, 조건 정보가 미리 설정될 수 있다.The division allowance structure may be conditionally determined differently according to the size of the CTU, the CTU group unit and the slice unit, and in the vertical and horizontal directions, such as: first binary division, second binary division, first ternary division, and second ternary division Each CU partition ratio and decision size information in the case of processing may be defined by a partition table, or condition information may be set in advance.

이러한 복합 분할 처리 프로세스를 도 23을 참조하여 보다 구체적으로 설명하도록 한다.This complex division process will be described in more detail with reference to FIG. 23.

도 23을 참조하면, 본 발명의 실시 예에 따른 부호화 장치(10)는, 픽쳐 분할부(110)를 통해 전술한 복합 분할을 처리하고, 이에 대응하는 분할 정보를 SPLIT_MODE 정보를 이용하여 시그널링 할 수 있다.Referring to FIG. 23, the encoding apparatus 10 according to an embodiment of the present invention may process the above-described complex partitioning through the picture partitioning unit 110 and signal the corresponding partitioning information using the SPLIT_MODE information. have.

이를 위해, 부호화 장치(10)는 픽쳐 분할부(110)의 블록 분할 및 파티션 처리 프로세스에 진입하고(S1001), 복합 분할을 위한 분할 모드 SPLIT_MODE 파싱을 활성화한다(S1003).To this end, the encoding apparatus 10 enters a block division and partition processing process of the picture division unit 110 (S1001), and activates a split mode SPLIT_MODE parsing for complex division (S1003).

이에 따라, 부호화 장치(10)는 사전 정의된 조건에 의해 분할 정보를 나타내는 SPLIT_MODE 정보가 파싱되는 경우(S1005), 픽쳐 분할부(110)는 SPLIT_MODE 정보가 NO_SPLIT인지 여부와, 코딩 유닛의 가로 및 세로 크기가 최소 CU 크기에 해당하는지 여부를 판단한다(S1007).Accordingly, when the SPLIT_MODE information indicating the split information is parsed according to a predefined condition (S1005), the encoding apparatus 10 determines whether the SPLIT_MODE information is NO_SPLIT and whether the SPLIT_MODE information is NO_SPLIT. It is determined whether the size corresponds to the minimum CU size (S1007).

그리고, 부호화 장치(10)는 SPLIT_MODE 정보가, NO_SPLIT이거나 최소 CU 크기에 해당하는 경우에는 이후의 분할을 처리하지 않고, 블록 정보의 예측 부호화를 처리한다(S1011).When the SPLIT_MODE information is NO_SPLIT or corresponds to the minimum CU size, the encoding apparatus 10 processes prediction encoding of block information without processing subsequent divisions (S1011).

반면, 부호화 장치(10)는 SPLIT_MODE 정보가, NO_SPLIT이 아니면서 최소 CU 크기에 해당하지 않는 겨우, 전술한 분할 테이블에 기초한 적응적 복합 분할을 처리한다(S1009).On the other hand, if the SPLIT_MODE information is not NO_SPLIT and does not correspond to the minimum CU size, the encoding apparatus 10 processes adaptive complex partitioning based on the aforementioned partition table (S1009).

예를 들어, 부호화 장치(10)의 픽쳐 분할부(110)는 CU 크기 및 SPLIT_MODE 정보에 따라, ROOT 분할인지, 수직 또는 수평의 BI_VER1 분할, BI_VER2 분할, TRI_VER1 분할 또는 TRI_VER2 분할 중 어느 하나의 분할에 따라, 쿼드 트리 분할 또는 수직 이진 분할, 수직 삼진 분할, 수평 이진 분할, 수평 삼진 분할 중 어느 하나의 분할 프로세스를 처리할 수 있다.For example, the picture division unit 110 of the encoding apparatus 10 may be divided into any one of ROOT division, vertical or horizontal BI_VER1 division, BI_VER2 division, TRI_VER1 division, or TRI_VER2 division according to CU size and SPLIT_MODE information. Accordingly, the division process of any one of quad tree division, vertical binary division, vertical ternary division, horizontal binary division, and horizontal ternary division may be processed.

이와 같은 분할 처리에 따라, 이진 트리 및 삼진 트리를 이용한 세분화된 분할을 조건부로 허용함으로써, 그 코딩 유닛에 특성에 맞는 적절한 비율의 분할이 가능하게 되며 이에 따른 부호화 효율은 향상될 수 있다.According to such a division process, by conditionally allowing the subdivided division using the binary tree and the ternary tree, it is possible to divide the ratio appropriate to the characteristics of the coding unit, thereby improving the coding efficiency.

한편, 본 발명의 실시 예에 따른 블록 분할 구조가 복합화되고 다변화됨에 따라, 본 발명의 실시 예에 따른 움직임 보상 부호화 및 복호화 프로세스 또한 정확한 예측을 위해, 메인 블록 및 서브 블록에 대응하는 선택적 부호화 및 복호화 프로세스를 포함할 수 있다.Meanwhile, as the block division structure according to the embodiment of the present invention is complexed and diversified, the motion compensation encoding and decoding process according to the embodiment of the present invention also performs selective encoding and decoding corresponding to the main block and the sub block for accurate prediction. Process may be included.

이를 위해, 본 발명의 실시 예에 따른 움직임보상 예측부(240)는, 도 23에 도시된 바와 같이, 메인 블록 움직임 보상 복호화부(2410), 서브 블록 움직임 보상 결정부(2420) 및 서브 블록 움직임 보상 처리부(2430)를 더 포함할 수 있다.To this end, the motion compensation predictor 240 according to an embodiment of the present invention, as shown in FIG. 23, the main block motion compensation decoder 2410, the sub block motion compensation determiner 2420, and the sub block motion. The processor may further include a compensation processor 2430.

먼저, 메인 블록 움직임 보상 복호화부(2410)는 본 발명의 실시 예에 따라 앞서 설명된 움직임 보상 예측부(240)의 코딩 유닛 기반 움직임 보상 예측 처리를 수행할 수 있다. 여기서 메인 블록 움직임 보상에 이용되는 움직임 예측 모드는 전술한 머지 모드, AMVP 모드 또는 스킵 모드 등이 예시될 수 있다.First, the main block motion compensation decoder 2410 may perform coding unit based motion compensation prediction processing of the motion compensation predictor 240 described above according to an embodiment of the present invention. Here, the motion prediction mode used for the main block motion compensation may include the above-described merge mode, AMVP mode, or skip mode.

그리고, 서브 블록 움직임 보상 결정부(2420)는 메인 블록보다 세분화된 서브 블록 유닛에 대응하는 정밀한 움직임 예측의 수행여부를 결정한다. 이를 위해, 서브 블록 움직임 보상 결정부(2420)는 메인 블록 움직임 보상 복호화부(2410)로부터 기 복호화되어 획득되는 움직임 보상 복호화 정보를 이용하여, 서브 블록 움직임 보상 처리여부를 결정할 수 있다.Then, the sub block motion compensation determiner 2420 determines whether to perform the precise motion prediction corresponding to the sub block unit subdivided from the main block. To this end, the sub-block motion compensation determiner 2420 may determine whether to perform sub-block motion compensation by using motion compensation decoding information that is previously decoded from the main block motion compensation decoder 2410.

즉, 메인 블록 움직임 보상 복호화부(2410)에서는 코딩 유닛의 움직임 보상 예측 복호화에 의해 획득되는 참조 픽처 정보, 움직임 파라미터 정보 또는 움직임 보상 모드 정보 중 적어도 하나가 서브 블록 움직임 보상 결정부(2420)로 출력될 수 있으며, 서브 블록 움직임 보상 결정부(2420)는 상기 참조 픽처 정보, 움직임 파라미터 정보 또는 움직임 보상 모드 정보 중 적어도 하나를 이용하여, 상기 메인 블록에 대응하는 서브 블록 및 그 서브 블록의 움직임 보상여부를 결정할 수 있으며, 결정된 서브 블록에 대응하는 서브 블록 움직임 보상 모드를 조건부로 선택할 수 있다.That is, the main block motion compensation decoder 2410 outputs at least one of reference picture information, motion parameter information, or motion compensation mode information obtained by motion compensation prediction decoding of the coding unit to the sub block motion compensation determiner 2420. The sub-block motion compensation determiner 2420 may use at least one of the reference picture information, motion parameter information, or motion compensation mode information to determine whether to compensate for the sub block corresponding to the main block and the sub block. In this case, the subblock motion compensation mode corresponding to the determined subblock may be conditionally selected.

이에 따라, 서브 블록 움직임 보상 처리부(2430)는, 결정된 서브 블록과, 서브 블록 움직임 보상 모드에 대응하는 각 모션 보상 처리부를 동작시켜, 서브 블록에 대응하는 정밀화된 움직임 보상 예측을 처리할 수 있다.Accordingly, the subblock motion compensation processor 2430 may operate the determined subblock and each motion compensation processor corresponding to the subblock motion compensation mode to process refined motion compensation prediction corresponding to the subblock.

여기서, 서브 블록 움직임 보상 모드는 예를 들어, FRUC(FRAME RATE UP-CONVERSION) 모드, BIO(BI-DIRECTIONAL OPTICAL FLOW) 모드, AMP(AFFINE MOTION PREDICTION)모드, OBMC(OVERLAPPED BLOCK MOTION COMPENSATION) 모드, DMVR(DECODER-SIDE MOTION VECTOR REFINEMENT) 모드, ATMVP(Alternative temporal motion vector prediction) 모드, STMVP(Spatial-temporal motion vector prediction) 모드, LIC(Local Illumination Compensation) 모드 중 적어도 하나를 더 포함할 수 있으며, 사전 결정된 조건에 따라 블록 적응적으로 결정될 수 있다.Here, the sub-block motion compensation mode, for example, FRUC (FRAME RATE UP-CONVERSION) mode, BIO (BI-DIRECTIONAL OPTICAL FLOW) mode, AMP (AFFINE MOTION PREDICTION) mode, OBMC (OVERLAPPED BLOCK MOTION COMPENSATION) mode, DMVR (DECODER-SIDE MOTION VECTOR REFINEMENT) mode, alternative temporal motion vector prediction (ATMVP) mode, spatial-temporal motion vector prediction (STMVP) mode, and Local Illumination Compensation (LIC) mode. It may be determined block adaptively according to the condition.

특히, 본 발명의 실시 예에 따르면 정밀화된 움직임 보상 예측 처리부로서, 서브 블록 움직임 보상 결정부(2420)는 아핀 모션 보상(AFFINE MOTION PREDICTION) 처리부 또는 OBMC(OVERLAPPED BLOCK MOTION COMPENSATION) 처리부를 포함할 수 있다.In particular, according to an embodiment of the present invention, as a precision motion compensation prediction processing unit, the sub-block motion compensation determining unit 2420 may include an affine motion compensation processing unit or an OBMC (OVERLAPPED BLOCK MOTION COMPENSATION) processing unit. .

특히, OBMC 처리부의 경우, 프레임 간 움직임 정보가 중첩되는 영역에 대응하는 추가적인 움직임 보상을 처리하는 프로세서이며, 각 블록의 움직임 복원에 중첩 블록 움직임 보상과 기존의 블록 움직임 보상을 적응적으로 선택하여 적용하는 프로세스를 처리할 수 있다. 또한 OBMC 처리는, 상기 현재 블록의 일부 화소들에 대하여 현재 블록의 움직임 정보를 이용하여 획득한 참조 화소와 공간적으로 인접한 움직임 정보를 이용하여 획득한 참조 화소를 가중합하여 보정하는 프로세스를 포함할 수 있다. 이와 같은 OBMC의 처리는 부가 정보 전송에 따른 압축 비트율 저하와 복잡도 증가로 인해, 선택적이고 적응적으로 처리되어야 하며, 이에 따라 특정 문턱치(THRESHOLD)이상의 화소를 갖는 중첩 영역으로서, 특정 특성을 갖는 영역에 대하여만 적용될 수 있다.In particular, the OBMC processor is a processor that processes additional motion compensation corresponding to an area where the inter-frame motion information overlaps, and adaptively selects the overlapped block motion compensation and the existing block motion compensation to restore the motion of each block. To handle the process. In addition, the OBMC process may include a process of weighting and correcting the reference pixels acquired using the motion information spatially adjacent to the reference pixels acquired using the motion information of the current block with respect to some pixels of the current block. . Such processing of the OBMC is to be selectively and adaptively processed due to the reduction in the compression bit rate and the increase in complexity due to the transmission of additional information. Accordingly, the OBMC is an overlapping area having pixels above a certain threshold (THRESHOLD), and has a specific characteristic. Only applicable for

그리고, 본 발명의 실시 예에 따른 OBMC 처리부는 각 이러한 적응적 OBMC 움직임 보상 처리를 사전 결정된 서브 블록 단위에 대하여만 처리할 수 있게 됨으로써, 그 부호화 및 복호화 효율과, 압축 전송율을 향상시킬 수 있다.In addition, the OBMC processor according to an embodiment of the present invention can process each such adaptive OBMC motion compensation process only for a predetermined subblock unit, thereby improving its encoding and decoding efficiency and compression rate.

이를 위해, 서브 블록 움직임 보상 결정부(2420)에서는 하나 이상의 방식으로 서브 블록 및 서브 블록의 OBMC 움직임 보상 모드 적용 여부를 결정할 수 있다.To this end, the sub-block motion compensation determiner 2420 may determine whether to apply the OBMC motion compensation mode of the sub-block and the sub-block in one or more ways.

제1 실시 예로서, 서브 블록 움직임 보상 결정부(2420)는 현재 복호화를 수행하는 블록에 대응하여 시그널링된 서브 블록 정보 및 플래그 정보를 파싱하여, 서브 블록 및 상기 서브 블록의 움직임 보상 모드를 결정할 수 있다.As a first embodiment, the sub-block motion compensation determiner 2420 may determine the sub-block and the motion compensation mode of the sub-block by parsing the signaled sub-block information and the flag information corresponding to the block currently performing decoding. have.

예를 들어, CTU 단위에 대응하는 CTU 헤더를 통해 상기 서브 블록 식별 정보 및 서브 블록의 움직임 보상 모드 플래그 정보가 시그널링될 수 있다. 또한, 코딩 유닛에 대응하는 코딩 유닛 헤더 정보에 서브 블록 여부 및 움직임 보상 모드 플래그 정보가 시그널링 될 수도 있다. 이에 따라, 서브 블록 움직임 보상 결정부(2420)는 메인 블록 움직임 보상 복호화부(2410)에서 복호화된 CTU 헤더 또는 각 블록별 헤더 정보를 파싱하여 서브 블록 및 상기 서브 블록의 움직임 보상 모드를 결정할 수 있다.For example, the sub block identification information and the motion compensation mode flag information of the sub block may be signaled through a CTU header corresponding to a CTU unit. In addition, whether or not a subblock and motion compensation mode flag information may be signaled in coding unit header information corresponding to the coding unit. Accordingly, the sub block motion compensation determiner 2420 may determine the sub block and the motion compensation mode of the sub block by parsing the CTU header decoded by the main block motion compensation decoder 2410 or header information for each block. .

제2 실시 예로서, 서브 블록 움직임 보상 결정부(2420)는 현재 복호화를 수행하는 블록과 주변 블록의 움직임 파라미터 정보를 이용하여, 서브 블록 및 서브 블록의 움직임 보상 모드를 결정할 수 있다. 이를 위해, 서브 블록 움직임 보상 결정부(2420)는 메인 블록 움직임 보상 복호화부(2410)로부터 현재 블록의 움직임 파라미터 정보를 서브 블록 움직임 보상 결정부(2420)로 전달할 수 있다.As a second embodiment, the sub-block motion compensation determiner 2420 may determine a motion compensation mode of the sub-block and the sub-block by using motion parameter information of the block currently performing decoding and the neighboring block. To this end, the sub block motion compensation determiner 2420 may transfer the motion parameter information of the current block from the main block motion compensation decoder 2410 to the sub block motion compensation determiner 2420.

제3 실시 예로서, 서브 블록 움직임 보상 결정부(2420)는 현재 복호화를 수행하는 블록 특성(블록의 크기 및 Depth) 및 분할 정보(분할 방향 및 분할 방법)를 이용하여, 서브 블록 및 서브 블록의 움직임 보상 모드를 결정할 수 있다. 이를 위해, 서브 블록 움직임 보상 결정부(2420)는 메인 블록 움직임 보상 복호화부(2410)로부터 현재 블록의 블록 특성 및 분할 정보를 서브 블록 움직임 보상 결정부(2420)로 전달할 수 있다.As a third embodiment, the sub-block motion compensation determiner 2420 uses the block characteristics (block size and depth) and partition information (division direction and partition method) for performing current decoding to determine the sub-block and the sub-block. The motion compensation mode may be determined. To this end, the sub block motion compensation determiner 2420 may transfer the block characteristics and the partition information of the current block from the main block motion compensation decoder 2410 to the sub block motion compensation determiner 2420.

제4 실시 예로서, 서브 블록 움직임 보상 결정부(2420)는, 서브 블록 단위 움직임 보상 모드를 그 상위 블록으로부터 상속시킬 수 있다. 예를 들어, 서브 블록 움직임 보상 결정부(2420)는 현재 복호화를 수행하는 블록이 분할된 블록일 경우, 분할된 블록의 상위 블록으로서, 예를 들어 Root 블록 또는 CTU 블록으로부터 서브 블록 단위의 움직임 보상 모드 정보를 상속받을 수 있다. 이를 위해, 서브 블록 움직임 보상 결정부(2420)는 상위 블록에 대응하는 서브 블록 단위 움직임 보상 모드 정보를 메인 블록 움직임 보상 복호화부(2410)로부터 획득하여, 현재 블록에 대해 상속시키고, 이에 따라 서브 블록 및 서브 블록의 움직임 보상 모드를 결정할 수 있다.As a fourth embodiment, the sub-block motion compensation determiner 2420 may inherit the sub-block motion compensation mode from the upper block. For example, the sub-block motion compensation determiner 2420 is an upper block of the partitioned block when the current decoding block is a partitioned block. For example, the sub block motion compensation determiner 2420 may perform motion compensation in units of a sub block from a root block or a CTU block. Can inherit mode information. To this end, the sub-block motion compensation determiner 2420 obtains sub-block motion compensation mode information corresponding to the higher block from the main block motion compensation decoder 2410 and inherits the current block, thereby subblocking. And a motion compensation mode of the sub block.

제5 실시 예로서, 서브 블록 움직임 보상 결정부(2420)는 현재 복호화를 수행하는 블록의 서브 블록들 중 일부를 움직임 정보를 기초로 그룹핑할 수 있으며, 그룹핑 영역에 대응하여, 부분적 움직임 보상 모드를 결정할 수도 있다. 이 경우 개별적 서브 블록들에 대한 판단 없이도 적절한 영역에 대응하는 서브 블록 움직임 보상 모드를 결정하고, 이에 따른 서브 블록 움직임 보상을 일괄적으로 처리할 수 있다.As a fifth embodiment, the sub-block motion compensation determiner 2420 may group some of the sub-blocks of the block currently being decoded based on the motion information, and in response to the grouping area, the sub-block motion compensation determiner 2420 may perform the partial motion compensation mode. You can also decide. In this case, the sub-block motion compensation mode corresponding to the appropriate region may be determined without determining individual sub-blocks, and the sub-block motion compensation may be processed accordingly.

한편, 서브 블록 움직임 보상 결정부(2420)는 분할 구조 정보에 기초하여, 현재 블록이 전술한 이진 트리 구조 및 삼진 트리 구조가 복합 처리된 블록의 경우, 특정 비율의 삼진 트리 구조 조건에 대응하여, 서브 블록 움직임 보상을 선택적으로 결정할 수 있다.On the other hand, the sub-block motion compensation determiner 2420, based on the partition structure information, in the case of a block in which the binary tree structure and the ternary tree structure described above are combined with the current block, corresponding to the ternary tree structure condition of a specific ratio, Sub-block motion compensation may be selectively determined.

예를 들어, 서브 블록 움직임 보상 결정부(2420)는 도 19 및 20에서 도시된 바와 같이, 분할 구조가 1:6:1의 삼진 트리 구조를 갖는 TRI_VER2 수평 분할 또는 TRI_VER2 수직 분할인 경우, 분할된 가장자리 좌우 경계 영역 블록 또는 가장자리 상하단 경계 영역 블록을 서브 블록으로 결정하고, 경계 영역에 적합한 OBMC 움직임 보상 모드를 결정할 수 있는 것이다.For example, as shown in FIGS. 19 and 20, the sub-block motion compensation determiner 2420 is divided when TRI_VER2 horizontal division or TRI_VER2 vertical division has a ternary tree structure of 1: 6: 1. The edge left and right boundary region blocks or the upper and lower edge boundary region blocks may be determined as sub blocks, and an OBMC motion compensation mode suitable for the boundary regions may be determined.

도 25는 서브 블록 크기 및 분할 정보에 기초한 적응적 서브 블록 움직임 보상 프로세스를 나타내는 흐름도이다.25 is a flowchart illustrating an adaptive subblock motion compensation process based on subblock size and partition information.

도 25를 참조하면, 서브 블록 움직임 보상 결정부(2420)는 메인 블록 움직임 보상 복호화부(2410)로부터 복호화된 블록의 서브 블록 사이즈 정보를 식별한다(S2001).Referring to FIG. 25, the sub block motion compensation determiner 2420 identifies sub block size information of a block decoded by the main block motion compensation decoder 2410 (S2001).

그리고, 서브 블록 움직임 보상 결정부(2420)는 서브 블록 사이즈에 대응하는 블록 분할 정보를 식별한다(S2003).The sub block motion compensation determiner 2420 identifies block partitioning information corresponding to the sub block size (S2003).

이후, 서브 블록 움직임 보상 결정부(2420)는 조건 정보에 따른 서브 블록 움직임 보상 모드를 결정한다(S2005).Thereafter, the subblock motion compensation determiner 2420 determines a subblock motion compensation mode according to the condition information (S2005).

전술한 바와 같이, 서브 블록 움직임 보상 결정부(2420)는 블록 크기 및 분할 정보에 따라 적응적 조건 판단을 처리하고, 이에 대응하는 서브 블록의 움직임 보상 모드를 결정할 수 있다.As described above, the sub-block motion compensation determiner 2420 may process the adaptive condition determination according to the block size and the partition information, and determine the motion compensation mode of the corresponding sub-block.

전술한 예시와 같이, 본 발명의 실시 예에 따른 서브 블록 움직임 보상 결정부(2420)는 서브 블록의 사이즈가 최소 크기 이상이고, 최대 크기 이하인 경우에, 그 분할 구조가 1:6:1의 삼진 트리 구조를 갖는 TRI_VER2 수평 분할 또는 TRI_VER2 수직 분할인 경우, 분할된 가장자리 좌우 경계 영역 블록 또는 가장자리 상하단 경계 영역 블록을 서브 블록으로 결정하고, 경계 영역에 적합한 OBMC 움직임 보상 모드를 결정할 수 있다.As described above, the sub-block motion compensation determiner 2420 according to an exemplary embodiment of the present invention has a strikeout structure of 1: 6: 1 when the size of the subblock is greater than or equal to the minimum size and less than or equal to the maximum size. In the case of TRI_VER2 horizontal division or TRI_VER2 vertical division having a tree structure, the divided edge left and right boundary region blocks or edge upper and lower boundary region blocks may be determined as sub blocks, and an OBMC motion compensation mode suitable for the boundary region may be determined.

이후, 결정된 서브 블록 움직임 보상 모드에 따라, 서브 블록 움직임 보상 처리부(2430)는 적응적 서브 블록 움직임 보상 처리를 수행한다(S2007).Thereafter, according to the determined subblock motion compensation mode, the subblock motion compensation processing unit 2430 performs an adaptive subblock motion compensation process (S2007).

도 26은 본 발명의 실시 예에 따른 복호화 장치의 필터링 프로세스를 도시한 흐름도이며, 도 27은 본 발명의 실시 예에 따른 적응적 필터 적용을 나타낸다.FIG. 26 is a flowchart illustrating a filtering process of a decoding apparatus according to an embodiment of the present invention, and FIG. 27 is a diagram illustrating an adaptive filter application according to an embodiment of the present invention.

도 26을 참조하면, 본 발명의 실시 예에 따라 메인 블록 및 서브 블록의 적응적 움직임 보상이 수행되면(S3005), 복호화 장치(20)는 후처리부(250)를 통해, 인 루프 필터링 대상을 결정한다(S3007).Referring to FIG. 26, when adaptive motion compensation of a main block and a sub block is performed (S3005) according to an embodiment of the present disclosure, the decoding apparatus 20 determines an in-loop filtering target through the post processor 250. (S3007).

그리고, 메인 블록 및 서브 블록 정보에 따라 결정된 인 루프 필터링 대상에 기초하여, 후처리부(250)는 제1 블록 경계 필터링을 수행하고(S3009), 제2 블록 경계 필터링을 수행하며(S3011), 이후 블록 내부 필터링을 수행한다(S3013). 여기서, 상기 제1 블록은 수평 방향 인접 블록에 대응할 수 있으며, 제2 블록은 수직 방향 인접 블록에 대응할 수 있다.Then, based on the in-loop filtering target determined according to the main block and sub block information, the post processor 250 performs the first block boundary filtering (S3009), performs the second block boundary filtering (S3011), and then. Block internal filtering is performed (S3013). Here, the first block may correspond to a horizontally adjacent block, and the second block may correspond to a vertically adjacent block.

이에 따라, 후처리부(250)는 전술한 디블록킹 필터 또는 기타 다양한 저대역 필터를 이용하여 인 루프 필터링을 서브 블록 적응적으로 처리함으로써, 경계 영역에 대응한 적응적 디블록킹 처리를 수행할 수 있다. Accordingly, the post-processor 250 may perform adaptive deblocking processing corresponding to the boundary region by adaptively sub-blocking the in-loop filtering using the above-described deblocking filter or various other low-band filters. .

이와 같이, 도 26을 참조하면, 본 발명의 실시 예에 따라 현재 블록에 대하여 움직임 보상과 블록 경계 영역에 대한 인 루프 필터링을 수행함에 있어서, 현재 블록에 대하여 OBMC를 이용하여 블록의 경계 영역의 일부 화소들에 대하여 중첩하여 움직임 보상을 수행한 경우에는 인 루프 필터링을 적응적으로 수행할 수 있다.As described above, referring to FIG. 26, when performing motion compensation and in-loop filtering on a block boundary region with respect to a current block according to an embodiment of the present invention, a part of a boundary region of a block using OBMC for the current block is performed. In the case where the motion compensation is performed by overlapping the pixels, in-loop filtering may be adaptively performed.

이때, 상기 OBMC를 이용하여 블록의 경계 영역의 일부 화소들에 대하여 중첩하여 움직임 보상을 수행한 경우, 해당 영역에 OBMC가 적용되었는지에 대한 여부를 인 루프 필터링 수행 단계에서 이를 반영하여 필터링의 강도를 조절하거나, 필터링의 수행 여부를 결정하는데 참조할 수 있다.In this case, when motion compensation is performed by overlapping some pixels of the boundary area of the block using the OBMC, whether the OBMC is applied to the corresponding area is reflected in the in-loop filtering step to determine the strength of the filtering. It can be used to adjust or determine whether to perform filtering.

또한, 상기 실시 예를 확장하여 도 23과 도 25를 참조하면, 본 발명의 실시 예에 따라 현재 블록이 서브 블록 단위의 움직임 보상을 수행하고, 해당 서브 블록의 경계에서 OBMC가 수행되어 서브 블록의 경계 화소영역에서 중첩하여 움직임 보상을 수행한 경우에도 서브 블록의 경계에서 인 루프 필터링을 적용함에 있어 이 정보를 참조할 수 있다.In addition, referring to FIGS. 23 and 25 by extending the embodiment, according to an embodiment of the present invention, the current block performs motion compensation in units of sub-blocks, and OBMC is performed at the boundary of the sub-blocks. Even when motion compensation is performed by overlapping in the boundary pixel region, this information may be referred to in applying in-loop filtering at the boundary of the sub-block.

보다 구체적으로, 도 27을 참조하면, 도 27은 본 발명의 실시 예에 따른 메인 블록인 코딩 유닛 CU에 대응하여, 각 서브 블록 영역에 대응하는 블록 적응적 디블록킹 필터 처리가 수행되는 것을 나타낸다.More specifically, referring to FIG. 27, FIG. 27 shows that block adaptive deblocking filter processing corresponding to each sub-block region is performed corresponding to a coding unit CU that is a main block according to an embodiment of the present invention.

도 27에 도시된 바와 같이, 복호화 장치(20)의 후처리부(250)는 서브 블록의 적응적 움직임 보상이 처리된 경우, 제1 블록(α)과의 경계 영역에 대응하는 서브 블록들을 제1 경계 영역으로 결정하고, 상기 제1 경계 영역에 대응한 제1 블록 경계 영역 필터링을 부분적으로 수행할 수 있다.As illustrated in FIG. 27, when the adaptive motion compensation of the subblock is processed, the post-processing unit 250 of the decoding apparatus 20 may select the first subblocks corresponding to the boundary area with the first block α. The boundary region may be determined, and the first block boundary region filtering corresponding to the first boundary region may be partially performed.

또한, 후처리부(250)는 제2 블록(β)과의 경계 영역에 대응하는 서브 블록들을 제2 경계 영역으로 결정하고, 상기 제2 경계 영역에 대응한 제2 블록 경계 영역 필터링을 부분적으로 수행할 수 있다.In addition, the post-processing unit 250 determines subblocks corresponding to the boundary area with the second block β as the second boundary area, and partially performs filtering of the second block boundary area corresponding to the second boundary area. can do.

그리고, 후처리부(250)는 경계 필터링이 처리된 현재 코딩 블록의 나머지 내부 영역에 대하여, 내부 필터링 처리를 수행할 수 있다.The post processor 250 may perform an internal filtering process on the remaining inner regions of the current coding block subjected to the boundary filtering.

이에 따라, 블록 경계의 인접 영역은 예를 들어, 4 x 4 크기의 서브 블록 단위로 세분화될 수 있으며, 상기 서브 블록 단위의 분할 비율이 이진 트리 및 삼진 트리의 복합 구조화됨에 따라, 보다 다양한 형태의 블록 경계 필터링이 가능하게 된다.Accordingly, adjacent regions of the block boundary may be subdivided into sub-block units having a size of 4 × 4, for example, and as the split ratio of the sub-block units is structured in a binary tree and a ternary tree, a variety of forms may be obtained. Block boundary filtering becomes possible.

한편, 도 28 내지 도 29는 본 발명의 실시 예에 따라 앞서 서술한 블록 분할 정보의 시그널링과, 서브 블록 움직임 보상 결정부(2420)로의 시그널링과, 상기 후처리부(250)에서 처리되는 경계 영역 결정 및 적응적 필터링 적용 여부에 대한 시그널링을 위한 헤더 정보를 예시한 도면이다.28 to 29 illustrate signaling of the above-described block partition information, signaling to the sub-block motion compensation determiner 2420, and determination of a boundary region processed by the post processor 250 according to an embodiment of the present invention. And header information for signaling whether to apply adaptive filtering.

도 28에 도시된 바와 같이, 도 29에 기술된 시그널링 헤더 정보는 CTU 단위에 대응하거나, 움직임 정보에 따라 결정된 CTU 그룹 단위에 대응하거나, 슬라이스 단위에 대응하여 전송될 수 있다.As illustrated in FIG. 28, the signaling header information described in FIG. 29 may be transmitted corresponding to a CTU unit, a CTU group unit determined according to motion information, or a slice unit.

이에 따라, 복호화 장치(20)는 CTU 헤더 정보로부터 분할 트리 리스트 정보를 획득할 수 있으며, 서브 블록 적응적 디블록킹 필터 적용 여부를 결정하거나, 경계 영역을 결정하거나, 서브 블록의 움직임 보상으로서 OBMC의 적용여부를 결정하기 위한 플래그 정보를 획득할 수 있다.Accordingly, the decoding apparatus 20 may obtain split tree list information from the CTU header information, determine whether to apply the subblock adaptive deblocking filter, determine the boundary region, or compensate for the motion of the subblock. Flag information for determining whether to apply can be obtained.

또한, 복호화 장치(20)는 CU 헤더 정보로부터 서브 블록 여부를 결정하기 위한 분할 최대 깊이 정보와, 이에 대응하는 서브 블록 적응적 디블록킹 필터 적용 여부를 결정하거나, 경계 영역을 결정하거나, OBMC의 적용여부를 결정하기 위한 플래그 정보를 획득할 수도 있다.In addition, the decoding apparatus 20 may determine split sub-depth information for determining whether to block a subblock from CU header information and whether to apply a subblock adaptive deblocking filter corresponding thereto, determine a boundary region, or apply an OBMC. Flag information for determining whether or not may be obtained.

이에 따라, 본 발명의 실시 예에 따른 부호화 장치(10) 및 복호화 장치(20)는 복합 분할 트리 구조에 기초한 움직임 보상을 서브 블록 단위로 적응적으로 처리할 수 있으며, 이에 따라 효율적인 OBMC의 동작과 이에 연동한 적응적 필터링을 처리함으로써, 부호화 및 복호화 효율 및 전송 효율을 극대화할 수 있다.Accordingly, the encoding apparatus 10 and the decoding apparatus 20 according to an embodiment of the present invention may adaptively process motion compensation based on a complex partition tree structure in sub-block units, and thus, an efficient operation of the OBMC and By processing the adaptive filtering linked to this, it is possible to maximize encoding and decoding efficiency and transmission efficiency.

상술한 본 발명에 따른 방법은 컴퓨터에서 실행되기 위한 프로그램으로 제작되어 컴퓨터가 읽을 수 있는 기록 매체에 저장될 수 있으며, 컴퓨터가 읽을 수 있는 기록 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다.The method according to the present invention described above may be stored in a computer-readable recording medium that is produced as a program for execution on a computer, and examples of the computer-readable recording medium include ROM, RAM, CD-ROM, magnetic tape , Floppy disks, optical data storage devices, and the like, and also include those implemented in the form of carrier waves (eg, transmission over the Internet).

컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다. 그리고, 상기 방법을 구현하기 위한 기능적인(function) 프로그램, 코드 및 코드 세그먼트들은 본 발명이 속하는 기술분야의 프로그래머들에 의해 용이하게 추론될 수 있다.The computer readable recording medium can be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion. In addition, functional programs, codes, and code segments for implementing the method can be easily inferred by programmers in the art to which the present invention belongs.

또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 다양한 변형 실시가 가능한 것은 물론이고, 이러한 변형 실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해 되어서는 안될 것이다.In addition, although the preferred embodiment of the present invention has been shown and described above, the present invention is not limited to the specific embodiments described above, but the technical field to which the invention belongs without departing from the spirit of the invention claimed in the claims. Of course, various modifications can be made by those skilled in the art, and these modifications should not be individually understood from the technical spirit or prospect of the present invention.

Claims (11)

영상 복호화 방법에 있어서,
영상의 픽쳐가 인터 예측(inter prediction) 또는 인트라 예측(intra prediction)이 수행되는 기본 단위인 복수의 코딩 유닛(Coding Unit)들로 분할되고, 상기 픽쳐 또는 상기 분할된 코딩 유닛을 쿼드 트리(quad tree), 이진 트리(binary tree) 또는 삼진 트리(ternery tree) 구조로 분할한 코딩 유닛을 복호화하기 위한 대상 블록을 결정하는 단계; 및
상기 대상 블록의 분할 정보에 기초하여, 상기 대상 블록의 서브 블록에 대응하는 서브 블록 움직임 보상 모드를 적응적으로 결정하는 단계;를 포함하는
영상 복호화 방법.
In the video decoding method,
A picture of an image is divided into a plurality of coding units, which are basic units on which inter prediction or intra prediction is performed, and a quad tree of the picture or the split coding unit. Determining a target block for decoding a coding unit divided into a binary tree or a ternery tree structure; And
Adaptively determining a subblock motion compensation mode corresponding to the subblock of the target block based on the split information of the target block;
Image Decoding Method.
제1항에 있어서,
상기 삼진 트리 구조는 상위 코딩 유닛이 수평 분할 또는 수직 분할된 코딩 유닛인 경우 결정되는 것을 특징으로 하는
영상 복호화 방법.
The method of claim 1,
The ternary tree structure is determined when the higher coding unit is a horizontal division or a vertical division coding unit.
Image Decoding Method.
제1항에 있어서,
상기 삼진 트리 구조는 상위 코딩 유닛이 수평 분할되어, 가로 W 및 세로 H 길이를 갖는 코딩 유닛인 경우, 가로 W/8, 세로 H/4 길이인 좌측 가장자리의 제1 영역과, 가로 W/8*6, 세로 H/4 길이로서, 중간 영역인 제2 영역과, 가로 W/8, 세로 H/4 길이의 우측 가장자리의 제3 영역으로 삼진 분할되는 트리 구조를 포함하는
영상 복호화 방법.
The method of claim 1,
The ternary tree structure may include a first region of a left edge having a horizontal W / 8 and a vertical H / 4 length and a horizontal W / 8 * when the higher coding unit is horizontally divided and is a coding unit having horizontal W and vertical H lengths. 6, longitudinal H / 4 length, comprising a tree structure triangulated into a second region that is an intermediate region and a third region of the right edge of the horizontal W / 8, vertical H / 4 length;
Image Decoding Method.
제1항에 있어서,
상기 결정하는 단계는,
상기 대상 블록에 대응하여 시그널링된 서브 블록 정보 및 플래그 정보를 파싱하여, 상기 서브 블록 및 상기 서브 블록의 움직임 보상 모드를 결정하는 단계를 포함하는
영상 복호화 방법.
The method of claim 1,
The determining step,
Parsing signaled sub block information and flag information corresponding to the target block, and determining a motion compensation mode of the sub block and the sub block.
Image Decoding Method.
제1항에 있어서,
상기 결정하는 단계는,
상기 대상 블록과 주변 블록의 움직임 정보를 이용하여, 상기 서브 블록 및 서브 블록의 움직임 보상 모드를 결정하는 단계를 포함하는
영상 복호화 방법.
The method of claim 1,
The determining step,
Determining a motion compensation mode of the sub block and the sub block by using the motion information of the target block and the neighboring block;
Image Decoding Method.
제1항에 있어서,
상기 분할 정보에 기초하여, 상기 대상 블록이 특정 비율의 삼진 트리 구조로 분할된 경우, 상기 삼진 트리 구조로 분할된 블록 중 적어도 하나를 상기 서브 블록으로 결정하고, 상기 서브 블록의 움직임 보상 모드를 결정하는
영상 복호화 방법.
The method of claim 1,
On the basis of the partitioning information, when the target block is divided into a ternary tree structure having a specific ratio, at least one of the blocks divided into the ternary tree structure is determined as the sub block, and the motion compensation mode of the sub block is determined. doing
Image Decoding Method.
제6항에 있어서,
상기 서브 블록의 움직임 보상 모드는 상기 서브 블록에 대응하여 적응적으로 결정되는 OMBC(VERLAPPED BLOCK MOTION COMPENSATION) 모드를 포함하는
영상 복호화 방법.
The method of claim 6,
The motion compensation mode of the subblock includes an OMBC (VERLAPPED BLOCK MOTION COMPENSATION) mode that is adaptively determined corresponding to the subblock.
Image Decoding Method.
제1항에 있어서,
상기 서브 블록 움직임 보상 모드에 따른 서브 블록 움직임 보상을 처리하는 단계를 더 포함하는
영상 복호화 방법.
The method of claim 1,
Processing sub block motion compensation according to the sub block motion compensation mode;
Image Decoding Method.
제1항에 있어서,
상기 서브 블록 움직임 보상 모드의 처리에 대응하여, 인 루프 필터링을 서브 블록 적응적으로 처리하는 단계를 더 포함하는
영상 복호화 방법.
The method of claim 1,
In response to processing of the sub-block motion compensation mode, further comprising in-block filtering sub-block adaptively
Image Decoding Method.
영상 복호화 장치에 있어서,
영상의 픽쳐가 인터 예측(inter prediction) 또는 인트라 예측(intra prediction)이 수행되는 기본 단위인 복수의 코딩 유닛(Coding Unit)들로 분할되고, 상기 픽쳐 또는 상기 분할된 코딩 유닛을 쿼드 트리(quad tree), 이진 트리(binary tree) 또는 삼진 트리(ternery tree) 구조로 분할한 코딩 유닛을 복호화하기 위한 대상 블록을 결정하는 분할부; 및
상기 대상 블록의 분할 정보에 기초하여, 상기 대상 블록의 서브 블록에 대응하는 서브 블록 움직임 보상 모드를 적응적으로 결정하는 서브 블록 움직임 보상 결정부를 포함하는
영상 복호화 장치.
In the video decoding apparatus,
A picture of an image is divided into a plurality of coding units, which are basic units on which inter prediction or intra prediction is performed, and a quad tree of the picture or the split coding unit. A division unit for determining a target block for decoding a coding unit divided into a binary tree or a ternery tree structure; And
A subblock motion compensation determiner configured to adaptively determine a subblock motion compensation mode corresponding to the subblock of the target block based on the split information of the target block;
Video decoding device.
영상 부호화 방법에 있어서,
영상의 픽쳐가 인터 예측(inter prediction) 또는 인트라 예측(intra prediction)이 수행되는 기본 단위인 복수의 코딩 유닛(Coding Unit)들로 분할되고, 상기 픽쳐 또는 상기 분할된 코딩 유닛을 쿼드 트리(quad tree), 이진 트리(binary tree) 또는 삼진 트리(ternery tree) 구조로 분할한 코딩 유닛을 복호화하기 위한 대상 블록을 결정하는 단계; 및
상기 대상 블록의 분할 정보에 기초하여, 상기 대상 블록의 서브 블록에 대응하는 서브 블록 움직임 보상 모드를 적응적으로 결정하는 단계를 포함하는
영상 부호화 방법.
In the video encoding method,
A picture of an image is divided into a plurality of coding units, which are basic units on which inter prediction or intra prediction is performed, and a quad tree of the picture or the split coding unit. Determining a target block for decoding a coding unit divided into a binary tree or a ternery tree structure; And
Adaptively determining a subblock motion compensation mode corresponding to the subblock of the target block based on the split information of the target block;
Image coding method.
KR1020180078639A 2018-07-06 2018-07-06 A method for encoding and decoding video using a motion compensation and filtering KR20200005207A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180078639A KR20200005207A (en) 2018-07-06 2018-07-06 A method for encoding and decoding video using a motion compensation and filtering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180078639A KR20200005207A (en) 2018-07-06 2018-07-06 A method for encoding and decoding video using a motion compensation and filtering

Publications (1)

Publication Number Publication Date
KR20200005207A true KR20200005207A (en) 2020-01-15

Family

ID=69156572

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180078639A KR20200005207A (en) 2018-07-06 2018-07-06 A method for encoding and decoding video using a motion compensation and filtering

Country Status (1)

Country Link
KR (1) KR20200005207A (en)

Similar Documents

Publication Publication Date Title
US11107253B2 (en) Image processing method, and image decoding and encoding method using same
US20190289301A1 (en) Image processing method, and image encoding and decoding method using same
KR20160106025A (en) Apparatus for encoding a moving picture
KR20190067732A (en) Method and apparatus for encoding and decoding using selective information sharing over channels
KR102354628B1 (en) A method of video processing for processing coding tree units and coding units, a method and appratus for decoding and encoding video using the processing.
KR101586125B1 (en) Method and apparatus for encoding/decoding video
KR102510696B1 (en) A method of video processing providing independent properties between coding tree units and coding units, a method and appratus for decoding and encoding video using the processing.
KR101569912B1 (en) Method and apparatus for encoding/decoding video
KR20190093172A (en) A method of video processing for moving information, a method and appratus for decoding and encoding video using the processing.
KR20130002242A (en) Method for encoding and decoding video information
KR20200040255A (en) Method and apparatus for image encoding / decoding based on effective differential quantization parameter transmission
KR102520405B1 (en) Method of processing video, video encoding and decoding thereof
KR20170132038A (en) Method of Adaptive Loof Filtering based on block for processing video, video encoding and decoding thereof
KR101659343B1 (en) Method and apparatus for processing moving image
KR20170132036A (en) Method for coding unit partitioning, video encoding and decoding thereof
KR101914667B1 (en) Method and apparatus for processing moving image
KR20200071302A (en) A method for encoding and decoding video processing using motion prediction
KR20200005207A (en) A method for encoding and decoding video using a motion compensation and filtering
KR101609427B1 (en) Method and apparatus for encoding/decoding video
KR102610188B1 (en) Method of video processing providing high-throughput arithmetic coding and method and appratus for decoding and encoding video using the processing
KR20200114601A (en) A video encoding method, a video decoding method and an apparatus for processing intra block copy