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

Method and Apparatus for Encoding and Decoding Motion Vector Download PDF

Info

Publication number
KR102450863B1
KR102450863B1 KR1020170087770A KR20170087770A KR102450863B1 KR 102450863 B1 KR102450863 B1 KR 102450863B1 KR 1020170087770 A KR1020170087770 A KR 1020170087770A KR 20170087770 A KR20170087770 A KR 20170087770A KR 102450863 B1 KR102450863 B1 KR 102450863B1
Authority
KR
South Korea
Prior art keywords
motion vector
resolution
differential motion
current block
value
Prior art date
Application number
KR1020170087770A
Other languages
Korean (ko)
Other versions
KR20180107687A (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 PCT/KR2018/004651 priority Critical patent/WO2019013434A1/en
Publication of KR20180107687A publication Critical patent/KR20180107687A/en
Priority to KR1020220123988A priority patent/KR102618414B1/en
Application granted granted Critical
Publication of KR102450863B1 publication Critical patent/KR102450863B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/109Selection of coding mode or of prediction mode among a plurality of temporal predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Abstract

본 발명은 영상을 효율적으로 부호화하기 위한 영상 부호화 또는 복호화에 관한 것이다. 본 발명의 일 측면에 따르면, 현재블록의 움직임벡터를 부호화하는 방법에 있어서, 디폴트 해상도로 상기 현재블록에 대한 차분움직임벡터를 결정하는 단계; 상기 결정된 차분움직임벡터의 크기(absolute value)에 따라 복수의 움직임벡터 해상도 중에서 하나 이상의 해상도 후보를 결정하는 단계; 하나 이상의 해상도 후보 중에서 상기 결정된 차분움직임벡터를 표현할 해상도를 선택하는 단계; 상기 결정된 차분움직임벡터에 상기 선택된 해상도에 대응하는 함수를 적용하여 상기 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 단계; 및 상기 연산된 값에 대한 정보 및 상기 복수의 움직임벡터 해상도 중 상기 선택된 해상도를 나타내기 위한 해상도 정보를, 상기 차분움직임벡터에 대한 정보로서, 부호화하는 단계를 포함하는 움직임벡터 부호화 방법을 제공한다.The present invention relates to image encoding or decoding for efficiently encoding an image. According to one aspect of the present invention, there is provided a method for encoding a motion vector of a current block, the method comprising: determining a differential motion vector for the current block with a default resolution; determining one or more resolution candidates from among a plurality of motion vector resolutions according to the determined absolute value of the differential motion vector; selecting a resolution for expressing the determined differential motion vector from among one or more resolution candidates; calculating a value to be encoded as a differential motion vector of the current block by applying a function corresponding to the selected resolution to the determined differential motion vector; and encoding information on the calculated value and resolution information representing the selected resolution among the plurality of motion vector resolutions as information on the differential motion vector.

Description

움직임벡터를 부호화 또는 복호화하기 위한 장치 및 방법{Method and Apparatus for Encoding and Decoding Motion Vector}Apparatus and method for encoding or decoding a motion vector {Method and Apparatus for Encoding and Decoding Motion Vector}

본 발명은 영상을 효율적으로 부호화하기 위한 영상 부호화 또는 복호화에 관한 것이다.The present invention relates to image encoding or decoding for efficiently encoding an image.

이 부분에 기술된 내용은 단순히 본 실시예에 대한 배경 정보를 제공할 뿐 종래 기술을 구성하는 것은 아니다.The content described in this section merely provides background information for the present embodiment and does not constitute the prior art.

동영상 데이터는 음성 데이터나 정지 영상 데이터 등에 비하여 데이터량이 많기 때문에, 압축을 위한 처리 없이 그 자체를 저장하거나 전송하기 위해서는 메모리를 포함하여 많은 하드웨어 자원을 필요로 한다. 따라서, 통상적으로 동영상 데이터를 저장하거나 전송할 때에는 부호화기를 사용하여 동영상 데이터를 압축하여 저장하거나 전송하며, 복호화기에서는 압축된 동영상 데이터를 수신하여 압축을 해제하고 재생한다. 이러한 동영상 압축 기술로는 H.264/AVC를 비롯하여, H.264/AVC 약 40% 정도의 부호화 효율을 향상시킨 2013년 초에 제정된 HEVC(High Efficiency Video Coding)가 존재한다.Since moving image data has a larger amount of data than audio data or still image data, it requires a lot of hardware resources, including memory, to store or transmit itself without compression processing. Therefore, in general, when storing or transmitting moving picture data, the moving picture data is compressed and stored or transmitted using an encoder, and the decoder receives the compressed moving picture data, decompresses it, and reproduces the data. As such a video compression technology, H.264/AVC and High Efficiency Video Coding (HEVC) established in early 2013, which improved encoding efficiency by about 40% of H.264/AVC, exist.

부호화 또는 복호화를 위하여 예측하는 방법 중에서 하나인 인터 예측 부호화 시에는, 현재 블록을 예측한 후 생성된 잔차(residual) 블록을 부호화한 정보와 현재 블록을 예측하는 데에 사용된 움직임 정보를 복호화 장치로 시그널링(signaling) 한다. 여기서 움직임 정보는, 현재블록을 예측하기 위해 사용된 참조 픽처에 대한 정보 및 움직임벡터에 대한 정보를 포함한다. 기존 HEVC 표준의 경우에는 움직임벡터를 1/4 픽셀 단위로 표현한다.In inter prediction encoding, which is one of prediction methods for encoding or decoding, information obtained by encoding a residual block generated after predicting the current block and motion information used for predicting the current block is transmitted to a decoding apparatus. signaling. Here, the motion information includes information about a reference picture used to predict the current block and information about a motion vector. In the case of the existing HEVC standard, motion vectors are expressed in units of 1/4 pixel.

하지만, 영상의 크기 및 해상도, 프레임율(Frame rate)이 점차 증가하는 추세에 따라 부호화해야 하는 데이터량도 증가하고 있다. 따라서, 기존의 압축 기술보다 더 부호화 효율이 좋은 압축 기술이 요구된다.However, as the size, resolution, and frame rate of an image gradually increase, the amount of data to be encoded also increases. Therefore, a compression technique with better encoding efficiency than the conventional compression technique is required.

본 발명은 영상 및 블록의 특성에 따라 차분움직임벡터를 표현하는 해상도를 조절하여 효율적으로 영상을 부호화하기 위한 영상 부호화 또는 복호화 기술을 제공한다.The present invention provides an image encoding or decoding technique for efficiently encoding an image by adjusting a resolution for expressing a differential motion vector according to the characteristics of an image and a block.

본 발명의 일 측면에 따르면, 현재블록의 움직임벡터를 부호화하는 방법에 있어서, 디폴트 해상도로 상기 현재블록에 대한 차분움직임벡터를 결정하는 단계; 상기 결정된 차분움직임벡터의 크기(absolute value)에 따라 복수의 움직임벡터 해상도 중에서 하나 이상의 해상도 후보를 결정하는 단계; 상기 하나 이상의 해상도 후보 중에서 상기 결정된 차분움직임벡터를 표현할 해상도를 선택하는 단계; 상기 결정된 차분움직임벡터에 상기 선택된 해상도에 대응하는 함수를 적용하여 상기 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 단계; 및 상기 연산된 값을 차분움직임벡터 정보로서 부호화하고, 상기 복수의 움직임벡터 해상도 중 상기 선택된 해상도를 나타내기 위한 해상도 정보를 부호화하는 단계를 포함하는 움직임벡터 부호화 방법을 제공한다.According to one aspect of the present invention, there is provided a method for encoding a motion vector of a current block, the method comprising: determining a differential motion vector for the current block with a default resolution; determining one or more resolution candidates from among a plurality of motion vector resolutions according to the determined absolute value of the differential motion vector; selecting a resolution to express the determined differential motion vector from among the one or more resolution candidates; calculating a value to be encoded as a differential motion vector of the current block by applying a function corresponding to the selected resolution to the determined differential motion vector; and encoding the calculated value as differential motion vector information, and encoding resolution information representing the selected resolution among the plurality of motion vector resolutions.

본 발명의 다른 측면에 따르면, 현재블록의 움직임벡터를 복호화하기 위한 방법에 있어서, 상기 현재블록의 차분움직임벡터 정보를 복호화하는 단계; 차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도 중에서 하나의 해상도를 선택하는 단계; 상기 차분움직임벡터 정보에 의해 결정된 값에 상기 선택된 해상도에 대응하는 함수를 적용하여 상기 현재블록의 차분움직임벡터를 복원하는 단계; 및 상기 현재블록의 예측움직임벡터를 결정하고, 상기 복원된 차분움직임벡터와 상기 예측움직임벡터를 이용하여 상기 현재블록의 움직임벡터를 복원하는 단계를 포함하는 움직임벡터 복호화 방법을 제공한다.According to another aspect of the present invention, there is provided a method for decoding a motion vector of a current block, the method comprising: decoding differential motion vector information of the current block; selecting one resolution from among a plurality of motion vector resolutions by decoding resolution information indicating the resolution of the differential motion vector; restoring a differential motion vector of the current block by applying a function corresponding to the selected resolution to a value determined by the differential motion vector information; and determining a predicted motion vector of the current block, and reconstructing the motion vector of the current block using the reconstructed differential motion vector and the predicted motion vector.

본 발명의 또 다른 측면에 따르면, 현재블록의 움직임벡터를 복호화하기 위한 영상 복호화 장치에 있어서, 상기 현재블록의 차분움직임벡터 정보를 복호화함으로써 차분움직임벡터 인덱스를 결정하고, 상기 차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도 중에서 하나의 해상도를 선택하며, 상기 결정된 차분움직임벡터 인덱스에 상기 선택된 해상도에 대응하는 함수를 적용하여 상기 현재블록의 차분움직임벡터를 복원하는 복호화부; 및 상기 현재블록의 예측움직임벡터를 결정하고, 상기 복원된 차분움직임벡터와 상기 예측움직임벡터를 이용하여 상기 현재블록의 움직임벡터를 복원하는 인터 예측부를 포함하는 영상 복호화 장치를 제공한다.According to another aspect of the present invention, in an image decoding apparatus for decoding a motion vector of a current block, a differential motion vector index is determined by decoding differential motion vector information of the current block, and a resolution of the differential motion vector is determined. a decoding unit that selects one resolution from among a plurality of motion vector resolutions by decoding the displayed resolution information, and restores the differential motion vector of the current block by applying a function corresponding to the selected resolution to the determined differential motion vector index; and an inter prediction unit that determines the predicted motion vector of the current block and reconstructs the motion vector of the current block using the reconstructed differential motion vector and the predicted motion vector.

도 1은 본 발명의 실시예에 따른 영상 부호화 장치에 대한 블록도이다.
도 2는 현재블록의 주변블록에 대한 예시도이다.
도 3은 본 발명의 실시예에 따른 영상 부호화 장치의 동작방법을 나타내는 흐름도이다.
도 4는 본 발명의 실시예에 따른 영상 복호화 장치에 대한 블록도이다.
도 5는 본 발명의 실시예에 따른 영상 복호화 장치의 동작방법을 나타내는 흐름도이다.
도 6은 본 발명의 실시예에 따른 영상 복호화 장치의 구체적인 동작방법의 일례를 나타내는 흐름도이다.
1 is a block diagram of an image encoding apparatus according to an embodiment of the present invention.
2 is an exemplary diagram of a neighboring block of a current block.
3 is a flowchart illustrating a method of operating an image encoding apparatus according to an embodiment of the present invention.
4 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.
5 is a flowchart illustrating a method of operating an image decoding apparatus according to an embodiment of the present invention.
6 is a flowchart illustrating an example of a specific operation method of an image decoding apparatus 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. It should be noted that in adding identification codes to the components of each drawing, the same components are given the same reference numerals as much as possible even though they are indicated on different drawings. In addition, in describing the present invention, if it is determined that a detailed description of a related known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.

도 1은 본 발명의 실시예에 따른 영상 부호화 장치(100)에 대한 블록도이다.1 is a block diagram of an image encoding apparatus 100 according to an embodiment of the present invention.

영상 부호화 장치(100)는 블록 분할부(110), 예측부(120), 감산기(130), 변환부(140), 양자화부(145), 부호화부(150), 역양자화부(160), 역변환부(165), 가산기(170), 필터부(180) 및 메모리(190)를 포함한다. 부호화 장치(100)의 각 구성요소는 하드웨어 칩으로 구현될 수 있으며, 또는 소프트웨어로 구현되고 마이크로프로세서가 각 구성요소에 대응하는 소프트웨어의 기능을 실행하도록 구현될 수도 있다.The image encoding apparatus 100 includes a block divider 110 , a predictor 120 , a subtractor 130 , a transform unit 140 , a quantizer 145 , an encoder 150 , an inverse quantizer 160 , It includes an inverse transform unit 165 , an adder 170 , a filter unit 180 , and a memory 190 . Each component of the encoding apparatus 100 may be implemented as a hardware chip, or may be implemented as software and a microprocessor may be implemented to execute a function of software corresponding to each component.

블록 분할부(110)는 영상을 구성하는 각 픽처(picture)를 복수의 CTU(Coding Tree Unit)로 분할한 이후에, 트리 구조(tree structure)를 이용하여 CTU를 반복적으로(recursively) 분할한다. 트리 구조에서의 리프 노드(leaf node)가 부호화의 기본 단위인 CU(Coding Unit)가 된다. 트리 구조로는 상위 노드가 네 개의 하위 노드로 분할하는 쿼드트리(QuadTree, QT), 또는 QT 구조 및 상위 노드가 두 개의 하위 노드로 분할하는 바이너리트리(BinaryTree, BT) 구조를 혼용한 QTBT (QuadTree plus BinaryTree) 구조가 사용될 수 있다.The block divider 110 divides each picture constituting an image into a plurality of coding tree units (CTUs) and then recursively divides the CTUs using a tree structure. A leaf node in the tree structure becomes a coding unit (CU), which is a basic unit of encoding. The tree structure is a QuadTree (QT) in which the upper node splits into four lower nodes, or a QTBT (QuadTree, QT) structure that combines the QT structure and the binary tree (BT) structure in which the upper node splits into two lower nodes. plus BinaryTree) structure can be used.

예측부(120)는 현재블록을 예측하여 예측블록을 생성한다. 예측부(120)는 인트라 예측부(122)와 인터 예측부(124)를 포함한다. 여기서, 현재블록은 상기의 트리 구조에서 리프 노드에 해당하는 부호화의 기본 단위로서, 현재 부호화하고자 하는 CU를 의미한다. 대안적으로, 현재블록은 CU로부터 분할된 복수의 서브블록 중 하나의 서브블록일 수도 있다.The prediction unit 120 generates a prediction block by predicting the current block. The prediction unit 120 includes an intra prediction unit 122 and an inter prediction unit 124 . Here, the current block is a basic unit of encoding corresponding to a leaf node in the tree structure, and means a CU to be currently encoded. Alternatively, the current block may be one of a plurality of subblocks divided from the CU.

인트라 예측부(122)는 현재블록이 포함된 현재 픽처 내에서 현재블록의 주변에 위치한 픽셀(참조 픽셀)들을 이용하여 현재블록 내의 픽셀들을 예측한다. 예측 방향에 따라 복수의 인트라 예측모드가 존재하며, 각 예측모드에 따라 사용할 주변 픽셀과 연산식이 다르게 정의된다.The intra prediction unit 122 predicts pixels in the current block by using pixels (reference pixels) located around the current block in the current picture including the current block. A plurality of intra prediction modes exist according to a prediction direction, and neighboring pixels to be used and an operation expression are defined differently according to each prediction mode.

인터 예측부(124)는 현재 픽처보다 먼저 부호화 및 복호화된 참조 픽처 내에서 현재블록과 가장 유사한 블록을 탐색하고, 그 탐색된 블록을 이용하여 현재블록에 대한 예측블록을 생성한다. 그리고, 현재 픽처 내의 현재블록과 참조 픽처 내의 예측블록 간의 변위(displacement)에 해당하는 움직임벡터(Motion Vector: MV)를 생성한다. 현재블록을 예측하기 위해 사용된 참조 픽처에 대한 정보 및 움직임벡터에 대한 정보를 포함하는 움직임 정보는 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 전달된다.The inter prediction unit 124 searches for a block most similar to the current block in the reference picture encoded and decoded before the current picture, and generates a prediction block for the current block using the searched block. Then, a motion vector (MV) corresponding to displacement between the current block in the current picture and the prediction block in the reference picture is generated. Motion information including information on a reference picture and information on a motion vector used to predict the current block is encoded by the encoder 150 and transmitted to the image decoding apparatus.

움직임 정보를 부호화하는 데에 소요되는 비트량을 최소화하기 위해 다양한 방법이 사용될 수 있다.Various methods may be used to minimize the amount of bits required to encode motion information.

현재블록의 참조 픽처와 움직임벡터가 주변블록의 참조 픽처 및 움직임벡터와 동일한 경우에는 그 주변블록을 식별할 수 있는 정보를 부호화함으로써, 현재블록의 움직임 정보를 복호화 장치로 전달할 수 있다. 이러한 방법을 '머지 모드 (merge mode)'라 한다.When the reference picture and motion vector of the current block are the same as the reference picture and motion vector of the neighboring block, the motion information of the current block may be transmitted to the decoding apparatus by encoding information for identifying the neighboring block. This method is called 'merge mode'.

머지 모드에서, 인터 예측부(124)는 현재블록의 주변블록들로부터 기 결정된 개수의 머지 후보블록(이하, '머지 후보'라 함)들을 선택한다. In the merge mode, the inter prediction unit 124 selects a predetermined number of merge candidate blocks (hereinafter, referred to as 'merge candidates') from neighboring blocks of the current block.

머지 후보를 유도하기 위한 주변블록으로는, 도 2에 도시된 바와 같이, 현재 픽처 내에서 현재블록에 인접한 좌측블록(L), 상단블록(A), 우상단블록(AR), 좌하단블록(BL), 좌상단블록(AL) 중에서 전부 또는 일부가 사용될 수 있다. 또한, 현재블록이 위치한 현재 픽처가 아닌 참조 픽처(현재블록을 예측하기 위해 사용된 참조 픽처와 동일할 수도 있고 다를 수도 있음) 내에 위치한 블록이 머지 후보로서 사용될 수도 있다. 예컨대, 참조 픽처 내에서 현재블록과 동일 위치에 있는 블록(co-located block) 또는 그 동일 위치의 블록에 인접한 블록들이 머지 후보로서 추가로 더 사용될 수 있다. As the neighboring blocks for inducing the merge candidate, as shown in FIG. 2 , the left block (L), the upper block (A), the upper right block (AR), and the lower left block (BL) adjacent to the current block in the current picture. ), all or part of the upper left block AL may be used. Also, a block located in a reference picture (which may be the same as or different from the reference picture used to predict the current block) other than the current picture in which the current block is located may be used as a merge candidate. For example, a block co-located with the current block in the reference picture or blocks adjacent to the co-located block may be further used as merge candidates.

인터 예측부(124)는 이러한 주변블록들을 이용하여 기 결정된 개수의 머지 후보를 포함하는 머지 리스트를 구성한다. 머지 리스트에 포함된 머지 후보들 중에서 현재블록의 움직임정보로서 사용할 머지 후보를 선택하고 선택된 후보를 식별하기 위한 머지 인덱스 정보를 생성한다. 생성된 머지 인덱스 정보는 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 전달된다.The inter prediction unit 124 constructs a merge list including a predetermined number of merge candidates by using these neighboring blocks. A merge candidate to be used as motion information of the current block is selected from among the merge candidates included in the merge list, and merge index information for identifying the selected candidate is generated. The generated merge index information is encoded by the encoder 150 and transmitted to the image decoding apparatus.

움직임 정보를 부호화하는 또 다른 방법은 차분움직임벡터(Motion Vector Difference: MVD)를 부호화하는 것이다.Another method of encoding motion information is to encode a motion vector difference (MVD).

이 방법에서, 인터 예측부(124)는 현재블록의 주변블록들을 이용하여 현재블록의 움직임벡터에 대한 예측움직임벡터(Motion Vector Predictor: MVP) 후보들을 유도한다. 예측움직임벡터 후보들을 유도하기 위해 사용되는 주변블록으로는, 도 2에 도시된 현재 픽처 내에서 현재블록에 인접한 좌측블록(L), 상단블록(A), 우상단블록(AR), 좌하단블록(BL), 좌상단블록(AL) 중에서 전부 또는 일부가 사용될 수 있다. 또한, 현재블록이 위치한 현재 픽처가 아닌 참조 픽처(현재블록을 예측하기 위해 사용된 참조 픽처와 동일할 수도 있고 다를 수도 있음) 내에 위치한 블록이 예측움직임벡터 후보들을 유도하기 위해 사용되는 주변블록으로서 사용될 수도 있다. 예컨대, 참조 픽처 내에서 현재블록과 동일 위치에 있는 블록(co-located block) 또는 그 동일 위치의 블록에 인접한 블록들이 사용될 수 있다.In this method, the inter prediction unit 124 derives motion vector predictor (MVP) candidates for the motion vector of the current block using neighboring blocks of the current block. As the neighboring blocks used to derive the predicted motion vector candidates, the left block (L), the upper block (A), the upper right block (AR), the lower left block (L) adjacent to the current block in the current picture shown in FIG. BL), all or part of the upper left block AL may be used. In addition, a block located in a reference picture (which may be the same as or different from the reference picture used to predict the current block) other than the current picture in which the current block is located is used as a neighboring block used to derive prediction motion vector candidates. may be For example, a block co-located with the current block in the reference picture or blocks adjacent to the co-located block may be used.

인터 예측부(124)는 이 주변블록들의 움직임벡터를 이용하여 예측움직임벡터 후보들을 유도하고, 예측움직임벡터 후보들을 이용하여 현재블록의 움직임벡터에 대한 예측움직임벡터를 결정한다. 그리고, 현재블록의 움직임벡터로부터 예측움직임벡터를 감산하여 차분움직임벡터를 산출한다. The inter prediction unit 124 derives predicted motion vector candidates by using the motion vectors of the neighboring blocks, and determines a predicted motion vector for the motion vector of the current block using the predicted motion vector candidates. Then, a differential motion vector is calculated by subtracting the predicted motion vector from the motion vector of the current block.

예측움직임벡터는 예측움직임벡터 후보들에 기 정의된 함수(예컨대, 중앙값, 평균값 연산 등)를 적용하여 구할 수 있다. 이 경우, 영상 복호화 장치도 기 정의된 함수를 알고 있다. 또한, 예측움직임벡터 후보를 유도하기 위해 사용하는 주변블록은 이미 부호화 및 복호화가 완료된 블록이므로 영상 복호화 장치도 그 주변블록의 움직임벡터를 이미 알고 있다. 그러므로 영상 부호화 장치(100)는 예측움직임벡터 후보를 식별하기 위한 정보를 부호화할 필요가 없다. 따라서, 이 경우에는 차분움직임벡터에 대한 정보와 현재블록을 예측하기 위해 사용한 참조 픽처에 대한 정보가 부호화된다.The predicted motion vector may be obtained by applying a predefined function (eg, a median value, an average value operation, etc.) to the predicted motion vector candidates. In this case, the image decoding apparatus also knows the predefined function. Also, since the neighboring block used to derive the predicted motion vector candidate is a block that has already been encoded and decoded, the image decoding apparatus already knows the motion vector of the neighboring block. Therefore, the image encoding apparatus 100 does not need to encode information for identifying the predicted motion vector candidate. Accordingly, in this case, information on the differential motion vector and information on the reference picture used to predict the current block are encoded.

한편, 예측움직임벡터는 예측움직임벡터 후보들 중 어느 하나를 선택하는 방식으로 결정될 수도 있다. 이 경우에는 차분움직임벡터에 대한 정보 및 현재블록을 예측하기 위해 사용한 참조 픽처에 대한 정보와 함께, 선택된 예측움직임벡터 후보를 식별하기 위한 정보가 추가로 부호화된다.Meanwhile, the predicted motion vector may be determined by selecting any one of the predicted motion vector candidates. In this case, information for identifying the selected predicted motion vector candidate is additionally encoded together with information on the differential motion vector and information on the reference picture used to predict the current block.

감산기(130)는 현재블록으로부터 인트라 예측부(112) 또는 인터 예측부(124)에 의해 생성된 예측블록을 감산하여 잔차 블록을 생성한다.The subtractor 130 generates a residual block by subtracting the prediction block generated by the intra prediction unit 112 or the inter prediction unit 124 from the current block.

변환부(140)는 공간 영역의 픽셀 값들을 가지는 잔차 블록 내의 잔차 신호를 주파수 도메인의 변환 계수로 변환한다. 변환부(140)는 잔차 블록 내의 잔차 신호들을 현재블록의 크기를 변환 단위로 사용하여 변환할 수 있으며, 또는 잔차 블록을 더 작은 복수의 서브블록을 분할하고 서브블록 크기의 변환 단위로 잔차 신호들을 변환할 수도 있다. 잔차 블록을 더 작은 서브블록으로 분할하는 방법은 다양하게 존재할 수 있다. 예컨대, 기 정의된 동일한 크기의 서브블록으로 분할할 수도 있으며, 또는 잔차 블록을 루트 노드로 하는 QT(quadtree) 방식의 분할을 사용할 수도 있다.The transform unit 140 transforms the residual signal in the residual block having pixel values in the spatial domain into transform coefficients in the frequency domain. The transform unit 140 may transform the residual signals in the residual block using the size of the current block as a transform unit, or divide the residual block into a plurality of smaller sub-blocks and convert the residual signals in the transform unit of the sub-block size. You can also convert There may be various methods for dividing the residual block into smaller subblocks. For example, it may be divided into subblocks of the same size as defined previously, or a quadtree (QT) method using the residual block as a root node may be used.

양자화부(145)는 변환부(140)로부터 출력되는 변환 계수들을 양자화하고, 양자화된 변환 계수들을 부호화부(150)로 출력한다.The quantization unit 145 quantizes the transform coefficients output from the transform unit 140 , and outputs the quantized transform coefficients to the encoder 150 .

부호화부(150)는 양자화된 변환 계수들을 CABAC 등의 부호화 방식을 사용하여 부호화하여 비트스트림을 생성한다. 또한, 부호화부(150)는 트리 구조의 최상위 레이어에 위치하는 CTU의 크기에 대한 정보 및 CTU로부터 트리 구조로 블록을 분할하기 위한 분할 정보를 부호화하여, 복호화 장치가 부호화 장치와 동일하게 블록을 분할할 수 있도록 한다. 예컨대, QT 분할의 경우에는 상위 레이어의 블록이 하위 레이어의 네 개의 블록으로 분할되는지 여부를 지시하는 QT 분할 정보를 부호화한다. BT 분할의 경우에는 QT의 리프 노드에 해당하는 블록으로부터 시작하여 각 블록이 두 개의 블록으로 분할되는지 여부 및 분할되는 타입을 지시하는 BT 분할 정보를 부호화한다.The encoder 150 generates a bitstream by encoding the quantized transform coefficients using an encoding method such as CABAC. In addition, the encoder 150 encodes information on the size of a CTU located in the uppermost layer of the tree structure and partition information for splitting a block from the CTU into a tree structure, so that the decoding apparatus divides the block in the same way as the encoding apparatus. make it possible For example, in the case of QT division, QT division information indicating whether a block of an upper layer is divided into four blocks of a lower layer is encoded. In the case of BT division, starting from a block corresponding to a leaf node of QT, BT division information indicating whether each block is divided into two blocks and the type of division is encoded.

부호화부(150)는 현재블록이 인트라 예측에 의해 부호화되었는지 아니면 인터 예측에 의해 부호화되었는지 여부를 지시하는 예측 타입에 대한 정보를 부호화하고, 예측 타입에 따라 인트라 예측정보 또는 인터 예측정보를 부호화한다.The encoder 150 encodes information on a prediction type indicating whether the current block is encoded by intra prediction or inter prediction, and encodes intra prediction information or inter prediction information according to the prediction type.

한편, 현재블록이 인터 예측된 경우, 부호화부(150)는 인터 예측정보에 대한 신택스 요소들(syntax elements)을 부호화한다. 인터 예측정보에 대한 신택스 요소들은 다음을 포함한다.Meanwhile, when the current block is inter-predicted, the encoder 150 encodes syntax elements for inter prediction information. Syntax elements for inter prediction information include the following.

(a) 현재블록의 움직임정보가 머지 모드로 부호화되는지 아니면 차분움직임벡터를 부호화하는 모드로 부호화되는지 여부를 지시하는 모드 정보(a) Mode information indicating whether motion information of the current block is encoded in a merge mode or a differential motion vector encoding mode

(b) 움직임정보에 대한 신택스 요소(b) Syntax elements for motion information

움직임정보가 머지 모드에 의해 부호화되는 경우, 부호화부(150)는 머지 후보들 중 어느 후보가 현재블록의 움직임정보를 추출하기 위한 후보로서 선택되는지를 지시하는 머지 인덱스 정보를 움직임정보에 대한 신택스 요소로 부호화한다.When the motion information is encoded by the merge mode, the encoder 150 uses merge index information indicating which of the merge candidates is selected as a candidate for extracting the motion information of the current block as a syntax element for the motion information. encode

반면, 움직임정보가 차분움직임벡터를 부호화하는 모드에 의해 부호화되는 경우, 차분움직임벡터에 대한 정보 및 참조 픽처에 대한 정보를 움직임정보에 대한 신택스 요소로 부호화한다. 만약, 예측 움직임벡터가 복수의 예측 움직임벡터 후보들 중 어느 하나의 후보를 선택하는 방식으로 결정되는 경우에는, 움직임정보에 대한 신택스 요소는 그 선택된 후보를 식별하기 위한 예측 움직임벡터 식별 정보를 추가로 더 포함한다.On the other hand, when motion information is encoded by a differential motion vector encoding mode, information on the differential motion vector and information on a reference picture are encoded as syntax elements for motion information. If the prediction motion vector is determined by selecting any one candidate from among a plurality of prediction motion vector candidates, the syntax element for the motion information further includes prediction motion vector identification information for identifying the selected candidate. include

역양자화부(160)는 양자화부(145)로부터 출력되는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 생성한다. 역변환부(165)는 역양자화부(160)로부터 출력되는 변환 계수들을 주파수 도메인으로부터 공간 도메인으로 변환하여 잔차블록을 복원한다.The inverse quantization unit 160 inverse quantizes the quantized transform coefficients output from the quantization unit 145 to generate transform coefficients. The inverse transform unit 165 restores the residual block by transforming the transform coefficients output from the inverse quantization unit 160 from the frequency domain to the spatial domain.

가산기(170)는 복원된 잔차블록과 예측부(120)에 의해 생성된 예측블록을 가산하여 현재블록을 복원한다. 복원된 현재블록 내의 픽셀들은 다음 순서의 블록을 인트라 예측할 때 참조 픽셀로서 사용된다.The adder 170 reconstructs the current block by adding the reconstructed residual block to the prediction block generated by the prediction unit 120 . Pixels in the reconstructed current block are used as reference pixels when intra-predicting the next block.

필터부(180)는 블록 단위의 부호화/복호화로 인해 발생하는 블록킹 현상(blocking artifact)을 제거하기 위해 복원된 블록 간의 경계를 디블록킹 필터링하고 메모리(190)에 저장한다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 부호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조 픽처로 사용된다.The filter unit 180 deblocks and filters the boundary between the reconstructed blocks in order to remove a blocking artifact caused by block-by-block encoding/decoding, and stores the deblocking-filtering in the memory 190 . When all blocks in one picture are reconstructed, the reconstructed picture is used as a reference picture for inter prediction of blocks in a picture to be encoded later.

참고로, 영상 부호화 장치(100)는 스킵 모드(Skip Mode)를 사용하여 현재블록을 부호화할 수도 있다. 스킵 모드에서는, 현재블록의 움직임정보만이 부호화되고 잔차블록에 대한 정보 등 현재블록에 대한 어떠한 다른 정보도 부호화되지 않는다. 현재블록의 움직임정보로서는 전술한 머지 인덱스 정보가 사용될 수 있다. 영상 복호화 장치(100)는, 현재 블록이 스킵 모드로 부호화된 경우, 비트스트림으로부터 복호화된 머지 인덱스 정보에 의해 지시되는 머지 후보의 움직임정보를 현재블록의 움직임정보로 설정한다. 그리고 현재블록의 움직임정보에 의해 예측된 예측블록을 현재블록으로서 복원한다.For reference, the image encoding apparatus 100 may encode the current block using a skip mode. In the skip mode, only motion information of the current block is encoded, and no other information about the current block, such as information on the residual block, is encoded. The above-described merge index information may be used as motion information of the current block. When the current block is encoded in the skip mode, the image decoding apparatus 100 sets the motion information of the merge candidate indicated by the merge index information decoded from the bitstream as the motion information of the current block. Then, the prediction block predicted by the motion information of the current block is restored as the current block.

본 발명은 움직임벡터를 부호화 또는 복호화하기 위한 방법 및 장치에 관한 것으로, 영상 및 블록의 특성에 따라 차분움직임벡터를 표현하는 해상도를 조절하여 부호화 효율을 향상시킬 수 있다. The present invention relates to a method and apparatus for encoding or decoding a motion vector, and it is possible to improve encoding efficiency by adjusting a resolution for expressing a differential motion vector according to characteristics of images and blocks.

우선, 움직임벡터 해상도에 대하여 설명한다. 움직임벡터 해상도는 정수 픽셀 해상도와 분수 픽셀 해상도 사이에서 적응적으로 결정될 수 있다. 움직임벡터 해상도는 움직임벡터를 결정하는 최소 단위이다. 또한, 움직임벡터 해상도는 현재블록의 움직임 보상을 위한 참조 픽처의 해상도 즉, 참조 픽처를 어느 픽셀까지 보간할 것인지를 의미할 수 있다. 예컨대, 움직임벡터 해상도가 1/4 픽셀이라고 하면, 참조 픽처는 1/4 픽셀 단위까지 보간되며 움직임벡터는 1/4 픽셀 단위까지 측정된다. 여기서, 움직임벡터를 결정하는 최소 단위는 1/2 픽셀, 1/4 픽셀, 1/8 픽셀 등과 같은 분수 픽셀(fractional pixel) 단위이거나, 1 픽셀, 2픽셀, 3픽셀 등과 같은 정수 픽셀(integer pixel) 단위가 될 수 있다. 움직임벡터 해상도뿐만 아니라 차분움직임벡터 해상도 역시 분수 픽셀 해상도 및 정수 픽셀 해상도 사이에서 적응적으로 선택될 수 있다.First, motion vector resolution will be described. The motion vector resolution may be adaptively determined between integer pixel resolution and fractional pixel resolution. The motion vector resolution is the minimum unit for determining the motion vector. Also, the motion vector resolution may mean the resolution of the reference picture for motion compensation of the current block, that is, to which pixel the reference picture is interpolated. For example, if the resolution of the motion vector is 1/4 pixel, the reference picture is interpolated to the unit of 1/4 pixel, and the motion vector is measured to the unit of 1/4 pixel. Here, the minimum unit for determining the motion vector is a fractional pixel unit such as 1/2 pixel, 1/4 pixel, 1/8 pixel, etc., or an integer pixel unit such as 1 pixel, 2 pixels, 3 pixels, etc. ) can be a unit. The differential motion vector resolution as well as the motion vector resolution can be adaptively selected between the fractional pixel resolution and the integer pixel resolution.

움직임이 미세한 영역을 예측하는 경우에는 분수 픽셀 단위로 움직임 벡터가 표현되고, 움직임이 큰 영역을 예측하는 경우에는 정수 픽셀 단위로 움직임벡터가 표현될 수 있다. 한편, 현재블록의 움직임벡터와 예측움직임벡터의 차이가 작은 경우에는 분수 픽셀 단위로 차분움직임벡터가 표현되고, 반대로 그 차이가 큰 경우에는 정수 픽셀 단위로 차분움직임벡터가 표현될 수 있다. 영상의 특성에 따라 정수 픽셀 해상도보다 분수 픽셀 해상도로 움직임벡터 및 차분움직임벡터를 표현하는 것이 적절한 경우가 있겠으나, 이 경우에는 정수 이하의 소수 부분까지 영상 복호화 장치로 시그널링해야 하므로, 필요한 비트량이 증가하게 된다.A motion vector may be expressed in units of fractional pixels when a region in which motion is fine is predicted, and a motion vector may be expressed in units of integer pixels when a region in which a motion is large is predicted. Meanwhile, when the difference between the motion vector of the current block and the predicted motion vector is small, the differential motion vector may be expressed in units of fractional pixels, and if the difference is large, the differential motion vector may be expressed in units of integer pixels. Depending on the characteristics of the image, it may be appropriate to express motion vectors and differential motion vectors at fractional pixel resolution rather than integer pixel resolution. will do

기존 HEVC 표준에서는 움직임벡터 및 차분움직임벡터를 1/4 픽셀 해상도로 표현한다. 1/4 픽셀 해상도로 표현된 차분움직임벡터(quarter-pixel mvd)와 이에 부여되는 차분움직임벡터 인덱스(mvd index)의 일례는 표 1과 같다.In the existing HEVC standard, motion vectors and differential motion vectors are expressed at 1/4 pixel resolution. Table 1 shows an example of a differential motion vector (quarter-pixel mvd) expressed in 1/4 pixel resolution and a differential motion vector index (mvd index) provided thereto.

mvdmvd index index quarter-pixel mvdquarter-pixel mvd 00 00 1One 0.250.25 22 0.50.5 33 0.750.75 44 1One 55 1.251.25 66 1.51.5 77 1.751.75 88 22 ...... ......

인터 예측부에 의해 결정된 차분움직임벡터는 표 1과 같이 1/4 픽셀 단위로 표현되는 값들을 가질 수 있다. 다만, 정수 부분 이외에 소수 부분까지 포함하는 값들을 시그널링하기 위해서, 실제 결정된 차분움직임벡터(quarter-pixel mvd) 절대값에 4를 곱한 값인 차분움직임벡터 인덱스(mvd index) 및 결정된 차분움직임벡터의 부호(sign) 값이 현재블록의 차분움직임벡터의 정보로서 부호화된다.The differential motion vector determined by the inter prediction unit may have values expressed in units of 1/4 pixels as shown in Table 1. However, in order to signal values that include a fractional part in addition to the integer part, a differential motion vector index (mvd index), which is a value obtained by multiplying an actual determined absolute value of a quarter-pixel mvd by 4, and a sign of the determined differential motion vector ( sign) value is encoded as information of the differential motion vector of the current block.

표 2는 HEVC에서 차분움직임벡터의 정보를 표현하는 신택스 요소들을 나타낸다.Table 2 shows syntax elements expressing information on differential motion vectors in HEVC.

mvd_coding( x0, y0, refList ) { mvd_coding( x0, y0, refList ) { Descriptor Descriptor abs_ mvd _ greater0 _flag[ 0 ] abs_ mvd _ greater0 _flag [ 0 ] ae(v) ae(v) abs_ mvd _ greater0 _flag[ 1 ] abs_ mvd _ greater0 _flag [ 1 ] ae(v) ae(v) if( abs_mvd_greater0_flag[ 0 ] ) if( abs_mvd_greater0_flag[ 0 ] )   abs_ mvd _ greater1 _flag[ 0 ] abs_ mvd _ greater1 _flag [ 0 ] ae(v) ae(v) if( abs_mvd_greater0_flag[ 1 ] ) if( abs_mvd_greater0_flag[ 1 ] )   abs_ mvd _ greater1 _flag[ 1 ] abs_ mvd _ greater1 _flag [ 1 ] ae(v) ae(v) if( abs_mvd_greater0_flag[ 0 ] ) { if( abs_mvd_greater0_flag[ 0 ] ) {   if( abs_mvd_greater1_flag[ 0 ] ) if( abs_mvd_greater1_flag[ 0 ] )   abs_ mvd _ minus2[ 0 ] abs_ mvd _ minus2 [ 0 ] ae(v) ae(v) mvd _sign_flag[ 0 ] mvd _sign_flag [ 0 ] ae(v) ae(v) } }   if( abs_mvd_greater0_flag[ 1 ] ) { if( abs_mvd_greater0_flag[ 1 ] ) {   if( abs_mvd_greater1_flag[ 1 ] ) if( abs_mvd_greater1_flag[ 1 ] )   abs_ mvd _ minus2[ 1 ] abs_ mvd _ minus2 [ 1 ] ae(v) ae(v) mvd _sign_flag[ 1 ] mvd _sign_flag [ 1 ] ae(v) ae(v) } }   } }  

abs__ mvd _ greater0 _flag[]는 차분움직임벡터 인덱스가 0보다 큰지 여부를 나타내고, abs_ mvd _ greater1 _flag[]는 차분움직임벡터 인덱스가 1보다 큰지 여부를 나타낸다. abs_ mvd _ minus2[]는 차분움직임벡터 인덱스에서 2를 뺀 값을 나타내고, mvd_sign_flag[]는 차분움직임벡터의 부호(sign)를 나타낸다. [0]은 차분움직임벡터의 가로축 성분(즉, x 컴포넌트)를 표현하고, [1]은 차분움직임벡터의 세로축 성분(즉, y 컴포넌트)를 표현한다. abs__ mvd _ greater0 _flag [ ] indicates whether the differential motion vector index is greater than 0, and abs_ mvd _ greater1 _flag [] indicates whether the differential motion vector index is greater than 1. abs_ mvd _ minus2 [ ] represents a value obtained by subtracting 2 from a differential motion vector index, and mvd_sign_flag [] represents a sign of a differential motion vector. [0] represents the horizontal axis component (ie, the x component) of the differential motion vector, and [1] represents the vertical axis component (ie, the y component) of the differential motion vector.

표 3은 표 2에서 언급한 신택스 요소들의 이진화 기법을 나타낸다.Table 3 shows the binarization technique of the syntax elements mentioned in Table 2.


Syntax element Syntax element
BinarizationBinarization
Process Process ParameterParameter
mvd


mvd

abs_mvd_greater0_flag[ ]abs_mvd_greater0_flag[ ] FLFL Max=1Max=1
abs_mvd_greater1_flag[ ]abs_mvd_greater1_flag[ ] FLFL Max=1Max=1 abs_abs_ mvdmvd __ minus2minus2 [ ][ ] EGEG k-th=1k-th=1 mvdmvd _sign_flag[ ]_sign_flag[ ] FLFL Max=1Max=1

FL은 고정 길이(Fixed Length) 기반의 이진화 기법으로서, 해당 신택스 요소의 최대값(Max)이 필요하다. EG(Exponential Golomb)는 2의 승수 기반의 이진화 기법으로서, 차수(k-th)에 대한 정보가 필요하다. 표 4는 차수 별 EG의 코드 빈(code bins)을 나타낸다.FL is a fixed-length-based binarization technique, and requires a maximum value (Max) of a corresponding syntax element. EG (Exponential Golomb) is a binarization technique based on a multiplier of 2, and requires information about the order (k-th). Table 4 shows the code bins of the EG for each order.

CodeCode
NumNum
k=0k=0 k=1k=1 k=2k=2
00 00 0000 000000 1One 100100 0101 001001 22 101101 10001000 010010 33 1100011000 10011001 011011 44 1100111001 10101010 1000010000 55 1101011010 10111011 1000110001 66 1101111011 110000110000 1001010010 77 11100001110000 110001110001 1001110011 88 11100011110001 110010110010 1010010100 99 11100101110010 110011110011 1010110101 1010 11100111110011 110100110100 1011010110 ...... ...... ...... ......

표 5는 HEVC에서 1/4 픽셀 해상도에 따라 결정된 현재블록의 차분움직임벡터(quarter-pixel mvd) 정보를 나타내기 위한 신택스 요소들 및 필요한 비트수를 나타낸다.Table 5 shows syntax elements and the required number of bits for representing the quarter-pixel mvd information of the current block determined according to the 1/4 pixel resolution in HEVC.

quarter-pixel mvdquarter-pixel mvd 00 0.250.25 -0.50-0.50 0.750.75 -1.00-1.00 2.252.25 13.0013.00 -22.50-22.50 43.7543.75 mvdmvd index index 00 1One 22 33 44 99 5252 9090 175175 abs_mvd_greater0_flagabs_mvd_greater0_flag 00 1One 1One 1One 1One 1One 1One 1One 1One abs_mvd_greater1_flagabs_mvd_greater1_flag -- 00 1One 1One 1One 1One 1One 1One 1One abs_abs_ mvdmvd __ minus2minus2 -- -- 2 bits (0)2 bits (0) 2 bits (1)2 bits (1) 4 bits (2)4 bits (2) 6 bits (7)6 bits (7) 10 bits (50)10 bits (50) 12 bits (88)12 bits (88) 14 bits (173)14 bits (173) mvdmvd _sign_flag_sign_flag -- 00 1One 00 1One 00 00 1One 00 Total bitsTotal bits 1One
bitbit
3 bits3 bits 5 bits5 bits 5 bits5 bits 7 bits7 bits 9 bits9 bits 13 bits13 bits 15 bits15 bits 17 bits17 bits

표 5에서 mvd index는 실제로 구한 차분움직임벡터(quarter-pixel mvd)의 인덱스 값으로, 표 1에서 기재한 것과 같이 차분움직임벡터(quarter-pixel mvd) 절대값에 4를 곱하여 획득되는 값이다. abs_ mvd _ minus2에 필요한 비트수는 k-th가 1인 EG(표 3 참고)를 기반으로 mvd index에서 2를 뺀 값을 코딩한 결과로부터 얻어진다. 이하, 본 발명의 실시예들에 대한 설명에도 동일하게 적용된다. mvd index에서 2를 뺀 값은 abs_ mvd _ minus2에 필요한 비트수 아래의 괄호 안에 표시되어 있다.In Table 5, the mvd index is the index value of the actually obtained differential motion vector (quarter-pixel mvd). As shown in Table 1, the mvd index is a value obtained by multiplying the absolute value of the differential motion vector (quarter-pixel mvd) by 4. The number of bits required for abs_ mvd _ minus2 is obtained from the coding result by subtracting 2 from the mvd index based on EG with k-th equal to 1 (refer to Table 3). Hereinafter, the same applies to the description of the embodiments of the present invention. The mvd index minus 2 is shown in parentheses below the number of bits required for abs_ mvd _ minus2 .

본 발명은 차분움직임벡터 정보를 표현하는데 필요한 비트량을 줄임으로써 영상을 효율적으로 부호화 또는 복호화할 수 있는 방법을 제안한다. 이하 설명할 본 발명의 다양한 실시예들은 차분움직임벡터의 가로축 성분(x 컴포넌트) 및 세로축 성분(y 컴포넌트) 모두에 각각 적용된다. 다만, 설명의 편의상 하나의 성분을 기준으로 설명한다. 또한, 본 발명은 차분움직임벡터를 표현하는 데에 한정하지 않고, 움직임벡터 자체를 표현하는데 사용될 수 있다.The present invention proposes a method for efficiently encoding or decoding an image by reducing the amount of bits required to express differential motion vector information. Various embodiments of the present invention to be described below are respectively applied to both the horizontal axis component (x component) and the vertical axis component (y component) of the differential motion vector. However, for convenience of description, one component will be described as the basis. In addition, the present invention is not limited to expressing a differential motion vector, but can be used to express a motion vector itself.

실시예Example 1 One

본 실시예는 1/2 픽셀, 1/4 픽셀, 1/8 픽셀, 1/16 픽셀 등과 같이 분수 픽셀 단위로 표현되는 차분움직임벡터에 있어서, 정수 부분과 소수 부분을 분리하여 효율적으로 표현하는 방법에 관한 것이다. 예를 들어, 결정된 차분움직임벡터 값이 "3.75"인 경우, 정수 부분에 속하는 "3"과 소수 부분에 속하는 ".75"를 분리하여 표현하는 것이다.In the present embodiment, in a differential motion vector expressed in fractional pixel units, such as 1/2 pixel, 1/4 pixel, 1/8 pixel, 1/16 pixel, etc., the integer part and the decimal part are separated and expressed efficiently. is about For example, when the determined differential motion vector value is "3.75", "3" belonging to the integer part and ".75" belonging to the decimal part are separately expressed.

우선, 본 실시예에 따른 영상 부호화 장치는 현재블록에 대한 차분움직임벡터를 결정한다. 이 때, 결정된 차분움직임벡터의 절대값은 설정된 움직임벡터 해상도에 따라 정수 픽셀 단위로 표현될 수도 있고 분수 픽셀 단위로 표현될 수도 있다. 다만, 본 실시예는 차분움직임벡터의 절대값이 분수 픽셀 단위로 표현된 경우에 적용될 수 있다.First, the image encoding apparatus according to the present embodiment determines a differential motion vector for a current block. In this case, the determined absolute value of the differential motion vector may be expressed in integer pixel units or fractional pixel units according to the set motion vector resolution. However, this embodiment may be applied to a case where the absolute value of the differential motion vector is expressed in fractional pixel units.

영상 부호화 장치는 차분움직임벡터의 절대값을 분수 픽셀 단위로 결정하는 경우, 결정된 차분움직임벡터의 절대값을 정수 부분과 소수 부분으로 분리한다. 그리고 차분움직임벡터의 절대값에 대한 정보 즉, 정수 부분에 해당하는 값을 나타내는 정보와 소수 부분에 해당하는 값을 나타내는 정보를 부호화한다. 차분움직임벡터의 부호를 나타내는 정보도 별도로 부호화한다.When the absolute value of the differential motion vector is determined in fractional pixel units, the image encoding apparatus separates the determined absolute value of the differential motion vector into an integer part and a fractional part. Then, information on the absolute value of the differential motion vector, that is, information indicating a value corresponding to an integer part and information indicating a value corresponding to a decimal part, is encoded. Information indicating the sign of the differential motion vector is also separately encoded.

예를 들어, 영상 부호화 장치는 차분움직임벡터의 절대값을 표현함에 있어서, 정수 부분(pre-point)은 3개의 신택스 요소들로 표현하고, 소수 부분(post-point)은 1개의 신택스 요소로 표현할 수 있다. 차분움직임벡터의 부호는 플래그로 표현한다. 신택스 요소들의 일례는 다음과 같다.For example, when the image encoding apparatus expresses the absolute value of a differential motion vector, an integer part (pre-point) is expressed by three syntax elements, and a decimal part (post-point) is expressed by one syntax element. can The sign of the differential motion vector is expressed as a flag. An example of syntax elements is as follows.

- abs_ mvd _zero_only_flag(pre-point): 차분움직임벡터의 절대값이 오직 0인지를 나타내는 플래그- abs_ mvd _zero_only_flag (pre-point) : A flag indicating whether the absolute value of the differential motion vector is only 0.

- abs_ mvd _ less1 _flag(pre-point): 차분움직임벡터의 절대값이 1 미만인지를 나타내는 플래그- abs_ mvd _ less1 _flag (pre-point) : A flag indicating whether the absolute value of the differential motion vector is less than 1.

- abs_ mvd _ minus1 (pre-point): 차분움직임벡터의 절대값의 정수 부분에서 1을 뺀 값- abs_ mvd _ minus1 ( pre-point) : The value obtained by subtracting 1 from the integer part of the absolute value of the differential motion vector

- abs_ mvd _post_type(post-point): 차분움직임벡터의 절대값의 소수 부분을 나타내는 타입 정보(예를 들어, 1/4 픽셀이라면 4가지 타입 0:.00, 1:.25, 2:.50, 3:.75)- abs_ mvd _post_type (post-point) : Type information indicating the fractional part of the absolute value of the differential motion vector (for example, if it is 1/4 pixel, there are 4 types 0:.00, 1:.25, 2:.50 , 3:.75)

- mvd _sign_flag: 차분움직임벡터의 부호를 나타내는 플래그- mvd _sign_flag : A flag indicating the sign of the differential motion vector.

abs_ mvd _post_type에 대하여 기재된 소수 부분을 나타내는 4가지 타입 정보는 예시에 불과하며, 반드시 이에 한정되는 것은 아니다. 움직임벡터 해상도에 따라 타입 정보의 값 및 개수가 다양하게 달라질 수 있다.The four types of information indicating the fractional part described with respect to abs_mvd_post_type are merely examples and are not necessarily limited thereto. The value and number of type information may vary according to motion vector resolution.

본 실시예의 신택스 요소들에 대한 구조의 일례는 표 6과 같다.An example of the structure of the syntax elements of this embodiment is shown in Table 6.

mvd_coding( x0, y0, refList ) { mvd_coding( x0, y0, refList ) { Descriptor Descriptor abs_ mvd _zero_only_flag[ ] abs_ mvd _zero_only_flag [ ] ae(v) ae(v) if(!abs_mvd_zero_only_flag[ ] ) if(!abs_mvd_zero_only_flag[ ] )   abs_ mvd _ less1 _flag[ ] abs_ mvd _ less1 _flag [ ] ae(v) ae(v) if(!abs_mvd_zero_only_flag[ ] ) { if(!abs_mvd_zero_only_flag[ ] ) {   if(!abs_mvd_less1_flag[ ] ) if(!abs_mvd_less1_flag[ ] )   abs_ mvd _ minus1[ ] abs_ mvd _ minus1 [ ] ae(v) ae(v) abs_ mvd _post_type[ ] abs_ mvd _post_type [ ] ae(v) ae(v) mvd _sign_flag[ ] mvd _sign_flag [ ] ae(v) ae(v) } }   } }  

본 실시예의 신택스 요소들에 대한 이진화 방법의 일례는 표 7과 같다. abs_mvd_post_type에 대한 타입이 4가지이므로 해당 신택스의 FL에 대한 Max 값이 3으로 설정된다. 그러나, 이에 한정되는 것은 아니며 움직임벡터 해상도에 따라 FL에 대한 Max 값이 달라질 수 있다.An example of a binarization method for the syntax elements of this embodiment is shown in Table 7. Since there are 4 types for abs_mvd_post_type , the Max value for FL of the corresponding syntax is set to 3. However, the present invention is not limited thereto, and the Max value for FL may vary according to motion vector resolution.


Syntax element Syntax element BinarizationBinarization
Process Process ParameterParameter Pre-point

Pre-point

abs_mvd_zero_only_flagabs_mvd_zero_only_flag FLFL Max=1Max=1
abs_abs_ mvdmvd __ less1less1 _flag_flag FLFL Max=1Max=1 abs_abs_ mvdmvd __ minus1minus1 EGEG k-th=1k-th=1 Post-point post-point abs_abs_ mvdmvd _post_type_post_type FLFL Max=3Max=3 Sign Sign mvdmvd _sign_flag_sign_flag FLFL Max1Max1

표 8은 전술한 표 5와 동일한 차분움직임벡터에 대하여 본 실시예에 따라 계산한 비트수를 나타낸다. abs_ mvd _ minus1에 필요한 비트수 아래에 기재된 괄호 안의 숫자는 차분움직임벡터 절대값의 정수 부분에서 1을 뺀 값을 나타낸다.Table 8 shows the number of bits calculated according to the present embodiment for the same differential motion vector as in Table 5 above. The number of bits required for abs_ mvd _ minus1 The number in parentheses below represents the value obtained by subtracting 1 from the integer part of the absolute value of the differential motion vector.

quarter-pixel mvdquarter-pixel mvd 00 0.250.25 -0.50-0.50 0.750.75 -1.00-1.00 2.252.25 13.0013.00 -22.50-22.50 43.7543.75 mvd value (pre_point)mvd value (pre_point) 00 00 00 00 1One 22 1313 2222 4343 abs_mvd_zero_only_flagabs_mvd_zero_only_flag 1One 00 00 00 00 00 00 00 00 abs_abs_ mvdmvd __ less1less1 _flag_flag -- 1One 1One 1One 00 00 00 00 00 abs_abs_ mvdmvd __ minus1minus1 -- -- -- -- 2 bits (0)2 bits (0) 2 bits (0)2 bits (0) 6 bits (12)6 bits (12) 8
bits (21)
8
bits (21)
10 bits (42)10 bits (42)
mvd value (post_point)mvd value (post_point) .25.25 .50.50 .75.75 .00.00 .25.25 .00.00 .50.50 .75.75 abs_abs_ mvdmvd _post_type_post_type -- 0101 1010 1111 0000 0101 0000 1010 1111 mvdmvd _sign_flag_sign_flag -- 00 1One 00 1One 00 00 1One 00 Total bitsTotal bits 1 bit1 bit 5 bits5 bits 5 bits5 bits 5 bits5 bits 7 bits7 bits 7 bits7 bits 11 bits11 bits 1313
bitsbits
1515
bitsbits

표 5와 표 8에서 계산된 총 비트수를 비교하면, 1/4 픽셀 해상도의 차분움직임벡터 값이 0.25인 경우에 본 실시예에서의 비트수가 더 크게 계산되었으나, 2.25, 13.00, -22.50, 43.75의 값에서는 본 실시예에서 계산된 비트수가 더 적다. 본 명세서에서는 생략하였지만, 표 8에 제시된 값 외에 0부터 40까지의 quarter-pixel mvd 값에 대해서 HEVC 방식 및 본 실시예의 방식 각각에 따른 전체 비트수를 비교해보면, 0.25의 경우를 제외한 모든 경우에서 동일한 비트수 또는 더 적은 비트수를 필요로 한다는 결과를 얻을 수 있다. 즉, HEVC 대비 본 실시예에 따른 차분움직임벡터 부호화 방법이 더 효율적이다.Comparing the total number of bits calculated in Table 5 and Table 8, when the differential motion vector value of 1/4 pixel resolution is 0.25, the number of bits in this embodiment is calculated to be larger, but 2.25, 13.00, -22.50, 43.75 For the value of , the number of bits calculated in this embodiment is smaller. Although omitted in this specification, when comparing the total number of bits according to each of the HEVC method and the method of the present embodiment for quarter-pixel mvd values from 0 to 40 in addition to the values shown in Table 8, the same in all cases except for the case of 0.25 The result may be that the number of bits or less is required. That is, the differential motion vector encoding method according to the present embodiment is more efficient than HEVC.

영상 복호화 장치는 비트스트림으로부터 현재블록의 차분움직임벡터 정보를 복호화한다. 여기서, 차분움직임벡터 정보는 차분움직임벡터의 절대값에 대한 정보(예: abs_ mvd _zero_only_flag, abs_ mvd _ less1 _flag, abs_ mvd _ minus1 , abs_mvd_post_type) 및 부호(sign)에 대한 정보(예: mvd _sign_flag)를 포함하고, 차분움직임벡터의 절대값에 대한 정보는 전술한 바와 같이 정수 부분에 해당하는 값을 나타내는 정보와 소수 부분에 해당하는 값을 나타내는 정보를 포함한다.The image decoding apparatus decodes differential motion vector information of the current block from the bitstream. Here, the differential motion vector information includes information on the absolute value of the differential motion vector (eg , abs_ mvd _zero_only_flag , abs_ mvd _ less1 _flag, abs_ mvd _ minus1 , abs_mvd_post_type ) and information on a sign ( eg, mvd ) . and information on the absolute value of the differential motion vector includes information indicating a value corresponding to an integer part and information indicating a value corresponding to a decimal part, as described above.

영상 복호화 장치는 복호화된 차분움직임벡터 절대값의 정수 부분에 해당하는 값을 나타내는 정보 및 소수 부분에 해당하는 값을 나타내는 정보를 이용하여 차분움직임벡터의 절대값을 복원한다. 그리고 복호화된 차분움직임벡터의 부호에 대한 정보 및 복원된 차분움직임벡터의 절대값을 이용하여 현재블록의 차분움직임벡터를 복원한다.The image decoding apparatus restores the absolute value of the differential motion vector by using information indicating a value corresponding to an integer part of the decoded absolute value of the differential motion vector and information indicating a value corresponding to a decimal part. Then, the differential motion vector of the current block is reconstructed using the information on the sign of the decoded differential motion vector and the absolute value of the recovered differential motion vector.

영상 복호화 장치는 현재블록의 예측움직임벡터를 결정하고, 복원된 차분움직임벡터와 결정된 예측움직임벡터를 이용하여 현재블록의 움직임벡터를 복원하게 된다.The image decoding apparatus determines a predicted motion vector of the current block, and reconstructs the motion vector of the current block using the reconstructed differential motion vector and the determined predicted motion vector.

실시예Example 2 2

본 실시예에서는 분수 픽셀 단위로 표현된 차분움직임벡터의 절대값을 정수 부분과 소수 부분으로 나누어 표현하되, 실시예 1과 다른 신택스 요소들을 이용한다.In this embodiment, the absolute value of the differential motion vector expressed in fractional pixel units is divided into an integer part and a decimal part, but syntax elements different from those of the first embodiment are used.

본 실시예에 따른 영상 부호화 장치 역시, 차분움직임벡터의 절대값을 분수 픽셀 단위로 결정하는 경우, 결정된 차분움직임벡터의 절대값을 정수 부분과 소수 부분으로 분리한다. 그리고 차분움직임벡터의 절대값에 대한 정보 즉, 정수 부분에 해당하는 값을 나타내는 정보와 소수 부분에 해당하는 값을 나타내는 정보를 부호화한다. 차분움직임벡터의 부호를 나타내는 정보도 별도로 부호화한다. 다만, 정수 부분에 해당하는 값을 나타내는 정보로서 실시예 1과 다른 신택스 요소들을 이용할 수 있다.The image encoding apparatus according to the present embodiment also divides the determined absolute value of the differential motion vector into an integer part and a fractional part when the absolute value of the differential motion vector is determined in fractional pixel units. Then, information about the absolute value of the differential motion vector, that is, information representing a value corresponding to an integer part and information representing a value corresponding to a decimal part, is encoded. Information indicating the sign of the differential motion vector is also separately encoded. However, as information indicating a value corresponding to the integer part, syntax elements different from those of the first embodiment may be used.

예를 들어, 본 실시예에 따른 영상 부호화 장치는 차분움직임벡터의 절대값을 표현함에 있어, 정수 부분(pre-point)은 4개의 신택스 요소로 표현하고, 소수 부분(post-point)은 1개의 신택스 요소로 표현할 수 있다. 차분움직임벡터의 부호는 플래그로 표현한다. 신택스 요소들의 일례는 다음과 같다.For example, in the image encoding apparatus according to the present embodiment, in expressing the absolute value of a differential motion vector, an integer part (pre-point) is expressed by four syntax elements, and a fractional part (post-point) is one It can be expressed as a syntax element. The sign of the differential motion vector is expressed as a flag. An example of syntax elements is as follows.

- abs_ mvd _zero_only_flag(pre-point): 차분움직임벡터의 절대값이 오직 0인지를 나타내는 플래그- abs_ mvd _zero_only_flag (pre-point) : A flag indicating whether the absolute value of the differential motion vector is only 0.

- abs_ mvd _greater_equal_1_flag(pre-point): 차분움직임벡터의 절대값이 1 이상인지를 나타내는 플래그- abs_ mvd _greater_equal_1_flag (pre-point) : A flag indicating whether the absolute value of the differential motion vector is 1 or more.

- abs_ mvd _greater_equal_2_flag(pre-point): 차분움직임벡터의 절대값이 2 이상인지를 나타내는 플래그- abs_ mvd _greater_equal_2_flag (pre-point) : A flag indicating whether the absolute value of the differential motion vector is 2 or more.

- abs_ mvd _ minus2 (pre-point): 차분움직임벡터의 절대값의 정수 부분에서 2를 뺀 값- abs_ mvd _ minus2 ( pre-point) : The value obtained by subtracting 2 from the integer part of the absolute value of the differential motion vector

- abs_ mvd _post_type(post-point): 차분움직임벡터의 절대값의 소수 부분을 나타내는 타입 정보(예를 들어, 1/4 픽셀이라면 4가지 타입 0:.00, 1:.25, 2:.50, 3:.75)- abs_ mvd _post_type (post-point) : Type information indicating the fractional part of the absolute value of the differential motion vector (for example, if it is 1/4 pixel, there are 4 types 0:.00, 1:.25, 2:.50 , 3:.75)

- mvd _sign_flag: 차분움직임벡터의 부호를 나타내는 플래그- mvd _sign_flag : A flag indicating the sign of the differential motion vector.

abs_ mvd _post_type에 대하여 기재된 소수 부분을 나타내는 4가지 타입 정보는 예시에 불과하며, 반드시 이에 한정되는 것은 아니다. 움직임벡터 해상도에 따라 타입 정보의 값 및 개수가 다양하게 달라질 수 있다.The four types of information indicating the fractional part described with respect to abs_mvd_post_type are merely examples and are not necessarily limited thereto. The value and number of type information may vary according to motion vector resolution.

본 실시예의 신택스 요소들에 대한 구조의 일례는 표 9와 같다.An example of a structure for the syntax elements of this embodiment is shown in Table 9.

mvd_coding( x0, y0, refList ) { mvd_coding( x0, y0, refList ) { Descriptor Descriptor abs_ mvd _zero_only_flag[ ] abs_ mvd _zero_only_flag [ ] ae(v) ae(v) if(!abs_mvd_zero_only_flag[ ] ) if(!abs_mvd_zero_only_flag[ ] )   abs_ mvd _greater_equal_1_flag[ ] abs_ mvd _greater_equal_1_flag [ ] ae(v) ae(v) if(!abs_mvd_zero_only_flag[ ] ) if(!abs_mvd_zero_only_flag[ ] ) if(abs_mvd_greater_equal_1_flag[ ] ) if(abs_mvd_greater_equal_1_flag[ ] ) abs_ mvd _greater_equal_2_flag[ ] abs_ mvd _greater_equal_2_flag [ ] ae(v) ae(v) if(!abs_mvd_zero_only_flag[ ] ) { if(!abs_mvd_zero_only_flag[ ] ) {   if(abs_mvd_greater_equal_1_flag[ ] ) if(abs_mvd_greater_equal_1_flag[ ] )   if(abs_mvd_greater_equal_2_flag[ ] ) if(abs_mvd_greater_equal_2_flag[ ] ) abs_ mvd _ minus2[ ] abs_ mvd _ minus2 [ ] ae(v) ae(v) abs_ mvd _post_type[ ] abs_ mvd _post_type [ ] ae(v) ae(v) mvd _sign_flag[ ] mvd _sign_flag [ ] ae(v) ae(v) } }   } }  

본 실시예의 신택스 요소들에 대한 이진화 방법의 일례는 표 10과 같다. abs_mvd_post_type에 대한 타입이 4가지 이므로 해당 신택스의 FL에 대한 Max 값이 3으로 설정된다. 그러나, 이에 한정되는 것은 아니며 움직임벡터 해상도에 따라 FL에 대한 Max 값이 달라질 수 있다.An example of a binarization method for the syntax elements of this embodiment is shown in Table 10. Since there are 4 types of abs_mvd_post_type , the Max value for FL of the corresponding syntax is set to 3. However, the present invention is not limited thereto, and the Max value for FL may vary according to motion vector resolution.


Syntax element Syntax element BinarizationBinarization
Process Process ParameterParameter Pre-point

Pre-point

abs_mvd_zero_only_flagabs_mvd_zero_only_flag FLFL Max=1Max=1
abs_mvd_greater_equal_1_flagabs_mvd_greater_equal_1_flag FLFL Max=1Max=1 abs_mvd_greater_equal_2_flagabs_mvd_greater_equal_2_flag FLFL Max=1Max=1 abs_abs_ mvdmvd __ minus2minus2 EGEG k-th=1k-th=1 Post-point post-point abs_abs_ mvdmvd _post_type_post_type FLFL Max=3Max=3 Sign Sign mvdmvd _sign_flag_sign_flag FLFL Max1Max1

표 11은 전술한 표 5와 동일한 차분움직임벡터에 대하여 본 실시예에 따라 계산한 비트수를 나타낸다. abs_ mvd _ minus2에 필요한 비트수 아래에 기재된 괄호 안의 숫자는 차분움직임벡터 절대값에서 2를 뺀 값을 나타낸다.Table 11 shows the number of bits calculated according to the present embodiment for the same differential motion vector as in Table 5 above. The number of bits required for abs_ mvd _ minus2 The number in parentheses below represents the value obtained by subtracting 2 from the absolute value of the differential motion vector.

quarter-pixel mvdquarter-pixel mvd 00 0.250.25 -0.50-0.50 0.750.75 -1.00-1.00 2.252.25 13.0013.00 -22.50-22.50 43.7543.75 mvd value (pre_point)mvd value (pre_point) 00 00 00 00 1One 22 1313 2222 4343 abs_mvd_zero_only_flagabs_mvd_zero_only_flag 1One 00 00 00 00 00 00 00 00 abs_mvd_greater_equal_1_flagabs_mvd_greater_equal_1_flag -- 00 00 00 1One 1One 1One 1One 1One abs_mvd_greater_equal_2_flagabs_mvd_greater_equal_2_flag 00 1One 1One 1One 1One abs_abs_ mvdmvd __ minus2minus2 -- -- -- -- -- 2 bits (0)2 bits (0) 6 bits (11)6 bits (11) 8
bits (20)
8
bits (20)
10 bits (41)10 bits (41)
mvd value (post_point)mvd value (post_point) .25.25 .50.50 .75.75 .00.00 .25.25 .00.00 .50.50 .75.75 abs_abs_ mvdmvd _post_type_post_type -- 0101 1010 1111 0000 0101 0000 1010 1111 mvdmvd _sign_flag_sign_flag -- 00 1One 00 1One 00 00 1One 00 Total bitsTotal bits 1 bit1 bit 5 bits5 bits 5 bits5 bits 5 bits5 bits 6 bits6 bits 8 bits8 bits 12 bits12 bits 1414
bitsbits
1616
bitsbits

표 5와 표 11에서 계산된 총 비트수를 비교하면, 1/4 픽셀 해상도의 차분움직임벡터 값이 0.25인 경우에 본 실시예에서의 비트수가 더 크게 계산되었으나, -1.00, 2.25, 13.00, -22.50, 43.75의 값에서는 본 실시예에서 계산된 비트수가 더 적다. 즉, HEVC 대비 본 실시예에 따른 차분움직임벡터 부호화 방법이 더 효율적이다.Comparing the total number of bits calculated in Table 5 and Table 11, when the differential motion vector value of 1/4 pixel resolution is 0.25, the number of bits in this embodiment is calculated to be larger, but -1.00, 2.25, 13.00, - At values of 22.50 and 43.75, the number of bits calculated in this embodiment is smaller. That is, the differential motion vector encoding method according to the present embodiment is more efficient than HEVC.

영상 복호화 장치는 비트스트림으로부터 현재블록의 차분움직임벡터 정보를 복호화한다. 여기서, 차분움직임벡터 정보는 차분움직임벡터의 절대값에 대한 정보(예: abs_ mvd _zero_only_flag, abs_ mvd _greater_equal_1_flag, abs_mvd_greater_equal_2_flag, abs_ mvd _ minus2 , abs_ mvd _post_type) 및 부호(sign)에 대한 정보(예: mvd_sign_flag)를 복호화한다.The image decoding apparatus decodes differential motion vector information of the current block from the bitstream. Here, the differential motion vector information includes information on absolute values of differential motion vectors (eg, abs_ mvd _zero_only_flag , abs_ mvd _greater_equal_1_flag, abs_mvd_greater_equal_2_flag, abs_ mvd _equal_2_flag , _flabs_ mvd _minus2 sign , abs_ sign (eg: d sign _post_type ) ) is decoded.

영상 복호화 장치는 복호화된 차분움직임벡터 절대값의 정수 부분에 해당하는 값을 나타내는 정보 및 소수 부분에 해당하는 값을 나타내는 정보를 이용하여 차분움직임벡터의 절대값을 복원한다. 그리고 복호화된 차분움직임벡터의 부호에 대한 정보 및 복원된 차분움직임벡터의 절대값을 이용하여 현재블록의 차분움직임벡터를 복원한다.The image decoding apparatus restores the absolute value of the differential motion vector by using information indicating a value corresponding to an integer part of the decoded absolute value of the differential motion vector and information indicating a value corresponding to a decimal part. Then, the differential motion vector of the current block is reconstructed using the information on the sign of the decoded differential motion vector and the absolute value of the recovered differential motion vector.

영상 복호화 장치는 현재블록의 예측움직임벡터를 결정하고, 복원된 차분움직임벡터와 결정된 예측움직임벡터를 이용하여 현재블록의 움직임벡터를 복원하게 된다.The image decoding apparatus determines a predicted motion vector of the current block, and reconstructs the motion vector of the current block using the reconstructed differential motion vector and the determined predicted motion vector.

이하에서 설명할 본 발명의 실시예들은 영상 및 블록의 특성에 따라 복수의 움직임벡터 해상도 중에서 차분움직임벡터의 해상도를 적응적으로 선택하여 선택된 해상도로 차분움직임벡터를 표현함으로써, 영상을 효율적으로 부호화한다. 예를 들어, 차분움직임벡터의 크기(absolute value)가 작은 경우에는 분수 픽셀 단위(예: 1/4 픽셀)로 차분움직임벡터를 표현하고, 반대로 크기(absolute value)가 큰 경우에는 정수 픽셀 단위(예: 1 픽셀, 4 픽셀)로 차분움직임벡터를 표현한다.The embodiments of the present invention, which will be described below, efficiently encode an image by adaptively selecting a resolution of a differential motion vector from among a plurality of motion vector resolutions according to the characteristics of an image and a block and expressing the differential motion vector at the selected resolution. . For example, when the magnitude of the differential motion vector (absolute value) is small, the differential motion vector is expressed in fractional pixel units (eg 1/4 pixel), and conversely, when the absolute value is large, the differential motion vector is expressed in integer pixel units ( For example: 1 pixel, 4 pixels) to express a differential motion vector.

영상 부호화 장치는 복수의 움직임벡터 해상도 중에서 하나의 해상도를 적응적으로 선택할지 여부를 나타내는 플래그(adaptive_MV_resolution_ enbaled _flag)를 헤더 정보에 삽입하여 적응적인 해상도 선택 기능을 활성화/비활성화시킬 수 있다. 예를 들어, 영상 부호화 장치가 복수의 움직임벡터 해상도 중에서 하나의 해상도를 적응적으로 선택하는 경우에, adaptive_MV_resolution_ enbaled _flag를 온(on)으로 부호화하고, 해상도를 적응적으로 선택하지 않는 경우에는 adaptive_MV_resolution_enbaled_flag를 오프(off)로 부호화할 수 있다.The video encoding apparatus may activate/deactivate the adaptive resolution selection function by inserting a flag ( adaptive_MV_resolution_enbaled_flag ) indicating whether to adaptively select one resolution from among a plurality of motion vector resolutions in header information. For example, when the video encoding apparatus adaptively selects one resolution from among a plurality of motion vector resolutions, adaptive_MV_resolution_enbaled_flag is turned on, and when the resolution is not adaptively selected, adaptive_MV_resolution_enbaled_flag is set. It can be coded as off.

adaptive_MV_resolution_ enbaled _flag는 SPS(Sequence Parameter Set), PPS(Picture Parameter Set) 및 슬라이스(또는 CTU: Coding Tree Unit) 헤더 중 하나 이상에 삽입될 수 있다. 예를 들어, 움직임 벡터 해상도를 적응적으로 선택할지 여부가 영상 시퀀스 단위마다 결정되는 경우에는 SPS에 플래그가 삽입되고, 픽처 단위마다 결정되는 경우에는 PPS에 플래그가 삽입되며, 슬라이스(또는 CTU) 단위마다 결정되는 경우에는 슬라이스(또는 CTU) 헤더에 삽입된다.The adaptive_MV_resolution_enbaled_flag may be inserted into one or more of a sequence parameter set ( SPS ), a picture parameter set ( PPS ), and a slice (or Coding Tree Unit: CTU) header. For example, when whether or not to adaptively select the motion vector resolution is determined for each image sequence unit, a flag is inserted into the SPS, and when it is determined for each picture unit, the flag is inserted into the PPS, slice (or CTU) unit If each is determined, it is inserted into the slice (or CTU) header.

이하에서 설명할 실시예들은 복수의 움직임벡터 해상도 중에서 하나의 해상도를 적응적으로 선택할지 여부를 나타내는 플래그가 온(on)으로 부호화되는 경우를 전제로 한다.Embodiments to be described below assume that a flag indicating whether to adaptively select one resolution from among a plurality of motion vector resolutions is coded on.

영상 부호화 장치는 부호화 대상 블록(CU: Coding Unit 또는 CTB: Coding Tree Block) 단위로 차분움직임벡터를 표시하는 해상도를 적응적으로 선택한다. 즉, 영상 부호화 장치는 기 정의된 복수의 움직임벡터 해상도 중에서 하나의 해상도를 차분움직임벡터를 표시하기 위한 해상도로서 선택한다.The image encoding apparatus adaptively selects a resolution for displaying a differential motion vector in units of a coding object block (CU: Coding Unit or CTB: Coding Tree Block). That is, the image encoding apparatus selects one resolution from among a plurality of predefined motion vector resolutions as a resolution for displaying the differential motion vector.

영상 부호화 장치는 부호화 대상 블록 단위로 복수의 움직임벡터 해상도 중에서 선택된 해상도를 나타내기 위한 해상도 정보를 부호화한다. 복수의 움직임벡터 해상도는 기 정의될 수 있으며, 디폴트 해상도 및 디폴트 해상도를 대체할 다른 해상도(즉, 대체 해상도)들이 포함될 수 있다. 여기서, 디폴트 해상도 및 대체 해상도들은 영상 부호화 장치와 영상 복호화 장치가 공유하는 기 결정된 특정 움직임벡터 해상도일 수 있고, 또는 영상 부호화 장치가 상위 레벨 영상 영역(예: 영상 시퀀스, 픽처, 슬라이스, CTU 등)에서 결정하여 영상 복호화 장치로 시그널링하는 값일 수도 있다.The image encoding apparatus encodes resolution information for indicating a resolution selected from among a plurality of motion vector resolutions in units of encoding object blocks. A plurality of motion vector resolutions may be predefined, and a default resolution and other resolutions to replace the default resolution (ie, alternative resolutions) may be included. Here, the default resolution and the alternative resolutions may be a predetermined specific motion vector resolution shared between the image encoding apparatus and the image decoding apparatus, or the image encoding apparatus uses a higher-level image region (eg, image sequence, picture, slice, CTU, etc.) It may be a value determined by and signaled to the image decoding apparatus.

예를 들어, 디폴트 해상도가 1/4 픽셀 해상도로 정의되고, 대체 해상도들은 1 픽셀 해상도 및 4 픽셀 해상도로 정의되면, 영상 부호화 장치는 선택된 해상도 정보로서, 움직임벡터 해상도가 1/4 픽셀 해상도인지 정수 픽셀 해상도인지를 나타내는 정보 및 정수 픽셀 해상도라면 1 픽셀 해상도인지 4 픽셀 해상도인지를 나타내는 정보를 부호화한다. 이하, 움직임벡터 해상도가 1/4 픽셀 해상도인지 정수 픽셀 해상도인지를 나타내는 정보로서 부호화되는 신택스 요소를 first_bin, 움직임벡터 해상도가 1 픽셀 해상도인지 4 픽셀 해상도인지를 나타내는 정보로서 부호화되는 신택스 요소를 second_ bin이라 칭한다.For example, if the default resolution is defined as 1/4 pixel resolution and the alternative resolutions are defined as 1 pixel resolution and 4 pixel resolution, the image encoding apparatus determines whether the motion vector resolution is 1/4 pixel resolution as selected resolution information as an integer. Information indicating whether the resolution is pixel resolution and information indicating whether the resolution is 1 pixel or 4 pixels in the case of integer pixel resolution are encoded. Hereinafter, first_bin is a syntax element encoded as information indicating whether the motion vector resolution is 1/4 pixel resolution or integer pixel resolution, and second_bin is a syntax element encoded as information indicating whether the motion vector resolution is 1 pixel resolution or 4 pixel resolution is called

이 경우, first_bin의 값이 "0"으로 부호화되면 1/4 픽셀 해상도로 차분움직임벡터가 표현되고, "1"로 부호화되면 second_bin이 추가적으로 부호화된다. second_bin의 값이 "0"으로 부호화되면 1 픽셀 해상도로 차분움직임벡터가 표현되고, "1"로 부호화되면 4 픽셀 해상도로 차분움직임벡터가 표현된다.In this case, when the value of first_bin is encoded as “0”, a differential motion vector is expressed at 1/4 pixel resolution, and when the value of first_bin is encoded as “1”, second_bin is additionally encoded. When the value of second_bin is encoded as “0”, a differential motion vector is expressed with a resolution of 1 pixel, and when the value of second_bin is encoded with a resolution of “1”, a differential motion vector is expressed with a resolution of 4 pixels.

다른 예로, 영상 복호화 장치는 차분움직임벡터의 해상도를 지시하는 정보로서 mvd _resolution_flag를 복호화할 수 있다. mvd _resolution_flag가 TU(Truncated Unary) 방식(Max=2)으로 이진화되면, mvd _resolution_flag의 값이"0"으로 복호화되는 경우에는 차분움직임벡터를 1/4 픽셀 해상도로 표현하고, mvd_resolution_flag의 값이 "10"으로 복호화되는 경우에는 차분움직임벡터를 1 픽셀 해상도로 표현하며, mvd _resolution_flag의 값이 "11"로 복호화되는 경우에는 차분움직임벡터를 4 픽셀 해상도로 표현할 수 있다.As another example, the image decoding apparatus may decode mvd_resolution_flag as information indicating the resolution of the differential motion vector. When mvd _resolution_flag is binarized in the TU (Truncated Unary) method (Max=2), when the value of mvd _resolution_flag is decoded to “0”, the differential motion vector is expressed with 1/4 pixel resolution, and the value of mvd_resolution_flag is “10”. ", the differential motion vector is expressed with 1-pixel resolution, and when the value of mvd _resolution_flag is decoded with "11", the differential motion vector can be expressed with 4-pixel resolution.

해상도 정보는 차분움직임벡터의 x 컴포넌트 및 y 컴포넌트 각각에 대하여 영상 복호화 장치로 시그널링될 수 있고, 또는 x 컴포넌트 및 y 컴포넌트에 대하여 동일한 차분움직임벡터의 해상도를 결정하여 영상 복호화 장치로 시그널링될 수 있다.The resolution information may be signaled to the image decoding apparatus for each of the x and y components of the differential motion vector, or may be signaled to the image decoding apparatus by determining the resolution of the same differential motion vector with respect to the x and y components.

실시예Example 3 3

본 실시예에서는 복수의 움직임벡터 해상도 중에서 하나의 해상도를 적응적으로 선택하는 방법에 관한 것이다. 예를 들어, 디폴트 해상도가 1/4 픽셀 해상도로 정의되고, 대체 해상도들은 1 픽셀 해상도 및 4 픽셀 해상도로 정의된다.This embodiment relates to a method of adaptively selecting one resolution from among a plurality of motion vector resolutions. For example, a default resolution is defined as quarter pixel resolution, and alternate resolutions are defined as 1 pixel resolution and 4 pixel resolution.

표 12는 1/4 픽셀 해상도에 따라 결정된 현재블록의 차분움직임벡터(quarter-pixel mvd) 값을 1/4 픽셀 해상도, 1 픽셀 해상도, 또는 4 픽셀 해상도 중 임의의 하나의 해상도로 차분움직임벡터 값을 나타내기 위한 신택스 요소들 및 필요한 비트수를 나타낸다.Table 12 shows the differential motion vector (quarter-pixel mvd) value of the current block determined according to the 1/4 pixel resolution to any one of 1/4 pixel resolution, 1 pixel resolution, or 4 pixel resolution. It indicates syntax elements and the required number of bits to represent .

quarter-pixel mvdquarter-pixel mvd 00 0.750.75 -2.25-2.25 10.0010.00 -15.75-15.75 19.5019.50 -22.50-22.50 34.2534.25 -43.75-43.75 mvd indexmvd index 00 33 99 4040 1616 2020 6 6
(16)(16)
9 (20)9 (20) 1111
(44)(44)
abs_mvd_greater0_flagabs_mvd_greater0_flag 00 1One 1One 1One 1One 1One 1One 1One 1One abs_mvd_greater1_flagabs_mvd_greater1_flag -- 1One 1One 1One 1One 1One 1One 1One 1One abs_abs_ mvdmvd __ minus2minus2 -- 2 bits
(1)
2 bits
(One)
6 bits
(7)
6 bits
(7)
10 bits (38)10 bits (38) 8
bits (14)
8
bits (14)
8 bits (18)8 bits (18) 4
bits (4)
4
bits (4)
6 bits (7)6 bits (7) 6
bits (9)
6
bits (9)
mvdmvd _sign_flag_sign_flag -- 00 1One 00 1One 00 1One 00 1One 1 st bin
(quarter or integer)
1 st bin
(quarter or integer)
-- 00 00 00 1One 1One 1One 1One 1One
2 nd bin (1 or 4) 2nd bin ( 1 or 4) -- -- -- -- 00 00 1One 1One 1One Total bitsTotal bits 1 bit1 bit 6 bits6 bits 1010
bitsbits
14 bits14 bits 13 bits13 bits 13 bits13 bits 9 9
bitsbits
11 bits11 bits 11 bits11 bits

표 12의 quarter-pixel mvd 값들 중 {0, 0.75, -2.25, 10.00}에 대해서는 1/4 픽셀 해상도가 적용되었고, {-15.75, 19.50}에 대해서는 1 픽셀 해상도가 적용되었으며, {-22.50, 34.25, -43.75}에 대해서는 4 픽셀 해상도가 적용되었다. mvd index는 quarter-pixel mvd의 절대값을 표현하기 위해 연산된 값이다. 즉, 차분움직임벡터 인덱스(mvd index)는 차분움직임벡터에 대응하는 부호화할 값이다.Among the quarter-pixel mvd values in Table 12, 1/4 pixel resolution was applied to {0, 0.75, -2.25, 10.00}, and 1 pixel resolution was applied to {-15.75, 19.50}, and {-22.50, 34.25 , -43.75}, a resolution of 4 pixels was applied. The mvd index is a value calculated to express the absolute value of quarter-pixel mvd. That is, the differential motion vector index (mvd index) is a value to be encoded corresponding to the differential motion vector.

본 실시예에서는 복수의 모든 해상도에 대해 동일한 하나의 방법으로 차분움직임벡터에 대응하는 부호화할 값을 연산한다. 차분움직임벡터에 대응하는 부호화할 값인 차분움직임벡터 인덱스(mvd _index)를 구하는 공식은 수학식 1과 같다.In the present embodiment, a value to be encoded corresponding to a differential motion vector is calculated in the same single method for all the plurality of resolutions. A formula for obtaining a differential motion vector index ( mvd_index ), which is a value to be encoded corresponding to a differential motion vector , is as shown in Equation (1).

Figure 112017066194390-pat00001
Figure 112017066194390-pat00001

수학식 1에서 mvd _resolution 은 선택된 해상도, mvd 선택된 해상도로 표현된 차분움직임벡터, mvd_index 는 부호화할 값을 나타낸다.In Equation 1, mvd _resolution is the selected resolution, mvd is a differential motion vector expressed at the selected resolution, and mvd_index represents a value to be encoded.

예를 들어, 1/4 픽셀 해상도가 적용되는 경우 차분움직임벡터 절대값에 4를 곱하여 mvd index를 연산하고, 1 픽셀 해상도가 적용되는 경우 차분움직임벡터 절대값에 버림, 반올림, 올림 중 어느 하나를 적용하여 1 픽셀 해상도로 표현된 차분움직임벡터(예: 1의 배수)를 구한 후, 이를 1 (픽셀)로 나눔으로써 mvd index를 구한다. 4 픽셀 해상도가 적용되는 경우에는, 차분움직임벡터 절대값에 버림, 반올림, 올림 중 어느 하나를 적용하여 4 픽셀 해상도로 표현된 차분움직임벡터(예: 4의 배수)를 구한 후, 이를 4 (픽셀)로 나누어 mvd index를 구한다. mvd index의 값 중 괄호 안에 표시된 숫자는 차분움직임벡터 절대값을 선택된 각 해상도로 표현한 차분움직임벡터 값을 나타낸다. abs_ mvd _ minus2에 필요한 비트수 아래에 기재된 괄호 안의 숫자는 mvd index에서 2를 뺀 값을 나타낸다.For example, when 1/4 pixel resolution is applied, the mvd index is calculated by multiplying the absolute value of the differential motion vector by 4; Apply to obtain a differential motion vector (eg, a multiple of 1) expressed at 1 pixel resolution, and then divide it by 1 (pixel) to obtain the mvd index. When 4-pixel resolution is applied, a differential motion vector expressed in 4-pixel resolution (eg, a multiple of 4) is obtained by applying any one of rounding, rounding, or rounding up to the absolute value of the differential motion vector, and then ) to get the mvd index. Among the values of the mvd index, the number indicated in parentheses represents the differential motion vector value expressed by the absolute differential motion vector at each selected resolution. The number of bits required for abs_ mvd _ minus2 The number in parentheses below represents the mvd index minus 2.

실시예Example 4 4

본 실시예는 실시예 3에서 설명한 것과 같은 차분움직임벡터의 부호화 방법이 적용될 수 있다. 다만, 본 실시예에서는 영상 부호화 장치가 차분움직임벡터를 표시하기 위한 해상도로서 기 정의된 복수의 움직임벡터 해상도 중 어느 하나를 사용할 때, 소정의 오프셋을 기준으로 차분움직임벡터를 더욱 효율적으로 표시하기 위한 방법을 제안한다. 이하, 도 3을 참조하여 구체적으로 설명한다.In this embodiment, the same method of encoding a differential motion vector as described in Embodiment 3 can be applied. However, in the present embodiment, when the image encoding apparatus uses any one of a plurality of predefined motion vector resolutions as the resolution for displaying the differential motion vector, the method for displaying the differential motion vector more efficiently based on a predetermined offset suggest a way Hereinafter, it will be described in detail with reference to FIG. 3 .

도 3은 본 발명의 실시예에 따른 영상 부호화 장치의 동작방법을 나타내는 흐름도이다.3 is a flowchart illustrating a method of operating an image encoding apparatus according to an embodiment of the present invention.

영상 부호화 장치는 우선, 디폴트 해상도로 현재블록에 대한 차분움직임벡터를 결정한다(S310). 영상 부호화 장치는 결정된 차분움직임벡터의 크기(absolute value)에 따라 복수의 움직임벡터 해상도 중에서 하나 이상의 해상도 후보를 결정한다(S320). 예컨대, 복수의 움직임벡터 해상도는 1/4 픽셀 해상도, 1 픽셀 해상도 및 4 픽셀 해상도를 포함하고, 디폴트 해상도는 1/4 픽셀 해상도일 수 있다.The image encoding apparatus first determines a differential motion vector for the current block with a default resolution (S310). The image encoding apparatus determines one or more resolution candidates from among a plurality of motion vector resolutions according to the determined absolute value of the differential motion vector (S320). For example, the plurality of motion vector resolutions may include 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution, and the default resolution may be 1/4 pixel resolution.

영상 부호화 장치는 복수의 움직임벡터 해상도 각각에 대응하는 오프셋을 설정할 수 있다. 여기서, 오프셋은 영상 부호화 장치와 영상 복호화 장치가 공유하는 기 결정된 디폴트 값일 수 있고, 또는 영상 부호화 장치가 결정하여 SPS, PPS, 슬라이스 헤더 등과 같은 헤더 정보로서 영상 복호화 장치에 시그널링하는 값일 수도 있다. 예를 들어, 복수의 움직임벡터 해상도로 1/4 픽셀 해상도, 1 픽셀 해상도 및 4 픽셀 해상도를 이용하는 경우, 1/4 픽셀 해상도를 위한 오프셋으로 "α"을, 1 픽셀 해상도를 위한 오프셋으로 "β”을 및 4 픽셀 해상도를 위한 오프셋으로"γ"를 설정할 수 있다. The image encoding apparatus may set an offset corresponding to each of a plurality of motion vector resolutions. Here, the offset may be a predetermined default value shared between the image encoding apparatus and the image decoding apparatus, or may be a value determined by the image encoding apparatus and signaled to the image decoding apparatus as header information such as SPS, PPS, and slice header. For example, when using 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution as a plurality of motion vector resolutions, "α" is an offset for 1/4 pixel resolution, and "β" is an offset for 1 pixel resolution. ” and “γ” as the offset for 4 pixel resolution.

영상 부호화 장치는 결정된 차분움직임벡터의 크기(absolute value) 및 소정의 오프셋 값에 따라 복수의 움직임벡터 해상도 중에서 하나 이상의 해상도 후보를 결정할 수 있다. 예컨대, 결정된 차분움직임벡터의 크기(absolute value)가 "α"이상 "β"이하인 경우에는 1/4 픽셀 해상도를 해상도 후보로 결정하고, "β"초과 "γ"이하인 경우에는 1/4 픽셀 해상도 및 1 픽셀 해상도를 해상도 후보로 결정하며, "γ"초과인 경우에는 1/4 픽셀 해상도, 1 픽셀 해상도, 및 4 픽셀 해상도를 해상도 부호로 결정할 수 있다.The image encoding apparatus may determine one or more resolution candidates from among a plurality of motion vector resolutions according to the determined absolute value of the differential motion vector and a predetermined offset value. For example, when the absolute value of the determined differential motion vector is "α" or more and "β" or less, 1/4 pixel resolution is determined as a resolution candidate, and when "β" exceeds "γ", 1/4 pixel resolution is determined. and 1 pixel resolution is determined as a resolution candidate, and when "γ" is more than 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution can be determined as resolution codes.

영상 부호화 장치는 하나 이상의 해상도 후보 중에서 결정된 차분움직임벡터를 표현할 해상도를 선택한다(S330). 이 때, 영상 부호화 장치는 RDO(Rate Distortion Optimization)에 근거하여 결정된 차분움직임벡터를 표현하기 위한 해상도를 선택한다. 예를 들어, 해상도 후보가 1/4 픽셀 해상도, 제1 픽셀 해상도 및 4 픽셀 해상도인 경우, 세 가지 해상도 후보에 대한 RDO를 기준으로 한 평가에 의해 차분움직임벡터를 위한 하나의 최종 해상도를 선택한다.The image encoding apparatus selects a resolution to express the determined differential motion vector from among one or more resolution candidates (S330). In this case, the image encoding apparatus selects a resolution for expressing the differential motion vector determined based on Rate Distortion Optimization (RDO). For example, if the resolution candidates are 1/4 pixel resolution, first pixel resolution, and 4 pixel resolution, one final resolution for the differential motion vector is selected by evaluation based on RDO for the three resolution candidates. .

영상 부호화 장치는 선택된 해상도에 대응하는 함수를 결정된 차분움직임벡터에 적용하여 현재블록의 차분움직임벡터로서 부호화할 값을 연산한다(S340). 영상 부호화 장치는 단계 S340에서 연산된 값을 차분움직임벡터 정보로서 부호화하고, 복수의 움직임벡터 해상도 중 선택된 해상도를 나타내기 위한 해상도 정보를 부호화한다(S350).The image encoding apparatus calculates a value to be encoded as a differential motion vector of the current block by applying a function corresponding to the selected resolution to the determined differential motion vector (S340). The image encoding apparatus encodes the value calculated in step S340 as differential motion vector information, and encodes resolution information for indicating a resolution selected from among a plurality of motion vector resolutions (S350).

단계 S340에 대하여 구체적으로 설명하면 다음과 같다. 영상 부호화 장치는 단계 S310에서 결정된 차분움직임벡터를 단계 S330에서 선택된 해상도의 차분움직임벡터로 표현하고, 선택된 해상도로 표현된 차분움직임벡터와 선택된 해상도에 대응하는 오프셋을 이용하여 현재블록의 차분움직임벡터로서 부호화할 값을 연산한다.Step S340 will be described in detail as follows. The image encoding apparatus expresses the differential motion vector determined in step S310 as a differential motion vector of the resolution selected in step S330, and uses the differential motion vector expressed at the selected resolution and an offset corresponding to the selected resolution as a differential motion vector of the current block. Calculates the value to be encoded.

본 실시예에서는 복수의 모든 해상도에 대해 동일한 하나의 방법으로 차분움직임벡터에 대응하는 부호화할 값을 연산한다. 차분움직임벡터에 대응하는 부호화할 값은 차분움직임벡터 인덱스(mvd _index)를 의미하며, 차분움직임벡터 인덱스(mvd_index)를 구하는 공식은 수학식 2 및 수학식 3과 같다.In the present embodiment, a value to be encoded corresponding to a differential motion vector is calculated in the same single method for all the plurality of resolutions. A value to be encoded corresponding to the differential motion vector means a differential motion vector index ( mvd_index ), and the formulas for calculating the differential motion vector index ( mvd_index ) are the same as in Equations 2 and 3.

Figure 112017066194390-pat00002
Figure 112017066194390-pat00002

Figure 112017066194390-pat00003
Figure 112017066194390-pat00003

수학식 2 및 수학식 3에서 mvd _resolution 은 선택된 해상도, mvd_resolution_offset 은 선택된 해상도에 대응하는 오프셋, mvd 는 선택된 해상도로 표현된 차분움직임벡터, mvd _index 는 부호화할 값을 나타낸다.In Equations 2 and 3, mvd_resolution is the selected resolution, mvd_resolution_offset is an offset corresponding to the selected resolution, and mvd is a differential motion vector expressed at the selected resolution, and mvd_index represents a value to be encoded.

영상 부호화 장치는 선택된 해상도로 표현된 차분움직임벡터로부터 선택된 해상도에 대응하는 오프셋을 감산하고, 오프셋이 감산된 값을 선택된 해상도로 나누어 현재블록의 차분움직임벡터로서 부호화할 값을 연산할 수 있다. 예컨대, 디폴트 해상도는 1/4 픽셀 해상도, 대체 해상도는 1 픽셀 해상도 및 4 픽셀 해상도로 설정되고, 오프셋 값은 α=0, β=1, γ=4으로 설정된 상태에서, 결정된 차분움직임벡터가 8.75 이었다고 가정하자. 해당 차분움직임벡터를 1/4 픽셀 해상도로 표시하면 현재블록의 차분움직임벡터로서 부호화할 값은 (8.75-0)/(1/4) = 35이고, 1 픽셀 해상도로 표시하면 현재블록의 차분움직임벡터로서 부호화할 값은 (9-1)/(1) = 8이고, 4 픽셀 해상도로 표시하면 현재블록의 차분움직임벡터로서 부호화할 값은 (8-4)/(4) = 1이 된다. 여기서, 8.75, 9, 및 8은 선택된 해상도로 표현된 차분움직임벡터로써, 실시예 3에서 언급한 차분움직임벡터 절대값에 버림, 반올림, 올림 중 어느 하나를 적용하여 해상도의 배수가 되도록 구한 값이다. 이에 대한 또 다른 예시는 표 13을 참조하여 후술한다.The image encoding apparatus may calculate a value to be encoded as a differential motion vector of the current block by subtracting an offset corresponding to the selected resolution from the differential motion vector expressed at the selected resolution, and dividing the subtracted value by the selected resolution. For example, the default resolution is set to 1/4 pixel resolution, the alternative resolution is set to 1 pixel resolution and 4 pixel resolution, and the offset values are set to α=0, β=1, γ=4, and the determined differential motion vector is 8.75. Suppose it was If the corresponding differential motion vector is displayed at 1/4 pixel resolution, the value to be encoded as the differential motion vector of the current block is (8.75-0)/(1/4) = 35, and if displayed with 1 pixel resolution, the differential motion of the current block A value to be encoded as a vector is (9-1)/(1) = 8, and when displayed at a resolution of 4 pixels, a value to be encoded as a differential motion vector of the current block becomes (8-4)/(4) = 1. Here, 8.75, 9, and 8 are differential motion vectors expressed at the selected resolution, and are values obtained by applying any one of rounding, rounding, and rounding up to the absolute value of the differential motion vector mentioned in Example 3 so as to be a multiple of the resolution. . Another example of this will be described later with reference to Table 13.

표 13은 전술한 표 12와 동일한 quarter-pixel mvd에 대하여 본 실시예에 따라 계산한 비트수의 일례를 나타낸다. 표 13에서 디폴트 해상도는 1/4 픽셀 해상도, 대체 해상도는 1 픽셀 해상도 및 4 픽셀 해상도로 설정되고 오프셋 값은 α=0, β=10, γ=20으로 설정되었다. quarter-pixel mvd 값들 중 {0, 0.75, -2.25, 10.00}에 대해서는 1/4 픽셀 해상도를 적용하였고, {-15.75, 19.50}에 대해서는 1 픽셀 해상도를 적용하며, {-22.50, 34.25, -43.75}에 대해서는 4 픽셀 해상도가 적용하였다. 다만, {-15.75, 19.50}에 대해서 1/4 픽셀 해상도를 적용도 가능하며, {-22.50, 34.25, -43.75}에 대해서는 1/4 픽셀 해상도 및 1 픽셀 해상도 적용도 가능하다. 이에 대한 결정은 영상 부호화 장치가 RDO에 근거하여 결정된 차분움직임벡터를 표현하기 위한 해상도를 선택한다.Table 13 shows an example of the number of bits calculated according to the present embodiment for the same quarter-pixel mvd as in Table 12 above. In Table 13, the default resolution was set to 1/4 pixel resolution, the alternative resolution was set to 1 pixel resolution and 4 pixel resolution, and the offset values were set to α=0, β=10, and γ=20. Among the quarter-pixel mvd values, 1/4 pixel resolution was applied to {0, 0.75, -2.25, 10.00}, and 1 pixel resolution was applied to {-15.75, 19.50}, and {-22.50, 34.25, -43.75 }, 4 pixel resolution is applied. However, 1/4 pixel resolution can also be applied to {-15.75, 19.50}, and 1/4 pixel resolution and 1 pixel resolution can also be applied to {-22.50, 34.25, -43.75}. For this determination, the image encoding apparatus selects a resolution for expressing the differential motion vector determined based on the RDO.

quarter-pixel mvdquarter-pixel mvd 00 0.750.75 -2.25-2.25 10.0010.00 -15.75-15.75 19.5019.50 -22.50-22.50 34.2534.25 -43.75-43.75 mvd indexmvd index 00
(0-0)x(0-0)x 44
33
(0.75-0)x4(0.75-0)x4
99
(2.25-0)x4(2.25-0)x4
4040
(10.00-0)x4(10.00-0)x4
6 6
(16-(16-
10)/110)/1
10 10
(20-(20-
10)/110)/1
1 One
(24-20)/4(24-20)/4
44
(36-(36-
2020
)/4)/4
6 6
(44-20(44-20
)/4)/4
abs_mvd_greater0_flagabs_mvd_greater0_flag 00 1One 1One 1One 1One 1One 1One 1One 1One abs_mvd_greater1_flagabs_mvd_greater1_flag -- 1One 1One 1One 1One 1One 00 1One 1One abs_abs_ mvdmvd __ minus2minus2 -- 2 bits (1)2 bits (1) 6 bits (7)6 bits (7) 10 bits (38)10 bits (38) 4
bits
(4)
4
bits
(4)
6 bits
(8)
6 bits
(8)
-- 4 bits (2)4 bits (2) 4
bits (4)
4
bits (4)
mvdmvd _sign_flag_sign_flag -- 00 1One 00 1One 00 1One 00 1One 1 st bin
(quarter or integer)
1 st bin
(quarter or integer)
-- 00 00 00 1One 1One 1One 1One 1One
2 nd bin (1 or 4) 2nd bin ( 1 or 4) -- -- -- -- 00 00 1One 1One 1One Total bitsTotal bits 1 bit1 bit 6 bits6 bits 1010
bitsbits
14 bits14 bits 9 9
bitsbits
11 bits11 bits 5 5
bitsbits
9 bits9 bits 9 9
bitsbits

표 13의 quarter-pixel mvd는 디폴트 해상도로 결정된 현재블록에 대한 차분움직임벡터를 나타내고, mvd index는 현재블록의 차분움직임벡터 정보로서 부호화할 값인 차분움직임벡터 인덱스를 나타낸다. mvd index는 선택된 해상도, 선택된 해상도로 표현된 차분움직임 벡터, 및 선택된 해상도에 대응하는 오프셋을 이용하여 연산될 수 있다.In Table 13, quarter-pixel mvd indicates a differential motion vector for the current block determined with the default resolution, and mvd index indicates a differential motion vector index, which is a value to be encoded as differential motion vector information of the current block. The mvd index may be calculated using a selected resolution, a differential motion vector expressed at the selected resolution, and an offset corresponding to the selected resolution.

우선 디폴트 해상도로 결정된 차분움직임벡터(이하, quarter-pixel mvd)를 선택된 해상도로 표현하는 방법은 다음과 같다. 1/4 픽셀 해상도가 선택된 경우에는 quarter-pixel mvd의 절대값을 그대로 유지하고, 1 픽셀 해상도가 선택된 경우에는 quarter-pixel mvd의 절대값에 버림, 반올림, 올림 중 어느 하나를 적용하여 1의 배수가 되도록 구한 결과값으로, 차분움직임벡터를 표현한다. 한편, 4 픽셀 해상도가 선택된 경우에는 quarter-pixel mvd의 절대값에 버림, 반올림, 올림 중 어느 하나를 적용하여 4의 배수가 되도록 구한 결과값으로, 차분움직임벡터를 표현한다.First, a method of expressing the differential motion vector (hereinafter, quarter-pixel mvd) determined at the default resolution with the selected resolution is as follows. When quarter-pixel resolution is selected, the absolute value of quarter-pixel mvd is maintained as it is, and when 1-pixel resolution is selected, any one of rounding, rounding, or rounding is applied to the absolute value of quarter-pixel mvd and is a multiple of 1. The differential motion vector is expressed as the result value obtained so that . On the other hand, when 4 pixel resolution is selected, a differential motion vector is expressed as a result obtained to be a multiple of 4 by applying any one of rounding, rounding, and rounding to the absolute value of quarter-pixel mvd.

mvd index는 수학식 2와 같이 선택된 해상도로 표현된 차분움직임벡터로부터 선택된 해상도에 대응하는 오프셋을 감산하고 오프셋이 감산된 값을 선택된 해상도로 나누어 연산될 수 있다. 예를 들어, quarter-pixel mvd "-22.50"를 4 픽셀 해상도로 표현하는 경우, 4 픽셀 해상도로 표현된 차분움직임벡터(four-pixel mvd)의 절대값 "24"에서 4 픽셀 해상도에 대응하는 오프셋(γ) "20"을 감산하여 오프셋이 감산된 값 "4"를 얻고, 이를 선택된 해상도인 4로 나누면 "1" 값을 갖는 mvd index가 연산된다. 나머지 경우에 대한 mvd index의 연산 과정은 표 13의 mvd index 값 아래 괄호 안에 기재되어 있다. The mvd index may be calculated by subtracting the offset corresponding to the selected resolution from the differential motion vector expressed at the selected resolution as shown in Equation 2 and dividing the value from which the offset is subtracted by the selected resolution. For example, if quarter-pixel mvd "-22.50" is expressed with 4 pixel resolution, the offset corresponding to 4 pixel resolution from the absolute value "24" of the differential motion vector (four-pixel mvd) expressed with 4 pixel resolution (γ) By subtracting “20”, an offset-subtracted value “4” is obtained, and dividing this by 4, which is the selected resolution, an mvd index having a value of “1” is calculated. The calculation process of mvd index for the remaining cases is described in parentheses under the mvd index value of Table 13.

표 13과 전술한 실시예 3에서의 표 12를 비교하면, 1 픽셀 해상도 및 4 픽셀 해상도가 적용되는 차분움직임벡터 값들 전부에 대하여 계산된 비트수가 실시예 3에 따라 계산된 비트수보다 절감된 것을 확인할 수 있다.Comparing Table 13 with Table 12 in Example 3, it is found that the number of bits calculated for all differential motion vector values to which 1 pixel resolution and 4 pixel resolution are applied is reduced compared to the number of bits calculated according to Example 3 can be checked

mvd index 연산방법의 다른 예로서, 수학식 3과 같이 영상 부호화 장치는 선택된 해상도로 표현된 차분움직임벡터를 선택된 해상도로 먼저 나누고, 선택된 해상도로 나누어진 값으로부터 선택된 해상도에 대응하는 오프셋을 감산하여 현재블록의 차분움직임벡터로서 부호화할 값으로서 mvd index를 연산할 수도 있다.As another example of the mvd index calculation method, as shown in Equation 3, the image encoding apparatus first divides the differential motion vector expressed at the selected resolution by the selected resolution, and subtracts the offset corresponding to the selected resolution from the value divided by the selected resolution. The mvd index may be calculated as a value to be encoded as a differential motion vector of a block.

실시예Example 5 5

본 실시예는 실시예 3에서 설명한 것과 같은 차분움직임벡터의 부호화 방법이 적용될 수 있다. 본 실시예에서는 영상 부호화 장치가 기 정의된 복수의 움직임벡터 해상도 별로 차분움직임벡터 크기들(absolute values)에 효율적으로 차분움직임벡터 인덱스(mvd index)를 매핑하고, 매핑된 인덱스(mvd index)를 현재블록의 차분움직임벡터로서 부호화하는 방법을 제안한다.In this embodiment, the same method of encoding a differential motion vector as described in Embodiment 3 can be applied. In this embodiment, the image encoding apparatus efficiently maps the differential motion vector index (mvd index) to the absolute values for each of a plurality of predefined motion vector resolutions, and sets the mapped index (mvd index) to the current value. We propose a method of encoding a block as a differential motion vector.

실시예에 따른 영상 부호화 장치에도 도 3을 참조하여 설명한 일부 단계가 동일하게 적용된다. 다만, 단계 S320의 해상도 후보 결정방법과 단계 S340의 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 방법에 차이가 있다.Some of the steps described with reference to FIG. 3 are equally applied to the image encoding apparatus according to the embodiment. However, there is a difference between the method of determining the resolution candidate in step S320 and the method of calculating the value to be encoded as the differential motion vector of the current block in step S340.

우선, 영상 부호화 장치가 디폴트 해상도로 결정된 차분움직임벡터의 크기(absolute value)에 따라 복수의 움직임벡터 해상도 중에서 하나 이상의 해상도 후보를 선택하는 방법에 대하여 설명한다. 디폴트 해상도로 결정된 현재블록에 대한 차분움직임벡터의 값이 대체 해상도의 배수인 경우에 디폴트 해상도 보다는 대체 해상도로 차분움직임벡터를 표현하는 것이 비트량 측면에서 유리할 수 있다. 본 실시예에서는 결정된 차분움직임벡터 크기(absolute value)가 제1 대체 해상도의 배수인 경우 제1 대체 해상도를 해상도 후보로 결정하고, 제2 대체 해상도의 배수인 경우 제2 대체 해상도를 해상도 후보로 결정하며, 제1 및 제2 대체 해상도의 배수가 아닌 경우 제1 대체 해상도, 제2 대체 해상도 및 디폴트 해상도를 해상도 후보로 결정할 수 있다. 여기서, 대체 해상도의 개수는 위의 예시처럼 3가지로 한정되지 않는다. 일반적인 경우, 제1 대체 해상도는 복수의 대체 해상도들 중에서 가장 큰 수치의 해상도를 의미할 수 있다. 즉, 대체 해상도의 크기가 큰 순서대로 제1 대체 해상도, 제2 대체 해상도, 제3 대체 해상도 등이 지정될 수 있다.First, a method for the image encoding apparatus to select one or more resolution candidates from among a plurality of motion vector resolutions according to an absolute value of a differential motion vector determined as a default resolution will be described. When the value of the differential motion vector for the current block determined with the default resolution is a multiple of the alternative resolution, it may be advantageous in terms of bit amount to express the differential motion vector with the alternative resolution rather than the default resolution. In the present embodiment, when the determined absolute value is a multiple of the first alternative resolution, the first alternative resolution is determined as a resolution candidate, and when the determined absolute value is a multiple of the second alternative resolution, the second alternative resolution is determined as the resolution candidate. and, if the first and second alternative resolutions are not multiples, the first alternative resolution, the second alternative resolution, and the default resolution may be determined as resolution candidates. Here, the number of alternative resolutions is not limited to three as in the above example. In general, the first alternative resolution may mean a resolution having the highest numerical value among the plurality of alternative resolutions. That is, the first alternative resolution, the second alternative resolution, the third alternative resolution, and the like may be designated in the order of increasing the size of the alternative resolution.

예를 들어, 복수의 움직임벡터 해상도는 1/4 픽셀 해상도, 1 픽셀 해상도 및 4 픽셀 해상도를 포함하고, 디폴트 해상도는 1/4 픽셀 해상도이며, 제1 대체 해상도는 4 픽셀 해상도, 제2 대체 해상도는 1 픽셀 해상도일 수 있다. 디폴트 해상도로 결정된 차분움직임벡터의 크기(absolute value)가 제1 대체 해상도의 배수인 4, 8, 12, … 경우, 4 픽셀 해상도를 해상도 후보로 결정하고, 디폴트 해상도로 결정된 차분움직임벡터의 크기(absolute value)가 제 2 대체 해상도의 배수인 1, 2, 3, 5, 6, … 인 경우, 1 픽셀 해상도를 해상도 후보로 결정하며, 그 이외의 차분움직임벡터의 크기(absolute value)에 대해서는 디폴트 해상도, 제1 대체 해상도, 및 제2 대체 해상도를 해상도 후보로 결정한다. 즉. 결정된 차분움직임벡터의 크기가 4의 배수인 경우에는, 디폴트 해상도인 1/4 픽셀 해상도로 표현하기 보다는 제1 대체 해상도인 4 픽셀로 표현하는 것이 결정된 차분움직임벡터의 크기에 대한 손실 없이 가장 적은 비트로 표현할 수 있는 방법이 된다. For example, the plurality of motion vector resolutions include ¼ pixel resolution, 1 pixel resolution and 4 pixel resolution, the default resolution is ¼ pixel resolution, and the first alternate resolution is 4 pixel resolution and the second alternate resolution may be 1 pixel resolution. 4, 8, 12, . In this case, 4 pixel resolution is determined as a resolution candidate, and the magnitude (absolute value) of the differential motion vector determined as the default resolution is 1, 2, 3, 5, 6, ... which is a multiple of the second alternative resolution. In the case of , a resolution of 1 pixel is determined as a resolution candidate, and a default resolution, a first alternative resolution, and a second alternative resolution are determined as resolution candidates for the absolute values of other differential motion vectors. In other words. When the size of the determined differential motion vector is a multiple of 4, it is better to express the determined differential motion vector with the smallest bits without loss of the size of the determined differential motion vector by using 4 pixels, which is the first alternative resolution, rather than the 1/4 pixel resolution, which is the default resolution. a way to express it.

영상 부호화 장치는 전술한 예의 특성을 최대한 활용하여 기 정의된 복수의 움직임벡터 해상도 중에 특정 차분움직임벡터 크기들(absolute values)에 최적인 움직임벡터 해상도에 근거하여 복수의 움직임벡터 해상도를 위한 차분움직임벡터 인덱스(mvd index)를 효율적으로 매핑한다. 구체적으로, 특정 차분움직임벡터 크기들(absolute values)을 각각 최적의 움직임벡터 해상도로만 표현할 수 있도록 제한하여 복수의 움직임벡터 해상도에 대응하는 인덱스를 설정한다.The image encoding apparatus utilizes the characteristics of the above-described example to the maximum, and a differential motion vector for a plurality of motion vector resolutions based on a motion vector resolution optimal for specific absolute values among a plurality of predefined motion vector resolutions. Efficiently map the index (mvd index). Specifically, by limiting specific absolute values to be expressed only at the optimal motion vector resolution, an index corresponding to a plurality of motion vector resolutions is set.

영상 부호화 장치는 선택된 해상도로 표현된 차분움직임벡터 크기들에 오름차순으로 1씩 증가하는 인덱스를 부여한다. 전술한 예와 같이 복수의 움직임벡터 해상도가 1/4 픽셀 해상도, 1 픽셀 해상도 및 4 픽셀 해상도이고, 디폴트 해상도가 1/4 픽셀 해상도인 경우의 차분움직임벡터 크기들(absolute values) 및 인덱스는 표 14와 같다.The image encoding apparatus assigns an index increasing by 1 in an ascending order to the magnitudes of the differential motion vectors expressed at the selected resolution. As in the above example, when the plurality of motion vector resolutions are 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution, and the default resolution is 1/4 pixel resolution, absolute values and indices are shown in the table. Same as 14.

mvdmvd
index (Q)index (Q)
Quarter-pixelquarter-pixel
mvdmvd
mvdmvd
index (O)index (O)
One-pixelOne-pixel
mvdmvd
mvdmvd
index (F)index (F)
Four-pixelfour-pixel
mvdmvd
00 0.000.00 1One 0.250.25 22 0.500.50 33 0.750.75 -- -- 1One 1One 44 1.251.25 55 1.501.50 66 1.751.75 -- -- 22 22 77 2.252.25 88 2.502.50 99 2.752.75 -- -- 33 33 1010 3.253.25 1111 3.503.50 1212 3.753.75 -- -- -- -- 1One 44 1313 4.254.25 1414 4.504.50 1515 4.754.75 -- -- 44 55 ...... ...... -- -- 22 88 ...... ......

1/4 픽셀 해상도에 속하는 차분움직임벡터 크기들에는 인덱스(Q)가 부여되고, 1 픽셀 해상도에 속하는 차분움직임벡터 크기들에는 인덱스(O)가 부여되며, 4 픽셀 해상도에 속하는 차분움직임벡터 크기들에는 인덱스(F)가 부여된다. 인덱스(Q)는 0부터 시작하고 인덱스(O) 및 인덱스(F)는 1부터 시작한다. 전술한 표 1에서의 인덱스 부여방법에 따르면, "1.25"의 값을 갖는 디폴트 해상도로 결정된 차분움직임벡터의 크기에는 인덱스"5"가 부여되지만, 본 실시예에 따르면 인덱스 "4"가 부여된다. 여기서, 차분움직임벡터 인덱스는 결정된 차분움직임벡터에 대응하는 부호화할 값이다. 다시 말해, 차분움직임벡터 인덱스는 차분움직임벡터 정보로서 부호화되는 값이다.An index (Q) is assigned to differential motion vector sizes belonging to 1/4 pixel resolution, an index (O) is assigned to differential motion vector sizes belonging to 1 pixel resolution, and differential motion vector sizes belonging to 4 pixel resolution is given an index (F). The index (Q) starts from 0, and the index (O) and index (F) start from 1. According to the index assignment method in Table 1 described above, the index “5” is assigned to the magnitude of the differential motion vector determined with the default resolution having a value of “1.25”, but according to the present embodiment, the index “4” is assigned. Here, the differential motion vector index is a value to be encoded corresponding to the determined differential motion vector. In other words, the differential motion vector index is a value encoded as differential motion vector information.

영상 부호화 장치는 선택된 해상도에 대응하는 함수를 디폴트 해상도로 결정된 차분움직임벡터에 적용하여 현재블록의 차분움직임벡터로서 부호화할 값을 연산한다. 구체적으로, 영상 부호화 장치는 선택된 해상도로 차분움직임벡터 크기(absolute value)를 표현하고, 선택된 해상도로 표현된 차분움직임벡터 크기에 부여할 인덱스를 결정한다. 결정된 인덱스는 현재블록의 차분움직임벡터로서 부호화할 값이 된다.The image encoding apparatus calculates a value to be encoded as a differential motion vector of the current block by applying a function corresponding to the selected resolution to the differential motion vector determined as the default resolution. Specifically, the image encoding apparatus expresses an absolute value at the selected resolution and determines an index to be assigned to the size of the differential motion vector expressed at the selected resolution. The determined index becomes a value to be encoded as a differential motion vector of the current block.

각각의 차분움직임벡터 인덱스를 구하는 공식은 수학식 4 내지 수학식 6과 같다.Formulas for obtaining each differential motion vector index are the same as in Equations 4 to 6.

Figure 112017066194390-pat00004
Figure 112017066194390-pat00004

Figure 112017066194390-pat00005
Figure 112017066194390-pat00005

Figure 112017066194390-pat00006
Figure 112017066194390-pat00006

여기서, int _value는 결정된 차분움직임벡터의 값의 정수 부분, point_value는 소수 부분을 의미한다. 그리고

Figure 112017066194390-pat00007
는 바닥 함수(floor function)를 나타내고, %는 나머지 연산자(modulus operator)를 나타낸다.Here, int_value denotes an integer part of the determined differential motion vector value, and point_value denotes a fractional part. and
Figure 112017066194390-pat00007
denotes a floor function, and % denotes a modulus operator.

표 14에 기재된 "Quarter-pixel mvd", "One-pixel mvd" 및 "Four-pixel mvd"는 선택되는 해상도를 나타내는 것이고, 해당 열에 나열된 차분움직임벡터 크기들은 모두 디폴트 해상도(1/4 픽셀 해상도)로 표현된 값들이다."Quarter-pixel mvd", "One-pixel mvd", and "Four-pixel mvd" in Table 14 indicate the selected resolution, and the differential motion vector sizes listed in the corresponding column are all default resolutions (1/4 pixel resolution). values expressed as

표 15는 여러 가지 quarter-pixel mvd에 대하여 복수의 해상도 중에서 특정 해상도를 선정하여 실시예 3에 따라 계산한 비트수를 나타낸다. 표 16은 표 15와 동일한 quarter-pixel mvd에 대하여 동일한 해상도를 선정하여 본 실시예에 따라 계산한 비트수를 나타낸다.Table 15 shows the number of bits calculated according to Example 3 by selecting a specific resolution from among a plurality of resolutions for various quarter-pixel mvd. Table 16 shows the number of bits calculated according to this embodiment by selecting the same resolution for the same quarter-pixel mvd as in Table 15.

quarter-pixel mvdquarter-pixel mvd 00 0.750.75 -2.25-2.25 10.0010.00 -15.75-15.75 19.5019.50 -22.50-22.50 34.2534.25 -43.75-43.75 mvd indexmvd index 00 33 99 1010
(10)(10)
6363 7878 2323
(23)(23)
3434
(34)(34)
1111
(44)(44)
abs_mvd_greater0_flagabs_mvd_greater0_flag 00 1One 1One 1One 1One 1One 1One 1One 1One abs_mvd_greater1_flagabs_mvd_greater1_flag -- 1One 1One 1One 1One 1One 1One 1One 1One abs_abs_ mvdmvd __ minus2minus2 -- 2 bits (1)2 bits (1) 6 bits (7)6 bits (7) 6 bits (8)6 bits (8) 10 bits
(61)
10 bits
(61)
12 bits
(76)
12 bits
(76)
8
bits
(21)
8
bits
(21)
10 bits (32)10 bits (32) 6
bits (9)
6
bits (9)
mvdmvd _sign_flag_sign_flag -- 00 1One 00 1One 00 1One 00 1One 1 st bin
(quarter or integer)
1 st bin
(quarter or integer)
-- 00 00 1One 00 00 1One 1One 1One
2 nd bin (1 or 4) 2nd bin ( 1 or 4) -- -- -- 00 -- -- 00 00 1One Total bitsTotal bits 1 bit1 bit 6 bits6 bits 1010
bitsbits
11 bits11 bits 14 bits14 bits 16 bits16 bits 13 bits13 bits 15 bits15 bits 11 bits11 bits

quarter-pixel mvdquarter-pixel mvd 00 0.750.75 -2.25-2.25 10.0010.00 -15.75-15.75 19.5019.50 -22.50-22.50 34.2534.25 -43.75-43.75 mvd indexmvd index 00 33 77 88
(10)(10)
4848 5959 1818
(23)(23)
2626
(34)(34)
11 (44)11 (44)
abs_mvd_greater0_flagabs_mvd_greater0_flag 00 1One 1One 1One 1One 1One 1One 1One 1One abs_mvd_greater1_flagabs_mvd_greater1_flag -- 1One 1One 1One 1One 1One 1One 1One 1One abs_abs_ mvdmvd __ minus2minus2 -- 2 bits (1)2 bits (1) 4 bits (5)4 bits (5) 6
bits (6)
6
bits (6)
10 bits
(46)
10 bits
(46)
10 bits
(57)
10 bits
(57)
8
bits
(16)
8
bits
(16)
8 bits (24)8 bits (24) 6
bits (9)
6
bits (9)
mvdmvd _sign_flag_sign_flag -- 00 1One 00 1One 00 1One 00 1One 1 st bin (quarter or integer) 1 st bin (quarter or integer) -- 00 00 1One 00 00 1One 1One 1One 2 nd bin (1 or 4) 2nd bin ( 1 or 4) -- -- -- 00 -- -- 00 00 1One Total bitsTotal bits 1 bit1 bit 6 bits6 bits 8 bits8 bits 11 bits11 bits 14 bits14 bits 14 bits14 bits 13 bits13 bits 13 bits13 bits 11 bits11 bits

표 15 및 표 16에서는 1의 배수인 quarter-pixel mvd {10.00}에 대해서 1 픽셀 해상도를 적용하였고, quarter-pixel mvd {-22.50, 34.25}에 대해서 임의로 1 픽셀 해상도를 적용하였으며, 절대값이 "40"이 넘는 quarter-pixel mvd에 대해서는 임의로 4 픽셀 해상도를 적용하였으며, 그 밖의 quarter-pixel mvd에 대해서는 1/4 픽셀 해상도를 적용하였다. 표 16과 표 15를 비교하면, 본 실시예에 따른 인덱스 부여 방법에 따라 부여된 차분움직임벡터 인덱스(mvd index) 값을 부호화하는 데 필요한 비트수의 일부가 실시예 3에 비하여 절감된 것을 확인할 수 있다. 동일한 quarter-pixel mvd에 대하여 실시예 3과 실시예 5의 mvd index 및 해당 mvd index를 표현하기 위한 총 비트수를 간략하게 비교한 결과는 표 17과 같다.In Tables 15 and 16, 1 pixel resolution was applied to quarter-pixel mvd {10.00}, which is a multiple of 1, and 1 pixel resolution was arbitrarily applied to quarter-pixel mvd {-22.50, 34.25}, and the absolute value was " For quarter-pixel mvd over 40", 4 pixel resolution was arbitrarily applied, and for other quarter-pixel mvd, 1/4 pixel resolution was applied. Comparing Table 16 and Table 15, it can be seen that a part of the number of bits required to encode a differential motion vector index (mvd index) value assigned according to the index assignment method according to the present embodiment is reduced compared to Example 3 have. Table 17 shows the results of briefly comparing the mvd index of Examples 3 and 5 with respect to the same quarter-pixel mvd and the total number of bits for expressing the corresponding mvd index.

quarter-pixelquarter-pixel
mvdmvd
실시 예 3Example 3 실시 예 5Example 5 DifferenceDifference
mvdmvd index index Total bitsTotal bits mvdmvd index index Total bitsTotal bits 0.000.00 00 1One 00 1One 00 0.250.25 1One 44 1One 44 00 0.500.50 22 66 22 66 00 0.750.75 33 66 33 66 00 1.001.00 1One 55 00 44 -1-One 1.251.25 55 88 44 88 00 1.501.50 66 88 55 88 00 1.751.75 77 88 66 88 00 2.002.00 22 77 1One 55 -2-2 2.252.25 99 1010 77 88 -2-2 2.502.50 1010 1010 88 1010 00 2.752.75 1111 1010 99 1010 00 3.003.00 33 77 22 77 00 3.253.25 1313 1010 1010 1010 00 3.503.50 1414 1010 1111 1010 00 3.753.75 1515 1010 1212 1010 00 4.004.00 1One 55 00 44 -1-One 4.254.25 1717 1212 1313 1010 -2-2 4.504.50 1818 1212 1414 1010 -2-2 4.754.75 1919 1212 1515 1010 -2-2 5.005.00 55 99 33 77 -2-2 5.255.25 2121 1212 1616 1212 00 5.505.50 2222 1212 1717 1212 00 5.755.75 2323 1212 1818 1212 00 6.006.00 66 99 44 99 00

표 17을 보면, quarter-pixel mvd의 값이 증가할수록 본 실시예의 mvd index 값이 실시예 3의 mvd index 값에 비하여 작아지며, 이에 따라 해당 mvd index를 표현하기 위한 비트수가 적어지는 것을 확인할 수 있다.Referring to Table 17, as the value of quarter-pixel mvd increases, the mvd index value of this embodiment becomes smaller than the mvd index value of Example 3, and accordingly, it can be seen that the number of bits for expressing the corresponding mvd index decreases. .

이하, 도 4 내지 도 6을 참조하여 전술한 실시예들에 따른 영상 복호화 장치에 대하여 설명한다. 도 4는 본 발명의 실시예에 따른 영상 복호화 장치에 대한 블록도이다.Hereinafter, an image decoding apparatus according to the above-described embodiments will be described with reference to FIGS. 4 to 6 . 4 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.

영상 복호화 장치(400)는 복호화부(410), 역양자화부(420), 역변환부(430), 예측부(440), 가산기(450), 필터부(460) 및 메모리(470)를 포함한다. 도 4에 도시된 구성요소들은 하드웨어 칩으로 구현될 수 있으며, 또는 소프트웨어로 구현되고 마이크로프로세서가 각 구성요소에 대응하는 소프트웨어의 기능을 실행하도록 구현될 수도 있다.The image decoding apparatus 400 includes a decoder 410 , an inverse quantizer 420 , an inverse transform unit 430 , a predictor 440 , an adder 450 , a filter unit 460 , and a memory 470 . . The components shown in FIG. 4 may be implemented as a hardware chip, or may be implemented as software and a microprocessor may be implemented to execute a function of software corresponding to each component.

복호화부(410)는 영상 부호화 장치로부터 수신한 비트스트림을 복호화하여 블록분할과 관련된 정보를 추출하여 복호화하고자 하는 현재블록을 결정하고, 현재블록을 복원하기 위해 필요한 예측정보와 잔차신호에 대한 정보 등을 추출한다. The decoding unit 410 decodes the bitstream received from the image encoding apparatus, extracts information related to block division, determines a current block to be decoded, and predicts information necessary for reconstructing the current block and information on the residual signal, etc. to extract

복호화부(410)는 SPS (Sequence Parameter Set) 또는 PPS (Picture Parameter Set)로부터 CTU size에 대한 정보를 추출하여 CTU의 크기를 결정하고, 픽처를 결정된 크기의 CTU로 분할한다. 그리고 CTU를 트리 구조의 최상위 레이어, 즉, 루트 노드로 결정하고, CTU에 대한 분할 정보를 추출함으로써 CTU를 트리 구조를 이용하여 분할한다. 예컨대, QTBT 구조를 사용하여 CTU를 분할하는 경우, 먼저 QT의 분할과 관련된 제1 플래그(QT_split_flag)를 추출하여 각 노드를 하위 레이어의 네 개의 노드로 분할한다. 그리고, QT의 리프 노드에 해당하는 노드에 대해서는 BT의 분할과 관련된 제2 플래그(BT_split_flag) 및 분할 타입 정보를 추출하여 해당 리프 노드를 BT 구조로 분할한다.The decoder 410 extracts information about the CTU size from a sequence parameter set (SPS) or a picture parameter set (PPS), determines the size of the CTU, and divides the picture into CTUs of the determined size. Then, the CTU is determined as the top layer of the tree structure, that is, the root node, and the CTU is divided using the tree structure by extracting the division information on the CTU. For example, when a CTU is split using the QTBT structure, a first flag (QT_split_flag) related to QT splitting is first extracted and each node is split into four nodes of a lower layer. In addition, with respect to a node corresponding to a leaf node of QT, a second flag (BT_split_flag) and split type information related to BT splitting are extracted and the corresponding leaf node is split into a BT structure.

복호화부(410)는 트리 구조의 분할을 통해 복호화하고자 하는 현재블록(현재블록)을 결정하게 되면, 현재블록이 인트라 예측되었는지 아니면 인터 예측되었는지를 지시하는 예측 타입에 대한 정보를 추출한다.When the decoding unit 410 determines a current block (current block) to be decoded through division of the tree structure, information on a prediction type indicating whether the current block is intra-predicted or inter-predicted is extracted.

예측 타입 정보가 인터 예측을 지시하는 경우, 복호화부(410)는 인터 예측정보에 대한 신택스 요소를 추출한다. 먼저, 현재블록의 움직임정보가 복수의 부호화 모드 중 어느 모드에 의해 부호화되었는지 여부를 지시하는 모드 정보를 추출한다. 여기서, 복수의 부호화 모드는 머지 모드 및 차분움직임벡터 부호화 모드를 포함한다. 모드 정보가 머지 모드를 지시하는 경우, 복호화부(410)는 머지 후보들 중 어느 후보로부터 현재블록의 움직임벡터를 유도할지 여부를 지시하는 머지 인덱스 정보를 움직임정보에 대한 신택스 요소로서 추출한다.When the prediction type information indicates inter prediction, the decoder 410 extracts a syntax element for the inter prediction information. First, mode information indicating whether the motion information of the current block is encoded by which mode among a plurality of encoding modes is extracted. Here, the plurality of encoding modes include a merge mode and a differential motion vector encoding mode. When the mode information indicates the merge mode, the decoder 410 extracts merge index information indicating whether to derive the motion vector of the current block from any of the merge candidates as a syntax element for the motion information.

반면, 모드 정보가 차분움직임벡터 부호화 모드를 지시하는 경우, 복호화부(410)는 차분움직임벡터에 대한 정보 및 현재블록의 움직임벡터가 참조하는 참조 픽처에 대한 정보를 움직임벡터에 대한 신택스 요소로서 추출한다. 본 발명의 실시예에 따른 복호화부(410)는 현재블록의 차분움직임벡터 정보를 복호화함으로써 결정된 값(이하, '차분움직임벡터 인덱스'라 칭함)를 결정하고, 차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도 중에서 차분움직임벡터의 해상도를 선택한다. 그리고 복호화부(410)는 차분움직임벡터 인덱스(mvd_index)에 선택된 해상도에 대응하는 함수를 적용하여 현재블록의 차분움직임벡터를 복원한다. 한편, 영상 부호화 장치가 복수의 예측 움직임벡터 후보들 중에서 어느 하나의 후보를 현재블록의 예측 움직임벡터로 사용한 경우에는 예측 움직임벡터 식별정보가 비트스트림에 포함된다. 따라서 이 경우에는, 차분움직임벡터에 대한 정보와 참조 픽처에 대한 정보뿐만 아니라 예측 움직임벡터 식별정보도 움직임벡터에 대한 신택스 요소로서 추출한다.On the other hand, when the mode information indicates a differential motion vector encoding mode, the decoder 410 extracts information on the differential motion vector and information on the reference picture referenced by the motion vector of the current block as syntax elements for the motion vector. do. The decoding unit 410 according to an embodiment of the present invention determines a value determined by decoding differential motion vector information of the current block (hereinafter, referred to as a 'differential motion vector index'), and resolution information indicating the resolution of the differential motion vector. By decoding , a resolution of a differential motion vector is selected from among a plurality of motion vector resolutions. Then, the decoder 410 restores the differential motion vector of the current block by applying a function corresponding to the selected resolution to the differential motion vector index mvd_index. On the other hand, when the video encoding apparatus uses any one of the plurality of prediction motion vector candidates as the prediction motion vector of the current block, the prediction motion vector identification information is included in the bitstream. Accordingly, in this case, information on the differential motion vector and information on the reference picture as well as the prediction motion vector identification information are extracted as syntax elements for the motion vector.

한편, 복호화부(410)는 잔차신호에 대한 정보로서 현재블록의 양자화된 변환계수들에 대한 정보를 추출한다.Meanwhile, the decoder 410 extracts information on the quantized transform coefficients of the current block as information on the residual signal.

역양자화부(420)는 양자화된 변환계수들을 역양자화하고, 역변환부(430)는 역양자화된 변환계수들을 주파수 도메인으로부터 공간 도메인으로 역변환하여 잔차신호들을 복원함으로써 현재블록에 대한 잔차블록을 생성한다.The inverse quantization unit 420 inverse quantizes the quantized transform coefficients, and the inverse transform unit 430 inverse transforms the inverse quantized transform coefficients from the frequency domain to the spatial domain to restore residual signals to generate a residual block for the current block. .

예측부(440)는 인트라 예측부(442) 및 인터 예측부(444)를 포함한다. 인트라 예측부(442)는 현재블록의 예측 타입인 인트라 예측일 때 활성화되고, 인터 예측부(444)는 현재블록의 예측 타입인 인트라 예측일 때 활성화된다.The prediction unit 440 includes an intra prediction unit 442 and an inter prediction unit 444 . The intra prediction unit 442 is activated when the prediction type of the current block is intra prediction, and the inter prediction unit 444 is activated when the prediction type of the current block is intra prediction.

인트라 예측부(442)는 복호화부(410)로부터 추출된 인트라 예측 모드에 대한 신택스 요소로부터 복수의 인트라 예측 모드 중 현재블록의 인트라 예측 모드를 결정하고, 인트라 예측 모드에 따라 현재블록 주변의 참조 픽셀들을 이용하여 현재블록을 예측한다.The intra prediction unit 442 determines the intra prediction mode of the current block from among the plurality of intra prediction modes from the syntax element for the intra prediction mode extracted from the decoder 410, and a reference pixel around the current block according to the intra prediction mode. Predict the current block using

인터 예측부(444)는 복호화부(410)로부터 추출된 인터 예측 모드에 대한 신택스 요소를 이용하여 현재블록의 움직임정보를 결정하고, 결정된 움직임정보를 이용하여 현재블록을 예측한다.The inter prediction unit 444 determines motion information of the current block by using the syntax element for the inter prediction mode extracted from the decoder 410 , and predicts the current block using the determined motion information.

먼저, 인터 예측부(444)는 복호화부(410)로부터 추출된 인터 예측에서의 모드 정보를 확인한다. 모드 정보가 머지 모드를 지시하는 경우, 인터 예측부(444)는 현재블록의 주변블록을 이용하여 기 결정된 개수의 머지 후보를 포함하는 머지 리스트를 구성한다. 인터 예측부(444)가 머지 리스트를 구성하는 방법은 영상 부호화 장치의 인터 예측부(424)와 동일하다. 그리고, 복호화부(410)로부터 전달된 머지 인덱스 정보를 이용하여 머지 리스트 내의 머지 후보들 중에서 하나의 머지 후보를 선택한다. 그리고 선택된 머지 후보의 움직임정보, 즉, 머지 후보의 움직임벡터와 참조 픽처를 현재블록의 움직임벡터와 참조픽처로 설정한다. First, the inter prediction unit 444 checks mode information in inter prediction extracted from the decoder 410 . When the mode information indicates a merge mode, the inter prediction unit 444 constructs a merge list including a predetermined number of merge candidates using neighboring blocks of the current block. The method of the inter prediction unit 444 constructing the merge list is the same as that of the inter prediction unit 424 of the video encoding apparatus. Then, one merge candidate is selected from among the merge candidates in the merge list by using the merge index information transmitted from the decoder 410 . Then, motion information of the selected merge candidate, that is, the motion vector and reference picture of the merge candidate, is set as the motion vector and reference picture of the current block.

반면, 모드 정보가 차분움직임벡터 부호화 모드를 지시하는 경우, 인터 예측부(444)는 현재블록의 주변블록들의 움직임벡터를 이용하여 예측움직임벡터 후보들을 유도하고, 예측움직임벡터 후보들을 이용하여 현재블록의 움직임벡터에 대한 예측움직임벡터를 결정한다. 인터 예측부(444)가 예측움직임벡터 후보들을 유도하는 방법은 영상 부호화 장치의 인터 예측부(424)가 예측움직임벡터 후보들을 유도하는 방법과 동일하다. 만약, 영상 부호화 장치가 복수의 예측움직임벡터 후보들 중에서 어느 하나의 후보를 현재블록의 예측움직임벡터로 사용한 경우에는 움직임정보에 대한 신택스 요소는 예측움직임벡터 식별정보를 포함한다. 따라서, 이 경우에, 인터 예측부(444)는 예측움직임벡터 후보들 중 예측움직임벡터 식별정보에 의해 지시되는 후보를 예측움직임벡터로 선택할 수 있다. 그러나, 영상 부호화 장치가 복수의 예측움직임벡터 후보들에 기 정의된 함수를 사용하여 예측움직임벡터를 결정한 경우에는, 인터 예측부(444)는 영상 부호화 장치와 동일한 함수를 적용하여 예측움직임벡터를 결정할 수도 있다. 현재블록의 예측움직임벡터가 결정되면, 인터 예측부(444)는 예측움직임벡터와 복호화부(410)로부터 전달된 차분움직임벡터를 가산하여 현재블록의 움직임벡터를 결정한다. 그리고 복호화부(410)로부터 전달된 참조픽처에 대한 정보를 이용하여 현재블록의 움직임벡터가 참조하는 참조픽처를 결정한다.On the other hand, when the mode information indicates the differential motion vector encoding mode, the inter prediction unit 444 derives predicted motion vector candidates using motion vectors of neighboring blocks of the current block, and uses the predicted motion vector candidates to obtain the current block. Determine the predicted motion vector for the motion vector of . A method in which the inter prediction unit 444 derives the predicted motion vector candidates is the same as the method in which the inter prediction unit 424 of the image encoding apparatus derives the predicted motion vector candidates. If the image encoding apparatus uses any one of the plurality of predicted motion vector candidates as the predicted motion vector of the current block, the syntax element for the motion information includes the predicted motion vector identification information. Accordingly, in this case, the inter prediction unit 444 may select a candidate indicated by the predicted motion vector identification information from among the predicted motion vector candidates as the predicted motion vector. However, when the image encoding apparatus determines the predicted motion vector by using a predefined function for the plurality of predicted motion vector candidates, the inter prediction unit 444 may determine the predicted motion vector by applying the same function as that of the image encoding apparatus. have. When the predicted motion vector of the current block is determined, the inter prediction unit 444 determines the motion vector of the current block by adding the predicted motion vector and the differential motion vector transmitted from the decoder 410 . Then, the reference picture referred to by the motion vector of the current block is determined by using the information on the reference picture transmitted from the decoder 410 .

머지 모드 또는 차분움직임벡터 부호화 모드에서 현재블록의 움직임벡터와 참조픽처가 결정되면, 인터 예측부(442)는 참조픽처 내에서 움직임벡터가 지시하는 위치의 블록을 이용하여 현재블록의 예측블록을 생성한다.When the motion vector and the reference picture of the current block are determined in the merge mode or the differential motion vector encoding mode, the inter prediction unit 442 generates a prediction block of the current block by using the block at the position indicated by the motion vector in the reference picture. do.

가산기(450)는 역변환부(430)로부터 출력되는 잔차블록과 인터 예측부(444) 또는 인트라 예측부(442)로부터 출력되는 예측블록을 가산하여 현재 블록을 복원한다. 복원된 현재 블록 내의 픽셀들은 이후에 복호화할 블록을 인트라 예측할 때의 참조픽셀로서 활용된다.The adder 450 reconstructs the current block by adding the residual block output from the inverse transform unit 430 and the prediction block output from the inter prediction unit 444 or the intra prediction unit 442 . Pixels in the reconstructed current block are used as reference pixels when intra-predicting a block to be decoded later.

필터부(460)는 블록 단위의 복호화로 인해 발생하는 블록킹 현상(blocking artifact)를 제거하기 위해 복원된 블록 간의 경계를 디블록킹 필터링하고 메모리(470)에 저장한다. 한 픽처 내의 모든 블록들이 복원되면, 복원된 픽처는 이후에 복호화하고자 하는 픽처 내의 블록을 인터 예측하기 위한 참조 픽처로 사용된다.The filter unit 460 deblocks and filters the boundary between the reconstructed blocks in order to remove a blocking artifact caused by block-by-block decoding, and stores the deblocking filter in the memory 470 . When all blocks in one picture are reconstructed, the reconstructed picture is used as a reference picture for inter prediction of blocks in a picture to be decoded later.

이하, 도 5를 참조하여 본 발명의 실시예 4 및 5에 따른 영상 복호화 장치에 대하여 구체적으로 설명한다. 도 5는 본 발명의 실시예에 따른 영상 복호화 장치의 동작방법을 나타내는 흐름도이다.Hereinafter, an image decoding apparatus according to Embodiments 4 and 5 of the present invention will be described in detail with reference to FIG. 5 . 5 is a flowchart illustrating a method of operating an image decoding apparatus according to an embodiment of the present invention.

도 5를 참조하면, 영상 복호화 장치는 비트스트림으로부터 현재블록의 차분움직임벡터 정보를 복호화한다(S510). 차분움직임벡터 정보는, 차분움직임벡터 인덱스(mvd_index) 값을 지시한다.Referring to FIG. 5 , the image decoding apparatus decodes differential motion vector information of a current block from a bitstream ( S510 ). The differential motion vector information indicates a differential motion vector index (mvd_index) value.

영상 복호화 장치는 차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도 중에서 하나의 해상도를 선택한다(S520). 복수의 움직임벡터 해상도는 기 정의될 수 있으며, 디폴트 해상도 및 디폴트 해상도를 대체할 다른 해상도(즉, 대체 해상도)들이 포함될 수 있다. 여기서, 디폴트 해상도 및 대체 해상도들은 영상 부호화 장치와 영상 복호화 장치가 공유하는 기 결정된 특정 움직임벡터 해상도일 수 있고, 또는 영상 부호화 장치가 상위 레벨 영상 영역(예: 영상 시퀀스, 픽처, 슬라이스, CTU 등)에서 결정하여 영상 복호화 장치로 시그널링하는 값일 수도 있다.The image decoding apparatus selects one resolution from among a plurality of motion vector resolutions by decoding the resolution information indicating the resolution of the differential motion vector (S520). A plurality of motion vector resolutions may be predefined, and a default resolution and other resolutions to replace the default resolution (ie, alternative resolutions) may be included. Here, the default resolution and the alternative resolutions may be a predetermined specific motion vector resolution shared between the image encoding apparatus and the image decoding apparatus, or the image encoding apparatus uses a higher-level image region (eg, image sequence, picture, slice, CTU, etc.) It may be a value determined by and signaled to the image decoding apparatus.

예를 들어, 디폴트 해상도가 1/4 픽셀 해상도로 정의되고, 대체 해상도들은 1 픽셀 해상도 및 4 픽셀 해상도로 정의되면, 영상 복호화 장치는 차분움직임벡터의 해상도를 지시하는 정보로서, 움직임벡터 해상도가 1/4 픽셀 해상도인지 정수 픽셀 해상도인지를 나타내는 정보 및 정수 픽셀 해상도라면 1 픽셀 해상도인지 4 픽셀 해상도인지를 나타내는 정보를 복호화한다. 이하, 움직임벡터 해상도가 1/4 픽셀 해상도인지 정수 픽셀 해상도인지를 나타내는 정보로서 복호화되는 신택스 요소를 first_bin, 움직임벡터 해상도가 1 픽셀 해상도인지 4 픽셀 해상도인지를 나타내는 정보로서 복호화되는 신택스 요소를 second_ bin이라 칭한다.For example, if the default resolution is defined as 1/4 pixel resolution and the alternative resolutions are defined as 1 pixel resolution and 4 pixel resolution, the image decoding apparatus is information indicating the resolution of the differential motion vector, and the motion vector resolution is 1 Information indicating whether the resolution is /4 pixel resolution or integer pixel resolution and information indicating whether the resolution is 1 pixel or 4 pixels in the case of integer pixel resolution are decoded. Hereinafter, first_bin is a syntax element to be decoded as information indicating whether the motion vector resolution is 1/4 pixel resolution or integer pixel resolution, and second_bin is a syntax element to be decoded as information indicating whether the motion vector resolution is 1 pixel resolution or 4 pixel resolution. is called

이 경우, first_bin의 값이 "0"으로 복호화되면 1/4 픽셀 해상도로 차분움직임벡터가 표현되고, "1"로 복호화되면 second_bin이 추가적으로 복호화된다. second_bin의 값이 "0"으로 복호화되면 1 픽셀 해상도로 차분움직임벡터가 표현되고, "1"로 복호화되면 4 픽셀 해상도로 차분움직임벡터가 표현된다.In this case, when the value of first_bin is decoded to “0”, a differential motion vector is expressed at 1/4 pixel resolution, and when decoded to “1”, second_bin is additionally decoded. When the value of second_bin is decoded to "0", a differential motion vector is expressed with a resolution of 1 pixel, and when decoded to a value of "1", a differential motion vector is expressed with a resolution of 4 pixels.

다른 예로, 영상 복호화 장치는 차분움직임벡터의 해상도를 지시하는 정보로서 mvd _resolution_flag를 복호화할 수 있다. mvd _resolution_flag가 TU(Truncated Unary) 방식(Max=2)으로 이진화되면, mvd _resolution_flag의 값이"0"으로 복호화되는 경우에는 차분움직임벡터를 1/4 픽셀 해상도로 표현하고, mvd_resolution_flag의 값이 "10"으로 복호화되는 경우에는 차분움직임벡터를 1 픽셀 해상도로 표현하며, mvd _resolution_flag의 값이 "11"로 복호화되는 경우에는 차분움직임벡터를 4 픽셀 해상도로 표현할 수 있다.As another example, the image decoding apparatus may decode mvd_resolution_flag as information indicating the resolution of the differential motion vector. When mvd _resolution_flag is binarized in the TU (Truncated Unary) method (Max=2), when the value of mvd _resolution_flag is decoded to “0”, the differential motion vector is expressed with 1/4 pixel resolution, and the value of mvd_resolution_flag is “10”. ", the differential motion vector is expressed with 1-pixel resolution, and when the value of mvd _resolution_flag is decoded with "11", the differential motion vector can be expressed with 4-pixel resolution.

해상도 정보는 차분움직임벡터의 x 컴포넌트 및 y 컴포넌트 각각에 대하여 복호화될 수 있고, 또는 x 컴포넌트 및 y 컴포넌트에 대하여 동일한 차분움직임벡터의 해상도를 복호화될 수 있다.The resolution information may be decoded for each of the x component and the y component of the differential motion vector, or the same resolution of the differential motion vector may be decoded with respect to the x component and the y component.

영상 복호화 장치는 차분움직임벡터 정보에 의해 결정된 값(즉, 차분움직임벡터 인덱스)에 선택된 해상도에 대응하는 함수를 적용하여 현재블록의 차분움직임벡터를 복원한다(S530).The image decoding apparatus restores the differential motion vector of the current block by applying a function corresponding to the selected resolution to the value determined by the differential motion vector information (ie, the differential motion vector index) ( S530 ).

실시예 3에 따른 영상 복호화 장치의 차분움직임벡터 복호화 방법(S530)은 다음과 같다. 영상 복호화 장치는 차분움직임벡터 인덱스에 선택된 해상도를 곱하여 현재블록의 차분움직임벡터를 복원한다.The differential motion vector decoding method ( S530 ) of the image decoding apparatus according to the third embodiment is as follows. The image decoding apparatus restores the differential motion vector of the current block by multiplying the differential motion vector index by the selected resolution.

현재블록의 차분움직임벡터를 복원하기 위한 함수의 일례는 수학식 7과 같다. 수학식 7은 1/4 픽셀 해상도, 1 픽셀 해상도, 및 4 픽셀 해상도가 선택된 경우에 모두 적용될 수 있는 함수이다.An example of a function for reconstructing the differential motion vector of the current block is shown in Equation (7). Equation 7 is a function applicable to all cases where 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution are selected.

Figure 112017066194390-pat00008
Figure 112017066194390-pat00008

수학식 7에서 mvd 는 복원된 현재블록의 차분움직임벡터를 나타내고, mvd_index 는 복호화된 차분움직임벡터 인덱스를 나타내며, mvd _resolution_는 해상도 정보를 나타낸다.In Equation 7, mvd denotes a differential motion vector of the reconstructed current block, mvd_index denotes a decoded differential motion vector index, and mvd_resolution_ denotes resolution information.

실시예 4에 따른 영상 복호화 장치의 차분움직임벡터 복호화 방법(S530)은 다음과 같다. 영상 복호화 장치는 우선 차분움직임벡터 인덱스에 선택된 해상도를 곱한다. 그리고 선택된 해상도로 곱해진 값에 선택된 해상도에 대응하는 오프셋을 가산하여 현재블록의 차분움직임벡터를 복원한다. 여기서, 오프셋은 영상 부호화 장치와 영상 복호화 장치가 공유하는 기 결정된 디폴트 값일 수 있고, 또는 영상 부호화 장치가 결정하여 SPS, PPS, 슬라이스 헤더 등과 같은 헤더 정보로서 영상 복호화 장치에 시그널링하는 값일 수도 있다.The differential motion vector decoding method ( S530 ) of the image decoding apparatus according to the fourth embodiment is as follows. The image decoding apparatus first multiplies the differential motion vector index by the selected resolution. The differential motion vector of the current block is restored by adding an offset corresponding to the selected resolution to the value multiplied by the selected resolution. Here, the offset may be a predetermined default value shared between the image encoding apparatus and the image decoding apparatus, or may be a value determined by the image encoding apparatus and signaled to the image decoding apparatus as header information such as SPS, PPS, and slice header.

예를 들어, 복수의 움직임벡터 해상도로 1/4 픽셀 해상도, 1 픽셀 해상도 및 4 픽셀 해상도를 이용하는 경우, 각 해상도에 대응하는 오프셋 "α”, "β" 및 "γ" (단, α < β < γ임)를 설정할 수 있다.For example, when 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution are used as a plurality of motion vector resolutions, offsets “α”, “β” and “γ” corresponding to each resolution (provided that α < β < γ) can be set.

현재블록의 차분움직임벡터를 복원하기 위한 함수의 일례는 수학식 8와 같다. 수학식 8은 1/4 픽셀 해상도, 1 픽셀 해상도 및 4 픽셀 해상도가 선택된 경우 모두에 적용되는 함수이다.An example of a function for reconstructing the differential motion vector of the current block is shown in Equation (8). Equation 8 is a function applied to all cases where 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution are selected.

Figure 112017066194390-pat00009
Figure 112017066194390-pat00009

수학식 8에서 mvd 는 복원된 현재블록의 차분움직임벡터를 나타내고, mvd_index 는 복호화된 차분움직임벡터 인덱스를 나타내며, mvd _resolution 은 해상도 정보를 나타내며, mvd _resolution_offset 은 해상도에 대응하는 오프셋을 나타낸다. 여기서, 해상도가 1/4 픽셀인 경우 오프셋은 "α", 1 픽셀인 경우 오프셋은 "β", 4 픽셀인 경우 오프셋은 "γ"가 될 수 있다.In Equation 8, mvd denotes a differential motion vector of the reconstructed current block, mvd_index denotes a decoded differential motion vector index, mvd_resolution denotes resolution information, and mvd_resolution_offset denotes an offset corresponding to the resolution. Here, when the resolution is 1/4 pixel, the offset may be “α”, in the case of 1 pixel, the offset may be “β”, and in the case of 4 pixels, the offset may be “γ”.

다른 예로서, 영상 복호화 장치는 차분움직임벡터 인덱스에 선택된 해상도에 대응하는 오프셋을 가산하고, 오프셋이 가산된 값에 선택된 해상도를 곱함으로써, 현재블록의 차분움직임벡터를 복원할 수도 있다. 이 경우에 대한 현재블록의 차분움직임벡터를 복원하기 위한 함수의 일례는 수학식 9와 같다. 수학식 9는 1/4 픽셀 해상도, 1 픽셀 해상도, 및 4 픽셀 해상도가 선택된 경우에 모두 적용되는 함수이다.As another example, the image decoding apparatus may restore the differential motion vector of the current block by adding an offset corresponding to the selected resolution to the differential motion vector index, and multiplying the value to which the offset is added by the selected resolution. An example of a function for reconstructing the differential motion vector of the current block in this case is shown in Equation (9). Equation (9) is a function applied to all cases where 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution are selected.

Figure 112017066194390-pat00010
Figure 112017066194390-pat00010

실시예 5에 따른 영상 복호화 장치의 차분움직임벡터 복호화 방법(S530)은 다음과 같다. 영상 복호화 장치는 선택된 해상도에 대응하는 함수를 복호화된 차분움직임벡터 인덱스(mvd_index)에 적용하여 현재블록의 차분움직임벡터를 복원한다. 예를 들어, 표 15와 같이 선택된 해상도에 속하는 차분움직임벡터 크기들(absolute values)에 부여된 인덱스들 중에서, 복호화된 차분움직임벡터 인덱스에 대응하는 차분움직임벡터의 크기(absolute value)를 현재블록의 차분움직임벡터로 결정할 수 있다. 전술한 바와 같이 선택된 해상도 각각에 속하는 차분움직임벡터 크기들(absolute values)에는 오름차순으로 1씩 증가하는 인덱스가 부여된다.The differential motion vector decoding method ( S530 ) of the image decoding apparatus according to the fifth embodiment is as follows. The image decoding apparatus restores the differential motion vector of the current block by applying a function corresponding to the selected resolution to the decoded differential motion vector index mvd_index. For example, as shown in Table 15, among the indices assigned to the absolute values belonging to the selected resolution, the absolute value of the differential motion vector corresponding to the decoded differential motion vector index is set to the value of the current block. It can be determined as a differential motion vector. As described above, an index increasing by 1 in an ascending order is assigned to absolute values belonging to each of the selected resolutions.

1/4 픽셀 해상도에 속하는 차분움직임벡터 크기들에는 인덱스(Q)가 부여되고, 1 픽셀 해상도에 속하는 차분움직임벡터 크기들에는 인덱스(O)가 부여되며, 4 픽셀 해상도에 속하는 차분움직임벡터 크기들에는 인덱스(F)가 부여된다. 인덱스(Q)는 0부터 시작하고 인덱스(O) 및 인덱스(F)는 1부터 시작하여 차분움직임벡터 크기 순으로 1씩 증가하는 인덱스가 부여된다.An index (Q) is assigned to differential motion vector sizes belonging to 1/4 pixel resolution, an index (O) is assigned to differential motion vector sizes belonging to 1 pixel resolution, and differential motion vector sizes belonging to 4 pixel resolution is given an index (F). The index (Q) starts from 0, and the index (O) and index (F) start from 1 and are given indices that increase by 1 in the order of the magnitude of the differential motion vector.

전술한 표 14를 예로 들어 구체적으로 설명한다. 영상 복호화 장치가 1/4 픽셀 해상도를 선택하고, "1"의 값을 갖는 차분움직임벡터 인덱스(mvd_index)를 복호화하면, "1"값의 인덱스에 대응하는 차분움직임벡터 크기 "0.25"를 현재블록의 차분움직임벡터로 복원한다. 다른 예로, 영상 복호화 장치가 1 픽셀 해상도를 선택하고, "1"의 값을 갖는 차분움직임벡터 인덱스(mvd_index)를 복호화하면, "1"값의 인덱스에 대응하는 차분움직임벡터 크기 "1"을 현재블록의 차분움직임벡터로 복원된다. 또 다른 예로, 영상 복호화 장치가 4 픽셀 해상도를 선택하고, "1"의 값을 갖는 차분움직임벡터 인덱스(mvd_index)를 복호화하면, "1"값의 인덱스에 대응하는 차분움직임벡터 크기 "4"를 현재블록의 차분움직임벡터로 복원한다.Table 14 described above will be described in detail with reference to an example. When the image decoding apparatus selects 1/4 pixel resolution and decodes the differential motion vector index (mvd_index) having a value of “1”, the differential motion vector size “0.25” corresponding to the index of “1” is set to the current block. It is restored as a differential motion vector of . As another example, if the image decoding apparatus selects a resolution of 1 pixel and decodes a differential motion vector index (mvd_index) having a value of “1”, the differential motion vector size “1” corresponding to the index of “1” is currently It is restored as a differential motion vector of the block. As another example, if the image decoding apparatus selects 4 pixel resolution and decodes the differential motion vector index (mvd_index) having a value of “1”, the size of the differential motion vector corresponding to the index of “1” is “4”. It is restored to the differential motion vector of the current block.

선택된 해상도 별로 표 14와 같이 부여된 인덱스들을 이용하여 현재블록의 차분움직임벡터를 복원하기 위한 함수는 수학식 10 내지 12와 같다. 수학식 10은 1/4 픽셀 해상도가 선택된 경우에 적용되는 함수이고, 수학식 11은 1 픽셀 해상도가 선택된 경우에 적용되는 함수이며, 수학식 12는 4 픽셀 해상도가 선택된 경우에 적용되는 함수이다. 다만, 수학식 10 내지 12는 예시에 불과하며, 차분움직임벡터의 크기(absolute value)에 차분움직임벡터 인덱스를 부여하는 본 발명의 다양한 실시예들에 따라 달라질 수 있다.A function for reconstructing the differential motion vector of the current block using the indexes given as shown in Table 14 for each selected resolution is as shown in Equations 10 to 12. Equation 10 is a function applied when 1/4 pixel resolution is selected, Equation 11 is a function applied when 1 pixel resolution is selected, and Equation 12 is a function applied when 4 pixel resolution is selected. However, Equations 10 to 12 are merely examples, and may vary according to various embodiments of the present invention in which a differential motion vector index is assigned to an absolute value of a differential motion vector.

Figure 112017066194390-pat00011
Figure 112017066194390-pat00011

Figure 112017066194390-pat00012
Figure 112017066194390-pat00012

Figure 112017066194390-pat00013
Figure 112017066194390-pat00013

수학식 10 내지 12에서 mvd 는 복원된 현재블록의 차분움직임벡터를 나타내고, mvd _index 는 복호화된 차분움직임벡터 인덱스를 나타낸다. 그리고

Figure 112017066194390-pat00014
는 바닥 함수(floor function)를 나타내고, %는 나머지 연산자(modulus operator)를 나타낸다.In Equations 10 to 12, mvd denotes a differential motion vector of the reconstructed current block , and mvd_index denotes a decoded differential motion vector index. and
Figure 112017066194390-pat00014
denotes a floor function, and % denotes a modulus operator.

도 6을 참조하여 실시예 3 내지 5에 따른 영상 복호화 장치의 구체적인 동작에 대하여 설명한다. 도 6은 본 발명의 실시예에 따른 영상 복호화 장치의 구체적인 동작방법의 일례를 나타내는 흐름도이다.A detailed operation of the image decoding apparatus according to the third to fifth embodiments will be described with reference to FIG. 6 . 6 is a flowchart illustrating an example of a specific operation method of an image decoding apparatus according to an embodiment of the present invention.

영상 복호화 장치는 현재블록의 차분움직임벡터 정보를 복호화하여 차분움직임벡터 인덱스를 결정한다(S610). 영상 복호화 장치는 결정된 차분움직임벡터 인덱스 값이 "0"이 아닌지 판단하여(S612), "0"인 경우에는 현재블록의 차분움직임벡터를 "0"으로 복원한다(S614).The image decoding apparatus decodes differential motion vector information of the current block to determine a differential motion vector index ( S610 ). The image decoding apparatus determines whether the determined differential motion vector index value is not “0” (S612), and if it is “0”, restores the differential motion vector of the current block to “0” (S614).

결정된 차분움직임벡터 인덱스 값이 "0"이 아니라면, 영상 복호화 장치는 차분움직임벡터의 해상도를 나타내는 제1 해상도 정보(예: first bin)를 복호화하고(S616), 복호화된 제1 해상도 정보가 1/4 픽셀 해상도를 지시하는지 아니면 정수 픽셀 해상도를 지시하는지를 판단한다(S618). 예를 들어, 제1 해상도 정보가 "0"으로 복호화되면 1/4 픽셀 해상도를 지시하고 "1"로 복호화되면 정수 픽셀 해상도를 지시한다고 할 때, 영상 복호화 장치는 제1 해상도 정보가 "0"으로 복호화되면 차분움직임벡터의 해상도로서 1/4 픽셀 해상도를 선택한다(S620). 그리고 영상 복호화 장치는 차분움직임벡터 인덱스에 1/4 픽셀 해상도에 대응하는 함수를 적용하여 현재블록의 차분움직임벡터를 복원한다(S622). 1/4 픽셀 해상도에 대응하는 함수는 예컨대, 수학식 8 내지 수학식 10과 같다.If the determined differential motion vector index value is not “0”, the image decoding apparatus decodes first resolution information (eg, first bin ) indicating the resolution of the differential motion vector ( S616 ), and the decoded first resolution information is 1/ It is determined whether 4-pixel resolution or integer pixel resolution is indicated (S618). For example, when the first resolution information is decoded to "0" indicates 1/4 pixel resolution and decoded to "1" indicates integer pixel resolution, the image decoding apparatus determines that the first resolution information is "0" When decoded as , 1/4 pixel resolution is selected as the resolution of the differential motion vector (S620). Then, the image decoding apparatus restores the differential motion vector of the current block by applying a function corresponding to the 1/4 pixel resolution to the differential motion vector index (S622). A function corresponding to the 1/4 pixel resolution is, for example, Equations (8) to (10).

단계 S618에서 제1 해상도 정보가 "0"이 아닌 "1"로 복호화되는 경우, 영상 복호화 장치는 차분움직임벡터의 해상도를 나타내는 제2 해상도 정보(예: second bin)를 복호화하고(S624), 제2 해상도 정보가 1 픽셀 해상도를 지시하는지 아니면 4 픽셀 해상도를 지시하는지를 판단한다(S626). 예를 들어, 제2 해상도 정보가 "0"으로 복호화되면 1 픽셀 해상도를 지시하고 "1"로 복호화되면 4 픽셀 해상도를 지시한다고 할 때, 영상 복호화 장치는 제2 해상도 정보가 "0"으로 복호화되면 차분움직임벡터의 해상도로서 1 픽셀 해상도를 선택한다(S628). 그리고 영상 복호화 장치는 차분움직임벡터 인덱스에 1 픽셀 해상도에 대응하는 함수를 적용하여 현재블록의 차분움직임벡터를 복원한다(S630). 1 픽셀 해상도에 대응하는 함수는 예컨대, 수학식 8, 수학식 9 및 수학식 11과 같다.When the first resolution information is decoded to "1" instead of "0" in step S618, the image decoding apparatus decodes second resolution information (eg, second bin ) indicating the resolution of the differential motion vector (S624), and It is determined whether the 2 resolution information indicates 1 pixel resolution or 4 pixel resolution (S626). For example, when the second resolution information is decoded to "0" indicates 1 pixel resolution and decoded to "1" indicates 4 pixel resolution, the image decoding apparatus decodes the second resolution information into "0" Then, 1 pixel resolution is selected as the resolution of the differential motion vector (S628). Then, the image decoding apparatus restores the differential motion vector of the current block by applying a function corresponding to one pixel resolution to the differential motion vector index (S630). A function corresponding to one pixel resolution is, for example, Equation 8, Equation 9, and Equation 11.

단계 626에서 제2 해상도 정보가 "0"이 아닌 "1"로 복호화되는 경우, 영상 복호화 장치는 차분움직임벡터의 해상도로서 4 픽셀 해상도를 선택하고(S632), 차분움직임벡터 인덱스에 4 픽셀 해상도에 대응하는 함수를 적용하여 현재블록의 차분움직임벡터를 복원한다(S634). 4 픽셀 해상도에 대응하는 함수는 예컨대, 수학식 8, 수학식 9 및 수학식 12와 같다.When the second resolution information is decoded as "1" instead of "0" in step 626, the image decoding apparatus selects 4 pixel resolution as the resolution of the differential motion vector (S632), and 4 pixel resolution in the differential motion vector index The differential motion vector of the current block is restored by applying the corresponding function (S634). A function corresponding to 4 pixel resolution is, for example, Equation 8, Equation 9, and Equation 12.

현재블록의 차분움직임벡터가 복원되면, 영상 복호화 장치는 현재블록의 예측움직임벡터를 결정하고, 복원된 차분움직임벡터와 결정된 예측움직임벡터를 이용하여 현재블록의 움직임벡터를 복원한다(S636).When the differential motion vector of the current block is reconstructed, the image decoding apparatus determines a predicted motion vector of the current block, and reconstructs the motion vector of the current block using the reconstructed differential motion vector and the determined predicted motion vector (S636).

도 3, 도 5 및 도 6에서는 각 과정을 순차적으로 실행하는 것으로 기재하고 있으나, 반드시 이에 한정되는 것은 아니다. 다시 말해, 도 3, 도 5 및 도 6에 기재된 과정을 변경하여 실행하거나 하나 이상의 과정을 병렬적으로 실행하는 것으로 적용 가능할 것이므로, 도 3, 도 5 및 도 6은 시계열적인 순서로 한정되는 것은 아니다.Although it is described that each process is sequentially executed in FIGS. 3, 5 and 6 , the present invention is not limited thereto. In other words, since the process described in FIGS. 3, 5, and 6 may be changed and applied or one or more processes may be executed in parallel, FIGS. 3, 5 and 6 are not limited to a time-series order .

도 3, 도 5 및 도 6에 기재된 본 실시예에 따른 영상 부호화 또는 복호화 방법은 컴퓨터 프로그램으로 구현되고 컴퓨터로 읽을 수 있는 기록매체에 기록될 수 있다. 본 실시예에 따른 영상 부호화 또는 복호화 방법을 구현하기 위한 컴퓨터 프로그램이 기록되고 컴퓨터가 읽을 수 있는 기록매체는 컴퓨팅 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다.The image encoding or decoding method according to the present embodiment described in FIGS. 3, 5 and 6 may be implemented as a computer program and recorded in a computer-readable recording medium. The computer program for implementing the image encoding or decoding method according to the present embodiment is recorded and the computer readable recording medium includes all kinds of recording devices in which data readable by the computing system is stored.

이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of this embodiment, and various modifications and variations will be possible without departing from the essential characteristics of the present embodiment by those of ordinary skill in the art to which this embodiment belongs. Accordingly, the present embodiments are intended to explain rather than limit the technical spirit of the present embodiment, and the scope of the technical spirit of the present embodiment is not limited by these embodiments. The protection scope of this embodiment should be interpreted by the claims below, and all technical ideas within the scope equivalent thereto should be construed as being included in the scope of the present embodiment.

Claims (13)

현재블록의 움직임벡터를 부호화하는 방법에 있어서,
상기 현재블록에 대한 차분움직임벡터를 결정하는 단계;
복수의 움직임벡터 해상도 중에서 상기 결정된 차분움직임벡터에 적용할 해상도를 선택하는 단계;
상기 복수의 움직임벡터 해상도들에 서로 다르게 각각 할당된 기정의된 복수의 오프셋들 중 상기 선택된 해상도에 대응하는 오프셋을 선택하는 단계;
상기 결정된 차분움직임벡터에 함수를 적용하여 상기 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 단계, 상기 함수는 상기 선택된 해상도와 상기 오프셋에 의해 정의됨; 및
상기 연산된 값을 차분움직임벡터 정보로서 부호화하고, 상기 복수의 움직임벡터 해상도 중 상기 선택된 해상도를 나타내기 위한 해상도 정보를 부호화하는 단계
를 포함하는 움직임벡터 부호화 방법.
A method of encoding a motion vector of a current block, the method comprising:
determining a differential motion vector for the current block;
selecting a resolution to be applied to the determined differential motion vector from among a plurality of motion vector resolutions;
selecting an offset corresponding to the selected resolution from among a plurality of predefined offsets allocated differently to the plurality of motion vector resolutions;
calculating a value to be encoded as a differential motion vector of the current block by applying a function to the determined differential motion vector, wherein the function is defined by the selected resolution and the offset; and
encoding the calculated value as differential motion vector information, and encoding resolution information representing the selected resolution among the plurality of motion vector resolutions;
A motion vector encoding method comprising a.
제1항에 있어서,
상기 복수의 움직임벡터 해상도는 1/4 픽셀 해상도, 1 픽셀 해상도 및 4 픽셀 해상도를 포함하고, 디폴트 해상도는 1/4 픽셀 해상도인, 움직임벡터 부호화 방법.
According to claim 1,
The plurality of motion vector resolutions include 1/4 pixel resolution, 1 pixel resolution and 4 pixel resolution, and the default resolution is 1/4 pixel resolution.
삭제delete 제1항에 있어서,
상기 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 단계는,
상기 결정된 차분움직임벡터로부터 상기 선택된 해상도에 대응하는 오프셋을 감산하는 단계; 및
상기 오프셋이 감산된 값을 상기 선택된 해상도로 나누어 상기 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 단계를 포함하는, 움직임벡터 부호화 방법.
According to claim 1,
Calculating a value to be encoded as a differential motion vector of the current block comprises:
subtracting an offset corresponding to the selected resolution from the determined differential motion vector; and
and calculating a value to be encoded as a differential motion vector of the current block by dividing the value obtained by subtracting the offset by the selected resolution.
제1항에 있어서,
상기 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 단계는,
상기 결정된 차분움직임벡터를 상기 선택된 해상도로 나누는 단계; 및
상기 선택된 해상도로 나누어진 값으로부터 상기 선택된 해상도에 대응하는 오프셋을 감산하여 상기 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 단계를 포함하는, 움직임벡터 부호화 방법.
According to claim 1,
Calculating a value to be encoded as a differential motion vector of the current block comprises:
dividing the determined differential motion vector by the selected resolution; and
and calculating a value to be encoded as a differential motion vector of the current block by subtracting an offset corresponding to the selected resolution from the value divided by the selected resolution.
현재블록의 움직임벡터를 부호화하는 방법에 있어서,
상기 현재블록에 대한 차분움직임벡터를 결정하는 단계;
복수의 움직임벡터 해상도 중에서 상기 결정된 차분움직임벡터에 적용할 차분움직임벡터 해상도를 선택하는 단계, 상기 복수의 움직임벡터 해상도는 서브샘플 단위의 정밀도를 나타내는 디폴트 해상도 및 정수샘플 단위의 정밀도를 가지는 하나 이상의 대체 해상도를 포함함;
상기 결정된 차분움직임벡터에 상기 차분움직임벡터 해상도에 대응하는 함수를 적용하여 상기 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 단계; 및
상기 연산된 값을 차분움직임벡터 정보로서 부호화하고, 상기 복수의 움직임벡터 해상도 중 상기 선택된 해상도를 나타내기 위한 해상도 정보를 부호화하는 단계를 포함하고,
상기 차분움직임벡터 해상도를 선택하는 단계는,
상기 결정된 차분움직임벡터의 크기(absolute value)가 상기 대체 해상도의 배수인 경우, 상기 대체 해상도를 상기 차분움직임벡터 해상도로 결정하는 단계; 및
상기 결정된 차분움직임벡터의 크기(absolute value)가 상기 대체 해상도의 배수가 아닌 경우, 상기 대체 해상도 및 상기 디폴트 해상도를 포함하는 해상도 후보들 중에서 상기 차분움직임벡터 해상도를 결정하는 단계를 포함하는, 움직임벡터 부호화 방법.
A method of encoding a motion vector of a current block, the method comprising:
determining a differential motion vector for the current block;
selecting a differential motion vector resolution to be applied to the determined differential motion vector from among a plurality of motion vector resolutions, wherein the plurality of motion vector resolutions include a default resolution indicating subsample unit precision and one or more replacements having integer sample unit precision. including resolution;
calculating a value to be encoded as a differential motion vector of the current block by applying a function corresponding to the resolution of the differential motion vector to the determined differential motion vector; and
encoding the calculated value as differential motion vector information and encoding resolution information for representing the selected resolution among the plurality of motion vector resolutions;
The step of selecting the differential motion vector resolution comprises:
determining the alternative resolution as the differential motion vector resolution when the determined absolute value of the differential motion vector is a multiple of the alternative resolution; and
and determining the differential motion vector resolution from among resolution candidates including the alternative resolution and the default resolution when the determined absolute value of the differential motion vector is not a multiple of the alternative resolution. Way.
제6항에 있어서,
상기 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 단계는,
상기 차분움직임벡터 해상도로 상기 결정된 차분움직임벡터를 표현하고, 상기 차분움직임벡터 해상도로 표현된 차분움직임벡터에 부여할 인덱스를 결정하는 단계; 및
상기 결정된 인덱스를 상기 현재블록의 차분움직임벡터로서 부호화할 값으로 결정하는 단계를 포함하는, 움직임벡터 부호화 방법.
7. The method of claim 6,
Calculating a value to be encoded as a differential motion vector of the current block comprises:
expressing the determined differential motion vector with the differential motion vector resolution and determining an index to be assigned to the differential motion vector expressed with the differential motion vector resolution; and
and determining the determined index as a value to be encoded as a differential motion vector of the current block.
제7항에 있어서,
상기 인덱스는, 상기 차분움직임벡터 해상도로 표현 가능한 차분움직임벡터 크기들에 대해 오름차순으로 1씩 증가하도록 부여되는, 움직임벡터 부호화 방법.
8. The method of claim 7,
The index is given to increase by 1 in an ascending order with respect to differential motion vector sizes expressible by the differential motion vector resolution.
현재블록의 움직임벡터를 복호화하기 위한 방법에 있어서,
상기 현재블록의 차분움직임벡터 정보를 복호화하는 단계;
차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도 중에서 상기 차분움직임벡터의 해상도를 선택하는 단계;
상기 차분움직임벡터 정보에 의해 결정된 값에 상기 선택된 해상도에 대응하는 함수를 적용하여 상기 현재블록의 차분움직임벡터를 복원하는 단계; 및
상기 현재블록의 예측움직임벡터를 결정하고, 상기 복원된 차분움직임벡터와 상기 예측움직임벡터를 이용하여 상기 현재블록의 움직임벡터를 복원하는 단계를 포함하고,
상기 현재블록의 차분움직임벡터를 복원하는 단계는,
상기 복수의 움직임벡터 해상도 각각에 할당된 서로 다른 기정의된 복수의 오프셋들 중 상기 선택된 해상도에 대응하는 오프셋을 선택하는 단계; 및
상기 차분움직임벡터 정보에 의해 결정된 값에 상기 함수를 적용하여 상기 현재블록의 차분움직임벡터를 복원하되, 상기 함수는 상기 선택된 해상도와 상기 오프셋에 의해 정의되는 단계
를 포함하는 움직임벡터 복호화 방법.
A method for decoding a motion vector of a current block, the method comprising:
decoding differential motion vector information of the current block;
selecting a resolution of the differential motion vector from among a plurality of motion vector resolutions by decoding resolution information indicating the resolution of the differential motion vector;
restoring a differential motion vector of the current block by applying a function corresponding to the selected resolution to a value determined by the differential motion vector information; and
determining a predicted motion vector of the current block, and reconstructing the motion vector of the current block using the reconstructed differential motion vector and the predicted motion vector;
Restoring the differential motion vector of the current block comprises:
selecting an offset corresponding to the selected resolution from among a plurality of different predefined offsets assigned to each of the plurality of motion vector resolutions; and
restoring a differential motion vector of the current block by applying the function to a value determined by the differential motion vector information, wherein the function is defined by the selected resolution and the offset
A motion vector decoding method comprising:
제9항에 있어서,
복수의 움직임벡터 해상도는 1/4 픽셀 해상도, 1 픽셀 해상도 및 4 픽셀 해상도를 포함하는, 움직임벡터 복호화 방법.
10. The method of claim 9,
The plurality of motion vector resolutions include 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution.
제9항에 있어서,
상기 현재블록의 차분움직임벡터를 복원하는 단계는,
상기 차분움직임벡터 정보에 의해 결정된 값에 상기 선택된 해상도를 곱하는 단계; 및
상기 선택된 해상도로 곱해진 값에 상기 선택된 해상도에 대응하는 오프셋을 가산하여 상기 현재블록의 차분움직임벡터를 복원하는 단계를 포함하는, 움직임벡터 복호화 방법.
10. The method of claim 9,
Restoring the differential motion vector of the current block comprises:
multiplying a value determined by the differential motion vector information by the selected resolution; and
and restoring a differential motion vector of the current block by adding an offset corresponding to the selected resolution to a value multiplied by the selected resolution.
제9항에 있어서,
상기 현재블록의 차분움직임벡터를 복원하는 단계는,
상기 차분움직임벡터 정보에 의해 결정된 값에 상기 선택된 해상도에 대응하는 오프셋을 가산하는 단계; 및
상기 오프셋이 가산된 값에 상기 선택된 해상도를 곱하는 단계를 포함하는, 움직임벡터 복호화 방법.
10. The method of claim 9,
Restoring the differential motion vector of the current block comprises:
adding an offset corresponding to the selected resolution to a value determined by the differential motion vector information; and
and multiplying the value to which the offset is added by the selected resolution.
현재블록의 움직임벡터를 복호화하기 위한 영상 복호화 장치에 있어서,
상기 현재블록의 차분움직임벡터 정보를 복호화하고, 차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도들에 서로 다르게 각각 할당된 기정의된 복수의 변수 값들 중 선택된 해상도에 대응하는 변수 값을 선택하고, 상기 차분움직임벡터 정보에 의해 결정된 값에 상기 선택된 해상도에 대응하는 변수 값에 의해 정의되는 함수를 적용하여 상기 현재블록의 차분움직임벡터를 복원하는 복호화부; 및
상기 현재블록의 예측움직임벡터를 결정하고, 상기 복원된 차분움직임벡터와 상기 예측움직임벡터를 이용하여 상기 현재블록의 움직임벡터를 복원하는 인터 예측부
를 포함하는 영상 복호화 장치.
An image decoding apparatus for decoding a motion vector of a current block, comprising:
A variable corresponding to a selected resolution from among a plurality of predefined variable values assigned differently to a plurality of motion vector resolutions by decoding the differential motion vector information of the current block and decoding the resolution information indicating the resolution of the differential motion vector a decoding unit that selects a value and restores a differential motion vector of the current block by applying a function defined by a variable value corresponding to the selected resolution to a value determined by the differential motion vector information; and
An inter prediction unit that determines a predicted motion vector of the current block, and reconstructs a motion vector of the current block using the reconstructed differential motion vector and the predicted motion vector
A video decoding device comprising a.
KR1020170087770A 2017-03-22 2017-07-11 Method and Apparatus for Encoding and Decoding Motion Vector KR102450863B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/KR2018/004651 WO2019013434A1 (en) 2017-03-22 2018-04-20 Device and method for encoding or decoding motion vector
KR1020220123988A KR102618414B1 (en) 2017-03-22 2022-09-29 Method and Apparatus for Encoding and Decoding Motion Vector

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020170036161 2017-03-22
KR20170036161 2017-03-22

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020220123988A Division KR102618414B1 (en) 2017-03-22 2022-09-29 Method and Apparatus for Encoding and Decoding Motion Vector

Publications (2)

Publication Number Publication Date
KR20180107687A KR20180107687A (en) 2018-10-02
KR102450863B1 true KR102450863B1 (en) 2022-10-05

Family

ID=63864098

Family Applications (5)

Application Number Title Priority Date Filing Date
KR1020170087770A KR102450863B1 (en) 2017-03-22 2017-07-11 Method and Apparatus for Encoding and Decoding Motion Vector
KR1020220123988A KR102618414B1 (en) 2017-03-22 2022-09-29 Method and Apparatus for Encoding and Decoding Motion Vector
KR1020230188000A KR20240001100A (en) 2017-03-22 2023-12-21 Method and Apparatus for Encoding and Decoding Motion Vector
KR1020240009122A KR20240013891A (en) 2017-03-22 2024-01-19 Method and Apparatus for Encoding and Decoding Motion Vector
KR1020240009118A KR20240013890A (en) 2017-03-22 2024-01-19 Method and Apparatus for Encoding and Decoding Motion Vector

Family Applications After (4)

Application Number Title Priority Date Filing Date
KR1020220123988A KR102618414B1 (en) 2017-03-22 2022-09-29 Method and Apparatus for Encoding and Decoding Motion Vector
KR1020230188000A KR20240001100A (en) 2017-03-22 2023-12-21 Method and Apparatus for Encoding and Decoding Motion Vector
KR1020240009122A KR20240013891A (en) 2017-03-22 2024-01-19 Method and Apparatus for Encoding and Decoding Motion Vector
KR1020240009118A KR20240013890A (en) 2017-03-22 2024-01-19 Method and Apparatus for Encoding and Decoding Motion Vector

Country Status (2)

Country Link
KR (5) KR102450863B1 (en)
WO (1) WO2019013434A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7391958B2 (en) 2018-11-08 2023-12-05 オッポ広東移動通信有限公司 Video signal encoding/decoding method and equipment used in the method
CN113039788A (en) * 2018-11-08 2021-06-25 Oppo广东移动通信有限公司 Video signal encoding/decoding method and apparatus for the same
WO2020130520A1 (en) * 2018-12-16 2020-06-25 엘지전자 주식회사 Method and apparatus for processing video signal by using inter prediction
WO2020141853A1 (en) * 2019-01-01 2020-07-09 엘지전자 주식회사 Method and apparatus for processing video signal on basis of inter prediction
WO2020263009A1 (en) * 2019-06-28 2020-12-30 에스케이텔레콤 주식회사 Method for adaptively setting resolution, and image decoding apparatus
WO2021141372A1 (en) * 2020-01-06 2021-07-15 현대자동차주식회사 Image encoding and decoding based on reference picture having different resolution
CN113966614B (en) * 2020-03-16 2023-05-30 北京达佳互联信息技术有限公司 Improvement of merging mode with motion vector difference

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016068674A1 (en) * 2014-10-31 2016-05-06 삼성전자 주식회사 Method and device for encoding/decoding motion vector

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8982952B2 (en) * 2008-06-02 2015-03-17 Broadcom Corporation Method and system for using motion vector confidence to determine a fine motion estimation patch priority list for a scalable coder
RS64604B1 (en) * 2011-06-16 2023-10-31 Ge Video Compression Llc Entropy coding of motion vector differences
KR102349788B1 (en) * 2015-01-13 2022-01-11 인텔렉추얼디스커버리 주식회사 Method and apparatus for encoding/decoding video

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016068674A1 (en) * 2014-10-31 2016-05-06 삼성전자 주식회사 Method and device for encoding/decoding motion vector

Also Published As

Publication number Publication date
KR20240013891A (en) 2024-01-30
KR20240001100A (en) 2024-01-03
KR20240013890A (en) 2024-01-30
KR20220136330A (en) 2022-10-07
KR102618414B1 (en) 2023-12-27
KR20180107687A (en) 2018-10-02
WO2019013434A1 (en) 2019-01-17

Similar Documents

Publication Publication Date Title
US11689734B2 (en) Method for generating prediction block in AMVP mode
US11943476B2 (en) Methods and apparatuses for coding video data with adaptive secondary transform signaling
KR102450863B1 (en) Method and Apparatus for Encoding and Decoding Motion Vector
US9467713B2 (en) Apparatus for decoding a moving picture
US9565446B2 (en) Apparatus for encoding a moving picture
KR20210134554A (en) Apparatus and Method for Video Encoding or Decoding
EP3145188A2 (en) Inter prediction encoding method
US10694187B2 (en) Method and device for deriving block structure in video coding system
WO2020211777A1 (en) Methods and apparatuses for coding video data with secondary transform
US9473789B2 (en) Apparatus for decoding a moving picture
CN107211153B (en) Method and apparatus for processing video signal
US20220182604A1 (en) Video encoding and decoding using intra block copy
US11962764B2 (en) Inter-prediction method and video decoding apparatus using the same
KR20210000635A (en) Method and apparatus for deriving a block vector of chroma block
KR20200081186A (en) Method for deriving motion vector of temporal candidate and apparatus using the same
KR20220017373A (en) Method and apparatus for patchbook-based encoding and decoding of video data
KR20220118351A (en) Method for generating prediction block using weighted sum of intra prediction signal and inter prediction signal and apparatus using the same
KR20200040192A (en) Method and Apparatus for Encoding and Decoding Quantized Transform Coefficients

Legal Events

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