KR102585179B1 - Image encoding/decoding method and apparatus using efficient motion information prediction - Google Patents

Image encoding/decoding method and apparatus using efficient motion information prediction Download PDF

Info

Publication number
KR102585179B1
KR102585179B1 KR1020210181599A KR20210181599A KR102585179B1 KR 102585179 B1 KR102585179 B1 KR 102585179B1 KR 1020210181599 A KR1020210181599 A KR 1020210181599A KR 20210181599 A KR20210181599 A KR 20210181599A KR 102585179 B1 KR102585179 B1 KR 102585179B1
Authority
KR
South Korea
Prior art keywords
motion information
candidate
block
buffer
prediction
Prior art date
Application number
KR1020210181599A
Other languages
Korean (ko)
Other versions
KR20210157385A (en
Inventor
문주희
원동재
하재민
Original Assignee
세종대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020200001228A external-priority patent/KR102342157B1/en
Application filed by 세종대학교산학협력단 filed Critical 세종대학교산학협력단
Publication of KR20210157385A publication Critical patent/KR20210157385A/en
Priority to KR1020230129395A priority Critical patent/KR20230145277A/en
Application granted granted Critical
Publication of KR102585179B1 publication Critical patent/KR102585179B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/109Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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

Landscapes

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

Abstract

본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 블록의 후보 리스트를 생성하고, 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여 현재 블록의 인터 예측을 수행할 수 있다. 여기서, 복수의 후보는, 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고, 복원정보기반 후보는 현재 블록 이전에 복호화된 움직임정보를 저장하는 버퍼로부터 추가될 수 있다.The video encoding/decoding method and device according to the present invention can generate a candidate list for the current block and perform inter prediction of the current block using one of a plurality of candidates included in the candidate list. Here, the plurality of candidates includes at least one of a spatial candidate, a temporal candidate, or a restored information-based candidate, and the restored information-based candidate may be added from a buffer that stores motion information decoded before the current block.

Description

효율적인 움직임 정보 예측을 이용한 영상 부호화/복호화 방법과 장치{IMAGE ENCODING/DECODING METHOD AND APPARATUS USING EFFICIENT MOTION INFORMATION PREDICTION} Image encoding/decoding method and device using efficient motion information prediction {IMAGE ENCODING/DECODING METHOD AND APPARATUS USING EFFICIENT MOTION INFORMATION PREDICTION}

본 발명은 영상 부호화/복호화 방법 및 장치에 관한 것으로, 보다 상세하게는 현재 블록의 예측 블록 생성 시, 복원된 복수의 움직임정보들 중 현재 블록의 최적 움직임정보를 결정하기 위한 예측기에 해당하는 움직임정보를 효율적으로 결정하는 방법 및 장치에 관한 것이다.The present invention relates to an image encoding/decoding method and device, and more specifically, to motion information corresponding to a predictor for determining optimal motion information of the current block among a plurality of restored motion information when generating a prediction block of the current block. It relates to a method and device for efficiently determining .

최근, 인터넷에서는 동영상과 같은 멀티미디어 데이터의 수요가 급격히 증가하고 있다. 하지만 채널(Channel)의 대역폭(Bandwidth)이 발전하는 속도는 급격히 증가하고 있는 멀티미디어 데이터의 양을 따라가기 힘든 상황이다. 이에 따라, 국제 표준화 기구인 ITU-T의 VCEG(Video Coding Expert Group)과 ISO/IEC의 MPEG(Moving Picture Expert Group)은 2014년 2월, 동영상 압축 표준인 HEVC(High Efficiency Video Coding) 버전1을 제정하였다.Recently, demand for multimedia data such as video is rapidly increasing on the Internet. However, the speed at which channel bandwidth develops is difficult to keep up with the rapidly increasing amount of multimedia data. Accordingly, the international standardization organization ITU-T's VCEG (Video Coding Expert Group) and ISO/IEC's MPEG (Moving Picture Expert Group) announced version 1 of HEVC (High Efficiency Video Coding), a video compression standard, in February 2014. It was enacted.

HEVC에서는 화면 내 예측(또는 인트라 예측), 화면 간 예측(또는 인터 예측), 변환, 양자화, 엔트로피 부호화 및 인-루프 필터 등의 기술을 정의하고 있다.HEVC defines technologies such as intra-screen prediction (or intra-prediction), inter-screen prediction (or inter-prediction), transformation, quantization, entropy coding, and in-loop filter.

본 발명은 MERGE/AMVP 후보 리스트를 생성할 때 이용되는 움직임정보들을 효율적으로 유도하여 예측 효율을 향상시킬 수 있는 방법을 제안하고자 한다.The present invention seeks to propose a method to improve prediction efficiency by efficiently deriving motion information used when generating a MERGE/AMVP candidate list.

본 발명에 따른 영상 부호화/복호화 방법 및 장치는, 현재 블록의 후보 리스트를 생성하고, 상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행할 수 있다.The video encoding/decoding method and device according to the present invention can generate a candidate list of the current block and perform inter prediction of the current block using any one of a plurality of candidates belonging to the candidate list.

본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 복수의 후보는 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고, 복원정보기반 후보는 상기 현재 블록 이전에 복호화된 움직임정보를 저장하는 버퍼로부터 추가될 수 있다.In the video encoding/decoding method and device according to the present invention, the plurality of candidates include at least one of a spatial candidate, a temporal candidate, or a restored information-based candidate, and the restored information-based candidate is motion information decoded before the current block. Can be added from a buffer that stores .

본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 버퍼에 저장된 움직임정보는, 상기 버퍼에 나중에 저장된 움직임정보 순으로 상기 후보 리스트에 추가되거나, 상기 버퍼에 먼저 저장된 움직임정보 순으로 상기 후보 리스트에 추가될 수 있다.In the video encoding/decoding method and device according to the present invention, the motion information stored in the buffer is added to the candidate list in the order of motion information stored in the buffer later, or added to the candidate list in the order of motion information stored in the buffer first. can be added to

본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 버퍼에 저장된 움직임정보가 상기 후보 리스트에 추가되는 순서 또는 개수는, 상기 현재 블록의 화면 간 예측 모드에 따라 상이하게 결정될 수 있다.In the video encoding/decoding method and device according to the present invention, the order or number in which motion information stored in the buffer is added to the candidate list may be determined differently depending on the inter-screen prediction mode of the current block.

본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워질 수 있다.In the video encoding/decoding method and device according to the present invention, the candidate list is filled using the motion information stored in the buffer until the maximum number of candidates in the candidate list is reached, or 1 is added to the maximum number of candidates. It can be filled using the motion information stored in the buffer until the subtracted number is reached.

본 발명에 따른 영상 부호화/복호화 방법 및 장치에 있어서, 상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화될 수 있다.In the video encoding/decoding method and device according to the present invention, the buffer may be initialized in any one of a coding tree unit (CTU), a CTU row, a slice, or a picture.

본 발명에 따른 컴퓨터로 판독가능한 기록 매체는, 영상 복호화 방법에 의해 복호화되는 비트스트림을 저장할 수 있다.The computer-readable recording medium according to the present invention can store a bitstream decoded by an image decoding method.

본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있이서, 상기 영상 복호화 방법은, 현재 블록의 후보 리스트를 생성하는 단계 및 상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함할 수 있다.In the computer-readable recording medium according to the present invention, the video decoding method includes generating a candidate list of the current block and using one of a plurality of candidates belonging to the candidate list, It may include the step of performing prediction.

본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 복수의 후보는, 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고, 복원정보기반 후보는, 상기 현재 블록 이전에 복호화된 움직임정보를 저장하는 버퍼로부터 추가될 수 있다.In the computer-readable recording medium according to the present invention, the plurality of candidates include at least one of a spatial candidate, a temporal candidate, and a restoration information-based candidate, and the restoration information-based candidate includes a motion decoded before the current block. It can be added from a buffer that stores information.

본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 버퍼에 저장된 움직임정보는, 상기 버퍼에 나중에 저장된 움직임정보 순으로 상기 후보 리스트에 추가되거나, 상기 버퍼에 먼저 저장된 움직임정보 순으로 상기 후보 리스트에 추가될 수 있다.In the computer-readable recording medium according to the present invention, the motion information stored in the buffer is added to the candidate list in the order of motion information stored in the buffer later, or added to the candidate list in the order of motion information stored in the buffer first. can be added

본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 버퍼에 저장된 움직임정보가 상기 후보 리스트에 추가되는 순서 또는 개수는, 상기 현재 블록의 화면 간 예측 모드에 따라 상이하게 결정될 수 있다.In the computer-readable recording medium according to the present invention, the order or number in which motion information stored in the buffer is added to the candidate list may be determined differently depending on the inter-screen prediction mode of the current block.

본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임정보를 이용하여 채워질 수 있다.In the computer-readable recording medium according to the present invention, the candidate list is filled using the motion information stored in the buffer until the maximum number of candidates in the candidate list is reached, or 1 is subtracted from the maximum number of candidates. It can be filled using the motion information stored in the buffer until the number is reached.

본 발명에 따른 컴퓨터로 판독가능한 기록 매체에 있어서, 상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화될 수 있다.In the computer-readable recording medium according to the present invention, the buffer may be initialized in any one of a coding tree unit (CTU), a CTU row, a slice, or a picture.

본 발명에 따르면, MERGE/AMVP 후보 리스트를 생성할 때 이용되는 움직임정보들을 효율적으로 유도하여 예측 효율을 향상시킬 수 있다.According to the present invention, prediction efficiency can be improved by efficiently deriving motion information used when generating a MERGE/AMVP candidate list.

도 1은 영상 부호화 장치를 간략하게 나타낸 흐름도이다.
도 2는 영상 부호화 장치의 예측부를 상세히 설명하기 위한 도면이다.
도 3은 SKIP, MERGE 모드의 후보 움직임정보를 유도하는 방법을 설명하기 위한 도면이다.
도 4는 AMVP 모드의 후보 움직임정보를 유도하는 방법을 나타낸 흐름도이다.
도 5는 예측 정보를 부호화하는 방법을 나타낸 흐름도이다.
도 6은 영상 복호화 장치를 간략하게 나타낸 흐름도이다.
도 7은 영상 복호화 장치의 예측부를 설명하기 위한 도면이다.
도 8은 예측 정보를 복호화하는 방법을 나타낸 흐름도이다.
도 9는 본 실시예에 따른 MERGE/AMVP 후보 리스트를 구성하는 방법을 설명하기 위한 흐름도이다.
도 10은 본 실시예에 따른 시간적 후보 움직임정보를 유도하는 방법을 설명하기 위한 도면이다.
도 11은 본 실시예에 따른 시간적 후보 움직임정보를 유도할 때, 타깃 픽쳐에서 타깃 블록을 결정하는 제1 방법을 설명하기 위한 도면이다.
도 12는 본 실시예에 따른 시간적 후보 움직임정보를 유도할 때, 타깃 픽쳐에서 타깃 블록을 결정하는 제2 방법을 설명하기 위한 도면이다.
도 13은 본 실시예에 따른 시간적 후보 움직임정보를 유도할 때, 타깃 픽쳐에서 타깃 블록을 결정하는 제3 방법을 설명하기 위한 도면이다.
도 14는 본 실시예에 따른 History-based 후보 움직임정보를 유도하는 제1 방법을 설명하기 위한 도면이다.
도 15는 본 실시예에 따른 History-based 후보 움직임정보를 유도하는 제2 방법을 설명하기 위한 도면이다.
도 16은 본 실시예에 따른 평균 후보 움직임정보를 유도하는 제1 방법을 설명하기 위한 도면이다.
도 17은 본 실시예에 따른 평균 후보 움직임정보를 유도하는 제2 방법을 설명하기 위한 도면이다.
1 is a flowchart briefly showing a video encoding device.
Figure 2 is a diagram for explaining in detail the prediction unit of the video encoding device.
Figure 3 is a diagram for explaining a method of deriving candidate motion information for SKIP and MERGE modes.
Figure 4 is a flowchart showing a method of deriving candidate motion information for AMVP mode.
Figure 5 is a flowchart showing a method of encoding prediction information.
Figure 6 is a flowchart briefly showing the video decoding device.
Figure 7 is a diagram for explaining a prediction unit of a video decoding device.
Figure 8 is a flowchart showing a method of decoding prediction information.
Figure 9 is a flowchart explaining a method of configuring a MERGE/AMVP candidate list according to this embodiment.
Figure 10 is a diagram for explaining a method of deriving temporal candidate motion information according to this embodiment.
FIG. 11 is a diagram for explaining a first method of determining a target block in a target picture when deriving temporal candidate motion information according to this embodiment.
FIG. 12 is a diagram for explaining a second method of determining a target block in a target picture when deriving temporal candidate motion information according to this embodiment.
FIG. 13 is a diagram for explaining a third method of determining a target block in a target picture when deriving temporal candidate motion information according to this embodiment.
Figure 14 is a diagram for explaining a first method of deriving history-based candidate motion information according to this embodiment.
Figure 15 is a diagram for explaining a second method of deriving history-based candidate motion information according to this embodiment.
Figure 16 is a diagram for explaining a first method of deriving average candidate motion information according to this embodiment.
Figure 17 is a diagram for explaining a second method of deriving average candidate motion information according to this embodiment.

본 명세서에 첨부된 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.With reference to the drawings attached to this specification, embodiments of the present invention will be described in detail so that those skilled in the art can easily practice it. However, the present invention may be implemented in many different forms and is not limited to the embodiments described herein. In order to clearly explain the present invention in the drawings, parts that are not related to the description are omitted, and similar parts are given similar reference numerals throughout the specification.

본 명세서 전체에서, 어떤 부분이 다른 부분과 '연결'되어 있다고 할 때, 이는 직접적으로 연결되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 전기적으로 연결되어 있는 경우도 포함한다.Throughout this specification, when a part is said to be 'connected' to another part, this includes not only the case where it is directly connected, but also the case where it is electrically connected with another element in between.

또한, 본 명세서 전체에서 어떤 부분이 어떤 구성요소를 '포함'한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것을 의미한다.In addition, throughout the specification, when a part 'includes' a certain element, this means that it may further include other elements, rather than excluding other elements, unless specifically stated to the contrary.

또한, 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Additionally, terms such as first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another.

또한, 본 명세서에서 설명되는 장치 및 방법에 관한 실시예에 있어서, 장치의 구성 일부 또는 방법의 단계 일부는 생략될 수 있다. 또한 장치의 구성 일부 또는 방법의 단계 일부의 순서가 변경될 수 있다. 또한 장치의 구성 일부 또는 방법의 단계 일부에 다른 구성 또는 다른 단계가 삽입될 수 있다.Additionally, in the embodiments of the device and method described in this specification, some of the components of the device or some of the steps of the method may be omitted. Additionally, the order of some of the components of the device or some of the steps of the method may be changed. Additionally, other components or steps may be inserted into some of the components of the device or steps of the method.

또한, 본 발명의 제1 실시예의 일부 구성 또는 일부 단계는 본 발명의 제2 실시예에 부가되거나, 제2 실시예의 일부 구성 또는 일부 단계를 대체할 수 있다.Additionally, some components or some steps of the first embodiment of the present invention may be added to the second embodiment of the present invention, or some components or some steps of the second embodiment may be replaced.

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

본 명세서에서, 블록은 단위, 영역, 유닛, 파티션 등으로 다양하게 표현될 수 있고, 샘플은 화소, 펠(pel), 픽셀 등으로 다양하게 표현될 수 있다.In this specification, a block may be expressed in various ways as a unit, area, unit, partition, etc., and a sample may be expressed in various ways as a pixel, pel, pixel, etc.

이하, 첨부한 도면들을 참조하여, 본 발명의 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 동일한 구성요소에 대해서 중복된 설명은 생략한다. Hereinafter, embodiments of the present invention will be described in more detail with reference to the attached drawings. In describing the present invention, duplicate descriptions of the same components will be omitted.

도 1은 영상 부호화 장치의 구성을 간략하게 나타낸 블록 흐름도이다. 영상 부호화 장치는 영상을 부호화하는 장치로써 크게 블록 분할부, 예측부, 변환부, 양자화부, 엔트로피 부호화부, 역 양자화부, 역 변환부, 가산부, 인루프 필터부, 메모리부, 감산부를 포함할 수 있다.Figure 1 is a block flow diagram briefly showing the configuration of a video encoding device. An image encoding device is a device that encodes images and largely includes a block division unit, prediction unit, transform unit, quantization unit, entropy encoding unit, inverse quantization unit, inverse transform unit, addition unit, in-loop filter unit, memory unit, and subtraction unit. can do.

블록 분할부(101)는 최대 크기의 부호화 하고자 하는 블록(이하, 최대 부호화 블록이라 칭함)으로부터 최소 크기의 부호화 하고자 하는 블록(이하, 최소 부호화 블록이라 칭함)까지 분할해 나간다. 블록 분할 방법에는 다양한 방법이 있다. 쿼드-트리 분할(이하, QT(Quad-Tree) 분할이라 칭함)은 현재 부호화 블록을 정확히 사분하는 분할이다. 이진-트리 분할(이하, BT(Binary-Tree) 분할이라 칭함)은 부호화 블록을 가로 방향 혹은 세로 방향으로 정확히 이분하는 분할이다. 터너리-트리(Ternary-tree) 분할은 부호화 블록을 가로 또는 세로 방향 중 어느 하나의 방향으로 삼분할하는 분할이다. 부호화 블록이 가로 방향으로 분할된 경우, 분할된 블록의 높이의 비는 {1:n:1}일 수 있다. 또는, 부호화 블록이 세로 방향으로 분할된 경우, 분할된 블록의 너비의 비는 {1:n:1}일 수 있다. 여기서, n은 1, 2, 3, 또는 그 이상의 자연수일 수 있다. 이 외에 다양한 분할 방법이 있을 수 있다. 또한, 여러 분할 방법들을 동시에 고려하여 분할해 나가는 방법도 가능하다. The block division unit 101 divides the block to be encoded with the maximum size (hereinafter referred to as the maximum coding block) to the block to be encoded with the minimum size (hereinafter referred to as the minimum coding block). There are various ways to split blocks. Quad-tree division (hereinafter referred to as QT (Quad-Tree) division) is a division that exactly divides the current encoding block into four. Binary-tree splitting (hereinafter referred to as BT (Binary-Tree) splitting) is a splitting that exactly divides an encoding block into two halves, either horizontally or vertically. Ternary-tree division is a division that divides a coding block into thirds in either the horizontal or vertical direction. When a coding block is divided in the horizontal direction, the height ratio of the divided blocks may be {1:n:1}. Alternatively, when the coding block is split in the vertical direction, the ratio of the widths of the split blocks may be {1:n:1}. Here, n may be a natural number of 1, 2, 3, or more. In addition, there may be various partitioning methods. In addition, it is possible to divide by considering multiple division methods simultaneously.

예측부(102)는 현재 원본 블록에서 현재 예측 하고자 하는 블록(이하, 예측 블록이라 칭함)의 주변 화소나 이전에 이미 부호화/복호화가 끝난 참조 픽쳐 내 화소들을 이용하여 예측 블록을 생성한다. 예측 블록은 부호화 블록 내에서 1개 혹은 그 이상의 예측 블록들이 생성될 수 있다. 부호화 블록 내 예측 블록이 1개일 경우, 예측 블록은 부호화 블록과 동일한 형태이다. 동영상 신호의 예측 기술에는 크게 화면 내 예측과 화면 간 예측으로 구성 되어 있는데, 화면 내 예측은 현재 블록의 주변 화소들을 이용하여 예측 블록을 생성하는 방식이고, 화면 간 예측은 이전에 이미 부호화/복호화가 끝난 참조 픽쳐에서 현재 블록과 가장 유사한 블록을 찾아서 예측 블록을 생성하는 방식이다. 그 후, 원본 블록과 예측 블록을 뺀 잔차 블록을 율-왜곡 최적화(RDO: Rate-Distortion Optimization) 등 다양한 기법을 이용하여 예측 블록의 최적 예측 모드를 결정한다. RDO 비용 계산식은 수학식 1과 같다.The prediction unit 102 generates a prediction block using pixels surrounding the block to be currently predicted (hereinafter referred to as prediction block) in the current original block or pixels in a reference picture that has already been previously encoded/decoded. A prediction block may be one or more prediction blocks generated within a coding block. When there is one prediction block in a coding block, the prediction block has the same form as the coding block. Prediction technology for video signals largely consists of intra-screen prediction and inter-screen prediction. Intra-screen prediction is a method of generating a prediction block using surrounding pixels of the current block, and inter-screen prediction is a method that has already been encoded/decoded before. This is a method of generating a prediction block by finding the block most similar to the current block in the finished reference picture. Afterwards, the optimal prediction mode of the prediction block is determined using various techniques such as rate-distortion optimization (RDO) on the residual block obtained by subtracting the original block and the prediction block. The RDO cost calculation formula is as shown in Equation 1.

D, R, J는 각각 양자화에 의한 열화, 압축 스트림의 레이트, RD 비용이고, Φ는 부호화 모드, λ는 라그랑지안 승수(Lagrangian multiplier)로 에러의 양과 비트량 간의 단위를 일치시키기 위한 스케일 보정용 계수로 사용한다. 부호화 과정에서 최적의 부호화 모드로 선택되기 위해서는 해당 모드를 적용했을 때의 J 즉, RD-비용값이 다른 모드를 적용했을 때보다 작아야 하는데, RD-비용값을 구하는 식에는 비트율과 에러를 동시에 고려하여 계산한다.D, R, and J are the deterioration due to quantization, the rate of the compressed stream, and the RD cost, respectively, Φ is the encoding mode, and λ is the Lagrangian multiplier, which is a scale correction coefficient to match the unit between the amount of error and the amount of bits. use. In order to be selected as the optimal encoding mode in the encoding process, the J when the mode is applied, that is, the RD-cost value, must be smaller than when other modes are applied, and the bit rate and error are considered simultaneously in the equation for calculating the RD-cost value. Calculate it.

화면 내 예측부(미도시)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 블록을 생성할 수 있다. 화면 내 예측이 수행될 현재 블록의 주변 블록의 예측 모드가 화면 간 예측 예측인 경우, 화면 간 예측 예측이 적용된 주변 블록에 포함되는 참조 픽셀을, 화면 내 예측이 적용된 주변의 다른 블록 내의 참조 픽셀로 대체될 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를, 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.The intra-screen prediction unit (not shown) may generate a prediction block based on reference pixel information around the current block, which is pixel information in the current picture. If the prediction mode of the neighboring block of the current block for which intra-screen prediction is to be performed is inter-screen prediction, the reference pixel included in the neighboring block to which inter-screen prediction has been applied is converted to a reference pixel in another neighboring block to which intra-screen prediction has been applied. can be replaced That is, when the reference pixel is not available, the unavailable reference pixel information can be used by replacing at least one reference pixel among the available reference pixels.

화면 내 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 화면 내 예측 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.In intra-screen prediction, the prediction mode can include a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use directional information when performing prediction. The mode for predicting luminance information and the mode for predicting chrominance information may be different, and to predict chrominance information, intra-screen prediction prediction mode information or predicted luminance signal information used to predict luminance information may be utilized. there is.

화면 내 예측부는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 필터로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 적응적으로 결정할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.The intra-screen prediction unit may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter is a filter that performs filtering on the reference pixels of the current block, and can adaptively determine whether to apply the filter depending on the prediction mode of the current prediction unit. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.

화면 내 예측부의 참조 화소 보간부는 예측 단위의 화면 내 예측 예측 모드가 참조 화소를 보간한 화소값을 기초로 화면 내 예측 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 분수 단위 위치의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.The reference pixel interpolation unit of the intra-screen prediction unit interpolates the reference pixel when the intra-screen prediction prediction mode of the prediction unit is a prediction unit that performs intra-screen prediction based on the pixel value by interpolating the reference pixel to obtain the reference pixel at the fractional position. can be created. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.

화면 간 예측부(미도시)는, 메모리(110)에 저장된 기-복원된 참조영상과 움직임 정보를 이용하여 예측 블록을 생성한다. 움직임 정보는 예컨대 움직임 벡터, 참조픽처 인덱스, 리스트 1 예측 플래그, 리스트 0 예측 플래그 등을 포함할 수 있다.The inter-screen prediction unit (not shown) generates a prediction block using the pre-restored reference image and motion information stored in the memory 110. Motion information may include, for example, a motion vector, reference picture index, list 1 prediction flag, list 0 prediction flag, etc.

화면 간 예측부는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 블록을 유도할 수 있다. 또한, 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로, 현재 블록의 예측 블록을 유도할 수도 있다. 본 발명의 일 실시예에 따른 화면 간 예측부는 참조 픽쳐 보간부, 움직임 예측부, 움직임 보상부를 포함할 수 있다. The inter-screen prediction unit may derive a prediction block based on information on at least one picture among the pictures before or after the current picture. Additionally, a prediction block of the current block may be derived based on information on a portion of the area in the current picture that has been encoded. The inter-screen prediction unit according to an embodiment of the present invention may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.

참조 픽쳐 보간부에서는 메모리(110)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8 탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4 탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.The reference picture interpolation unit may receive reference picture information from the memory 110 and generate pixel information of an integer number of pixels or less from the reference picture. In the case of luminance pixels, a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of an integer pixel or less in 1/4 pixel units. In the case of color difference signals, a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of an integer pixel or less in 1/8 pixel units.

움직임 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 움직임 예측을 수행할 수 있다. 움직임 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 움직임 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 움직임 벡터값을 가질 수 있다. 움직임 예측부에서는 움직임 예측 방법을 다르게 하여 현재 블록의 예측 블록을 예측할 수 있다. 움직임 예측 방법으로 스킵(Skip) 모드, 머지(Merge) 모드, AMVP(Advanced Motion Vector Prediction) 모드 등 다양한 방법이 사용될 수 있다.The motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolation unit. Various methods, such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm), can be used to calculate the motion vector. The motion vector may have a motion vector value in 1/2 or 1/4 pixel units based on the interpolated pixel. The motion prediction unit can predict the prediction block of the current block by using a different motion prediction method. As a motion prediction method, various methods such as skip mode, merge mode, and AMVP (Advanced Motion Vector Prediction) mode can be used.

도 2는 영상 부호화 장치의 예측부 내의 흐름을 설명한 흐름도이다. 원본 정보와 복원 정보를 이용하여 화면 내 예측을 수행(201)하는 경우, 각 예측 모드 별로 최적 화면 내 예측 모드를 RD-비용값을 이용하여 결정(202)하고, 예측 블록을 생성한다. 원본 정보와 복원 정보를 이용하여 화면 간 예측을 수행(203)하는 경우, SKIP 모드, MERGE 모드, AMVP 모드에 대해서 RD-비용값을 계산한다. MERGE 후보 탐색부(204)에서는 SKIP 모드와, MERGE 모드를 위한 후보 움직임정보 세트를 구성한다. 해당 후보 움직임정보 세트 중, 최적 움직임정보를 RD-비용값을 이용하여 결정(205)한다. AMVP 후보 탐색부(206)에서는 AMVP 모드를 위한 후보 움직임정보 세트를 구성한다. 해당 후보 움직임정보 세트들을 이용하여 움직임 추정을 수행(207)하고, 최적 움직임정보를 결정한다. 각 모드들에서 결정된 최적 움직임정보를 이용하여 움직임보상을 수행(208)하여 예측 블록을 생성한다.Figure 2 is a flowchart explaining the flow within the prediction unit of the video encoding device. When intra-prediction is performed using the original information and restored information (201), the optimal intra-prediction mode for each prediction mode is determined using the RD-cost value (202), and a prediction block is generated. When performing inter-screen prediction using original information and restored information (203), RD-cost values are calculated for SKIP mode, MERGE mode, and AMVP mode. The MERGE candidate search unit 204 configures candidate motion information sets for SKIP mode and MERGE mode. Among the candidate motion information sets, the optimal motion information is determined using the RD-cost value (205). The AMVP candidate search unit 206 configures a candidate motion information set for AMVP mode. Motion estimation is performed using the corresponding candidate motion information sets (207), and optimal motion information is determined. Motion compensation is performed using the optimal motion information determined in each mode (208) to generate a prediction block.

상기 전술한 화면 간 예측은 3가지 모드(SKIP 모드, MERGE 모드, AMVP 모드)로 구성되어 있을 수 있다. 각 예측 모드는 움직임정보(예측 방향 정보, 참조 픽쳐 정보, 움직임 벡터)를 이용하여 현재 블록의 예측 블록을 구하고, 움직임정보를 이용한 추가적인 예측 모드가 있을 수 있다. The above-described inter-screen prediction may consist of three modes (SKIP mode, MERGE mode, and AMVP mode). Each prediction mode uses motion information (prediction direction information, reference picture information, motion vector) to obtain the prediction block of the current block, and there may be additional prediction modes using motion information.

SKIP 모드는 이미 복원된 영역의 움직임정보를 이용하여 최적 예측 정보를 결정한다. 복원된 영역 내에서 움직임정보 후보군을 구성하여 해당 후보군 중, RD-비용값이 최소인 후보를 예측 정보로 사용하여 예측 블록을 생성하는데, 여기서 움직임정보 후보군을 구성하는 방법은 하기 설명할 MERGE 모드의 움직임정보 후보군을 구성하는 방법과 동일하므로, 본 설명에서는 생략한다. SKIP mode determines the optimal prediction information using the motion information of the already restored area. A motion information candidate group is constructed within the restored area, and a prediction block is generated using the candidate with the minimum RD-cost value among the candidate groups as prediction information. Here, the method of configuring the motion information candidate group is the MERGE mode, which will be explained below. Since it is the same as the method of configuring the motion information candidate group, it is omitted in this description.

MERGE 모드는 이미 복원된 영역의 움직임정보를 이용하여 최적 예측 정보를 결정한다는 점에서 SKIP 모드와 동일하다. 그러나 SKIP 모드는 예측 에러가 0이 되도록 하는 움직임정보를 움직임정보 후보군에서 탐색하고, MERGE 모드는 예측 에러가 0이 아닌 움직임 정보를 움직임정보 후보군에서 탐색한다는 점에서 그 차이를 달리한다. SKIP 모드와 마찬가지로, 복원된 영역 내에서 움직임정보 후보군을 구성하여 해당 후보군 중, RD-비용값이 최소인 후보를 예측 정보로 사용하여 예측 블록을 생성한다. The MERGE mode is the same as the SKIP mode in that it determines the optimal prediction information using the motion information of the already restored area. However, the SKIP mode is different in that it searches the motion information candidate group for motion information that causes the prediction error to be 0, while the MERGE mode searches the motion information candidate group for motion information that has a prediction error other than 0. Similar to the SKIP mode, a motion information candidate group is formed within the restored area, and a prediction block is generated using the candidate with the minimum RD-cost value as prediction information among the candidate group.

도 3의 301은 SKIP 모드와 MERGE 모드의 움직임정보 후보군을 생성하는 방법을 나타낸 것이다. 움직임정보 후보군의 최대 개수는 영상 부호화 장치와 영상 복호화 장치에서 동일하게 결정할 수도 있고, 영상 부호화 장치의 상위 헤더(상위 헤더란, 비디오 파라미터단, 시퀀스 파라미터단, 픽쳐 파라미터단 등 블록의 상위단에서 전송되는 파라미터들을 의미함)에서 해당 개수 정보가 기 전송될 수도 있다. S305 단계와 S306 단계의 설명에서 공간적 후보 블록과 시간적 후보 블록이 화면 간 예측 모드로 부호화 되었을 때에만, 해당 움직임정보를 이용하여 유도된 움직임정보를 움직임정보 후보군에 포함시킨다. S305 단계에서는 동일 픽쳐 내에서 현재 블록 주변의 공간적 후보 블록 5개 중, 4개 후보를 선택한다. 공간적 후보의 위치는 도 3의 302를 참조하고, 각 후보들의 위치는 복원된 영역 내에서 어떤 블록으로든 변경 가능하다. 공간적 후보는 A1, A2, A3, A4, A5 순으로 고려하여 먼저 사용 가능한 공간적 후보 블록의 움직임정보를 공간적 후보로 결정한다. 다만, 이는 우선 순위의 일예에 불과하며, 우선 순위는 A2, A1, A3, A4, A5 순일 수도 있고, A2, A1, A4, A3, A5 순일 수도 있다. 중복되는 움직임정보가 있을 경우, 우선 순위가 높은 후보의 움직임정보만을 고려한다. S306 단계에서는 시간적 후보 블록 2개 중, 1개 후보를 선택한다. 시간적 후보의 위치는 도 3의 302를 참조하고, 각 후보들의 위치는 Collocated 픽쳐 내에서 현재 픽쳐의 현재 블록 위치와 동일한 위치의 블록을 기준으로 결정된다. 여기서, Collocated 픽쳐는 복원 픽쳐 내에서 영상 부호화 장치와 영상 복호화 장치에서 동일한 조건으로 설정 가능하다. 시간적 후보는 B1, B2 블록 순으로 고려하여 먼저 사용 가능한 후보 블록의 움직임 정보를 시간적 후보로 결정한다. 시간적 후보의 움직임정보를 결정하는 방법은 도 3의 303을 참조한다. Collocated 픽쳐 내의 후보 블록(B1, B2) 움직임정보는 참조 픽쳐 B에 있는 예측 블록을 가리키고 있다. (단, 각 후보 블록의 참조 픽쳐는 서로 다를 수 있음. 본 설명에서는 편의상 이를 모두 참조 픽쳐 B라고 표현함) 해당 움직임벡터를 Collocated 픽쳐와 참조 픽쳐 B의 거리 대비, 현재 픽쳐와 참조 픽쳐 A의 거리의 비율을 계산하여 해당 비율만큼 후보 블록의 움직임벡터를 스케일하여 시간적 후보 움직임정보의 움직임벡터를 결정한다. 수학식 2는 스케일링 수식을 의미한다.301 in FIG. 3 shows a method for generating motion information candidates for SKIP mode and MERGE mode. The maximum number of motion information candidate groups may be determined equally in the video encoding device and the video decoding device, and may be transmitted at the upper level of the block, such as the upper header (higher header, video parameter level, sequence parameter level, picture parameter level, etc.) of the video encoding device. (referring to the parameters being used), the corresponding number information may already be transmitted. In the description of steps S305 and S306, only when the spatial candidate block and the temporal candidate block are encoded in the inter-screen prediction mode, the motion information derived using the corresponding motion information is included in the motion information candidate group. In step S305, four candidates are selected out of five spatial candidate blocks surrounding the current block within the same picture. Refer to 302 in FIG. 3 for the positions of spatial candidates, and the positions of each candidate can be changed to any block within the restored area. Spatial candidates are considered in the following order: A 1 , A 2 , A 3 , A 4 , and A 5 , and first the motion information of the available spatial candidate blocks is determined as the spatial candidate. However, this is only an example of priority, and the priority may be A 2 , A 1 , A 3 , A 4 , and A 5 , or A 2 , A 1 , A 4 , A 3 , and A 5 . If there is overlapping motion information, only the motion information of the high-priority candidate is considered. In step S306, one candidate is selected from two temporal candidate blocks. Refer to 302 in FIG. 3 for the positions of temporal candidates, and the positions of each candidates are determined based on the block at the same position as the current block position of the current picture within the collocated picture. Here, the collocated picture can be set under the same conditions in the video encoding device and the video decoding device within the reconstructed picture. Temporal candidates are considered in the order of blocks B 1 and B 2 , and first the motion information of the available candidate blocks is determined as the temporal candidate. Refer to 303 in FIG. 3 for a method of determining motion information of a temporal candidate. The motion information of the candidate blocks (B 1 , B 2 ) in the collocated picture points to the prediction block in the reference picture B. (However, the reference picture of each candidate block may be different. In this explanation, for convenience, all of these are referred to as reference picture B.) The corresponding motion vector is compared to the distance between the collocated picture and reference picture B, and the distance between the current picture and reference picture A. Calculate the ratio and scale the motion vector of the candidate block by the ratio to determine the motion vector of the temporal candidate motion information. Equation 2 refers to the scaling formula.

MV는 시간적 후보 블록 움직임정보의 움직임벡터, MVscale은 스케일링된 움직임벡터, TB는 Collocated 픽쳐와 참조 픽쳐 B의 시간적 거리, TD는 현재 픽쳐와 참조 픽쳐 A의 시간적 거리를 의미한다. 또한, 참조 픽쳐 A, 참조 픽쳐 B는 동일한 참조 픽쳐일 수도 있다. 이렇게 스케일링된 움직임벡터를 시간적 후보의 움직임벡터로 결정하고, 시간적 후보 움직임정보의 참조 픽쳐 정보는 현재 픽쳐의 참조 픽쳐로 결정하여, 시간적 후보의 움직임정보를 유도한다. S307 단계는 S305, S306 단계에서 최대 움직임정보 후보군 개수를 채우지 못했을 경우에만 수행되며, 이전 단계에서 유도된 움직임정보 후보들의 조합으로 새로운 양방향 움직임정보 후보군을 추가하는 단계이다. 양방향 움직임정보 후보란, 이전까지 유도된 과거 혹은 미래 방향의 움직임정보들을 하나씩 가져와서 새로운 후보로 조합하여 만들어내는 것이다. 도 3의 304 표는 양방향 움직임정보 후보 조합의 우선순위를 나타낸 것이다. 본 표의 조합 이외에 추가적인 조합이 나올 수 있으며, 본 표는 하나의 예시를 나타낸 것이다. 양방향 움직임정보 후보를 이용하여도 최대 움직임정보 후보군 개수를 채우지 못했을 경우, S307 단계를 수행한다. S308 단계에서는 움직임정보 후보의 움직임벡터를 제로 움직임벡터로 고정하고, 예측 방향에 따른 참조 픽쳐를 달리하여서 최대 움직임정보 후보군의 개수를 채운다.MV is the motion vector of the temporal candidate block motion information, MV scale is the scaled motion vector, TB is the temporal distance between the collocated picture and reference picture B, and TD is the temporal distance between the current picture and reference picture A. Additionally, reference picture A and reference picture B may be the same reference picture. The scaled motion vector is determined as the motion vector of the temporal candidate, and the reference picture information of the temporal candidate motion information is determined as the reference picture of the current picture, thereby deriving the motion information of the temporal candidate. Step S307 is performed only when the maximum number of motion information candidates is not met in steps S305 and S306, and is a step of adding a new bidirectional motion information candidate group by combining the motion information candidates derived in the previous step. A bidirectional motion information candidate is created by taking previously derived motion information in the past or future direction one by one and combining them into a new candidate. Table 304 in FIG. 3 shows the priorities of bidirectional motion information candidate combinations. In addition to the combinations in this table, additional combinations may appear, and this table shows one example. If the maximum number of motion information candidates is not met even when bidirectional motion information candidates are used, step S307 is performed. In step S308, the motion vector of the motion information candidate is fixed to a zero motion vector, and the reference picture is varied according to the prediction direction to fill the maximum number of motion information candidates.

AMVP 모드는 예측 방향에 따른 참조 픽쳐 별로 움직임 추정을 거쳐 최적 움직임정보를 결정한다. 여기서, 예측 방향은 과거/미래 중 한 방향만을 사용하는 단방향 일수도 있고, 과거와 미래 방향 모두를 사용하는 양방향 일수도 있다. 움직임 추정을 통해 결정된 최적 움직임정보를 이용하여 움직임 보상을 수행하여 예측 블록을 생성한다. 여기서, 예측 방향에 따른 참조 픽쳐마다 움직임 추정을 위한 움직임정보 후보군을 유도한다. 해당 움직임정보 후보군은 움직임 추정의 시작 지점으로 사용된다. AMVP 모드의 움직임 추정을 위한 움직임정보 후보군을 유도하는 방법은 도 4를 참조한다.AMVP mode determines optimal motion information through motion estimation for each reference picture according to the prediction direction. Here, the prediction direction may be unidirectional, using only one of past/future directions, or it may be bidirectional, using both past and future directions. A prediction block is generated by performing motion compensation using the optimal motion information determined through motion estimation. Here, a motion information candidate group for motion estimation is derived for each reference picture according to the prediction direction. The corresponding motion information candidate group is used as a starting point for motion estimation. Refer to FIG. 4 for a method of deriving a motion information candidate group for motion estimation in AMVP mode.

움직임정보 후보군의 최대 개수는 영상 부호화 장치와 영상 복호화 장치에서 동일하게 결정할 수도 있고, 영상 부호화 장치의 상위 헤더에서 해당 개수 정보가 기 전송될 수도 있다. S401 단계와 S402 단계의 설명에서 공간적 후보 블록과 시간적 후보 블록이 화면 간 예측 모드로 부호화 되었을 때에만, 해당 움직임정보를 이용하여 유도된 움직임정보를 움직임정보 후보군에 포함시킨다. S401 단계에서는 S305 단계의 설명과 다르게, 공간적 후보로서 유도되는 개수(2개)가 다를 수 있고, 공간적 후보를 선택하기 위한 우선 순위 또한 다를 수 있다. 나머지 설명은 S305 단계의 그것과 동일하다. S402 단계는 S306 단계의 설명과 동일하다. S403 단계에서는 현재까지 유도된 후보들 중, 중복되는 움직임정보가 있다면 제거한다. S404 단계는 S308 단계의 설명과 동일하다. 이렇게 유도된 움직임정보 후보들 중, RD-비용값이 최소인 움직임정보 후보를 최적 움직임정보 후보로 선택하여 해당 움직임정보를 기준으로 움직임 추정 과정을 거쳐 AMVP 모드의 최적 움직임정보를 구한다.The maximum number of motion information candidate groups may be determined equally in the video encoding device and the video decoding device, or the corresponding number information may be previously transmitted in the upper header of the video encoding device. In the description of steps S401 and S402, only when the spatial candidate block and the temporal candidate block are encoded in the inter-screen prediction mode, the motion information derived using the corresponding motion information is included in the motion information candidate group. In step S401, unlike the description in step S305, the number (2) derived as spatial candidates may be different, and the priority for selecting spatial candidates may also be different. The remaining description is the same as that of step S305. Step S402 is the same as the description of step S306. In step S403, if there is any overlapping motion information among the candidates derived so far, it is removed. Step S404 is the same as the description of step S308. Among the motion information candidates derived in this way, the motion information candidate with the minimum RD-cost value is selected as the optimal motion information candidate, and the optimal motion information for AMVP mode is obtained through a motion estimation process based on the motion information.

변환부(103)는 원본 블록과 예측 블록의 차이인 잔차 블록을 변환하여 변환 블록을 생성한다. 변환 블록은 변환 및 양자화 과정을 위해 사용되는 가장 작은 단위이다. 변환부는 잔차 신호를 주파수 영역으로 변환하여 변환 계수를 가지는 변환 블록을 생성한다. 여기서 잔차 신호를 주파수 영역으로 변환하는 방법으로는 이산 코사인 변환(DCT: Discrete Cosine Transform)기반 변환, 이산 사인 변환(DST: Discrete Sine Transform), KLT(Karhunen Loeve Transform) 등 다양한 변환 기법을 이용할 수 있으며, 이를 이용하여 잔차 신호가 주파수 영역으로 변환되어 변환 계수가 생성 된다. 변환 기법을 편하게 사용하기 위해 기저벡터(basis vector)를 이용하여 행렬 연산을 하게 되는데 예측 블록이 어떤 예측 모드로 부호화 되었는지에 따라서 행렬 연산 시 변환 기법들을 다양하게 섞어 사용할 수 있다. 예를 들어, 화면 내 예측 시 예측 모드에 따라 가로 방향으로는 이산 코사인 변환을 사용하고 세로 방향으로는 이산 사인 변환을 사용 할 수도 있다.The transform unit 103 generates a transform block by transforming the residual block, which is the difference between the original block and the prediction block. A transform block is the smallest unit used for the transform and quantization process. The transform unit converts the residual signal into the frequency domain and generates a transform block with transform coefficients. Here, various transformation techniques such as Discrete Cosine Transform (DCT)-based transformation, Discrete Sine Transform (DST), and Karhunen Loeve Transform (KLT) can be used to transform the residual signal into the frequency domain. , using this, the residual signal is converted to the frequency domain and a conversion coefficient is generated. In order to conveniently use the transformation technique, matrix calculation is performed using a basis vector. Depending on which prediction mode the prediction block is encoded in, various transformation techniques can be mixed and used during matrix calculation. For example, during intra-screen prediction, depending on the prediction mode, discrete cosine transformation may be used in the horizontal direction and discrete sine transformation may be used in the vertical direction.

양자화부(104)는 변환 블록을 양자화 하여 양자화된 변환 블록을 생성한다. 즉, 양자화부는 변환부(103)로부터 생성되는 변환 블록의 변환 계수들을 양자화 하여 양자화된 변환 계수를 가지는 양자화된 변환 블록(Quantized Transform Coefficient)을 생성한다. 양자화 방법으로는 데드존 균일 경계 양자화(DZUTQ: Dead Zone Uniform Threshold Quantization) 또는 양자화 가중치 행렬 (Quantization Weighted Matrix) 등이 이용될 수 있지만, 이를 개량한 양자화 등 다양한 양자화 방법이 이용될 수 있다.The quantization unit 104 quantizes the transform block and generates a quantized transform block. That is, the quantization unit quantizes the transform coefficients of the transform block generated from the transform unit 103 and generates a quantized transform block (Quantized Transform Coefficient) having quantized transform coefficients. Dead zone uniform threshold quantization (DZUTQ) or quantization weighted matrix can be used as a quantization method, but various quantization methods, such as improved quantization, can be used.

한편, 이상에서는 영상 부호화 장치가 변환부 및 양자화부를 포함하는 것을 도시하고 설명 했지만, 변환부 및 양자화부는 선택적으로 포함될 수 있다. 즉, 영상 부호화 장치는 잔차 블록을 변환하여 변환 블록을 생성하고 양자화 과정은 수행하지 않을 수 있으며, 잔차 블록을 주파수 계수로 변환하지 않고 양자화 과정만을 수행할 수 있을 뿐만 아니라, 심지어는 변환과 양자화 과정을 모두 수행하지 않을 수 있다. 영상 부호화 장치에서 변환부와 양자화부 중 일부 과정이 수행되지 않거나, 모든 과정이 수행 되지 않더라도 엔트로피 부호화부의 입력으로 들어가는 블록을 통상적으로 '양자화된 변환 블록'이라 일컫는다. Meanwhile, in the above, it has been shown and explained that the image encoding device includes a transform unit and a quantization unit, but the transform unit and the quantization unit may be optionally included. In other words, the image encoding device may convert the residual block to generate a transformation block and not perform the quantization process. Not only may it perform the quantization process without converting the residual block into a frequency coefficient, but it may even perform the transformation and quantization process. You may not perform all of them. In an image encoding device, even if some or all of the processes of the transform unit and the quantization unit are not performed, the block that enters the input of the entropy encoding unit is commonly referred to as a 'quantized transform block'.

엔트로피 부호화부(105)는 양자화된 변환 블록을 부호화하여 비트스트림을 출력한다. 즉, 엔트로피 부호화부는 양자화부로부터 출력되는 양자화된 변환 블록의 계수들을 엔트로피 부호화(Entropy Encoding) 등 다양한 부호화 기법을 이용하여 부호화하고, 후술하는 영상 복호화 장치에서 해당 블록을 복호화 하는데 필요한 부가적인 정보들(예를 들면, 예측 모드에 대한 정보(예측 모드에 대한 정보란 예측부에서 결정된 움직임정보 혹은 화면 내 예측 모드 정보 등이 포함될 수 있음), 양자화 계수 등)을 포함하는 비트스트림을 생성하고 출력한다.The entropy encoding unit 105 encodes the quantized transform block and outputs a bitstream. That is, the entropy encoding unit encodes the coefficients of the quantized transform block output from the quantization unit using various encoding techniques such as entropy encoding, and provides additional information ( For example, a bitstream containing information about the prediction mode (information about the prediction mode may include motion information determined in the prediction unit or intra-screen prediction mode information, quantization coefficients, etc.) is generated and output.

역 양자화부(106)는 양자화된 변환 블록에 대하여 양자화 시에 사용한 양자화 기법을 역으로 수행하여 역 양자화 변환 블록을 복원한다. The inverse quantization unit 106 restores the inverse quantization transform block by inversely performing the quantization technique used when quantizing the quantized transform block.

역 변환부(107)는 변환 시에 사용한 방법과 동일한 방법을 이용하여 역 양자화 변환 블록을 역 변환하여 잔차 블록을 복원하는데, 변환부에서 이용한 변환 기법을 역으로 수행하여 역 변환한다.The inverse transform unit 107 restores the residual block by inversely transforming the inverse quantization transform block using the same method as the method used during transformation. The inverse transform is performed by inversely performing the transformation technique used in the transform unit.

한편, 이상에서는 역 양자화부와 역 변환부는 양자화부와 변환부에서 사용한 양자화 방식과 변환 방식을 역으로 사용하여 역 양자화 및 역 변환 할 수 있다. 또한 변환부와 양자화부에서 양자화만을 수행하고 변환을 수행하지 않은 경우에는 역 양자화만을 수행하고 역 변환을 수행하지 않을 수 있다. 만약, 변환 및 양자화를 모두 수행하지 않은 경우, 역 양자화부와 역 변환부도 역 변환 및 역 양자화를 모두 수행하지 않거나 영상 부호화 장치에 포함되지 않고 생략 될 수 있다.Meanwhile, in the above, the inverse quantization unit and the inverse transformation unit can perform inverse quantization and inverse transformation by using the quantization method and transformation method used in the quantization unit and the transformation unit inversely. Additionally, if only quantization is performed in the transform unit and the quantization unit but no transformation is performed, only inverse quantization may be performed and no inverse transformation may be performed. If neither the transformation nor the quantization are performed, the inverse quantization unit and the inverse transform unit may not perform both the inverse transformation and the inverse quantization or may be omitted and not included in the video encoding device.

가산부(108)는 역 변환부에서 생성된 잔차 신호와, 예측을 통하여 생성된 예측 블록을 가산하여 현재 블록을 복원한다.The adder 108 restores the current block by adding the residual signal generated in the inverse transform unit and the prediction block generated through prediction.

필터부(109)는 현재 픽쳐 내 모든 블록들이 복원된 이후, 픽쳐 전체에 걸쳐서 추가적으로 필터링 해주는 과정으로 디블로킹 필터링, SAO(Sample Adaptive Offset), ALF(Adaptive Loop Filter) 등이 있다. 디블로킹 필터링이란 영상을 블록 단위로 부호화하면서 발생하는 블록 왜곡을 감소시키는 작업을 말하며, SAO(Sample Adaptive Offset)란 복원 화소에 특정 값을 감산하거나 가산함으로써, 복원 영상과 원본 영상간 차이를 최소화시키는 작업을 말한다. ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및/또는 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다. The filter unit 109 performs additional filtering on the entire picture after all blocks in the current picture are restored, including deblocking filtering, Sample Adaptive Offset (SAO), and Adaptive Loop Filter (ALF). Deblocking filtering refers to the process of reducing block distortion that occurs while encoding an image in blocks, and SAO (Sample Adaptive Offset) is a process that minimizes the difference between the restored image and the original image by subtracting or adding a specific value to the restored pixel. says work. Adaptive Loop Filtering (ALF) can be performed based on a comparison between the filtered restored image and the original image. After dividing the pixels included in the image into predetermined groups, filtering can be performed differentially for each group by determining one filter to be applied to that group. Information related to whether to apply ALF may be transmitted for each coding unit (CU), and the shape and/or filter coefficient of the ALF filter to be applied may vary for each block. Additionally, an ALF filter of the same type (fixed type) may be applied regardless of the characteristics of the block to which it is applied.

메모리(110)는 역 변환부에서 생성된 잔차 신호와, 예측을 통하여 생성된 예측 블록을 가산한 후, 인루프 필터부에서 추가적인 필터링을 거친 복원된 현재 블록을 저장하며, 다음 블록 또는 다음 사진 등을 예측하는데 활용 될 수 있다.The memory 110 adds the residual signal generated in the inverse transform unit and the prediction block generated through prediction, then stores the restored current block that has undergone additional filtering in the in-loop filter unit, and stores the restored current block, such as the next block or the next photo, etc. can be used to predict.

감산부(111)는 현재 원본 블록에서 예측 블록을 감산하여 잔차 블록을 생성한다.The subtraction unit 111 generates a residual block by subtracting the prediction block from the current original block.

도 5는 영상 부호화 장치 내 엔트로피 부호화부에서 코딩 정보의 부호화 흐름을 나타낸 흐름도이다. S501 단계에서는 SKIP 모드의 동작 정보를 부호화한다. S502 단계에서는 SKIP 모드의 동작 여부를 판단한다. S502 단계에서 SKIP 모드가 동작한다면 S507 단계에서 SKIP 모드를 위한 MERGE 후보 색인 정보를 부호화한 후, 본 흐름도를 종료한다. S502 단계에서 SKIP 모드가 동작하지 않는다면 S503 단계에서 예측 모드를 부호화한다. S503 단계에서는 예측 모드가 화면 간 예측인지 화면 내 예측 모드인지를 판단한다. S504 단계에서 예측 모드가 화면 간 예측 모드였다면, S505 단계에서 MERGE 모드의 동작 정보를 부호화한다. S506 단계에서는 MERGE 모드의 동작 여부를 판단한다. S506 단에서 MERGE 모드가 동작한다면 S507 단계로 넘어가서 MERGE 모드를 위한 MERGE 후보 색인 정보를 부호화한 후, 본 흐름도를 종료한다. S506 단계에서 MERGE 모드가 동작하지 않는다면 S508 단계에서 예측 방향을 부호화한다. 여기서 예측 방향은 과거 방향, 미래 방향, 양방향 중 하나일 수 있다. S509 단계에서는 예측 방향이 미래방향인지 아닌지를 판단한다. S509 단계에서 예측 방향이 미래 방향이 아니었다면 S510 단계에서 과거 방향의 참조 픽쳐 색인 정보를 부호화한다. S511 단계에서는 과거 방향의 MVD(Motion Vector Difference) 정보를 부호화한다. S512 단계에서는 과거 방향의 MVP(Motion Vector Predictor) 정보를 부호화한다. S509 단계에서 예측 방향이 미래 방향 혹은 양방향이거나 S512 단계가 끝나면 S513 단계에서 예측 방향이 과거 방향인지 아닌지를 판단한다. S513 단계에서 예측 방향이 과거 방향이 아니었다면 S514 단계에서 미래 방향 참조 픽쳐 색인 정보를 부호화한다. S515 단계에서는 미래 방향의 MVD 정보를 부호화한다. S516 단계에서는 미래 방향의 MVP 정보를 부호화한 후, 본 흐름도를 종료한다. S504 단계에서 예측 모드가 화면 내 예측 모드였다면, S517 단계에서 화면 내 예측 모드 정보를 부호화한 후, 본 흐름도를 종료한다.Figure 5 is a flowchart showing the encoding flow of coding information in the entropy encoding unit in the video encoding device. In step S501, operation information of SKIP mode is encoded. In step S502, it is determined whether the SKIP mode is operating. If the SKIP mode operates in step S502, the MERGE candidate index information for the SKIP mode is encoded in step S507, and then this flowchart ends. If the SKIP mode does not operate in step S502, the prediction mode is encoded in step S503. In step S503, it is determined whether the prediction mode is inter-screen prediction or intra-screen prediction mode. If the prediction mode in step S504 is the inter-screen prediction mode, operation information of the MERGE mode is encoded in step S505. In step S506, it is determined whether the MERGE mode is operating. If the MERGE mode operates in step S506, the flow proceeds to step S507, the MERGE candidate index information for the MERGE mode is encoded, and this flowchart ends. If the MERGE mode does not operate in step S506, the prediction direction is encoded in step S508. Here, the prediction direction can be one of past direction, future direction, or both directions. In step S509, it is determined whether the predicted direction is a future direction or not. If the prediction direction in step S509 is not the future direction, reference picture index information in the past direction is encoded in step S510. In step S511, MVD (Motion Vector Difference) information in the past direction is encoded. In step S512, MVP (Motion Vector Predictor) information of the past direction is encoded. In step S509, the predicted direction is a future direction or a bidirectional direction, or when step S512 is completed, it is determined in step S513 whether the predicted direction is a past direction or not. If the prediction direction is not the past direction in step S513, reference picture index information for the future direction is encoded in step S514. In step S515, MVD information of the future direction is encoded. In step S516, the MVP information for the future direction is encoded, and then this flowchart ends. If the prediction mode in step S504 is the intra-prediction mode, the intra-prediction mode information is encoded in step S517, and then the flowchart ends.

도 6은 영상 복호화 장치(600)의 구성을 간략하게 나타낸 블록 흐름도이다. FIG. 6 is a block flowchart briefly showing the configuration of the video decoding device 600.

영상 복호화 장치(600)는 영상을 복호화하는 장치로서, 크게 블록 엔트로피 복호화부, 역-양자화부, 역-변환부, 예측부, 가산부, 인루프 필터부, 메모리를 포함할 수 있다. 영상 부호화 장치에서 부호화 블록은 영상 복호화 장치에서 복호화 블록이라 칭한다.The image decoding device 600 is a device for decoding an image and may largely include a block entropy decoder, an inverse-quantization unit, an inverse-transformation unit, a prediction unit, an adder, an in-loop filter unit, and a memory. A coding block in a video encoding device is called a decoding block in a video decoding device.

엔트로피 복호화부(601)는 영상 부호화 장치로부터 전송받은 비트스트림을 해석하여 해당 블록을 복호화 하는데 필요한 여러 정보들과 양자화된 변환 계수를 읽어 들인다. The entropy decoder 601 interprets the bitstream transmitted from the video encoding device and reads various information and quantized transform coefficients necessary to decode the corresponding block.

역 양자화부(602)는 엔트로피 복호화부에서 복호화한 양자화 계수에 대하여 양자화 시에 사용한 양자화 기법을 역으로 수행하여 역 양자화된 계수를 가지는 역 양자화된 블록을 복원한다. The inverse quantization unit 602 inversely performs the quantization technique used during quantization on the quantization coefficients decoded by the entropy decoder to restore the inverse quantized block having the inverse quantized coefficients.

역 변환부(603)는 변환 시에 사용한 방법과 동일한 방법을 이용하여 역 양자화된 변환 블록을 역 변환하여 차분 신호를 가지는 잔차 블록을 복원하는데, 변환부에서 이용한 변환 기법을 역으로 수행하여 역 변환한다.The inverse transform unit 603 restores a residual block with a difference signal by inversely transforming the inverse quantized transform block using the same method as the method used during transformation. do.

예측부(604)는 엔트로피 복호화부에서 복호화한 예측 모드 정보를 이용하여 예측 블록을 생성하는데, 이는 영상 부호화 장치의 예측부에서 수행했던 예측 방식과 동일한 방식을 이용한다. The prediction unit 604 generates a prediction block using prediction mode information decoded by the entropy decoder, which uses the same prediction method as that performed by the prediction unit of the video encoding device.

가산부(605)는 역 변환부에서 복원된 잔차 신호와, 예측을 통하여 생성된 예측 블록을 가산하여 현재 블록을 복원한다.The adder 605 restores the current block by adding the residual signal restored in the inverse transform unit and the prediction block generated through prediction.

필터부(606)는 현재 픽쳐 내 모든 블록을 복원한 이후, 픽쳐 전체에 걸쳐서 추가적인 필터링은 하는 과정으로 디블로킹 필터링, SAO(Sample Adaptive Offset), ALF 등이 있으며, 상세한 내용은 기 전술한 영상 부호화 장치의 인루프 필터부에서 설명한 바와 동일하다. The filter unit 606 restores all blocks in the current picture and then performs additional filtering throughout the picture, including deblocking filtering, Sample Adaptive Offset (SAO), and ALF. Details are described in the video encoding process described above. It is the same as described in the in-loop filter part of the device.

메모리(607)는 역 변환부에서 생성된 잔차 신호와, 예측을 통하여 생성된 예측 블록을 가산한 후, 인루프 필터부에서 추가적인 필터링을 거친 복원된 현재 블록을 저장하며, 다음 블록 또는 다음 사진 등을 예측하는데 활용 될 수 있다.The memory 607 adds the residual signal generated in the inverse transform unit and the prediction block generated through prediction, then stores the restored current block that has undergone additional filtering in the in-loop filter unit, and stores the restored current block, such as the next block or the next photo, etc. can be used to predict.

도 7은 영상 복호화 장치의 예측부 내의 흐름을 설명한 흐름도이다. 예측 모드가 화면 내 예측이라면, 최적 화면 내 예측 모드 정보를 결정(701)하고, 화면 내 예측을 수행(702)하여 예측 블록을 생성한다. 예측 모드가 화면 간 예측이라면, SKIP, MERGE, AMVP 모드 중 최적 예측 모드를 결정(703)한다. SKIP 모드 혹은 MERGE 모드로 복호화할 경우, MERGE 후보 탐색부(704)에서 SKIP 모드와, MERGE 모드를 위한 후보 움직임정보 세트를 구성한다. 해당 후보 움직임정보 세트 중, 전송된 후보 인덱스(e.g., 머지 인덱스)를 이용하여 최적 움직임정보를 결정(705)한다. AMVP 모드로 복호화할 경우, AMVP 후보 탐색부(706)에서는 AMVP 모드를 위한 후보 움직임정보 세트를 구성한다. 해당 후보 움직임정보 후보들 중, 전송된 후보 인덱스(e.g., MVP 정보)를 이용하여 최적 움직임 정보를 결정(707)한다. 이후, 각 모드들에서 결정된 최적 움직임정보를 이용하여 움직임 보상을 수행(708)하여 예측 블록을 생성한다.Figure 7 is a flowchart explaining the flow in the prediction unit of the video decoding device. If the prediction mode is intra-prediction, optimal intra-prediction mode information is determined (701), and intra-prediction is performed (702) to generate a prediction block. If the prediction mode is inter-screen prediction, the optimal prediction mode among SKIP, MERGE, and AMVP modes is determined (703). When decoding in SKIP mode or MERGE mode, the MERGE candidate search unit 704 configures a candidate motion information set for SKIP mode and MERGE mode. Among the candidate motion information sets, the optimal motion information is determined (705) using the transmitted candidate index (e.g., merge index). When decoding in AMVP mode, the AMVP candidate search unit 706 configures a candidate motion information set for AMVP mode. Among the candidate motion information candidates, the optimal motion information is determined (707) using the transmitted candidate index (e.g., MVP information). Afterwards, motion compensation is performed using the optimal motion information determined in each mode (708) to generate a prediction block.

도 8은 영상 복호화 장치에서 코딩 정보의 복호화 흐름을 나타낸 흐름도이다. S801 단계에서는 SKIP 모드의 동작 정보를 복호화한다. S802 단계에서는 SKIP 모드의 동작 여부를 판단한다. S802 단계에서 SKIP 모드가 동작한다면 S807 단계에서 SKIP 모드를 위한 MERGE 후보 색인 정보를 복호화한 후, 본 흐름도를 종료한다. S802 단계에서 SKIP 모드가 동작하지 않는다면 S803 단계에서 예측 모드를 복호화한다. S803 단계에서는 예측 모드가 화면 간 예측인지 화면 내 예측 모드인지를 판단한다. S804 단계에서 예측 모드가 화면 간 예측 모드였다면, S805 단계에서 MERGE 모드의 동작 정보를 복호화한다. S806 단계에서는 MERGE 모드의 동작 여부를 판단한다. S806 단계에서 MERGE 모드가 동작한다면 S807 단계로 넘어가서 MERGE 모드를 위한 MERGE 후보 색인 정보를 복호화한 후, 본 흐름도를 종료한다. S806 단계에서 MERGE 모드가 동작하지 않는다면 S808 단계에서 예측 방향을 복호화한다. 여기서 예측 방향은 과거 방향, 미래 방향, 양방향 중 하나일 수 있다. S809 단계에서는 예측 방향이 미래방향인지 아닌지를 판단한다. S809 단계에서 예측 방향이 미래 방향이 아니었다면 S810 단계에서 과거 방향의 참조 픽쳐 색인 정보를 복호화한다. S811 단계에서는 과거 방향의 MVD(Motion Vector Difference) 정보를 복호화한다. S812 단계에서는 과거 방향의 MVP(Motion Vector Predictor) 정보를 복호화한다. S809 단계에서 예측 방향이 미래 방향 혹은 양방향이거나 S812 단계가 끝나면 S813 단계에서 예측 방향이 과거 방향인지 아닌지를 판단한다. S813 단계에서 예측 방향이 과거 방향이 아니었다면 S814 단계에서 미래 방향 참조 픽쳐 색인 정보를 복호화한다. S815 단계에서는 미래 방향의 MVD 정보를 복호화한다. S816 단계에서는 미래 방향의 MVP 정보를 복호화한 후, 본 흐름도를 종료한다. S804 단계에서 예측 모드가 화면 내 예측 모드였다면, S1317 단계에서 화면 내 예측 모드 정보를 복호화한 후, 본 흐름도를 종료한다.Figure 8 is a flowchart showing the decoding flow of coding information in a video decoding device. In step S801, operation information of SKIP mode is decoded. In step S802, it is determined whether the SKIP mode is operating. If the SKIP mode operates in step S802, the MERGE candidate index information for the SKIP mode is decrypted in step S807, and then this flowchart ends. If the SKIP mode does not operate in step S802, the prediction mode is decoded in step S803. In step S803, it is determined whether the prediction mode is inter-screen prediction or intra-screen prediction mode. If the prediction mode in step S804 is the inter-screen prediction mode, the operation information of the MERGE mode is decoded in step S805. In step S806, it is determined whether the MERGE mode is operating. If the MERGE mode operates in step S806, the flow proceeds to step S807, decoding the MERGE candidate index information for the MERGE mode, and then ending this flowchart. If the MERGE mode does not operate in step S806, the prediction direction is decoded in step S808. Here, the prediction direction can be one of past direction, future direction, or both directions. In step S809, it is determined whether the predicted direction is a future direction or not. If the prediction direction is not the future direction in step S809, the reference picture index information of the past direction is decoded in step S810. In step S811, MVD (Motion Vector Difference) information in the past direction is decoded. In step S812, MVP (Motion Vector Predictor) information in the past direction is decoded. In step S809, the predicted direction is a future direction or a bidirectional direction, or when step S812 is completed, it is determined in step S813 whether the predicted direction is a past direction. If the prediction direction is not the past direction in step S813, the future direction reference picture index information is decoded in step S814. In step S815, the MVD information of the future direction is decoded. In step S816, the future direction MVP information is decrypted and this flowchart ends. If the prediction mode in step S804 is the intra-screen prediction mode, the intra-screen prediction mode information is decoded in step S1317, and then the flowchart ends.

(공통 실시예)(Common Embodiment)

하기 실시예에서는 영상 부호화 장치와 영상 복호화 장치의 예측부에서 MERGE 후보 탐색부(204, 704), AMVP 후보 탐색부(206, 706)에서 현재 블록의 화면 간 예측을 위한 후보 움직임정보를 유도하는 방법에 대해서 설명할 것이다. 후보 움직임정보는 MERGE 후보 탐색부에서는 현재 블록의 움직임정보로 바로 결정되고, AMVP 후보 탐색부에서는 현재 블록의 최적 움직임정보를 전송하기 위한 예측기(Predictor)로 사용된다. In the following embodiment, a method of deriving candidate motion information for inter-screen prediction of the current block in the MERGE candidate search units (204, 704) and the AMVP candidate search units (206, 706) in the prediction units of the video encoding device and the video decoding device. will be explained. The candidate motion information is directly determined as the motion information of the current block in the MERGE candidate search unit, and is used as a predictor to transmit the optimal motion information of the current block in the AMVP candidate search unit.

도 9는 MERGE/AMVP 모드를 위한 후보 움직임정보를 유도하는 방법을 나타낸 흐름도이다. 본 흐름도에서 Merge 모드와 AMVP 모드의 후보 움직임정보를 유도하는 방법을 동일한 흐름도에 나타냈지만, 각 모드 별로 일부 후보들은 사용하지 않을 수도 있다. 따라서 모드 별로 유도 되는 후보 움직임정보는 다를 수 있으며, 유도되는 후보 움직임정보의 개수 또한 다를 수 있다. 예를 들어, Merge 모드는 공간적 후보 5(A)개 중 4(B)개의 후보를 선택할 수 있으며 AMVP 모드에서는 공간적 후보 4(A)개 중 2(B)개의 후보만을 선택할 수 있다. S901, S902 단계에서 A, B, C, D (A, B, C, D는 1 이상의 정수)는 각각 공간적 후보의 개수, 선택되는 공간적 후보의 개수, 시간적 후보의 개수, 선택되는 시간적 후보의 개수를 의미한다. Figure 9 is a flowchart showing a method of deriving candidate motion information for MERGE/AMVP mode. In this flowchart, the method of deriving candidate motion information for Merge mode and AMVP mode is shown in the same flowchart, but some candidates for each mode may not be used. Therefore, the candidate motion information derived for each mode may be different, and the number of candidate motion information derived may also be different. For example, Merge mode can select 4 (B) candidates out of 5 (A) spatial candidates, and AMVP mode can select only 2 (B) candidates out of 4 (A) spatial candidates. In steps S901 and S902, A, B, C, and D (A, B, C, and D are integers of 1 or more) are the number of spatial candidates, the number of selected spatial candidates, the number of temporal candidates, and the number of selected temporal candidates, respectively. means.

S901 단계의 설명은 전술한 S305, S401단계의 설명과 동일하다. 단, 공간적 후보를 위한 주변 블록들의 위치는 상이할 수 있다. 또한, 공간적 후보를 위한 주변 블록은, 제1 그룹, 제2 그룹 또는 제3 그룹 중 적어도 하나에 속할 수 있다. 여기서, 제1 그룹은, 현재 블록의 좌측 블록(A1) 또는 좌하단 블록(A4) 중 적어도 하나를 포함하고, 제2 그룹은 현재 블록의 상단 블록(A2) 또는 우상단 블록(A3) 중 적어도 하나를 포함하고, 제3 그룹은 현재 블록의 좌상단 블록(A5), 좌상단 블록의 하단에 인접한 블록 또는 좌상단 블록의 좌측에 인접한 블록 중 적어도 하나를 포함할 수 있다. The description of step S901 is the same as the description of steps S305 and S401 described above. However, the locations of surrounding blocks for spatial candidates may be different. Additionally, neighboring blocks for spatial candidates may belong to at least one of the first group, second group, or third group. Here, the first group includes at least one of the left block (A 1 ) or the bottom left block (A 4 ) of the current block, and the second group includes the top block (A 2 ) or the top right block (A 3 ) of the current block. ), and the third group may include at least one of the upper left block (A 5 ) of the current block, a block adjacent to the bottom of the upper left block, or a block adjacent to the left of the upper left block.

S902 단계의 설명은 전술한 S306, S402 단계의 설명과 동일하다. 마찬가지로 시간적 후보를 위한 블록들의 위치는 상이할 수 있다. The description of step S902 is the same as the description of steps S306 and S402 described above. Likewise, the locations of blocks for temporal candidates may be different.

S903 단계에서는 서브 블록 단위 시간적 후보를 추가한다. 단, AMVP 후보 리스트에서 서브 블록 단위 시간적 후보를 추가할 경우, 전술한 AMVP 모드의 움직임벡터 유도 방법에 의거하여 임의의 서브 블록 1개의 후보 움직임정보만을 예측기로 이용해야 하지만, 때에 따라서 2개 이상의 서브 블록 후보 움직임정보를 이용하여 예측기로 이용할 수도 있다. 본 단계의 내용은 하기 실시예 1에서 상세히 설명할 것이다. In step S903, temporal candidates are added in sub-block units. However, when adding a sub-block-level temporal candidate to the AMVP candidate list, only the candidate motion information of one random sub-block must be used as a predictor based on the motion vector derivation method of the AMVP mode described above, but in some cases, two or more sub-blocks may be used as a predictor. Block candidate motion information can also be used as a predictor. The contents of this step will be explained in detail in Example 1 below.

S904 단계에서는 History-based 후보를 추가한다. 본 단계의 내용은 하기 실시예 2에서 상세히 설명할 것이다. In step S904, history-based candidates are added. The contents of this step will be explained in detail in Example 2 below.

S905 단계에서는 Merge/AMVP list의 후보 움직임정보들 간 평균 후보를 추가한다. 본 단계의 내용은 하기 실시예 3에서 상세히 설명할 것이다.In step S905, an average candidate is added between candidate motion information in the Merge/AMVP list. The contents of this step will be explained in detail in Example 3 below.

S905 단계까지 거친 후, Merge/AMVP list의 후보 움직임정보들이 최대 개수까지 채워지지 않을 경우, S906 단계에서 제로 움직임정보를 추가하여 최대 개수까지 채운 후, 본 흐름도를 종료하고, 각 모드를 위한 후보 움직임정보 리스트 구성을 완료한다. 본 실시예에서 설명한 후보 움직임정보는 Merge/AMVP 모드 이외에 다양한 예측 모드에서 활용될 수도 있다. 또한, 도 9는 후보 리스트는 추가된 후보의 순서를 한정하는 것은 아니다. 예를 들어, 서브 블록 단위 시간적 후보는 공간적 후보보다 우선적으로 후보 리스트에 추가될 수 있다. 또는 평균 후보가 History-based 후보보다 우선적으로 후보 리스트에 추가될 수도 있다. 본 명세서에서, 후보 움직임정보 리스트, 후보 움직임정보 세트, 움직임정보 후보군, 후보 리스트는 서로 동일한 의미로 이해될 수 있다. After going through step S905, if the candidate motion information in the Merge/AMVP list is not filled to the maximum number, zero motion information is added in step S906 to fill the maximum number, and then this flowchart is terminated and the candidate motion information for each mode is completed. Complete the information list composition. The candidate motion information described in this embodiment may be used in various prediction modes other than Merge/AMVP mode. Additionally, the candidate list in Figure 9 does not limit the order of added candidates. For example, sub-block-level temporal candidates may be added to the candidate list in priority over spatial candidates. Alternatively, average candidates may be added to the candidate list in preference to history-based candidates. In this specification, a candidate motion information list, a candidate motion information set, a motion information candidate group, and a candidate list may be understood to have the same meaning.

(실시예 1)(Example 1)

본 실시예에서는 도 9의 S902, S903 단계의 시간적 후보, 서브 블록 단위 시간적 후보를 유도하는 방법에 대해서 상세히 설명할 것이다. 시간적 후보는 블록 단위 시간적 후보를 의미하며, 서브 블록 단위 시간적 후보와 구별될 수 있다. 여기서 서브 블록이란 현재 부호화 또는 복호화하고자 하는 블록(이하, 현재 블록)을 임의의 NxM (N, M ≥ 0) 크기의 블록으로 나눈 것으로, 현재 블록의 움직임정보를 유도하기 위한 기본 블록 단위를 의미한다. 서브 블록은 부호화기 및/또는 복호화기에 기-설정된 크기를 가질 수 있다. 예를 들어, 서브 블록은 4x4 또는 8x8와 같이 고정된 크기를 가진 정방형일 수 있다. 다만, 이에 한정되지 아니하며, 서브 블록의 형태는 비정방형일 수 있고, 서브 블록의 너비와 높이 중 적어도 하나는 8보다 클 수도 있다. 서브 블록 단위 시간적 후보는, 현재 블록이 NxM보다 큰 경우에 한하여 후보 리스트에 추가되도록 제한될 수 있다. 예를 들어, N과 M이 각각 8인 경우, 현재 블록의 너비와 높이가 각각 8보다 큰 경우에 한하여, 서브 블록 단위 시간적 후보가 후보 리스트에 추가될 수 있다.In this embodiment, a method of deriving temporal candidates in steps S902 and S903 of FIG. 9 and temporal candidates in sub-block units will be described in detail. A temporal candidate refers to a block-level temporal candidate and can be distinguished from a sub-block-level temporal candidate. Here, the subblock is a block that is currently to be encoded or decoded (hereinafter referred to as the current block) divided into blocks of a random NxM (N, M ≥ 0) size, and refers to a basic block unit for deriving motion information of the current block. . The subblock may have a size preset in the encoder and/or decoder. For example, a sub-block may be square with a fixed size, such as 4x4 or 8x8. However, it is not limited to this, and the shape of the sub-block may be non-square, and at least one of the width and height of the sub-block may be greater than 8. Subblock-level temporal candidates may be limited to be added to the candidate list only when the current block is larger than NxM. For example, when N and M are each 8, a sub-block unit temporal candidate can be added to the candidate list only if the width and height of the current block are each greater than 8.

도 10은 본 실시예를 설명하기 위한 기본 개념도이다. 도 10에는 현재 픽쳐의 현재 (서브) 블록 1개가 도시되어 있다. 해당 (서브) 블록에 대한 타깃 (서브) 블록을 타깃 픽쳐 내에서 탐색한다. 여기서 타깃 픽쳐와 타깃 (서브) 블록 정보는 각각 상위 헤더 혹은 현재 블록 단위로 전송될 수도 있고, 영상 부호화 장치와 영상 복호화 장치에서 동일한 조건으로 타깃 픽쳐와 타깃 (서브) 블록을 지정할 수도 있다. 현재 (서브) 블록의 타깃 픽쳐와 타깃 (서브) 블록이 결정된 후, 타깃 (서브) 블록의 움직임정보를 이용하여 현재 (서브) 블록의 움직임정보를 유도한다. Figure 10 is a basic conceptual diagram for explaining this embodiment. Figure 10 shows one current (sub) block of the current picture. The target (sub) block for the corresponding (sub) block is searched within the target picture. Here, the target picture and target (sub) block information may be transmitted in upper header or current block units, respectively, and the video encoding device and the video decoding device may designate the target picture and target (sub) block under the same conditions. After the target picture and target (sub) block of the current (sub) block are determined, the motion information of the current (sub) block is derived using the motion information of the target (sub) block.

구체적으로, 현재 블록의 각 서브 블록은 타깃 블록의 각 서브 블록과 대응 관계를 가진다. 서브 블록 단위 시간적 후보는 현재 블록 내 서브 블록 별로 움직임 정보를 가지며, 각 서브 블록의 움직임정보는 타깃 블록 내에서 대응 관계를 가진 서브 블록의 움직임정보를 이용하여 유도될 수 있다. 다만, 상기 대응 관계를 가진 서브 블록의 움직임정보가 가용하지 않은 경우가 존재할 수 있다. 이 경우, 해당 서브 블록의 움직임정보는, 디폴트 움직임정보로 설정될 수 있다. 여기서, 디폴트 움직임 정보는, 해당 서브 블록에 수평 방향 또는 수직 방향으로 인접한 주변 서브 블록의 움직임정보를 의미할 수 있다. 또는, 디폴트 움직임정보는, 타깃 블록의 중앙 샘플을 포함한 서브 블록의 움직임정보를 의미할 수도 있다. 다만, 이에 한정되지 아니하며, 디폴트 움직임정보는, 타깃 블록의 n개의 코너 샘플 중 어느 하나를 포함한 서브 블록의 움직임정보를 의미할 수 있다. n은 1, 2, 3, 또는 4일 수 있다. 또는, 중앙 샘플을 포함한 서브 블록 및/또는 n개의 코너 샘플을 포함한 서브 블록 중에서, 소정의 우선순서에 따라 가용한 움직임정보를 가진 서브 블록을 탐색하고, 가장 먼저 탐색된 서브 블록의 움직임정보를 디폴트 움직임정보로 설정할 수도 있다.Specifically, each subblock of the current block has a corresponding relationship with each subblock of the target block. The sub-block unit temporal candidate has motion information for each sub-block within the current block, and the motion information of each sub-block can be derived using the motion information of a sub-block with a corresponding relationship within the target block. However, there may be cases where the motion information of the sub-block with the corresponding relationship is not available. In this case, the motion information of the corresponding sub-block may be set as default motion information. Here, the default motion information may mean motion information of neighboring subblocks horizontally or vertically adjacent to the corresponding subblock. Alternatively, default motion information may mean motion information of a sub-block including the center sample of the target block. However, it is not limited to this, and the default motion information may mean motion information of a sub-block including any one of the n corner samples of the target block. n can be 1, 2, 3, or 4. Alternatively, among the sub-blocks including the center sample and/or the sub-blocks including n corner samples, sub-blocks with available motion information are searched according to a predetermined priority order, and the motion information of the sub-block searched first is set as default. It can also be set as movement information.

한편, 전술한 디폴트 움직임정보가 가용한지 여부에 대한 판단을 선제적으로 수행할 수 있다. 판단 결과, 디폴트 움직임정보가 가용하지 않은 경우에는 서브 블록 단위 시간적 후보의 움직임정보 유도 및 후보 리스트에의 추가 과정은 생략될 수 있다. 즉, 디폴트 움직임정보가 가용한 경우에 한하여, 서브 블록 단위 시간적 후보가 유도되고, 후보 리스트에 추가될 수 있다.Meanwhile, it is possible to preemptively determine whether the above-described default motion information is available. As a result of the determination, if the default motion information is not available, the process of deriving the motion information of the sub-block unit temporal candidate and adding it to the candidate list can be omitted. That is, only when default motion information is available, a sub-block unit temporal candidate can be derived and added to the candidate list.

한편, 움직임정보의 움직임벡터는 스케일링 처리가 된 움직임벡터를 의미할 수도 있다. 타깃 픽쳐와 타깃 (서브) 블록의 참조 픽쳐의 시간적 거리를 TD, 현재 픽쳐와 현재 (서브) 블록의 참조 픽쳐의 시간적 거리를 TB로 정하고, 수식 2를 이용하여 타깃 (서브) 블록의 움직임벡터(MV)를 스케일링한다. 스케일링된 움직임벡터(MVscale)는 현재 (서브) 블록의 예측 (서브) 블록을 참조 픽쳐 내에서 가리킬 때 사용되거나, 현재 (서브) 블록의 시간적 후보 또는 서브 블록 단위 시간적 후보의 움직임벡터로 이용될 수 있다. 단, 스케일링된 움직임벡터 유도 시에 수식 2에서 사용된 변수 MV는 타깃 (서브) 블록의 움직임벡터를 의미하고, MVscale은 현재 (서브) 블록의 스케일링된 움직임벡터를 의미한다. Meanwhile, the motion vector of motion information may mean a motion vector that has undergone scaling processing. Set the temporal distance between the target picture and the reference picture of the target (sub) block as TD, set the temporal distance between the current picture and the reference picture of the current (sub) block as TB, and use Equation 2 to determine the motion vector of the target (sub) block ( MV) is scaled. The scaled motion vector (MV scale ) can be used when pointing to the prediction (sub) block of the current (sub) block within a reference picture, or can be used as a motion vector for the temporal candidate of the current (sub) block or the temporal candidate on a sub-block basis. You can. However, when deriving the scaled motion vector, the variable MV used in Equation 2 means the motion vector of the target (sub) block, and MV scale means the scaled motion vector of the current (sub) block.

또한, 현재 (서브) 블록의 참조 픽쳐 정보는 영상 부호화 장치와 영상 복호화 장치가 동일한 조건으로 지정될 수도 있고, 현재 (서브) 블록의 참조 픽쳐 정보를 현재 (서브) 블록 단위로 전송하는 것도 가능하다. In addition, the reference picture information of the current (sub) block may be specified under the same conditions for the video encoding device and the video decoding device, and it is also possible to transmit the reference picture information of the current (sub) block in units of the current (sub) block. .

하기 현재 (서브) 블록의 타깃 (서브) 블록을 영상 부호화 장치와 영상 복호화 장치에서 동일한 조건으로 결정하는 방법에 대해서 좀 더 상세히 설명할 것이다. 현재 (서브) 블록의 타깃 (서브) 블록은 Merge/AMVP 후보 리스트에 있는 후보 움직임정보들 중 하나를 이용하여 가리킬 수 있다. 좀 더 상세하게는 후보 리스트에 있는 후보 움직임정보들의 예측 모드를 파악한 후, 예측 모드에 우선 순위를 부여하여 결정할 수도 있다. 예를 들어, AMVP 모드, MERGE 모드, SKIP 모드 순으로 우선순위를 두어서 후보 리스트에 있는 움직임정보들 중 하나를 선택하여 타깃 (서브) 블록을 가리킬 수 있다. Below, we will explain in more detail how to determine the target (sub) block of the current (sub) block under the same conditions in the video encoding device and the video decoding device. The target (sub) block of the current (sub) block can be indicated using one of the candidate motion information in the Merge/AMVP candidate list. More specifically, after identifying the prediction modes of the candidate motion information in the candidate list, priority may be given to the prediction modes. For example, by prioritizing AMVP mode, MERGE mode, and SKIP mode, one of the motion information in the candidate list can be selected to point to the target (sub) block.

또한 단순하게, 후보 리스트에 있는 가장 첫번째 후보 움직임정보를 무조건적으로 선택하여 타깃 (서브) 블록을 가리킬 수도 있다. 만약 동일한 예측 모드로 코딩된 후보 움직임정보들의 경우에는 후보 리스트상에서 우선 순위가 높았던 순으로 선택을 하는 등 다양한 우선 순위 조건을 이용할 수 있다. 단, 후보 움직임정보의 참조 픽쳐와 타깃 픽쳐가 다를 경우에는 해당 후보 움직임정보는 제외할 수도 있다. 혹은 현재 (서브) 블록과 동일 위치에 해당하는 타깃 픽쳐 내 타깃 (서브) 블록으로 결정할 수도 있다. Additionally, simply, the first candidate motion information in the candidate list can be unconditionally selected to point to the target (sub) block. If candidate motion information is coded in the same prediction mode, various priority conditions can be used, such as selecting in the order of highest priority in the candidate list. However, if the reference picture of the candidate motion information and the target picture are different, the candidate motion information may be excluded. Alternatively, it may be determined as a target (sub) block in the target picture corresponding to the same location as the current (sub) block.

구체적으로, 타킷 (서브) 블록은, 현재 (서브) 블록의 위치에서 소정의 시간적 움직임벡터(temporal MV)만큼 쉬프트된 위치의 블록으로 결정될 수 있다. 여기서, 시간적 움직임벡터는, 현재 블록에 공간적으로 인접한 주변 블록의 움직임벡터로 설정될 수 있다. 상기 주변 블록은, 현재 블록의 좌측, 상단, 좌하단, 우상단 또는 좌상단 블록 중 어느 하나일 수 있다. 또는, 시간적 움직임벡터는, 부호화/복호화 장치에 기-약속된 고정된 위치의 주변 블록만을 이용하여 유도될 수도 있다. 예를 들어, 상기 고정된 위치의 주변 블록은 현재 블록의 좌측 블록(A1)일 수 있다. 또는, 상기 고정된 위치의 주변 블록은 현재 블록의 상단 블록(A2)일 수 있다. 또는, 상기 고정된 위치의 주변 블록은 현재 블록의 좌하단 블록(A3)일 수 있다. 또는, 상기 고정된 위치의 주변 블록은 현재 블록의 우상단 블록(A4)일 수 있다. 또는, 상기 고정된 위치의 주변 블록은 현재 블록의 좌상단 블록(A5)일 수 있다.Specifically, the target (sub) block may be determined as a block whose position is shifted by a predetermined temporal motion vector (temporal MV) from the position of the current (sub) block. Here, the temporal motion vector may be set to the motion vector of a neighboring block spatially adjacent to the current block. The surrounding block may be any one of the blocks to the left, top, bottom left, top right, or top left of the current block. Alternatively, the temporal motion vector may be derived using only surrounding blocks at fixed positions that have been previously promised to the encoding/decoding device. For example, the neighboring block at the fixed position may be the left block (A1) of the current block. Alternatively, the surrounding block at the fixed position may be the upper block (A2) of the current block. Alternatively, the surrounding block at the fixed position may be the lower left block (A3) of the current block. Alternatively, the surrounding block at the fixed position may be the upper right block (A4) of the current block. Alternatively, the surrounding block at the fixed position may be the upper left block (A5) of the current block.

상기 설정은, 주변 블록의 참조 픽쳐와 타깃 픽쳐가 동일한 경우(예를 들어, 참조 픽쳐와 타깃 픽쳐 간의 POC 차이가 0인 경우)에 한하여 수행될 수 있다. 주변 블록의 참조 픽쳐와 타깃 픽쳐가 동일하지 않은 경우, 시간적 움직임벡터는 (0,0)으로 설정될 수 있다.The above setting can be performed only when the reference picture and the target picture of the neighboring block are the same (for example, when the POC difference between the reference picture and the target picture is 0). If the reference picture of the neighboring block is not the same as the target picture, the temporal motion vector may be set to (0,0).

상기 설정된 시간적 움직임벡터는 소정의 오프셋 또는 쉬프트값 중 적어도 하나에 기초하여 라운딩될 수 있다. 여기서, 오프셋은, 쉬프트값에 기초하여 유도되고, 쉬프트값은 우측 방향의 쉬프트값(rightShift) 또는 좌측 방향의 쉬프트값(leftShift) 중 적어도 하나를 포함할 수 있다. 쉬프트값은 부호화/복호화 장치에 기-설정된 정수일 수 있다. 예를 들어, rightShift는 4로, leftShift는 0으로 각각 설정될 수 있다. 예를 들어, 시간적 움직임벡터의 라운딩은 다음 수학식 3과 같이 수행될 수 있다.The set temporal motion vector may be rounded based on at least one of a predetermined offset or shift value. Here, the offset is derived based on a shift value, and the shift value may include at least one of a right shift value (rightShift) or a left shift value (leftShift). The shift value may be an integer preset in the encoding/decoding device. For example, rightShift can be set to 4 and leftShift can be set to 0. For example, rounding of a temporal motion vector can be performed as in Equation 3 below.

[수학식 3][Equation 3]

offset = ( rightShift = = 0 ) ? 0 : ( 1 << ( rightShift - 1 ) )offset = ( rightShift = = 0 ) ? 0 : ( 1 << ( rightShift - 1 ) )

mvXR[ 0 ] = ( ( mvX[ 0 ] + offset - ( mvX[ 0 ] >= 0 ) ) >> rightShift ) << leftShiftmvX R [ 0 ] = ( ( mvX[ 0 ] + offset - ( mvX[ 0 ] >= 0 ) ) >> rightShift ) << leftShift

mvXR[ 1 ] = ( ( mvX[ 1 ] + offset - ( mvX[ 1 ] >= 0 ) ) >> rightShift ) << leftShiftmvX R [ 1 ] = ( ( mvX[ 1 ] + offset - ( mvX[ 1 ] >= 0 ) ) >> rightShift ) << leftShift

좀 더 상세한 설명을 위해서 2가지 조건을 가정한다. 첫번째는 이미 코딩이 끝난 픽쳐 내에서는 움직임정보를 4x4 서브 블록 단위로 저장하여 보관하고, (여기서, 움직임정보 저장을 위한 4x4 서브 블록 단위 경계들과 타깃 픽쳐 내 타깃 (서브) 블록의 경계들은 일치함) 두번째는 현재 블록 내 서브 블록의 크기를 4x4로 한다는 것이다. 전술한 블록들의 크기는 다양하게 결정할 수 있다. 이 때, 현재 (서브) 블록에서 동일 위치에 해당하는 타깃 픽쳐 내 타깃 (서브) 블록의 위치 혹은 현재 (서브) 블록의 Merge/AMVP 후보 리스트에 있는 움직임정보를 이용하여 타깃 픽쳐 내에서 가리킨 타깃 (서브) 블록의 위치를 결정하는 경우, 타깃 픽쳐 내에서 움직임 정보가 저장된 4x4 서브 블록 단위상에서 각 서브 블록의 기준 좌표와 현재 (서브) 블록의 기준 좌표가 대응하지 못할 수도 있다. 예를 들어, 현재 (서브) 블록의 맨 좌상단 화소의 좌표는 (12, 12) 인데 타깃 (서브) 블록의 맨 좌상단 좌표는 (8, 8) 일 수도 있는 등의 불일치가 발생할 수 있다. 이는 타깃 픽쳐의 블록 분할 구조가 현재 픽쳐와 다르기 때문에 발생하는 어쩔 수 없는 현상이다.For a more detailed explanation, two conditions are assumed. First, in a picture that has already been coded, the motion information is stored in units of 4x4 subblocks (here, the boundaries of the 4x4 subblock units for storing motion information and the boundaries of the target (sub) block in the target picture match. ) The second is to set the size of the subblock within the current block to 4x4. The sizes of the aforementioned blocks can be determined in various ways. At this time, the position of the target (sub) block in the target picture corresponding to the same position in the current (sub) block or the target (pointed to within the target picture using the motion information in the Merge/AMVP candidate list of the current (sub) block) When determining the location of a sub) block, the reference coordinates of each sub block and the reference coordinates of the current (sub) block may not correspond on the 4x4 sub block unit in which motion information is stored within the target picture. For example, the coordinates of the top left pixel of the current (sub) block may be (12, 12), but the coordinates of the top left pixel of the target (sub) block may be (8, 8). This is an unavoidable phenomenon that occurs because the block division structure of the target picture is different from the current picture.

도 11은 서브 블록 단위가 아닌 현재 블록 단위에서 시간적 후보 움직임정보를 유도할 때, 타깃 블록을 결정하는 방법을 설명하기 위한 예시 도면이다. 현재 블록의 기준 좌표에서 타깃 위치를 가리키는 움직임벡터가 (동일 위치 (즉, 제로 움직임) 혹은 후보 리스트에서 유도된 움직임벡터) 결정된 후, 타깃 픽쳐 내에서 해당 움직임벡터가 가리키는 지점을 찾는다. 타깃 픽쳐 내에서 해당 타깃 지점을 포함하는 4x4 타깃 서브 블록의 움직임정보를 현재 블록의 스케일링된 움직임벡터를 유도할 때 이용할 수 있다. 혹은 현재 블록에서 복수개의 기준 좌표를 두고 각 기준 좌표들이 가리키는 타깃 지점을 탐색하여, 타깃 지점이 모두 동일한 4x4 타깃 서브 블록을 가리킨다면 해당 타깃 서브 블록의 움직임정보를 현재 블록의 스케일링된 움직임벡터를 유도할 때 사용하면 되지만, 복수개의 4x4 타깃 서브 블록들을 가리킨다면 각 타깃 서브 블록들의 평균 움직임정보를 이용하여 현재 블록의 스케일링된 움직임벡터를 유도할 때 사용할 수도 있다. 타깃 지점은 도 11의 예시처럼 현재 블록 중앙 영역의 2개의 타깃 위치를 사용할 수도 있지만 그 이상을 사용하는 것도 물론이고 다른 현재 블록 내 있는 화소 위치 어디든 사용 가능하다. 평균 움직임정보를 계산하기 위한 움직임 정보도 당연히 2개 이상이 될 수 있다. 혹은 각 복수개의 타깃 서브 블록들을 이용하여 복수개의 스케일링된 움직임벡터를 유도 후, 복수개의 예측 블록을 생성하여 해당 예측 블록들을 가중합하여 최종 예측 블록을 생성할 수도 있다. FIG. 11 is an example diagram illustrating a method of determining a target block when deriving temporal candidate motion information in a current block unit rather than a sub-block unit. After the motion vector pointing to the target position in the reference coordinates of the current block (same position (i.e., zero motion) or a motion vector derived from the candidate list) is determined, the point pointed to by the motion vector within the target picture is found. The motion information of the 4x4 target sub-block containing the target point within the target picture can be used to derive the scaled motion vector of the current block. Alternatively, search for target points indicated by each reference coordinate with a plurality of reference coordinates in the current block, and if all target points point to the same 4x4 target sub-block, use the motion information of the target sub-block to derive the scaled motion vector of the current block. However, if it refers to a plurality of 4x4 target sub-blocks, it can also be used to derive the scaled motion vector of the current block using the average motion information of each target sub-block. The target point may use two target positions in the center area of the current block as shown in the example of FIG. 11, but it can also use more than that, as well as any pixel position in another current block. Of course, there may be more than two pieces of motion information for calculating average motion information. Alternatively, a plurality of scaled motion vectors may be derived using each of the plurality of target sub-blocks, then a plurality of prediction blocks may be generated and the corresponding prediction blocks may be weighted to generate the final prediction block.

도 12, 13은 현재 블록 내 서브 블록 단위로 시간적 후보 움직임정보를 유도할 때, 타깃 블록을 결정하는 방법에 대해서 설명하기 위한 예시 도면이다. 도 12는 서브 블록 단위로 기준 위치가 1개인 경우의 예시 도면이고, 도 13은 서브 블록 단위로 복수개의 기준 위치가 사용될 때의 예시 도면이다. Figures 12 and 13 are example diagrams to explain a method of determining a target block when deriving temporal candidate motion information on a sub-block basis within the current block. FIG. 12 is an example diagram when there is one reference position on a sub-block basis, and FIG. 13 is an example diagram when a plurality of reference positions are used on a sub-block basis.

도 12에서는 서브 블록 단위로 기준 위치가 서브 블록의 좌상단 화소 위치로 예시하였다. 현재 블록의 맨 우하단 서브 블록의 기준 좌표를 기점으로 찾은 타깃 픽쳐의 4x4 타깃 서브 블록을 기준으로 현재 블록과 동일한 크기의 타깃 블록을 결정한 후, 현재 블록과 타깃 블록의 동일 위치 서브 블록들끼리 타깃 서브 블록들의 움직임 정보를 이용하여 현재 서브 블록의 스케일링된 움직임벡터를 각각 유도할 수도 있다. 혹은 서브 블록의 기준 좌표에서 타깃 위치를 가리키는 움직임벡터를 통해 타깃 픽쳐의 타깃 위치를 파악한 후, 해당 타깃 위치가 포함된 4x4 타깃 서브 블록의 움직임정보를 현재 서브 블록의 스케일링된 움직임벡터를 유도할 때 사용할 수 있다.In Figure 12, the reference position on a sub-block basis is illustrated as the upper left pixel position of the sub-block. After determining a target block with the same size as the current block based on the 4x4 target sub-block of the target picture found based on the reference coordinates of the bottom-right sub-block of the current block, the sub-blocks in the same position of the current block and the target block are used as targets. The scaled motion vector of the current sub-block can also be derived using the motion information of the sub-blocks. Or, after identifying the target position of the target picture through a motion vector indicating the target position in the reference coordinates of the sub-block, the scaled motion vector of the current sub-block is derived from the motion information of the 4x4 target sub-block containing the target position. You can use it.

도 13에서는 현재 서브 블록 별로 복수개의 타깃 서브 블록을 이용하여 스케일링된 움직임벡터를 유도하는 방법을 설명하기 위한 예시 도면이다. 도 13의 예시처럼 서브 블록 D의 스케일링된 움직임벡터를 유도할 경우에는, 서브 블록 D 내의 복수개의 기준 좌표를 기점으로 타깃 픽쳐 내 타깃 위치를 파악한다. 이 후, 타깃 위치가 동일한 타깃 서브 블록을 가리킬 경우 해당 타깃 서브 블록의 움직임정보를 이용하여 현재 서브 블록의 스케일링된 움직임벡터를 유도할 수 있지만, 도 13처럼 타깃 위치들이 서로 다른 타깃 서브 블록을 가리킬 경우에는 각 타깃 서브 블록들의 평균 움직임정보를 계산하여 현재 서브 블록의 스케일링된 움직임벡터를 유도할 수도 있다. 또한, 각 타깃 서브 블록들의 움직임정보를 이용하여 서로 다른 스케일링된 움직임벡터를 따로 유도한 후, 예측 서브 블록을 각각 생성하고, 각 예측 서브 블록들을 가중합하여 최종 예측 블록을 생성할 수도 있다. 현재 블록 내 다른 서브 블록들(서브 블록 A, B, C)도 전술한 방법으로 예측 서브 블록을 생성할 수 있다.FIG. 13 is an example diagram illustrating a method of deriving a scaled motion vector using a plurality of target sub-blocks for each current sub-block. When deriving the scaled motion vector of sub-block D as in the example of FIG. 13, the target position within the target picture is identified based on a plurality of reference coordinates within sub-block D. Afterwards, if the target positions point to the same target sub-block, the scaled motion vector of the current sub-block can be derived using the motion information of the target sub-block. However, as shown in Figure 13, if the target positions point to different target sub-blocks, the scaled motion vector of the current sub-block can be derived. In this case, the scaled motion vector of the current sub-block may be derived by calculating the average motion information of each target sub-block. Additionally, different scaled motion vectors may be separately derived using the motion information of each target sub-block, then prediction sub-blocks may be separately generated, and the final prediction block may be generated by weighted summing the prediction sub-blocks. Other subblocks (subblocks A, B, and C) within the current block can also generate prediction subblocks using the above-described method.

(실시예 2)(Example 2)

본 실시예에서는 도 9의 904 단계를 상세히 설명할 것이다. History-based 후보는 (이하, '복원정보기반 후보'라 칭함) 시퀀스, 픽쳐 혹은 슬라이스 단위로, 현재 블록 이전에 부호화/복호화된 움직임정보를 저장하기 위한 복원정보기반 움직임 후보 저장 버퍼(이하, 'H 버퍼'라 칭함)가 존재한다. 해당 버퍼는 코딩된 움직임정보를 FIFO(First-in First-out) 방식으로 버퍼를 업데이트하면서 관리한다. H 버퍼는 CTU, CTU행, 슬라이스 혹은 픽쳐 단위로 초기화될 수 있고, 현재 블록이 움직임 정보에 의해 예측되어 코딩된 경우, 해당 움직임 정보들을 H 버퍼에 업데이트 한다. H 버퍼에 저장된 움직임정보들은 도 9의 S904 단계에서 Merge/AMVP 후보로 이용될 수 있다. H 버퍼의 후보 움직임정보를 후보 리스트에 추가할 때에는 H 버퍼에 가장 최근에 업데이트된 움직임정보 순으로 추가할 수도 있고, 그 반대도 가능하다. 혹은 화면 간 예측 모드에 따라서, H 버퍼의 움직임정보를 어느 순서로 꺼내어 후보 리스트에 추가할지를 결정할 수도 있다.In this embodiment, step 904 of FIG. 9 will be described in detail. History-based candidates (hereinafter referred to as 'recovered information-based candidates') are sequence, picture or slice units, and are restoration information-based motion candidate storage buffers (hereinafter referred to as 'recovered information-based candidates') for storing motion information encoded/decoded before the current block. (referred to as 'H buffer') exists. The buffer manages the coded motion information by updating the buffer using the FIFO (First-in First-out) method. The H buffer can be initialized in units of CTU, CTU row, slice, or picture, and if the current block is predicted and coded based on motion information, the corresponding motion information is updated in the H buffer. The motion information stored in the H buffer can be used as a Merge/AMVP candidate in step S904 of FIG. 9. When adding candidate motion information of the H buffer to the candidate list, motion information can be added to the H buffer in the order of the most recently updated motion information, or vice versa. Alternatively, depending on the inter-screen prediction mode, it may be decided in which order to retrieve the motion information from the H buffer and add it to the candidate list.

구체적으로, 일 예로, H 버퍼와 후보 리스트 간의 중복성 체크를 통해서, H 버퍼의 움직임정보가 후보 리스트에 추가될 수 있다. 머지 모드(Merge mode)의 경우, 중복성 체크는, 후보 리스트의 머지 후보 일부와 H 버퍼의 움직임정보 일부에 대해서 수행될 수 있다. 후보 리스트의 일부는, 공간적 머지 후보 중 좌측 블록 및 상단 블록을 포함할 수 있다. 다만, 이에 한정되지 아니하며, 공간적 머지 후보 중 어느 하나의 블록으로 제한될 수도 있고, 좌하단 블록, 우상단 블록, 좌상단 블록 또는 시간적 머지 후보 중 적어도 하나를 더 포함할 수도 있다. 한편, H 버퍼의 일부는, H 버퍼에 가장 최근에 추가된 m개의 움직임정보를 의미할 수 있다. 여기서, m은 1, 2, 3 또는 그 이상이고, 부호화/복호화 장치에 기-약속된 고정된 값일 수 있다. H 버퍼에 5개의 움직임정보가 저장되어 있고, 각 움직임정보에 1 내지 5의 인덱스가 할당되어 있다고 가정한다. 인덱스가 클수록 나중에 저장된 움직임정보를 의미한다. 이때, 인덱스 5, 4 및 3을 가진 움직임정보와 상기 후보 리스트의 머지 후보 간의 중복성을 체크할 수 있다. 또는, 인덱스 5 및 4를 가진 움직임정보와 상기 후보 리스트의 머지 후보 간의 중복성을 체크할 수도 있다. 또는, 가장 나중에 추가된 인덱스 5의 움직임정보는 제외하고, 인덱스 4 및 3을 가진 움직임정보와 상기 후보 리스트의 머지 후보 간의 중복성을 체크할 수도 있다. 중복성 체크 결과, 동일한 움직임정보가 하나라도 존재하는 경우, H 버퍼의 움직임정보는 후보 리스트에 추가되지 않을 수 있다. 반면 동일한 움직임정보가 존재하지 않는 경우, H 버퍼의 움직임정보는 후보 리스트의 마지막 위치에 추가될 수 있다. 이때, H 버퍼에서 최근에 저장된 움직임정보의 순서로(즉, 인덱스가 큰 순서부터 작은 순서로) 후보 리스트에 추가될 수 있다. 다만, H 버퍼에서 가장 나중에 저장된 움직임정보(가장 큰 인덱스를 가진 움직임정보)는 후보 리스트에 추가되지 않도록 제한될 수도 있다.Specifically, as an example, motion information of the H buffer may be added to the candidate list through a redundancy check between the H buffer and the candidate list. In the case of Merge mode, a redundancy check can be performed on some of the merge candidates in the candidate list and some of the motion information in the H buffer. Part of the candidate list may include left blocks and top blocks among spatial merge candidates. However, it is not limited to this, and may be limited to one block among the spatial merge candidates, and may further include at least one of the lower left block, upper right block, upper left block, or temporal merge candidate. Meanwhile, part of the H buffer may mean the m pieces of motion information most recently added to the H buffer. Here, m is 1, 2, 3 or more and may be a fixed value pre-promised in the encoding/decoding device. Assume that 5 pieces of motion information are stored in the H buffer, and an index of 1 to 5 is assigned to each motion information. The larger the index, the more motion information is stored later. At this time, redundancy between motion information with indices 5, 4, and 3 and merge candidates of the candidate list can be checked. Alternatively, redundancy between motion information with indices 5 and 4 and merge candidates of the candidate list may be checked. Alternatively, the motion information with index 5, which was added last, may be excluded and the redundancy between motion information with indices 4 and 3 and the merge candidates in the candidate list may be checked. As a result of the redundancy check, if there is at least one piece of identical motion information, the motion information in the H buffer may not be added to the candidate list. On the other hand, if the same motion information does not exist, the motion information in the H buffer may be added to the last position of the candidate list. At this time, motion information that was recently stored in the H buffer may be added to the candidate list in order (i.e., from large to small index). However, the motion information stored last in the H buffer (motion information with the largest index) may be restricted from being added to the candidate list.

반면, AMVP 모드의 경우, H 버퍼에 먼저 저장된 움직임정보(특히, 움직임벡터)의 순서로 후보 리스트에 추가될 수 있다. 즉, H 버퍼에 저장된 움직임정보 중 작은 인덱스를 가진 움직임정보가 큰 인덱스를 가진 움직임정보보다 먼저 후보 리스트에 추가될 수 있다.On the other hand, in the case of AMVP mode, motion information (especially motion vectors) stored first in the H buffer can be added to the candidate list. That is, among the motion information stored in the H buffer, motion information with a small index may be added to the candidate list before motion information with a large index.

한편, H 버퍼에 저장된 움직임벡터가 후보 리스트에 동일하게 추가될 수도 있고, 전술한 라운딩 과정이 적용된 움직임벡터가 후보 리스트에 추가될 수도 있다. 라운딩은, 현재 블록의 움직임벡터의 정확도에 대응되도록 후보 움직임정보의 정확도를 조절하기 위함이다. 수학식 3을 참조하면, mvXR는 라운딩 과정이 적용된 움직임벡터를, mvX는 H 버퍼에 저장된 움직임벡터를 각각 의미할 수 있다. 또한, 쉬프트값인 rightShift 또는 leftShift 중 적어도 하나는, 움직임벡터의 정확도(혹은 해상도)를 고려하여 결정될 수 있다. 예를 들어, 움직임벡터의 정확도가 1/4 샘플인 경우, 쉬프트값은 2로 결정되고, 1/2 샘플인 경우, 쉬프트값은 3으로 결정될 수 있다. 움직임벡터의 정확도가 1 샘플인 경우, 쉬프트값은 4로 결정되고, 4 샘플인 경우, 쉬프트값은 6으로 결정될 수 있다. RightShift와 leftShift는 동일한 값으로 설정될 수 있다.Meanwhile, motion vectors stored in the H buffer may be equally added to the candidate list, or motion vectors to which the above-described rounding process has been applied may be added to the candidate list. Rounding is to adjust the accuracy of the candidate motion information to correspond to the accuracy of the motion vector of the current block. Referring to Equation 3, mvX R may mean a motion vector to which a rounding process has been applied, and mvX may mean a motion vector stored in the H buffer. Additionally, at least one of rightShift or leftShift, which is a shift value, may be determined considering the accuracy (or resolution) of the motion vector. For example, if the accuracy of the motion vector is 1/4 sample, the shift value may be determined as 2, and if the accuracy of the motion vector is 1/2 sample, the shift value may be determined as 3. If the accuracy of the motion vector is 1 sample, the shift value may be determined as 4, and if the accuracy of the motion vector is 4 samples, the shift value may be determined as 6. RightShift and leftShift can be set to the same value.

H 버퍼에 저장되는 움직임정보를 Merge/AMVP 후보 리스트에 추가할 때, 추가 될 수 있는 움직임정보의 개수를 제한할 수도 있다. 예를 들어, Merge/AMVP 후보 리스트의 최대 후보 개수까지 모두 H 버퍼에 있는 움직임정보를 이용하여 채울 수도 있지만, (최대 후보 개수 - 1)개 까지만 채울 수도 있다. When adding motion information stored in the H buffer to the Merge/AMVP candidate list, the number of motion information that can be added may be limited. For example, the maximum number of candidates in the Merge/AMVP candidate list can be filled using the motion information in the H buffer, but it can also be filled only up to (maximum number of candidates - 1).

H 버퍼에 저장되는 후보 움직임정보의 개수는 영상 부호화 장치와 영상 복호화 장치에서 동일한 조건으로 결정할 수도 있고, 상위 헤더에서 영상 복호화 장치로 전송될 수도 있다.The number of candidate motion information stored in the H buffer may be determined by the video encoding device and the video decoding device under the same conditions, or may be transmitted to the video decoding device from the upper header.

구체적으로, Merge 후보 리스트의 경우, H 버퍼의 움직임정보를 이용하여 (최대 후보 개수-n)개까지만 채울 수 있다. 여기서, n은 1, 2, 또는 그 이상의 정수일 수 있다. 최대 후보 개수는, 부호화/복호화 장치에 기-정의된 고정된 개수(예를 들어, 5개, 6개, 7개, 8개)로 결정되거나, 최대 후보 개수를 지시하기 위해 시그날링된 정보에 기초하여 가변적으로 결정될 수도 있다. 한편, AMVP 후보 리스트의 경우, H 버퍼의 움직임정보를 이용하여 최대 후보 개수까지 채울 수 있다. AMVP 후보 리스트의 최대 후보 개수는 2개, 3개, 4개 또는 그 이상일 수 있다. AMVP 후보 리스트의 경우, Merge 후보 리스트와 달리 최대 후보 개수가 가변적이지 않을 수 있다.Specifically, in the case of the merge candidate list, only up to (maximum number of candidates - n) can be filled using the motion information of the H buffer. Here, n may be an integer of 1, 2, or more. The maximum number of candidates is determined as a fixed number (e.g., 5, 6, 7, 8) pre-defined in the encoding/decoding device, or is determined by information signaled to indicate the maximum number of candidates. It may be determined variably based on Meanwhile, in the case of the AMVP candidate list, it can be filled up to the maximum number of candidates using the motion information of the H buffer. The maximum number of candidates in the AMVP candidate list may be 2, 3, 4, or more. In the case of the AMVP candidate list, unlike the Merge candidate list, the maximum number of candidates may not be variable.

H 버퍼를 업데이트하는 제1 방법은 도 14를 참조한다. H 버퍼는 첫번째 CTU 행에서는 블록의 코딩 순으로 움직임정보들을 업데이트 한다. 두번째 CTU행부터는 블록의 코딩 순으로 움직임정보들을 업데이트 하는 것은 동일하지만, 상단 CTU 내에서 현재 CTU행과 인접한 복원 블록들에 저장된 움직임정보들을 추가 고려하여 H 버퍼를 업데이트할 수도 있다. 도 14에서 CTU 내의 mi는 Motion Information의 약어로써, 마지막 CTU행을 제외한 나머지 CTU행에서 맨 하단 블록들에 저장되어 있는 복원 움직임정보이다. H 버퍼에는 최대 P(P는 1 이상의 정수)개의 움직임정보가 업데이트 될 수 있으며, H 버퍼가 초기화되는 단위에 따라서 업데이트 방법이 달라질 수 있다. 본 실시예 에서는 CTU 단위로 초기화될 때와, CTU행 단위로 초기화될 때에 따른 H 버퍼 업데이트 방법에 대해서 설명할 것이다. 먼저 H 버퍼가 CTU 단위로 초기화될 때 두번째 CTU행의 각 CTU는 코딩을 시작하기 전에 H 버퍼를 mi를 이용하여 초기화할 수 있다. 여기서 초기화의 의미는 완전히 비워진 H 버퍼에 어떠한 움직임정보를 다시 업데이트한다는 것을 의미한다. 예를 들어, CTU8을 코딩 하기 전에 CTU3의 하단 4개의 mi를 이용하여 H 버퍼를 초기화할 수 있다. mi를 업데이트하는 순서 또한 다양하게 결정할 수 있다. 현재 좌측에 있는 mi부터 업데이트할 수도 있고, 그 반대로 우측에 있는 mi부터 업데이트할 수도 있다. H 버퍼가 CTU행 단위로 초기화될 때에는 각 CTU행의 첫번째 CTU에서만 상단 CTU의 mi를 이용해서 업데이트할 수도 있다. 또한, 각 초기화 단위로 H 버퍼를 모두 비워서 초기화를 할 수도 있다. 한편, 가장 최근에 부호화/복호화된 움직임정보가 H 버퍼에 기-저장된 움직임정보와 동일한 경우, 가장 최근의 움직임정보는 H 버퍼에 추가되지 않을 수 있다. 또는, 가장 최근의 움직임정보와 동일한 움직임정보를 H 버퍼에서 제거하고, 가장 최근의 움직임정보를 H 버퍼에 저장할 수도 있다. 이때, 가장 최근의 움직임 정보는, H 버퍼의 가장 마지막 위치에 저장될 수 있다.Refer to FIG. 14 for a first method of updating the H buffer. The H buffer updates motion information in the coding order of blocks in the first CTU row. Starting from the second CTU row, the motion information is updated in the coding order of the blocks, but the H buffer can be updated by additionally considering the motion information stored in restored blocks adjacent to the current CTU row within the upper CTU. In FIG. 14, mi in CTU is an abbreviation for Motion Information, and is restored motion information stored in the bottom blocks of all CTU rows except the last CTU row. Up to P pieces of motion information (P is an integer greater than 1) can be updated in the H buffer, and the update method may vary depending on the unit in which the H buffer is initialized. In this embodiment, the H buffer update method will be described depending on when initialized in CTU units and when initialized in CTU row units. First, when the H buffer is initialized in CTU units, each CTU in the second CTU row can initialize the H buffer using mi before starting coding. Here, initialization means updating any motion information again in the completely emptied H buffer. For example, before coding CTU 8 , the H buffer can be initialized using the lower four mi of CTU 3 . The order in which mi is updated can also be determined in various ways. You can update from the mi on the left, or vice versa, you can update from the mi on the right. When the H buffer is initialized in units of CTU rows, only the first CTU of each CTU row can be updated using mi of the top CTU. Additionally, initialization can be performed by emptying the entire H buffer in each initialization unit. Meanwhile, if the most recently encoded/decoded motion information is the same as the motion information pre-stored in the H buffer, the most recent motion information may not be added to the H buffer. Alternatively, motion information identical to the most recent motion information may be removed from the H buffer, and the most recent motion information may be stored in the H buffer. At this time, the most recent motion information may be stored in the last location of the H buffer.

H 버퍼를 업데이트하는 제2 방법은 도 15를 참조한다. 제2 방법은 H 버퍼 이외에 추가 움직임후보 저장 버퍼를 둔다. 이 버퍼는 상단 CTU의 복원 움직임정보(이하, 'Vmi'라 칭함)를 저장하는 버퍼(이하, 'V 버퍼'라 칭함)이다. 이 V 버퍼는 전술한 H 버퍼가 CTU행 혹은 슬라이스 단위로 초기화될 때 이용 가능할 수 있으며, V 버퍼는 CTU행 단위로 초기화될 수 있다. 현재 픽쳐에서 마지막 CTU행을 제외한 나머지 CTU행에서는 하단 CTU행을 위해서 V 버퍼 내 Vmi를 업데이트 해야 한다. 여기서 V 버퍼에는 최대 Q(Q는 1 이상의 정수)개의 움직임정보가 업데이트 될 수 있고, Vmi에 해당하는 움직임정보는 다양한 방법으로 결정할 수 있다. 예를 들어, Vmi는 CTU의 센터 좌표가 포함된 블록의 복원 움직임정보가 될 수도 있고, 상단 CTU에서 센터 좌표가 포함된 블록을 코딩 할 때, H 버퍼에 포함된 가장 최신 순의 움직임정보일 수도 있다. 하나의 CTU에서 업데이트되는 Vmi는 1개 이상일 수 있으며 업데이트된 Vmi는 하단 CTU의 H 버퍼를 업데이트할 때 사용된다. 첫번째 CTU행을 제외한 나머지 CTU행에서는 각 CTU 별로 상단 CTU행의 V 버퍼에 저장된 Vmi를 현재 H 버퍼에 업데이트한다. 상단 CTU 행의 V 버퍼에 저장된 Vmi가 복수개일 경우, 가장 먼저 업데이트 된 움직임 정보를 먼저 꺼내어 H 버퍼에 업데이트 할 수도 있고 그 반대의 순서로 업데이트 할 수도 있다. 업데이트를 하는 시기는 각 CTU를 코딩 하기 전 일 수도 있고, 각 CTU에서 상단 CTU와 접경하는 블록들을 코딩 하기 전 일 수도 있는 등 다양한 시점에서 V 버퍼에 저장된 상단 CTU의 Vmi를 H 버퍼에 업데이트를 할 수 있다. 또한, 상단 CTU 뿐 아니라 좌상단 CTU, 우상단 CTU의 Vmi도 H 버퍼에 업데이트할 수 있다.Refer to FIG. 15 for a second method of updating the H buffer. The second method places an additional motion candidate storage buffer in addition to the H buffer. This buffer is a buffer (hereinafter referred to as 'V buffer') that stores the restored motion information (hereinafter referred to as 'Vmi') of the upper CTU. This V buffer can be used when the aforementioned H buffer is initialized on a CTU row or slice basis, and the V buffer can be initialized on a CTU row basis. In the current picture, except for the last CTU row, Vmi in the V buffer must be updated for the lower CTU row. Here, up to Q pieces of motion information (Q is an integer greater than 1) can be updated in the V buffer, and motion information corresponding to Vmi can be determined in various ways. For example, Vmi may be the restored motion information of a block containing the center coordinates of the CTU, or may be the most recent motion information included in the H buffer when coding a block containing the center coordinates in the upper CTU. there is. There may be more than one Vmi updated in one CTU, and the updated Vmi is used when updating the H buffer of the lower CTU. In the remaining CTU rows except the first CTU row, Vmi stored in the V buffer of the top CTU row is updated to the current H buffer for each CTU. If there are multiple Vmi stored in the V buffer of the top CTU row, the most updated motion information can be taken out first and updated in the H buffer, or in the reverse order. The time to update may be before coding each CTU, or before coding the blocks bordering the upper CTU in each CTU. The Vmi of the upper CTU stored in the V buffer may be updated to the H buffer at various times. You can. Additionally, not only the top CTU but also the Vmi of the top left CTU and top right CTU can be updated in the H buffer.

전술한 V 버퍼의 후보 움직임정보는 도 9의 MERGE/AMVP 후보 리스트 유도 과정에 독립적으로 추가될 수도 있다. V 버퍼 후보 움직임정보를 추가할 때 MERGE/AMVP 후보 리스트 내에서의 해당 우선 순위는 다양하게 결정할 수 있다. 예를 들어, S904 단계 이후에 V 버퍼 내 유효한 움직임정보가 있다면 해당 후보 움직임정보를 S904, S905 단계 사이에서 추가될 수도 있다. The candidate motion information of the aforementioned V buffer may be added independently to the MERGE/AMVP candidate list derivation process of FIG. 9. When adding V buffer candidate motion information, the corresponding priority within the MERGE/AMVP candidate list can be determined in various ways. For example, if there is valid motion information in the V buffer after step S904, the corresponding candidate motion information may be added between steps S904 and S905.

(실시예 3)(Example 3)

본 실시예에서는 도 9의 905 단계를 상세히 설명할 것이다. S901~S904 단계를 거쳐서 Merge/AMVP 후보 리스트에 채워진 움직임정보가 1개 이하인 경우에는 본 단계를 생략한다. Merge/AMVP 후보 리스트에 채워진 움직임정보가 2개 이상인 경우에는 각 후보들 간 평균 후보 움직임정보를 생성하여 후보 리스트를 채울 수 있다. 평균 후보 움직임정보의 움직임벡터는 움직임정보의 각 예측 방향 별로(List 0 혹은 List 1) 유도되는데, 후보 리스트에 저장된 동일한 방향의 움직임벡터를 평균하여 생성한 움직임벡터를 의미한다. 평균 후보 움직임정보를 유도할 때, 평균할 때 이용된 움직임정보의 참조 픽쳐 색인 정보가 다르다면 우선 순위가 높았던 움직임정보의 참조 픽쳐 정보를 평균 후보 움직임정보의 참조 픽쳐 색인 정보로 결정할 수 있다. 혹은 우선 순위가 낮았던 움직임정보의 참조 픽쳐 정보를 평균 후보 움직임정보의 참조 픽쳐 색인 정보로 결정할 수도 있다. In this embodiment, step 905 of FIG. 9 will be described in detail. If there is less than one piece of motion information filled in the Merge/AMVP candidate list through steps S901 to S904, this step is omitted. If there are two or more pieces of motion information filled in the Merge/AMVP candidate list, the candidate list can be filled by generating average candidate motion information between each candidate. The motion vector of the average candidate motion information is derived for each predicted direction of the motion information (List 0 or List 1), and refers to a motion vector generated by averaging the motion vectors in the same direction stored in the candidate list. When deriving the average candidate motion information, if the reference picture index information of the motion information used for averaging is different, the reference picture information of the motion information with high priority can be determined as the reference picture index information of the average candidate motion information. Alternatively, the reference picture information of the motion information with low priority may be determined as the reference picture index information of the average candidate motion information.

평균 후보 움직임정보를 Merge/AMVP 후보 리스트에 추가할 때, 생성된 평균 후보 움직임정보를 또 다른 평균 후보 움직임정보를 생성할 때 이용할 수도 있다. 이러한 예시를 설명하기 위해 도 16을 참조한다. 도 16에서 좌측 테이블은 도 9의 S905 단계를 거치기 전 Merge/AMVP 후보 리스트이고, 우측 테이블은 도 9의 S905 단계를 거친 후 Merge/AMVP 후보 리스트이다. 좌측 테이블을 보면 2개의 후보 리스트에는 0, 1번에 해당하는 후보 움직임정보가 채워져 있다. 이 2개의 움직임정보를 이용하여 2번에 해당하는 평균 후보 움직임정보를 생성할 수 있다. 도 16의 예시에서는 0번 후보의 List 0 방향 움직임벡터 (1, 1), 참조 픽쳐 색인 1인 움직임 정보와 1번 후보의 List 0 방향 움직임벡터 (3, -1), 참조 픽쳐 색인 0인 움직임정보를 평균하여 2번 후보의 List 0 방향 움직임정보를 채운다. List 1 방향의 경우 0번 후보의 움직임정보가 존재하지 않는다. 이런 경우에는 List 1 방향의 후보가 존재하는 1번 후보의 움직임정보를 그대로 가져와서 2번 후보의 List 1 방향 움직임정보를 채운다. 만약 평균 후보 움직임정보를 유도할 때 어느 한 방향의 움직임정보가 모두 없을 경우에는, 해당 방향은 따로 유도하지 않는다. 이렇게 유도된 2번의 평균 후보 움직임정보를 이용하여 추가적인 평균 후보 움직임정보를 생성할 수 있다. 3번의 평균 후보 움직임정보는 0, 2번 후보의 평균 후보 움직임정보이고, 4번의 평균 후보 움직임정보는 1, 2번 후보의 평균 후보 움직임정보이다. 평균 후보 움직임정보를 생성하는 방법은 전술한 바와 같다.When adding average candidate motion information to the Merge/AMVP candidate list, the generated average candidate motion information can also be used to generate another average candidate motion information. Please refer to Figure 16 to explain this example. In FIG. 16, the left table is the Merge/AMVP candidate list before going through step S905 in FIG. 9, and the right table is the Merge/AMVP candidate list after going through step S905 in FIG. 9. Looking at the table on the left, the two candidate lists are filled with candidate movement information corresponding to numbers 0 and 1. Using these two pieces of motion information, the average candidate motion information corresponding to number 2 can be generated. In the example of Figure 16, the List 0 direction motion vector (1, 1) of candidate 0, motion information with a reference picture index of 1, and the List 0 direction motion vector (3, -1) of candidate 1, motion with a reference picture index of 0. The information is averaged to fill the list 0 direction movement information of candidate 2. In the case of List 1 direction, there is no motion information for candidate 0. In this case, the movement information of candidate 1, where there is a candidate in the List 1 direction, is taken as is, and the movement information in the List 1 direction of candidate 2 is filled. If there is no motion information in one direction when deriving average candidate motion information, that direction is not derived separately. Additional average candidate motion information can be generated using the two average candidate motion information derived in this way. The average candidate motion information of No. 3 is the average candidate motion information of candidates 0 and 2, and the average candidate motion information of No. 4 is the average candidate motion information of candidates No. 1 and 2. The method for generating average candidate motion information is as described above.

도 9의 S905 단계를 거치기 전의 Merge/AMVP 후보 리스트에는 중복된 후보 움직임정보가 존재할 수도 있다. 평균 후보 움직임정보를 이러한 중복된 후보 움직임정보를 제거하는데 이용할 수도 있다. 도 17은 이러한 예시를 나타낸 것이다. 좌측, 우측 테이블은 도 16에서 설명한 바와 같다. 좌측 테이블을 보면 0, 2번의 후보 움직임정보가 완전히 동일하다. 이럴 경우, 우선 순위가 낮은 2번 후보 움직임정보를 평균 후보 움직임정보로 대체할 수 있다. 도 17의 예시에서는 0, 1번의 평균 후보 움직임정보로 기존의 2번 후보 움직임정보를 대체하였고, 3번은 0, 2번의 평균 후보 움직임정보, 4번은 1, 2번의 평균 후보 움직임정보를 이용하여 후보 리스트를 채운 것이다.Duplicate candidate motion information may exist in the Merge/AMVP candidate list before step S905 of FIG. 9. Average candidate motion information can also be used to remove such duplicate candidate motion information. Figure 17 shows this example. The left and right tables are as described in FIG. 16. Looking at the table on the left, the motion information of candidates 0 and 2 are completely identical. In this case, candidate 2 motion information with low priority can be replaced with average candidate motion information. In the example of Figure 17, the existing candidate number 2 motion information was replaced with the average candidate motion information of times 0 and 1, number 3 is the average candidate motion information of times 0 and 2, and number 4 is the average candidate motion information of times 1 and 2. The list has been filled.

평균 후보 움직임정보를 이용하여 Merge/AMVP 후보 리스트를 채울 수 있는 개수 또한 제한될 수 있다. 예를 들어, Merge/AMVP 후보 리스트의 최대 후보 개수까지 모두 평균 후보 움직임정보를 이용하여 채울 수도 있지만, (후보 리스트 최대 개수 - 1)개 까지만 채울 수도 있다. 또한 평균 후보 움직임정보를 계산할 때 이용되는 후보 움직임정보가 3개 이상일 수 있으며, 3개 이상의 후보 움직임정보를 평균한 정보가 아닌 Median 정보를 평균 후보 움직임정보로 결정할 수도 있다. The number of Merge/AMVP candidate lists that can be filled using average candidate motion information may also be limited. For example, the maximum number of candidates in the Merge/AMVP candidate list may be filled using the average candidate motion information, but only up to (maximum number of candidate lists - 1). Additionally, there may be three or more pieces of candidate motion information used when calculating the average candidate motion information, and Median information, rather than information obtained by averaging three or more pieces of candidate motion information, may be determined as the average candidate motion information.

전술한 실시예는 복호화 장치에서의 동작을 중심으로 살펴보았으나, 부호화 장치에서도 동일/유사하게 동작할 수 있으며, 자세한 설명은 생략하기로 한다.Although the above-described embodiment was focused on the operation of the decoding device, the same/similar operation may also be performed in the encoding device, and detailed description will be omitted.

본 개시의 다양한 실시 예는 모든 가능한 조합을 나열한 것이 아니고 본 개시의 대표적인 양상을 설명하기 위한 것이며, 다양한 실시 예에서 설명하는 사항들은 독립적으로 적용되거나 또는 둘 이상의 조합으로 적용될 수도 있다.The various embodiments of the present disclosure do not list all possible combinations but are intended to explain representative aspects of the present disclosure, and matters described in the various embodiments may be applied independently or in combination of two or more.

또한, 본 개시의 다양한 실시 예는 하드웨어, 펌웨어(firmware), 소프트웨어, 또는 그들의 결합 등에 의해 구현될 수 있다. 하드웨어에 의한 구현의 경우, 하나 또는 그 이상의 ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), 범용 프로세서(general processor), 컨트롤러, 마이크로 컨트롤러, 마이크로 프로세서 등에 의해 구현될 수 있다. Additionally, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. For hardware implementation, one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), general purpose It can be implemented by a processor (general processor), controller, microcontroller, microprocessor, etc.

본 개시의 범위는 다양한 실시 예의 방법에 따른 동작이 장치 또는 컴퓨터 상에서 실행되도록 하는 소프트웨어 또는 머신-실행가능한 명령들(예를 들어, 운영체제, 애플리케이션, 펌웨어(firmware), 프로그램 등), 및 이러한 소프트웨어 또는 명령 등이 저장되어 장치 또는 컴퓨터 상에서 실행 가능한 비-일시적 컴퓨터-판독가능 매체(non-transitory computer-readable medium)를 포함한다.The scope of the present disclosure is software or machine-executable instructions (e.g., operating system, application, firmware, program, etc.) that cause operations according to the methods of various embodiments to be executed on a device or computer, and such software or It includes non-transitory computer-readable medium in which instructions, etc. are stored and can be executed on a device or computer.

Claims (9)

현재 블록의 후보 리스트를 생성하는 단계; 및
상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함하되,
상기 복수의 후보는, 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고,
상기 복원정보기반 후보는, 상기 현재 블록 이전에 복호화된 움직임 정보들이 저장된 버퍼의 움직임 정보가 상기 후보 리스트에 추가된 것이고,
상기 버퍼에 저장된 움직임 정보들 중에서 상기 후보 리스트에 복원정보기반 후보로서 추가되는 움직임 정보의 순서는, 상기 버퍼에 먼저 저장된 움직임 정보 순이고,
상기 공간적 후보는, 상기 현재 블록에 인접한 적어도 하나의 공간적 후보 블록의 움직임 정보를 기초로 결정되는, 영상 복호화 방법.
generating a candidate list of the current block; and
Comprising the step of performing inter prediction of the current block using any one of a plurality of candidates belonging to the candidate list,
The plurality of candidates include at least one of a spatial candidate, a temporal candidate, or a restoration information-based candidate,
The restoration information-based candidate is obtained by adding motion information of a buffer in which motion information decoded before the current block is stored to the candidate list,
Among the motion information stored in the buffer, the order of motion information added as a restoration information-based candidate to the candidate list is the order of motion information stored in the buffer first,
The spatial candidate is determined based on motion information of at least one spatial candidate block adjacent to the current block.
제1항에 있어서,
상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임 정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임 정보를 이용하여 채워지는, 영상 복호화 방법.
According to paragraph 1,
The candidate list is filled using the motion information stored in the buffer until the maximum number of candidates in the candidate list is reached, or the motion information stored in the buffer is filled until the maximum number of candidates minus 1 is reached. A video decoding method that is filled using.
제2항에 있어서,
상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화되는, 영상 복호화 방법.
According to paragraph 2,
The video decoding method wherein the buffer is initialized in any one of a coding tree unit (CTU), a CTU row, a slice, or a picture.
현재 블록의 후보 리스트를 생성하는 단계; 및
상기 후보 리스트에 속한 복수의 후보 중 어느 하나를 이용하여, 상기 현재 블록의 인터 예측을 수행하는 단계를 포함하되,
상기 복수의 후보는, 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고,
상기 복원정보기반 후보는, 상기 현재 블록 이전에 부호화된 움직임 정보들이 저장된 버퍼의 움직임 정보가 상기 후보 리스트에 추가된 것이고,
상기 버퍼에 저장된 움직임 정보들 중에서 상기 후보 리스트에 복원정보기반 후보로서 추가되는 움직임 정보의 순서는, 상기 버퍼에 먼저 저장된 움직임 정보 순이고,
상기 공간적 후보는, 상기 현재 블록에 인접한 적어도 하나의 공간적 후보 블록의 움직임 정보를 기초로 결정되는, 영상 부호화 방법.
generating a candidate list of the current block; and
Comprising the step of performing inter prediction of the current block using any one of a plurality of candidates belonging to the candidate list,
The plurality of candidates include at least one of a spatial candidate, a temporal candidate, or a restoration information-based candidate,
The restoration information-based candidate is obtained by adding motion information of a buffer in which motion information encoded before the current block is stored to the candidate list,
Among the motion information stored in the buffer, the order of motion information added as a restoration information-based candidate to the candidate list is the order of motion information stored in the buffer first,
The spatial candidate is determined based on motion information of at least one spatial candidate block adjacent to the current block.
제4항에 있어서,
상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임 정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임 정보를 이용하여 채워지는, 영상 부호화 방법.
According to paragraph 4,
The candidate list is filled using the motion information stored in the buffer until the maximum number of candidates in the candidate list is reached, or the motion information stored in the buffer is filled until the maximum number of candidates minus 1 is reached. A video encoding method that is filled using.
제5항에 있어서,
상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화되는, 영상 부호화 방법.
According to clause 5,
The video encoding method wherein the buffer is initialized in any one of a coding tree unit (CTU), a CTU row, a slice, or a picture.
비트스트림을 저장하는 컴퓨터로 판독가능한 기록 매체에 있어서,
상기 비트스트림은 현재 블록의 잔차 계수를 포함하고,
상기 잔차 계수는, 상기 현재 블록의 후보 리스트에 속한 복수의 후보 중 어느 하나에 기반한 상기 현재 블록의 인터 예측을 기초로 생성되고,
상기 복수의 후보는, 공간적 후보, 시간적 후보 또는 복원정보기반 후보 중 적어도 하나를 포함하고,
상기 복원정보기반 후보는, 상기 현재 블록 이전에 복호화된 움직임 정보들이 저장된 버퍼의 움직임 정보가 상기 후보 리스트에 추가된 것이고,
상기 버퍼에 저장된 움직임 정보들 중에서 상기 후보 리스트에 상기 복원정보기반 후보로서 추가되는 움직임 정보의 순서는, 상기 버퍼에 먼저 저장된 움직임 정보 순이고,
상기 공간적 후보는, 상기 현재 블록에 인접한 적어도 하나의 공간적 후보 블록의 움직임 정보를 기초로 결정되는, 컴퓨터로 판독가능한 기록 매체.
In a computer-readable recording medium storing a bitstream,
The bitstream includes residual coefficients of the current block,
The residual coefficient is generated based on inter prediction of the current block based on one of a plurality of candidates included in the candidate list of the current block,
The plurality of candidates include at least one of a spatial candidate, a temporal candidate, or a restoration information-based candidate,
The restoration information-based candidate is obtained by adding motion information of a buffer in which motion information decoded before the current block is stored to the candidate list,
Among the motion information stored in the buffer, the order of motion information added as the restored information-based candidate to the candidate list is in the order of motion information stored in the buffer first,
The spatial candidate is determined based on motion information of at least one spatial candidate block adjacent to the current block.
제7항에 있어서,
상기 후보 리스트는, 상기 후보 리스트의 최대 후보 개수에 도달할 때까지 상기 버퍼에 저장된 움직임 정보를 이용하여 채워지거나, 상기 최대 후보 개수에서 1을 뺀 개수에 도달할 때까지 상기 버퍼에 저장된 움직임 정보를 이용하여 채워지는, 컴퓨터로 판독가능한 기록 매체.
In clause 7,
The candidate list is filled using the motion information stored in the buffer until the maximum number of candidates in the candidate list is reached, or the motion information stored in the buffer is filled until the maximum number of candidates minus 1 is reached. A computer-readable recording medium filled with
제8항에 있어서,
상기 버퍼는 코딩 트리 유닛(CTU), CTU 행, 슬라이스 또는 픽쳐 중 어느 하나의 단위로 초기화되는, 컴퓨터로 판독가능한 기록 매체.
According to clause 8,
A computer-readable recording medium, wherein the buffer is initialized in units of any one of a coding tree unit (CTU), a CTU row, a slice, or a picture.
KR1020210181599A 2019-01-04 2021-12-17 Image encoding/decoding method and apparatus using efficient motion information prediction KR102585179B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020230129395A KR20230145277A (en) 2019-01-04 2023-09-26 Image encoding/decoding method and apparatus using efficient motion information prediction

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR1020190001414 2019-01-04
KR20190001414 2019-01-04
KR1020200001228A KR102342157B1 (en) 2019-01-04 2020-01-06 Image encoding/decoding method and apparatus using efficient motion information prediction

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020200001228A Division KR102342157B1 (en) 2019-01-04 2020-01-06 Image encoding/decoding method and apparatus using efficient motion information prediction

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020230129395A Division KR20230145277A (en) 2019-01-04 2023-09-26 Image encoding/decoding method and apparatus using efficient motion information prediction

Publications (2)

Publication Number Publication Date
KR20210157385A KR20210157385A (en) 2021-12-28
KR102585179B1 true KR102585179B1 (en) 2023-10-05

Family

ID=79178364

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210181599A KR102585179B1 (en) 2019-01-04 2021-12-17 Image encoding/decoding method and apparatus using efficient motion information prediction

Country Status (1)

Country Link
KR (1) KR102585179B1 (en)

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Li Zhang, et. al., "CE4 : Summary report on inter prediction and motion vector coding", Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 12th Meeting: MACAO, 2018.10.*
Naeri Park, et. al., "CE4-related: History-based Motion vector prediction considering parallel processing", Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 12th Mee*

Also Published As

Publication number Publication date
KR20210157385A (en) 2021-12-28

Similar Documents

Publication Publication Date Title
US20210281854A1 (en) Method and apparatus for encoding/decoding an image
KR101903602B1 (en) Method and apparratus of video decoding
US11533470B2 (en) Method and apparatus for encoding/decoding an image signal
KR101316060B1 (en) Decoding method of inter coded moving picture
CN112369034B (en) Video coding method and apparatus using merging candidates
KR20180041575A (en) Method and apparatus for encoding/decoding an image
KR20170124079A (en) Method and apparatus for encoding/decoding a video signal
KR20170124080A (en) Method and apparatus for encoding/decoding a video signal
KR20190142750A (en) Image encoding/decoding method and apparatus
KR102585179B1 (en) Image encoding/decoding method and apparatus using efficient motion information prediction
KR102585178B1 (en) Image encoding/decoding method and apparatus using efficient motion information prediction
KR20130050898A (en) Encoding method and apparatus, and decoding method and apparatus of image

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant