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

Method for inter prediction and apparatus thereof Download PDF

Info

Publication number
KR102380722B1
KR102380722B1 KR1020210094607A KR20210094607A KR102380722B1 KR 102380722 B1 KR102380722 B1 KR 102380722B1 KR 1020210094607 A KR1020210094607 A KR 1020210094607A KR 20210094607 A KR20210094607 A KR 20210094607A KR 102380722 B1 KR102380722 B1 KR 102380722B1
Authority
KR
South Korea
Prior art keywords
block
motion vector
motion
prediction
blk
Prior art date
Application number
KR1020210094607A
Other languages
Korean (ko)
Other versions
KR20210093818A (en
Inventor
김종호
조숙희
추현곤
최진수
김진웅
Original Assignee
한국전자통신연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020200141110A external-priority patent/KR102281514B1/en
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Priority to KR1020210094607A priority Critical patent/KR102380722B1/en
Publication of KR20210093818A publication Critical patent/KR20210093818A/en
Priority to KR1020220037464A priority patent/KR102503694B1/en
Application granted granted Critical
Publication of KR102380722B1 publication Critical patent/KR102380722B1/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/56Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • 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/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Abstract

본 발명에 따른 인터 예측 방법은, 현재 블록에 대해 적어도 하나의 후보 검색 위치를 결정하는 단계, 적어도 하나의 후보 검색 위치 중에서 초기 검색 위치를 선택하는 단계, 초기 검색 위치를 기반으로 설정된 검색 범위 내에서 움직임 예측을 수행함으로써 현재 블록의 움직임 벡터를 도출하는 단계, 및 도출된 움직임 벡터를 기반으로 현재 블록에 대한 예측을 수행함으로써 예측 블록을 생성하는 단계를 포함한다.The inter prediction method according to the present invention includes the steps of determining at least one candidate search location for a current block, selecting an initial search location from among at least one candidate search location, and within a search range set based on the initial search location. deriving a motion vector of a current block by performing motion prediction, and generating a prediction block by performing prediction on the current block based on the derived motion vector.

Description

인터 예측 방법 및 그 장치 {METHOD FOR INTER PREDICTION AND APPARATUS THEREOF}Inter prediction method and device therefor

본 발명은 영상 처리에 관한 것으로서, 보다 상세하게는 움직임 예측(motion estimation) 방법 및 그 장치에 관한 것이다.The present invention relates to image processing, and more particularly, to a motion estimation method and an apparatus therefor.

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

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

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

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

본 발명의 기술적 과제는 영상 부호화 성능을 향상시킬 수 있는 움직임 예측 방법 및 그 장치를 제공함에 있다.It is an object of the present invention to provide a motion prediction method and apparatus capable of improving image encoding performance.

본 발명의 일 실시 형태는 움직임 예측 방법이다. 상기 방법은, 현재 블록에 대해 적어도 하나의 후보 검색 위치를 결정하는 단계, 상기 적어도 하나의 후보 검색 위치 중에서 초기 검색 위치를 선택하는 단계, 및 상기 초기 검색 위치를 기반으로 설정된 검색 범위 내에서 움직임 예측을 수행함으로써 상기 현재 블록의 움직임 벡터를 도출하는 단계를 포함한다. 이 때, 상기 초기 검색 위치를 선택하는 단계에서는, 상기 적어도 하나의 후보 검색 위치의 부호화 비용을 기반으로 상기 초기 검색 위치를 선택할 수 있다.One embodiment of the present invention is a motion prediction method. The method includes the steps of determining at least one candidate search location for a current block, selecting an initial search location from among the at least one candidate search location, and predicting motion within a search range set based on the initial search location. and deriving the motion vector of the current block by performing . In this case, in the selecting of the initial search location, the initial search location may be selected based on an encoding cost of the at least one candidate search location.

상기 현재 블록은 이미 움직임 예측이 완료된 상위 블록이 분할됨으로써 생성된 복수의 하위 블록들 중 하나일 수 있고, 상기 적어도 하나의 후보 검색 위치는 상기 현재 블록의 영점 위치를 기준으로 상기 상위 블록의 움직임 벡터가 나타내는 위치를 포함할 수 있다.The current block may be one of a plurality of lower blocks generated by dividing an upper block for which motion prediction has already been completed, and the at least one candidate search position is a motion vector of the upper block based on a zero point position of the current block. It may include a location indicated by .

상기 현재 블록은 이미 움직임 예측이 완료된 상위 블록이 분할됨으로써 생성된 복수의 하위 블록들 중 하나일 수 있고, 상기 적어도 하나의 후보 검색 위치는 상기 현재 블록의 영점 위치를 기준으로, 상기 복수의 하위 블록들 중에서 이미 움직임 예측이 완료된 블록의 움직임 벡터가 나타내는 위치일 수 있다.The current block may be one of a plurality of sub-blocks generated by dividing an upper block for which motion prediction has already been completed, and the at least one candidate search position is based on a zero position of the current block, and the plurality of sub-blocks Among them, it may be a position indicated by a motion vector of a block for which motion prediction is already completed.

상기 적어도 하나의 후보 검색 위치는 상기 현재 블록의 영점 위치를 기준으로, 상기 현재 블록의 인터 예측에 사용될 참조 픽쳐 내의 동일 위치 블록의 움직임 벡터가 나타내는 위치를 포함할 수 있고, 상기 동일 위치 블록은 상기 참조 픽쳐 내에서 상기 현재 블록과 공간적으로 동일한 위치에 존재하는 블록일 수 있다.The at least one candidate search position may include a position indicated by a motion vector of a co-located block in a reference picture to be used for inter prediction of the current block, based on a zero position of the current block, wherein the co-located block is the It may be a block existing in the same spatial location as the current block in the reference picture.

상기 적어도 하나의 후보 검색 위치는 상기 현재 블록의 영점 위치를 기준으로, 상기 참조 픽쳐 내에서 상기 동일 위치 블록과 인접하여 위치한 블록의 움직임 벡터가 나타내는 위치를 더 포함할 수 있다.The at least one candidate search position may further include a position indicated by a motion vector of a block located adjacent to the co-located block in the reference picture with respect to the zero position of the current block.

상기 적어도 하나의 후보 검색 위치는, 상기 현재 블록의 영점 위치를 기준으로, 복수의 움직임 벡터를 기반으로 도출된 조합 움직임 벡터가 나타내는 위치를 포함할 수 있다. 여기서, 상기 복수의 움직임 벡터는 각각 이미 움직임 예측이 완료된 블록의 움직임 벡터일 수 있다.The at least one candidate search position may include a position indicated by a combined motion vector derived based on a plurality of motion vectors with respect to the zero point position of the current block. Here, each of the plurality of motion vectors may be a motion vector of a block for which motion prediction has been completed.

상기 현재 블록은 이미 움직임 예측이 완료된 상위 블록이 분할됨으로써 생성된 복수의 하위 블록들 중 하나일 수 있고, 상기 복수의 움직임 벡터는, 상기 영점 위치를 나타내는 원점 벡터, 상기 상위 블록의 움직임 벡터, 상기 복수의 하위 블록들 중에서 이미 움직임 예측이 완료된 블록의 움직임 벡터, 상기 현재 블록의 예측 움직임 벡터, 및 상기 현재 블록의 주변에 인접하여 위치한 블록의 움직임 벡터 중에서 적어도 하나를 포함할 수 있다.The current block may be one of a plurality of lower blocks generated by dividing an upper block for which motion prediction has already been completed, and the plurality of motion vectors include an origin vector indicating the zero position, a motion vector of the upper block, and the It may include at least one of a motion vector of a block for which motion prediction has been completed among a plurality of sub-blocks, a predicted motion vector of the current block, and a motion vector of a block located adjacent to the current block.

상기 조합 움직임 벡터는 상기 복수의 움직임 벡터의 평균에 의해 도출될 수 있다.The combined motion vector may be derived by an average of the plurality of motion vectors.

상기 조합 움직임 벡터는 상기 복수의 움직임 벡터의 가중치 합에 의해 도출될 수 있다.The combined motion vector may be derived by a weighted sum of the plurality of motion vectors.

상기 조합 움직임 벡터의 X 성분 값은 상기 복수의 움직임 벡터의 X 성분 값 중 최대 값으로 결정될 수 있고, 상기 조합 움직임 벡터의 Y 성분 값은 상기 복수의 움직임 벡터의 Y 성분 값 중 최대 값으로 결정될 수 있다.The X component value of the combined motion vector may be determined as the maximum value among the X component values of the plurality of motion vectors, and the Y component value of the combined motion vector may be determined as the maximum value among the Y component values of the plurality of motion vectors. there is.

상기 조합 움직임 벡터의 X 성분 값은 상기 복수의 움직임 벡터의 X 성분 값 중 최소 값으로 결정될 수 있고, 상기 조합 움직임 벡터의 Y 성분 값은 상기 복수의 움직임 벡터의 Y 성분 값 중 최소 값으로 결정될 수 있다.The X component value of the combined motion vector may be determined as a minimum value among X component values of the plurality of motion vectors, and the Y component value of the combined motion vector may be determined as a minimum value among Y component values of the plurality of motion vectors. there is.

상기 초기 검색 위치를 선택하는 단계는, 상기 적어도 하나의 후보 검색 위치를 나타내는 움직임 벡터 간의 상관도를 기반으로, 상기 적어도 하나의 후보 검색 위치 중에서 소정의 개수의 최종 후보 검색 위치를 결정하는 단계, 및 상기 소정의 개수의 최종 후보 검색 위치 중에서 상기 초기 검색 위치를 선택하는 단계를 더 포함할 수 있다.The selecting of the initial search position may include determining a predetermined number of final candidate search positions from among the at least one candidate search position based on a correlation between motion vectors indicating the at least one candidate search position; The method may further include selecting the initial search location from among the predetermined number of final candidate search locations.

상기 적어도 하나의 후보 검색 위치는 상기 현재 블록의 영점 위치를 기준으로 상기 현재 블록의 예측 움직임 벡터가 나타내는 위치를 포함할 수 있고, 상기 최종 후보 검색 위치를 결정하는 단계에서는, 상기 적어도 하나의 후보 검색 위치를 나타내는 움직임 벡터 중에서 상기 예측 움직임 벡터를 제외한 나머지 움직임 벡터, 및 상기 예측 움직임 벡터 간의 차이 값을 기반으로 상기 최종 후보 검색 위치를 결정할 수 있다.The at least one candidate search position may include a position indicated by the prediction motion vector of the current block with respect to the zero point position of the current block, and in the determining of the final candidate search position, the at least one candidate search position The final candidate search position may be determined based on a difference value between the motion vectors other than the predicted motion vector among motion vectors indicating a position and a difference value between the predicted motion vectors.

상기 현재 블록은 이미 움직임 예측이 완료된 상위 블록이 분할됨으로써 생성된 복수의 하위 블록들 중 하나일 수 있고, 상기 적어도 하나의 후보 검색 위치는 상기 현재 블록의 영점 위치를 기준으로, 상기 상위 블록에 대한 움직임 예측에 의해 생성된 상위 움직임 벡터가 나타내는 위치를 포함할 수 있으며, 상기 최종 후보 검색 위치를 결정하는 단계에서는, 상기 적어도 하나의 후보 검색 위치를 나타내는 움직임 벡터 중에서 상기 상위 움직임 벡터를 제외한 나머지 움직임 벡터, 및 상기 상위 움직임 벡터 간의 차이 값을 기반으로 상기 최종 후보 검색 위치를 결정할 수 있다.The current block may be one of a plurality of lower blocks generated by dividing an upper block for which motion prediction has already been completed, and the at least one candidate search position is based on the zero point position of the current block for the upper block. It may include a position indicated by an upper motion vector generated by motion prediction, and in the determining of the final candidate search position, the remaining motion vectors excluding the upper motion vector from among the motion vectors indicating the at least one candidate search position. , and the final candidate search position may be determined based on a difference value between the upper motion vectors.

상기 현재 블록은 이미 움직임 예측이 완료된 상위 블록이 분할됨으로써 생성된 복수의 하위 블록들 중 하나일 수 있고, 상기 적어도 하나의 후보 검색 위치는 상기 복수의 하위 블록들 중에서 이미 움직임 예측이 완료된 블록에 대한 움직임 예측에 의해 생성된 하위 움직임 벡터가 나타내는 위치를 포함할 수 있으며, 상기 최종 후보 검색 위치를 결정하는 단계에서는, 상기 적어도 하나의 후보 검색 위치를 나타내는 움직임 벡터 중에서 상기 하위 움직임 벡터를 제외한 나머지 움직임 벡터, 및 상기 하위 움직임 벡터 간의 차이 값을 기반으로 상기 최종 후보 검색 위치를 결정할 수 있다.The current block may be one of a plurality of sub-blocks generated by dividing an upper block for which motion prediction is already completed, and the at least one candidate search position is for a block for which motion prediction is already completed among the plurality of lower blocks. A position indicated by a lower motion vector generated by motion prediction may be included, and in the determining of the final candidate search position, the remaining motion vectors excluding the lower motion vector from among the motion vectors indicating the at least one candidate search position. , and the final candidate search position may be determined based on a difference value between the lower motion vectors.

상기 최종 후보 검색 위치를 결정하는 단계에서는, 상기 적어도 하나의 후보 검색 위치를 나타내는 움직임 벡터 각각의 분산 값을 기반으로 상기 최종 후보 검색 위치를 결정할 수 있다.In the determining of the final candidate search position, the final candidate search position may be determined based on a variance value of each motion vector indicating the at least one candidate search position.

본 발명의 다른 실시 형태는 인터 예측 방법이다. 상기 방법은, 현재 블록에 대해 적어도 하나의 후보 검색 위치를 결정하는 단계, 상기 적어도 하나의 후보 검색 위치 중에서 초기 검색 위치를 선택하는 단계, 상기 초기 검색 위치를 기반으로 설정된 검색 범위 내에서 움직임 예측을 수행함으로써 상기 현재 블록의 움직임 벡터를 도출하는 단계, 및 상기 도출된 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행함으로써 예측 블록을 생성하는 단계를 포함한다. 이 때, 상기 초기 검색 위치를 선택하는 단계에서는, 상기 적어도 하나의 후보 검색 위치의 부호화 비용을 기반으로 상기 초기 검색 위치를 선택할 수 있다.Another embodiment of the present invention is an inter prediction method. The method includes the steps of determining at least one candidate search location for a current block, selecting an initial search location from among the at least one candidate search location, and performing motion prediction within a search range set based on the initial search location. deriving a motion vector of the current block by performing the method, and generating a prediction block by performing prediction on the current block based on the derived motion vector. In this case, in the selecting of the initial search location, the initial search location may be selected based on an encoding cost of the at least one candidate search location.

본 발명의 또 다른 실시 형태는 인터 예측 장치이다. 상기 장치는, 현재 블록에 대해 적어도 하나의 후보 검색 위치를 결정하고, 상기 적어도 하나의 후보 검색 위치 중에서 초기 검색 위치를 선택하고, 상기 초기 검색 위치를 기반으로 설정된 검색 범위 내에서 움직임 예측을 수행함으로써 상기 현재 블록의 움직임 벡터를 도출하는 움직임 예측부, 및 상기 도출된 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행함으로써 예측 블록을 생성하는 움직임 보상부를 포함할 수 있다. 여기서, 상기 움직임 예측부는, 상기 적어도 하나의 후보 검색 위치의 부호화 비용을 기반으로 상기 초기 검색 위치를 선택할 수 있다.Another embodiment of the present invention is an inter prediction apparatus. The apparatus determines at least one candidate search location for a current block, selects an initial search location from among the at least one candidate search location, and performs motion prediction within a search range set based on the initial search location. and a motion predictor for deriving a motion vector of the current block, and a motion compensator for generating a prediction block by performing prediction on the current block based on the derived motion vector. Here, the motion predictor may select the initial search position based on the encoding cost of the at least one candidate search position.

본 발명의 또 다른 실시 형태는 영상 부호화 방법이다. 상기 방법은, 현재 블록에 대해 적어도 하나의 후보 검색 위치를 결정하는 단계, 상기 적어도 하나의 후보 검색 위치 중에서 초기 검색 위치를 선택하는 단계, 상기 초기 검색 위치를 기반으로 설정된 검색 범위 내에서 움직임 예측을 수행함으로써 상기 현재 블록의 움직임 벡터를 도출하는 단계, 상기 도출된 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행함으로써 예측 블록을 생성하는 단계, 및 상기 현재 블록과 상기 예측 블록을 기반으로 잔차 블록을 생성하고 상기 잔차 블록을 부호화하는 단계를 포함한다. 이 때, 상기 초기 검색 위치를 선택하는 단계에서는, 상기 적어도 하나의 후보 검색 위치의 부호화 비용을 기반으로 상기 초기 검색 위치를 선택할 수 있다.Another embodiment of the present invention is a video encoding method. The method includes the steps of determining at least one candidate search location for a current block, selecting an initial search location from among the at least one candidate search location, and performing motion prediction within a search range set based on the initial search location. deriving a motion vector of the current block by performing the steps, generating a prediction block by performing prediction on the current block based on the derived motion vector, and a residual block based on the current block and the prediction block and encoding the residual block. In this case, in the selecting of the initial search location, the initial search location may be selected based on an encoding cost of the at least one candidate search location.

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

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

본 발명에 따른 움직임 예측 방법에 의하면, 영상 부호화 성능이 향상될 수 있다.According to the motion prediction method according to the present invention, image encoding performance can be improved.

도 1은 본 발명이 적용되는 영상 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 2는 영상 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.
도 3은 인터 예측 방법의 일 실시예를 개략적으로 나타내는 흐름도이다.
도 4는 본 발명이 적용되는 움직임 예측 과정의 실시예를 개략적으로 나타내는 흐름도이다.
도 5는 초기 검색 위치 결정 방법의 일 실시예를 개략적으로 나타내는 도면이다.
도 6은 본 발명에 따른 후보 검색 위치 결정 방법의 실시예를 개략적으로 나타내는 도면이다.
도 7은 본 발명에 따른 후보 검색 위치 결정 방법의 다른 실시예를 개략적으로 나타내는 도면이다.
도 8은 본 발명에 따른 후보 검색 위치 결정 방법의 또 다른 실시예를 개략적으로 나타내는 도면이다.
1 is a block diagram illustrating a configuration of an image encoding apparatus to which the present invention is applied according to an embodiment.
2 is a block diagram illustrating a configuration of an image decoding apparatus according to an embodiment.
3 is a flowchart schematically illustrating an embodiment of an inter prediction method.
4 is a flowchart schematically illustrating an embodiment of a motion prediction process to which the present invention is applied.
5 is a diagram schematically illustrating an embodiment of a method for determining an initial search location.
6 is a diagram schematically showing an embodiment of a method for determining a candidate search position according to the present invention.
7 is a diagram schematically showing another embodiment of a method for determining a candidate search location according to the present invention.
8 is a diagram schematically showing another embodiment of a method for determining a candidate search location according to the present invention.

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

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

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

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

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

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

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

영상 부호화 장치(100)는 입력 영상에 대해 인트라(intra) 모드 또는 인터(inter) 모드로 부호화를 수행하고 비트스트림을 출력할 수 있다. 인트라 예측은 화면 내 예측, 인터 예측은 화면 간 예측을 의미한다. 인트라 모드인 경우 스위치(115)가 인트라로 전환되고, 인터 모드인 경우 스위치(115)가 인터로 전환될 수 있다. 영상 부호화 장치(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성한 후, 입력 블록과 예측 블록의 차분(residual)을 부호화할 수 있다.The image encoding apparatus 100 may encode an input image in an intra mode or an inter mode and output a bitstream. Intra prediction refers to intra prediction, and inter prediction refers to inter prediction. In the intra mode, the switch 115 may be switched to the intra mode, and in the inter mode, the switch 115 may 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 pixel values of an 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. there is. The motion compensator 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 the difference between the input block and the generated prediction block. The transform unit 130 may perform transform on the residual block to output a transform coefficient. In addition, 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 encoding unit 150 performs entropy encoding on the basis of values (eg, quantized coefficients) calculated by the quantization unit 140 and/or encoding parameter values calculated in the encoding process to perform entropy encoding on the bitstream ( bit stream) can be output.

엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(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 to express the symbol, so that bits for symbols to be encoded The size of the column may be reduced. Accordingly, compression performance of image encoding may be improved through 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 currently encoded image needs to be decoded and stored to be used as a reference image. Accordingly, the quantized coefficients are inverse quantized by the inverse quantization unit 160 and inversely transformed by the inverse transformation unit 170 . The inverse-quantized and inverse-transformed coefficients are added to the prediction block through an adder 175 to generate a reconstructed block.

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

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

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

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

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

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

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

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

이하, 블록은 영상 부호화 및 복호화의 단위를 의미한다. 영상 부호화 및 복호화 시 부호화 혹은 복호화 단위는, 영상을 분할하여 부호화 혹은 복호화 할 때 그 분할된 단위를 의미하므로, 부호화 유닛 (CU: Coding Unit), 예측 유닛 (PU: Prediction Unit), 변환 유닛(TU: Transform Unit), 변환 블록(transform block) 등으로 불릴 수 있다. 하나의 블록은 크기가 더 작은 하위 블록으로 더 분할될 수 있다.Hereinafter, a block means a unit of image encoding and decoding. When encoding and decoding an image, an encoding or decoding unit means a divided unit when encoding or decoding an image by dividing it, so a coding unit (CU: Coding Unit), a prediction unit (PU: Prediction Unit), and a transformation unit (TU) : Transform Unit), may be called a transform block (transform block), etc. One block may be further divided into smaller sub-blocks.

도 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 for the current block ( S310 ).

인터 모드에서 부호화기 및 복호화기는 현재 블록의 움직임 정보를 도출한 후, 상기 도출된 움직임 정보에 기반하여 인터 예측 및/또는 움직임 보상을 수행할 수 있다. 부호화기는 현재 블록에 대해 움직임 예측(motion estimation)을 수행함으로써, 현재 블록에 대한 움직임 정보를 도출할 수 있다. 이 때, 부호화기는 상기 움직임 정보와 관련된 정보를 복호화기로 전송할 수 있다. 복호화기는 부호화기로부터 전송된 정보를 기반으로 현재 블록의 움직임 정보를 도출할 수 있다. 현재 블록에 대한 움직임 예측 수행 방식의 구체적인 실시예들은 후술하기로 한다.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. The encoder may derive motion information on the current block by performing motion estimation on the current block. In this case, the encoder may transmit information related to the motion information to the decoder. The decoder may derive motion information of the current block based on information transmitted from the encoder. Specific embodiments of a method for performing motion prediction on the current block will be described later.

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

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

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

이하, 본 명세서에서는 설명의 편의상 예측 움직임 벡터 후보가 예측 움직임 벡터(Predicted Motion Vector: PMV)로 지칭될 수 있으며, 예측 움직임 벡터는 움직임 벡터 예측자(Motion Vector Predictor: MVP)로도 불릴 수 있다. 이와 같은 구별은 당해 기술 분야에서 통상의 지식을 가진 자라면 용이하게 할 수 있을 것이다.Hereinafter, in the present specification, for convenience of description, a predicted motion vector candidate may be referred to as a predicted motion vector (PMV), and the predicted motion vector may also be referred to as a motion vector predictor (MVP). Such a distinction will be readily available to those of ordinary skill in the art.

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

한편, 부호화기 및 복호화기는 복원된 주변 블록의 움직임 벡터 및/또는 Col 블록의 움직임 벡터를 예측 움직임 벡터로 사용하는 대신, 복원된 주변 블록들의 움직임 벡터의 미디언(median) 값을 예측 움직임 벡터로 사용할 수도 있다. 이 경우, 부호화기는 현재 블록의 움직임 벡터 값과 미디언 값 간의 차분을 부호화하여 복호화하여 복호화기로 전송할 수 있다. 이 때, 복호화기는 수신된 차분을 복호화할 수 있고, 복호화된 차분과 미디언 값을 더함으로써 현재 블록의 움직임 벡터를 도출할 수 있다. 이러한 움직임 벡터 부호화/복호화 방식은 ‘AMVP 방식’ 대신 ‘미디언 방식’으로 불릴 수 있다. On the other hand, the encoder and decoder use the median value of the motion vectors of the reconstructed neighboring blocks as the prediction motion vector instead of using the motion vector of the reconstructed neighboring block and/or the motion vector of the Col block as the prediction motion vector. may be In this case, the encoder may encode, decode, and transmit the difference between the motion vector value and the median value of the current block to the decoder. In this case, the decoder may decode the received difference, and may derive the motion vector of the current block by adding the decoded difference to the median value. This motion vector encoding/decoding method may be called a 'median method' instead of the 'AMVP method'.

후술되는 도 4 이하의 실시예들에서는, AMVP 방식이 사용되는 경우의 움직임 예측 과정이 서술되지만, 본 발명은 이에 한정되지 않고 미디언 방식이 사용되는 경우에도 동일하거나 유사한 방식으로 적용될 수 있다.4, which will be described later, a motion prediction process when the AMVP scheme is used is described, but the present invention is not limited thereto and may be applied in the same or similar manner even when the median scheme is used.

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

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

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

다시 도 3을 참조하면, 부호화기 및 복호화기는 상기 도출된 움직임 정보에 기반하여 현재 블록에 대한 움직임 보상을 수행함으로써, 현재 블록의 예측 블록을 생성할 수 있다(S320). 여기서, 예측 블록은 현재 블록에 대한 움직임 보상 수행 결과 생성된, 움직임 보상된 블록을 의미할 수 있다.Referring back to FIG. 3 , the encoder and the decoder may generate a prediction block of the current block by performing motion compensation 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.

도 4는 본 발명이 적용되는 움직임 예측 과정의 실시예를 개략적으로 나타내는 흐름도이다. 도 4의 실시예에 따른 움직임 예측 과정은 상술한 도 1의 영상 부호화 장치의 움직임 예측부에서 수행될 수 있다.4 is a flowchart schematically illustrating an embodiment of a motion prediction process to which the present invention is applied. The motion prediction process according to the embodiment of FIG. 4 may be performed by the motion prediction unit of the image encoding apparatus of FIG. 1 described above.

도 4를 참조하면, 부호화기는 현재 블록에 대해 복수의 후보 검색 위치(candidate search point)를 결정할 수 있다(S410).Referring to FIG. 4 , the encoder may determine a plurality of candidate search points for the current block ( S410 ).

움직임 예측 수행 시에는 초기 검색 위치(initial search point)를 기반으로 검색 범위(search range)가 정해지고 초기 검색 위치에서 움직임 예측이 시작될 수 있다. 즉, 초기 검색 위치는 움직임 예측 시에 움직임 예측이 시작되는 위치로서, 검색 범위의 중심이 되는 위치를 의미할 수 있다. 여기서, 검색 범위는 영상 및/또는 픽쳐 내에서 움직임 예측이 수행되는 범위를 의미할 수 있다. When motion prediction is performed, a search range may be determined based on an initial search point, and motion prediction may be started from the initial search point. That is, the initial search position is a position at which motion prediction is started during motion prediction, and may mean a position that becomes the center of a search range. Here, the search range may mean a range in which motion prediction is performed within an image and/or a picture.

따라서, 부호화기는 최적의 초기 검색 위치를 결정하기 위한 후보로서, 복수의 ‘후보 검색 위치’를 결정할 수 있다. 후보 검색 위치를 결정하는 방법의 구체적인 실시예들은 후술하기로 한다.Accordingly, the encoder may determine a plurality of 'candidate search positions' as candidates for determining an optimal initial search position. Specific embodiments of a method for determining a candidate search position will be described later.

다시 도 4를 참조하면, 부호화기는 복수의 후보 검색 위치 중에서 최소의 부호화 비용을 갖는 위치를 초기 검색 위치로 결정할 수 있다(S420).Referring back to FIG. 4 , the encoder may determine a position having the minimum encoding cost among a plurality of candidate search positions as an initial search position ( S420 ).

여기서, 부호화 비용은 현재 블록을 부호화 하는데 필요한 비용을 의미할 수 있다. 예컨대, 부호화 비용은 현재 블록과 예측 블록(여기서, 예측 블록은 후보 검색 위치에 대응되는 움직임 벡터를 기반으로 도출될 수 있음) 간의 오차 값 및/또는 왜곡(distortion)을 나타내는 SAD(Sum of Absolute Difference), SSE(Sum of Square Error) 및/또는 SSD(Sum of Square Difference) 값과 움직임 벡터(후보 검색 위치에 대응되는 움직임 벡터)를 부호화하기 위해 필요한 비용(움직임 비용: motion cost)을 합산한 값에 해당될 수 있다. 이는 일례로 다음 수학식 1과 같이 나타내어질 수 있다.Here, the encoding cost may mean a cost required to encode the current block. For example, the encoding cost is a sum of absolute difference (SAD) indicating an error value and/or distortion between a current block and a prediction block (where the prediction block may be derived based on a motion vector corresponding to a candidate search position). ), SSE (Sum of Square Error), and/or SSD (Sum of Square Difference) value and the sum of the cost (motion cost) required to encode a motion vector (a motion vector corresponding to a candidate search position) may apply to This may be expressed as Equation 1 below as an example.

[수학식 1][Equation 1]

부호화 비용(J) = SAD/SSE/SSD + MVcost Encoding cost (J) = SAD/SSE/SSD + MV cost

여기서, SAD, SSE 및 SSD는 상술한 바와 같이 현재 블록과 예측 블록(여기서, 예측 블록은 후보 검색 위치에 대응되는 움직임 벡터를 기반으로 도출될 수 있음) 간의 오차 값 및/또는 왜곡(distortion) 값을 나타낼 수 있다. 구체적으로, SAD는 원본 블록 내의 픽셀 값 및 예측 블록(여기서, 예측 블록은 후보 검색 위치에 대응되는 움직임 벡터를 기반으로 도출될 수 있음) 내의 픽셀 값 간의 오차 값들의 절대치의 합을 의미할 수 있다. 또한, SSE 및/또는 SSD는 원본 블록 내의 픽셀 값 및 예측 블록(여기서, 예측 블록은 후보 검색 위치에 대응되는 움직임 벡터를 기반으로 도출될 수 있음) 내의 픽셀 값 간의 오차 값들의 제곱의 합을 의미할 수 있다. MVcost는 움직임 벡터를 부호화하기 위해 필요한 움직임 비용(motion cost)을 나타낼 수 있다.Here, SAD, SSE, and SSD are error values and/or distortion values between the current block and the prediction block (here, the prediction block may be derived based on a motion vector corresponding to a candidate search position) as described above. can indicate Specifically, SAD may mean the sum of absolute values of error values between a pixel value in an original block and a pixel value in a prediction block (where the prediction block may be derived based on a motion vector corresponding to a candidate search position). . In addition, SSE and/or SSD mean the sum of squares of error values between a pixel value in an original block and a pixel value in a prediction block (where the prediction block may be derived based on a motion vector corresponding to a candidate search position) can do. MV cost may indicate a motion cost required to encode a motion vector.

부호화기는 복수의 후보 검색 위치 각각에 대해 현재 블록에 대응되는 예측 블록을 생성할 수 있다. 그리고 부호화기는 생성된 예측 블록 각각에 대해 부호화 비용을 계산할 수 있으며, 가장 작은 부호화 비용을 갖는 예측 블록에 대응되는 후보 검색 위치를 초기 검색 위치로 결정할 수 있다.The encoder may generate a prediction block corresponding to the current block for each of the plurality of candidate search positions. In addition, the encoder may calculate an encoding cost for each of the generated prediction blocks, and may determine a candidate search position corresponding to the prediction block having the smallest encoding cost as the initial search position.

다시 도 4를 참조하면, 부호화기는 결정된 초기 검색 위치를 기반으로 움직임 예측(motion estimation)을 수행함으로써, 현재 블록에 대한 최적의 움직임 벡터를 결정하거나 생성할 수 있다(S430).Referring back to FIG. 4 , the encoder may determine or generate an optimal motion vector for the current block by performing motion estimation based on the determined initial search position ( S430 ).

상술한 바와 같이, 부호화기는 초기 검색 위치를 기반으로 검색 범위를 설정할 수 있다. 여기서, 초기 검색 위치는 상기 검색 범위의 중심에 위치할 수 있고, 검색 범위의 크기 및/또는 형태는 소정의 크기 및/또는 형태로 정해질 수 있다. 이 때, 부호화기는 설정된 검색 범위 내에서 움직임 예측을 수행함으로써, 최소 오차 값(또는 최소 부호화 비용)을 갖는 픽셀의 위치를 결정할 수 있다. 여기서, 최소 오차 값을 갖는 픽셀의 위치는 현재 블록에 대한 움직임 예측을 수행함으로써 생성되는 최적의 움직임 벡터가 나타내는 위치를 의미할 수 있다. 즉, 부호화기는 최소 오차 값(또는 최소 부호화 비용)을 갖는 픽셀의 위치를 나타내는 움직임 벡터를 현재 블록의 움직임 벡터로 결정할 수 있다.As described above, the encoder may set the search range based on the initial search position. Here, the initial search position may be located at the center of the search range, and the size and/or shape of the search range may be determined to a predetermined size and/or shape. In this case, the encoder may determine a position of a pixel having a minimum error value (or a minimum encoding cost) by performing motion prediction within a set search range. Here, the position of the pixel having the minimum error value may mean a position indicated by an optimal motion vector generated by performing motion prediction on the current block. That is, the encoder may determine the motion vector indicating the position of the pixel having the minimum error value (or the minimum encoding cost) as the motion vector of the current block.

예컨대, 부호화기는 설정된 검색 범위 내에 존재하는 픽셀들의 위치를 중심으로 하는 복수의 예측 블록을 생성할 수 있다. 이 때, 부호화기는 복수의 예측 블록 및 원본 블록을 기반으로 검색 범위 내에 존재하는 픽셀들 각각의 위치에 대응되는 부호화 비용을 결정할 수 있다. 그리고 부호화기는 가장 작은 부호화 비용을 갖는 픽셀의 위치에 대응하는 움직임 벡터를 현재 블록의 움직임 벡터로 결정할 수 있다.For example, the encoder may generate a plurality of prediction blocks centered on positions of pixels existing within a set search range. In this case, the encoder may determine the encoding cost corresponding to each position of the pixels existing within the search range based on the plurality of prediction blocks and the original block. In addition, the encoder may determine a motion vector corresponding to the position of the pixel having the smallest encoding cost as the motion vector of the current block.

또한, 검색 범위 내의 모든 픽셀들에 대해 움직임 예측을 수행하는 경우 지나치게 복잡도가 높을 수 있다. 따라서, 부호화기는 설정된 검색 범위 내에서 소정의 패턴(pattern)에 의해 지시되는 픽셀들만을 기반으로 움직임 예측을 수행하는 패턴 검색(pattern search)을 수행할 수도 있다.Also, when motion prediction is performed on all pixels within a search range, complexity may be too high. Accordingly, the encoder may perform a pattern search for performing motion prediction based on only pixels indicated by a predetermined pattern within a set search range.

현재 블록의 움직임 벡터가 도출되거나 생성되면, 부호화기는 이를 기반으로 현재 블록에 대한 움직임 보상을 수행함으로써, 현재 블록에 대응되는 예측 블록을 생성할 수 있다. 부호화기는 현재 블록과 예측 블록의 차분에 의해 잔차 블록을 생성할 수 있으며, 생성된 잔차 블록에 대해 변환, 양자화 및/또는 엔트로피 부호화를 수행하여 비트스트림을 출력할 수 있다.When the motion vector of the current block is derived or generated, the encoder may generate a prediction block corresponding to the current block by performing motion compensation on the current block based on this. The encoder may generate a residual block based on the difference between the current block and the prediction block, and may output a bitstream by performing transform, quantization, and/or entropy encoding on the generated residual block.

상술한 실시예에 의하면, 초기 검색 위치가 어디로 결정되는지에 따라서, 검색 범위 내에 최소 오차 값을 갖는 픽셀이 포함되는지 여부가 결정될 수 있다. 또한, 초기 검색 위치 및 최소 오차 값을 갖는 픽셀의 위치 간의 상관성이 높을수록, 부호화기는 움직임 예측 시 최소 오차 값을 갖는 픽셀의 위치를 좀 더 효율적으로 찾을 수 있다. 따라서, 부호화 효율을 향상시키고 움직임 예측의 복잡도를 감소시키기 위해, 초기 검색 위치를 결정하는 다양한 방법들이 제공될 수 있다.According to the above-described embodiment, whether a pixel having a minimum error value is included within a search range may be determined according to where the initial search position is determined. In addition, the higher the correlation between the initial search position and the position of the pixel having the minimum error value, the more efficiently the encoder can find the position of the pixel having the minimum error value in motion prediction. Accordingly, in order to improve encoding efficiency and reduce the complexity of motion prediction, various methods for determining an initial search position may be provided.

도 5는 초기 검색 위치 결정 방법의 일 실시예를 개략적으로 나타내는 도면이다. 5 is a diagram schematically illustrating an embodiment of a method for determining an initial search location.

도 5는 현재 블록(BLKCurrent)이 속한 현재 픽쳐(current picture, 510) 및 현재 블록(BLKCurrent)의 인터 예측에 사용되는 참조 픽쳐(reference picture, 520)를 도시한다. 도 5의 실시예에서, BLKB 및 BLKC는 현재 블록에 인접하여 위치한 주변 블록을 나타낼 수 있다.5 illustrates a current picture 510 to which a current block BLK Current belongs and a reference picture 520 used for inter prediction of the current block BLK Current . In the embodiment of FIG. 5 , BLK B and BLK C may indicate neighboring blocks located adjacent to the current block.

도 5의 510을 참조하면, 부호화기는 현재 블록에 인접한 주변 블록의 움직임 벡터를 기반으로 현재 블록에 대해 복수의 후보 검색 위치를 결정할 수 있다. Referring to 510 of FIG. 5 , the encoder may determine a plurality of candidate search positions for the current block based on motion vectors of neighboring blocks adjacent to the current block.

예컨대, 부호화기는 영점 위치(516)를 기준으로, 현재 블록의 예측 움직임 벡터(MVPMV)가 나타내는 위치(513)를 현재 블록의 후보 검색 위치로 결정할 수 있다. 상술한 바와 같이, 예측 움직임 벡터는 AMVP 방식 또는 미디언 방식을 통해 결정될 수 있다. 예컨대, AMVP 방식이 적용되는 경우, 현재 블록의 예측 움직임 벡터(MVPMV)는 복원된 주변 블록의 움직임 벡터 및/또는 Col 블록의 움직임 벡터 등을 기반으로 도출될 수 있다. 따라서, 현재 블록의 예측 움직임 벡터는 복수 개일 수 있다. 도 5의 실시예에서는 설명의 편의상 하나의 예측 움직임 벡터(MVPMV)가 나타내는 후보 검색 위치(513)만이 도시되고 있으나, 본 발명은 이에 한정되는 것이 아니며 AMVP에서 사용되는 복수의 예측 움직임 벡터들은 모두 현재 블록의 후보 검색 위치 결정에 사용될 수 있다.For example, the encoder may determine the position 513 indicated by the prediction motion vector MV PMV of the current block as the candidate search position of the current block based on the zero position 516 . As described above, the prediction motion vector may be determined through the AMVP method or the median method. For example, when the AMVP method is applied, the prediction motion vector MV PMV of the current block may be derived based on the motion vector of the reconstructed neighboring block and/or the motion vector of the Col block. Accordingly, there may be a plurality of prediction motion vectors of the current block. In the embodiment of FIG. 5 , only the candidate search position 513 indicated by one prediction motion vector MV PMV is illustrated for convenience of description, but the present invention is not limited thereto. All of the plurality of prediction motion vectors used in AMVP are It can be used to determine a candidate search position of the current block.

또한, 부호화기는 현재 블록(BLKCurrent)의 중앙에 위치한 영점 위치(zero point, 516)를 현재 블록의 후보 검색 위치로 결정할 수 있다. 여기서, 영점 위치(516)는 영 벡터(MVZero)에 의해 나타내어질 수 있으며, 일례로 상기 영 벡터(MVZero)는 (0,0)일 수 있다. Also, the encoder may determine a zero point 516 located in the center of the current block BLK Current as a candidate search position of the current block. Here, the zero point position 516 may be represented by a zero vector MV Zero , and for example, the zero vector MV Zero may be (0,0).

그리고, 부호화기는 영점 위치(516)를 기준으로, 현재 블록에 인접하여 위치한 주변 블록의 움직임 벡터가 나타내는 위치를 현재 블록의 후보 검색 위치로 결정할 수 있다. 예컨대, 부호화기는 현재 블록의 상단에 인접한 블록들 중에서 가장 좌측에 위치한 블록(BLKB)의 움직임 벡터(MVB)가 나타내는 위치(519)를 현재 블록의 후보 검색 위치로 결정할 수 있다. 도 5의 실시예에서는 현재 블록(BLKCurrent)의 주변에 위치한 블록들 중에서 블록 BLKB의 움직임 벡터가 나타내는 위치(519)만이 후보 검색 위치로 도시되고 있으나, 본 발명은 이에 한정되는 것이 아니다. 예컨대, 부호화기는 현재 블록(BLKCurrent)의 좌측에 인접한 블록의 움직임 벡터가 나타내는 위치를 후보 검색 위치로 결정할 수도 있으며, 현재 블록(BLKCurrent) 외부의 우측 상단 코너에 위치한 블록(BLKC)의 움직임 벡터가 나타내는 위치를 후보 검색 위치로 결정할 수도 있다.In addition, the encoder may determine a position indicated by a motion vector of a neighboring block located adjacent to the current block as a candidate search position of the current block, based on the zero point position 516 . For example, the encoder may determine the position 519 indicated by the motion vector MV B of the leftmost block BLK B among blocks adjacent to the top of the current block as the candidate search position of the current block. In the embodiment of FIG. 5 , only the position 519 indicated by the motion vector of the block BLK B among blocks located in the vicinity of the current block (BLK Current ) is shown as a candidate search position, but the present invention is not limited thereto. For example, the encoder may determine a position indicated by a motion vector of a block adjacent to the left of the current block (BLK Current ) as a candidate search position, and the motion of the block (BLK C ) located in the upper right corner outside the current block (BLK Current ) A position indicated by the vector may be determined as a candidate search position.

복수의 후보 검색 위치가 결정되면, 부호화기는 복수의 후보 검색 위치(513, 516, 519) 각각에 대해 현재 블록에 대응되는 예측 블록을 생성할 수 있다. 그리고 부호화기는 생성된 예측 블록 각각에 대해 부호화 비용을 계산할 수 있다. 이 때, 부호화기는 복수의 후보 검색 위치(513, 516, 519) 중에서, 가장 작은 부호화 비용을 갖는 예측 블록에 대응되는 후보 검색 위치를 초기 검색 위치로 결정할 수 있다. 부호화 비용 계산 방법에 관한 실시예는 도 4에서 상술한 바 있으므로, 여기서는 이에 대한 구체적인 설명은 생략하기로 한다.When the plurality of candidate search positions are determined, the encoder may generate a prediction block corresponding to the current block for each of the plurality of candidate search positions 513 , 516 , and 519 . In addition, the encoder may calculate an encoding cost for each of the generated prediction blocks. In this case, the encoder may determine a candidate search location corresponding to a prediction block having the smallest encoding cost as an initial search location among the plurality of candidate search locations 513 , 516 , and 519 . Since the embodiment of the encoding cost calculation method has been described above with reference to FIG. 4 , a detailed description thereof will be omitted herein.

도 5의 520을 참조하면, 일례로 초기 검색 위치(513)는 현재 블록의 예측 움직임 벡터(MVPMV)가 나타내는 위치(513)로 결정될 수 있다. 이 때, 부호화기는 결정된 초기 검색 위치(513)를 기반으로 움직임 예측을 수행함으로써, 현재 블록에 대한 최적의 움직임 벡터를 생성할 수 있다. Referring to 520 of FIG. 5 , as an example, the initial search position 513 may be determined as a position 513 indicated by the prediction motion vector MV PMV of the current block. In this case, the encoder may generate an optimal motion vector for the current block by performing motion prediction based on the determined initial search position 513 .

상술한 바와 같이, 부호화기는 초기 검색 위치(513)를 기반으로 검색 범위(525)를 설정할 수 있다. 여기서, 초기 검색 위치(513)는 상기 검색 범위(525)의 중심에 위치할 수 있고, 검색 범위(525)의 크기 및/또는 형태는 소정의 크기 및/또는 형태로 정해질 수 있다. 이 때, 부호화기는 설정된 검색 범위(525) 내에서 움직임 예측을 수행함으로써, 최소 오차 값(또는 최소 부호화 비용)을 갖는 픽셀의 위치를 결정할 수 있다. 부호화기는 상기 결정된 위치를 나타내는 움직임 벡터를 현재 블록의 움직임 벡터로 결정할 수 있다.As described above, the encoder may set the search range 525 based on the initial search position 513 . Here, the initial search location 513 may be located at the center of the search range 525 , and the size and/or shape of the search range 525 may be determined to have a predetermined size and/or shape. In this case, the encoder may determine the position of the pixel having the minimum error value (or the minimum encoding cost) by performing motion prediction within the set search range 525 . The encoder may determine the motion vector indicating the determined position as the motion vector of the current block.

상술한 실시예에 의하면, 부호화기는 초기 검색 위치를 결정함에 있어서, 현재 블록의 움직임 벡터와 유사한 값을 갖는 주변 블록의 움직임 벡터 값을 참조할 수 있다. 현재 블록에 인접한 주변 블록의 움직임 벡터는 많은 경우에서 현재 블록의 움직임 벡터와 유사할 수 있다. 그러나, 현재 블록 내의 움직임 및/또는 텍스쳐(texture)가 복잡하여 블록 분할 회수가 증가되는 경우 등에서는, 현재 블록의 움직임 벡터 및 주변 블록의 움직임 벡터 간의 상관성이 낮을 수 있다.According to the above-described embodiment, in determining the initial search position, the encoder may refer to a motion vector value of a neighboring block having a value similar to the motion vector of the current block. A motion vector of a neighboring block adjacent to the current block may be similar to the motion vector of the current block in many cases. However, in a case in which the number of block divisions is increased due to complex motions and/or textures in the current block, the correlation between the motion vector of the current block and the motion vector of a neighboring block may be low.

현재 블록의 움직임 벡터 및 주변 블록의 움직임 벡터 간의 상관성이 낮은 경우에 주변 블록의 움직임 벡터를 참조하여 초기 검색 위치가 결정된다면, 검색 범위 내에 최소 오차 값을 갖는 픽셀이 포함되지 않을 가능성이 높다. 또한, 이 경우에는 초기 검색 위치 및 최소 오차 값을 갖는 픽셀의 위치 간의 거리가 멀 가능성이 높으므로, 패턴 검색 시에 최소 오차 값을 갖는 픽셀을 찾기 위해 더 많은 픽셀 위치에서 움직임 예측을 수행해야 할 수도 있다.If the initial search position is determined by referring to the motion vector of the neighboring block when the correlation between the motion vector of the current block and the motion vector of the neighboring block is low, it is highly likely that a pixel having the minimum error value is not included in the search range. In addition, in this case, since the distance between the initial search position and the position of the pixel with the minimum error value is likely to be long, it is necessary to perform motion prediction at more pixel positions in order to find the pixel with the minimum error value during pattern search. may be

따라서, 부호화 효율을 향상시키고 움직임 예측의 복잡도를 감소시키기 위해, 현재 블록에 인접한 주변 블록의 움직임 벡터를 참조하여 초기 검색 위치를 결정하는 방법 외에도 초기 검색 위치를 결정하는 다양한 방법들이 제공될 수 있다.Accordingly, in order to improve encoding efficiency and reduce the complexity of motion prediction, various methods for determining an initial search position may be provided in addition to a method of determining an initial search position by referring to a motion vector of a neighboring block adjacent to the current block.

도 6은 본 발명에 따른 후보 검색 위치 결정 방법의 실시예를 개략적으로 나타내는 도면이다. 6 is a diagram schematically showing an embodiment of a method for determining a candidate search position according to the present invention.

도 6의 실시예에서 점선 화살표는 움직임 예측에 의해 도출된 움직임 벡터를 의미할 수 있고, 실선 화살표는 도 5의 실시예에 따라 결정되는 후보 검색 위치를 나타내는 움직임 벡터(예컨대, 예측 움직임 벡터)를 의미할 수 있다.In the embodiment of FIG. 6 , a dotted arrow may mean a motion vector derived by motion prediction, and a solid arrow may indicate a motion vector (eg, a predicted motion vector) indicating a candidate search position determined according to the embodiment of FIG. 5 . can mean

영상 부호화 과정에서 부호화 대상 블록은 크기가 더 작은 하위 블록으로 더 분할될 수 있다. 이 경우, 부호화기는 분할되기 전의 부호화 대상 블록에 대해 움직임 예측을 수행한 후 분할된 하위 블록 각각에 대해서도 움직임 예측을 수행할 수 있다. In the process of encoding an image, the encoding object block may be further divided into smaller sub-blocks. In this case, the encoder may perform motion prediction on the encoding object block before splitting, and then perform motion prediction on each of the split sub-blocks.

현재 블록이 부호화 대상 블록이 분할됨으로써 생성된 하위 블록이고 상기 부호화 대상 블록에 대한 움직임 예측이 이미 완료된 경우, 부호화기는 상기 부호화 대상 블록에서의 움직임 예측에 의해 도출된 움직임 벡터가 나타내는 위치를 후보 검색 위치로 결정할 수 있다. When the current block is a sub-block generated by splitting the current block and motion prediction for the current block has already been completed, the encoder determines a position indicated by a motion vector derived by motion prediction in the current block as a candidate search position can be decided with

또한, 부호화 대상 블록이 분할됨으로써 생성된 하위 블록은 복수 개일 수 있다. 따라서, 하위 블록에 해당되는 현재 블록의 움직임 예측이 수행되기 전에 상기 부호화 대상 블록 내에 이미 움직임 예측이 완료된 하위 블록이 존재할 수 있으며, 이는 상기 부호화 대상 블록 내에서 현재 블록에 인접하여 위치한 주변 블록일 수 있다. 이 때, 부호화기는 상기 움직임 예측이 완료된 하위 블록의 움직임 벡터가 나타내는 위치를 후보 검색 위치로 결정할 수 있다.Also, there may be a plurality of sub-blocks generated by dividing the encoding object block. Therefore, before motion prediction of the current block corresponding to the sub-block is performed, a sub-block for which motion prediction is already completed may exist in the current block, which may be a neighboring block located adjacent to the current block in the current block. there is. In this case, the encoder may determine a position indicated by the motion vector of the sub-block for which the motion prediction is completed as a candidate search position.

이하, 본 명세서에서는 설명의 편의상, 부호화 대상 블록이 분할됨으로써 생성된 하위 블록에 대해, 상기 하위 블록을 포함하는 부호화 대상 블록은 상위 블록이라 지칭하기로 한다. 예컨대, 현재 블록이 부호화 대상 블록이 분할됨으로써 생성된 하위 블록인 경우, 현재 블록을 포함하는 부호화 대상 블록은 현재 블록에 대한 상위 블록으로 볼 수 있다. 하위 블록은 상위 블록이 분할됨으로써 생성된 블록이므로, 상위 블록의 크기는 하위 블록의 크기보다 클 수 있다.Hereinafter, for the convenience of description, in the present specification, with respect to a lower block generated by dividing the encoding object block, the encoding object block including the lower block will be referred to as an upper block. For example, when the current block is a lower block generated by dividing the encoding object block, the encoding object block including the current block may be viewed as an upper block with respect to the current block. Since the lower block is a block generated by dividing the upper block, the size of the upper block may be larger than the size of the lower block.

도 6의 610에서 BLK64x64는 최상위 블록을 나타내며, 일례로 최상위 블록의 크기는 64x64일 수 있다. 최상위 블록(BLK64x64)에 대한 상위 블록은 존재하지 않으므로, 최상위 블록에 대한 움직임 예측 수행 시 최상위 블록 내에는 후보 검색 위치를 결정하기 위해 사용될 수 있는 움직임 벡터가 존재하지 않을 수 있다. 즉, 최상위 블록에 대해서는 아직 움직임 예측이 수행되지 않은 상태이므로, 최상위 블록 내에서 사용될 수 있는 움직임 벡터가 존재하지 않을 수 있다.In 610 of FIG. 6 , BLK 64x64 indicates an uppermost block, and for example, the size of the uppermost block may be 64x64. Since an upper block for the uppermost block (BLK 64x64 ) does not exist, a motion vector that can be used to determine a candidate search position may not exist in the uppermost block when motion prediction is performed on the uppermost block. That is, since motion prediction has not yet been performed on the uppermost block, a motion vector that can be used in the uppermost block may not exist.

따라서, 부호화기는 도 5의 실시예에서 상술한 방식에 의해 후보 검색 위치를 결정할 수 있다. Accordingly, the encoder may determine the candidate search position by the method described above in the embodiment of FIG. 5 .

예컨대, 부호화기는 최상위 블록(BLK64x64)의 중앙에 위치한 영점 위치(613)를 최상위 블록(BLK64x64)의 후보 검색 위치로 결정할 수 있다. 여기서, 영점 위치(zero point, 613)는 영 벡터에 의해 나타내어질 수 있으며, 일례로 상기 영 벡터는 (0,0)일 수 있다. 또한, 부호화기는 영점 위치(613)를 기준으로, 최상위 블록(BLK64x64)의 예측 움직임 벡터(MVAMVP)가 나타내는 위치(616)를 최상위 블록(BLK64x64)의 후보 검색 위치로 결정할 수 있다. For example, the encoder may determine the zero point position 613 located in the center of the most significant block BLK 64x64 as a candidate search position of the most significant block BLK 64x64 . Here, the zero point 613 may be represented by a zero vector, for example, the zero vector may be (0,0). Also, the encoder may determine a position 616 indicated by the predicted motion vector MV AMVP of the most significant block BLK 64x64 as a candidate search position of the most significant block BLK 64x64 based on the zero position 613 .

도 6의 610에서는 설명의 편의상 영 벡터가 나타내는 위치(613)와 예측 움직임 벡터(MVAMVP)가 나타내는 위치(616)만이 후보 검색 위치로서 도시되고 있으나, 본 발명은 이에 한정되는 것은 아니다. 예컨대, 부호화기는 도 5의 실시예에서와 같이 최상위 블록(BLK64x64)에 인접한 주변 블록의 움직임 벡터가 지시하는 위치를 후보 검색 위치로 결정할 수도 있다.In 610 of FIG. 6 , only the position 613 indicated by the zero vector and the position 616 indicated by the predicted motion vector MV AMVP are illustrated as candidate search positions for convenience of explanation, but the present invention is not limited thereto. For example, as in the embodiment of FIG. 5 , the encoder may determine a position indicated by a motion vector of a neighboring block adjacent to the uppermost block BLK 64x64 as a candidate search position.

도 6의 620은 움직임 예측이 수행된 최상위 블록(BLK64x64)을 도시한다. 도 6의 620에서 MV64x64는 최상위 블록(BLK64x64)에 대한 움직임 예측에 의해 생성된 움직임 벡터를 나타낼 수 있으며, MV64x64는 최상위 블록(BLK64x64) 내에서 위치 623을 나타낼 수 있다.620 of FIG. 6 shows the highest block (BLK 64x64 ) on which motion prediction is performed. In 620 of FIG. 6 , MV 64x64 may indicate a motion vector generated by motion prediction for the most significant block (BLK 64x64 ), and MV 64x64 may indicate a position 623 within the most significant block (BLK 64x64 ).

도 6의 630을 참조하면, 최상위 블록(BLK64x64)은 복수의 하위 블록(BLK1 32x32, BLK2 32x32, BLK3 32x32, BLK4 32x32)으로 분할될 수 있다. 이 때, 일 실시예로 상기 복수의 하위 블록 각각은 32x32의 크기를 가질 수 있다. 일례로, 하위 블록 BLK1 32x32는 최상위 블록(BLK64x64) 내의 좌측 상단에 위치한 블록일 수 있고, 하위 블록 BLK2 32x32는 최상위 블록(BLK64x64) 내의 우측 상단에 위치한 블록일 수 있다. 또한, 하위 블록 BLK3 32x32는 최상위 블록(BLK64x64) 내의 좌측 하단에 위치한 블록일 수 있고, 하위 블록 BLK4 32x32는 최상위 블록(BLK64x64) 내의 우측 하단에 위치한 블록일 수 있다. Referring to 630 of FIG. 6 , the uppermost block BLK 64x64 may be divided into a plurality of lower blocks BLK 1 32x32 , BLK 2 32x32 , BLK 3 32x32 , BLK 4 32x32 . In this case, in an embodiment, each of the plurality of sub-blocks may have a size of 32x32. For example, the lower block BLK 1 32x32 may be a block located at the upper left in the uppermost block BLK 64x64 , and the lower block BLK 2 32x32 may be a block located at the upper right in the uppermost block BLK 64x64 . Also, the lower block BLK 3 32x32 may be a block located at the lower left in the uppermost block BLK 64x64 , and the lower block BLK 4 32x32 may be a block located at the lower right in the uppermost block BLK 64x64 .

부호화기는 최상위 블록(BLK64x64)에 대한 움직임 예측을 수행한 후 각각의 하위 블록(BLK1 32x32, BLK2 32x32, BLK3 32x32, BLK4 32x32)에 대해서도 움직임 예측을 수행할 수 있다. 이 때, 부호화기는 일례로 BLK1 32x32, BLK2 32x32, BLK3 32x32, BLK4 32x32의 순서로 하위 블록에 대한 움직임 예측을 수행할 수 있다.After performing motion prediction on the highest block (BLK 64x64 ), the encoder may also perform motion prediction on each of the lower blocks (BLK 1 32x32 , BLK 2 32x32 , BLK 3 32x32 , BLK 4 32x32 ). In this case, the encoder may perform motion prediction on the lower blocks in the order of, for example, BLK 1 32x32 , BLK 2 32x32 , BLK 3 32x32 , and BLK 4 32x32 .

다시 도 6의 630을 참조하면, 부호화기는 하위 블록들 중에서 첫 번째 블록(BLK1 32x32)에 대해 움직임 예측을 수행할 수 있다. 이 때, 부호화기는 도 5의 실시예에 따라 도출되는 후보 검색 위치(633, 636) 및 상위 블록(BLK64x64)에 대한 움직임 예측에 의해 생성된 움직임 벡터(MV64x64)가 나타내는 위치(639) 중에서 적어도 하나를 후보 검색 위치로 결정할 수 있다.Referring back to 630 of FIG. 6 , the encoder may perform motion prediction on a first block (BLK 1 32x32 ) among sub-blocks. At this time, the encoder selects the candidate search positions 633 and 636 derived according to the embodiment of FIG. 5 and the positions 639 indicated by the motion vector MV 64x64 generated by motion prediction for the upper block BLK 64x64 . At least one may be determined as a candidate search location.

예컨대, 부호화기는 첫 번째 블록(BLK1 32x32)의 중앙에 위치한 영점 위치(633)를 후보 검색 위치로 결정할 수 있다. 여기서, 영점 위치(633)는 영 벡터에 의해 나타내어질 수 있다. 또한, 부호화기는 영점 위치(633)를 기준으로, 첫 번째 블록(BLK1 32x32)의 예측 움직임 벡터(MVAMVP)가 나타내는 위치(636)를 후보 검색 위치로 결정할 수 있다. 또한, 부호화기는 최상위 블록(BLK64x64)에 대한 움직임 예측에 의해 생성된 움직임 벡터(MV64x64)가 나타내는 위치(639)를 후보 검색 위치로 결정할 수 있다. For example, the encoder may determine the zero point position 633 located in the center of the first block BLK 1 32x32 as the candidate search position. Here, the zero point position 633 may be represented by a zero vector. Also, the encoder may determine a position 636 indicated by the predicted motion vector MV AMVP of the first block BLK 1 32x32 as a candidate search position based on the zero position 633 . Also, the encoder may determine a position 639 indicated by a motion vector MV 64x64 generated by motion prediction for the most significant block BLK 64x64 as a candidate search position.

도 6의 630에서는 첫 번째 블록(BLK1 32x32) 내의 후보 검색 위치로서 위치 633, 636, 639만을 도시하지만, 본 발명은 이에 한정되는 것은 아니다. 예컨대, 부호화기는 첫 번째 블록(BLK1 32x32)에 인접하여 위치한 주변 블록의 움직임 벡터가 나타내는 위치를 추가로 후보 검색 위치로 결정할 수도 있다.In 630 of FIG. 6 , only positions 633, 636, and 639 are shown as candidate search positions in the first block BLK 1 32x32 , but the present invention is not limited thereto. For example, the encoder may additionally determine a position indicated by a motion vector of a neighboring block located adjacent to the first block BLK 1 32x32 as a candidate search position.

도 6의 640은 최상위 블록(BLK64x64) 내의 첫 번째 블록(BLK1 32x32, 645)에 대해 움직임 예측 수행이 완료된 경우 두 번째 블록(BLK2 32x32)에 대해 후보 검색 위치를 결정하는 방법의 실시예를 나타낸다. 도 6의 640에서 MV1 32x32는 첫 번째 블록(BLK1 32x32, 645)에 대한 움직임 예측에 의해 생성된 움직임 벡터를 나타낼 수 있다. MV1 32x32는 첫 번째 블록(BLK1 32x32, 645) 내에서 위치 653을 나타낼 수 있다.640 of FIG. 6 is an embodiment of a method of determining a candidate search position for the second block (BLK 2 32x32 ) when motion prediction is completed on the first block (BLK 1 32x32 , 645) in the uppermost block (BLK 64x64 ) indicates In 640 of FIG. 6 , MV 1 32x32 may represent a motion vector generated by motion prediction for the first block BLK 1 32x32 , 645 . MV 1 32x32 may indicate a position 653 in the first block (BLK 1 32x32 , 645 ).

도 6의 640을 참조하면, 부호화기는 하위 블록들 중에서 두 번째 블록(BLK2 32x32)에 대해 움직임 예측을 수행할 수 있다. 이 때, 부호화기는 도 5의 실시예에 따라 도출되는 후보 검색 위치(662, 664), 상위 블록(BLK64x64)에 대한 움직임 예측에 의해 생성된 움직임 벡터(MV64x64)가 나타내는 위치(666), 및 상위 블록(BLK64x64) 내에서 이미 움직임 예측이 완료된 다른 하위 블록(BLK1 32x32, 645)의 움직임 벡터(MV1 32x32)가 나타내는 위치(639) 중에서 적어도 하나를 후보 검색 위치로 결정할 수 있다. 여기서, 이미 움직임 예측이 완료된 다른 하위 블록(BLK1 32x32, 645)은, 상위 블록(BLK64x64) 내에서 움직임 예측 대상이 되는 하위 블록(BLK2 32x32)의 주변에 위치한 블록일 수 있다.Referring to 640 of FIG. 6 , the encoder may perform motion prediction on a second block (BLK 2 32x32 ) among sub-blocks. At this time, the encoder performs the candidate search positions 662 and 664 derived according to the embodiment of FIG. 5, the position 666 indicated by the motion vector (MV 64x64 ) generated by motion prediction for the upper block (BLK 64x64 ), and at least one of positions 639 indicated by motion vectors MV 1 32x32 of other lower blocks BLK 1 32x32 , 645 for which motion prediction is already completed within the upper block BLK 64x64 may be determined as the candidate search position. Here, the other lower blocks BLK 1 32x32 , 645 for which motion prediction is already completed may be blocks located in the vicinity of the lower block BLK 2 32x32 to be motion prediction within the upper block BLK 64x64 .

예컨대, 부호화기는 두 번째 블록(BLK2 32x32)의 중앙에 위치한 영점 위치(662)를 후보 검색 위치로 결정할 수 있다. 여기서, 영점 위치(662)는 영 벡터에 의해 나타내어질 수 있다. 또한, 부호화기는 영점 위치(662)를 기준으로, 두 번째 블록(BLK2 32x32)의 예측 움직임 벡터(MVAMVP)가 나타내는 위치(664)를 후보 검색 위치로 결정할 수 있다.For example, the encoder may determine a zero point position 662 located in the center of the second block BLK 2 32x32 as a candidate search position. Here, the zero point position 662 may be represented by a zero vector. Also, the encoder may determine a position 664 indicated by the predicted motion vector MV AMVP of the second block BLK 2 32x32 as a candidate search position based on the zero position 662 .

또한, 부호화기는 최상위 블록(BLK64x64)에 대한 움직임 예측에 의해 생성된 움직임 벡터(MV64x64)가 나타내는 위치(639)를 후보 검색 위치로 결정할 수 있다. 그리고, 부호화기는 최상위 블록(BLK64x64) 내의 하위 블록들 중에서 이미 움직임 예측이 완료된 하위 블록(BLK1 32x32, 645)의 움직임 벡터(MV1 32x32)가 나타내는 위치(668)를 후보 검색 위치로 결정할 수 있다.Also, the encoder may determine a position 639 indicated by a motion vector MV 64x64 generated by motion prediction for the most significant block BLK 64x64 as a candidate search position. And, the encoder can determine the position 668 indicated by the motion vector MV 1 32x32 of the sub-blocks BLK 1 32x32 , 645 for which motion prediction is already completed among the sub-blocks in the uppermost block BLK 64x64 as the candidate search position. there is.

나머지 하위 블록들(BLK3 32x32, BLK4 32x32) 각각에 대해서도, 부호화기는 두 번째 블록(BLK2 32x32)에서와 유사한 방식으로 후보 검색 위치를 결정할 수 있다. 예컨대, 하위 블록 BLK3 32x32 및 BLK4 32x32 각각에 대해, 부호화기는 도 5의 실시예에 따라 도출되는 후보 검색 위치, 상위 블록(BLK64x64)에 대한 움직임 예측에 의해 생성된 움직임 벡터(MV64x64)가 나타내는 위치, 및 상위 블록(BLK64x64) 내에서 이미 움직임 예측이 완료된 다른 하위 블록의 움직임 벡터가 나타내는 위치 중에서 적어도 하나를 후보 검색 위치로 결정할 수 있다.For each of the remaining sub-blocks BLK 3 32x32 and BLK 4 32x32 , the encoder may determine a candidate search position in a similar manner to that in the second block BLK 2 32x32 . For example, for each of the lower blocks BLK 3 32x32 and BLK 4 32x32 , the encoder generates a candidate search position derived according to the embodiment of FIG. 5 , and a motion vector (MV 64x64 ) generated by motion prediction for the upper block (BLK 64x64 ). At least one of a position indicated by , and a position indicated by a motion vector of another lower block in which motion prediction is already completed within the upper block BLK 64x64 may be determined as a candidate search position.

도 6의 640에서는 두 번째 블록(BLK2 32x32) 내의 후보 검색 위치로서 위치 662, 664, 666, 668만을 도시하지만, 본 발명은 이에 한정되는 것은 아니다. 예컨대, 부호화기는 두 번째 블록(BLK2 32x32)에 인접하여 위치한 주변 블록의 움직임 벡터가 나타내는 위치를 추가로 후보 검색 위치로 결정할 수도 있다.In 640 of FIG. 6, only positions 662, 664, 666, and 668 are shown as candidate search positions in the second block (BLK 2 32x32 ), but the present invention is not limited thereto. For example, the encoder may additionally determine a position indicated by a motion vector of a neighboring block located adjacent to the second block BLK 2 32x32 as a candidate search position.

도 7은 본 발명에 따른 후보 검색 위치 결정 방법의 다른 실시예를 개략적으로 나타내는 도면이다.7 is a diagram schematically showing another embodiment of a method for determining a candidate search location according to the present invention.

도 7은 움직임 예측 대상이 되는 현재 블록(BLKCurrent)이 속한 현재 픽쳐(current picture, 710), 및 상기 현재 블록(BLKCurrent)의 인터 예측에 사용되는 참조 픽쳐(reference picture, 720)를 도시한다. 여기서, 참조 픽쳐(720)는 이미 부호화 및/또는 복호화가 완료된 픽쳐일 수 있으며, 참조 픽쳐(720)에 속한 블록들(BLKColocated, BLKA, BLKB, BLKC, BLKD, BLKE, BLKF)도 모두 부호화 및/또는 복호화가 완료된 블록들일 수 있다. 도 7의 실시예에서 BLKColocated에 대한 움직임 벡터는 MVColocated 라 하고, BLKA, BLKB, BLKC, BLKD, BLKE 및 BLKF에 대한 움직임 벡터는 각각 MVA, MVB, MVC, MVD, MVE 및 MVF이라 한다.7 shows a current picture 710 to which a current block BLK Current , which is a motion prediction target, belongs, and a reference picture 720 used for inter prediction of the current block BLK Current . . Here, the reference picture 720 may be a picture that has already been encoded and/or decoded, and blocks (BLK Colocated , BLK A , BLK B , BLK C , BLK D , BLK E , BLK belonging to the reference picture 720 ). F ) may also be blocks in which encoding and/or decoding have been completed. In the embodiment of FIG. 7 , the motion vectors for BLK Colocated are called MV Colocated , and the motion vectors for BLK A , BLK B , BLK C , BLK D , BLK E and BLK F are MV A , MV B , MV C , They are called MV D , MV E and MV F .

부호화기는 움직임 예측 시에 참조 픽쳐(720)에 속한 블록들의 움직임 벡터가 나타내는 위치를 현재 블록(BLKCurrent)의 후보 검색 위치로 결정할 수 있다. The encoder may determine a position indicated by motion vectors of blocks belonging to the reference picture 720 as a candidate search position of the current block (BLK Current ) during motion prediction.

예컨대, 부호화기는 참조 픽쳐(720) 내에서 현재 블록(BLKCurrent)과 공간적으로 동일한 위치(중첩된 위치)에 존재하는 블록(BLKColocated)의 움직임 벡터(MVColocated)가 나타내는 위치를 현재 블록(BLKCurrent)의 후보 검색 위치로 결정할 수 있다. 여기서, 참조 픽쳐(720) 내에서 현재 블록(BLKCurrent)과 공간적으로 동일한 위치(중첩된 위치)에 존재하는 블록(BLKColocated)은 ‘동일 위치 블록(collocated block)’으로 불릴 수 있다.For example, the encoder indicates the position indicated by the motion vector MV Colocated of the block BLK Colocated existing at the same spatially (overlapping position) as the current block BLK Current within the reference picture 720 . Current ) can be determined as a candidate search position. Here, a block BLK Colocated that exists in the same spatially (overlapping position) as the current block BLK Current in the reference picture 720 may be referred to as a 'collocated block'.

또한, 부호화기는 참조 픽쳐(720) 내에서 동일 위치 블록(BLKColocated)에 인접하여 위치한 주변 블록들(BLKA, BLKB, BLKC, BLKD, BLKE, BLKF)의 움직임 벡터(MVA, MVB, MVC, MVD, MVE 및 MVF)가 지시하는 위치들 중에서 적어도 하나를 현재 블록(BLKCurrent)의 후보 검색 위치로 결정할 수 있다. 도 7에서, 참조 픽쳐(720) 내의 블록들은 이미 부호화 및/또는 복호화가 완료된 블록들이므로, 동일 위치 블록뿐만 아니라 동일 위치 블록의 주변에 인접하여 위치한 모든 블록들의 움직임 벡터가 현재 블록의 후보 검색 위치 결정에 사용될 수 있다.In addition, the encoder is a motion vector (MV A ) of neighboring blocks (BLK A , BLK B , BLK C , BLK D , BLK E , BLK F ) located adjacent to the co-located block (BLK Colocated ) in the reference picture 720 . , MV B , MV C , MV D , MV E and MV F ) may determine at least one of the positions indicated as a candidate search position of the current block (BLK Current ). In FIG. 7 , since blocks in the reference picture 720 are blocks that have already been encoded and/or decoded, motion vectors of all blocks located adjacent to the co-located block as well as the co-located block are the candidate search positions of the current block. can be used to make decisions.

도 8은 본 발명에 따른 후보 검색 위치 결정 방법의 또 다른 실시예를 개략적으로 나타내는 도면이다. 8 is a diagram schematically showing another embodiment of a method for determining a candidate search location according to the present invention.

도 8의 실시예에서 점선 화살표는 움직임 예측에 의해 도출된 움직임 벡터를 의미할 수 있고, 실선 화살표는 도 5의 실시예에 따라 결정되는 후보 검색 위치를 나타내는 움직임 벡터(예컨대, 예측 움직임 벡터)를 의미할 수 있다.In the embodiment of FIG. 8 , a dotted arrow may mean a motion vector derived by motion prediction, and a solid arrow may indicate a motion vector (eg, a predicted motion vector) indicating a candidate search position determined according to the embodiment of FIG. 5 . can mean

도 8은 상위 블록 BLK64x64, 상기 상위 블록이 분할됨으로써 생성된 하위 블록들 BLK1 32x32, BLK2 32x32, BLK3 32x32, BLK4 32x32 및 상기 상위 블록의 주변에 인접하여 위치한 블록 BLKA, BLKB, BLKC를 도시한다. 여기서, 일례로 상위 블록(BLK64x64)의 크기는 64x64일 수 있고, 하위 블록들(BLK1 32x32, BLK2 32x32, BLK3 32x32, BLK4 32x32)의 크기는 각각 32x32일 수 있다. 일례로, 하위 블록에 대한 움직임 예측은 BLK1 32x32, BLK2 32x32, BLK3 32x32, BLK4 32x32 의 순서로 수행될 수 있다. 8 shows an upper block BLK 64x64 , lower blocks generated by dividing the upper block BLK 1 32x32 , BLK 2 32x32 , BLK 3 32x32 , BLK 4 32x32 , and blocks BLK A and BLK B located adjacent to the upper block. , shows BLK C . Here, as an example, the size of the upper block BLK 64x64 may be 64x64, and the size of the lower blocks BLK 1 32x32 , BLK 2 32x32 , BLK 3 32x32 , BLK 4 32x32 may be 32x32, respectively. As an example, motion prediction for a lower block may be performed in the order of BLK 1 32x32 , BLK 2 32x32 , BLK 3 32x32 , and BLK 4 32x32 .

또한, 도 8에서 MV64x64는 상위 블록(BLK64x64)에 대한 움직임 예측에 의해 생성된 움직임 벡터를 나타내고, MV1 32x32는 첫 하위 번째 블록(BLK1 32x32)에 대한 움직임 예측에 의해 생성된 움직임 벡터를 나타낼 수 있다. 또한, MVA, MVB, MVC은 각각 주변 블록 BLKA, BLKB, BLKC에 대한 움직임 예측에 의해 생성된 움직임 벡터를 나타낼 수 있다. 그리고, MVAMVP는 예측 움직임 벡터를 나타낼 수 있다.In addition, in FIG. 8 , MV 64x64 denotes a motion vector generated by motion prediction for the upper block (BLK 64x64 ), and MV 1 32x32 denotes a motion vector generated by motion prediction for the first lower block (BLK 1 32x32 ). can represent Also, MV A , MV B , and MV C may represent motion vectors generated by motion prediction for neighboring blocks BLK A , BLK B , and BLK C , respectively. And, MV AMVP may indicate a prediction motion vector.

도 5 내지 도 7에서 상술한 바와 같이, 부호화기는 다양한 방식에 의해 움직임 예측 대상 블록에 대한 후보 검색 위치를 결정할 수 있다. 예컨대, 현재 블록은 상위 블록이 분할됨으로써 생성된 하위 블록이라 가정한다. 이 때, 부호화기는 영점 위치(이하, 영점 위치를 나타내는 움직임 벡터는 제1 움직임 벡터라 함), 예측 움직임 벡터(이하, 제2 움직임 벡터라 함)가 나타내는 위치, 움직임 예측 대상 블록에 인접한 주변 블록의 움직임 벡터(이하, 제3 움직임 벡터라 함)가 나타내는 위치, 움직임 예측 대상 블록에 대한 상위 블록의 움직임 벡터(이하, 제4 움직임 벡터라 함)가 나타내는 위치, 상기 상위 블록 내의 하위 블록들 중에서 이미 움직임 예측이 완료된 블록의 움직임 벡터(이하, 제5 움직임 벡터라 함)가 나타내는 위치, 참조 픽쳐 내의 동일 위치 블록의 움직임 벡터(이하, 제6 움직임 벡터라 함)가 나타내는 위치, 및 참조 픽쳐 내에서 상기 동일 위치 블록의 주변에 인접하여 위치한 블록의 움직임 벡터(이하, 제7 움직임 벡터라 함)가 나타내는 위치 중에서 적어도 하나를 움직임 예측 대상 블록에 대한 후보 검색 위치로 결정할 수 있다.As described above with reference to FIGS. 5 to 7 , the encoder may determine a candidate search position for a motion prediction object block by various methods. For example, it is assumed that the current block is a lower block generated by dividing an upper block. In this case, the encoder performs a zero position (hereinafter, a motion vector indicating the zero position is referred to as a first motion vector), a position indicated by a predicted motion vector (hereinafter referred to as a second motion vector), and a neighboring block adjacent to the motion prediction object block. A position indicated by a motion vector (hereinafter, referred to as a third motion vector) of A position indicated by a motion vector (hereinafter referred to as a fifth motion vector) of a block for which motion prediction has been completed, a position indicated by a motion vector (hereinafter referred to as a sixth motion vector) of the same-located block in a reference picture, and a position within the reference picture At least one of positions indicated by a motion vector (hereinafter, referred to as a seventh motion vector) of a block located adjacent to the periphery of the same position block may be determined as a candidate search position for the motion prediction object block.

상술한 제1 움직임 벡터 내지 제7 움직임 벡터는 현재 블록의 움직임 예측에 이용 가능한 움직임 벡터들의 세트를 구성할 수 있다. 이하, 본 명세서에서는 설명의 편의상 현재 블록의 움직임 예측에 이용 가능한 움직임 벡터들의 세트는 ‘움직임 벡터 세트’라 지칭하기로 한다.The above-described first to seventh motion vectors may constitute a set of motion vectors usable for motion prediction of the current block. Hereinafter, for convenience of description, in the present specification, a set of motion vectors usable for motion prediction of a current block will be referred to as a 'motion vector set'.

부호화기는 움직임 벡터 세트를 구성하는 복수의 움직임 벡터 중에서 적어도 하나의 움직임 벡터를 조합함으로써, 새로운 움직임 벡터를 생성할 수 있다. 예컨대, 부호화기는 움직임 벡터 세트에 포함된 움직임 벡터 중에서 하나 이상의 움직임 벡터들의 평균 값, 최대 값, 최소 값 및/또는 가중치 합에 의해 생성된 값을 새로운 움직임 벡터 값으로 사용할 수 있다. 이 때, 부호화기는 새로운 움직임 벡터가 나타내는 위치를 후보 검색 위치로 결정할 수 있다.The encoder may generate a new motion vector by combining at least one motion vector among a plurality of motion vectors constituting the motion vector set. For example, the encoder may use, as a new motion vector value, a value generated by the sum of the average value, the maximum value, the minimum value, and/or the weight of one or more motion vectors among the motion vectors included in the motion vector set. In this case, the encoder may determine the position indicated by the new motion vector as the candidate search position.

도 8에서 부호화기가 상위 블록(BLK64x64) 내의 하위 블록들 중에서 두 번째 블록(BLK2 32x32)에 대해 움직임 예측을 수행하는 경우를 가정한다. 즉, 도 8의 실시예에서 움직임 예측 대상이 되는 현재 블록은 상위 블록(BLK64x64) 내의 하위 블록들 중에서 두 번째 블록(BLK2 32x32)일 수 있다.In FIG. 8 , it is assumed that the encoder performs motion prediction on the second block BLK 2 32x32 among the lower blocks in the upper block BLK 64x64 . That is, in the embodiment of FIG. 8 , the current block to be motion prediction may be the second block BLK 2 32x32 among lower blocks in the upper block BLK 64x64 .

이 때, 도 8에서, 상위 블록(BLK64x64), 상기 상위 블록의 주변의 인접하여 위치한 블록들(BLKA, BLKB, BLKC) 및 첫 번째 하위 블록(BLK1 32x32)은 이미 움직임 예측 수행이 완료된 블록일 수 있다. 이 경우 움직임 예측 수행이 완료된 블록 각각은 움직임 예측에 의해 생성된 움직임 벡터를 포함할 수 있다. At this time, in FIG. 8 , the upper block BLK 64x64 , adjacent blocks BLK A , BLK B , BLK C , and the first lower block BLK 1 32x32 of the upper block have already performed motion prediction. This may be a completed block. In this case, each block on which motion prediction has been performed may include a motion vector generated by motion prediction.

따라서, 도 8의 실시예에서 일례로 현재 블록(BLK2 32x32)의 움직임 예측에 이용 가능한 움직임 벡터들의 세트인 움직임 벡터 세트는, 상위 블록의 움직임 벡터(MV64x64), 상기 상위 블록의 주변의 인접하여 위치한 주변 블록들의 움직임 벡터(MVA, MVB, MVC), 첫 번째 하위 블록의 움직임 벡터(MV1 32x32), 및 예측 움직임 벡터(MVAMVP) 등을 포함할 수 있다. 도 8의 실시예에서 MV64x64는 (-6,6), MV1 32x32는 (-5,2), MVAMVP는 (8,-2), MVA는 (0,10), MVB는 (-3,10), MVC 는 (6,0)이라 가정한다.Accordingly, in the embodiment of FIG. 8 , as an example, the motion vector set, which is a set of motion vectors available for motion prediction of the current block BLK 2 32x32 , is the motion vector MV 64x64 of the upper block, and the neighbor of the upper block. It may include motion vectors (MV A , MV B , MV C ) of neighboring blocks located by the MV, a motion vector (MV 1 32x32 ) of the first sub-block, and a prediction motion vector (MV AMVP ). 8, MV 64x64 is (-6,6), MV 1 32x32 is (-5,2), MV AMVP is (8,-2), MV A is (0,10), MV B is ( -3,10), MV C is assumed to be (6,0).

이 때, 부호화기는 움직임 벡터 세트에 포함된 복수의 움직임 벡터 중에서 하나 이상의 움직임 벡터를 조합함으로써 새로운 움직임 벡터를 생성할 수 있다. 도 8의 실시예에서, 움직임 벡터 세트에 포함된 복수의 움직임 벡터 중에서 새로운 움직임 벡터의 생성에 사용되는 움직임 벡터는 상위 블록의 움직임 벡터(MV64x64), 첫 번째 하위 블록의 움직임 벡터(MV1 32x32), 및 예측 움직임 벡터(MVAMVP)라 가정한다.In this case, the encoder may generate a new motion vector by combining one or more motion vectors among a plurality of motion vectors included in the motion vector set. In the embodiment of FIG. 8 , a motion vector used for generating a new motion vector among a plurality of motion vectors included in the motion vector set is a motion vector of an upper block (MV 64x64 ) and a motion vector of a first lower block (MV 1 32x32 ). ), and a prediction motion vector (MV AMVP ).

일례로, 부호화기는 움직임 벡터들의 평균 값을 새로운 움직임 벡터 값으로 결정할 수 있다. 이 경우 새로운 움직임 벡터는 다음 수학식 2에 의해 계산될 수 있다.As an example, the encoder may determine an average value of motion vectors as a new motion vector value. In this case, a new motion vector may be calculated by Equation 2 below.

[수학식 2][Equation 2]

X = (8-6-5)/3 = -1, Y = (-2+6+2)/3 = 2X = (8-6-5)/3 = -1, Y = (-2+6+2)/3 = 2

MVMEAN = (X,Y) = (-1,2)MV MEAN = (X,Y) = (-1,2)

여기서, MVMEAN은 움직임 벡터에 포함된 움직임 벡터들의 평균에 의해 도출된 새로운 움직임 벡터를 나타낼 수 있다.Here, MV MEAN may represent a new motion vector derived by the average of motion vectors included in the motion vector.

다른 예로, 부호화기는 움직임 벡터들의 X 성분 중에서 최대 값을 새로운 움직임 벡터의 X 성분 값으로 결정하고, 움직임 벡터들의 Y 성분 중에서 최대 값을 새로운 움직임 벡터의 Y 성분 값으로 결정할 수 있다. 이 경우 새로운 움직임 벡터는 다음 수학식 3에 의해 계산될 수 있다.As another example, the encoder may determine the maximum value among the X components of the motion vectors as the X component value of the new motion vector, and determine the maximum value among the Y components of the motion vectors as the Y component value of the new motion vector. In this case, a new motion vector may be calculated by Equation 3 below.

[수학식 3][Equation 3]

X=8, Y=6, MVMAX=(8,6)X=8, Y=6, MV MAX =(8,6)

여기서, MVMAX는 상술한 방법에 의해 새로이 도출된 움직임 벡터를 나타낼 수 있다.Here, MV MAX may represent a motion vector newly derived by the above-described method.

또 다른 예로, 부호화기는 움직임 벡터들의 X 성분 중에서 최소 값을 새로운 움직임 벡터의 X 성분 값으로 결정하고, 움직임 벡터들의 Y 성분 중에서 최소 값을 새로운 움직임 벡터의 Y 성분 값으로 결정할 수 있다. 이 경우 새로운 움직임 벡터는 다음 수학식 4에 의해 계산될 수 있다.As another example, the encoder may determine the minimum value of the X component of the motion vectors as the X component value of the new motion vector, and determine the minimum value of the Y component of the motion vectors as the Y component value of the new motion vector. In this case, a new motion vector may be calculated by Equation 4 below.

[수학식 4][Equation 4]

X=-6, Y=-2, MVMIN=(-6,-2)X=-6, Y=-2, MV MIN =(-6,-2)

여기서, MVMIN는 상술한 방법에 의해 새로이 도출된 움직임 벡터를 나타낼 수 있다.Here, MV MIN may represent a motion vector newly derived by the above-described method.

움직임 벡터 세트에 포함된 복수의 움직임 벡터 중에서 하나 이상의 움직임 벡터를 조합함으로써 새로운 움직임 벡터가 생성된 경우, 부호화기는 생성된 움직임 벡터가 나타내는 위치를 현재 블록(BLK2 32x32)의 후보 검색 위치로 결정할 수 있다.When a new motion vector is generated by combining one or more motion vectors among a plurality of motion vectors included in the motion vector set, the encoder may determine a position indicated by the generated motion vector as a candidate search position of the current block BLK 2 32x32 . there is.

한편, 상술한 실시예들에서와 같이 후보 검색 위치가 결정되면, 부호화기는 도 4의 실시예에서 상술한 바와 같이, 복수의 후보 검색 위치 중에서 최소의 부호화 비용을 갖는 위치를 초기 검색 위치로 결정할 수 있다. 이 때, 일례로 부호화기는 움직임 예측 대상 블록에 대해 도출된 모든 후보 검색 위치에 대해 부호화 비용을 계산함으로써, 초기 검색 위치를 결정할 수 있다. 그러나, 모든 후보 검색 위치에 대해 부호화 비용을 계산하는 방식은 복잡도가 높을 수 있다. 따라서, 부호화기는 초기 검색 위치 결정 과정에서 움직임 벡터들 간의 상관도를 기반으로 후보 검색 위치의 개수를 줄인 후에 초기 검색 위치를 결정할 수도 있다. On the other hand, when the candidate search position is determined as in the above-described embodiments, the encoder may determine, as the initial search position, a position having the minimum encoding cost among a plurality of candidate search positions as described above in the embodiment of FIG. 4 . there is. In this case, for example, the encoder may determine the initial search position by calculating the encoding cost for all candidate search positions derived for the motion prediction object block. However, a method of calculating the encoding cost for all candidate search positions may have high complexity. Accordingly, the encoder may determine the initial search position after reducing the number of candidate search positions based on the correlation between motion vectors in the initial search position determination process.

일 실시예로, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서, 예측 움직임 벡터(PMV)와의 차이 값이 가장 큰 움직임 벡터가 나타내는 위치를 제거할 수 있다. 또한, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치를 나타내는 움직임 벡터 중에서, 예측 움직임 벡터(PMV)와의 차이 값이 큰 순서대로 소정의 개수(예컨대, 2개, 3개 또는 4개 등)의 움직임 벡터를 선택하고 상기 선택된 움직임 벡터가 나타내는 위치를 제거할 수도 있다. 여기서, 움직임 벡터 간의 차이 값은 일례로, X 성분 간의 차이의 절대값 및 Y 성분 간의 차이의 절대값을 더한 값에 해당될 수 있다. As an embodiment, the encoder may remove a position indicated by a motion vector having the largest difference value from a predicted motion vector (PMV) from among a plurality of candidate search positions derived for the current block. In addition, the encoder includes a predetermined number (eg, 2, 3, or 4, etc.) in the order of the largest difference value from the predicted motion vector (PMV) among the motion vectors representing the plurality of candidate search positions derived for the current block. It is also possible to select a motion vector of , and remove a position indicated by the selected motion vector. Here, the difference value between motion vectors may correspond to, for example, a value obtained by adding an absolute value of a difference between X components and an absolute value of a difference between Y components.

다른 실시예로, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서, 예측 움직임 벡터(PMV)와의 차이 값이 가장 작은 움직임 벡터가 나타내는 위치 및 예측 움직임 벡터(PMV)가 나타내는 위치만을 후보 검색 위치로 사용할 수 있다. 즉, 이 경우 부호화기는 예측 움직임 벡터(PMV)와의 차이 값이 가장 작은 움직임 벡터가 나타내는 위치 및 예측 움직임 벡터(PMV)가 나타내는 위치를 제외한 나머지 위치들을 모두 제거할 수 있다. 또한, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치를 나타내는 움직임 벡터 중에서, 예측 움직임 벡터(PMV)와의 차이 값이 작은 순서대로 소정의 개수(예컨대, 2개, 3개 또는 4개 등)의 움직임 벡터를 선택하고 상기 선택된 움직임 벡터가 나타내는 위치 및 예측 움직임 벡터(PMV)가 나타내는 위치만을 후보 검색 위치로 사용할 수도 있다. 즉, 이 경우 부호화기는 상기 소정의 개수의 움직임 벡터 및 상기 예측 움직임 벡터(PMV)가 나타내는 위치를 제외한 나머지 위치들을 모두 제거할 수 있다.In another embodiment, the encoder searches for candidates only for positions indicated by a motion vector having the smallest difference value from a predicted motion vector (PMV) and a position indicated by the predicted motion vector (PMV) among a plurality of candidate search positions derived for the current block. position can be used. That is, in this case, the encoder may remove all positions other than the position indicated by the motion vector having the smallest difference value from the predicted motion vector PMV and the position indicated by the PMV. In addition, the encoder includes a predetermined number (eg, 2, 3, or 4, etc.) in the order of the smallest difference value from the predicted motion vector (PMV) among motion vectors representing a plurality of candidate search positions derived for the current block. It is also possible to select a motion vector of , and use only a position indicated by the selected motion vector and a position indicated by a predicted motion vector (PMV) as a candidate search position. That is, in this case, the encoder may remove all positions except for positions indicated by the predetermined number of motion vectors and the predicted motion vectors (PMV).

예컨대, 도 8에서 MV64x64, MV1 32x32, MVAMVP, MVA, MVB 및 MVC가 나타내는 위치가 현재 블록(MV2 32x32)의 후보 검색 위치로 결정된 경우를 가정한다. 여기서, 일례로 MV64x64는 (-6,6), MV1 32x32는 (-5,2), MVAMVP는 (8,-2), MVA는 (0,10), MVB는 (-3,10), MVC 는 (6,0)일 수 있다. 이 때, 후보 검색 위치를 나타내는 각각의 움직임 벡터와 예측 움직임 벡터(MVAMVP)의 차이 값은 다음 수학식 5에서와 같이 계산될 수 있다.For example, it is assumed that positions indicated by MV 64x64 , MV 1 32x32 , MV AMVP , MV A , MV B and MV C in FIG. 8 are determined as candidate search positions of the current block (MV 2 32x32 ). Here, as an example, MV 64x64 is (-6,6), MV 1 32x32 is (-5,2), MV AMVP is (8,-2), MV A is (0,10), MV B is (-3 ,10), MV C may be (6,0). In this case, the difference value between each motion vector indicating the candidate search position and the predicted motion vector MV AMVP may be calculated as in Equation 5 below.

[수학식 5][Equation 5]

|MVAMVP - MV64x64| = |{8-(-6)}| + |(-2-6)| = 22|MV AMVP - MV 64x64 | = |{8-(-6)}| + |(-2-6)| = 22

|MVAMVP - MV1 32x32| = |{8-(-5)}| + |(-2-2)| = 17|MV AMVP - MV 1 32x32 | = |{8-(-5)}| + |(-2-2)| = 17

|MVAMVP - MVA| = |8-0| + |(-2-10)| = 20|MV AMVP - MV A | = |8-0| + |(-2-10)| = 20

|MVAMVP - MVB| = |{8-(-3)}| + |(-2-10)| = 23|MV AMVP - MV B | = |{8-(-3)}| + |(-2-10)| = 23

|MVAMVP - MVC| = |8-6| + |(-2-0)| = 4|MV AMVP - MV C | = |8-6| + |(-2-0)| = 4

이 때, 부호화기는 일례로 예측 움직임 벡터와의 차이 값이 가장 큰 움직임 벡터(MVB)가 나타내는 위치를 후보 검색 위치에서 제거할 수 있다. 다른 예로 부호화기는 예측 움직임 벡터와의 차이 값이 가장 큰 움직임 벡터(MVB)가 나타내는 위치, 및 예측 움직임 벡터와의 차이 값이 MVB 다음으로 큰 움직임 벡터(MV64x64)가 나타내는 위치를 후보 검색 위치에서 제거할 수 있다. 여기서, 움직임 벡터 간의 차이 값은 일례로, X 성분 간의 차이의 절대값 및 Y 성분 간의 차이의 절대값을 더한 값에 해당될 수 있다. In this case, for example, the encoder may remove a position indicated by the motion vector MV B having the largest difference value from the predicted motion vector from the candidate search position. As another example, the encoder searches for a candidate for a position indicated by a motion vector (MV B ) having the largest difference value from the predicted motion vector and a position indicated by a motion vector (MV 64x64 ) having the next largest difference value from the predicted motion vector after MV B . can be removed from the location. Here, the difference value between motion vectors may correspond to, for example, a value obtained by adding an absolute value of a difference between X components and an absolute value of a difference between Y components.

또 다른 예로 부호화기는 예측 움직임 벡터(MVAMVP) 및 상기 예측 움직임 벡터와의 차이 값이 가장 작은 움직임 벡터(MVC)가 나타내는 위치만을 후보 검색 위치로 사용할 수 있다. 이 경우, 부호화기는 움직임 벡터 MVAMVP 및 MVC가 나타내는 위치를 제외한 나머지 위치들을 후보 검색 위치에서 제거할 수 있다. 또 다른 예로 부호화기는 예측 움직임 벡터(MVAMVP), 상기 예측 움직임 벡터와의 차이 값이 가장 작은 움직임 벡터(MVC)가 나타내는 위치, 및 상기 예측 움직임 벡터와의 차이 값이 MVC 다음으로 작은 움직임 벡터(MV1 32x32)가 나타내는 위치만을 후보 검색 위치로 사용할 수도 있다. 이 경우, 부호화기는 움직임 벡터 MVAMVP, MVC 및 MV1 32x32가 나타내는 위치를 제외한 나머지 위치들을 후보 검색 위치에서 제거할 수 있다.As another example, the encoder may use only the position indicated by the prediction motion vector MV AMVP and the motion vector MV C having the smallest difference value from the prediction motion vector as the candidate search position. In this case, the encoder may remove positions other than the positions indicated by the motion vectors MV AMVP and MV C from the candidate search positions. As another example, the encoder may use a prediction motion vector (MV AMVP ), a position indicated by a motion vector (MV C ) having the smallest difference value from the predicted motion vector, and a motion having the smallest difference value from the predicted motion vector next to MV C . Only a position indicated by the vector MV 1 32x32 may be used as a candidate search position. In this case, the encoder may remove positions other than the positions indicated by the motion vectors MV AMVP , MV C and MV 1 32x32 from the candidate search positions.

또 다른 실시예로, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서, 상위 블록의 움직임 벡터와의 차이 값이 가장 큰 움직임 벡터가 나타내는 위치를 제거할 수 있다. 또한, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치를 나타내는 움직임 벡터 중에서, 상위 블록의 움직임 벡터와의 차이 값이 큰 순서대로 소정의 개수(예컨대, 2개, 3개 또는 4개 등)의 움직임 벡터를 선택하고 상기 선택된 움직임 벡터가 나타내는 위치를 제거할 수도 있다.As another embodiment, the encoder may remove a position indicated by a motion vector having the largest difference value from a motion vector of an upper block from among a plurality of candidate search positions derived for the current block. In addition, the encoder includes a predetermined number (eg, 2, 3, or 4, etc.) of motion vectors representing a plurality of candidate search positions derived with respect to the current block in the order of the difference value from the motion vector of the upper block to the largest. It is also possible to select a motion vector of , and remove a position indicated by the selected motion vector.

또 다른 실시예로, 부호화기는 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서, 상위 블록의 움직임 벡터와의 차이 값이 가장 작은 움직임 벡터가 나타내는 위치 및 상위 블록의 움직임 벡터가 나타내는 위치만을 후보 검색 위치로 사용할 수 있다. 즉, 이 경우 부호화기는 상위 블록의 움직임 벡터와의 차이 값이 가장 작은 움직임 벡터가 나타내는 위치 및 상위 블록의 움직임 벡터가 나타내는 위치를 제외한 나머지 위치들을 모두 제거할 수 있다. 또한, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서, 상위 블록의 움직임 벡터와의 차이 값이 작은 순서대로 소정의 개수(예컨대, 2개, 3개 또는 4개 등)의 움직임 벡터를 선택할 수 있고, 상기 선택된 움직임 벡터가 나타내는 위치 및 상위 블록의 움직임 벡터가 나타내는 위치만을 후보 검색 위치로 사용할 수도 있다. 즉, 이 경우 부호화기는 상기 소정의 개수의 움직임 벡터 및 상기 상위 블록의 움직임 벡터가 나타내는 위치를 제외한 나머지 위치들을 모두 제거할 수 있다.In another embodiment, the encoder only uses a position indicated by a motion vector having the smallest difference value from a motion vector of an upper block and a position indicated by the motion vector of an upper block among a plurality of candidate search positions derived for the current block. Can be used as a candidate search location. That is, in this case, the encoder may remove all positions other than the position indicated by the motion vector having the smallest difference value from the motion vector of the upper block and the position indicated by the motion vector of the upper block. In addition, the encoder selects a predetermined number (eg, 2, 3, or 4, etc.) of motion vectors in the order of the smallest difference value from the motion vector of the upper block from among the plurality of candidate search positions derived for the current block. may be selected, and only the position indicated by the selected motion vector and the position indicated by the motion vector of the upper block may be used as candidate search positions. That is, in this case, the encoder may remove all positions other than the positions indicated by the predetermined number of motion vectors and the motion vectors of the upper block.

예컨대, 도 8에서 MV64x64, MV1 32x32, MVAMVP, MVA, MVB 및 MVC가 나타내는 위치가 현재 블록(MV2 32x32)의 후보 검색 위치로 결정된 경우를 가정한다. 여기서, 일례로 MV64x64는 (-6,6), MV1 32x32는 (-5,2), MVAMVP는 (8,-2), MVA는 (0,10), MVB는 (-3,10), MVC 는 (6,0)일 수 있다. 이 때, 후보 검색 위치를 나타내는 각각의 움직임 벡터와 상위 블록의 움직임 벡터(MV64x64)의 차이 값은 다음 수학식 6에서와 같이 계산될 수 있다.For example, it is assumed that positions indicated by MV 64x64 , MV 1 32x32 , MV AMVP , MV A , MV B and MV C in FIG. 8 are determined as candidate search positions of the current block (MV 2 32x32 ). Here, as an example, MV 64x64 is (-6,6), MV 1 32x32 is (-5,2), MV AMVP is (8,-2), MV A is (0,10), MV B is (-3 ,10), MV C may be (6,0). In this case, the difference value between each motion vector indicating the candidate search position and the motion vector MV 64x64 of the upper block may be calculated as in Equation 6 below.

[수학식 6][Equation 6]

|MV64x64 - MVAMVP| = |-6-8| + |(6-(-2)}| = 22|MV 64x64 - MV AMVP | = |-6-8| + |(6-(-2)}| = 22

|MV64x64 - MV1 32x32| = |{-6-(-5)}| + |(6-2)| = 5|MV 64x64 - MV 1 32x32 | = |{-6-(-5)}| + |(6-2)| = 5

|MV64x64 - MVA| = |-6-0| + |6-10| = 10|MV 64x64 - MV A | = |-6-0| + |6-10| = 10

|MV64x64 - MVB| = |{-6-(-3)}| + |6-10| = 7|MV 64x64 - MV B | = |{-6-(-3)}| + |6-10| = 7

|MV64x64 - MVC| = |-6-6| + |6-0| = 18|MV 64x64 - MV C | = |-6-6| + |6-0| = 18

이 때, 부호화기는 일례로 상위 블록의 움직임 벡터와의 차이 값이 가장 큰 움직임 벡터(MVAMVP)가 나타내는 위치를 후보 검색 위치에서 제거할 수 있다. 다른 예로 부호화기는 상위 블록의 움직임 벡터와의 차이 값이 가장 큰 움직임 벡터(MVAMVP)가 나타내는 위치, 및 상위 블록의 움직임 벡터와의 차이 값이 MVAMVP 다음으로 큰 움직임 벡터(MVC)가 나타내는 위치를 후보 검색 위치에서 제거할 수 있다.In this case, for example, the encoder may remove a position indicated by a motion vector (MV AMVP ) having the largest difference value from the motion vector of the upper block from the candidate search position. As another example, the encoder indicates a position indicated by a motion vector (MV AMVP ) having the largest difference value from the motion vector of the upper block, and a motion vector (MV C ) having the second largest difference value from the motion vector of the upper block next to MV AMVP . A location may be removed from a candidate search location.

또 다른 예로 부호화기는 상위 블록의 움직임 벡터(MV64x64) 및 상기 상위 블록의 움직임 벡터와의 차이 값이 가장 작은 움직임 벡터(MV1 32x32)가 나타내는 위치만을 후보 검색 위치로 사용할 수 있다. 이 경우, 부호화기는 움직임 벡터 MV64x64 및 MV1 32x32가 나타내는 위치를 제외한 나머지 위치들을 후보 검색 위치에서 제거할 수 있다. 또 다른 예로 부호화기는 상위 블록의 움직임 벡터(MV64x64), 상기 상위 블록의 움직임 벡터와의 차이 값이 가장 작은 움직임 벡터(MV1 32x32)가 나타내는 위치, 및 상기 상위 블록의 움직임 벡터와의 차이 값이 MV1 32x32 다음으로 작은 움직임 벡터(MVB)가 나타내는 위치만을 후보 검색 위치로 사용할 수도 있다. 이 경우, 부호화기는 움직임 벡터 MV64x64, MV1 32x32 및 MVB가 나타내는 위치를 제외한 나머지 위치들을 후보 검색 위치에서 제거할 수 있다.As another example, the encoder may use only the position indicated by the motion vector MV 64x64 of the upper block and the motion vector MV 1 32x32 having the smallest difference value from the motion vector of the upper block as the candidate search position. In this case, the encoder may remove positions other than the positions indicated by the motion vectors MV 64x64 and MV 1 32x32 from the candidate search positions. As another example, the encoder provides a position indicated by a motion vector (MV 64x64 ) of an upper block, a motion vector (MV 1 32x32 ) having the smallest difference value from the motion vector of the upper block, and a difference value from the motion vector of the upper block Only the position indicated by the smallest motion vector MV B next to MV 1 32x32 may be used as the candidate search position. In this case, the encoder may remove positions other than the positions indicated by the motion vectors MV 64x64 , MV 1 32x32 , and MV B from the candidate search positions.

또 다른 실시예로, 현재 블록(예컨대, 도 8의 MV2 32x32)이 상위 블록(예컨대, 도 8의 MV64x64)이 분할됨으로써 생성된 하위 블록인 경우, 상기 상위 블록 내에는 이미 움직임 예측이 수행된 다른 하위 블록(예컨대, 도 8의 MV1 32x32)이 존재할 수 있다. 이하, ‘다른 하위 블록’이라 함은, 현재 블록과 동일한 상위 블록에 속하면서 이미 움직임 예측이 수행된 하위 블록을 의미할 수 있다.As another embodiment, when the current block (eg, MV 2 32x32 in FIG. 8 ) is a lower block generated by dividing an upper block (eg, MV 64x64 in FIG. 8 ), motion prediction is already performed in the upper block Another sub-block (eg, MV 1 32x32 of FIG. 8 ) may exist. Hereinafter, 'another lower block' may refer to a lower block belonging to the same upper block as the current block and on which motion prediction has already been performed.

이 경우, 일례로 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서, 상기 다른 하위 블록(예컨대, 도 8의 MV1 32x32)의 움직임 벡터와의 차이 값이 가장 큰 움직임 벡터가 나타내는 위치를 제거할 수 있다. 또한, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치를 나타내는 움직임 벡터 중에서, 다른 하위 블록(예컨대, 도 8의 MV1 32x32)의 움직임 벡터와의 차이 값이 큰 순서대로 소정의 개수(예컨대, 2개, 3개 또는 4개 등)의 움직임 벡터를 선택하고 상기 선택된 움직임 벡터가 나타내는 위치를 제거할 수도 있다.In this case, for example, the encoder selects a position indicated by a motion vector having the largest difference value from a motion vector of another sub-block (eg, MV 1 32x32 in FIG. 8 ) among a plurality of candidate search positions derived for the current block. can be removed In addition, the encoder selects a predetermined number of motion vectors representing a plurality of candidate search positions derived with respect to the current block in order of increasing difference values from motion vectors of other sub-blocks (eg, MV 1 32x32 of FIG. 8 ) (eg, , 2, 3, 4, etc.) motion vectors may be selected and positions indicated by the selected motion vectors may be removed.

또한 이 경우, 다른 예로 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서, 다른 하위 블록(예컨대, 도 8의 MV1 32x32)의 움직임 벡터와의 차이 값이 가장 작은 움직임 벡터가 나타내는 위치 및 다른 하위 블록(예컨대, 도 8의 MV1 32x32)의 움직임 벡터가 나타내는 위치만을 후보 검색 위치로 사용할 수 있다. 즉, 이 경우 부호화기는 다른 하위 블록(예컨대, 도 8의 MV1 32x32)의 움직임 벡터와의 차이 값이 가장 작은 움직임 벡터가 나타내는 위치 및 다른 하위 블록(예컨대, 도 8의 MV1 32x32)의 움직임 벡터가 나타내는 위치를 제외한 나머지 위치들을 모두 제거할 수 있다. 또한, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서, 다른 하위 블록(예컨대, 도 8의 MV1 32x32)의 움직임 벡터와의 차이 값이 작은 순서대로 소정의 개수(예컨대, 2개, 3개 또는 4개 등)의 움직임 벡터를 선택할 수 있고, 상기 선택된 움직임 벡터가 나타내는 위치 및 다른 하위 블록(예컨대, 도 8의 MV1 32x32)의 움직임 벡터가 나타내는 위치만을 후보 검색 위치로 사용할 수도 있다. 즉, 이 경우 부호화기는 상기 소정의 개수의 움직임 벡터 및 상기 다른 하위 블록(예컨대, 도 8의 MV1 32x32)의 움직임 벡터가 나타내는 위치를 제외한 나머지 위치들을 모두 제거할 수 있다.Also, in this case, as another example, the encoder indicates a position indicated by a motion vector having the smallest difference value from a motion vector of another sub-block (eg, MV 1 32x32 in FIG. 8 ) among a plurality of candidate search positions derived for the current block; Only a position indicated by a motion vector of another sub-block (eg, MV 1 32x32 of FIG. 8 ) may be used as a candidate search position. That is, in this case, the encoder determines a position indicated by a motion vector having the smallest difference value from a motion vector of another sub-block (eg, MV 1 32x32 in FIG. 8 ) and a motion of another sub-block (eg, MV 1 32x32 in FIG. 8 ). All positions other than the position indicated by the vector can be removed. In addition, the encoder selects a predetermined number (eg, 2, 3 or 4, etc.) motion vectors may be selected, and only the position indicated by the selected motion vector and the position indicated by the motion vector of another sub-block (eg, MV 1 32x32 in FIG. 8 ) may be used as candidate search positions. . That is, in this case, the encoder may remove all positions other than the positions indicated by the predetermined number of motion vectors and the motion vectors of the other sub-block (eg, MV 1 32x32 in FIG. 8 ).

다른 하위 블록의 움직임 벡터를 기반으로 후보 검색 위치에서 제거될 위치를 결정하는 방법의 구체적인 실시예는 상술한 수학식 5 및 수학식 6에서와 유사하므로, 여기서는 이에 대한 구체적인 설명은 생략하기로 한다.A specific embodiment of a method of determining a position to be removed from a candidate search position based on a motion vector of another sub-block is similar to Equations 5 and 6 described above, and thus a detailed description thereof will be omitted herein.

또 다른 실시예로, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치를 나타내는 움직임 벡터들을 기반으로 상기 움직임 벡터들 각각에 대한 분산 값을 구할 수 있다. 이 때, 부호화기는 상기 분산 값을 기반으로 후보 검색 위치에서 제거될 위치를 결정할 수 있다. As another embodiment, the encoder may obtain a variance value for each of the motion vectors based on motion vectors indicating a plurality of candidate search positions derived for the current block. In this case, the encoder may determine a position to be removed from the candidate search position based on the variance value.

일례로, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서, 가장 큰 분산 값을 갖는 움직임 벡터가 나타내는 위치를 제거할 수 있다. 또한, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치를 나타내는 움직임 벡터 중에서, 분산 값이 큰 순서대로 소정의 개수(예컨대, 2개, 3개 또는 4개 등)의 움직임 벡터를 선택하고 상기 선택된 움직임 벡터가 나타내는 위치를 제거할 수도 있다.As an example, the encoder may remove a position indicated by a motion vector having the largest variance value from among a plurality of candidate search positions derived for the current block. In addition, the encoder selects a predetermined number (eg, 2, 3, or 4, etc.) of motion vectors from among motion vectors representing a plurality of candidate search positions derived with respect to the current block in the order of increasing variance, and The position indicated by the selected motion vector may be removed.

다른 예로, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서, 가장 작은 분산 값을 갖는 움직임 벡터가 나타내는 위치만을 후보 검색 위치로 사용할 수 있다. 즉, 이 경우 부호화기는 가장 작은 분산 값을 갖는 움직임 벡터가 나타내는 위치를 제외한 나머지 위치들을 모두 제거할 수 있다. 또한, 부호화기는 현재 블록에 대해 도출된 복수의 후보 검색 위치를 나타내는 움직임 벡터 중에서, 분산 값이 작은 순서대로 소정의 개수(예컨대, 2개, 3개 또는 4개 등)의 움직임 벡터를 선택할 수 있고, 상기 선택된 움직임 벡터가 나타내는 위치만을 후보 검색 위치로 사용할 수도 있다. 즉, 이 경우 부호화기는 상기 소정의 개수의 움직임 벡터가 나타내는 위치를 제외한 나머지 위치들을 모두 제거할 수 있다.As another example, the encoder may use only a position indicated by a motion vector having the smallest variance value among a plurality of candidate search positions derived for the current block as the candidate search position. That is, in this case, the encoder may remove all positions except for the position indicated by the motion vector having the smallest variance value. In addition, the encoder may select a predetermined number (eg, 2, 3, or 4, etc.) of motion vectors from among motion vectors representing a plurality of candidate search positions derived for the current block in the order of the smallest variance value. , only a position indicated by the selected motion vector may be used as a candidate search position. That is, in this case, the encoder may remove all positions other than positions indicated by the predetermined number of motion vectors.

분산 값을 기반으로 후보 검색 위치에서 제거될 위치를 결정하는 방법의 구체적인 실시예는 상술한 수학식 5 및 수학식 6에서와 유사하므로, 여기서는 이에 대한 구체적인 설명은 생략하기로 한다.A specific embodiment of a method of determining a position to be removed from a candidate search position based on a variance value is similar to Equations 5 and 6 described above, and thus a detailed description thereof will be omitted herein.

상술한 실시예들에 따라 현재 블록에 대해 도출된 복수의 후보 검색 위치 중에서 제거될 위치가 결정되면, 부호화기는 제거된 위치를 제외한 나머지 후보 검색 위치들 중에서 최적의 초기 검색 위치를 결정할 수 있다. 이 때, 일례로 부호화기는 제거된 위치를 제외한 나머지 후보 검색 위치들 중에서 최소의 부호화 비용을 갖는 위치를 초기 검색 위치로 결정할 수 있다.When a position to be removed is determined from among a plurality of candidate search positions derived for the current block according to the above-described embodiments, the encoder may determine an optimal initial search position from among the remaining candidate search positions except for the removed position. In this case, for example, the encoder may determine, as an initial search location, a location having the minimum encoding cost among candidate search locations other than the removed location.

상술한 실시예들에 의하면 부호화기는 현재 블록의 움직임 예측을 수행함에 있어, 현재 블록과의 상관성이 높은 블록의 움직임 벡터를 참조할 수 있다. 특히, 현재 블록이 속한 상위 블록 및 상기 상위 블록에 속한 다른 하위 블록은 현재 블록과의 상관성이 높으므로, 부호화기는 최소 오차 값을 갖는 픽셀의 위치를 더 효율적으로 찾을 수 있다.According to the above-described embodiments, when performing motion prediction of the current block, the encoder may refer to a motion vector of a block having high correlation with the current block. In particular, since the upper block to which the current block belongs and other lower blocks belonging to the upper block have high correlation with the current block, the encoder can more efficiently find the position of the pixel having the minimum error value.

또한, 상술한 실시예들에 따라 후보 검색 위치 결정 과정 및 초기 검색 위치 결정 과정이 수행되는 경우, 검색 범위 내에 최소 오차 값을 갖는 픽셀의 위치가 포함될 확률이 높아질 수 있다. 그리고 상술한 실시예들에 의하면, 패턴 검색과 같은 움직임 예측 과정에서 부호화기는 최소 오차 값을 갖는 픽셀의 위치를 더 빨리 찾을 수 있다. 따라서, 본 발명에 의하면 부호화 성능이 향상될 수 있다.Also, when the process of determining the candidate search location and the process of determining the initial search location are performed according to the above-described embodiments, the probability that the location of the pixel having the minimum error value is included within the search range may increase. And, according to the above-described embodiments, in a motion prediction process such as a pattern search, the encoder can find the position of the pixel having the minimum error value more quickly. Therefore, according to the present invention, encoding performance can be improved.

상술한 실시예들에서, 방법들은 일련의 단계 또는 블록으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the above-described embodiments, the methods are described on the basis of a flowchart as a series of steps or blocks, but the present invention is not limited to the order of the steps, and some steps may occur in a different order or at the same time as other steps as described above. can In addition, those of ordinary skill in the art will recognize that the steps shown in the flowchart are not exclusive, 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. It is not possible to describe every possible combination for representing the various aspects, but one of ordinary skill in the art will recognize that other combinations are possible. Accordingly, it is intended that the present invention cover all other substitutions, modifications and variations falling within the scope of the following claims.

Claims (1)

현재 블록에 대한 초기 검색 위치를 선택하는 단계;
상기 초기 검색 위치를 기반으로 설정된 검색 범위 내에서 부호화 비용을 비교하여 상기 현재 블록의 움직임 벡터를 도출하는 단계;
상기 도출된 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측(prediction)을 수행함으로써 예측 블록(prediction block)을 생성하는 단계;
상기 예측 블록에 기초하여 복원 블록을 생성하는 단계; 및
상기 복원 블록을 필터링하는 단계를 포함하되,
상기 검색 범위의 형태는 소정의 형태이고,
상기 현재 블록의 움직임 벡터를 도출하는 단계는,
상기 검색 범위 내에서 소정의 패턴에 의해 지시되는 픽셀들을 기반으로 패턴 검색을 수행하는 단계를 포함하고,
상기 부호화 비용은 SAD(Sum of Absolute Difference)을 이용하여 계산되는 것을 특징으로 하는 인터 예측 방법.



selecting an initial search location for the current block;
deriving a motion vector of the current block by comparing encoding costs within a search range set based on the initial search position;
generating a prediction block by performing prediction on the current block based on the derived motion vector;
generating a reconstructed block based on the prediction block; and
filtering the reconstructed block,
The form of the search range is a predetermined form,
The step of deriving the motion vector of the current block comprises:
performing a pattern search based on pixels indicated by a predetermined pattern within the search range;
The inter prediction method, characterized in that the encoding cost is calculated using a sum of absolute difference (SAD).



KR1020210094607A 2020-10-28 2021-07-20 Method for inter prediction and apparatus thereof KR102380722B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020210094607A KR102380722B1 (en) 2020-10-28 2021-07-20 Method for inter prediction and apparatus thereof
KR1020220037464A KR102503694B1 (en) 2020-10-28 2022-03-25 Method for inter prediction and apparatus thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020200141110A KR102281514B1 (en) 2020-01-21 2020-10-28 Method for inter prediction and apparatus thereof
KR1020210094607A KR102380722B1 (en) 2020-10-28 2021-07-20 Method for inter prediction and apparatus thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020200141110A Division KR102281514B1 (en) 2020-01-21 2020-10-28 Method for inter prediction and apparatus thereof

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020220037464A Division KR102503694B1 (en) 2020-10-28 2022-03-25 Method for inter prediction and apparatus thereof

Publications (2)

Publication Number Publication Date
KR20210093818A KR20210093818A (en) 2021-07-28
KR102380722B1 true KR102380722B1 (en) 2022-04-01

Family

ID=77126391

Family Applications (4)

Application Number Title Priority Date Filing Date
KR1020210094607A KR102380722B1 (en) 2020-10-28 2021-07-20 Method for inter prediction and apparatus thereof
KR1020220037464A KR102503694B1 (en) 2020-10-28 2022-03-25 Method for inter prediction and apparatus thereof
KR1020230022856A KR102618379B1 (en) 2020-10-28 2023-02-21 Method for inter prediction and apparatus thereof
KR1020230188027A KR20240004150A (en) 2020-10-28 2023-12-21 Method for inter prediction and apparatus thereof

Family Applications After (3)

Application Number Title Priority Date Filing Date
KR1020220037464A KR102503694B1 (en) 2020-10-28 2022-03-25 Method for inter prediction and apparatus thereof
KR1020230022856A KR102618379B1 (en) 2020-10-28 2023-02-21 Method for inter prediction and apparatus thereof
KR1020230188027A KR20240004150A (en) 2020-10-28 2023-12-21 Method for inter prediction and apparatus thereof

Country Status (1)

Country Link
KR (4) KR102380722B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004241918A (en) * 2003-02-04 2004-08-26 Handotai Rikougaku Kenkyu Center:Kk Method and device for image compression/encoding of moving picture
US20050265454A1 (en) * 2004-05-13 2005-12-01 Ittiam Systems (P) Ltd. Fast motion-estimation scheme
US20060002474A1 (en) * 2004-06-26 2006-01-05 Oscar Chi-Lim Au Efficient multi-block motion estimation for video compression
JP2009520407A (en) * 2005-12-15 2009-05-21 アナログ・デバイシズ・インコーポレーテッド Motion estimation using predictive guided decimation search

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6014181A (en) * 1997-10-13 2000-01-11 Sharp Laboratories Of America, Inc. Adaptive step-size motion estimation based on statistical sum of absolute differences
KR100498951B1 (en) * 2003-01-02 2005-07-04 삼성전자주식회사 Method of Motion Estimation for Video Coding in MPEG-4/H.263 Standards

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004241918A (en) * 2003-02-04 2004-08-26 Handotai Rikougaku Kenkyu Center:Kk Method and device for image compression/encoding of moving picture
US20050265454A1 (en) * 2004-05-13 2005-12-01 Ittiam Systems (P) Ltd. Fast motion-estimation scheme
US20060002474A1 (en) * 2004-06-26 2006-01-05 Oscar Chi-Lim Au Efficient multi-block motion estimation for video compression
JP2009520407A (en) * 2005-12-15 2009-05-21 アナログ・デバイシズ・インコーポレーテッド Motion estimation using predictive guided decimation search

Also Published As

Publication number Publication date
KR102618379B1 (en) 2023-12-27
KR20210093818A (en) 2021-07-28
KR20230031862A (en) 2023-03-07
KR102503694B1 (en) 2023-02-24
KR20240004150A (en) 2024-01-11
KR20220044258A (en) 2022-04-07

Similar Documents

Publication Publication Date Title
KR102485745B1 (en) Method and apparatus for picture encoding/decoding
KR102558514B1 (en) Method for video decoding and computer readable redording meduim thereof
KR102070719B1 (en) Method for inter prediction and apparatus thereof
KR102515824B1 (en) Method for inter prediction and apparatus thereof
KR102281514B1 (en) Method for inter prediction and apparatus thereof
KR102380722B1 (en) Method for inter prediction and apparatus thereof
KR102173576B1 (en) Method for inter prediction and apparatus thereof

Legal Events

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