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

Method for inter prediction and apparatus thereof Download PDF

Info

Publication number
KR20130008481A
KR20130008481A KR1020120075901A KR20120075901A KR20130008481A KR 20130008481 A KR20130008481 A KR 20130008481A KR 1020120075901 A KR1020120075901 A KR 1020120075901A KR 20120075901 A KR20120075901 A KR 20120075901A KR 20130008481 A KR20130008481 A KR 20130008481A
Authority
KR
South Korea
Prior art keywords
motion information
block
reference picture
current block
decoder
Prior art date
Application number
KR1020120075901A
Other languages
Korean (ko)
Other versions
KR101769576B1 (en
Inventor
김휘용
박광훈
김경용
김상민
임성창
이진호
최진수
김진웅
Original Assignee
경희대학교 산학협력단
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority to US14/131,734 priority Critical patent/US9819963B2/en
Priority to PCT/KR2012/005531 priority patent/WO2013009104A2/en
Application filed by 경희대학교 산학협력단, 한국전자통신연구원 filed Critical 경희대학교 산학협력단
Publication of KR20130008481A publication Critical patent/KR20130008481A/en
Application granted granted Critical
Publication of KR101769576B1 publication Critical patent/KR101769576B1/en
Priority to US15/706,884 priority patent/US10136157B2/en
Priority to US16/133,133 priority patent/US10757443B2/en
Priority to US16/133,121 priority patent/US10659811B2/en
Priority to US16/133,303 priority patent/US10757444B2/en
Priority to US16/132,949 priority patent/US10659810B2/en
Priority to US16/132,886 priority patent/US10587893B2/en
Priority to US16/781,438 priority patent/US11917193B2/en
Priority to US18/413,605 priority patent/US20240155152A1/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/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/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

Landscapes

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

Abstract

PURPOSE: An inter prediction method and a device thereof are provided to reduce calculation complexity by performing a motion compensation process when L0 motion information and L1 motion information are same. CONSTITUTION: A motion prediction unit derives motion information of a current block as motion information including L0 motion information and L1 motion information. A motion compensation unit(250) performs motion compensation for the current block based on one or more of the L0 motion information and the L1 motion information. A reconstruction block generating unit generates a reconstruction block corresponding to the current block based on a generated prediction block. [Reference numerals] (210) Entropy decoding unit; (220) Inverse quantization unit; (230) Inverse change unit; (240) Intra prediction unit; (250) Motion compensation unit; (260) Filter unit; (270) Reference picture buffer; (AA) Bit stream; (BB) Intra; (CC) Inter; (DD) Reconstructed image

Description

인터 예측 방법 및 그 장치 {METHOD FOR INTER PREDICTION AND APPARATUS THEREOF}Inter prediction method and apparatus therefor {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 the broadcasting service having high definition (HD) resolution has been expanded not only in Korea but also in the world, many users are getting used to high resolution and high quality video, and many organizations are accelerating the development of next generation video equipment. In addition, as interest in Ultra High Definition (UHD), which has four times the resolution of HDTV, is increasing along with HDTV, a compression technology for higher resolution and higher quality images is required.

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

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

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

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

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

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

본 발명의 일 실시 형태는 영상 복호화 장치이다. 상기 장치는, L0 움직임 정보 및 L1 움직임 정보를 포함하는 움직임 정보로서 현재 블록의 움직임 정보를 도출하는 움직임 예측부, 상기 L0 움직임 정보 및 상기 L1 움직임 정보 중에서 적어도 하나를 기반으로 상기 현재 블록에 대해 움직임 보상을 수행함으로써, 상기 현재 블록에 대응하는 예측 블록을 생성하는 움직임 보상부 및 상기 예측 블록을 기반으로 상기 현재 블록에 대응하는 복원 블록을 생성하는 복원 블록 생성부를 포함하되, 상기 움직임 보상부는, 상기 L0 움직임 정보 및 상기 L1 움직임 정보의 동일성 여부를 기반으로 상기 움직임 보상을 수행한다.One embodiment of the present invention is a video decoding apparatus. The apparatus may include a motion predictor that derives motion information of a current block as motion information including L0 motion information and L1 motion information, and moves on the current block based on at least one of the L0 motion information and the L1 motion information. By performing the compensation, a motion compensation unit for generating a prediction block corresponding to the current block and a reconstruction block generation unit for generating a reconstruction block corresponding to the current block based on the prediction block, wherein the motion compensation unit, 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, the L0 reference picture number indicates a picture order count (POC) assigned to an L0 reference picture, and the L1 motion information refers to an L1 motion vector and L1. It includes a picture number, the L1 reference picture number may indicate a POC (Picture Order Count) 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 compensator is based on the L0 motion information among the L0 motion information and the L1 motion information. Uni prediction may 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 the L0 reference picture number and the L1 reference picture number are not equal to each other, 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 a video decoding apparatus. The apparatus may include a motion predictor that derives motion information of a current block as motion information including L0 motion information and L1 motion information, and moves on the current block based on at least one of the L0 motion information and the L1 motion information. By performing the compensation, a motion compensation unit for generating a prediction block corresponding to the current block and a reconstruction block generation unit for generating a reconstruction block corresponding to the current block based on the prediction block, wherein the motion compensation unit, 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 compensator 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 device. The apparatus may include: a motion predictor for deriving motion information from a picture reconstructed already; a motion compensator for generating a prediction block corresponding to a current block based on the derived motion information; And a reconstruction block generation unit configured to generate a corresponding reconstruction block, wherein the motion information includes a motion vector and a reference picture index, wherein the motion predictor sets the reference picture index to 0, and The motion vector is derived based on a call block corresponding to the current block in the reconstructed picture.

상기 현재 블록의 부호화 모드는 머지(merge) 모드이고, 상기 움직임 보상부는, 상기 시간적 움직임 정보를 상기 현재 블록의 움직임 정보로 선택하고, 상기 선택된 움직임 정보를 기반으로 움직임 보상을 수행함으로써, 상기 현재 블록에 대응하는 예측 블록을 생성할 수 있다.The encoding mode of the current block is a merge mode, and the motion compensator selects the temporal motion information as motion information of the current block and performs motion compensation based on the selected motion information, thereby providing 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 coding efficiency may be improved.

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

본 발명에 따른 시간적 움직임 정보 도출 방법에 의하면, 영상 부호화 효율이 향상될 수 있다.According to the method of 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 illustrating a configuration of an image encoding apparatus according to an embodiment of the present invention.
2 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment of the present invention.
3 is a flowchart schematically illustrating an embodiment of an inter prediction method.
4 is a diagram schematically illustrating 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 illustrating an embodiment of a method for deriving temporal motion information of a current block according to the present invention.
7 is a diagram schematically illustrating an embodiment of a reconstructed neighboring block used for resetting L1 temporal motion information.
FIG. 8 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. 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.
FIG. 11 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. 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.
FIG. 13 is a block diagram schematically illustrating an embodiment of an inter prediction apparatus capable of performing a motion information derivation process according to the embodiment of FIG. 12.
14 is a flowchart schematically illustrating still another embodiment of a method for deriving temporal motion information of a current block according to the present invention.
FIG. 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 the following description of the embodiments of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present disclosure rather unclear.

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

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

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

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

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

도 1을 참조하면, 상기 영상 부호화 장치(100)는 움직임 예측부(111), 움직임 보상부(112), 인트라 예측부(120), 스위치(115), 감산기(125), 변환부(130), 양자화부(140), 엔트로피 부호화부(150), 역양자화부(160), 역변환부(170), 가산기(175), 필터부(180) 및 참조 픽쳐 버퍼(190)를 포함한다. 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, a transform unit 130, A quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transformation 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 bit stream. Intra prediction means intra prediction and inter prediction means inter prediction. In the intra mode, the switch 115 is switched to the intra mode, and in the inter mode, the switch 115 can be switched to the inter mode. The image encoding apparatus 100 may generate a prediction block for an input block of an 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 the pixel value of the already coded block around the current block.

인터 모드인 경우, 움직임 예측부(motion estimator)(111)는, 움직임 예측 과정에서 참조 픽쳐 버퍼(190)에 저장되어 있는 참조 영상에서 입력 블록과 가장 매치가 잘 되는 영역을 찾아 움직임 벡터를 구할 수 있다. 움직임 보상부(112)는 움직임 벡터를 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. In 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 by a difference between the input block and the generated prediction block. The transforming unit 130 may perform a transform on the residual block to output a transform coefficient. The quantization unit 140 may quantize the input transform coefficient according to the quantization parameter to output a quantized coefficient.

엔트로피 부호화부(150)는, 양자화부(140)에서 산출된 값(예를 들어, 양자화된 계수)들 및/또는 부호화 과정에서 산출된 부호화 파라미터 값 등을 기초로 엔트로피 부호화를 수행하여 비트스트림(bit stream)을 출력할 수 있다. The entropy encoder 150 performs entropy encoding based on values (eg, quantized coefficients) calculated in the quantization unit 140 and / or encoding parameter values calculated in the encoding process to perform a 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 large number of bits are allocated to a symbol having a low probability of occurrence, thereby expressing symbols, The size of the column can be reduced. Therefore, the compression performance of the image encoding can be enhanced through the entropy encoding. The entropy encoder 150 may use an encoding method such as exponential golomb, context-adaptive variable length coding (CAVLC), or 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 current encoded image needs to be decoded and stored to be used as a reference image. Accordingly, the quantized coefficients are inversely quantized in the inverse quantization unit 160 and inversely transformed in the inverse transformation unit 170. The inverse quantized and inverse transformed coefficients are added to the prediction block through the adder 175 and a reconstruction 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 or more of a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the reconstruction block or the reconstruction picture. can do. The filter unit 180 may be referred to as an adaptive in-loop filter. The deblocking filter may remove block distortion and / or blocking artifacts that occur at the boundaries between blocks. The SAO may add a proper offset value to the pixel value to compensate for coding errors. The ALF may perform filtering based on a value obtained by comparing the reconstructed image with the original image, and 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 illustrating a configuration of an image decoding apparatus according to an embodiment of the present invention.

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

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

엔트로피 복호화부(210)는, 입력된 비트스트림을 확률 분포에 따라 엔트로피 복호화하여, 양자화된 계수(quantized coefficient) 형태의 심볼을 포함한 심볼들을 생성할 수 있다. 엔트로피 복호화 방법은 상술한 엔트로피 부호화 방법과 유사하다.The entropy decoding unit 210 may entropy-decode the input bitstream according to a probability distribution to generate symbols including a symbol of a quantized coefficient type. 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 assigned to a symbol having a high probability of occurrence, and a large number of bits are assigned to a symbol having a low probability of occurrence, so that the size of a bit string for each symbol is Can be reduced. Therefore, the compression performance of image decoding can be improved through an entropy decoding method.

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

인트라 모드인 경우, 인트라 예측부(240)는 현재 블록 주변의 이미 복호화된 블록의 픽셀값을 이용하여 공간적 예측을 수행하여 예측 블록을 생성할 수 있다. 인터 모드인 경우, 움직임 보상부(250)는 움직임 벡터 및 참조 픽쳐 버퍼(270)에 저장되어 있는 참조 영상을 이용하여 움직임 보상을 수행함으로써 예측 블록을 생성할 수 있다. In the intra mode, the intra predictor 240 may generate a prediction block by performing spatial prediction using pixel values of blocks that are already decoded around the current block. In the inter mode, the motion compensator 250 may generate a predictive block by performing motion compensation using the reference image stored in the motion vector and 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 or more of the deblocking filter, SAO, and ALF to the reconstructed block or the reconstructed picture. The filter unit 260 may output a reconstructed image, that is, a reconstructed image. The reconstructed picture 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. When encoding or decoding an image, an encoding or decoding unit refers to a divided unit when an image is divided and encoded or decoded, and thus, a coding unit (CU), a prediction unit (PU), and a transformation unit (TU). It may be called a Transform Unit, a transform block, or the like. One block may be further divided into smaller sub-blocks. Further, in the present specification, the term "picture" may be replaced with "frame", "field" and / or "slice" depending on the context, and such classification can be easily made by those skilled in the art There will be. For example, P pictures, B pictures, and forward B pictures described below may be replaced with P slices, B slices, and forward B slices according to context.

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

도 3을 참조하면, 부호화기 및 복호화기는 현재 블록에 대한 움직임 정보를 도출할 수 있다(S310). Referring to FIG. 3, the encoder and the decoder may derive motion information about the 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 the current block and then perform inter prediction and / or motion compensation based on the derived motion information. In this case, the encoder and the decoder may extract motion information of a coll block corresponding to the current block in a neighboring block and / or a coll picture that has already been restored. By using this, the encoding / decoding efficiency can be improved. Here, the reconstructed neighboring block may include a block adjacent to the current block and / or a block located at the outer corner of the current block, which is a block in the current picture reconstructed by decoding and / or decoding. In addition, the encoder and the decoder may determine a predetermined relative position based on a block that exists at the same spatial position as the current block within the call picture, and the determined predetermined relative position (exists at the same spatial position as the current block). The call block can be derived based on the location of the inside and / or outside of the block). Here, for example, the call picture may correspond to one picture among the reference pictures included in the reference picture list.

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

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

부호화기는 현재 블록의 움직임 벡터와 예측 움직임 벡터 간의 움직임 벡터 차분(MVD: Motion Vector Difference)을 구할 수 있고, 이를 부호화하여 복호화기로 전송할 수 있다. 이 때, 복호화기는 수신된 움직임 벡터 차분을 복호화할 수 있고, 복호화된 움직임 벡터 차분과 예측 움직임 벡터의 합을 통해 현재 블록의 움직임 벡터를 도출할 수 있다.The encoder can obtain a motion vector difference (MVD) between the motion vector of the current block and the predictive motion vector, and can encode the same and transmit the same to the decoder. In this case, the decoder may 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 merge is applied, the encoder and the decoder may generate the merge candidate list using the motion information of the reconstructed neighboring block and / or the motion information of the call block. That is, the encoder and the decoder may use the motion information of the reconstructed neighboring block and / or the call block as a merge candidate for the current block.

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

상술한 AMVP 및 머지 모드에서는, 현재 블록의 움직임 정보를 도출하기 위해, 복원된 주변 블록의 움직임 정보 및/또는 콜 블록의 움직임 정보가 사용될 수 있다. 이하, 후술되는 실시예들에서, 복원된 주변 블록으로부터 도출되는 움직임 정보는 공간적 움직임 정보라 하고, 콜 블록을 기반으로 도출되는 움직임 정보는 시간적 움직임 정보라 한다. 예를 들어, 복원된 주변 블록으로부터 도출되는 움직임 벡터는 공간적 움직임 벡터, 콜 블록을 기반으로 도출되는 움직임 벡터는 시간적 움직임 벡터로 불릴 수 있다.In the above-described AMVP and merge mode, the motion information of the reconstructed neighboring block and / or the motion information of the call block may be used to derive the motion information of the current block. Hereinafter, in the embodiments described below, the motion information derived from the reconstructed neighboring block is called spatial motion information, and the motion information derived based on the call block is called temporal motion information. For example, a motion vector derived from a reconstructed neighboring block may be referred to as 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 to FIG. 3 again, the encoder and the decoder may generate a prediction block of the current block by performing motion compensation on 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, the plurality of motion compensated blocks may constitute one motion compensated image. Therefore, in the embodiments described below, the prediction block may be referred to as a 'motion compensated block' and / or a 'motion compensated image' according to the context, and this division may be easily performed by those skilled in the art. You will be able to.

한편, 인터 예측이 수행되는 픽쳐에는 P 픽쳐 및 B 픽쳐가 있을 수 있다. P 픽쳐는 하나의 참조 픽쳐를 이용한 단방향 예측이 수행되는 픽쳐를 의미할 수 있고, B 픽쳐는 하나 이상, 예를 들어 두 개의 참조 픽쳐를 이용한 순방향, 역방향 또는 양방향 예측이 수행될 수 있는 픽쳐를 의미할 수 있다. 예를 들어, B 픽쳐에서는 1개의 순방향 참조 픽쳐(과거 픽쳐) 및 1개의 역방향 참조 픽쳐(미래 픽쳐)를 이용하여 인터 예측이 수행될 수 있다. 또한, B 픽쳐에서는 2개의 순방향 참조 픽쳐를 이용하여 예측이 수행되거나, 2개의 역방향 참조 픽쳐를 이용하여 예측이 수행될 수도 있다.Meanwhile, a picture on 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 one or more reference pictures may 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, in the B picture, prediction may be performed using two forward reference pictures, 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. One reference picture is used in the P picture, and the reference picture may be allocated to reference picture list 0 (L0 or List0). Two reference pictures are used in the B picture, and the two reference pictures may be assigned 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, the forward reference picture may be assigned to the reference picture list 0 and the backward reference picture may be assigned to the reference picture list1. However, the method of allocating the reference picture is not limited thereto, and the forward reference picture may be assigned to the reference picture list 1 and the backward reference picture may be assigned to the reference picture list 0. Hereinafter, a reference picture assigned to reference picture list 0 is referred to as an L0 reference picture, and a reference picture assigned to 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) 명령에 의해 재배열될 수 있다. Reference pictures may be assigned 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 the order of POC (Picture Order Count), and the POC order may mean a display order and / or a time order of the pictures. For example, two reference pictures having the same reference picture number may correspond to the same reference picture. Reference pictures allocated to the reference picture list may be rearranged by a reference picture list reordering (RPLR) or a memory management control (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 on a P picture, and forward, reverse, or bidirectional using one L0 reference picture and one L1 reference picture, that is, two reference pictures, in a B picture. Prediction can be performed. Prediction using one reference picture may be called uni-prediction, and prediction using two reference pictures including an L0 reference picture and an 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 all of forward prediction, backward prediction, and bidirectional prediction. However, in the embodiments described below, prediction using two reference pictures (L0 reference picture and L1 reference picture) is referred to as bidirectional prediction. That is, in the following embodiments, bidirectional prediction may mean pair prediction, and may be understood as a concept including both forward, backward, and bidirectional prediction using two reference pictures (L0 reference picture and L1 reference picture). . In addition, forward prediction or backward prediction may be performed even when bi-prediction is performed. However, in the following embodiments, prediction using only one reference picture is referred to as unidirectional prediction. That is, in the embodiments described below, unidirectional prediction may mean uniprediction and should be understood as a concept including only prediction using one reference picture. In addition, information indicating whether unidirectional prediction (uniprediction) or bidirectional prediction (biprediction) is applied to a block on which prediction is performed is referred to as prediction direction information.

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

상술한 바와 같이, 부호화기 및 복호화기는 인터 예측시 단방향 예측뿐만 아니라 양방향 예측을 수행할 수 있다. 양방향 예측이 적용되는 경우, 예측이 수행되는 각각의 블록은 두 개의 참조 픽쳐(L0 참조 픽쳐 및 L1 참조 픽쳐)를 가질 수 있다. 또한 이 때, 양방향 예측이 수행되는 각각의 블록은 두 개의 움직임 정보를 가질 수 있다. 여기서, 움직임 정보는 참조 픽쳐 번호 및 움직임 벡터 등을 포함할 수 있다.As described above, the encoder and the decoder may perform bidirectional prediction as well as unidirectional prediction in inter prediction. When bidirectional prediction is applied, each block on which prediction is performed may have two reference pictures (L0 reference picture and L1 reference picture). In this case, each block in which the bidirectional prediction is performed may have two 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 each of reference picture list 0 and reference picture list 1 to use for prediction. That is, two reference pictures including an L0 reference picture and an 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 the L0 motion information is referred to as L0 motion compensation, and motion compensation using the L1 motion information is referred to as 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 the decoder may generate an L0 motion compensated block by performing an L0 motion compensation 410 on a current block by using the L0 motion information and the L0 reference picture list. In addition, the encoder and the decoder may generate the L1 motion compensated block by performing the L1 motion compensation 420 using the L1 motion information and the L1 reference picture list. In this case, the L0 motion compensation 410 and the L1 motion compensation 420 may be independently performed.

부호화기 및 복호화기는 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 to finally generate one motion compensated block. For example, the weighted average 430 may be performed in units of pixels in the L0 motion compensated block and the L1 motion compensated block. In this case, the finally generated one motion compensated block may correspond to the prediction block of the current block.

이하, 양방향 예측시에 적용되는 움직임 보상은 양방향 움직임 보상이라 한다. 이에 대응하여, 단방향 예측시에 적용되는 움직임 보상은 단방향 움직임 보상으로 불릴 수 있다.
Hereinafter, motion compensation applied at the time of bidirectional prediction is referred to as bidirectional motion compensation. Correspondingly, the motion compensation applied in the 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 video encoded in FIG. 5 corresponds to BasketballDrill. Here, BasketballDrill represents the name of a test sequence used for an image encoding / decoding experiment. The encoded image has a size of 832x480 and a POC (Picture Order Count) of 2. In addition, the 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 the decoder may use a forward B picture to improve inter prediction efficiency in a low delay 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 in which prediction is performed may have two 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, it is assumed that the L0 reference picture list and the L1 reference picture list are the same when a forward B picture is used.

복호화기는 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, or may determine whether the current picture is a forward B picture based on information transmitted from the encoder. have. For example, the encoder may encode a flag indicating whether the L0 reference picture list and the L1 reference picture list are the same and transmit the same to the decoder. In this case, 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 slice type value corresponding to the forward B picture to the decoder, and the decoder may 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. Therefore, each block in the encoded image may have up to two motion information. In this case, the motion information may include a reference picture number, a motion vector, and the like. Referring to FIG. 5, a block having the same L0 motion information (eg, reference picture number and motion vector) and L1 motion information (eg, reference picture number and motion vector) among blocks having two motion information. There may be multiple.

순방향 B 픽쳐에서 L0 움직임 정보(예를 들어, 참조 픽쳐 번호, 움직임 벡터)와 L1 움직임 정보(예를 들어, 참조 픽쳐 번호, 움직임 벡터)가 동일한 블록은, 시간적 움직임 정보 도출 방법에 기인하여 발생할 수 있다. 상술한 바와 같이, 시간적 움직임 정보는 이미 복원된 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 움직임 정보로부터 도출될 수 있다. 예를 들어, 현재 블록의 L0 시간적 움직임 정보를 도출할 때, 부호화기 및 복호화기는 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 L0 움직임 정보를 사용할 수 있다. 그러나, 상기 콜 블록에 L0 움직임 정보가 존재하지 않는 경우, 부호화기 및 복호화기는 상기 콜 블록의 L1 움직임 정보를 현재 블록의 L0 시간적 움직임 정보로 사용할 수 있다. 반대로, 현재 블록의 L1 시간적 움직임 정보를 도출할 때, 부호화기 및 복호화기는 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 L1 움직임 정보를 사용할 수 있다. 그러나, 상기 콜 블록에 L1 움직임 정보가 존재하지 않는 경우, 부호화기 및 복호화기는 상기 콜 블록의 L0 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 상술한 프로세스 수행 결과, 현재 블록의 L0 움직임 정보와 L1 움직임 정보가 동일해지는 현상이 발생할 수 있다. 따라서, 본 명세서에서 L0 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)와 L1 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)가 동일한 경우, 및/또는 L0 시간적 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)와 L1 시간적 움직임 정보(예를 들어, 참조 픽쳐 번호 및 움직임 벡터)가 동일한 경우는, 이미 복원된 콜 픽쳐 내에서 현재 블록에 대응하는 콜 블록의 움직임 정보가 L0 움직임 정보 및 L1 움직임 정보 중에서 하나만을 갖는 경우를 포함할 수 있다.A block having the same L0 motion information (eg, reference picture number and motion vector) and L1 motion information (eg, reference picture number and motion vector) in a forward B picture may occur due to a method of deriving temporal motion information. have. As described above, the temporal motion information may be derived from the motion information of the call block corresponding to the current block in the already restored call picture. 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, when there is no L0 motion information in the call block, the encoder and the decoder may use the L1 motion information of the call block as the L0 temporal motion information of the current block. Conversely, when deriving L1 temporal motion information of the current block, the encoder and decoder may use the L1 motion information of the call block corresponding to the current block in the call picture. However, when L1 motion information does not exist in the call block, the encoder and the decoder may use the L0 motion information of the call block as the L1 temporal motion information of the current block. As a result of the above-described process, a phenomenon may occur in which the L0 motion information and the L1 motion information of the current block are the same. Accordingly, in the present 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, when the reference picture number and the motion vector) and the L1 temporal motion information (for example, the reference picture number and the motion vector) are the same, the motion information of the call block corresponding to the current block is L0 in the call picture that has already been restored. It may include a case having only one of the motion information and the 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 merge is applied, the motion information (L0 motion information and L1 motion information) of the restored neighboring block and / or the call block may be used as the motion information of the current block. Therefore, when a block having the same L0 motion information and L1 motion information is generated, more other 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 the L0 motion information and the L1 motion information are the same, the same process may be repeatedly performed twice in one block. Since this is very inefficient from an encoding point of view, an inter prediction method and / or a motion compensation method capable of solving the above-described problems, reducing computational complexity and improving encoding efficiency 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, 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 may perform L0 motion information and / or L1 motion. It is also possible to increase the coding efficiency by resetting the information.

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

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

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

도 6을 참조하면, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 시간적 움직임 정보에서 L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일한지 여부, 즉 L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일하고 L0 움직임 벡터와 L1 움직임 벡터가 동일한지 여부를 판단할 수 있다(S610).Referring to FIG. 6, the encoder and the 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, the L0 reference picture number and the L1 reference picture number are the same and the L0 motion is the same. 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, if 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 the decoder call. The temporal motion information derived based on the block may be used as temporal motion information on the current block as it is. When AMVP is applied, temporal motion information of the current block may be determined or registered as a predictive motion vector candidate for the current block. In addition, 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). 예를 들어, 이 때 부호화기 및 복호화기는 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 복원된 주변 블록 중에서 움직임 정보를 갖는 블록이 존재하는지 여부를 판단할 수 있다. 여기서, 복원된 주변 블록은 이미 부호화 및/또는 복호화되어 복원된 현재 픽쳐 내의 블록으로서, 현재 블록에 인접한 블록 및/또는 현재 블록의 외부 코너에 위치한 블록을 포함할 수 있다.If the L0 temporal motion information and the L1 temporal motion information are the same, the encoder and the decoder may determine whether the motion information of the reconstructed neighboring block exists or not (S620). For example, at this time, the encoder and the decoder may determine whether a block having motion information exists among the reconstructed neighboring blocks at the predetermined position and / or the position selected by the predetermined method. Here, the reconstructed neighboring block may include a block adjacent to the current block and / or a block located at the outer corner of the current block, which is a block in the current picture reconstructed by decoding and / or decoding.

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

복원된 주변 블록의 움직임 정보가 존재하는 경우(예를 들어, 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 복원된 주변 블록 중에서 움직임 정보를 갖는 블록이 존재하는 경우), 부호화기 및 복호화기는 상기 복원된 주변 블록의 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다(S640). 즉, 이 때 부호화기 및 복호화기는 현재 블록의 L1 시간적 움직임 정보를 상기 복원된 주변 블록의 움직임 정보로 재설정할 수 있다. L1 시간적 움직임 정보의 설정을 위해 사용되는 복원된 주변 블록의 구체적인 실시예는 후술하기로 한다.
If there is motion information of the reconstructed neighboring block (for example, if there is a block with motion information among the reconstructed neighboring blocks of the predetermined position and / or the position selected by the predetermined method), the encoder and the decoder may The reconstructed motion information of the neighboring block may be used as L1 temporal motion information of the current block (S640). That is, at this time, the encoder and the decoder may reset the L1 temporal motion information of the current block to the motion information of the reconstructed 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 of 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, the steps of S620 and S640 may be omitted in the above-described embodiment. At this time, when the L0 temporal motion information and the L1 temporal motion information are the same, the encoder and the decoder may set the prediction direction information of the current block to unidirectional prediction (S630). In this case, 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 과정의 수행 여부를 결정할 수도 있다. Meanwhile, in the above-described embodiment, whether to perform the processes S620 to S640 is determined based on the sameness of the L0 temporal motion information and the L1 temporal motion information, but the encoder and the decoder determine whether to perform the processes S620 to S640 based on other conditions. It may 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 the temporal motion information derived based on the 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 the 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. Therefore, 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 instead of bidirectional prediction. This is because, when the prediction direction of the call block is unidirectional prediction, L0 temporal motion information and L1 temporal motion information may be the same in temporal motion information derived based on the call block.

또 다른 실시예로, 부호화기 및 복호화기는 콜 블록에 움직임 정보가 존재하는지 여부에 관한 정보를 기반으로 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 exists 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 may be reset instead of the L1 temporal motion information. That is, the encoder and the decoder may set the L0 temporal motion information as the motion information of the reconstructed neighboring block, and may perform unidirectional prediction instead of bidirectional prediction on the current block. In addition, when there is no motion information in the call block, in step S640, the encoder and the 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 the 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 the 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 the decoder may determine whether the size of the current block is smaller than a predetermined size. Here, the current block may be a CU, a PU, and / or a TU, and the predetermined size may be, for example, one of 8x8, 16x16, or 32x32. In this case, the encoder and the decoder may perform processes S620 to S640 when the size of the current block is smaller than the 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 the zero vector (0,0) in the motion information of the call block. In this case, in step S640, the encoder and the decoder 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. As another example, the motion vector (0) corresponds to the zero vector (0,0). May be set to 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, the encoder and the decoder may reset the motion vector (s) not corresponding to the zero vector (0,0), and the 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 과정의 수행 여부가 결정되는 조건은 상술한 실시예에 한정되지 않으며, 조건 및/또는 필요에 따라 다양한 조건이 적용될 수 있다.
Conditions for determining whether to perform the processes S620 to S640 are not limited to the above-described embodiment, 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 decoder may use the candidate having the least difference from the motion vector of the current block among the prediction motion vector candidates in the prediction motion vector candidate list as the prediction motion vector of the current block, and merge is applied. In this case, the encoder and / or decoder may use a merge candidate capable of providing optimal encoding efficiency among the 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 contain temporal motion information and / or spatial motion information, as a result, motion information (eg, reference picture number, motion information, etc.) of the current block may be restored. Can be derived based on the motion information of the block. Therefore, 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 the above-described restored neighboring block is present may be omitted. Hereinafter, in the following embodiments, the motion information candidate list may be understood as a concept including a predicted motion vector candidate list and a merge candidate list.

상술한 바와 같이, 부호화기 및 복호화기는 현재 블록의 움직임 정보 후보 리스트를 기반으로, 현재 블록의 L1 시간적 움직임 정보를 재설정할 수 있다. 즉, 부호화기 및 복호화기는 현재 블록의 움직임 정보 후보 리스트에 포함된 움직임 정보 후보 중에서 하나를 L1 시간적 움직임 정보로 사용할 수 있다. 현재 블록의 움직임 정보 후보 리스트에서 L1 시간적 움직임 정보로 사용되는 움직임 정보는 다양한 방법으로 결정될 수 있다. As described above, the encoder and the 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 may 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 information 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 for motion information candidates in the motion information candidate list in order from the first motion information candidate to the last motion information candidate. In this case, 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. In this case, the encoder and the decoder may use the 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. L1 motion information may also be used. 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 the 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. In this case, 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 the decoder may use the motion vector of the first motion information candidate having the available motion vector in the motion information candidate list as the L1 temporal motion information of the current block. In this case, the encoder and the decoder may use the L0 motion information of the first motion information candidate or may use the L1 motion information of the first motion information candidate.

또 다른 실시예로, 부호화기 및 복호화기는 움직임 정보 후보 리스트 내에서 가용한 첫 번째 움직임 정보 후보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 이 경우, L1 시간적 움직임 정보의 L1 참조 픽쳐 번호는 상기 첫 번째 움직임 정보 후보의 참조 픽쳐 번호로 변경되거나 설정되고, L1 시간적 움직임 정보의 L1 움직임 벡터는 상기 첫 번째 움직임 정보 후보의 움직임 벡터로 변경되거나 설정될 수 있다. 이 때, 부호화기 및 복호화기는 상기 첫 번째 움직임 정보 후보의 L0 움직임 정보를 사용할 수도 있고, 상기 첫 번째 움직임 정보 후보의 L1 움직임 정보를 사용할 수도 있다.In another embodiment, the encoder and the decoder may use the first motion information candidate available in the motion information candidate list as the 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. Can be set. In this case, the encoder and the decoder may use the L0 motion information of the first motion information candidate or may use 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 motion information candidate list of the current block 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 embodiments, there may be no motion information available in the motion information candidate list of the current block. In this case, as an example, the encoder and the decoder may use the reconstructed motion information of the neighboring block as the L1 temporal motion information of the current block as in step S640. As another example, in this case, the encoder and the decoder may add 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 the motion information candidate list to which the motion information of the reconstructed neighboring block is added or the motion information candidate list to which the 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 motion information derived in time, the L0 temporal motion information is likely to correspond to motion information due to movement of an object. Therefore, when the encoder and the 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, the motion information having a zero vector (0,0) is not selected and is zero. It is also possible to select motion information that does not have a vector (0, 0). This is because a block having motion information corresponding to a zero vector (0, 0) is likely to correspond to a background rather 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 the decoder may select motion information that is not the same as L0 temporal motion information when searching 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. For example, as in S640 described above, when the L1 temporal motion information of the current block is derived based on the reconstructed neighboring block, the encoder and the decoder identify a block having motion information different from the L0 temporal motion information of the current block. L1 may be determined as a block used for deriving temporal motion information. In this case, the encoder and the decoder may select only the motion information whose difference from the L0 temporal motion information of the current block is less than or equal to a predetermined threshold as the motion information to be used as the L1 temporal motion information of the current block. The predetermined threshold value may be determined based on mode information of the current block, motion information of the 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 시간적 움직임 정보로 사용할 수 있다.
In addition, 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 the decoder may determine one piece of motion information from the L0 motion information and the L1 motion information as the motion information to be used as the L1 temporal motion information of the current block. For example, the encoder and the decoder may use the L0 motion information as the L1 temporal motion information of the current block in the motion information selected from the reconstructed neighboring block and / or the motion information candidate list. In this case, when the L0 motion information does not exist in the motion information and / or the motion information candidate list selected from the reconstructed neighboring block, the encoder and the decoder may use the L1 motion information as the L1 temporal motion information of the current block. . As another example, the encoder and the decoder may use the L1 motion information as the L1 temporal motion information of the current block in the motion information selected from the reconstructed neighboring block and / or the motion information candidate list. In this case, when the L1 motion information does not exist in the motion information and / or the motion information candidate list selected from the reconstructed neighboring block, the encoder and the 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, the encoder and the decoder may not use the reconstructed neighboring block motion information and / or motion information candidate list in order to reset the L1 temporal motion information (eg, the L1 motion vector) of the current block in step S640. It may be. In this case, 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, related embodiments will be described, which will be described with reference to 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 the decoder is L1 of the current block to the motion information indicating the relative position moved based on a predetermined distance and / or direction from the location 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). In one example, the encoder and decoder may be one-fourth the size (e.g., (-1,0), (1,0), ( 0, -1), (0,1), (-1, -1), (-1,1), (1, -1), (1,1), etc., where 1/4 pixel units are 1 Motion information indicating the moved position can be used as L1 temporal motion information of the current block. As another example, the encoder and the decoder may have a size of 1/2 pixel in the vertical and / or horizontal direction (eg, (-2,0), (2,0), ( 0, -2), (0,2), (-2, -2), (-2,2), (2, -2), (2,2), etc. where 1/4 pixel units are 1 Motion information indicating the moved position can be used as L1 temporal motion information of the current block. As another example, the encoder and the decoder may have integer pixel sizes (eg, (-4,0), (4,0), (0) in the vertical and / or horizontal directions at positions 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 are The motion information indicating the moved position may be used as L1 temporal motion information of the current block. On the other hand, since the motion vector includes a vertical component and a horizontal component, the above-described methods (move by 1/4 pixel size, move by 1/2 pixel size, and move by integer pixel size) are the horizontal component and the vertical direction. Each of the components may be applied independently. In this case, the moving distance in the horizontal direction and the moving distance in the vertical direction may be different from each other.

다른 실시예로, 부호화기 및 복호화기는 현재 블록의 L0 시간적 움직임 정보(L0 움직임 벡터)의 값을 다른 픽셀 단위의 값으로 변경한 후 변경된 값을 현재 블록의 L1 시간적 움직임 정보(L1 움직임 벡터)로 사용할 수 있다. 일례로, 현재 블록의 L0 시간적 움직임 정보의 값이 1/4 픽셀 단위의 값인 경우, 부호화기 및 복호화기는 쉬프트 연산 등을 기반으로 상기 L0 시간적 움직임 정보의 값을 1/2 픽셀 단위의 값으로 변경할 수 있고, 상기 변경된 값을 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 다른 예로, 현재 블록의 L0 시간적 움직임 정보의 값이 1/2 픽셀 단위의 값인 경우, 부호화기 및 복호화기는 쉬프트 연산 등을 기반으로 상기 L0 시간적 움직임 정보의 값을 정수 픽셀 단위의 값으로 변경할 수 있고, 상기 변경된 값을 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다.In another embodiment, the encoder and the decoder change the value of L0 temporal motion information (L0 motion vector) of the current block to a value in other pixel units and use the changed value as 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 the decoder may change the value of the L0 temporal motion information to a value of 1/2 pixel unit based on a shift operation. 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. The changed value may 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 / 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 temporal motion information may include not only a motion vector but also a reference picture index. 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 reference pictures derived spatially from the reconstructed neighboring block. It may be an index. In this case, the L0 reference picture index and the L1 reference picture index may be set to the smallest non-negative value of the reference picture index of the reconstructed neighboring block. Meanwhile, as another example, the L0 input reference picture index and the L1 input reference picture index may be set to 0 regardless of the 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, the resetting 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, for convenience of explanation, the temporal motion information input in step S610 before resetting temporal motion information is referred to as temporal motion information (L0 input temporal motion information and L1 input temporal motion information). . 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). The reference picture index) and the reference picture number included in the input temporal motion information are referred to as an input reference picture number (L0 input reference picture number and L1 input reference picture number).

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

일 실시예로, 부호화기 및 복호화기는 복원된 주변 블록을 기반으로 L1 입력 참조 픽쳐 인덱스를 재설정할 수 있다. 상술한 바와 같이, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 정보를 현재 블록의 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스를 상기 복원된 주변 블록의 참조 픽쳐 인덱스로 재설정함으로써 최종 L1 참조 픽쳐 인덱스를 도출할 수 있다. 다른 실시예로, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스 값을 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정함으로써 최종 L1 참조 픽쳐 인덱스를 도출할 수도 있다. In an embodiment, the encoder and the decoder may reset the L1 input reference picture index based on the reconstructed neighboring block. As described above, the encoder and the decoder may use the reconstructed motion information of the neighboring block as L1 temporal motion information of the current block. In this case, 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 the 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.) ), The encoder and the decoder may reset both the L0 input reference picture index and the L1 input reference picture index to a value of 0 to 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, there is a high probability that both the L0 reference picture index and the L1 reference picture index are both zero.

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

한편, 상술한 바와 같이 부호화기 및 복호화기는 L1 입력 시간적 움직임 정보에서 L1 입력 움직임 벡터 값을 복원된 주변 블록의 움직임 벡터와 동일한 값으로 재설정함으로써 최종 L1 시간적 움직임 벡터를 도출할 수 있다. 이 때, 상기 복원된 주변 블록의 움직임 벡터는 L1 입력 참조 픽쳐 인덱스 및/또는 재설정된 L1 참조 픽쳐 인덱스에 따라 스케일링되어 사용될 수도 있다. L1 입력 시간적 움직임 정보에서 L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 시간적 움직임 정보로 사용될 수도 있고, 상술한 실시예에서와 같이 재설정 과정을 거쳐 최종 L1 시간적 움직임 정보로 사용될 수도 있다. 이 때, 복원된 주변 블록의 움직임 벡터에 대응하는 참조 픽쳐, 및 최종 L1 참조 픽쳐 인덱스가 지시하는 참조 픽쳐는 서로 다를 수 있다. 이 경우, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 벡터에 대한 스케일링을 수행하고 스케일링된 움직임 벡터를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다.
Meanwhile, as described above, the encoder and the decoder may 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 reconstructed neighboring block in the L1 input temporal motion information. In this case, the motion vector of the reconstructed neighboring block may be scaled and used according to an L1 input reference picture index and / or a reset L1 reference picture index. In the L1 input temporal motion information, the L1 input reference picture index may be used as final L1 temporal motion information without resetting, or may be used as final L1 temporal motion information after resetting as in the above-described embodiment. In this case, the reference picture corresponding to the reconstructed motion vector of the neighboring block and the reference picture indicated by the last L1 reference picture index may be different from each other. In this case, the encoder and the 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 the resetting process of the motion vector and the resetting process of the reference picture index (eg, RefIdxLX, X = 0, 1). In the following embodiments, 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 the decoder reset the L1 input motion vector to one of the motion vectors of the reconstructed neighboring block.

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

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

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

움직임 벡터의 재설정 과정 및 참조 픽쳐 인덱스의 재설정 과정의 실시예들의 조합은 상술한 실시예에 한정되는 것이 아니며, 구현 및/또는 필요에 따라 상술한 실시예들 뿐만 아니라 다양한 형태의 조합이 제공될 수 있다.
Combinations of the embodiments of the process of resetting the motion vector and the process of resetting the reference picture index are not limited to the above-described embodiment, and various types of combinations as well as the above-described embodiments may be provided as required. 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. Therefore, when the reset L1 temporal motion information is the same as the L0 temporal motion information of the current block, the encoder and the decoder may set the prediction direction information of the current block to unidirectional prediction. In this case, the encoder and the decoder may use only L0 temporal motion information as temporal motion information of the current block. Such a method can be applied to the present invention in combination with the embodiments described above.

도 7은 L1 시간적 움직임 정보의 재설정을 위해 사용되는 복원된 주변 블록의 실시예를 개략적으로 나타내는 도면이다. 도 7에서 블록 710은 현재 블록(X)을 나타낸다. 7 is a diagram schematically illustrating 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 at the lower left corner outside the current block 710 is referred to as the lower left corner block A, and the block located at the upper left corner outside the current block 710 is the upper left corner block E. The block located in the upper right corner outside the current block 710 is referred to as the upper right corner block (C). In addition, the block located at the top of the block adjacent to the left of the current block 710 is the uppermost block (F) on the left side, and the block located at the bottom of the block adjacent to the left of the current block 710 is the left lowermost block (A), the current block ( 710) The leftmost block among the blocks adjacent to the top is referred to as the upper leftmost block G, and the rightmost block among blocks adjacent to the top of the current block 710 is referred to as the upper rightmost block B.

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

일 실시예로, 부호화기 및 복호화기는 복원된 주변 블록 중에서 소정의 위치에 존재하는 한 개의 블록으로부터 L1 시간적 움직임 정보로 사용되는 움직임 정보를 도출할 수 있다. 이 때, 상기 소정의 위치의 블록은 좌측 최하단 블록(A), 상단 최우측 블록(B), 우측 상단 코너 블록(C), 좌측 하단 코너 블록(D),좌측 상단 코너 블록(E), 좌측 최상단 블록(F) 및 상단 최좌측 블록(G) 중에서 하나에 해당될 수 있다.In an embodiment, the encoder and the decoder may derive the motion information used as the L1 temporal motion information from one block existing at a predetermined position among the reconstructed neighboring blocks. At this time, the block of the predetermined position is the lower left block (A), the upper rightmost block (B), the upper right corner block (C), the lower left corner block (D), the upper left corner block (E), the left side It may correspond to one of the uppermost block F and the upper leftmost 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 the decoder may scan a plurality of blocks existing at a predetermined position among the reconstructed neighboring blocks in a predetermined order. In this case, the encoder and the decoder may use the motion information of the first block in which the motion information exists in the scan order as the L1 temporal motion information of the current block. The scan target block and the scan order may be determined in various forms. For example, the encoder and the decoder may scan the neighboring blocks in the order of the left top block F, the top leftmost block B, and the top rightmost block B. As another example, the encoder and decoder determine the neighboring blocks in the order of the top left block (F), the top leftmost block (G), 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 the decoder may scan the neighboring blocks in the order of the left lowermost block (A), the upper rightmost block (B), and the upper left corner block (E). As another example, the encoder and the decoder may include neighboring blocks in the order of the lower left block (A), the upper rightmost block (B), the upper right corner block (C), the lower left corner block (D), and the upper left corner block (E). You can also scan As another example, the encoder and the decoder may include a lower left block (A), an upper rightmost block (B), an upper right corner block (C), a lower left corner block (D), an upper left corner block (E), and a left uppermost block ( The neighboring blocks may be scanned in the order F) and the upper leftmost block G.

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

복원된 주변 블록으로부터 현재 블록의 L1 시간적 움직임 정보를 도출하는 방법은 상술한 실시예에 한정되는 것이 아니며, 현재 블록의 L1 시간적 움직임 정보는 구현 및/또는 필요에 따라 다양한 방법으로 도출될 수 있다.
The method for 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 may be derived in various ways depending on implementation and / or need.

이하, 복호화기 입장에서 도 6 및 도 7의 실시예에 따른 시간적 움직임 정보 도출 과정의 실시예가 서술된다.Hereinafter, an embodiment of a process of deriving temporal motion information according to the embodiment of FIGS. 6 and 7 will be described in terms of a 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) of the leftmost sample of the current block, an input motion vector (mvLXCol), and an input reference picture number (RefPicOrder (currPic, refIdxLX, LX)). have. Here, currPic may mean the current picture. The output of the process may be a motion vector (mvLXCol) used as final temporal motion information and information indicating the presence or absence of final temporal motion information (availableFlagLXCol). Here, X may have a value of 0 or 1. For example, when X is 0, mvLXCol, refIdxLX, and LX may represent mvL0Col, refIdxL0, and 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 x component, and mvLX [1] may mean a motion vector of y component. refIdxLX may indicate an LX reference picture index indicating a reference picture in the LX reference picture list in which the reference pictures are stored. If the refIdxLX value is 0, refIdxLX may indicate the first reference picture in the LX reference picture list, and if the refIdxLX value is −1, refIdxLX may indicate that no reference picture exists 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 the 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 decoder may perform the following process.

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

mvL1Col = mvL0AmvL1Col = mvL0A

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

mvL1Col = mvL0BmvL1Col = mvL0B

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

mvL1Col = mvL0EmvL1Col = mvL0E

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

avilableFlagL1Col = 0 avilableFlagL1Col = 0

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

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

predFlagLXCol = availableFlagLXColpredFlagLXCol = availableFlagLXCol

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

도 8은 도 6의 실시예에 따른 시간적 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다. 도 8의 실시예에 따른 인터 예측 장치는 시간적 움직임 정보 판단부(810), 복원된 주변 블록 움직임 정보 판단부(820), 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(830) 및 L1 시간적 움직임 정보 재설정부(840)를 포함할 수 있다.FIG. 8 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. 6. In the inter prediction apparatus of FIG. 8, the temporal motion information determiner 810, the reconstructed neighboring block motion information determiner 820, the prediction direction information reset, the L0 motion information setter 830, and the L1 temporal motion information It may include a reset unit 840.

도 8을 참조하면, 시간적 움직임 정보 판단부(810)는 입력 시간적 움직임 정보에서 L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일한지 여부, 즉 L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일하고 L0 움직임 벡터와 L1 움직임 벡터가 동일한지 여부를 판단할 수 있다. Referring to FIG. 8, the temporal motion information determination unit 810 determines whether L0 temporal motion information and 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)에 의한 판단 과정이 수행될 수 있다. When the L0 temporal motion information and the L1 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 predictive motion vector candidate for the current block. In addition, 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 determining unit 810 predicts whether or not the L0 reference picture number and the L1 reference picture number are the same or the call block, rather than whether the L0 temporal motion information and the L1 temporal motion information are the same. You can also determine the direction. For example, when the L0 reference picture number and the L1 reference picture number are not the same, the inter prediction apparatus 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 are In the same case, the determination process by the restored neighboring block motion information determiner 820 may be performed. As another example, when the prediction direction of the call block is bidirectional prediction, the inter prediction apparatus may use the 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 reconstructed 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 determiner 820 may determine whether there is motion information of the reconstructed neighboring block. When the motion information of the reconstructed neighboring block does not exist (for example, when there is no block having the motion information among the reconstructed neighboring blocks of the predetermined position and / or the position selected by the predetermined method), the prediction direction information The resetting and prediction direction information resetting by the L0 motion information setting unit 830 and the L0 motion information setting process may be performed. Further, when there is motion information of the restored neighboring block (for example, when there is a block having motion information among the restored neighboring blocks at the predetermined position and / or selected position in a predetermined method), L1 temporal movement 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 resetting and the L0 motion information setting unit 830 may set the prediction direction information of the current block to unidirectional prediction. In this case, the prediction direction information resetting 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 reconstructed neighboring block exists, the L1 temporal motion information resetting unit 840 may reset the L1 temporal motion information of the current block to the motion information of the reconstructed neighboring block. That is, the inter prediction apparatus may use the reconstructed motion information of the neighboring block as L1 temporal motion information of the current block. At this time, for example, when the L1 temporal motion information resetting unit 840 searches for motion information to be used as L1 temporal motion information of the current block in the restored neighboring block, the motion information having a zero vector (0, 0) is not selected. Only motion information without zero vector (0,0) may be selected. 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. Specific embodiments of each method described above have been described above with reference to FIGS. 6 and 7, and thus descriptions thereof will be omitted.

도 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 모드에서 예측 움직임 벡터 후보 리스트를 기반으로 도출된 현재 블록의 움직임 정보에도 동일하거나 유사한 방식으로 적용될 수 있다.Embodiments described below are described based on temporal motion information, but the present invention is not limited thereto. For example, the methods according to the embodiment of FIG. 9 are not only temporal motion information in the merge mode and / or AMVP mode, but also in the motion information and / or AMVP mode of the current block derived based on the merge candidate list in the merge mode. The same may be applied to the motion information of the current block derived based on the predicted motion vector candidate list in the same or similar manner.

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

도 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 the 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, the L0 reference picture number and the L1 reference picture number are the same and the L0 motion is the same. It may be determined whether the vector and the L1 motion vector are the same (S910). Hereinafter, for the convenience of description, the temporal motion information input in step S910 before resetting temporal motion information is referred to as temporal motion information (L0 input temporal motion information and 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). The reference picture index) and the reference picture number included in the input temporal motion information are referred to as an input reference picture number (L0 input reference picture number and 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 the decoder may use the input temporal motion information derived based on the 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 predictive motion vector candidate of the current block. In addition, 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 motion information of the call block 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 of a predetermined position and / or a position selected by a predetermined method.

이하, 도 9 내지 도 11의 실시예에 한하여, 설명의 편의상 입력 시간적 움직임 정보 도출을 위해 사용되는 콜 블록은 제1 콜 블록이라 하고, S920 단계에서와 같이 움직임 정보 존재 여부의 판단 대상이 되면서 후술되는 S940 단계에서와 같이 L1 입력 시간적 움직임 정보의 재설정을 위해 사용되는 콜 블록은 제2 콜 블록이라 한다. 또한, 제1 콜 블록을 포함하는 콜 픽쳐는 제1 콜 픽쳐라 하고, 제2 콜 블록을 포함하는 콜 픽쳐는 제2 콜 픽쳐라 한다. 여기서, 일례로 제1 콜 픽쳐 및 제2 콜 픽쳐는 각각 참조 픽쳐 리스트에 포함된 참조 픽쳐 중에서 하나의 픽쳐에 해당될 수 있다.Hereinafter, for the convenience of description, the call block used for deriving the input temporal motion information is referred to as a first call block for convenience of description. 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 correspond to one picture among reference pictures included in the reference picture list, respectively.

제2 콜 블록의 움직임 정보가 존재하지 않는 경우(예를 들어, 소정의 위치 및/또는 소정의 방법으로 선택된 위치의 제2 콜 블록 중에서 움직임 정보를 갖는 블록이 존재하지 않는 경우), 부호화기 및 복호화기는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수 있다(S930). 또한 이 때, 부호화기 및 복호화기는 L0 입력 시간적 움직임 정보만을 현재 블록의 시간적 움직임 정보로 사용할 수 있다.If there is no motion information of the second call block (e.g., 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), the encoder and decoding The device may reset the prediction direction information of the current block to unidirectional prediction (S930). In this case, the encoder and the decoder may 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 there is motion information of the second call block (for example, when a block having motion information exists in a second call block at a predetermined position and / or a position selected by a predetermined method), the encoder and the decoder may 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 the decoder may reset the L1 input temporal motion information of the current block to the 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 of 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, the steps of S920 and S940 may be omitted in the above-described embodiment. In this case, when the L0 input temporal motion information and the L1 input temporal motion information are the same, the encoder and the decoder may set the prediction direction information of the current block to unidirectional prediction (S930). In this case, the encoder and the decoder may use only L0 input temporal motion information as final temporal motion information of the current block.

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

일 실시예로, 부호화기 및 복호화기는 L0 입력 참조 픽쳐 번호 및 L1 입력 참조 픽쳐 번호의 동일성을 기반으로 S920 내지 S940 과정의 수행 여부를 결정할 수 있다. 일례로, 부호화기 및 복호화기는 L0 입력 참조 픽쳐 번호 및 L1 입력 참조 픽쳐 번호가 동일한 경우에 S920 내지 S940 과정을 수행할 수 있다.In an embodiment, the encoder and the decoder may determine whether to perform the operations 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 the 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 the 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. Therefore, 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 instead of bidirectional prediction. This is because when the prediction direction of the first call block is unidirectional prediction, the L0 input temporal motion information and the L1 input temporal motion information may be the same in the input temporal motion information derived from the first call block.

또 다른 실시예로, 부호화기 및 복호화기는 제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 exists 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, the L0 input temporal motion information may be reset instead of the L1 input temporal motion information. That is, the encoder and the decoder may set the L0 input temporal motion information as the motion information of the second collocated block, and may perform unidirectional prediction instead of bidirectional prediction with respect to the current block. In addition, when the motion information does not exist in the first call block, in step S940, the encoder and the 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 the 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 the decoder may determine whether to perform the processes S920 to S940 based on the size of the current block. As an example, the encoder and the decoder may determine whether the size of the current block is smaller than a predetermined size. Here, the current block may be a CU, a PU, and / or a TU, and the predetermined size may be, for example, one of 8x8, 16x16, or 32x32. In this case, 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 the zero vector (0,0) in the motion information of the first call block. In this case, in step S940, the encoder and the decoder 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 a second call block, and as another example, the motion vector corresponding to the zero vector (0,0) May be set as the motion vector of the reconstructed neighboring block. 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, the encoder and the decoder may reset the motion vector (s) not corresponding to the zero vector (0,0), and the 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 motion information derived in time, the L0 input temporal motion information is likely to correspond to motion information due to movement of an object. Therefore, when the encoder and the decoder search for motion information to be used as the final L1 temporal motion information of the current block in the second collocated block, the encoder and the decoder do not select the motion information having the zero vector (0,0) and 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 likely to correspond to a background rather than an object.

한편, 재설정된 최종 L1 시간적 움직임 정보는 현재 블록의 L0 입력 시간적 움직임 정보와 동일할 수도 있다. 따라서, 부호화기 및 복호화기는 제2 콜 블록에서 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 탐색할 때, L0 입력 시간적 움직임 정보와 동일하지 않은 움직임 정보를 선택할 수 있다. 예를 들어, S940에서와 같이, 제2 콜 블록을 기반으로 현재 블록의 최종 L1 시간적 움직임 정보를 도출하는 경우, 부호화기 및 복호화기는 현재 블록의 L0 입력 시간적 움직임 정보와 다른 움직임 정보를 갖는 블록을 상기 최종 L1 시간적 움직임 정보 도출에 사용되는 블록으로 결정할 수 있다. 이 때, 부호화기 및 복호화기는 현재 블록의 L0 입력 시간적 움직임 정보와의 차이가 소정의 임계값(threshold) 이하인 움직임 정보만을, 최종 L1 시간적 움직임 정보로 사용될 움직임 정보로 선택할 수도 있다. 여기서, 상기 소정의 임계값은 현재 블록의 모드 정보, 현재 블록의 움직임 정보, 주변 블록의 모드 정보 및/또는 주변 블록의 움직임 정보 등을 기반으로 정해질 수 있으며, 다양한 방식으로 결정될 수 있다.Meanwhile, the reset last L1 temporal motion information may be the same as the L0 input temporal motion information of the current block. Accordingly, the encoder and the 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 collocated block. For example, as in S940, when deriving the final L1 temporal motion information of the current block based on the second collocated block, the encoder and the decoder may select a block having motion information different from the L0 input temporal motion information of the current block. It may be determined as a block used for deriving final L1 temporal motion information. In this case, the encoder and the decoder may select only the 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 the motion information to be used as the final L1 temporal motion information. The predetermined threshold value may be determined based on mode information of the current block, motion information of the 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 piece of motion information from the L0 motion information and the L1 motion information as the motion information to be used as the final L1 temporal motion information of the current block. For example, the encoder and the decoder may use the L0 motion information of the second collocated block as the final L1 temporal motion information for the current block. In this case, when the L0 motion information does not exist 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 the decoder may use the L1 motion information of the second collocated block as the final L1 temporal motion information for the current block. In this case, 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 the decoder may not use the motion information of the second call block to reset the L1 input temporal motion information (eg, the L1 input motion vector) of the current block in step S940. In this case, the encoder and the decoder may reset the L1 input temporal motion information (eg, the L1 input motion vector) of the current block based on the motion information (eg, the motion vector) of the first call block. Hereinafter, related embodiments will be described, which will be described with reference to 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 the decoder is a movement indicating a relative position moved based on a predetermined distance and / or direction at a position indicated by the motion information (motion vector) of the first call block within the first call picture. The information may be used as final L1 temporal motion information (L1 motion vector) of the current block. In one example, the encoder and the decoder are each 1/4 pixel size (for example, (-1,0), (1,0), () in a vertical and / or horizontal direction at a position indicated by the motion information of the first collocated block. 0, -1), (0,1), (-1, -1), (-1,1), (1, -1), (1,1), etc., where 1/4 pixel units are 1 The motion information indicating the moved position can be used as the final L1 temporal motion information of the current block. As another example, the encoder and the decoder may have a size of 1/2 pixel (for example, (-2,0), (2,0), () in a vertical and / or horizontal direction at a position indicated by the motion information of the first call block. 0, -2), (0,2), (-2, -2), (-2,2), (2, -2), (2,2), etc. where 1/4 pixel units are 1 The motion information indicating the moved position can be used as the final L1 temporal motion information of the current block. As another example, the encoder and the decoder may have integer pixel sizes (eg, (-4,0), (4,0), (0) in the vertical and / or horizontal directions at positions 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 are The motion information indicating the moved position may be used as the final L1 temporal motion information of the current block. On the other hand, since the motion vector includes a vertical component and a horizontal component, the above-described methods (move by 1/4 pixel size, move by 1/2 pixel size, and move by integer pixel size) are the horizontal component and the vertical direction. Each of the components may be applied independently. In this case, the moving distance in the horizontal direction and the moving distance in the vertical direction may be different from each other.

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

제1 콜 블록의 움직임 정보(예를 들어, 움직임 벡터)를 기반으로 현재 블록의 L1 입력 시간적 움직임 정보(예를 들어, L1 입력 움직임 벡터)를 재설정하는 방법은 상술한 실시예에 한정되지 않으며, 구현 및/또는 필요에 따라 다양한 형태로 적용될 수 있다. 또한, 상술한 실시예에 따른 방법들은 도 9의 S940 단계에서와 같이 제2 콜 블록의 움직임 정보를 기반으로 L1 입력 시간적 움직임 정보를 재설정하는 경우에도 동일하거나 유사한 방식으로 적용될 수 있다.
The method of resetting L1 input temporal motion information (eg, L1 input motion vector) of the current block based on 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 the implementation and / or needs. In addition, the methods according to the above-described embodiments may be applied in the same or similar manner even 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 in time based on the first call block as described above, and the L0 input reference picture index and the L1 input reference picture index may be derived from the reconstructed neighboring block. It may be a spatially derived reference picture index. In this case, the L0 input reference picture index and the L1 input reference picture index may be set to the smallest non-negative value of the reference picture index of the reconstructed neighboring block. Meanwhile, as another example, the L0 input reference picture index and the L1 input reference picture index may be set to 0 regardless of the 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 a resetting process for the L1 input reference picture index are described.

일 실시예로, 부호화기 및 복호화기는 제2 콜 블록을 기반으로 L1 입력 참조 픽쳐 인덱스를 재설정할 수 있다. 상술한 바와 같이, 부호화기 및 복호화기는 제2 콜 블록의 움직임 정보를 현재 블록의 최종 L1 시간적 움직임 정보로 사용할 수 있다. 이 때, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스를 상기 제2 콜 블록의 참조 픽쳐 인덱스로 재설정함으로써 최종 L1 참조 픽쳐 인덱스를 도출할 수 있다. 다른 실시예로, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스 값을 소정의 고정된 참조 픽쳐 인덱스 값으로 재설정함으로써 최종 L1 참조 픽쳐 인덱스를 도출할 수도 있다.In an embodiment, the encoder and the decoder may reset the L1 input reference picture index based on the second call block. As described above, the encoder and the decoder may use the motion information of the second call block as the final L1 temporal motion information of the current block. In this case, 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 the 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.) ), The encoder and the decoder may reset both the L0 input reference picture index and the L1 input reference picture index to a value of 0 to 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, there is a high probability that both the L0 reference picture index and the L1 reference picture index are both zero.

또 다른 실시예로, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스 값을 L0 입력 참조 픽쳐 인덱스 값과 동일한 값으로 재설정할 수 있다. 반면, 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스 값을 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스 값으로 재설정할 수도 있다. 복원된 주변 블록이 갖는 참조 픽쳐 인덱스 중에는 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스가 존재할 수 있다. 이 때, 예를 들어 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스의 재설정을 위해, 상기 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스 중에서 가장 자주 사용된 참조 픽쳐 인덱스를 사용할 수 있다. 다른 예로, 이 때 부호화기 및 복호화기는 L1 입력 참조 픽쳐 인덱스의 재설정을 위해, 상기 L0 입력 참조 픽쳐 인덱스와 동일하지 않은 참조 픽쳐 인덱스 중에서 음수가 아닌 가장 작은 값을 갖는 참조 픽쳐 인덱스를 사용할 수도 있다.
In another embodiment, the encoder and the decoder may reset the L1 input reference picture index value to the same value as the L0 input reference picture index value. In contrast, the encoder and the 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 indexes of the reconstructed neighboring block, there may exist a reference picture index that is not the same as the L0 input reference picture index. In this case, for example, the encoder and the decoder may use the reference picture index most frequently used among the reference picture indices that are not the same as the L0 input reference picture index to reset the L1 input reference picture index. As another example, the encoder and the decoder may use the reference picture index having the smallest non-negative value among the reference picture indexes that are not the same as the L0 input reference picture index to reset 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 the decoder may 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. In this case, the motion vector of the second call block may be scaled and used according to an L1 input reference picture index and / or a reset L1 reference picture index. The L1 input reference picture index may be used as the final L1 reference picture index without resetting, or may be used as the final L1 reference picture index after resetting as in the above-described embodiment. In this case, the reference picture corresponding to the motion vector of the second collocated block and the reference picture indicated by the final L1 reference picture index may be different from each other. In this case, the encoder and the decoder may perform scaling on the motion vector of the second collocated 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 the resetting process of the motion vector and the resetting process of the reference picture index (eg, RefIdxLX, X = 0, 1). In the following embodiments, 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 the 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 one embodiment, the encoder and the decoder may use the first call picture used for deriving the L0 input temporal motion information as a second call picture, and the second call block may be derived from the second call picture. In this case, the encoder and the decoder may scale and use the motion vector of the second call block to reset the L1 input motion vector. In this case, the scaled motion vector may be used as final L1 temporal motion information. In this case, as an example, the L1 input reference picture index may be used as final L1 temporal motion information without resetting. 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 the decoder may use the first call picture used for deriving the L0 input temporal motion information as the second call picture as it is, and the second call block may use the second call picture. Can be derived from At this time, the encoder and the decoder derive a motion vector whose difference from the L0 input motion vector is not equal to the L0 input motion vector among the motion vectors of the second collocated block but less than a predetermined threshold value for resetting the L1 input motion vector. can do. The encoder and the decoder may perform scaling on the derived motion vector, and the scaled motion vector may be used as final L1 temporal motion information. In this case, as an example, the L1 input reference picture index may be used as final L1 temporal motion information without resetting. 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 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. Here, the second call picture may be, for example, a reference picture most recently decoded among reference pictures in an 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 highest frequency of 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 the decoder may scale and use the motion vector of the second call block to reset the L1 input motion vector. In this case, the scaled motion vector may be used as final L1 temporal motion information. In this case, as an example, the L1 input reference picture index may be used as final L1 temporal motion information without resetting. 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 to derive the L0 input temporal motion information as the second call picture, as in the above-described embodiment, and the second call block May be derived from the second call picture. Here, the second call picture may be, for example, a reference picture most recently decoded among reference pictures in an 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 highest frequency of use as the second call picture based on the reference picture number of the reconstructed neighboring block. At this time, the encoder and the decoder derive a motion vector whose difference from the L0 input motion vector is not equal to the L0 input motion vector among the motion vectors of the second collocated block but less than a predetermined threshold value for resetting the L1 input motion vector. can do. The encoder and the decoder may perform scaling on the derived motion vector, and the scaled motion vector may be used as final L1 temporal motion information. In this case, as an example, the L1 input reference picture index may be used as final L1 temporal motion information without resetting. 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.

움직임 벡터의 재설정 과정 및 참조 픽쳐 인덱스의 재설정 과정의 실시예들의 조합은 상술한 실시예에 한정되는 것이 아니며, 구현 및/또는 필요에 따라 상술한 실시예들 뿐만 아니라 다양한 형태의 조합이 제공될 수 있다.
Combinations of the embodiments of the process of resetting the motion vector and the process of resetting the reference picture index are not limited to the above-described embodiment, and various types of combinations as well as the above-described embodiments may be provided as required. 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. Therefore, when the reset L1 temporal motion information is the same as the L0 temporal motion information of the current block, the encoder and the decoder may set the prediction direction information of the current block to unidirectional prediction. In this case, 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 the decoder may determine the second collocated block based on the colocated block existing at the same spatial position as the current block within the second collocated picture. In FIG. 10, block 1010 represents a current block, and block 1020 represents a co-located block in the 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 the decoder may determine one reference picture from among the reference pictures included in the L0 reference picture list as the second call picture. In one example, the encoder and the decoder may determine the first reference picture in the L0 reference picture list as the second call picture. As another example, the encoder and the decoder may determine the second reference picture in the L0 reference picture list as the second call picture. As another example, the encoder and the decoder may determine the third reference picture in the L0 reference picture list as the second call picture. As another example, the encoder and the 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 the decoder may determine one reference picture from among the reference pictures included in the L1 reference picture list as the second call picture. In one example, the encoder and the decoder may determine the first reference picture in the L1 reference picture list as the second call picture. As another example, the encoder and the decoder may determine the second reference picture in the L1 reference picture list as the second call picture. As another example, the encoder and the decoder may determine the third reference picture in the L1 reference picture list as the second call picture. As another example, the encoder and the 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 may be configured to generate a reference picture that provides the highest coding efficiency among all the reference pictures (and / or some reference pictures determined according to a predetermined condition) in the L0 reference picture list and the L1 reference picture list. 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 the second call block in each reference picture. In this case, the encoder may derive the second call picture based on the coding 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 embodiments, the encoder and the decoder may determine only the 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. In this case, only the reference picture that is not the same as the first call picture may be used for deriving the final L1 temporal motion information of the current block.

제2 콜 픽쳐 결정 방법은 상술한 실시예에 한정되는 것은 아니며, 제2 콜 픽쳐는 구현 및/또는 필요에 따라 다른 방식으로 결정될 수도 있다. The second call picture determination method is not limited to the above-described embodiment, and the second call picture may be determined in other manners according to 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라 한다.Meanwhile, in the embodiment of FIG. 10, the block located in the center of the same position block 1020 is block D, and the block located at the upper left corner of the sibling position block 1020 is block S, the same position block 1020. The block located in the lower left corner of the block Q, the block located in the upper right corner of the same position block 1020 inside the block R, the block located in the lower right corner inside the same position block 1020 is called block C. In addition, the block located at the top of the block adjacent to the left side of the same position block 1020 is block F, the block located at the bottom of the block adjacent to the left side of the same position block 1020 is block J, the same position block 1020 The leftmost block among the blocks adjacent to the top of the block G, the rightmost block among the blocks adjacent to the top of the same position block 1020 is the block M, the topmost block among the blocks adjacent to the right of the same position block 1020 The block located at is the block N, the lowest block among the blocks adjacent to the right side of the same location block 1020 is block B, the block located at the leftmost among the blocks adjacent to the bottom of the same location block 1020 is the block K, the same The rightmost block among blocks adjacent to the bottom of the location block 1020 is referred to as block A. FIG. In addition, the block located at the upper left corner outside of the same position block 1020 is block E, the block at the lower left corner outside the same position block 1020 is located at the block I, the upper right corner outside the same position block 1020. A block located is a block L, and a block located at a lower right corner outside the same location block 1020 is referred to as block H. In addition, a block located adjacent to the right side of the block B is a block P, and a block located adjacent to the lower end of the block A is called a block O.

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

일 실시예로, 부호화기 및 복호화기는 동일 위치 블록의 내부 및/또는 외부에 위치한 블록 중에서 동일 위치 블록을 기준으로 소정의 위치에 존재하는 한 개의 블록으로부터 최종 L1 시간적 움직임 정보로 사용되는 움직임 정보를 도출할 수 있다. 이 때, 상기 소정의 위치에 존재하는 한 개의 블록은 제2 콜 블록에 해당될 수 있다. 여기서, 상기 소정의 위치의 블록은 블록 A, 블록 B, 블록C, 블록D, 블록E, 블록F, 블록G, 블록H, 블록I, 블록J, 블록K, 블록L, 블록M, 블록N, 블록O, 블록P, 블록Q, 블록R 또는 블록S 일 수 있다.In one embodiment, the encoder and the decoder derives the motion information used as the final L1 temporal motion information from one block existing at a predetermined position with respect to 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 of the predetermined position is a 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 the decoder may scan, in a predetermined order, a plurality of blocks existing at a predetermined position among blocks located inside and / or outside the same position block. In this case, the encoder and the decoder may use the motion information of the first block in which the motion information exists in the scan order as the 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 the scan order may be determined in various forms. In one example, the encoder and the decoder may scan the 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 position 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 of deriving L1 temporal motion information of the current block from the second collocated block is not limited to the above-described embodiment, and the L1 temporal motion information of the current block may be derived in various ways depending on implementation and / or need.

도 11은 도 9의 실시예에 따른 시간적 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다. 도 11의 실시예에 따른 인터 예측 장치는 시간적 움직임 정보 판단부(1110), 제2 콜 블록 움직임 정보 판단부(1120), 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(1130) 및 L1 시간적 움직임 정보 재설정부(1140)를 포함할 수 있다.FIG. 11 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. 9. In the inter prediction apparatus of FIG. 11, the temporal motion information determiner 1110, the second call block motion information determiner 1120, the prediction direction information reset, the L0 motion information setter 1130, and the L1 temporal motion information are illustrated. It may include a reset unit 1140.

도 11을 참조하면, 시간적 움직임 정보 판단부(1110)는 입력 시간적 움직임 정보에서 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한지 여부, 즉 L0 입력 참조 픽쳐 번호와 L1 입력 참조 픽쳐 번호가 동일하고 L0 입력 움직임 벡터와 L1 입력 움직임 벡터가 동일한지 여부를 판단할 수 있다. Referring to FIG. 11, the temporal motion information determiner 1110 determines whether the L0 input temporal motion information and the L1 input temporal motion information are the same in the input temporal motion information, that is, the L0 input reference picture number and the L1 input reference picture number are the same. It may 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 predictive motion vector candidate for the current block. In addition, 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 determiner 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 determiner 1110 determines whether the L0 input reference picture number and the L1 input reference picture number are the same or not, whether the L0 input temporal motion information and the L1 input temporal motion information are the same. The prediction direction of the first call block may be determined. For example, when the L0 input reference picture number and the L1 input reference picture number are not the same, the inter prediction apparatus may use the input temporal motion information as the temporal motion information of the current block as it is, and the L0 input reference picture number and the L1 input When the reference picture numbers are the same, a determination process by the second call block motion information determiner 1120 may be performed. As another example, when the prediction direction of the first call block is bidirectional prediction, the inter prediction apparatus may use the input temporal motion information as the temporal motion information of the current block as it is, 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 determiner 1120 may determine whether motion information of the second call block exists. When the motion information of the second call block does not exist (for example, when there is no block having the motion information among the second call blocks of the predetermined position and / or the position selected by the predetermined method), the prediction direction information Resetting and predicting direction information by the L0 motion information setting unit 1130 and L0 motion information setting process may be performed. Further, when there is motion information of the second call block (eg, 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 movement The reset process by the information reset unit 1140 may be performed.

제2 콜 블록의 움직임 정보가 존재하지 않는 경우, 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(1130)는 현재 블록의 예측 방향 정보를 단방향 예측으로 다시 설정할 수 있다. 또한 이 때, 예측 방향 정보 재설정 및 L0 움직임 정보 설정부(1130)는 입력 시간적 움직임 정보 중에서 L0 입력 시간적 움직임 정보만을 현재 블록의 최종 시간적 움직임 정보로 설정할 수 있다.When the motion information of the second call block does not exist, the prediction direction information resetting and the L0 motion information setting unit 1130 may set the prediction direction information of the current block to unidirectional prediction. In this case, the prediction direction information resetting 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 resetting 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 the motion information of the second call block as the final L1 temporal motion information of the current block. At this time, if the motion information of the second call block includes a zero vector (0,0), the L1 temporal motion information resetting unit 1140 may determine the motion information of the block located near the second call block as the last of the current block. It can also be used as L1 temporal motion information. Specific embodiments of each method described above have been described above with reference to FIGS. 6 and 7, and thus descriptions thereof will be omitted.

도 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 the decoder may derive the motion information of the current block based on the motion information of the reconstructed neighboring block and / or the motion information of the 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 reconstructed, and may include a block adjacent to the current block and / or a block located at an outer corner of the current block. In addition, the call block may mean a block corresponding to the current block in the call picture, and the call picture may correspond to one picture among reference pictures in the reference picture list, for example. In this case, the motion information derived from the reconstructed neighboring block may be referred to as spatial motion information, and the motion information derived based on the call block may be referred to as temporal motion information. In this case, the spatial motion information and the temporal motion information may each include prediction direction information, an L0 reference picture number, an L1 reference picture number, an L0 motion vector, an L1 motion vector, and the like.

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

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

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

일 실시예로, L0 움직임 정보가 콜 블록을 기반으로 시간적으로 도출된 움직임 정보인 경우, 부호화기 및 복호화기는 복원된 주변 블록을 기반으로 도출된 공간적 움직임 정보를 L1 움직임 정보로 사용할 수 있다. 다른 실시예로, L0 움직임 정보가 복원된 주변 블록을 기반으로 공간적으로 도출된 움직임 정보인 경우, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 시간적 움직임 정보를 L1 움직임 정보로 사용할 수 있다. In an embodiment, when the L0 motion information is motion information derived temporally based on the call block, the encoder and the decoder may use the spatial motion information derived based on the reconstructed neighboring block as the L1 motion information. In another embodiment, when the L0 motion information is motion information derived spatially based on the reconstructed neighboring block, the encoder and the decoder may use temporal motion information derived based on the call block as the 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 the 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 the call block. In this case, as described above, the encoder and the decoder may use the spatial motion information spatially derived based on the reconstructed neighboring block as the L1 motion information. In this case, as an example, the encoder and the decoder may derive only motion information that is the same as 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 the L0 motion information as spatial motion information to be used as the L1 motion information. In this case, the encoder and the decoder may derive only the motion information whose difference from the L0 motion information is less than or equal to a predetermined threshold as the spatial motion information to be used as the L1 motion information. The predetermined threshold value may be determined based on mode information of the current block, motion information of the 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 for setting the L0 motion information and the L1 motion information is not limited to the above-described embodiment and may vary 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 motion information of the reconstructed neighboring block is spatially derived spatial motion information and temporally derived temporal motion. It can also contain all the information. In this case, 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 by using only spatial motion information spatially derived from the restored motion information of the neighboring block.

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

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

도 13은 도 12의 실시예에 따른 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다. 도 13의 실시예에 따른 인터 예측 장치는 L0 움직임 정보 설정부(1310), L1 움직임 정보 설정부(1320) 및 움직임 정보 통합부(1330)를 포함할 수 있다.FIG. 13 is a block diagram schematically illustrating an embodiment of an inter prediction apparatus capable of performing a motion information derivation process 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 integrating unit 1330.

도 12의 실시예에서 상술한 바와 같이, 부호화기 및 복호화기는 L0 움직임 정보 및 L1 움직임 정보를 각각 독립적으로 설정할 수 있다. 이 때, 부호화기 및 복호화기는 L0 움직임 정보 및 L1 움직임 정보 중에서 하나는 복원된 주변 블록을 기반으로 공간적으로 도출하고 다른 하나는 콜 블록을 기반으로 시간적으로 도출할 수 있다.As described above in the embodiment of FIG. 12, the encoder and the decoder may independently set the L0 motion information and the L1 motion information. In this case, one of the L0 motion information and the L1 motion information may be spatially derived based on the reconstructed neighboring block, and the other may be derived temporally 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 the L0 motion information. At this time, the encoder and the decoder use the spatially derived motion information (spatial motion information) based on the reconstructed neighboring block as L0 motion information, or the motion information (temporal motion information) derived temporally 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 derived 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 the L1 motion information. In this case, the encoder and the decoder use the spatially derived motion information (spatial motion information) based on the reconstructed neighboring block as L1 motion information, or the motion information (temporal motion information) derived temporally 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 derived 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 above with reference to FIG. 12, it will be omitted here.

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

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

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

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

도 14를 참조하면, 부호화기 및 복호화기는 콜 블록을 기반으로 도출된 시간적 움직임 정보에서 L0 시간적 움직임 정보와 L1 시간적 움직임 정보가 동일한지 여부, 즉 L0 참조 픽쳐 번호와 L1 참조 픽쳐 번호가 동일하고 L0 움직임 벡터와 L1 움직임 벡터가 동일한지 여부를 판단할 수 있다(S1410).Referring to FIG. 14, the encoder and the 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, the L0 reference picture number and the L1 reference picture number are the same and the L0 motion is the same. 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 참조 픽쳐라 한다.14 to 15, which will be described later, for convenience of description, temporal motion information input in step S1410 before resetting temporal motion information is input temporal motion information (L0 input temporal motion information and L1 input temporal motion information). do. In this case, 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). The reference picture index) and the reference picture number included in the input temporal motion information are referred to as an input reference picture number (L0 input reference picture number and L1 input reference picture number). In addition, in the following embodiment, a reference picture indicated by the L0 input reference picture number is referred to as an L0 reference picture, and a 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, i.e., 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 the decoder The input temporal motion information derived based on the call block may 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 predictive 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 or derive the 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 as each other, the L1 reference picture may correspond to the same picture as the L0 reference picture. Therefore, in the following embodiment, the L1 reference picture may mean the same picture as the L0 reference picture.

일례로 부호화기 및 복호화기는 동일한 방법으로 L1 참조 픽쳐에서 움직임 정보를 탐색하여 도출할 수 있다. 이 때, 부호화기는 L1 참조 픽쳐에서 도출된 움직임 정보를 복호화기로 전송하지 않을 수 있다. 다른 예로 부호화기는 소정의 방법에 의해 L1 참조 픽쳐에서 움직임 정보를 도출한 후, 도출된 움직임 정보를 비트스트림에 포함시켜 복호화기로 전송할 수 있다. 이 때, 복호화기는 전송된 움직임 정보를 기반으로 최종 L1 시간적 움직임 정보로 사용될 움직임 정보를 결정할 수 있다. 부호화기에서 도출된 움직임 정보는 참조 픽쳐 인덱스 및 움직임 벡터 등을 포함할 수 있고, 부호화기는 상기 참조 픽쳐 인덱스와 움직임 벡터를 각각 독립적으로 복호화기로 전송할 수 있다. 이 때, 부호화기는 현재 블록의 실제 움직임 벡터 및 L1 참조 픽쳐로부터 도출된 움직임 벡터의 차분 값을 구한 후, 그 차분 값을 복호화기로 전송할 수도 있다. For example, the encoder and the decoder may search for and derive motion information from the L1 reference picture in the same manner. At this time, the encoder may not transmit the 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 the 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 the motion vector to the decoder. In this case, 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 back to FIG. 14, the encoder and the decoder may use the motion information derived from the L1 reference picture as the final L1 temporal motion information of the current block (S1430). That is, at this time, the encoder and the decoder may reset the L1 input temporal motion information value to the value of the motion information derived from the L1 reference picture.

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

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

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

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

일 실시예로, 부호화기 및 복호화기는 콜 블록의 예측 방향을 기반으로 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. Therefore, 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 instead of bidirectional prediction. This is because when the prediction direction of the first call block is unidirectional prediction, the L0 input temporal motion information and the L1 input temporal motion information may be the same in the input temporal motion information derived from the first call block.

다른 실시예로, 부호화기 및 복호화기는 콜 블록에 움직임 정보가 존재하는지 여부에 관한 정보를 기반으로 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 operations S1420 to S1430 based on information on whether motion information exists 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 may be reset instead of the L1 input temporal motion information. That is, the encoder and the decoder may reset the L0 input temporal motion information to the motion information of the L1 reference picture, and may perform unidirectional prediction instead of bidirectional prediction on the current block. In addition, when there is no motion information in the call block, in step S1430, the encoder and the 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 the 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 correspond to the zero vector (0,0) in the motion information of the call block. In this case, in step S1430, the encoder and the decoder 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 an 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 a 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 collocated block. In this case, in step S1430, the encoder and the decoder may reset the motion vector (s) not corresponding to the zero vector (0,0), and the motion vector (s) not corresponding to the zero vector (0,0). ) May be reset to the motion vector of the L1 reference picture.

S1420 내지 S1430 과정의 수행 여부가 결정되는 조건은 상술한 실시예에 한정되지 않으며, 조건 및/또는 필요에 따라 다양한 조건이 적용될 수 있다.
Conditions for determining whether to perform the processes of 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. Therefore, when the encoder and the decoder search for motion information to be used as the final L1 temporal motion information of the current block in the L1 reference picture, only the motion information that is not the same as the L0 input temporal motion information may be found. 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 the decoder may determine only the final L1 temporal motion information that is different from the L0 input temporal motion information of the current block. Can be used as In this case, the encoder and the decoder may select only the 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 the motion information to be used as the final L1 temporal motion information. The predetermined threshold value may be determined based on mode information of the current block, motion information of the 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 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 call block as described above, and the L0 input reference picture index and the L1 input reference picture index may be spatially restored from the reconstructed neighboring block. It may be a derived reference picture index. In this case, the L0 input reference picture index and the L1 input reference picture index may be set to the smallest non-negative value of the reference picture index of the reconstructed neighboring block. Meanwhile, as another example, the L0 input reference picture index and the L1 input reference picture index may be set to 0 regardless of the 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, the resetting process may also be performed on the input reference picture index. As an 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 both the L0 input reference picture index and the L1 input reference picture index to a value 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, there is a high probability that both the L0 reference picture index and the L1 reference picture index are both zero.

한편, 상술한 바와 같이 부호화기 및 복호화기는 L1 입력 움직임 벡터 값을 L1 참조 픽쳐의 움직임 벡터와 동일한 값으로 재설정함으로써 최종 L1 시간적 움직임 벡터를 도출할 수 있다. 이 때, 상기 L1 참조 픽쳐의 움직임 벡터는 L1 입력 참조 픽쳐 인덱스 및/또는 재설정된 L1 참조 픽쳐 인덱스에 따라 스케일링되어 사용될 수도 있다. L1 입력 참조 픽쳐 인덱스는 재설정 과정 없이 그대로 최종 L1 참조 픽쳐 인덱스로 사용될 수도 있고, 상술한 실시예에서와 같이 재설정 과정을 거쳐 최종 L1 참조 픽쳐 인덱스로 사용될 수도 있다. 이 때, L1 참조 픽쳐의 움직임 벡터에 대응하는 참조 픽쳐, 및 최종 L1 참조 픽쳐 인덱스가 지시하는 참조 픽쳐는 서로 다를 수 있다. 이 경우, 부호화기 및 복호화기는 L1 참조 픽쳐의 움직임 벡터에 대한 스케일링을 수행하고 상기 스케일링된 움직임 벡터를 현재 블록의 최종 L1 시간적 움직임 벡터로 사용할 수 있다.
Meanwhile, as described above, the encoder and the decoder may 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. In this case, 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 the final L1 reference picture index without resetting, or may be used as the final L1 reference picture index after resetting as in the above-described embodiment. In this case, 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 from each other. In this case, the encoder and the 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. Therefore, when the reset L1 temporal motion information is the same as the L0 temporal motion information of the current block, the encoder and the decoder may set the prediction direction information of the current block to unidirectional prediction. In this case, the encoder and the decoder may use only L0 temporal motion information as temporal motion information of the current block. Such a method can be applied to the present invention in combination with the embodiments described above.

도 15는 도 14의 실시예에 따른 시간적 움직임 정보 도출 과정을 수행할 수 있는 인터 예측 장치의 일 실시예를 개략적으로 나타내는 블록도이다. 도 15의 실시예에 따른 인터 예측 장치는 시간적 움직임 정보 판단부(1510), 움직임 예측부(1520) 및 L1 시간적 움직임 정보 재설정부(1530)를 포함할 수 있다.FIG. 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. The inter prediction apparatus according to the embodiment of FIG. 15 may include a temporal motion information determiner 1510, a motion predictor 1520, and an L1 temporal motion information reset unit 1530.

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

도 15를 참조하면, 도 11을 참조하면, 시간적 움직임 정보 판단부(1510)는 입력 시간적 움직임 정보에서 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한지 여부, 즉 L0 입력 참조 픽쳐 번호와 L1 입력 참조 픽쳐 번호가 동일하고 L0 입력 움직임 벡터와 L1 입력 움직임 벡터가 동일한지 여부를 판단할 수 있다. Referring to FIG. 15, referring to FIG. 11, the temporal motion information determiner 1510 determines whether L0 input temporal motion information and L1 input temporal motion information are the same in the input temporal motion information, that is, the L0 input reference picture number and L1. It may be determined whether the input reference picture number is the same and whether 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 predictive motion vector candidate for the current block. In addition, 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)에 의한 프로세스가 수행될 수도 있다.The temporal motion information determiner 1510 determines whether the L0 input reference picture number and the L1 input reference picture number are the same or the prediction direction of the call block, not whether the L0 input temporal motion information and the L1 input temporal motion information are the same. You may. For example, when the L0 input reference picture number and the L1 input reference picture number are not the same, the input temporal motion information may be used as the temporal motion information of the current block as it is, and the L0 input reference picture number and the L1 input reference picture number are In the same case, a process by the motion predictor 1520 may be performed. As another example, when the prediction direction of the call block is bidirectional prediction, the input temporal motion information may be used as the temporal motion information of the current block as it is, and the process by the motion prediction unit 1520 when the prediction direction of the call block is unidirectional prediction. 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 or derive the 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 predictor 1520 may derive a region that best matches or similar to an input block (original block) corresponding to the current block within the L1 reference picture. In this case, the motion predictor 1520 may derive motion information to be used as final L1 temporal motion information of the current block based on the derived region. For example, the motion predictor 1520 may derive a motion vector to be used as final L1 temporal motion information based on the position of the block corresponding to the derived region and the position of the current block, and corresponds to the derived region. A reference picture index (and / or reference picture number) to be used as final L1 temporal motion information may be derived based on the block.

한편, 움직임 예측부(1520)가 부호화기측의 구성 요소에 해당되는 경우, 부호화기는 상기 방법에 의해 L1 참조 픽쳐에서 도출된 움직임 정보를 비트스트림에 포함시켜 복호화기로 전송할 수도 있다. L1 참조 픽쳐에서 도출된 움직임 정보는 참조 픽쳐 인덱스 및 움직임 벡터 등을 포함할 수 있고, 부호화기는 상기 참조 픽쳐 인덱스와 움직임 벡터를 각각 독립적으로 복호화기로 전송할 수 있다. 이 때, 부호화기는 현재 블록의 실제 움직임 벡터 및 L1 참조 픽쳐로부터 도출된 움직임 벡터의 차분 값을 구한 후, 그 차분 값을 복호화기로 전송할 수도 있다. On the other hand, if the motion predictor 1520 corresponds to a component on the encoder side, the encoder may include the motion information derived from the L1 reference picture in the bitstream and transmit the same 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 the motion vector to the decoder. In this case, 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 the motion information to be used as the final L1 temporal motion information based on the transmitted motion information. That is, when the motion predictor 1520 corresponds to a component on the decoder side, the motion predictor 1520 is finally based on the motion information (for example, motion information transmitted from the encoder) input from the outside. The motion information to be used as the L1 temporal motion information may be determined.

다시 도 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 the final L1 temporal motion information of the current block. That is, at this time, the L1 temporal motion information reset unit 1530 may reset the L1 input temporal motion information value to the value of the motion information (motion information derived from the L1 reference picture) derived by the motion predictor 1520. .

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

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

다른 실시예로, 머지 블록에는 도 9 내지 도 11의 실시예에 따른 시간적 움직임 정보 도출 방법이 적용되고, 머지 블록이 아닌 블록에는 도 14 및 도 15에 따른 시간적 움직임 정보 도출 방법이 적용될 수 있다. 이 때, 머지 블록에서는 L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, 입력 시간적 움직임 정보 도출에 사용된 콜 블록이 아닌 새로이 도출된 콜 블록의 움직임 정보가 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 수 있다. 또한, 머지 블록이 아닌 블록에서는, L0 입력 시간적 움직임 정보와 L1 입력 시간적 움직임 정보가 동일한 경우, L1 참조 픽쳐의 움직임 정보가 현재 블록의 최종 L1 시간적 움직임 정보로 사용될 수 있다.In another embodiment, the temporal motion information derivation method according to the embodiments of FIGS. 9 to 11 may be applied to the merge block, and the temporal motion information derivation method according to FIGS. 14 and 15 may be applied to the block other than the merge block. In this case, 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, rather than the call block used for deriving the input temporal motion information, is the last L1 temporal motion information of the current block. Can be used as 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 temporal motion information derivation method according to the embodiments of FIGS. 6 to 8 may be applied to the merge block, and the temporal motion information derivation method according to FIGS. 14 and 15 may be applied to the block other than the merge block. In this case, 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 reconstructed neighboring block may be used as the final L1 temporal motion information of the current block. 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 as well as the above-described embodiments may be provided according to implementation and / or need.

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

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

Claims (9)

L0 움직임 정보 및 L1 움직임 정보를 포함하는 움직임 정보로서 현재 블록의 움직임 정보를 도출하는 움직임 예측부;
상기 L0 움직임 정보 및 상기 L1 움직임 정보 중에서 적어도 하나를 기반으로 상기 현재 블록에 대해 움직임 보상을 수행함으로써, 상기 현재 블록에 대응하는 예측 블록을 생성하는 움직임 보상부; 및
상기 예측 블록을 기반으로 상기 현재 블록에 대응하는 복원 블록을 생성하는 복원 블록 생성부를 포함하되,
상기 움직임 보상부는,
상기 L0 움직임 정보 및 상기 L1 움직임 정보의 동일성 여부를 기반으로 상기 움직임 보상을 수행하는 것을 특징으로 하는 영상 복호화 장치.
A motion predictor for deriving motion information of the current block as motion information including L0 motion information and L1 motion information;
A motion compensation unit configured to generate 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 reconstruction block generator configured to generate a reconstruction block corresponding to the current block based on the prediction block;
The motion compensation unit,
And performing the motion compensation based on whether the L0 motion information and the L1 motion information are identical.
제 1항에 있어서,
상기 L0 움직임 정보는 L0 움직임 벡터 및 L0 참조 픽쳐 번호를 포함하고, 상기 L0 참조 픽쳐 번호는 L0 참조 픽쳐에 할당된 POC(Picture Order Count)를 지시하고,
상기 L1 움직임 정보는 L1 움직임 벡터 및 L1 참조 픽쳐 번호를 포함하고, 상기 L1 참조 픽쳐 번호는 L1 참조 픽쳐에 할당된 POC(Picture Order Count)를 지시하는 것을 특징으로 하는 영상 복호화 장치.
The method of claim 1,
The L0 motion information includes an L0 motion vector and an L0 reference picture number, the L0 reference picture number indicates a picture order count (POC) assigned to the L0 reference picture,
The L1 motion information includes an L1 motion vector and an L1 reference picture number, and the L1 reference picture number indicates a picture order count (POC) assigned to the L1 reference picture.
제 2항에 있어서,
상기 L0 움직임 벡터 및 상기 L1 움직임 벡터가 동일하고 상기 L0 참조 픽쳐 번호 및 상기 L1 참조 픽쳐 번호가 동일한 경우,
상기 움직임 보상부는,
상기 L0 움직임 정보 및 상기 L1 움직임 정보 중에서 상기 L0 움직임 정보를 기반으로 하여 단예측(uni prediction)을 수행하는 것을 특징으로 하는 영상 복호화 장치.
The method of claim 2,
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,
And uni prediction is performed based on the L0 motion information among the L0 motion information and the L1 motion information.
제 2항에 있어서,
상기 L0 움직임 벡터 및 상기 L1 움직임 벡터가 서로 동일하지 않거나 상기 L0 참조 픽쳐 번호 및 상기 L1 참조 픽쳐 번호가 서로 동일하지 않은 경우,
상기 움직임 보상부는,
상기 L0 움직임 정보 및 상기 L1 움직임 정보를 기반으로 하여 쌍예측(bi prediction)을 수행하는 것을 특징으로 하는 영상 복호화 장치.
The method of claim 2,
When the L0 motion vector and the L1 motion vector are not equal to each other or the L0 reference picture number and the L1 reference picture number are not equal to each other,
The motion compensation unit,
And bi-prediction is performed based on the L0 motion information and the L1 motion information.
L0 움직임 정보 및 L1 움직임 정보를 포함하는 움직임 정보로서 현재 블록의 움직임 정보를 도출하는 움직임 예측부;
상기 L0 움직임 정보 및 상기 L1 움직임 정보 중에서 적어도 하나를 기반으로 상기 현재 블록에 대해 움직임 보상을 수행함으로써, 상기 현재 블록에 대응하는 예측 블록을 생성하는 움직임 보상부; 및
상기 예측 블록을 기반으로 상기 현재 블록에 대응하는 복원 블록을 생성하는 복원 블록 생성부를 포함하되,
상기 움직임 보상부는,
상기 현재 블록의 크기를 기반으로 상기 움직임 보상을 수행하는 것을 특징으로 하는 영상 복호화 장치.
A motion predictor for deriving motion information of the current block as motion information including L0 motion information and L1 motion information;
A motion compensation unit configured to generate 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 reconstruction block generator configured to generate a reconstruction block corresponding to the current block based on the prediction block;
The motion compensation unit,
And the motion compensation is performed based on the size of the current block.
제 5항에 있어서,
상기 현재 블록의 크기가 소정의 크기보다 작은 경우,
상기 움직임 보상부는,
상기 L0 움직임 정보 및 상기 L1 움직임 정보 중에서 상기 L0 움직임 정보를 기반으로 하여 단예측(uni prediction)을 수행하는 것을 특징으로 하는 영상 복호화 장치.
6. The method of claim 5,
If the size of the current block is smaller than a predetermined size,
The motion compensation unit,
And uni prediction is performed based on the L0 motion information among the L0 motion information and the L1 motion information.
제 6항에 있어서,
상기 소정의 크기는 8x8인 것을 특징으로 하는 영상 복호화 장치.
The method according to claim 6,
And the predetermined size is 8x8.
이미 복원된 픽쳐로부터 움직임 정보를 도출하는 움직임 예측부;
상기 도출된 움직임 정보를 기반으로 현재 블록에 대응하는 예측 블록을 생성하는 움직임 보상부; 및
상기 예측 블록을 기반으로 상기 현재 블록에 대응하는 복원 블록을 생성하는 복원 블록 생성부를 포함하되,
상기 움직임 정보는 움직임 벡터 및 참조 픽쳐 인덱스(reference picture index)를 포함하고,
상기 움직임 예측부는,
상기 참조 픽쳐 인덱스를 0으로 설정하고, 상기 이미 복원된 픽쳐 내에서 상기 현재 블록에 대응하는 콜 블록(col block)을 기반으로 상기 움직임 벡터를 도출하는 것을 특징으로 하는 영상 복호화 장치.
A motion prediction unit for deriving motion information from a picture which has already been reconstructed;
A motion compensation unit generating a prediction block corresponding to the current block based on the derived motion information; And
A reconstruction block generator configured to generate a reconstruction block corresponding to the current block based on the prediction block;
The motion information includes a motion vector and a reference picture index.
The motion prediction unit,
And setting the reference picture index to 0 and deriving the motion vector based on a call block corresponding to the current block in the already reconstructed picture.
제 8항에 있어서,
상기 현재 블록의 부호화 모드는 머지(merge) 모드이고,
상기 움직임 보상부는,
상기 시간적 움직임 정보를 상기 현재 블록의 움직임 정보로 선택하고, 상기 선택된 움직임 정보를 기반으로 움직임 보상을 수행함으로써, 상기 현재 블록에 대응하는 예측 블록을 생성하는 것을 특징으로 하는 영상 복호화 장치.
The method of claim 8,
The encoding mode of the current block is a merge mode,
The motion compensation unit,
And generating the prediction block corresponding to the current block by selecting the temporal motion information as the motion information of the current block and performing motion compensation based on the selected motion information.
KR1020120075901A 2011-07-12 2012-07-12 Method for inter prediction and apparatus thereof KR101769576B1 (en)

Priority Applications (10)

Application Number Priority Date Filing Date Title
US14/131,734 US9819963B2 (en) 2011-07-12 2012-07-12 Inter prediction method and apparatus for same
PCT/KR2012/005531 WO2013009104A2 (en) 2011-07-12 2012-07-12 Inter prediction method and apparatus for same
US15/706,884 US10136157B2 (en) 2011-07-12 2017-09-18 Inter prediction method and apparatus for same
US16/132,886 US10587893B2 (en) 2011-07-12 2018-09-17 Inter prediction method and apparatus for same
US16/133,133 US10757443B2 (en) 2011-07-12 2018-09-17 Inter prediction method and apparatus for same
US16/132,949 US10659810B2 (en) 2011-07-12 2018-09-17 Inter prediction method and apparatus for same
US16/133,121 US10659811B2 (en) 2011-07-12 2018-09-17 Inter prediction method and apparatus for same
US16/133,303 US10757444B2 (en) 2011-07-12 2018-09-17 Inter prediction method and apparatus for same
US16/781,438 US11917193B2 (en) 2011-07-12 2020-02-04 Inter prediction method and apparatus for same
US18/413,605 US20240155152A1 (en) 2011-07-12 2024-01-16 Inter prediction method and apparatus for same

Applications Claiming Priority (8)

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

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020160070892A Division KR101801256B1 (en) 2011-07-12 2016-06-08 Method for inter prediction and apparatus thereof

Publications (2)

Publication Number Publication Date
KR20130008481A true KR20130008481A (en) 2013-01-22
KR101769576B1 KR101769576B1 (en) 2017-08-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
KR1020180096647A KR101990424B1 (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
KR1020180096644A KR101990422B1 (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
KR1020180096648A KR101990425B1 (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 After (14)

Application Number Title Priority Date Filing Date
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
KR1020180096647A KR101990424B1 (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
KR1020180096644A KR101990422B1 (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
KR1020180096648A KR101990425B1 (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

Country Status (1)

Country Link
KR (15) KR101769576B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107370807A (en) * 2017-07-12 2017-11-21 中南大学 The service end and its cache optimization method accessed based on transparent service platform data

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018066791A1 (en) * 2016-10-05 2018-04-12 엘지전자 주식회사 Method and apparatus for decoding image in image coding system
WO2018128228A1 (en) * 2017-01-03 2018-07-12 엘지전자 주식회사 Image decoding method and device in image coding system
WO2019147067A1 (en) 2018-01-26 2019-08-01 한국전자통신연구원 Method and apparatus for image encoding and image decoding using temporal motion information
KR20190091217A (en) 2018-01-26 2019-08-05 한국전자통신연구원 Method and apparatus for image encoding and image decoding based on temporal motion information
KR20230022267A (en) 2018-07-02 2023-02-14 엘지전자 주식회사 Inter-prediction mode-based image processing method and device therefor
KR20210115053A (en) 2018-07-27 2021-09-24 삼성전자주식회사 Image decoding apparatus and method based on sub block, and image encoding apparatus and method based on sub block
KR20240049414A (en) 2022-10-08 2024-04-16 이원빈 Snapping Foldable Phone Case

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100944333B1 (en) * 2007-07-30 2010-03-02 한국과학기술원 A fast inter-layer prediction mode decision method in scalable video coding
JP5979405B2 (en) 2011-03-11 2016-08-24 ソニー株式会社 Image processing apparatus and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107370807A (en) * 2017-07-12 2017-11-21 中南大学 The service end and its cache optimization method accessed based on transparent service platform data
CN107370807B (en) * 2017-07-12 2020-05-08 中南大学 Server based on transparent service platform data access and cache optimization method thereof

Also Published As

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

Similar Documents

Publication Publication Date Title
KR102485745B1 (en) Method and apparatus for picture encoding/decoding
KR102515824B1 (en) Method for inter prediction and apparatus thereof
WO2013009104A2 (en) Inter prediction method and apparatus for same

Legal Events

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