KR20200034701A - Method for inter prediction and apparatus thereof - Google Patents

Method for inter prediction and apparatus thereof Download PDF

Info

Publication number
KR20200034701A
KR20200034701A KR1020200035119A KR20200035119A KR20200034701A KR 20200034701 A KR20200034701 A KR 20200034701A KR 1020200035119 A KR1020200035119 A KR 1020200035119A KR 20200035119 A KR20200035119 A KR 20200035119A KR 20200034701 A KR20200034701 A KR 20200034701A
Authority
KR
South Korea
Prior art keywords
motion information
block
reference picture
current block
call
Prior art date
Application number
KR1020200035119A
Other languages
Korean (ko)
Other versions
KR102216320B1 (en
Inventor
김휘용
박광훈
김경용
김상민
임성창
이진호
최진수
김진웅
Original Assignee
한국전자통신연구원
경희대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자통신연구원, 경희대학교 산학협력단 filed Critical 한국전자통신연구원
Publication of KR20200034701A publication Critical patent/KR20200034701A/en
Priority to KR1020210018003A priority Critical patent/KR102320585B1/en
Application granted granted Critical
Publication of KR102216320B1 publication Critical patent/KR102216320B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
    • 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/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/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • 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/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Abstract

According to the present invention, an image decoding apparatus comprises: a motion prediction part deriving motion information of a current block as motion information including L0 motion information and L1 motion information; a motion compensation part generating a prediction block corresponding to the current block by performing motion compensation on the current block based on at least one of the L0 motion information and the L1 motion information; and a restoration block generation part generating a restoration block corresponding to the current block based on the prediction block. According to the present invention, image encoding efficiency can be improved.

Description

인터 예측 방법 및 그 장치 {METHOD FOR INTER PREDICTION AND APPARATUS THEREOF}METHOD FOR INTER PREDICTION AND APPARATUS THEREOF}

본 발명은 영상 처리에 관한 것으로서, 보다 상세하게는 인터 예측 방법 및 그 장치에 관한 것이다.The present invention relates to image processing, and more particularly, to an inter prediction method and an apparatus thereof.

최근 HD(High Definition) 해상도를 가지는 방송 서비스가 국내뿐만 아니라 세계적으로 확대되면서, 많은 사용자들이 고해상도, 고화질의 영상에 익숙해지고 있으며 이에 따라 많은 기관들이 차세대 영상기기의 개발에 박차를 가하고 있다. 또한 HDTV와 더불어 HDTV의 4배 이상의 해상도를 갖는 UHD(Ultra High Definition)에 대한 관심이 증대되면서 보다 높은 해상도, 고화질의 영상에 대한 압축기술이 요구되고 있다.Recently, as broadcast services having high definition (HD) resolution have been expanded not only in Korea but also worldwide, many users are accustomed to high-resolution and high-definition video, and accordingly, many organizations are accelerating the development of next-generation video devices. In addition, with the increasing interest in UHD (Ultra High Definition), which has a resolution of 4 times higher than that of HDTV, there is a need for a compression technology for higher resolution and higher quality images.

영상 압축을 위해, 시간적으로 이전 및/또는 이후의 픽쳐로부터 현재 픽쳐에 포함된 픽셀값을 예측하는 인터(inter) 예측 기술, 현재 픽쳐 내의 픽셀 정보를 이용하여 현재 픽쳐에 포함된 픽셀값을 예측하는 인트라(intra) 예측 기술, 출현 빈도가 높은 심볼(symbol)에 짧은 부호를 할당하고 출현 빈도가 낮은 심볼에 긴 부호를 할당하는 엔트로피 부호화 기술 등이 사용될 수 있다.For image compression, an inter prediction technique that predicts a pixel value included in a current picture from temporally previous and / or subsequent pictures, and predicts a pixel value included in the current picture using pixel information in the current picture An intra prediction technique, an entropy encoding technique for assigning a short code to a symbol with a high frequency of appearance and a long code to a symbol with a low frequency of frequency, etc. may be used.

본 발명의 기술적 과제는 영상 부호화 효율을 향상시킬 수 있는 영상 부호화 방법 및 그 장치를 제공함에 있다.An object of the present invention is to provide an image encoding method and apparatus capable of improving image encoding efficiency.

본 발명의 다른 기술적 과제는 영상 부호화 효율을 향상시킬 수 있는 영상 복호화 방법 및 그 장치를 제공함에 있다.Another technical problem of the present invention is to provide an image decoding method and apparatus capable of improving image encoding efficiency.

본 발명의 또 다른 기술적 과제는 영상 부호화 효율을 향상시킬 수 있는 인터 예측 방법 및 그 장치를 제공함에 있다.Another technical problem of the present invention is to provide an inter prediction method and an apparatus capable of improving image encoding efficiency.

본 발명의 또 다른 기술적 과제는 영상 부호화 효율을 향상시킬 수 있는 움직임 정보 도출 방법 및 그 장치를 제공함에 있다.Another technical problem of the present invention is to provide a method and apparatus for deriving motion information capable of improving image encoding efficiency.

본 발명의 또 다른 기술적 과제는 영상 부호화 효율을 향상시킬 수 있는 시간적 움직임 정보 도출 방법 및 그 장치를 제공함에 있다.Another technical problem of the present invention is to provide a method and apparatus for deriving temporal motion information capable of improving image encoding efficiency.

본 발명의 일 실시 형태는 영상 복호화 장치이다. 상기 장치는, L0 움직임 정보 및 L1 움직임 정보를 포함하는 움직임 정보로서 현재 블록의 움직임 정보를 도출하는 움직임 예측부, 상기 L0 움직임 정보 및 상기 L1 움직임 정보 중에서 적어도 하나를 기반으로 상기 현재 블록에 대해 움직임 보상을 수행함으로써, 상기 현재 블록에 대응하는 예측 블록을 생성하는 움직임 보상부 및 상기 예측 블록을 기반으로 상기 현재 블록에 대응하는 복원 블록을 생성하는 복원 블록 생성부를 포함하되, 상기 움직임 보상부는, 상기 L0 움직임 정보 및 상기 L1 움직임 정보의 동일성 여부를 기반으로 상기 움직임 보상을 수행한다.One embodiment of the present invention is an image decoding device. The apparatus is a motion prediction unit for deriving motion information of a current block as motion information including L0 motion information and L1 motion information, and a motion for the current block based on at least one of the L0 motion information and the L1 motion information A motion compensation unit generating a prediction block corresponding to the current block by performing compensation, and a restoration block generation unit generating a restoration block corresponding to the current block based on the prediction block, wherein the motion compensation unit includes: The motion compensation is performed based on whether the L0 motion information and the L1 motion information are identical.

상기 L0 움직임 정보는 L0 움직임 벡터 및 L0 참조 픽쳐 번호를 포함하고, 상기 L0 참조 픽쳐 번호는 L0 참조 픽쳐에 할당된 POC(Picture Order Count)를 지시하고, 상기 L1 움직임 정보는 L1 움직임 벡터 및 L1 참조 픽쳐 번호를 포함하고, 상기 L1 참조 픽쳐 번호는 L1 참조 픽쳐에 할당된 POC(Picture Order Count)를 지시할 수 있다.The L0 motion information includes an L0 motion vector and an L0 reference picture number, and the L0 reference picture number indicates a picture order count (POC) assigned to the L0 reference picture, and the L1 motion information refers to the L1 motion vector and L1. A picture number may be included, and the L1 reference picture number may indicate a picture order count (POC) assigned to the L1 reference picture.

상기 L0 움직임 벡터 및 상기 L1 움직임 벡터가 동일하고 상기 L0 참조 픽쳐 번호 및 상기 L1 참조 픽쳐 번호가 동일한 경우, 상기 움직임 보상부는, 상기 L0 움직임 정보 및 상기 L1 움직임 정보 중에서 상기 L0 움직임 정보를 기반으로 하여 단예측(uni prediction)을 수행할 수 있다.When the L0 motion vector and the L1 motion vector are the same, and the L0 reference picture number and the L1 reference picture number are the same, the motion compensation unit, based on the L0 motion information among the L0 motion information and the L1 motion information Uni prediction can be performed.

상기 L0 움직임 벡터 및 상기 L1 움직임 벡터가 서로 동일하지 않거나 상기 L0 참조 픽쳐 번호 및 상기 L1 참조 픽쳐 번호가 서로 동일하지 않은 경우, 상기 움직임 보상부는, 상기 L0 움직임 정보 및 상기 L1 움직임 정보를 기반으로 하여 쌍예측(bi prediction)을 수행할 수 있다.When the L0 motion vector and the L1 motion vector are not identical to each other, or when the L0 reference picture number and the L1 reference picture number are not the same, the motion compensator is based on the L0 motion information and the L1 motion information. Bi prediction may be performed.

본 발명의 다른 실시 형태는 영상 복호화 장치이다. 상기 장치는, L0 움직임 정보 및 L1 움직임 정보를 포함하는 움직임 정보로서 현재 블록의 움직임 정보를 도출하는 움직임 예측부, 상기 L0 움직임 정보 및 상기 L1 움직임 정보 중에서 적어도 하나를 기반으로 상기 현재 블록에 대해 움직임 보상을 수행함으로써, 상기 현재 블록에 대응하는 예측 블록을 생성하는 움직임 보상부 및 상기 예측 블록을 기반으로 상기 현재 블록에 대응하는 복원 블록을 생성하는 복원 블록 생성부를 포함하되, 상기 움직임 보상부는, 상기 현재 블록의 크기를 기반으로 상기 움직임 보상을 수행한다.Another embodiment of the present invention is an image decoding device. The apparatus is a motion prediction unit for deriving motion information of a current block as motion information including L0 motion information and L1 motion information, and a motion for the current block based on at least one of the L0 motion information and the L1 motion information A motion compensation unit generating a prediction block corresponding to the current block by performing compensation, and a restoration block generation unit generating a restoration block corresponding to the current block based on the prediction block, wherein the motion compensation unit includes: The motion compensation is performed based on the size of the current block.

상기 현재 블록의 크기가 소정의 크기보다 작은 경우, 상기 움직임 보상부는, 상기 L0 움직임 정보 및 상기 L1 움직임 정보 중에서 상기 L0 움직임 정보를 기반으로 하여 단예측(uni prediction)을 수행할 수 있다.When the size of the current block is smaller than a predetermined size, the motion compensation unit may perform uni prediction based on the L0 motion information among the L0 motion information and the L1 motion information.

상기 소정의 크기는 8x8일 수 있다.The predetermined size may be 8x8.

본 발명의 또 다른 실시 형태는 영상 복호화 장치이다. 상기 장치는, 이미 복원된 픽쳐로부터 움직임 정보를 도출하는 움직임 예측부, 상기 도출된 움직임 정보를 기반으로 현재 블록에 대응하는 예측 블록을 생성하는 움직임 보상부 및 상기 예측 블록을 기반으로 상기 현재 블록에 대응하는 복원 블록을 생성하는 복원 블록 생성부를 포함하되, 상기 움직임 정보는 움직임 벡터 및 참조 픽쳐 인덱스(reference picture index)를 포함하고, 상기 움직임 예측부는, 상기 참조 픽쳐 인덱스를 0으로 설정하고, 상기 이미 복원된 픽쳐 내에서 상기 현재 블록에 대응하는 콜 블록(col block)을 기반으로 상기 움직임 벡터를 도출한다.Another embodiment of the present invention is an image decoding apparatus. The apparatus includes a motion prediction unit that derives motion information from an already reconstructed picture, a motion compensation unit that generates a prediction block corresponding to the current block based on the derived motion information, and the current block based on the prediction block. And a reconstruction block generator for generating a corresponding reconstruction block, wherein the motion information includes a motion vector and a reference picture index, and the motion predictor sets the reference picture index to 0, and the In the reconstructed picture, the motion vector is derived based on a call block corresponding to the current block.

상기 현재 블록의 부호화 모드는 머지(merge) 모드이고, 상기 움직임 보상부는, 상기 시간적 움직임 정보를 상기 현재 블록의 움직임 정보로 선택하고, 상기 선택된 움직임 정보를 기반으로 움직임 보상을 수행함으로써, 상기 현재 블록에 대응하는 예측 블록을 생성할 수 있다.The encoding mode of the current block is a merge mode, and the motion compensation unit selects the temporal motion information as motion information of the current block, and performs motion compensation based on the selected motion information, so that the current block A prediction block corresponding to may be generated.

본 발명에 따른 영상 부호화 방법에 의하면, 영상 부호화 효율이 향상될 수 있다.According to the image encoding method according to the present invention, image encoding efficiency can be improved.

본 발명에 따른 영상 복호화 방법에 의하면, 영상 부호화 효율이 향상될 수 있다.According to the image decoding method according to the present invention, image encoding efficiency can be improved.

본 발명에 따른 인터 예측 방법에 의하면, 영상 부호화 효율이 향상될 수 있다.According to the inter prediction method according to the present invention, image encoding efficiency can be improved.

본 발명에 따른 움직임 정보 도출 방법에 의하면, 영상 부호화 효율이 향상될 수 있다.According to the method for deriving motion information according to the present invention, image encoding efficiency may be improved.

본 발명에 따른 시간적 움직임 정보 도출 방법에 의하면, 영상 부호화 효율이 향상될 수 있다.According to the method for deriving temporal motion information according to the present invention, image encoding efficiency may be improved.

도 1은 본 발명이 적용되는 영상 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 2는 본 발명이 적용되는 영상 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 3은 인터 예측 방법의 일 실시예를 개략적으로 나타내는 흐름도이다.
도 4는 양방향 예측이 적용되는 경우, 인터 예측 방법의 실시예를 개략적으로 나타내는 도면이다.
도 5는 부호화된 영상의 움직임 정보의 일 실시예를 개략적으로 나타내는 도면이다.
도 6은 본 발명에 따른 현재 블록의 시간적 움직임 정보 도출 방법의 일 실시예를 개략적으로 나타내는 흐름도이다.
도 7은 L1 시간적 움직임 정보의 재설정을 위해 사용되는 복원된 주변 블록의 실시예를 개략적으로 나타내는 도면이다.
도 8은 도 6의 실시예에 따른 시간적 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다.
도 9는 본 발명에 따른 현재 블록의 시간적 움직임 정보 도출 방법의 다른 실시예를 개략적으로 나타내는 흐름도이다.
도 10은 L1 시간적 움직임 정보의 재설정을 위해 사용되는 제2 콜 블록의 실시예를 개략적으로 나타내는 도면이다.
도 11은 도 9의 실시예에 따른 시간적 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다.
도 12는 본 발명에 따른 현재 블록의 움직임 정보 도출 방법의 실시예를 개략적으로 나타내는 도면이다.
도 13은 도 12의 실시예에 따른 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다.
도 14는 본 발명에 따른 현재 블록의 시간적 움직임 정보 도출 방법의 또 다른 실시예를 개략적으로 나타내는 흐름도이다.
도 15는 도 14의 실시예에 따른 시간적 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다.
1 is a block diagram showing a configuration according to an embodiment of an image encoding apparatus to which the present invention is applied.
2 is a block diagram showing a configuration according to an embodiment of an image decoding apparatus to which the present invention is applied.
3 is a flowchart schematically showing an embodiment of an inter prediction method.
4 is a diagram schematically showing an embodiment of an inter prediction method when bidirectional prediction is applied.
5 is a diagram schematically showing an embodiment of motion information of an encoded image.
6 is a flowchart schematically showing an embodiment of a method for deriving temporal motion information of a current block according to the present invention.
7 is a diagram schematically showing an embodiment of a reconstructed neighboring block used for resetting L1 temporal motion information.
8 is a block diagram schematically showing an embodiment of an inter prediction apparatus capable of performing a process of deriving temporal motion information according to the embodiment of FIG. 6.
9 is a flowchart schematically showing another embodiment of a method for deriving temporal motion information of a current block according to the present invention.
10 is a diagram schematically showing an embodiment of a second call block used for resetting L1 temporal motion information.
11 is a block diagram schematically showing an embodiment of an inter prediction apparatus capable of performing a process of deriving temporal motion information according to the embodiment of FIG. 9.
12 is a diagram schematically showing an embodiment of a method for deriving motion information of a current block according to the present invention.
13 is a block diagram schematically showing an embodiment of an inter prediction apparatus capable of performing a process of deriving motion information according to the embodiment of FIG. 12.
14 is a flowchart schematically showing another embodiment of a method for deriving temporal motion information of a current block according to the present invention.
15 is a block diagram schematically illustrating an embodiment of an inter prediction apparatus capable of performing a process of deriving temporal motion information according to the embodiment of FIG. 14.

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

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

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

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

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

도 1은 본 발명이 적용되는 영상 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.1 is a block diagram showing a configuration according to an embodiment of an image encoding apparatus to which the present invention is applied.

도 1을 참조하면, 상기 영상 부호화 장치(100)는 움직임 예측부(111), 움직임 보상부(112), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 부호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조 픽쳐 버퍼(190)를 포함한다. Referring to FIG. 1, the image encoding apparatus 100 includes a motion prediction unit 111, a motion compensation unit 112, an intra prediction unit 120, a switch 115, a subtractor 125, and a conversion unit 130 , A quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190.

영상 부호화 장치(100)는 입력 영상에 대해 인트라(intra) 모드 또는 인터(inter) 모드로 부호화를 수행하고 비트스트림을 출력할 수 있다. 인트라 예측은 화면 내 예측, 인터 예측은 화면 간 예측을 의미한다. 인트라 모드인 경우 스위치(115)가 인트라로 전환되고, 인터 모드인 경우 스위치(115)가 인터로 전환될 수 있다. 영상 부호화 장치(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성한 후, 입력 블록과 예측 블록의 차분(residual)을 부호화할 수 있다.The image encoding apparatus 100 may encode an input image in an intra mode or an inter mode and output a bitstream. Intra prediction means intra prediction, and inter prediction means inter prediction. In the intra mode, the switch 115 may be switched to intra, and in the inter mode, the switch 115 may be switched to inter. The image encoding apparatus 100 may generate a prediction block for an input block of the input image, and then encode a residual between the input block and the prediction block.

인트라 모드인 경우, 인트라 예측부(120)는 현재 블록 주변의 이미 부호화된 블록의 픽셀값을 이용하여 공간적 예측을 수행하여 예측 블록을 생성할 수 있다.In the intra mode, the intra prediction unit 120 may generate a prediction block by performing spatial prediction using pixel values of an already coded block around the current block.

인터 모드인 경우, 움직임 예측부(motion estimator)(111)는, 움직임 예측 과정에서 참조 픽쳐 버퍼(190)에 저장되어 있는 참조 영상에서 입력 블록과 가장 매치가 잘 되는 영역을 찾아 움직임 벡터를 구할 수 있다. 움직임 보상부(112)는 움직임 벡터를 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. In the case of the inter mode, the motion estimator 111 may obtain a motion vector by finding a region that best matches the input block in the reference image stored in the reference picture buffer 190 during the motion prediction process. have. The motion compensation unit 112 may generate a prediction block by performing motion compensation using a motion vector.

감산기(125)는 입력 블록과 생성된 예측 블록의 차분에 의해 잔차 블록(residual block)을 생성할 수 있다. 변환부(130)는 잔차 블록에 대해 변환(transform)을 수행하여 변환 계수(transform coefficient)를 출력할 수 있다. 그리고 양자화부(140)는 입력된 변환 계수를 양자화 파라미터에 따라 양자화하여 양자화된 계수(quantized coefficient)를 출력할 수 있다. The subtractor 125 may generate a residual block based on the difference between the input block and the generated prediction block. The transform unit 130 may transform the residual block to output a transform coefficient. Also, the quantization unit 140 may quantize the input transform coefficient according to a quantization parameter to output a quantized coefficient.

엔트로피 부호화부(150)는, 양자화부(140)에서 산출된 값(예를 들어, 양자화된 계수)들 및/또는 부호화 과정에서 산출된 부호화 파라미터 값 등을 기초로 엔트로피 부호화를 수행하여 비트스트림(bit stream)을 출력할 수 있다. The entropy encoding unit 150 performs entropy encoding based on values (eg, quantized coefficients) calculated by the quantization unit 140 and / or encoding parameter values calculated during an encoding process, and performs bitstream ( bit stream).

엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(symbol)에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 부호화 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 부호화를 통해서 영상 부호화의 압축 성능이 높아질 수 있다. 엔트로피 부호화부(150)는 엔트로피 부호화를 위해 지수 골룸(exponential golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법을 사용할 수 있다. When entropy encoding is applied, a small number of bits are allocated to a symbol having a high probability of occurrence, and a number of bits are allocated to a symbol having a low probability of occurrence, thereby representing a symbol. The size of the heat can be reduced. Therefore, compression performance of image encoding may be increased through entropy encoding. The entropy encoding unit 150 may use encoding methods such as exponential golomb (CAVLC), context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) for entropy encoding.

도 1의 실시예에 따른 영상 부호화 장치는 인터 예측 부호화, 즉 화면 간(inter-frame) 예측 부호화를 수행하므로, 현재 부호화된 영상은 참조 영상으로 사용되기 위해 복호화되어 저장될 필요가 있다. 따라서 양자화된 계수는 역양자화부(160)에서 역양자화되고 역변환부(170)에서 역변환된다. 역양자화, 역변환된 계수는 가산기(175)를 통해 예측 블록과 더해지고 복원 블록이 생성된다. Since the image encoding apparatus according to the embodiment of FIG. 1 performs inter prediction encoding, that is, inter-frame prediction encoding, the currently encoded image needs to be decoded and stored to be used as a reference image. Therefore, the quantized coefficients are inversely quantized by the inverse quantization unit 160 and inversely transformed by the inverse transformation unit 170. The inverse quantized and inverse transformed coefficients are added to the prediction block through the adder 175 and a reconstructed block is generated.

복원 블록은 필터부(180)를 거치고, 필터부(180)는 디블록킹 필터(deblocking filter), SAO(Sample Adaptive Offset), ALF(Adaptive Loop Filter) 중 적어도 하나 이상을 복원 블록 또는 복원 픽쳐에 적용할 수 있다. 필터부(180)는 적응적 인루프(in-loop) 필터로 불릴 수도 있다. 디블록킹 필터는 블록 간의 경계에 생긴 블록 왜곡 및/또는 블록킹 아티팩트(blocking artifact)를 제거할 수 있다. SAO는 코딩 에러를 보상하기 위해 픽셀값에 적정 오프셋(offset) 값을 더해줄 수 있다. ALF는 복원된 영상과 원래의 영상을 비교한 값을 기초로 필터링을 수행할 수 있으며, 고효율이 적용되는 경우에만 수행될 수도 있다. 필터부(180)를 거친 복원 블록은 참조 픽쳐 버퍼(190)에 저장될 수 있다.The reconstruction block passes through the filter unit 180, and the filter unit 180 applies at least one of a deblocking filter, a SAO (Sample Adaptive Offset), and an adaptive loop filter (ALF) to the reconstruction block or reconstruction picture. can do. The filter unit 180 may also be referred to as an adaptive in-loop filter. The deblocking filter may remove block distortion and / or blocking artifacts that occur at the boundary between blocks. SAO can add an appropriate offset value to a pixel value to compensate for a coding error. ALF may perform filtering based on a value obtained by comparing the reconstructed image with the original image, or may be performed only when high efficiency is applied. The reconstructed block that has passed through the filter unit 180 may be stored in the reference picture buffer 190.

도 2는 본 발명이 적용되는 영상 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.2 is a block diagram showing a configuration according to an embodiment of an image decoding apparatus to which the present invention is applied.

*도 2를 참조하면, 상기 영상 복호화 장치(200)는 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 움직임 보상부(250), 가산기(255), 필터부(260) 및 참조 픽쳐 버퍼(270)를 포함한다.* Referring to FIG. 2, the image decoding apparatus 200 includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra prediction unit 240, a motion compensation unit 250, and an adder (255), a filter unit 260 and a reference picture buffer 270.

영상 복호화 장치(200)는 부호화기에서 출력된 비트스트림을 입력 받아 인트라 모드 또는 인터 모드로 복호화를 수행하고 재구성된 영상, 즉 복원 영상을 출력할 수 있다. 인트라 모드인 경우 스위치가 인트라로 전환되고, 인터 모드인 경우 스위치가 인터로 전환될 수 있다. 영상 복호화 장치(200)는 입력 받은 비트스트림으로부터 잔차 블록(residual block)을 얻고 예측 블록을 생성한 후 잔차 블록과 예측 블록을 더하여 재구성된 블록, 즉 복원 블록을 생성할 수 있다.The image decoding apparatus 200 may receive the bitstream output from the encoder, perform decoding in intra mode or inter mode, and output a reconstructed image, that is, a reconstructed image. In the case of intra mode, the switch is switched to intra, and in the case of inter mode, the switch can be switched to inter. The image decoding apparatus 200 may obtain a residual block from the received bitstream, generate a prediction block, and then add a residual block and a prediction block to generate a reconstructed block, that is, a reconstructed block.

엔트로피 복호화부(210)는, 입력된 비트스트림을 확률 분포에 따라 엔트로피 복호화하여, 양자화된 계수(quantized coefficient) 형태의 심볼을 포함한 심볼들을 생성할 수 있다. 엔트로피 복호화 방법은 상술한 엔트로피 부호화 방법과 유사하다.The entropy decoding unit 210 may entropy decode the input bitstream according to a probability distribution, and generate symbols including symbols in the form of quantized coefficients. The entropy decoding method is similar to the entropy encoding method described above.

엔트로피 복호화 방법이 적용되는 경우, 높은 발생 확률을 갖는 심볼에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 각 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 복호화 방법을 통해서 영상 복호화의 압축 성능이 높아질 수 있다. When the entropy decoding method is applied, a small number of bits are allocated to a symbol having a high probability of occurrence, and a large number of bits are allocated to a symbol having a low probability of occurrence, so that a symbol is represented, so that the size of a bit string for each symbol is reduced. Can be reduced. Therefore, the compression performance of image decoding may be improved through the entropy decoding method.

양자화된 계수는 역양자화부(220)에서 역양자화되고 역변환부(230)에서 역변환되며, 양자화된 계수가 역양자화/역변환 된 결과, 잔차 블록(residual block)이 생성될 수 있다. The quantized coefficients are inversely quantized by the inverse quantization unit 220 and inversely transformed by the inverse transformation unit 230. As a result of the inverse quantization / inverse transformation of the quantized coefficients, a residual block may be generated.

인트라 모드인 경우, 인트라 예측부(240)는 현재 블록 주변의 이미 복호화된 블록의 픽셀값을 이용하여 공간적 예측을 수행하여 예측 블록을 생성할 수 있다. 인터 모드인 경우, 움직임 보상부(250)는 움직임 벡터 및 참조 픽쳐 버퍼(270)에 저장되어 있는 참조 영상을 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. In the case of the intra mode, the intra prediction unit 240 may generate a prediction block by performing spatial prediction using pixel values of blocks already decoded around the current block. In the inter mode, the motion compensation unit 250 may generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer 270.

잔차 블록과 예측 블록은 가산기(255)를 통해 더해지고, 더해진 블록은 필터부(260)를 거칠 수 있다. 필터부(260)는 디블록킹 필터, SAO, ALF 중 적어도 하나 이상을 복원 블록 또는 복원 픽쳐에 적용할 수 있다. 필터부(260)는 재구성된 영상, 즉 복원 영상을 출력할 수 있다. 복원 영상은 참조 픽쳐 버퍼(270)에 저장되어 인터 예측에 사용될 수 있다.The residual block and the prediction block may be added through the adder 255, and the added block may pass through the filter unit 260. The filter unit 260 may apply at least one of a deblocking filter, SAO, and ALF to a reconstructed block or reconstructed picture. The filter unit 260 may output a reconstructed image, that is, a reconstructed image. The reconstructed image may be stored in the reference picture buffer 270 and used for inter prediction.

이하, 블록은 영상 부호화 및 복호화의 단위를 의미한다. 영상 부호화 및 복호화 시 부호화 혹은 복호화 단위는, 영상을 분할하여 부호화 혹은 복호화 할 때 그 분할된 단위를 의미하므로, 부호화 유닛 (CU: Coding Unit), 예측 유닛 (PU: Prediction Unit), 변환 유닛(TU: Transform Unit), 변환 블록(transform block) 등으로 불릴 수 있다. 하나의 블록은 크기가 더 작은 하위 블록으로 더 분할될 수 있다. 또한, 본 명세서에서 “픽쳐”는 문맥에 따라 “프레임”, “필드” 및/또는 “슬라이스”로 대체되어 사용될 수 있으며, 이러한 구분은 해당 기술 분야에서 통상의 지식을 가진 자라면 용이하게 할 수 있을 것이다. 예를 들어, 후술되는 P 픽쳐, B 픽쳐, 순방향 B 픽쳐는 문맥에 따라 각각 P 슬라이스, B 슬라이스, 순방향 B 슬라이스로 대체되어 사용될 수 있다.Hereinafter, a block means a unit of image encoding and decoding. The encoding or decoding unit for image encoding and decoding refers to a divided unit when encoding and decoding an image, and thus a coding unit (CU), a prediction unit (PU), and a transformation unit (TU) : Transform Unit, transform block. One block may be further divided into smaller sub-blocks. In addition, in this specification, “picture” may be used by being replaced with “frame”, “field”, and / or “slice” depending on the context, and such division can be easily performed by those skilled in the art. There will be. For example, a P picture, a B picture, and a forward B picture, which will be described later, may be replaced with a P slice, a B slice, and a forward B slice according to context.

도 3은 인터 예측 방법의 일 실시예를 개략적으로 나타내는 흐름도이다.3 is a flowchart schematically showing an embodiment of an inter prediction method.

도 3을 참조하면, 부호화기 및 복호화기는 현재 블록에 대한 움직임 정보를 도출할 수 있다(S310). Referring to FIG. 3, an encoder and a decoder may derive motion information for a current block (S310).

인터 모드에서 부호화기 및 복호화기는 현재 블록의 움직임 정보를 도출한 후, 상기 도출된 움직임 정보에 기반하여 인터 예측 및/또는 움직임 보상을 수행할 수 있다. 이 때, 부호화기 및 복호화기는 복원된 주변 블록(neighboring block) 및/또는 이미 복원된 콜(col) 픽쳐(collocated picture) 내에서 현재 블록에 대응되는 콜(col) 블록(collocated block)의 움직임 정보를 이용함으로써, 부호화/복호화 효율을 향상시킬 수 있다. 여기서, 복원된 주변 블록은 이미 부호화 및/또는 복호화되어 복원된 현재 픽쳐 내의 블록으로서, 현재 블록에 인접한 블록 및/또는 현재 블록의 외부 코너에 위치한 블록을 포함할 수 있다. 또한 부호화기 및 복호화기는, 콜 픽쳐 내에서 현재 블록과 공간적으로 동일한 위치에 존재하는 블록을 기준으로 소정의 상대적인 위치를 결정할 수 있고, 상기 결정된 소정의 상대적인 위치(상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록의 내부 및/또는 외부의 위치)를 기반으로 상기 콜 블록을 도출할 수 있다. 여기서, 일례로 콜 픽쳐는 참조 픽쳐 리스트에 포함된 참조 픽쳐 중에서 하나의 픽쳐에 해당될 수 있다.In the inter mode, the encoder and the decoder may derive motion information of a current block, and then perform inter prediction and / or motion compensation based on the derived motion information. At this time, the encoder and the decoder may obtain motion information of a collocated block corresponding to a current block in a reconstructed neighboring block and / or a collocated picture that has already been reconstructed. By using, it is possible to improve the encoding / decoding efficiency. Here, the reconstructed neighboring block is a block in the current picture that is already encoded and / or decoded and reconstructed, and may include a block adjacent to the current block and / or a block located at an outer corner of the current block. Also, the encoder and the decoder may determine a predetermined relative position based on a block that is spatially the same as the current block in the call picture, and the determined relative position (which is spatially the same as the current block) The call block may be derived based on the inside and / or outside location of the block. Here, as an example, the call picture may correspond to one picture among reference pictures included in the reference picture list.

한편, 움직임 정보 도출 방식은 현재 블록의 예측 모드에 따라 달라질 수 있다. 인터 예측을 위해 적용되는 예측 모드에는 AMVP(Advanced Motion Vector Predictor), 머지(merge) 등이 있을 수 있다.Meanwhile, a method for deriving motion information may vary according to a prediction mode of a current block. A prediction mode applied for inter prediction may include an Advanced Motion Vector Predictor (AMVP), merge, and the like.

일례로, AMVP(Advanced Motion Vector Predictor)가 적용되는 경우, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 벡터 및/또는 콜 블록의 움직임 벡터를 이용하여, 예측 움직임 벡터 후보 리스트를 생성할 수 있다. 즉, 복원된 주변 블록의 움직임 벡터 및/또는 콜 블록의 움직임 벡터는 예측 움직임 벡터 후보로 사용될 수 있다. 부호화기는 상기 리스트에 포함된 예측 움직임 벡터 후보 중에서 선택된 최적의 예측 움직임 벡터를 지시하는 예측 움직임 벡터 인덱스를 복호화기로 전송할 수 있다. 이 때, 복호화기는 상기 예측 움직임 벡터 인덱스를 이용하여, 예측 움직임 벡터 후보 리스트에 포함된 예측 움직임 벡터 후보 중에서, 현재 블록의 예측 움직임 벡터를 선택할 수 있다.For example, when the Advanced Motion Vector Predictor (AMVP) is applied, the encoder and the decoder may generate a predicted motion vector candidate list by using a motion vector of a reconstructed neighboring block and / or a motion vector of a call block. That is, the motion vector of the reconstructed neighboring block and / or the motion vector of the call block may be used as candidate prediction motion vectors. The encoder may transmit a predicted motion vector index indicating the optimal predicted motion vector selected from the predicted motion vector candidates included in the list to the decoder. At this time, the decoder can select the predicted motion vector of the current block from the predicted motion vector candidates included in the predicted motion vector candidate list using the predicted motion vector index.

부호화기는 현재 블록의 움직임 벡터와 예측 움직임 벡터 간의 움직임 벡터 차분(MVD: Motion Vector Difference)을 구할 수 있고, 이를 부호화하여 복호화기로 전송할 수 있다. 이 때, 복호화기는 수신된 움직임 벡터 차분을 복호화할 수 있고, 복호화된 움직임 벡터 차분과 예측 움직임 벡터의 합을 통해 현재 블록의 움직임 벡터를 도출할 수 있다.The encoder may obtain a motion vector difference (MVD) between a motion vector of a current block and a predicted motion vector, and encode it and transmit it to a decoder. At this time, the decoder can decode the received motion vector difference, and derive the motion vector of the current block through the sum of the decoded motion vector difference and the predicted motion vector.

다른 예로, 머지(merge)가 적용되는 경우, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보 및/또는 콜 블록의 움직임 정보를 이용하여, 머지 후보 리스트를 생성할 수 있다. 즉, 부호화기 및 복호화기는 복원된 주변 블록 및/또는 콜 블록의 움직임 정보가 존재하는 경우, 이를 현재 블록에 대한 머지 후보로 사용할 수 있다. As another example, when a merge is applied, the encoder and the decoder may generate a merge candidate list using motion information of a reconstructed neighboring block and / or motion information of a call block. That is, if motion information of reconstructed neighboring blocks and / or call blocks exists, the encoder and decoder may use them as merge candidates for the current block.

부호화기는 머지 후보 리스트에 포함된 머지 후보 중에서 최적의 부호화 효율을 제공할 수 있는 머지 후보를 현재 블록에 대한 움직임 정보로 선택할 수 있다. 이 때, 상기 선택된 머지 후보를 지시하는 머지 인덱스가 비트스트림에 포함되어 복호화기로 전송될 수 있다. 복호화기는 상기 전송된 머지 인덱스를 이용하여, 머지 후보 리스트에 포함된 머지 후보 중에서 하나를 선택할 수 있으며, 상기 선택된 머지 후보를 현재 블록의 움직임 정보로 결정할 수 있다. 따라서, 머지 모드가 적용되는 경우, 복원된 주변 블록 및/또는 콜 블록의 움직임 정보가 현재 블록의 움직임 정보로 그대로 사용될 수 있다.The encoder may select a merge candidate capable of providing optimal encoding efficiency among merge candidates included in the merge candidate list as motion information for a current block. At this time, a merge index indicating the selected merge candidate may be included in a bitstream and transmitted to a decoder. The decoder may select one of merge candidates included in the merge candidate list by using the transmitted merge index, and determine the selected merge candidate as motion information of the current block. Therefore, when the merge mode is applied, motion information of the restored neighboring block and / or call block may be used as the motion information of the current block.

상술한 AMVP 및 머지 모드에서는, 현재 블록의 움직임 정보를 도출하기 위해, 복원된 주변 블록의 움직임 정보 및/또는 콜 블록의 움직임 정보가 사용될 수 있다. 이하, 후술되는 실시예들에서, 복원된 주변 블록으로부터 도출되는 움직임 정보는 공간적 움직임 정보라 하고, 콜 블록을 기반으로 도출되는 움직임 정보는 시간적 움직임 정보라 한다. 예를 들어, 복원된 주변 블록으로부터 도출되는 움직임 벡터는 공간적 움직임 벡터, 콜 블록을 기반으로 도출되는 움직임 벡터는 시간적 움직임 벡터로 불릴 수 있다.In the above-described AMVP and merge mode, motion information of a reconstructed neighboring block and / or motion information of a call block may be used to derive motion information of the current block. Hereinafter, in embodiments to be described later, motion information derived from the reconstructed neighboring block is referred to as spatial motion information, and motion information derived based on a call block is referred to as temporal motion information. For example, a motion vector derived from a reconstructed neighboring block may be called a spatial motion vector, and a motion vector derived based on a call block may be referred to as a temporal motion vector.

다시 도 3을 참조하면, 부호화기 및 복호화기는 상기 도출된 움직임 정보에 기반하여 현재 블록에 대한 움직임 보상을 수행함으로써, 현재 블록의 예측 블록을 생성할 수 있다(S320). 여기서, 예측 블록은 현재 블록에 대한 움직임 보상 수행 결과 생성된, 움직임 보상된 블록을 의미할 수 있다. 또한, 복수의 움직임 보상된 블록은 하나의 움직임 보상된 영상을 구성할 수 있다. 따라서, 후술되는 실시예들에서 예측 블록은 문맥에 따라 ‘움직임 보상된 블록’ 및/또는 ‘움직임 보상된 영상’으로 지칭될 수 있으며, 이러한 구분은 해당 기술 분야에서 통상의 지식을 가진 자라면 용이하게 할 수 있을 것이다.Referring back to FIG. 3, the encoder and the decoder may generate a prediction block of the current block by performing motion compensation for the current block based on the derived motion information (S320). Here, the prediction block may mean a motion compensated block generated as a result of performing motion compensation on the current block. Also, a plurality of motion-compensated blocks may constitute one motion-compensated image. Accordingly, in the embodiments described below, the prediction block may be referred to as a 'motion compensated block' and / or a 'motion compensated image' depending on the context, and this classification is easy for those of ordinary skill in the art. You can do it.

한편, 인터 예측이 수행되는 픽쳐에는 P 픽쳐 및 B 픽쳐가 있을 수 있다. P 픽쳐는 하나의 참조 픽쳐를 이용한 단방향 예측이 수행되는 픽쳐를 의미할 수 있고, B 픽쳐는 하나 이상, 예를 들어 두 개의 참조 픽쳐를 이용한 순방향, 역방향 또는 양방향 예측이 수행될 수 있는 픽쳐를 의미할 수 있다. 예를 들어, B 픽쳐에서는 1개의 순방향 참조 픽쳐(과거 픽쳐) 및 1개의 역방향 참조 픽쳐(미래 픽쳐)를 이용하여 인터 예측이 수행될 수 있다. 또한, B 픽쳐에서는 2개의 순방향 참조 픽쳐를 이용하여 예측이 수행되거나, 2개의 역방향 참조 픽쳐를 이용하여 예측이 수행될 수도 있다.Meanwhile, a picture in which inter prediction is performed may include a P picture and a B picture. The P picture may refer to a picture in which unidirectional prediction using one reference picture is performed, and the B picture refers to a picture in which forward, reverse or bidirectional prediction using two or more reference pictures can be performed. can do. For example, in the B picture, inter prediction may be performed using one forward reference picture (past picture) and one backward reference picture (future picture). In addition, prediction may be performed using two forward reference pictures in the B picture or prediction may be performed using two backward reference pictures.

여기서, 참조 픽쳐들은 참조 픽쳐 리스트(reference picture list)에 의해 관리될 수 있다. P 픽쳐에서는 1개의 참조 픽쳐가 사용되고, 상기 참조 픽쳐는 참조 픽쳐 리스트0(L0 또는 List0)에 할당될 수 있다. B 픽쳐에서는 2개의 참조 픽쳐가 사용되고, 상기 2개의 참조 픽쳐는 각각 참조 픽쳐 리스트0 및 참조 픽쳐 리스트1(L1 또는 List1)에 할당될 수 있다. 이하, L0 참조 픽쳐 리스트는 참조 픽쳐 리스트0과 동일한 의미를 가질 수 있으며, L1 참조 픽쳐 리스트는 참조 픽쳐 리스트1과 동일한 의미를 가질 수 있다.Here, the reference pictures may be managed by a reference picture list. In the P picture, one reference picture is used, and the reference picture may be assigned to the reference picture list 0 (L0 or List0). In the B picture, two reference pictures are used, and the two reference pictures may be allocated to the reference picture list 0 and the reference picture list 1 (L1 or List1), respectively. Hereinafter, the L0 reference picture list may have the same meaning as the reference picture list 0, and the L1 reference picture list may have the same meaning as the reference picture list 1.

일반적으로 순방향 참조 픽쳐는 참조 픽쳐 리스트0에 할당되고 역방향 참조 픽쳐는 참조 픽쳐 리스트1에 할당될 수 있다. 그러나, 참조 픽쳐의 할당 방법은 이에 한정되는 것이 아니며, 순방향 참조 픽쳐가 참조 픽쳐 리스트1에 할당될 수도 있고, 역방향 참조 픽쳐가 참조 픽쳐 리스트0에 할당될 수도 있다. 이하, 참조 픽쳐 리스트0에 할당된 참조 픽쳐는 L0 참조 픽쳐, 참조 픽쳐 리스트1에 할당된 참조 픽쳐는 L1 참조 픽쳐라 한다.In general, a forward reference picture may be assigned to reference picture list 0 and a reverse reference picture may be assigned to reference picture list 1. However, the method of allocating the reference picture is not limited to this, and the forward reference picture may be assigned to the reference picture list 1 or the reverse reference picture may be assigned to the reference picture list 0. Hereinafter, the reference picture assigned to the reference picture list 0 is referred to as an L0 reference picture and the reference picture assigned to the reference picture list 1 is referred to as an L1 reference picture.

참조 픽쳐들은 일반적으로 참조 픽쳐 번호에 따라, 내림차순으로 참조 픽쳐 리스트에 할당될 수 있다. 여기서, 참조 픽쳐 번호는 각 참조 픽쳐에 POC(Picture Order Count) 순서로 할당된 번호를 의미할 수 있으며, 상기 POC 순서는 픽쳐의 표시 순서 및/또는 시간 순서를 의미할 수 있다. 예를 들어, 참조 픽쳐 번호가 동일한 2개의 참조 픽쳐는 서로 동일한 참조 픽쳐에 해당될 수 있다. 참조 픽쳐 리스트에 할당된 참조 픽쳐들은 참조 픽쳐 리스트 재배열(RPLR: Reference Picture List Reordering) 또는 메모리 관리 컨트롤(MMCO: Memory Management Control Operation) 명령에 의해 재배열될 수 있다. The reference pictures may be allocated to the reference picture list in descending order, generally according to the reference picture number. Here, the reference picture number may mean a number assigned to each reference picture in a picture order count (POC) order, and the POC order may mean a display order and / or time order of pictures. For example, two reference pictures having the same reference picture number may correspond to the same reference picture. The reference pictures allocated to the reference picture list may be rearranged by a reference picture list reordering (RPLR) or a memory management control operation (MMCO) command.

상술한 바와 같이, P 픽쳐에서는 1개의 L0 참조 픽쳐를 이용한 단방향 예측이 수행될 수 있고, B 픽쳐에서는 1개의 L0 참조 픽쳐 및 1개의 L1 참조 픽쳐, 즉 2개의 참조 픽쳐를 이용한 순방향, 역방향 또는 양방향 예측이 수행될 수 있다. 1개의 참조 픽쳐를 이용한 예측은 단예측(uni-prediction)으로 불릴 수 있고, L0 참조 픽쳐 및 L1 참조 픽쳐를 포함한 2개의 참조 픽쳐를 이용한 예측은 쌍예측(bi-prediction)으로 불릴 수 있다. As described above, unidirectional prediction using one L0 reference picture may be performed in the P picture, and one L0 reference picture and one L1 reference picture may be performed in the B picture, that is, forward, reverse, or bidirectional using two reference pictures. Prediction can be performed. Prediction using one reference picture may be called uni-prediction, and prediction using two reference pictures including L0 reference picture and L1 reference picture may be called bi-prediction.

쌍예측은 순방향 예측, 역방향 예측 및 양방향 예측을 모두 포함하는 개념으로 사용될 수 있으나, 후술되는 실시예들에서는 편의상 2개의 참조 픽쳐(L0 참조 픽쳐 및 L1 참조 픽쳐)를 이용한 예측은 양방향 예측이라 한다. 즉, 후술되는 실시예들에서 양방향 예측은 쌍예측을 의미할 수 있고, 2개의 참조 픽쳐(L0 참조 픽쳐 및 L1 참조 픽쳐)를 이용한 순방향, 역방향, 양방향 예측을 모두 포함하는 개념으로 이해될 수 있다. 또한 쌍예측이 수행되는 경우에도 순방향 예측 또는 역방향 예측이 수행될 수 있으나, 후술되는 실시예들에서는 편의상 1개의 참조 픽쳐만을 이용한 예측을 단방향 예측이라 한다. 즉, 후술되는 실시예들에서 단방향 예측은 단예측을 의미할 수 있고, 1개의 참조 픽쳐를 이용한 예측만을 포함하는 개념으로 이해되어야 할 것이다. 또한, 이하 예측이 수행되는 블록에 대해 단방향 예측(단예측)이 적용되는지 또는 양방향 예측(쌍예측)이 적용되는지 여부를 지시하는 정보는 예측 방향 정보라 한다.Bi-prediction may be used as a concept including both forward prediction, backward prediction, and bidirectional prediction, but in the embodiments described below, prediction using two reference pictures (L0 reference picture and L1 reference picture) is referred to as bidirectional prediction for convenience. That is, in the embodiments described below, bi-directional prediction may mean bi-prediction, and may be understood as a concept including both forward, backward, and bi-directional prediction using two reference pictures (L0 reference picture and L1 reference picture). . Further, even when bi-prediction is performed, forward prediction or backward prediction may be performed, but in the embodiments described below, prediction using only one reference picture is referred to as unidirectional prediction for convenience. That is, in the embodiments described below, the unidirectional prediction may mean a single prediction, and should be understood as a concept including only prediction using one reference picture. In addition, hereinafter, information indicating whether unidirectional prediction (uni-prediction) or bi-directional prediction (bi-prediction) is applied to a block on which prediction is performed is referred to as prediction direction information.

도 4는 양방향 예측이 적용되는 경우, 인터 예측 방법의 실시예를 개략적으로 나타내는 도면이다.4 is a diagram schematically showing an embodiment of an inter prediction method when bidirectional prediction is applied.

상술한 바와 같이, 부호화기 및 복호화기는 인터 예측시 단방향 예측뿐만 아니라 양방향 예측을 수행할 수 있다. 양방향 예측이 적용되는 경우, 예측이 수행되는 각각의 블록은 두 개의 참조 픽쳐(L0 참조 픽쳐 및 L1 참조 픽쳐)를 가질 수 있다. 또한 이 때, 양방향 예측이 수행되는 각각의 블록은 두 개의 움직임 정보를 가질 수 있다. 여기서, 움직임 정보는 참조 픽쳐 번호 및 움직임 벡터 등을 포함할 수 있다.As described above, the encoder and the decoder can perform bidirectional prediction as well as unidirectional prediction during inter prediction. When bidirectional prediction is applied, each block for which prediction is performed may have two reference pictures (L0 reference picture and L1 reference picture). Also, at this time, each block in which bidirectional prediction is performed may have two pieces of motion information. Here, the motion information may include a reference picture number and a motion vector.

양방향 예측이 수행되는 경우, 부호화기 및 복호화기는 참조 픽쳐 리스트0 및 참조 픽쳐 리스트1에서 각각 하나의 참조 픽쳐를 선택하여 예측에 사용할 수 있다. 즉, L0 참조 픽쳐 및 L1 참조 픽쳐를 포함하는 2 개의 참조 픽쳐가 양방향 예측에 사용될 수 있다. 이하, L0 참조 픽쳐에 대응되는 움직임 정보는 L0 움직임 정보라 하고, L1 참조 픽쳐에 대응되는 움직임 정보는 L1 움직임 정보라 한다. 또한, L0 움직임 정보를 이용한 움직임 보상은 L0 움직임 보상이라 하고, L1 움직임 정보를 이용한 움직임 보상은 L1 움직임 보상이라 한다. When bidirectional prediction is performed, the encoder and the decoder may select one reference picture from the reference picture list 0 and the reference picture list 1, and use them for prediction. That is, two reference pictures including the L0 reference picture and the L1 reference picture may be used for bidirectional prediction. Hereinafter, motion information corresponding to the L0 reference picture is referred to as L0 motion information, and motion information corresponding to the L1 reference picture is referred to as L1 motion information. In addition, motion compensation using L0 motion information is called L0 motion compensation, and motion compensation using L1 motion information is called L1 motion compensation.

도 4를 참조하면, 부호화기 및 복호화기는 L0 움직임 정보 및 L0 참조 픽쳐 리스트를 이용하여 현재 블록에 대한 L0 움직임 보상(410)을 수행함으로써, L0 움직임 보상된 블록을 생성할 수 있다. 또한, 부호화기 및 복호화기는 L1 움직임 정보 및 L1 참조 픽쳐 리스트를 이용하여 L1 움직임 보상(420)을 수행함으로써, L1 움직임 보상된 블록을 생성할 수 있다. 이 때, L0 움직임 보상(410) 및 L1 움직임 보상(420) 과정은 서로 독립적으로 수행될 수 있다.Referring to FIG. 4, the encoder and decoder may generate an L0 motion compensated block by performing L0 motion compensation 410 for a current block using L0 motion information and an L0 reference picture list. In addition, the encoder and decoder may generate an L1 motion compensated block by performing L1 motion compensation 420 using L1 motion information and an L1 reference picture list. At this time, the L0 motion compensation 410 and L1 motion compensation 420 processes may be performed independently of each other.

부호화기 및 복호화기는 L0 움직임 보상된 블록 및 L1 움직임 보상된 블록에 대해 가중치 평균(430)을 수행하여, 최종적으로 하나의 움직임 보상된 블록을 생성할 수 있다. 일례로, 상기 가중치 평균(430)은 L0 움직임 보상된 블록 및 L1 움직임 보상된 블록 내의 픽셀 단위로 수행될 수 있다. 이 때, 최종적으로 생성된 하나의 움직임 보상된 블록은 현재 블록의 예측 블록에 해당될 수 있다.The encoder and the decoder may perform a weighted average 430 on the L0 motion compensated block and the L1 motion compensated block, and finally generate one motion compensated block. For example, the weighted average 430 may be performed in units of pixels in an L0 motion compensated block and an L1 motion compensated block. At this time, one finally generated motion-compensated block may correspond to the prediction block of the current block.

이하, 양방향 예측시에 적용되는 움직임 보상은 양방향 움직임 보상이라 한다. 이에 대응하여, 단방향 예측시에 적용되는 움직임 보상은 단방향 움직임 보상으로 불릴 수 있다.Hereinafter, motion compensation applied in bidirectional prediction is referred to as bidirectional motion compensation. In response to this, motion compensation applied in unidirectional prediction may be referred to as unidirectional motion compensation.

도 5는 부호화된 영상의 움직임 정보의 일 실시예를 개략적으로 나타내는 도면이다. 도 5는 부호화된 영상을 구성하는 복수의 블록 및 상기 복수의 블록 각각의 움직임 정보를 도시한다.5 is a diagram schematically showing an embodiment of motion information of an encoded image. 5 illustrates a plurality of blocks constituting an encoded image and motion information of each of the plurality of blocks.

도 5에서 부호화된 영상은 BasketballDrill에 해당된다. 여기서, BasketballDrill은 영상 부호화/복호화 실험에 사용되는 테스트 시퀀스(test sequence)의 명칭을 나타낸다. 부호화된 영상의 크기는 832x480이고, POC(Picture Order Count)는 2이다. 또한, 도 5의 영상에 적용된 양자화 파라미터(QP: Quantization Parameter) 값은 32이다. The image encoded in FIG. 5 corresponds to BasketballDrill. Here, BasketballDrill indicates the name of a test sequence used in the video encoding / decoding experiment. The size of the encoded image is 832x480, and the picture order count (POC) is 2. In addition, a quantization parameter (QP) value applied to the image of FIG. 5 is 32.

부호화기 및 복호화기는 저지연 응용 환경에서의 인터 예측 효율을 높이기 위해, 순방향 B 픽쳐를 이용할 수 있다. 여기서, 순방향 B 픽쳐는 순방향 예측만이 수행되는 B 픽쳐를 의미할 수 있다. 순방향 B 픽쳐가 사용되는 경우, 예측이 수행되는 각각의 블록은 두 개의 움직임 정보(L0 움직임 정보, L1 움직임 정보)를 가질 수 있다. 순방향 B 픽쳐에서는 일반적으로 L0 참조 픽쳐 리스트 및 L1 참조 픽쳐 리스트가 동일하게 설정될 수 있다. 이하 본 명세서에서, 순방향 B 픽쳐가 사용되는 경우에는 L0 참조 픽쳐 리스트 및 L1 참조 픽쳐 리스트가 동일하다고 가정한다. The encoder and decoder may use forward B pictures to increase inter prediction efficiency in a low-latency application environment. Here, the forward B picture may mean a B picture in which only forward prediction is performed. When a forward B picture is used, each block for which prediction is performed may have two pieces of motion information (L0 motion information and L1 motion information). In the forward B picture, in general, the L0 reference picture list and the L1 reference picture list may be set identically. Hereinafter, in the present specification, when a forward B picture is used, it is assumed that the L0 reference picture list and the L1 reference picture list are the same.

*복호화기는 L0 참조 픽쳐 리스트 및 L1 참조 픽쳐 리스트를 기반으로, 현재 픽쳐가 순방향 B 픽쳐인지 여부를 직접 판단할 수도 있으나, 부호화기로부터 전송된 정보를 기반으로 현재 픽쳐가 순방향 B 픽쳐인지 여부를 판단할 수도 있다. 예를 들어, 부호화기는 L0 참조 픽쳐 리스트 및 L1 참조 픽쳐 리스트가 동일한지 여부를 지시하는 플래그를 부호화하여 복호화기로 전송할 수 있다. 이 때, 복호화기는 상기 플래그를 수신하여 복호화한 후, 복호화된 플래그를 기반으로, 현재 픽쳐가 순방향 B 픽쳐인지 여부를 판단할 수 있다. 또 다른 예로, 부호화기는 순방향 B 픽쳐에 해당하는 NAL 유닛 타입 값 또는 슬라이스 타입 값을 복호화기로 전송할 수 있고, 복호화기는 상기 값을 수신하여 이를 기반으로 순방향 B 픽쳐 여부를 판단할 수도 있다.* The decoder may directly determine whether the current picture is a forward B picture based on the L0 reference picture list and the L1 reference picture list, but may determine whether the current picture is a forward B picture based on information transmitted from the encoder. It might be. For example, the coder may encode a flag indicating whether the L0 reference picture list and the L1 reference picture list are the same and transmit the flag to the decoder. At this time, the decoder may receive and decode the flag, and then determine whether the current picture is a forward B picture based on the decoded flag. As another example, the encoder may transmit a NAL unit type value or a slice type value corresponding to the forward B picture to the decoder, and the decoder may receive the value and determine whether the forward B picture is based on the received value.

도 5에 도시된 영상은 순방향 B 픽쳐를 사용하여 부호화된 영상이다. 따라서, 부호화된 영상 내의 각각의 블록은 최대 두 개의 움직임 정보를 가질 수 있다. 여기서, 움직임 정보는 참조 픽쳐 번호, 움직임 벡터 등을 포함할 수 있다. 도 5을 참조하면, 두 개의 움직임 정보를 갖는 블록들 중에서 L0 움직임 정보(예를 들어, 참조 픽쳐 번호, 움직임 벡터)와 L1 움직임 정보(예를 들어, 참조 픽쳐 번호, 움직임 벡터)가 동일한 블록이 다수 존재할 수 있다. The image shown in FIG. 5 is an image encoded using a forward B picture. Accordingly, each block in the coded image may have up to two pieces of motion information. Here, the motion information may include a reference picture number, a motion vector, and the like. Referring to FIG. 5, among blocks having two motion information, a block having the same L0 motion information (eg, reference picture number, motion vector) and L1 motion information (eg, reference picture number, motion vector) is the same. There can be multiple.

순방향 B 픽쳐에서 L0 움직임 정보(예를 들어, 참조 픽쳐 번호, 움직임 벡터)와 L1 움직임 정보(예를 들어, 참조 픽쳐 번호, 움직임 벡터)가 동일한 블록은, 시간적 움직임 정보 도출 방법에 기인하여 발생할 수 있다. 상술한 바와 같이, 시간적 움직임 정보는 이미 복원된 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 움직임 정보로부터 도출될 수 있다. 예를 들어, 현재 블록의 L0 시간적 움직임 정보를 도출할 때, 부호화기 및 복호화기는 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 L0 움직임 정보를 사용할 수 있다. 그러나, 상기 콜 블록에 L0 움직임 정보가 존재하지 않는 경우, 부호화기 및 복호화기는 상기 콜 블록의 L1 움직임 정보를 현재 블록의 L0 시간적 움직임 정보로 사용할 수 있다. 반대로, 현재 블록의 L1 시간적 움직임 정보를 도출할 때, 부호화기 및 복호화기는 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 L1 움직임 정보를 사용할 수 있다. 그러나, 상기 콜 블록에 L1 움직임 정보가 존재하지 않는 경우, 부호화기 및 복호화기는 상기 콜 블록의 L0 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 상술한 프로세스 수행 결과, 현재 블록의 L0 움직임 정보와 L1 움직임 정보가 동일해지는 현상이 발생할 수 있다. 따라서, 본 명세서에서 L0 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)와 L1 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)가 동일한 경우, 및/또는 L0 시간적 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)와 L1 시간적 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)가 동일한 경우는, 이미 복원된 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 움직임 정보가 L0 움직임 정보 및 L1 움직임 정보 중에서 하나만을 갖는 경우를 포함할 수 있다.In the forward B picture, a block having the same L0 motion information (eg, reference picture number, motion vector) and L1 motion information (eg, reference picture number, motion vector) may occur due to a temporal motion information derivation method. have. As described above, temporal motion information may be derived from motion information of a call block corresponding to a current block in a call picture that has already been restored. For example, when deriving the L0 temporal motion information of the current block, the encoder and the decoder may use the L0 motion information of the call block corresponding to the current block in the call picture. However, if there is no L0 motion information in the call block, the encoder and decoder can use the L1 motion information of the call block as the L0 temporal motion information of the current block. Conversely, when deriving the L1 temporal motion information of the current block, the encoder and decoder can use the L1 motion information of the call block corresponding to the current block in the call picture. However, when the L1 motion information does not exist in the call block, the encoder and the decoder can use the L0 motion information of the call block as the L1 temporal motion information of the current block. As a result of performing the above-described process, a phenomenon in which the L0 motion information and the L1 motion information of the current block become the same may occur. Accordingly, in this specification, when L0 motion information (eg, reference picture number and motion vector) and L1 motion information (eg, reference picture number and motion vector) are the same, and / or L0 temporal motion information (eg For example, if the reference picture number and motion vector) and L1 temporal motion information (for example, the reference picture number and motion vector) are the same, the motion information of the call block corresponding to the current block in the already restored call picture is L0. It may include the case of having only one of motion information and L1 motion information.

또한, L0 움직임 정보와 L1 움직임 정보가 동일한 블록이 발생된 경우, 상기 블록은 이후에 부호화되는 블록에 영향을 미칠 수 있다. 예를 들어, 머지(merge)가 적용되는 경우, 복원된 주변 블록 및/또는 콜 블록의 움직임 정보(L0 움직임 정보 및 L1 움직임 정보)가 현재 블록의 움직임 정보로 그대로 사용될 수 있다. 따라서, L0 움직임 정보와 L1 움직임 정보가 동일한 블록이 발생된 경우, L0 움직임 정보와 L1 움직임 정보가 동일한 다른 블록이 더 많이 발생될 수 있다. In addition, when a block having the same L0 motion information and L1 motion information is generated, the block may affect a block to be encoded later. For example, when a merge is applied, motion information (L0 motion information and L1 motion information) of the restored neighboring block and / or call block may be used as the motion information of the current block. Accordingly, when a block having the same L0 motion information and L1 motion information is generated, more blocks having the same L0 motion information and L1 motion information may be generated.

L0 움직임 정보와 L1 움직임 정보가 동일한 블록에 대해 움직임 보상이 수행되는 경우에는, 하나의 블록에서 동일한 프로세스가 두 번 반복하여 수행될 수 있다. 이는 부호화 관점에서 매우 비효율적이므로, 상술한 문제점을 해결하여 계산 복잡도를 감소시키고 부호화 효율을 향상시킬 수 있는 인터 예측 방법 및/또는 움직임 보상 방법이 제공될 수 있다. 일례로, L0 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)와 L1 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)가 동일한 경우, 부호화기 및 복호화기는 움직임 보상 과정을 한 번만 수행함으로써 계산 복잡도를 감소시킬 수 있다. 다른 예로, L0 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)와 L1 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)가 동일한 경우, 부호화기 및 복호화기는 L0 움직임 정보 및/또는 L1 움직임 정보를 다시 설정함으로써 부호화 효율을 증가시킬 수도 있다.When motion compensation is performed on a block in which L0 motion information and L1 motion information are the same, the same process may be repeatedly performed twice in one block. Since this is very inefficient in terms of encoding, an inter prediction method and / or a motion compensation method capable of reducing the computational complexity and improving the encoding efficiency by solving the above-described problems may be provided. For example, when the L0 motion information (eg, reference picture number and motion vector) and the L1 motion information (eg, reference picture number and motion vector) are the same, the encoder and decoder perform the motion compensation process only once. The computational complexity can be reduced. As another example, if the L0 motion information (eg, reference picture number and motion vector) and the L1 motion information (eg, reference picture number and motion vector) are the same, the encoder and the decoder L0 motion information and / or L1 motion Coding efficiency may be increased by resetting information.

도 6은 본 발명에 따른 현재 블록의 시간적 움직임 정보 도출 방법의 일 실시예를 개략적으로 나타내는 흐름도이다. 6 is a flowchart schematically showing an embodiment of a method for deriving temporal motion information of a current block according to the present invention.

후술되는 실시예들은 시간적 움직임 정보를 중심으로 서술되지만 본 발명은 이에 한정되는 것은 아니다. 예를 들어, 도 6의 실시예에 따른 방법들은 머지 모드 및/또는 AMVP 모드에서의 시간적 움직임 정보뿐만 아니라, 머지 모드에서 머지 후보 리스트를 기반으로 도출된 현재 블록의 움직임 정보 및/또는 AMVP 모드에서 예측 움직임 벡터 후보 리스트를 기반으로 도출된 현재 블록의 움직임 정보에도 동일하거나 유사한 방식으로 적용될 수 있다.The embodiments described below are mainly described with respect to temporal motion information, but the present invention is not limited thereto. For example, the methods according to the embodiment of FIG. 6 may include temporal motion information in merge mode and / or AMVP mode, as well as motion information and / or AMVP mode of the current block derived based on a merge candidate list in merge mode. The motion information of the current block derived based on the predicted motion vector candidate list may be applied in the same or similar manner.

상술한 바와 같이, 시간적 움직임 정보는 이미 복원된 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 움직임 정보를 기반으로 도출될 수 있다. 여기서, 상기 콜 픽쳐는 일례로 참조 픽쳐 리스트에 포함된 참조 픽쳐 중에서 하나의 픽쳐에 해당될 수 있다. 부호화기 및 복호화기는, 콜 픽쳐 내에서 현재 블록과 공간적으로 동일한 위치에 존재하는 블록을 기준으로 소정의 상대적인 위치를 결정할 수 있고, 상기 결정된 소정의 상대적인 위치(예를 들어, 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록의 내부 및/또는 외부의 위치)를 기반으로 상기 콜 블록을 도출할 수 있다. 콜 블록을 기반으로 도출되는 시간적 움직임 정보는 예측 방향 정보, L0 참조 픽쳐 번호, L1 참조 픽쳐 번호, L0 움직임 벡터 및 L1 움직임 벡터 등을 포함할 수 있다.As described above, temporal motion information may be derived based on motion information of a call block corresponding to a current block in a call picture that has already been restored. Here, the call picture may correspond to one picture among reference pictures included in the reference picture list, for example. The encoder and decoder may determine a predetermined relative position based on a block that is spatially identical to the current block in the call picture, and the determined predetermined relative position (eg, spatially identical to the current block) The call block may be derived based on a location inside and / or outside of a block existing at a location. The temporal motion information derived based on the call block may include prediction direction information, L0 reference picture number, L1 reference picture number, L0 motion vector, and L1 motion vector.

도 6을 참조하면, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 시간적 움직임 정보에서 L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일한지 여부, 즉 L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일하고 L0 움직임 벡터와 L1 움직임 벡터가 동일한지 여부를 판단할 수 있다(S610).Referring to FIG. 6, the encoder and decoder determine whether L0 temporal motion information and L1 temporal motion information are the same in temporal motion information derived based on a call block, that is, L0 reference picture number and L1 reference picture number are the same and L0 motion It may be determined whether the vector and the L1 motion vector are the same (S610).

L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일하지 않은 경우, 즉 L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일하지 않거나 및/또는 L0 움직임 벡터와 L1 움직임 벡터가 동일하지 않은 경우, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 시간적 움직임 정보를 그대로 현재 블록에 대한 시간적 움직임 정보로 사용할 수 있다. AMVP가 적용되는 경우, 상기 현재 블록의 시간적 움직임 정보는 현재 블록에 대한 예측 움직임 벡터 후보로 결정되거나 등록될 수 있다. 또한, 머지가 적용되는 경우, 상기 현재 블록의 시간적 움직임 정보는 현재 블록에 대한 머지 후보로 결정되거나 등록될 수 있다. If the L0 temporal motion information and the L1 temporal motion information are not the same, that is, the L0 reference picture number and the L1 reference picture number are not the same, and / or the L0 motion vector and the L1 motion vector are not the same, the encoder and decoder call The temporal motion information derived based on the block can be used as the temporal motion information for the current block. When AMVP is applied, temporal motion information of the current block may be determined or registered as a prediction motion vector candidate for the current block. Also, when merge is applied, temporal motion information of the current block may be determined or registered as a merge candidate for the current block.

L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일한 경우, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보가 존재하는지 여부를 판단할 수 있다(S620). 예를 들어, 이 때 부호화기 및 복호화기는 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 복원된 주변 블록 중에서 움직임 정보를 갖는 블록이 존재하는지 여부를 판단할 수 있다. 여기서, 복원된 주변 블록은 이미 부호화 및/또는 복호화되어 복원된 현재 픽쳐 내의 블록으로서, 현재 블록에 인접한 블록 및/또는 현재 블록의 외부 코너에 위치한 블록을 포함할 수 있다.When the L0 temporal motion information and the L1 temporal motion information are the same, the encoder and the decoder may determine whether motion information of the reconstructed neighboring block exists (S620). For example, at this time, the encoder and decoder may determine whether there is a block having motion information among reconstructed neighboring blocks of a predetermined position and / or a position selected by a predetermined method. Here, the reconstructed neighboring block is a block in the current picture that is already encoded and / or decoded and reconstructed, and may include a block adjacent to the current block and / or a block located at an outer corner of the current block.

복원된 주변 블록의 움직임 정보가 존재하지 않는 경우(예를 들어, 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 복원된 주변 블록 중에서 움직임 정보를 갖는 블록이 존재하지 않는 경우), 부호화기 및 복호화기는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수 있다(S630). 또한 이 때, 부호화기 및 복호화기는 L0 시간적 움직임 정보만을 현재 블록의 시간적 움직임 정보로 사용할 수 있다. When the motion information of the reconstructed neighboring block does not exist (for example, if there is no block having motion information among the reconstructed neighboring blocks of a predetermined position and / or a position selected in a predetermined method), the encoder and the decoding The group may re-set the prediction direction information of the current block as unidirectional prediction (S630). Also, at this time, the encoder and the decoder may use only L0 temporal motion information as temporal motion information of the current block.

복원된 주변 블록의 움직임 정보가 존재하는 경우(예를 들어, 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 복원된 주변 블록 중에서 움직임 정보를 갖는 블록이 존재하는 경우), 부호화기 및 복호화기는 상기 복원된 주변 블록의 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다(S640). 즉, 이 때 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보를 상기 복원된 주변 블록의 움직임 정보로 재설정할 수 있다. L1 시간적 움직임 정보의 설정을 위해 사용되는 복원된 주변 블록의 구체적인 실시예는 후술하기로 한다.When the motion information of the reconstructed neighboring block exists (for example, if there is a block having motion information among the reconstructed neighboring blocks of a predetermined position and / or a position selected by a predetermined method), the encoder and decoder The restored neighboring block motion information may be used as L1 temporal motion information of the current block (S640). That is, at this time, the encoder and decoder may reset the L1 temporal motion information of the current block to motion information of the restored neighboring block. A specific embodiment of the reconstructed neighboring block used for setting the L1 temporal motion information will be described later.

상술한 실시예에서 현재 블록의 시간적 움직임 정보 도출 방법은 일련의 단계로서 순서도를 기초로 설명되고 있으나, 순서도의 하나 또는 그 이상의 단계는 삭제될 수도 있다. 예를 들어, 상술한 실시예에서 S620 및 S640의 단계는 생략될 수도 있다. 이 때, L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일한 경우, 부호화기 및 복호화기는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수 있다(S630). 또한 이 때, 부호화기 및 복호화기는 L0 시간적 움직임 정보만을 현재 블록의 시간적 움직임 정보로 사용할 수 있다. In the above-described embodiment, the method for deriving temporal motion information of the current block is described based on a flowchart as a series of steps, but one or more steps of the flowchart may be deleted. For example, in the above-described embodiment, steps S620 and S640 may be omitted. At this time, if the L0 temporal motion information and the L1 temporal motion information are the same, the encoder and the decoder may re-set the prediction direction information of the current block as unidirectional prediction (S630). Also, at this time, the encoder and the decoder may use only L0 temporal motion information as temporal motion information of the current block.

한편, 상술한 실시예에서는 L0 시간적 움직임 정보와 L1 시간적 움직임 정보의 동일성을 기반으로 S620 내지 S640 과정의 수행 여부가 결정되지만, 부호화기 및 복호화기는 다른 조건을 기반으로 S620 내지 S640 과정의 수행 여부를 결정할 수도 있다. On the other hand, in the above-described embodiment, it is determined whether to perform the processes S620 to S640 based on the identity of the L0 temporal motion information and the L1 temporal motion information, but the encoder and the decoder determine whether to perform the S620 to S640 processes based on other conditions. It might be.

일 실시예로, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 시간적 움직임 정보에서, L0 참조 픽쳐 번호 및 L1 참조 픽쳐 번호의 동일성을 기반으로 S620 내지 S640 과정의 수행 여부를 결정할 수 있다. 일례로, 부호화기 및 복호화기는 L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일한 경우에 S620 내지 S640 과정을 수행할 수 있다. In an embodiment, the encoder and the decoder may determine whether to perform the processes S620 to S640 based on the identity of the L0 reference picture number and the L1 reference picture number in temporal motion information derived based on a call block. For example, the encoder and the decoder may perform processes S620 to S640 when the L0 reference picture number and the L1 reference picture number are the same.

다른 실시예로, 부호화기 및 복호화기는 콜 블록의 예측 방향을 기반으로 S620 내지 S640 과정의 수행 여부를 결정할 수 있다. 상술한 바와 같이, 예측 방향 정보는 예측이 수행되는 블록에 대해 단방향 예측이 적용되는지 또는 양방향 예측이 적용되는지 여부를 지시하는 정보를 의미할 수 있다. 따라서, 상기 예측 방향은 단방향 예측 또는 양방향 예측에 해당될 수 있다. 일례로, 부호화기 및 복호화기는 콜 블록의 움직임 정보(예측 방향)가 양방향 예측이 아닌 단방향 예측인 경우에 S620 내지 S640 과정을 수행할 수 있다. 이는 콜 블록의 예측 방향이 단방향 예측인 경우, 결과적으로 콜 블록을 기반으로 도출되는 시간적 움직임 정보에서, L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일할 수 있기 때문이다. In another embodiment, the encoder and the decoder may determine whether to perform processes S620 to S640 based on the prediction direction of the call block. As described above, the prediction direction information may mean information indicating whether unidirectional prediction or bidirectional prediction is applied to a block on which prediction is performed. Accordingly, the prediction direction may correspond to unidirectional prediction or bidirectional prediction. For example, the encoder and the decoder may perform processes S620 to S640 when the motion information (prediction direction) of the call block is unidirectional prediction rather than bidirectional prediction. This is because when the prediction direction of the call block is unidirectional prediction, as a result, in the temporal motion information derived based on the call block, the L0 temporal motion information and the L1 temporal motion information may be the same.

또 다른 실시예로, 부호화기 및 복호화기는 콜 블록에 움직임 정보가 존재하는지 여부에 관한 정보를 기반으로 S620 내지 S640 과정의 수행 여부를 결정할 수도 있다. 일례로, 부호화기 및 복호화기는 콜 블록에 움직임 정보가 존재하지 않는 경우에 S620 내지 S640 과정을 수행할 수 있다. 이 경우, 상술한 S640 단계에서는 L1 시간적 움직임 정보가 아닌 L0 시간적 움직임 정보가 재설정될 수 있다. 즉, 부호화기 및 복호화기는 L0 시간적 움직임 정보를 복원된 주변 블록의 움직임 정보로 설정할 수 있으며, 현재 블록에 대해 양방향 예측이 아닌 단방향 예측을 수행할 수 있다. 또한, 콜 블록에 움직임 정보가 존재하지 않는 경우, 상술한 S640 단계에서 부호화기 및 복호화기는 L0 시간적 움직임 정보와 L1 시간적 움직임 정보를 모두 재설정할 수도 있다. 즉, 부호화기 및 복호화기는 L0 시간적 움직임 정보 및 L1 시간적 움직임 정보를 복원된 주변 블록의 움직임 정보로 설정할 수 있으며, 현재 블록에 대해 양방향 예측을 수행할 수도 있다.In another embodiment, the encoder and the decoder may determine whether to perform the processes S620 to S640 based on information on whether motion information is present in the call block. For example, the encoder and the decoder may perform processes S620 to S640 when motion information does not exist in the call block. In this case, in step S640 described above, the L0 temporal motion information, not the L1 temporal motion information, may be reset. That is, the encoder and the decoder may set the L0 temporal motion information as motion information of the reconstructed neighboring block, and may perform unidirectional prediction rather than bidirectional prediction on the current block. In addition, if there is no motion information in the call block, in step S640 described above, the encoder and decoder may reset both the L0 temporal motion information and the L1 temporal motion information. That is, the encoder and the decoder may set L0 temporal motion information and L1 temporal motion information as motion information of a reconstructed neighboring block, and may perform bidirectional prediction on the current block.

또 다른 실시예로, 부호화기 및 복호화기는 현재 블록의 크기를 기반으로 S620 내지 S640 과정의 수행 여부를 결정할 수도 있다. 일례로, 부호화기 및 복호화기는 현재 블록의 크기가 소정의 크기보다 작은지 여부를 판단할 수 있다. 여기서, 상기 현재 블록은 CU, PU 및/또는 TU일 수 있으며, 상기 소정의 크기는 예를 들어 8x8, 16x16 또는 32x32 등 중에서 하나일 수 있다. 이 때, 부호화기 및 복호화기는 현재 블록의 크기가 소정의 크기보다 작은 경우에 S620 내지 S640 과정을 수행할 수 있다.In another embodiment, the encoder and decoder may determine whether to perform the processes S620 to S640 based on the size of the current block. As an example, the encoder and decoder may determine whether the size of the current block is smaller than a predetermined size. Here, the current block may be a CU, PU and / or TU, and the predetermined size may be one of 8x8, 16x16 or 32x32, for example. At this time, the encoder and the decoder may perform processes S620 to S640 when the size of the current block is smaller than a predetermined size.

또 다른 실시예로, 부호화기 및 복호화기는 콜 블록의 움직임 정보에서 L0 움직임 벡터 및/또는 L1 움직임 벡터가 영 벡터(0,0)에 해당되는 경우에 S620 내지 S640 과정을 수행할 수도 있다. 이 경우, 상술한 S640 단계에서 부호화기 및 복호화기는 영 벡터(0,0)에 해당되는 움직임 벡터(들)를 재설정할 수 있다. 일례로, 상기 영 벡터(0,0)에 해당되는 움직임 벡터(들)는 복원된 주변 블록의 움직임 벡터로 설정될 수 있으며, 다른 예로, 상기 영 벡터(0,0)에 해당되는 움직임 벡터(들)는 콜 블록의 주변에 위치한 블록의 움직임 벡터로 설정될 수도 있다. 또 다른 실시예로, 부호화기 및 복호화기는 콜 블록의 움직임 정보에서 L0 움직임 벡터 및/또는 L1 움직임 벡터가 영 벡터(0,0)에 해당되지 않는 경우에 S620 내지 S640 과정을 수행할 수도 있다. 이 경우, 상술한 S640 단계에서 부호화기 및 복호화기는 영 벡터(0,0)에 해당되지 않는 움직임 벡터(들)을 재설정할 수 있으며, 상기 영 벡터(0,0)에 해당되지 않는 움직임 벡터(들)은 복원된 주변 블록의 움직임 벡터로 재설정될 수 있다.In another embodiment, the encoder and the decoder may perform processes S620 to S640 when the L0 motion vector and / or the L1 motion vector corresponds to a zero vector (0,0) in motion information of a call block. In this case, the encoder and decoder in step S640 described above may reset the motion vector (s) corresponding to the zero vector (0,0). For example, the motion vector (s) corresponding to the zero vector (0,0) may be set as a motion vector of the reconstructed neighboring block, and as another example, a motion vector corresponding to the zero vector (0,0) ( S) may be set as a motion vector of a block located around the call block. In another embodiment, the encoder and the decoder may perform processes S620 to S640 when the L0 motion vector and / or the L1 motion vector do not correspond to the zero vector (0,0) in the motion information of the call block. In this case, in step S640 described above, the encoder and decoder may reset motion vector (s) not corresponding to the zero vector (0,0), and motion vector (s) not corresponding to the zero vector (0,0). ) May be reset to the motion vector of the reconstructed neighboring block.

상기 S620 내지 S640 과정의 수행 여부가 결정되는 조건은 상술한 실시예에 한정되지 않으며, 조건 및/또는 필요에 따라 다양한 조건이 적용될 수 있다.The conditions for determining whether to perform the processes S620 to S640 are not limited to the above-described embodiments, and various conditions may be applied according to conditions and / or needs.

한편, AMVP가 적용되는 경우 부호화기 및/또는 복호화기는 예측 움직임 벡터 후보 리스트 내의 예측 움직임 벡터 후보 중에서 현재 블록의 움직임 벡터와 가장 차이가 적은 후보를 현재 블록의 예측 움직임 벡터로 사용할 수 있고, 머지가 적용되는 경우 부호화기 및/또는 복호화기는 머지 후보 리스트 내의 머지 후보 중에서 최적의 부호화 효율을 제공할 수 있는 머지 후보를 현재 블록에 대한 움직임 정보로 사용할 수 있다. 예측 움직임 벡터 후보 리스트 및 머지 후보 리스트는 각각 시간적 움직임 정보 및/또는 공간적 움직임 정보를 포함할 수 있으므로, 결과적으로 현재 블록의 움직임 정보(예를 들어, 참조 픽쳐 번호, 움직임 정보 등)는 복원된 주변 블록의 움직임 정보를 기반으로 도출될 수 있다. 따라서, 상술한 L1 시간적 움직임 정보 재설정 단계(S640)에서, 부호화기 및 복호화기는 현재 블록의 예측 움직임 벡터 후보 리스트 및/또는 현재 블록의 머지 후보 리스트를 기반으로 L1 시간적 움직임 정보를 재설정할 수 있다. 이 경우, 상술한 복원된 주변 블록의 존재 유무를 판단하는 단계(S630)는 생략될 수 있다. 이하, 후술되는 실시예에서 움직임 정보 후보 리스트는 예측 움직임 벡터 후보 리스트 및 머지 후보 리스트를 포함하는 개념으로 이해될 수 있다.On the other hand, when AMVP is applied, the encoder and / or the decoder may use a candidate having the smallest difference from a motion vector of a current block among prediction motion vector candidates in a prediction motion vector candidate list, as a prediction motion vector of the current block, and merge applied If possible, the encoder and / or the decoder may use a merge candidate that can provide optimal encoding efficiency among merge candidates in the merge candidate list as motion information for the current block. Since the predicted motion vector candidate list and the merge candidate list may each include temporal motion information and / or spatial motion information, as a result, motion information (eg, reference picture number, motion information, etc.) of the current block is restored. It can be derived based on the motion information of the block. Accordingly, in the above-described L1 temporal motion information resetting step (S640), the encoder and the decoder may reset the L1 temporal motion information based on the predicted motion vector candidate list of the current block and / or the merge candidate list of the current block. In this case, the step (S630) of determining whether or not the above-described restored neighboring block is present may be omitted. Hereinafter, in the embodiments described below, the motion information candidate list may be understood as a concept including a prediction motion vector candidate list and a merge candidate list.

상술한 바와 같이, 부호화기 및 복호화기는 현재 블록의 움직임 정보 후보 리스트를 기반으로, 현재 블록의 L1 시간적 움직임 정보를 재설정할 수 있다. 즉, 부호화기 및 복호화기는 현재 블록의 움직임 정보 후보 리스트에 포함된 움직임 정보 후보 중에서 하나를 L1 시간적 움직임 정보로 사용할 수 있다. 현재 블록의 움직임 정보 후보 리스트에서 L1 시간적 움직임 정보로 사용되는 움직임 정보는 다양한 방법으로 결정될 수 있다. As described above, the encoder and decoder may reset the L1 temporal motion information of the current block based on the motion information candidate list of the current block. That is, the encoder and the decoder can use one of the motion information candidates included in the motion information candidate list of the current block as L1 temporal motion information. The motion information used as the L1 temporal motion information in the motion block candidate list of the current block may be determined in various ways.

일 실시예로, 부호화기 및 복호화기는 움직임 정보 후보 리스트 내의 움직임 정보 후보들을 첫 번째 움직임 정보 후보에서 마지막 움직임 정보 후보까지 순서대로 검색할 수 있다. 이 때, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 L1 시간적 움직임 정보의 L1 참조 픽쳐 번호와 동일한 참조 픽쳐 번호를 갖는 첫 번째 움직임 정보 후보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 부호화기 및 복호화기는 상기 L1 참조 픽쳐 번호와 동일한 참조 픽쳐 번호를 갖는 첫 번째 움직임 정보 후보의 L0 움직임 정보를 사용할 수도 있고, 상기 L1 참조 픽쳐 번호와 동일한 참조 픽쳐 번호를 갖는 첫 번째 움직임 정보 후보의 L1 움직임 정보를 사용할 수도 있다. 한편, 움직임 정보 후보 리스트에, 콜 블록을 기반으로 도출된 L1 시간적 움직임 정보의 L1 참조 픽쳐 번호와 동일한 참조 픽쳐 번호를 갖는 움직임 정보가 존재하지 않을 수도 있다. 이 경우, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보 중에서 상기 L1 참조 픽쳐 번호와 동일한 참조 픽쳐 번호를 갖는 움직임 정보를 움직임 정보 후보 리스트에 추가할 수도 있다. 이 때, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보가 추가된 움직임 정보 후보 리스트를 기반으로 현재 블록의 L1 시간적 움직임 정보를 재설정할 수 있다.In an embodiment, the encoder and the decoder may search motion information candidates in a motion information candidate list in order from a first motion information candidate to a last motion information candidate. At this time, the encoder and the decoder may use the first motion information candidate having the same reference picture number as the L1 reference picture number of the L1 temporal motion information derived based on the call block as the L1 temporal motion information of the current block. At this time, the encoder and the decoder may use L0 motion information of the first motion information candidate having the same reference picture number as the L1 reference picture number, and the first motion information candidate having the same reference picture number as the L1 reference picture number It is also possible to use L1 motion information. Meanwhile, motion information having the same reference picture number as the L1 reference picture number of the L1 temporal motion information derived based on the call block may not exist in the motion information candidate list. In this case, the encoder and decoder may add motion information having the same reference picture number as the L1 reference picture number among the motion information of the reconstructed neighboring block to the motion information candidate list. At this time, the encoder and the decoder may reset the L1 temporal motion information of the current block based on the motion information candidate list to which the motion information of the reconstructed neighboring block is added.

다른 실시예로, 부호화기 및 복호화기는 움직임 정보 후보 리스트 내에서 가용한 움직임 벡터를 갖는 첫 번째 움직임 정보 후보의 움직임 벡터를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 부호화기 및 복호화기는 상기 첫 번째 움직임 정보 후보의 L0 움직임 정보를 사용할 수도 있고, 상기 첫 번째 움직임 정보 후보의 L1 움직임 정보를 사용할 수도 있다.In another embodiment, the encoder and decoder may use the motion vector of the first motion information candidate having a motion vector available in the motion information candidate list as L1 temporal motion information of the current block. At this time, the encoder and the decoder may use the L0 motion information of the first motion information candidate or the L1 motion information of the first motion information candidate.

또 다른 실시예로, 부호화기 및 복호화기는 움직임 정보 후보 리스트 내에서 가용한 첫 번째 움직임 정보 후보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 이 경우, L1 시간적 움직임 정보의 L1 참조 픽쳐 번호는 상기 첫 번째 움직임 정보 후보의 참조 픽쳐 번호로 변경되거나 설정되고, L1 시간적 움직임 정보의 L1 움직임 벡터는 상기 첫 번째 움직임 정보 후보의 움직임 벡터로 변경되거나 설정될 수 있다. 이 때, 부호화기 및 복호화기는 상기 첫 번째 움직임 정보 후보의 L0 움직임 정보를 사용할 수도 있고, 상기 첫 번째 움직임 정보 후보의 L1 움직임 정보를 사용할 수도 있다.In another embodiment, the encoder and decoder may use the first motion information candidate available in the motion information candidate list as L1 temporal motion information of the current block. In this case, the L1 reference picture number of the L1 temporal motion information is changed or set to the reference picture number of the first motion information candidate, and the L1 motion vector of the L1 temporal motion information is changed to the motion vector of the first motion information candidate or Can be set. At this time, the encoder and the decoder may use the L0 motion information of the first motion information candidate or the L1 motion information of the first motion information candidate.

현재 블록의 움직임 정보 후보 리스트에서 L1 시간적 움직임 정보로 사용되는 움직임 정보 후보를 결정하는 방법은 상술한 실시예에 한정되지 않으며, 조건 및/또는 필요에 따라 다양한 조건이 적용될 수 있다. The method for determining the motion information candidate used as the L1 temporal motion information in the current block motion information candidate list is not limited to the above-described embodiment, and various conditions may be applied according to conditions and / or needs.

상술한 실시예들에서, 현재 블록의 움직임 정보 후보 리스트에 가용한 움직임 정보가 없을 수도 있다. 이 경우, 일례로 부호화기 및 복호화기는 상술한 S640 단계에서와 같이, 복원된 주변 블록의 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 다른 예로 이 경우 부호화기 및 복호화기는, 복원된 주변 블록의 움직임 정보를 움직임 정보 후보 리스트에 추가할 수도 있으며, 영 벡터(0,0)를 움직임 정보 후보 리스트에 추가할 수도 있다. 이 때, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보가 추가된 움직임 정보 후보 리스트 또는 영 벡터(0,0)가 추가된 움직임 정보 후보 리스트를 기반으로 현재 블록의 L1 시간적 움직임 정보를 재설정할 수 있다. In the above-described embodiments, there may be no motion information available in the motion block candidate list of the current block. In this case, as an example, the encoder and decoder may use motion information of the reconstructed neighboring block as L1 temporal motion information of the current block, as in step S640 described above. As another example, in this case, the encoder and the decoder may add the motion information of the reconstructed neighboring block to the motion information candidate list, and may add a zero vector (0,0) to the motion information candidate list. At this time, the encoder and the decoder may reset the L1 temporal motion information of the current block based on a motion information candidate list to which motion information of the reconstructed neighboring block is added or a motion information candidate list to which a zero vector (0,0) is added. have.

상술한 실시예들에서 L0 시간적 움직임 정보 및 L1 시간적 움직임 정보는 시간적으로 도출된 움직임 정보이므로, 객체의 이동에 의한 움직임 정보에 해당될 가능성이 높다. 따라서, 부호화기 및 복호화기는 복원된 주변 블록 및/또는 움직임 정보 후보 리스트에서 현재 블록의 L1 시간적 움직임 정보로 사용될 움직임 정보를 탐색할 때, 영 벡터(0,0)를 갖는 움직임 정보는 선택하지 않고 영 벡터(0,0)를 갖지 않는 움직임 정보를 선택할 수도 있다. 이는 영 벡터(0,0)에 해당되는 움직임 정보를 갖는 블록은, 객체가 아닌 배경에 해당될 가능성이 높기 때문이다.In the above-described embodiments, since the L0 temporal motion information and the L1 temporal motion information are temporally derived motion information, it is highly likely to correspond to motion information due to movement of an object. Therefore, the encoder and decoder search for motion information to be used as L1 temporal motion information of the current block in the reconstructed neighboring block and / or motion information candidate list, without selecting motion information with a zero vector (0,0). It is also possible to select motion information without vectors (0, 0). This is because a block having motion information corresponding to a zero vector (0,0) is more likely to correspond to a background than an object.

한편, 재설정된 L1 시간적 움직임 정보는 현재 블록의 L0 시간적 움직임 정보와 동일할 수도 있다. 따라서, 부호화기 및 복호화기는 복원된 주변 블록 및/또는 움직임 정보 후보 리스트에서 현재 블록의 L1 시간적 움직임 정보로 사용될 움직임 정보를 탐색할 때, L0 시간적 움직임 정보와 동일하지 않은 움직임 정보를 선택할 수 있다. 예를 들어, 상술한 S640에서와 같이, 복원된 주변 블록을 기반으로 현재 블록의 L1 시간적 움직임 정보를 도출하는 경우, 부호화기 및 복호화기는 현재 블록의 L0 시간적 움직임 정보와 다른 움직임 정보를 갖는 블록을 상기 L1 시간적 움직임 정보 도출에 사용되는 블록으로 결정할 수 있다. 이 때, 부호화기 및 복호화기는 현재 블록의 L0 시간적 움직임 정보와의 차이가 소정의 임계값(threshold) 이하인 움직임 정보만을, 현재 블록의 L1 시간적 움직임 정보로 사용될 움직임 정보로 선택할 수도 있다. 여기서, 상기 소정의 임계값은 현재 블록의 모드 정보, 현재 블록의 움직임 정보, 주변 블록의 모드 정보 및/또는 주변 블록의 움직임 정보 등을 기반으로 정해질 수 있으며, 다양한 방식으로 결정될 수 있다.Meanwhile, the reset L1 temporal motion information may be the same as the L0 temporal motion information of the current block. Accordingly, the encoder and decoder may select motion information that is not the same as the L0 temporal motion information when searching for motion information to be used as the L1 temporal motion information of the current block in the restored neighbor block and / or motion information candidate list. For example, as in S640 described above, when deriving the L1 temporal motion information of the current block based on the reconstructed neighboring block, the encoder and the decoder may recall a block having motion information different from the L0 temporal motion information of the current block. It can be determined as a block used to derive L1 temporal motion information. At this time, the encoder and the decoder may select only motion information whose difference from the L0 temporal motion information of the current block is less than or equal to a predetermined threshold, as motion information to be used as L1 temporal motion information of the current block. Here, the predetermined threshold may be determined based on mode information of a current block, motion information of a current block, mode information of a neighboring block, and / or motion information of a neighboring block, and may be determined in various ways.

또한, 상술한 실시예들에서, 복원된 주변 블록의 움직임 정보 및 움직임 정보 후보 리스트로부터 선택된 움직임 정보는 각각 L0 움직임 정보 및 L1 움직임 정보를 모두 포함할 수 있다. 이 경우, 부호화기 및 복호화기는 상기 L0 움직임 정보 및 L1 움직임 정보 중에서 하나의 움직임 정보를, 현재 블록의 L1 시간적 움직임 정보로 사용될 움직임 정보로 결정할 수 있다. 일례로, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보 및/또는 움직임 정보 후보 리스트로부터 선택된 움직임 정보에서 L0 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 복원된 주변 블록의 움직임 정보 및/또는 움직임 정보 후보 리스트로부터 선택된 움직임 정보에 L0 움직임 정보가 존재하지 않는 경우, 부호화기 및 복호화기는 L1 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 다른 예로, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보 및/또는 움직임 정보 후보 리스트로부터 선택된 움직임 정보에서 L1 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 복원된 주변 블록의 움직임 정보 및/또는 움직임 정보 후보 리스트로부터 선택된 움직임 정보에 L1 움직임 정보가 존재하지 않는 경우, 부호화기 및 복호화기는 L0 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다.Further, in the above-described embodiments, the motion information selected from the motion information and the motion information candidate list of the reconstructed neighboring block may include both L0 motion information and L1 motion information, respectively. In this case, the encoder and decoder may determine one of the L0 motion information and the L1 motion information as motion information to be used as L1 temporal motion information of the current block. As an example, the encoder and decoder may use L0 motion information as motion information of the current block as L1 motion information from motion information of a reconstructed neighboring block and / or motion information selected from a motion information candidate list. At this time, if there is no L0 motion information in the motion information selected from the motion information and / or motion information candidate list of the reconstructed neighboring block, the encoder and decoder may use the L1 motion information as the L1 temporal motion information of the current block. . As another example, the encoder and decoder may use L1 motion information as L1 temporal motion information of a current block from motion information of a reconstructed neighboring block and / or motion information selected from a motion information candidate list. At this time, if the L1 motion information does not exist in the motion information selected from the motion information and / or motion information candidate list of the restored neighboring block, the encoder and decoder may use the L0 motion information as the L1 temporal motion information of the current block. .

한편, 부호화기 및 복호화기는 상술한 S640 단계에서 현재 블록의 L1 시간적 움직임 정보(예를 들어, L1 움직임 벡터)를 재설정하기 위해, 복원된 주변 블록의 움직임 정보 및/또는 움직임 정보 후보 리스트를 사용하지 않을 수도 있다. 이 때, 부호화기 및 복호화기는 현재 블록의 L0 시간적 움직임 정보(예를 들어, L0 움직임 벡터)를 기반으로 현재 블록의 L1 시간적 움직임 정보(예를 들어, L1 움직임 벡터)를 재설정할 수 있다. 이하, 이와 관련된 실시예들이 서술되며 이는 움직임 벡터를 기준으로 서술하기로 한다.Meanwhile, in order to reset the L1 temporal motion information (eg, L1 motion vector) of the current block in step S640 described above, the encoder and decoder do not use the restored motion information and / or motion information candidate list of the neighboring blocks. It might be. At this time, the encoder and the decoder may reset the L1 temporal motion information (eg, L1 motion vector) of the current block based on the L0 temporal motion information (eg, L0 motion vector) of the current block. Hereinafter, embodiments related to this will be described, which will be described based on a motion vector.

일 실시예로, 부호화기 및 복호화기는 현재 블록의 L0 시간적 움직임 정보(L0 움직임 벡터)가 지시하는 위치에서 소정의 거리 및/또는 방향을 기반으로 이동된 상대적인 위치를 지시하는 움직임 정보를 현재 블록의 L1 시간적 움직임 정보(L1 움직임 벡터)로 사용할 수 있다. 일례로, 부호화기 및 복호화기는 현재 블록의 L0 시간적 움직임 정보가 지시하는 위치에서 수직 및/또는 수평 방향으로 1/4 픽셀 크기(예를 들어, (-1,0), (1,0), (0,-1), (0,1), (-1,-1), (-1,1), (1,-1), (1,1) 등. 여기서, 1/4 픽셀 단위는 1에 해당됨.)만큼 이동된 위치를 지시하는 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 다른 예로, 부호화기 및 복호화기는 현재 블록의 L0 시간적 움직임 정보가 지시하는 위치에서 수직 및/또는 수평 방향으로 1/2 픽셀 크기(예를 들어, (-2,0), (2,0), (0,-2), (0,2), (-2,-2), (-2,2), (2,-2), (2,2) 등. 여기서, 1/4 픽셀 단위는 1에 해당됨.)만큼 이동된 위치를 지시하는 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 또 다른 예로, 부호화기 및 복호화기는 현재 블록의 L0 시간적 움직임 정보가 지시하는 위치에서 수직 및/또는 수평 방향으로 정수 픽셀 크기(예를 들어, (-4,0), (4,0), (0,-4), (0,4), (-4,-4), (-4,4), (4,-4), (4,4) 등. 여기서, 1/4 픽셀 단위는 1에 해당됨.)만큼 이동된 위치를 지시하는 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수도 있다. 한편, 움직임 벡터는 수직 방향 성분 및 수평 방향 성분을 포함하므로, 상술한 방법들(1/4 픽셀 크기만큼 이동, 1/2 픽셀 크기만큼 이동, 정수 픽셀 크기만큼 이동)은 수평 방향 성분 및 수직 방향 성분에 대해 각각 독립적으로 적용될 수도 있다. 이 때, 수평 방향의 이동 거리 및 수직 방향의 이동 거리는 서로 다를 수도 있다.In one embodiment, the encoder and decoder L1 of the current block indicates motion information indicating a relative position moved based on a predetermined distance and / or direction from a position indicated by the L0 temporal motion information (L0 motion vector) of the current block. It can be used as temporal motion information (L1 motion vector). For example, the encoder and decoder are 1/4 pixel size (for example, (-1,0), (1,0), (1,0), in the vertical and / or horizontal direction at the position indicated by the L0 temporal motion information of the current block. 0, -1), (0,1), (-1, -1), (-1,1), (1, -1), (1,1), etc. where 1/4 pixel unit is 1 Motion information indicating the moved position as much as.) Can be used as L1 temporal motion information of the current block. As another example, the encoder and decoder are 1/2 pixel size in the vertical and / or horizontal direction (eg, (-2,0), (2,0), (,) in the position indicated by the L0 temporal motion information of the current block, ( 0, -2), (0,2), (-2, -2), (-2,2), (2, -2), (2,2), etc. where 1/4 pixel unit is 1 Motion information indicating the moved position as much as L1 temporal motion information of the current block. As another example, the encoder and decoder are integer pixel sizes (eg, (-4,0), (4,0), (0) in the vertical and / or horizontal direction at the position indicated by the L0 temporal motion information of the current block. , -4), (0,4), (-4, -4), (-4,4), (4, -4), (4,4), etc. where 1/4 pixel units is 1 Applicable.) The motion information indicating the moved position may be used as the L1 temporal motion information of the current block. Meanwhile, since the motion vector includes a vertical component and a horizontal component, the above-described methods (moving by 1/4 pixel size, shifting by 1/2 pixel size, shifting by integer pixel size) include horizontal component and vertical direction. It may be applied independently to each component. At this time, the horizontal movement distance and the vertical movement distance may be different.

다른 실시예로, 부호화기 및 복호화기는 현재 블록의 L0 시간적 움직임 정보(L0 움직임 벡터)의 값을 다른 픽셀 단위의 값으로 변경한 후 변경된 값을 현재 블록의 L1 시간적 움직임 정보(L1 움직임 벡터)로 사용할 수 있다. 일례로, 현재 블록의 L0 시간적 움직임 정보의 값이 1/4 픽셀 단위의 값인 경우, 부호화기 및 복호화기는 쉬프트 연산 등을 기반으로 상기 L0 시간적 움직임 정보의 값을 1/2 픽셀 단위의 값으로 변경할 수 있고, 상기 변경된 값을 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 다른 예로, 현재 블록의 L0 시간적 움직임 정보의 값이 1/2 픽셀 단위의 값인 경우, 부호화기 및 복호화기는 쉬프트 연산 등을 기반으로 상기 L0 시간적 움직임 정보의 값을 정수 픽셀 단위의 값으로 변경할 수 있고, 상기 변경된 값을 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다.In another embodiment, the encoder and decoder change the value of the L0 temporal motion information (L0 motion vector) of the current block to a value of another pixel unit, and then use the changed value as the L1 temporal motion information (L1 motion vector) of the current block. Can be. For example, when the value of the L0 temporal motion information of the current block is a value of 1/4 pixel unit, the encoder and decoder may change the value of the L0 temporal motion information to a value of 1/2 pixel unit based on a shift operation or the like. In addition, the changed value may be used as L1 temporal motion information of the current block. As another example, when the value of the L0 temporal motion information of the current block is a value of 1/2 pixel unit, the encoder and the decoder may change the value of the L0 temporal motion information to an integer pixel unit based on a shift operation, etc. The changed value can be used as L1 temporal motion information of the current block.

현재 블록의 L0 시간적 움직임 정보(예를 들어, L0 움직임 벡터)를 기반으로 현재 블록의 L1 시간적 움직임 정보(예를 들어, L1 움직임 벡터)를 재설정하는 방법은 상술한 실시예에 한정되지 않으며, 구현 및/또는 필요에 따라 다양한 형태로 적용될 수 있다.The method of resetting the L1 temporal motion information (eg, L1 motion vector) of the current block based on the L0 temporal motion information (eg, L0 motion vector) of the current block is not limited to the above-described embodiment and is implemented And / or may be applied in various forms as needed.

한편, 상술한 실시예에서 시간적 움직임 정보 재설정 전 S610 단계로 입력되는 시간적 움직임 정보는 움직임 벡터뿐만 아니라 참조 픽쳐 인덱스(reference picture index)도 포함할 수 있다. 여기서, L0 움직임 벡터 및 L1 움직임 벡터는 상술한 바와 같이 콜 블록을 기반으로 시간적으로 도출된 움직임 벡터일 수 있고, L0 참조 픽쳐 인덱스 및 L1 참조 픽쳐 인덱스는 복원된 주변 블록으로부터 공간적으로 도출된 참조 픽쳐 인덱스일 수 있다. 이 때, 상기 L0 참조 픽쳐 인덱스 및 상기 L1 참조 픽쳐 인덱스는, 복원된 주변 블록의 참조 픽쳐 인덱스 중에서 음수가 아닌 가장 작은 값으로 설정될 수 있다. 한편, 다른 예로 L0 입력 참조 픽쳐 인덱스 및 L1 입력 참조 픽쳐 인덱스는 복원된 주변 블록의 움직임 정보에 관계 없이 0으로 설정될 수도 있다.Meanwhile, in the above-described embodiment, the temporal motion information input in step S610 before resetting the temporal motion information may include a reference picture index as well as a motion vector. Here, the L0 motion vector and the L1 motion vector may be motion vectors derived temporally based on the call block as described above, and the L0 reference picture index and the L1 reference picture index are spatially derived reference pictures from the reconstructed neighboring blocks. It can be an index. At this time, the L0 reference picture index and the L1 reference picture index may be set to the smallest non-negative value among the reference picture indexes of the reconstructed neighboring blocks. Meanwhile, as another example, the L0 input reference picture index and the L1 input reference picture index may be set to 0 regardless of motion information of the reconstructed neighboring block.

L1 시간적 움직임 정보의 L1 움직임 벡터가 복원된 주변 블록을 기반으로 재설정되는 경우, L1 시간적 움직임 정보의 L1 참조 픽쳐 인덱스에 대해서도 재설정 과정이 수행될 수 있다. When the L1 motion vector of the L1 temporal motion information is reset based on the reconstructed neighboring block, a reset process may also be performed on the L1 reference picture index of the L1 temporal motion information.

이하, 후술되는 도 6 내지 도 8의 실시예에 한하여 설명의 편의상 시간적 움직임 정보 재설정 전 S610 단계로 입력되는 시간적 움직임 정보는 입력 시간적 움직임 정보(L0 입력 시간적 움직임 정보, L1 입력 시간적 움직임 정보)라 한다. 또한 입력 시간적 움직임 정보에 포함된 움직임 벡터는 입력 움직임 벡터(L0 입력 움직임 벡터, L1 입력 움직임 벡터), 입력 시간적 움직임 정보에 포함된 참조 픽쳐 인덱스는 입력 참조 픽쳐 인덱스(L0 입력 참조 픽쳐 인덱스, L1 입력 참조 픽쳐 인덱스), 입력 시간적 움직임 정보에 포함된 참조 픽쳐 번호는 입력 참조 픽쳐 번호(L0 입력 참조 픽쳐 번호, L1 입력 참조 픽쳐 번호)라 한다.Hereinafter, the temporal motion information input in step S610 before resetting the temporal motion information will be referred to as input temporal motion information (L0 input temporal motion information, L1 input temporal motion information) for convenience of description only in the embodiments of FIGS. 6 to 8 described below. . In addition, the motion vector included in the input temporal motion information is an input motion vector (L0 input motion vector, L1 input motion vector), and the reference picture index included in the input temporal motion information is an input reference picture index (L0 input reference picture index, L1 input) Reference picture index) and reference picture numbers included in the input temporal motion information are referred to as input reference picture numbers (L0 input reference picture number, L1 input reference picture number).

상술한 바와 같이, L1 입력 움직임 벡터가 재설정되는 경우, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스에 대해서도 재설정 과정을 수행할 수 있다. 이하, L1 입력 참조 픽쳐 인덱스에 대한 재설정 과정의 실시예들이 서술된다. As described above, when the L1 input motion vector is reset, the encoder and decoder may also perform a reset process on the L1 input reference picture index. Hereinafter, embodiments of the reset process for the L1 input reference picture index will be described.

일 실시예로, 부호화기 및 복호화기는 복원된 주변 블록을 기반으로 L1 입력 참조 픽쳐 인덱스를 재설정할 수 있다. 상술한 바와 같이, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스를 상기 복원된 주변 블록의 참조 픽쳐 인덱스로 재설정함으로써 최종 L1 참조 픽쳐 인덱스를 도출할 수 있다. 다른 실시예로, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스 값을 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정함으로써 최종 L1 참조 픽쳐 인덱스를 도출할 수도 있다. In an embodiment, the encoder and decoder may reset the L1 input reference picture index based on the reconstructed neighboring block. As described above, the encoder and decoder can use the restored motion information of the neighboring block as L1 temporal motion information of the current block. At this time, the encoder and the decoder may derive the final L1 reference picture index by resetting the L1 input reference picture index to the reference picture index of the reconstructed neighboring block. In another embodiment, the encoder and decoder may derive the final L1 reference picture index by resetting the L1 input reference picture index value to a predetermined fixed reference picture index value.

또 다른 실시예로, L0 입력 시간적 움직임 정보(예를 들어, L0 입력 움직임 벡터, L0 입력 참조 픽쳐 인덱스 등) 와 L1 입력 시간적 움직임 정보(예를 들어, L1 입력 움직임 벡터, L1 입력 참조 픽쳐 인덱스 등)가 동일한 경우, 부호화기 및 복호화기는 L0 입력 참조 픽쳐 인덱스 및 L1 입력 참조 픽쳐 인덱스를 모두 0의 값으로 재설정하여 최종 시간적 움직임 정보로 사용할 수도 있다. 이는, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, L0 참조 픽쳐 인덱스 및 L1 참조 픽쳐 인덱스가 모두 0일 확률이 높기 때문이다.In another embodiment, L0 input temporal motion information (eg, L0 input motion vector, L0 input reference picture index, etc.) and L1 input temporal motion information (eg, L1 input motion vector, L1 input reference picture index, etc.) ) Is the same, the encoder and decoder may reset the L0 input reference picture index and the L1 input reference picture index to values of 0 and use the final temporal motion information. This is because when the L0 input temporal motion information and the L1 input temporal motion information are the same, the probability that both the L0 reference picture index and the L1 reference picture index are 0 is high.

또 다른 실시예로, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스를 L0 입력 참조 픽쳐 인덱스와 동일한 값으로 재설정할 수 있다. 반면, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스 값을 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스 값으로 재설정할 수도 있다. 일례로, 복원된 주변 블록이 갖는 참조 픽쳐 인덱스 중에 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스가 존재할 수 있다. 이 때, 예를 들어 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스의 재설정을 위해, 상기 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스 중에서 가장 자주 사용된 참조 픽쳐 인덱스를 사용할 수 있다. 다른 예로, 이 때 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스의 재설정을 위해, 상기 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스 중에서 음수가 아닌 가장 작은 값을 갖는 참조 픽쳐 인덱스를 사용할 수도 있다.In another embodiment, the encoder and decoder may reset the L1 input reference picture index to the same value as the L0 input reference picture index. On the other hand, the encoder and decoder may reset the L1 input reference picture index value to a reference picture index value that is not the same as the L0 input reference picture index. For example, a reference picture index that is not the same as the L0 input reference picture index may be present in the reference picture index of the reconstructed neighboring block. At this time, for example, the encoder and the decoder may use the most frequently used reference picture index among reference picture indices that are not the same as the L0 input reference picture index, for resetting the L1 input reference picture index. As another example, in this case, the encoder and decoder may use a reference picture index having the smallest non-negative value among reference picture indices that are not the same as the L0 input reference picture index, for resetting the L1 input reference picture index.

한편, 상술한 바와 같이 부호화기 및 복호화기는 L1 입력 시간적 움직임 정보에서 L1 입력 움직임 벡터 값을 복원된 주변 블록의 움직임 벡터와 동일한 값으로 재설정함으로써 최종 L1 시간적 움직임 벡터를 도출할 수 있다. 이 때, 상기 복원된 주변 블록의 움직임 벡터는 L1 입력 참조 픽쳐 인덱스 및/또는 재설정된 L1 참조 픽쳐 인덱스에 따라 스케일링되어 사용될 수도 있다. L1 입력 시간적 움직임 정보에서 L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 시간적 움직임 정보로 사용될 수도 있고, 상술한 실시예에서와 같이 재설정 과정을 거쳐 최종 L1 시간적 움직임 정보로 사용될 수도 있다. 이 때, 복원된 주변 블록의 움직임 벡터에 대응하는 참조 픽쳐, 및 최종 L1 참조 픽쳐 인덱스가 지시하는 참조 픽쳐는 서로 다를 수 있다. 이 경우, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 벡터에 대한 스케일링을 수행하고 스케일링된 움직임 벡터를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다.On the other hand, as described above, the encoder and decoder can derive the final L1 temporal motion vector by resetting the L1 input motion vector value from the L1 input temporal motion information to the same value as the motion vector of the reconstructed neighboring block. At this time, the motion vector of the reconstructed neighboring block may be scaled and used according to the L1 input reference picture index and / or the reset L1 reference picture index. In the L1 input temporal motion information, the L1 input reference picture index may be used as the final L1 temporal motion information without a reset process, or may be used as the final L1 temporal motion information through a reset process as in the above-described embodiment. At this time, the reference picture corresponding to the motion vector of the reconstructed neighboring block and the reference picture indicated by the final L1 reference picture index may be different. In this case, the encoder and decoder may perform scaling on the motion vector of the reconstructed neighboring block and use the scaled motion vector as the final L1 temporal motion information of the current block.

상술한 실시예들은 움직임 벡터의 재설정 과정 및 참조 픽쳐 인덱스(예를 들어, RefIdxLX, X=0,1)의 재설정 과정에 따라 다양한 방법으로 조합되어 적용될 수 있다. 이하, 후술되는 실시예들에서 L1 입력 움직임 벡터는 복원된 주변 블록을 기반으로 재설정된다고 가정한다. 즉, 부호화기 및 복호화기는 L1 입력 움직임 벡터를 복원된 주변 블록의 움직임 벡터 중에서 하나의 값으로 재설정한다고 가정한다.The above-described embodiments may be combined and applied in various ways according to a process of resetting a motion vector and a process of resetting a reference picture index (eg, RefIdxLX, X = 0,1). Hereinafter, in the embodiments described below, it is assumed that the L1 input motion vector is reset based on the reconstructed neighboring block. That is, it is assumed that the encoder and decoder reset the L1 input motion vector to one value among the motion vectors of the reconstructed neighboring blocks.

일 실시예로, 부호화기 및 복호화기는 L1 입력 움직임 벡터의 재설정을 위해, 복원된 주변 블록의 움직임 벡터 중에서 영 벡터(0,0)가 아닌 움직임 벡터만을 사용할 수 있다. 이 때, 일례로 L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 시간적 움직임 정보로 사용될 수 있다. 다른 예로, L1 입력 참조 픽쳐 인덱스 값은 복원된 주변 블록이 갖는 참조 픽쳐 인덱스 값으로 재설정될 수 있고, 재설정된 참조 픽쳐 인덱스가 최종 L1 시간적 움직임 정보로 사용될 수 있다. 또 다른 예로, L1 입력 참조 픽쳐 인덱스 값은 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정될 수도 있다. 이들 각각에 대한 구체적인 실시예는 상술한 바 있으므로, 여기서는 생략하기로 한다.In an embodiment, the encoder and the decoder may use only a motion vector other than a zero vector (0, 0) among motion vectors of the reconstructed neighboring blocks to reset the L1 input motion vector. At this time, as an example, the L1 input reference picture index may be used as the final L1 temporal motion information without a reset process. As another example, the L1 input reference picture index value may be reset to the reference picture index value of the reconstructed neighboring block, and the reset reference picture index may be used as the final L1 temporal motion information. As another example, the L1 input reference picture index value may be reset to a predetermined fixed reference picture index value. Since specific embodiments of each of the above have been described above, it will be omitted here.

다른 실시예로, 부호화기 및 복호화기는 L1 입력 움직임 벡터의 재설정을 위해, 복원된 주변 블록의 움직임 벡터를 스케일링하여 사용할 수 있다. 이 경우, 상기 스케일링된 움직임 벡터가 최종 L1 시간적 움직임 정보로 사용될 수 있다. 이 때, 일례로 L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 시간적 움직임 정보로 사용될 수 있다. 다른 예로, L1 입력 참조 픽쳐 인덱스 값은 복원된 주변 블록이 갖는 참조 픽쳐 인덱스 값으로 재설정될 수 있고, 재설정된 참조 픽쳐 인덱스가 최종 L1 시간적 움직임 정보로 사용될 수 있다. 또 다른 예로, L1 입력 참조 픽쳐 인덱스 값은 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정될 수도 있다. 이들 각각에 대한 구체적인 실시예는 상술한 바 있으므로, 여기서는 생략하기로 한다.In another embodiment, the encoder and decoder may use the scaled motion vector of the reconstructed neighboring block to reset the L1 input motion vector. In this case, the scaled motion vector may be used as the final L1 temporal motion information. At this time, as an example, the L1 input reference picture index may be used as the final L1 temporal motion information without a reset process. As another example, the L1 input reference picture index value may be reset to the reference picture index value of the reconstructed neighboring block, and the reset reference picture index may be used as the final L1 temporal motion information. As another example, the L1 input reference picture index value may be reset to a predetermined fixed reference picture index value. Since specific embodiments of each of the above have been described above, it will be omitted here.

또 다른 실시예로, 부호화기 및 복호화기는 L1 입력 움직임 벡터의 재설정을 위해, 복원된 주변 블록의 움직임 벡터 중에서 현재 블록의 L0 시간적 움직임 정보(L0 움직임 벡터)와의 차이가 소정의 임계값 이하인 움직임 벡터만을 사용할 수 있다. 이 경우, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 벡터 중에서 현재 블록의 L0 시간적 움직임 정보(L0 움직임 벡터)와 동일하지 않은 움직임 벡터만을 사용할 수도 있다. 이 때, 일례로 L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 시간적 움직임 정보로 사용될 수 있다. 다른 예로, L1 입력 참조 픽쳐 인덱스 값은 복원된 주변 블록이 갖는 참조 픽쳐 인덱스 값으로 재설정될 수 있고, 재설정된 참조 픽쳐 인덱스가 최종 L1 시간적 움직임 정보로 사용될 수 있다. 또 다른 예로, L1 입력 참조 픽쳐 인덱스 값은 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정될 수도 있다. 이들 각각에 대한 구체적인 실시예는 상술한 바 있으므로, 여기서는 생략하기로 한다.In another embodiment, the encoder and decoder only set motion vectors in which the difference from the current block L0 temporal motion information (L0 motion vector) of a reconstructed neighboring block motion vector is less than or equal to a predetermined threshold, for resetting the L1 input motion vector. Can be used. In this case, the encoder and decoder may use only motion vectors that are not identical to the L0 temporal motion information (L0 motion vector) of the current block among the motion vectors of the reconstructed neighboring blocks. At this time, as an example, the L1 input reference picture index may be used as the final L1 temporal motion information without a reset process. As another example, the L1 input reference picture index value may be reset to the reference picture index value of the reconstructed neighboring block, and the reset reference picture index may be used as the final L1 temporal motion information. As another example, the L1 input reference picture index value may be reset to a predetermined fixed reference picture index value. Since specific embodiments of each of the above have been described above, it will be omitted here.

움직임 벡터의 재설정 과정 및 참조 픽쳐 인덱스의 재설정 과정의 실시예들의 조합은 상술한 실시예에 한정되는 것이 아니며, 구현 및/또는 필요에 따라 상술한 실시예들 뿐만 아니라 다양한 형태의 조합이 제공될 수 있다.The combination of the embodiments of the process of resetting the motion vector and the process of resetting the reference picture index is not limited to the above-described embodiment, and combinations of various forms as well as the above-described embodiments may be provided according to implementation and / or needs. have.

한편, 상술한 바와 같이 재설정된 L1 시간적 움직임 정보는 현재 블록의 L0 시간적 움직임 정보와 동일할 수 있다. 따라서, 재설정된 L1 시간적 움직임 정보가 현재 블록의 L0 시간적 움직임 정보와 동일한 경우, 부호화기 및 복호화기는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수 있다. 이 때, 부호화기 및 복호화기는 L0 시간적 움직임 정보만을 현재 블록의 시간적 움직임 정보로 사용할 수 있다. 이러한 방법은 상술한 실시예들과 결합된 조합으로서 본 발명에 적용될 수 있다.Meanwhile, the L1 temporal motion information reset as described above may be the same as the L0 temporal motion information of the current block. Accordingly, if the reset L1 temporal motion information is the same as the L0 temporal motion information of the current block, the encoder and decoder may set the prediction direction information of the current block to unidirectional prediction again. At this time, the encoder and the decoder may use only L0 temporal motion information as temporal motion information of the current block. This method can be applied to the present invention in combination with the above-described embodiments.

도 7은 L1 시간적 움직임 정보의 재설정을 위해 사용되는 복원된 주변 블록의 실시예를 개략적으로 나타내는 도면이다. 도 7에서 블록 710은 현재 블록(X)을 나타낸다. 7 is a diagram schematically showing an embodiment of a reconstructed neighboring block used for resetting L1 temporal motion information. In FIG. 7, block 710 represents the current block (X).

상술한 바와 같이, 복원된 주변 블록은 이미 부호화 및/또는 복호화되어 복원된 현재 픽쳐 내의 블록으로서, 현재 블록(710)에 인접한 블록 및/또는 현재 블록의 외부 코너에 위치한 블록을 포함할 수 있다. 도 7의 실시예에서 현재 블록(710) 외부의 좌측 하단 코너에 위치한 블록은 좌측 하단 코너 블록(A)이라 하고, 현재 블록(710) 외부의 좌측 상단 코너에 위치한 블록은 좌측 상단 코너 블록(E)이라 하며, 현재 블록(710) 외부의 우측 상단 코너에 위치한 블록은 우측 상단 코너 블록(C)이라 한다. 또한 현재 블록(710) 좌측에 인접한 블록 중에서 가장 상단에 위치한 블록은 좌측 최상단 블록(F), 현재 블록(710) 좌측에 인접한 블록 중에서 가장 하단에 위치한 블록은 좌측 최하단 블록(A), 현재 블록(710) 상단에 인접한 블록 중에서 가장 좌측에 위치한 블록은 상단 최좌측 블록(G), 현재 블록(710) 상단에 인접한 블록 중에서 가장 우측에 위치한 블록은 상단 최우측 블록(B)이라 한다.As described above, the reconstructed neighboring block is a block in the current picture that is already encoded and / or decoded and reconstructed, and may include a block adjacent to the current block 710 and / or a block located at an outer corner of the current block. In the embodiment of FIG. 7, the block located in the lower left corner outside the current block 710 is called the lower left corner block (A), and the block located in the upper left corner outside the current block 710 is the upper left corner block (E ), And the block located in the upper right corner outside the current block 710 is called the upper right corner block (C). In addition, among the blocks adjacent to the left of the current block 710, the block located at the top of the block at the top left of the block adjacent to the left of the current block 710 is the block at the bottom of the left block (A) and the current block ( 710) The block located at the left of the blocks adjacent to the top is called the top leftmost block (G), and the block located at the right of the blocks adjacent to the top of the current block 710 is called the top rightmost block (B).

도 6의 실시예에서 상술한 바와 같이, 부호화기 및 복호화기는 소정의 조건에 따라 복원된 주변 블록의 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 즉, 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보 값을 복원된 주변 블록의 움직임 정보 값으로 재설정할 수 있다. 이 때, 현재 블록의 L1 시간적 움직임 정보로 사용되는 움직임 정보는 다양한 방법으로 도출될 수 있다.As described above in the embodiment of FIG. 6, the encoder and decoder may use motion information of a neighboring block reconstructed according to a predetermined condition as L1 temporal motion information of a current block. That is, the encoder and decoder may reset the L1 temporal motion information value of the current block to the motion information value of the reconstructed neighboring block. At this time, motion information used as L1 temporal motion information of the current block may be derived in various ways.

일 실시예로, 부호화기 및 복호화기는 복원된 주변 블록 중에서 소정의 위치에 존재하는 한 개의 블록으로부터 L1 시간적 움직임 정보로 사용되는 움직임 정보를 도출할 수 있다. 이 때, 상기 소정의 위치의 블록은 좌측 최하단 블록(A), 상단 최우측 블록(B), 우측 상단 코너 블록(C), 좌측 하단 코너 블록(D),좌측 상단 코너 블록(E), 좌측 최상단 블록(F) 및 상단 최좌측 블록(G) 중에서 하나에 해당될 수 있다.In one embodiment, the encoder and the decoder may derive motion information used as L1 temporal motion information from one block existing in a predetermined position among reconstructed neighboring blocks. At this time, the block of the predetermined position is the bottom left block (A), the top right block (B), the top right corner block (C), the bottom left corner block (D), the top left corner block (E), the left It may correspond to one of the uppermost block F and the uppermost left block G.

다른 실시예로, 부호화기 및 복호화기는 복원된 주변 블록 중에서 소정의 위치에 존재하는 복수 개의 블록을 소정의 순서로 스캔할 수 있다. 이 때, 부호화기 및 복호화기는 스캔 순서상 움직임 정보가 존재하는 첫 번째 블록의 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 스캔 대상 블록 및 스캔 순서는 다양한 형태로 정해질 수 있다. 일례로, 부호화기 및 복호화기는 좌측 최상단 블록(F), 상단 최좌측 블록(B) 및 상단 최우측 블록(B) 순으로 주변 블록을 스캔할 수 있다. 다른 예로, 부호화기 및 복호화기는 좌측 최상단 블록(F), 상단 최좌측 블록(G), 우측 상단 코너 블록(C), 좌측 하단 코너 블록(D) 및 좌측 상단 코너 블록(E) 순으로 주변 블록을 스캔할 수도 있다. 또 다른 예로, 부호화기 및 복호화기는 좌측 최하단 블록(A), 상단 최우측 블록(B) 및 좌측 상단 코너 블록(E) 순으로 주변 블록을 스캔할 수 있다. 또 다른 예로, 부호화기 및 복호화기는 좌측 최하단 블록(A), 상단 최우측 블록(B), 우측 상단 코너 블록(C), 좌측 하단 코너 블록(D) 및 좌측 상단 코너 블록(E) 순으로 주변 블록을 스캔할 수도 있다. 또 다른 예로 부호화기 및 복호화기는 좌측 최하단 블록(A), 상단 최우측 블록(B), 우측 상단 코너 블록(C), 좌측 하단 코너 블록(D),좌측 상단 코너 블록(E), 좌측 최상단 블록(F) 및 상단 최좌측 블록(G) 순으로 주변 블록을 스캔할 수도 있다.In another embodiment, the encoder and decoder may scan a plurality of blocks existing in a predetermined position among reconstructed neighboring blocks in a predetermined order. At this time, the encoder and decoder may use motion information of a first block in which motion information is present in scan order, as L1 temporal motion information of a current block. The scan target block and scan order may be determined in various forms. For example, the encoder and the decoder may scan neighboring blocks in order of the top left block (F), top leftmost block (B), and top rightmost block (B). As another example, the encoder and the decoder may block neighboring blocks in the order of top left block (F), top leftmost block (G), top right corner block (C), bottom left corner block (D), and top left corner block (E). You can also scan. As another example, the encoder and decoder may scan neighboring blocks in the order of the left bottom block (A), top rightmost block (B), and top left corner block (E). As another example, the encoder and the decoder are adjacent blocks in the order of the bottom left block (A), the top right block (B), the top right corner block (C), the bottom left corner block (D), and the top left corner block (E). You can also scan As another example, the encoder and decoder are the lower left block (A), upper right block (B), upper right corner block (C), lower left corner block (D), upper left corner block (E), upper left block ( It is also possible to scan the neighboring blocks in the order of F) and upper leftmost block G.

또 다른 실시예로, 부호화기 및 복호화기는 복원된 주변 블록 중에서 소정의 위치에 존재하는 복수 개의 블록의 움직임 정보에 대해 중간 값을 도출할 수 있고, 상기 도출된 중간 값을 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 예를 들어, 상기 복수 개의 블록은 좌측 최상단 블록(F), 상단 최좌측 블록(G), 우측 상단 코너 블록(C), 좌측 하단 코너 블록(D) 및 좌측 상단 코너 블록(E)일 수 있다. In another embodiment, the encoder and the decoder may derive an intermediate value for motion information of a plurality of blocks existing at a predetermined position among reconstructed neighboring blocks, and the derived intermediate value may be L1 temporal motion information of the current block. Can be used as For example, the plurality of blocks may be a top left block (F), a top leftmost block (G), a top right corner block (C), a bottom left corner block (D), and a top left corner block (E). .

복원된 주변 블록으로부터 현재 블록의 L1 시간적 움직임 정보를 도출하는 방법은 상술한 실시예에 한정되는 것이 아니며, 현재 블록의 L1 시간적 움직임 정보는 구현 및/또는 필요에 따라 다양한 방법으로 도출될 수 있다.The method of deriving the L1 temporal motion information of the current block from the reconstructed neighboring block is not limited to the above-described embodiment, and the L1 temporal motion information of the current block can be derived in various ways according to implementation and / or needs.

이하, 복호화기 입장에서 도 6 및 도 7의 실시예에 따른 시간적 움직임 정보 도출 과정의 실시예가 서술된다.Hereinafter, an embodiment of a process for deriving temporal motion information according to the embodiments of FIGS. 6 and 7 will be described from the viewpoint of the decoder.

상기 시간적 움직임 정보 도출 프로세스를 위한 입력에는, 현재 블록의 최좌상단 샘플의 위치 (xP, yP), 입력 움직임 벡터(mvLXCol) 및 입력 참조 픽쳐 번호(RefPicOrder(currPic, refIdxLX, LX)) 등이 있을 수 있다. 여기서, currPic는 현재 픽쳐를 의미할 수 있다. 상기 프로세스의 출력은 최종 시간적 움직임 정보로 사용되는 움직임 벡터(mvLXCol) 및 최종 시간적 움직임 정보의 존재 유무를 나타내는 정보(availableFlagLXCol)일 수 있다. 여기서, X는 0 또는 1의 값을 가질 수 있다. 예를 들어, X가 0인 경우, mvLXCol, refIdxLX, LX는 mvL0Col, refIdxL0, L0을 나타낼 수 있으며, 이는 L0 시간적 움직임 정보와 관련된 변수들을 의미할 수 있다. 또한, mvLX는 움직임 벡터를 나타낼 수 있고, mvLX[0]은 x 성분의 움직임 벡터, mvLX[1]은 y 성분의 움직임 벡터를 의미할 수 있다. refIdxLX는 참조 픽쳐들이 저장된 LX 참조 픽쳐 리스트 내의 참조 픽쳐를 지시하는 LX 참조 픽쳐 인덱스를 나타낼 수 있다. refIdxLX 값이 0인 경우, refIdxLX는 LX 참조 픽쳐 리스트 내의 첫 번째 참조 픽쳐를 지시할 수 있고, refIdxLX 값이 -1인 경우, refIdxLX는 참조 픽쳐 리스트 내에 참조 픽쳐가 존재하지 않음을 나타낼 수 있다. 또한, 후술되는 predFlagLX는 예측 블록 생성시에 움직임 보상이 수행되는지 여부를 나타낼 수 있다. 예를 들어, predFlagLX 값이 1인 경우, 부호화기 및 복호화기는 예측 블록 생성시에 움직임 보상을 수행할 수 있다.The input for the temporal motion information derivation process may include a position (xP, yP), an input motion vector (mvLXCol), and an input reference picture number (RefPicOrder (currPic, refIdxLX, LX)) of the current block in the current block. have. Here, currPic may mean the current picture. The output of the process may be motion vector (mvLXCol) used as the final temporal motion information and information (availableFlagLXCol) indicating the presence or absence of the final temporal motion information. Here, X may have a value of 0 or 1. For example, when X is 0, mvLXCol, refIdxLX, and LX may represent mvL0Col, refIdxL0, L0, which may mean variables related to L0 temporal motion information. In addition, mvLX may represent a motion vector, mvLX [0] may mean a motion vector of the x component, and mvLX [1] may mean a motion vector of the y component. refIdxLX may indicate an LX reference picture index indicating a reference picture in an LX reference picture list in which reference pictures are stored. When the refIdxLX value is 0, refIdxLX may indicate the first reference picture in the LX reference picture list, and when the refIdxLX value is -1, refIdxLX may indicate that there is no reference picture in the reference picture list. In addition, predFlagLX, which will be described later, may indicate whether motion compensation is performed when generating a prediction block. For example, when the predFlagLX value is 1, the encoder and the decoder may perform motion compensation when generating a prediction block.

만일 입력 움직임 벡터 mvL0Col 및 mvL1Col이 동일하고, RefPicOrder(currPic, refIdxL0, L0)과 RefPicOrder(currPic, refIdxL1, L1)이 동일하다면(즉, L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일하다면), 부호화기 및 복호화기는 다음 과정을 수행할 수 있다.If the input motion vectors mvL0Col and mvL1Col are the same, and RefPicOrder (currPic, refIdxL0, L0) and RefPicOrder (currPic, refIdxL1, L1) are the same (i.e., L0 reference picture number and L1 reference picture number are the same), the encoder and The decoder can perform the following process.

만일, 현재 블록의 좌측에 인접한 좌측 최상단 블록(A(xP-1, yP))이 존재하고, 상기 좌측 최상단 블록이 인트라 모드로 부호화된 블록이 아니고, predFlagL0A이 ‘1’이고 mvL0A가 (0,0)이 아니면, 부호화기 및 복호화기는 다음 과정을 수행할 수 있다. 여기서, A는 predFlagL0A 및 mvL0A가 좌측 최상단 블록(A)에 관한 정보임을 나타낼 수 있다.If there is a left top block (A (xP-1, yP)) adjacent to the left side of the current block, the top left block is not a block encoded in intra mode, predFlagL0A is '1' and mvL0A is (0, If not 0), the encoder and decoder can perform the following process. Here, A may indicate that predFlagL0A and mvL0A are information related to the left uppermost block (A).

mvL1Col = mvL0AmvL1Col = mvL0A

그렇지 않고, 만일 현재 블록의 상단에 인접한 상단 최좌측 블록(B(xP, yP-1))이 존재하고, 상기 상단 최좌측 블록이 인트라 모드로 부호화된 블록이 아니고, predFlagL0B이 ‘1’이고 mvL0B가 (0,0)이 아니면, 부호화기 및 복호화기는 다음 과정을 수행할 수 있다. 여기서, B는 predFlagL0B 및 mvL0B가 좌측 최상단 블록(B)에 관한 정보임을 나타낼 수 있다.Otherwise, if the top leftmost block (B (xP, yP-1)) adjacent to the top of the current block is present, the top leftmost block is not a block encoded in intra mode, predFlagL0B is '1' and mvL0B If is not (0,0), the encoder and decoder can perform the following process. Here, B may indicate that predFlagL0B and mvL0B are information regarding the uppermost block B on the left.

mvL1Col = mvL0BmvL1Col = mvL0B

그렇지 않고, 만일 현재 블록 외부의 좌측 상단 코너에 위치한 좌측 상단 코너 블록(E(xP-1, yP-1))이 존재하고, 상기 상단 최좌측 블록이 인트라 모드로 부호화된 블록이 아니고, predFlagL0E이 ‘1’이고 mvL0E가 (0,0)이 아니면, 부호화기 및 복호화기는 다음 과정을 수행할 수 있다. 여기서, E는 predFlagL0E 및 mvL0E가 좌측 최상단 블록(E)에 관한 정보임을 나타낼 수 있다.Otherwise, if the upper left corner block (E (xP-1, yP-1)) located in the upper left corner outside the current block exists, the upper leftmost block is not an intra mode coded block, and predFlagL0E is If '1' and mvL0E is not (0,0), the encoder and decoder may perform the following process. Here, E may indicate that predFlagL0E and mvL0E are information related to the left uppermost block E.

mvL1Col = mvL0EmvL1Col = mvL0E

이 때 만일, mvL0Col과 mvL1Col이 동일하면, 부호화기 및 복호화기는 다음 과정을 수행할 수 있다. At this time, if mvL0Col and mvL1Col are the same, the encoder and decoder can perform the following process.

avilableFlagL1Col = 0 avilableFlagL1Col = 0

그리고, 부호화기 및 복호화기는 다음 과정을 수행할 수 있다. In addition, the encoder and decoder may perform the following process.

availableFlagCol = availableFlagL0Col || availableFlagL1Col availableFlagCol = availableFlagL0Col || availableFlagL1Col

predFlagLXCol = availableFlagLXColpredFlagLXCol = availableFlagLXCol

여기서, availableFlagCol은 시간적 움직임 정보가 도출되었는지 여부를 나타내고, predFlagLXCol은 L0 시간적 움직임 정보 및 L1 시간적 움직임 정보 각각에 대한 최종 시간적 움직임 정보의 존재 유무를 나타낼 수 있다.Here, availableFlagCol indicates whether temporal motion information has been derived, and predFlagLXCol may indicate the presence or absence of final temporal motion information for each of the L0 temporal motion information and the L1 temporal motion information.

도 8은 도 6의 실시예에 따른 시간적 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다. 도 8의 실시예에 따른 인터 예측 장치는 시간적 움직임 정보 판단부(810), 복원된 주변 블록 움직임 정보 판단부(820), 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(830) 및 L1 시간적 움직임 정보 재설정부(840)를 포함할 수 있다.8 is a block diagram schematically showing an embodiment of an inter prediction apparatus capable of performing a process of deriving temporal motion information according to the embodiment of FIG. 6. The inter-prediction apparatus according to the embodiment of FIG. 8 includes a temporal motion information determination unit 810, a reconstructed neighboring block motion information determination unit 820, a prediction direction information reset and L0 motion information setting unit 830, and L1 temporal motion information A reset unit 840 may be included.

도 8을 참조하면, 시간적 움직임 정보 판단부(810)는 입력 시간적 움직임 정보에서 L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일한지 여부, 즉 L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일하고 L0 움직임 벡터와 L1 움직임 벡터가 동일한지 여부를 판단할 수 있다. Referring to FIG. 8, the temporal motion information determination unit 810 determines whether the L0 temporal motion information and the L1 temporal motion information are the same in the input temporal motion information, that is, the L0 reference picture number and the L1 reference picture number are the same and the L0 motion vector It may be determined whether and L1 motion vectors are the same.

L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일하지 않은 경우, 인터 예측 장치는 입력 시간적 움직임 정보를 그대로 현재 블록의 시간적 움직임 정보로 사용할 수 있다. AMVP가 적용되는 경우, 상기 현재 블록의 시간적 움직임 정보는 현재 블록에 대한 예측 움직임 벡터 후보로 결정되거나 등록될 수 있다. 또한, 머지가 적용되는 경우, 상기 현재 블록의 시간적 움직임 정보는 현재 블록에 대한 머지 후보로 결정되거나 등록될 수 있다. L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일한 경우에는 복원된 주변 블록 움직임 정보 판단부(820)에 의한 판단 과정이 수행될 수 있다. If the L0 temporal motion information and the L1 temporal motion information are not the same, the inter prediction device may use the input temporal motion information as the temporal motion information of the current block. When AMVP is applied, temporal motion information of the current block may be determined or registered as a prediction motion vector candidate for the current block. Also, when merge is applied, temporal motion information of the current block may be determined or registered as a merge candidate for the current block. When the L0 temporal motion information and the L1 temporal motion information are the same, a determination process by the reconstructed neighboring block motion information determination unit 820 may be performed.

한편, 도 6에서 상술한 바와 같이 시간적 움직임 정보 판단부(810)는 L0 시간적 움직임 정보와 L1 시간적 움직임 정보의 동일성 여부가 아닌, L0 참조 픽쳐 번호 및 L1 참조 픽쳐 번호의 동일성 여부 또는 콜 블록의 예측 방향을 판단할 수도 있다. 예를 들어, L0 참조 픽쳐 번호 및 L1 참조 픽쳐 번호가 동일하지 않은 경우, 인터 예측 장치는 입력 시간적 움직임 정보를 그대로 현재 블록의 시간적 움직임 정보로 사용할 수 있고, L0 참조 픽쳐 번호 및 L1 참조 픽쳐 번호가 동일한 경우 복원된 주변 블록 움직임 정보 판단부(820)에 의한 판단 과정이 수행될 수 있다. 다른 예로, 콜 블록의 예측 방향이 양방향 예측인 경우, 인터 예측 장치는 입력 시간적 움직임 정보를 그대로 현재 블록의 시간적 움직임 정보로 사용할 수 있고, 콜 블록의 예측 방향이 단방향 예측인 경우 복원된 주변 블록 움직임 정보 판단부(820)에 의한 판단 과정이 수행될 수도 있다.Meanwhile, as described above with reference to FIG. 6, the temporal motion information determination unit 810 predicts whether the L0 reference picture number and the L1 reference picture number are the same or whether the L0 temporal motion information and the L1 temporal motion information are identical. You can also judge the direction. For example, if the L0 reference picture number and the L1 reference picture number are not the same, the inter prediction device may use the input temporal motion information as the temporal motion information of the current block, and the L0 reference picture number and the L1 reference picture number In the same case, a determination process by the reconstructed neighboring block motion information determination unit 820 may be performed. As another example, when the prediction direction of the call block is bidirectional prediction, the inter prediction device may use input temporal motion information as the temporal motion information of the current block as it is, and when the prediction direction of the call block is unidirectional prediction, the restored neighboring block motion The determination process by the information determination unit 820 may be performed.

복원된 주변 블록 움직임 정보 판단부(820)는 복원된 주변 블록의 움직임 정보가 존재하는지 여부를 판단할 수 있다. 복원된 주변 블록의 움직임 정보가 존재하지 않는 경우(예를 들어, 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 복원된 주변 블록 중에서 움직임 정보를 갖는 블록이 존재하지 않는 경우), 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(830)에 의한 예측 방향 정보 재설정 및 L0 움직임 정보 설정 과정이 수행될 수 있다. 또한, 복원된 주변 블록의 움직임 정보가 존재하는 경우(예를 들어, 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 복원된 주변 블록 중에서 움직임 정보를 갖는 블록이 존재하는 경우), L1 시간적 움직임 정보 재설정부(840)에 의한 재설정 과정이 수행될 수 있다.The reconstructed neighboring block motion information determining unit 820 may determine whether motion information of the reconstructed neighboring block exists. When the motion information of the reconstructed neighboring block does not exist (for example, if there is no block having motion information among the reconstructed neighboring blocks of a predetermined position and / or a position selected by a predetermined method), prediction direction information The process of resetting the prediction direction information and setting the L0 motion information by the reset and L0 motion information setting unit 830 may be performed. In addition, when motion information of the reconstructed neighboring block exists (for example, if there is a block having motion information among reconstructed neighboring blocks of a predetermined position and / or a position selected in a predetermined method), L1 temporal motion The reset process by the information reset unit 840 may be performed.

복원된 주변 블록의 움직임 정보가 존재하지 않는 경우, 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(830)는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수 있다. 또한 이 때, 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(830)는 입력 시간적 움직임 정보 중에서 L0 시간적 움직임 정보만을 현재 블록의 최종 시간적 움직임 정보로 설정할 수 있다.When the motion information of the reconstructed neighboring block does not exist, the prediction direction information reset and the L0 motion information setting unit 830 may reset the prediction direction information of the current block to unidirectional prediction. In addition, at this time, the prediction direction information reset and the L0 motion information setting unit 830 may set only the L0 temporal motion information among the input temporal motion information as the final temporal motion information of the current block.

복원된 주변 블록의 움직임 정보가 존재하는 경우, L1 시간적 움직임 정보 재설정부(840)는 현재 블록의 L1 시간적 움직임 정보를 복원된 주변 블록의 움직임 정보로 재설정할 수 있다. 즉, 인터 예측 장치는 복원된 주변 블록의 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 일례로 L1 시간적 움직임 정보 재설정부(840)는 복원된 주변 블록에서 현재 블록의 L1 시간적 움직임 정보로 사용될 움직임 정보를 탐색할 때, 영 벡터(0,0)를 갖는 움직임 정보는 선택하지 않고 영 벡터(0,0)를 갖지 않는 움직임 정보만을 선택할 수도 있다. 한편, L1 시간적 움직임 정보 재설정부(840)는 현재 블록의 움직임 정보 후보 리스트를 기반으로 현재 블록의 L1 시간적 움직임 정보를 재설정할 수도 있다. 상술한 각각의 방법에 대한 구체적인 실시예는 도 6 및 도 7에서 상술한 바 있으므로, 여기서는 생략하기로 한다.When the motion information of the restored neighboring block is present, the L1 temporal motion information resetting unit 840 may reset the L1 temporal motion information of the current block to the restored motion information of the neighboring block. That is, the inter prediction apparatus may use the reconstructed neighboring block motion information as L1 temporal motion information of the current block. At this time, as an example, when the L1 temporal motion information resetting unit 840 searches for motion information to be used as the L1 temporal motion information of the current block in the restored neighboring block, motion information having a zero vector (0,0) is not selected. It is also possible to select only motion information that does not have a zero vector (0,0). Meanwhile, the L1 temporal motion information resetting unit 840 may reset the L1 temporal motion information of the current block based on the motion information candidate list of the current block. Since the specific embodiment of each of the above-described methods has been described in FIGS. 6 and 7, it will be omitted here.

도 9는 본 발명에 따른 현재 블록의 시간적 움직임 정보 도출 방법의 다른 실시예를 개략적으로 나타내는 흐름도이다. 9 is a flowchart schematically showing another embodiment of a method for deriving temporal motion information of a current block according to the present invention.

후술되는 실시예들은 시간적 움직임 정보를 중심으로 서술되지만 본 발명은 이에 한정되는 것은 아니다. 예를 들어, 도 9의 실시예에 따른 방법들은 머지 모드 및/또는 AMVP 모드에서의 시간적 움직임 정보뿐만 아니라, 머지 모드에서 머지 후보 리스트를 기반으로 도출된 현재 블록의 움직임 정보 및/또는 AMVP 모드에서 예측 움직임 벡터 후보 리스트를 기반으로 도출된 현재 블록의 움직임 정보에도 동일하거나 유사한 방식으로 적용될 수 있다.The embodiments described below are mainly described with respect to temporal motion information, but the present invention is not limited thereto. For example, the methods according to the embodiment of FIG. 9 may include temporal motion information in merge mode and / or AMVP mode, as well as motion information and / or AMVP mode of the current block derived based on a merge candidate list in merge mode. The motion information of the current block derived based on the predicted motion vector candidate list may be applied in the same or similar manner.

상술한 바와 같이, 시간적 움직임 정보는 이미 복원된 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 움직임 정보를 기반으로 도출될 수 있다. 여기서, 상기 콜 픽쳐는 일례로 참조 픽쳐 리스트에 포함된 참조 픽쳐 중에서 하나의 픽쳐에 해당될 수 있다. 부호화기 및 복호화기는, 콜 픽쳐 내에서 현재 블록과 공간적으로 동일한 위치에 존재하는 블록을 기준으로 소정의 상대적인 위치를 결정할 수 있고, 상기 결정된 소정의 상대적인 위치(예를 들어, 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록의 내부 및/또는 외부의 위치)를 기반으로 상기 콜 블록을 도출할 수 있다. 콜 블록을 기반으로 도출되는 시간적 움직임 정보는 예측 방향 정보, L0 참조 픽쳐 번호, L1 참조 픽쳐 번호, L0 움직임 벡터 및 L1 움직임 벡터 등을 포함할 수 있다.As described above, temporal motion information may be derived based on motion information of a call block corresponding to a current block in a call picture that has already been restored. Here, the call picture may correspond to one picture among reference pictures included in the reference picture list, for example. The encoder and decoder may determine a predetermined relative position based on a block that is spatially identical to the current block in the call picture, and the determined predetermined relative position (eg, spatially identical to the current block) The call block may be derived based on a location inside and / or outside of a block existing at a location. The temporal motion information derived based on the call block may include prediction direction information, L0 reference picture number, L1 reference picture number, L0 motion vector, and L1 motion vector.

도 9를 참조하면, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 시간적 움직임 정보에서 L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일한지 여부, 즉 L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일하고 L0 움직임 벡터와 L1 움직임 벡터가 동일한지 여부를 판단할 수 있다(S910). 이하, 후술되는 도 9 내지 도 11의 실시예에 한하여, 설명의 편의상 시간적 움직임 정보 재설정 전 S910 단계로 입력되는 시간적 움직임 정보는 입력 시간적 움직임 정보(L0 입력 시간적 움직임 정보, L1 입력 시간적 움직임 정보)라 한다. 또한 입력 시간적 움직임 정보에 포함된 움직임 벡터는 입력 움직임 벡터(L0 입력 움직임 벡터, L1 입력 움직임 벡터), 입력 시간적 움직임 정보에 포함된 참조 픽쳐 인덱스는 입력 참조 픽쳐 인덱스(L0 입력 참조 픽쳐 인덱스, L1 입력 참조 픽쳐 인덱스), 입력 시간적 움직임 정보에 포함된 참조 픽쳐 번호는 입력 참조 픽쳐 번호(L0 입력 참조 픽쳐 번호, L1 입력 참조 픽쳐 번호)라 한다.Referring to FIG. 9, the encoder and decoder determine whether L0 temporal motion information and L1 temporal motion information are the same in temporal motion information derived based on a call block, that is, L0 reference picture number and L1 reference picture number are the same and L0 motion It may be determined whether the vector and the L1 motion vector are the same (S910). Hereinafter, in the embodiments of FIGS. 9 to 11 described later, for convenience of explanation, temporal motion information input in step S910 before resetting temporal motion information is input temporal motion information (L0 input temporal motion information, L1 input temporal motion information). do. In addition, the motion vector included in the input temporal motion information is an input motion vector (L0 input motion vector, L1 input motion vector), and the reference picture index included in the input temporal motion information is an input reference picture index (L0 input reference picture index, L1 input) Reference picture index) and reference picture numbers included in the input temporal motion information are referred to as input reference picture numbers (L0 input reference picture number, L1 input reference picture number).

L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일하지 않은 경우, 즉 L0 입력 참조 픽쳐 번호와 L1 입력 참조 픽쳐 번호가 동일하지 않거나 및/또는 L0 입력 움직임 벡터와 L1 입력 움직임 벡터가 동일하지 않은 경우, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 입력 시간적 움직임 정보를 그대로 현재 블록의 시간적 움직임 정보로 사용할 수 있다. AMVP가 적용되는 경우, 상기 현재 블록의 시간적 움직임 정보는 현재 블록의 예측 움직임 벡터 후보로 결정되거나 등록될 수 있다. 또한, 머지가 적용되는 경우, 상기 현재 블록의 시간적 움직임 정보는 현재 블록의 머지 후보로 결정되거나 등록될 수 있다. When the L0 input temporal motion information and the L1 input temporal motion information are not the same, that is, the L0 input reference picture number and the L1 input reference picture number are not the same, and / or the L0 input motion vector and the L1 input motion vector are not the same. , The encoder and decoder may use input temporal motion information derived based on a call block as the temporal motion information of the current block. When AMVP is applied, temporal motion information of the current block may be determined or registered as a prediction motion vector candidate of the current block. Also, when merge is applied, temporal motion information of the current block may be determined or registered as a merge candidate of the current block.

L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, 부호화기 및 복호화기는 콜 블록의 움직임 정보가 존재하는지 여부를 판단할 수 있다(S920). 여기서, 상기 콜 블록은 입력 시간적 움직임 정보 도출을 위해 사용되는 콜 블록이 아닌 새로이 도출된 콜 블록일 수 있다. 예를 들어, 부호화기 및 복호화기는 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 콜 블록 중에서 움직임 정보를 갖는 블록이 존재하는지 여부를 판단할 수 있다. When the L0 input temporal motion information and the L1 input temporal motion information are the same, the encoder and the decoder may determine whether the call block motion information exists (S920). Here, the call block may be a newly derived call block, not a call block used for deriving input temporal motion information. For example, the encoder and the decoder may determine whether there is a block having motion information among call blocks at a predetermined location and / or a location selected by a predetermined method.

이하, 도 9 내지 도 11의 실시예에 한하여, 설명의 편의상 입력 시간적 움직임 정보 도출을 위해 사용되는 콜 블록은 제1 콜 블록이라 하고, S920 단계에서와 같이 움직임 정보 존재 여부의 판단 대상이 되면서 후술되는 S940 단계에서와 같이 L1 입력 시간적 움직임 정보의 재설정을 위해 사용되는 콜 블록은 제2 콜 블록이라 한다. 또한, 제1 콜 블록을 포함하는 콜 픽쳐는 제1 콜 픽쳐라 하고, 제2 콜 블록을 포함하는 콜 픽쳐는 제2 콜 픽쳐라 한다. 여기서, 일례로 제1 콜 픽쳐 및 제2 콜 픽쳐는 각각 참조 픽쳐 리스트에 포함된 참조 픽쳐 중에서 하나의 픽쳐에 해당될 수 있다.Hereinafter, in the embodiments of FIGS. 9 to 11, for convenience of description, a call block used for deriving input temporal motion information is referred to as a first call block, and will be described later while being subject to determination of presence or absence of motion information as in step S920. As in step S940, the call block used for resetting the L1 input temporal motion information is referred to as a second call block. In addition, a call picture including a first call block is called a first call picture, and a call picture including a second call block is called a second call picture. Here, as an example, the first call picture and the second call picture may each correspond to one picture among reference pictures included in the reference picture list.

제2 콜 블록의 움직임 정보가 존재하지 않는 경우(예를 들어, 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 제2 콜 블록 중에서 움직임 정보를 갖는 블록이 존재하지 않는 경우), 부호화기 및 복호화기는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수 있다(S930). 또한 이 때, 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보만을 현재 블록의 시간적 움직임 정보로 사용할 수 있다.When the motion information of the second call block does not exist (for example, if there is no block having motion information among the second call blocks at a predetermined position and / or a position selected by a predetermined method), the encoder and the decoding The group may re-set the prediction direction information of the current block as a one-way prediction (S930). Also, at this time, the encoder and decoder can use only L0 input temporal motion information as temporal motion information of the current block.

제2 콜 블록의 움직임 정보가 존재하는 경우(예를 들어, 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 제2 콜 블록 중에서 움직임 정보를 갖는 블록이 존재하는 경우), 부호화기 및 복호화기는 상기 제2 콜 블록의 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다(S940). 즉, 이 때 부호화기 및 복호화기는 현재 블록의 L1 입력 시간적 움직임 정보를 상기 제2 콜 블록의 움직임 정보로 재설정할 수 있다. L1 입력 시간적 움직임 정보의 재설정을 위해 사용되는 제2 콜 픽쳐 및 제2 콜 블록의 구체적인 실시예는 후술하기로 한다.When motion information of the second call block exists (for example, when there is a block having motion information among second call blocks at a predetermined position and / or a position selected by a predetermined method), the encoder and the decoder The motion information of the second call block may be used as the final L1 temporal motion information of the current block (S940). That is, at this time, the encoder and decoder may reset the L1 input temporal motion information of the current block to motion information of the second call block. A specific embodiment of the second call picture and the second call block used for resetting the L1 input temporal motion information will be described later.

상술한 실시예에서 현재 블록의 시간적 움직임 정보 도출 방법은 일련의 단계로서 순서도를 기초로 설명되고 있으나, 순서도의 하나 또는 그 이상의 단계는 삭제될 수도 있다. 예를 들어, 상술한 실시예에서 S920 및 S940의 단계는 생략될 수도 있다. 이 때, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, 부호화기 및 복호화기는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수 있다(S930). 또한 이 때, 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보만을 현재 블록의 최종 시간적 움직임 정보로 사용할 수 있다. In the above-described embodiment, the method for deriving temporal motion information of the current block is described based on a flowchart as a series of steps, but one or more steps of the flowchart may be deleted. For example, in the above-described embodiment, steps S920 and S940 may be omitted. At this time, when the L0 input temporal motion information and the L1 input temporal motion information are the same, the encoder and the decoder may re-set the prediction direction information of the current block as unidirectional prediction (S930). Also, at this time, the encoder and the decoder may use only L0 input temporal motion information as the final temporal motion information of the current block.

한편, 상술한 실시예에서는 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보의 동일성을 기반으로 S920 내지 S940 과정의 수행 여부가 결정되지만, 부호화기 및 복호화기는 다른 조건을 기반으로 S920 내지 S940 과정의 수행 여부를 결정할 수도 있다.On the other hand, in the above-described embodiment, it is determined whether to perform the processes S920 to S940 based on the identity of the L0 input temporal motion information and the L1 input temporal motion information, but the encoder and decoder perform the S920 to S940 processes based on other conditions. You can also decide

일 실시예로, 부호화기 및 복호화기는 L0 입력 참조 픽쳐 번호 및 L1 입력 참조 픽쳐 번호의 동일성을 기반으로 S920 내지 S940 과정의 수행 여부를 결정할 수 있다. 일례로, 부호화기 및 복호화기는 L0 입력 참조 픽쳐 번호 및 L1 입력 참조 픽쳐 번호가 동일한 경우에 S920 내지 S940 과정을 수행할 수 있다.In an embodiment, the encoder and the decoder may determine whether to perform the processes S920 to S940 based on the identity of the L0 input reference picture number and the L1 input reference picture number. For example, the encoder and the decoder may perform processes S920 to S940 when the L0 input reference picture number and L1 input reference picture number are the same.

다른 실시예로, 부호화기 및 복호화기는 제1 콜 블록의 예측 방향을 기반으로 S920 내지 S940 과정의 수행 여부를 결정할 수 있다. 상술한 바와 같이, 예측 방향 정보는 예측이 수행되는 블록에 대해 단방향 예측이 적용되는지 또는 양방향 예측이 적용되는지 여부를 지시하는 정보를 의미할 수 있다. 따라서, 상기 예측 방향은 단방향 예측 또는 양방향 예측에 해당될 수 있다. 일례로, 부호화기 및 복호화기는 제1 콜 블록의 움직임 정보(예측 방향)가 양방향 예측이 아닌 단방향 예측인 경우에 S920 내지 S940 과정을 수행할 수 있다. 이는 제1 콜 블록의 예측 방향이 단방향 예측인 경우, 결과적으로 제1 콜 블록으로부터 도출되는 입력 시간적 움직임 정보에서, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일할 수 있기 때문이다.In another embodiment, the encoder and the decoder may determine whether to perform processes S920 to S940 based on the prediction direction of the first call block. As described above, the prediction direction information may mean information indicating whether unidirectional prediction or bidirectional prediction is applied to a block on which prediction is performed. Accordingly, the prediction direction may correspond to unidirectional prediction or bidirectional prediction. For example, the encoder and the decoder may perform processes S920 to S940 when the motion information (prediction direction) of the first call block is unidirectional prediction rather than bidirectional prediction. This is because when the prediction direction of the first call block is unidirectional prediction, as a result, in the input temporal motion information derived from the first call block, the L0 input temporal motion information and the L1 input temporal motion information may be the same.

또 다른 실시예로, 부호화기 및 복호화기는 제1 콜 블록에 움직임 정보가 존재하는지 여부에 관한 정보를 기반으로 S920 내지 S940 과정의 수행 여부를 결정할 수도 있다. 일례로, 부호화기 및 복호화기는 제1 콜 블록에 움직임 정보가 존재하지 않는 경우에 S920 내지 S940 과정을 수행할 수 있다. 이 경우, 상술한 S940 단계에서는 L1 입력 시간적 움직임 정보가 아닌 L0 입력 시간적 움직임 정보가 재설정될 수 있다. 즉, 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보를 제2 콜 블록의 움직임 정보로 설정할 수 있으며, 현재 블록에 대해 양방향 예측이 아닌 단방향 예측을 수행할 수 있다. 또한, 제1 콜 블록에 움직임 정보가 존재하지 않는 경우, 상술한 S940 단계에서 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보를 모두 재설정할 수도 있다. 즉, 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보 및 L1 입력 시간적 움직임 정보를 모두 제2 콜 블록의 움직임 정보로 재설정할 수 있으며, 현재 블록에 대해 양방향 예측을 수행할 수도 있다.In another embodiment, the encoder and the decoder may determine whether to perform the processes S920 to S940 based on information on whether motion information is present in the first call block. For example, the encoder and the decoder may perform processes S920 to S940 when motion information does not exist in the first call block. In this case, in step S940 described above, the L0 input temporal motion information, not the L1 input temporal motion information, may be reset. That is, the encoder and the decoder may set the L0 input temporal motion information as motion information of the second call block, and may perform unidirectional prediction rather than bidirectional prediction on the current block. In addition, if there is no motion information in the first call block, in step S940, the encoder and decoder may reset both the L0 input temporal motion information and the L1 input temporal motion information. That is, the encoder and the decoder may reset both the L0 input temporal motion information and the L1 input temporal motion information to motion information of the second call block, and may perform bidirectional prediction on the current block.

또 다른 실시예로, 부호화기 및 복호화기는 현재 블록의 크기를 기반으로 S920 내지 S940 과정의 수행 여부를 결정할 수도 있다. 일례로, 부호화기 및 복호화기는 현재 블록의 크기가 소정의 크기보다 작은지 여부를 판단할 수 있다. 여기서, 상기 현재 블록은 CU, PU 및/또는 TU일 수 있으며, 상기 소정의 크기는 예를 들어 8x8, 16x16 또는 32x32 등 중에서 하나일 수 있다. 이 때, 부호화기 및 복호화기는 현재 블록의 크기가 소정의 크기보다 작은 경우에 S920 내지 S940 과정을 수행할 수 있다.In another embodiment, the encoder and decoder may determine whether to perform processes S920 to S940 based on the size of the current block. As an example, the encoder and decoder may determine whether the size of the current block is smaller than a predetermined size. Here, the current block may be a CU, PU and / or TU, and the predetermined size may be one of 8x8, 16x16 or 32x32, for example. At this time, the encoder and the decoder may perform processes S920 to S940 when the size of the current block is smaller than a predetermined size.

또 다른 실시예로, 부호화기 및 복호화기는 제1 콜 블록의 움직임 정보에서 L0 움직임 벡터 및/또는 L1 움직임 벡터가 영 벡터(0,0)에 해당되는 경우에 S920 내지 S940 과정을 수행할 수도 있다. 이 경우, 상술한 S940 단계에서 부호화기 및 복호화기는 영 벡터(0,0)에 해당되는 움직임 벡터(들)를 재설정할 수 있다. 일례로, 상기 영 벡터(0,0)에 해당되는 움직임 벡터(들)는 제2 콜 블록의 움직임 벡터로 설정될 수 있고, 다른 예로, 상기 영 벡터(0,0)에 해당되는 움직임 벡터(들)는 복원된 주변 블록의 움직임 벡터로 설정될 수도 있으며, 또 다른 예로, 상기 영 벡터(0,0)에 해당되는 움직임 벡터(들)는 제1 콜 블록의 주변에 위치한 블록의 움직임 벡터로 설정될 수도 있다. 또 다른 실시예로, 부호화기 및 복호화기는 제1 콜 블록의 움직임 정보에서 L0 움직임 벡터 및/또는 L1 움직임 벡터가 영 벡터(0,0)에 해당되지 않는 경우에 S920 내지 S940 과정을 수행할 수도 있다. 이 경우, 상술한 S940 단계에서 부호화기 및 복호화기는 영 벡터(0,0)에 해당되지 않는 움직임 벡터(들)을 재설정할 수 있으며, 상기 영 벡터(0,0)에 해당되지 않는 움직임 벡터(들)은 제2 콜 블록의 움직임 벡터로 재설정될 수 있다.In another embodiment, the encoder and the decoder may perform processes S920 to S940 when the L0 motion vector and / or the L1 motion vector correspond to a zero vector (0,0) in the motion information of the first call block. In this case, the encoder and decoder in step S940 described above may reset the motion vector (s) corresponding to the zero vector (0,0). As an example, the motion vector (s) corresponding to the zero vector (0,0) may be set as a motion vector of the second call block, and as another example, a motion vector (0) corresponding to the zero vector (0,0) S) may be set as a motion vector of the reconstructed neighboring block, and as another example, the motion vector (s) corresponding to the zero vector (0,0) may be a motion vector of a block located around the first call block. It may be set. In another embodiment, the encoder and the decoder may perform processes S920 to S940 when the L0 motion vector and / or the L1 motion vector do not correspond to the zero vector (0,0) in the motion information of the first call block. . In this case, in step S940 described above, the encoder and decoder may reset motion vector (s) not corresponding to the zero vector (0,0), and motion vector (s) not corresponding to the zero vector (0,0). ) May be reset to the motion vector of the second call block.

상기 S920 내지 S940 과정의 수행 여부가 결정되는 조건은 상술한 실시예에 한정되지 않으며, 조건 및/또는 필요에 따라 다양한 조건이 적용될 수 있다.Conditions for determining whether to perform the processes S920 to S940 are not limited to the above-described embodiment, and various conditions may be applied according to conditions and / or needs.

상술한 실시예들에서 L0 입력 시간적 움직임 정보 및 L1 입력 시간적 움직임 정보는 시간적으로 도출된 움직임 정보이므로, 객체의 이동에 의한 움직임 정보에 해당될 가능성이 높다. 따라서, 부호화기 및 복호화기는 제2 콜 블록에서 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 탐색할 때, 영 벡터(0,0)를 갖는 움직임 정보는 선택하지 않고 영 벡터(0,0)를 갖지 않는 움직임 정보를 선택할 수도 있다. 이는 영 벡터(0,0)에 해당되는 움직임 정보를 갖는 블록은, 객체가 아닌 배경에 해당될 가능성이 높기 때문이다.In the above-described embodiments, since the L0 input temporal motion information and the L1 input temporal motion information are temporally derived motion information, it is highly likely to correspond to motion information due to movement of an object. Accordingly, the encoder and decoder search for motion information to be used as the final L1 temporal motion information of the current block in the second call block, without selecting motion information having a zero vector (0,0), a zero vector (0,0) It is also possible to select motion information that does not have. This is because a block having motion information corresponding to a zero vector (0,0) is more likely to correspond to a background than an object.

한편, 재설정된 최종 L1 시간적 움직임 정보는 현재 블록의 L0 입력 시간적 움직임 정보와 동일할 수도 있다. 따라서, 부호화기 및 복호화기는 제2 콜 블록에서 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 탐색할 때, L0 입력 시간적 움직임 정보와 동일하지 않은 움직임 정보를 선택할 수 있다. 예를 들어, S940에서와 같이, 제2 콜 블록을 기반으로 현재 블록의 최종 L1 시간적 움직임 정보를 도출하는 경우, 부호화기 및 복호화기는 현재 블록의 L0 입력 시간적 움직임 정보와 다른 움직임 정보를 갖는 블록을 상기 최종 L1 시간적 움직임 정보 도출에 사용되는 블록으로 결정할 수 있다. 이 때, 부호화기 및 복호화기는 현재 블록의 L0 입력 시간적 움직임 정보와의 차이가 소정의 임계값(threshold) 이하인 움직임 정보만을, 최종 L1 시간적 움직임 정보로 사용될 움직임 정보로 선택할 수도 있다. 여기서, 상기 소정의 임계값은 현재 블록의 모드 정보, 현재 블록의 움직임 정보, 주변 블록의 모드 정보 및/또는 주변 블록의 움직임 정보 등을 기반으로 정해질 수 있으며, 다양한 방식으로 결정될 수 있다.Meanwhile, the reset final L1 temporal motion information may be the same as the L0 input temporal motion information of the current block. Accordingly, the encoder and decoder may select motion information that is not the same as the L0 input temporal motion information when searching for motion information to be used as the final L1 temporal motion information of the current block in the second call block. For example, as in S940, when deriving the final L1 temporal motion information of the current block based on the second call block, the encoder and decoder may recall a block having motion information different from the L0 input temporal motion information of the current block. It can be determined as a block used for deriving the final L1 temporal motion information. At this time, the encoder and the decoder may select only motion information whose difference from the L0 input temporal motion information of the current block is less than or equal to a predetermined threshold, as motion information to be used as the final L1 temporal motion information. Here, the predetermined threshold may be determined based on mode information of a current block, motion information of a current block, mode information of a neighboring block, and / or motion information of a neighboring block, and may be determined in various ways.

*또한, 상술한 실시예들에서, 제2 콜 블록의 움직임 정보는 L0 움직임 정보 및 L1 움직임 정보를 모두 포함할 수 있다. 이 경우, 부호화기 및 복호화기는 상기 L0 움직임 정보 및 상기 L1 움직임 정보 중에서 하나의 움직임 정보를, 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 움직임 정보로 결정할 수 있다. 일례로, 부호화기 및 복호화기는 제2 콜 블록의 L0 움직임 정보를 현재 블록에 대한 최종 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 제2 콜 블록에 L0 움직임 정보가 존재하지 않는 경우, 부호화기 및 복호화기는 제2 콜 블록의 L1 움직임 정보를 현재 블록에 대한 최종 L1 시간적 움직임 정보로 사용할 수 있다. 다른 예로, 부호화기 및 복호화기는 제2 콜 블록의 L1 움직임 정보를 현재 블록에 대한 최종 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 제2 콜 블록에 L1 움직임 정보가 존재하지 않는 경우, 부호화기 및 복호화기는 제2 콜 블록의 L0 움직임 정보를 현재 블록에 대한 최종 L1 시간적 움직임 정보로 사용할 수 있다.* In addition, in the above-described embodiments, the motion information of the second call block may include both L0 motion information and L1 motion information. In this case, the encoder and the decoder may determine one of the L0 motion information and the L1 motion information as motion information to be used as the final L1 temporal motion information of the current block. As an example, the encoder and decoder may use L0 motion information of the second call block as final L1 temporal motion information of the current block. At this time, if there is no L0 motion information in the second call block, the encoder and the decoder may use the L1 motion information of the second call block as the final L1 temporal motion information for the current block. As another example, the encoder and decoder may use L1 motion information of the second call block as final L1 temporal motion information of the current block. At this time, when the L1 motion information does not exist in the second call block, the encoder and the decoder may use the L0 motion information of the second call block as the final L1 temporal motion information for the current block.

한편, 부호화기 및 복호화기는 상술한 S940 단계에서 현재 블록의 L1 입력 시간적 움직임 정보(예를 들어, L1 입력 움직임 벡터)를 재설정하기 위해, 제2 콜 블록의 움직임 정보를 사용하지 않을 수도 있다. 이 때, 부호화기 및 복호화기는 제1 콜 블록의 움직임 정보(예를 들어, 움직임 벡터)를 기반으로 현재 블록의 L1 입력 시간적 움직임 정보(예를 들어, L1 입력 움직임 벡터)를 재설정할 수 있다. 이하, 이와 관련된 실시예들이 서술되며 이는 움직임 벡터를 기준으로 서술하기로 한다.Meanwhile, the encoder and decoder may not use motion information of the second call block in order to reset L1 input temporal motion information (eg, L1 input motion vector) of the current block in step S940 described above. At this time, the encoder and the decoder may reset the L1 input temporal motion information (eg, L1 input motion vector) of the current block based on the motion information (eg, motion vector) of the first call block. Hereinafter, embodiments related to this will be described, which will be described based on a motion vector.

일 실시예로, 부호화기 및 복호화기는 제1 콜 픽쳐 내에서, 제1 콜 블록의 움직임 정보(움직임 벡터)가 지시하는 위치에서 소정의 거리 및/또는 방향을 기반으로 이동된 상대적인 위치를 지시하는 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보(L1 움직임 벡터)로 사용할 수 있다. 일례로, 부호화기 및 복호화기는 제1 콜 블록의 움직임 정보가 지시하는 위치에서 수직 및/또는 수평 방향으로 1/4 픽셀 크기 (예를 들어, (-1,0), (1,0), (0,-1), (0,1), (-1,-1), (-1,1), (1,-1), (1,1) 등. 여기서, 1/4 픽셀 단위는 1에 해당됨.)만큼 이동된 위치를 지시하는 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다. 다른 예로, 부호화기 및 복호화기는 제1 콜 블록의 움직임 정보가 지시하는 위치에서 수직 및/또는 수평 방향으로 1/2 픽셀 크기(예를 들어, (-2,0), (2,0), (0,-2), (0,2), (-2,-2), (-2,2), (2,-2), (2,2) 등. 여기서, 1/4 픽셀 단위는 1에 해당됨.)만큼 이동된 위치를 지시하는 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다. 또 다른 예로, 부호화기 및 복호화기는 제1 콜 블록의 움직임 정보가 지시하는 위치에서 수직 및/또는 수평 방향으로 정수 픽셀 크기(예를 들어, (-4,0), (4,0), (0,-4), (0,4), (-4,-4), (-4,4), (4,-4), (4,4) 등. 여기서, 1/4 픽셀 단위는 1에 해당됨.)만큼 이동된 위치를 지시하는 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수도 있다. 한편, 움직임 벡터는 수직 방향 성분 및 수평 방향 성분을 포함하므로, 상술한 방법들(1/4 픽셀 크기만큼 이동, 1/2 픽셀 크기만큼 이동, 정수 픽셀 크기만큼 이동)은 수평 방향 성분 및 수직 방향 성분에 대해 각각 독립적으로 적용될 수도 있다. 이 때, 수평 방향의 이동 거리 및 수직 방향의 이동 거리는 서로 다를 수도 있다.In one embodiment, the encoder and decoder move within a first call picture to indicate a relative position moved based on a predetermined distance and / or direction from a position indicated by motion information (motion vector) of the first call block. Information may be used as the final L1 temporal motion information (L1 motion vector) of the current block. In one example, the encoder and decoder are 1/4 pixel size in the vertical and / or horizontal direction (eg, (-1,0), (1,0), () at the position indicated by the motion information of the first call block. 0, -1), (0,1), (-1, -1), (-1,1), (1, -1), (1,1), etc. where 1/4 pixel unit is 1 Motion information indicating the moved position as much as.) Can be used as the final L1 temporal motion information of the current block. As another example, the encoder and decoder are 1/2 pixel size in the vertical and / or horizontal direction at the position indicated by the motion information of the first call block (for example, (-2,0), (2,0), ( 0, -2), (0,2), (-2, -2), (-2,2), (2, -2), (2,2), etc. where 1/4 pixel unit is 1 Motion information indicating the moved position as much as.) Can be used as the final L1 temporal motion information of the current block. As another example, the encoder and decoder are integer pixel sizes (for example, (-4,0), (4,0), (0) in the vertical and / or horizontal direction at the position indicated by the motion information of the first call block. , -4), (0,4), (-4, -4), (-4,4), (4, -4), (4,4), etc. where 1/4 pixel units is 1 If applicable, motion information indicating the moved position may be used as the final L1 temporal motion information of the current block. Meanwhile, since the motion vector includes a vertical component and a horizontal component, the above-described methods (moving by 1/4 pixel size, shifting by 1/2 pixel size, shifting by integer pixel size) include horizontal component and vertical direction. It may be applied independently to each component. At this time, the horizontal movement distance and the vertical movement distance may be different.

다른 실시예로, 부호화기 및 복호화기는 제1 콜 블록의 움직임 정보(움직임 벡터) 값을 다른 픽셀 단위의 값으로 변경한 후 변경된 값을 현재 블록의 최종 L1 시간적 움직임 정보(L1 움직임 벡터)로 사용할 수 있다. 일례로, 제1 콜 블록의 움직임 정보 값이 1/4 픽셀 단위의 값인 경우, 부호화기 및 복호화기는 쉬프트 연산 등을 기반으로 상기 제1 콜 블록의 움직임 정보 값을 1/2 픽셀 단위의 값으로 변경할 수 있고, 상기 변경된 값을 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다. 다른 예로, 제1 콜 블록의 움직임 정보 값이 1/2 픽셀 단위의 값인 경우, 부호화기 및 복호화기는 쉬프트 연산 등을 기반으로 상기 제1 콜 블록의 움직임 정보 값을 정수 픽셀 단위의 값으로 변경할 수 있고, 상기 변경된 값을 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다.In another embodiment, the encoder and decoder may change the value of motion information (motion vector) of the first call block to a value of another pixel, and then use the changed value as the final L1 temporal motion information (L1 motion vector) of the current block. have. For example, when the motion information value of the first call block is a value of 1/4 pixel unit, the encoder and decoder change the motion information value of the first call block to a value of 1/2 pixel unit based on a shift operation or the like. In addition, the changed value may be used as the final L1 temporal motion information of the current block. As another example, when the motion information value of the first call block is a value of 1/2 pixel unit, the encoder and decoder may change the motion information value of the first call block to an integer pixel value based on a shift operation or the like. , The changed value may be used as the final L1 temporal motion information of the current block.

제1 콜 블록의 움직임 정보(예를 들어, 움직임 벡터)를 기반으로 현재 블록의 L1 입력 시간적 움직임 정보(예를 들어, L1 입력 움직임 벡터)를 재설정하는 방법은 상술한 실시예에 한정되지 않으며, 구현 및/또는 필요에 따라 다양한 형태로 적용될 수 있다. 또한, 상술한 실시예에 따른 방법들은 도 9의 S940 단계에서와 같이 제2 콜 블록의 움직임 정보를 기반으로 L1 입력 시간적 움직임 정보를 재설정하는 경우에도 동일하거나 유사한 방식으로 적용될 수 있다.The method of resetting the L1 input temporal motion information (eg, L1 input motion vector) of the current block based on the motion information (eg, motion vector) of the first call block is not limited to the above-described embodiment, It may be applied in various forms depending on implementation and / or needs. In addition, the methods according to the above-described embodiment may be applied in the same or similar manner when resetting the L1 input temporal motion information based on the motion information of the second call block as in step S940 of FIG. 9.

한편, 상술한 실시예에서 S910 단계로 입력되는 입력 시간적 움직임 정보는 입력 움직임 벡터뿐만 아니라 입력 참조 픽쳐 인덱스도 포함할 수 있다. 여기서, L0 입력 움직임 벡터 및 L1 입력 움직임 벡터는 상술한 바와 같이 제1 콜 블록을 기반으로 시간적으로 도출된 움직임 벡터일 수 있고, L0 입력 참조 픽쳐 인덱스 및 L1 입력 참조 픽쳐 인덱스는 복원된 주변 블록으로부터 공간적으로 도출된 참조 픽쳐 인덱스일 수 있다. 이 때, L0 입력 참조 픽쳐 인덱스 및 L1 입력 참조 픽쳐 인덱스는, 복원된 주변 블록의 참조 픽쳐 인덱스 중에서 음수가 아닌 가장 작은 값으로 설정될 수 있다. 한편, 다른 예로 L0 입력 참조 픽쳐 인덱스 및 L1 입력 참조 픽쳐 인덱스는 복원된 주변 블록의 움직임 정보에 관계 없이 0으로 설정될 수도 있다.Meanwhile, in the above-described embodiment, the input temporal motion information input in step S910 may include not only an input motion vector, but also an input reference picture index. Here, the L0 input motion vector and the L1 input motion vector may be motion vectors derived temporally based on the first call block as described above, and the L0 input reference picture index and the L1 input reference picture index are from the reconstructed neighboring block. It may be a spatially derived reference picture index. At this time, the L0 input reference picture index and the L1 input reference picture index may be set to the smallest non-negative value among the reference picture indexes of the reconstructed neighboring blocks. Meanwhile, as another example, the L0 input reference picture index and the L1 input reference picture index may be set to 0 regardless of motion information of the reconstructed neighboring block.

L1 입력 움직임 벡터가 제2 콜 블록을 기반으로 재설정되는 경우, L1 입력 참조 픽쳐 인덱스에 대해서도 재설정 과정이 수행될 수 있다. 이하, L1 입력 참조 픽쳐 인덱스에 대한 재설정 과정의 실시예들이 서술된다.When the L1 input motion vector is reset based on the second call block, a reset process may also be performed on the L1 input reference picture index. Hereinafter, embodiments of the reset process for the L1 input reference picture index will be described.

일 실시예로, 부호화기 및 복호화기는 제2 콜 블록을 기반으로 L1 입력 참조 픽쳐 인덱스를 재설정할 수 있다. 상술한 바와 같이, 부호화기 및 복호화기는 제2 콜 블록의 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스를 상기 제2 콜 블록의 참조 픽쳐 인덱스로 재설정함으로써 최종 L1 참조 픽쳐 인덱스를 도출할 수 있다. 다른 실시예로, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스 값을 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정함으로써 최종 L1 참조 픽쳐 인덱스를 도출할 수도 있다.In an embodiment, the encoder and decoder may reset the L1 input reference picture index based on the second call block. As described above, the encoder and decoder can use the motion information of the second call block as the final L1 temporal motion information of the current block. At this time, the encoder and the decoder may derive the final L1 reference picture index by resetting the L1 input reference picture index to the reference picture index of the second call block. In another embodiment, the encoder and decoder may derive the final L1 reference picture index by resetting the L1 input reference picture index value to a predetermined fixed reference picture index value.

또 다른 실시예로, L0 입력 시간적 움직임 정보(예를 들어, L0 입력 움직임 벡터, L0 입력 참조 픽쳐 인덱스 등) 와 L1 입력 시간적 움직임 정보(예를 들어, L1 입력 움직임 벡터, L1 입력 참조 픽쳐 인덱스 등)가 동일한 경우, 부호화기 및 복호화기는 L0 입력 참조 픽쳐 인덱스 및 L1 입력 참조 픽쳐 인덱스를 모두 0의 값으로 재설정하여 최종 시간적 움직임 정보로 사용할 수도 있다. 이는, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, L0 참조 픽쳐 인덱스 및 L1 참조 픽쳐 인덱스가 모두 0일 확률이 높기 때문이다.In another embodiment, L0 input temporal motion information (eg, L0 input motion vector, L0 input reference picture index, etc.) and L1 input temporal motion information (eg, L1 input motion vector, L1 input reference picture index, etc.) ) Is the same, the encoder and decoder may reset the L0 input reference picture index and the L1 input reference picture index to values of 0 and use the final temporal motion information. This is because when the L0 input temporal motion information and the L1 input temporal motion information are the same, the probability that both the L0 reference picture index and the L1 reference picture index are 0 is high.

또 다른 실시예로, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스 값을 L0 입력 참조 픽쳐 인덱스 값과 동일한 값으로 재설정할 수 있다. 반면, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스 값을 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스 값으로 재설정할 수도 있다. 복원된 주변 블록이 갖는 참조 픽쳐 인덱스 중에는 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스가 존재할 수 있다. 이 때, 예를 들어 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스의 재설정을 위해, 상기 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스 중에서 가장 자주 사용된 참조 픽쳐 인덱스를 사용할 수 있다. 다른 예로, 이 때 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스의 재설정을 위해, 상기 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스 중에서 음수가 아닌 가장 작은 값을 갖는 참조 픽쳐 인덱스를 사용할 수도 있다.In another embodiment, the encoder and decoder may reset the L1 input reference picture index value to the same value as the L0 input reference picture index value. On the other hand, the encoder and decoder may reset the L1 input reference picture index value to a reference picture index value that is not the same as the L0 input reference picture index. Among the reference picture indices of the reconstructed neighboring block, a reference picture index that is not the same as the L0 input reference picture index may exist. At this time, for example, the encoder and the decoder may use the most frequently used reference picture index among reference picture indices that are not the same as the L0 input reference picture index, for resetting the L1 input reference picture index. As another example, in this case, the encoder and decoder may use a reference picture index having the smallest non-negative value among reference picture indices that are not the same as the L0 input reference picture index, for resetting the L1 input reference picture index.

한편, 상술한 바와 같이 부호화기 및 복호화기는 L1 입력 움직임 벡터 값을 제2 콜 블록의 움직임 벡터와 동일한 값으로 재설정함으로써 최종 L1 시간적 움직임 벡터를 도출할 수 있다. 이 때, 상기 제2 콜 블록의 움직임 벡터는 L1 입력 참조 픽쳐 인덱스 및/또는 재설정된 L1 참조 픽쳐 인덱스에 따라 스케일링되어 사용될 수도 있다. L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 참조 픽쳐 인덱스로 사용될 수도 있고, 상술한 실시예에서와 같이 재설정 과정을 거쳐 최종 L1 참조 픽쳐 인덱스로 사용될 수도 있다. 이 때, 제2 콜 블록의 움직임 벡터에 대응하는 참조 픽쳐, 및 최종 L1 참조 픽쳐 인덱스가 지시하는 참조 픽쳐는 서로 다를 수 있다. 이 경우, 부호화기 및 복호화기는 제2 콜 블록의 움직임 벡터에 대한 스케일링을 수행하고 상기 스케일링된 움직임 벡터를 현재 블록의 최종 L1 시간적 움직임 벡터로 사용할 수 있다.Meanwhile, as described above, the encoder and decoder can derive the final L1 temporal motion vector by resetting the L1 input motion vector value to the same value as the motion vector of the second call block. At this time, the motion vector of the second call block may be scaled and used according to the L1 input reference picture index and / or the reset L1 reference picture index. The L1 input reference picture index may be used as a final L1 reference picture index without a reset process, or may be used as a final L1 reference picture index through a reset process as in the above-described embodiment. At this time, the reference picture corresponding to the motion vector of the second call block and the reference picture indicated by the final L1 reference picture index may be different. In this case, the encoder and decoder may perform scaling on the motion vector of the second call block and use the scaled motion vector as the final L1 temporal motion vector of the current block.

상술한 실시예들은 움직임 벡터의 재설정 과정 및 참조 픽쳐 인덱스(예를 들어, RefIdxLX, X=0,1)의 재설정 과정에 따라 다양한 방법으로 조합되어 적용될 수 있다. 이하, 후술되는 실시예들에서 L1 입력 움직임 벡터는 제2 콜 블록을 기반으로 재설정된다고 가정한다. 즉, 부호화기 및 복호화기는 L1 입력 움직임 벡터를 제2 콜 블록의 움직임 벡터 중에서 하나의 값으로 재설정한다고 가정한다.The above-described embodiments may be combined and applied in various ways according to a process of resetting a motion vector and a process of resetting a reference picture index (eg, RefIdxLX, X = 0,1). Hereinafter, in embodiments described below, it is assumed that the L1 input motion vector is reset based on the second call block. That is, it is assumed that the encoder and decoder reset the L1 input motion vector to one of the motion vectors of the second call block.

일 실시예로, 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보 도출에 사용된 제1 콜 픽쳐를 그대로 제2 콜 픽쳐로 사용할 수 있고, 제2 콜 블록은 상기 제2 콜 픽쳐에서 도출될 수 있다. 이 때, 부호화기 및 복호화기는 L1 입력 움직임 벡터의 재설정을 위해, 상기 제2 콜 블록의 움직임 벡터를 스케일링하여 사용할 수 있다. 이 경우, 상기 스케일링된 움직임 벡터가 최종 L1 시간적 움직임 정보로 사용될 수 있다. 이 때, 일례로 L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 시간적 움직임 정보로 사용될 수 있다. 즉, 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보에 L1 입력 참조 픽쳐 인덱스를 그대로 할당할 수 있다. 또 다른 예로, L1 입력 참조 픽쳐 인덱스 값은 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정될 수도 있다. 즉, 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보에 소정의 고정된 참조 픽쳐 인덱스 값을 할당할 수 있으며, 상기 소정의 고정된 참조 픽쳐 인덱스가 최종 L1 시간적 움직임 정보로 사용될 수 있다.In an embodiment, the encoder and decoder may use the first call picture used for deriving the L0 input temporal motion information as it is as the second call picture, and the second call block may be derived from the second call picture. At this time, the encoder and the decoder may use the motion vector of the second call block by scaling to reset the L1 input motion vector. In this case, the scaled motion vector may be used as the final L1 temporal motion information. At this time, as an example, the L1 input reference picture index may be used as the final L1 temporal motion information without a reset process. That is, the encoder and the decoder may allocate the L1 input reference picture index as it is to the L1 temporal motion information of the current block. As another example, the L1 input reference picture index value may be reset to a predetermined fixed reference picture index value. That is, the encoder and the decoder may allocate a predetermined fixed reference picture index value to the L1 temporal motion information of the current block, and the predetermined fixed reference picture index may be used as the final L1 temporal motion information.

다른 실시예로, 부호화기 및 복호화기는 상술한 실시예에서와 같이 L0 입력 시간적 움직임 정보 도출에 사용된 제1 콜 픽쳐를 그대로 제2 콜 픽쳐로 사용할 수 있고, 제2 콜 블록은 상기 제2 콜 픽쳐에서 도출될 수 있다. 이 때, 부호화기 및 복호화기는 L1 입력 움직임 벡터의 재설정을 위해, 제2 콜 블록의 움직임 벡터 중에서 L0 입력 움직임 벡터와 동일하지 않으면서 L0 입력 움직임 벡터와의 차이가 소정의 임계값 이하인 움직임 벡터를 도출할 수 있다. 부호화기 및 복호화기는 상기 도출된 움직임 벡터에 대한 스케일링을 수행할 수 있으며, 스케일링된 움직임 벡터는 최종 L1 시간적 움직임 정보로 사용될 수 있다. 이 때, 일례로 L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 시간적 움직임 정보로 사용될 수 있다. 즉, 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보에 L1 입력 참조 픽쳐 인덱스를 그대로 할당할 수 있다. 또 다른 예로, L1 입력 참조 픽쳐 인덱스 값은 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정될 수도 있다. 즉, 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보에 소정의 고정된 참조 픽쳐 인덱스 값을 할당할 수 있으며, 상기 소정의 고정된 참조 픽쳐 인덱스가 최종 L1 시간적 움직임 정보로 사용될 수 있다.In another embodiment, the encoder and decoder may use the first call picture used for deriving the L0 input temporal motion information as it is as the second call picture, and the second call block may be the second call picture as in the above-described embodiment. Can be derived from At this time, the encoder and decoder derive a motion vector in which the difference from the L0 input motion vector is not equal to the L0 input motion vector among the motion vectors of the second call block, in order to reset the L1 input motion vector. can do. The encoder and decoder can perform scaling on the derived motion vector, and the scaled motion vector can be used as the final L1 temporal motion information. At this time, as an example, the L1 input reference picture index may be used as the final L1 temporal motion information without a reset process. That is, the encoder and the decoder may allocate the L1 input reference picture index as it is to the L1 temporal motion information of the current block. As another example, the L1 input reference picture index value may be reset to a predetermined fixed reference picture index value. That is, the encoder and the decoder may allocate a predetermined fixed reference picture index value to the L1 temporal motion information of the current block, and the predetermined fixed reference picture index may be used as the final L1 temporal motion information.

또 다른 실시예로, 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보 도출에 사용된 제1 콜 픽쳐와 동일하지 않은 참조 픽쳐를 제2 콜 픽쳐로 사용할 수도 있다. 여기서, 상기 제2 콜 픽쳐는 일례로 제1 콜 픽쳐와 동일하지 않은 L1 참조 픽쳐 리스트 내의 참조 픽쳐 중에서 가장 최근에 복호화된 참조 픽쳐일 수 있다. 다른 예로, 부호화기 및 복호화기는 복원된 주변 블록의 참조 픽쳐 번호를 기반으로 가장 사용 빈도가 높은 참조 픽쳐를 제2 콜 픽쳐로 선택할 수도 있다. 제2 콜 블록은 상기 제2 콜 픽쳐에서 도출될 수 있으며, 이 때 부호화기 및 복호화기는 L1 입력 움직임 벡터의 재설정을 위해, 상기 제2 콜 블록의 움직임 벡터를 스케일링하여 사용할 수 있다. 이 경우, 상기 스케일링된 움직임 벡터가 최종 L1 시간적 움직임 정보로 사용될 수 있다. 이 때, 일례로 L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 시간적 움직임 정보로 사용될 수 있다. 즉, 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보에 L1 입력 참조 픽쳐 인덱스를 그대로 할당할 수 있다. 또 다른 예로, L1 입력 참조 픽쳐 인덱스 값은 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정될 수도 있다. 즉, 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보에 소정의 고정된 참조 픽쳐 인덱스 값을 할당할 수 있으며, 상기 소정의 고정된 참조 픽쳐 인덱스가 최종 L1 시간적 움직임 정보로 사용될 수 있다.In another embodiment, the encoder and decoder may use a reference picture that is not the same as the first call picture used to derive the L0 input temporal motion information as the second call picture. Here, the second call picture may be, for example, the most recently decoded reference picture among the reference pictures in the L1 reference picture list that is not the same as the first call picture. As another example, the encoder and the decoder may select the reference picture with the most frequent use as the second call picture based on the reference picture number of the reconstructed neighboring block. The second call block may be derived from the second call picture. In this case, the encoder and decoder may use the motion vector of the second call block by scaling to reset the L1 input motion vector. In this case, the scaled motion vector may be used as the final L1 temporal motion information. At this time, as an example, the L1 input reference picture index may be used as the final L1 temporal motion information without a reset process. That is, the encoder and the decoder may allocate the L1 input reference picture index as it is to the L1 temporal motion information of the current block. As another example, the L1 input reference picture index value may be reset to a predetermined fixed reference picture index value. That is, the encoder and the decoder may allocate a predetermined fixed reference picture index value to the L1 temporal motion information of the current block, and the predetermined fixed reference picture index may be used as the final L1 temporal motion information.

또 다른 실시예로, 부호화기 및 복호화기는 상술한 실시예에서와 같이 L0 입력 시간적 움직임 정보 도출에 사용된 제1 콜 픽쳐와 동일하지 않은 참조 픽쳐를 제2 콜 픽쳐로 사용할 수 있으며, 제2 콜 블록은 상기 제2 콜 픽쳐에서 도출될 수 있다. 여기서, 상기 제2 콜 픽쳐는 일례로 제1 콜 픽쳐와 동일하지 않은 L1 참조 픽쳐 리스트 내의 참조 픽쳐 중에서 가장 최근에 복호화된 참조 픽쳐일 수 있다. 다른 예로, 부호화기 및 복호화기는 복원된 주변 블록의 참조 픽쳐 번호를 기반으로 가장 사용 빈도가 높은 참조 픽쳐를 제2 콜 픽쳐로 선택할 수도 있다. 이 때, 부호화기 및 복호화기는 L1 입력 움직임 벡터의 재설정을 위해, 제2 콜 블록의 움직임 벡터 중에서 L0 입력 움직임 벡터와 동일하지 않으면서 L0 입력 움직임 벡터와의 차이가 소정의 임계값 이하인 움직임 벡터를 도출할 수 있다. 부호화기 및 복호화기는 상기 도출된 움직임 벡터에 대한 스케일링을 수행할 수 있으며, 스케일링된 움직임 벡터는 최종 L1 시간적 움직임 정보로 사용될 수 있다. 이 때, 일례로 L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 시간적 움직임 정보로 사용될 수 있다. 즉, 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보에 L1 입력 참조 픽쳐 인덱스를 그대로 할당할 수 있다. 또 다른 예로, L1 입력 참조 픽쳐 인덱스 값은 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정될 수도 있다. 즉, 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보에 소정의 고정된 참조 픽쳐 인덱스 값을 할당할 수 있으며, 상기 소정의 고정된 참조 픽쳐 인덱스가 최종 L1 시간적 움직임 정보로 사용될 수 있다.In another embodiment, the encoder and the decoder may use a reference picture that is not the same as the first call picture used for deriving the L0 input temporal motion information as the second call picture, as in the above-described embodiment, and the second call block Can be derived from the second call picture. Here, the second call picture may be, for example, the most recently decoded reference picture among the reference pictures in the L1 reference picture list that is not the same as the first call picture. As another example, the encoder and the decoder may select the reference picture with the most frequent use as the second call picture based on the reference picture number of the reconstructed neighboring block. At this time, the encoder and decoder derive a motion vector in which the difference from the L0 input motion vector is not equal to the L0 input motion vector among the motion vectors of the second call block, in order to reset the L1 input motion vector. can do. The encoder and decoder can perform scaling on the derived motion vector, and the scaled motion vector can be used as the final L1 temporal motion information. At this time, as an example, the L1 input reference picture index may be used as the final L1 temporal motion information without a reset process. That is, the encoder and the decoder may allocate the L1 input reference picture index as it is to the L1 temporal motion information of the current block. As another example, the L1 input reference picture index value may be reset to a predetermined fixed reference picture index value. That is, the encoder and the decoder may allocate a predetermined fixed reference picture index value to the L1 temporal motion information of the current block, and the predetermined fixed reference picture index may be used as the final L1 temporal motion information.

움직임 벡터의 재설정 과정 및 참조 픽쳐 인덱스의 재설정 과정의 실시예들의 조합은 상술한 실시예에 한정되는 것이 아니며, 구현 및/또는 필요에 따라 상술한 실시예들 뿐만 아니라 다양한 형태의 조합이 제공될 수 있다.The combination of the embodiments of the process of resetting the motion vector and the process of resetting the reference picture index is not limited to the above-described embodiment, and combinations of various forms as well as the above-described embodiments may be provided according to implementation and / or needs. have.

한편, 재설정된 L1 시간적 움직임 정보는 현재 블록의 L0 시간적 움직임 정보와 동일할 수 있다. 따라서, 재설정된 L1 시간적 움직임 정보가 현재 블록의 L0 시간적 움직임 정보와 동일한 경우, 부호화기 및 복호화기는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수도 있다. 이 때, 부호화기 및 복호화기는 L0 시간적 움직임 정보만을 현재 블록의 시간적 움직임 정보로 사용할 수 있다. 이러한 방법은 상술한 실시예들과 결합된 조합으로서 본 발명에 적용될 수도 있다.Meanwhile, the reset L1 temporal motion information may be the same as the L0 temporal motion information of the current block. Accordingly, when the reset L1 temporal motion information is the same as the L0 temporal motion information of the current block, the encoder and decoder may re-set the prediction direction information of the current block as unidirectional prediction. At this time, the encoder and the decoder may use only L0 temporal motion information as temporal motion information of the current block. Such a method may be applied to the present invention in combination with the above-described embodiments.

도 10은 L1 시간적 움직임 정보의 재설정을 위해 사용되는 제2 콜 블록의 실시예를 개략적으로 나타내는 도면이다. 10 is a diagram schematically showing an embodiment of a second call block used for resetting L1 temporal motion information.

부호화기 및 복호화기는 제2 콜 픽쳐 내에서 현재 블록과 공간적으로 동일한 위치에 존재하는 동일 위치 블록을 기준으로 제2 콜 블록을 결정할 수 있다. 도 10에서 블록 1010은 현재 블록을 나타내고, 블록 1020은 제2 콜 픽쳐 내의 동일 위치 블록을 나타낸다. 여기서, 상기 제2 콜 픽쳐는 다양한 방식으로 결정될 수 있다.The encoder and decoder may determine the second call block based on the same location block that is spatially identical to the current block in the second call picture. In FIG. 10, block 1010 represents a current block, and block 1020 represents a co-located block in a second call picture. Here, the second call picture may be determined in various ways.

일 실시예로, 부호화기 및 복호화기는 L0 참조 픽쳐 리스트에 포함된 참조 픽쳐 중에서 하나의 참조 픽쳐를 제2 콜 픽쳐로 결정할 수 있다. 일례로, 부호화기 및 복호화기는 L0 참조 픽쳐 리스트 내의 첫 번째 참조 픽쳐를 제2 콜 픽쳐로 결정할 수 있다. 다른 예로, 부호화기 및 복호화기는 L0 참조 픽쳐 리스트 내의 두 번째 참조 픽쳐를 제2 콜 픽쳐로 결정할 수 있다. 또 다른 예로, 부호화기 및 복호화기는 L0 참조 픽쳐 리스트 내의 세 번째 참조 픽쳐를 제2 콜 픽쳐로 결정할 수 있다. 또 다른 예로, 부호화기 및 복호화기는 L0 참조 픽쳐 리스트 내의 네 번째 참조 픽쳐를 제2 콜 픽쳐로 결정할 수도 있다.In an embodiment, the encoder and decoder may determine one reference picture from the reference pictures included in the L0 reference picture list as the second call picture. As an example, the encoder and decoder may determine the first reference picture in the L0 reference picture list as the second call picture. As another example, the encoder and decoder may determine the second reference picture in the L0 reference picture list as the second call picture. As another example, the encoder and decoder may determine the third reference picture in the L0 reference picture list as the second call picture. As another example, the encoder and decoder may determine the fourth reference picture in the L0 reference picture list as the second call picture.

다른 실시예로, 부호화기 및 복호화기는 L1 참조 픽쳐 리스트에 포함된 참조 픽쳐 중에서 하나의 참조 픽쳐를 제2 콜 픽쳐로 결정할 수 있다. 일례로, 부호화기 및 복호화기는 L1 참조 픽쳐 리스트 내의 첫 번째 참조 픽쳐를 제2 콜 픽쳐로 결정할 수 있다. 다른 예로, 부호화기 및 복호화기는 L1 참조 픽쳐 리스트 내의 두 번째 참조 픽쳐를 제2 콜 픽쳐로 결정할 수 있다. 또 다른 예로, 부호화기 및 복호화기는 L1 참조 픽쳐 리스트 내의 세 번째 참조 픽쳐를 제2 콜 픽쳐로 결정할 수 있다. 또 다른 예로, 부호화기 및 복호화기는 L1 참조 픽쳐 리스트 내의 네 번째 참조 픽쳐를 제2 콜 픽쳐로 결정할 수도 있다.In another embodiment, the encoder and decoder may determine one reference picture from the reference picture included in the L1 reference picture list as the second call picture. As an example, the encoder and decoder may determine the first reference picture in the L1 reference picture list as the second call picture. As another example, the encoder and decoder may determine the second reference picture in the L1 reference picture list as the second call picture. As another example, the encoder and decoder may determine the third reference picture in the L1 reference picture list as the second call picture. As another example, the encoder and decoder may determine the fourth reference picture in the L1 reference picture list as the second call picture.

또 다른 실시예로, 부호화기 및/또는 복호화기는 L0 참조 픽쳐 리스트 및 L1 참조 픽쳐 리스트 내의 모든 참조 픽쳐(및/또는 소정의 조건에 따라 결정된 일부 참조 픽쳐) 중에서 가장 높은 부호화 효율을 제공하는 참조 픽쳐를 제2 콜 픽쳐로 사용할 수 있다. 여기서, 부호화 효율은 각 참조 픽쳐 내에서 제2 콜 블록에 대응되는 위치에 존재하는 블록의 움직임 정보를 기반으로 결정될 수 있다. 이 때, 부호화기는 부호화 효율에 기반하여 제2 콜 픽쳐를 도출할 수 있고, 상기 제2 콜 픽쳐를 지시하는 제2 콜 픽쳐 정보를 복호화기로 전송할 수 있다. 복호화기는 상기 전송된 제2 콜 픽쳐 정보를 기반으로 제2 콜 픽쳐를 결정할 수 있다.In another embodiment, the encoder and / or decoder provides a reference picture that provides the highest encoding efficiency among the L0 reference picture list and all reference pictures in the L1 reference picture list (and / or some reference pictures determined according to predetermined conditions). It can be used as a second call picture. Here, the encoding efficiency may be determined based on motion information of a block existing at a position corresponding to a second call block in each reference picture. At this time, the encoder may derive a second call picture based on encoding efficiency, and may transmit second call picture information indicating the second call picture to the decoder. The decoder may determine a second call picture based on the transmitted second call picture information.

상술한 실시예들에서, 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보 도출에 사용된 제1 콜 픽쳐와 동일하지 않은 참조 픽쳐만을 제2 콜 픽쳐로 결정할 수도 있다. 이러한 경우에는 제1 콜 픽쳐와 동일하지 않은 참조 픽쳐만이 현재 블록의 최종 L1 시간적 움직임 정보 도출에 사용될 수 있다.In the above-described embodiments, the encoder and the decoder may determine only the reference picture that is not the same as the first call picture used to derive the L0 input temporal motion information as the second call picture. In this case, only the reference picture that is not the same as the first call picture can be used to derive the final L1 temporal motion information of the current block.

제2 콜 픽쳐 결정 방법은 상술한 실시예에 한정되는 것은 아니며, 제2 콜 픽쳐는 구현 및/또는 필요에 따라 다른 방식으로 결정될 수도 있다. The method for determining the second call picture is not limited to the above-described embodiment, and the second call picture may be determined in other ways depending on implementation and / or needs.

한편, 도 10의 실시예에서, 동일 위치 블록(1020) 내부의 센터에 위치한 블록은 블록 D, 동위 위치 블록(1020) 내부의 좌측 상단 코너에 위치한 블록은 블록 S, 동일 위치 블록(1020) 내부의 좌측 하단 코너에 위치한 블록은 블록 Q, 동일 위치 블록(1020) 내부의 우측 상단 코너에 위치한 블록은 블록 R, 동일 위치 블록(1020) 내부의 우측 하단 코너에 위치한 블록은 블록 C라 한다. 또한, 동일 위치 블록(1020)의 좌측에 인접한 블록 중에서 가장 상단에 위치한 블록은 블록 F, 동일 위치 블록(1020)의 좌측에 인접한 블록 중에서 가장 하단에 위치한 블록은 블록 J, 동일 위치 블록(1020)의 상단에 인접한 블록 중에서 가장 좌측에 위치한 블록은 블록 G, 동일 위치 블록(1020)의 상단에 인접한 블록 중에서 가장 우측에 위치한 블록은 블록 M, 동일 위치 블록(1020)의 우측에 인접한 블록 중에서 가장 상단에 위치한 블록은 블록 N, 동일 위치 블록(1020)의 우측에 인접한 블록 중에서 가장 하단에 위치한 블록은 블록 B, 동일 위치 블록(1020)의 하단에 인접한 블록 중에서 가장 좌측에 위치한 블록은 블록 K, 동일 위치 블록(1020)의 하단에 인접한 블록 중에서 가장 우측에 위치한 블록은 블록 A라 한다. 또한, 동일 위치 블록(1020) 외부의 좌측 상단 코너에 위치한 블록은 블록 E, 동일 위치 블록(1020) 외부의 좌측 하단 코너에 위치한 블록은 블록 I, 동일 위치 블록(1020) 외부의 우측 상단 코너에 위치한 블록은 블록 L, 동일 위치 블록(1020) 외부의 우측 하단 코너에 위치한 블록은 블록 H라 한다. 또한, 블록 B의 우측에 인접하여 위치한 블록은 블록 P, 블록 A의 하단에 인접하여 위치한 블록은 블록 O라 한다.On the other hand, in the embodiment of FIG. 10, the block located at the center inside the co-located block 1020 is block D, the block located at the upper left corner inside the co-located block 1020 is block S, the co-located block 1020 is The block located in the lower left corner of the block is referred to as block Q, the block located in the upper right corner inside the same position block 1020 is block R, and the block located in the lower right corner inside the same position block 1020 is called block C. In addition, among the blocks adjacent to the left of the co-located block 1020, the block located at the top of the block is F, and the blocks located at the bottom of the blocks adjacent to the left of the co-located block 1020 are the block J and the block of the co-located block 1020. The block located at the left of the blocks adjacent to the top of the block is G, and the block located at the right of the blocks adjacent to the top of the co-located block 1020 is the block M, the block of the block adjacent to the right of the block 1020 is the top The block located at block N, the block located at the bottom of the blocks adjacent to the right side of the co-located block 1020 is the block B, and the block located at the left of blocks adjacent to the bottom of the co-located block 1020 is the block K, the same Among blocks adjacent to the bottom of the location block 1020, a block located on the rightmost side is referred to as block A. In addition, the block located in the upper left corner outside the co-located block 1020 is in block E, the block located in the lower left corner outside the co-located block 1020 is in block I, the upper right corner outside the co-located block 1020. The block located is called block L, and the block located in the lower right corner outside the same position block 1020 is called block H. In addition, a block located adjacent to the right side of block B is called block P, and a block located adjacent to the bottom of block A is called block O.

도 9의 실시예에서 상술한 바와 같이, 부호화기 및 복호화기는 소정의 조건에 따라 제2 콜 블록의 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다. 즉, 부호화기 및 복호화기는 L1 입력 시간적 움직임 정보 값을 제2 콜 블록의 움직임 정보 값으로 재설정할 수 있다. 이 때, 상기 제2 콜 블록 및/또는 최종 L1 시간적 움직임 정보로 사용되는 움직임 다양한 방법으로 도출될 수 있다.As described above in the embodiment of FIG. 9, the encoder and decoder may use motion information of the second call block as final L1 temporal motion information of the current block according to a predetermined condition. That is, the encoder and decoder may reset the L1 input temporal motion information value to the motion information value of the second call block. In this case, the second call block and / or the motion used as the final L1 temporal motion information may be derived in various ways.

일 실시예로, 부호화기 및 복호화기는 동일 위치 블록의 내부 및/또는 외부에 위치한 블록 중에서 동일 위치 블록을 기준으로 소정의 위치에 존재하는 한 개의 블록으로부터 최종 L1 시간적 움직임 정보로 사용되는 움직임 정보를 도출할 수 있다. 이 때, 상기 소정의 위치에 존재하는 한 개의 블록은 제2 콜 블록에 해당될 수 있다. 여기서, 상기 소정의 위치의 블록은 블록 A, 블록 B, 블록C, 블록D, 블록E, 블록F, 블록G, 블록H, 블록I, 블록J, 블록K, 블록L, 블록M, 블록N, 블록O, 블록P, 블록Q, 블록R 또는 블록S 일 수 있다.In an embodiment, the encoder and decoder derive motion information used as the final L1 temporal motion information from one block existing in a predetermined position based on the same position block among blocks located inside and / or outside the same position block. can do. At this time, one block existing in the predetermined position may correspond to the second call block. Here, the block at the predetermined position is block A, block B, block C, block D, block E, block F, block G, block H, block I, block J, block K, block L, block M, block N , Block O, Block P, Block Q, Block R, or Block S.

다른 실시예로, 부호화기 및 복호화기는 동일 위치 블록의 내부 및/또는 외부에 위치한 블록 중에서 소정의 위치에 존재하는 복수 개의 블록을 소정의 순서로 스캔할 수 있다. 이 때, 부호화기 및 복호화기는 스캔 순서상 움직임 정보가 존재하는 첫 번째 블록의 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다. 여기서, 상기 움직임 정보가 존재하는 첫 번째 블록은 제2 콜 블록에 해당될 수 있다. 스캔 대상 블록 및 스캔 순서는 다양한 형태로 정해질 수 있다. 일례로, 부호화기 및 복호화기는 블록 H, 블록 D, 블록 A, 블록 B, 블록 C, 블록 I, 블록 J, 블록 F, 블록 G 및 블록 E 순으로 블록을 스캔할 수 있다.In another embodiment, the encoder and decoder may scan a plurality of blocks existing in a predetermined position among blocks located inside and / or outside the same location block in a predetermined order. At this time, the encoder and the decoder may use motion information of the first block in which motion information is present in scan order as final L1 temporal motion information of the current block. Here, the first block in which the motion information exists may correspond to a second call block. The scan target block and scan order may be determined in various forms. For example, the encoder and decoder may scan blocks in the order of block H, block D, block A, block B, block C, block I, block J, block F, block G, and block E.

또 다른 실시예로, 부호화기 및 복호화기는 동일 위치 블록의 내부 및/또는 외부에 위치한 블록 중에서 소정의 위치에 존재하는 복수 개의 블록의 움직임 정보에 대해 중간 값을 도출할 수 있고, 상기 도출된 중간 값을 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다. 예를 들어, 상기 복수 개의 블록은 블록 H, 블록 D, 블록 A, 블록 B, 블록 C, 블록 I, 블록 J, 블록 F, 블록 G 및 블록 E 일 수 있다.In another embodiment, the encoder and the decoder may derive an intermediate value for motion information of a plurality of blocks existing at a predetermined position among blocks located inside and / or outside the same location block, and the derived intermediate value Can be used as the final L1 temporal motion information of the current block. For example, the plurality of blocks may be block H, block D, block A, block B, block C, block I, block J, block F, block G and block E.

제2 콜 블록으로부터 현재 블록의 L1 시간적 움직임 정보를 도출하는 방법은 상술한 실시예에 한정되는 것이 아니며, 현재 블록의 L1 시간적 움직임 정보는 구현 및/또는 필요에 따라 다양한 방법으로 도출될 수 있다.The method for deriving the L1 temporal motion information of the current block from the second call block is not limited to the above-described embodiment, and the L1 temporal motion information of the current block can be derived in various ways according to implementation and / or needs.

도 11은 도 9의 실시예에 따른 시간적 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다. 도 11의 실시예에 따른 인터 예측 장치는 시간적 움직임 정보 판단부(1110), 제2 콜 블록 움직임 정보 판단부(1120), 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(1130) 및 L1 시간적 움직임 정보 재설정부(1140)를 포함할 수 있다.11 is a block diagram schematically showing an embodiment of an inter prediction apparatus capable of performing a process of deriving temporal motion information according to the embodiment of FIG. 9. The inter prediction apparatus according to the embodiment of FIG. 11 includes a temporal motion information determination unit 1110, a second call block motion information determination unit 1120, a prediction direction information reset and L0 motion information setting unit 1130, and L1 temporal motion information A reset unit 1140 may be included.

도 11을 참조하면, 시간적 움직임 정보 판단부(1110)는 입력 시간적 움직임 정보에서 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한지 여부, 즉 L0 입력 참조 픽쳐 번호와 L1 입력 참조 픽쳐 번호가 동일하고 L0 입력 움직임 벡터와 L1 입력 움직임 벡터가 동일한지 여부를 판단할 수 있다. Referring to FIG. 11, the temporal motion information determination unit 1110 determines whether the L0 input temporal motion information and the L1 input temporal motion information in the input temporal motion information are the same, that is, the L0 input reference picture number and the L1 input reference picture number are the same. And it can be determined whether the L0 input motion vector and the L1 input motion vector are the same.

L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일하지 않은 경우, 인터 예측 장치는 입력 시간적 움직임 정보를 그대로 현재 블록의 시간적 움직임 정보로 사용할 수 있다. AMVP가 적용되는 경우, 상기 현재 블록의 시간적 움직임 정보는 현재 블록에 대한 예측 움직임 벡터 후보로 결정되거나 등록될 수 있다. 또한, 머지가 적용되는 경우, 상기 현재 블록의 시간적 움직임 정보는 현재 블록에 대한 머지 후보로 결정되거나 등록될 수 있다. L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우에는 제2 콜 블록 움직임 정보 판단부(1120)에 의한 판단 과정이 수행될 수 있다. When the L0 input temporal motion information and the L1 input temporal motion information are not the same, the inter prediction apparatus may use the input temporal motion information as the temporal motion information of the current block. When AMVP is applied, temporal motion information of the current block may be determined or registered as a prediction motion vector candidate for the current block. Also, when merge is applied, temporal motion information of the current block may be determined or registered as a merge candidate for the current block. When the L0 input temporal motion information and the L1 input temporal motion information are the same, a determination process by the second call block motion information determination unit 1120 may be performed.

한편, 도 9에서 상술한 바와 같이 시간적 움직임 정보 판단부(1110)는 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보의 동일성 여부가 아닌, L0 입력 참조 픽쳐 번호 및 L1 입력 참조 픽쳐 번호의 동일성 여부 또는 제1 콜 블록의 예측 방향을 판단할 수도 있다. 예를 들어, L0 입력 참조 픽쳐 번호 및 L1 입력 참조 픽쳐 번호가 동일하지 않은 경우, 인터 예측 장치는 입력 시간적 움직임 정보를 그대로 현재 블록의 시간적 움직임 정보로 사용할 수 있고, L0 입력 참조 픽쳐 번호 및 L1 입력 참조 픽쳐 번호가 동일한 경우 제2 콜 블록 움직임 정보 판단부(1120)에 의한 판단 과정이 수행될 수 있다. 다른 예로, 제1 콜 블록의 예측 방향이 양방향 예측인 경우, 인터 예측 장치는 입력 시간적 움직임 정보를 그대로 현재 블록의 시간적 움직임 정보로 사용할 수 있고, 제1 콜 블록의 예측 방향이 단방향 예측인 경우 제2 콜 블록 움직임 정보 판단부(1120)에 의한 판단 과정이 수행될 수도 있다.Meanwhile, as described above with reference to FIG. 9, the temporal motion information determination unit 1110 does not determine whether the L0 input temporal motion information and the L1 input temporal motion information are identical, but whether the L0 input reference picture number and the L1 input reference picture number are identical, or The prediction direction of the first call block may be determined. For example, if the L0 input reference picture number and the L1 input reference picture number are not the same, the inter prediction device may use the input temporal motion information as the temporal motion information of the current block, and the L0 input reference picture number and L1 input When the reference picture numbers are the same, the determination process by the second call block motion information determination unit 1120 may be performed. As another example, when the prediction direction of the first call block is bidirectional prediction, the inter prediction device may use input temporal motion information as it is temporal motion information of the current block, and when the prediction direction of the first call block is unidirectional prediction, The determination process by the 2 call block motion information determination unit 1120 may be performed.

제2 콜 블록 움직임 정보 판단부(1120)는 제2 콜 블록의 움직임 정보가 존재하는지 여부를 판단할 수 있다. 제2 콜 블록의 움직임 정보가 존재하지 않는 경우(예를 들어, 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 제2 콜 블록 중에서 움직임 정보를 갖는 블록이 존재하지 않는 경우), 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(1130)에 의한 예측 방향 정보 재설정 및 L0 움직임 정보 설정 과정이 수행될 수 있다. 또한, 제2 콜 블록의 움직임 정보가 존재하는 경우(예를 들어, 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 제2 콜 블록 중에서 움직임 정보를 갖는 블록이 존재하는 경우), L1 시간적 움직임 정보 재설정부(1140)에 의한 재설정 과정이 수행될 수 있다.The second call block motion information determination unit 1120 may determine whether motion information of the second call block exists. When there is no motion information of the second call block (for example, when there is no block having motion information among the second call blocks at a predetermined position and / or a position selected by a predetermined method), prediction direction information The process of resetting the prediction direction information and setting the L0 motion information by the reset and L0 motion information setting unit 1130 may be performed. Further, when the motion information of the second call block exists (for example, when there is a block having motion information among the second call blocks at a predetermined position and / or a position selected by a predetermined method), L1 temporal motion The reset process by the information reset unit 1140 may be performed.

제2 콜 블록의 움직임 정보가 존재하지 않는 경우, 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(1130)는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수 있다. 또한 이 때, 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(1130)는 입력 시간적 움직임 정보 중에서 L0 입력 시간적 움직임 정보만을 현재 블록의 최종 시간적 움직임 정보로 설정할 수 있다.If the motion information of the second call block does not exist, the prediction direction information reset and the L0 motion information setting unit 1130 may set the prediction direction information of the current block back to unidirectional prediction. In addition, at this time, the prediction direction information reset and the L0 motion information setting unit 1130 may set only the L0 input temporal motion information among the input temporal motion information as the final temporal motion information of the current block.

제2 콜 블록의 움직임 정보가 존재하는 경우, L1 시간적 움직임 정보 재설정부(1140)는 현재 블록의 L1 입력 시간적 움직임 정보를 제2 콜 블록의 움직임 정보로 재설정할 수 있다. 즉, 인터 예측 장치는 제2 콜 블록의 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 제2 콜 블록의 움직임 정보가 영 벡터(0,0)를 포함하는 경우, L1 시간적 움직임 정보 재설정부(1140)는 제2 콜 블록의 주변에 위치한 블록의 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수도 있다. 상술한 각각의 방법에 대한 구체적인 실시예는 도 6 및 도 7에서 상술한 바 있으므로, 여기서는 생략하기로 한다.When the motion information of the second call block exists, the L1 temporal motion information reset unit 1140 may reset the L1 input temporal motion information of the current block to the motion information of the second call block. That is, the inter prediction apparatus may use motion information of the second call block as final L1 temporal motion information of the current block. At this time, when the motion information of the second call block includes a zero vector (0,0), the L1 temporal motion information reset unit 1140 determines the motion information of the block located around the second call block as the last of the current block. It can also be used as L1 temporal motion information. Since the specific embodiment of each of the above-described methods has been described in FIGS. 6 and 7, it will be omitted here.

도 12는 본 발명에 따른 현재 블록의 움직임 정보 도출 방법의 실시예를 개략적으로 나타내는 도면이다.12 is a diagram schematically showing an embodiment of a method for deriving motion information of a current block according to the present invention.

상술한 바와 같이, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보 및/또는 콜 블록의 움직임 정보를 기반으로 현재 블록의 움직임 정보를 도출할 수 있다. 여기서, 복원된 주변 블록은 복원된 주변 블록은 이미 부호화 및/또는 복호화되어 복원된 현재 픽쳐 내의 블록으로서, 현재 블록에 인접한 블록 및/또는 현재 블록의 외부 코너에 위치한 블록을 포함할 수 있다. 또한, 콜 블록은 콜 픽쳐 내에서 현재 블록에 대응되는 블록을 의미할 수 있으며, 상기 콜 픽쳐는 일례로 참조 픽쳐 리스트 내의 참조 픽쳐 중에서 하나의 픽쳐에 해당될 수 있다. 이 때, 복원된 주변 블록으로부터 도출되는 움직임 정보는 공간적 움직임 정보, 콜 블록을 기반으로 도출되는 움직임 정보는 시간적 움직임 정보로 불릴 수 있다. 여기서, 공간적 움직임 정보 및 시간적 움직임 정보는 각각 정보는 예측 방향 정보, L0 참조 픽쳐 번호, L1 참조 픽쳐 번호, L0 움직임 벡터 및 L1 움직임 벡터 등을 포함할 수 있다.As described above, the encoder and decoder may derive motion information of a current block based on motion information of a reconstructed neighboring block and / or motion information of a call block. Here, the reconstructed neighboring block is a block in the current picture in which the reconstructed neighboring block is already encoded and / or decoded, and may include a block adjacent to the current block and / or a block located at an outer corner of the current block. Also, a call block may mean a block corresponding to a current block in a call picture, and the call picture may correspond to one picture among reference pictures in a reference picture list, for example. At this time, the motion information derived from the reconstructed neighboring block may be called spatial motion information, and the motion information derived based on the call block may be called temporal motion information. Here, the spatial motion information and the temporal motion information may each include prediction direction information, L0 reference picture number, L1 reference picture number, L0 motion vector, and L1 motion vector.

한편, 영상 복호화 과정에서는 네트워크의 트래픽 과다로 인해, 현재 픽쳐(및/또는 복호화 대상 픽쳐)의 이전 픽쳐들 중에서 복호화되지 않은 픽쳐가 존재할 수 있다. 이 경우, 현재 픽쳐 내의 블록에 대한 시간적 움직임 정보를 도출 과정에서 잘못된 콜 블록이 사용될 수 있고, 정확한 시간적 움직임 정보가 도출되지 않을 수 있으므로 현재 픽쳐가 제대로 복호화되지 않을 수 있다. 따라서, 상기 문제점을 해결하기 위해, 부호화기 및 복호화기는 현재 블록의 움직임 정보를 도출함에 있어, L0 움직임 정보 및 L1 움직임 정보 중에서 하나는 복원된 주변 블록을 기반으로 공간적으로 도출하고 다른 하나는 콜 블록을 기반으로 시간적으로 도출할 수 있다. 즉, 부호화기 및 복호화기는 L0 움직임 정보 및 L1 움직임 정보를 각각 독립적으로 설정할 수 있다. 이 경우, 복호화되지 않은 이전 픽쳐가 존재하는 경우에도 부호화기 및 복호화기는 현재 픽쳐가 어느 정도 복원되도록 할 수 있다.Meanwhile, in the image decoding process, an undecoded picture may exist among previous pictures of a current picture (and / or a decoding target picture) due to excessive traffic of a network. In this case, an incorrect call block may be used in the process of deriving temporal motion information for a block in the current picture, and since accurate temporal motion information may not be derived, the current picture may not be properly decoded. Accordingly, in order to solve the above problem, the encoder and decoder in deriving motion information of the current block, one of the L0 motion information and the L1 motion information is spatially derived based on the reconstructed neighboring block, and the other is a call block. It can be derived based on time. That is, the encoder and the decoder can independently set L0 motion information and L1 motion information, respectively. In this case, even if there is a previous picture that has not been decoded, the encoder and decoder may allow the current picture to be reconstructed to some extent.

도 12를 참조하면, 부호화기 및 복호화기는 L0 움직임 정보를 설정할 수 있다(1210). 이 때, 부호화기 및 복호화기는 복원된 주변 블록을 기반으로 공간적으로 도출된 움직임 정보(공간적 움직임 정보)를 L0 움직임 정보로 사용하거나, 또는 콜 블록을 기반으로 시간적으로 도출된 움직임 정보(시간적 움직임 정보)를 L0 움직임 정보로 사용할 수 있다. 즉, 상기 L0 움직임 정보는 복원된 주변 블록을 기반으로 공간적으로 도출되거나, 또는 콜 블록을 기반으로 시간적으로 도출될 수 있다.Referring to FIG. 12, the encoder and decoder may set L0 motion information (1210). At this time, the encoder and decoder use spatially derived motion information (spatial motion information) based on the reconstructed neighboring block as L0 motion information, or temporally derived motion information (temporal motion information) based on the call block. Can be used as L0 motion information. That is, the L0 motion information may be spatially derived based on the reconstructed neighboring block or temporally based on the call block.

다시 도 12를 참조하면, 부호화기 및 복호화기는 L1 움직임 정보를 설정할 수 있다(1220). 이 때, 부호화기 및 복호화기는 복원된 주변 블록을 기반으로 공간적으로 도출된 움직임 정보(공간적 움직임 정보)를 L1 움직임 정보로 사용하거나, 또는 콜 블록을 기반으로 시간적으로 도출된 움직임 정보(시간적 움직임 정보)를 L1 움직임 정보로 사용할 수 있다. 즉, 상기 L1 움직임 정보는 복원된 주변 블록을 기반으로 공간적으로 도출되거나, 또는 콜 블록을 기반으로 시간적으로 도출될 수 있다.Referring to FIG. 12 again, the encoder and decoder may set L1 motion information (1220). At this time, the encoder and decoder use spatially derived motion information (spatial motion information) based on the reconstructed neighboring blocks as L1 motion information, or temporally derived motion information (temporal motion information) based on the call block. Can be used as L1 motion information. That is, the L1 motion information may be spatially derived based on the reconstructed neighboring block or temporally based on the call block.

일 실시예로, L0 움직임 정보가 콜 블록을 기반으로 시간적으로 도출된 움직임 정보인 경우, 부호화기 및 복호화기는 복원된 주변 블록을 기반으로 도출된 공간적 움직임 정보를 L1 움직임 정보로 사용할 수 있다. 다른 실시예로, L0 움직임 정보가 복원된 주변 블록을 기반으로 공간적으로 도출된 움직임 정보인 경우, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 시간적 움직임 정보를 L1 움직임 정보로 사용할 수 있다. In one embodiment, when the L0 motion information is temporally derived motion information based on a call block, the encoder and the decoder may use spatial motion information derived based on the reconstructed neighboring block as L1 motion information. In another embodiment, when the L0 motion information is spatially derived motion information based on the reconstructed neighboring block, the encoder and decoder may use temporal motion information derived based on a call block as L1 motion information.

한편, 상술한 실시예에서, 부호화기 및 복호화기는 L0 움직임 정보를 기반으로 L1 움직임 정보를 도출할 수도 있다. 일례로, L0 움직임 정보는 콜 블록을 기반으로 도출된 움직임 정보라 가정한다. 이 경우, 상술한 바와 같이 부호화기 및 복호화기는 복원된 주변 블록을 기반으로 공간적으로 도출된 공간적 움직임 정보를 L1 움직임 정보로 사용할 수 있다. 이 때, 일례로 부호화기 및 복호화기는 L0 움직임 정보와 동일하거나 유사한 움직임 정보만을, L1 움직임 정보로 사용될 공간적 움직임 정보로서 도출할 수 있다. 다른 예로 부호화기 및 복호화기는 L0 움직임 정보와 동일하지 않은 움직임 정보만을, L1 움직임 정보로 사용될 공간적 움직임 정보로서 도출할 수도 있다. 이 때, 부호화기 및 복호화기는 L0 움직임 정보와의 차이가 소정의 임계값 이하인 움직임 정보만을 L1 움직임 정보로 사용될 공간적 움직임 저보로서 도출할 수도 있다. 여기서, 상기 소정의 임계값은 현재 블록의 모드 정보, 현재 블록의 움직임 정보, 주변 블록의 모드 정보 및/또는 주변 블록의 움직임 정보 등을 기반으로 정해질 수 있으며, 다양한 방식으로 결정될 수 있다.Meanwhile, in the above-described embodiment, the encoder and the decoder may derive L1 motion information based on the L0 motion information. For example, it is assumed that the L0 motion information is motion information derived based on a call block. In this case, as described above, the encoder and decoder may use spatially derived spatial motion information based on the reconstructed neighboring block as L1 motion information. At this time, as an example, the encoder and the decoder may derive only motion information identical or similar to the L0 motion information as spatial motion information to be used as the L1 motion information. As another example, the encoder and the decoder may derive only motion information that is not the same as L0 motion information, as spatial motion information to be used as L1 motion information. At this time, the encoder and the decoder may derive only motion information in which a difference from the L0 motion information is equal to or less than a predetermined threshold value, as a spatial motion base to be used as L1 motion information. Here, the predetermined threshold may be determined based on mode information of a current block, motion information of a current block, mode information of a neighboring block, and / or motion information of a neighboring block, and may be determined in various ways.

L0 움직임 정보 및 L1 움직임 정보를 설정하는 방법은 상술한 실시예에 한정되지 않으며, 구현 및/또는 필요에 따라 달라질 수 있다.The method of setting the L0 motion information and the L1 motion information is not limited to the above-described embodiment, and may be changed according to implementation and / or needs.

한편, L0 움직임 정보 및/또는 L1 움직임 정보가 복원된 주변 블록의 움직임 정보를 기반으로 공간적으로 도출되는 경우, 복원된 주변 블록의 움직임 정보는 공간적으로 도출된 공간적 움직임 정보 및 시간적으로 도출된 시간적 움직임 정보를 모두 포함할 수도 있다. 이 때, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보 중에서 공간적으로 도출된 공간적 움직임 정보만을 이용하여 현재 블록의 L0 움직임 정보 및/또는 현재 블록의 L1 움직임 정보를 도출할 수 있다.Meanwhile, when the L0 motion information and / or the L1 motion information are spatially derived based on the motion information of the reconstructed neighboring block, the reconstructed neighboring block motion information includes spatially derived spatial motion information and temporally derived temporal motion. It may contain all information. At this time, the encoder and the decoder may derive the L0 motion information of the current block and / or the L1 motion information of the current block using only spatially derived spatial motion information among the motion information of the reconstructed neighboring blocks.

다시 도 12를 참조하면, 부호화기 및 복호화기는 L0 움직임 정보 및 L1 움직임 정보를 통합함으로써, 현재 블록의 움직임 정보를 도출할 수 있다(1230).Referring back to FIG. 12, the encoder and the decoder may derive motion information of a current block by integrating L0 motion information and L1 motion information (1230).

한편, 상기 도출된 현재 블록의 움직임 정보에서 L0 움직임 정보 및 L1 움직임 정보는 서로 동일할 수도 있다. 따라서, 상기 L0 움직임 정보와 상기 L1 움직임 정보가 동일한 경우, 부호화기 및 복호화기는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수 있다. 이 때, 부호화기 및 복호화기는 L0 움직임 정보만을 현재 블록의 움직임 정보로 사용할 수 있다. Meanwhile, L0 motion information and L1 motion information in the derived motion information of the current block may be identical to each other. Accordingly, when the L0 motion information and the L1 motion information are the same, the encoder and the decoder may re-set the prediction direction information of the current block as unidirectional prediction. At this time, the encoder and the decoder may use only L0 motion information as motion information of the current block.

도 13은 도 12의 실시예에 따른 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다. 도 13의 실시예에 따른 인터 예측 장치는 L0 움직임 정보 설정부(1310), L1 움직임 정보 설정부(1320) 및 움직임 정보 통합부(1330)를 포함할 수 있다.13 is a block diagram schematically showing an embodiment of an inter prediction apparatus capable of performing a process of deriving motion information according to the embodiment of FIG. 12. The inter-prediction apparatus according to the embodiment of FIG. 13 may include an L0 motion information setting unit 1310, an L1 motion information setting unit 1320, and a motion information integration unit 1330.

도 12의 실시예에서 상술한 바와 같이, 부호화기 및 복호화기는 L0 움직임 정보 및 L1 움직임 정보를 각각 독립적으로 설정할 수 있다. 이 때, 부호화기 및 복호화기는 L0 움직임 정보 및 L1 움직임 정보 중에서 하나는 복원된 주변 블록을 기반으로 공간적으로 도출하고 다른 하나는 콜 블록을 기반으로 시간적으로 도출할 수 있다.As described above in the embodiment of FIG. 12, the encoder and decoder may independently set L0 motion information and L1 motion information, respectively. At this time, the encoder and the decoder may derive spatially one of the L0 motion information and the L1 motion information based on the reconstructed neighboring block and temporally the other one based on the call block.

도 13을 참조하면, L0 움직임 정보 설정부(1310)는 L0 움직임 정보를 설정할 수 있다. 이 때, 부호화기 및 복호화기는 복원된 주변 블록을 기반으로 공간적으로 도출된 움직임 정보(공간적 움직임 정보)를 L0 움직임 정보로 사용하거나, 또는 콜 블록을 기반으로 시간적으로 도출된 움직임 정보(시간적 움직임 정보)를 L0 움직임 정보로 사용할 수 있다. 즉, 상기 L0 움직임 정보는 복원된 주변 블록을 기반으로 공간적으로 도출되거나, 또는 콜 블록을 기반으로 시간적으로 도출될 수 있다.Referring to FIG. 13, the L0 motion information setting unit 1310 may set L0 motion information. At this time, the encoder and decoder use spatially derived motion information (spatial motion information) based on the reconstructed neighboring block as L0 motion information, or temporally derived motion information (temporal motion information) based on the call block. Can be used as L0 motion information. That is, the L0 motion information may be spatially derived based on the reconstructed neighboring block or temporally based on the call block.

다시 도 13을 참조하면, L1 움직임 정보 설정부(1320)는 L1 움직임 정보를 설정할 수 있다. 이 때, 부호화기 및 복호화기는 복원된 주변 블록을 기반으로 공간적으로 도출된 움직임 정보(공간적 움직임 정보)를 L1 움직임 정보로 사용하거나, 또는 콜 블록을 기반으로 시간적으로 도출된 움직임 정보(시간적 움직임 정보)를 L1 움직임 정보로 사용할 수 있다. 즉, 상기 L1 움직임 정보는 복원된 주변 블록을 기반으로 공간적으로 도출되거나, 또는 콜 블록을 기반으로 시간적으로 도출될 수 있다. Referring back to FIG. 13, the L1 motion information setting unit 1320 may set L1 motion information. At this time, the encoder and decoder use spatially derived motion information (spatial motion information) based on the reconstructed neighboring blocks as L1 motion information, or temporally derived motion information (temporal motion information) based on the call block. Can be used as L1 motion information. That is, the L1 motion information may be spatially derived based on the reconstructed neighboring block or temporally based on the call block.

L0 움직임 정보 및 L1 움직임 정보를 설정하는 방법의 구체적인 실시예는 도 12에서 상술한 바 있으므로, 여기서는 생략하기로 한다.Since a specific embodiment of the method for setting the L0 motion information and the L1 motion information has been described in FIG. 12, it will be omitted here.

다시 도 13을 참조하면, 움직임 정보 통합부(1330)는 L0 움직임 정보 설정부(1310)에서 설정된 L0 움직임 정보 및 L1 움직임 정보 설정부(1320)에서 설정된 L1 움직임 정보를 통합함으로써, 현재 블록의 움직임 정보를 도출할 수 있다.Referring back to FIG. 13, the motion information integration unit 1330 integrates the L0 motion information set by the L0 motion information setting unit 1310 and the L1 motion information set by the L1 motion information setting unit 1320, thereby moving the current block. Information can be derived.

도 14는 본 발명에 따른 현재 블록의 시간적 움직임 정보 도출 방법의 또 다른 실시예를 개략적으로 나타내는 흐름도이다.14 is a flowchart schematically showing another embodiment of a method for deriving temporal motion information of a current block according to the present invention.

후술되는 실시예들은 시간적 움직임 정보를 중심으로 서술되지만 본 발명은 이에 한정되는 것은 아니다. 예를 들어, 도 14의 실시예에 따른 방법들은 머지 모드 및/또는 AMVP 모드에서의 시간적 움직임 정보뿐만 아니라, 머지 모드에서 머지 후보 리스트를 기반으로 도출된 현재 블록의 움직임 정보 및/또는 AMVP 모드에서 예측 움직임 벡터 후보 리스트를 기반으로 도출된 현재 블록의 움직임 정보에도 동일하거나 유사한 방식으로 적용될 수 있다.The embodiments described below are mainly described with respect to temporal motion information, but the present invention is not limited thereto. For example, the methods according to the embodiment of FIG. 14 may include temporal motion information in merge mode and / or AMVP mode, as well as motion information and / or AMVP mode of the current block derived based on a merge candidate list in merge mode. The motion information of the current block derived based on the predicted motion vector candidate list may be applied in the same or similar manner.

상술한 바와 같이, 시간적 움직임 정보는 이미 복원된 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 움직임 정보를 기반으로 도출될 수 있다. 여기서, 상기 콜 픽쳐는 일례로 참조 픽쳐 리스트에 포함된 참조 픽쳐 중에서 하나의 픽쳐에 해당될 수 있다. 부호화기 및 복호화기는, 콜 픽쳐 내에서 현재 블록과 공간적으로 동일한 위치에 존재하는 블록을 기준으로 소정의 상대적인 위치를 결정할 수 있고, 상기 결정된 소정의 상대적인 위치(예를 들어, 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록의 내부 및/또는 외부의 위치)를 기반으로 상기 콜 블록을 도출할 수 있다. 콜 블록을 기반으로 도출되는 시간적 움직임 정보는 예측 방향 정보, L0 참조 픽쳐 번호, L1 참조 픽쳐 번호, L0 움직임 벡터 및 L1 움직임 벡터 등을 포함할 수 있다.As described above, temporal motion information may be derived based on motion information of a call block corresponding to a current block in a call picture that has already been restored. Here, the call picture may correspond to one picture among reference pictures included in the reference picture list, for example. The encoder and decoder may determine a predetermined relative position based on a block that is spatially identical to the current block in the call picture, and the determined predetermined relative position (eg, spatially identical to the current block) The call block may be derived based on a location inside and / or outside of a block existing at a location. The temporal motion information derived based on the call block may include prediction direction information, L0 reference picture number, L1 reference picture number, L0 motion vector, and L1 motion vector.

도 14를 참조하면, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 시간적 움직임 정보에서 L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일한지 여부, 즉 L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일하고 L0 움직임 벡터와 L1 움직임 벡터가 동일한지 여부를 판단할 수 있다(S1410).Referring to FIG. 14, in the temporal motion information derived based on a call block, the encoder and the decoder determine whether the L0 temporal motion information and the L1 temporal motion information are the same, that is, the L0 reference picture number and the L1 reference picture number are the same and the L0 motion It may be determined whether the vector and the L1 motion vector are the same (S1410).

이하, 후술되는 도 14 내지 도 15의 실시예에 한하여, 설명의 편의상 시간적 움직임 정보 재설정 전 S1410 단계로 입력되는 시간적 움직임 정보는 입력 시간적 움직임 정보(L0 입력 시간적 움직임 정보, L1 입력 시간적 움직임 정보)라 한다. 이 때, 상기 입력 시간적 움직임 정보는 콜 블록을 기반으로 도출된 시간적 움직임 정보에 해당될 수 있다. 또한 입력 시간적 움직임 정보에 포함된 움직임 벡터는 입력 움직임 벡터(L0 입력 움직임 벡터, L1 입력 움직임 벡터), 입력 시간적 움직임 정보에 포함된 참조 픽쳐 인덱스는 입력 참조 픽쳐 인덱스(L0 입력 참조 픽쳐 인덱스, L1 입력 참조 픽쳐 인덱스), 입력 시간적 움직임 정보에 포함된 참조 픽쳐 번호는 입력 참조 픽쳐 번호(L0 입력 참조 픽쳐 번호, L1 입력 참조 픽쳐 번호)라 한다. 또한, 후술되는 실시예에서 L0 입력 참조 픽쳐 번호가 지시하는 참조 픽쳐는 L0 참조 픽쳐, L1 입력 참조 픽쳐 번호가 지시하는 참조 픽쳐는 L1 참조 픽쳐라 한다.Hereinafter, in the embodiments of FIGS. 14 to 15 to be described later, for convenience of explanation, temporal motion information input in step S1410 before resetting temporal motion information is input temporal motion information (L0 input temporal motion information, L1 input temporal motion information). do. At this time, the input temporal motion information may correspond to temporal motion information derived based on a call block. In addition, the motion vector included in the input temporal motion information is an input motion vector (L0 input motion vector, L1 input motion vector), and the reference picture index included in the input temporal motion information is an input reference picture index (L0 input reference picture index, L1 input) Reference picture index) and reference picture numbers included in the input temporal motion information are referred to as input reference picture numbers (L0 input reference picture number, L1 input reference picture number). Further, in the embodiments described below, the reference picture indicated by the L0 input reference picture number is referred to as an L0 reference picture, and the reference picture indicated by the L1 input reference picture number is referred to as an L1 reference picture.

L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일하지 않은 경우, 즉 L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일하지 않거나 및/또는 L0 움직임 벡터와 L1 입력 움직임 벡터가 동일하지 않은 경우, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 입력 시간적 움직임 정보를 그대로 현재 블록의 최종 시간적 움직임 정보로 사용할 수 있다. AMVP가 적용되는 경우, 상기 최종 시간적 움직임 정보는 현재 블록의 예측 움직임 벡터 후보로 결정되거나 등록될 수 있다. 또한, 머지가 적용되는 경우, 상기 최종 시간적 움직임 정보는 현재 블록의 머지 후보로 결정되거나 등록될 수 있다. If the L0 temporal motion information and the L1 temporal motion information are not the same, that is, the L0 reference picture number and the L1 reference picture number are not the same, and / or the L0 motion vector and the L1 input motion vector are not the same, the encoder and decoder The input temporal motion information derived based on the call block can be used as the final temporal motion information of the current block. When AMVP is applied, the final temporal motion information may be determined or registered as a prediction motion vector candidate of the current block. In addition, when merge is applied, the final temporal motion information may be determined or registered as a merge candidate of the current block.

L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, 부호화기 및 복호화기는 L1 참조 픽쳐에서 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 탐색하거나 도출할 수 있다(S1420). 여기서, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 서로 동일하므로, L1 참조 픽쳐는 L0 참조 픽쳐와 동일한 픽쳐에 해당될 수 있다. 따라서, 후술되는 실시예에서 L1 참조 픽쳐는 L0 참조 픽쳐와 동일한 픽쳐를 의미할 수 있다.When the L0 input temporal motion information and the L1 input temporal motion information are the same, the encoder and the decoder may search for or derive motion information to be used as the final L1 temporal motion information in the L1 reference picture (S1420). Here, since the L0 input temporal motion information and the L1 input temporal motion information are the same, the L1 reference picture may correspond to the same picture as the L0 reference picture. Therefore, in the embodiment described below, the L1 reference picture may mean the same picture as the L0 reference picture.

일례로 부호화기 및 복호화기는 동일한 방법으로 L1 참조 픽쳐에서 움직임 정보를 탐색하여 도출할 수 있다. 이 때, 부호화기는 L1 참조 픽쳐에서 도출된 움직임 정보를 복호화기로 전송하지 않을 수 있다. 다른 예로 부호화기는 소정의 방법에 의해 L1 참조 픽쳐에서 움직임 정보를 도출한 후, 도출된 움직임 정보를 비트스트림에 포함시켜 복호화기로 전송할 수 있다. 이 때, 복호화기는 전송된 움직임 정보를 기반으로 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 결정할 수 있다. 부호화기에서 도출된 움직임 정보는 참조 픽쳐 인덱스 및 움직임 벡터 등을 포함할 수 있고, 부호화기는 상기 참조 픽쳐 인덱스와 움직임 벡터를 각각 독립적으로 복호화기로 전송할 수 있다. 이 때, 부호화기는 현재 블록의 실제 움직임 벡터 및 L1 참조 픽쳐로부터 도출된 움직임 벡터의 차분 값을 구한 후, 그 차분 값을 복호화기로 전송할 수도 있다. For example, the encoder and decoder may derive by searching for motion information in the L1 reference picture in the same way. At this time, the encoder may not transmit motion information derived from the L1 reference picture to the decoder. As another example, the encoder may derive motion information from the L1 reference picture by a predetermined method, and then include the derived motion information in a bitstream and transmit it to the decoder. At this time, the decoder may determine motion information to be used as the final L1 temporal motion information based on the transmitted motion information. The motion information derived from the encoder may include a reference picture index and a motion vector, and the encoder may independently transmit the reference picture index and motion vector to a decoder. At this time, the encoder may obtain a difference value between the actual motion vector of the current block and the motion vector derived from the L1 reference picture, and then transmit the difference value to the decoder.

다시 도 14를 참조하면, 부호화기 및 복호화기는 L1 참조 픽쳐에서 도출된 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다(S1430). 즉, 이 때 부호화기 및 복호화기는 L1 입력 시간적 움직임 정보 값을 L1 참조 픽쳐에서 도출된 움직임 정보의 값으로 재설정할 수 있다. Referring to FIG. 14 again, the encoder and decoder may use motion information derived from the L1 reference picture as final L1 temporal motion information of the current block (S1430). That is, at this time, the encoder and decoder may reset the L1 input temporal motion information value to the value of motion information derived from the L1 reference picture.

이하, L1 참조 픽쳐에서 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 도출하는 방법의 실시예들이 서술된다.Hereinafter, embodiments of a method for deriving motion information to be used as the final L1 temporal motion information in the L1 reference picture are described.

일 실시예로, 부호화기 및 복호화기는 L1 참조 픽쳐 내에서, L0 입력 시간적 움직임 정보(움직임 벡터)가 지시하는 위치를 중심으로, 소정의 범위 내에 존재하는 위치를 지시하는 움직임 정보를 최종 L1 시간적 움직임 정보(L1 움직임 벡터)로 사용할 수 있다. 구체적으로, 상기 소정의 범위는 L1 참조 픽쳐 내에서 L0 입력 시간적 움직임 정보가 지시하는 위치를 중심으로, 수직 및/또는 수평 방향으로 +T 및/또는 -T 거리 이내의 위치를 포함하는 범위에 해당될 수 있다. 여기서, 일례로 T는 1/4 픽셀 단위의 거리를 나타내는 값일 수 있고, 다른 예로 T는 1/2 픽셀 단위의 거리를 나타내는 값일 수 있다. 또 다른 예로, T는 정수 픽셀 단위의 거리를 나타내는 값일 수도 있다. 정수 픽셀 단위가 사용되는 경우에는, 움직임 보상 시에 보간(interpolation) 과정이 수행되지 않을 수 있으므로, 계산 복잡도가 감소될 수 있다.In one embodiment, the encoder and decoder in the L1 reference picture, centering on the position indicated by the L0 input temporal motion information (motion vector), the motion information indicating the position within a predetermined range is the final L1 temporal motion information Can be used as (L1 motion vector). Specifically, the predetermined range corresponds to a range including a position within + T and / or -T distance in the vertical and / or horizontal direction, centered on the position indicated by the L0 input temporal motion information in the L1 reference picture. Can be. Here, as an example, T may be a value indicating a distance in units of 1/4 pixels, and in another example, T may be a value indicating a distance in units of 1/2 pixels. As another example, T may be a value indicating a distance in units of integer pixels. When an integer pixel unit is used, since an interpolation process may not be performed in motion compensation, computational complexity may be reduced.

다른 예로, 부호화기는 L1 참조 픽쳐 내에서, 현재 블록에 대응하는 입력 블록(원본 블록)과 가장 잘 매칭되거나 유사한 영역을 도출할 수 있다. 이 때, 부호화기는 상기 도출된 영역을 기반으로 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 도출할 수 있다. 일례로, 부호화기는 상기 도출된 영역에 해당되는 블록의 위치 및 현재 블록의 위치를 기반으로 최종 L1 시간적 움직임 정보로 사용될 움직임 벡터를 도출할 수 있고, 상기 도출된 영역에 해당되는 블록을 기반으로 최종 L1 시간적 움직임 정보로 사용될 참조 픽쳐 인덱스(및/또는 참조 픽쳐 번호)를 도출할 수 있다. 도출된 움직임 정보는 비트스트림에 포함되어 부호화기로부터 복호화기로 전송될 수 있다. 이 때, 복호화기는 전송된 움직임 정보를 기반으로 L1 입력 시간적 움직임 정보를 재설정할 수 있다.As another example, the encoder may derive an area best matched or similar to an input block (original block) corresponding to the current block in the L1 reference picture. At this time, the encoder may derive motion information to be used as the final L1 temporal motion information of the current block based on the derived area. As an example, the encoder may derive a motion vector to be used as the final L1 temporal motion information based on the position of the block corresponding to the derived region and the location of the current block, and the final based on the block corresponding to the derived region A reference picture index (and / or reference picture number) to be used as L1 temporal motion information may be derived. The derived motion information may be included in a bitstream and transmitted from an encoder to a decoder. At this time, the decoder may reset the L1 input temporal motion information based on the transmitted motion information.

L1 참조 픽쳐에서 도출된 참조 픽쳐 인덱스(및/또는 참조 픽쳐 번호)는 L1 입력 참조 픽쳐 인덱스(및/또는 L1 입력 참조 픽쳐 번호)와 다를 수도 있다. 이 경우, 부호화기 및 복호화기는 L1 참조 픽쳐에서 도출된 참조 픽쳐 인덱스(및/또는 참조 픽쳐 번호)를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다.The reference picture index (and / or reference picture number) derived from the L1 reference picture may be different from the L1 input reference picture index (and / or L1 input reference picture number). In this case, the encoder and decoder may use the reference picture index (and / or reference picture number) derived from the L1 reference picture as the final L1 temporal motion information of the current block.

L1 참조 픽쳐를 기반으로 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 도출하는 방법은 상술한 실시예에 한정되지 않으며, 부호화기 및 복호화기는 구현 및/또는 필요에 따라 다른 방식으로 움직임 정보를 도출할 수도 있다.The method of deriving motion information to be used as the final L1 temporal motion information based on the L1 reference picture is not limited to the above-described embodiment, and the encoder and decoder may derive motion information in different ways depending on implementation and / or needs. .

한편, 상술한 실시예에서는 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보의 동일성을 기반으로 S1420 내지 S1430 과정의 수행 여부가 결정되지만, 부호화기 및 복호화기는 다른 조건을 기반으로 S1420 내지 S1430 과정의 수행 여부를 결정할 수도 있다.On the other hand, in the above-described embodiment, it is determined whether to perform the processes S1420 to S1430 based on the identity of the L0 input temporal motion information and the L1 input temporal motion information, but the encoder and decoder perform the S1420 to S1430 processes based on other conditions. You can also decide

일 실시예로, 부호화기 및 복호화기는 콜 블록의 예측 방향을 기반으로 S1420 내지 S1430 과정의 수행 여부를 결정할 수 있다. 상술한 바와 같이, 예측 방향 정보는 예측이 수행되는 블록에 대해 단방향 예측이 적용되는지 또는 양방향 예측이 적용되는지 여부를 지시하는 정보를 의미할 수 있다. 따라서, 상기 예측 방향은 단방향 예측 또는 양방향 예측에 해당될 수 있다. 일례로, 부호화기 및 복호화기는 콜 블록의 움직임 정보(예측 방향)가 양방향 예측이 아닌 단방향 예측인 경우에 S1420 내지 S1430 과정을 수행할 수 있다. 이는 제1 콜 블록의 예측 방향이 단방향 예측인 경우, 결과적으로 제1 콜 블록으로부터 도출되는 입력 시간적 움직임 정보에서, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일할 수 있기 때문이다.In an embodiment, the encoder and the decoder may determine whether to perform the processes S1420 to S1430 based on the prediction direction of the call block. As described above, the prediction direction information may mean information indicating whether unidirectional prediction or bidirectional prediction is applied to a block on which prediction is performed. Accordingly, the prediction direction may correspond to unidirectional prediction or bidirectional prediction. For example, the encoder and the decoder may perform processes S1420 to S1430 when the motion information (prediction direction) of the call block is unidirectional prediction rather than bidirectional prediction. This is because when the prediction direction of the first call block is unidirectional prediction, as a result, in the input temporal motion information derived from the first call block, the L0 input temporal motion information and the L1 input temporal motion information may be the same.

다른 실시예로, 부호화기 및 복호화기는 콜 블록에 움직임 정보가 존재하는지 여부에 관한 정보를 기반으로 S1420 내지 S1430 과정의 수행 여부를 결정할 수도 있다. 일례로, 부호화기 및 복호화기는 콜 블록에 움직임 정보가 존재하지 않는 경우에 S1420 내지 S1430 과정을 수행할 수 있다. 이 경우, 상술한 S1430 단계에서는 L1 입력 시간적 움직임 정보가 아닌 L0 입력 시간적 움직임 정보가 재설정될 수 있다. 즉, 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보를 L1 참조 픽쳐의 움직임 정보로 재설정할 수 있으며, 현재 블록에 대해 양방향 예측이 아닌 단방향 예측을 수행할 수 있다. 또한, 콜 블록에 움직임 정보가 존재하지 않는 경우, 상술한 S1430 단계에서 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보를 모두 재설정할 수도 있다. 즉, 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보 및 L1 입력 시간적 움직임 정보를 모두 L1 참조 픽쳐의 움직임 정보로 재설정할 수 있으며, 현재 블록에 대해 양방향 예측을 수행할 수도 있다.In another embodiment, the encoder and the decoder may determine whether to perform the processes S1420 to S1430 based on information on whether motion information is present in the call block. For example, the encoder and the decoder may perform processes S1420 to S1430 when there is no motion information in the call block. In this case, in step S1430 described above, the L0 input temporal motion information, not the L1 input temporal motion information, may be reset. That is, the encoder and decoder may reset the L0 input temporal motion information to motion information of the L1 reference picture, and perform unidirectional prediction rather than bidirectional prediction on the current block. In addition, if there is no motion information in the call block, in step S1430, the encoder and decoder may reset both the L0 input temporal motion information and the L1 input temporal motion information. That is, the encoder and the decoder can reset both the L0 input temporal motion information and the L1 input temporal motion information to motion information of the L1 reference picture, and may perform bidirectional prediction on the current block.

또 다른 실시예로, 부호화기 및 복호화기는 콜 블록의 움직임 정보에서 L0 움직임 벡터 및/또는 L1 움직임 벡터가 영 벡터(0,0)에 해당되는 경우에 S1420 내지 S1430 과정을 수행할 수도 있다. 이 경우, 상술한 S1430 단계에서 부호화기 및 복호화기는 영 벡터(0,0)에 해당되는 움직임 벡터(들)를 재설정할 수 있다. 일례로, 상기 영 벡터(0,0)에 해당되는 움직임 벡터(들)는 L1 참조 픽쳐의 움직임 벡터로 설정될 수 있고, 다른 예로, 상기 영 벡터(0,0)에 해당되는 움직임 벡터(들)는 복원된 주변 블록의 움직임 벡터로 설정될 수도 있으며, 또 다른 예로, 상기 영 벡터(0,0)에 해당되는 움직임 벡터(들)는 콜 블록의 주변에 위치한 블록의 움직임 벡터로 설정될 수도 있다. 또 다른 실시예로, 부호화기 및 복호화기는 콜 블록의 움직임 정보에서 L0 움직임 벡터 및/또는 L1 움직임 벡터가 영 벡터(0,0)에 해당되지 않는 경우에 S1420 내지 S1430 과정을 수행할 수도 있다. 이 경우, 상술한 S1430 단계에서 부호화기 및 복호화기는 영 벡터(0,0)에 해당되지 않는 움직임 벡터(들)을 재설정할 수 있으며, 상기 영 벡터(0,0)에 해당되지 않는 움직임 벡터(들)은 L1 참조 픽쳐의 움직임 벡터로 재설정될 수 있다.In another embodiment, the encoder and the decoder may perform processes S1420 to S1430 when the L0 motion vector and / or the L1 motion vector corresponds to a zero vector (0,0) in motion information of a call block. In this case, the encoder and decoder in step S1430 described above may reset the motion vector (s) corresponding to the zero vector (0,0). For example, the motion vector (s) corresponding to the zero vector (0,0) may be set as a motion vector of the L1 reference picture, and as another example, the motion vector (s) corresponding to the zero vector (0,0) ) May be set as a motion vector of the reconstructed neighboring block, and as another example, the motion vector (s) corresponding to the zero vector (0,0) may be set as a motion vector of a block located around the call block. have. In another embodiment, the encoder and the decoder may perform processes S1420 to S1430 when the L0 motion vector and / or the L1 motion vector do not correspond to the zero vector (0,0) in the motion information of the call block. In this case, in step S1430 described above, the encoder and decoder may reset motion vector (s) not corresponding to the zero vector (0,0), and motion vector (s) not corresponding to the zero vector (0,0). ) May be reset to a motion vector of the L1 reference picture.

S1420 내지 S1430 과정의 수행 여부가 결정되는 조건은 상술한 실시예에 한정되지 않으며, 조건 및/또는 필요에 따라 다양한 조건이 적용될 수 있다.Conditions for determining whether to perform S1420 to S1430 are not limited to the above-described embodiment, and various conditions may be applied according to conditions and / or needs.

한편, L1 참조 픽쳐에서 도출되는 움직임 정보는 현재 블록의 L0 입력 시간적 움직임 정보와 동일할 수도 있다. 따라서, 부호화기 및 복호화기는 L1 참조 픽쳐에서 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 탐색할 때, L0 입력 시간적 움직임 정보와 동일하지 않은 움직임 정보만을 찾을 수도 있다. 예를 들어, S1430에서와 같이, L1 참조 픽쳐를 기반으로 현재 블록의 최종 L1 시간적 움직임 정보를 도출하는 경우, 부호화기 및 복호화기는 현재 블록의 L0 입력 시간적 움직임 정보와 다른 움직임 정보만을 최종 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 부호화기 및 복호화기는 현재 블록의 L0 입력 시간적 움직임 정보와의 차이가 소정의 임계값(threshold) 이하인 움직임 정보만을, 최종 L1 시간적 움직임 정보로 사용될 움직임 정보로 선택할 수도 있다. 여기서, 상기 소정의 임계값은 현재 블록의 모드 정보, 현재 블록의 움직임 정보, 주변 블록의 모드 정보 및/또는 주변 블록의 움직임 정보 등을 기반으로 정해질 수 있으며, 다양한 방식으로 결정될 수 있다.Meanwhile, the motion information derived from the L1 reference picture may be the same as the L0 input temporal motion information of the current block. Accordingly, the encoder and decoder may find only motion information that is not equal to the L0 input temporal motion information when searching for motion information to be used as the final L1 temporal motion information of the current block in the L1 reference picture. For example, as in S1430, when deriving the final L1 temporal motion information of the current block based on the L1 reference picture, the encoder and decoder final L1 temporal motion information only of motion information different from the L0 input temporal motion information of the current block Can be used as At this time, the encoder and the decoder may select only motion information whose difference from the L0 input temporal motion information of the current block is less than or equal to a predetermined threshold, as motion information to be used as the final L1 temporal motion information. Here, the predetermined threshold may be determined based on mode information of a current block, motion information of a current block, mode information of a neighboring block, and / or motion information of a neighboring block, and may be determined in various ways.

상술한 실시예에서 S1410 단계로 입력되는 입력 시간적 움직임 정보는 입력 움직임 벡터뿐만 아니라 입력 참조 픽쳐 인덱스도 포함할 수 있다. 여기서, L0 입력 움직임 벡터 및 L1 입력 움직임 벡터는 상술한 바와 같이 콜 블록을 기반으로 시간적으로 도출된 움직임 벡터일 수 있고, L0 입력 참조 픽쳐 인덱스 및 L1 입력 참조 픽쳐 인덱스는 복원된 주변 블록으로부터 공간적으로 도출된 참조 픽쳐 인덱스일 수 있다. 이 때, L0 입력 참조 픽쳐 인덱스 및 L1 입력 참조 픽쳐 인덱스는, 복원된 주변 블록의 참조 픽쳐 인덱스 중에서 음수가 아닌 가장 작은 값으로 설정될 수 있다. 한편, 다른 예로 L0 입력 참조 픽쳐 인덱스 및 L1 입력 참조 픽쳐 인덱스는 복원된 주변 블록의 움직임 정보에 관계 없이 0으로 설정될 수도 있다.In the above-described embodiment, the input temporal motion information input in step S1410 may include an input reference picture index as well as an input motion vector. Here, the L0 input motion vector and the L1 input motion vector may be motion vectors derived temporally based on a call block as described above, and the L0 input reference picture index and L1 input reference picture index are spatially derived from the reconstructed neighboring blocks. It may be a derived reference picture index. At this time, the L0 input reference picture index and the L1 input reference picture index may be set to the smallest non-negative value among the reference picture indexes of the reconstructed neighboring blocks. Meanwhile, as another example, the L0 input reference picture index and the L1 input reference picture index may be set to 0 regardless of motion information of the reconstructed neighboring block.

L1 입력 움직임 벡터가 L1 참조 픽쳐를 기반으로 재설정되는 경우, 입력 참조 픽쳐 인덱스에 대해서도 재설정 과정이 수행될 수 있다. 일례로, 입력 참조 픽쳐 인덱스는 상술한 바와 같이 L1 참조 픽쳐로부터 도출된 참조 픽쳐 인덱스를 기반으로 재설정될 수 있다. 다른 예로, L0 입력 시간적 움직임 정보(예를 들어, L0 입력 움직임 벡터, L0 입력 참조 픽쳐 인덱스 등) 와 L1 입력 시간적 움직임 정보(예를 들어, L1 입력 움직임 벡터, L1 입력 참조 픽쳐 인덱스 등)가 동일한 경우, 부호화기 및 복호화기는 L0 입력 참조 픽쳐 인덱스 및 L1 입력 참조 픽쳐 인덱스를 모두 0의 값으로 재설정하여 최종 시간적 움직임 정보로 사용할 수도 있다. 이는, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, L0 참조 픽쳐 인덱스 및 L1 참조 픽쳐 인덱스가 모두 0일 확률이 높기 때문이다.When the L1 input motion vector is reset based on the L1 reference picture, a reset process may also be performed on the input reference picture index. In one example, the input reference picture index may be reset based on the reference picture index derived from the L1 reference picture as described above. As another example, L0 input temporal motion information (eg, L0 input motion vector, L0 input reference picture index, etc.) and L1 input temporal motion information (eg, L1 input motion vector, L1 input reference picture index, etc.) are the same. In this case, the encoder and the decoder may reset the L0 input reference picture index and the L1 input reference picture index to values of 0 and use the final temporal motion information. This is because when the L0 input temporal motion information and the L1 input temporal motion information are the same, the probability that both the L0 reference picture index and the L1 reference picture index are 0 is high.

한편, 상술한 바와 같이 부호화기 및 복호화기는 L1 입력 움직임 벡터 값을 L1 참조 픽쳐의 움직임 벡터와 동일한 값으로 재설정함으로써 최종 L1 시간적 움직임 벡터를 도출할 수 있다. 이 때, 상기 L1 참조 픽쳐의 움직임 벡터는 L1 입력 참조 픽쳐 인덱스 및/또는 재설정된 L1 참조 픽쳐 인덱스에 따라 스케일링되어 사용될 수도 있다. L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 참조 픽쳐 인덱스로 사용될 수도 있고, 상술한 실시예에서와 같이 재설정 과정을 거쳐 최종 L1 참조 픽쳐 인덱스로 사용될 수도 있다. 이 때, L1 참조 픽쳐의 움직임 벡터에 대응하는 참조 픽쳐, 및 최종 L1 참조 픽쳐 인덱스가 지시하는 참조 픽쳐는 서로 다를 수 있다. 이 경우, 부호화기 및 복호화기는 L1 참조 픽쳐의 움직임 벡터에 대한 스케일링을 수행하고 상기 스케일링된 움직임 벡터를 현재 블록의 최종 L1 시간적 움직임 벡터로 사용할 수 있다.Meanwhile, as described above, the encoder and decoder can derive the final L1 temporal motion vector by resetting the L1 input motion vector value to the same value as the motion vector of the L1 reference picture. At this time, the motion vector of the L1 reference picture may be scaled and used according to the L1 input reference picture index and / or the reset L1 reference picture index. The L1 input reference picture index may be used as a final L1 reference picture index without a reset process, or may be used as a final L1 reference picture index through a reset process as in the above-described embodiment. At this time, the reference picture corresponding to the motion vector of the L1 reference picture and the reference picture indicated by the final L1 reference picture index may be different. In this case, the encoder and decoder may perform scaling on the motion vector of the L1 reference picture and use the scaled motion vector as the final L1 temporal motion vector of the current block.

또한 상술한 실시예들에서, 재설정된 L1 시간적 움직임 정보는 현재 블록의 L0 시간적 움직임 정보와 동일할 수 있다. 따라서, 재설정된 L1 시간적 움직임 정보가 현재 블록의 L0 시간적 움직임 정보와 동일한 경우, 부호화기 및 복호화기는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수도 있다. 이 때, 부호화기 및 복호화기는 L0 시간적 움직임 정보만을 현재 블록의 시간적 움직임 정보로 사용할 수 있다. 이러한 방법은 상술한 실시예들과 결합된 조합으로서 본 발명에 적용될 수 있다.In addition, in the above-described embodiments, the reset L1 temporal motion information may be the same as the L0 temporal motion information of the current block. Accordingly, when the reset L1 temporal motion information is the same as the L0 temporal motion information of the current block, the encoder and decoder may re-set the prediction direction information of the current block as unidirectional prediction. At this time, the encoder and the decoder may use only L0 temporal motion information as temporal motion information of the current block. This method can be applied to the present invention in combination with the above-described embodiments.

*도 15는 도 14의 실시예에 따른 시간적 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다. 도 15의 실시예에 따른 인터 예측 장치는 시간적 움직임 정보 판단부(1510), 움직임 예측부(1520) 및 L1 시간적 움직임 정보 재설정부(1530)를 포함할 수 있다.* FIG. 15 is a block diagram schematically showing an embodiment of an inter prediction apparatus capable of performing a process of deriving temporal motion information according to the embodiment of FIG. 14. The inter prediction apparatus according to the embodiment of FIG. 15 may include a temporal motion information determining unit 1510, a motion predicting unit 1520, and an L1 temporal motion information resetting unit 1530.

상술한 바와 같이, 시간적 움직임 정보는 이미 복원된 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 움직임 정보를 기반으로 도출될 수 있다. 여기서, 상기 콜 픽쳐는 일례로 참조 픽쳐 리스트에 포함된 참조 픽쳐 중에서 하나의 픽쳐에 해당될 수 있다. 부호화기 및 복호화기는, 콜 픽쳐 내에서 현재 블록과 공간적으로 동일한 위치에 존재하는 블록을 기준으로 소정의 상대적인 위치를 결정할 수 있고, 상기 결정된 소정의 상대적인 위치(예를 들어, 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록의 내부 및/또는 외부의 위치)를 기반으로 상기 콜 블록을 도출할 수 있다. 콜 블록을 기반으로 도출되는 시간적 움직임 정보는 예측 방향 정보, L0 참조 픽쳐 번호, L1 참조 픽쳐 번호, L0 움직임 벡터 및 L1 움직임 벡터 등을 포함할 수 있다.As described above, temporal motion information may be derived based on motion information of a call block corresponding to a current block in a call picture that has already been restored. Here, the call picture may correspond to one picture among reference pictures included in the reference picture list, for example. The encoder and decoder may determine a predetermined relative position based on a block that is spatially identical to the current block in the call picture, and the determined predetermined relative position (eg, spatially identical to the current block) The call block may be derived based on a location inside and / or outside of a block existing at a location. The temporal motion information derived based on the call block may include prediction direction information, L0 reference picture number, L1 reference picture number, L0 motion vector, and L1 motion vector.

도 15를 참조하면, 도 11을 참조하면, 시간적 움직임 정보 판단부(1510)는 입력 시간적 움직임 정보에서 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한지 여부, 즉 L0 입력 참조 픽쳐 번호와 L1 입력 참조 픽쳐 번호가 동일하고 L0 입력 움직임 벡터와 L1 입력 움직임 벡터가 동일한지 여부를 판단할 수 있다. Referring to FIG. 15, referring to FIG. 11, the temporal motion information determination unit 1510 determines whether the L0 input temporal motion information and the L1 input temporal motion information in the input temporal motion information are the same, that is, the L0 input reference picture number and L1 It is possible to determine whether the input reference picture number is the same and the L0 input motion vector and the L1 input motion vector are the same.

L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일하지 않은 경우, 인터 예측 장치는 입력 시간적 움직임 정보를 그대로 현재 블록의 시간적 움직임 정보로 사용할 수 있다. AMVP가 적용되는 경우, 상기 현재 블록의 시간적 움직임 정보는 현재 블록에 대한 예측 움직임 벡터 후보로 결정되거나 등록될 수 있다. 또한, 머지가 적용되는 경우, 상기 현재 블록의 시간적 움직임 정보는 현재 블록에 대한 머지 후보로 결정되거나 등록될 수 있다. L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우에는 움직임 예측부(1520)에 의한 프로세스가 수행될 수 있다. When the L0 input temporal motion information and the L1 input temporal motion information are not the same, the inter prediction apparatus may use the input temporal motion information as the temporal motion information of the current block. When AMVP is applied, temporal motion information of the current block may be determined or registered as a prediction motion vector candidate for the current block. Also, when merge is applied, temporal motion information of the current block may be determined or registered as a merge candidate for the current block. When the L0 input temporal motion information and the L1 input temporal motion information are the same, a process by the motion predictor 1520 may be performed.

한편, 시간적 움직임 정보 판단부(1510)는 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보의 동일성 여부가 아닌, L0 입력 참조 픽쳐 번호 및 L1 입력 참조 픽쳐 번호의 동일성 여부 또는 콜 블록의 예측 방향을 판단할 수도 있다. 예를 들어, L0 입력 참조 픽쳐 번호 및 L1 입력 참조 픽쳐 번호가 동일하지 않은 경우, 입력 시간적 움직임 정보가 그대로 현재 블록의 시간적 움직임 정보로 사용될 수 있고, L0 입력 참조 픽쳐 번호 및 L1 입력 참조 픽쳐 번호가 동일한 경우 움직임 예측부(1520)에 의한 프로세스가 수행될 수 있다. 다른 예로, 콜 블록의 예측 방향이 양방향 예측인 경우, 입력 시간적 움직임 정보가 그대로 현재 블록의 시간적 움직임 정보로 사용될 수 있고, 콜 블록의 예측 방향이 단방향 예측인 경우 움직임 예측부(1520)에 의한 프로세스가 수행될 수도 있다.Meanwhile, the temporal motion information determination unit 1510 determines whether the L0 input reference picture number and the L1 input reference picture number are identical, or the prediction direction of the call block, not whether the L0 input temporal motion information and the L1 input temporal motion information are identical. You may. For example, if the L0 input reference picture number and the L1 input reference picture number are not the same, the input temporal motion information can be used as the temporal motion information of the current block, and the L0 input reference picture number and L1 input reference picture number are In the same case, a process performed by the motion prediction unit 1520 may be performed. As another example, if the prediction direction of the call block is bidirectional prediction, input temporal motion information may be used as temporal motion information of the current block as it is, and when the prediction direction of the call block is unidirectional prediction, the process by the motion prediction unit 1520 May be performed.

다시 도 15를 참조하면, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, 움직임 예측부(1520)는 L1 참조 픽쳐에서 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 탐색하거나 도출할 수 있다. Referring back to FIG. 15, when the L0 input temporal motion information and the L1 input temporal motion information are the same, the motion predictor 1520 may search for or derive motion information to be used as the final L1 temporal motion information in the L1 reference picture.

일 실시예로, 움직임 예측부(1520)는 L1 참조 픽쳐 내에서, 현재 블록에 대응하는 입력 블록(원본 블록)과 가장 잘 매칭되거나 유사한 영역을 도출할 수 있다. 이 때, 움직임 예측부(1520)는 상기 도출된 영역을 기반으로 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 도출할 수 있다. 일례로, 움직임 예측부(1520)는 상기 도출된 영역에 해당되는 블록의 위치 및 현재 블록의 위치를 기반으로 최종 L1 시간적 움직임 정보로 사용될 움직임 벡터를 도출할 수 있고, 상기 도출된 영역에 해당되는 블록을 기반으로 최종 L1 시간적 움직임 정보로 사용될 참조 픽쳐 인덱스(및/또는 참조 픽쳐 번호)를 도출할 수 있다.In an embodiment, the motion prediction unit 1520 may derive an area that is best matched or similar to an input block (original block) corresponding to the current block in the L1 reference picture. At this time, the motion prediction unit 1520 may derive motion information to be used as the final L1 temporal motion information of the current block based on the derived area. For example, the motion prediction unit 1520 may derive a motion vector to be used as the final L1 temporal motion information based on the position of the block corresponding to the derived area and the position of the current block, and corresponding to the derived area A reference picture index (and / or reference picture number) to be used as the final L1 temporal motion information may be derived based on the block.

한편, 움직임 예측부(1520)가 부호화기측의 구성 요소에 해당되는 경우, 부호화기는 상기 방법에 의해 L1 참조 픽쳐에서 도출된 움직임 정보를 비트스트림에 포함시켜 복호화기로 전송할 수도 있다. L1 참조 픽쳐에서 도출된 움직임 정보는 참조 픽쳐 인덱스 및 움직임 벡터 등을 포함할 수 있고, 부호화기는 상기 참조 픽쳐 인덱스와 움직임 벡터를 각각 독립적으로 복호화기로 전송할 수 있다. 이 때, 부호화기는 현재 블록의 실제 움직임 벡터 및 L1 참조 픽쳐로부터 도출된 움직임 벡터의 차분 값을 구한 후, 그 차분 값을 복호화기로 전송할 수도 있다. Meanwhile, when the motion predictor 1520 corresponds to a component on the encoder side, the encoder may include motion information derived from the L1 reference picture in the bitstream by the above method and transmit it to the decoder. The motion information derived from the L1 reference picture may include a reference picture index and a motion vector, and the encoder may independently transmit the reference picture index and motion vector to a decoder, respectively. At this time, the encoder may obtain a difference value between the actual motion vector of the current block and the motion vector derived from the L1 reference picture, and then transmit the difference value to the decoder.

이 경우, 복호화기는 전송된 움직임 정보를 기반으로 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 결정할 수 있다. 즉, 움직임 예측부(1520)가 복호화기측의 구성 요소에 해당되는 경우, 상기 움직임 예측부(1520)는 외부로부터 입력된 움직임 정보(예를 들어, 부호화기로부터 전송된 움직임 정보)를 기반으로, 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 결정할 수 있다. In this case, the decoder may determine motion information to be used as the final L1 temporal motion information based on the transmitted motion information. That is, when the motion predicting unit 1520 corresponds to a component on the decoder side, the motion predicting unit 1520 is based on motion information (eg, motion information transmitted from an encoder) from the outside. It is possible to determine motion information to be used as L1 temporal motion information.

다시 도 15를 참조하면, L1 시간적 움직임 정보 재설정부(1530)는 L1 참조 픽쳐에서 도출된 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다. 즉, 이 때 L1 시간적 움직임 정보 재설정부(1530)는 L1 입력 시간적 움직임 정보 값을 움직임 예측부(1520)에 의해 도출된 움직임 정보(L1 참조 픽쳐에서 도출된 움직임 정보)의 값으로 재설정할 수 있다.Referring back to FIG. 15, the L1 temporal motion information resetting unit 1530 may use motion information derived from the L1 reference picture as final L1 temporal motion information of the current block. That is, at this time, the L1 temporal motion information resetting unit 1530 may reset the L1 input temporal motion information value to the value of motion information (motion information derived from the L1 reference picture) derived by the motion prediction unit 1520. .

상술한 도 6 내지 도 15의 실시예들은, 각각 개별적으로 적용될 수도 있으나, 각 블록의 부호화 모드에 따라 다양한 방법으로 조합되어 적용될 수도 있다. 이하, 후술되는 실시예들에서 부호화 모드가 머지 모드인 블록은 머지 블록이라 한다. 머지 블록이 아닌 블록에는, 예를 들어 부호화 모드가 AMVP 모드인 블록 등이 있을 수 있다. 또한, 후술되는 실시예들에서 현재 블록은 경우에 따라 머지 블록 또는 머지 블록이 아닌 블록 중 하나에 해당될 수 있다.The above-described embodiments of FIGS. 6 to 15 may be individually applied, but may be combined and applied in various ways according to the encoding mode of each block. Hereinafter, in embodiments described below, a block in which the encoding mode is a merge mode is referred to as a merge block. Blocks other than the merge block may include, for example, a block in which the encoding mode is AMVP mode. Further, in the embodiments described below, the current block may correspond to one of a merge block or a block other than a merge block, depending on the case.

일 실시예로, 머지 블록에는 도 6 내지 도 8의 실시예에 따른 시간적 움직임 정보 도출 방법이 적용되고, 머지 블록이 아닌 블록에는 도 12 및 도 13에 따른 움직임 정보 도출 방법이 적용될 수 있다. 이 때, 머지 블록에서는 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, 복원된 주변 블록의 움직임 정보가 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 수 있다. 또한, 머지 블록이 아닌 블록에서는, 현재 블록의 L0 움직임 정보 및 현재 블록의 L1 움직임 정보가 각각 독립적으로 설정될 수 있다. 일례로, 현재 블록의 L0 움직임 정보 및 현재 블록의 L1 움직임 정보 중에서 하나는 복원된 주변 블록을 기반으로 공간적으로 도출되고 다른 하나는 콜 블록을 기반으로 시간적으로 도출될 수 있다.In one embodiment, a method for deriving temporal motion information according to the embodiments of FIGS. 6 to 8 may be applied to a merge block, and a method for deriving motion information according to FIGS. 12 and 13 may be applied to a block other than the merge block. At this time, in the merge block, when the L0 input temporal motion information and the L1 input temporal motion information are the same, the restored motion information of the neighboring block may be used as the final L1 temporal motion information of the current block. In addition, in a block other than the merge block, the L0 motion information of the current block and the L1 motion information of the current block may be independently set. For example, one of the L0 motion information of the current block and the L1 motion information of the current block may be spatially derived based on the reconstructed neighboring block and the other temporally based on the call block.

다른 실시예로, 머지 블록에는 도 9 내지 도 11의 실시예에 따른 시간적 움직임 정보 도출 방법이 적용되고, 머지 블록이 아닌 블록에는 도 14 및 도 15에 따른 시간적 움직임 정보 도출 방법이 적용될 수 있다. 이 때, 머지 블록에서는 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, 입력 시간적 움직임 정보 도출에 사용된 콜 블록이 아닌 새로이 도출된 콜 블록의 움직임 정보가 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 수 있다. 또한, 머지 블록이 아닌 블록에서는, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, L1 참조 픽쳐의 움직임 정보가 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 수 있다.In another embodiment, the method for deriving temporal motion information according to the embodiments of FIGS. 9 to 11 may be applied to the merge block, and the method for deriving temporal motion information according to FIGS. 14 and 15 may be applied to a block other than the merge block. At this time, in the merge block, when the L0 input temporal motion information and the L1 input temporal motion information are the same, the motion information of the newly derived call block, not the call block used to derive the input temporal motion information, is the final L1 temporal motion information of the current block. Can be used as In addition, in a block other than the merge block, when the L0 input temporal motion information and the L1 input temporal motion information are the same, the motion information of the L1 reference picture may be used as the final L1 temporal motion information of the current block.

또 다른 실시예로, 머지 블록에는 도 6 내지 8의 실시예에 따른 시간적 움직임 정보 도출 방법이 적용되고, 머지 블록이 아닌 블록에는 도 14 및 도 15에 따른 시간적 움직임 정보 도출 방법이 적용될 수 있다. 이 때, 머지 블록에서는 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, 복원된 주변 블록의 움직임 정보가 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 수 있다. 또한, 머지 블록이 아닌 블록에서는, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, L1 참조 픽쳐의 움직임 정보가 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 수 있다.In another embodiment, the method for deriving temporal motion information according to the embodiments of FIGS. 6 to 8 may be applied to the merge block, and the method for deriving temporal motion information according to FIGS. 14 and 15 may be applied to a block other than the merge block. At this time, in the merge block, when the L0 input temporal motion information and the L1 input temporal motion information are the same, the restored motion information of the neighboring block may be used as the final L1 temporal motion information of the current block. In addition, in a block other than the merge block, when the L0 input temporal motion information and the L1 input temporal motion information are the same, the motion information of the L1 reference picture may be used as the final L1 temporal motion information of the current block.

도 6 내지 도 15의 실시예들의 조합은 상술한 실시예에 한정되는 것이 아니며, 구현 및/또는 필요에 따라 상술한 실시예들 뿐만 아니라 다양한 형태의 조합이 제공될 수 있다.The combination of the embodiments of FIGS. 6 to 15 is not limited to the above-described embodiment, and various types of combinations may be provided as well as the above-described embodiments according to implementation and / or needs.

상술한 실시예들에서, 방법들은 일련의 단계 또는 블록으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the above-described embodiments, the methods are described based on a flow chart as a series of steps or blocks, but the present invention is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with the other steps as described above. You can. In addition, those skilled in the art may recognize that the steps shown in the flowchart are not exclusive, other steps are included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention. You will understand.

상술한 실시예는 다양한 양태의 예시들을 포함한다. 다양한 양태들을 나타내기 위한 모든 가능한 조합을 기술할 수는 없지만, 해당 기술 분야의 통상의 지식을 가진 자는 다른 조합이 가능함을 인식할 수 있을 것이다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.The above-described embodiment includes examples of various aspects. It is not possible to describe all possible combinations for representing various aspects, but a person skilled in the art will recognize that other combinations are possible. Accordingly, the present invention will be said to include all other replacements, modifications and changes that fall within the scope of the following claims.

Claims (3)

현재 블록의 공간적 주변 블록을 이용하여, 현재 블록의 공간적 움직임 벡터를 도출하는 단계;
콜 픽쳐 정보를 기반으로, 상기 현재 블록의 콜 픽쳐를 결정하는 단계; 여기서, 상기 콜 픽쳐 정보는 참조 픽쳐 리스트 내의 참조 픽쳐들 중에서 상기 현재 블록의 콜 픽쳐로 결정되는 픽쳐를 특정하는 정보임,
상기 콜 픽쳐 내에서 상기 현재 블록에 대응하는 콜 블록의 움직임 벡터를 기반으로 시간적 움직임 벡터를 도출하는 단계; 여기서, 상기 콜 블록은 현재 블록의 우측-하단 픽셀의 위치를 포함하는 제1 블록 또는 상기 현재 블록의 중앙 위치를 포함하는 제2 블록 중 어느 하나에 따라 결정되며,
상기 공간적 움직임 벡터 및 상기 시간적 움직임 벡터를 이용하여 상기 현재 블록에 대한 예측 움직임 벡터 후보 리스트를 생성하는 단계;
상기 예측 움직임 벡터 후보 리스트에 기반하여 상기 현재 블록의 움직임 벡터를 도출하는 단계; 및
상기 도출된 움직임 벡터에 기반하여 상기 현재 블록에 대한 움직임 보상을 수행하는 단계를 포함하되,
상기 콜 픽쳐 정보는 부호화기로부터 전송되는 것을 특징으로 하는, 영상 복호화 방법.
Deriving a spatial motion vector of the current block using the spatial neighboring block of the current block;
Determining a call picture of the current block based on call picture information; Here, the call picture information is information specifying a picture determined as a call picture of the current block among reference pictures in a reference picture list,
Deriving a temporal motion vector based on a motion vector of a call block corresponding to the current block in the call picture; Here, the call block is determined according to either the first block including the position of the lower-right pixel of the current block or the second block including the center position of the current block,
Generating a predicted motion vector candidate list for the current block using the spatial motion vector and the temporal motion vector;
Deriving a motion vector of the current block based on the predicted motion vector candidate list; And
And performing motion compensation for the current block based on the derived motion vector,
The call picture information is transmitted from the encoder, characterized in that the video decoding method.
현재 블록의 움직임 벡터를 도출하는 단계;
상기 도출된 움직임 벡터에 기반하여 상기 현재 블록에 대해 움직임 보상을 수행함으로써, 상기 현재 블록에 대응하는 예측 블록을 생성하는 단계;
상기 현재 블록의 공간적 주변 블록을 이용하여, 현재 블록의 공간적 움직임 벡터를 도출하는 단계;
상기 현재 블록의 콜 픽쳐를 결정하는 단계;
상기 콜 픽쳐 내에서 상기 현재 블록에 대응하는 콜 블록의 움직임 벡터를 기반으로 시간적 움직임 벡터를 도출하는 단계; 여기서, 상기 콜 블록은 현재 블록의 우측-하단 픽셀의 위치를 포함하는 제1 블록 또는 상기 현재 블록의 중앙 위치를 포함하는 제2 블록 중 어느 하나에 따라 결정되며,
상기 공간적 움직임 벡터 및 상기 시간적 움직임 벡터를 이용하여 상기 현재 블록에 대한 예측 움직임 벡터 후보 리스트를 생성하는 단계; 및
상기 콜 픽쳐에 대한 콜 픽쳐 정보를 비트스트림에 부호화하는 단계를 포함하되,
상기 콜 픽쳐 정보는 참조 픽쳐 리스트 내의 참조 픽쳐들 중에서 상기 현재 블록의 콜 픽쳐로 결정되는 픽쳐를 특정하는 정보이며, 상기 비트스트림을 통해 복호화기로 시그널링되는 것을 특징으로 하는, 영상 부호화 방법.
Deriving a motion vector of the current block;
Generating a prediction block corresponding to the current block by performing motion compensation on the current block based on the derived motion vector;
Deriving a spatial motion vector of the current block using the spatial neighboring block of the current block;
Determining a call picture of the current block;
Deriving a temporal motion vector based on a motion vector of a call block corresponding to the current block in the call picture; Here, the call block is determined according to either the first block including the position of the lower-right pixel of the current block or the second block including the center position of the current block,
Generating a predicted motion vector candidate list for the current block using the spatial motion vector and the temporal motion vector; And
And encoding call picture information for the call picture into a bitstream,
The call picture information is information specifying a picture determined as a call picture of the current block among reference pictures in a reference picture list, and is signaled to a decoder through the bitstream.
현재 블록의 움직임 벡터를 도출하는 단계;
상기 도출된 움직임 벡터에 기반하여 상기 현재 블록에 대해 움직임 보상을 수행함으로써, 상기 현재 블록에 대응하는 예측 블록을 생성하는 단계;
상기 현재 블록의 공간적 주변 블록을 이용하여, 현재 블록의 공간적 움직임 벡터를 도출하는 단계;
상기 현재 블록의 콜 픽쳐를 결정하는 단계;
상기 콜 픽쳐 내에서 상기 현재 블록에 대응하는 콜 블록의 움직임 벡터를 기반으로 시간적 움직임 벡터를 도출하는 단계; 여기서, 상기 콜 블록은 현재 블록의 우측-하단 픽셀의 위치를 포함하는 제1 블록 또는 상기 현재 블록의 중앙 위치를 포함하는 제2 블록 중 어느 하나에 따라 결정되며,
상기 공간적 움직임 벡터 및 상기 시간적 움직임 벡터를 이용하여 상기 현재 블록에 대한 예측 움직임 벡터 후보 리스트를 생성하는 단계; 및
상기 콜 픽쳐에 대한 콜 픽쳐 정보를 비트스트림에 부호화하는 단계를 포함하되,
상기 콜 픽쳐 정보는 참조 픽쳐 리스트 내의 참조 픽쳐들 중에서 상기 현재 블록의 콜 픽쳐로 결정되는 픽쳐를 특정하는 정보이며, 상기 비트스트림을 통해 복호화기로 시그널링되는 것을 특징으로 하는 영상 부호화 방법에 의해 생성된 비트스트림을 저장하는 기록 매체.
Deriving a motion vector of the current block;
Generating a prediction block corresponding to the current block by performing motion compensation on the current block based on the derived motion vector;
Deriving a spatial motion vector of the current block using the spatial neighboring block of the current block;
Determining a call picture of the current block;
Deriving a temporal motion vector based on a motion vector of a call block corresponding to the current block in the call picture; Here, the call block is determined according to either the first block including the position of the lower-right pixel of the current block or the second block including the center position of the current block,
Generating a predicted motion vector candidate list for the current block using the spatial motion vector and the temporal motion vector; And
And encoding call picture information for the call picture into a bitstream,
The call picture information is information specifying a picture determined as a call picture of the current block among reference pictures in a reference picture list, and is generated by the video encoding method characterized in that it is signaled to a decoder through the bitstream. Recording medium for storing streams.
KR1020200035119A 2011-07-12 2020-03-23 Method for inter prediction and apparatus thereof KR102216320B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210018003A KR102320585B1 (en) 2011-07-12 2021-02-09 Method for inter prediction and apparatus thereof

Applications Claiming Priority (8)

Application Number Priority Date Filing Date Title
KR1020110069166 2011-07-12
KR20110069166 2011-07-12
KR20110071171 2011-07-18
KR1020110071171 2011-07-18
KR20110071658 2011-07-19
KR1020110071658 2011-07-19
KR20110082395 2011-08-18
KR1020110082395 2011-08-18

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020190069185A Division KR102094436B1 (en) 2011-07-12 2019-06-12 Method for inter prediction and apparatus thereof

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020210018003A Division KR102320585B1 (en) 2011-07-12 2021-02-09 Method for inter prediction and apparatus thereof

Publications (2)

Publication Number Publication Date
KR20200034701A true KR20200034701A (en) 2020-03-31
KR102216320B1 KR102216320B1 (en) 2021-02-18

Family

ID=47838553

Family Applications (15)

Application Number Title Priority Date Filing Date
KR1020120075901A KR101769576B1 (en) 2011-07-12 2012-07-12 Method for inter prediction and apparatus thereof
KR1020160070892A KR101801256B1 (en) 2011-07-12 2016-06-08 Method for inter prediction and apparatus thereof
KR1020170154780A KR101891656B1 (en) 2011-07-12 2017-11-20 Method for inter prediction and apparatus thereof
KR1020180096648A KR101990425B1 (en) 2011-07-12 2018-08-20 Method for inter prediction and apparatus thereof
KR1020180096647A KR101990424B1 (en) 2011-07-12 2018-08-20 Method for inter prediction and apparatus thereof
KR1020180096645A KR101990423B1 (en) 2011-07-12 2018-08-20 Method for inter prediction and apparatus thereof
KR1020180096644A KR101990422B1 (en) 2011-07-12 2018-08-20 Method for inter prediction and apparatus thereof
KR1020180096646A KR101965287B1 (en) 2011-07-12 2018-08-20 Method for inter prediction and apparatus thereof
KR1020190069185A KR102094436B1 (en) 2011-07-12 2019-06-12 Method for inter prediction and apparatus thereof
KR1020200035119A KR102216320B1 (en) 2011-07-12 2020-03-23 Method for inter prediction and apparatus thereof
KR1020210018003A KR102320585B1 (en) 2011-07-12 2021-02-09 Method for inter prediction and apparatus thereof
KR1020210144396A KR102420426B1 (en) 2011-07-12 2021-10-27 Method for inter prediction and apparatus thereof
KR1020220084353A KR102515824B1 (en) 2011-07-12 2022-07-08 Method for inter prediction and apparatus thereof
KR1020230039525A KR102626368B1 (en) 2011-07-12 2023-03-27 Method for inter prediction and apparatus thereof
KR1020240005610A KR20240010747A (en) 2011-07-12 2024-01-12 Method for inter prediction and apparatus thereof

Family Applications Before (9)

Application Number Title Priority Date Filing Date
KR1020120075901A KR101769576B1 (en) 2011-07-12 2012-07-12 Method for inter prediction and apparatus thereof
KR1020160070892A KR101801256B1 (en) 2011-07-12 2016-06-08 Method for inter prediction and apparatus thereof
KR1020170154780A KR101891656B1 (en) 2011-07-12 2017-11-20 Method for inter prediction and apparatus thereof
KR1020180096648A KR101990425B1 (en) 2011-07-12 2018-08-20 Method for inter prediction and apparatus thereof
KR1020180096647A KR101990424B1 (en) 2011-07-12 2018-08-20 Method for inter prediction and apparatus thereof
KR1020180096645A KR101990423B1 (en) 2011-07-12 2018-08-20 Method for inter prediction and apparatus thereof
KR1020180096644A KR101990422B1 (en) 2011-07-12 2018-08-20 Method for inter prediction and apparatus thereof
KR1020180096646A KR101965287B1 (en) 2011-07-12 2018-08-20 Method for inter prediction and apparatus thereof
KR1020190069185A KR102094436B1 (en) 2011-07-12 2019-06-12 Method for inter prediction and apparatus thereof

Family Applications After (5)

Application Number Title Priority Date Filing Date
KR1020210018003A KR102320585B1 (en) 2011-07-12 2021-02-09 Method for inter prediction and apparatus thereof
KR1020210144396A KR102420426B1 (en) 2011-07-12 2021-10-27 Method for inter prediction and apparatus thereof
KR1020220084353A KR102515824B1 (en) 2011-07-12 2022-07-08 Method for inter prediction and apparatus thereof
KR1020230039525A KR102626368B1 (en) 2011-07-12 2023-03-27 Method for inter prediction and apparatus thereof
KR1020240005610A KR20240010747A (en) 2011-07-12 2024-01-12 Method for inter prediction and apparatus thereof

Country Status (1)

Country Link
KR (15) KR101769576B1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10742971B2 (en) 2016-10-05 2020-08-11 Lg Electronics Inc. Inter prediction method and device that performs prediction by applying weights to motion information of a current block
WO2018128228A1 (en) * 2017-01-03 2018-07-12 엘지전자 주식회사 Image decoding method and device in image coding system
CN107370807B (en) * 2017-07-12 2020-05-08 中南大学 Server based on transparent service platform data access and cache optimization method thereof
US11425390B2 (en) 2018-01-26 2022-08-23 Electronics And Telecommunications Research Institute Method and apparatus for image encoding and image decoding using temporal motion information
WO2019147067A1 (en) * 2018-01-26 2019-08-01 한국전자통신연구원 Method and apparatus for image encoding and image decoding using temporal motion information
JP2021516006A (en) 2018-07-02 2021-06-24 エルジー エレクトロニクス インコーポレイティド Video processing method based on inter-prediction mode and equipment for that
EP3833020A4 (en) 2018-07-27 2022-04-27 Samsung Electronics Co., Ltd. Method and device for encoding image and method and device for decoding image on basis of sub-block

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090012986A (en) * 2007-07-30 2009-02-04 한국정보통신대학교 산학협력단 A fast inter-layer prediction mode decision method in scalable video coding
JP2012191513A (en) * 2011-03-11 2012-10-04 Sony Corp Image processing apparatus and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090012986A (en) * 2007-07-30 2009-02-04 한국정보통신대학교 산학협력단 A fast inter-layer prediction mode decision method in scalable video coding
JP2012191513A (en) * 2011-03-11 2012-10-04 Sony Corp Image processing apparatus and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Benjamin Bross et al., "WD5: Working draft 5 of High-Efficiency Video Coding", Joint Collaborative Team on Video Coding of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 7nd meeting , Geneva, 21-30, Nov.,* *

Also Published As

Publication number Publication date
KR101965287B1 (en) 2019-08-08
KR20210019047A (en) 2021-02-19
KR20180095487A (en) 2018-08-27
KR20170131321A (en) 2017-11-29
KR20180095486A (en) 2018-08-27
KR20190070313A (en) 2019-06-20
KR20160072836A (en) 2016-06-23
KR101801256B1 (en) 2017-11-27
KR102515824B1 (en) 2023-03-30
KR102094436B1 (en) 2020-03-30
KR102216320B1 (en) 2021-02-18
KR102420426B1 (en) 2022-07-14
KR20180095489A (en) 2018-08-27
KR20240010747A (en) 2024-01-24
KR20180095488A (en) 2018-08-27
KR20130008481A (en) 2013-01-22
KR101990424B1 (en) 2019-06-19
KR20220100847A (en) 2022-07-18
KR102626368B1 (en) 2024-01-17
KR101769576B1 (en) 2017-08-18
KR101990423B1 (en) 2019-06-19
KR102320585B1 (en) 2021-11-02
KR20180095490A (en) 2018-08-27
KR101891656B1 (en) 2018-08-27
KR101990422B1 (en) 2019-06-19
KR20210131299A (en) 2021-11-02
KR20230043818A (en) 2023-03-31
KR101990425B1 (en) 2019-06-19

Similar Documents

Publication Publication Date Title
US11917193B2 (en) Inter prediction method and apparatus for same
KR102094436B1 (en) Method for inter prediction and apparatus thereof
KR20230008903A (en) Method and apparatus for picture encoding/decoding
KR20200027487A (en) Method for inter prediction and apparatus thereof

Legal Events

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