KR20190113611A - Method and apparatus for image encoding/decoding - Google Patents

Method and apparatus for image encoding/decoding Download PDF

Info

Publication number
KR20190113611A
KR20190113611A KR1020190033763A KR20190033763A KR20190113611A KR 20190113611 A KR20190113611 A KR 20190113611A KR 1020190033763 A KR1020190033763 A KR 1020190033763A KR 20190033763 A KR20190033763 A KR 20190033763A KR 20190113611 A KR20190113611 A KR 20190113611A
Authority
KR
South Korea
Prior art keywords
block
control point
candidate
information
current block
Prior art date
Application number
KR1020190033763A
Other languages
Korean (ko)
Inventor
김기백
Original Assignee
김기백
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 김기백 filed Critical 김기백
Publication of KR20190113611A publication Critical patent/KR20190113611A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/172Methods 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 picture, frame or field
    • 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/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

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

Abstract

A method for encoding/decoding an image according to the present invention may generate a candidate list for the motion information prediction of a current block, derive a control point vector of the current block based on the candidate list and a candidate index, derive a motion vector of the current block based on the control point vector of the current block, and perform the inter prediction on the current block using the motion vector. It is possible to perform the inter prediction.

Description

영상 부호화/복호화 방법 및 장치{METHOD AND APPARATUS FOR IMAGE ENCODING/DECODING}Image Encoding / Decoding Method and Apparatus {METHOD AND APPARATUS FOR IMAGE ENCODING / DECODING}

본 발명은 영상 부호화/복호화 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for image encoding / decoding.

최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있고, 이에 따라 고효율의 영상 압축 기술들이 논의되고 있다.Recently, the demand for high resolution and high quality images such as high definition (HD) and ultra high definition (UHD) images is increasing in various applications, and high efficiency image compression technologies are being discussed.

영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 화면간 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 화면내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.An inter-screen prediction technique for predicting pixel values included in the current picture from a picture before or after the current picture using an image compression technology, an intra-prediction technology for predicting pixel values included in the current picture using pixel information in the current picture, Various techniques exist, such as an entropy encoding technique for allocating a short code to a high frequency of appearance and a long code to a low frequency of appearance, and the image data can be effectively compressed and transmitted or stored.

본 발명은 화면간 예측 방법 및 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide an inter prediction method and apparatus.

본 발명은 서브 블록 단위의 모션 보상 방법 및 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide a motion compensation method and apparatus for each sub block.

본 발명은 어파인 후보를 결정하는 방법 및 장치를 제공하는 것을 목적으로 한다.It is an object of the present invention to provide a method and apparatus for determining affine candidates.

본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 블록의 모션 정보 예측을 위한 후보 리스트를 생성하고, 상기 후보 리스트와 후보 인덱스에 기반하여 상기 현재 블록의 제어점 벡터를 유도하며, 상기 현재 블록의 제어점 벡터를 기반으로, 상기 현재 블록의 모션 벡터를 유도하고, 상기 모션 벡터를 이용하여 상기 현재 블록에 대해 인터 예측을 수행할 수 있다.An image encoding / decoding method and apparatus according to the present invention generate a candidate list for motion information prediction of a current block, derive a control point vector of the current block based on the candidate list and the candidate index, Based on a control point vector, a motion vector of the current block may be derived, and inter prediction may be performed on the current block using the motion vector.

본 발명에 따른 영상 부호화/복호화 장치에 있어서, 상기 후보 리스트는, 복수의 어파인 후보를 포함할 수 있다.In the video encoding / decoding apparatus according to the present invention, the candidate list may include a plurality of affine candidates.

본 발명에 따른 영상 부호화/복호화 장치에 있어서, 상기 어파인 후보는, 공간적 후보, 시간적 후보 또는 구성된 후보 중 적어도 하나를 포함할 수 있다.In the image encoding / decoding apparatus according to the present invention, the affine candidate may include at least one of a spatial candidate, a temporal candidate, or a configured candidate.

본 발명에 따른 영상 부호화/복호화 장치에 있어서, 상기 현재 블록의 모션 벡터는, 상기 현재 블록의 서브 블록의 단위로 유도될 수 있다.In the image encoding / decoding apparatus according to the present invention, the motion vector of the current block may be derived in units of subblocks of the current block.

본 발명에 따른 영상 부호화/복호화 장치에 있어서, 상기 공간적 후보는, 상기 현재 블록의 경계가 코딩 트리 블록의 경계(CTU boundary)에 접하는지 여부를 고려하여 결정될 수 있다.In the image encoding / decoding apparatus according to the present invention, the spatial candidate may be determined in consideration of whether a boundary of the current block is in contact with a boundary of a coding tree block.

본 발명에 따른 영상 부호화/복호화 장치에 있어서, 상기 구성된 후보는, 상기 현재 블록의 각 코너에 대응하는 제어점 벡터 중 적어도 2개의 조합에 기초하여 결정될 수 있다.In the image encoding / decoding apparatus according to the present invention, the configured candidate may be determined based on a combination of at least two of control point vectors corresponding to each corner of the current block.

본 발명에 따르면, 어파인 모델 기반의 인터 예측을 통해 영상의 부호화/복호화 성능을 향상시킬 수 있다.According to the present invention, the encoding / decoding performance of an image may be improved through inter prediction based on an affine model.

본 발명에 따르면, 서브 블록 단위의 인터 예측을 통해 예측의 정확성을 향상시킬 수 있다.According to the present invention, it is possible to improve the accuracy of prediction through inter prediction on a sub-block basis.

본 발명에 따르면, 효율적인 어파인 후보 결정을 통해, 인터 예측의 부호화/복호화 효율이 향상될 수 있다.According to the present invention, the encoding / decoding efficiency of inter prediction can be improved by determining an effective candidate.

도 1은 본 발명의 실시예에 따른 영상 부호화 및 복호화 시스템에 대한 개념도이다.
도 2는 본 발명의 일 실시예에 따른 영상 부호화 장치에 대한 블록 구성도이다.
도 3은 본 발명의 일 실시예에 따른 영상 복호화 장치에 대한 블록 구성도이다.
도 4는 본 발명이 적용되는 일실시예로서, 화면간 예측 방법을 도시한 것이다.
도 5는 본 발명이 적용되는 일실시예로서, 공간적/시간적 주변 블록으로부터 어파인 후보를 유도하는 방법에 관한 것이다.
도 6은 본 발명이 적용되는 일실시예로서, 공간적/시간적 주변 블록의 모션 벡터의 조합에 기초하여 구성된 후보를 유도하는 방법을 도시한 것이다.
1 is a conceptual diagram of an image encoding and decoding system according to an embodiment of the present invention.
2 is a block diagram of a video encoding apparatus according to an embodiment of the present invention.
3 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.
4 illustrates an inter prediction method according to an embodiment to which the present invention is applied.
5 is a view illustrating a method of deriving an affine candidate from a spatial / temporal neighboring block according to an embodiment to which the present invention is applied.
FIG. 6 illustrates a method of deriving a candidate constructed based on a combination of motion vectors of spatial and temporal neighboring blocks according to an embodiment to which the present invention is applied.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.As the present invention allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the written description. However, this is not intended to limit the present invention to specific embodiments, it should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다. Terms such as first, second, A, and B 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. The term and / or includes a combination of a plurality of related items or any item of a plurality of related items.

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

본 발명에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 발명에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In the present invention, the terms "comprise" or "have" are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 것을 의미한다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, mean the same as generally understood by one of ordinary skill in the art. Terms such as those defined in the commonly used dictionaries should be construed in accordance with their meaning in the context of the related art and should not be construed in an ideal or excessively formal sense unless explicitly defined in the present invention.

도 1은 본 발명의 실시예에 따른 영상 부호화 및 복호화 시스템에 대한 개념도이다.1 is a conceptual diagram of an image encoding and decoding system according to an embodiment of the present invention.

도 1을 참조하면, 영상 부호화 장치(105) 및 복호화 장치(100)는 개인용 컴퓨터(PC:Personal Computer), 노트북 컴퓨터, 개인 휴대 단말기(PDA: Personal Digital Assistant), 휴대형 멀티미디어 플레이어(PMP: Portable Multimedia Player), 플레이스테이션 포터블(PSP: PlayStation Portable), 무선 통신 단말기(Wireless Communication Terminal), 스마트폰(Smart Phone) 또는 TV 등과 같은 사용자 단말기이거나 응용 서버와 서비스 서버 등 서버 단말기일 수 있으며, 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 부호화 또는 복호화를 위해 인터 또는 인트라 예측하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리(memory, 120, 125) 또는 프로그램을 실행하여 연산 및 제어하기 위한 프로세서(processor, 110, 115) 등을 구비하는 다양한 장치를 포함할 수 있다. Referring to FIG. 1, the video encoding apparatus 105 and the decoding apparatus 100 may include a personal computer (PC), a notebook computer, a personal digital assistant (PDA), and a portable multimedia player (PMP). Player), PlayStation Portable (PSP: PlayStation Portable), wireless communication terminal (Wireless Communication Terminal), smart phone (Smart Phone) or a user terminal such as a TV, or a server terminal such as an application server and a service server, etc. A communication device such as a communication modem for communicating with a wired / wireless communication network, a memory (memory, 120, 125) or a program for storing various programs and data for inter or intra prediction for encoding or decoding an image and executing the operation And various devices including processors (processors 110 and 115) for controlling.

또한, 영상 부호화 장치(105)에 의해 비트스트림으로 부호화된 영상은 실시간 또는 비실시간으로 인터넷, 근거리 무선 통신망, 무선랜망, 와이브로망 또는 이동통신망 등의 유무선 통신망(Network) 등을 통하거나 케이블 또는 범용 직렬 버스(USB: Universal Serial Bus) 등과 같은 다양한 통신 인터페이스를 통해 영상 복호화 장치(100)로 전송되어 영상 복호화 장치(100)에서 복호화되어 영상으로 복원되고 재생될 수 있다. 또한, 영상 부호화 장치(105)에 의해 비트스트림으로 부호화된 영상은 컴퓨터 판독 가능한 기록 매체를 통하여 영상 부호화 장치(105)에서 영상 복호화 장치(100)로 전달될 수 있다.In addition, the image encoded in the bitstream by the image encoding apparatus 105 is real-time or non-real-time via the wired or wireless communication network (Network), such as the Internet, local area wireless communication network, wireless LAN network, WiBro network or mobile communication network, or cable or general purpose The image decoding apparatus 100 may be transmitted to the image decoding apparatus 100 through various communication interfaces such as a universal serial bus (USB), and may be decoded by the image decoding apparatus 100 to restore and reproduce the image. Also, an image encoded in the bitstream by the image encoding apparatus 105 may be transferred from the image encoding apparatus 105 to the image decoding apparatus 100 through a computer-readable recording medium.

전술한 영상 부호화 장치와 영상 복호화 장치는 각각 별도의 장치들일 수 있으나, 구현에 따라서 하나의 영상 부호화/복호화 장치로 만들어질 수 있다. 그 경우, 영상 부호화 장치의 일부 구성은 영상 복호화 장치의 일부 구성과 실질적으로 동일한 기술요소로서 적어도 동일한 구조를 포함하거나 적어도 동일한 기능을 수행하도록 구현될 수 있다.The above-described image encoding apparatus and the image decoding apparatus may be separate apparatuses, but may be made of one image encoding / decoding apparatus according to implementation. In this case, some components of the image encoding apparatus may be implemented to include at least the same structure or to perform at least the same function as substantially the same technical elements as some components of the image decoding apparatus.

따라서, 이하의 기술요소들과 이들의 작동 원리 등에 대한 상세 설명에서는 대응 기술요소들의 중복되는 설명을 생략하기로 한다. 또한, 영상 복호화 장치는 영상 부호화 장치에서 수행되는 영상 부호화 방법을 복호화에 적용하는 컴퓨팅 장치에 대응하므로, 이하의 설명에서는 영상 부호화 장치를 중심으로 설명하기로 한다.Therefore, in the following detailed description of the technical elements and their operation principle, overlapping description of the corresponding technical elements will be omitted. Also, since the image decoding apparatus corresponds to a computing device applying the image encoding method performed by the image encoding apparatus to the decoding, the following description will focus on the image encoding apparatus.

컴퓨팅 장치는 영상 부호화 방법 및/또는 영상 복호화 방법을 구현하는 프로그램이나 소프트웨어 모듈을 저장하는 메모리와 메모리에 연결되어 프로그램을 수행하는 프로세서를 포함할 수 있다. 여기서, 영상 부호화 장치는 부호화기로, 영상 복호화 장치는 복호화기로 각각 지칭될 수 있다.The computing device may include a memory for storing a program or software module for implementing an image encoding method and / or an image decoding method, and a processor connected to the memory and executing a program. Here, the image encoding apparatus may be referred to as an encoder, and the image decoding apparatus may be referred to as a decoder.

도 2는 본 발명의 일 실시예에 따른 영상 부호화 장치에 대한 블록 구성도이다.2 is a block diagram of a video encoding apparatus according to an embodiment of the present invention.

도 2를 참조하면, 영상 부호화 장치(20)는 예측부(200), 감산부(205), 변환부(210), 양자화부(215), 역양자화부(220), 역변환부(225), 가산부(230), 필터부(235), 부호화 픽쳐 버퍼(240) 및 엔트로피 부호화부(245)를 포함할 수 있다.Referring to FIG. 2, the image encoding apparatus 20 may include a predictor 200, a subtractor 205, a transformer 210, a quantizer 215, an inverse quantizer 220, an inverse transformer 225, An adder 230, a filter 235, an encoded picture buffer 240, and an entropy encoder 245 may be included.

예측부(200)는 소프트웨어 모듈인 예측 모듈(prediction module)을 이용하여 구현될 수 있고, 부호화할 블록에 대하여 화면내 예측 방식(Intra Prediction)이나 화면간 예측 방식(Inter Prediction)으로 예측 블록을 생성할 수 있다. 예측부(200)는 영상에서 현재 부호화하고자 하는 현재 블록을 예측하여 예측 블록을 생성할 수 있다. 다시 말해, 예측부(200)는 영상에서 부호화하고자 하는 현재 블록의 각 화소의 화소값(pixel value)을 화면내 예측 또는 화면간 예측에 따라 예측하여 생성된 각 화소의 예측 화소값(prediced pixel value)를 갖는 예측 블록을 생성할 수 있다. 또한, 예측부(200)는 화면내 예측 모드 또는 화면간 예측 모드와 같은 예측 모드에 대한 정보와 같은 예측 블록을 생성하는데 필요한 정보를 부호화부로 전달하여 부호화부로 하여금 예측 모드에 대한 정보를 부호화하도록 할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 부/복호화 설정에 따라 정해질 수 있다. 예를 들어, 예측 방법, 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수 있다.The prediction unit 200 may be implemented using a prediction module, which is a software module, and generates a prediction block with an intra prediction or inter prediction for a block to be encoded. can do. The prediction unit 200 may generate a prediction block by predicting a current block to be currently encoded in an image. In other words, the prediction unit 200 predicts the pixel value of each pixel of the current block to be encoded in the image according to the intra prediction or the inter prediction. Can generate a prediction block with In addition, the prediction unit 200 may transmit information necessary for generating a prediction block, such as information about a prediction mode such as an intra prediction mode or an inter prediction mode, to the encoder so that the encoder encodes the information about the prediction mode. Can be. In this case, the processing unit for which the prediction is performed, the processing method for which the prediction method and the details are determined may be determined according to the encoding / decoding setting. For example, the prediction method, the prediction mode, etc. may be determined in the prediction unit, and the performance of the prediction may be performed in the transformation unit.

화면간 예측부에서 움직임 예측 방법에 따라 이동 움직임 모델(Translation motion model)과 이동외 움직임 모델(Affine motion model)로 구분할 수 있다. 이동 움직임 모델의 경우 평행 이동만을 고려하여 예측을 수행하고, 이동외 움직임 모델의 경우 평행 이동뿐만 아니라 회전, 원근, 줌 인/아웃(Zoom in/out) 등과 같은 움직임을 고려하여 예측을 수행할 수 있다. 단방향 예측을 가정할 때 이동 움직임 모델의 경우 하나의 움직임 벡터가 필요할 수 있지만, 이동외 움직임 모델의 경우 하나 이상의 움직임 벡터가 필요할 수 있다. 이동외 움직임 모델의 경우 각 움직임 벡터는 현재 블록의 좌상측 꼭지점, 우상측 꼭지점 등과 같이 현재 블록의 기 설정된 위치에 적용되는 정보일 수 있고, 해당 움직임 벡터를 통해 현재 블록의 예측하고자 하는 영역의 위치를 화소 단위 또는 서브 블록 단위로 획득할 수 있다. 화면간 예측부는 상기 움직임 모델에 따라 후술하는 일부 과정은 공통으로 적용될 수 있고 일부 과정은 개별적으로 적용될 수 있다.The inter prediction unit may be classified into a translation motion model and an affine motion model according to a motion prediction method. In the case of the moving motion model, the prediction is performed by considering only the parallel movement. In the case of the out-of-movement model, the prediction can be performed by considering not only the parallel movement but also movements such as rotation, perspective, and zoom in / out. have. Assuming one-way prediction, one motion vector may be required for a motion model, but one or more motion vectors may be required for an out-of-motion motion model. In the case of an out-of-movement motion model, each motion vector may be information applied to a predetermined position of the current block, such as an upper left vertex and an upper right vertex of the current block, and a position of an area to be predicted of the current block through the corresponding motion vector. May be obtained in a pixel unit or a sub block unit. The inter prediction unit may apply some processes to be described later in common according to the motion model, and some processes may be applied separately.

화면간 예측부는 참조 픽쳐 구성부, 움직임 추정부, 움직임 보상부, 움직임 정보 결정부, 움직임 정보 부호화부를 포함할 수 있다. 참조 픽쳐 구성부는 현재 픽쳐를 중심으로 이전 또는 이후에 부호화된 픽쳐를 참조 픽쳐 리스트(L0, L1)에 포함할 수 있다. 상기 참조 픽쳐 리스트에 포함된 참조 픽쳐로부터 예측 블록을 획득할 수 있으며, 부호화 설정에 따라 현재 영상 또한 참조 픽쳐로 구성되어 참조 픽쳐 리스트 중 적어도 한 곳에 포함될 수 있다.The inter prediction unit may include a reference picture configuration unit, a motion estimation unit, a motion compensator, a motion information determiner, and a motion information encoder. The reference picture configuration unit may include, in the reference picture lists L0 and L1, pictures encoded before or after the current picture. A prediction block may be obtained from a reference picture included in the reference picture list, and the current picture may also be configured as a reference picture and included in at least one of the reference picture lists according to encoding settings.

화면간 예측부에서 참조 픽쳐 구성부는 참조 픽쳐 보간부를 포함할 수 있으며, 보간 정밀도에 따라 소수 단위 화소를 위한 보간 과정을 수행할 수 있다. 예를 들어, 휘도 성분의 경우 8-tap DCT 기반의 보간 필터를 적용하고, 색차 성분의 경우 4-tap DCT 기반의 보간 필터를 적용할 수 있다.In the inter prediction unit, the reference picture component may include a reference picture interpolator, and may perform an interpolation process for a fractional pixel according to interpolation precision. For example, an 8-tap DCT based interpolation filter may be applied in the case of luminance components, and a 4-tap DCT based interpolation filter may be applied in the case of chrominance components.

화면간 예측부에서 움직임 추정부는 현재 블록과 상관성이 높은 블록을 참조 픽쳐를 통해 탐색하는 과정이며 FBMA(Full search-based block matching algorithm), TSS(Three step search) 등의 다양한 방법이 사용될 수 있고, 움직임 보상부는 움직임 추정 과정을 통해 예측 블록을 획득하는 과정을 의미한다.In the inter prediction unit, the motion estimation unit searches a block having a high correlation with the current block through a reference picture, and various methods such as a full search-based block matching algorithm (FBMA) and a three step search (TSS) may be used. The motion compensator means a process of obtaining a prediction block through a motion estimation process.

화면간 예측부에서 움직임 정보 결정부는 현재 블록의 최적의 움직임 정보를 선정하기 위한 과정이 수행될 수 있으며, 움직임 정보는 스킵 모드(Skip Mode), 병합 모드(Merge Mode), 경쟁 모드(Competition Mode) 등의 움직임 정보 부호화 모드에 의해 부호화될 수 있다. 상기 모드는 움직임 모델에 따라 지원되는 모드가 결합되어 구성될 수 있으며, 스킵 모드(이동), 스킵 모드(이동외), 병합 모드(이동), 병합 모드(이동외), 경쟁 모드(이동), 경쟁 모드(이동외)가 그에 대한 예가 될 수 있다. 부호화 설정에 따라 상기 모드 중 일부가 후보군에 포함될 수 있다.The motion information determiner may perform a process for selecting the optimal motion information of the current block in the inter prediction unit, and the motion information may be a skip mode, a merge mode, or a competition mode. It may be encoded by a motion information encoding mode. The mode may be configured by combining the supported modes according to the motion model, skip mode (movement), skip mode (movement), merge mode (movement), merge mode (movement), competition mode (movement), Competitive mode (outside the move) may be an example. Some of the modes may be included in the candidate group according to the encoding setting.

상기 움직임 정보 부호화 모드는 적어도 하나의 후보 블록에서 현재 블록의 움직임 정보(움직임 벡터, 참조 픽쳐, 예측 방향 등)의 예측값을 획득할 수 있으며, 둘 이상의 후보 블록이 지원되는 경우에는 최적의 후보 선택 정보가 발생할 수 있다. 스킵 모드(잔차 신호 없음)와 병합 모드(잔차 신호 존재)는 상기 예측값을 그대로 현재 블록의 움직임 정보로 사용할 수 있고, 경쟁 모드는 현재 블록의 움직임 정보와 상기 예측값과의 차분치 정보가 발생할 수 있다.In the motion information encoding mode, a prediction value of motion information (motion vector, reference picture, prediction direction, etc.) of the current block may be obtained from at least one candidate block, and optimal candidate selection information is provided when two or more candidate blocks are supported. May occur. In the skip mode (no residual signal) and the merge mode (the residual signal present), the prediction value may be used as the motion information of the current block, and in the contention mode, difference information between the motion information of the current block and the prediction value may be generated. .

현재 블록의 움직임 정보 예측값을 위한 후보군은 움직임 정보 부호화 모드에 따라 적응적이고 다양한 구성을 가질 수 있다. 현재 블록에 공간적으로 인접한 블록(예를 들어, 좌, 상, 좌상, 우상, 좌하 블록 등)의 움직임 정보가 후보군에 포함될 수 있고, 시간적으로 인접한 블록의 움직임 정보가 후보군에 포함될 수 있으며, 공간적 후보와 시간적 후보의 혼합 움직임 정보 등이 후보군에 포함될 수 있다. The candidate group for the motion information prediction value of the current block may be adaptive and have various configurations according to the motion information encoding mode. The motion information of a block spatially adjacent to the current block (eg, left, top, top left, top right, bottom left block, etc.) may be included in the candidate group, and the motion information of a temporally adjacent block may be included in the candidate group, and the spatial candidate And mixed motion information of temporal candidates may be included in the candidate group.

상기 시간적으로 인접한 블록은 현재 블록과 대응(또는 상응)하는 다른 영상 내 블록을 포함하고, 해당 블록을 중심으로 좌, 우, 상, 하, 좌상, 우상, 좌하, 우하 블록 등에 위치한 블록을 의미할 수 있다. 상기 혼합 움직임 정보는 공간적으로 인접한 블록의 움직임 정보와 시간적으로 인접한 블록의 움직임 정보를 통해 평균, 중앙값 등으로 획득되는 정보를 의미할 수 있다.The temporally adjacent block may include a block in another image corresponding to (or corresponding to) the current block, and mean a block located in a left, right, up, down, top, right, left, bottom, and bottom block with respect to the block. Can be. The mixed motion information may mean information obtained by an average, a median value, etc. through motion information of spatially adjacent blocks and motion information of blocks adjacent in time.

움직임 정보 예측값 후보군 구성을 위한 우선 순위가 존재할 수 있다. 상기 우선 순위에 따라 예측값 후보군 구성에 포함되는 순서가 정해질 수 있으며, 상기 우선 순위에 따라 후보군의 개수(움직임 정보 부호화 모드에 따라 정해짐)만큼 채워지면 후보군 구성을 완료할 수 있다. 이때, 공간적으로 인접한 블록의 움직임 정보, 시간적으로 인접한 블록의 움직임 정보, 공간적 후보와 시간적 후보의 혼합 움직임 정보 순서로 우선 순위가 정해질 수 있으나, 그 외의 변형 또한 가능하다.There may be a priority for constructing the motion information prediction value candidate group. The order of inclusion in the prediction value candidate group configuration may be determined according to the priority, and the candidate group configuration may be completed when the number of candidate groups (determined according to the motion information encoding mode) is filled according to the priority. In this case, priority may be determined in order of motion information of spatially adjacent blocks, motion information of temporally adjacent blocks, and mixed motion information of spatial candidates and temporal candidates, but other modifications are also possible.

예를 들어, 공간적으로 인접한 블록 중에서는 좌 - 상 - 우상 - 좌하 - 좌상 블록 등의 순서로 후보군에 포함할 수 있고, 시간적으로 인접한 블록 중에서는 우하 - 중 - 우 - 하 블록 등의 순서로 후보군에 포함할 수 있다.For example, among spatially adjacent blocks, candidates may be included in the candidate group in the order of left-up-top-right-bottom-left-top block, and candidate blocks in order of right-bottom-middle-right-bottom block among temporally adjacent blocks. It can be included in.

감산부(205)는 현재 블록에서 예측 블록을 감산하여 잔차 블록(residual block)을 생성할 수 있다. 다시 말해, 감산부(205)는 부호화하고자 하는 현재 블록의 각 화소의 화소값과 예측부를 통해 생성된 예측 블록의 각 화소의 예측 화소값의 차이를 계산하여 블록 형태의 잔차 신호(residual signal)인 잔차 블록을 생성할 수 있다. 또한, 감산부(205)는 후술하는 블록 분할부를 통해 획득된 블록 단위 이외의 단위에 따라 잔차 블록을 생성할 수도 있다.The subtraction unit 205 may generate a residual block by subtracting the prediction block from the current block. In other words, the subtractor 205 calculates a difference between the pixel value of each pixel of the current block to be encoded and the predicted pixel value of each pixel of the prediction block generated through the prediction unit, and is a residual signal in the form of a block. Residual blocks can be created. In addition, the subtraction unit 205 may generate the residual block according to units other than the block unit obtained through the block division unit described below.

변환부(210)는 공간 영역에 속하는 신호를 주파수 영역에 속하는 신호로 변환할 수 있으며, 변환 과정을 거쳐 획득되는 신호를 변환 계수(Transformed Coefficient)라고 한다. 예를 들어, 감산부로부터 전달받은 잔차 신호를 갖는 잔차 블록을 변환하여 변환 계수를 갖는 변환 블록을 획득할 수 있는데, 입력 받은 신호는 부호화 설정에 따라 결정되며 이는 잔차 신호에 한정되지 않는다.The transform unit 210 may convert a signal belonging to a spatial domain into a signal belonging to a frequency domain, and a signal obtained through a transformation process is called a transformed coefficient. For example, a transform block having a transform coefficient may be obtained by transforming the residual block having the residual signal received from the subtractor, but the input signal is determined according to an encoding setting, which is not limited to the residual signal.

변환부는 잔차 블록을 하다마드 변환(Hadamard Transform), 이산 사인 변환(DST Based-Transform: Discrete Sine Transform), 이산 코사인 변환(DCT Based-Transform: Discrete Cosine Transform) 등과 같은 변환 기법을 사용하여 변환할 수 있으며, 이에 한정되지 않고 이를 개량 및 변형한 다양한 변환 기법이 사용될 수 있다.The transform unit can transform the residual block using transformation techniques such as a Hadamard transform, a Discrete Sine Transform (DST Based-Transform), or a Discrete Cosine Transform (DCT Based-Transform). The present invention is not limited thereto, and various transformation techniques may be used.

상기 변환 기법 중 적어도 하나의 변환 기법이 지원될 수 있으며, 각 변환 기법에서 적어도 하나의 세부 변환 기법이 지원될 수 있다. 이때, 상기 세부 변한 기법은 각 변환 기법에서 기저 벡터의 일부가 달리 구성되는 변환 기법일 수 있다.At least one of the transformation schemes may be supported, and at least one detailed transformation scheme may be supported in each transformation scheme. In this case, the detailed changed technique may be a transformation technique in which a part of the basis vector is configured differently in each transformation technique.

예를 들어, DCT의 경우 DCT-I 내지 DCT-VIII 중 하나 이상의 세부 변환 기법이 지원될 수 있고, DST의 경우 DST-I 내지 DST-VIII 중 하나 이상의 세부 변환 기법이 지원될 수 있다. 상기 세부 변환 기법의 일부를 구성하여 변환 기법 후보군을 구성할 수 있다. 일 예로, DCT-II, DCT-VIII, DST-VII를 변환 기법 후보군으로 구성하여 변환을 수행할 수 있다.For example, in the case of DCT, one or more detailed transformation schemes of DCT-I through DCT-VIII may be supported, and in the case of DST, one or more detailed transformation schemes of DST-I through DST-VIII may be supported. A portion of the detailed transformation scheme may be configured to form a transformation technique candidate group. For example, the transformation may be performed by configuring DCT-II, DCT-VIII, and DST-VII as candidate candidates for transformation techniques.

변환은 수평/수직 방향으로 수행될 수 있다. 예를 들어, DCT-II의 변환 기법을 사용하여 수평 방향으로 1차원 변환을 수행하고, DST-VIII의 변환 기법을 사용하여 수직 방향으로 1차원 변환을 수행하여 총 2차원 변환을 수행함으로써 공간 영역의 화소값을 주파수 영역으로 변환할 수 있다.The conversion can be performed in the horizontal / vertical direction. For example, one-dimensional transform is performed in the horizontal direction using the transform technique of DCT-II, and a total two-dimensional transform is performed by performing one-dimensional transform in the vertical direction using the transform technique of DST-VIII. The pixel value of can be converted into the frequency domain.

고정적인 하나의 변환 기법을 사용하여 변환을 수행할 수 있거나 부/복호화 설정에 따라 변환 기법을 적응적으로 선택하여 변환을 수행할 수 있다. 이때, 적응적인 경우에는 명시적 또는 묵시적인 방법을 사용하여 변환 기법을 선택할 수 있다. 명시적인 경우에는 수평, 수직 방향에 적용되는 각각의 변환 기법 선택 정보 또는 변환 기법 세트 선택 정보가 블록 등의 단위에서 발생할 수 있다. 묵시적인 경우는 영상 타입(I/P/B), 컬러 성분, 블록의 크기, 형태, 화면내 예측 모드 등에 따라 부호화 설정이 정의될 수 있으며, 이에 따라 기 정의된 변환 기법이 선택될 수 있다. The transformation can be performed using one fixed transformation technique, or the transformation can be performed by adaptively selecting the transformation scheme according to the encoding / decoding. In this case, the adaptation method may be selected using an explicit or implicit method. In the explicit case, each transformation technique selection information or transformation technique set selection information applied to the horizontal and vertical directions may occur in a unit such as a block. In an implicit case, encoding settings may be defined according to an image type (I / P / B), a color component, a size, a shape of a block, an intra prediction mode, and a predetermined transformation scheme may be selected.

또한, 부호화 설정에 따라 상기 일부 변환이 생략되는 경우가 가능할 수 있다. 즉, 명시적 또는 묵시적으로 수평/수직 단위 중 하나 이상을 생략할 수 있음을 의미한다.In addition, it may be possible that the partial transform is omitted depending on the encoding setting. That is, one or more of the horizontal / vertical units may be omitted, either explicitly or implicitly.

또한, 변환부는 변환 블록을 생성하는데 필요한 정보를 부호화부로 전달하여 이를 부호화하도록 할 수 있고, 그에 따른 정보를 비트스트림에 수록하여 이를 복호화기에 전송하고, 복호화기의 복호화부는 이에 대한 정보를 파싱하여 역변환 과정에 사용할 수 있다.In addition, the transformer may transmit information necessary to generate a transform block to the encoder to encode the information, and store the information in the bitstream and transmit the information to the decoder, and the decoder of the decoder parses the information and inversely transforms the information. Can be used for the process.

양자화부(215)는 입력 받은 신호를 양자화할 수 있으며, 이때 양자화 과정을 거쳐 획득되는 신호를 양자화 계수(Quantized Coefficient)라고 한다. 예를 들어, 변환부로부터 전달받은 잔차 변환 계수를 갖는 잔차 블록을 양자화하여 양자화 계수를 갖는 양자화 블록을 획득할 수 있는데, 입력 받은 신호는 부호화 설정에 따라 결정되며 이는 잔차 변환 계수에 한정되지 않는다.The quantization unit 215 may quantize the input signal. In this case, the signal obtained through the quantization process is referred to as a quantized coefficient. For example, a quantization block having a quantization coefficient may be obtained by quantizing a residual block having a residual transform coefficient received from a transform unit. The received signal is determined according to an encoding setting, which is not limited to the residual transform coefficient.

양자화부는 변환된 잔차 블록을 데드존 균일 경계 양자화(Dead Zone Uniform Threshold Quantization), 양자화 가중치 매트릭스(Quantization Weighted Matrix) 등과 같은 양자화 기법을 사용하여 양자화할 수 있으며, 이에 한정되지 않고 이를 개량 및 변형한 다양한 양자화 기법이 사용될 수 있다.The quantization unit may quantize the transformed residual block using a quantization technique such as dead zone uniform threshold quantization, quantization weighted matrix, and the like, but is not limited thereto. Quantization techniques can be used.

부호화 설정에 따라 양자화 과정은 생략할 수 있다. 예를 들어, 부호화 설정(예를 들어, 양자화 파라미터가 0. 즉, 무손실 압축 환경)에 따라 양자화 과정을 생략(역과정도 포함)할 수 있다. 다른 예로, 영상의 특성에 따라 양자화를 통한 압축 성능이 발휘되지 않는 경우에는 양자화 과정을 생략할 수 있다. 이때, 양자화 블록(M x N) 중 양자화 과정이 생략되는 영역은 전체 영역이거나 또는 일부 영역(M/2 x N/2, M x N/2, M/2 x N 등)일 수 있으며, 양자화 생략 선택 정보는 묵시적 또는 명시적으로 정해질 수 있다.The quantization process may be omitted according to the encoding setting. For example, the quantization process may be omitted (including the inverse process) according to the encoding setting (for example, the quantization parameter is 0. That is, the lossless compression environment). As another example, the quantization process may be omitted when the compression performance through quantization is not exhibited according to the characteristics of the image. In this case, the region in which the quantization process is omitted among the quantization blocks M x N may be an entire region or a partial region (M / 2 x N / 2, M x N / 2, M / 2 x N, etc.) and may be quantized. The omission selection information may be determined implicitly or explicitly.

양자화부는 양자화 블록을 생성하는데 필요한 정보를 부호화부로 전달하여 이를 부호화하도록 할 수 있고, 그에 따른 정보를 비트스트림에 수록하여 이를 복호화기에 전송하고, 복호화기의 복호화부는 이에 대한 정보를 파싱하여 이를 역양자화 과정에 사용할 수 있다.The quantization unit may transmit information necessary for generating a quantization block to the encoding unit and encode the information. The quantization unit stores the information in a bitstream and transmits the information to the decoder, and the decoder of the decoder parses the information and dequantizes it. Can be used for the process.

상기 예에서는 변환부와 양자화부를 통해 잔차 블록을 변환하고 양자화하는 가정 하에 설명하였지만, 잔차 블록을 잔차 신호를 변환하여 변환 계수를 갖는 잔차 블록을 생성하고 양자화 과정을 수행하지 않을 수 있으며, 잔차 블록의 잔차 신호를 변환 계수로 변환하지 않고 양자화 과정만을 수행할 수 있을 뿐만 아니라, 변환과 양자화 과정 모두 수행하지 않을 수 있다. 이는 부호화기 설정에 따라 결정될 수 있다.Although the above example has been described under the assumption that the residual block is transformed and quantized through the transform unit and the quantization unit, the residual block may be transformed from the residual signal to generate a residual block having transform coefficients, and the quantization process may not be performed. Not only may the quantization process be performed without converting the residual signal into transform coefficients, but neither the transformation nor the quantization process may be performed. This may be determined according to the encoder setting.

역양자화부(220)는 양자화부(215)에 의해 양자화된 잔차 블록을 역 양자화한다. 즉, 역양자화부(220)는 양자화 주파수 계수열을 역양자화하여 주파수 계수를 갖는 잔차 블록을 생성한다.The inverse quantization unit 220 inverse quantizes the residual block quantized by the quantization unit 215. That is, the inverse quantizer 220 inversely quantizes the quantized frequency coefficient sequence to generate a residual block having the frequency coefficient.

역변환부(225)는 역양자화부(220)에 의해 역양자화된 잔차 블록을 역변환한다. 즉, 역변환부(225)는 역양자화된 잔차 블록의 주파수 계수들을 역변환하여 화소값을 갖는 잔차 블록, 즉 복원된 잔차 블록을 생성한다. 여기서, 역변환부(225)는 변환부(210)에서 사용한 변환한 방식을 역으로 사용하여 역변환을 수행할 수 있다.The inverse transform unit 225 inversely transforms the residual block inversely quantized by the inverse quantization unit 220. That is, the inverse transformer 225 inversely transforms frequency coefficients of the inversely quantized residual block to generate a residual block having a pixel value, that is, a reconstructed residual block. Here, the inverse transform unit 225 may perform inverse transform by using the transformed method used in the transform unit 210 as the inverse.

가산부(230)는 예측부(200)에서 예측된 예측 블록과 역변환부(225)에 의해 복원된 잔차 블록을 가산하여 현재 블록을 복원한다. 복원된 현재 블록은 부호화 픽쳐 버퍼(240)에 참조 픽쳐(또는 참조 블록)로서 저장되어 현재 블록의 다음 블록이나 향후 다른 블록, 다른 픽쳐를 부호화할 때 참조 픽쳐로서 사용될 수 있다.The adder 230 reconstructs the current block by adding the prediction block predicted by the predictor 200 and the residual block reconstructed by the inverse transform unit 225. The reconstructed current block may be stored as a reference picture (or a reference block) in the coded picture buffer 240 and may be used as a reference picture when encoding the next block of the current block, another block in the future, or another picture.

필터부(235)는 디블록킹 필터, SAO(Sample Adaptive Offset), ALF(Adaptive Loop Filter) 등의 하나 이상의 후처리 필터 과정을 포함할 수 있다. 디블록킹 필터는 복원된 픽쳐에서 블록 간의 경계에 생긴 블록 왜곡을 제거할 수 있다. ALF는 디블록킹 필터를 통해 블록이 필터링된 후 복원된 영상과 원래의 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. SAO는 디블록킹 필터가 적용된 잔차 블록에 대하여, 화소 단위로 원본 영상과의 오프셋 차이를 복원할 수 있다. 이와 같은 후처리 필터는 복원된 픽쳐 또는 블록에 적용될 수 있다. The filter unit 235 may include one or more post-processing filter processes such as a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), and the like. The deblocking filter may remove block distortion generated at the boundary between blocks in the reconstructed picture. The ALF may perform filtering based on a value obtained by comparing the reconstructed image with the original image after the block is filtered through the deblocking filter. The SAO may restore the offset difference from the original image on a pixel basis with respect to the residual block to which the deblocking filter is applied. Such a post-processing filter may be applied to the reconstructed picture or block.

부호화 픽쳐 버퍼(240)는 필터부(235)를 통해 복원된 블록 또는 픽쳐를 저장할 수 있다. 부호화 픽쳐 버퍼(240)에 저장된 복원 블록 또는 픽쳐는 화면내 예측 또는 화면간 예측을 수행하는 예측부(200)에 제공될 수 있다.The encoded picture buffer 240 may store a block or a picture reconstructed by the filter unit 235. The reconstructed block or picture stored in the encoded picture buffer 240 may be provided to the prediction unit 200 that performs intra prediction or inter prediction.

엔트로피 부호화부(245)는 생성된 양자화 주파수 계수열을 다양한 스캔 방식에 따라 스캔하여 양자화 계수열을 생성하고, 이를 엔트로피 부호화 기법 등을 이용하여 부호화 함으로써 출력한다. 스캔 패턴은 지그재그, 대각선, 래스터(raster) 등 다양한 패턴들 중 하나로 설정할 수 있다. 또한, 각 구성부로부터 전달되는 부호화 정보를 포함하는 부호화 데이터를 생성하여 비트스트림으로 출력할 수 있다.The entropy encoder 245 scans the generated quantization frequency coefficient sequence according to various scan methods to generate a quantization coefficient sequence, and outputs the encoded quantization coefficient sequence by encoding it using an entropy encoding technique. The scan pattern may be set to one of various patterns such as zigzag, diagonal lines, and rasters. In addition, encoded data including encoded information transmitted from each component may be generated and output as a bitstream.

도 3은 본 발명의 일 실시예에 따른 영상 복호화 장치에 대한 블록 구성도이다.3 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.

도 3을 참조하면, 영상 복호화 장치(30)는 엔트로피 복호화부(305), 예측부(310), 역양자화부(315), 역변환부(320), 가감산기(325), 필터(330) 및 복호화 픽쳐 버퍼(335)를 포함하여 구성될 수 있다.Referring to FIG. 3, the image decoding apparatus 30 includes an entropy decoder 305, a predictor 310, an inverse quantizer 315, an inverse transformer 320, an adder and subtractor 325, a filter 330, and the like. The decoded picture buffer 335 may be configured.

또한, 예측부(310)는 다시 화면내 예측 모듈 및 화면간 예측 모듈을 포함하여 구성될 수 있다.In addition, the prediction unit 310 may be configured to include an intra prediction module and an inter prediction module.

먼저, 영상 부호화 장치(20)로부터 전달된 영상 비트스트림이 수신되면, 엔트로피 복호화부(305)로 전달될 수 있다.First, when an image bitstream transmitted from the image encoding apparatus 20 is received, the image bitstream may be transferred to the entropy decoder 305.

엔트로피 복호화부(305)는 비트스트림을 복호화하여 양자화된 계수들과 각 구성부로 전달되는 복호화 정보를 포함하는 복호화 데이터를 복호화할 수 있다.The entropy decoder 305 may decode the bitstream to decode the decoded data including the quantized coefficients and the decoded information transmitted to each component.

예측부(310)는 엔트로피 복호화부(305)로부터 전달된 데이터들에 기초하여 예측 블록을 생성할 수 있다. 이때, 복호화된 픽쳐 버퍼(335)에 저장된 참조 영상에 기초하여, 디폴트(default) 구성 기법을 이용한 참조 픽쳐 리스트를 구성할 수도 있다.The prediction unit 310 may generate a prediction block based on the data transferred from the entropy decoding unit 305. In this case, the reference picture list using a default construction technique may be constructed based on the reference picture stored in the decoded picture buffer 335.

화면간 예측부는 참조 픽쳐 구성부, 움직임 보상부, 움직임 정보 복호화부를 포함할 수 있으며, 일부는 부호화기와 동일한 과정을 수행하고 일부는 역으로 유도하는 과정을 수행할 수 있다.The inter prediction unit may include a reference picture component unit, a motion compensator, and a motion information decoder, and some of the processes may be performed in the same process as the encoder, and some may be reversed.

역양자화부(315)는 비트스트림으로 제공되어 엔트로피 복호화부(305)에 의해 복호화된 양자화된 변환 계수들을 역양자화할 수 있다.The inverse quantizer 315 may inverse quantize the quantized transform coefficients provided in the bitstream and decoded by the entropy decoder 305.

역변환부(320)는 역 DCT, 역 정수 변환 또는 그와 유사한 개념의 역변환 기법들을 변환 계수에 적용하여 잔차 블록을 생성할 수 있다.The inverse transform unit 320 may generate a residual block by applying inverse transform techniques of inverse DCT, inverse integer transform, or the like to a transform coefficient.

이때, 역양자화부(315), 역변환부(320)는 앞서 설명한 영상 부호화 장치(20)의 변환부(210) 및 양자화부(215)에서 수행한 과정을 역으로 수행하며 다양한 방법으로 구현될 수 있다. 예를 들어, 변환부(210) 및 양자화부(215)와 공유하는 동일한 과정 및 역변환을 사용할 수도 있고, 영상 부호화 장치(20)로부터 변환 및 양자화 과정에 관한 정보(예를 들면, 변환 크기, 변환 모양, 양자화 타입 등)를 이용하여 변환 및 양자화 과정을 역으로 수행할 수 있다.In this case, the inverse quantization unit 315 and the inverse transform unit 320 perform the processes performed by the transform unit 210 and the quantization unit 215 of the image encoding apparatus 20 described above, and may be implemented in various ways. have. For example, the same process and inverse transform shared with the transform unit 210 and the quantization unit 215 may be used, and information about the transform and quantization process from the image encoding apparatus 20 (for example, transform size and transform). Shape, quantization type, etc.) may be used to reverse the transform and quantization processes.

역양자화 및 역변환 과정을 거친 잔차 블록은 예측부(310)에 의해 도출된 예측 블록과 가산되어 복원된 영상 블록이 생성될 수 있다. 이러한 가산은 가감산기(325)에 의해 이루어 질 수 있다.The residual block that has undergone inverse quantization and inverse transformation may be added to the prediction block derived by the prediction unit 310 to generate an image block reconstructed. This addition can be made by the adder and subtractor 325.

필터(330)는 복원된 영상 블록에 대하여, 필요에 따라 블록킹(blocking) 현상을 제거하기 위하여 디블록킹 필터를 적용할 수도 있고, 상기 복호화 과정 전 후에 다른 루프 필터들을 비디오 품질을 향상시키기 위해 추가로 사용할 수도 있다.The filter 330 may apply a deblocking filter to the reconstructed image block to remove blocking if necessary, and further add other loop filters to improve video quality before and after the decoding process. Can also be used.

복원 및 필터를 거친 영상 블록은 복호화 픽쳐 버퍼(335)에 저장될 수 있다.The reconstructed and filtered image block may be stored in the decoded picture buffer 335.

도면에 도시하지 않았지만 영상 부호화/복호화 장치에 픽쳐 분할부와 블록 분할부를 더 포함할 수 있다.Although not shown in the figure, the picture encoding / decoding apparatus may further include a picture divider and a block divider.

픽쳐 분할부는 픽쳐를 컬러 공간(예를 들어, YCbCr, RGB 또는 XYZ 등), 타일, 슬라이스, 기본 부호화 단위(또는 최대 부호화 단위) 등과 같은 적어도 하나의 처리 단위로 분할(또는 구획)할 수 있고, 블록 분할부는 기본 부호화 단위를 적어도 하나의 처리 단위(예를 들어, 부호화, 예측, 변환, 양자화, 엔트로피 및 인루프 필터 단위 등)로 분할할 수 있다.The picture splitter may divide (or partition) a picture into at least one processing unit such as a color space (eg, YCbCr, RGB, XYZ, etc.), a tile, a slice, a basic coding unit (or a maximum coding unit), or the like. The block splitter may divide the basic coding unit into at least one processing unit (for example, encoding, prediction, transform, quantization, entropy, in-loop filter unit, etc.).

기본 부호화 단위는 가로 방향과 세로 방향으로 픽쳐를 일정한 간격으로 분할하여 획득될 수 있다. 이를 기반으로 타일, 슬라이스 등의 분할이 수행될 수 있으나 이에 한정하지는 않는다. 상기 타일과 슬라이스와 같은 분할 단위는 기본 부호화 블록의 정수배로 구성될 수 있으나, 영상 경계에 위치한 분할 단위에서는 예외적인 경우가 발생할 수 있다. 이를 위해 기본 부호화 블록 크기의 조정이 발생할 수도 있다.The basic coding unit may be obtained by dividing a picture at regular intervals in a horizontal direction and a vertical direction. Based on this, division of tiles, slices, etc. may be performed, but is not limited thereto. The division unit such as the tile and the slice may be configured as an integer multiple of the basic coding block, but an exceptional case may occur in the division unit located at the image boundary. To this end, adjustment of the basic coding block size may occur.

예를 들어, 픽쳐를 기본 부호화 단위로 구획한 후에 상기 단위로 분할할 수 있거나 또는 픽쳐를 상기 단위로 구획한 후에 기본 부호화 단위로 분할할 수 있다. 본 발명에서는 각 단위의 구획 및 분할 순서가 전자인 경우를 가정하여 설명하나 이에 한정되지 않고, 부/복호화 설정에 따라 후자의 경우 또한 가능할 수 있다. 후자의 경우 기본 부호화 단위의 크기가 분할 단위(타일 등)에 따라 적응적인 경우로의 변형이 가능할 수 있다. 즉, 각 분할 단위마다 다른 크기를 갖는 기본 부호화 블록이 지원될 수 있음을 의미한다.For example, a picture may be divided into basic coding units and then divided into the units, or a picture may be divided into basic units and then divided into basic coding units. In the present invention, a description will be given on the assumption that the division and division order of each unit is the former, but the present invention is not limited thereto. In the latter case, the size of the basic coding unit may be changed to an adaptive case according to the division unit (tile, etc.). That is, it means that the basic coding block having a different size for each division unit can be supported.

본 발명에서는 픽쳐를 기본 부호화 단위로 구획하는 경우를 기본 설정으로 두어 후술하는 예를 설명할 것이다. 상기 기본 설정은 픽쳐가 타일 또는 슬라이스로 분할되지 않거나 또는 픽쳐가 하나의 타일 또는 하나의 슬라이스인 경우를 의미할 수 있다. 그러나 전술한 것처럼 각 분할 단위(타일, 슬라이스 등)를 먼저 구획하고 획득된 단위에 기반하여 기본 부호화 단위로 분할하는 경우(즉, 각 분할 단위가 기본 부호화 단위의 정수배가 되지 않는 경우 등)에도 후술하는 다양한 실시예가 동일하거나 변경되어 적용될 수 있음이 이해되어야 한다.In the present invention, a case of dividing a picture into basic coding units as a default setting will be described below. The default setting may mean that the picture is not divided into tiles or slices or the picture is one tile or one slice. However, as described above, when each division unit (tile, slice, etc.) is first partitioned and then divided into basic coding units based on the obtained unit (that is, each division unit is not an integer multiple of the basic coding unit, etc.). It should be understood that various embodiments may be applied in the same or modified form.

상기 분할 단위 중 슬라이스의 경우 스캔 패턴에 따라 연속하는 적어도 하나의 블록들의 묶음으로 구성될 수 있고, 타일의 경우 공간적으로 인접한 블록들의 직사각형 형태의 묶음으로 구성될 수 있으며, 그 외의 추가적인 분할 단위가 지원되어 그에 따른 정의에 의해 구성될 수 있다. 슬라이스와 타일은 병렬 처리 등을 위한 목적으로 지원되는 분할 단위일 수 있으며, 이를 위해 분할 단위 간의 참조는 제한(즉, 참조할 수 없음)할 수 있다. In the case of the slice unit, a slice may be composed of a bundle of at least one consecutive block according to a scan pattern, and in the case of a tile, the slice may be composed of a rectangular bundle of spatially adjacent blocks, and other additional division units are supported. And can be constructed by definition accordingly. The slice and the tile may be divided units supported for the purpose of parallel processing, and for this purpose, references between the divided units may be limited (that is, cannot be referred to).

슬라이스는 연속하는 블록의 시작 위치에 대한 정보로 각 단위의 분할 정보를 생성할 수 있고, 타일의 경우 수평, 수직 방향의 분할 선에 대한 정보를 생성하거나 또는 타일의 위치 정보(예를 들어, 좌상, 우상, 좌하, 우하 위치)를 생성할 수 있다.A slice may generate split information of each unit as information about a start position of consecutive blocks, and in the case of a tile, generate slice information about horizontal and vertical split lines or tile position information (for example, upper left corner). , Upper right, lower left, and lower right positions).

이때, 슬라이스와 타일은 부/복호화 설정에 따라 복수의 단위로 구분될 수 있다. In this case, the slice and the tile may be divided into a plurality of units according to the encoding / decoding.

예를 들어, 일부 단위<A>는 부/복호화 과정에 영향을 주는 설정 정보를 포함하는 단위(즉, 타일 헤더 또는 슬라이스 헤더를 포함)일 수 있고, 일부 단위<B>는 설정 정보를 포함하지 않는 단위일 수 있다. 또는, 일부 단위<A>는 부/복호화 과정에서 다른 단위를 참조할 수 없는 단위일 수 있고, 일부 단위<B>는 참조할 수 있는 단위일 수 있다. 또한, 일부 단위<A>는 다른 단위<B>를 포함하는 상하 관계일 수 있거나 일부 단위<A>는 다른 단위<B>와 대등한 관계일 수 있다.For example, some units <A> may be units containing setting information that affects the encoding / decoding process (ie, including tile headers or slice headers), and some units <B> do not include setting information. May be a unit. Alternatively, some units <A> may be units that cannot refer to other units in the encoding / decoding process, and some units <B> may be units that may be referred to. In addition, some units <A> may be in a vertical relationship including other units <B> or some units <A> may be in a relationship equivalent to other units <B>.

여기서 A와 B는 슬라이스와 타일(또는 타일과 슬라이스)일 수 있다. 또는, A와 B는 슬라이스나 타일 중 하나로 구성될 수 있다. 예를 들어, A는 슬라이스/타일<타입 1>이고 B는 슬라이스/타일<타입 2>와 같은 구성이 가능할 수 있다.Here, A and B may be slices and tiles (or tiles and slices). Alternatively, A and B may be composed of one of slices or tiles. For example, A may be a slice / tile <type 1> and B may be configured as a slice / tile <type 2>.

여기서 타입 1과 타입 2는 각각 하나의 슬라이스 또는 타일일 수 있다. 또는, 타입 1은 (타입 2를 포함하는) 복수의 슬라이스 또는 타일(슬라이스 집합 또는 타일 집합)일 수 있고, 타입 2는 하나의 슬라이스 또는 타일일 수 있다.Here, Type 1 and Type 2 may each be one slice or tile. Alternatively, type 1 may be a plurality of slices or tiles (including type 2) (slice set or tile set), and type 2 may be one slice or tile.

이미 전술한 것과 같이 본 발명은 픽쳐가 하나의 슬라이스 또는 타일로 구성되는 경우를 가정하여 설명하지만, 둘 이상의 분할 단위가 발생하는 경우라면 위의 설명이 후술하는 실시예에 적용되어 이해될 수 있다. 또한, A와 B는 분할 단위가 가질 수 있는 특성에 대한 예시로 각 예시의 A와 B가 혼합 구성되는 예 또한 가능하다.As described above, the present invention is described assuming that a picture is composed of one slice or tile. However, when two or more division units occur, the above description may be applied to an embodiment to be described below. In addition, A and B are examples of properties that a division unit may have, and an example in which A and B of each example are mixed is also possible.

한편, 블록 분할부를 통해 다양한 크기의 블록으로 분할할 수 있다. 이때, 블록은 컬러 포맷에 따라 하나 이상의 블록으로 구성(예를 들어, 하나의 휘도 블록 및 둘의 색차 블록 등)될 수 있으며, 컬러 포맷에 따라 블록의 크기가 결정될 수 있다. 이하에서는 설명의 편의를 위해 하나의 컬러 성분(휘도 성분)에 따른 블록을 기준으로 설명한다.Meanwhile, the block divider may be divided into blocks of various sizes. In this case, the block may be composed of one or more blocks according to the color format (for example, one luminance block and two chrominance blocks, etc.), and the size of the block may be determined according to the color format. In the following description, for convenience of description, a block corresponding to one color component (luminance component) will be described.

후술하는 내용은 하나의 컬러 성분을 대상으로 하지만 컬러 포맷에 따른 비율(예를 들어, YCbCr 4:2:0의 경우 휘도 성분과 색차 성분의 가로 및 세로 길이 비율은 2:1)에 비례하여 다른 컬러 성분에 변경 적용될 수 있음을 이해하여야 한다. 또한, 다른 컬러 성분에 의존적인 블록 분할(예를 들어, Cb/Cr에서 Y의 블록 분할 결과에 의존적인 경우)이 가능할 수 있지만, 각 컬러 성분에 독립적인 블록 분할이 가능할 수 있음을 이해하여야 한다. 또한, 공통되는 하나의 블록 분할 설정(길이 비율에 비례하는 것은 고려)을 사용할 수 있지만, 컬러 성분에 따라 개별적인 블록 분할 설정이 사용되는 것 또한 고려하여 이해할 필요가 있다.The following description applies to one color component but differs in proportion to the color format (e.g., in the case of YCbCr 4: 2: 0, the ratio of the width and height of the luminance component and the chrominance component is 2: 1). It should be understood that modifications may be made to the color components. It should also be understood that block partitioning that is dependent on other color components (e.g., depending on the block partitioning result of Y in Cb / Cr) may be possible, but block partitioning independent of each color component may be possible. . In addition, although one common block division setting (which is proportional to the length ratio) can be used, it is also necessary to consider and consider that the individual block division setting is used according to the color component.

블록은 M × N(M과 N은 4, 8, 16, 32, 64, 128 등의 정수)과 같은 가변 크기를 가질 수 있으며, 부호화 수행을 위한 단위(부호화 블록. Coding Block)일 수 있다. 상세하게는 예측, 변환, 양자화 및 엔트로피 부호화 등의 기초가 되는 단위일 수 있으며, 본 발명에서는 이를 통칭하여 블록이라 표현한다. 여기서 블록은 사각형의 블록만을 의미하는 것이 아니라 삼각형, 원형 등 다양한 형태의 영역을 포함하는 넓은 개념으로 이해될 수 있으며, 본 발명에서는 사각형 형태인 경우를 중심으로 설명한다.The block may have a variable size such as M × N (M and N are integers such as 4, 8, 16, 32, 64, 128, etc.) and may be a unit (coding block) for performing encoding. In detail, the present invention may be a unit that is a basis for prediction, transform, quantization, and entropy encoding, and in the present invention, this is collectively referred to as a block. Herein, the block may be understood as a broad concept including not only a rectangular block but also various types of regions such as a triangle and a circle, and the present invention will be described based on the case of a rectangular shape.

블록 분할부는 영상 부호화 장치 및 복호화 장치의 각 구성부에 관계되어 설정될 수 있으며, 이 과정을 통해 블록의 크기와 형태가 정해질 수 있다. 이때, 설정되는 블록은 구성부에 따라 달리 정의될 수 있으며, 예측부의 경우 예측 블록(Prediction Block), 변환부의 경우 변환 블록(Transform Block), 양자화부의 경우 양자화 블록(Quantization Block) 등이 이에 해당할 수 있다. 다만, 이에 한정되지 않고 다른 구성부에 따른 블록 단위가 추가로 정의될 수 있다. 본 발명에서는 각 구성부에서 입력과 출력이 블록(즉, 직사각 형태)인 경우를 가정하여 설명하지만, 일부 구성부에서는 다른 형태(예를 들어, 사각형, 삼각형 등)의 입/출력이 가능할 수도 있다.The block divider may be set in relation to each component of the image encoding apparatus and the decoding apparatus, and the size and shape of the block may be determined through this process. In this case, the set block may be defined differently according to the configuration unit, and a prediction block in the prediction unit, a transform block in the transform unit, and a quantization block in the quantization unit may correspond to this. Can be. However, the present invention is not limited thereto, and a block unit according to another component may be further defined. In the present invention, it is assumed that the inputs and outputs are blocks (that is, rectangular shapes) in each component, but some components may be input / output in other forms (eg, squares, triangles, etc.). .

블록 분할부의 초기(또는 시작) 블록의 크기 및 형태는 상위 단위로부터 결정될 수 있다. 예를 들어, 부호화 블록의 경우 기본 부호화 블록이 초기 블록일 수 있고, 예측 블록의 경우 부호화 블록이 초기 블록일 수 있다. 또한, 변환 블록의 경우 부호화 블록 또는 예측 블록이 초기 블록일 수 있으며, 이는 부/복호화 설정에 따라 정해질 수 있다. The size and shape of the initial (or starting) block of the block division may be determined from higher units. For example, in the case of a coding block, a basic coding block may be an initial block, and in the case of a prediction block, a coding block may be an initial block. In addition, in the case of a transform block, a coding block or a prediction block may be an initial block, which may be determined according to a sub / decoding setting.

예를 들어, 부호화 모드가 인트라(intra)일 경우 예측 블록은 변환 블록의 상위 단위일 수 있고, 인터(inter)일 경우 예측 블록은 변환 블록에 독립적인 단위일 수 있다. 분할의 시작 단위인 초기 블록은 작은 크기의 블록으로 분할될 수 있으며, 블록의 분할에 따른 최적의 크기 및 형태가 결정되면 그 블록은 하위 단위의 초기 블록으로 결정될 수 있다. 분할의 시작 단위인 초기 블록을 상위 단위의 초기 블록이라 볼 수 있다. 여기서, 상위 단위는 부호화 블록, 하위 단위는 예측 블록 또는 변환 블록일 수 있으나, 이에 한정되는 것은 아니다. 상기 예와 같이 하위 단위의 초기 블록이 정해지면 상위 단위와 같이 최적의 크기 및 형태의 블록을 찾기 위한 분할 과정이 수행될 수 있다.For example, when the encoding mode is intra, the prediction block may be an upper unit of the transform block, and in the inter case, the prediction block may be an independent unit of the transform block. The initial block, which is the start unit of the partition, may be divided into blocks of small size, and when the optimal size and shape according to the partition of the block is determined, the block may be determined as the initial block of the lower unit. The initial block, which is the start unit of the division, may be referred to as the initial block of the upper unit. Here, the upper unit may be a coding block and the lower unit may be a prediction block or a transform block, but is not limited thereto. When the initial block of the lower unit is determined as in the above example, a partitioning process for searching for a block having an optimal size and shape like the upper unit may be performed.

정리하면, 블록 분할부는 기본 부호화 단위(또는 최대 부호화 단위)를 적어도 하나의 부호화 단위(또는 하위 부호화 단위)로 분할을 수행할 수 있다. 또한, 부호화 단위는 적어도 하나의 예측 단위로 분할을 수행할 수 있고, 적어도 하나의 변환 단위로 분할을 수행할 수 있다. 부호화 단위는 적어도 하나의 부호화 블록으로 분할을 수행할 수 있고, 부호화 블록은 적어도 하나의 예측 블록으로 분할을 수행할 수 있고, 적어도 하나의 변환 블록으로 분할을 수행할 수 있다. 예측 단위는 적어도 하나의 예측 블록으로 분할을 수행할 수 있고, 변환 단위는 적어도 하나의 변환 블록으로 분할을 수행할 수 있다.In summary, the block division unit may divide the basic coding unit (or the largest coding unit) into at least one coding unit (or the lower coding unit). In addition, the coding unit may perform division in at least one prediction unit and may perform division in at least one transformation unit. The coding unit may perform splitting into at least one coding block, the coding block may perform splitting into at least one prediction block, and may split into at least one transform block. The prediction unit may perform division into at least one prediction block, and the transform unit may perform division into at least one transform block.

이때, 일부 블록의 경우 다른 블록과 결합되어 하나의 분할 과정을 수행할 수 있다. 예를 들어, 부호화 블록과 변환 블록이 하나의 단위로 결합할 경우 최적의 블록의 크기 및 형태를 획득하기 위한 분할 과정이 수행되며, 이는 부호화 블록의 최적의 크기 및 형태뿐만 아니라 변환 블록의 최적의 크기 및 형태일 수 있다. 또는, 부호화 블록과 변환 블록이 하나의 단위로 결합할 수 있고, 예측 블록과 변환 블록이 하나의 단위로 결합할 수 있고, 부호화 블록과 예측 블록과 변환 블록이 하나의 단위로 결합할 수 있고, 그 외의 블록들의 결합이 가능할 수 있다. 단, 상기 결합 여부는 영상(픽쳐, 슬라이스, 타일 등) 내에서 일괄적으로 적용되는 것이 아니라 블록 단위의 세부 조건(예를 들어, 영상 타입, 부호화 모드, 블록의 크기/형태, 예측 모드 정보 등)에 따라 적응적으로 결합 여부 등이 정해질 수 있다.In this case, some blocks may be combined with other blocks to perform one division process. For example, when the coding block and the transform block are combined into one unit, a partitioning process is performed to obtain an optimal block size and shape, which is optimized for the transform block as well as the optimal size and shape of the coding block. Size and shape. Alternatively, the coding block and the transform block may be combined in one unit, the prediction block and the transform block may be combined in one unit, the coding block, the prediction block and the transform block may be combined in one unit, Combination of other blocks may be possible. However, the combination or not is not applied collectively in an image (picture, slice, tile, etc.), but detailed conditions in units of blocks (for example, image type, encoding mode, block size / shape, prediction mode information, etc.). ) May be adaptively determined.

상술한 바와 같이 최적의 크기 및 형태의 블록을 찾은 경우, 이에 대한 모드 정보(예를 들어, 분할 정보 등)가 생성될 수 있다. 모드 정보는 블록이 속하는 구성부에서 발생하는 정보(예를 들어, 예측 관련 정보 및 변환 관련 정보 등)과 함께 비트스트림에 수록되어 복호화기로 전송될 수 있고, 복호화기에서 동일 수준의 단위로 파싱되어 영상 복호화 과정에서 사용될 수 있다.As described above, when a block having an optimal size and shape is found, mode information (for example, split information, etc.) for this may be generated. The mode information may be stored in the bitstream together with information generated by the component to which the block belongs (for example, prediction related information and transform related information) and transmitted to the decoder, and may be parsed in units of the same level by the decoder. Can be used in the video decoding process.

이하에서는 분할 방식에 대한 설명할 것이며, 설명의 편의를 위해 초기 블록이 정사각 형태인 것을 가정하지만, 초기 블록이 직사각 형태인 경우에도 동일하거나 유사하게 적용할 수 있으므로, 이에 한정되는 것은 아니다.Hereinafter, the division scheme will be described. For convenience of explanation, it is assumed that the initial block is in the form of a square, but the same may be similarly or similarly applied to the case where the initial block is in the form of a rectangle.

블록 분할을 위한 다양한 방법이 지원될 수 있지만 본 발명에서는 트리 기반의 분할에 중점을 두어 설명할 것이며, 최소 하나의 트리 분할이 지원될 수 있다. 이때, 트리 방식은 쿼드 트리(Quad Tree. QT), 바이너리 트리(Binary Tree. BT), 터너리 트리(Ternary Tree. TT) 등이 지원될 수 있다. 하나의 트리 방식이 지원되는 경우는 단일 트리 분할, 둘 이상의 트리 방식이 지원되는 경우는 다중 트리 방식이라 지칭할 수 있다.Various methods for block partitioning may be supported, but the present invention will be described with emphasis on tree-based partitioning, and at least one tree partitioning may be supported. In this case, a quad tree (Quad Tree. QT), a binary tree (BT), a ternary tree (TT), etc. may be supported. When one tree method is supported, it may be referred to as a single tree split, and when two or more tree methods are supported, a multi-tree method.

쿼드 트리 분할의 경우 블록이 가로와 세로 방향으로 각각 2분할되는 방식을 의미하고, 바이너리 트리 분할의 경우 블록이 가로 또는 세로 중 한 방향으로 2분할되는 방식을 의미하며, 터너리 트리 분할의 경우 블록이 가로 또는 세로 중 한 방향으로 3분할되는 방식을 의미한다.In the case of quad-tree splitting, this means that the blocks are divided into two in the horizontal and vertical directions, and in the case of binary tree splitting, the blocks are divided into two in either the horizontal or vertical directions. This means that the system is divided into three directions in either the horizontal or vertical direction.

본 발명에서 분할 전 블록이 M x N일 경우 쿼드 트리 분할은 4개의 M/2 x N/2으로 분할되고, 바이너리 트리 분할은 2개의 M/2 x N 또는 M x N/2로 분할되고, 터너리 트리 분할의 경우 M/4 x N / M/2 x N / M/4 x N 또는 M x N/4 / M x N/2 / M x N/4로 분할되는 경우를 가정한다. 하지만 분할 결과가 위의 경우에만 한정되지는 않으며, 다양한 변형의 예가 가능할 수 있다.In the present invention, when the pre-division block is M x N, the quad tree division is divided into four M / 2 x N / 2, and the binary tree division is divided into two M / 2 x N or M x N / 2, In the case of ternary tree partitioning, it is assumed that the partition is divided into M / 4 x N / M / 2 x N / M / 4 x N or M x N / 4 / M x N / 2 / M x N / 4. However, the splitting result is not limited to the above case, and various modification examples may be possible.

부/복호화 설정에 따라 상기 트리 분할 중 하나 이상의 방식이 지원될 수 있다. 예를 들어, 쿼드 트리 분할을 지원할 수 있거나 또는 쿼드 트리 분할과 바이너리 트리 분할을 지원할 수 있거나 또는 쿼드 트리 분할과 터너리 트리 분할을 지원할 수 있거나 또는 쿼드 트리 분할과 바이너리 트리 분할과 터너리 트리 분할을 지원할 수 있다.One or more of the tree divisions may be supported according to the encoding / decoding setting. For example, it can support quad-tree splitting, or can support quad-tree splitting and binary tree splitting, or it can support quad-tree splitting and ternary tree splitting, or it can support quad-tree splitting and binary tree splitting and ternary tree splitting. Can support

상기 예는 기본 분할 방식이 쿼드 트리이며 기타 트리 지원 여부에 따라 바이너리 트리 분할과 터너리 트리 분할이 추가 분할 방식에 포함되는 경우에 대한 예이지만, 다양한 변형이 가능할 수 있다. 이때, 기타 트리 지원 여부에 대한 정보(bt_enabled_flag, tt_enabled_flag, bt_tt_enabled_flag 등. 0 또는 1의 값을 가질 수 있고, 0이면 지원하지 않고 1이면 지원)는 부/복호화 설정에 따라 묵시적으로 정해지거나 또는 시퀀스, 픽쳐, 슬라이스, 타일 등의 단위로 명시적으로 결정될 수 있다.The above example is a case where the basic partitioning scheme is a quad tree and binary tree partitioning and ternary tree partitioning are included in the additional partitioning scheme depending on whether other trees are supported, but various modifications may be possible. In this case, information on whether or not the other tree is supported (bt_enabled_flag, tt_enabled_flag, bt_tt_enabled_flag, etc., may have a value of 0 or 1, 0 is not supported, 1 is supported) or is implicitly determined according to the encoding / decoding setting or sequence, It may be determined explicitly in units of a picture, a slice, a tile, and the like.

분할 정보는 분할 여부에 대한 정보(tree_part_flag. 또는, qt_part_flag, bt_part_flag, tt_part_flag, bt_tt_part_flag. 0 또는 1의 값을 가질 수 있고, 0이면 분할되지 않고 1이면 분할)가 포함될 수 있다. 또한, 분할 방식(바이너리 트리, 터너리 트리)에 따라 분할 방향(dir_part_flag. 또는, bt_dir_part_flag, tt_dir_part_flag, bt_tt_dir_part_flag. 0 또는 1의 값을 가질 수 있고, 0이면 <가로/수평>이고 1이면 <세로/수직>)에 대한 정보가 추가될 수 있으며, 이는 분할이 수행되는 경우에 발생 가능한 정보일 수 있다.The split information may include information on whether to split (tree_part_flag. Or qt_part_flag, bt_part_flag, tt_part_flag, bt_tt_part_flag. The value may be 0 or 1, and 0 may be split and 1 is split). In addition, depending on the partitioning scheme (binary tree, ternary tree), the partition direction (dir_part_flag., Or bt_dir_part_flag, tt_dir_part_flag, bt_tt_dir_part_flag.) May be 0 or 1, and 0 is <horizontal / horizontal>, and 1 is <vertical / Vertical>) may be added, which may be information that may occur when splitting is performed.

복수의 트리 분할이 지원되는 경우에는 다양한 분할 정보 구성이 가능할 수 있다. 다음은 하나의 깊이(Depth) 수준(즉, 지원되는 분할 깊이가 하나 이상으로 설정되어 재귀적인 분할이 가능할 수도 있지만 설명의 편의를 위한 목적)에서 분할 정보가 어떻게 구성되어 있는지에 대한 예로 가정하여 설명한다.When a plurality of tree partitions are supported, various partition information configurations may be possible. The following description assumes an example of how the partition information is configured at one depth level (ie, for the convenience of explanation, although recursive partitioning may be possible because one or more supported partition depths are set to one or more). do.

일 예(1)로, 분할 여부에 대한 정보를 확인한다. 이때, 분할이 수행되지 않는 경우라면 분할이 종료된다.As an example (1), information on whether to divide is checked. At this time, if the division is not performed, the division ends.

만약 분할이 수행되는 경우라면 분할 종류에 대한 선택 정보(예를 들어, tree_idx. 0이면 QT, 1이면 BT, 2이면 TT)를 확인한다. 이때, 선택되는 분할 종류에 따라 분할 방향 정보를 추가로 확인하고 다음 단계(분할 깊이가 최대에 도달하지 않은 경우 등의 이유로 추가 분할이 가능하다면 다시 처음부터 시작하고, 분할이 불가한 경우라면 분할 종료)로 넘어간다.If the split is performed, the selection information on the split type (for example, tree_idx. 0 is QT, 1 is BT, 2 is TT) is checked. At this time, additionally check the split direction information according to the selected split type, and start again from the beginning if additional splitting is possible due to the next step (when the split depth has not reached the maximum, or end splitting if splitting is not possible). Go to)

일 예(2)로, 일부 트리 방식(QT)에 대한 분할 여부에 대한 정보를 확인하고 다음 단계로 넘어간다. 이때, 분할이 수행되지 않는 경우라면 일부 트리 방식(BT)의 분할 여부에 대한 정보를 확인한다. 이때, 분할이 수행되지 않는 경우라면 일부 트리 방식(TT)의 분할 여부에 대한 정보를 확인한다. 이때, 분할이 수행되지 않는 경우라면 분할이 종료된다.In one example (2), the information on whether to split some tree methods (QT) is checked and the process proceeds to the next step. In this case, if the split is not performed, information on whether or not the partial tree method BT is split is checked. In this case, if the split is not performed, information on whether or not the partial tree method TT is split is checked. At this time, if the division is not performed, the division ends.

만약 일부 트리 방식(QT)의 분할이 수행되는 경우라면 다음 단계로 넘어간다. 또한, 만약 일부 트리 방식(BT)의 분할이 수행되는 경우라면 분할 방향 정보를 확인하고 다음 단계로 넘어간다. 또한, 만약 일부 트리 분할 방식(TT)의 분할이 수행되는 경우라면 분할 방향 정보를 확인하고 다음 단계로 넘어간다.If splitting of some tree type (QT) is performed, the process proceeds to the next step. In addition, if the splitting of some tree methods BT is performed, the split direction information is checked and the process proceeds to the next step. In addition, if the split of some tree split schemes (TT) is performed, the split direction information is checked and the process proceeds to the next step.

일 예(3)로, 일부 트리 방식(QT)에 대한 분할 여부에 대한 정보를 확인한다. 이때, 분할이 수행되지 않는 경우라면 일부 트리 방식(BT와 TT)의 분할 여부에 대한 정보를 확인한다. 이때, 분할이 수행되지 않는 경우라면 분할이 종료된다.In one example (3), the information on whether to split for some tree method (QT) is checked. At this time, if the split is not performed, the information on whether or not to split some tree methods (BT and TT) is checked. At this time, if the division is not performed, the division ends.

만약 일부 트리 방식(QT)의 분할이 수행되는 경우라면 다음 단계로 넘어간다. 또한, 만약 일부 트리 방식(BT와 TT)의 분할이 수행되는 경우라면 분할 방향 정보를 확인하고 다음 단계로 넘어간다.If splitting of some tree type (QT) is performed, the process proceeds to the next step. In addition, if splitting of some tree methods BT and TT is performed, the split direction information is checked and the process proceeds to the next step.

상기 예는 트리 분할의 우선 순위가 존재(2번과 3번 예)하거나 존재하지 않는 경우(1번 예)일 수 있으나, 다양한 변형의 예가 가능할 수 있다. 또한, 상기 예에서 현재 단계의 분할은 이전 단계의 분할 결과와는 무관한 경우를 설명하는 예이지만, 현재 단계의 분할이 이전 단계의 분할 결과에 의존적인 설정 또한 가능할 수 있다.The above example may be the case where the priority of the tree split exists (examples 2 and 3) or does not exist (example 1), but various modification examples may be possible. In addition, in the above example, the division of the current step is an example for explaining a case that is not related to the division result of the previous step, but it may also be possible to set the division of the current step depending on the division result of the previous step.

예를 들어, 1 내지 3번 예의 경우 이전 단계에서 일부 트리 방식의 분할(QT)이 수행되어 현재 단계로 넘어온 경우라면 현재 단계에서도 동일 트리 방식(QT)의 분할이 지원될 수 있다. For example, in the case of the first to third examples, if the tree-type partitioning (QT) is performed in the previous step and the current step is transferred to the current step, the splitting of the same tree method (QT) may be supported in the current step.

반면, 이전 단계에서 일부 트리 방식의 분할(QT)이 수행되지 않고 다른 트리 방식의 분할(BT 또는 TT)이 수행되어 현재 단계로 넘어온 경우라면 일부 트리 방식의 분할(QT)을 제외하고 일부 트리 방식의 분할(BT와 TT)이 현재 단계를 포함한 후속 단계에 지원되는 설정 또한 가능할 수 있다.On the other hand, if some tree-type splitting (QT) is not performed in the previous step and another tree-type splitting (BT or TT) is carried out to the current step, except for some tree-type splitting (QT), some tree-type splitting is performed. It may also be possible that the division of (BT and TT) is supported for subsequent steps, including the current step.

위와 같은 경우에는 블록 분할에 지원되는 트리 구성이 적응적일 수 있다는 것을 의미하므로, 전술한 분할 정보 구성 또한 달리 구성될 수 있음을 의미한다. (후술하는 예는 3번 예로 가정) 즉, 상기 예에서 일부 트리 방식(QT)의 분할이 이전 단계에서 수행되지 않았을 경우, 현재 단계에서는 일부 트리 방식(QT)은 고려하지 않고 분할 과정이 수행될 수 있다. 또한, 관련 트리 방식에 관한 분할 정보(예를 들어, 분할 여부에 대한 정보, 분할 방향 정보 등. 본 예<QT>에서는 분할 여부에 대한 정보)는 제거하여 구성될 수 있다.In the above case, since the tree configuration supported for block partitioning may be adaptive, the partitioning information configuration described above may also be configured differently. (Examples to be described below are assumed to be examples 3) In other words, if the splitting of some tree methods (QT) is not performed in the previous step, the splitting process may be performed without considering some tree methods (QT) in the present step. Can be. In addition, splitting information (eg, splitting information, splitting direction information, etc.) regarding the related tree method may be configured by removing the splitting information.

상기 예는 블록 분할이 허용되는 경우(예를 들어, 블록 크기가 최대값과 최소값 사이의 범위 내에 존재, 각 트리 방식의 분할 깊이가 최대 깊이<허용 깊이>에 도달하지 않음 등)에 대한 적응적인 분할 정보 구성에 관한 경우이며, 블록 분할이 제한되는 경우(예를 들어, 블록 크기가 최대값과 최소값 사이의 범위에 존재하지 않음, 각 트리 방식의 분할 깊이가 최대 깊이에 도달함 등)에도 적응적인 분할 정보 구성이 가능할 수 있다.The above example is adaptive for the case where block partitioning is allowed (e.g., block size is within the range between the maximum and minimum values, the partitioning depth of each tree method does not reach the maximum depth <allowed depth>, etc.). It is related to the structure of partitioning information, and adapts to the case where the block partitioning is limited (for example, the block size does not exist in the range between the maximum value and the minimum value, the partitioning depth of each tree method reaches the maximum depth, etc.). Partitioning information may be configured.

이미 언급한 것과 같이 본 발명에서 트리 기반의 분할은 재귀적인 방식을 사용하여 수행될 수 있다. 예를 들어, 분할 깊이가 k인 부호화 블록의 분할 플래그가 0인 경우 부호화 블록의 부호화는 분할 깊이가 k인 부호화 블록에서 수행되며, 분할 깊이가 k인 부호화 블록의 분할 플래그가 1인 경우 부호화 블록의 부호화는 분할 방식에 따라 분할 깊이가 k+1인 N개의 서브 부호화 블록(이때, N은 2, 3, 4와 같은 2 이상의 정수)에서 수행된다.As already mentioned, tree-based partitioning in the present invention can be performed using a recursive manner. For example, when the partition flag of the coding block having the partition depth k is 0, encoding of the coding block is performed in the coding block having the partition depth k, and when the partition flag of the coding block having the partition depth k is 1, the coding block. The encoding of is performed in N sub-coding blocks having a division depth of k + 1 (wherein N is an integer of 2 or more, such as 2, 3, 4) according to a division scheme.

상기 서브 부호화 블록은 다시 부호화 블록(k+1)으로 설정되어 상기 과정을 거쳐 서브 부호화 블록(k+2)으로 분할될 수 있으며, 이러한 계층적 분할 방식은 분할 범위 및 분할 허용 깊이 등의 분할 설정에 따라 결정될 수 있다.The sub coded block may be set again to a coded block k + 1 and divided into sub coded blocks k + 2 through the above process. It can be determined according to.

이때, 분할 정보를 표현하기 위한 비트스트림 구조는 하나 이상의 스캔 방법 중 선택할 수 있다. 예를 들어, 분할 깊이 순서 기준으로 분할 정보의 비트스트림을 구성할 수 있거나 분할 여부 기준으로 분할 정보의 비트스트림을 구성할 수 있다.In this case, the bitstream structure for expressing the partition information may be selected from one or more scan methods. For example, the bitstream of the split information may be configured based on the split depth order, or the bitstream of the split information may be configured based on whether the split information is divided.

예를 들어, 분할 깊이 순서 기준의 경우 최초 블록 기준으로 현 수준의 깊이에서의 분할 정보를 획득한 후 다음 수준의 깊이에서의 분할 정보를 획득하는 방법이며, 분할 여부 기준의 경우 최초 블록 기준으로 분할된 블록에서의 추가 분할 정보를 우선적으로 획득하는 방법을 의미하며, 다른 추가적인 스캔 방법이 고려될 수 있다. 본 발명에서는 분할 여부 기준으로 분할 정보의 비트스트림을 구성하는 경우를 가정한다.For example, in the case of the partition depth ordering method, after obtaining partitioning information at the current level of depth based on the first block, the partitioning information is obtained at the next level of depth. A method of preferentially acquiring additional splitting information in the received block, and another additional scanning method may be considered. In the present invention, it is assumed that a bitstream of partitioning information is configured based on partitioning.

전술한 것과 같이 블록 분할에 관한 다양한 경우를 살펴보았으며, 블록 분할에 관한 고정적이거나 적응적인 설정이 지원될 수 있다.As described above, various cases regarding block partitioning have been described, and a fixed or adaptive setting regarding block partitioning may be supported.

이때, 블록 분할에 관한 설정은 시퀀스, 픽쳐, 슬라이스, 타일 등의 단위에서 관련 정보를 명시적으로 포함할 수 있다. 또는, 부/복호화 설정에 따라 묵시적으로 블록 분할 설정이 정해질 수 있으며, 여기서 부/복호화 설정은 영상 타입(I/P/B), 컬러 성분, 분할 종류, 분할 깊이 등의 다양한 부/복호화 요소 중 하나 또는 둘 이상의 조합에 따라 구성될 수 있다.In this case, the setting regarding block division may explicitly include related information in units of a sequence, a picture, a slice, a tile, and the like. Alternatively, the block division setting may be implicitly determined according to the sub / decoding setting, wherein the sub / decoding setting includes various sub / decoding elements such as image type (I / P / B), color component, type of division, and depth of division. It may be configured according to one or a combination of two or more.

도 4는 본 발명이 적용되는 일실시예로서, 화면간 예측 방법을 도시한 것이다.4 illustrates an inter prediction method according to an embodiment to which the present invention is applied.

도 4를 참조하면, 현재 블록의 모션 정보 예측을 위한 후보 리스트를 생성할 수 있다(S400). Referring to FIG. 4, a candidate list for motion information prediction of the current block may be generated (S400).

상기 후보 리스트는, 하나 또는 그 이상의 어파인 모델 기반의 후보(이하, 어파인 후보라 함)를 포함할 수 있다. 어파인 후보(Affine Candidate)는, 제어점 벡터(control point vector)를 가진 후보를 의미할 수 있다. 제어점 벡터는, 어파인 모델을 위한 제어점의 모션 벡터를 의미하고, 블록의 코너 위치(예를 들어, 좌상단, 우상단, 좌하단, 또는 우하단 코너 중 적어도 하나의 위치)에 대해서 정의될 수 있다.The candidate list may include one or more candidates based on affine models (hereinafter, referred to as affine candidates). Affine Candidate may mean a candidate having a control point vector. The control point vector may mean a motion vector of a control point for an affine model and may be defined with respect to a corner position of the block (eg, at least one of a top left, top right, bottom left, or bottom right corner).

어파인 후보는, 공간적 후보, 시간적 후보 또는 구성된 후보 중 적어도 하나를 포함할 수 있다. 여기서, 공간적 후보는, 현재 블록에 공간적으로 인접한 주변 블록의 벡터로부터 유도될 수 있고, 시간적 후보는, 현재 블록에 시간적으로 인접한 주변 블록의 벡터로부터 유도될 수 있다. 여기서, 상기 주변 블록은 어파인 모델로 부호화된 블록을 의미할 수 있다. 상기 벡터는, 모션 벡터를 의미할 수도 있고, 제어점 벡터를 의미할 수도 있다. An affine candidate may include at least one of a spatial candidate, a temporal candidate, or a configured candidate. Here, the spatial candidate may be derived from a vector of neighboring blocks spatially adjacent to the current block, and the temporal candidate may be derived from a vector of neighboring blocks temporally adjacent to the current block. Here, the neighboring block may mean a block encoded by an affine model. The vector may mean a motion vector or a control point vector.

공간적/시간적 주변 블록의 벡터를 기반으로 공간적/시간적 후보를 유도하는 방법에 대해서는 도 5를 참조하여 자세히 살펴 보도록 한다. A method of deriving a spatial / temporal candidate based on a vector of spatial / temporal neighboring blocks will be described in detail with reference to FIG. 5.

한편, 상기 구성된 후보는, 현재 블록에 공간적/시간적 주변 블록의 모션 벡터 간의 조합에 기초하여 유도될 수 있으며, 이는 도 6을 참조하여 자세히 살펴 보기로 한다.Meanwhile, the configured candidate may be derived based on a combination between motion vectors of spatial / temporal neighboring blocks in the current block, which will be described in detail with reference to FIG. 6.

전술한 복수의 어파인 후보는, 소정의 우선 순위에 기초하여 상기 후보 리스트에 배열될 수 있다. 예를 들어, 복수의 어파인 후보는, 공간적 후보, 시간적 후보, 구성된 후보의 순서로 후보 리스트에 배열될 수 있다. 또는, 복수의 어파인 후보는, 시간적 후보, 공간적 후보, 구성된 후보의 순서로 후보 리스트에 배열될 수도 있다. 다만, 이에 한정되지 아니하며, 시간적 후보는, 구성된 후보 다음에 배열될 수도 있다. 또는, 구성된 후보 중 일부는, 공간적 후보 전에 배열되고, 나머지는 공간적 후보 뒤에 배열될 수도 있다.The plurality of affine candidates described above may be arranged in the candidate list based on a predetermined priority. For example, the plurality of affine candidates may be arranged in the candidate list in the order of spatial candidates, temporal candidates, and configured candidates. Alternatively, the plurality of affine candidates may be arranged in the candidate list in the order of temporal candidates, spatial candidates, and configured candidates. However, the present invention is not limited thereto and the temporal candidate may be arranged after the configured candidate. Alternatively, some of the configured candidates may be arranged before the spatial candidates, and others may be arranged after the spatial candidates.

상기 후보 리스트와 후보 인덱스에 기반하여, 현재 블록의 제어점 벡터가 유도될 수 있다(S410).Based on the candidate list and the candidate index, a control point vector of the current block may be derived (S410).

후보 인덱스는, 현재 블록의 제어점 벡터를 유도하기 위해 부호화된 인덱스를 의미할 수 있다. 상기 후보 인덱스는, 후보 리스트에 속한 복수의 어파인 후보 중 어느 하나를 특정할 수 있다. 상기 후보 인덱스에 의해 특정된 어파인 후보의 제어점 벡터를 이용하여, 현재 블록의 제어점 벡터가 유도될 수 있다.The candidate index may mean an index encoded to derive a control point vector of the current block. The candidate index may specify any one of a plurality of affine candidates belonging to the candidate list. The control point vector of the current block may be derived by using the control point vector of the affine candidate specified by the candidate index.

예를 들어, 현재 블록의 어파인 모델의 타입이 4-parameter인 경우(즉, 현재 블록이 2개의 제어점 벡터를 사용하는 것으로 결정된 경우)를 가정한다. 이때, 상기 후보 인덱스에 의해 특정된 어파인 후보가 3개의 제어점 벡터를 가진 경우, 상기 3개의 제어점 벡터 중 2개의 제어점 벡터(e.g., Idx=0, 1인 제어점 벡터)만을 선택하고, 이를 현재 블록의 제어점 벡터로 설정할 수 있다. 또는, 상기 특정된 어파인 후보의 3개의 제어점 벡터를 현재 블록의 제어점 벡터로 설정할 수 있다. 이 경우, 현재 블록의 어파인 모델의 타입은 6-parameter로 갱신될 수 있다.For example, assume that the type of the affine model of the current block is 4-parameter (ie, the current block is determined to use two control point vectors). In this case, when the candidate candidate specified by the candidate index has three control point vectors, only two control point vectors (eg, a control point vector having Idx = 0, 1) among the three control point vectors are selected, and the current block is selected. Can be set to the control point vector of. Alternatively, three control point vectors of the identified candidates may be set as control point vectors of the current block. In this case, the type of the affine model of the current block may be updated to 6-parameter.

반대로, 현재 블록의 어파인 모델의 타입이 6-parameter인 경우(즉, 현재 블록이 3개의 제어점 벡터를 사용하는 것으로 결정된 경우)를 가정한다. 이때, 상기 후보 인덱스에 의해 특정된 어파인 후보가 2개의 제어점 벡터를 가진 경우, 1개의 추가적인 제어점 벡터를 생성하고, 상기 어파인 후보의 2개의 제어점 벡터 및 추가적인 제어점 벡터를 현재 블록의 제어점 벡터로 설정할 수 있다. 상기 추가적인 제어점 벡터는, 어파인 후보의 2개의 제어점 벡터, 현재/주변 블록의 크기 또는 위치 정보 중 적어도 하나에 기초하여 유도될 수 있다. 또는, 상기 특정된 어파인 후보의 2개의 제어점 벡터를 현재 블록의 제어점 벡터로 설정할 수 있다. 이 경우, 현재 블록의 어파인 모델의 타입은 4-parameter로 갱신될 수 있다.In contrast, it is assumed that the type of the affine model of the current block is 6-parameter (ie, the current block is determined to use three control point vectors). In this case, when the candidate candidate specified by the candidate index has two control point vectors, one additional control point vector is generated, and the two control point vectors and the additional control point vectors of the candidate candidates are the control point vectors of the current block. Can be set. The additional control point vector may be derived based on at least one of two control point vectors of the candidate candidate, the size or position information of the current / peripheral block. Alternatively, two control point vectors of the identified candidates may be set as control point vectors of the current block. In this case, the type of the affine model of the current block may be updated to 4-parameter.

현재 블록의 제어점 벡터를 기반으로, 현재 블록의 모션 벡터가 유도될 수 있다(S420).The motion vector of the current block may be derived based on the control point vector of the current block (S420).

상기 모션 벡터는, 현재 블록의 서브 블록의 단위로 유도될 수 있다. 여기서, NxM 서브 블록은, 직사각형(N>M 또는 N<M) 또는 정사각형(N=M)의 형태일 수 있다. 상기 N과 M 값은, 4, 8, 16, 32 또는 그 이상일 수 있다. 서브 블록의 크기/형태는, 복호화 장치에 기-정의된 고정된 크기/형태일 수 있다. The motion vector may be derived in units of subblocks of the current block. Here, the NxM subblock may be in the form of a rectangle (N> M or N <M) or a square (N = M). The N and M values may be 4, 8, 16, 32 or more. The size / shape of the sub block may be a fixed size / shape pre-defined in the decoding apparatus.

또는, 서브 블록의 크기/형태는, 전술한 블록의 속성에 기초하여 가변적으로 유도될 수도 있다. 예를 들어, 현재 블록의 크기가 소정의 문턱크기보다 크거나 같은 경우, 현재 블록은 제1 서브 블록의 단위(e.g., 8x8, 16x16)로 분할되고, 그렇지 않은 경우, 현재 블록은 제2 서브 블록의 단위(e.g., 4x4)로 분할될 수 있다. 또는, 서브 블록의 크기/형태에 관한 정보가 부호화 장치에서 부호화되어 시그날링될 수도 있다.Alternatively, the size / shape of the sub block may be variably derived based on the attributes of the above-described block. For example, if the size of the current block is greater than or equal to a predetermined threshold size, the current block is divided into units (eg, 8x8, 16x16) of the first subblock, otherwise, the current block is the second subblock. It may be divided into units (eg, 4x4). Alternatively, the information about the size / shape of the sub block may be encoded and signaled by the encoding apparatus.

상기 유도된 모션 벡터를 이용하여 현재 블록에 대해 인터 예측을 수행할 수 있다(S430).Inter prediction may be performed on the current block by using the derived motion vector (S430).

구체적으로, 현재 블록의 모션 벡터를 이용하여 참조 블록을 특정할 수 있다. 상기 참조 블록은, 현재 블록의 서브 블록 별로 각각 특정될 수 있다. 각 서브 블록의 참조 블록은, 하나의 참조 픽쳐에 속할 수 있다. 즉, 현재 블록에 속한 서브 블록은 하나의 참조 픽쳐를 공유할 수 있다. 또는, 현재 블록의 서브 블록 별로 참조 픽쳐 인덱스가 독립적으로 설정될 수도 있다.Specifically, the reference block may be specified using the motion vector of the current block. The reference block may be specified for each sub block of the current block. The reference block of each sub block may belong to one reference picture. That is, a sub block belonging to the current block may share one reference picture. Alternatively, the reference picture index may be independently set for each subblock of the current block.

상기 특정된 참조 블록은 현재 블록의 예측 블록으로 설정될 수 있다. 전술한 실시예는, 머지 모드뿐만 아니라 일반적인 인터 모드(e.g., AMVP 모드)에서도 동일/유사하게 적용될 수 있다. 전술한 실시예는, 현재 블록의 크기가 소정의 문턱크기보다 크거나 같은 경우에 한하여 수행될 수 있다. 여기서, 문턱크기는, 8x8, 8x16, 16x8, 16x16 또는 그 이상일 수 있다.The specified reference block may be set as a prediction block of the current block. The above-described embodiment may be applied to the same / similarly in the merge mode as well as the general inter mode (e.g., AMVP mode). The above-described embodiment may be performed only when the size of the current block is greater than or equal to a predetermined threshold size. Here, the threshold size may be 8x8, 8x16, 16x8, 16x16 or more.

전술한 서브 블록 단위의 예측을 위해, 서브 블록 단위의 예측 또는 파라미터 유도를 지시하는 플래그가 시그날링될 수 있다. 상기 플래그의 값에 따라 전술한 S400 내지 S430 중 적어도 하나가 수행될 수 있다. 상기 플래그는, 상기 문턱크기보다 크거나 같은 경우에 한하여 시그날링될 수 있다. 상기 플래그의 파싱은, CABAC에 기초하여 수행될 수 있고, 이때 확률 정보(e.g., ctxInc)는, 주변 블록의 플래그의 값에 기초하여 유도될 수 있다. 여기서, 주변 블록은, 현재 블록의 좌측 또는 상단 주변 블록 중 적어도 하나를 포함할 수 있다.For the above-described prediction in the sub-block units, a flag indicating the prediction or parameter derivation in the sub-block unit may be signaled. At least one of the above-described S400 to S430 may be performed according to the value of the flag. The flag may be signaled only when it is larger than or equal to the threshold size. The parsing of the flag may be performed based on CABAC, where the probability information (e.g., ctxInc) may be derived based on the value of the flag of the neighboring block. Here, the neighboring block may include at least one of the left or the upper neighboring block of the current block.

도 5는 본 발명이 적용되는 일실시예로서, 공간적/시간적 주변 블록으로부터 어파인 후보를 유도하는 방법에 관한 것이다.5 is a view illustrating a method of deriving an affine candidate from a spatial / temporal neighboring block according to an embodiment to which the present invention is applied.

설명의 편의를 위해, 본 실시예에서는 공간적 주변 블록으로부터 어파인 후보를 유도하는 방법에 대해서 살펴 보기로 한다. For convenience of description, a method of deriving affine candidates from spatial neighboring blocks will be described in this embodiment.

도 5를 참조하면, 현재 블록(500)의 너비와 높이는 각각 cbW, cbH이고, 현재 블록의 위치는 (xCb, yCb)이다. 공간적 주변 블록(510)의 너비와 높이는 각각 nbW, nbH이고, 공간적 주변 블록의 위치는 (xNb, yNb)이다. 도 5는, 공간적 주변 블록으로서 현재 블록의 좌상단 블록을 도시하나, 이에 한정되지 아니한다. 즉, 공간적 주변 블록은, 현재 블록의 좌측 블록, 좌하단 블록, 우상단 블록, 상단 블록 또는 좌상단 블록 중 적어도 하나를 포함할 수 있다.Referring to FIG. 5, the width and height of the current block 500 are cbW and cbH, respectively, and the positions of the current block are (xCb and yCb). The width and height of the spatial peripheral block 510 are nbW and nbH, respectively, and the position of the spatial peripheral block is (xNb, yNb). 5 illustrates a block in the upper left of the current block as a spatial neighboring block, but is not limited thereto. That is, the spatial neighboring block may include at least one of a left block, a lower left block, a right upper block, an upper block, or an upper left block of the current block.

공간적 후보는, n개의 제어점 벡터(cpMV)를 가질 수 있다. 여기서, n 값은, 1, 2, 3, 또는 그 이상의 정수일 수 있다. n 값은, 서브 블록 단위로 복호화되는지 여부에 관한 정보, 어파인 모델로 부호화된 블록인지 여부에 관한 정보 또는 어파인 모델의 타입(4-parameter 또는 6-parameter)에 관한 정보 중 적어도 하나에 기초하여 결정될 수 있다. The spatial candidate may have n control point vectors (cpMV). Here, the n value may be an integer of 1, 2, 3, or more. The value of n is based on at least one of information on whether the data is decoded in units of sub-blocks, information on whether the block is encoded by the affine model, or information on the type (4-parameter or 6-parameter) of the affine model. Can be determined.

상기 정보는, 부호화 장치에서 부호화되어 시그날링될 수도 있다. 또는, 상기 정보 전부 또는 일부는, 블록의 속성에 기초하여 복호화 장치에서 유도될 수도 있다. 여기서, 블록은, 현재 블록을 의미할 수도 있고, 현재 블록의 공간적/시간적 주변 블록을 의미할 수도 있다. 상기 속성은, 크기, 형태, 위치, 분할 타입, 인터 모드, 잔차 계수에 관한 파라미터 등을 의미할 수 있다. 상기 인터 모드는, 복호화 장치에 기-정의된 모드로서, 머지 모드, 스킵 모드, AMVP 모드, 어파인 모델, 인트라/인터 조합 모드, 현재 픽쳐 참조 모드 등을 의미할 수 있다. 또는, n 값은 전술한 블록의 속성에 기초하여 복호화 장치에서 유도될 수도 있다.The information may be encoded and signaled by the encoding apparatus. Alternatively, all or part of the information may be derived from the decoding apparatus based on the attribute of the block. Here, the block may mean a current block or may mean a spatial / temporal neighboring block of the current block. The attribute may mean a size, a shape, a position, a split type, an inter mode, a parameter related to a residual coefficient, and the like. The inter mode is a mode predefined in the decoding apparatus and may mean a merge mode, a skip mode, an AMVP mode, an affine model, an intra / inter combination mode, a current picture reference mode, or the like. Alternatively, the n value may be derived from the decoding apparatus based on the attributes of the aforementioned block.

본 실시예에서, n개의 제어점 벡터는, 제1 제어점 벡터(cpMV[0]), 제2 제어점 벡터(cpMV[1]), 제3 제어점 벡터(cpMV[2]), ? 제n 제어점 벡터(cpMV[n-1])로 표현될 수 있다. 일예로, 제1 제어점 벡터(cpMV[0]), 제2 제어점 벡터(cpMV[1]), 제3 제어점 벡터(cpMV[2]) 및 제4 제어점 벡터(cpMV[3])는, 블록의 좌상단 샘플, 우상단 샘플, 좌하단 샘플 및 우하단 샘플의 위치에 각각 대응하는 벡터일 수 있다. 여기서, 공간적 후보는, 3개의 제어점 벡터를 가지는 것을 가정하며, 3개의 제어점 벡터는 제1 내지 제n 제어점 벡터 중에서 선택된 임의의 제어점 벡터일 수 있다. 다만, 이에 한정되지 아니하며, 공간적 후보는 2개의 제어점 벡터를 가질 수 있고, 2개의 제어점 벡터는 제1 내지 제n 제어점 벡터 중에서 선택된 임의의 제어점 벡터일 수 있다.In the present embodiment, the n control point vectors include a first control point vector (cpMV [0]), a second control point vector (cpMV [1]), a third control point vector (cpMV [2]),? It may be represented by the n th control point vector cpMV [n-1]. For example, the first control point vector cpMV [0], the second control point vector cpMV [1], the third control point vector cpMV [2] and the fourth control point vector cpMV [3] It may be a vector corresponding to the positions of the upper left sample, the upper right sample, the lower left sample and the lower right sample, respectively. Here, it is assumed that the spatial candidate has three control point vectors, and the three control point vectors may be any control point vectors selected from the first through n-th control point vectors. However, the present invention is not limited thereto, and the spatial candidate may have two control point vectors, and the two control point vectors may be any control point vectors selected from the first through n-th control point vectors.

한편, 도 5에 도시된 경계(520)가 CTU boundary인지 여부에 따라 공간적 후보의 제어점 벡터가 상이하게 유도될 수 있다.Meanwhile, the control point vector of the spatial candidate may be derived differently depending on whether the boundary 520 illustrated in FIG. 5 is a CTU boundary.

1. 현재 블록의 경계(520)가 CTU boundary에 접하지 않는 경우1. The boundary of the current block 520 does not touch the CTU boundary

상기 제1 제어점 벡터는, 공간적 주변 블록의 제1 제어점 벡터, 소정의 차분값, 현재 블록의 위치 정보 (xCb, yCb) 또는 공간적 주변 블록의 위치 정보 (xNb, yNb) 중 적어도 하나에 기초하여 유도될 수 있다. The first control point vector is derived based on at least one of a first control point vector of a spatial neighboring block, a predetermined difference value, position information (xCb, yCb) of the current block, or position information (xNb, yNb) of the spatial neighboring block. Can be.

상기 차분값의 개수는, 1개, 2개, 3개 또는 그 이상일 수 있다. 상기 차분값의 개수는, 전술한 블록의 속성을 고려하여 가변적으로 결정될 수도 있고, 복호화 장치에 기-약속된 고정된 값일 수도 있다. 상기 차분값은, 복수의 제어점 벡터 중 어느 하나와 다른 하나 간의 차분값으로 정의될 수 있다. 예를 들어, 상기 차분값은, 제2 제어점 벡터와 제1 제어점 벡터 간의 제1 차분값, 제3 제어점 벡터와 제1 제어점 벡터 간의 제2 차분값, 제4 제어점 벡터와 제3 제어점 벡터 간의 제3 차분값, 또는 제4 제어점 벡터와 제2 제어점 벡터 간의 제4 차분값 중 적어도 하나를 포함할 수 있다.The number of difference values may be one, two, three, or more. The number of difference values may be variably determined in consideration of the attributes of the above-described block, or may be a fixed value pre-committed to the decoding apparatus. The difference value may be defined as a difference value between any one of the plurality of control point vectors and the other one. For example, the difference value may include a first difference value between the second control point vector and the first control point vector, a second difference value between the third control point vector and the first control point vector, and a second difference between the fourth control point vector and the third control point vector. It may include at least one of a third difference value, or a fourth difference value between the fourth control point vector and the second control point vector.

예를 들어, 제1 제어점 벡터는 다음 수학식 1과 같이 유도될 수 있다.For example, the first control point vector may be derived as in Equation 1 below.

[수학식 1][Equation 1]

cpMvLX[ 0 ][ 0 ] = ( mvScaleHor + dHorX * ( xCb - xNb ) + dHorY * ( yCb - yNb ) )cpMvLX [0] [0] = (mvScaleHor + dHorX * (xCb-xNb) + dHorY * (yCb-yNb))

cpMvLX[ 0 ][ 1 ] = ( mvScaleVer + dVerX * ( xCb - xNb ) + dVerY * ( yCb - yNb ) )cpMvLX [0] [1] = (mvScaleVer + dVerX * (xCb-xNb) + dVerY * (yCb-yNb))

수학식 1에서, 변수 mvScaleHor와 mvScaleVer는 공간적 주변 블록의 제1 제어점 벡터를 의미할 수도 있고, 제1 제어점 벡터에 k만큼 쉬프트 연산을 적용하여 유도된 값을 의미할 수도 있다. 여기서, k는 1, 2, 3, 4, 5, 6, 7, 8, 9 또는 그 이상의 정수일 수 있다. 변수 dHorX와 dVerX는, 제2 제어점 벡터와 제1 제어점 벡터 간의 제1 차분값의 x 성분과 y 성분에 각각 대응된다. 변수 dHorY와 dVerY는, 제3 제어점 벡터와 제1 제어점 벡터 간의 제2 차분값의 x 성분과 y 성분에 각각 대응된다. 전술한 변수는, 다음 수학식 2와 같이 유도될 수 있다.In Equation 1, the variables mvScaleHor and mvScaleVer may mean a first control point vector of a spatial neighboring block or a value derived by applying a shift operation by k to the first control point vector. Here, k may be an integer of 1, 2, 3, 4, 5, 6, 7, 8, 9 or more. The variables dHorX and dVerX correspond to the x component and the y component of the first difference value between the second control point vector and the first control point vector, respectively. The variables dHorY and dVerY correspond to the x component and the y component of the second difference value between the third control point vector and the first control point vector, respectively. The aforementioned variable may be derived as in Equation 2 below.

[수학식 2][Equation 2]

mvScaleHor = CpMvLX[ xNb ][ yNb ][ 0 ][ 0 ] << 7 mvScaleHor = CpMvLX [xNb] [yNb] [0] [0] << 7

mvScaleVer = CpMvLX[ xNb ][ yNb ][ 0 ][ 1 ] << 7 mvScaleVer = CpMvLX [xNb] [yNb] [0] [1] << 7

dHorX = ( CpMvLX[ xNb + nNbW - 1 ][ yNb ][ 1 ][ 0 ] - CpMvLX[ xNb ][ yNb ][ 0 ][ 0 ] ) << ( 7 - log2NbW ) dHorX = (CpMvLX [xNb + nNbW-1] [yNb] [1] [0]-CpMvLX [xNb] [yNb] [0] [0]) << (7-log2NbW)

dVerX = ( CpMvLX[ xNb + nNbW - 1 ][ yNb ][ 1 ][ 1 ] - CpMvLX[ xNb ][ yNb ][ 0 ][ 1 ] ) << ( 7 - log2NbW )dVerX = (CpMvLX [xNb + nNbW-1] [yNb] [1] [1]-CpMvLX [xNb] [yNb] [0] [1]) << (7-log2NbW)

dHorY = ( CpMvLX[ xNb ][ yNb + nNbH - 1 ][ 2 ][ 0 ] - CpMvLX[ xNb ][ yNb ][ 2 ][ 0 ] ) << ( 7 - log2NbH )dHorY = (CpMvLX [xNb] [yNb + nNbH-1] [2] [0]-CpMvLX [xNb] [yNb] [2] [0]) << (7-log2NbH)

dVerY = ( CpMvLX[ xNb ][ yNb + nNbH - 1 ][ 2 ][ 1 ] - CpMvLX[ xNb ][ yNb ][ 2 ][ 1 ] ) << ( 7 - log2NbH )dVerY = (CpMvLX [xNb] [yNb + nNbH-1] [2] [1]-CpMvLX [xNb] [yNb] [2] [1]) << (7-log2NbH)

제2 제어점 벡터는, 공간적 주변 블록의 제1 제어점 벡터, 소정의 차분값, 현재 블록의 위치 정보 (xCb, yCb), 블록 크기(너비 또는 높이) 또는 공간적 주변 블록의 위치 정보 (xNb, yNb) 중 적어도 하나에 기초하여 유도될 수 있다. 여기서, 블록 크기는, 현재 블록 및/또는 공간적 주변 블록의 크기를 의미할 수 있다. 상기 차분값은, 제1 제어점 벡터에서 살펴본 바와 같은바, 여기서 자세한 설명은 생략하기로 한다. 다만, 제2 제어점 벡터의 유도 과정에서 이용되는 차분값의 범위 및/또는 개수는 제1 제어점 벡터와 상이할 수 있다.The second control point vector may be a first control point vector of a spatial neighboring block, a predetermined difference value, position information (xCb, yCb) of a current block, a block size (width or height), or positional information of a spatial neighboring block (xNb, yNb). It can be derived based on at least one of. Here, the block size may mean the size of the current block and / or spatial neighboring blocks. The difference value is as described in the first control point vector, and a detailed description thereof will be omitted. However, the range and / or number of difference values used in the derivation process of the second control point vector may be different from the first control point vector.

예를 들어, 제2 제어점 벡터는 다음 수학식 3과 같이 유도될 수 있다.For example, the second control point vector may be derived as in Equation 3 below.

[수학식 3][Equation 3]

cpMvLX[ 1 ][ 0 ] = ( mvScaleHor + dHorX * ( xCb + cbWidth - xNb ) + dHorY * ( yCb - yNb ) )cpMvLX [1] [0] = (mvScaleHor + dHorX * (xCb + cbWidth-xNb) + dHorY * (yCb-yNb))

cpMvLX[ 1 ][ 1 ] = ( mvScaleVer + dVerX * ( xCb + cbWidth - xNb ) + dVerY * ( yCb - yNb ) )cpMvLX [1] [1] = (mvScaleVer + dVerX * (xCb + cbWidth-xNb) + dVerY * (yCb-yNb))

수학식 3에서, 변수 mvScaleHor, mvScaleVer, dHorX, dVerX, dHorY, dVerY는, 수학식 1에서 살펴본 바와 같으며, 여기서 자세한 설명은 생략하기로 한다.In Equation 3, the variables mvScaleHor, mvScaleVer, dHorX, dVerX, dHorY, and dVerY are as described in Equation 1, and a detailed description thereof will be omitted.

제3 제어점 벡터는, 공간적 주변 블록의 제1 제어점 벡터, 소정의 차분값, 현재 블록의 위치 정보 (xCb, yCb), 블록 크기(너비 또는 높이) 또는 공간적 주변 블록의 위치 정보 (xNb, yNb) 중 적어도 하나에 기초하여 유도될 수 있다. 여기서, 블록 크기는, 현재 블록 및/또는 공간적 주변 블록의 크기를 의미할 수 있다. 상기 차분값은, 제1 제어점 벡터에서 살펴본 바와 같은바, 여기서 자세한 설명은 생략하기로 한다. 다만, 제3 제어점 벡터의 유도 과정에서 이용되는 차분값의 범위 및/또는 개수는 제1 제어점 벡터 또는 제2 제어점 벡터와 상이할 수 있다.The third control point vector may be a first control point vector of a spatial neighboring block, a predetermined difference value, position information (xCb, yCb) of the current block, a block size (width or height), or positional information (xNb, yNb) of the spatial neighboring block. It can be derived based on at least one of. Here, the block size may mean the size of the current block and / or spatial neighboring blocks. The difference value is as described in the first control point vector, and a detailed description thereof will be omitted. However, the range and / or number of difference values used in the derivation process of the third control point vector may be different from the first control point vector or the second control point vector.

예를 들어, 제3 제어점 벡터는 다음 수학식 4와 같이 유도될 수 있다.For example, the third control point vector may be derived as in Equation 4 below.

[수학식 4][Equation 4]

cpMvLX[ 2 ][ 0 ] = ( mvScaleHor + dHorX * ( xCb - xNb ) + dHorY * ( yCb + cbHeight - yNb ) ) cpMvLX [2] [0] = (mvScaleHor + dHorX * (xCb-xNb) + dHorY * (yCb + cbHeight-yNb))

cpMvLX[ 2 ][ 1 ] = ( mvScaleVer + dVerX * ( xCb - xNb ) + dVerY * ( yCb + cbHeight - yNb ) )cpMvLX [2] [1] = (mvScaleVer + dVerX * (xCb-xNb) + dVerY * (yCb + cbHeight-yNb))

수학식 4에서, 변수 mvScaleHor, mvScaleVer, dHorX, dVerX, dHorY, dVerY는, 수학식 1에서 살펴본 바와 같으며, 여기서 자세한 설명은 생략하기로 한다. 한편, 전술한 과정을 통해, 공간적 후보의 제n 제어점 벡터가 유도될 수 있다.In Equation 4, the variables mvScaleHor, mvScaleVer, dHorX, dVerX, dHorY, and dVerY are as described in Equation 1, and a detailed description thereof will be omitted. Meanwhile, the n th control point vector of the spatial candidate may be derived through the above-described process.

2. 현재 블록의 경계(520)가 CTU boundary에 접하는 경우2. The boundary of the current block 520 abuts the CTU boundary

상기 제1 제어점 벡터는, 공간적 주변 블록의 모션 벡터(MV), 소정의 차분값, 현재 블록의 위치 정보 (xCb, yCb) 또는 공간적 주변 블록의 위치 정보 (xNb, yNb) 중 적어도 하나에 기초하여 유도될 수 있다.The first control point vector is based on at least one of a motion vector (MV) of a spatial neighboring block, a predetermined difference value, position information (xCb, yCb) of the current block, or position information (xNb, yNb) of the spatial neighboring block. Can be derived.

상기 모션 벡터는, 공간적 주변 블록의 최하단에 위치한 서브 블록의 모션 벡터일 수 있다. 상기 서브 블록은, 공간적 주변 블록의 최하단에 위치한 복수의 서브 블록 중 최좌측, 중앙 또는 최우측에 위치한 것일 수 있다. 또는, 상기 모션 벡터는, 서브 블록의 모션 벡터의 평균값, 최대값 또는 최소값을 의미할 수도 있다.The motion vector may be a motion vector of a sub block located at the bottom of a spatial neighboring block. The sub block may be located at the leftmost, center, or rightmost side of the plurality of subblocks located at the bottom of the spatial neighboring block. Alternatively, the motion vector may mean an average value, a maximum value, or a minimum value of the motion vector of the subblock.

상기 차분값의 개수는, 1개, 2개, 3개 또는 그 이상일 수 있다. 상기 차분값의 개수는, 전술한 블록의 속성을 고려하여 가변적으로 결정될 수도 있고, 복호화 장치에 기-약속된 고정된 값일 수도 있다. 상기 차분값은, 공간적 주변 블록에서 서브 블록의 단위로 저장된 복수의 모션 벡터 중 어느 하나와 다른 하나 간의 차분값으로 정의될 수 있다. 예를 들어, 상기 차분값은, 공간적 주변 블록의 우하단 서브 블록의 모션 벡터와 좌하단 서브 블록의 모션 벡터 간의 차분값을 의미할 수 있다.The number of difference values may be one, two, three, or more. The number of difference values may be variably determined in consideration of the attributes of the above-described block, or may be a fixed value pre-committed to the decoding apparatus. The difference value may be defined as a difference value between any one of a plurality of motion vectors stored in units of sub-blocks in a spatial neighboring block and the other one. For example, the difference value may mean a difference value between a motion vector of a lower right subblock and a motion vector of a lower left subblock of a spatial neighboring block.

예를 들어, 제1 제어점 벡터는 다음 수학식 5와 같이 유도될 수 있다. For example, the first control point vector may be derived as in Equation 5 below.

[수학식 5][Equation 5]

cpMvLX[ 0 ][ 0 ] = ( mvScaleHor + dHorX * ( xCb - xNb ) + dHorY * ( yCb - yNb ) )cpMvLX [0] [0] = (mvScaleHor + dHorX * (xCb-xNb) + dHorY * (yCb-yNb))

cpMvLX[ 0 ][ 1 ] = ( mvScaleVer + dVerX * ( xCb - xNb ) + dVerY * ( yCb - yNb ) ) cpMvLX [0] [1] = (mvScaleVer + dVerX * (xCb-xNb) + dVerY * (yCb-yNb))

수학식 5에서, 변수 mvScaleHor와 mvScaleVer는 전술한 공간적 주변 블록의 모션 벡터(MV) 또는 상기 모션 벡터에 k만큼 쉬프트 연산을 적용하여 유도된 값을 의미할 수도 있다. 여기서, k는 1, 2, 3, 4, 5, 6, 7, 8, 9 또는 그 이상의 정수일 수 있다.In Equation 5, the variables mvScaleHor and mvScaleVer may mean values derived by applying a shift operation by k to the motion vector (MV) of the above-described spatial neighboring block or the motion vector. Here, k may be an integer of 1, 2, 3, 4, 5, 6, 7, 8, 9 or more.

상기 변수 dHorX와 dVerX는, 소정의 차분값의 x 성분과 y 성분에 각각 대응된다. 여기서, 차분값은, 공간적 주변 블록 내 우하단 서브 블록의 모션 벡터와 좌하단 서브 블록의 모션 벡터 간의 차분값을 의미한다. 변수 dHorY와 dVerY는, 상기 변수 dHorX와 dVerX에 기초하여 유도될 수 있다. 전술한 변수는, 다음 수학식 6과 같이 유도될 수 있다.The variables dHorX and dVerX correspond to the x component and the y component of the predetermined difference value, respectively. Here, the difference value means a difference value between the motion vector of the lower right subblock and the motion vector of the lower left subblock in the spatial neighboring block. Variables dHorY and dVerY may be derived based on the variables dHorX and dVerX. The aforementioned variable may be derived as in Equation 6 below.

[수학식 6][Equation 6]

mvScaleHor = MvLX[ xNb ][ yNb + nNbH - 1 ][ 0 ] << 7mvScaleHor = MvLX [xNb] [yNb + nNbH-1] [0] << 7

mvScaleVer = MvLX[ xNb ][ yNb + nNbH - 1 ][ 1 ] << 7mvScaleVer = MvLX [xNb] [yNb + nNbH-1] [1] << 7

dHorX = ( MvLX[ xNb + nNbW - 1 ][ yNb + nNbH - 1 ][ 0 ] - MvLX[ xNb ][ yNb + nNbH - 1 ][ 0 ] ) << ( 7 - log2NbW )dHorX = (MvLX [xNb + nNbW-1] [yNb + nNbH-1] [0]-MvLX [xNb] [yNb + nNbH-1] [0]) << (7-log2NbW)

dVerX = ( MvLX[ xNb + nNbW - 1 ][ yNb + nNbH - 1 ][ 1 ] - MvLX[ xNb ][ yNb + nNbH - 1 ][ 1 ] ) << ( 7 - log2NbW )dVerX = (MvLX [xNb + nNbW-1] [yNb + nNbH-1] [1]-MvLX [xNb] [yNb + nNbH-1] [1]) << (7-log2NbW)

dHorY = - dVerXdHorY =-dVerX

dVerY = dHorXdVerY = dHorX

제2 제어점 벡터는, 공간적 주변 블록의 모션 벡터(MV), 소정의 차분값, 현재 블록의 위치 정보 (xCb, yCb), 블록 크기(너비 또는 높이) 또는 공간적 주변 블록의 위치 정보 (xNb, yNb) 중 적어도 하나에 기초하여 유도될 수 있다. 여기서, 블록 크기는, 현재 블록 및/또는 공간적 주변 블록의 크기를 의미할 수 있다. 상기 모션 벡터와 차분값에 대해서는, 제1 제어점 벡터에서 살펴본 바와 같은바, 여기서 자세한 설명은 생략하기로 한다. 다만, 제2 제어점 벡터의 유도 과정에서 이용되는 모션 벡터의 위치, 차분값의 범위 및/또는 개수는 제1 제어점 벡터와 상이할 수 있다.The second control point vector may be a motion vector (MV) of a spatial neighboring block, a predetermined difference value, position information (xCb, yCb) of a current block, a block size (width or height), or positional information of a spatial neighboring block (xNb, yNb). May be derived based on at least one of Here, the block size may mean the size of the current block and / or spatial neighboring blocks. The motion vector and the difference value are as described in the first control point vector, and a detailed description thereof will be omitted. However, the position, range and / or number of motion vectors used in the derivation process of the second control point vector may be different from the first control point vector.

예를 들어, 제2 제어점 벡터는 다음 수학식 7과 같이 유도될 수 있다.For example, the second control point vector may be derived as in Equation 7 below.

[수학식 7][Equation 7]

cpMvLX[ 1 ][ 0 ] = ( mvScaleHor + dHorX * ( xCb + cbWidth - xNb ) + dHorY * ( yCb - yNb ) )cpMvLX [1] [0] = (mvScaleHor + dHorX * (xCb + cbWidth-xNb) + dHorY * (yCb-yNb))

cpMvLX[ 1 ][ 1 ] = ( mvScaleVer + dVerX * ( xCb + cbWidth - xNb ) + dVerY * ( yCb - yNb ) )cpMvLX [1] [1] = (mvScaleVer + dVerX * (xCb + cbWidth-xNb) + dVerY * (yCb-yNb))

수학식 7에서, 변수 mvScaleHor, mvScaleVer, dHorX, dVerX, dHorY, dVerY는, 수학식 5에서 살펴본 바와 같으며, 여기서 자세한 설명은 생략하기로 한다.In Equation 7, variables mvScaleHor, mvScaleVer, dHorX, dVerX, dHorY, and dVerY are as described in Equation 5, and a detailed description thereof will be omitted.

제3 제어점 벡터는, 공간적 주변 블록의 모션 벡터(MV), 소정의 차분값, 현재 블록의 위치 정보 (xCb, yCb), 블록 크기(너비 또는 높이) 또는 공간적 주변 블록의 위치 정보 (xNb, yNb) 중 적어도 하나에 기초하여 유도될 수 있다. 여기서, 블록 크기는, 현재 블록 및/또는 공간적 주변 블록의 크기를 의미할 수 있다. 상기 모션 벡터와 차분값은, 제1 제어점 벡터에서 살펴본 바와 같은바, 여기서 자세한 설명은 생략하기로 한다. 다만, 제3 제어점 벡터의 유도 과정에서 이용되는 모션 벡터의 위치, 차분값의 범위 및/또는 개수는 제1 제어점 벡터 또는 제2 제어점 벡터와 상이할 수 있다.The third control point vector may be a motion vector (MV) of a spatial neighboring block, a predetermined difference value, position information (xCb, yCb) of a current block, a block size (width or height), or positional information of a spatial neighboring block (xNb, yNb). May be derived based on at least one of Here, the block size may mean the size of the current block and / or spatial neighboring blocks. The motion vector and the difference value are as described in the first control point vector, and a detailed description thereof will be omitted. However, the position, range and / or number of motion vectors used in the derivation process of the third control point vector may be different from the first control point vector or the second control point vector.

예를 들어, 제3 제어점 벡터는 다음 수학식 8과 같이 유도될 수 있다.For example, the third control point vector may be derived as in Equation 8 below.

[수학식 8][Equation 8]

cpMvLX[ 2 ][ 0 ] = ( mvScaleHor + dHorX * ( xCb - xNb ) + dHorY * ( yCb + cbHeight - yNb ) )cpMvLX [2] [0] = (mvScaleHor + dHorX * (xCb-xNb) + dHorY * (yCb + cbHeight-yNb))

cpMvLX[ 2 ][ 1 ] = ( mvScaleVer + dVerX * ( xCb - xNb ) + dVerY * ( yCb + cbHeight - yNb ) )cpMvLX [2] [1] = (mvScaleVer + dVerX * (xCb-xNb) + dVerY * (yCb + cbHeight-yNb))

수학식 8에서, 변수 mvScaleHor, mvScaleVer, dHorX, dVerX, dHorY, dVerY는, 수학식 5에서 살펴본 바와 같으며, 여기서 자세한 설명은 생략하기로 한다. 한편, 전술한 과정을 통해, 공간적 후보의 제n 제어점 벡터가 유도될 수 있다.In Equation 8, the variables mvScaleHor, mvScaleVer, dHorX, dVerX, dHorY, and dVerY are as described in Equation 5, and a detailed description thereof will be omitted. Meanwhile, the n th control point vector of the spatial candidate may be derived through the above-described process.

전술한 어파인 후보의 유도 과정은, 기-정의된 공간적 주변 블록 각각에 대해서 수행될 수 있다. 기-정의된 공간적 주변 블록은, 현재 블록의 좌측 블록, 좌하단 블록, 우상단 블록, 상단 블록 또는 좌상단 블록 중 적어도 하나를 포함할 수 있다. The derivation process of the affine candidate described above may be performed for each of the pre-defined spatial peripheral blocks. The pre-defined spatial neighboring block may include at least one of a left block, a lower left block, a right upper block, an upper block, or an upper left block of the current block.

또는, 상기 어파인 후보의 유도 과정은, 상기 공간적 주변 블록의 그룹 별로 각각 수행될 수도 있다. 여기서, 공간적 주변 블록은, 좌측 블록 및 좌하단 블록을 포함한 제1 그룹과 우상단 블록, 상단 블록 및 좌상단 블록을 포함한 제2 그룹으로 분류될 수 있다.Alternatively, the process of deriving the affine candidate may be performed for each group of the spatial neighboring blocks. Here, the spatial neighboring blocks may be classified into a first group including a left block and a lower left block, and a second group including a right upper block, an upper block, and an upper left block.

예를 들어, 제1 그룹에 속한 공간적 주변 블록으로부터 하나의 어파인 후보가 유도될 수 있다. 상기 유도는, 소정의 우선 순위에 기초하여, 가용한 어파인 후보가 발견될 때까지 수행될 수 있다. 상기 우선 순위는, 좌측 블록 -> 좌하단 블록의 순서일 수도 있고, 그 역순일 수도 있다. For example, one affine candidate may be derived from a spatial neighboring block belonging to the first group. The derivation may be performed until an available affine candidate is found, based on a predetermined priority. The priority may be in the order of the left block-> lower left block, or the reverse order.

마찬가지로, 제2 그룹에 속한 공간적 주변 블록으로부터 하나의 어파인 후보가 유도될 수 있다. 상기 유도는, 소정의 우선 순위에 기초하여, 가용한 어파인 후보가 발견될 때까지 수행될 수 있다. 상기 우선 순위는, 우상단 블록 -> 상단 블록 -> 좌상단 블록의 순서일 수도 있고, 그 역순일 수도 있다.Similarly, one affine candidate can be derived from the spatial neighboring blocks belonging to the second group. The derivation may be performed until an available affine candidate is found, based on a predetermined priority. The priority may be in the order of upper right block-> upper block-> upper left block, or vice versa.

전술한 실시예는, 시간적 주변 블록에 대해서도 동일/유사하게 적용될 수 있다. 여기서, 시간적 주변 블록은, 현재 블록과 다른 픽쳐에 속하나, 현재 블록과 동일 위치의 블록일 수 있다. 동일 위치의 블록이라 함은, 현재 블록의 좌상단 샘플의 위치, 중앙 위치 또는 현재 블록의 우하단 샘플에 인접한 샘플의 위치를 포함하는 블록일 수 있다. The above-described embodiment may be applied to the same / similar to the temporal neighboring block. Here, the temporal neighboring block belongs to a picture different from the current block, but may be a block at the same position as the current block. The block of the same position may be a block including the position of the upper left sample of the current block, the center position, or the position of the sample adjacent to the lower right sample of the current block.

또는, 시간적 주변 블록은, 상기 동일 위치의 블록에서 소정의 변이 벡터만큼 쉬프트된 위치의 블록을 의미할 수 있다. 여기서, 변이 벡터는, 전술한 현재 블록의 공간적 주변 블록 중 어느 하나의 모션 벡터에 기초하여 결정될 수 있다. Alternatively, the temporal neighboring block may mean a block of a position shifted by a predetermined shift vector in the block of the same position. Here, the disparity vector may be determined based on the motion vector of any one of the spatial neighboring blocks of the current block described above.

도 6은 본 발명이 적용되는 일실시예로서, 공간적/시간적 주변 블록의 모션 벡터의 조합에 기초하여 구성된 후보를 유도하는 방법을 도시한 것이다.FIG. 6 illustrates a method of deriving a candidate constructed based on a combination of motion vectors of spatial and temporal neighboring blocks according to an embodiment to which the present invention is applied.

본 발명의 구성된 후보는, 현재 블록의 각 코너에 대응하는 제어점 벡터(이하, 제어점 벡터(cpMVCorner[n])라 함) 중 적어도 2개의 조합에 기초하여 유도될 수 있다. 여기서, n은 0, 1, 2, 3일 수 있다.The configured candidate of the present invention may be derived based on a combination of at least two of control point vectors (hereinafter referred to as control point vectors cpMVCorner [n]) corresponding to each corner of the current block. Here, n may be 0, 1, 2, 3.

상기 제어점 벡터는, 공간적 주변 블록 및/또는 시간적 주변 블록의 모션 벡터에 기초하여 유도될 수 있다. 여기서, 공간적 주변 블록은, 현재 블록의 좌상단 샘플에 인접한 제1 주변 블록(C, D 또는 E), 현재 블록의 우상단 샘플에 인접한 제2 주변 블록(F 또는 G) 또는 현재 블록의 좌하단 샘플에 인접한 제3 주변 블록(A 또는 B) 중 적어도 하나를 포함할 수 있다. 시간적 주변 블록은, 현재 블록과 다른 픽쳐에 속하는 블록으로서, 현재 블록의 우하단 샘플에 인접한 제4 주변 블록(Col)을 의미할 수 있다.The control point vector may be derived based on a motion vector of a spatial neighboring block and / or a temporal neighboring block. Here, the spatial neighboring block may include a first peripheral block (C, D or E) adjacent to the upper left sample of the current block, a second peripheral block (F or G) adjacent to the upper right sample of the current block, or a lower left sample of the current block. It may include at least one of the adjacent third peripheral block (A or B). The temporal neighboring block is a block belonging to a picture different from the current block and may mean a fourth neighboring block Col adjacent to a lower right sample of the current block.

제1 주변 블록은, 현재 블록의 좌상단(D), 상단(E) 또는 좌측(C)의 주변 블록을 의미할 수 있다. 소정의 우선 순위에 따라 주변 블록 C, D, E의 모션 벡터가 가용한지 여부를 판단하고, 가용한 주변 블록의 모션 벡터를 이용하여 제어점 벡터를 결정할 수 있다. 상기 가용성 판단은, 가용한 모션 벡터를 가진 주변 블록이 발견될 때까지 수행될 수 있다. 여기서, 우선 순위는, D -> E -> C의 순일 수도 있다. 다만, 이에 한정되지 아니하며, D -> C -> E, C -> D -> E, E -> D -> C의 순일 수도 있다. The first neighboring block may mean a neighboring block at the upper left end D, the upper end E, or the left C of the current block. The motion vector of the neighboring blocks C, D, and E may be determined according to a predetermined priority, and the control point vector may be determined using the motion vectors of the available neighboring blocks. The availability determination may be performed until a neighboring block with available motion vectors is found. Here, the priority may be in the order of D-> E-> C. However, the present invention is not limited thereto and may be in the order of D-> C-> E, C-> D-> E, E-> D-> C.

제2 주변 블록은, 현재 블록의 상단(F) 또는 우상단(G) 주변 블록을 의미할 수 있다. 마찬가지로, 소정의 우선 순위에 따라 주변 블록 F, G의 모션 벡터가 가용한지 여부를 판단하고, 가용한 주변 블록의 모션 벡터를 이용하여 제어점 벡터를 결정할 수 있다. 상기 가용성 판단은, 가용한 모션 벡터를 가진 주변 블록이 발견될 때까지 수행될 수 있다. 여기서, 우선 순위는, F -> G의 순일 수도 있고, G -> F의 순일 수도 있다. The second neighboring block may mean a block around the upper end F or the upper right end G of the current block. Similarly, it may be determined whether the motion vectors of the neighboring blocks F and G are available according to a predetermined priority, and the control point vector may be determined using the motion vectors of the available neighboring blocks. The availability determination may be performed until a neighboring block with available motion vectors is found. Here, the priority may be in the order of F-> G or in the order of G-> F.

제3 주변 블록은, 현재 블록의 좌측(B) 또는 좌하단(A)의 주변 블록을 의미할 수 있다. 마찬가지로, 소정의 우선 순위에 따라 주변 블록의 모션 벡터가 가용한지 여부를 판단하고, 가용한 주변 블록의 모션 벡터를 이용하여 제어점 벡터를 결정할 수 있다. 상기 가용성 판단은, 가용한 모션 벡터를 가진 주변 블록이 발견될 때까지 수행될 수 있다. 여기서, 우선 순위는, A -> B의 순일 수도 있고, B -> A의 순일 수도 있다.The third neighboring block may mean a neighboring block on the left side B or the lower left end A of the current block. Similarly, it may be determined whether the motion vector of the neighboring block is available according to a predetermined priority, and the control point vector may be determined using the motion vector of the available neighboring block. The availability determination may be performed until a neighboring block with available motion vectors is found. Here, the priority may be in the order of A-> B, or may be in the order of B-> A.

예를 들어, 제1 제어점 벡터(cpMVCorner[0])는 제1 주변 블록의 모션 벡터로 설정될 수 있고, 제2 제어점 벡터(cpMVCorner[1])는 제2 주변 블록의 모션 벡터로 설정될 수 있고, 제3 제어점 벡터(cpMVCorner[2])는 제3 주변 블록의 모션 벡터로 설정될 수 있다. 제4 제어점 벡터(cpMVCorner[3])는 제4 주변 블록의 모션 벡터로 설정될 수 있다. For example, the first control point vector cpMVCorner [0] may be set as the motion vector of the first neighboring block, and the second control point vector cpMVCorner [1] may be set as the motion vector of the second neighboring block. The third control point vector cpMVCorner [2] may be set as the motion vector of the third neighboring block. The fourth control point vector cpMVCorner [3] may be set as the motion vector of the fourth neighboring block.

또는, 상기 제1 내지 제4 제어점 벡터 중 어느 하나는 다른 하나에 기초하여 유도될 수 있다. 예를 들어, 제2 제어점 벡터는, 제1 제어점 벡터에 소정의 오프셋 벡터를 적용하여 유도될 수 있다. 오프셋 벡터는, 제3 제어점 벡터와 제1 제어점 벡터 간의 차분 벡터이거나 상기 차분 벡터에 소정의 스케일링 팩터를 적용하여 유도될 수 있다. 스케일링 팩터는, 현재 블록 및/또는 주변 블록의 너비 또는 높이 중 적어도 하나에 기초하여 결정될 수 있다. Alternatively, any one of the first to fourth control point vectors may be derived based on the other. For example, the second control point vector may be derived by applying a predetermined offset vector to the first control point vector. The offset vector may be a difference vector between the third control point vector and the first control point vector or derived by applying a predetermined scaling factor to the difference vector. The scaling factor may be determined based on at least one of the width or height of the current block and / or neighboring blocks.

전술한 제1 내지 제4 제어점 벡터 중 적어도 2개의 조합을 통해, 본 발명에 따른 K개의 구성된 후보(ConstK)가 결정될 수 있다. K 값은, 1, 2, 3, 4, 5, 6, 7 또는 그 이상의 정수일 수 있다. K 값은, 부호화 장치에서 시그날링되는 정보에 기초하여 유도될 수도 있고, 복호화 장치에 기-약속된 값일 수도 있다. 상기 정보는, 후보 리스트에 포함되는 구성된 후보의 최대 개수를 지시하는 정보를 포함할 수 있다. K combination candidates ConstK according to the present invention may be determined through a combination of at least two of the above-described first to fourth control point vectors. The K value may be an integer of 1, 2, 3, 4, 5, 6, 7 or more. The K value may be derived based on information signaled by the encoding apparatus, or may be a value pre-committed to the decoding apparatus. The information may include information indicating the maximum number of configured candidates included in the candidate list.

구체적으로, 제1 구성된 후보(Const1)는, 제1 내지 제3 제어점 벡터를 조합하여 유도될 수 있다. 예를 들어, 제1 구성된 후보(Const1)는 다음 표 1과 같은 제어점 벡터를 가질 수 있다. 한편, 제1 주변 블록의 참조 픽쳐 정보가 제2 및 제3 주변 블록의 참조 픽쳐 정보와 동일한 경우에 한하여, 표 1과 같이 제어점 벡터가 구성되도록 제한될 수도 있다. 여기서, 참조 픽쳐 정보는, 참조 픽쳐 리스트 내에서 해당 참조 픽쳐의 위치를 나타내는 참조 픽쳐 인덱스를 의미할 수도 있고, 출력 순서를 나타내는 POC(picture order count) 값을 의미할 수도 있다.In detail, the first configured candidate Const1 may be derived by combining the first to third control point vectors. For example, the first configured candidate Const1 may have a control point vector as shown in Table 1 below. Meanwhile, as long as the reference picture information of the first neighboring block is the same as the reference picture information of the second and third neighboring blocks, the control point vector may be limited as shown in Table 1 below. Here, the reference picture information may mean a reference picture index indicating the position of the reference picture in the reference picture list or a picture order count (POC) value indicating the output order.

IdxIdx 제어점 벡터Control point vector 00 cpMvCorner[ 0 ]cpMvCorner [0] 1One cpMvCorner[ 1 ]cpMvCorner [1] 22 cpMvCorner[ 2 ]cpMvCorner [2]

제2 구성된 후보(Const2)는, 제1, 제2 및 제4 제어점 벡터를 조합하여 유도될 수 있다. 예를 들어, 제2 구성된 후보(Const2)는 다음 표 2와 같은 제어점 벡터를 가질 수 있다. 한편, 제1 주변 블록의 참조 픽쳐 정보가 제2 및 제4 주변 블록의 참조 픽쳐 정보와 동일한 경우에 한하여, 표 2와 같이 제어점 벡터가 구성되도록 제한될 수도 있다. 여기서, 참조 픽쳐 정보는 전술한 바와 같다. The second configured candidate Const2 may be derived by combining the first, second and fourth control point vectors. For example, the second configured candidate Const2 may have a control point vector as shown in Table 2 below. Meanwhile, as long as the reference picture information of the first neighboring block is the same as the reference picture information of the second and fourth neighboring blocks, the control point vector may be limited as shown in Table 2. Here, the reference picture information is as described above.

IdxIdx 제어점 벡터Control point vector 00 cpMvCorner[ 0 ]cpMvCorner [0] 1One cpMvCorner[ 1 ]cpMvCorner [1] 22 cpMvCorner[ 3 ] + cpMvCorner[ 1 ] - cpMvCorner[ 0 ]cpMvCorner [3] + cpMvCorner [1]-cpMvCorner [0]

제3 구성된 후보(Const3)는, 제1, 제3 및 제4 제어점 벡터를 조합하여 유도될 수 있다. 예를 들어, 제3 구성된 후보(Const3)는 다음 표 3과 같은 제어점 벡터를 가질 수 있다. 한편, 제1 주변 블록의 참조 픽쳐 정보가 제3 및 제4 주변 블록의 참조 픽쳐 정보와 동일한 경우에 한하여, 표 2와 같이 제어점 벡터가 구성되도록 제한될 수도 있다. 여기서, 참조 픽쳐 정보는 전술한 바와 같다.The third configured candidate Const3 may be derived by combining the first, third and fourth control point vectors. For example, the third configured candidate Const3 may have a control point vector as shown in Table 3 below. Meanwhile, as long as the reference picture information of the first neighboring block is the same as the reference picture information of the third and fourth neighboring blocks, the control point vector may be limited as shown in Table 2. Here, the reference picture information is as described above.

IdxIdx 제어점 벡터Control point vector 00 cpMvCorner[ 0 ]cpMvCorner [0] 1One cpMvCorner[ 3 ] + cpMvCorner[ 0 ] - cpMvCorner[ 2 ]cpMvCorner [3] + cpMvCorner [0]-cpMvCorner [2] 22 cpMvCorner[ 2 ]cpMvCorner [2]

제4 구성된 후보(Const4)는, 제2, 제3 및 제4 제어점 벡터를 조합하여 유도될 수 있다. 예를 들어, 제4 구성된 후보(Const4)는 다음 표 4와 같은 제어점 벡터를 가질 수 있다. 한편, 제2 주변 블록의 참조 픽쳐 정보가 제3 및 제4 주변 블록의 참조 픽쳐 정보와 동일한 경우에 한하여, 표 4와 같이 구성되도록 제한될 수도 있다. 여기서, 참조 픽쳐 정보는 전술한 바와 같다. The fourth configured candidate Const4 may be derived by combining the second, third, and fourth control point vectors. For example, the fourth configured candidate Const4 may have a control point vector as shown in Table 4 below. Meanwhile, as long as the reference picture information of the second neighboring block is the same as the reference picture information of the third and fourth neighboring blocks, it may be limited to be configured as shown in Table 4 below. Here, the reference picture information is as described above.

IdxIdx 제어점 벡터Control point vector 00 cpMvCorner[ 1 ] + cpMvCorner[ 2 ] - cpMvCorner[ 3 ]cpMvCorner [1] + cpMvCorner [2]-cpMvCorner [3] 1One cpMvCorner[ 1 ]cpMvCorner [1] 22 cpMvCorner[ 2 ]cpMvCorner [2]

제5 구성된 후보(Const5)는, 제1 및 제2 제어점 벡터를 조합하여 유도될 수 있다. 예를 들어, 제5 구성된 후보(Const5)는 다음 표 5와 같은 제어점 벡터를 가질 수 있다. 한편, 제1 주변 블록의 참조 픽쳐 정보가 제2 주변 블록의 참조 픽쳐 정보와 동일한 경우에 한하여, 표 5와 같이 제어점 벡터가 구성되도록 제한될 수도 있다. 여기서, 참조 픽쳐 정보는 전술한 바와 같다.The fifth configured candidate Const5 may be derived by combining the first and second control point vectors. For example, the fifth configured candidate Const5 may have a control point vector as shown in Table 5 below. Meanwhile, as long as the reference picture information of the first neighboring block is the same as the reference picture information of the second neighboring block, the control point vector may be limited as shown in Table 5 below. Here, the reference picture information is as described above.

IdxIdx 제어점 벡터Control point vector 1One cpMvCorner[ 0 ]cpMvCorner [0] 22 cpMvCorner[ 1 ]cpMvCorner [1]

제6 구성된 후보(Const6)는, 제1 및 제3 제어점 벡터를 조합하여 유도될 수 있다. 예를 들어, 제6 구성된 후보(Const6)는 다음 표 6과 같은 제어점 벡터를 가질 수 있다. 한편, 제1 주변 블록의 참조 픽쳐 정보가 제3 주변 블록의 참조 픽쳐 정보와 동일한 경우에 한하여, 표 6와 같이 제어점 벡터가 구성되도록 제한될 수도 있다. 여기서, 참조 픽쳐 정보는 전술한 바와 같다.The sixth configured candidate Const6 may be derived by combining the first and third control point vectors. For example, the sixth configured candidate Const6 may have a control point vector as shown in Table 6 below. Meanwhile, as long as the reference picture information of the first neighboring block is the same as the reference picture information of the third neighboring block, the control point vector may be limited as shown in Table 6. Here, the reference picture information is as described above.

IdxIdx 제어점 벡터Control point vector 1One cpMvCorner[ 0 ]cpMvCorner [0] 22 cpMvCorner[ 1 ]cpMvCorner [1]

표 6에서, cpMvCorner[ 1 ]는, 상기 제1 및 제3 제어점 벡터를 기반으로 유도된 제2 제어점 벡터일 수 있다. 제2 제어점 벡터는, 제1 제어점 벡터, 소정의 차분값 또는 현재/주변 블록의 크기 중 적어도 하나에 기초하여 유도될 수 있다. 예를 들어, 제2 제어점 벡터는, 다음 수학식 9와 같이 유도될 수 있다.In Table 6, cpMvCorner [1] may be a second control point vector derived based on the first and third control point vectors. The second control point vector may be derived based on at least one of the first control point vector, a predetermined difference value, or the size of the current / peripheral block. For example, the second control point vector may be derived as in Equation 9 below.

[수학식 9][Equation 9]

cpMvCorner[ 1 ][ 0 ] = ( cpMvCorner[ 0 ][ 0 ] << 7 ) + ( ( cpMvCorner[ 2 ][ 1 ] - cpMvCorner[ 0 ][ 1 ] ) << ( 7 + Log2( cbHeight / cbWidth ) ) ) cpMvCorner [1] [0] = (cpMvCorner [0] [0] << 7) + ((cpMvCorner [2] [1]-cpMvCorner [0] [1]) << (7 + Log2 (cbHeight / cbWidth) ))

cpMvCorner[ 1 ][ 1 ] = ( cpMvCorner[ 0 ][ 1 ] << 7 ) + ( ( cpMvCorner[ 2 ][ 0 ] - cpMvCorner[ 0 ][ 0 ] ) << ( 7 + Log2( cbHeight / cbWidth ) ) ) cpMvCorner [1] [1] = (cpMvCorner [0] [1] << 7) + ((cpMvCorner [2] [0]-cpMvCorner [0] [0]) << (7 + Log2 (cbHeight / cbWidth)))

전술한 제1 내지 제6 구성된 후보 모두 상기 후보 리스트에 포함될 수도 있고, 일부만이 후보 리스트에 포함될 수도 있다. All of the above-described first to sixth configured candidates may be included in the candidate list, and only some of them may be included in the candidate list.

본 발명에 따른 방법들은 다양한 컴퓨터 수단을 통해 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능 매체에 기록되는 프로그램 명령은 본 발명을 위해 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다.The methods according to the invention can be implemented in the form of program instructions that can be executed by various computer means and recorded on a computer readable medium. Computer-readable media may include, alone or in combination with the program instructions, data files, data structures, and the like. The program instructions recorded on the computer readable medium may be those specially designed and constructed for the present invention, or may be known and available to those skilled in computer software.

컴퓨터 판독 가능 매체의 예에는 롬(ROM), 램(RAM), 플래시 메모리(flash memory) 등과 같이 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함될 수 있다. 프로그램 명령의 예에는 컴파일러(compiler)에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터(interpreter) 등을 사용해서 컴퓨터에 의해 실행될 수 있는 고급 언어 코드를 포함할 수 있다. 상술한 하드웨어 장치는 본 발명의 동작을 수행하기 위해 적어도 하나의 소프트웨어 모듈로 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.Examples of computer readable media may include hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions may include high-level language code that can be executed by a computer using an interpreter, as well as machine code such as produced by a compiler. The hardware device described above may be configured to operate with at least one software module to perform the operations of the present invention, and vice versa.

또한, 상술한 방법 또는 장치는 그 구성이나 기능의 전부 또는 일부가 결합되어 구현되거나, 분리되어 구현될 수 있다. In addition, the above-described method or apparatus may be implemented by combining all or part of the configuration or function, or may be implemented separately.

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although described above with reference to a preferred embodiment of the present invention, those skilled in the art will be variously modified and changed within the scope of the invention without departing from the spirit and scope of the invention described in the claims below I can understand that you can.

Claims (5)

현재 블록의 모션 정보 예측을 위한 후보 리스트를 생성하는 단계; 여기서, 상기 후보 리스트는, 복수의 어파인 후보를 포함함,
상기 후보 리스트와 후보 인덱스에 기반하여, 상기 현재 블록의 제어점 벡터를 유도하는 단계;
상기 현재 블록의 제어점 벡터를 기반으로, 상기 현재 블록의 모션 벡터를 유도하는 단계; 및
상기 모션 벡터를 이용하여, 상기 현재 블록에 대해 인터 예측을 수행하는 단계를 포함하는, 영상 복호화 방법.
Generating a candidate list for motion information prediction of the current block; Here, the candidate list includes a plurality of affine candidates,
Deriving a control point vector of the current block based on the candidate list and a candidate index;
Deriving a motion vector of the current block based on the control point vector of the current block; And
And performing inter prediction on the current block by using the motion vector.
제1항에 있어서,
상기 어파인 후보는, 공간적 후보, 시간적 후보 또는 구성된 후보 중 적어도 하나를 포함하는, 영상 복호화 방법.
The method of claim 1,
Wherein the affine candidate comprises at least one of a spatial candidate, a temporal candidate, or a configured candidate.
제1항에 있어서,
상기 현재 블록의 모션 벡터는, 상기 현재 블록의 서브 블록의 단위로 유도되는, 영상 복호화 방법.
The method of claim 1,
The motion vector of the current block is derived in units of sub-blocks of the current block.
제2항에 있어서,
상기 공간적 후보는, 상기 현재 블록의 경계가 코딩 트리 블록의 경계(CTU boundary)에 접하는지 여부를 고려하여 결정되는, 영상 복호화 방법.
The method of claim 2,
The spatial candidate is determined in consideration of whether a boundary of the current block is in contact with a boundary of a coding tree block (CTU boundary).
제2항에 있어서,
상기 구성된 후보는, 상기 현재 블록의 각 코너에 대응하는 제어점 벡터 중 적어도 2개의 조합에 기초하여 결정되는, 영상 복호화 방법.
The method of claim 2,
The configured candidate is determined based on a combination of at least two of control point vectors corresponding to each corner of the current block.
KR1020190033763A 2018-03-27 2019-03-25 Method and apparatus for image encoding/decoding KR20190113611A (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR1020180034882 2018-03-27
KR20180034882 2018-03-27
KR20180085679 2018-07-24
KR1020180085679 2018-07-24

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020200167255A Division KR20200138137A (en) 2018-03-27 2020-12-03 Method and apparatus for image encoding/decoding

Publications (1)

Publication Number Publication Date
KR20190113611A true KR20190113611A (en) 2019-10-08

Family

ID=68209010

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1020190033763A KR20190113611A (en) 2018-03-27 2019-03-25 Method and apparatus for image encoding/decoding
KR1020200167255A KR20200138137A (en) 2018-03-27 2020-12-03 Method and apparatus for image encoding/decoding

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020200167255A KR20200138137A (en) 2018-03-27 2020-12-03 Method and apparatus for image encoding/decoding

Country Status (1)

Country Link
KR (2) KR20190113611A (en)

Also Published As

Publication number Publication date
KR20200138137A (en) 2020-12-09

Similar Documents

Publication Publication Date Title
JP7152503B2 (en) Video encoding/decoding method and apparatus
KR102028015B1 (en) Method for encoding/decoing video using intra prediction and apparatus for the same
US20210203978A1 (en) Merge mode-based inter-prediction method and apparatus
WO2013042888A2 (en) Method for inducing a merge candidate block and device using same
KR20190116101A (en) Method and apparatus for image encoding/decoding based on affine model
JP7447097B2 (en) Image encoding/decoding method and device
AU2019241823B2 (en) Image encoding/decoding method and device
KR20210016054A (en) Video encoding/decoding method and apparatus
KR20190110065A (en) Image decoding method/apparatus, image encoding method/apparatus and recording medium for storing bitstream
KR20190094468A (en) Intra prediction encoding / decoding method for chrominance components
JP2024063178A (en) Image encoding/decoding method and apparatus
KR20240036533A (en) Image encoding/decoding method and apparatus for performing intra prediction using a plurality of prediction mode candidates
KR102476230B1 (en) Image encoding/decoding method and image decoding apparatus using motion vector precision
KR20190113611A (en) Method and apparatus for image encoding/decoding
RU2790325C2 (en) Method and device for inter-frame prediction based on the fusion mode
KR20210000691A (en) Video encoding and decoding method, apparatus using same
CN116684578A (en) Affine model optimization based on control point motion vectors
KR20190112249A (en) Method and apparatus for image encoding/decoding

Legal Events

Date Code Title Description
A201 Request for examination
A302 Request for accelerated examination
E902 Notification of reason for refusal
E601 Decision to refuse application
E601 Decision to refuse application
E801 Decision on dismissal of amendment
A107 Divisional application of patent