KR101567964B1 - Method and Apparatus for Encoding and Decoding Motion Vector - Google Patents

Method and Apparatus for Encoding and Decoding Motion Vector Download PDF

Info

Publication number
KR101567964B1
KR101567964B1 KR1020140000905A KR20140000905A KR101567964B1 KR 101567964 B1 KR101567964 B1 KR 101567964B1 KR 1020140000905 A KR1020140000905 A KR 1020140000905A KR 20140000905 A KR20140000905 A KR 20140000905A KR 101567964 B1 KR101567964 B1 KR 101567964B1
Authority
KR
South Korea
Prior art keywords
motion vector
predicted
current
vector
prediction mode
Prior art date
Application number
KR1020140000905A
Other languages
Korean (ko)
Other versions
KR20140026580A (en
Inventor
김하윤
전병우
이영렬
문주희
김해광
양정엽
원광현
Original Assignee
에스케이텔레콤 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 에스케이텔레콤 주식회사 filed Critical 에스케이텔레콤 주식회사
Priority to KR1020140000905A priority Critical patent/KR101567964B1/en
Publication of KR20140026580A publication Critical patent/KR20140026580A/en
Application granted granted Critical
Publication of KR101567964B1 publication Critical patent/KR101567964B1/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/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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/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/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/184Methods 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 bits, e.g. of the compressed video stream

Landscapes

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

Abstract

본 발명은 움직임벡터 부호화/복호화 방법 및 그 장치에 관한 것으로서, 현재 움직임벡터에 대한 후보 움직임벡터 집합을 선정하고; 후보 움직임벡터 집합에서 예측 움직임벡터를 선택하고; 예측 움직임벡터가 복호화 장치에서 예측가능한지를 판단하고; 예측가능으로 판단된 경우, 예측 움직임벡터 및 예측가능을 지시하는 움직임벡터 예측모드를 이용하여 현재 움직임벡터를 부호화하고; 및 예측 불가능으로 판단된 경우, 디폴트 예측 움직임벡터 및 예측 불가능을 지시하는 움직임벡터 예측모드를 이용하여 현재 움직임벡터를 부호화하는 것을 특징으로 한다.
본 발명에 의하면, 현재 움직임벡터에 대한 예측 움직임벡터를 직접 복호화 장치로 알리지 않고, 예측 움직임벡터를 찾을 수 있도록 정보를 주거나 찾기 위한 소정의 함수를 공유함으로써, 움직임벡터 예측모드에 따라 예측 움직임벡터를 선택하여 현재 움직임벡터를 부호화 및/또는 복호화하고, 움직임벡터 예측모드를 복호화 장치에 전송함으로써 부호화 비트량 감소, 움직임 예측 성능 및 움직임 보상 성능을 향상시키는 효과가 있다.
The present invention relates to a motion vector coding / decoding method and apparatus, and more particularly, to a motion vector coding / decoding method and apparatus for selecting a candidate motion vector set for a current motion vector; Selecting a predicted motion vector from a set of candidate motion vectors; Determining whether a predicted motion vector is predictable in a decoding apparatus; Encoding the current motion vector using a motion vector prediction mode indicating a predicted motion vector and a predictable motion vector; And a current motion vector is encoded using a motion vector prediction mode that indicates a default predicted motion vector and a non-predictable motion vector, when it is determined that the motion vector can not be predicted.
According to the present invention, by sharing a predetermined function for giving or searching for information so as to find a predicted motion vector without notifying the predicted motion vector for the current motion vector directly to the decoding apparatus, a predicted motion vector is determined according to the motion vector prediction mode And the motion vector prediction mode is transmitted to the decoding apparatus by selecting and encoding the current motion vector, thereby improving the coding bit amount reduction, the motion prediction performance, and the motion compensation performance.

Description

움직임벡터 부호화/복호화 방법 및 그 장치{Method and Apparatus for Encoding and Decoding Motion Vector}[0001] The present invention relates to a motion vector coding / decoding method,

본 발명은 동영상 부호화 및 복호화에 관한 것으로서, 더욱 상세하게는 동영상 부호화 및 복호화 분야에서의 움직임벡터 부호화/복호화 방법 및 그 장치에 관한 것이다. BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a moving picture encoding / decoding method, and more particularly, to a motion vector coding / decoding method and apparatus in a moving picture coding / decoding field.

근래에 멀티미디어 기술은 비약적으로 발전하고 있으며, 이에 따라 오디오, 이미지, 동영상 등을 포함한 고품질의 멀티미디어 데이터들에 대한 수요도 증가하고 있다. 따라서 제한된 네트워크 환경에서 이러한 멀티미디어 데이터들을 전송하거나 저장하고 다시 읽어내는 (Retrieve) 수요를 충족시키기 위해 고효율의 동영상 압축에 관한 국제 표준이 제정되고 있다. 특히 동영상의 경우, 동영상 압축에 관한 국제표준으로 ISO/IEC JTC1/SC29 MPEG 그룹 및 ITU-T VCEG 그룹이 제정한 H.264/AVC MPEG-4 Part.10 표준은 높은 압축 효율을 달성하기 위해 가변블록 크기에서의 움직임예측 및 보상(Variable block size motion estimation and compensation), 화면 내 예측부호화(Intra prediction) 등의 다양한 예측부호화 방법들을 사용하고 있다. 예측부호화는 데이터간에 존재하는 상관도(Correlation)을 줄일 수 있는 효과적인 방법으로 다양한 데이터들의 압축에 널리 사용된다. 특히 움직임벡터는 주변 블록의 움직임벡터와 밀접한 상관관계를 가지고 있기 때문에, 주변블록의 움직임벡터로부터 현재블록의 움직임벡터에 대한 예측값(PMV: Predicted Motion Vector, "예측 움직임벡터"라고도 함)을 계산한 후 현재 블록의 움직임벡터의 값 그 자체를 부호화하지 않고 그 예측값에 대한 차분벡터(DMV: Differential Motion Vector, "잔차신호", "차분값"이라고도 함)만을 부호화함으로써 부호화해야 할 비트량을 상당히 줄여 부호화 효율을 높힐 수 있다.[0002] Recently, multimedia technology has been rapidly developed, and accordingly, demand for high-quality multimedia data including audio, image, and moving picture is increasing. Accordingly, an international standard for high-efficiency video compression has been established to meet the demand for transmitting, storing and re-reading of such multimedia data in a limited network environment. In particular, for video, the H.264 / AVC MPEG-4 Part.10 standard, established by ISO / IEC JTC1 / SC29 MPEG group and ITU-T VCEG group as an international standard for video compression, Block prediction, motion estimation and compensation, block prediction, intra prediction, and intra predictive coding. Predictive coding is widely used for compressing various data as an effective way to reduce the correlation between data. In particular, since the motion vector has a close correlation with the motion vector of the neighboring block, the predicted value (PMV: predictive motion vector, also referred to as "predicted motion vector") of the motion vector of the current block is calculated from the motion vector of the neighboring block Only the difference vector (DMV: "residual signal", "difference value") for the predictive value is encoded without coding the motion vector value of the current block after the current block, thereby significantly reducing the amount of bits to be encoded The coding efficiency can be increased.

일반적으로 이러한 예측 움직임벡터를 이용한 움직임벡터 부호화에서는 효율적인 압축을 위하여 예측 움직임벡터가 정확할수록 부호화 효율이 증대된다. 따라서 단지 공간적 인접블록의 움직임벡터뿐만 아니라, 시간적, 공간적 또는 시공간적으로 인접한 블록의 움직임벡터 또는 그들을 조합하여 계산된 또 다른 움직임벡터들로 이루어진 유한한 개수의 예측 움직임벡터 대상들을 생성하고 그 중에서 움직임벡터 예측부호화에 가장 적당한 것을 선택하여 사용하면 예측부호화 효율을 더욱 높일 수 있다. 이 경우, 예측 부호화된 움직임벡터 데이터로부터 원래의 움직임벡터를 올바르게 복원하기 위해서는 유한한 개수의 예측 움직임벡터 대상들 중에 어떤 예측 움직임벡터가 사용되었는지 알아야 한다. 이를 위한 가장 간단한 움직임벡터 예측부호화 방법은 움직임벡터 예측부호화를 위하여 어떤 예측값을 사용하였는지에 대한 정보를 함께 부호화하는 것이다. 또는 이러한 예측 움직임벡터 선택을 가리키기 위한 추가적인 데이터 부호화에 소요되는 비트량 발생을 제거하기 위해, 현재의 H.264/AVC 표준은 주변블록(좌측, 상단, 우측상단)이 가지는 움직임벡터들의 수평 성분과 수직 성분 각각의 중간값(Median)을 움직임벡터의 예측 부호화를 위한 예측 움직임벡터(PMV: Predicted Motion Vector)로 사용한다. 이 방법은 중간값이라는 부호화와 복호화에 있어 공히 알고 있는 소정의 디폴트 방법을 정하고, 부호화나 복호화에 있어 이 디폴트 방법을 사용하여 예측값(예측 움직임벡터)을 산출함으로써 어떤 예측값을 사용하였는지에 대한 정보를 함께 부호화할 필요를 없애는 것이다. 중간값의 소정의 디폴트 방법을 사전에 정의하여 사용하는 기존 방법은, 어떤 움직임벡터가 예측 움직임벡터로 사용되었는지에 대한 추가적인 정보의 전송 없이 향상된 부호화 효율을 유지할 수 있다는 장점이 있지만 사용한 중간값인 예측 움직임벡터가 차분벡터를 부호화하는데 소요되는 비트량을 항상 최소로 발생시키는 최적의 예측 움직임벡터가 아니라는 문제점이 있다. Generally, in the motion vector coding using such a predictive motion vector, the coding efficiency increases as the predicted motion vector becomes more accurate for effective compression. Therefore, not only a motion vector of a spatial adjacent block but also a motion vector of a block temporally, spatially or temporally or spatially adjacent to another block or a motion vector of a finite number of other motion vectors calculated by combining them is generated, The prediction encoding efficiency can be further increased by selecting and using the most suitable one for predictive encoding. In this case, in order to correctly recover the original motion vector from the predictively encoded motion vector data, it is necessary to know which prediction motion vector is used among the finite number of predicted motion vector objects. The most simple motion vector prediction coding method for this purpose is to jointly encode information on which prediction value is used for motion vector prediction coding. Or the amount of bits required for additional data coding to indicate such a prediction motion vector selection, the current H.264 / AVC standard specifies a horizontal component of motion vectors of neighboring blocks (left, top, right top) And a median of each of the vertical components is used as a predictive motion vector (PMV) for predictive coding of the motion vector. In this method, a predetermined default method known in common for coding and decoding is called intermediate value, and information on which prediction value is used is calculated by calculating a predictive value (predictive motion vector) by using this default method in coding and decoding Thereby eliminating the need for coding. An existing method of predefining and using a predetermined default method of intermediate values is advantageous in that it can maintain an improved coding efficiency without transmitting additional information about which motion vector is used as a predicted motion vector, There is a problem that the motion vector is not an optimal predicted motion vector which always generates the minimum amount of bits required for coding the differential vector.

전술한 문제점을 해결하기 위한 본 발명의 목적은, 복수의 움직임벡터 예측모드를 이용하여 현재 움직임벡터에 대한 예측 움직임벡터의 선택이 가능하도록 하여 더욱 정확하게 예측 움직임벡터를 선택하고, 이를 통해 차분벡터의 부호화 비트량을 감소시키고 움직임 예측 및/또는 움직임 보상의 성능을 향상시키는 데 있다. It is an object of the present invention to solve the above problems and provide a motion vector prediction method and a motion vector prediction method for selecting a predictive motion vector for a current motion vector by using a plurality of motion vector prediction modes, And to improve the performance of motion prediction and / or motion compensation.

또한, 본 발명의 다른 목적은, 부호화 장치는 더욱 정확한 예측 움직임벡터를 선택하여 부호화 효율을 향상시키면서도 부호화에 이용된 예측 움직임벡터를 직접 복호화 장치로 알리는 대신에, 예측 움직임벡터를 찾기 위한 정보를 복호화 장치로 주거나 찾기 위한 함수를 복호화 장치와 공유함으로써, 예측 움직임벡터를 알리기 위해 발생하는 추가적인 정보에 대한 부호화 비트량 증가를 줄여줌으로써, 부호화 효율 및 복호화 효율을 더욱더 향상시키는 데 있다.Another object of the present invention is to provide a motion vector decoding apparatus and a motion vector decoding method in which a coding apparatus decodes information for searching for a predicted motion vector, instead of notifying a predictive motion vector used for coding directly, The present invention is to improve coding efficiency and decoding efficiency by reducing the increase in the amount of coding bits for additional information generated for informing a prediction motion vector by sharing a function for giving or searching for a device with a decoding device.

전술한 목적을 달성하기 위한 본 발명의 한 측면에 따르면, 움직임벡터 부호화 방법에 있어서, (a) 현재블록의 현재 움직임벡터에 대하여 후보 움직임벡터 집합을 선정하는 단계; (b) 상기 선정된 후보 움직임벡터 집합에서 예측 움직임벡터를 선택하는 단계; (c) 상기 선택된 예측 움직임벡터가 복호화 장치에서 예측가능한지를 판단하는 단계; (d) 상기 단계 (c)에서 예측가능으로 판단된 경우, 상기 선택된 예측 움직임벡터 및 예측가능을 지시하는 움직임벡터 예측모드를 이용하여 상기 현재 움직임벡터를 부호화하는 단계; 및 (e) 상기 단계 (c)에서 예측 불가능으로 판단된 경우, 기설정된 디폴트 예측 움직임벡터 및 예측 불가능을 지시하는 움직임벡터 예측모드를 이용하여 상기 현재 움직임벡터를 부호화하는 단계를 포함하는 것을 특징으로 하는 움직임벡터 부호화 방법을 제공한다. According to an aspect of the present invention, there is provided a motion vector coding method including: (a) selecting a set of candidate motion vectors for a current motion vector of a current block; (b) selecting a predicted motion vector in the selected set of candidate motion vectors; (c) determining whether the selected predictive motion vector is predictable in a decoding apparatus; (d) encoding the current motion vector using the selected predictive motion vector and a motion vector prediction mode indicating predictability, if it is determined to be predictable in step (c); And encoding the current motion vector using a predetermined default predictive motion vector and a motion vector prediction mode indicating a non-predictable mode if it is determined that the current motion vector is not predictable in step (c) And a motion vector coding method.

전술한 목적을 달성하기 위한 본 발명의 다른 한 측면에 따르면, 움직임벡터 복호화 방법에 있어서, (a) 부호화된 움직임벡터 예측모드와 부호화된 차분벡터를 복호화하는 단계; (b) 상기 복호화된 움직임벡터 예측모드가 예측가능을 지시하는지 예측 불가능을 지시하는지를 판단하는 단계; (c) 상기 복호화된 움직임벡터 예측모드가 예측가능을 지시하면, 현재블록의 현재 움직임벡터를 복원하기 위한 예측 움직임벡터로 선택가능한 후보 움직임벡터 집합을 선정하고, 상기 선정된 후보 움직임벡터 집합에서 하나의 후보 움직임벡터를 상기 현재 움직임벡터에 대한 예측 움직임벡터로 결정하는 단계; (d) 상기 복호화된 움직임벡터 예측모드가 예측 불가능을 지시하면, 기설정된 디폴트 예측 움직임벡터를 상기 현재 움직임벡터에 대한 예측 움직임벡터로 결정하는 단계; 및 (e) 상기 단계 (c) 또는 상기 단계 (d)에서 결정된 예측 움직임벡터와 상기 복호화된 차분벡터를 더하여 상기 현재블록의 현재 움직임벡터를 복원하는 단계를 포함하는 것을 특징으로 하는 움직임벡터에 대한 복호화 방법을 제공한다. According to another aspect of the present invention, there is provided a motion vector decoding method comprising the steps of: (a) decoding an encoded motion vector prediction mode and a coded differential vector; (b) determining whether the decoded motion vector prediction mode indicates predictable or unpredictable; (c) if the decoded motion vector prediction mode indicates prediction, selecting a candidate motion vector set that can be selected as a predicted motion vector for restoring a current motion vector of a current block, and selecting one of the selected candidate motion vector sets Determining a candidate motion vector of the current motion vector as a predicted motion vector for the current motion vector; (d) determining the predetermined default predicted motion vector as a predicted motion vector for the current motion vector, if the decoded motion vector prediction mode indicates unexpected motion; And (e) reconstructing a current motion vector of the current block by adding the predictive motion vector determined in step (c) or step (d) and the decoded difference vector. Decoding method.

전술한 목적을 달성하기 위한 본 발명의 또 다른 한 측면에 따르면, 움직임벡터 부호화 장치에 있어서, 현재블록의 현재 움직임벡터에 대하여 후보 움직임벡터 집합을 선정하고, 상기 선정된 후보 움직임벡터 집합에서 예측 움직임벡터를 선택하는 예측 움직임벡터 선택부; 상기 선택된 예측 움직임벡터가 복호화 장치에서 예측가능한지를 판단하여, 상기 판단 결과에 따라 예측가능 또는 예측 불가능을 지시하는 움직임벡터 예측모드를 결정하는 움직임벡터 예측모드 결정부; 상기 결정된 움직임벡터 예측모드가 예측가능으로 지시된 경우, 상기 선택된 예측 움직임벡터를 상기 현재 움직임벡터에 대한 예측 움직임벡터로 결정하고, 상기 현재 움직임벡터와 상기 선택된 예측 움직임벡터의 차분벡터 및 상기 결정된 움직임벡터 예측모드를 이용하여 상기 현재 움직임벡터를 부호화하는 제 1 부호화부; 및 상기 결정된 움직임벡터 예측모드가 예측 불가능으로 지시된 경우, 기설정된 디폴트 예측 움직임벡터를 상기 현재 움직임벡터에 대한 예측 움직임벡터로 결정하고, 상기 현재 움직임벡터와 상기 기설정된 디폴트 예측 움직임벡터의 차분벡터 및 상기 결정된 움직임벡터 예측모드를 이용하여 상기 현재 움직임벡터를 부호화하는 제 2 부호화부를 포함하는 것을 특징으로 하는 움직임벡터 부호화 장치를 제공한다. According to another aspect of the present invention, there is provided a motion vector coding apparatus for selecting a candidate motion vector set for a current motion vector of a current block, A predictive motion vector selection unit for selecting a vector; A motion vector prediction mode determining unit that determines whether the selected predictive motion vector is predictable by a decoding apparatus and determines a motion vector prediction mode indicating predictable or unpredictable according to the determination result; Determining a predictive motion vector for the current motion vector as the predictive motion vector if the determined motion vector prediction mode is predictable and determining a difference vector between the current motion vector and the selected predictive motion vector and the determined motion A first encoding unit encoding the current motion vector using a vector prediction mode; And determining a predetermined default predicted motion vector as a predicted motion vector for the current motion vector if the determined motion vector prediction mode is indicated as unpredictable and determining a difference vector between the current motion vector and the predetermined default predicted motion vector And a second encoding unit encoding the current motion vector using the determined motion vector prediction mode.

전술한 목적을 달성하기 위한 본 발명의 또 다른 한 측면에 따르면, 움직임벡터 복호화 장치에 있어서, 부호화 장치에 의해 부호화된 움직임벡터 예측모드와 부호화된 차분벡터를 복호화하는 움직임벡터 예측모드 및 차분벡터 복호화부; 상기 복호화된 움직임벡터 예측모드가 예측가능을 지시하는지 예측 불가능을 지시하는지를 판단하는 움직임벡터 예측모드 판단부; 상기 복호화된 움직임벡터 예측모드가 예측가능을 지시하면, 현재블록의 현재 움직임벡터를 복원하기 위한 예측 움직임벡터로 선택가능한 후보 움직임벡터 집합을 선정하고, 상기 선정된 후보 움직임벡터 집합에서 예측 움직임벡터를 선택하며, 상기 선택된 예측 움직임 벡터를 상기 현재 움직임벡터에 대한 예측 움직임벡터로 결정하는 제 1 예측 움직임벡터 결정부; 상기 복호화된 움직임벡터 예측모드가 예측 불가능을 지시하면, 기설정된 디폴트 예측 움직임벡터를 상기 현재 움직임벡터에 대한 예측 움직임벡터로 결정하는 제 2 예측 움직임벡터 결정부; 및 상기 제 1 예측 움직임벡터 결정부 또는 상기 제 2 예측 움직임벡터 결정부에서 결정된 예측 움직임벡터에 상기 복호화된 차분벡터를 더하여 상기 현재블록의 현재 움직임벡터를 복원하는 현재 움직임벡터 복원부를 포함하는 것을 특징으로 하는 움직임벡터 복호화 장치를 제공한다. According to another aspect of the present invention, there is provided a motion vector decoding apparatus comprising: a motion vector prediction mode coded by an encoder; a motion vector prediction mode for decoding the coded difference vector; part; A motion vector prediction mode determiner for determining whether the decoded motion vector prediction mode indicates predictability or non-predictability; If the decoded motion vector prediction mode is predictable, selects a candidate motion vector set that can be selected as a predicted motion vector for recovering a current motion vector of a current block, and outputs a predicted motion vector in the selected candidate motion vector set A first predicted motion vector determining unit for selecting the selected predictive motion vector as a predictive motion vector for the current motion vector; A second predicted motion vector determiner for determining a predetermined default predicted motion vector as a predicted motion vector for the current motion vector, if the decoded motion vector prediction mode indicates unexpected motion; And a current motion vector reconstruction unit for reconstructing a current motion vector of the current block by adding the decoded difference vector to a predictive motion vector determined by the first predictive motion vector determination unit or the second predictive motion vector determination unit. The motion vector decoding apparatus comprising:

전술한 목적을 달성하기 위한 본 발명의 또 다른 한 측면에 따르면, 움직임벡터 부호화 방법에 있어서, (a) 복수의 움직임벡터 예측모드 중 선택된 움직임벡터 예측모드에 따라 현재 움직임벡터의 예측 움직임벡터를 선택하는 단계; (b) 상기 현재 움직임벡터와 상기 예측 움직임벡터 간의 차분벡터를 부호화하는 단계; (c) 상기 선택된 움직임벡터 예측모드를 나타내는 움직임벡터 예측모드 정보를 부호화하는 단계; 및 (d) 상기 부호화된 차분벡터 및 움직임벡터 예측모드 정보를 포함하는 비트스트림을 생성하는 단계를 포함하는 것을 특징으로 하는 움직임벡터 부호화 방법을 제공한다. According to another aspect of the present invention, there is provided a motion vector coding method comprising: (a) selecting a predicted motion vector of a current motion vector according to a selected motion vector prediction mode among a plurality of motion vector prediction modes; ; (b) coding a differential vector between the current motion vector and the predictive motion vector; (c) encoding motion vector prediction mode information indicating the selected motion vector prediction mode; And (d) generating a bitstream including the coded difference vector and motion vector prediction mode information.

전술한 목적을 달성하기 위한 본 발명의 또 다른 한 측면에 따르면, 움직임벡터 복호화 방법에 있어서, (a) 현재 움직임벡터와 예측 움직임벡터 간의 차분벡터 및 상기 현재 움직임 벡터의 움직임벡터 예측모드 정보를 복호화하는 단계; (b) 상기 움직임벡터 예측모드 정보에 근거하여 상기 현재 움직임 벡터의 예측 움직임벡터를 선택하는 단계; 및 (c) 상기 선택된 예측 움직임벡터를 이용하여 상기 현재 움직임벡터를 복원하는 단계를 포함하는 것을 특징으로 하는 움직임벡터 복호화 방법을 제공한다. According to another aspect of the present invention, there is provided a motion vector decoding method comprising: (a) decoding a differential vector between a current motion vector and a predictive motion vector and motion vector prediction mode information of the current motion vector; ; (b) selecting a predicted motion vector of the current motion vector based on the motion vector prediction mode information; And (c) reconstructing the current motion vector using the selected predictive motion vector.

이상에서 설명한 바와 같이 본 발명에 의하면, 복수의 움직임벡터 예측모드를 이용하여 현재 움직임벡터에 대한 예측 움직임벡터의 선택이 가능하도록 하여 더욱 정확하게 예측 움직임벡터를 선택하고, 이를 통해 차분벡터의 부호화 비트량을 감소시키고 움직임 예측 및/또는 움직임 보상의 성능을 향상시키는 효과가 있다. As described above, according to the present invention, a prediction motion vector for a current motion vector can be selected using a plurality of motion vector prediction modes to more accurately select a prediction motion vector, and a coding bit amount And the performance of motion prediction and / or motion compensation is improved.

또한, 본 발명에 의하면, 부호화 장치는 더욱 정확한 예측 움직임벡터를 선택하여 부호화 효율을 향상시키면서도 부호화에 이용된 예측 움직임벡터를 직접 복호화 장치로 알리는 대신에, 예측 움직임벡터를 찾기 위한 정보를 복호화 장치로 주거나 찾기 위한 함수를 복호화 장치와 공유함으로써, 예측 움직임벡터를 알리기 위해 발생하는 추가적인 정보에 대한 부호화 비트량 증가를 줄여줌으로써, 부호화 효율 및 복호화 효율을 더욱더 향상시키는 효과가 있다.In addition, according to the present invention, instead of notifying the predictive motion vector used for coding directly to the decoding apparatus while selecting a more accurate predictive motion vector to improve the coding efficiency, the present invention provides information for finding a predictive motion vector to a decoding apparatus The coding efficiency and the decoding efficiency can be further improved by reducing the increase in the amount of coding bits for additional information generated for informing a prediction motion vector by sharing a function for giving or searching.

도 1은 본 발명의 일실시예에 따른 움직임벡터에 대한 부호화를 위한 블록을 예시적으로 나타낸 도면,
도 2는 본 발명의 일실시예에 따른 움직임벡터 부호화 장치에 대한 블록구성도,
도 3은 본 발명의 일실시예에 따른 움직임벡터 복호화 장치에 대한 블록구성도,
도 4는 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에 대한 개략적인 전체 흐름도,
도 5는 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에 대한 상세한 전체 흐름도,
도 6는 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 후보 움직임벡터 집합 선정 단계에 대한 흐름도,
도 7은 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 예측 움직임벡터 선택 단계에 대한 흐름도,
도 8은 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 예측 움직임벡터 예측가능 여부 판단 단계에 대한 흐름도,
도 9은 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 제 1 부호화 단계에 대한 흐름도,
도 10은 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 제 2 부호화 단계에 대한 흐름도,
도 11은 발명의 일실시예에 따른 움직임벡터 복호화 방법에 대한 개략적인 전체 흐름도,
도 12은 본 발명의 일실시예에 따른 움직임벡터 복호화 방법에 대한 상세한 전체 흐름도,
도 13은 본 발명의 일실시예에 따른 움직임벡터 복호화 방법에서의 제 1 예측 움직임벡터 선택 단계에 대한 흐름도이다.
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram illustrating a block for coding a motion vector according to an exemplary embodiment of the present invention;
FIG. 2 is a block diagram of a motion vector coding apparatus according to an embodiment of the present invention. FIG.
3 is a block diagram of a motion vector decoding apparatus according to an embodiment of the present invention.
FIG. 4 is a schematic overall flowchart of a motion vector coding method according to an embodiment of the present invention;
FIG. 5 is a detailed overall flowchart of a motion vector coding method according to an embodiment of the present invention;
6 is a flowchart of a candidate motion vector set selection step in a motion vector coding method according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating a predictive motion vector selection step in the motion vector coding method according to an embodiment of the present invention;
8 is a flowchart illustrating a step of determining whether a predicted motion vector can be predicted in the motion vector coding method according to an embodiment of the present invention.
9 is a flowchart of a first encoding step in a motion vector encoding method according to an embodiment of the present invention,
FIG. 10 is a flowchart of a second encoding step in a motion vector encoding method according to an embodiment of the present invention;
11 is a schematic overall flowchart of a motion vector decoding method according to an embodiment of the present invention,
12 is a detailed overall flowchart of a motion vector decoding method according to an embodiment of the present invention,
13 is a flowchart illustrating a first predictive motion vector selection step in a motion vector decoding method according to an embodiment of the present invention.

이하, 본 발명의 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 우선 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 당업자에게 자명하거나 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to designate the same or similar components throughout the drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention unclear.

도 1은 본 발명의 일실시예에 따른 움직임벡터에 대한 부호화를 위한 블록을 예시적으로 나타낸 도면이다. FIG. 1 is a block diagram illustrating a block for coding a motion vector according to an embodiment of the present invention. Referring to FIG.

도 1에서, 블록 D는 부호화할 움직임벡터에 해당하는 "현재블록"이고, 블록 A, 블록 B 및 블록 C는 블록 D에 대한 "주변블록"로 가정한다. In Fig. 1, block D is a "current block " corresponding to a motion vector to be coded, and block A, block B and block C are assumed to be" neighboring blocks "

도 1을 참조하면, MVA, MVB, MVC 및 MVD는, 블록 A, 블록 B, 블록 C, 블록 D 가 갖는 움직임벡터(Motion Vector: MV)이고, 각각은 수평성분(MVA x, MVB x, MVC x 및 MVD x)과 수직성분(MVA y, MVB y, MVC y 및 MVD y)을 가지는 것으로 정의한다. 여기서, 현재블록인 블록 D의 움직임벡터 MVD를 '현재 움직임벡터"라 한다. Referring to FIG. 1, MV A , MV B , and MV C And MV D are the motion vectors (MVs) of the block A, the block B, the block C, and the block D, and each of the motion vectors MV A x , MV B x , MV C x And MV D x ) and the vertical components (MV A y , MV B y , and MV C y And MV D y ). Here, the motion vector MV D of the current block, block D, is referred to as a 'current motion vector'.

도 1을 참조하면, 현재 움직임벡터인 MVD는 (2,0)이고, 주변블록의 움직임벡터인 MVA, MVB 및 MVC는 각각 (2,0), (2,1) 및 (2,2)인 것을 가정한다. Referring to FIG. 1, the current motion vector MV D is (2,0), MV A , MV B and MV C , which are motion vectors of the neighboring blocks, are (2,0), (2,1) , 2).

전술한 현재블록(블록 D)의 현재 움직임벡터에 대한 예측 움직임벡터(PMVD: Predicted Motion Vector)를 하기 수학식 1과 같이 계산하며, 예측 움직임벡터(PMVD)는 수평성분(PMVD x)과 수직성분(PMVD y)을 가지는 것으로 정의한다. A predictive motion vector PMV D for a current motion vector of the current block D is calculated as shown in Equation 1 and a predicted motion vector PMV D is calculated for a horizontal component PMV D x , And a vertical component (PMV D y ).

Figure 112014000767773-pat00001
Figure 112014000767773-pat00001

상기 수학식 1을 참조하면, 현재 움직임벡터에 대한 예측 움직임벡터(PMVD: Predicted Motion Vector)는 주변블록(블록 A, 블록 B, 블록 C)의 움직임벡터(MVA, MVB 및 MVC)를 특정함수(F())의 변수로 해서 계산됨을 확인할 수 있다. Referring to Equation (1), a predicted motion vector (PMV D ) for a current motion vector is calculated by dividing the motion vectors MV A , MV B, and MV C of neighboring blocks A, B, Is calculated as a variable of a specific function (F ()).

H.264/AVC 표준에서, 현재 움직임벡터에 대한 예측 움직임벡터(PMVD: Predicted Motion Vector)는, 중간값(Median)을 계산하는 함수를 특정함수(F())로 하여 계산된다. 즉, 현재 움직임벡터에 대한 예측 움직임벡터(PMVD)는 주변블록(블록 A, 블록 B, 블록 C)의 움직임벡터(MVA, MVB 및 MVC)에 대한 중간값(Median)으로 구해지는 것이다. 이러한 방식으로 계산된 현재 움직임벡터(MVD)에 대한 예측 움직임벡터(PMVD)는 하기 수학식 2와 같이 표현된다. In the H.264 / AVC standard, a predictive motion vector (PMV D ) for the current motion vector is calculated by using a function for calculating a median (Median) as a specific function F (). That is, the predicted motion vector PMV D for the current motion vector is obtained as an intermediate value (Median) for the motion vectors MV A , MV B, and MV C of the neighboring blocks (blocks A, B, and C ) will be. The predicted motion vector PMV D for the current motion vector MV D calculated in this manner is expressed by the following equation (2).

Figure 112014000767773-pat00002
Figure 112014000767773-pat00002

수학식 1(또는 수학식 2)를 이용하여 현재 움직임벡터(MVD)의 예측 움직임벡터(PMVD)가 구해지면, 수학식 3을 사용하여 압축해야 할 현재 움직임벡터(MVD)에서 이에 대한 예측 움직임벡터(PMVD)를 차분한 움직임벡터인 차분벡터(DMVD: Differential Motion Vector, '움직임벡터 잔차신호'라고도 함)를 구할 수 있으며, 이 차분벡터(DMVD)는 엔트로피 부호화 등의 미리 정의된 소정의 방법에 의해 부호화되어 전송된다. To it in the equation (1) (or Equation (2)) to the current motion vector (MV D) a predictive motion vector the current motion vector (MV D) when determined that (PMV D), to be compressed by using the equation (3) using a predictive motion vector (PMV D) the soothing motion vector differential vector: can be obtained a (DMV D also known as differential motion Vector, "motion vector residual signal"), a difference vector (DMV D) is pre-defined, such as entropy encoding And is transmitted by a predetermined method.

Figure 112014000767773-pat00003
Figure 112014000767773-pat00003

도 1에 예시된 것처럼, 현재 움직임벡터(MVD)의 값이 (2,0)인 경우, 중간값(median)을 통해 예측 움직임벡터(PMVD)를 계산하는 종래 방식에 따른 수학식 2를 이용하면, 예측 움직임벡터(PMVD)는 (2,1)이 된다. As illustrated in FIG. 1, when the value of the current motion vector MV D is (2, 0), Equation 2 according to the conventional method for calculating the predicted motion vector PMV D through the median , The predicted motion vector PMV D is (2, 1).

이와 같이, 중간값을 예측 움직임벡터로 하는 것은, 부호화 장치와 복호화 장치가 공히 알고 있게 됨으로써, 어떤 움직임벡터가 현재 움직임벡터의 예측 움직임벡터로 사용되었는지에 대한 '추가적인 정보'가 부호화될 필요가 없고 전송될 필요가 없게 되어 부호화 효율을 향상시킬 수 있다. In this manner, the intermediate value is used as the predictive motion vector because the encoder and the decoder know each other, so that there is no need to encode 'additional information' as to which motion vector is used as a predictive motion vector of the current motion vector It is not necessary to transmit the data, and the coding efficiency can be improved.

하지만, 전술한 바와 같이, 중간값을 이용하여 계산된 예측 움직임벡터(PMVD)는, 실제의 현재 움직임벡터(MVD)와 차이가 있을 수 있다. 도 1의 예시에서 보면, 중간값을 이용하여 계산된 예측 움직임벡터(PMVD)인 (2,1)은 현재 움직임벡터(MVD)인 (2,0)와 차이가 있음을 알 수 있으며, 수학식 3을 이용하여 차분벡터(DMVD)를 구해보면 부호화할 차분벡터(DMVD)는 (0,-1)이 된다. However, as described above, the predicted motion vector PMV D calculated using the intermediate value may be different from the actual current motion vector MV D. In the example of FIG. 1, it can be seen that the predicted motion vector PMV D (2,1) calculated using the intermediate value is different from (2,0), which is the current motion vector MV D , When using the equation (3) obtained the difference vector (DMV D) is a is (0, -1), the difference vector (DMV D) to be encoded.

하지만, 만약 블록 A의 움직임벡터인 MVA인 (2,0)을 예측 움직임벡터(PMVD)로 사용하면 실제의 현재 움직임벡터(MVD)인 (2,0)과 차이가 발생하지 않고, 수학식 3을 이용하여 차분벡터(DMVD)를 구해보면 부호화할 차분벡터(DMVD)는 (0,0)이 된다. However, if (2, 0) MV A , which is the motion vector of block A, is used as the predicted motion vector PMV D , there is no difference from (2, 0) which is the actual motion vector MV D , When using the equation (3) obtained the difference vector (DMV D) it is a is a (0, 0), the differential signal (D DMV) to be encoded.

즉, 중간값을 이용하여 계산된 예측 움직임벡터(PMVD)인 (2,1)를 사용하는 것보다, 블록 A의 움직임벡터인 MVA인 (2,0)을 예측 움직임벡터(PMVD)로 사용하는 것이 차분벡터(DMVD)가 (0,0)이 되어 이를 부호화하는 데 소용되는 비트량을 감소시킬 수 있다. That is, the calculated predicted using the median motion vector (PMV D) of (2, 1) will look predicted motion vector (PMV D) of the (2,0) block motion vector MV A of A using a The difference vector DMV D becomes (0, 0), and the amount of bits used to encode the differential vector DMV can be reduced.

그러나 중간값을 이용하는 방식에서는 현재 움직임벡터(MVD)의 예측 움직임벡터(PMVD)를 계산하기 위해서 항상 중간값(median)을 사용해야 하므로, 블록 A의 움직임벡터인 MVA를 예측 움직임벡터(PMVD)로 사용하는 것이 불가능하다. However, in the case of using the intermediate value, since the median must always be used to calculate the predicted motion vector PMV D of the current motion vector MV D , the motion vector MV A of the block A is used as the predicted motion vector PMV D ).

만약 블록 A의 움직임벡터(MVA)를 예측 움직임벡터(PMVD)로 사용한다고 하더라도, MVA, MVB 및 MVC 중에서 어떤 움직임벡터가 예측 움직임벡터(PMVD)로 사용되었는지에 대한 '추가적인 정보'를 함께 전송해야 하므로, 추가적인 정보를 부호화함으로써 압축 효율의 향상 여부를 보장할 수 없는 또 다른 문제점이 있다.Even if a motion vector (MV A) of the A block to a prediction motion vector (PMV D), MV A, MV B And MV C Since additional information is transmitted together with 'additional information' as to which motion vector is used as the predicted motion vector PMV D , there is another problem that it is impossible to guarantee the improvement of the compression efficiency.

따라서, 본 발명의 일 실시예에 따른 움직임벡터 부호화 방식은, 복수의 움직임벡터 예측모드를 이용하여 예측 움직임벡터의 선택이 가능하도록 하여 보다 정확하게 예측 움직임벡터를 선택할 수 있도록 하고, 이를 통해, 중간값을 예측 움직임벡터로 선택하여 발생하는 종래 방식에서의 문제점을 해결하고자 한다. Therefore, in the motion vector coding method according to the embodiment of the present invention, it is possible to select a predicted motion vector by using a plurality of motion vector prediction modes, thereby making it possible to select a predicted motion vector more accurately, As a predictive motion vector, to solve the problem in the conventional method.

또한, 본 발명의 일 실시예에 따른 움직임벡터 부호화 방식은, 더욱 정확한 예측 움직임벡터를 선택하여 부호화 효율을 향상시키면서도, 선택된 예측 움직임벡터를 복호화 장치에 알리기 위한 효율적인 방법을 제안함으로써, 예측 움직임벡터를 알림으로써 발생하는 추가적인 정보에 대한 부호화 비트량 증가의 문제점도 해결하고자 한다. In addition, the motion vector coding method according to an embodiment of the present invention proposes an efficient method of notifying a decoding apparatus of a selected predictive motion vector while improving the coding efficiency by selecting a more accurate predictive motion vector, And also to solve the problem of the increase of the encoding bit amount with respect to the additional information generated by the notification.

도 1에서 나타낸, 블록들(블록 A, 블록 B, 블록 C 및 블록 D) 및 그에 대한 움직임벡터인 MVA, MVB, MVC 및 MVD는 아래 설명에서 전반적으로 이용된다. (Block A, block B, block C, and block D) shown in FIG. 1 and motion vectors MV A , MV B , and MV C And MV D are generally used in the following description.

단, 도 1에서, 움직임벡터(MVA, MVB, MVC 및 MVD)를 수직성분과 수평성분을 가지는 이차원적인 벡터로 도시하였으나, 이는 설명의 편의를 위한 것이지 이에 한정되지 않는다. 즉, 본 발명의 움직임벡터 부호화 및 복호화는 n차원 움직임벡터로 확대하여 적용할 수 있다. 또한 도 1에서는 현재블록(블록 D)의 주변블록을 공간적인 인접성에 따라 3개의 블록 A, 블록 B 및 블록 C로만 나타내었으나, 이도 설명의 편의를 위한 것이지 이에 한정되지 않고, 시간적 또는 공간적으로 주변에 있는 하나 이상의 주변블록이 있을 수 있다. 1, the motion vectors MV A , MV B , and MV C And MV D are shown as a two-dimensional vector having a vertical component and a horizontal component, but this is for convenience of explanation and not limited thereto. That is, the motion vector coding and decoding of the present invention can be applied to an n-dimensional motion vector. In FIG. 1, the neighboring blocks of the current block (block D) are represented by three blocks A, B, and C according to the spatial adjacency. However, the present invention is not limited thereto. ≪ / RTI >

본 발명의 일 실시예에 따른 움직임벡터 부호화 방식에 따라 전술한 목적의 달성 방법은 이하에서 더욱 상세하게 설명한다. The method for achieving the above object according to the motion vector coding method according to an embodiment of the present invention will be described in more detail below.

본 발명의 일 실시예에 따른 움직임벡터 예측모드는 디폴트(Default) 예측모드와 넌-디폴트(Non-Default) 예측모드를 포함한다. 이하에서는 디폴트 예측모드는 미리 정해진 기준 또는 방법에 따라 선택된 예측 움직임벡터(최적 예측 움직임벡터)의 예측이 가능하지 않음을 나타내는 예측모드를 일 예로서 설명한다. 반대로, 넌-디폴트 예측모드는 미리 정해진 기준 또는 방법에 따라 선택된 예측 움직임벡터(최적 예측 움직임벡터)의 예측이 가능함을 지시하는 예측모드를 일 예로서 설명한다. 여기서, "최적 예측 움직임벡터"라 함은 미리 정해진 기준 또는 방법에 따라 얻어진 현재 움직임벡터의 예측 움직임벡터를 의미하는 것일 뿐 이와 같이 구해진 예측 움직임벡터가 항상 최적 예측값이라는 것을 의미하는 것은 아니다. The motion vector prediction mode according to an embodiment of the present invention includes a default prediction mode and a non-default prediction mode. Hereinafter, the default prediction mode will be described as an example of a prediction mode indicating that prediction of a predicted motion vector (optimal predicted motion vector) selected according to a predetermined criterion or method is not possible. On the contrary, the non-default prediction mode describes, as an example, a prediction mode indicating that prediction of a predicted motion vector (optimal predicted motion vector) selected according to a predetermined criterion or method is possible. Here, the term "optimal predicted motion vector" means a predicted motion vector of a current motion vector obtained according to a predetermined reference or method, but does not mean that the predicted motion vector thus obtained is always an optimal predicted value.

도 2는 본 발명의 일실시예에 따른 움직임벡터 부호화 장치에 대한 블록구성도이다. 2 is a block diagram of a motion vector coding apparatus according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 일실시예에 따른 움직임벡터 부호화 장치(200)는, 예측 움직임벡터 선택부(210), 움직임벡터 예측모드 결정부(220), 제 1 부호화부(230) 및 제 2 부호화부(240) 등을 포함한다. 단, 이하에서는 움직임벡터 부호화 장치(200)를 이하에서 부호화 장치라고도 간단히 기술한다. 2, a motion vector coding apparatus 200 according to an embodiment of the present invention includes a predictive motion vector selection unit 210, a motion vector prediction mode determination unit 220, a first coding unit 230, A second encoder 240, and the like. Hereinafter, the motion vector coding apparatus 200 will be briefly described as an encoder hereinafter.

예측 움직임벡터 선택부(210)는, 현재블록의 현재 움직임벡터에 대하여 예측 움직임벡터로 사용할 수 있는 후보 움직임벡터의 집합인 후보 움직임벡터 집합을 선정하고, 선정된 후보 움직임벡터 집합에서 예측 움직임벡터를 선택한다. 후보 움직임벡터 집합에서 예측 움직임벡터를 선택하는 방식은, 예를 들어, 후보 움직임벡터 집합에서 현재 움직임벡터와의 차이를 최소화하는 후보 움직임벡터를 예측 움직임벡터로 선택할 수 있다. 이와 같이, 예측 움직임벡터 선택부(210)에 의해 후보 움직임벡터 집합에서 선택된 예측 움직임벡터를 이하에서는 설명의 편의를 위해 최적 예측 움직임벡터라고 한다. 다만, 이는 설명의 편의를 위해 구체적인 예로서 최적 예측 움직임벡터를 정의한 것일 뿐 본 발명에서 최적 예측 움직임벡터는 이미 전술한 바와 같이 미리 정해진 기준 또는 방법에 따라 얻어지는 현재 움직임벡터의 예측 움직임벡터를 의미한다. The predictive motion vector selection unit 210 selects a candidate motion vector set that is a set of candidate motion vectors that can be used as a predictive motion vector with respect to the current motion vector of the current block, Select. A method of selecting a predictive motion vector in a candidate motion vector set may, for example, select a candidate motion vector that minimizes a difference from a current motion vector in a candidate motion vector set as a predicted motion vector. The predictive motion vector selected from the candidate motion vector set by the predictive motion vector selection unit 210 is referred to as an optimal predictive motion vector for convenience of explanation. For the sake of convenience, however, the optimal predicted motion vector is defined as a specific example. In the present invention, the best predicted motion vector means a predicted motion vector of the current motion vector obtained according to a predetermined reference or method .

움직임벡터 예측모드 결정부(220)는, 예측 움직임벡터 선택부(210)에서 선택된 최적 예측 움직임벡터가 복호화 장치에서 예측가능한지를 판단하여, 판단 결과에 따라 예측가능 또는 예측 불가능을 지시하는 "움직임벡터 예측모드"를 결정한다. The motion vector prediction mode determination unit 220 determines whether the optimal predictive motion vector selected by the predictive motion vector selection unit 210 is predictable in the decoding apparatus and outputs a predicted motion vector Prediction mode "

제 1 부호화부(230)는, 움직임벡터 예측모드 결정부(220)에서 결정된 움직임벡터 예측모드에 예측가능이 지시된 경우, 예측 움직임벡터 선택부(210)에서 선택된 "최적 예측 움직임벡터"를 현재 움직임벡터에 대한 예측 움직임벡터로 결정하고, 현재 움직임벡터와 최적 예측 움직임벡터의 차분벡터를 계산하고, 계산된 차분벡터 및 "예측가능을 지시하는 움직임벡터 예측모드"를 이용하여 현재 움직임벡터를 부호화한다. If the predictive motion vector prediction mode is determined by the motion vector prediction mode determination unit 220, the first encoder 230 converts the "optimal predicted motion vector" selected by the predictive motion vector selection unit 210 to the current A difference vector between the current motion vector and the best predicted motion vector is calculated, and the current motion vector is encoded using the calculated difference vector and the motion vector prediction mode indicating the predictability do.

제 2 부호화부(240)는, 움직임벡터 예측모드 결정부(220)에서 결정된 움직임벡터 예측모드에 예측 불가능이 지시된 경우, 복호화 장치와 공히 알고 있는 기설정된 "디폴트 예측 움직임벡터"를 현재 움직임벡터에 대한 예측 움직임벡터로 결정하고, 현재 움직임벡터와 기설정된 디폴트 예측 움직임벡터의 차분벡터를 계산하고, 계산된 차분벡터 및 "예측 불가능을 지시하는 움직임벡터 예측모드"를 이용하여 현재 움직임벡터를 부호화한다. 여기서, "디폴트 예측 움직임벡터"는 제 1 부호화부(230)에서 이용되는 "최적 예측 움직임벡터"와 대비되는 것으로서 부호화 장치와 복호화 장치 간에 기설정된 예측 움직임벡터이며, 일 예로서 주변블록의 움직임벡터에 대한 중간값(median)일 수 있다. If the motion vector prediction mode determined by the motion vector prediction mode determination unit 220 is not predictable, the second encoder 240 converts a predetermined "default predicted motion vector" that is commonly known to the decoding apparatus to a current motion vector And calculates a difference vector between the current motion vector and a predetermined default predicted motion vector and encodes the current motion vector using the calculated difference vector and a motion vector prediction mode indicating an un-predictable motion vector do. Here, the "default predicted motion vector" is a predicted motion vector that is preset between the encoder and the decoder, as compared with the "optimal predicted motion vector" used in the first encoder 230. For example, 0.0 > (median) < / RTI >

움직임벡터 예측모드 결정부(220)에 의해 결정된 움직임벡터 예측모드 및 제 1 부호화부(230) 또는 제 2 부호화부(240)에 의해 부호화된 차분벡터는 전송 비트스트림에 삽입된다. 전송 비트스트림은 유선, 무선 또는 저장매체 등의 전송 채널을 통해 디코더로 전송된 후 후술할 본 발명에 따른 움직임벡터 복호화 장치에 의해 복호화된다. The motion vector prediction mode determined by the motion vector prediction mode determination unit 220 and the differential vector coded by the first encoder 230 or the second encoder 240 are inserted into the transmission bitstream. The transmission bitstream is transmitted to a decoder through a transmission channel such as a wire, wireless, or storage medium, and then decoded by a motion vector decoding apparatus according to the present invention.

도 2를 참조하여 전술한 본 발명의 일실시예에 따른 움직임벡터 부호화 장치(200)에 의한 움직임벡터 부호화 방법은 도 4 내지 도 10를 참조하여 더욱 상세하게 설명한다. The motion vector coding method by the motion vector coding apparatus 200 according to an embodiment of the present invention described above with reference to FIG. 2 will be described in detail with reference to FIG. 4 to FIG.

도 3은 본 발명의 일실시예에 따른 움직임벡터 복호화 장치(300)에 대한 블록구성도이다. 3 is a block diagram of a motion vector decoding apparatus 300 according to an embodiment of the present invention.

도 3을 참조하면, 본 발명의 일실시예에 따른 움직임벡터 복호화 장치(300)는 움직임벡터 예측모드/차분벡터 복호화부(310), 움직임벡터 예측모드 판단부(320), 제 1 예측 움직임벡터 결정부(330), 제 2 예측 움직임벡터 결정부(340) 및 현재 움직임벡터 복원부(350) 등을 포함한다. 단, 이하에서는 움직임벡터 복호화 장치(300)를 간단히 복호화 장치라고도 한다. 3, a motion vector decoding apparatus 300 according to an embodiment of the present invention includes a motion vector prediction mode / differential vector decoding unit 310, a motion vector prediction mode determination unit 320, A second predictive motion vector determination unit 340, a current motion vector restoration unit 350, and the like. However, in the following, the motion vector decoding apparatus 300 is simply referred to as a decoding apparatus.

움직임벡터 예측모드/차분벡터 복호화부(310)는, 부호화 장치(200)에 의해 부호화된 움직임벡터 예측모드와 부호화된 차분벡터를 복호화한다. The motion vector prediction mode / differential vector decoding unit 310 decodes the motion vector prediction mode and the coded differential vector coded by the coding apparatus 200.

움직임벡터 예측모드 판단부(320)는, 복호화된 움직임벡터 예측모드가 예측가능을 지시하는지 예측 불가능을 지시하는지를 판단한다. The motion vector prediction mode determination unit 320 determines whether the decoded motion vector prediction mode indicates predictability or impossibility of prediction.

제 1 예측 움직임벡터 결정부(330)는, 복호화된 움직임벡터 예측모드가 예측가능을 지시하면, 현재블록의 현재 움직임벡터를 복원하기 위한 예측 움직임벡터로 선택가능한 후보 움직임벡터 집합을 선정하고, 선정된 후보 움직임벡터 집합에서 "최적 예측 움직임벡터"를 선택하며, 선택된 최적 예측 움직임 벡터를 현재 움직임벡터에 대한 예측 움직임벡터로 결정한다. When the decoded motion vector prediction mode is predictable, the first predictive motion vector determiner 330 selects a candidate motion vector set that can be selected as a predictive motion vector for restoring the current motion vector of the current block, Selects an " optimal predicted motion vector "from the set of candidate motion vectors, and determines the selected optimal predicted motion vector as a predicted motion vector for the current motion vector.

제 2 예측 움직임벡터 결정부(340)는, 복호화된 움직임벡터 예측모드가 예측 불가능을 지시하면, 부호화 장치(200)와 공히 알고 있는 기설정된 "디폴트 예측 움직임벡터"를 현재 움직임벡터에 대한 예측 움직임벡터로 결정한다. The second predictive motion vector determiner 340 determines a predictive motion vector for a current motion vector based on a predetermined " default predicted motion vector "that is known to the encoder 200, if the decoded motion vector prediction mode is predictable, It is determined as a vector.

현재 움직임벡터 복원부(350)는, 제 1 예측 움직임벡터 결정부(330) 또는 제 2 예측 움직임벡터 결정부(340)에서 결정된 예측 움직임벡터(최적 예측 움직임벡터 또는 디폴트 예측 움직임벡터)와 복호화된 차분벡터를 더하여 현재블록의 현재 움직임벡터를 복원한다. The current motion vector reconstruction unit 350 reconstructs the current motion vector using the predicted motion vector (the best predicted motion vector or the default predicted motion vector) determined in the first predicted motion vector determiner 330 or the second predicted motion vector determiner 340, And adds the difference vector to restore the current motion vector of the current block.

도 3을 참조하여 전술한 본 발명의 일실시예에 따른 움직임벡터 복호화 장치(300)에 의한 움직임벡터 복호화 방법은 도 11 내지 도 13을 참조하여 더욱 상세하게 설명한다. The motion vector decoding method by the motion vector decoding apparatus 300 according to an embodiment of the present invention described above with reference to FIG. 3 will be described in more detail with reference to FIG. 11 to FIG.

도 4는 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에 대한 개략적인 전체 흐름도이다. 4 is a schematic overall flowchart of a motion vector coding method according to an embodiment of the present invention.

도 4를 참조하면, 본 발명의 일실시예에 따른 움직임벡터 부호화 방법은, 복수의 움직임벡터 예측모드 중 선택된 움직임벡터 예측모드에 따라 현재 움직임벡터의 예측 움직임벡터를 선택하는 단계(S400); 현재 움직임벡터와 예측 움직임벡터 간의 차분벡터를 부호화하는 단계(S402); 선택된 움직임벡터 예측모드를 나타내는 움직임벡터 예측모드 정보를 부호화하는 단계(S404); 및 부호화된 차분벡터 및 움직임벡터 예측모드 정보를 포함하는 비트스트림을 생성하는 단계(S406) 등을 포함한다. Referring to FIG. 4, a motion vector coding method according to an exemplary embodiment of the present invention includes: selecting a predicted motion vector of a current motion vector according to a selected motion vector prediction mode among a plurality of motion vector prediction modes (S400); Encoding a difference vector between the current motion vector and the predicted motion vector (S402); Encoding motion vector prediction mode information indicating a selected motion vector prediction mode (S404); And generating a bitstream including the encoded difference vector and motion vector prediction mode information (S406).

전술한 S400 단계는, 선택된 움직임벡터 예측모드가 디폴트 예측모드인 경우에는, 기설정된 디폴트 예측 움직임벡터를 현재 움직임벡터의 예측 움직임벡터로 선택한다. In step S400, when the selected motion vector prediction mode is the default prediction mode, the predetermined default predicted motion vector is selected as the predicted motion vector of the current motion vector.

전술한 S400 단계는, 선택된 움직임벡터 예측모드가 넌-디폴트 예측 모드인 경우에는, 소정의 방법을 이용하여 복수의 후보 움직임벡터 중에서 하나의 후보 움직임벡터를 현재 움직임벡터의 예측 움직임벡터(최적 예측 움직임벡터)로 선택한다. In the case where the selected motion vector prediction mode is the non-default prediction mode, a candidate motion vector of a plurality of candidate motion vectors is determined as a predicted motion vector of the current motion vector Vector).

단, 도 4에서는 S400 단계, S402 단계, S404 단계 및 S406 단계의 순서로 수행되는 것으로 도시되었으나, 이는 본 발명의 본질적인 특성을 설명하기 위한 일 실시예로서, 본 발명의 본질적인 특성을 벗어나지 않는 범위 내에서 순서를 변경하여 구현할 수도 있을 것이다. 예를 들어, 도 4에서는 S402 단계 이후 S404 단계가 수행되는 것으로 도시되었으나, S404 단계 이후 S402 단계가 수행되어도 된다. 즉, 둘 중 어느 하나가 먼저 수행되어도 관계가 없다. 4, it is to be understood that the present invention is not limited to the above-described exemplary embodiments, and that various modifications and changes may be made without departing from the scope of the present invention. You can also implement it by changing the order in. For example, although steps S402 and S404 are shown in FIG. 4, steps S404 and S402 may be performed. That is, it does not matter whether either one of them is performed first.

도 4를 참조하여 전술한 본 발명의 일실시예에 따른 움직임벡터 부호화 방법을 도 5 내지 도 10을 참조하여 더욱 상세하게 설명한다. The motion vector coding method according to an embodiment of the present invention described above with reference to FIG. 4 will be described in detail with reference to FIG. 5 to FIG.

도 5는 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에 대한 전체 흐름도이다. 5 is an overall flowchart of a motion vector coding method according to an embodiment of the present invention.

도 5를 참조하면, 본 발명의 일실시예에 따른 움직임벡터 부호화 방법은, 후보 움직임벡터 집합 선정 단계(S500), 예측 움직임벡터 선택 단계(S502), 예측 움직임벡터 예측가능 여부 판단 단계(S504), 제 1 부호화 단계(S506) 및 제 2 부호화 단계(S508) 등을 포함한다. Referring to FIG. 5, a motion vector coding method according to an exemplary embodiment of the present invention includes a candidate motion vector set selection step S500, a predicted motion vector selection step S502, a predicted motion vector prediction availability determination step S504, A first encoding step S506, a second encoding step S508, and the like.

후보 움직임벡터 집합 선정 단계(S500)는 현재블록의 현재 움직임벡터에 대하여 후보 움직임벡터 집합을 선정한다. The candidate motion vector set selection step (S500) selects a set of candidate motion vectors for the current motion vector of the current block.

예측 움직임벡터 선택 단계(S502)는 선정된 후보 움직임벡터 집합에서 최적 예측 움직임벡터를 선택한다. The predictive motion vector selection step S502 selects the best predicted motion vector from the selected candidate motion vector set.

예측 움직임벡터 예측가능 여부 판단 단계(S504)는 선택된 최적 예측 움직임벡터가 복호화 장치에서 예측가능한지를 판단한다. The predictive motion vector predictability determination step S504 determines whether the selected optimal predictive motion vector is predictable in the decoding apparatus.

제 1 부호화 단계(S506)는 S504 단계에서 예측가능으로 판단된 경우, 선택된 최적 예측 움직임벡터 및 예측가능을 지시하는 움직임벡터 예측모드를 이용하여 상기 현재 움직임벡터를 부호화한다. If it is determined in step S504 that the predicted motion vector is predictable, the first encoding step S506 encodes the current motion vector using a selected optimal predictive motion vector and a motion vector prediction mode indicating predictability.

제 2 부호화 단계(S508)는 S504 단계에서 예측 불가능으로 판단된 경우, 기설정된 디폴트 예측 움직임벡터 및 예측 불가능을 지시하는 움직임벡터 예측모드를 이용하여 상기 현재 움직임벡터를 부호화한다. If it is determined in step S504 that the predicted motion vector is not predictable, the second encoding step S508 codes the current motion vector using a predetermined default predictive motion vector and a motion vector prediction mode indicating a non-predictable motion vector.

최종적으로 결정된 움직임벡터 예측모드 및 제 1 부호화 단계(S506) 또는 제 2 부호화 단계(S508)에서 부호화된 차분벡터는 전송 비트스트림에 삽입된다. 전송 비트스트림은 유선, 무선 또는 저장매체 등의 전송 채널을 통해 디코더로 전송된다. The finally determined motion vector prediction mode and the differential vector coded in the first coding step S506 or the second coding step S508 are inserted into the transmission bitstream. The transport bit stream is transmitted to the decoder through a transport channel such as a wire, wireless or storage medium.

전술한 각 단계(S500, S502, S504, S506, S508)는 도 6, 도 7, 도 8, 도 9 및 도 10를 참조하여 각각 상세하게 설명한다.The above-described steps S500, S502, S504, S506, and S508 will be described in detail with reference to Figs. 6, 7, 8, 9, and 10, respectively.

도 6는 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 후보 움직임벡터 집합 선정 단계(S500)에 대한 흐름도이다. 6 is a flowchart illustrating a candidate motion vector set selection step (S500) in the motion vector coding method according to an exemplary embodiment of the present invention.

도 6을 참조하면, 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 후보 움직임벡터 집합 선정 단계(S500)는, 현재블록에 대한 하나 이상의 주변블록을 검색하는 단계(S600), 검색된 하나 이상의 주변블록의 움직임벡터를 각각 산출하는 단계(S602) 및 각각 산출된 후보 움직임벡터를 취합하여 상기 후보 움직임벡터 집합으로 선정하는 단계(S604) 등을 포함한다. Referring to FIG. 6, a candidate motion vector set selection step (S500) in the motion vector coding method according to an exemplary embodiment of the present invention includes searching (S600) one or more neighboring blocks for a current block (S600) A step S602 of calculating a motion vector of a neighboring block, a step S604 of selecting a candidate motion vector set by combining the calculated candidate motion vectors, and the like.

도 1에 나타낸 예시를 참조하면, 전술한 후보 움직임벡터 집합 선정 단계(S500)에서 선정된 후보 움직임벡터 집합은, 현재블록인 블록 D의 좌측, 상단, 우측 상단에 있는 주변블록인 블록 A, 블록 B 및 블록 C가 가지는 움직임벡터들로 이루어진 {MVA, MVB, MVC}가 된다. 1, the set of candidate motion vectors selected in the candidate motion vector set selection step (S500) described above is a block A, which is a neighboring block at the upper left, upper right, and upper right of the current block D, and B is a block {MV a, MV B, MV C} C is made up with the motion vector.

그러나, 더욱 일반적으로는 후보 움직임벡터 집합은 구현 방법이나 필요에 따라 보다 다양한 움직임벡터들을 후보 움직임벡터들의 집합(후보 움직임벡터 집합)으로 선정할 수 있다. 예를 들어, 시간축 상으로 이전에 존재하는 픽춰의 동일 위치 블록의 움직임벡터나 공간축 상으로 좌측 상단에 위치한 블록의 움직임벡터도 후보 움직임벡터로 사용할 수 있다. 또한 이들 움직임벡터들을 이용하여 선정된 또 다른 움직임벡터(예를 들어, 몇 개 움직임벡터의 평균값이나 중간값 등)도 포함될 수 있다. However, more generally, the candidate motion vector set can select more various motion vectors as a set of candidate motion vectors (a set of candidate motion vectors) according to the implementation method or the necessity. For example, a motion vector of a co-located block of a picture existing on the time axis or a motion vector of a block located on the upper left of the spatial axis may be used as a candidate motion vector. Further, another motion vector selected using these motion vectors (for example, an average value or an intermediate value of several motion vectors, etc.) may be included.

따라서, S600 단계는, 시간축 상에서 이전에 존재하는 픽춰(Picture) 및 이후에 존재하는 픽춰 중 하나 이상의 픽춰에서 현재블록과 동일한 위치에 있는 하나 이상의 제 1 블록; 및 공간축 상으로 현재블록에 인접한 위치에 있는 하나 이상의 제 2 블록 중 하나 이상을 하나 이상의 주변블록으로 검색할 수 있다. Accordingly, the step S600 may include: one or more first blocks located at the same position as the current block in at least one of a picture existing in a time axis and a picture existing in a later time; And one or more second blocks in a position adjacent to the current block on the spatial axis as one or more neighboring blocks.

또한 단계 S602는, 하나 이상의 제 1 블록에서의 각각의 움직임벡터; 하나 이상의 제 2 블록에서의 각각의 움직임벡터; 및 제 1 블록에서의 각각의 움직임벡터와 제 2 블록에서의 각각의 움직임벡터 중 하나 이상에 대한 평균값 또는 중간값; 중 하나를 검색된 하나 이상의 주변블록의 움직임벡터로 산출할 수도 있다. In addition, step S602 includes: a motion vector of each of the at least one first block; Each motion vector in one or more second blocks; And an average or median value for at least one of each motion vector in the first block and each motion vector in the second block; May be calculated as a motion vector of one or more neighboring blocks searched.

전술한 후보 움직임벡터 집합은 그 정의를 부호화 장치(200)와 복호화 장치(300)가 사전에 알고 있다는 전제 하에 다양한 방법으로 정의될 수 있다. 또한 후보 움직임벡터 집합을 구성하는 원소인 후보 움직임벡터 중 일부 또는 전부가 동일한 값을 갖는 경우, 서로 다른 값을 갖는 후보 움직임벡터들만의 집합으로 구성할 수도 있다. The above-described candidate motion vector set can be defined in various ways on the assumption that the encoding device 200 and the decoding device 300 know the definition in advance. When a part or all of the candidate motion vectors, which are elements constituting the candidate motion vector set, have the same value, the candidate motion vector may be composed of only a set of candidate motion vectors having different values.

도 7은 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 예측 움직임벡터 선택 단계(S502)에 대한 흐름도이다. 7 is a flowchart illustrating a predictive motion vector selection step S502 in the motion vector coding method according to an embodiment of the present invention.

도 7을 참조하면, 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 예측 움직임벡터 선택 단계(S502)는, 부호화 장치(200) 및 복호화 장치(300) 간에 기정의된 선택함수를 이용하여 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 각각에 대한 선택함수값을 계산하는 단계(S700); 및 계산된 선택함수값들에 근거하여 하나의 후보 움직임벡터를 최적 예측 움직임벡터로 선택하는 단계(S702) 등을 포함한다. Referring to FIG. 7, the step of selecting a predicted motion vector S502 in the motion vector coding method according to an embodiment of the present invention is performed by using a predetermined selection function between the coding apparatus 200 and the decoding apparatus 300 Calculating a selection function value for each of the one or more candidate motion vectors included in the selected candidate motion vector set (S700); And selecting one candidate motion vector as an optimal predicted motion vector based on the computed selection function values (S702).

일 예로서, 전술한 "선택함수값"은, 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 각각에 대한 현재 움직임벡터와의 차분벡터를 부호화하는데 소요되는 비트량; 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 각각에 대한 현재 움직임벡터와의 차분벡터의 크기; 및 움직임벡터 예측모드를 부호화하는데 소요되는 비트량; 중 하나 이상 또는 하나 이상을 조합한 것을 포함할 수도 있다. As an example, the above-mentioned "selection function value" includes a bit amount required to code a differential vector between the current motion vector and each of one or more candidate motion vectors included in the selected candidate motion vector set; A size of a difference vector between the current motion vector and the current motion vector for each of the one or more candidate motion vectors included in the selected candidate motion vector set; And the amount of bits required to encode the motion vector prediction mode; Or a combination of one or more of them.

만약 차분벡터의 비트량을 선택함수값으로 이용하는 경우, 전술한 S702 단계에서는, 일 실시예로서, 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 각각에 대한 차분벡터를 부호화하는데 소요되는 비트량을 계산하고, 계산된 비트량 중 최소값이 되는 후보 움직임벡터를 최적 예측 움직임벡터로 선택할 수 있다. If the bit amount of the difference vector is used as the selection function value, in step S702 described above, a bit required to encode the difference vector for each of the one or more candidate motion vectors included in the selected candidate motion vector set And a candidate motion vector which is a minimum value among the calculated bit amounts can be selected as an optimum predicted motion vector.

또한, 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 예측 움직임벡터 선택 단계(S502)는, 전술한 비트량을 선택함수값에 근거하여 최적 예측 움직임벡터를 선택하는 방식 이외에도, 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 중의 하나의 움직임벡터를 선택했을 경우 발생하는 부호화에 소요되는 비트량과 이때 발생할 복원화질을 같이 고려하는 율-왜곡 최적화(Rate-Distortion Optimization) 방식을 이용하여서도 최적 예측 움직임벡터를 선택할 수도 있다. In addition, the predictive motion vector selection step S502 in the motion vector coding method according to an embodiment of the present invention may include a method of selecting the best predicted motion vector based on the selected function value, A Rate-Distortion Optimization scheme that considers both the amount of bits required for coding occurring when one motion vector of one or more candidate motion vectors included in the motion vector set is selected and the reconstructed image quality to be generated at this time The optimal predicted motion vector can be selected.

전술한 예측 움직임벡터 선택 단계(S502)에서는, 하기 수학식 4에서의 라그랑제 코스트(Lagrangian Cost) 함수를 최적 예측 움직임벡터를 선택하기 위한 선택함수로 이용할 수 있다. In the above-described predictive motion vector selection step S502, the Lagrangian cost function in Equation (4) can be used as a selection function for selecting an optimal predicted motion vector.

Figure 112014000767773-pat00004
Figure 112014000767773-pat00004

여기서, J는 라그랑제 코스트, D는 원 영상과 복원 영상 간의 오차, λ는 라그랑제 승수이다. RH은 움직임벡터 예측모드를 부호화하는데 소요되는 비트량이고, RM은 현재 움직임벡터의 차분벡터를 부호화하는데 소요되는 비트량이다. 수학식 4에서의 J, D, RH, RM은 모두 현재블록이 위치하는 픽춰 번호를 표시하는 n과 블록 번호를 표시하는 k에 따라 정의된다. 따라서 본 발명은 픽춰 또는 블록 단위에서 선택적으로 적용될 수 있는 것이다. Where J is the Lagrangian cost, D is the error between the original image and the reconstructed image, and λ is the Lagrangian multiplier. R H is the amount of bits required to encode the motion vector prediction mode, and R M is the amount of bits required to encode the difference vector of the current motion vector. J, D, R H , and R M in Equation (4) are all defined according to n representing a picture number where the current block is located and k representing the block number. Therefore, the present invention can be applied selectively in a picture or a block unit.

또한 최적 예측 움직임벡터 선택하는 과정에서 원 영상과 복원 영상 간의 오차인 D가 변하지 않는 경우 또는 계산상의 편의를 위해, 라그랑제 코스트 J를 산출하는 수학식 4에서 D와 λ를 제거하여 식을 간략화할 수도 있다. Also, in the case where D, which is an error between the original image and the reconstructed image, does not change in the process of selecting an optimal predicted motion vector, or for convenience of calculation, D and λ are removed from Equation 4 for calculating the Lagrangian cost J, It is possible.

움직임벡터 부호화 방법에 의해 발생하는 라그랑제 코스트를 산정하는 과정에서 수학식 4의 RH는 움직임벡터 예측모드 부호화에 소요되는 비트량이고, RM은 부호화된 현재 움직임벡터에 대한 차분벡터에 소요되는 비트량으로서, 그 계산 방법은 움직임벡터 예측모드에 따라 달라진다. 즉, 움직임벡터 예측모드가 복호화 장치(300)가 (최적) 예측 움직임벡터를 예측 불가능함을 지시하는 경우, RM은 중간값(Median) 계산과 같이 사전에 정의된 디폴트 방법에 의해 생성된 예측 움직임벡터(이를 "디폴트 예측 움직임벡터", 또는 "디폴트 예측값"이라 함)과의 현재 움직임벡터의 차분벡터를 부호화하는데 소요되는 비트량이다. 또한, 움직임벡터 예측모드가, 복호화 장치(300)가 최적 예측 움직임벡터를 예측가능함을 지시하는 경우, RM은 선택된 최적 예측 움직임벡터와 현재 움직임벡터의 차분벡터(차분값)을 부호화하는데 소요되는 비트량이 되는 것이다.In the process of estimating the raglane cost caused by the motion vector coding method, R H in Equation (4) is a bit amount required for coding a motion vector prediction mode, and R M is a difference vector for a current motion vector As the bit amount, the calculation method thereof depends on the motion vector prediction mode. That is, when the motion vector prediction mode indicates that the (optimal) prediction motion vector is not predictable by the decoding apparatus 300, R M is a prediction generated by a predefined default method such as a median calculation Is the amount of bits required to code the difference vector of the current motion vector with a motion vector (referred to as a "default predicted motion vector" or "default predicted value"). In addition, when the motion vector prediction mode indicates that the decoding apparatus 300 can predict the best predicted motion vector, R M is a vector that is used to encode a difference vector (differential value) between the selected optimal predicted motion vector and the current motion vector Bit amount.

또한, 전술한 예측 움직임벡터 선택 단계(S502)에서는, 상기 수학식 4에서의 라그랑제 코스트(Lagrangian Cost) 함수를 이용하여 최적 예측 움직임벡터를 선택하는 것 이외에도, 좀 더 일반화된 선택함수 식이 포함된 하기 수학식 5를 이용하여 최적 예측 움직임벡터를 선택할 수도 있다. 단, 수학식 5는 부호화할 현재블록의 현재 움직임벡터를 도 1에서의 블록 D의 움직임벡터인 MVD로 가정하여 표현되었다. In addition, in the above-described predictive motion vector selection step S502, in addition to selecting an optimal predicted motion vector using the Lagrangian cost function in Equation (4), a more generalized selection function expression The optimal predicted motion vector may be selected using Equation (5). Equation (5) is expressed by assuming that the current motion vector of the current block to be encoded is a motion vector MV D of the block D in FIG.

Figure 112014000767773-pat00005
Figure 112014000767773-pat00005

상기 수학식 5에서, PMVenc는 선택된 최적 예측 움직임벡터이고, PMVC는 현재 움직임벡터 MVD의 예측 움직임벡터로 선택 가능한 후보 움직임벡터들의 집합인 후보 움직임벡터 집합(CS)에 속하는 하나의 원소(움직임벡터)를 의미한다. "h()"는 현재 움직임벡터 MVD를 그 예측 움직임벡터와 차분하여 부호화하는데 최적인 예측 움직임벡터를 선택하기 위한 선택함수이다. In Equation (5), PMV enc is a selected optimum motion vector and PMVC is an element belonging to a candidate motion vector set (CS) which is a set of candidate motion vectors selectable as a predicted motion vector of the current motion vector MV D Vector). "h ()" is a selection function for selecting a prediction motion vector optimal for coding the current motion vector MV D by differentiating the current motion vector MV D from the predicted motion vector.

전술한 선택함수 h()의 일례로 현재 움직임벡터를 차분하여 부호화하는데 소요되는 비트량을 사용하거나, 현재 움직임벡터를 차분하여 부호화하는데 소요되는 비트량과 움직임벡터 예측모드를 부호화하는데 소요되는 비트량의 합을 사용할 수 있다. 또한 계산을 간단히 하기 위해 실제 소요되는 비트량 대신 현재 움직임벡터와 예측 움직임벡터와의 차이인 차분벡터(잔차신호)의 크기를 사용할 수도 있다. 더욱 일반적으로는 선택함수 h()의 정의를 부호화 장치(200)와 복호화 장치(300)가 사전에 미리 알고 있다는 전제하에 다양한 방법으로 정의하여 사용할 수 있다. 이러한 선택함수 h()가 주어지면, 예측 움직임벡터의 후보인 후보 움직임벡터를 포함하는 후보 움직임벡터 집합(CS)으로부터 선택함수 h()를 최적화하는 하나의 후보 움직임벡터(PMVC)를 최적 예측 움직임벡터(PMVenc)로 선택할 수 있다. As an example of the selection function h () described above, a bit amount used for coding the current motion vector by using the difference is used, or a bit amount used for coding the current motion vector by difference and a bit amount Can be used. Also, in order to simplify the calculation, the size of the difference vector (residual signal), which is the difference between the current motion vector and the predicted motion vector, may be used instead of the actual amount of bits. More generally, the definition of the selection function h () can be defined and used in various ways on the premise that the encoding device 200 and the decryption device 300 know the definition in advance. Given this selection function h (), one candidate motion vector PMVC that optimizes the selection function h () from the candidate motion vector set CS containing the candidate motion vector that is a candidate of the predicted motion vector, Vector (PMV enc ).

도 8은 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 예측 움직임벡터 예측가능 여부 판단 단계(S504)에 대한 흐름도이다. FIG. 8 is a flowchart illustrating a step S504 of determining whether a predicted motion vector can be predicted in the motion vector coding method according to an exemplary embodiment of the present invention.

도 8을 참조하면, 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 예측 움직임벡터 예측가능 여부 판단 단계(S504)는, 부호화 장치(200) 및 복호화 장치(300) 간에 기정의된 판단함수를 이용하여 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 각각에 대한 판단함수값을 계산하는 단계(S800); 계산된 판단함수값에 근거하여 하나 이상의 후보 움직임벡터 중 하나의 후보 움직임벡터를 현재 움직임벡터에 대한 추정 예측 움직임벡터로 선택하는 단계(S802); 선택된 추정 예측 움직임벡터 및 선택된 최적 예측 움직임벡터를 비교하는 단계(S804); 및 비교 결과에 따라 선택된 최적 예측 움직임벡터가 복호화 장치(300)에서 예측가능한지를 판단하는 단계(S806) 등을 포함한다. Referring to FIG. 8, in step S504, it is determined whether a predicted motion vector can be predicted in the motion vector coding method according to an exemplary embodiment of the present invention. Calculating a decision function value for each of the one or more candidate motion vectors included in the selected candidate motion vector set (S800); Selecting one of the one or more candidate motion vectors as an estimated predicted motion vector for the current motion vector based on the calculated decision function value (S802); Comparing the selected estimated predicted motion vector and the selected optimal predicted motion vector (S804); And determining whether the optimal predictive motion vector selected according to the comparison result is predictable in the decoding apparatus 300 (S806).

전술한 예측 움직임벡터 예측가능 여부 판단 단계(S504)를 수학식 5에서의 표현을 이용하여 다시 설명하면 다음과 같다. The predicted motion vector predictability determination step S504 will be described below using the expression in Equation (5).

예측 움직임벡터 예측가능 여부 판단 단계(S504)는, 앞선 예측 움직임벡터 선택 단계(S502)에서 선택된 최적 예측 움직임벡터(PMVenc)를 사용하여 계산된 차분벡터(잔차신호)와, 예측 움직임벡터의 후보가 될 수 있는 유한한 개수의 후보 움직임벡터와, 움직임보상에 사용할 참조픽춰데이터와, 이미 복원된 주변블록의 정보와, 화소값에 대한 움직임보상 잔차신호를 이용하여, 앞선 단계(S502)에서 선택된 최적 예측 움직임벡터가 복호화 장치(300) 또는 복호화 방법에서 예측 가능한지 여부를 판단한다. The predictive motion vector predictability determination step S504 includes a difference vector calculated using the optimal predictive motion vector PMV enc selected in the preceding predictive motion vector selection step S502, (Step S502), using a finite number of candidate motion vectors that can be used for motion compensation, reference picture data to be used for motion compensation, information of the already reconstructed neighboring blocks, and motion compensation residual signals for pixel values It is determined whether the best predicted motion vector is predictable by the decoding apparatus 300 or the decoding method.

이를 위해 먼저 부호화 장치(300)는 부호화 장치(200)가 계산하여 전송할 현재 움직임벡터(MVD)에 대한 차분벡터인 DMVD(=MVD-PMVenc)와 이미 복원된 주변 블록의 정보와 움직임보상에 사용할 참조픽춰데이터를 이용하여, 하기 수학식 6과 같은 소정의 결정 방법을 이용하여 추정 예측 움직임벡터인 PMVdec를 찾는다. For this, the coding apparatus 300 firstly calculates DMV D (= MV D -PMV enc ), which is a differential vector of the current motion vector MV D to be calculated and transmitted by the coding apparatus 200, The predictive motion vector PMV dec is searched using the predetermined determination method as shown in Equation (6) using the reference picture data to be used for compensation.

Figure 112014000767773-pat00006
Figure 112014000767773-pat00006

수학식 6에서, 판단함수인 g()는, 부호화 장치(200)가 계산하여 전송할 차분벡터 및 이미 복원된 주변블록의 정보를 이용하여, 복호화 장치(300)가 최적 예측 움직임벡터(PMVenc)를 예측할 수 있는지를 부호화 장치(200)에서 판단하기 위한 함수이다. 또한, 이 판단함수 g()는 복호화 장치(300)에서 예측 움직임벡터를 예측할 때도 사용된다. In Equation 6, the determination function, g (), the coding unit 200 is calculated by transfer using the information of the difference vector and the already reconstructed neighboring blocks, the decoding device 300, a vector (PMV enc) best prediction motion Is determined by the encoding device 200. [0050] This determination function g () is also used in predicting the predicted motion vector in the decoding apparatus 300. [

판단함수 g()는 그 정의를 부호화 장치(200)와 복호화 장치(300)가 사전에 알고있다는 전제하에 다양한 방법으로 정의될 수 있으며, 이러한 판단함수 g()에 대한 구체적인 실시예를 후술한다. The determination function g () can be defined in various ways on the assumption that the encoding device 200 and the decryption device 300 know the definition in advance. A specific embodiment of the determination function g () will be described below.

수학식 6에 의해, 부호화 장치(200)는, 복호화 장치(300)가 찾아낼 (추정) 예측 움직임벡터인 PMVdec를 미리 계산한 후, 복호화 장치(300)가 제공된 차분벡터인 DMVD(=MVD-PMVenc) 및 이미 복원된 주변블록의 정보를 이용하여, 최적 예측 움직임벡터(PMVenc)를 예측하여 올바른 복원된 영상데이터를 얻어낼 수 있는지 여부를 검사한다. 즉, 부호화 장치(200)는 나중에 복호화 장치(300)가 수행할 최적 예측 움직임벡터를 찾아내는 과정을 미리 수행하여 그 결과를 부호화 시에 이용하겠다는 것이다The encoding apparatus 200 previously calculates PMV dec which is the predicted motion vector to be found by the decoding apparatus 300 and then outputs DMV D (= MV D -PMV enc ) and the information of the already reconstructed neighboring block to predict the best predicted motion vector PMV enc to determine whether the reconstructed image data can be correctly recovered. That is, the coding apparatus 200 performs a process of finding an optimal predicted motion vector to be performed later by the decoding apparatus 300 in advance and uses the result at the time of coding

전술한 S504단계에서의 S804 단계 및 S806 단계에 대한 몇가지 실시예를 아래에서 설명한다. Some embodiments of steps S804 and S806 in step S504 will be described below.

먼저, 복호화 장치(300)에 의해 최적 예측 움직임벡터(PMVenc)가 예측 가능한지를 판단하기 위한 방법의 일 실시예는 다음과 같다. An embodiment of a method for determining whether an optimal predicted motion vector PMV enc is predictable by the decoding apparatus 300 is as follows.

S504단계에서의 수학식 6을 통해 계산된 추정 예측 움직임벡터(PMVdec)가 S502단계에서 선택된 최적 예측 움직임벡터(PMVenc)가 같을 경우, 복호화 장치(300)는 부호화 장치(200)가 제공한 차분벡터(DMVD)에 자신이 추정한 예측 움직임벡터인 추정 예측 움직임벡터(PMVdec)를 더하여 정확한 현재 움직임벡터 MVD를 복원하여 올바른 복원된 영상데이터를 얻어낼 수 있다. 따라서, 부호화 장치(200)는 자신이 직접 선택된 최적 예측 움직임벡터(PMVenc)와 복호화 장치(300)가 찾아낼 것으로 추정하는 추정 예측 움직임벡터(PMVdec)가 같은 경우에는, 복호화 장치(300)에서의 최적 예측 움직임벡터(PMVenc)에 대한 예측이 가능하다고 판정하고, 그 이외의 경우는 경우에는 예측이 불가능하다고 판정한다. 또는 실시예에 따라, 부호화 장치(200)는 자신이 직접 선택된 최적 예측 움직임벡터(PMVenc)와 복호화 장치(300)가 찾아낼 것으로 추정하는 추정 예측 움직임벡터(PMVdec)간의 차이가 소정의 경계값보다 작은 경우에는, 복호화 장치(300)에서의 최적 예측 움직임벡터(PMVenc)에 대한 예측이 가능하다고 판정하고, 그 이외의 경우는 경우에는 예측이 불가능하다고 판정할 수도 있다.If the estimated predicted motion vector PMV dec calculated through Equation 6 in step S504 is equal to the optimal predicted motion vector PMV enc selected in step S502, the decoding apparatus 300 determines whether the predicted motion vector PMV dec Correct reconstructed image data can be obtained by restoring the accurate current motion vector MV D by adding the estimated motion vector PMV dec , which is a prediction motion vector estimated by itself, to the difference vector DMV D. Therefore, when the optimal predicted motion vector PMV enc directly selected by the decoding apparatus 300 is the same as the estimated predicted motion vector PMV dec estimated to be found by the decoding apparatus 300, It is determined that prediction with respect to the optimum predicted motion vector PMV enc is possible. Otherwise, it is determined that prediction is impossible. Alternatively, according to the embodiment, the coding apparatus 200 may determine that the difference between the directly selected optimal predicted motion vector PMV enc and the estimated predicted motion vector PMV dec that the decoding apparatus 300 estimates to find is smaller than a predetermined boundary It is determined that prediction of the best predicted motion vector PMV enc in the decoding apparatus 300 is possible, and in the other cases, it may be determined that prediction can not be performed.

복호화 장치(300)에 의해 최적 예측 움직임벡터(PMVenc)가 예측 가능한지를 판단하기 위한 방법의 다른 일 실시예는 다음과 같다. Another embodiment of a method for determining whether the optimum predicted motion vector PMV enc is predictable by the decoding apparatus 300 is as follows.

영상의 압축율이 높을 경우, 영상의 화소값의 변화가 크지 않을 경우, 또는 영상의 움직임벡터의 변화가 그리 크지 않을 경우 등에는 비록 최적 예측 움직임벡터(PMVenc)와 추정 예측 움직임벡터(PMVdec)가 같지 않더라도, 추정 예측 움직임벡터(PMVdec)를 사용하여 복원한 움직임벡터(즉, MV'D = DMVD + PMVdec )를 사용하여 움직임 보상된 영상데이터와, 최적 예측 움직임벡터(PMVenc)를 사용하여 복원한 움직임벡터(즉, MVD = DMVD + PMVenc )를 사용하여 움직임 보상된 영상데이터가 같은 경우가 발생할 수 있는데, 이러한 경우, 최적 예측 움직임벡터(PMVenc)와 추정 예측 움직임벡터(PMVdec)가 같지 않더라도, 복호화 장치(300)가 추정 예측 움직임벡터(PMVdec)를 이용하여 최적 예측 움직임벡터(PMVenc)를 예측가능하다고 판정하고, 그 이외의 경우에는 예측할 수 없다고 판정한다. The optimal predicted motion vector PMV enc and the estimated predicted motion vector PMV dec may be used in a case where the compression rate of the image is high or the pixel value of the image is not large or the change of the motion vector of the image is not large, The motion vector restored using the estimated predicted motion vector PMV dec (i.e., MV ' D = DMV D + PMV dec ), and a motion vector reconstructed using the optimal predicted motion vector PMV enc (i.e. MV D = DMV D + PMV enc In this case, even if the optimal predicted motion vector PMV enc and the estimated predicted motion vector PMV dec are not equal to each other, It is determined that the optimum predicted motion vector PMV enc is predictable using the vector PMV dec , and otherwise, it is determined that prediction can not be performed.

복호화 장치(300)에 의해 최적 예측 움직임벡터(PMVenc)가 예측 가능한지를 판단하기 위한 방법의 또 다른 일 실시예는 다음과 같다. Another embodiment of a method for determining whether the optimum predicted motion vector PMV enc is predictable by the decoding apparatus 300 is as follows.

더욱 더 압축율을 높이기 위하여 추정 예측 움직임벡터(PMVdec)를 사용하여 얻어진 복원된 영상데이터와 최적 예측 움직임벡터(PMVenc)를 사용하여 얻어질 복원된 영상데이터가 소정의 경계값 이하로 차이가 날 경우에도(예를 들어, 두 복원된 영상데이터 사이의 SAD(Sum of Absolute Difference)가 소정의 경계값 이하로 차이가 날 경우), 복호화 장치(300)가 추정 예측 움직임벡터(PMVdec)를 이용하여 최적 예측 움직임벡터(PMVenc)를 예측가능하다고 판정하고, 그 이외의 경우에는 복호화 장치(300)가 추정 예측 움직임벡터(PMVdec)를 이용하여 최적 예측 움직임벡터(PMVenc)를 예측할 수 없다고 판정한다. The reconstructed image data obtained by using the estimated predicted motion vector PMV dec and the reconstructed image data obtained by using the optimal predicted motion vector PMV enc are different from each other by a predetermined threshold value or less (For example, when the sum of absolute differences (SAD) between two reconstructed image data is less than a predetermined threshold value), the decoding apparatus 300 uses the estimated predicted motion vector PMV dec the best prediction motion vector (PMV enc) to and determined to be predictable, the control of the decoding device 300 the estimated predicted motion vector (PMV dec) using the best predicted motion vector (PMV enc) to be not predictable .

이상에서 전술한 예측가능 여부 판단의 몇 가지의 실시예를 다시 설명하면, 전술한 S804 단계 및 S806 단계에서는, 선택된 추정 예측 움직임벡터와 선택된 최적 예측 움직임벡터가 동일하거나 소정의 경계값 이하로 차이가 날 경우, 선택된 최적 예측 움직임벡터가 복호화 장치(300)에서 예측가능하다고 판단할 수 있다. In the above-described steps S804 and S806, if the selected estimated predicted motion vector and the selected optimal predicted motion vector are equal to or less than a predetermined threshold value, It is possible to determine that the selected optimal predicted motion vector is predictable in the decoding apparatus 300. [

또한, 전술한 S804 단계 및 S806 단계에서는, 선택된 추정 예측 움직임벡터를 이용하여 복원한 영상데이터가 선택된 최적 예측 움직임벡터를 이용하여 복원한 영상데이터와 동일하거나 소정의 경계값 이하로 차이가 날 경우, 선택된 최적 예측 움직임벡터가 복호화 장치(300)에서 예측가능하다고 판단할 수도 있다. If the reconstructed image data using the selected estimated predictive motion vector is equal to or less than a predetermined threshold value in the reconstructed image data using the selected optimal predictive motion vector in steps S804 and S806, It may be determined that the selected optimal predicted motion vector is predictable by the decoding apparatus 300. [

도 8를 참조하면, 부호화 장치(200)와 복호화장치(300) 간에 미리 정의된 판단함수(수학식 6에서의 g())를 이용하여 부호화 장치(200)는 판단함수값을 계산하고(S800), 계산된 판단함수값을 토대로 수학식 6에서처럼 최소값의 판단함수값을 갖는 후보 움직임벡터를 추정 예측 움직임벡터(PMVdec)로 선택(S802)한다. 이후, 추정 예측 움직임벡터(PMVdec)와 최적 예측 움직임벡터(PMVenc)를 비교(S804)하여 최종적으로 예측가능 여부를 판단(S806)하게 된다. 8, the encoding apparatus 200 calculates a determination function value using a determination function (g () in Equation 6) defined beforehand between the encoding apparatus 200 and the decoding apparatus 300 (S800 And selects a candidate motion vector having a minimum decision function value as an estimated motion vector PMV dec in step S802 based on the calculated determination function value. Thereafter, the estimated predicted motion vector PMV dec and the optimal predicted motion vector PMV enc are compared (step S804), and finally predicted (step S806).

부호화 장치(200)와 복호화장치(300) 간에 미리 정의된 판단함수는 다양한 형태로 실현될 수 있다. The determination function defined beforehand between the encoding apparatus 200 and the decoding apparatus 300 can be realized in various forms.

상기 수학식 6의 판단함수 g()로써는, 템플릿매칭(TM: Template Matching)을 이용한 함수, 경계화소정합(BM: Boundary Matching)을 사용한 함수를 사용할 수 있다. A function using Template Matching (TM) or a function using boundary matching (BM) can be used as the determination function g () in Equation (6).

먼저, 템플릿매칭(TM: Template Matching)을 이용한 판단함수를 아래에서 설명한다. First, a determination function using Template Matching (TM) will be described below.

탬플릿매칭화소인덱스집합(TMS: Template Matching Set)는 주어진 지정된 블록의 위치를 기준으로, 선택된 화소들의 상대적 위치를 나타내는 인덱스 집합으로 정의할 수 있으며, 예를 들어, 지정된 블록의 좌측, 좌측상단 및 상단에 인접한 주변의 M개 화소의 위치이다. 필요에 따라 다른 방법도 가능함은 물론이다. 일반적으로 TMS가 지시하는 화소의 수가 많으면 더욱 정확한 매칭이 가능하나 계산량이 많아진다.A Template Matching Set (TMS) can be defined as a set of indices indicating the relative positions of selected pixels based on the position of a given designated block. For example, the left side, the upper left side and the upper side And the positions of M surrounding pixels adjacent to the pixel. It goes without saying that other methods can be used as needed. In general, if the number of pixels indicated by the TMS is large, more accurate matching is possible, but the calculation amount is increased.

템플릿 매칭 방법은, 예측 움직임벡터로 선택 가능한 모든 후보 예측움직임벡터 집합(CS)의 선정 이후, 선정된 후보 예측 움직임벡터 집합 내의 각각의 후보 움직임벡터가 지정하는 참조 블록에 대해 TMS가 가리키는 화소들과 현재 블록에 대해 TMS가 지시하는 화소들의 차이를 하기 수학식 7(수학식 6의 일 실시예)을 이용하여 계산하여 각각의 후보 움직임벡터에 따른 정합 오류를 계산한 후 이중 가장 최소의 정합오류를 가지는 것을 앞에서 언급한 추정 예측 움직임벡터(PMVdec)로 선정한다. The template matching method includes a step of selecting all candidate predicted motion vector sets (CS) that can be selected as the predicted motion vectors, pixels corresponding to the reference blocks designated by the respective candidate motion vectors in the selected candidate predicted motion vector set, The difference between the pixels indicated by the TMS for the current block is calculated using Equation (7) (one embodiment of Equation (6)), and the matching error according to each candidate motion vector is calculated. (PMV dec ) of the predicted motion vector.

Figure 112014000767773-pat00007
Figure 112014000767773-pat00007

수학식 7에서, f(PMVC+DMV, i)에서 (PMVC+DMV)는 인덱스 i(TMS에 포함됨)가 가리키는 참조픽춰 내의 참조블록 주변의 인덱스 i 가 나타내는 화소 위치를 나타내고, f(PMVC+DMV, i)는 이 위치에서의 화소값을 의미한다. 또한 C(i)는 인덱스 i가 지시하는 현재블록 주변의 화소값을 의미한다. (PMVC + DMV) in f (PMVC + DMV, i) represents the pixel position indicated by the index i around the reference block in the reference picture indicated by the index i (included in TMS) , i) denotes a pixel value at this position. C (i) denotes the pixel value around the current block indicated by the index i.

판단함수의 일 실시예인 g(PMVC|DMV)는 부호화 장치(200)가 제공하는 차분벡터(DMVD)에 후보 움직임벡터 집합(CS) 중의 한 원소인 후보 움직임벡터(PMVC)를 예측 움직임벡터로 사용하여 해당블록의 움직임벡터를 PMVC+DMV로 계산한 후, 이 움직임벡터를 이용하여 해당 블록을 움직임 보상하여 얻어진 복원된 블록이 얼마나 올바른지를 산정한 값을 제공한다. 이를 산정하기 위하여 수학식 7에서는 차이의 제곱합(Sum of Squared Error)을 사용하였다. 그러나 응용에 따라 SAD(sum of Absolute difference)등 다른 방법도 가능하다. 추정 예측 움직임벡터(PMVdec)는 판단함수의 일 실시예인 g(PMVC|DMV)를 최소로 하는 후보 움직임벡터(PMVC)를 의미한다.G (PMVC | DMV), which is an embodiment of the decision function, multiplies the difference vector DMV D provided by the encoding apparatus 200 by a candidate motion vector PMVC, which is an element of the candidate motion vector set CS, The motion vector of the corresponding block is calculated by PMVC + DMV, and motion compensation of the corresponding block using the motion vector is performed to provide a calculated value of how correct the reconstructed block is. In order to calculate this, Sum of Squared Error is used in Equation (7). However, other methods such as SAD (sum of absolute difference) can be used depending on the application. The estimated predicted motion vector PMV dec means a candidate motion vector PMVC that minimizes g (PMVC | DMV) which is an embodiment of the determination function.

즉, 도 8에서 S800 단계는, 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 각각이 지정하는 참조 블록에 대해 탬플릿 매칭 화소 인덱스 집합(TMS: Template Matching Set)이 지시하는 화소들과 현재블록에 대해 탬플릿 매칭 화소 인덱스가 지시하는 화소들의 화소값 차이를 계산하고, 계산된 화소값 차이에 근거하여, 하나 이상의 후보 움직임벡터 각각에 대한 정합오류를 상기 판단함수값으로 계산함으로써, 기정의된 판단함수를 수행하여 판단함수값을 계산할 수 있다. 8, in step S800, the reference pixels designated by the template matching pixel index set (TMS) and the pixels designated by the template matching pixel index set (TMS) for the reference block designated by each of the one or more candidate motion vectors included in the selected candidate motion vector set, Calculating a pixel value difference of pixels indicated by the template matching pixel index for the block and calculating a matching error for each of the one or more candidate motion vectors as the determination function value based on the calculated pixel value difference, The judgment function may be performed to calculate the judgment function value.

다음으로, 경계화소정합(BM: Boundary Matching)을 이용한 판단함수를 아래에서 설명한다. Next, a determination function using boundary pixel matching (BM) will be described below.

전술한 일 실시예의 TMS와 유사하게, 경계매칭화소인덱스집합 BMS(Boundary Matching Index Set)는 현재블록 내의 최좌측 및 최상단에 위치한 화소값의 위치를 가리키는 인덱스의 집합으로 정의할 수 있다. 응용에 따라 현재 블록 내의 블록 경계에 위치한 전부 또는 일부의 화소들의 위치로 정의하는 것도 가능함은 물론이다 Similar to the TMS of the above-described embodiment, the boundary matching pixel index set BMS (Boundary Matching Index Set) can be defined as a set of indexes indicating the positions of the pixel values located at the leftmost and topmost positions in the current block. It is needless to say that it may be defined as the position of all or some of the pixels located at the block boundary within the current block depending on the application

예측 움직임벡터로 선택 가능한 모든 후보 움직임벡터 집합(CS)을 선정한 이후, 후보 움직임벡터 집합(CS) 중의 어느 후보 움직임벡터(PMVC)가 가장 최적인지를 알기 위해, 움직임보상으로 부호화된 것을 복원한 현재블록이 그 주변블록들과 불록 경계에서 얼마나 부드럽게 연결되는 지를 산정하기 위해 경계화소매칭을 수행하여 이 경계화소매칭 정합오류를 최소화하는 후보 움직임벡터(PMVC)를 후보 움직임벡터 집합(CS) 중에서 하나 정하여 이를 추정 예측 움직임벡터(PMVdec)로 선택한다. 이를 복호화 장치(300)가 선정한 예측 움직임벡터라 한다. After selecting all the candidate motion vector sets CS selectable as the predictive motion vectors, it is necessary to determine which candidate motion vector PMVC of the candidate motion vector set CS is most optimal, In order to estimate how smoothly a block is connected to its surrounding blocks and block boundaries, edge pixel matching is performed to determine a candidate motion vector (PMVC) that minimizes the boundary pixel matching matching error as one of the candidate motion vector sets And selects it as the estimated predicted motion vector PMV dec . And is referred to as a predictive motion vector selected by the decoding apparatus 300.

이 과정을 좀 더 자세히 설명하면 다음과 같다. 후보 움직임벡터 집합(CS) 중의 한 원소인 후보 움직임벡터(PMVC)와 부호화 장치(200)가 결정한 차분벡터(DMV)를 사용하여 PMVC+DMV로 계산된 후보 움직임벡터가 지정하는 참조 블록의 값과 부호화 장치(200)가 계산한 차분벡터(잔차신호)를 더하여 현재블록의 화소값을 복원 한 후, 각각의 후보 움직임벡터에 따라 움직임보상 복원된 현재블록 중에서 현재블록 주변의 기복원된 화소들과의 경계정합도가 가장 높은 복원블록을 생성하는 예측 움직임벡터를 결정한다. 이를 위해 수학식 8과 같이 차이값의 제곱합으로 각각의 후보 움직임벡터가 가지는 정합 오류를 계산한다. 물론 SAD(Sum of Absolute Difference)등 다른 방법으로 정합오류를 계산할 수 있음은 자명하다.This process is described in more detail as follows. The value of the reference block designated by the candidate motion vector calculated by PMVC + DMV using the candidate motion vector PMVC, which is an element in the candidate motion vector set CS, and the difference vector DMV determined by the encoder 200, (Residual signal) calculated by the encoding device 200 to reconstruct the pixel value of the current block, and then reconstructs the motion-compensated reconstructed pixels around the current block from the motion-compensated reconstructed current block according to each candidate motion vector A prediction motion vector for generating a reconstruction block having the highest degree of boundary matching is determined. For this, a matching error of each candidate motion vector is calculated as a sum of squares of difference values as shown in Equation (8). Of course, it is obvious that other methods such as Sum of Absolute Difference (SAD) can calculate the matching error.

Figure 112014000767773-pat00008
Figure 112014000767773-pat00008

수학식 8에서, C(i)는 후보 움직임벡터 집합(CS) 중의 한 원소인 후보 움직임벡터(PMVC)와 부호화 장치(200)가 결정한 DMV를 사용하여 PMVC+DMV로 계산된 후보 움직임벡터가 지정하는 참조 블록의 값과 부호화 장치(200)가 계산한 움직임보상 화소 잔차신호를 더하여 복원된 현재블록의 복원화소 중 경계매칭화소인덱스집합 BMS(Boundary Matching Set)내의 인덱스 i가 지정하는 화소값을 의미한다. 또한 f(i)는 현재블록에 인접하는 주변블록 내의 경계화소중 BMS의 인덱스 i가 지정하는 화소와 바로 인접하는 화소값을 의미한다. 수학식 8을 사용하여 후보 움직임벡터 집합(CS) 내의 각각의 후보 움직임벡터(PMVC)에 대해 경계화소 정합 오류가 수학식 8에 의해 계산되고 그 중 최소의 정합 오류를 발생하는 후보 움직임벡터를 추정 예측 움직임벡터(PMVdec)로 선택한다. 이를 복호화 장치(300)가 선정한 예측 움직임벡터라 한다. In Equation (8), C (i) is a candidate motion vector calculated by PMVC + DMV using a candidate motion vector PMVC that is an element of the candidate motion vector set CS and a DMV determined by the encoder 200 And a motion compensated pixel residual signal calculated by the encoding device 200 to obtain a pixel value designated by an index i in a boundary matching pixel index set BMS (Boundary Matching Set) among restored pixels of the restored current block do. Also, f (i) denotes a pixel value immediately adjacent to a pixel designated by index i of the BMS among boundary pixels in a neighboring block adjacent to the current block. A boundary pixel matching error is calculated by Equation (8) for each candidate motion vector PMVC in the candidate motion vector set CS using Equation (8), and a candidate motion vector for generating the minimum matching error is estimated Is selected as the predicted motion vector (PMV dec ). And is referred to as a predictive motion vector selected by the decoding apparatus 300.

즉, 도 8에서 S800 단계는, 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 각각에 대하여 부호화 장치에서 결정한 차분벡터와 해당 후보 움직임벡터를 사용하여 계산된 후보 움직임벡터가 지정하는 참조블록의 값과 부호화 장치가 계산한 움직임보상 잔차신호를 더하여 복원된 현재블록의 복원화소 중 경계 매칭 화소 인덱스 집합(BMS:Boundary Matching Set) 내의 인덱스가 지정하는 화소값; 및 현재블록에 인접하는 주변블록 내의 경계화소 중 경계 매칭 화소 인덱스 집합의 인덱스가 지정하는 화소와 인접한 화소값의 차이에 근거하여, 하나 이상의 후보 움직임벡터 각각에 대한 정합오류를 판단함수값으로 계산함으로써, 기정의된 판단함수를 수행하여 판단함수값을 계산할 수도 있다. 8, in operation S800, a difference vector determined by the encoder for each of the one or more candidate motion vectors included in the selected candidate motion vector set, and a reference block designated by the candidate motion vector calculated using the corresponding candidate motion vector And a motion compensation residual signal calculated by the encoding device, and adds the pixel value designated by the index in the boundary matching pixel index set (BMS) among the restored pixels of the restored current block; And calculating a matching error for each of the one or more candidate motion vectors as a determination function value based on a difference between a pixel designated by the index of the boundary matching pixel index set and a pixel value adjacent to the boundary pixel in the neighboring block adjacent to the current block , And the judgment function may be calculated by performing a predetermined judgment function.

도 8을 참조하여, S504 단계를 정리하면, S800 및 S802단계에서, 부호화 장치(200)는 템플릿매칭 또는 경계화소매칭 등의 정해진 결정방법에 따라 결정된 최소 정합오류를 갖는 추정 예측 움직임벡터(PMVdec)를 선택한다. Referring to FIG. 8, in step S504, in step S800 and step S802, the encoding apparatus 200 generates an estimated predicted motion vector PMV dec with a minimum matching error determined according to a predetermined determination method such as template matching or border pixel matching. ).

S804 단계에서는, 선택된 추정 예측 움직임벡터(PMVdec)와 S502 단계에서 선택한 최적 예측 움직임벡터(PMVenc)가 동일한지 여부를 비교한다. In step S804, it is determined whether or not the selected estimated predicted motion vector PMV dec is the same as the optimal predicted motion vector PMV enc selected in step S502.

S806 단계에서는, 전술한 판단 방식에 따라, 추정 예측 움직임벡터(PMVdec)와 최적 예측 움직임벡터(PMVenc)가 동일하다면 복호화 장치(300)가 현재블록의 현재 움직임벡터의 최적 예측 움직임벡터를 예측할 수 있는 것으로 판단하고, 그렇지 않은 경우에는 예측할 수 없다고 판단한다. 또한 전술한 것처럼, 추정 예측 움직임벡터(PMVdec)와 최적 예측 움직임벡터(PMVenc)가 동일하지 않더라도 각각을 이용하여 복원된 복원 영상이 동일하거나, 그 차이가 소정의 경계치보다 작은 경우는 이 두개의 추정 예측 움직임벡터(PMVdec)와 최적 예측 움직임벡터(PMVenc)가 같다고 간주하여 복호화 장치(300)가 현재블록의 현재 움직임벡터의 최적 예측 움직임벡터를 예측할 수 있는 것으로 판단할 수도 있다. In step S806, if the estimated predicted motion vector PMV dec and the best predicted motion vector PMV enc are the same, the decoding apparatus 300 predicts the best predicted motion vector of the current motion vector of the current block And if not, it is judged that it can not be predicted. Also, as described above, even if the estimated predicted motion vector PMV dec and the best predicted motion vector PMV enc are not the same, if the restored reconstructed images are the same or the difference is smaller than the predetermined threshold value, It may be determined that the decoding apparatus 300 can predict the best predicted motion vector of the current motion vector of the current block by considering that the two estimated predicted motion vectors PMV dec and the optimal predicted motion vector PMV enc are the same.

도 9은 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 제 1 부호화 단계(S506)에 대한 흐름도이다. 9 is a flowchart illustrating a first encoding step S506 in the motion vector encoding method according to an embodiment of the present invention.

도 9을 참조하면, 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 제 1 부호화 단계(S506)는, 예측가능을 지시하는 움직임벡터 예측모드를 결정하는 단계(S900); 선택된 최적 예측 움직임벡터를 현재 움직임벡터에 대한 예측 움직임벡터로 결정하는 단계(S902); 현재 움직임벡터와 선택된 최적 예측 움직임벡터의 차분벡터를 계산하는 단계(S904); 및 계산된 차분벡터 및 예측가능을 지시하는 움직임벡터 예측모드를 부호화함으로써 현재 움직임벡터를 부호화하는 단계(S906) 등을 포함한다. Referring to FIG. 9, a first coding step S506 in the motion vector coding method according to an embodiment of the present invention includes: determining (S900) a motion vector prediction mode indicating predictability; Determining a selected optimal predicted motion vector as a predicted motion vector for the current motion vector (S902); Calculating a difference vector between the current motion vector and the selected optimal predicted motion vector (S904); And coding the current motion vector by coding the calculated difference vector and the motion vector prediction mode indicating the predictability (S906).

도 10는 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 제 2 부호화 단계(S508)에 대한 흐름도이다. 10 is a flowchart of a second coding step S508 in the motion vector coding method according to an embodiment of the present invention.

도 10를 참조하면, 본 발명의 일실시예에 따른 움직임벡터 부호화 방법에서의 제 2 부호화 단계(S508)는, 예측 불가능을 지시하는 움직임벡터 예측모드를 결정하는 단계(S1000); 기설정된 디폴트 예측 움직임벡터를 현재 움직임벡터에 대한 예측 움직임벡터로 결정하는 단계(S1002); 현재 움직임벡터와 기설정된 디폴트 예측 움직임벡터의 차분벡터를 계산하는 단계(S1004); 및 계산된 차분벡터 및 예측 불가능을 지시하는 움직임벡터 예측모드를 부호화함으로써 현재 움직임벡터를 부호화하는 단계(S1006) 등을 포함한다.Referring to FIG. 10, a second encoding step S508 in the motion vector coding method according to an exemplary embodiment of the present invention includes: a step (S1000) of determining a motion vector prediction mode indicating a non-predictable motion vector; Determining a predetermined default predicted motion vector as a predicted motion vector for a current motion vector (S1002); Calculating a difference vector between a current motion vector and a preset default predicted motion vector (S1004); And coding the current motion vector by coding the calculated difference vector and the motion vector prediction mode indicating the impossible (S1006).

S1002 단계에서의 기설정된 디폴트 예측 움직임벡터는, 현재블록에 인접하는 하나 이상의 주변블록의 움직임벡터의 중간값(Median)이고, 부호화 장치(200) 및 복호화 장치(300) 간에 기설정된다. The predetermined default predicted motion vector in step S1002 is a median of a motion vector of one or more neighboring blocks adjacent to the current block and is previously set between the encoding apparatus 200 and the decoding apparatus 300. [

도 11은 본 발명의 일실시예에 따른 움직임벡터 복호화 방법에 대한 전체 흐름도이다. 11 is an overall flowchart of a motion vector decoding method according to an embodiment of the present invention.

도 11을 참조하면, 본 발명의 일실시예에 따른 움직임벡터 복호화 방법은, 현재 움직임벡터와 예측 움직임벡터 간의 차분벡터 및 현재 움직임 벡터의 움직임벡터 예측모드 정보를 복호화하는 단계(S1100); 움직임벡터 예측모드 정보에 근거하여 현재 움직임 벡터의 예측 움직임벡터를 선택하는 단계(S1102); 및 선택된 예측 움직임벡터를 이용하여 현재 움직임벡터를 복원하는 단계(S1104) 등을 포함한다. Referring to FIG. 11, a motion vector decoding method according to an embodiment of the present invention includes decoding (S1100) motion vector prediction mode information of a current vector and a difference vector between a current motion vector and a predictive motion vector; Selecting a predicted motion vector of the current motion vector based on the motion vector prediction mode information (S1102); And reconstructing a current motion vector using the selected predictive motion vector (S1104).

전술한 S1102 단계는, 움직임벡터 예측모드 정보에 의해 지시되는 움직임벡터 예측모드가 디폴트 예측모드인 경우에는, 기설정된 디폴트 예측 움직임벡터를 선택한다. In the step S1102, when the motion vector prediction mode indicated by the motion vector prediction mode information is the default prediction mode, the predetermined default predicted motion vector is selected.

전술한 S1102 단계는, 움직임벡터 예측모드 정보에 의해 지시되는 움직임벡터 예측모드가 넌-디폴트 예측 모드인 경우에는, 소정의 방법을 이용하여 복수의 후보 움직임벡터 중에서 하나의 후보 움직임벡터를 현재 움직임벡터의 예측 움직임벡터로 선택한다. In the case where the motion vector prediction mode indicated by the motion vector prediction mode information is the non-default prediction mode, in step S1102, one candidate motion vector among a plurality of candidate motion vectors is determined as a current motion vector As a predicted motion vector.

위에서 언급한 소정의 방법은, 탬플릿 매칭 및 경계화소매칭 중 하나에 기초한 방법일 수 있다. The predetermined method described above may be a method based on one of template matching and boundary pixel matching.

도 11을 참조하여 전술한 본 발명의 일실시예에 따른 움직임벡터 복호화 방법을 도 12 내지 도 13을 참조하여 더욱 상세하게 설명한다. The motion vector decoding method according to an embodiment of the present invention described above with reference to FIG. 11 will be described in more detail with reference to FIG. 12 to FIG.

도 12는 본 발명의 일실시예에 따른 움직임벡터 복호화 방법에 대한 전체 흐름도이다. 12 is an overall flowchart of a motion vector decoding method according to an embodiment of the present invention.

도 12을 참조하면, 본 발명의 일실시예에 따른 복호화 장치(300)에 의해 제공되는 움직임벡터 복호화 방법은, 부호화 장치(200)에 의해 부호화된 움직임벡터 예측모드와 부호화된 차분벡터를 복호화하는 단계(S1200); 복호화된 움직임벡터 예측모드가 예측가능을 지시하는지 예측 불가능을 지시하는지를 판단하는 단계(S1202); 복호화된 움직임벡터 예측모드가 예측가능을 지시하면, 현재블록의 현재 움직임벡터를 복원하기 위한 예측 움직임벡터로 선택가능한 후보 움직임벡터 집합을 선정하고, 선정된 후보 움직임벡터 집합에서 최적 예측 움직임벡터를 선택하며, 선택된 최적 예측 움직임 벡터를 현재 움직임벡터에 대한 예측 움직임벡터로 결정하는 단계(S1204); 복호화된 움직임벡터 예측모드가 예측 불가능을 지시하면, 기설정된 디폴트 예측 움직임벡터를 상기 현재 움직임벡터에 대한 예측 움직임벡터로 결정하는 단계(S1206); 및 S1204 단계 또는 S1206 단계에서 결정된 예측 움직임벡터와 복호화된 차분벡터를 더하여 상기 현재블록의 현재 움직임벡터를 복원하는 단계(S1208) 등을 포함한다. Referring to FIG. 12, a motion vector decoding method provided by a decoding apparatus 300 according to an embodiment of the present invention includes decoding a motion vector prediction mode and a coded differential vector coded by the coding apparatus 200 Step S1200; Determining whether the decoded motion vector prediction mode indicates predictability or impossibility of prediction (S1202); If the decoded motion vector prediction mode is predictable, a set of candidate motion vectors selectable as a prediction motion vector for restoring the current motion vector of the current block is selected, and an optimal predicted motion vector is selected from the selected candidate motion vector set (S1204) determining a selected optimal predicted motion vector as a predicted motion vector for the current motion vector; Determining a predetermined default predicted motion vector as a predicted motion vector for the current motion vector if the decoded motion vector prediction mode indicates that the predicted motion vector can not be predicted (S1206); And reconstructing the current motion vector of the current block by adding the predicted motion vector and the decoded difference vector determined in step 1204 or step 1206 (step 1208).

S1200 단계에서의 부호화된 차분벡터는, 현재 움직임벡터와 기설정된 디폴트 예측 움직임벡터의 차분벡터이거나, 현재 움직임벡터와 최적 예측 움직임벡터의 차분벡터일 수 있다. The coded difference vector in step S1200 may be a differential vector between the current motion vector and a predetermined default predicted motion vector or a difference vector between the current motion vector and the best predicted motion vector.

도 13은 본 발명의 일실시예에 따른 움직임벡터 복호화 방법에서의 제 1 예측 움직임벡터 결정 단계(S1204)에 대한 흐름도이다. 13 is a flowchart illustrating a first predicted motion vector determination step (S1204) in the motion vector decoding method according to an embodiment of the present invention.

도 13을 참조하면, 본 발명의 일실시예에 따른 움직임벡터 복호화 방법에서의 제 1 예측 움직임벡터 선택 단계(S1204)는, 현재블록의 현재 움직임벡터를 복원하기 위한 예측 움직임벡터로 선택가능한 후보 움직임벡터 집합을 선정하는 단계(S1300); 부호화 장치와 복호화 장치에서 공통적으로 정의된 판단함수를 이용하여, 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 각각에 대하여 판단함수값을 계산하는 단계(S1302); 및 계산된 판단함수값 중에서 최소값을 갖는 후보 움직임벡터를 최적 예측 움직임벡터로 선택하고, 선택된 최적 예측 움직임 벡터를 현재 움직임벡터에 대한 예측 움직임벡터로 선택하는 단계(S1304) 등을 포함한다. Referring to FIG. 13, a first predictive motion vector selection step (S1204) in the motion vector decoding method according to an exemplary embodiment of the present invention includes a candidate motion Selecting a vector set (S1300); (S1302) calculating a decision function value for each of one or more candidate motion vectors included in the selected candidate motion vector set using a decision function commonly defined by the encoder and the decoder; And selecting a candidate motion vector having a minimum value among the calculated decision function values as an optimal predicted motion vector and selecting the selected optimal predicted motion vector as a predicted motion vector for the current motion vector (S1304).

S1304 단계에서, 복호화 장치(300)가 현재 움직임벡터에 대한 예측 움직임벡터로서 결정한 최적 예측 움직임벡터는, 부호화 장치(200)에서 복호화 장치(300)가 찾을 것으로 추정한 추정 예측 움직임벡터(PMVdec)와 동일하거나 소정 경계값의 차이를 보일 수 있다. In step S1304, the optimal predicted motion vector determined by the decoding apparatus 300 as the predicted motion vector for the current motion vector is estimated as the estimated predicted motion vector PMV dec estimated by the decoding apparatus 300 to be found by the encoding apparatus 200, Or a difference of a predetermined boundary value.

S1302 단계는, 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 각각이 지정하는 참조 블록에 대해 탬플릿 매칭 화소 인덱스 집합(TMS: Template Matching Set)이 지시하는 화소들과 현재블록에 대해 상기 탬플릿 매칭 화소 인덱스가 지시하는 화소들의 화소값 차이를 계산하고, 계산된 화소값 차이에 근거하여, 하나 이상의 후보 움직임벡터 각각에 대한 정합오류를 판단함수값으로 계산함으로써, 판단함수를 수행하여 판단함수값을 계산한다. In operation S1302, the template matching unit sets the pixels indicated by the template matching pixel index set (TMS) to the reference block designated by each of the one or more candidate motion vectors included in the selected candidate motion vector set, Calculating a difference between the pixel values of the pixels indicated by the matching pixel index and calculating a matching error for each of the one or more candidate motion vectors based on the calculated pixel value difference as a judgment function value, .

또한 S1302 단계는, 선정된 후보 움직임벡터 집합에 포함된 하나 이상의 후보 움직임벡터 각각에 대하여 부호화 장치에서 결정한 차분벡터와 해당 후보 움직임벡터를 사용하여 계산된 후보 움직임벡터가 지정하는 참조블록의 값과 상기 부호화 장치가 계산한 움직임보상 잔차신호를 더하여 복원된 현재블록의 복원화소 중 경계 매칭 화소 인덱스 집합(BMS:Boundary Matching Set) 내의 인덱스가 지정하는 화소값; 및 현재블록에 인접하는 주변블록 내의 경계화소 중 경계 매칭 화소 인덱스 집합의 인덱스가 지정하는 화소와 인접한 화소값의 차이에 근거하여, 하나 이상의 후보 움직임벡터 각각에 대한 정합오류를 판단함수값으로 계산함으로써, 판단함수를 수행하여 판단함수값을 계산한다. In step S1302, a difference between a value of a reference block designated by the candidate motion vector calculated using the difference vector determined by the encoder and the candidate motion vector for each of the one or more candidate motion vectors included in the selected candidate motion vector set, A pixel value designated by an index in a boundary matching pixel index set (BMS) among restored pixels of a restored current block by adding a motion compensation residual signal calculated by an encoding device; And calculating a matching error for each of the one or more candidate motion vectors as a determination function value based on a difference between a pixel designated by the index of the boundary matching pixel index set and a pixel value adjacent to the boundary pixel in the neighboring block adjacent to the current block , And a judgment function is performed to calculate a judgment function value.

도 4 내지 도 12에 도시된 흐름도에서의 각 단계 순서는 본 발명의 본질적인 특성을 설명하기 위한 일 실시예로서의 순서에 불구하며, 본 발명의 본질적인 특성을 벗어나지 않는 범위 내에서 각 단계의 순서는 변경하여 구현할 수도 있을 것이다. It should be understood that the order of steps in the flowcharts shown in FIGS. 4 to 12 is not intended to be in the order of an embodiment for describing the essential characteristics of the present invention, and the order of each step may be changed within the scope of the present invention It can also be implemented.

전술한 본 발명의 일 실시예에 따르면, 움직임벡터 예측모드는 디폴트 예측 모드와 넌-디폴트(non-default) 예측 모드를 포함한다. 디폴트 예측 모드의 일 예로서 최적 예측 움직임벡터의 예측 불가능을 나타내는 움직임벡터 예측모드가 설명되었고 넌-디폴트 예측 모드의 일 예로서 최적 예측 움직임벡터의 예측 가능을 나타내는 움직임벡터 예측모드가 설명되었다. According to an embodiment of the present invention, the motion vector prediction mode includes a default prediction mode and a non-default prediction mode. As an example of the default prediction mode, a motion vector prediction mode indicating the impossibility of prediction of the best predicted motion vector has been described, and a motion vector prediction mode indicating the predictability of the best predicted motion vector has been described as an example of the non-default prediction mode.

여기서 최적 예측 움직임벡터라 함은 전술한 실시예에서 설명한 바와 같은 미리 정해진 기준 또는 방법에 따라 유한한 개수의 예측 움직임벡터 후보들 중에서 선택된 예측 움직임벡터를 의미하는 것이다.Here, the optimal predicted motion vector means a predicted motion vector selected from a finite number of predicted motion vector candidates according to a predetermined reference or method as described in the above-described embodiment.

본 발명의 다른 측면에 따르면 넌-디폴트 예측 모드는 디폴트 예측 움직임벡터가 아닌 다른 예측 움직임벡터를 미리 정해진 소정 방법에 따라 선택한 후 현재 움직임벡터의 부호화 및/또는 복호화에 이용하는 모드로 이해될 수 있다. 이 경우, 전술한 바와 같은 복수의 예측 움직임 벡터 후보들 중에서 소정 방법에 의해 예측 움직임벡터가 선택될 수 있다.전술한 본 발명의 일 실시예에 따른 움직임벡터 부호화 및 복호화 방법에 따르면, 움직임벡터 예측 모드를 선택할 수 있도록 함으로써 현재 움직임벡터의 값에 보다 가까운 움직임벡터를 예측 움직임벡터로 선택하여 차분벡터의 부호화 비트량을 최소화함으로써, 부호화 효율을 향상시키는 효과가 있다. According to another aspect of the present invention, the non-default prediction mode can be understood as a mode for selecting a predictive motion vector other than the default predictive motion vector according to a predetermined predetermined method, and then using the predictive motion vector for encoding and / or decoding the current motion vector. In this case, a predictive motion vector may be selected from a plurality of predictive motion vector candidates as described above by a predetermined method. According to the above-described motion vector encoding and decoding method of the present invention, So that the coding efficiency can be improved by selecting the motion vector that is closer to the value of the current motion vector as the prediction motion vector to minimize the amount of coding bits of the difference vector.

또한, 본 발명의 일 실시예에 따른 움직임벡터 부호화 및 복호화 방법에 따르면, 더욱 정확한 예측 움직임벡터를 선택하여 부호화 효율을 향상시키면서도, 부호화 장치는 선택된 예측 움직임벡터를 직접 복호화 장치로 알리지 않고, 찾을 수 있도록 정보, 예컨대 움직임벡터 예측모드정보를 주거나 찾기 위한 함수를 공유함으로써, 예측 움직임벡터를 알리기 위해 발생하는 추가적인 정보에 대한 부호화 비트량 증가를 줄여줌으로써, 부호화 효율 및 복호화 효율을 더욱더 향상시키는 효과가 있다.Also, according to the motion vector encoding and decoding method of the present invention, it is possible to improve the coding efficiency by selecting a more accurate predictive motion vector, and at the same time, For example, by sharing a function for giving or searching for motion vector prediction mode information, the coding efficiency and the decoding efficiency are further improved by reducing the increase in the amount of coding bits for additional information generated for informing the prediction motion vector .

또한, 본 발명의 움직임벡터 부호화 및 복호화 기술을 영상 서비스 또는 멀티미디어 스트리밍 서비스에 적용하면, 본 발명에 따른 부호화 기술은 적은 비트량으로 부호화를 가능하게 함으로써, 사용자에게 만족도 높은 서비스를 제공해줄 수 있다. 특히, 유선 환경에 비해 상대적으로 작은 대역폭, 큰 데이터 손실 및 지연 등을 가질 수 있는 무선 이동 환경에서는 더욱더 큰 효과를 기대할 수 있다. In addition, when the motion vector encoding and decoding technique of the present invention is applied to a video service or a multimedia streaming service, the encoding technique according to the present invention enables encoding with a small bit amount, thereby providing a high-satisfaction service to the user. Especially, in a wireless mobile environment, which can have a relatively small bandwidth, large data loss and delay compared with a wired environment, a further greater effect can be expected.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The foregoing description is merely illustrative of the technical idea of the present invention, and various changes and modifications may be made by those skilled in the art without departing from the essential characteristics of the present invention. Therefore, the embodiments disclosed in the present invention are intended to illustrate rather than limit the scope of the present invention, and the scope of the technical idea of the present invention is not limited by these embodiments. The scope of protection of the present invention should be construed according to the following claims, and all technical ideas within the scope of equivalents should be construed as falling within the scope of the present invention.

이상 설명한 바와 같이, 본 발명은 움직임벡터 부호화 및 복호화 기술에 적용되어, 현재 움직임벡터와 차이를 최소화하는 움직임벡터를 예측 움직임벡터로 선택하고, 선택된 예측 움직임벡터를 직접 복호화 장치로 알리지 않고, 찾을 수 있도록 정보를 주거나 찾기 위한 소정의 함수를 공유함으로써, 부호화 비트량 줄여주어 부호화 효율 및 복호화 효율을 향상시키는 효과가 있는 매우 유용한 발명이다. As described above, the present invention is applied to a motion vector coding and decoding technique to select a motion vector that minimizes a difference between a current motion vector and a current motion vector as a predicted motion vector, Therefore, it is a very useful invention that has the effect of reducing coding bit amount and improving coding efficiency and decoding efficiency.

200: 움직임벡터 부호화 장치
210: 예측 움직임벡터 선택부
220: 움직임벡터 예측모드 결정부
230: 제 1 부호화부
240: 제 2 부호화부
300: 움직임벡터 복호화 장치
310: 움직임벡터 예측모드/차분벡터 복호화부
320: 움직임벡터 예측모드 판단부
330: 제 1 예측 움직임벡터 결정부
340: 제 2 예측 움직임벡터 결정부
350: 현재 움직임벡터 복원부
200: motion vector coding device
210: predictive motion vector selection unit
220: a motion vector prediction mode determining unit
230: first encoding unit
240: second encoding unit
300: motion vector decoding device
310: a motion vector prediction mode / differential vector decoding unit
320: a motion vector prediction mode determination unit
330: a first predicted motion vector determination unit
340: a second predicted motion vector determining unit
350: current motion vector restoration unit

Claims (4)

현재 블록의 움직임 벡터를 복원하기 위한 영상 복호화 방법에 있어서,
비트스트림으로부터, 서로 다른 방식으로 상기 현재 블록의 움직임 벡터를 결정하는 복수의 모드 중에서 하나의 모드를 선택하기 위해 사용되는 모드 정보를 추출하는 단계;
상기 모드 정보가 복수의 후보 움직임 벡터 중에서 상기 현재 블록의 움직임 벡터에 대한 예측 움직임 벡터를 선택하는 제 1 모드를 지시하면, 상기 현재 블록의 복수의 주변 블록들의 움직임 벡터들에 근거하여 상기 예측 움직임 벡터에 대한 복수의 후보 움직임 벡터들을 선정하는 단계;
상기 복수의 후보 움직임 벡터들 중에서 상기 예측 움직임 벡터로 사용할 하나의 후보 움직임 벡터를 선택하는 단계;
상기 선택된 후보 움직임 벡터를 상기 예측 움직임 벡터로 설정하는 단계;
상기 비트스트림으로부터 차분벡터를 복호화하는 단계; 및
상기 설정된 예측 움직임 벡터와 상기 복호화된 차분벡터를 이용하여 상기 현재 블록의 움직임 벡터를 복원하는 단계를 포함하되,
상기 복수의 주변 블록들은 상기 현재 블록이 포함된 제1픽처에 위치하는 적어도 하나의 제1블록 또는 상기 현재 블록이 포함된 상기 제1픽처와는 다른 제2픽처에 위치하는 적어도 하나의 제2블록 또는 상기 제1블록과 상기 제2블록을 포함하는 블록들 중에서 선택되고,
상기 제2픽처 내에서 상기 제2블록의 위치는 상기 제1픽처 내에서 상기 현재 블록의 위치에 근거하여 결정되는 것을 특징으로 하는 영상 복호화 방법.
An image decoding method for restoring a motion vector of a current block,
Extracting, from a bitstream, mode information used for selecting one of a plurality of modes for determining a motion vector of the current block in a different manner;
Wherein if the mode information indicates a first mode for selecting a predictive motion vector for a motion vector of the current block from among a plurality of candidate motion vectors, Selecting a plurality of candidate motion vectors for the motion vector;
Selecting one candidate motion vector to be used as the predictive motion vector among the plurality of candidate motion vectors;
Setting the selected candidate motion vector to the predicted motion vector;
Decoding the differential vector from the bitstream; And
And restoring the motion vector of the current block using the set predictive motion vector and the decoded differential vector,
Wherein the plurality of neighboring blocks include at least one first block located in a first picture including the current block or at least one second block located in a second picture different from the first picture including the current block, Or a block including the first block and the second block,
Wherein the position of the second block in the second picture is determined based on the position of the current block in the first picture.
삭제delete 제1항에 있어서,
상기 복수의 후보 움직임 벡터들 중에서 상기 예측 움직임 벡터로 사용할 하나의 후보 움직임 벡터를 선택하는 단계는,
상기 비트스트림에 포함된 정보에 근거하여 상기 하나의 후보 움직임 벡터를 선택하는 것을 특징으로 하는 영상 복호화 방법.
The method according to claim 1,
Wherein the step of selecting one candidate motion vector to be used as the predictive motion vector among the plurality of candidate motion vectors comprises:
Wherein the one candidate motion vector is selected based on information included in the bitstream.
제1항에 있어서,
상기 복호화된 모드 정보가 상기 현재 블록의 움직임 벡터를 복원하기 위해 기설정된 움직임벡터를 이용하는 제2모드를 지시하면, 기설정된 움직임벡터를 이용하여 상기 현재 블록의 움직임 벡터를 복원하는 단계를 더 포함하는 것을 특징으로 하는 영상 복호화 방법.


The method according to claim 1,
If the decoded mode information indicates a second mode using a predetermined motion vector to recover a motion vector of the current block, restoring the motion vector of the current block using a predetermined motion vector And decodes the decoded image.


KR1020140000905A 2014-01-03 2014-01-03 Method and Apparatus for Encoding and Decoding Motion Vector KR101567964B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140000905A KR101567964B1 (en) 2014-01-03 2014-01-03 Method and Apparatus for Encoding and Decoding Motion Vector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140000905A KR101567964B1 (en) 2014-01-03 2014-01-03 Method and Apparatus for Encoding and Decoding Motion Vector

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020080060838A Division KR101364195B1 (en) 2008-06-26 2008-06-26 Method and Apparatus for Encoding and Decoding Motion Vector

Publications (2)

Publication Number Publication Date
KR20140026580A KR20140026580A (en) 2014-03-05
KR101567964B1 true KR101567964B1 (en) 2015-11-11

Family

ID=50641059

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140000905A KR101567964B1 (en) 2014-01-03 2014-01-03 Method and Apparatus for Encoding and Decoding Motion Vector

Country Status (1)

Country Link
KR (1) KR101567964B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MX2017005651A (en) 2014-10-31 2017-06-29 Samsung Electronics Co Ltd Video encoding device and video decoding device using high-precision skip encoding and method thereof.

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050053136A1 (en) * 2003-09-09 2005-03-10 Keman Yu Low complexity real-time video coding
US20060285596A1 (en) * 2004-03-01 2006-12-21 Sony Corporation Motion-vector detecting device, motion-vector detecting method, and computer program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050053136A1 (en) * 2003-09-09 2005-03-10 Keman Yu Low complexity real-time video coding
US20060285596A1 (en) * 2004-03-01 2006-12-21 Sony Corporation Motion-vector detecting device, motion-vector detecting method, and computer program

Also Published As

Publication number Publication date
KR20140026580A (en) 2014-03-05

Similar Documents

Publication Publication Date Title
KR101364195B1 (en) Method and Apparatus for Encoding and Decoding Motion Vector
CN110581994B (en) Fractional cost calculation
KR101590511B1 (en) / / Motion Vector Coding Method and Apparatus
US9369731B2 (en) Method and apparatus for estimating motion vector using plurality of motion vector predictors, encoder, decoder, and decoding method
CN108235032B (en) Moving picture decoding device and moving picture decoding method
TWI653878B (en) Motion picture decoding device, motion picture decoding method, and recording medium recorded with motion picture decoding program
US8204127B2 (en) Method and apparatus for encoding and decoding image by using multiple reference-based motion prediction
US8229233B2 (en) Method and apparatus for estimating and compensating spatiotemporal motion of image
US20220272346A1 (en) Image encoding/decoding method and device for performing prof, and method for transmitting bitstream
TW201342933A (en) Video encoding device, video encoding method and video encoding program, and video decoding device, video decoding method and video decoding program
JP5725106B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
KR20120025111A (en) Intra prediction encoding/decoding apparatus and method capable of skipping prediction mode information using the characteristics of reference pixels
KR101567964B1 (en) Method and Apparatus for Encoding and Decoding Motion Vector
KR101567963B1 (en) Method and Apparatus for Encoding and Decoding Motion Vector
KR101544390B1 (en) Method and Apparatus for Encoding and Decoding Motion Vector
EP2605518B1 (en) Encoding device, decoding device, encoding method, and decoding method
KR101567990B1 (en) Method and Apparatus for Encoding and Decoding Motion Vector
JP5880758B2 (en) Moving picture decoding apparatus, moving picture decoding method, moving picture decoding program, receiving apparatus, receiving method, and receiving program
KR101582495B1 (en) Motion Vector Coding Method and Apparatus
KR101582493B1 (en) Motion Vector Coding Method and Apparatus
KR101422058B1 (en) Motion Vector Coding Method and Apparatus
KR101590875B1 (en) Method and appratus for encoding images using motion prediction by multiple reference, and method and apparatus for decoding images using motion prediction by multiple reference
KR101575616B1 (en) Method and Apparatus for Encoding and Decoding Motion Vector in Plural Number of Reference Pictures and Video Encoding/Decoding Method and Apparatus Using Same
KR101575645B1 (en) Method and Apparatus for Encoding and Decoding Motion Vector in Plural Number of Reference Pictures and Video Encoding/Decoding Method and Apparatus Using Same

Legal Events

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

Payment date: 20181105

Year of fee payment: 4