KR101316710B1 - Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus - Google Patents

Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus Download PDF

Info

Publication number
KR101316710B1
KR101316710B1 KR1020130052711A KR20130052711A KR101316710B1 KR 101316710 B1 KR101316710 B1 KR 101316710B1 KR 1020130052711 A KR1020130052711 A KR 1020130052711A KR 20130052711 A KR20130052711 A KR 20130052711A KR 101316710 B1 KR101316710 B1 KR 101316710B1
Authority
KR
South Korea
Prior art keywords
motion vector
prediction
prediction candidate
block
component
Prior art date
Application number
KR1020130052711A
Other languages
Korean (ko)
Other versions
KR20130069681A (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 KR1020130052711A priority Critical patent/KR101316710B1/en
Publication of KR20130069681A publication Critical patent/KR20130069681A/en
Application granted granted Critical
Publication of KR101316710B1 publication Critical patent/KR101316710B1/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
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/196Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding being specially adapted for the computation of encoding parameters, e.g. by averaging previously computed encoding parameters

Abstract

본 발명은 움직임 벡터 부호화 방법 및 장치와 그를 이용한 영상 부호화/복호화 방법 및 장치에 관한 것이다.
본 발명은 움직임 벡터를 부호화하는 장치에 있어서, 하나 이상의 움직임 벡터 예측 후보를 선택하는 예측 후보 선택기; 하나 이상의 움직임 벡터 예측 후보 중에서 예측 움직임 벡터를 결정하는 예측 움직임 벡터 결정기; 및 현재 움직임 벡터에서 결정된 예측 움직임 벡터를 감산하여 차분 벡터를 계산하고 부호화하는 차분 벡터 부호화기를 포함하는 것을 특징으로 하는 움직임 벡터 부호화 장치를 제공한다.
본 발명에 의하면, 더욱 정확하게 예측된 예측 움직임 벡터를 이용하여 움직임 벡터를 부호화하면서도 예측 움직임 벡터에 대한 정보를 부호화하기 위한 비트량을 줄여 압축 효율을 향상시킬 수 있다.
The present invention relates to a motion vector encoding method and apparatus, and an image encoding / decoding method and apparatus using the same.
An apparatus for encoding a motion vector, the present invention comprising: a prediction candidate selector for selecting one or more motion vector prediction candidates; A predicted motion vector determiner that determines a predicted motion vector among the one or more motion vector prediction candidates; And a difference vector encoder that calculates and encodes a difference vector by subtracting a predicted motion vector determined from a current motion vector.
According to the present invention, the compression efficiency can be improved by reducing the amount of bits for encoding the information on the predicted motion vector while encoding the motion vector using the predicted motion vector more accurately.

Description

움직임 벡터 부호화 방법 및 장치와 그를 이용한 영상 부호화/복호화 방법 및 장치{Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus}Motion Vector Encoding Method and Apparatus and Image Encoding / Decoding Method and Apparatus Using Them {Motion Vector Encoding / Decoding Method and Apparatus and Video Encoding / Decoding Method and Apparatus}

본 발명은 움직임 벡터 부호화 방법 및 장치와 그를 이용한 영상 부호화/복호화 방법 및 장치에 관한 것이다. 더욱 상세하게는, 현재 부호화를 수행할 블록 이전에 부호화되고 복호화되어 복원된 화소를 이용하여 인터 예측을 수행하고 인터 예측에 이용한 움직임 벡터를 효율적으로 부호화하거나 복호화하고 그를 이용하여 정지 영상 또는 동영상의 데이터를 부호화하거나 복호화하는 방법 및 장치에 관한 것이다.The present invention relates to a motion vector coding method and apparatus, and a method and apparatus for image coding / decoding using the same. More specifically, inter prediction is performed by using a pixel that is encoded, decoded, and reconstructed before a block to be currently encoded, and efficiently encodes or decodes a motion vector used for inter prediction, and uses the data of a still image or a moving image. It relates to a method and apparatus for encoding or decoding.

영상 신호를 효율적으로 압축하기 위한 방법으로서 정지화상으로는 JPEG, JPEG-2000, 동영상에서는 H.261, H.263, MPEG-2, MPEG-4 등이 있다. 또한, MPEG-2, MPEG-4 등의 기술을 계승하면서 더욱 향상된 압축 효율을 제공하는 MPEG-4 AVC(Advanced Video Coding)가 ISO(국제 표준화 기구)에 의해서 2003년에 표준 규격화되어 있다.As a method for efficiently compressing a video signal, there are JPEG, JPEG-2000, H.261, H.263, MPEG-2, MPEG-4, etc. for still images. In addition, MPEG-4 AVC (Advanced Video Coding) has been standardized in 2003 by the International Organization for Standardization (ISO), which provides further improved compression efficiency while inheriting technologies such as MPEG-2 and MPEG-4.

동영상에 대한 데이터의 부호화는 인트라 예측 부호화와 인터 예측 부호화로 성립되어 있다. 이러한 인트라 예측 부호화 또는 인터 예측 부호화는 데이터 간에 존재하는 상관도(Correlation)를 줄일 수 있는 효과적인 방법으로 다양한 데이터의 압축에 널리 사용된다. 특히, 인터 예측 부호화에서 현재 부호화하고자 하는 현재 블록의 움직임을 추정하여 결정되는 현재 블록의 움직임 벡터는 주변 블록의 움직임 벡터와 밀접한 상관 관계가 있기 때문에, 주변 블록의 움직임 벡터로부터 현재 블록의 움직임 벡터에 대한 예측값(PMV: Predicted Motion Vector, 이하 '예측 움직임 벡터'라 칭함)을 계산한 후 현재 블록의 움직임 벡터의 값 자체를 부호화하지 않고 예측값에 대한 차분값(DMV: Differential Motion Vector, 이하 '차분 벡터'라 칭함)만을 부호화함으로써 부호화해야 할 비트량을 상당히 줄일 수 있으며 그에 따라 부호화 효율을 높일 수 있다.The encoding of data for a video is made up of intra prediction encoding and inter prediction encoding. Such intra prediction encoding or inter prediction encoding is widely used for compressing various data in an effective way to reduce correlation between data. In particular, since the motion vector of the current block determined by estimating the motion of the current block to be currently encoded by inter prediction encoding is closely correlated with the motion vector of the neighboring block, the motion vector of the neighboring block is determined from the motion vector of the current block. After calculating the predicted motion vector (PMV: Predicted Motion Vector), the differential value of the predicted value (DMV: Differential Motion Vector) is calculated without encoding the value of the motion vector of the current block itself. By coding only '), the amount of bits to be encoded can be significantly reduced, thereby improving the coding efficiency.

즉, MPEG-4 AVC와 같은 기존의 대부분의 영상 압축 표준들은 인터 예측 부호화를 수행하는 경우, 부호화기는 이전에 부호화되고 복호화되어 복원된 참조 프레임에서 현재 블록의 움직임을 추정하여 결정한 예측 움직임 벡터와 현재 움직임 벡터와의 차분값인 차분 벡터만을 부호화하여 전송한다. 복호화기도 미리 복호화된 주위의 블록의 움직임 벡터를 이용하여 현재 블록의 움직임 벡터를 예측하여 전송된 차분 벡터와 예측 움직임 벡터를 더하여 현재 움직임 벡터를 복원한다.That is, in most existing image compression standards such as MPEG-4 AVC, when performing inter prediction encoding, the encoder estimates the motion of the current block in a previously encoded, decoded and reconstructed reference frame, and determines the current motion vector and the current. Only the difference vector, which is the difference with the motion vector, is encoded and transmitted. The decoder also predicts the motion vector of the current block by using the motion vector of the neighboring block previously decoded, and reconstructs the current motion vector by adding the transmitted difference vector and the predicted motion vector.

하지만, 전술한 바와 같은 기존의 영상 압축 표준들에 따라 움직임 벡터를 부호화하게 되면, 예측 움직임 벡터가 현재 움직임 벡터와 상관성이 없을 경우 차분 벡터가 커지므로, 발생하는 비트량이 증가하여 압축 효율을 저하할 뿐만 아니라, 차분 벡터를 줄이기 위해 부호화기에서 예측 움직임 벡터에 대한 정보를 추가로 부호화하는 경우에도, 추가 정보를 부호화하는 데에 따른 비트량이 증가하여 압축 효율을 저하하는 문제점이 있다.However, if the motion vector is encoded according to the existing image compression standards as described above, the difference vector increases when the predicted motion vector is not correlated with the current motion vector. In addition, even when the encoder additionally encodes information on the predictive motion vector in order to reduce the difference vector, there is a problem in that the bit amount due to encoding the additional information is increased to reduce the compression efficiency.

전술한 문제점을 해결하기 위해 본 발명은, 더욱 정확하게 예측된 예측 움직임 벡터를 이용하여 움직임 벡터를 부호화하면서도 예측 움직임 벡터에 대한 정보를 부호화하기 위한 비트량을 줄여 압축 효율을 향상시키는 데 주된 목적이 있다.In order to solve the above-described problems, the present invention has a main purpose of improving a compression efficiency by reducing a bit amount for coding information on a predictive motion vector, while encoding a motion vector using a more precisely predicted motion vector .

전술한 목적을 달성하기 위해 본 발명의 일 측면은, 현재 블록의 움직임 벡터인 현재 움직임 벡터를 부호화하는 장치에 있어서, 상기 현재 움직임 벡터를 예측하기 위한 움직임 벡터 예측 후보를 선택하는 예측 후보 선택기; 상기 움직임 벡터 예측 후보로부터 예측 움직임 벡터를 결정하는 예측 움직임 벡터 결정기; 및 상기 현재 움직임 벡터에서 상기 예측 움직임 벡터를 감산하여 차분 벡터를 계산하고, 상기 결정된 예측 움직임 벡터를 식별하기 위한 예측 후보 식별 정보 및 상기 차분 벡터를 부호화하는 부호화기를 포함하며, 상기 예측 후보 선택기는, 상기 현재 블록의 주변 블록으로부터 제1 움직임 벡터 예측 후보를 선택하는 모듈과, 참조 프레임에서 상기 현재 블록과 동일한 위치에 있는 대응 블록 또는 상기 대응 블록의 주변 블록으로부터 제2 움직임 벡터 예측 후보를 선택하는 모듈을 포함하는 것을 특징으로 하는 움직임 벡터 부호화 장치를 제공한다.According to an aspect of the present invention, there is provided an apparatus for encoding a current motion vector, which is a motion vector of a current block, comprising: a prediction candidate selector for selecting a motion vector prediction candidate for predicting the current motion vector; A predicted motion vector determiner that determines a predicted motion vector from the motion vector prediction candidate; And an encoder that calculates a difference vector by subtracting the prediction motion vector from the current motion vector, and encodes prediction candidate identification information and the difference vector for identifying the determined prediction motion vector, wherein the prediction candidate selector includes: A module for selecting a first motion vector prediction candidate from a neighboring block of the current block, and a module for selecting a second motion vector prediction candidate from a corresponding block at the same position as the current block or a neighboring block of the corresponding block in a reference frame It provides a motion vector encoding apparatus comprising a.

본 발명의 또 다른 측면은, 현재 블록의 움직임 벡터인 현재 움직임 벡터를 부호화하는 방법에 있어서, 상기 현재 움직임 벡터를 예측하기 위한 움직임 벡터 예측 후보를 선택하는 단계; 상기 움직임 벡터 예측 후보로부터 예측 움직임 벡터를 결정하는 단계; 및 상기 현재 움직임 벡터에서 상기 예측 움직임 벡터를 감산하여 차분 벡터를 계산하고, 상기 결정된 예측 움직임 벡터를 식별하기 위한 예측 후보 식별 정보 및 상기 차분 벡터를 부호화하는 단계를 포함하고, 상기 움직임 벡터 예측 후보 선택 단계는, 상기 현재 블록의 주변 블록에서 제1 움직임 벡터 예측 후보를 선택하는 단계와, 참조 프레임에서 상기 현재 블록과 동일한 위치에 있는 대응 블록 또는 상기 대응 블록의 주변 블록에서 제2 움직임 벡터 예측 후보를 선택하는 단계를 포함하는 것을 특징으로 하는 움직임 벡터 부호화 방법을 제공한다.Another aspect of the present invention provides a method of encoding a current motion vector, which is a motion vector of a current block, comprising: selecting a motion vector prediction candidate for predicting the current motion vector; Determining a prediction motion vector from the motion vector prediction candidate; And calculating the difference vector by subtracting the prediction motion vector from the current motion vector, and encoding the prediction candidate identification information and the difference vector for identifying the determined prediction motion vector, and selecting the motion vector prediction candidate. The method may include selecting a first motion vector prediction candidate in a neighboring block of the current block, and selecting a second motion vector prediction candidate in a corresponding block at the same position as the current block or a neighboring block of the corresponding block in a reference frame. It provides a motion vector encoding method comprising the step of selecting.

본 발명의 또 다른 측면은, 현재 블록의 현재 움직임 벡터를 복호화하는 장치에 있어서, 비트스트림으로부터 차분 벡터와 예측 후보 식별 정보를 복원하는 복호화기; 및 상기 현재 움직임 벡터를 예측하기 위한 움직임 벡터 예측 후보를 선택하고, 상기 움직임 벡터 예측 후보 중에서 상기 예측 후보 식별 정보에 의해 식별되는 움직임 벡터 예측 부호를 예측 움직임 벡터로 결정하고 상기 예측 움직임 벡터와 상기 차분 벡터를 가산하여 현재 블록의 현재 움직임 벡터를 복원하는 움직임 벡터 복원기를 포함하고, 상기 움직임 벡터 복원기는, 상기 현재 블록의 주변 블록으로부터 제1 움직임 벡터 예측 후보를 선택하는 모듈과, 참조 프레임에서 상기 현재 블록과 동일한 위치에 있는 대응 블록 또는 상기 대응 블록의 주변 블록으로부터 제2 움직임 벡터 예측 후보를 선택하는 모듈을 포함하는 것을 특징으로 하는 움직임 벡터 복호화 장치를 제공한다.According to still another aspect of the present invention, there is provided an apparatus for decoding a current motion vector of a current block, comprising: a decoder for reconstructing a difference vector and prediction candidate identification information from a bitstream; And selecting a motion vector prediction candidate for predicting the current motion vector, determining a motion vector prediction code identified by the prediction candidate identification information among the motion vector prediction candidates as a prediction motion vector, and determining the difference with the prediction motion vector. A motion vector decompressor for adding a vector to reconstruct a current motion vector of the current block, wherein the motion vector decompressor comprises: a module for selecting a first motion vector prediction candidate from a neighboring block of the current block; And a module for selecting a second motion vector prediction candidate from a corresponding block located at the same position as the block or a neighboring block of the corresponding block.

본 발명의 또 다른 측면은, 현재 블록의 현재 움직임 벡터를 복호화하는 방법에 있어서, 비트스트림으로부터 차분 벡터를 복원하는 단계; 상기 현재 움직임 벡터를 예측하기 위한 움직임 벡터 예측 후보를 선택하는 단계; 상기 비트스트림으로부터 예측 후보 식별 정보를 복원하는 단계; 상기 움직임 벡터 예측 후보 중에서 상기 예측 후보 식별 정보에 의해 식별되는 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정하는 단계; 및 상기 예측 움직임 벡터와 상기 차분 벡터를 가산하여 현재 블록의 현재 움직임 벡터를 복원하는 단계를 포함하고, 상기 움직임 벡터 예측 후보 선택 단계는, 상기 현재 블록의 주변 블록으로부터 제1 움직임 벡터 예측 후보를 선택하는 단계와, 참조 프레임에서 상기 현재 블록과 동일한 위치에 있는 대응 블록 또는 상기 대응 블록의 주변 블록으로부터 제2 움직임 벡터 예측 후보를 선택하는 단계를 포함하는 것을 특징으로 하는 움직임 벡터 복호화 방법을 제공한다.Another aspect of the present invention is a method of decoding a current motion vector of a current block, comprising: reconstructing a difference vector from a bitstream; Selecting a motion vector prediction candidate for predicting the current motion vector; Restoring prediction candidate identification information from the bitstream; Determining a motion vector prediction candidate identified by the prediction candidate identification information among the motion vector prediction candidates as a prediction motion vector; And reconstructing the current motion vector of the current block by adding the prediction motion vector and the difference vector, wherein the selecting of the motion vector prediction candidate comprises selecting a first motion vector prediction candidate from a neighboring block of the current block. And selecting a second motion vector prediction candidate from a corresponding block at the same position as the current block or a neighboring block of the corresponding block in a reference frame.

이상에서 설명한 바와 같이 본 발명에 의하면, 더욱 정확하게 예측된 예측 움직임 벡터를 이용하여 움직임 벡터를 부호화하면서도 예측 움직임 벡터에 대한 정보를 부호화하기 위한 비트량을 줄여 압축 효율을 향상시킬 수 있다.As described above, according to the present invention, the compression efficiency can be improved by reducing the amount of bits for encoding information on the predicted motion vector while encoding the motion vector using the predicted motion vector more accurately.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치를 간략하게 나타낸 블록 구성도,
도 2는 본 발명의 일 실시예에 따른 움직임 벡터 부호화 장치를 간략하게 나타낸 블록 구성도,
도 3은 지그재그 스캔 방향을 나타낸 예시도,
도 4는 현재 블록의 주변 블록을 나타낸 예시도,
도 5는 현재 프레임의 현재 블록과 주변 블록을 나타낸 예시도,
도 6은 현재 프레임과 참조 프레임의 블록들을 예시적으로 나타낸 예시도,
도 7은 지시 벡터를 설명하기 위한 예시도,
도 8은 임계값을 계산하는 과정을 설명하기 위한 예시도,
도 9는 움직임 벡터 예측 후보와 현재 움직임 벡터를 각 컴포넌트별로 분리하여 나타낸 예시도,
도 10은 복수 개의 임계값에 따른 예측 후보 식별 플래그를 나타낸 예시도,
도 11은 예측 후보 식별 플래그의 전송 비트를 나타낸 예시도,
도 12는 본 발명의 일 실시예에 따른 움직임 벡터 부호화 방법을 설명하기 위한 순서도,
도 13은 본 발명의 일 실시예에 따른 영상 부호화 방법을 설명하기 위한 순서도,
도 14는 본 발명의 일 실시예에 따른 영상 복호화 장치를 간략하게 나타낸 블록 구성도,
도 15는 본 발명의 일 실시예에 따른 움직임 벡터 복호화 장치를 간략하게 나타낸 블록 구성도,
도 16은 본 발명의 일 실시예에 따른 움직임 벡터 복호화 방법을 설명하기 위한 순서도,
도 17은 본 발명의 일 실시예에 따른 영상 복호화 방법을 설명하기 위한 순서도이다.
1 is a block diagram schematically illustrating an image encoding apparatus according to an embodiment of the present invention.
2 is a block diagram schematically showing a motion vector coding apparatus according to an embodiment of the present invention.
3 is an exemplary diagram showing a zigzag scan direction;
4 is an exemplary diagram illustrating a neighboring block of a current block;
5 is an exemplary diagram illustrating a current block and a neighboring block of a current frame;
6 is an exemplary diagram illustrating blocks of a current frame and a reference frame by way of example;
7 is an exemplary diagram for explaining an instruction vector;
8 is an exemplary diagram for explaining a process of calculating a threshold value;
9 is an exemplary diagram illustrating a motion vector prediction candidate and a current motion vector separated for each component;
10 is an exemplary diagram illustrating a prediction candidate identification flag according to a plurality of thresholds;
11 shows an example of transmission bits of a prediction candidate identification flag;
12 is a flowchart illustrating a motion vector encoding method according to an embodiment of the present invention;
13 is a flowchart illustrating a video encoding method according to an embodiment of the present invention;
14 is a block diagram schematically illustrating an image decoding apparatus according to an embodiment of the present invention;
15 is a block diagram schematically illustrating a motion vector decoding apparatus according to an embodiment of the present invention;
16 is a flowchart for explaining a motion vector decoding method according to an embodiment of the present invention;
17 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

이하, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail with reference to exemplary drawings. In adding reference numerals to the components of each drawing, it should be noted that the same reference numerals are assigned to the same components as much as possible even though they are shown in different 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 rather unclear.

또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In addition, in describing the component of this invention, terms, such as 1st, 2nd, A, B, (a), (b), can be used. These terms are intended to distinguish the constituent elements from other constituent elements, and the terms do not limit the nature, order or order of the constituent elements. When a component is described as being "connected", "coupled", or "connected" to another component, the component may be directly connected or connected to the other component, Quot; may be "connected," "coupled," or "connected. &Quot;

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치를 간략하게 나타낸 블록 구성도이다.1 is a block diagram schematically illustrating an image encoding apparatus according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 부호화 장치(100)는 예측기(110), 감산기(120), 변환기(130), 양자화기(140), 부호화기(150), 역 양자화기(160), 역 변환기(170), 가산기(180) 및 메모리(190)를 포함하여 구성될 수 있다. 여기서, 역 양자화기(160), 역 변환기(170), 가산기(180) 및 메모리(190)는 영상 부호화 장치(100)에 선택적으로 포함될 수 있다. 이러한 영상 부호화 장치(100)는 개인용 컴퓨터(PC: Personal Computer), 노트북 컴퓨터, 개인 휴대 단말기(PDA: Personal Digital Assistant), 휴대형 멀티미디어 플레이어(PMP: Portable Multimedia Player), 플레이스테이션 포터블(PSP: PlayStation Portable), 이동통신 단말기(Mobile Communication Terminal) 등일 수 있으며, 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 부호화하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리, 프로그램을 실행하여 연산 및 제어하기 위한 마이크로프로세서 등을 구비하는 다양한 장치를 의미한다.The image encoding apparatus 100 according to an embodiment of the present invention may include a predictor 110, a subtractor 120, a transformer 130, a quantizer 140, an encoder 150, an inverse quantizer 160, and an inverse converter. 170, the adder 180, and the memory 190 may be configured. Here, the inverse quantizer 160, the inverse transformer 170, the adder 180, and the memory 190 may be selectively included in the image encoding apparatus 100. The video encoding apparatus 100 may be a personal computer (PC), a notebook computer, a personal digital assistant (PDA), a portable multimedia player (PMP), or a PlayStation Portable (PSP). ), A communication device such as a communication modem for communicating with various devices or a wired / wireless communication network, a memory for storing various programs and data for encoding an image, and executing a program. Means a variety of devices including a microprocessor for operation and control.

예측기(110)는 현재 블록의 움직임 벡터인 현재 움직임 벡터를 결정하고 결정된 현재 움직임 벡터를 이용하여 예측 블록을 생성한다. 즉, 예측기(110)는 영상에서 부호화하고자 하는 현재 블록의 각 화소의 화소값(Pixel Value)을 현재 움직임 벡터를 이용하여 예측하여 예측된 각 화소의 예측 화소값(Predicted Pixel Value)을 갖는 예측 블록(Predicted Block)을 생성한다. 예측기(110)는 율-왜곡 최적화(RDO: Rate-Distortion Optimization) 등 다양한 기법을 이용하여 현재 움직임 벡터를 결정할 수 있는데, 결정된 현재 움직임 벡터는 최적의 움직임 벡터가 될 수 있다.The predictor 110 determines a current motion vector, which is a motion vector of the current block, and generates a prediction block using the determined current motion vector. That is, the predictor 110 predicts a pixel value of each pixel of the current block to be encoded in the image by using a current motion vector, and has a predicted pixel value of the predicted pixel value of each pixel predicted. Create a Predicted Block. The predictor 110 may determine a current motion vector by using various techniques such as rate-distortion optimization (RDO), and the determined current motion vector may be an optimal motion vector.

감산기(120)는 현재 블록과 예측 블록을 감산하여 잔차 블록을 생성한다. 즉, 감산기(120)는 부호화하고자 하는 현재 블록의 각 화소의 화소값과 예측기(110)에서 예측한 예측 블록의 각 화소의 예측 화소값의 차이를 계산하여 블록 형태의 잔차 신호(Residual Signal)를 갖는 잔차 블록을 생성한다.The subtractor 120 subtracts the current block and the prediction block to generate a residual block. That is, the subtractor 120 calculates a difference between the pixel value of each pixel of the current block to be encoded and the predicted pixel value of each pixel of the prediction block predicted by the predictor 110 to obtain a residual signal in the form of a block. Create a residual block with

변환기(130)는 잔차 블록을 변환한다. 즉, 변환기(130)는 감산기(120)로부터 출력되는 잔차 블록의 잔차 신호를 주파수 영역으로 변환하여 잔차 블록의 각 화소값을 주파수 계수로 변환한다. 여기서, 변환기(130)는 하다마드 변환(Hadamard Transform), 이산 코사인 변환 기반 변환(DCT based Transform: Discrete Cosine Transform Based Transform) 등과 같은 공간축의 화상 신호를 주파수축으로 변환하는 다양한 변환 기법을 이용하여 잔차 신호를 주파수 영역으로 변환할 수 있는데, 주파수 영역으로 변환된 잔차 신호가 주파수 계수가 된다.Transformer 130 transforms the residual block. That is, the converter 130 converts the residual signal of the residual block output from the subtractor 120 into the frequency domain to convert each pixel value of the residual block into a frequency coefficient. Here, the transformer 130 uses residuals using various transformation techniques for transforming an image signal of a spatial axis into a frequency axis such as a Hadamard transform and a Discrete Cosine Transform Based Transform (DCT based Transform). The signal can be converted into the frequency domain, and the residual signal converted into the frequency domain becomes a frequency coefficient.

양자화기(140)는 변환된 잔차 블록을 양자화한다. 즉, 양자화기(140)는 변환기(130)로부터 출력되는 잔차 블록의 주파수 계수를 양자화(Quantization)하여 양자화 주파수 계수를 갖는 잔차 블록을 출력한다. 여기서, 양자화기(140)는 데드존 균일 경계 양자화(DZUTQ: Dead Zone Uniform Threshold Quantization, 이하 'DZUTQ'라 칭함), 양자화 가중치 매트릭스(Quantization Weighted Matrix) 또는 이를 개량한 양자화 기법 등을 사용하여 양자화할 수 있다.Quantizer 140 quantizes the transformed residual block. That is, the quantizer 140 quantizes the frequency coefficients of the residual block output from the transformer 130 and outputs the residual block having the quantized frequency coefficients. Here, the quantizer 140 may be quantized using Dead Zone Uniform Threshold Quantization (DZUTQ), a quantization weighted matrix, or an improved quantization technique. Can be.

한편, 이상에서는 본 발명의 일 실시예에 따른 영상 부호화 장치(100)가 변환기(130) 및 양자화기(140)를 포함하는 것을 도시하고 설명했지만, 변환기(130) 및 양자화기(140)는 선택적으로 포함될 수 있을 것이다. 즉, 본 발명의 일 실시예에 따른 영상 부호화 장치(100)는 잔차 블록의 잔차 신호를 변환하여 주파수 계수를 갖는 잔차 블록을 생성하고 양자화 과정을 수행하지 않을 수 있으며, 잔차 블록의 잔차 신호를 주파수 계수로 변환하지 않고 양자화 과정만을 수행할 수 있을 뿐만 아니라, 심지어는 변환과 양자화 과정을 모두 수행하지 않을 수 있다.In the above description, the image encoding apparatus 100 according to the exemplary embodiment of the present invention includes and illustrates a transformer 130 and a quantizer 140. However, the transformer 130 and the quantizer 140 are optional. It may be included as. That is, the image encoding apparatus 100 according to an embodiment of the present invention may generate a residual block having a frequency coefficient by converting the residual signal of the residual block and do not perform a quantization process, and the residual signal of the residual block may be frequency Not only can we perform the quantization process without converting to coefficients, we can even not perform both the transformation and quantization processes.

부호화기(150)는 양자화된 잔차 블록을 부호화하며, 하나 이상의 움직임 벡터 예측 후보(Motion Vector Prediction Candidate) 중에서 예측 움직임 벡터(Predicted Motion Vector)를 결정하고, 현재 움직임 벡터에서 예측 움직임 벡터를 감산한 차분 벡터(Differential Motion Vector)를 부호화하며, 부호화된 잔차 블록 및 부호화된 차분 벡터를 포함하는 비트스트림을 생성하여 출력한다. 즉, 부호화기(150)는 양자화기(140)로부터 출력되는 잔차 블록의 양자화 주파수 계수를 도 3에서 예시적으로 나타낸 지그재그 스캔과 같은 다양한 스캔 방식에 따라 스캔하여 양자화 주파수 계수열을 생성하고 엔트로피 부호화(Entropy Coding) 기법 등 다양한 부호화 기법을 이용하여 부호화한다.The encoder 150 encodes the quantized residual block, determines a predicted motion vector from one or more motion vector prediction candidates, and subtracts the predicted motion vector from the current motion vector. (Differential Motion Vector) is encoded, and a bitstream including an encoded residual block and an encoded difference vector is generated and output. That is, the encoder 150 scans the quantization frequency coefficients of the residual block output from the quantizer 140 according to various scan methods such as a zigzag scan illustrated in FIG. 3 to generate a quantization frequency coefficient string, and entropy encoding ( It is encoded using various encoding techniques such as Entropy Coding).

또한, 부호화기(150)는 현재 움직임 벡터를 부호화하는데, 하나 이상의 움직임 벡터 예측 후보를 선택하고 선택된 하나 이상의 움직임 벡터 예측 후보 중에서 예측 움직임 벡터를 결정한다. 이를 위해, 부호화기(150)는 현재 블록의 주변 블록의 움직임 벡터, 참조 프레임에서 현재 블록의 위치와 동일한 위치에 있는 Col(Colocated Block) 블록의 움직임 벡터, Col 블록의 주변 블록의 움직임 벡터 및 현재 블록에서 참조 프레임의 특정 블록을 지시하는 지시 벡터 중 하나 이상을 하나 이상의 움직임 벡터 예측 후보로서 선택할 수 있다. 여기서, 특정 블록은 지시 벡터와 수평이거나 지시 벡터와의 차이가 기 설정된 임계값보다 작은 움직임 벡터를 갖는 블록일 수 있다.In addition, the encoder 150 encodes a current motion vector, selects one or more motion vector prediction candidates, and determines a prediction motion vector among the selected one or more motion vector prediction candidates. To this end, the encoder 150 may include a motion vector of a neighboring block of the current block, a motion vector of a Collocated Block (Col) block at the same position as the current block in the reference frame, a motion vector of a neighboring block of the Col block, and a current block. At least one of the indication vectors indicating a specific block of the reference frame may be selected as one or more motion vector prediction candidates. In this case, the specific block may be a block having a motion vector that is horizontal to the indication vector or smaller than a predetermined threshold.

예를 들어, 부호화기(150)는 하나 이상의 움직임 벡터 예측 후보 중 하나의 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정할 때, 도 4에 예시적으로 나타낸 바와 같이, 중간값을 이용하여 예측 움직임 벡터를 결정할 수 있다. 도 4를 참조하면, 현재 블록이 X이고, 현재 블록의 좌측 블록이 A이고, 현재 블록의 상단 블록이 B, 현재 블록의 상단 우측 블록이 C라고 가정하고, 좌측 블록 A의 움직임 벡터가 MV_A이고, 상단 블록 B의 움직임 벡터가 MV_B이고, 상단 우측 블록 C의 움직임 벡터가 MV_C라고 가정한 경우, 현재 블록 A의 예측 움직임 벡터는, 수학식 1과 같이, 중간값을 이용하여 계산될 수 있다.For example, when the encoder 150 determines a motion vector prediction candidate of one of the one or more motion vector prediction candidates as a prediction motion vector, as illustrated in FIG. 4, the encoder 150 may determine the prediction motion vector using a median value. Can be. Referring to FIG. 4, assuming that the current block is X, the left block of the current block is A, the top block of the current block is B, and the top right block of the current block is C, the motion vector of the left block A is MV_A. When the motion vector of the upper block B is MV_B and the motion vector of the upper right block C is MV_C, the predicted motion vector of the current block A may be calculated using an intermediate value, as shown in Equation 1 below.

Figure 112013041196111-pat00001
Figure 112013041196111-pat00001

부호화기(150)는 중간값을 이용하여 하나 이상의 움직임 벡터 예측 후보 중에서 예측 움직임 벡터를 결정할 수 있지만, 반드시 중간값을 이용해야 하는 것은 아니며, 다른 다양한 방법을 이용하여 예측 움직임 벡터를 결정할 수 있다. 이에 대해서는 후술하는 과정에서 도 2를 통해, 상세히 설명한다.The encoder 150 may determine the prediction motion vector from among one or more motion vector prediction candidates using the median value, but it is not necessary to use the median value and may determine the prediction motion vector using various other methods. This will be described in detail with reference to FIG. 2 in the following process.

또한, 부호화기(150)는 예측 움직임 벡터로서 결정된 움직임 벡터 예측 후보를 식별하는 예측 후보 식별 플래그를 생성하고 부호화하여 비트스트림에 추가로 포함시킬 수 있다. 즉, 비트스트림은 부호화된 잔차 블록과 부호화된 차분 벡터뿐만 아니라 부호화된 예측 후보 식별 플래그를 포함할 수 있다.In addition, the encoder 150 may generate and encode a prediction candidate identification flag that identifies a motion vector prediction candidate determined as the prediction motion vector, and then include the same in the bitstream. That is, the bitstream may include an encoded prediction candidate identification flag as well as an encoded residual block and an encoded difference vector.

또한, 부호화기(150)는 예측 움직임 벡터의 x-컴포넌트와 y-컴포넌트 각각을 독립적으로 결정할 수 있다. 즉, 부호화기(150)는 하나 이상의 움직임 벡터 예측 후보의 x-컴포넌트 중에서 하나의 움직임 벡터 예측 후보의 x-컴포넌트를 예측 움직임 벡터의 x-컴포넌트로서 결정하고, 하나 이상의 움직임 벡터 예측 후보의 y-컴포넌트 중에서 하나의 움직임 벡터 예측 후보의 y-컴포넌트를 예측 움직임 벡터의 y-컴포넌트로서 결정할 수 있다.In addition, the encoder 150 may independently determine each of the x-component and the y-component of the prediction motion vector. That is, the encoder 150 determines the x-component of one motion vector prediction candidate among the x-components of the one or more motion vector prediction candidates as the x-component of the prediction motion vector, and the y-component of the one or more motion vector prediction candidates. The y-component of one motion vector prediction candidate may be determined as the y-component of the predictive motion vector.

또한, 부호화기(150)는 차분 벡터의 x-컴포넌트의 절대값 및 차분 벡터의 y-컴포넌트의 절대값 중 하나 이상이 각각 기 설정된 x-컴포넌트 임계값 및 기 설정된 y-컴포넌트 임계값 중 하나 이상보다 작거나 같은 경우, 예측 움직임 벡터의 x-컴포넌트 및 예측 움직임 벡터의 y-컴포넌트 중 하나 이상으로 결정된 움직임 벡터 예측 후보를 식별하는 예측 후보 식별 플래그를 생성하고 부호화하여 비트스트림에 추가로 포함시킬 수 있다. 부호화기(150)에 대해서는 후술하는 과정에서 도 2를 통해 상세히 설명한다.In addition, the encoder 150 may determine that at least one of the absolute value of the x-component of the difference vector and the absolute value of the y-component of the difference vector is greater than one or more of the preset x-component threshold and the preset y-component threshold, respectively. In this case, the prediction candidate identification flag identifying the motion vector prediction candidate determined as at least one of the x-component of the prediction motion vector and the y-component of the prediction motion vector may be generated, encoded, and further included in the bitstream. . The encoder 150 will be described in detail with reference to FIG. 2 in a later process.

역 양자화기(160)는 양자화기(140)에 의해 양자화된 잔차 블록을 역 양자화(Inverse Quantization)한다. 역 변환기(170)는 역 양자화기(160)에 의해 역 양자화된 잔차 블록을 역 변환(Inverse Transform)한다. 여기서, 역 양자화기(160)와 역 변환기(170)는 양자화기(140)와 변환기(130)에서 사용한 양자화 방식과 변환 방식을 역으로 사용하여 역 양자화 및 역 변환할 수 있다. 또한, 변환기(130)와 역 양자화기(140)에서 양자화만을 수행하고 변환을 수행하지 않은 경우에는 역 양자화만을 수행하고 역 변환을 수행하지 않을 수 있다. 만약, 변환 및 양자화를 모두 수행하지 않은 경우, 역 양자화기(160)와 역 변환기(170)도 역 변환 및 역 양자화를 모두 수행하지 않거나 영상 부호화 장치(100)에 포함되지 않고 생략될 수 있다.Inverse quantizer 160 inverse quantizes the residual block quantized by quantizer 140. The inverse transformer 170 inverse transforms a residual block inversely quantized by the inverse quantizer 160. Here, the inverse quantizer 160 and the inverse transformer 170 may perform inverse quantization and inverse transformation by using the quantization method and the transformation method used in the quantizer 140 and the transformer 130 inversely. In addition, when only the quantization is performed in the transformer 130 and the inverse quantizer 140 and no transformation is performed, only the inverse quantization may be performed and the inverse transformation may not be performed. If both transformation and quantization are not performed, the inverse quantizer 160 and the inverse transformer 170 may also be omitted without being included in the inverse transformation and inverse quantization or included in the image encoding apparatus 100.

가산기(180)는 예측기(110)에서 예측된 예측 블록과 역 변환기(170)에 의해 복원된 잔차 블록을 가산하여 현재 블록을 복원한다. 메모리(190)는 가산기(180)로부터 출력되는 복원된 현재 블록을 프레임 단위로 참조 프레임으로서 저장하여 예측기(110)가 현재 블록의 다음 블록이나 향후 다른 블록을 부호화할 때 참조 프레임으로서 사용할 수 있도록 한다.The adder 180 reconstructs the current block by adding the prediction block predicted by the predictor 110 and the residual block reconstructed by the inverse transformer 170. The memory 190 stores the reconstructed current block output from the adder 180 as a reference frame in units of frames so that the predictor 110 can use it as a reference frame when encoding the next block of the current block or another block in the future. .

도 1에서는 도시하지 않았지만, 전술한 본 발명의 일 실시예에 따른 영상 부호화 장치(100)는 H.264/AVC 표준에 기초하여, 인트라 예측(Intra Prediction)을 위한 인트라 예측기, 복원된 현재 블록을 디블로킹 필터링(Deblocking Filtering)하는 디블록킹 필터기 등을 추가로 포함할 수 있다. 여기서, 디블로킹 필터링이란 영상을 블록 단위로 부호화하면서 발생하는 블록 왜곡을 감소시키는 작업을 말하며, 블록 경계와 매크로블록 경계에 디블로킹 필터를 적용하거나 매크로블록 경계에만 디블로킹 필터를 적용하거나 디블로킹 필터를 사용하지 않는 방법 중 하나를 선택적으로 사용할 수 있다.Although not shown in FIG. 1, the image encoding apparatus 100 according to an embodiment of the present invention may include an intra predictor for intra prediction and a reconstructed current block based on the H.264 / AVC standard. The deblocking filter may further include a deblocking filtering. Here, deblocking filtering refers to a task of reducing block distortion caused by coding an image block by block. The deblocking filter may be applied to a block boundary or a macro block boundary, a deblocking filter may be applied to a macro block boundary, Can be selectively used.

도 2는 본 발명의 일 실시예에 따른 움직임 벡터 부호화 장치를 간략하게 나타낸 블록 구성도이다.2 is a block diagram schematically illustrating a motion vector coding apparatus according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 움직임 벡터 부호화 장치는 도 1을 통해 전술한 본 발명의 일 실시예에 따른 영상 부호화 장치(100)의 부호화기(150)로 구현될 수 있다. 이하에서는 설명의 편의를 위해, 본 발명의 일 실시예에 따른 움직임 벡터 부호화 장치를 부호화기(150)라 칭한다. 또한, 본 발명의 일 실시예에 따른 부호화기(150)는 도 1을 통해 전술한 바와 같이, 양자화된 잔차 블록을 부호화하여 부호화된 잔차 블록을 출력하는 영상 부호화기를 추가로 포함할 수 있지만, 이러한 영상 부호화기는 당업자에게 자명하므로 상세한 설명은 생략한다.The motion vector encoding apparatus according to an embodiment of the present invention may be implemented with the encoder 150 of the image encoding apparatus 100 according to the embodiment of the present invention described above with reference to FIG. 1. Hereinafter, for convenience of description, the motion vector encoding apparatus according to an embodiment of the present invention is called an encoder 150. In addition, the encoder 150 according to an embodiment of the present invention may further include an image encoder for outputting the encoded residual block by encoding the quantized residual block, as described above with reference to FIG. 1. Since the encoder is obvious to those skilled in the art, detailed description thereof will be omitted.

본 발명의 일 실시예에 따른 부호화기(150)는 예측 후보 선택기(210), 예측 움직임 벡터 결정기(220), 차분 벡터 부호화기(230), 예측 후보 식별 플래그 부호화기(240) 및 예측 후보 선택 플래그 부호화기(250)를 포함하여 구성될 수 있다. 여기서, 부호화기(150)는 예측 후보 식별 플래그 부호화기(240) 및 예측 후보 선택 플래그 부호화기(250) 중 하나 이상을 반드시 포함하지 않고 선택적으로 포함할 수 있다.The encoder 150 according to an embodiment of the present invention includes a prediction candidate selector 210, a prediction motion vector determiner 220, a differential vector encoder 230, a prediction candidate identification flag encoder 240, and a prediction candidate selection flag encoder ( 250). Here, the encoder 150 may selectively include one or more of the prediction candidate identification flag encoder 240 and the prediction candidate selection flag encoder 250 without necessarily including them.

예측 후보 선택기(210)는 하나 이상의 움직임 벡터 예측 후보를 선택한다. 예측 움직임 벡터 결정기(220)는 하나 이상의 움직임 벡터 예측 후보 중에서 하나의 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정한다. 차분 벡터 부호화기(230)는 현재 움직임 벡터에서 예측 움직임 벡터를 감산하여 차분 벡터를 계산하고 부호화한다. 예측 후보 식별 플래그 부호화기(240)는 예측 움직임 벡터로서 결정된 움직임 벡터 예측 후보를 식별하는 예측 후보 식별 플래그를 생성하고 부호화한다. 예측 후보 선택 플래그 부호화기(250)는 영상의 임의의 영역(예를 들면 H.264에서 슬라이스(Slice))마다 예측 후보 선택기(210)에 의해 어떠한 움직임 벡터 예측 후보가 선택되었는지를 식별하기 위한 예측 후보 선택 플래그를 생성하고 부호화한다.The prediction candidate selector 210 selects one or more motion vector prediction candidates. The predictive motion vector determiner 220 determines one motion vector prediction candidate among the one or more motion vector prediction candidates as the prediction motion vector. The difference vector encoder 230 calculates and encodes a difference vector by subtracting a prediction motion vector from the current motion vector. The prediction candidate identification flag encoder 240 generates and encodes a prediction candidate identification flag that identifies a motion vector prediction candidate determined as the prediction motion vector. Prediction candidate selection flag encoder 250 is a prediction candidate for identifying which motion vector prediction candidate is selected by prediction candidate selector 210 for every region of the image (for example, a slice in H.264). Generate and encode a selection flag.

차분 벡터는 수학식 2와 같이 계산될 수 있다. 수학식 2에서 MVd는 차분 벡터를 나타내고, MV는 현재 움직임 벡터를 나타내며, MVp_opt는 예측 움직임 벡터를 나타낸다.The difference vector may be calculated as in Equation 2. In Equation 2, MVd represents a difference vector, MV represents a current motion vector, and MVp_opt represents a predicted motion vector.

Figure 112013041196111-pat00002
Figure 112013041196111-pat00002

차분 벡터 부호화기(230)에서 부호화된 차분 벡터와 전술한 영상 부호화기에서 출력되는 부호화된 잔차 블록은 비트스트림에 포함되어 영상 복호화 장치로 전송될 수 있다. 또한, 비트스트림에는 예측 후보 선택 플래그 부호화기(250)에서 부호화된 예측 후보 선택 플래그와 예측 후보 식별 플래그 부호화기(240)에서 부호화된 예측 후보 식별 플래그 중 하나 이상이 추가로 포함될 수 있다.The difference vector encoded by the difference vector encoder 230 and the encoded residual block output from the image encoder described above may be included in a bitstream and transmitted to the image decoding apparatus. In addition, the bitstream may further include one or more of the prediction candidate selection flag encoded by the prediction candidate selection flag encoder 250 and the prediction candidate identification flag encoded by the prediction candidate identification flag encoder 240.

여기서, 예측 후보 선택기(210)는 현재 블록의 주변 블록의 움직임 벡터를 하나 이상의 움직임 벡터 예측 후보로서 선택할 수도 있다. 즉, 현재 프레임의 현재 블록과 주변 블록을 예시적으로 나타낸 도 5를 참조하면, 하나 이상의 움직임 벡터 예측 후보는 현재 부호화하고자 하는 현재 블록 X가 위치한 현재 프레임에서, 현재 블록 X의 주변에 위치한 주변 블록 L, UL, U, UR의 움직임 벡터들이 될 수 있다. 도 5에서는 현재 블록의 좌측 블록 L, 상단 좌측 블록 UL, 상단 블록 U 및 상단 우측 블록 UR만을 주변 블록으로 도시하였지만, 움직임 벡터 예측 후보는 현재 블록과 인접한 다른 블록뿐만 아니라 인접하지 않은 다른 블록들의 움직임 벡터들이 될 수 있다.Here, the prediction candidate selector 210 may select a motion vector of a neighboring block of the current block as one or more motion vector prediction candidates. That is, referring to FIG. 5 exemplarily illustrating a current block and a neighboring block of a current frame, one or more motion vector prediction candidates are neighboring blocks located around a current block X in a current frame where a current block X to be currently encoded is located. It may be motion vectors of L, UL, U, and UR. In FIG. 5, only the left block L, the top left block UL, the top block U, and the top right block UR of the current block are shown as neighboring blocks, but the motion vector prediction candidate is not only the other block adjacent to the current block but also the movement of other non-adjacent blocks. Can be vectors.

또한, 예측 후보 선택기(210)는 참조 프레임에서 현재 블록의 위치와 동일한 위치에 있는 Col 블록의 움직임 벡터와 Col 블록의 주변 블록의 움직임 벡터 중 하나 이상을 하나 이상의 움직임 벡터 예측 후보로서 선택할 수도 있다. 즉, 현재 프레임과 참조 프레임의 블록들을 예시적으로 나타낸 도 6을 참조하면, 하나 이상의 움직임 벡터 예측 후보는 참조 프레임 frame t-1에서 현재 블록 X와 동일한 위치에 있는 블록인 Col 블록과 Col 블록의 주변 블록(ULCol, UCol, URCol, LCol, RCol, BLCol, BCol, BRCol)의 움직임 벡터들이 될 수 있다. 도 6에서는 Col 블록과 Col 블록의 주변 블록(ULCol, UCol, URCol, LCol, RCol, BLCol, BCol, BRCol)만을 도시하였지만, 이뿐만 아니라 움직임 벡터 예측 후보는 Col 블록과 인접한 다른 블록은 물론, 인접하지 않은 다른 블록들의 움직임 벡터들이 될 수 있다.In addition, the prediction candidate selector 210 may select one or more of the motion vector of the Col block and the motion vector of the neighboring block of the Col block at the same position as the current block in the reference frame as one or more motion vector prediction candidates. That is, referring to FIG. 6 exemplarily showing blocks of the current frame and the reference frame, one or more motion vector prediction candidates are included in the Col block and the Col block, which are blocks located at the same position as the current block X in the reference frame frame t-1. It may be motion vectors of neighboring blocks (UL Col , U Col , UR Col , L Col , R Col , BL Col , B Col , BR Col ). In FIG. 6, only the Col block and the neighboring blocks (UL Col , U Col , UR Col , L Col , R Col , BL Col , B Col , BR Col ) of the Col block are shown, but not only the motion vector prediction candidate is a Col block. And other blocks adjacent to, as well as motion vectors of other non-adjacent blocks.

또한, 예측 후보 선택기(210)는 현재 프레임의 현재 블록에서 참조 프레임의 특정 블록을 지시하는 지시 벡터를 하나 이상의 움직임 벡터 예측 후보로서 선택할 수 있다. 즉, 지시 벡터를 설명하기 위해 예시적으로 나타낸 도 7을 참조하면, 현재 프레임 frame t에 위치한 현재 블록 X에서 제 1 참조 프레임 frame t-1에 위치한 어떠한 블록 Par를 지시하는 벡터와 제 1 참조 프레임 frame t-1에 위치한 어떠한 블록 Par의 움직임 벡터가 서로 수평이거나 차이가 기 설정된 임계값보다 작은 경우, 현재 프레임 frame t의 현재 블록 X에서 참조 영상 frame t-1의 어떠한 블록 Par를 지시하는 벡터가 움직임 벡터 예측 후보로서 선택될 수 있다. 여기서, 현재 프레임 frame t의 현재 블록 X의 위치에서 참조 영상 frame t-1의 어떠한 블록 Par를 지시하는 벡터가 지시 벡터이다. 따라서, 전술한 특정 블록은 지시 벡터와 수평이거나 지시 벡터와의 차이가 기 설정된 임계값보다 작은 움직임 벡터를 갖는 블록일 수 있다.In addition, the prediction candidate selector 210 may select, as one or more motion vector prediction candidates, an indication vector indicating a specific block of the reference frame in the current block of the current frame. That is, referring to FIG. 7 illustrated by way of example to describe the indication vector, a vector indicating a first par frame and a vector indicating any block Par located in a first reference frame frame t-1 in a current block X located in a current frame frame t If the motion vectors of any of the blocks Par located in frame t-1 are horizontal to each other or the difference is smaller than the preset threshold, a vector indicating any block Par of the reference picture frame t-1 in the current block X of the current frame frame t It may be selected as a motion vector prediction candidate. Here, the vector indicating any block Par of the reference picture frame t-1 at the position of the current block X of the current frame f is an indicator vector. Therefore, the specific block described above may be a block having a motion vector that is horizontal to the instruction vector or smaller than a predetermined threshold.

예측 후보 선택기(210)가 하나 이상의 움직임 벡터를 선택한 경우, 예측 후보 선택 플래그 부호화기(250)는 예측 후보 선택기(210)에 의해 선택된 움직임 벡터 예측 후보를 식별하기 위한 예측 후보 선택 플래그를 생성하여 부호화할 수 있으며, 부호화된 예측 후보 선택 플래그는 비트스트림의 헤더에 삽입될 수 있다.When the prediction candidate selector 210 selects one or more motion vectors, the prediction candidate selection flag encoder 250 generates and encodes a prediction candidate selection flag for identifying the motion vector prediction candidate selected by the prediction candidate selector 210. The encoded prediction candidate selection flag may be inserted in the header of the bitstream.

다른 예로서, 예측 후보 선택기(210)는 하나 이상의 움직임 벡터 예측 후보 중에서 일부의 움직임 벡터 예측 후보를 선택할 수 있다. 즉, 예측 후보 선택기(210)는 영상의 특성에 따라 하나 이상의 움직임 벡터 예측 후보 중에서 소정의 기준에 따라 몇 개를 선택하여 선택된 움직임 벡터 예측 후보 중에서만 예측 움직임 벡터를 결정할 수 있다. 이 경우, 예측 후보 선택 플래그 부호화기(250)는 하나 이상의 움직임 벡터 예측 후보 중에서 어떠한 움직임 벡터 예측 후보가 일부의 움직임 벡터 예측 후보로서 선택되었는지를 식별하기 위해, 예측 후보 선택기(210)에 의해 선택된 일부의 움직임 벡터 예측 후보를 식별하는 예측 후보 선택 플래그를 생성하여 부호화할 수 있다.As another example, the prediction candidate selector 210 may select some motion vector prediction candidates from one or more motion vector prediction candidates. That is, the prediction candidate selector 210 may select several of the one or more motion vector prediction candidates according to a predetermined criterion according to the characteristics of the image to determine the prediction motion vector only among the selected motion vector prediction candidates. In this case, the prediction candidate selection flag encoder 250 may determine a portion of the one selected by the prediction candidate selector 210 to identify which one of the one or more motion vector prediction candidates is selected as some motion vector prediction candidate. A prediction candidate selection flag for identifying a motion vector prediction candidate may be generated and encoded.

여기서, 소정의 기준이란 하나 이상의 움직임 벡터 예측 후보 각각이 현재 움직임 벡터로서 결정될 수 있는 확률이 될 수도 있는데, 이러한 확률을 이용하는 경우, 예측 후보 선택기(210)는 하나 이상의 움직임 벡터 예측 후보 각각을 이용하여 현재 프레임의 하나 이상의 영역을 부호화함으로써, 하나 이상의 움직임 벡터 예측 후보 각각에 대해 현재 움직임 벡터로서 결정되는 확률을 계산하고, 계산된 확률에 따라 일부의 움직임 벡터 예측 후보를 선택할 수 있다. 예를 들어, 하나 이상의 움직임 벡터 예측 후보가 총 A, B, C, D, E 5개라고 가정할 때, 5개의 움직임 벡터 예측 후보 각각을 이용하여 현재 프레임의 임의의 영역들을 가상으로 부호화하여 최적의 움직임 벡터로서 결정될 확률(즉, 현재 움직임 벡터로서 결정될 확률)을 계산하고, 만약 계산된 결과가 A: 80%, B: 10%, C: 5%, D:3%, E: 2%의 확률로서 계산되었다면, A 또는 A와 B 움직임 벡터 예측 후보를 일부의 움직임 벡터 예측 후보로서 선택할 수 있다.Here, the predetermined criterion may be a probability that each of the one or more motion vector prediction candidates may be determined as the current motion vector. When the probability is used, the prediction candidate selector 210 uses each of the one or more motion vector prediction candidates. By encoding one or more regions of the current frame, a probability determined as the current motion vector may be calculated for each of the one or more motion vector prediction candidates, and some motion vector prediction candidates may be selected according to the calculated probability. For example, assuming that one or more motion vector prediction candidates total 5 A, B, C, D, and E, each of the 5 motion vector prediction candidates is virtually encoded to optimally encode arbitrary regions of the current frame. Calculate the probability to be determined as the motion vector of (i.e., the probability to be determined as the current motion vector), and if the calculated result is A: 80%, B: 10%, C: 5%, D: 3%, E: 2% If calculated as a probability, A or A and B motion vector prediction candidates may be selected as some motion vector prediction candidates.

또한, 소정의 기준이란 상관성이 될 수 있는데, 상관성을 이용하는 경우, 예측 후보 선택기(210)는 하나 이상의 움직임 벡터 예측 후보 중 상관성이 있는 움직임 벡터 예측 후보들을 하나 이상의 그룹으로 선택하고, 선택된 각 그룹을 대표하는 대표 움직임 벡터를 일부의 움직임 벡터 예측 후보로서 선택할 수 있다. 여기서, 대표 움직임 벡터는 선택된 각 그룹 내의 움직임 벡터 예측 후보들의 중간값 또는 평균값일 수 있다.In addition, the predetermined criterion may be correlation. When the correlation is used, the prediction candidate selector 210 selects correlated motion vector prediction candidates from one or more motion vector prediction candidates into one or more groups, and selects each selected group. Representative representative motion vectors can be selected as some motion vector prediction candidates. Here, the representative motion vector may be an intermediate value or an average value of motion vector prediction candidates in each selected group.

예를 들어, 하나 이상의 움직임 벡터 예측 후보가 도 5 내지 도 7을 통해 전술한 움직임 벡터들이라면, 도 5를 통해 전술한 현재 블록의 주변 블록 중 일부의 주변 블록(L, UL, U, UR)의 움직임 벡터들(MV_L, MV_UL, MV_U, MV_UR)만을 모아서 하나의 그룹 A로 선택하고, 수학식 3과 같이, 중간값 연산을 통해 계산된 값 MVp_Group A를 대표 움직임 벡터로서 결정하고 대표 움직임 벡터를 일부의 움직임 벡터 예측 후보로서 선택할 수 있다. For example, if the one or more motion vector prediction candidates are the motion vectors described above with reference to FIGS. 5 to 7, the neighboring blocks L, UL, U, and UR of some of the neighboring blocks of the current block described above with reference to FIG. Collect only the motion vectors MV_L, MV_UL, MV_U, MV_UR, and select one group A. Determine the value MVp_Group A calculated through the intermediate value calculation as a representative motion vector and partially represent the representative motion vector as shown in Equation 3. Can be selected as a motion vector prediction candidate.

Figure 112013041196111-pat00003
Figure 112013041196111-pat00003

또한, 도 6을 통해 전술한 Col 블록과 Col 블록의 주변 블록 중 상하좌우의 블록(Col, UCol, LCol, RCol, BCol)의 움직임 벡터들(MV_Col, MV_Ucol, MV_Lcol, MV_Rcol, MV_Bcol)을 모아서 하나의 그룹 B로 선택하고, 수학식 4와 같이, 평균값 연산을 통해 계산된 값 MVp_Group A를 대표 움직임 벡터로서 결정하고 대표 움직임 벡터를 일부의 움직임 벡터 예측 후보로서 선택할 수 있다.In addition, the motion vectors MV_Col, MV_U col , MV_L col , MV_R of the top, bottom, left, and right blocks Col, U Col , L Col , R Col , and B Col among the Col block and the neighboring blocks of the Col block described with reference to FIG. 6. col , MV_B col ) can be collected as one group B, and as shown in Equation 4, the value MVp_Group A calculated through the average value operation can be determined as a representative motion vector, and the representative motion vector can be selected as a part of motion vector prediction candidate. have.

Figure 112013041196111-pat00004
Figure 112013041196111-pat00004

또한, 도 6을 통해 전술한 Col 블록과 Col 블록의 주변 블록(ULCol, UCol, URCol, LCol, RCol, BLCol, BCol, BRCol)의 움직임 벡터들(MV_Col, MV_ULcol, MV_Ucol, MV_URcol, MV_Lcol, MV_Rcol, MV_BLcol, MV_Bcol, MV_BRcol)을 모아서 하나의 그룹 C로 선택하고, 수학식 5와 같이, 중간값 연산을 통해 계산된 값 MVp_Group C를 대표 움직임 벡터로서 결정하고 대표 움직임 벡터를 일부의 움직임 벡터 예측 후보로서 선택할 수 있다.Also, the motion vectors MV_Col and MV_UL col of the Col block and the neighboring blocks (UL Col , U Col , UR Col , L Col , R Col , BL Col , B Col , BR Col ) of the Col block described above with reference to FIG. 6. , MV_U col , MV_UR col , MV_L col , MV_R col , MV_BL col , MV_B col , MV_BR col ), and select them as one group C, and represent the value MVp_Group C calculated through the median operation, as shown in Equation 5. It can be determined as a motion vector and a representative motion vector can be selected as some motion vector prediction candidate.

Figure 112013041196111-pat00005
Figure 112013041196111-pat00005

전술한 바와 같이, 수학식 4 내지 수학식 5에 의해 계산된 대표 움직임 벡터와 도 7을 통해 전술한 지시 벡터가 일부의 움직임 벡터 예측 후보로서 선택될 수 있으며, 이 경우, 예측 후보 선택 플래그 부호화기(250)는 일부의 움직임 벡터 예측 후보로서 MVp_groupA, MVp_groupB, MVp_groupC, MV_col과 MV_par가 선택되었음을 나타내기 위한 예측 후보 선택 플래그를 생성하여 부호화할 수 있다. 물론, 예측 후보 식별 플래그 부호화기(240)는 일부의 움직임 벡터 예측 후보 MVp_groupA, MVp_groupB, MVp_groupC, MV_col과 MV_par 중 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지 나타내기 위한 예측 후보 식별 플래그를 생성하여 부호화할 수 있다.As described above, the representative motion vector calculated by the equations (4) to (5) and the instruction vector described above with reference to FIG. 7 may be selected as some motion vector prediction candidates. In this case, the prediction candidate selection flag encoder ( 250 may generate and encode a prediction candidate selection flag to indicate that MVp_groupA, MVp_groupB, MVp_groupC, MV_col and MV_par are selected as some motion vector prediction candidates. Of course, the prediction candidate identification flag encoder 240 generates and encodes a prediction candidate identification flag for indicating which motion vector prediction candidates among some motion vector prediction candidates MVp_groupA, MVp_groupB, MVp_groupC, MV_col and MV_par have been determined as the prediction motion vectors. can do.

또한, 예측 후보 선택기(210)는 하나 이상의 움직임 벡터 예측 후보 중에서 기 설정된 하나 이상의 움직임 벡터 예측 후보를 일부의 움직임 벡터 예측 후보로서 선택할 수 있다. 여기서, 기 설정된 하나 이상의 움직임 벡터 예측 후보는 사용자에 의해 임의로 선택될 수 있다.Also, the prediction candidate selector 210 may select one or more motion vector prediction candidates, which are predetermined from among the one or more motion vector prediction candidates, as partial motion vector prediction candidates. Here, the one or more preset motion vector prediction candidates may be arbitrarily selected by the user.

또한, 예측 움직임 벡터 결정기(220)는 다양한 방식으로 예측 움직임 벡터를 결정할 수 있다. 일 예로서, 예측 움직임 벡터 결정기(220)는 예측 후보 선택기(210)에 의해서 선택된 하나 이상의 움직임 벡터 예측 후보 중에서 각각의 움직임 벡터 예측 후보를 이용하여 계산된 차분 벡터를 부호화하는 데 소요되는 비트량이 최소가 되는 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정할 수 있다. 따라서, 예측 움직임 벡터 결정기(220)는 각 움직임 벡터 예측 후보를 예측 움직임 벡터라 가정하여 차분 벡터를 계산하고 계산된 차분 벡터를 부호화하여 부호화된 데이터가 최소가 되는 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정할 수 있다. 이 경우, 예측 후보 식별 플래그 부호화기(240)는 현재 블록의 움직임 벡터를 부호화할 때(즉, 현재 움직임 벡터와 결정된 예측 움직임 벡터의 차분 벡터를 부호화할 때)마다 하나 이상의 움직임 벡터 예측 후보 중에서 어떠한 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정하였는지를 식별하기 위해 예측 움직임 벡터로서 결정된 움직임 벡터 예측 후보를 식별하는 예측 후보 식별 플래그를 생성하고 부호화할 수 있다.In addition, the predictive motion vector determiner 220 may determine the predictive motion vector in various ways. As an example, the prediction motion vector determiner 220 may use the minimum amount of bits required to encode a difference vector calculated using each motion vector prediction candidate among one or more motion vector prediction candidates selected by the prediction candidate selector 210. A motion vector prediction candidate to be determined may be determined as a prediction motion vector. Accordingly, the prediction motion vector determiner 220 calculates a difference vector by assuming that each motion vector prediction candidate is a prediction motion vector, encodes the calculated difference vector, and selects a motion vector prediction candidate whose encoded data is minimum as a prediction motion vector. You can decide. In this case, the predictive candidate identification flag encoder 240 encodes a motion vector of the current block (that is, when encoding a difference vector between the current motion vector and the determined predicted motion vector). A prediction candidate identification flag that identifies a motion vector prediction candidate determined as the prediction motion vector may be generated and encoded to identify whether the vector prediction candidate has been determined as the prediction motion vector.

다른 예로서, 예측 움직임 벡터 결정기(220)는 예측 움직임 벡터의 x-컴포넌트와 y-컴포넌트 각각을 독립적으로 결정할 수 있다. 즉, 예측 움직임 벡터 결정기(220)는 하나 이상의 움직임 벡터 예측 후보의 x-컴포넌트 중에서 하나의 움직임 벡터 예측 후보의 x-컴포넌트를 예측 움직임 벡터의 x-컴포넌트로서 결정하고, 하나 이상의 움직임 벡터 예측 후보의 y-컴포넌트 중에서 하나의 움직임 벡터 예측 후보의 y-컴포넌트를 예측 움직임 벡터의 y-컴포넌트로서 결정할 수 있다. 예를 들어, 차분 벡터를 부호화하는데 있어서, 차분 벡터의 비트량이 차분 벡터의 크기의 절대값에 비례하고 하나 이상의 움직임 벡터 예측 후보가 (-4, -4), (2, 2), (4, 4), (14, 14)이며 현재 움직임 벡터가 (0, 4)라고 가정하면, 기존에는 (2, 2) 또는 (4, 4)가 예측 움직임 벡터로서 결정될 수 있지만, 또 전술한 예에서는 예측 움직임 벡터의 x-컴포넌트는 -4, 2, 4, 14 중에서 2로 선택될 수 있으며, 예측 움직임 벡터의 y-컴포넌트는 -4, 2, 4, 14 중에서 4로 선택될 수 있다. 즉, 기존과 같이, x-컴포넌트와 y-컴포넌트를 분리하여 선택할 수 없는 것이 아니라, x-컴포넌트와 y-컴포넌트를 분리하여 최적의 값을 예측 움직임 벡터로서 결정할 수 있다.As another example, the predictive motion vector determiner 220 may independently determine each of the x-component and the y-component of the predictive motion vector. That is, the prediction motion vector determiner 220 determines an x-component of one motion vector prediction candidate among the x-components of the one or more motion vector prediction candidates as an x-component of the prediction motion vector, The y-component of one motion vector prediction candidate among the y-component may be determined as the y-component of the predictive motion vector. For example, in encoding a difference vector, the amount of bits of the difference vector is proportional to the absolute value of the magnitude of the difference vector, and one or more motion vector prediction candidates are selected from (-4, -4), (2, 2), (4, 4), (14, 14) and the current motion vector is (0, 4), conventionally (2, 2) or (4, 4) can be determined as the predicted motion vector, but also in the above-described example The x-component of the motion vector may be selected from 2 out of -4, 2, 4 and 14, and the y-component of the predictive motion vector may be selected from 4 out of -4, 2, 4 and 14. In other words, the x-component and the y-component cannot be separated and selected as in the prior art, but the optimum value can be determined as the predicted motion vector by separating the x-component and the y-component.

이 경우, 예측 후보 식별 플래그 부호화기(240)는 차분 벡터의 x-컴포넌트의 절대값과 차분 벡터의 y-컴포넌트의 절대값이 각각 기 설정된 x-컴포넌트 임계값(Threshold)과 기 설정된 y-컴포넌트 임계값보다 큰 같은 경우, 예측 후보 식별 플래그를 생성하지 않을 수 있으며 그에 따라 예측 후보 식별 플래그를 부호화하여 전송하지 않을 수 있다. 또한, 예측 후보 식별 플래그 부호화기(240)는 차분 벡터의 x-컴포넌트의 절대값과 차분 벡터의 y-컴포넌트의 절대값 중 하나 이상이 각각 기 설정된 x-컴포넌트 임계값과 기 설정된 y-컴포넌트 임계값 중 하나 이상보다 작거나 같은 경우에는, 예측 움직임 벡터의 x-컴포넌트와 예측 움직임 벡터의 y-컴포넌트 중 하나 이상으로 결정된 움직임 벡터 예측 후보를 식별하는 예측 후보 식별 플래그를 생성하고 부호화할 수 있다. 즉, 예측 움직임 벡터의 두 컴포넌트(x-컴포넌트 및 y-컴포넌트) 중 두 컴포넌트가 모두 임계값보다 큰 경우에는 예측 후보 식별 플래그를 생성하지 않고, 하나의 컴포넌트만이 임계값보다 작은 경우에는 임계값보다 큰 하나의 컴포넌트로 어떠한 움직임 벡터 예측 후보가 이용되었는지를 식별하는 예측 후보 식별 플래그를 생성하며, 두 개의 컴포넌트가 모두 임계값보다 크지 않은 경우에는 두 개의 컴포넌트로 어떠한 움직임 벡터 예측 후보가 이용되었는지를 식별하는 예측 후보 식별 플래그를 생성하여 부호화할 수 있다.In this case, the predictive candidate identification flag encoder 240 sets the absolute value of the x-component of the difference vector and the absolute value of the y-component of the difference vector, respectively, to the preset x-component threshold and the preset y-component threshold. In the same case, the prediction candidate identification flag may not be generated and thus the prediction candidate identification flag may not be encoded and transmitted. In addition, the prediction candidate identification flag encoder 240 may set at least one of an absolute value of the x-component of the difference vector and an absolute value of the y-component of the difference vector, respectively, to a preset x-component threshold and a preset y-component threshold. If less than or equal to one of the following, a prediction candidate identification flag for identifying a motion vector prediction candidate determined as at least one of an x-component of the predictive motion vector and a y-component of the predictive motion vector may be generated and encoded. That is, if two of the two components (x-component and y-component) of the prediction motion vector are larger than the threshold, the prediction candidate identification flag is not generated. If only one component is smaller than the threshold, the threshold is generated. Generate a prediction candidate identification flag that identifies which motion vector prediction candidate was used as one larger component, and if two components are not greater than the threshold, determine which motion vector prediction candidate was used by the two components. A predictive candidate identification flag to be identified can be generated and encoded.

여기서, 차분 벡터의 각 컴포넌트의 절대값이 각 컴포넌트의 임계값보다 커서 예측 후보 식별 플래그를 생성하여 부호화하지 않는 경우와 차분 벡터의 각 컴포넌트의 절대값이 각 컴포넌트의 임계값보다 작거나 같아서 예측 후보 식별 플래그를 생성하여 부호화하는 경우 각각에 대해서 선택되는 움직임 벡터 예측 후보들 중 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별하는 예측 후보 식별 플래그를 따로따로 생성하여 부호화할 수 있다. 영상 복호화 장치에서도 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트 임계값보다 커서 예측 후보 식별 플래그가 전송되지 않은 경우와 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트 임계값보다 작거나 같아서 예측 후보 식별 플래그가 전송된 경우에 대해서 움직임 벡터 예측 후보들을 각각 따로따로 복호화하여 예측 움직임 벡터를 결정할 수 있다.Here, when the absolute value of each component of the difference vector is greater than the threshold value of each component, the prediction candidate identification flag is not generated and encoded, and the prediction candidate is less than or equal to the threshold value of each component. When generating and encoding the identification flag, a prediction candidate identification flag for identifying which motion vector prediction candidate among the motion vector prediction candidates selected for each is determined as the prediction motion vector may be separately generated and encoded. In the image decoding apparatus, the prediction candidate identification flag is not transmitted because the absolute value of each component of the difference vector is larger than the corresponding component threshold and the absolute value of each component of the difference vector is less than or equal to the corresponding component threshold. For the case where is transmitted, the motion vector prediction candidates may be separately decoded to determine the prediction motion vector.

예를 들어, 그룹 A의 선택된 움직임 벡터 예측 후보들 중 하나를 예측 움직임 벡터로서 결정하여 차분 벡터를 계산하고, 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 임계값보다 큰 경우에는 예측 후보 식별 플래그를 생성하여 부호화하지 않을 수 있으며, 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 임계값보다 작은 경우에는 그룹 B의 선택된 움직임 벡터 예측 후보들 중 하나를 예측 움직임 벡터로서 결정하여 차분 벡터를 계산하고, 그룹 B의 선택된 움직임 벡터 예측 후보들 중 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별하는 예측 후보 식별 플래그를 생성하여 부호화할 수 있다. 즉, 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 임계값보다 큰 경우에는 그룹 A의 선택된 움직임 벡터 예측 후보들을 사용하고, 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 임계값보다 작거나 같은 경우에는 그룹 B의 선택된 움직임 벡터 예측 후보들을 사용할 수 있다.For example, if one of the selected motion vector prediction candidates of the group A is determined as a predicted motion vector to calculate a difference vector, and if the absolute value of each component of the difference vector is greater than a threshold value of the corresponding component, If the absolute value of each component of the difference vector is smaller than the threshold value of the corresponding component, one of the selected motion vector prediction candidates of the group B is determined as a predicted motion vector to calculate a difference vector, A prediction candidate identification flag that identifies which of the selected motion vector prediction candidates of B has been determined as a prediction motion vector is generated and encoded. That is, when the absolute value of each component of the difference vector is greater than the threshold of the component, the selected motion vector prediction candidates of group A are used, and the absolute value of each component of the difference vector is less than or equal to the threshold of the corresponding component. In this case, the selected motion vector prediction candidates of group B may be used.

여기서, 각 컴포넌트 임계값(x-컴포넌트 임계값 및 y-컴포넌트 임계값)은 다양하게 계산될 수 있다. 일 예로, x-컴포넌트 임계값은 하나 이상의 움직임 벡터 예측 후보의 x-컴포넌트 중 가장 가까운 두 개의 움직임 벡터 예측 후보의 x-컴포넌트 간의 차이값을 소정의 수로 나눈 값들 중 최대값일 수 있으며, y-컴포넌트 임계값은 하나 이상의 움직임 벡터 예측 후보의 y-컴포넌트 중 가장 가까운 두 개의 움직임 벡터 예측 후보의 y-컴포넌트 간의 차이값을 소정의 수로 나눈 값들 중 최대값일 수 있다. 즉, 각 컴포넌트는 수학식 6과 같이, 서로 가장 인접한 두 개의 움직임 벡터 예측 후보(MVp Cand (i) MVp Cand (j))마다 각각 thre ij 를 계산한 후, 계산된 thre ij 중 최대값으로 계산될 수 있다.Here, each component threshold value (x-component threshold value and y-component threshold value) can be calculated in various ways. For example, the x-component threshold may be the maximum value of the difference between the x-components of the two closest motion vector prediction candidates among the x-components of the one or more motion vector prediction candidates divided by a predetermined number, and the y-component. The threshold may be a maximum value of values obtained by dividing a difference value between y-components of two nearest motion vector prediction candidates among y-components of one or more motion vector prediction candidates by a predetermined number. That is, each component is the MVp Cand (i) and the two nearest motion vector prediction candidates as shown in Equation (6 ) . After calculating thre ij for each MVp Cand (j) ), it may be calculated as the maximum value of the calculated thre ij .

Figure 112013041196111-pat00006
Figure 112013041196111-pat00006

임계값을 계산하는 과정을 설명하기 위해 예시적으로 나타낸 도 8을 참조하면, 움직임 벡터 예측 후보의 x-컴포넌트의 값이 도 8에 나타낸 바와 같이, '-4', '2', '4', '14'인 것으로 가정하면, 각 움직임 벡터 예측 후보의 x-컴포넌트의 값의 차이값을 2로 나눈 값은 구간 ①에서는 '3', 구간 ②에서는 '1', 구간 ③에서는 '5'가 되고, 최대값은 '5'이므로 임계값은 '5'가 된다.Referring to FIG. 8, which is illustrated by way of example to explain a process of calculating a threshold value, as shown in FIG. 8, the value of the x-component of the motion vector prediction candidate is '-4', '2', and '4'. , Assuming '14', the value obtained by dividing the difference of the x-component value of each motion vector prediction candidate by 2 is '3' in interval ①, '1' in interval ②, and '5' in interval ③. Since the maximum value is '5', the threshold value is '5'.

움직임 벡터 예측 후보와 현재 움직임 벡터를 각 컴포넌트별로 분리하여 예시적으로 나타낸 도 9를 참조하면, x-컴포넌트의 임계값은 '2'이고, y-컴포넌트의 임계값은 '3'이다. 이 경우, 예측 움직임 벡터의 x-컴포넌트는 '3'(MVp_cand[2])로 결정되어 차분 벡터의 x-컴포넌트는 '-3'이 되며, 예측 움직임 벡터의 y-컴포넌트는 '2'(MVp_cand[0])으로 결정되어 차분 벡터의 y-컴포넌트는 '+4'가 된다. 차분 벡터의 두 컴포넌트의 절대값이 각 컴포넌트의 임계값보다 크므로, 예측 후보 식별 플래그 부호화기(240)는 움직임 벡터 예측 후보 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 나타내기 위한 예측 후보 식별 플래그를 생성하여 부호화하지 않을 수 있다. 이와 같은 원리로, 영상 복호화 장치에서는 현재 움직임 벡터를 복원할 때, 예측 후보 식별 플래그가 없어 하나 이상의 움직임 벡터 예측 후보 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지 알 수 없는 경우에도, 차분 벡터의 x-컴포넌트와 y-컴포넌트가 각 컴포넌트의 임계값보다 큰지 여부를 확인하여 임계값보다 크면, 스스로 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 파악할 수 있다.Referring to FIG. 9 in which a motion vector prediction candidate and a current motion vector are separately illustrated for each component, the threshold of the x-component is '2' and the threshold of the y-component is '3'. In this case, the x-component of the predictive motion vector is determined to be '3' (MVp_cand [2]) so that the x-component of the differential vector is '-3' and the y-component of the predictive motion vector is '2' (MVp_cand [0]), and the y-component of the difference vector becomes '+4'. Since the absolute values of the two components of the difference vector are larger than the thresholds of each component, the prediction candidate identification flag encoder 240 predicts which motion vector prediction candidates among the motion vector prediction candidates are determined as the prediction motion vectors. An identification flag may not be generated and encoded. As described above, in the image decoding apparatus, when reconstructing the current motion vector, even if it is not known which motion vector prediction candidate is determined as the prediction motion vector among the one or more motion vector prediction candidates because there is no prediction candidate identification flag, the difference vector is determined. If x-component and y-component of are greater than the threshold value of each component, and if it is larger than the threshold value, it is possible to determine which motion vector prediction candidate was determined as the prediction motion vector by itself.

또한, 다른 예로, x-컴포넌트 임계값은 하나 이상의 움직임 벡터 예측 후보의 x-컴포넌트 중 가장 가까운 두 개의 움직임 벡터 예측 후보의 x-컴포넌트 간의 차이값을 소정의 수로 나눈 값들일 수 있으며, y-컴포넌트 임계값은 하나 이상의 움직임 벡터 예측 후보의 y-컴포넌트 중 가장 가까운 두 개의 움직임 벡터 예측 후보의 y-컴포넌트 간의 차이값을 소정의 수로 나눈 값들일 수 있다. 즉, 각 컴포넌트 임계값은 수학식 6과 같이 각 움직임 벡터 예측 후보들 사이의 거리를 2로 나눈 값들 중에서 가장 큰 값이 아니라, 수학식 7과 같이 각 움직임 벡터 예측 후보들 사이의 거리를 2로 나눈 값들로 계산될 수 있다. 따라서, 움직임 벡터 예측 후보가 N개 있을 경우, 각 컴포넌트의 임계값은 N-1개일 수 있다. 단, 수학식 7에서, 0 ≤ n < N이다.Also, as another example, the x-component thresholds may be values obtained by dividing a difference value between x-components of two closest motion vector prediction candidates among x-components of one or more motion vector prediction candidates by a predetermined number, and y-component. The thresholds may be values obtained by dividing the difference between the y-components of the two closest motion vector prediction candidates among the y-components of the one or more motion vector prediction candidates by a predetermined number. That is, each component threshold value is not the largest value among the distances between the motion vector prediction candidates divided by 2 as shown in Equation 6, but the values obtained by dividing the distance between the motion vector prediction candidates by 2 as shown in Equation 7 below. It can be calculated as Therefore, when there are N motion vector prediction candidates, the threshold value of each component may be N-1. However, in Equation 7, 0 ≦ n <N.

Figure 112013041196111-pat00007
Figure 112013041196111-pat00007

예를 들어, 도 8과 같은 경우, x-컴포넌트의 제 1 임계값(Threshold1)은 '3'이 될 수 있고, 제 2 임계값(Threshold2)은 '1'이 될 수 있고, 제 3 임계값(Threshold3)은 '5'가 될 수 있다.For example, Figure 8, and a case, the first threshold value of the x- component (Threshold 1) may be a "3", the second threshold (Threshold 2) may be a "1", the third The threshold 3 may be '5'.

이 경우, 예측 후보 식별 플래그 부호화기(240)는 차분 벡터의 각 컴포넌트의 절대값의 크기와 각 컴포넌트 임계값에 따라, 예측 후보 식별 플래그를 다르게 생성하고 부호화할 수 있다. 즉, 예측 후보 식별 플래그 부호화기(240)는 N-1개의 임계값을 내림차순으로 정렬을 하여 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 가장 작은 임계값보다 작거나 같은 경우, N개의 선택된 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로 결정되었는지를 식별하는 예측 후보 식별 플래그를 생성하고 부호화하며, 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 두 번째로 작은 임계값보다 작거나 같은 경우, 해당 컴포넌트의 가장 작은 임계값을 가지는 두 개의 움직임 벡터 예측 후보들의 사이에 현재 움직임 벡터가 없다고 가정을 하고 N-1개의 선택된 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로 결정되었는지를 식별하는 예측 후보 식별 플래그를 생성하여 부호화한다. 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 세 번째로 작은 임계값보다 작거나 같은 경우, 해당 컴포넌트의 가장 작은 임계값을 가지는 두 개의 움직임 벡터 예측 후보들의 사이에 현재 움직임 벡터가 없다고 가정을 하고, 해당 컴포넌트의 두 번째로 작은 임계값을 가지는 두 개의 움직임 벡터 예측 후보들 사이에도 현재 움직임 벡터가 없다고 가정을 하고, N-2개의 선택된 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로 결정되었는지를 식별하기 위한 예측 후보 식별 플래그를 생성하여 부호화한다.In this case, the prediction candidate identification flag encoder 240 may generate and encode the prediction candidate identification flag differently according to the magnitude of the absolute value of each component of the difference vector and the threshold of each component. That is, the prediction candidate identification flag encoder 240 sorts the N-1 thresholds in descending order so that when the absolute value of each component of the difference vector is less than or equal to the smallest threshold value of the corresponding component, the N selected motion vectors are selected. Generate and encode a prediction candidate identification flag that identifies which motion vector prediction candidate is determined as the prediction motion vector among the prediction candidates, wherein the absolute value of each component of the difference vector is less than or equal to the second smallest threshold of that component. In this case, it is assumed that there is no current motion vector between two motion vector prediction candidates having the smallest threshold value of the corresponding component, and which motion vector prediction candidate is determined as the prediction motion vector among the N-1 selected motion vector prediction candidates. By generating a prediction candidate identification flag that identifies the Encode If the absolute value of each component of the difference vector is less than or equal to the third smallest threshold of the component, the assumption is that there is no current motion vector between the two motion vector prediction candidates with the smallest threshold of the component. Assuming that there is no current motion vector between the two motion vector prediction candidates having the second smallest threshold of the component, a motion vector prediction candidate is determined as the prediction motion vector among the N-2 selected motion vector prediction candidates. And generate a prediction candidate identification flag to identify whether or not.

이와 같은 방법으로 차분 벡터의 각 컴포넌트의 절대값과 해당 컴포넌트의 각 임계값을 차례로 비교하여 예측 후보 식별 플래그를 생성하여 부호화하며, 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 모든 임계값보다 큰 경우에는, N개의 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별하기 위한 예측 후보 식별 플래그를 생성하여 부호화할 필요가 없다. 이와 같이, 차분 벡터의 각 컴포넌트의 절대값과 해당 컴포넌트의 임계값들에 따라서, 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별하기 위한 예측 후보 식별 플래그의 길이가 달라질 수 있다.In this way, a predictive candidate identification flag is generated and encoded by comparing the absolute value of each component of the difference vector with each threshold value of the corresponding component, and the absolute value of each component of the difference vector is greater than all the threshold values of the corresponding component. In this case, it is not necessary to generate and encode a prediction candidate identification flag for identifying which of the N motion vector prediction candidates is determined as the prediction motion vector. As such, depending on the absolute value of each component of the difference vector and the threshold values of the corresponding component, the length of the prediction candidate identification flag for identifying which motion vector prediction candidate is determined as the prediction motion vector may vary.

위와 같은 방법에 따르면, 차분 벡터의 각 컴포넌트의 절대값이 모든 임계값보다 큰 경우에는, 움직임 벡터 예측 후보의 각 컴포넌트에 대해 개별적으로 선택하여 예측 움직임 벡터를 결정할 수 있다. 차분 벡터의 각 컴포넌트의 절대값 중 하나의 컴포넌트만 모든 임계값보다 큰 경우에는, 모든 임계값보다 크지 않은 절대값을 가지는 차분 벡터의 컴포넌트에 대해서만 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정했는지를 식별하기 위한 예측 후보 식별 플래그를 전송한다.According to the above method, when the absolute value of each component of the difference vector is larger than all the thresholds, the prediction motion vector may be determined by individually selecting each component of the motion vector prediction candidate. If only one component of the absolute value of each component of the difference vector is greater than all the thresholds, the motion vector prediction candidates are predicted among the motion vector prediction candidates only for the components of the difference vector having an absolute value not greater than all the thresholds. A prediction candidate identification flag is sent to identify whether the decision was made as a vector.

즉, 차분 벡터의 두 컴포넌트의 절대값 중 하나만 가장 큰 임계값을 넘은 경우에는, 가장 큰 임계값을 넘지 않은 절대값을 가지는 컴포넌트를 가지는 움직임 벡터 예측 후보를 식별하기 위한 예측 후보 식별 플래그를 생성하여 부호화할 수 있다. 차분 벡터의 두 컴포넌트의 절대값이 모두 가장 큰 임계값보다 크지 못한 경우에는, 각 컴포넌트에 대해 독립적으로 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로 결정되었는지를 식별하기 위한 예측 후보 식별 플래그를 생성하여 부호화하는 것이 아니라, 각 컴포넌트 두 개가 동시에 예측 움직임 벡터로 결정되는 움직임 벡터 예측 후보를 식별하기 위한 예측 후보 식별 플래그를 생성하여 부호화할 수 있다.That is, when only one of the absolute values of two components of the difference vector exceeds the largest threshold, a prediction candidate identification flag for identifying a motion vector prediction candidate having a component having an absolute value not exceeding the largest threshold is generated. Can be encoded. If the absolute values of both components of the difference vector are not greater than the largest threshold, a prediction candidate identification flag is generated and encoded to independently identify for each component which motion vector prediction candidate is determined as the prediction motion vector. Rather, two components may simultaneously generate and encode a prediction candidate identification flag for identifying a motion vector prediction candidate determined as a prediction motion vector.

예를 들어, 전술한 도 8과 복수 개의 임계값에 따른 예측 후보 식별 플래그를 예시적으로 나타낸 도 10을 참조하면, 예측 후보의 개수는 4개이고 각각의 임계값은 '1', '3', '5'가 된다. 이에 따라, 도 10에서는 3개의 임계값에 따라 나누어진 구간을 나타내었다. ①로 표시된 구간은 움직임 벡터 예측 후보들의 x-컴포넌트를 나타낸 것이고, ②로 표시된 구간은 차분 벡터의 x-컴포넌트의 절대값이 x-컴포넌트의 가장 작은 임계값보다 작거나 같은 경우의 현재 움직임 벡터의 x-컴포넌트가 위치하는 구간을 나타낸 것이고, ③으로 표시된 구간은 차분 벡터의 x-컴포넌트의 절대값이 x-컴포넌트의 두 번째로 작은 임계값보다 작거나 같은 경우의 현재 움직임 벡터의 x-컴포넌트가 위치하는 구간을 나타낸 것이고, ④로 표시된 구간은 차분 벡터의 x-컴포넌트의 절대값이 x-컴포넌트의 가장 큰 임계값보다 작거나 같은 경우의 현재 움직임 벡터의 x-컴포넌트가 위치하는 구간을 나타낸 것이고, ⑤로 표시된 구간은 차분 벡터의 x-컴포넌트의 절대값이 x-컴포넌트의 가장 큰 임계값보다 큰 경우의 현재 움직임 벡터의 x-컴포넌트가 위치하는 구간을 나타낸 것이다.For example, referring to FIG. 8 and FIG. 10 exemplarily illustrating a prediction candidate identification flag according to a plurality of thresholds, the number of prediction candidates is four and each threshold is '1', '3', Becomes '5'. Accordingly, FIG. 10 illustrates a section divided according to three threshold values. The interval denoted by ① indicates the x-components of the motion vector prediction candidates, and the interval denoted by ② denotes the current motion vector when the absolute value of the x-component of the difference vector is less than or equal to the smallest threshold of the x-component. where the x-component is located, and the section marked with ③ is the x-component of the current motion vector when the absolute value of the x-component of the difference vector is less than or equal to the second smallest threshold of the x-component. The interval indicated by ④ indicates the interval in which the x-component of the current motion vector is located when the absolute value of the x-component of the difference vector is less than or equal to the largest threshold of the x-component. , The interval ⑤ denotes the x-component of the current motion vector when the absolute value of the x-component of the difference vector is greater than the largest threshold of the x-component. A shows a section in which location.

예측 후보 식별 플래그 부호화기(240)는 ②로 표시된 구간에서는 4개의 움직임 벡터 예측 후보 중에서 어떠한 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정했는지를 식별하는 예측 후보 식별 플래그를 생성하여 부호화할 수 있고, ③으로 표시된 구간에서는 3개의 움직임 벡터 예측 후보 중에서 어떠한 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정했는지를 식별하는 예측 후보 식별 플래그를 생성하여 부호화할 수 있으며, ④로 표시된 구간에서는 2개의 움직임 벡터 예측 후보 중에서 어떠한 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정했는지를 식별하는 예측 후보 식별 플래그를 생성하여 부호화할 수 있으며, ⑤로 표시된 구간에서는 예측 후보 식별 플래그를 생성하지 않을 수 있다.The prediction candidate identification flag encoder 240 may generate and encode a prediction candidate identification flag that identifies which motion vector prediction candidate is determined as the prediction motion vector among the four motion vector prediction candidates in the section denoted by ②. In the marked section, a prediction candidate identification flag for identifying which motion vector prediction candidate is determined as the prediction motion vector among three motion vector prediction candidates may be generated and encoded. In the section indicated by ④, any of the two motion vector prediction candidates may be generated. A prediction candidate identification flag for identifying whether the motion vector prediction candidate is determined as the prediction motion vector may be generated and encoded, and the prediction candidate identification flag may not be generated in the section denoted by 5.

현재 움직임 벡터의 x-컴포넌트가 '8'인 경우, 예측 움직임 벡터의 x-컴포넌트는 '4'가 된다. 이때, 차분 벡터의 x-컴포넌트는 '+4'이므로 그 절대값이 x-컴포넌트의 가장 큰 임계값인 '5'보다 작고, 두 번째로 큰 임계값인 '3'보다 크므로, 움직임 벡터 예측 후보의 x-컴포넌트 '4' 및 '14' 중 하나를 식별하기 위한 예측 후보 식별 플래그를 생성하여 부호화하면 된다.When the x-component of the current motion vector is '8', the x-component of the predictive motion vector is '4'. At this time, since the x-component of the difference vector is '+4', its absolute value is smaller than '5', which is the largest threshold of the x-component, and is greater than '3', which is the second largest threshold, so that the motion vector is predicted. The prediction candidate identification flag for identifying one of the x-components '4' and '14' of the candidate may be generated and encoded.

영상 복호화 장치에서는 차분 벡터의 x-컴포넌트가 '+4'이므로, 움직임 벡터 예측 후보의 x-컴포넌트 '-4'를 예측 움직임 벡터의 x-컴포넌트로 가정한 경우, 현재 움직임 벡터의 x-컴포넌트를 '0'으로 가정할 수 있다. 하지만, 현재 움직임 벡터의 x-컴포넌트가 '0'이라고 가정한 경우, 최적의(즉, 차분 벡터의 x-컴포넌트 값을 최소로 하는) 예측 움직임 벡터의 x-컴포넌트는 '2'가 되므로, 움직임 벡터 예측 후보의 x-컴포넌트 '-4'는 예측 움직임 벡터가 아님을 알 수 있다. 이와 같은 방법으로, 움직임 벡터 예측 후보의 x-컴포넌트 '-4'와 '2'는 예측 움직임 벡터로서 결정되지 않았음을 알 수 있다. 따라서, 예측 움직임 벡터로서 결정될 수 있는 움직임 벡터 예측 후보의 x-컴포넌트 '4'와 '14' 중에서 어느 값이 예측 움직임 벡터의 x-컴포넌트로 결정되었는지를 식별하기 위한 예측 후보 식별 플래그를 생성하여 부호화하면 된다. 이와 같이, 각 컴포넌트에 대해 복수 개의 임계값을 계산하고, 차분 벡터의 각 컴포넌트의 절대값과 해당 컴포넌트의 복수 개의 임계값을 비교하여 예측 후보 식별 플래그를 다르게 생성하고 부호화하면, 현재 움직임 벡터를 부호화할 때 전송해야 하는 예측 후보 식별 플래그의 부호화된 비트량을 줄일 수 있고, 그에 따라 압축 효율을 향상시킬 수 있다.Since the x-component of the difference vector is '+4' in the image decoding apparatus, when the x-component '-4' of the motion vector prediction candidate is assumed to be the x-component of the predictive motion vector, the x-component of the current motion vector is determined. Can be assumed to be '0'. However, assuming that the x-component of the current motion vector is '0', the x-component of the optimal (i.e., minimizing the value of the x-component of the differential vector) predicted motion vector becomes '2', so the motion It can be seen that the x-component '-4' of the vector prediction candidate is not the prediction motion vector. In this way, it can be seen that the x-components '-4' and '2' of the motion vector prediction candidate are not determined as the prediction motion vectors. Accordingly, by generating and encoding a prediction candidate identification flag for identifying which value among the x-components '4' and '14' of the motion vector prediction candidate that can be determined as the prediction motion vector is determined as the x-component of the prediction motion vector Just do it. As described above, when a plurality of thresholds are calculated for each component, and the prediction candidate identification flag is generated and encoded differently by comparing the absolute values of each component of the difference vector and the plurality of threshold values of the corresponding component, the current motion vector is encoded. In this case, the coded bit amount of the prediction candidate identification flag to be transmitted can be reduced, thereby improving the compression efficiency.

영상 복호화 장치에서는 이러한 예측 후보 식별 플래그만을 이용하여 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지 식별할 수 있다. The image decoding apparatus may identify which motion vector prediction candidate is determined as the prediction motion vector using only the prediction candidate identification flag.

또 다른 예로서, 예측 움직임 벡터 결정기(220)는 선택된 움직임 벡터 예측 후보들 중에서 각 움직임 벡터 예측 후보들 간의 거리가 임의의 임계값보다 작을 경우, 임의의 임계값보다 작은 두 움직임 벡터 예측 후보 중 어느 하나만 선택 선택된 것으로 간주하여 다른 움직임 벡터 예측 후보를 움직임 벡터 예측 후보들에서 제외하고, 제외되지 않은 나머지 움직임 벡터 예측 후보들 중에서 하나의 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정할 수 있다. 영상 복호화 장치에서도 선택된 움직임 벡터 예측 후보들 중에서 움직임 벡터 예측 후보들 간의 거리가 임의의 임계값보다 작을 경우, 임의의 임계값보다 작은 두 움직임 벡터 예측 후보 중 하나만 선택된 것으로 간주하고 다른 움직임 벡터 예측 후보를 움직임 벡터 예측 후보들에서 제외시켜, 나머지 움직임 벡터 예측 후보들 중에서 하나를 예측 움직임 벡터로서 결정할 수 있다.As another example, the predicted motion vector determiner 220 selects only one of two motion vector prediction candidates smaller than any threshold value when the distance between each motion vector prediction candidate is smaller than a certain threshold among the selected motion vector prediction candidates. A motion vector prediction candidate of the remaining motion vector prediction candidates not excluded may be determined as the prediction motion vector except for the other motion vector prediction candidates as motion vector prediction candidates as regarded as selected. In the video decoding apparatus, when the distance between the motion vector prediction candidates among the selected motion vector prediction candidates is smaller than an arbitrary threshold value, only one of two motion vector prediction candidates smaller than an arbitrary threshold value is considered to be selected, and the other motion vector prediction candidates are regarded as motion vector. By excluding from the prediction candidates, one of the remaining motion vector prediction candidates can be determined as the prediction motion vector.

예를 들어, 임의의 임계값이 '2'이고 선택된 움직임 벡터 예측 후보들이 3개일 경우, 첫 번째 움직임 벡터 예측 후보가 '-5'이고, 두 번째 움직임 벡터 예측 후보가 '8'이고, 세 번째 움직임 벡터 예측 후보가 '9'라면, 두 번째 움직임 벡터 예측 후보와 세 번째 움직임 벡터 예측 후보의 거리가 임의의 임계값보다 작으므로, 세 번째 움직임 벡터 예측 후보를 움직임 벡터 예측 후보들에서 제외하고 첫 번째 움직임 벡터 예측 후보와 두 번째 움직임 벡터 예측 후보 중에서 하나를 예측 움직임 벡터로서 결정할 수 있다. 이와 같은 방법을 이용하면, 선택된 움직임 벡터 예측 후보들의 개수를 줄여 예측 후보 식별 플래그를 부호화하기 위한 비트량을 줄일 수 있다.For example, when an arbitrary threshold value is '2' and three motion vector prediction candidates are selected, the first motion vector prediction candidate is '-5', the second motion vector prediction candidate is '8' If the motion vector prediction candidate is '9', since the distance between the second motion vector prediction candidate and the third motion vector prediction candidate is smaller than a certain threshold value, the third motion vector prediction candidate is excluded from the motion vector prediction candidates, It is possible to determine one of the motion vector prediction candidate and the second motion vector prediction candidate as a prediction motion vector. Using this method, the number of bits for encoding the prediction candidate identification flag can be reduced by reducing the number of selected motion vector prediction candidates.

또한, 예측 후보 식별 플래그 부호화기(240)는 예측 후보 식별 플래그를 생성하는 경우, 다양한 방식으로 예측 후보 식별 플래그를 생성할 수 있다. 일 예로서, 예측 후보 식별 플래그 부호화기(240)는 예측 움직임 벡터로서 결정된 움직임 벡터 예측 후보가 하나 이상의 움직임 벡터 예측 후보 중 현재 움직임 벡터로 결정될 확률이 최고인 움직임 벡터 예측 후보인 경우, 예측 후보 식별 플래그가 최소의 비트가 되도록, 예측 후보 식별 플래그를 생성할 수 있다.In addition, when generating the prediction candidate identification flag, the prediction candidate identification flag encoder 240 may generate the prediction candidate identification flag in various ways. As an example, when the motion vector prediction candidate determined as the prediction motion vector is the motion vector prediction candidate having the highest probability of being determined as the current motion vector among the one or more motion vector prediction candidates, the prediction candidate identification flag encoder 240 may determine that the prediction candidate identification flag is the same. The prediction candidate identification flag may be generated to be the minimum bit.

즉, 수학식 8과 같이, 움직임 벡터 예측 후보들의 개수(NumOfMVpCand)를 이용하여 예측 후보 식별 플래그를 부호화하는 데 필요한 최대 길이(L)을 계산한다.That is, as shown in Equation 8, the maximum length L necessary for encoding the prediction candidate identification flag is calculated using the number NumOfMVp Cand of the motion vector prediction candidates.

Figure 112013041196111-pat00008
Figure 112013041196111-pat00008

Figure 112013041196111-pat00009
Figure 112013041196111-pat00009

수학식 9와 같이, 계산된 움직임 벡터 예측 후보들의 개수에서 '1'을 빼고 log2를 취한 M의 값이 정수일 때, 예측 후보 식별 플래그의 전송 비트를 예시적으로 나타낸 도 11과 같이, 예측 움직임 벡터로 결정된 움직임 벡터 예측 후보를 식별하기 위한 예측 후보 식별 플래그를 생성하여 부호화할 때, 가장 확률이 높은 움직임 벡터 예측 후보가 예측 움직임 벡터일 경우, 예측 후보 식별 플래그를 한 비트로 생성하고 부호화한다.As shown in Equation 9, when the value of M obtained by subtracting '1' from the number of calculated motion vector prediction candidates and taking log 2 is an integer, as shown in FIG. 11 exemplarily illustrating the transmission bit of the prediction candidate identification flag, the prediction motion When generating and encoding a prediction candidate identification flag for identifying a motion vector prediction candidate determined as a vector, when the most likely motion vector prediction candidate is a prediction motion vector, the prediction candidate identification flag is generated and encoded by one bit.

예를 들어, 선택된 움직임 벡터 예측 후보들이 3개인 경우(MVp_cand[i]:0≤i <3), 부호화하는데 필요한 최대 비트 길이 L은 '2'이므로, 선택된 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별하는 예측 후보 식별 플래그를 2비트로 생성할 수 있다. 이때, 수학식 9에 의하여 M의 값이 정수이므로, 확률이 가장 높은 움직임 벡터 예측 후보는 한 비트로 생성하여 부호화한다. 한 비트의 예측 후보 식별 플래그가 '1'인 경우에는 확률이 가장 높은 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정된 것을 식별하며, '0'인 경우에는 확률이 가장 높은 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되지 않은 것을 식별하므로, 추가적인 비트를 생성하여 부호화함으로써, 나머지 2개의 움직임 벡터 예측 후보들을 식별하기 위한 2비트를 생성하여 부호화한다. M이 정수인 경우, 영상 복호화 장치에서는 예측 후보 식별 플래그를 한 비트만 읽어서 확률이 가장 높은 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별하고 확률이 가장 높은 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되지 않은 경우에만, 비트를 추가로 읽어서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별한다.For example, if there are three selected motion vector prediction candidates (MVp_cand [i]: 0 ≦ i <3), since the maximum bit length L required for encoding is '2', any motion vector prediction candidate among the selected motion vector prediction candidates is selected. A 2-bit prediction candidate identification flag may be generated that identifies whether is determined as a predicted motion vector. At this time, since the value of M is an integer according to Equation 9, the motion vector prediction candidate having the highest probability is generated and encoded with one bit. If one bit of the prediction candidate identification flag is '1', the motion vector prediction candidate having the highest probability is determined as the prediction motion vector, and if it is '0', the motion vector prediction candidate having the highest probability is the prediction motion vector. Since it is not determined as, the second bit is generated and encoded by generating and encoding additional bits, thereby generating and encoding two bits for identifying the remaining two motion vector prediction candidates. If M is an integer, the image decoding apparatus reads only one bit of the prediction candidate identification flag to identify whether the motion vector prediction candidate having the highest probability is determined as the prediction motion vector, and the motion vector prediction candidate having the highest probability is determined as the prediction motion vector. Only if not, read the bit further to identify which motion vector prediction candidate was determined as the predicted motion vector.

이때, 예측 후보 식별 플래그 부호화기(240)는 하나 이상의 움직임 벡터 예측 후보를 이용하여 현재 프레임의 하나 이상의 영역을 부호화함으로써, 하나 이상의 움직임 벡터 예측 후보 각각에 대해 현재 움직임 벡터로 결정될 확률을 계산할 수도 있으며, 임의로 지정되어 설정되는 확률에 따르거나 임의로 지정되어 설정되는 움직임 벡터 예측 후보를 확률이 가장 높은 움직임 벡터 예측 후보로 선택할 수 있다.In this case, the prediction candidate identification flag encoder 240 may calculate the probability to be determined as the current motion vector for each of the one or more motion vector prediction candidates by encoding one or more regions of the current frame using the one or more motion vector prediction candidates. A motion vector prediction candidate that is randomly designated or set according to a randomly designated probability may be selected as a motion vector prediction candidate having the highest probability.

다른 예로서, 예측 후보 식별 플래그 부호화기(240)는 하나 이상의 움직임 벡터 예측 후보 중 적어도 하나 이상이 동일하지 않은 경우에만 예측 후보 식별 플래그를 생성하여 부호화할 수 있다. 즉, 선택된 움직임 벡터 예측 후보들이 동일한 예측 후보들은 하나로 간주한다. 모든 선택된 예측 후보가 모두 동일한 경우에는 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로 결정되더라도 해당 움직임 벡터 예측 후보가 최적이 되므로, 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별하는 예측 후보 식별 플래그를 생성하여 부호화하지 않을 수 있다. 이 경우, 영상 복호화 장치에서도 예측 후보 식별 플래그를 복호화하지 않는다.As another example, the prediction candidate identification flag encoder 240 may generate and encode the prediction candidate identification flag only when at least one or more of the one or more motion vector prediction candidates are not the same. That is, the prediction candidates selected by the selected motion vector prediction candidates are regarded as one. If all the selected prediction candidates are all the same, the corresponding motion vector prediction candidate is optimal even if any motion vector prediction candidate is determined as the prediction motion vector. Therefore, it is identified which motion vector prediction candidate is determined as the prediction motion vector among the motion vector prediction candidates. The prediction candidate identification flag may be generated and not encoded. In this case, the video decoding apparatus does not decode the prediction candidate identification flag.

또 다른 예로서, 예측 후보 식별 플래그 부호화기(240)는 현재 블록의 블록 타입이 SKIP 모드인 경우, P 블록인 경우 및 B 블록인 경우 중 하나 이상의 경우, 각 경우에 대해 예측 후보 식별 플래그를 생성하여 부호화할 수 있다. 즉, 예측 움직임 벡터 결정기(220)는 현재 블록의 블록 타입이 SKIP 모드인 경우, P 블록인 경우 및 B 블록인 경우, 각각에 대해서 서로 다른 움직임 벡터 예측 후보를 선택할 수 있다. 이 경우, 예측 후보 식별 플래그 부호화기(240)는 각 경우에 따라 예측 후보 선택 플래그를 다르게 생성하여 부호화할 수 있다. 이때, 예측 후보 선택기(220)와 예측 후보 선택 부호화기(250)에서도 블록의 블록 타입이 SKIP 모드일 경우, P 블록인 경우, B 블록인 경우에 따라 각각 다르게 선택된 움직임 벡터 예측 후보들을 비트스트림의 헤더에 삽입하여 전송한다. 영상 복호화 장치에서도 현재 블록의 블록 타입이 SKIP 모드일 경우, P 블록인 경우, B 블록인 경우에 따라 각각 다르게 선택된 움직임 벡터 예측 후보들을 복호화하여 결정할 수 있다.As another example, the prediction candidate identification flag encoder 240 generates a prediction candidate identification flag for each case when the block type of the current block is the SKIP mode, the P block, or the B block. Can be encoded. That is, the prediction motion vector determiner 220 may select different motion vector prediction candidates for each of the block type of the current block in the SKIP mode, the P block, and the B block. In this case, the prediction candidate identification flag encoder 240 may generate and encode a prediction candidate selection flag differently in each case. In this case, in the prediction candidate selector 220 and the prediction candidate selection encoder 250, the motion vector prediction candidates selected differently according to the case of the P block and the B block in the block type of the SKIP mode are SKIP mode, respectively. Insert into and send. In the video decoding apparatus, when the block type of the current block is the SKIP mode, the P block, and the B block, the motion vector prediction candidates selected differently may be decoded and determined.

도 12는 본 발명의 일 실시예에 따른 움직임 벡터 부호화 방법을 설명하기 위한 순서도이다.12 is a flowchart illustrating a motion vector encoding method according to an embodiment of the present invention.

부호화기(150)는 하나 이상의 움직임 벡터 예측 후보를 선택하고(S1210), 하나 이상의 움직임 벡터 예측 후보 중에서 하나의 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정하며(S1220), 기 결정된 현재 움직임 벡터에서 단계 S1220에서 결정된 예측 움직임 벡터를 감산하여 차분 벡터를 계산하고(S1230), 계산된 차분 벡터를 부호화한다(S1240).The encoder 150 selects one or more motion vector prediction candidates (S1210), and determines one motion vector prediction candidate among the one or more motion vector prediction candidates as a prediction motion vector (S1220), and then, in step S1220, the current motion vector is determined. A difference vector is calculated by subtracting the predicted motion vector determined in S1230, and the calculated difference vector is encoded (S1240).

여기서, 부호화기(150)는 단계 S1210에서 선택된 하나 이상의 움직임 벡터 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별하는 예측 후보 식별 플래그를 생성하여 부호화할 수 있다. 또한, 부호화기(150)가 하나 이상의 움직임 벡터 예측 후보를 선택하는 방법, 예측 움직임 벡터를 결정하는 방법과 예측 후보 식별 플래그를 생성하여 부호화하는 방법에 대해서는 도 2 내지 도 11을 통해 전술하였으므로, 상세한 설명은 생략한다. 또한, 도 12에서 나타낸 단계의 순서는 예시일 뿐, 본 발명이 이러한 순서에 반드시 한정되는 것은 아니며 그 순서는 선택적으로 변경될 수 있으며, 경우에 따라서는 일부 또는 전부의 단계가 병렬적으로 수행될 수도 있다.Here, the encoder 150 may generate and encode a prediction candidate identification flag that identifies which motion vector prediction candidate is determined as the prediction motion vector among the one or more motion vectors selected in step S1210. Also, since the encoder 150 selects one or more motion vector prediction candidates, determines a prediction motion vector, and generates and encodes a prediction candidate identification flag, the method described above with reference to FIGS. 2 to 11 will be described in detail. Is omitted. In addition, the order of steps shown in FIG. 12 is merely an example, and the present invention is not necessarily limited to this order, and the order may be selectively changed, and in some cases, some or all of the steps may be performed in parallel. It may be.

도 13은 본 발명의 일 실시예에 따른 영상 부호화 방법을 설명하기 위한 순서도이다.13 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.

영상 부호화 장치(100)는 현재 블록의 현재 움직임 벡터를 결정하고 결정된 현재 움직임 벡터를 이용하여 예측 블록을 생성하며(S1310), 현재 블록과 예측 블록을 감산하여 잔차 블록을 생성하고 잔차 블록을 변환하여 양자화하고 부호화한다(S1320). 영상 부호화 장치(100)는 하나 이상의 움직임 벡터 예측 후보 중에서 하나의 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정하고(S1330), 현재 움직임 벡터에서 단계 S1330에서 결정된 예측 움직임 벡터를 감산한 차분 벡터를 부호화한다(S1340). 이때, 영상 부호화 장치(100)는 예측 후보 식별 플래그를 생성하여 부호화할 수 있다. 영상 부호화 장치(100)는 단계 S1320에서 부호화된 잔차 블록 및 단계 S1340에서 부호화된 차분 벡터를 포함하는 비트스트림을 생성하여 출력한다(S1350). 영상 부호화 장치(100)는 예측 후보 식별 플래그가 부호화된 경우에는 비트스트림에 부호화된 예측 후보 식별 플래그를 추가로 포함시킬 수 있다. 또한, 도 13에서 나타낸 단계의 순서는 예시일 뿐, 본 발명이 이러한 순서에 반드시 한정되는 것은 아니며 그 순서는 선택적으로 변경될 수 있으며, 경우에 따라서는 일부 또는 전부의 단계가 병렬적으로 수행될 수도 있다.The image encoding apparatus 100 determines a current motion vector of the current block, generates a prediction block using the determined current motion vector (S1310), generates a residual block by subtracting the current block and the prediction block, and converts the residual block. Quantization and encoding (S1320). The image encoding apparatus 100 determines one of the motion vector prediction candidates as a predicted motion vector as a predicted motion vector (S1330) and encodes a difference vector obtained by subtracting the predicted motion vector determined in step S1330 from the current motion vector (S1340). In this case, the image encoding apparatus 100 may generate and encode a prediction candidate identification flag. The image encoding apparatus 100 generates and outputs a bitstream including the residual block encoded in step S1320 and the difference vector encoded in step S1340 (S1350). When the prediction candidate identification flag is encoded, the image encoding apparatus 100 may further include the encoded prediction candidate identification flag in the bitstream. In addition, the order of the steps shown in FIG. 13 is merely an example, and the present invention is not necessarily limited to this order, and the order may be selectively changed, and in some cases, some or all of the steps may be performed in parallel. It may be.

이상에서 전술한 바와 같이, 영상 부호화 장치(100)에 의해 비트스트림으로 부호화된 영상은 실시간 또는 비실시간으로 인터넷, 근거리 무선 통신망, 무선랜망, 와이브로망, 이동통신망 등의 유무선 통신망 등을 통하거나 케이블, 범용 직렬 버스(USB: Universal Serial Bus) 등의 통신 인터페이스를 통해 후술할 영상 복호화 장치로 전송되어 영상 복호화 장치에서 복호화되어 영상으로 복원되고 재생될 수 있다.As described above, the image encoded in the bitstream by the video encoding apparatus 100 is connected to a wired or wireless communication network such as the Internet, a near field communication network, a wireless LAN network, a WiBro network, a mobile communication network, or the like in real time or in real time. The image decoding apparatus may be transmitted to an image decoding apparatus to be described later through a communication interface such as a universal serial bus (USB), and decoded by the image decoding apparatus to restore and reproduce the image.

도 14는 본 발명의 일 실시예에 따른 영상 복호화 장치를 간략하게 나타낸 블록 구성도이다.14 is a block diagram schematically illustrating an image decoding apparatus according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 복호화 장치(1400)는 복호화기(1410), 역 양자화기(1420), 역 변환기(1430), 예측기(1440), 가산기(1450) 및 메모리(1460)을 포함하여 구성될 수 있다. 이러한 영상 복호화 장치(1400)는 개인용 컴퓨터(PC: Personal Computer), 노트북 컴퓨터, 개인 휴대 단말기(PDA: Personal Digital Assistant), 휴대형 멀티미디어 플레이어(PMP: Portable Multimedia Player), 플레이스테이션 포터블(PSP: PlayStation Portable), 이동통신 단말기(Mobile Communication Terminal) 등일 수 있으며, 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, 영상을 복호화하기 위한 각종 프로그램과 데이터를 저장하기 위한 메모리, 프로그램을 실행하여 연산 및 제어하기 위한 마이크로프로세서 등을 구비하는 다양한 장치를 의미한다.The image decoding apparatus 1400 according to an embodiment of the present invention includes a decoder 1410, an inverse quantizer 1420, an inverse converter 1430, a predictor 1440, an adder 1450, and a memory 1460. Can be configured. The video decoding apparatus 1400 may be a personal computer (PC), a notebook computer, a personal digital assistant (PDA), a portable multimedia player (PMP), or a PlayStation Portable (PSP). ), A communication device such as a communication modem for communicating with various devices or a wired / wireless communication network, a memory for storing various programs and data for decoding an image, and executing a program. Means a variety of devices including a microprocessor for operation and control.

복호화기(1410)는 비트스트림으로부터 부호화된 잔차 블록과 부호화된 차분 벡터를 추출하고 복호화하여 잔차 블록 및 차분 벡터를 복원하며, 하나 이상의 움직임 벡터 예측 후보 중에서 하나의 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정하고 예측 움직임 벡터와 복원된 차분 벡터를 가산하여 현재 블록의 현재 움직임 벡터를 복원한다.The decoder 1410 extracts and decodes the encoded residual block and the encoded difference vector from the bitstream, reconstructs the residual block and the difference vector, and converts one motion vector prediction candidate from one or more motion vector prediction candidates into a prediction motion vector. Determine and reconstruct the current motion vector of the current block by adding the predicted motion vector and the reconstructed difference vector.

여기서, 복호화기(1410)는 비트스트림으로부터 부호화된 예측 후보 식별 플래그를 추가로 추출하고 복호화하여 예측 후보 식별 플래그를 추가로 복원하되, 하나 이상의 움직임 벡터 예측 후보 중에서 복원된 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정할 수 있다.Here, the decoder 1410 further extracts and decodes the encoded prediction candidate identification flag from the bitstream to further reconstruct the prediction candidate identification flag, and is identified by the reconstructed prediction candidate identification flag among one or more motion vector prediction candidates. The motion vector prediction candidate may be determined as the prediction motion vector.

또한, 복호화기(1410)는 비트스트림으로부터 부호화된 예측 후보 식별 플래그와 부호화된 일부 예측 후보 식별 플래그를 복호화하여 예측 후보 식별 플래그 및 일부 예측 후보 식별 플래그를 복원하고, 하나 이상의 움직임 벡터 예측 후보 중에서 복원된 일부 예측 후보 식별 플래그에 의해 식별되는 일부 움직임 벡터 예측 후보 중에서 복원된 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정할 수 있다.In addition, the decoder 1410 decodes the encoded prediction candidate identification flag and the encoded partial prediction candidate identification flag from the bitstream to reconstruct the prediction candidate identification flag and the partial prediction candidate identification flag, and restores one or more motion vector prediction candidates. The motion vector prediction candidate identified by the reconstructed prediction candidate identification flag may be determined as the prediction motion vector among some motion vector prediction candidates identified by the predetermined prediction candidate identification flag.

또한, 복호화기(1410)는 비트스트림으로부터 부호화된 예측 후보 식별 플래그를 추가로 추출하고 복호화하여 예측 후보 식별 플래그를 추가로 복원하되, 복원된 차분 벡터의 x-컴포넌트의 절대값 및 y-컴포넌트의 절대값 중 하나 이상이 각각 기 설정된 x-컴포넌트 임계값 및 기 설정된 y-컴포넌트 임계값 중 하나 이상보다 작거나 같은 경우에는, 복원된 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보의 x-컴포넌트 및 y-컴포넌트 중 하나 이상을 예측 움직임 벡터의 x-컴포넌트 및 y-컴포넌트 중 하나 이상으로서 결정할 수 있다.Further, the decoder 1410 further extracts and decodes the encoded prediction candidate identification flag from the bitstream to further reconstruct the prediction candidate identification flag, but further extracts the absolute value and the y-component of the x-component of the reconstructed difference vector. If at least one of the absolute values is less than or equal to at least one of the preset x-component threshold and the preset y-component threshold, respectively, the x-component of the motion vector prediction candidate identified by the reconstructed prediction candidate identification flag. And one or more of the y-component may be determined as one or more of an x-component and a y-component of the predictive motion vector.

역 양자화기(1420)는 복호화기(1410)에 의해 복원된 잔차 블록을 역 양자화하고, 역 변환기(1430)는 역 양자화기(1420)에 의해 역 양자화된 잔차 블록을 역 변환하며, 예측기(1440)는 복호화기(1410)에 의해 복원된 현재 움직임 벡터를 이용하여 예측 블록을 생성하며, 가산기(1450)는 역 변환기(1430)에 의해 역 변환된 잔차 블록과 예측기(1440)에 의해 생성된 예측 블록을 가산하여 현재 블록을 복원한다. 메모리(1460)는 가산기(1450)로부터 출력되는 복원된 현재 블록을 프레임 단위로 참조 프레임으로서 저장하여 예측기(1440)에서 참조 프레임을 이용할 수 있도록 한다.Inverse quantizer 1420 inverse quantizes the residual block reconstructed by decoder 1410, inverse transformer 1430 inverse transforms the inverse quantized residual block by inverse quantizer 1420, and predictor 1440 ) Generates a predictive block using the current motion vector reconstructed by the decoder 1410, and the adder 1450 predicts the residual block inversely transformed by the inverse transformer 1430 and the predictor 1440. Add the block to restore the current block. The memory 1460 stores the reconstructed current block output from the adder 1450 as a reference frame in units of frames so that the reference frame can be used by the predictor 1440.

도 14에서는 도시하지 않았지만, 전술한 본 발명의 일 실시예에 따른 영상 복호화 장치(1400)는 H.264/AVC 표준에 기초하여, 인트라 예측을 위한 인트라 예측기, 복원된 현재 블록을 디블로킹 필터링(Deblocking Filtering)하는 디블록킹 필터기 등을 추가로 포함할 수 있다.Although not shown in FIG. 14, the image decoding apparatus 1400 according to an embodiment of the present invention described above is based on the H.264 / AVC standard, an intra predictor for intra prediction and a deblocking filtering of the reconstructed current block. And a deblocking filter for deblocking filtering.

도 15는 본 발명의 일 실시예에 따른 움직임 벡터 복호화 장치를 간략하게 나타낸 블록 구성도이다.15 is a block diagram schematically illustrating a motion vector decoding apparatus according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 움직임 벡터 복호화 장치는 도 14에서 전술한 본 발명의 일 실시예에 따른 영상 복호화 장치에서는 복호화기(1410)로 구현될 수 있다. 이하에서는 설명의 편의를 위해 본 발명의 일 실시예에 따른 움직임 벡터 복호화 장치를 복호화기(1410)라 칭한다.The motion vector decoding apparatus according to an embodiment of the present invention may be implemented as a decoder 1410 in the image decoding apparatus according to the embodiment of the present invention described above with reference to FIG. 14. Hereinafter, for convenience of description, the motion vector decoding apparatus according to an embodiment of the present invention is called a decoder 1410.

본 발명의 일 실시예에 따른 복호화기(1410)는 차분 벡터 복호화기(1530) 및 움직임 벡터 복원기(1540)를 포함하여 구성될 수 있다. 또한, 복호화기(1410)는 경우에 따라서, 예측 후보 선택 플래그 복호화기(1510) 및 예측 후보 식별 플래그 복호화기(1520)를 추가로 포함할 수 있다. 또한, 복호화기(1410)는 부호화된 잔차 블록을 복호화하는 영상 복호화기를 추가로 포함할 수 있지만, 영상 복호화기는 당업자에게 자명하므로 상세한 설명을 생략한다.The decoder 1410 according to an embodiment of the present invention may include a differential vector decoder 1530 and a motion vector decompressor 1540. In addition, the decoder 1410 may further include a prediction candidate selection flag decoder 1510 and a prediction candidate identification flag decoder 1520 in some cases. In addition, the decoder 1410 may further include an image decoder that decodes the encoded residual block. However, since the image decoder is obvious to those skilled in the art, a detailed description thereof will be omitted.

차분 벡터 복호화기(1530)는 부호화된 차분 벡터를 복호화하여 차분 벡터를 복원한다. 움직임 벡터 복원기(1540)는 하나 이상의 움직임 벡터 예측 후보 중 하나의 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정하고, 결정된 예측 움직임 벡터와 복원된 차분 벡터를 가산하여 현재 블록의 현재 움직임 벡터를 복원한다.The difference vector decoder 1530 reconstructs the difference vector by decoding the encoded difference vector. The motion vector reconstructor 1540 determines a motion vector prediction candidate of one or more motion vector prediction candidates as a prediction motion vector, and adds the determined prediction motion vector and the reconstructed difference vector to reconstruct the current motion vector of the current block. .

예측 후보 선택 플래그 복호화기(1510)는 비트스트림의 헤더로부터 부호화된 예측 후보 선택 플래그를 복원하고, 후보 식별 플래그 복호화기(1530)는 비트스트림으로부터 부호화된 예측 후보 식별 플래그 중 하나 이상을 추출하고 복호화하여 복원한다. 움직임 벡터 복원기(1540)는 후보 선택 플래그 복호화기(1510)에 의해 복원된 예측 후보 선택 플래그에 의해 식별되는 움직임 벡터 예측 후보를 하나 이상의 움직임 벡터 예측 후보로서 결정할 수 있으며, 후보 식별 플래그 복호화기(1520)에 의해 복원된 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정할 수 있다.The prediction candidate selection flag decoder 1510 restores the encoded prediction candidate selection flag from the header of the bitstream, and the candidate identification flag decoder 1530 extracts and decodes one or more of the encoded prediction candidate identification flags from the bitstream. To restore. The motion vector decompressor 1540 may determine, as one or more motion vector prediction candidates, a motion vector prediction candidate identified by the prediction candidate selection flag reconstructed by the candidate selection flag decoder 1510. The motion vector prediction candidate identified by the prediction candidate identification flag reconstructed by 1520 may be determined as the prediction motion vector.

여기서, 움직임 벡터 복원기(1530)는 후보 선택 플래그 복호화기(1510)가 없거나 후보 선택 플래그 복호화기(1510)에 의해 예측 후보 선택 플래그가 복원되지 않은 경우, 부호화기(150)와 같이, 현재 블록의 주변 블록의 움직임 벡터, 참조 프레임에서 현재 블록의 위치와 동일한 위치에 있는 Col 블록의 움직임 벡터, Col 블록의 주변 블록의 움직임 벡터 및 현재 블록에서 참조 프레임의 특정 블록을 지시하는 지시 벡터 중 하나 이상을 하나 이상의 움직임 벡터 예측 후보로서 선택할 수 있다. 여기서, 특정 블록은 지시 벡터와 수평이거나 지시 벡터와의 차이가 기 설정된 임계값보다 작은 움직임 벡터를 갖는 블록일 수 있다. 이에 대해서는 도 5 내지 도 7을 통해 전술하였으므로 상세한 설명은 생략한다.Here, when the candidate selection flag decoder 1510 is not present or the prediction candidate selection flag is not reconstructed by the candidate selection flag decoder 1510, the motion vector reconstructor 1530, like the encoder 150, of the current block may be used. One or more of a motion vector of the neighboring block, a motion vector of the Col block at the same position as the current block in the reference frame, a motion vector of the neighboring block of the Col block, and an instruction vector indicating a specific block of the reference frame in the current block. One or more motion vector prediction candidates may be selected. In this case, the specific block may be a block having a motion vector that is horizontal to the indication vector or smaller than a predetermined threshold. Since this is described above with reference to FIGS. 5 to 7, a detailed description thereof will be omitted.

또한, 선택된 하나 이상의 움직임 벡터 예측 후보가 모두 동일한 경우, 동일한 움직임 벡터 예측 후보는 하나의 움직임 벡터 예측 후보로 가정하고, 후보 식별 플래그 복호화기(1520)에서 예측 움직임 벡터로서 결정하고 복원된 차분 벡터와 가산하여 현재 움직임 벡터를 복원할 수 있다.In addition, when the selected one or more motion vector prediction candidates are all the same, it is assumed that the same motion vector prediction candidate is one motion vector prediction candidate, and the candidate identification flag decoder 1520 is determined as the prediction motion vector and reconstructed with the difference vector. In addition, the current motion vector may be restored.

또한, 움직임 벡터 복원기(1540)는 차분 벡터 복호화기(1530)에서 복원된 차분 벡터의 x-컴포넌트의 절대값 및 y-컴포넌트의 절대값이 각각 기 설정된 x-컴포넌트 임계값 및 기 설정된 y-컴포넌트 임계값보다 큰 경우에는, 후보 식별 플래그를 복호화하지 않아도 되며, 하나 이상의 움직임 벡터 예측 후보 각각을 이용하여 복원한 현재 움직임 벡터가 최소가 되는 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정할 수 있다.In addition, the motion vector decompressor 1540 may set an x-component threshold value and a predetermined y- value in which the absolute value of the x-component and the y-component of the differential vector reconstructed by the differential vector decoder 1530 are preset. If it is larger than the component threshold value, the candidate identification flag does not need to be decoded, and the motion vector prediction candidate having the minimum current motion vector reconstructed using each of the one or more motion vector prediction candidates may be determined as the prediction motion vector.

도 8과 도 9를 참조하여 예를 들면, 차분 벡터가 임계값 보다 큰 경우, 움직임 벡터 복원기(1540)는 예측 후보 식별 플래그가 없이 선택된 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지 식별할 수 없는 경우, 첫 번째 움직임 벡터 예측 후보의 x-컴포넌트로 현재 움직임 벡터를 복원하면, 현재 움직임 벡터는 '7'(10-3=7)이 된다. 하지만, 두 번째 움직임 벡터 예측 후보의 x-컴포넌트가 '7'이므로 첫 번째 움직임 벡터 예측 후보의 x-컴포넌트를 이용하여 부호화된 것이 아님을 식별할 수 있다. 두 번째 움직임 벡터 예측 후보의 x-컴포넌트를 이용하여 현재 움직임 벡터를 복원하면, 현재 움직임 벡터는 '4'(7-3=4)이므로, 현재 움직임 벡터가 '4'인 경우에는 두 번째 움직임 벡터 예측 후보의 x-컴포넌트로 예측한 것보다는 세 번째 움직임 벡터 예측 후보로 예측한 경우가 더욱 최적인 것을 식별할 수 있다. 따라서, 두 번째 움직임 벡터 예측 후보의 x-컴포넌트를 이용하여 부호화된 것이 아님을 알 수 있다. 이와 같은 방법을 통해, 세 번째 움직임 벡터 예측 후보의 x-컴포넌트가 최적임을 알 수 있으므로, 영상 부호화 장치(100)에서 세 번째 움직임 벡터 예측 후보의 x-컴포넌트로 예측 움직임 벡터의 x-컴포넌트를 결정했음을 식별할 수 있다.8 and 9, for example, when the difference vector is larger than the threshold, the motion vector reconstructor 1540 selects a motion vector prediction candidate from among the motion vector prediction candidates selected without the prediction candidate identification flag. If it is not possible to determine whether the current motion vector is reconstructed with the x-component of the first motion vector prediction candidate, the current motion vector becomes '7' (10-3 = 7). However, since the x-component of the second motion vector prediction candidate is '7', it may be identified that it is not encoded using the x-component of the first motion vector prediction candidate. If the current motion vector is reconstructed using the x-component of the second motion vector prediction candidate, the current motion vector is '4' (7-3 = 4), so if the current motion vector is '4', the second motion vector It can be identified that the case predicted by the third motion vector prediction candidate is more optimal than that predicted by the x-component of the prediction candidate. Thus, it can be seen that it is not coded using the x-component of the second motion vector prediction candidate. Through this method, since the x-component of the third motion vector prediction candidate is optimal, the image encoding apparatus 100 determines the x-component of the prediction motion vector as the x-component of the third motion vector prediction candidate. Can be identified.

또한, 복호화기(1410)에서 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트 임계값보다 커서 예측 후보 식별 플래그를 복호화 하지 않아도 되는 경우, 움직임 벡터 예측 후보들을 각각 컴포넌트별로 따로따로 복호화하여 예측 움직임 벡터를 결정할 수 있다. 예를 들면, 부호화기(150)에 대한 설명에서 전술한 바와 같이, 차분 벡터의 두 컴포넌트의 절대값이 모두 각 컴포넌트의 임계값 보다 큰 경우, x-컴포넌트에 대한 최적의 예측 움직임 벡터를 'A'로 결정하고, y-컴포넌트의 최적의 예측 움직임 벡터를 'B'로 결정하여, 각각 컴포넌트별로 다른 움직임 벡터 예측 후보로 예측 움직임 벡터를 결정할 수 있다.In addition, when the decoder 1410 does not need to decode the prediction candidate identification flag because the absolute value of each component of the difference vector is larger than the corresponding component threshold, the motion vector prediction candidates are separately decoded for each component to decode the prediction motion vector. You can decide. For example, as described above in the description of the encoder 150, when the absolute values of two components of the difference vector are both greater than the threshold of each component, the optimal prediction motion vector for the x-component is 'A'. The optimal predictive motion vector of the y-component may be determined as 'B', and the predictive motion vector may be determined as a motion vector prediction candidate for each component.

또한, 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트 임계값보다 작거나, 두 컴포넌트 중 하나만 작은 경우, 복호화기(1410)가 예측 후보 식별 플래그를 복호화해야 한다. 움직임 벡터 복원기(1540)는 예측 후보 식별 플래그 복호화기(1520)에 의해 복원된 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보를 움직임 벡터 예측 후보로서 결정할 수 있다. 또한, 차분 벡터의 x-컴포넌트와 y-컴포넌트가 임계값보다 모두 작은 경우, x-컴포넌트와 y-컴포넌트 각각 예측 후보 식별 플래그를 복호화하여 식별되는 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정할 수도 있고, 하나의 예측 후보 식별 플래그를 복호화하여 두 컴포넌트를 동시에 만족하는 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정할 수도 있다. 차분 벡터의 두 컴포넌트의 절대값 중 하나만 해당 컴포넌트의 임계값보다 큰 경우, 해당 컴포넌트의 임계값보다 작은 컴포넌트에 대해서만 예측 후보 식별 플래그를 복호화한다. 움직임 벡터 복원기(1540)는 차분 벡터 복호화기(1530)에 의해 복원된 차분 벡터의 x-컴포넌트의 절대값 및 y-컴포넌트의 절대값 중 하나 이상이 각각 기 설정된 x-컴포넌트 임계값 및 기 설정된 y-컴포넌트 임계값 중 하나 이상보다 작거나 같은 경우에는, 예측 후보 식별 플래그 복호화기(1520)에 의해 복원된 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보의 x-컴포넌트 및 y-컴포넌트 중 하나 이상을 예측 움직임 벡터의 x-컴포넌트 및 y-컴포넌트 중 하나 이상으로서 결정할 수 있다. 이때, 예측 후보 선택 플래그 복호화기(1510)가 예측 후보 선택 플래그를 복원한 경우, 움직임 벡터 복원기(1540)가 예측 후보 선택 플래그에 의해 식별되는 움직임 벡터 예측 후보 중에서 복원된 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보의 x-컴포넌트 및 y-컴포넌트 중 하나 이상을 예측 움직임 벡터의 x-컴포넌트 및 y-컴포넌트 중 하나 이상으로서 결정할 수 있음은 물론이다.In addition, when the absolute value of each component of the difference vector is smaller than the corresponding component threshold or only one of the two components, the decoder 1410 must decode the prediction candidate identification flag. The motion vector reconstructor 1540 may determine a motion vector prediction candidate identified by the prediction candidate identification flag reconstructed by the prediction candidate identification flag decoder 1520 as the motion vector prediction candidate. Further, when both the x-component and the y-component of the difference vector are smaller than the threshold value, the motion vector prediction candidate identified by decoding the prediction candidate identification flag may be determined as the prediction motion vector, respectively, for the x-component and the y-component. One prediction candidate identification flag may be decoded to determine a motion vector prediction candidate that satisfies both components simultaneously as the prediction motion vector. When only one of the absolute values of two components of the difference vector is larger than the threshold of the component, the prediction candidate identification flag is decoded only for the component smaller than the threshold of the component. The motion vector decompressor 1540 is configured such that at least one of an absolute value of the x-component and an absolute value of the y-component of the difference vector reconstructed by the differential vector decoder 1530 is a preset x-component threshold and a preset value. If less than or equal to one or more of the y-component thresholds, one of the x-component and the y-component of the motion vector prediction candidate identified by the prediction candidate identification flag reconstructed by the prediction candidate identification flag decoder 1520. The anomaly may be determined as one or more of an x-component and a y-component of the predicted motion vector. In this case, when the prediction candidate selection flag decoder 1510 restores the prediction candidate selection flag, the motion vector decompressor 1540 may reconstruct the prediction candidate selection flag from among the motion vector prediction candidates identified by the prediction candidate selection flag. It goes without saying that one or more of the x-component and y-component of the identified motion vector prediction candidate can be determined as one or more of the x-component and y-component of the predictive motion vector.

예를 들어, 도 2를 통해 전술한 예측 후보 식별 플래그 부호화기(240)는 하나의 컴포넌트만이 임계값보다 작은 경우에는 임계값보다 큰 하나의 컴포넌트로 어떠한 움직임 벡터 예측 후보가 이용되었는지를 식별하는 예측 후보 식별 플래그를 생성하며, 두 개의 컴포넌트가 모두 임계값보다 크지 않은 경우에는 두 개의 컴포넌트로 어떠한 움직임 벡터 예측 후보가 이용되었는지를 식별하는 하나의 예측 후보 식별 플래그를 생성하여 부호화하거나 두 개의 컴포넌트로 어떠한 움직임 벡터 예측 후보가 이용되었는지를 식별하는 두 개의 예측 후보 식별 플래그를 생성하여 부호화할 수 있다.For example, the prediction candidate identification flag encoder 240 described above with reference to FIG. 2 is a prediction that identifies which motion vector prediction candidate is used as one component larger than the threshold when only one component is smaller than the threshold. A candidate identification flag is generated, and if two components are not greater than the threshold, one prediction candidate identification flag is generated and coded by the two components to identify which motion vector prediction candidate was used, or two components Two prediction candidate identification flags that identify whether a motion vector prediction candidate is used may be generated and encoded.

따라서, 예측 후보 식별 플래그 복호화기(1520)가 비트스트림으로부터 두 개의 부호화된 예측 후보 식별 플래그를 추출하여 복호화하면, 움직임 벡터 복원기(1540)는 두 개의 예측 후보 식별 플래그로 식별되는 움직임 벡터 예측 후보의 x-컴포넌트와 y-컴포넌트를 예측 움직임 벡터의 x-컴포넌트와 y-컴포넌트로 결정할 수 있다. 또한, 후보 식별 플래그 복호화기(1520)는 하나의 부호화된 예측 후보 식별 플래그를 추출하여 복호화하면, 움직임 벡터 복원기(1540)는 하나의 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보의 x-컴포넌트 및 y-컴포넌트로 예측 움직임 벡터의 x-컴포넌트 및 y-컴포넌트를 결정하거나 하나의 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보의 x-컴포넌트 또는 y-컴포넌트를 예측 움직임 벡터의 x-컴포넌트 또는 y-컴포넌트를 결정할 수 있다.Accordingly, when the prediction candidate identification flag decoder 1520 extracts and decodes two encoded prediction candidate identification flags from the bitstream, the motion vector reconstructor 1540 may determine the motion vector prediction candidate identified by the two prediction candidate identification flags. The x-component and y-component of may be determined as the x-component and y-component of the predicted motion vector. If the candidate identification flag decoder 1520 extracts and decodes one encoded prediction candidate identification flag, the motion vector reconstructor 1540 obtains the x-direction of the motion vector prediction candidate identified by one prediction candidate identification flag, Component or y-component of the predicted motion vector or a x-component or y-component of the motion vector prediction candidate identified by one predictive candidate identification flag to the x-component of the predicted motion vector Or a y-component.

이때, 움직임 벡터 복원기(1540)는 하나의 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보의 x-컴포넌트와 y-컴포넌트 중 어느 컴포넌트를 예측 움직임 벡터의 해당 컴포넌트로 결정할 것인지는 영상 부호화 장치(100)의 예측 후보 식별 플래그 부호화기(240)와 약속(또는 기 설정)된 컴포넌트로 결정할 수 있다. 또한, 움직임 벡터 복원기(1540)는 하나의 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보의 x-컴포넌트와 y-컴포넌트 중 어느 컴포넌트를 예측 움직임 벡터의 해당 컴포넌트로 결정한 경우, 예측 움직임 벡터의 나머지 컴포넌트는 하나 이상의 움직임 벡터 예측 후보의 해당 컴포넌트 각각을 이용하여 복원한 현재 움직임 벡터가 최소가 되는 움직임 벡터 예측 후보의 해당 컴포넌트를 예측 움직임 벡터의 해당 컴포넌트로서 결정할 수 있다.In this case, the motion vector reconstructor 1540 determines which component of the x-component and the y-component of the motion vector prediction candidate identified by one prediction candidate identification flag as the corresponding component of the prediction motion vector. ) May be determined as a component that is promised (or preset) with the prediction candidate identification flag encoder 240. In addition, when the motion vector reconstructor 1540 determines any component of the x-component and the y-component of the motion vector prediction candidate identified by one prediction candidate identification flag as the corresponding component of the prediction motion vector, the motion vector reconstructor 1540 The other component may determine, as the corresponding component of the prediction motion vector, a corresponding component of the motion vector prediction candidate having the minimum current motion vector reconstructed using each of the corresponding components of the one or more motion vector prediction candidates.

또한, 복호화기(1410)는 예측 후보 선택 플래그 복호화기(1510)에서 선택된 움직임 벡터 예측 후보들을 이용하여 부호화기(150)에 대한 설명에서 전술한 수학식 7과 같이 선택된 예측 후보들의 개수를 N이라고 하면, N-1개의 임계값을 계산하여 도8과 도 10과 같이 차분 벡터의 크기에 따라 복호화할 예측 후보 식별 플래그의 길이가 달라진다. 예측 후보 식별 플래그 복호화기(1520)는 차분 벡터의 각 컴포넌트의 절대값의 크기와 각 컴포넌트 임계값에 따라, 예측 후보 식별 플래그를 다르게 생성하고 복호화한다. 즉, 예측 후보 식별 플래그 복호화기(1520)는 N-1개의 임계값을 내림차순으로 정렬하여 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 가장 작은 임계값보다 작거나 같은 경우, N개의 선택된 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로 결정되었는지를 식별하는 예측 후보 식별 플래그를 복호화하며, 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 두 번째로 작은 임계값보다 작거나 같은 경우, 해당 컴포넌트의 가장 작은 임계값을 가지는 두 개의 움직임 벡터 예측 후보들의 사이에 현재 움직임 벡터가 없다고 가정을 하고 N-1개의 선택된 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로 결정되었는지를 식별하는 예측 후보 식별 플래그를 복호화한다. 차분 벡터의 각 컴포넌트의 절대값이 해당 컴포넌트의 세 번째로 작은 임계값보다 작거나 같은 경우, 해당 컴포넌트의 가장 작은 임계값을 가지는 두 개의 움직임 벡터 예측 후보들의 사이에 현재 움직임 벡터가 없다고 가정을 하고, 해당 컴포넌트의 두 번째로 작은 임계값을 가지는 두 개의 움직임 벡터 예측 후보들 사이에도 현재 움직임 벡터가 없다고 가정을 하고, N-2개의 선택된 움직임 벡터 예측 후보들 중에서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로 결정되었는지를 식별하기 위한 예측 후보 식별 플래그를 복호화한다. In addition, when the decoder 1410 uses N motion vector prediction candidates selected by the prediction candidate selection flag decoder 1510 as N, the number of prediction candidates selected as shown in Equation 7 in the description of the encoder 150 is N. The lengths of the prediction candidate identification flags to be decoded vary according to the magnitude of the difference vector as shown in FIGS. 8 and 10. The prediction candidate identification flag decoder 1520 generates and decodes the prediction candidate identification flag differently according to the magnitude of the absolute value of each component of the difference vector and the threshold of each component. That is, the prediction candidate identification flag decoder 1520 sorts the N-1 thresholds in descending order so that when the absolute value of each component of the difference vector is less than or equal to the smallest threshold value of the corresponding component, the N selected motion vectors Decoding a prediction candidate identification flag identifying which motion vector prediction candidate among the prediction candidates is determined as the prediction motion vector, and if the absolute value of each component of the difference vector is less than or equal to the second smallest threshold of that component, Assume that there is no current motion vector between the two motion vector prediction candidates having the smallest threshold of the component, and identify which motion vector prediction candidate is determined as the prediction motion vector among the N-1 selected motion vector prediction candidates. The prediction candidate identification flag is decoded. If the absolute value of each component of the difference vector is less than or equal to the third smallest threshold of the component, the assumption is that there is no current motion vector between the two motion vector prediction candidates with the smallest threshold of the component. Assuming that there is no current motion vector between the two motion vector prediction candidates having the second smallest threshold of the component, a motion vector prediction candidate is determined as the prediction motion vector among the N-2 selected motion vector prediction candidates. A prediction candidate identification flag for identifying whether the answer is correct.

복호화할 후보 예측 후보 식별 플래그의 길이는 도 11과 같이 부호화기에서 전술한 바와 같이 수학식 9에 의해 계산된 값이 정수인 경우, 한 비트만 읽어서 '1'인 경우는 가장 높은 확률의 움직임 벡터 예측 후보가 결정이 된다. '0'인 경우는 수학식 8과 같이 예측 후보 식별 플래그의 최대 길이만큼 읽어서 움직임 벡터 예측 후보를 결정한다. 수학식 9에 의해 계산된 값이 정수가 아닌 경우, 수학식 8과 같이 예측 후보 식별 플래그의 최대 길이만큼 읽어서 움직임 벡터 예측 후보(MVp_cand[i])를 결정한다.The length of the candidate prediction candidate identification flag to be decoded is the highest probability motion vector prediction candidate when the value calculated by Equation 9 is an integer as described above in the encoder as shown in FIG. Is determined. In case of '0', the motion vector prediction candidate is determined by reading the maximum length of the prediction candidate identification flag as shown in Equation (8). If the value calculated by Equation 9 is not an integer, the motion vector prediction candidate MVp_cand [i] is determined by reading the maximum length of the prediction candidate identification flag as shown in Equation 8.

도 8과 도 10을 참조하여 예를 들면, 움직임 벡터 예측 후보의 개수는 4개이고 각각의 임계값은 '1', '3', '5'가 된다. 도 10은 3개의 임계값에 따른 구간을 나눈 그림이다. ①로 표시된 구간은 움직임 벡터 예측 후보들의 x-컴포넌트를 나타낸 것이고, ②로 표시된 구간은 차분 벡터의 x-컴포넌트의 절대값이 x-컴포넌트의 가장 작은 임계값보다 작거나 같은 경우의 현재 움직임 벡터의 x-컴포넌트가 위치하는 구간을 나타낸 것이고, ③으로 표시된 구간은 차분 벡터의 x-컴포넌트의 절대값이 x-컴포넌트의 두 번째로 작은 임계값보다 작거나 같은 경우의 현재 움직임 벡터의 x-컴포넌트가 위치하는 구간을 나타낸 것이고, ④로 표시된 구간은 차분 벡터의 x-컴포넌트의 절대값이 x-컴포넌트의 가장 큰 임계값보다 작거나 같은 경우의 현재 움직임 벡터의 x-컴포넌트가 위치하는 구간을 나타낸 것이고, ⑤로 표시된 구간은 차분 벡터의 x-컴포넌트의 절대값이 x-컴포넌트의 가장 큰 임계값보다 큰 경우의 현재 움직임 벡터의 x-컴포넌트가 위치하는 구간을 나타낸 것이다.8 and 10, for example, the number of motion vector prediction candidates is four and each threshold is '1', '3', or '5'. 10 is a diagram of dividing sections according to three threshold values. The interval denoted by ① indicates the x-components of the motion vector prediction candidates, and the interval denoted by ② denotes the current motion vector when the absolute value of the x-component of the difference vector is less than or equal to the smallest threshold of the x-component. where the x-component is located, and the section marked with ③ is the x-component of the current motion vector when the absolute value of the x-component of the difference vector is less than or equal to the second smallest threshold of the x-component. The interval indicated by ④ indicates the interval in which the x-component of the current motion vector is located when the absolute value of the x-component of the difference vector is less than or equal to the largest threshold of the x-component. , The interval ⑤ denotes the x-component of the current motion vector when the absolute value of the x-component of the difference vector is greater than the largest threshold of the x-component. A shows a section in which location.

예측 후보 식별 플래그 복호화기(1520)는 ②로 표시된 구간에서는 4개의 움직임 벡터 예측 후보 중에서 어떠한 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정했는지를 식별하는 예측 후보 식별 플래그를 복호화 하고, ③으로 표시된 구간에서는 3개의 움직임 벡터 예측 후보 중에서 어떠한 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정했는지를 식별하는 예측 후보 식별 플래그를 복호화 하며, ④로 표시된 구간에서는 2개의 움직임 벡터 예측 후보 중에서 어떠한 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정했는지를 식별하는 예측 후보 식별 플래그를 복호화 하며, ⑤로 표시된 구간에서는 예측 후보 식별 플래그를 복호화 하지 않는다.The prediction candidate identification flag decoder 1520 decodes a prediction candidate identification flag that identifies which motion vector prediction candidate is determined as the prediction motion vector among the four motion vector prediction candidates in the section denoted by ②. Decoding a prediction candidate identification flag that identifies which motion vector prediction candidate is determined as the prediction motion vector among the three motion vector prediction candidates, and predicts which motion vector prediction candidate is among the two motion vector prediction candidates in the section denoted by ④. The prediction candidate identification flag for identifying whether or not it is determined as a vector is decoded, and the prediction candidate identification flag is not decoded in the section denoted by 5.

차분 벡터가 '+4'인 경우는 두 번째로 큰 임계값보다 크면서 가장 큰 임계값보다 작으므로, 부호화기(150)에 대한 설명에서 전술한 바와 같이 도 10의 구간 ④에 속한다는 것을 알 수 있다. 예측 후보로 '4' 및 '14' 중 부호화기(150)에서 어떠한 움직임 벡터 예측 후보를 사용하였는지를 나타내는 예측 후보 식별 플래그를 복호화하면 된다. 이때, 수학식 8에 의하여 복호화할 움직임 벡터 예측 후보의 개수가 2개이므로, 한 비트만 복호화하면 된다. 차분 벡터가 '-3'인 경우는 도 10의 구간 ③에 속하므로, 움직임 벡터 예측 후보 '-4', '2', '14' 중에서 부호화기(150)에서 어떠한 예측 후보를 사용하였는지를 나태내는 예측 후보 식별 플래그를 복호화하면 된다. 이때, 복호화할 예측 후보의 개수가 3개이기 때문에 수학식 9에 의한 계산된 값이 정수가되므로, 도 11과 같이 한 비트만 먼저 읽은 값이 '1'인 경우, MVp_cand[0]을 움직임 벡터 예측 후보로 사용하고, '0'인 경우 수학식 8에 의하여 계산된 복호화할 예측 후보 식별 플래그의 길이만큼 복호화하면 된다.When the difference vector is '+4', since it is larger than the second largest threshold and smaller than the largest threshold, it can be seen that it belongs to the section ④ of FIG. 10 as described above in the description of the encoder 150. have. The prediction candidate identification flag indicating which motion vector prediction candidate is used by the encoder 150 among '4' and '14' may be decoded. In this case, since the number of motion vector prediction candidates to be decoded by Equation 8 is two, only one bit needs to be decoded. When the difference vector is '-3', it belongs to the section 3 of FIG. 10, and thus, a prediction candidate indicating which prediction candidate is used by the encoder 150 among the motion vector prediction candidates '-4', '2', and '14'. The identification flag may be decrypted. In this case, since the number of prediction candidates to be decoded is 3, the value calculated by Equation 9 becomes an integer. Thus, when only one bit is first read as shown in FIG. 11, MVp_cand [0] is a motion vector. When used as a prediction candidate, and in the case of '0', it may be decoded by the length of the prediction candidate identification flag to be decoded by Equation (8).

또한, 복호화기(1410)가 예측 후보 식별 플래그 복호화기(1520)를 추가로 포함하는 경우, 움직임 벡터 복원기(1540)는 예측 후보 식별 플래그를 한 비트만 읽어서, 읽어진 한 비트가 예를 들어 '1'인지 여부를 판단하여 확률이 가장 높은 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별하고, 확률이 가장 높은 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되지 않은 경우에만, 한 비트 이상을 추가로 읽어서 어떠한 움직임 벡터 예측 후보가 예측 움직임 벡터로서 결정되었는지를 식별할 수 있다.In addition, when the decoder 1410 further includes the prediction candidate identification flag decoder 1520, the motion vector decompressor 1540 reads only one bit of the prediction candidate identification flag, so that one bit read is, for example. It is determined whether or not it is '1' to identify whether the motion vector prediction candidate having the highest probability is determined as the predictive motion vector, and only when one or more bits are selected if the motion vector prediction candidate having the highest probability is not determined as the prediction motion vector. Further reading may identify which motion vector prediction candidate was determined as the predicted motion vector.

이때, 움직임 벡터 복원기(1540)는 하나 이상의 움직임 벡터 예측 후보를 이용하여 현재 프레임의 하나 이상의 영역을 부호화함으로써, 하나 이상의 움직임 벡터 예측 후보 각각에 대해 현재 움직임 벡터로 결정될 확률을 계산할 수도 있으며, 임의로 지정되어 설정되는 확률에 따르거나 임의로 지정되어 설정되는 움직임 벡터 예측 후보를 확률이 가장 높은 움직임 벡터 예측 후보로 선택할 수 있다.In this case, the motion vector reconstructor 1540 may calculate the probability of determining the current motion vector for each of the one or more motion vector prediction candidates by encoding one or more regions of the current frame using one or more motion vector prediction candidates. A motion vector prediction candidate that is designated or randomly designated according to a designated probability may be selected as a motion vector prediction candidate having the highest probability.

도 16은 본 발명의 일 실시예에 따른 움직임 벡터 복호화 방법을 설명하기 위한 순서도이다.16 is a flowchart illustrating a motion vector decoding method according to an embodiment of the present invention.

복호화기(1410)는 비트스트림으로부터 부호화된 예측 후보 식별 플래그를 읽어 복호화하여 예측 후보 식별 플래그를 복원하고(S1610), 비트스트림으로부터 부호화된 차분 벡터를 읽어 복호화하여 차분 벡터를 복원하고(S1620), 비트스트림으로부터 부호화된 예측 후보 식별 플래그를 읽어 복호화하여 예측 후보 식별 플래그를 복원하고(S1630), 하나 이상의 움직임 벡터 예측 후보 중 단계 S1630에서 복원된 예측 후보 식별 플래그에 의해 식별되는 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정하고, 결정된 예측 움직임 벡터와 단계 S1620에서 복원된 차분 벡터를 가산하여 현재 블록의 현재 움직임 벡터를 복원한다(S1640). 여기서, 복호화기(1410)는 단계 S1610과 단계 S1630을 반드시 수행하지 않을 수 있으며, 이 경우 복호화기(1410)는 단계 S1640에서 예측 움직임 벡터를 결정할 때 도 15를 통해 전술한 바와 같이, 예측 후보 식별 플래그가 없는 경우 예측 움직임 벡터를 결정하는 방법에 따라 예측 움직임 벡터를 결정할 수 있다. 또한, 도 16에서 나타낸 단계의 순서는 예시일 뿐, 본 발명이 이러한 순서에 반드시 한정되는 것은 아니며 그 순서는 선택적으로 변경될 수 있다.The decoder 1410 reads and decodes the encoded prediction candidate identification flag from the bitstream to restore the prediction candidate identification flag (S1610), reads and decodes the encoded difference vector from the bitstream to restore the differential vector (S1620), The encoded prediction candidate identification flag is read and decoded from the bitstream to restore the prediction candidate identification flag (S1630), and among the one or more motion vector prediction candidates, the motion vector prediction candidate identified by the prediction candidate identification flag reconstructed in step S1630 is predicted. A motion vector is determined, and the determined prediction motion vector and the difference vector reconstructed in step S1620 are added to reconstruct the current motion vector of the current block (S1640). Here, the decoder 1410 may not necessarily perform steps S1610 and S1630. In this case, when the decoder 1410 determines the prediction motion vector in step S1640, as described above with reference to FIG. If there is no flag, the prediction motion vector may be determined according to a method of determining the prediction motion vector. In addition, the order of the steps shown in FIG. 16 is merely an example, and the present invention is not necessarily limited to this order, and the order may be selectively changed.

도 17은 본 발명의 일 실시예에 따른 영상 복호화 방법을 설명하기 위한 순서도이다.17 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

영상 복호화 장치(1400)는 비트스트림으로부터 부호화된 예측 후보 식별 플래그를 추출하여 복호화함으로써 예측 후보 식별 플래그를 복원하고(S1710), 비트스트림으로부터 부호화된 차분 벡터를 추출하여 복호화함으로써 차분 벡터를 복원하며(S1720), 비트스트림으로부터 부호화된 예측 후보 식별 플래그를 추출하여 복호화함으로써 예측 후보 식별 플래그를 복원하고(S1730), 하나 이상의 움직임 벡터 예측 후보 중에서 단계 S1730에서 복원된 예측 후보 식별 플래그에 의해 움직임 벡터 예측 후보를 예측 움직임 벡터로서 결정하여 결정된 예측 움직임 벡터와 단계 S1720에서 복원된 차분 벡터를 가산하여 현재 움직임 벡터를 복원한다(S1740).The image decoding apparatus 1400 restores the prediction candidate identification flag by extracting and decoding the encoded prediction candidate identification flag from the bitstream (S1710), and restores the difference vector by extracting and decoding the encoded difference vector from the bitstream ( S1720, and reconstructing the prediction candidate identification flag by extracting and decoding the encoded prediction candidate identification flag from the bitstream (S1730), and among the one or more motion vector prediction candidates, the motion vector prediction candidate by the prediction candidate identification flag reconstructed in step S1730. Is determined as the predicted motion vector, and the predicted motion vector and the difference vector reconstructed in step S1720 are added to reconstruct the current motion vector (S1740).

영상 복호화 장치(1400)는 단계 S1740에서 복원된 현재 움직임 벡터를 이용하여 현재 블록의 움직임을 추정 및 보상하여 현재 블록을 예측하고 예측 블록을 생성하며(S1750), 비트스트림으로부터 부호화된 잔차 블록을 추출하고 부호화된 잔차 블록을 역 양자화, 역 변환하여 복호화함으로써 잔차 블록을 복원하고 복원된 잔차 블록을 예측 블록과 가산하여 현재 블록을 복원한다(S1760).The image decoding apparatus 1400 estimates and compensates for the current block by generating and predicting the motion of the current block using the current motion vector reconstructed in step S1740 (S1750), and extracts the encoded residual block from the bitstream. The encoded residual block is inversely quantized, inversely transformed, and decoded to restore the residual block, and the reconstructed residual block is added to the prediction block to restore the current block (S1760).

여기서, 영상 복호화 장치(1400)는 단계 S1710과 단계 S1730을 반드시 수행하지 않을 수 있으며, 이 경우 영상 복호화 장치(1400)는 단계 S1740에서 예측 움직임 벡터를 결정할 때 도 15를 통해 전술한 바와 같이, 예측 후보 식별 플래그가 없는 경우 예측 움직임 벡터를 결정하는 방법에 따라 예측 움직임 벡터를 결정할 수 있다. 또한, 도 17에서 도시하고 설명한 단계는 도시하고 설명된 순서에 반드시 한정되지 않으며, 그 순서가 선택적으로 변경될 수 있다.Here, the image decoding apparatus 1400 may not necessarily perform steps S1710 and S1730. In this case, when the image decoding apparatus 1400 determines the prediction motion vector in step S1740, as described above with reference to FIG. 15, the prediction may be performed. If there is no candidate identification flag, the prediction motion vector may be determined according to a method of determining the prediction motion vector. In addition, the steps shown and described in FIG. 17 are not necessarily limited to the order shown and described, and the order may be selectively changed.

예를 들어, 영상 복호화 장치(1400)는 도 17의 순서로 각 단계를 수행하는 것이 아니라, 비트스트림으로부터 부호화된 잔차 블록을 추출하고 복호화하여 잔차 블록을 복원하며, 비트스트림으로부터 부호화된 차분 벡터를 추출하고 복호화하여 차분 벡터를 복원하며, 하나 이상의 움직임 벡터 예측 후보 중에서 하나의 움직임 벡터 예측 후보를 예측 움직임 벡터로 선택하고 선택된 예측 움직임 벡터와 복원된 차분 벡터를 이용하여 현재 블록의 현재 움직임 벡터를 복원하며, 복원된 잔차 블록을 역 양자화하고 역 양자화된 잔차 블록을 역 변환하며, 복원된 현재 움직임 벡터를 이용하여 예측 블록을 생성하고 역 변환된 잔차 블록과 생성된 예측 블록을 가산하여 현재 블록을 복원하는 순서로 각 단계를 수행할 수 있다.For example, the image decoding apparatus 1400 does not perform each step in the order of FIG. 17, but extracts and decodes the encoded residual block from the bitstream to restore the residual block, and decodes the encoded difference vector from the bitstream. Extracting and decoding to reconstruct the difference vector, selecting one motion vector prediction candidate among the one or more motion vector prediction candidates as the prediction motion vector, and reconstructing the current motion vector of the current block by using the selected prediction motion vector and the reconstructed difference vector. Inversely quantizes the reconstructed residual block, inversely transforms the inverse quantized residual block, generates a prediction block using the reconstructed current motion vector, and adds the inverse transformed residual block and the generated prediction block to reconstruct the current block. Each step can be performed in the order that

이상에서, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합하거나 결합하여 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성 요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성 요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수 개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 그 컴퓨터 프로그램을 구성하는 코드들 및 코드 세그먼트들은 본 발명의 기술 분야의 당업자에 의해 용이하게 추론될 수 있을 것이다. 이러한 컴퓨터 프로그램은 컴퓨터가 읽을 수 있는 저장매체(Computer Readable Media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시예를 구현할 수 있다. 컴퓨터 프로그램의 저장매체로서는 자기 기록매체, 광 기록매체, 캐리어 웨이브 매체 등이 포함될 수 있다.While the present invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not limited to the disclosed embodiments. In other words, within the scope of the present invention, all of the components may be selectively operated in combination with one or more. In addition, although all of the components may be implemented as one independent hardware, some or all of the components may be selectively combined to perform a part or all of the functions in one or a plurality of hardware. As shown in FIG. Codes and code segments constituting the computer program may be easily inferred by those skilled in the art. Such a computer program may be stored in a computer readable storage medium and read and executed by a computer, thereby implementing embodiments of the present invention. As the storage medium of the computer program, a magnetic recording medium, an optical recording medium, a carrier wave medium, or the like may be included.

또한, 이상에서 기재된 "포함하다", "구성하다" 또는 "가지다" 등의 용어는, 특별히 반대되는 기재가 없는 한, 해당 구성 요소가 내재할 수 있음을 의미하는 것이므로, 다른 구성 요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것으로 해석되어야 한다. 기술적이거나 과학적인 용어를 포함한 모든 용어들은, 다르게 정의되지 않는 한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미가 있다. 사전에 정의된 용어와 같이 일반적으로 사용되는 용어들은 관련 기술의 문맥상의 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Furthermore, the terms "comprises", "comprising", or "having" described above mean that a component can be implanted unless otherwise specifically stated, But should be construed as including other elements. All terms, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs, unless otherwise defined. Terms used generally, such as terms defined in a dictionary, should be interpreted to coincide with the contextual meaning of the related art, and shall not be interpreted in an ideal or excessively formal sense unless explicitly defined in the present invention.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.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 protection scope of the present invention should be interpreted by the following claims, and all technical ideas within the equivalent scope should be interpreted as being included in the scope of the present invention.

이상에서 설명한 바와 같이 본 발명은 현재 부호화를 수행할 블록 이전에 부호화되고 복호화되어 복원된 화소를 이용하여 인터 예측을 수행하고 인터 예측에 이용한 움직임 벡터를 효율적으로 부호화하거나 복호화하고 그를 이용하여 정지 영상 또는 동영상의 데이터를 부호화하거나 복호화하는 영상 처리 분야에 적용되어, 더욱 정확하게 예측된 예측 움직임 벡터를 이용하여 움직임 벡터를 부호화하면서도 예측 움직임 벡터에 대한 정보를 부호화하기 위한 비트량을 줄여 압축 효율을 향상시킬 수 있는 효과를 발생하는 매우 유용한 발명이다.As described above, the present invention performs inter prediction using a pixel that has been encoded, decoded, and reconstructed before a block to be currently encoded, and efficiently encodes or decodes a motion vector used for inter prediction, and then uses a still image or Applied to the field of image processing that encodes or decodes the data of a video, it is possible to improve the compression efficiency by reducing the amount of bits for encoding the information on the predicted motion vector while encoding the motion vector using the predicted motion vector more accurately. It is a very useful invention that produces an effect.

Claims (12)

현재 블록의 움직임 벡터인 현재 움직임 벡터를 부호화하는 장치에 있어서,
상기 현재 움직임 벡터를 예측하기 위한 움직임 벡터 예측 후보를 선택하는 예측 후보 선택기;
상기 움직임 벡터 예측 후보로부터 예측 움직임 벡터를 결정하는 예측 움직임 벡터 결정기; 및
상기 현재 움직임 벡터에서 상기 예측 움직임 벡터를 감산하여 차분 벡터를 계산하고, 상기 결정된 예측 움직임 벡터를 식별하기 위한 예측 후보 식별 정보 및 상기 차분 벡터를 부호화하는 부호화기를 포함하며,
상기 예측 후보 선택기는,
상기 현재 블록의 주변 블록으로부터 제1 움직임 벡터 예측 후보를 선택하는 모듈과, 참조 프레임에서 상기 현재 블록의 위치에 대응하는 위치의 Col 블록(Collocated block) 또는 상기 Col 블록의 주변 블록으로부터 제2 움직임 벡터 예측 후보를 선택하는 모듈을 포함하는 것을 특징으로 하는 움직임 벡터 부호화 장치.
An apparatus for encoding a current motion vector which is a motion vector of a current block,
A prediction candidate selector for selecting a motion vector prediction candidate for predicting the current motion vector;
A predicted motion vector determiner that determines a predicted motion vector from the motion vector prediction candidate; And
And a decoder for calculating a difference vector by subtracting the predicted motion vector from the current motion vector, and encoding the differential vector and prediction candidate identification information for identifying the determined predicted motion vector,
The prediction candidate selector,
A module for selecting a first motion vector prediction candidate from a neighboring block of the current block, and a second motion vector from a Col block or a neighboring block of the Col block at a position corresponding to the position of the current block in a reference frame; And a module for selecting a prediction candidate.
제 1 항에 있어서,
상기 제1 움직임 벡터 예측 후보를 선택하는 모듈은,
상기 현재 블록의 전체 주변 블록 중에서 미리 지정된 위치의 주변 블록으로부터 상기 제1 움직임 벡터 예측 후보를 선택하는 것을 특징으로 하는 움직임 벡터 부호화 장치.
The method of claim 1,
The module for selecting the first motion vector prediction candidate,
And selecting the first motion vector prediction candidate from neighboring blocks at a predetermined position among all neighboring blocks of the current block.
제 1 항에 있어서,
상기 예측 후보 선택기는,
두 개의 움직임 벡터 예측 후보 사이의 거리가 미리 지정된 기준을 만족하지 않으면 그 중 하나만을 움직임 벡터 예측 후보로 선택하는 것을 특징으로 하는 움직임 벡터 부호화 장치.
The method of claim 1,
The prediction candidate selector,
And a distance between two motion vector prediction candidates does not satisfy a predetermined criterion, and selects only one of them as a motion vector prediction candidate.
현재 블록의 움직임 벡터인 현재 움직임 벡터를 부호화하는 방법에 있어서,
상기 현재 움직임 벡터를 예측하기 위한 움직임 벡터 예측 후보를 선택하는 단계;
상기 움직임 벡터 예측 후보로부터 예측 움직임 벡터를 결정하는 단계; 및
상기 현재 움직임 벡터에서 상기 예측 움직임 벡터를 감산하여 차분 벡터를 계산하고, 상기 결정된 예측 움직임 벡터를 식별하기 위한 예측 후보 식별 정보 및 상기 차분 벡터를 부호화하는 단계를 포함하고,
상기 움직임 벡터 예측 후보 선택 단계는,
상기 현재 블록의 주변 블록에서 제1 움직임 벡터 예측 후보를 선택하는 단계와, 참조 프레임에서 상기 현재 블록의 위치에 대응하는 위치의 Col 블록(Collocated block) 또는 상기 Col 블록의 주변 블록에서 제2 움직임 벡터 예측 후보를 선택하는 단계를 포함하는 것을 특징으로 하는 움직임 벡터 부호화 방법.
In the method of encoding the current motion vector which is a motion vector of the current block,
Selecting a motion vector prediction candidate for predicting the current motion vector;
Determining a prediction motion vector from the motion vector prediction candidate; And
Subtracting the prediction motion vector from the current motion vector to calculate a difference vector, and encoding prediction candidate identification information and the difference vector for identifying the determined prediction motion vector,
The motion vector prediction candidate selection step,
Selecting a first motion vector prediction candidate in a neighboring block of the current block; and a Collocated block or a second motion vector in a neighboring block of the Col block at a position corresponding to the position of the current block in a reference frame. Selecting a prediction candidate.
제 4 항에 있어서,
상기 제1 움직임 벡터 예측 후보를 선택하는 단계는,
상기 현재 블록의 전체 주변 블록 중에서 미리 지정된 위치의 주변 블록으로부터 상기 제1 움직임 벡터 예측 후보를 선택하는 것을 특징으로 하는 것을 특징으로 하는 움직임 벡터 부호화 방법.
5. The method of claim 4,
Selecting the first motion vector prediction candidate,
And selecting the first motion vector prediction candidate from neighboring blocks at a predetermined position among all neighboring blocks of the current block.
제 4 항에 있어서,
상기 움직임 벡터 예측 후보를 선택하는 단계는,
두 개의 움직임 벡터 예측 후보 사이의 거리가 미리 지정된 기준을 만족하지 않으면 그 중 하나만을 움직임 벡터 예측 후보로 선택하는 것을 특징으로 하는 움직임 벡터 부호화 방법.
5. The method of claim 4,
Selecting the motion vector prediction candidate,
If the distance between two motion vector prediction candidates does not satisfy a predetermined criterion, only one of the motion vector prediction candidates is selected as the motion vector prediction candidate.
현재 블록의 현재 움직임 벡터를 복호화하는 장치에 있어서,
비트스트림으로부터 차분 벡터와 예측 후보 식별 정보를 복원하는 복호화기; 및
상기 현재 움직임 벡터를 예측하기 위한 움직임 벡터 예측 후보를 선택하고, 상기 움직임 벡터 예측 후보 중에서 상기 예측 후보 식별 정보에 의해 식별되는 움직임 벡터 예측 부호를 예측 움직임 벡터로 결정하며, 상기 예측 움직임 벡터와 상기 차분 벡터를 가산하여 현재 블록의 현재 움직임 벡터를 복원하는 움직임 벡터 복원기를 포함하고,
상기 움직임 벡터 복원기는,
상기 현재 블록의 주변 블록으로부터 제1 움직임 벡터 예측 후보를 선택하는 모듈과, 참조 프레임에서 상기 현재 블록의 위치에 대응하는 위치의 Col 블록(Collocated block) 또는 상기 Col 블록의 주변 블록으로부터 제2 움직임 벡터 예측 후보를 선택하는 모듈을 포함하는 것을 특징으로 하는 움직임 벡터 복호화 장치.
In the apparatus for decoding the current motion vector of the current block,
A decoder for decoding the differential vector and the prediction candidate identification information from the bitstream; And
Selecting a motion vector prediction candidate for predicting the current motion vector, determining a motion vector prediction code identified by the prediction candidate identification information among the motion vector prediction candidates as a prediction motion vector, and comparing the difference with the prediction motion vector A motion vector decompressor for adding the vector to restore the current motion vector of the current block;
The motion vector decompressor,
A module for selecting a first motion vector prediction candidate from a neighboring block of the current block, and a second motion vector from a Col block or a neighboring block of the Col block at a position corresponding to the position of the current block in a reference frame; And a module for selecting a prediction candidate.
제 7 항에 있어서,
상기 움직임 벡터 복원기는,
상기 현재 블록의 전체 주변 블록 중에서 미리 지정된 위치의 주변 블록으로부터 상기 제1 움직임 벡터 예측 후보를 선택하는 것을 특징으로 하는 움직임 벡터 복호화 장치.
The method of claim 7, wherein
The motion vector decompressor,
And selecting the first motion vector prediction candidate from neighboring blocks at a predetermined position among all neighboring blocks of the current block.
제 7 항에 있어서,
상기 움직임 벡터 복원기는,
두 개의 움직임 벡터 예측 후보 사이의 거리가 미리 지정된 기준을 만족하지 않으면 그 중 하나만을 움직임 벡터 예측 후보로 선택하는 것을 특징으로 하는 움직임 벡터 복호화 장치.
The method of claim 7, wherein
The motion vector decompressor,
And selecting only one of the motion vector prediction candidates when the distance between the two motion vector prediction candidates does not satisfy a predetermined criterion.
현재 블록의 현재 움직임 벡터를 복호화하는 방법에 있어서,
비트스트림으로부터 차분 벡터를 복원하는 단계;
상기 현재 움직임 벡터를 예측하기 위한 움직임 벡터 예측 후보를 선택하는 단계;
상기 비트스트림으로부터 예측 후보 식별 정보를 복원하는 단계;
상기 움직임 벡터 예측 후보 중에서 상기 예측 후보 식별 정보에 의해 식별되는 움직임 벡터 예측 후보를 예측 움직임 벡터로 결정하는 단계; 및
상기 예측 움직임 벡터와 상기 차분 벡터를 가산하여 현재 블록의 현재 움직임 벡터를 복원하는 단계를 포함하고,
상기 움직임 벡터 예측 후보 선택 단계는,
상기 현재 블록의 주변 블록으로부터 제1 움직임 벡터 예측 후보를 선택하는 단계와, 참조 프레임에서 상기 현재 블록의 위치에 대응하는 위치의 Col 블록(Collocated block) 또는 상기 Col 블록의 주변 블록으로부터 제2 움직임 벡터 예측 후보를 선택하는 단계를 포함하는 것을 특징으로 하는 움직임 벡터 복호화 방법.
In the method of decoding the current motion vector of the current block,
Recovering the difference vector from the bitstream;
Selecting a motion vector prediction candidate for predicting the current motion vector;
Restoring prediction candidate identification information from the bitstream;
Determining a motion vector prediction candidate identified by the prediction candidate identification information among the motion vector prediction candidates as a prediction motion vector; And
Reconstructing the current motion vector of the current block by adding the prediction motion vector and the difference vector;
The motion vector prediction candidate selection step,
Selecting a first motion vector prediction candidate from a neighboring block of the current block; and a second motion vector from a Col block or a neighboring block of the Col block at a position corresponding to the position of the current block in a reference frame. Selecting a prediction candidate.
제 10 항에 있어서,
상기 제1 움직임 벡터 예측 후보 선택 단계는
상기 현재 블록의 전체 주변 블록 중에서 미리 지정된 위치의 주변 블록으로부터 상기 제1 움직임 벡터 예측 후보를 선택하는 것을 특징으로 하는 움직임 벡터 복호화 방법.
11. The method of claim 10,
The first motion vector prediction candidate selection step
And selecting the first motion vector prediction candidate from neighboring blocks at a predetermined position among all neighboring blocks of the current block.
제 10 항에 있어서,
상기 움직임 벡터 예측 후보 선택 단계는,
두 개의 움직임 벡터 예측 후보 사이의 거리가 미리 지정된 기준을 만족하지 않으면 그 중 하나만을 움직임 벡터 예측 후보로 선택하는 것을 특징으로 하는 움직임 벡터 복호화 방법.
11. The method of claim 10,
The motion vector prediction candidate selection step,
If the distance between two motion vector prediction candidates does not satisfy a predetermined criterion, only one of the motion vector prediction candidates is selected as the motion vector prediction candidate.
KR1020130052711A 2013-05-09 2013-05-09 Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus KR101316710B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130052711A KR101316710B1 (en) 2013-05-09 2013-05-09 Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130052711A KR101316710B1 (en) 2013-05-09 2013-05-09 Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020080107585A Division KR101279573B1 (en) 2008-10-31 2008-10-31 Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus

Publications (2)

Publication Number Publication Date
KR20130069681A KR20130069681A (en) 2013-06-26
KR101316710B1 true KR101316710B1 (en) 2013-10-10

Family

ID=48864789

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130052711A KR101316710B1 (en) 2013-05-09 2013-05-09 Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus

Country Status (1)

Country Link
KR (1) KR101316710B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0181034B1 (en) * 1995-03-18 1999-05-01 배순훈 Method and apparatus for detecting motion vector using feature point based motion estimation

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR0181034B1 (en) * 1995-03-18 1999-05-01 배순훈 Method and apparatus for detecting motion vector using feature point based motion estimation

Also Published As

Publication number Publication date
KR20130069681A (en) 2013-06-26

Similar Documents

Publication Publication Date Title
KR101279573B1 (en) Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus
KR101590511B1 (en) / / Motion Vector Coding Method and Apparatus
KR101441905B1 (en) Motion Vector Coding Method and Apparatus by Using Candidate Predicted Motion Vector Set Selection and Video Coding Method and Apparatus Using Same
KR101444675B1 (en) Method and Apparatus for Encoding and Decoding Video
KR101459714B1 (en) Motion Vector Coding Method and Apparatus by Using Partitioning Space and Video Coding Method and Apparatus Using Same
KR101377660B1 (en) Motion Vector Encoding/Decoding Method and Apparatus Using Multiple Motion Vector Estimation and Video Encoding/Decoding Method and Apparatus Using Same
KR101681303B1 (en) Method and Apparatus for Encoding/Decoding of Video Data Using Partitioned-Block Prediction
KR101418104B1 (en) Motion Vector Coding Method and Apparatus by Using Motion Vector Resolution Combination and Video Coding Method and Apparatus Using Same
KR101377529B1 (en) Video Coding and Decoding Method and Apparatus Using Adaptive Motion Vector Coding/Encoding
KR101483174B1 (en) Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus
KR101316710B1 (en) Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus
KR101314632B1 (en) Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus
KR101582493B1 (en) Motion Vector Coding Method and Apparatus
KR101582495B1 (en) Motion Vector Coding Method and Apparatus
KR101590493B1 (en) Method and Apparatus for Encoding and Decoding Video by Using Inter Prediction
KR101422058B1 (en) Motion Vector Coding Method and Apparatus
KR101445835B1 (en) Motion Vector Encoding/Decoding Method and Apparatus and Video Encoding/Decoding Method and Apparatus
KR101575605B1 (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
KR101575635B1 (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
KR101582504B1 (en) Method and Apparatus for Encoding and Decoding Video by Using Inter Prediction
KR101575636B1 (en) Motion Vector Encoding/Decoding Method and Apparatus Using Multiple Motion Vector Estimation and Video Encoding/Decoding Method and Apparatus Using Same
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
A302 Request for accelerated 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: 20161004

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20171010

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20181002

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20190926

Year of fee payment: 7