KR20240013891A - 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
KR20240013891A
KR20240013891A KR1020240009122A KR20240009122A KR20240013891A KR 20240013891 A KR20240013891 A KR 20240013891A KR 1020240009122 A KR1020240009122 A KR 1020240009122A KR 20240009122 A KR20240009122 A KR 20240009122A KR 20240013891 A KR20240013891 A KR 20240013891A
Authority
KR
South Korea
Prior art keywords
motion vector
resolution
differential motion
mvd
current block
Prior art date
Application number
KR1020240009122A
Other languages
Korean (ko)
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 에스케이텔레콤 주식회사
Publication of KR20240013891A publication Critical patent/KR20240013891A/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/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/53Multi-resolution motion estimation; Hierarchical motion estimation
    • 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/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • 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 images. According to one aspect of the present invention, a method of encoding a motion vector of a current block includes: determining a differential motion vector for the current block at a default resolution; determining one or more resolution candidates among a plurality of motion vector resolutions according to the size (absolute value) of the determined differential motion vector; selecting a resolution to express 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 about the calculated value and resolution information representing the selected resolution among the plurality of motion vector resolutions as information about 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 images.

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

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

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

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

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

본 발명의 일 측면에 따르면, 현재블록의 움직임벡터를 부호화하는 방법을 제공한다. 그 방법은, 복수의 움직임벡터 해상도 중에서 상기 현재블록의 차분움직임벡터에 대한 해상도를 선택하는 단계, 상기 복수의 움직임벡터 해상도는 디폴트 해상도 및 적어도 두 개의 대체 해상도들을 포함함; 상기 현재블록의 움직임벡터와 예측움직임벡터 간의 차이인 상기 차분움직임벡터를 상기 선택된 해상도에 따라 부호화하는 단계; 및 상기 복수의 움직임벡터 해상도 중 상기 해상도를 나타내기 위한 해상도 정보를 부호화하는 단계를 포함한다. 또한, 상기 해상도 정보를 부호화하는 단계는, 상기 차분움직임벡터에 대한 해상도가 상기 디폴트 해상도인지를 나타내는 제1 신택스 요소를 부호화하는 단계; 및 상기 차분움직임벡터에 대한 해상도가 상기 디폴트 해상도가 아닌 경우, 상기 대체 해상도들 중 상기 차분움직임벡터에 대한 해상도를 나타내는 제2 신택스 요소를 부호화하는 단계를 포함한다.According to one aspect of the present invention, a method for encoding a motion vector of a current block is provided. The method includes selecting a resolution for the differential motion vector of the current block from a plurality of motion vector resolutions, the plurality of motion vector resolutions including a default resolution and at least two alternative resolutions; encoding the differential motion vector, which is the difference between the motion vector of the current block and the predicted motion vector, according to the selected resolution; and encoding resolution information to indicate the resolution among the plurality of motion vector resolutions. In addition, encoding the resolution information may include encoding a first syntax element indicating whether the resolution for the differential motion vector is the default resolution; And when the resolution for the differential motion vector is not the default resolution, encoding a second syntax element indicating the resolution for the differential motion vector among the alternative resolutions.

본 발명의 다른 측면에 따르면, 현재블록의 움직임벡터를 복호화하기 위한 방법을 제공한다. 그 방법은, 상기 현재블록의 차분움직임벡터 정보를 복호화하는 단계; 차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도 중에서 상기 차분움직임벡터의 해상도를 선택하는 단계, 상기 복수의 움직임벡터 해상도는 디폴트 해상도 및 적어도 두 개의 대체 해상도들을 포함함; 상기 선택된 해상도를 이용하여 상기 현재블록의 차분움직임벡터를 복원하는 단계; 및 상기 현재블록의 예측움직임벡터를 결정하고, 상기 복원된 차분움직임벡터와 상기 예측움직임벡터를 이용하여 상기 현재블록의 움직임벡터를 복원하는 단계를 포함한다. 또한, 상기 해상도 정보를 복호화하는 것은, 상기 차분움직임벡터에 대한 해상도가 상기 디폴트 해상도인지를 나타내는 제1 신택스 요소를 복호화하는 단계; 및 상기 차분움직임벡터에 대한 해상도가 상기 디폴트 해상도가 아닌 경우, 상기 대체 해상도들 중 상기 차분움직임벡터에 대한 해상도를 나타내는 제2 신택스 요소를 복호화하는 단계를 포함한다.According to another aspect of the present invention, a method for decoding the motion vector of the current block is provided. The method includes 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, the plurality of motion vector resolutions including a default resolution and at least two alternative resolutions; Restoring the differential motion vector of the current block using the selected resolution; and determining a predicted motion vector of the current block, and restoring the motion vector of the current block using the restored differential motion vector and the predicted motion vector. In addition, decoding the resolution information may include decoding a first syntax element indicating whether the resolution for the differential motion vector is the default resolution; And when the resolution for the differential motion vector is not the default resolution, decoding a second syntax element indicating the resolution for the differential motion vector among the alternative resolutions.

본 발명의 또 다른 측면에 따르면, 영상 복호화 방법에 의해 복호화될 비트스트림으로 저장하는, 디코더에 의해 판독 가능한, 기록 매체를 제공한다. 상기 비트스트림의 복호화는, 상기 현재블록의 차분움직임벡터 정보를 복호화하는 단계; 차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도 중에서 상기 차분움직임벡터의 해상도를 선택하는 단계, 상기 복수의 움직임벡터 해상도는 디폴트 해상도 및 적어도 두 개의 대체 해상도들을 포함하는 포함함; 상기 선택된 해상도를 이용하여 상기 현재블록의 차분움직임벡터를 복원하는 단계; 및 상기 현재블록의 예측움직임벡터를 결정하고, 상기 복원된 차분움직임벡터와 상기 예측움직임벡터를 이용하여 상기 현재블록의 움직임벡터를 복원하는 단계를 포함한다. 또한, 상기 해상도 정보를 복호화하는 것은, 상기 차분움직임벡터에 대한 해상도가 상기 디폴트 해상도인지를 나타내는 제1 신택스 요소를 복호화하는 단계; 및 상기 차분움직임벡터에 대한 해상도가 상기 디폴트 해상도가 아닌 경우, 상기 대체 해상도들 중 상기 차분움직임벡터에 대한 해상도를 나타내는 제2 신택스 요소를 복호화하는 단계를 포함한다.According to another aspect of the present invention, a recording medium that is readable by a decoder and stores a bitstream to be decoded by an image decoding method is provided. Decoding the bitstream includes 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, wherein the plurality of motion vector resolutions include a default resolution and at least two alternative resolutions; Restoring the differential motion vector of the current block using the selected resolution; and determining a predicted motion vector of the current block, and restoring the motion vector of the current block using the restored differential motion vector and the predicted motion vector. In addition, decoding the resolution information may include decoding a first syntax element indicating whether the resolution for the differential motion vector is the default resolution; And when the resolution for the differential motion vector is not the default resolution, decoding a second syntax element indicating the resolution for the differential motion vector among the alternative resolutions.

도 1은 본 발명의 실시예에 따른 영상 부호화 장치에 대한 블록도이다.
도 2는 현재블록의 주변블록에 대한 예시도이다.
도 3은 본 발명의 실시예에 따른 영상 부호화 장치의 동작방법을 나타내는 흐름도이다.
도 4는 본 발명의 실시예에 따른 영상 복호화 장치에 대한 블록도이다.
도 5는 본 발명의 실시예에 따른 영상 복호화 장치의 동작방법을 나타내는 흐름도이다.
도 6은 본 발명의 실시예에 따른 영상 복호화 장치의 구체적인 동작방법의 일례를 나타내는 흐름도이다.
1 is a block diagram of a video encoding device according to an embodiment of the present invention.
Figure 2 is an example diagram of neighboring blocks of the current block.
Figure 3 is a flowchart showing a method of operating a video encoding device according to an embodiment of the present invention.
Figure 4 is a block diagram of an image decoding device according to an embodiment of the present invention.
Figure 5 is a flowchart showing a method of operating a video decoding device according to an embodiment of the present invention.
Figure 6 is a flowchart showing an example of a specific operating method of a video decoding device according to an embodiment of the present invention.

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

도 1은 본 발명의 실시예에 따른 영상 부호화 장치(100)에 대한 블록도이다.Figure 1 is a block diagram of an image encoding device 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 device 100 includes a block division unit 110, a prediction unit 120, a subtractor 130, a transform unit 140, a quantization unit 145, an encoder 150, an inverse quantization unit 160, It includes an inverse transform unit 165, an adder 170, a filter unit 180, and a memory 190. Each component of the encoding device 100 may be implemented as a hardware chip, or may be implemented as software and a microprocessor may be implemented to execute the software function 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 division unit 110 divides each picture constituting the image into a plurality of CTUs (Coding Tree Units) and then recursively divides the CTUs using a tree structure. The leaf node in the tree structure becomes the CU (Coding Unit), the basic unit of encoding. The tree structure is either QuadTree (QT), where the upper node is divided into four lower nodes, or QTBT (QuadTree), which is a combination of the QT structure and BinaryTree (BT) structure, where the upper node is divided into two lower nodes. plus BinaryTree) structure can be used.

예측부(120)는 현재블록을 예측하여 예측블록을 생성한다. 예측부(120)는 인트라 예측부(122)와 인터 예측부(124)를 포함한다. 여기서, 현재블록은 상기의 트리 구조에서 리프 노드에 해당하는 부호화의 기본 단위로서, 현재 부호화하고자 하는 CU를 의미한다. 대안적으로, 현재블록은 CU로부터 분할된 복수의 서브블록 중 하나의 서브블록일 수도 있다.The prediction unit 120 predicts the current block and generates a prediction 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 above tree structure and means the CU to be currently encoded. Alternatively, the current block may be one subblock among a plurality of subblocks divided from the CU.

인트라 예측부(122)는 현재블록이 포함된 현재 픽처 내에서 현재블록의 주변에 위치한 픽셀(참조 픽셀)들을 이용하여 현재블록 내의 픽셀들을 예측한다. 예측 방향에 따라 복수의 인트라 예측모드가 존재하며, 각 예측모드에 따라 사용할 주변 픽셀과 연산식이 다르게 정의된다.The intra prediction unit 122 predicts pixels within the current block using pixels (reference pixels) located around the current block within the current picture including the current block. There are multiple intra prediction modes depending on the prediction direction, and the surrounding pixels and calculation formulas to be used are defined differently for 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 a reference picture that has been 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 the displacement between the current block in the current picture and the prediction block in the reference picture is generated. Motion information including information about reference pictures and motion vectors used to predict the current block is encoded by the encoder 150 and transmitted to the video decoding device.

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

현재블록의 참조 픽처와 움직임벡터가 주변블록의 참조 픽처 및 움직임벡터와 동일한 경우에는 그 주변블록을 식별할 수 있는 정보를 부호화함으로써, 현재블록의 움직임 정보를 복호화 장치로 전달할 수 있다. 이러한 방법을 '머지 모드 (merge mode)'라 한다.If 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 can be transmitted to the decoding device by encoding information that can identify 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 shown in Figure 2, the surrounding blocks for deriving merge candidates include the left block (L), top block (A), top right block (AR), and bottom left block (BL) adjacent to the current block in the current picture. ), all or part of the upper left block (AL) can be used. Additionally, a block located within a reference picture (which may be the same or different from the reference picture used to predict the current block) other than the current picture where 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 (co-located block) or blocks adjacent to the co-located block may be additionally used as merge candidates.

인터 예측부(124)는 이러한 주변블록들을 이용하여 기 결정된 개수의 머지 후보를 포함하는 머지 리스트를 구성한다. 머지 리스트에 포함된 머지 후보들 중에서 현재블록의 움직임정보로서 사용할 머지 후보를 선택하고 선택된 후보를 식별하기 위한 머지 인덱스 정보를 생성한다. 생성된 머지 인덱스 정보는 부호화부(150)에 의해 부호화되어 영상 복호화 장치로 전달된다.The inter prediction unit 124 uses these neighboring blocks to construct a merge list including a predetermined number of merge candidates. 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 is generated to identify the selected candidate. The generated merge index information is encoded by the encoder 150 and transmitted to the video decoding device.

움직임 정보를 부호화하는 또 다른 방법은 차분움직임벡터(Motion Vector Difference: MVD)를 부호화하는 것이다.Another way to encode 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 uses neighboring blocks of the current block to derive motion vector predictor (MVP) candidates for the motion vector of the current block. The surrounding blocks used to derive predicted motion vector candidates include the left block (L), top block (A), top right block (AR), and bottom left block adjacent to the current block in the current picture shown in FIG. 2. BL), or all or part of the upper left block (AL) can be used. Additionally, a block located within a reference picture (which may be the same or different from the reference picture used to predict the current block) rather than the current picture where the current block is located will be used as a neighboring block used to derive predicted motion vector candidates. It may be possible. For example, a block co-located with the current block within 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 using the motion vectors of the surrounding blocks, and determines a predicted motion vector for the motion vector of the current block using the predicted motion vector candidates. Then, the predicted motion vector is subtracted from the motion vector of the current block to calculate the differential motion vector.

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

한편, 예측움직임벡터는 예측움직임벡터 후보들 중 어느 하나를 선택하는 방식으로 결정될 수도 있다. 이 경우에는 차분움직임벡터에 대한 정보 및 현재블록을 예측하기 위해 사용한 참조 픽처에 대한 정보와 함께, 선택된 예측움직임벡터 후보를 식별하기 위한 정보가 추가로 부호화된다.Meanwhile, the predicted motion vector may be determined by selecting one of the predicted motion vector candidates. In this case, information for identifying the selected predicted motion vector candidate is additionally encoded, along with information about the differential motion vector and information about 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 converter 140 converts the residual signal in the residual block with pixel values in the spatial domain into a transform coefficient in the frequency domain. The converter 140 may convert the residual signals in the residual block using the size of the current block as a conversion unit, or divide the residual block into a plurality of smaller subblocks and convert the residual signals into a conversion unit of the subblock size. You can also convert it. There may be various ways to divide the residual block into smaller subblocks. For example, it may be divided into predefined subblocks of the same size, or QT (quadtree) type division may be used with the residual block as the root node.

양자화부(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 about the size of the CTU located in the highest layer of the tree structure and splitting information for splitting the block from the CTU into the tree structure, so that the decoding device splits the block in the same way as the encoding device. make it possible For example, in the case of QT division, QT division information indicating whether a block in the upper layer is divided into four blocks in the lower layer is encoded. In the case of BT splitting, starting from the block corresponding to the leaf node of the QT, BT splitting information indicating whether each block is split into two blocks and the type of splitting is encoded.

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

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

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

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

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

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

역양자화부(160)는 양자화부(145)로부터 출력되는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 생성한다. 역변환부(165)는 역양자화부(160)로부터 출력되는 변환 계수들을 주파수 도메인으로부터 공간 도메인으로 변환하여 잔차블록을 복원한다.The inverse quantization unit 160 inversely 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 converting the transform coefficients output from the inverse quantization unit 160 from the frequency domain to the spatial domain.

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

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

참고로, 영상 부호화 장치(100)는 스킵 모드(Skip Mode)를 사용하여 현재블록을 부호화할 수도 있다. 스킵 모드에서는, 현재블록의 움직임정보만이 부호화되고 잔차블록에 대한 정보 등 현재블록에 대한 어떠한 다른 정보도 부호화되지 않는다. 현재블록의 움직임정보로서는 전술한 머지 인덱스 정보가 사용될 수 있다. 영상 복호화 장치(100)는, 현재 블록이 스킵 모드로 부호화된 경우, 비트스트림으로부터 복호화된 머지 인덱스 정보에 의해 지시되는 머지 후보의 움직임정보를 현재블록의 움직임정보로 설정한다. 그리고 현재블록의 움직임정보에 의해 예측된 예측블록을 현재블록으로서 복원한다.For reference, the video encoding device 100 may encode the current block using skip mode. In skip mode, only the motion information of the current block is encoded and no other information about the current block, such as information about the residual block, is encoded. The above-described merge index information can be used as motion information of the current block. When the current block is encoded in skip mode, the video 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. And 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 device for encoding or decoding a motion vector, and can improve encoding efficiency by adjusting the resolution of expressing the differential motion vector according to the characteristics of the image and block.

우선, 움직임벡터 해상도에 대하여 설명한다. 움직임벡터 해상도는 정수 픽셀 해상도와 분수 픽셀 해상도 사이에서 적응적으로 결정될 수 있다. 움직임벡터 해상도는 움직임벡터를 결정하는 최소 단위이다. 또한, 움직임벡터 해상도는 현재블록의 움직임 보상을 위한 참조 픽처의 해상도 즉, 참조 픽처를 어느 픽셀까지 보간할 것인지를 의미할 수 있다. 예컨대, 움직임벡터 해상도가 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 explained. The motion vector resolution may be adaptively determined between integer pixel resolution and fractional pixel resolution. Motion vector resolution is the minimum unit that determines the motion vector. Additionally, motion vector resolution may refer to the resolution of the reference picture for motion compensation of the current block, that is, to which pixel the reference picture will be interpolated. For example, if the motion vector resolution is 1/4 pixel, the reference picture is interpolated up to 1/4 pixel and the motion vector is measured up to 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, or an integer pixel unit such as 1 pixel, 2 pixel, 3 pixel, etc. ) can be a unit. The motion vector resolution as well as the differential motion vector resolution may be adaptively selected between fractional pixel resolution and integer pixel resolution.

움직임이 미세한 영역을 예측하는 경우에는 분수 픽셀 단위로 움직임 벡터가 표현되고, 움직임이 큰 영역을 예측하는 경우에는 정수 픽셀 단위로 움직임벡터가 표현될 수 있다. 한편, 현재블록의 움직임벡터와 예측움직임벡터의 차이가 작은 경우에는 분수 픽셀 단위로 차분움직임벡터가 표현되고, 반대로 그 차이가 큰 경우에는 정수 픽셀 단위로 차분움직임벡터가 표현될 수 있다. 영상의 특성에 따라 정수 픽셀 해상도보다 분수 픽셀 해상도로 움직임벡터 및 차분움직임벡터를 표현하는 것이 적절한 경우가 있겠으나, 이 경우에는 정수 이하의 소수 부분까지 영상 복호화 장치로 시그널링해야 하므로, 필요한 비트량이 증가하게 된다.When predicting an area with subtle movement, the motion vector may be expressed in fractional pixel units, and when predicting an area with large movement, the motion vector may be expressed in integer pixel units. Meanwhile, if 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 fractional pixel units, and conversely, if the difference is large, the differential motion vector may be expressed in integer pixel units. Depending on the characteristics of the video, there may be cases where it is appropriate to express motion vectors and differential motion vectors with fractional pixel resolution rather than integer pixel resolution. However, in this case, the fractional parts below the integer must be signaled to the video decoding device, so the amount of bits required increases. I do it.

기존 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. An example of a differential motion vector (quarter-pixel mvd) expressed at 1/4 pixel resolution and a differential motion vector index (mvd index) assigned thereto is shown in Table 1.

mvd indexmvd 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 1/4 pixel units as shown in Table 1. However, in order to signal values that include decimal parts in addition to the integer part, the differential motion vector index (mvd index), which is a value obtained by multiplying the actual determined absolute value of the quarter-pixel mvd by 4, and the sign of the determined differential motion vector ( sign) The value is encoded as information on the differential motion vector of the current block.

표 2는 HEVC에서 차분움직임벡터의 정보를 표현하는 신택스 요소들을 나타낸다.Table 2 shows syntax elements expressing information of 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 the value obtained by subtracting 2 from the differential motion vector index, and mvd_sign_flag [] represents the sign of the differential motion vector. [0] represents the horizontal axis component (i.e., x component) of the differential motion vector, and [1] represents the vertical axis component (i.e., y component) of the differential motion vector.

표 3은 표 2에서 언급한 신택스 요소들의 이진화 기법을 나타낸다.Table 3 shows the binarization technique for 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_mvd_minus2[ ]abs_mvd_minus2[ ] EGEG k-th=1k-th=1 mvd_sign_flag[ ]mvd_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 that requires the maximum value (Max) of the 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 EG by 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 number of bits required to represent differential motion vector (quarter-pixel mvd) information of the current block determined according to 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 mvd indexmvd 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_mvd_minus2abs_mvd_minus2 -- -- 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) mvd_sign_flagmvd_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, mvd index is the index value of the actually obtained differential motion vector (quarter-pixel mvd), and is a value obtained by multiplying the absolute value of the differential motion vector (quarter-pixel mvd) by 4, as shown in Table 1. The number of bits required for abs_mvd_minus2 is obtained from the result of coding the mvd index minus 2 based on EG (see Table 3) where k-th is 1. Hereinafter, the same applies to the description of embodiments of the present invention. The value of mvd index minus 2 is displayed 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 images by reducing the amount of bits required to express differential motion vector information. Various embodiments of the present invention, which will be described below, are applied to both the horizontal axis component (x component) and the vertical axis component (y component) of the differential motion vector, respectively. However, for convenience of explanation, the explanation is based on one ingredient. Additionally, the present invention is not limited to expressing differential motion vectors, but can be used to express the motion vector itself.

실시예 1Example 1

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

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

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

예를 들어, 영상 부호화 장치는 차분움직임벡터의 절대값을 표현함에 있어서, 정수 부분(pre-point)은 3개의 신택스 요소들로 표현하고, 소수 부분(post-point)은 1개의 신택스 요소로 표현할 수 있다. 차분움직임벡터의 부호는 플래그로 표현한다. 신택스 요소들의 일례는 다음과 같다.For example, when a video encoding device expresses the absolute value of a differential motion vector, the integer part (pre-point) is expressed with three syntax elements, and the decimal part (post-point) is expressed with one syntax element. You 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) : 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) : 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) : 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 representing the decimal part of the absolute value of the differential motion vector (for example, for 1/4 pixel, there are four types: 0:.00, 1:.25, 2:.50, 3) :.75)

- mvd_sign_flag: 차분움직임벡터의 부호를 나타내는 플래그- mvd_sign_flag : Flag indicating the sign of the differential motion vector

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

본 실시예의 신택스 요소들에 대한 구조의 일례는 표 6과 같다.An example of the structure of 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 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, it is not limited to this and the Max value for FL may vary depending on the motion vector resolution.


Syntax element Syntax element Binarization Binarization
Process Process ParameterParameter Pre-point

Pre-point

abs_mvd_zero_only_flagabs_mvd_zero_only_flag FLFL Max=1Max=1
abs_mvd_less1_flagabs_mvd_less1_flag FLFL Max=1Max=1 abs_mvd_minus1abs_mvd_minus1 EGEG k-th=1k-th=1 Post-point Post-point abs_mvd_post_typeabs_mvd_post_type FLFL Max=3Max=3 Sign Sign mvd_sign_flagmvd_sign_flag FLFL Max1Max1

표 8은 전술한 표 5와 동일한 차분움직임벡터에 대하여 본 실시예에 따라 계산한 비트수를 나타낸다. abs_mvd_minus1에 필요한 비트수 아래에 기재된 괄호 안의 숫자는 차분움직임벡터 절대값의 정수 부분에서 1을 뺀 값을 나타낸다.Table 8 shows the number of bits calculated according to this embodiment for the same differential motion vector as Table 5 described above. The number in parentheses below the number of bits required for abs_mvd_minus1 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_mvd_less1_flagabs_mvd_less1_flag -- 1One 1One 1One 00 00 00 00 00 abs_mvd_minus1abs_mvd_minus1 -- -- -- -- 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_mvd_post_typeabs_mvd_post_type -- 0101 1010 1111 0000 0101 0000 1010 1111 mvd_sign_flagmvd_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 was 0.25, the number of bits in this example was calculated to be larger, but 2.25, 13.00, -22.50, 43.75 At 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 the HEVC method and the method of this embodiment for quarter-pixel mvd values from 0 to 40 in addition to the values shown in Table 8, it is the same in all cases except for the case of 0.25. The result may be that more or less bits are required. In other words, the differential motion vector coding method according to this 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 video decoding device decodes the differential motion vector information of the current block from the bitstream. Here, the differential motion vector information includes information about the absolute value of the differential motion vector (e.g. , abs_mvd_zero_only_flag, abs_mvd_less1_flag, abs_mvd_minus1, abs_mvd_post_type ) and information about the sign (e.g., mvd_sign_flag ), and the absolute value of the differential motion vector. As described above, the information about includes information indicating the value corresponding to the integer part and information indicating the value corresponding to the decimal part.

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

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

실시예 2Example 2

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

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

예를 들어, 본 실시예에 따른 영상 부호화 장치는 차분움직임벡터의 절대값을 표현함에 있어, 정수 부분(pre-point)은 4개의 신택스 요소로 표현하고, 소수 부분(post-point)은 1개의 신택스 요소로 표현할 수 있다. 차분움직임벡터의 부호는 플래그로 표현한다. 신택스 요소들의 일례는 다음과 같다.For example, when the video encoding device according to this embodiment expresses the absolute value of the differential motion vector, the integer part (pre-point) is expressed with 4 syntax elements, and the decimal part (post-point) is expressed with 1 syntax element. 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) : 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) : 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) : 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) : 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 representing the decimal part of the absolute value of the differential motion vector (for example, for 1/4 pixel, there are four types: 0:.00, 1:.25, 2:.50, 3) :.75)

- mvd_sign_flag: 차분움직임벡터의 부호를 나타내는 플래그- mvd_sign_flag : Flag indicating the sign of the differential motion vector

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

본 실시예의 신택스 요소들에 대한 구조의 일례는 표 9와 같다.An example of the structure of 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 syntax elements of this embodiment is shown in Table 10. Since there are 4 types for abs_mvd_post_type , the Max value for FL of the corresponding syntax is set to 3. However, it is not limited to this and the Max value for FL may vary depending on the motion vector resolution.


Syntax element Syntax element Binarization Binarization
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_mvd_minus2abs_mvd_minus2 EGEG k-th=1k-th=1 Post-point Post-point abs_mvd_post_typeabs_mvd_post_type FLFL Max=3Max=3 Sign Sign mvd_sign_flagmvd_sign_flag FLFL Max1Max1

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

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_mvd_minus2abs_mvd_minus2 -- -- -- -- -- 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_mvd_post_typeabs_mvd_post_type -- 0101 1010 1111 0000 0101 0000 1010 1111 mvd_sign_flagmvd_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, the number of bits in this example was calculated to be larger when the differential motion vector value of 1/4 pixel resolution was 0.25, 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. In other words, the differential motion vector coding method according to this 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 video decoding device decodes the differential motion vector information of the current block from the bitstream. Here, the differential motion vector information decodes information about the absolute value of the differential motion vector (e.g. , abs_mvd_zero_only_flag, abs_mvd_greater_equal_1_flag, abs_mvd_greater_equal_2_flag, abs_mvd_minus2, abs_mvd_post_type ) and information about the sign (e.g., mvd_sign_flag ).

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

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

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

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

adaptive_MV_resolution_enbaled_flag는 SPS(Sequence Parameter Set), PPS(Picture Parameter Set) 및 슬라이스(또는 CTU: Coding Tree Unit) 헤더 중 하나 이상에 삽입될 수 있다. 예를 들어, 움직임 벡터 해상도를 적응적으로 선택할지 여부가 영상 시퀀스 단위마다 결정되는 경우에는 SPS에 플래그가 삽입되고, 픽처 단위마다 결정되는 경우에는 PPS에 플래그가 삽입되며, 슬라이스(또는 CTU) 단위마다 결정되는 경우에는 슬라이스(또는 CTU) 헤더에 삽입된다. adaptive_MV_resolution_enbaled_flag can be inserted into one or more of the Sequence Parameter Set (SPS), Picture Parameter Set (PPS), and Slice (or Coding Tree Unit (CTU)) headers. For example, if whether to adaptively select motion vector resolution is determined on a per-image sequence basis, a flag is inserted in SPS; if it is decided on a per-picture basis, a flag is inserted in PPS; and on a slice (or CTU) basis. If each decision is made, 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 encoded as on.

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

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

예를 들어, 디폴트 해상도가 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 video encoding device determines whether the motion vector resolution is 1/4 pixel resolution as the selected resolution information. Information indicating whether it is a pixel resolution and, if it is an integer pixel resolution, information indicating whether it is a 1-pixel resolution or a 4-pixel resolution are encoded. Hereinafter, the syntax element encoded as information indicating whether the motion vector resolution is 1/4 pixel resolution or integer pixel resolution is referred to as first_bin , and the syntax element encoded as information indicating whether the motion vector resolution is 1 pixel resolution or 4 pixel resolution is referred to as second_bin . It is called.

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

다른 예로, 영상 복호화 장치는 차분움직임벡터의 해상도를 지시하는 정보로서 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 video decoding device can 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 at 1/4 pixel resolution, and the value of mvd_resolution_flag is set to "10". When decoded, the differential motion vector can be 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 컴포넌트에 대하여 동일한 차분움직임벡터의 해상도를 결정하여 영상 복호화 장치로 시그널링될 수 있다.Resolution information may be signaled to the video decoding device for each of the x and y components of the differential motion vector, or may be signaled to the video decoding device by determining the resolution of the same differential motion vector for the x and y components.

실시예 3Example 3

본 실시예에서는 복수의 움직임벡터 해상도 중에서 하나의 해상도를 적응적으로 선택하는 방법에 관한 것이다. 예를 들어, 디폴트 해상도가 1/4 픽셀 해상도로 정의되고, 대체 해상도들은 1 픽셀 해상도 및 4 픽셀 해상도로 정의된다.This embodiment relates to a method of adaptively selecting one resolution from a plurality of motion vector resolutions. For example, the default resolution is defined as 1/4 pixel resolution, and alternative 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 at any one of 1/4 pixel resolution, 1 pixel resolution, or 4 pixel resolution. Indicates syntax elements for representing and the number of bits required.

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_mvd_minus2abs_mvd_minus2 -- 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)
mvd_sign_flagmvd_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}, 1 pixel resolution was applied to {-15.75, 19.50}, and {-22.50, 34.25 , -43.75}, 4 pixel resolution was applied. 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 this embodiment, the value to be encoded corresponding to the differential motion vector is calculated using the same method for all plural resolutions. The formula for calculating the differential motion vector index ( mvd_index ), which is the value to be encoded corresponding to the differential motion vector, is as shown in Equation 1.

Figure pat00001
Figure pat00001

수학식 1에서 mvd_resolution 은 선택된 해상도, mvd 선택된 해상도로 표현된 차분움직임벡터, mvd_index 는 부호화할 값을 나타낸다.In Equation 1, mvd_resolution represents the selected resolution, mvd represents the differential motion vector expressed at the selected resolution, and mvd_index represents the 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, and when 1 pixel resolution is applied, the absolute value of the differential motion vector is rounded down, rounded, or rounded. Apply this to obtain a differential motion vector (e.g. multiple of 1) expressed at 1 pixel resolution, then divide it by 1 (pixel) to obtain the mvd index. When 4-pixel resolution is applied, apply any of rounding, rounding, or rounding to the absolute value of the differential motion vector to obtain a differential motion vector expressed at 4-pixel resolution (e.g., a multiple of 4), and then divide it into 4 (pixels). ) to obtain the mvd index. Among the mvd index values, the number shown in parentheses represents the differential motion vector value expressed by the absolute value of the differential motion vector at each selected resolution. The number in parentheses below the number of bits required for abs_mvd_minus2 represents the value obtained by subtracting 2 from the mvd index.

실시예 4Example 4

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

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

영상 부호화 장치는 우선, 디폴트 해상도로 현재블록에 대한 차분움직임벡터를 결정한다(S310). 영상 부호화 장치는 결정된 차분움직임벡터의 크기(absolute value)에 따라 복수의 움직임벡터 해상도 중에서 하나 이상의 해상도 후보를 결정한다(S320). 예컨대, 복수의 움직임벡터 해상도는 1/4 픽셀 해상도, 1 픽셀 해상도 및 4 픽셀 해상도를 포함하고, 디폴트 해상도는 1/4 픽셀 해상도일 수 있다.First, the video encoding device determines the differential motion vector for the current block at the default resolution (S310). The video encoding device determines one or more resolution candidates among a plurality of motion vector resolutions according to the size (absolute value) of the determined differential motion vector (S320). For example, the plurality of motion vector resolutions 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 video encoding device can set an offset corresponding to each of a plurality of motion vector resolutions. Here, the offset may be a predetermined default value shared by the video encoding device and the video decoding device, or it may be a value determined by the video encoding device and signaled to the video decoding device as header information such as SPS, PPS, slice header, etc. For example, when using 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution as multiple motion vector resolutions, use "α" as the offset for 1/4 pixel resolution and "β" as the 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 video encoding device may determine one or more resolution candidates among a plurality of motion vector resolutions according to the size (absolute value) of the determined differential motion vector and a predetermined offset value. For example, if the size (absolute value) of the determined differential motion vector is between “α” and “β” or below, 1/4 pixel resolution is determined as a resolution candidate, and if it is over “β” but below “γ”, 1/4 pixel resolution is selected. and 1 pixel resolution are determined as resolution candidates, and if it exceeds “γ”, 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 video encoding device selects a resolution to express the determined differential motion vector from among one or more resolution candidates (S330). At this time, the video encoding device selects a resolution for expressing the differential motion vector determined based on RDO (Rate Distortion Optimization). 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 video encoding device calculates a value to be encoded as the differential motion vector of the current block by applying a function corresponding to the selected resolution to the determined differential motion vector (S340). The video encoding apparatus encodes the value calculated in step S340 as differential motion vector information and encodes resolution information to indicate 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 video encoding device 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 in the selected resolution and the offset corresponding to the selected resolution as a differential motion vector of the current block. Calculate the value to be encoded.

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

Figure pat00002
Figure pat00002

Figure pat00003
Figure pat00003

수학식 2 및 수학식 3에서 mvd_resolution 은 선택된 해상도, mvd_resolution_offset 은 선택된 해상도에 대응하는 오프셋, mvd 는 선택된 해상도로 표현된 차분움직임벡터, mvd_index 는 부호화할 값을 나타낸다.In Equation 2 and Equation 3, mvd_resolution represents the selected resolution, mvd_resolution_offset represents the offset corresponding to the selected resolution, mvd represents the differential motion vector expressed by the selected resolution, and mvd_index represents the 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 video encoding device may calculate a value to be encoded as the differential motion vector of the current block by subtracting the offset corresponding to the selected resolution from the differential motion vector expressed at the selected resolution and dividing the value from which the offset was subtracted by the selected resolution. For example, the default resolution is set to 1/4 pixel resolution, the alternative resolutions are set to 1 pixel resolution and 4 pixel resolution, and the offset values are set to α=0, β=1, and γ=4, and the determined differential motion vector is 8.75. Let's assume it was. If the 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 at 1 pixel resolution, the differential motion vector of the current block is The value to be encoded as a vector is (9-1)/(1) = 8, and when displayed at 4 pixel resolution, the value to be encoded as the differential motion vector of the current block is (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 of rounding, rounding, and rounding to the absolute value of the differential motion vector mentioned in Example 3 to be a multiple of the resolution. . Another example of this is described below 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 this embodiment for the same quarter-pixel mvd as Table 12 described above. In Table 13, 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, β=10, and γ=20. Among the quarter-pixel mvd values, 1/4 pixel resolution was applied to {0, 0.75, -2.25, 10.00}, 1 pixel resolution was applied to {-15.75, 19.50}, and {-22.50, 34.25, -43.75 }, a resolution of 4 pixels was applied. However, 1/4 pixel resolution can 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}. To determine this, the video encoding device selects a resolution to express the differential motion vector determined based on 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)x4(0-0)x4
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_mvd_minus2abs_mvd_minus2 -- 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)
mvd_sign_flagmvd_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는 선택된 해상도, 선택된 해상도로 표현된 차분움직임 벡터, 및 선택된 해상도에 대응하는 오프셋을 이용하여 연산될 수 있다.The quarter-pixel mvd in Table 13 represents the differential motion vector for the current block determined at the default resolution, and mvd index represents the differential motion vector index, which is a value to be encoded as differential motion vector information of the current block. The mvd index can be calculated using the 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, the method of expressing the differential motion vector (hereinafter quarter-pixel mvd) determined at the default resolution at the selected resolution is as follows. If 1/4 pixel resolution is selected, the absolute value of the quarter-pixel mvd is maintained as is, and if 1 pixel resolution is selected, either rounding, rounding, or rounding is applied to the absolute value of the quarter-pixel mvd to a multiple of 1. The differential motion vector is expressed with the result obtained so that . Meanwhile, when 4 pixel resolution is selected, the differential motion vector is expressed as a result obtained by applying one of rounding, rounding, or rounding to the absolute value of quarter-pixel mvd so that it is a multiple of 4.

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 can be calculated by subtracting the offset corresponding to the selected resolution from the differential motion vector expressed at the selected resolution and dividing the offset-subtracted value by the selected resolution, as shown in Equation 2. For example, when quarter-pixel mvd "-22.50" is expressed at 4-pixel resolution, the offset corresponding to 4-pixel resolution is from the absolute value "24" of the differential motion vector (four-pixel mvd) expressed at 4-pixel resolution. (γ) By subtracting “20” to obtain the offset-subtracted value “4”, and dividing this by 4, which is the selected resolution, the mvd index with the value “1” is calculated. The mvd index calculation process for the remaining cases is described in parentheses under the mvd index value in Table 13.

표 13과 전술한 실시예 3에서의 표 12를 비교하면, 1 픽셀 해상도 및 4 픽셀 해상도가 적용되는 차분움직임벡터 값들 전부에 대하여 계산된 비트수가 실시예 3에 따라 계산된 비트수보다 절감된 것을 확인할 수 있다.Comparing Table 13 with Table 12 in Example 3, 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. You can check it.

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

실시예 5Example 5

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

실시예에 따른 영상 부호화 장치에도 도 3을 참조하여 설명한 일부 단계가 동일하게 적용된다. 다만, 단계 S320의 해상도 후보 결정방법과 단계 S340의 현재블록의 차분움직임벡터로서 부호화할 값을 연산하는 방법에 차이가 있다.Some steps described with reference to FIG. 3 are equally applied to the video encoding device according to the embodiment. However, there is a difference in 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 an image encoding device to select one or more resolution candidates from a plurality of motion vector resolutions according to the size (absolute value) of the differential motion vector determined as the default resolution will be described. If the value of the differential motion vector for the current block determined at the default resolution is a multiple of the alternative resolution, it may be advantageous in terms of bit quantity to express the differential motion vector at the alternative resolution rather than the default resolution. In this embodiment, if the determined differential motion vector size (absolute value) is a multiple of the first alternative resolution, the first alternative resolution is determined as a resolution candidate, and if it is a multiple of the second alternative resolution, the second alternative resolution is determined as the resolution candidate. And, if it is not a multiple of the first and second alternative resolutions, 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 example above. In a general case, the first alternative resolution may mean the resolution of the largest value among a plurality of alternative resolutions. That is, the first alternative resolution, the second alternative resolution, the third alternative resolution, etc. may be designated in order of 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 1/4 pixel resolution, 1 pixel resolution and 4 pixel resolution, the default resolution is 1/4 pixel resolution, the first alternate resolution is 4 pixel resolution and the second alternate resolution is. may be 1 pixel resolution. The size (absolute value) of the differential motion vector determined as the default resolution is a multiple of the first alternative resolution: 4, 8, 12,... In this case, a 4-pixel resolution is determined as a resolution candidate, and the size (absolute value) of the differential motion vector determined as the default resolution is 1, 2, 3, 5, 6,... which are multiples of the second alternative resolution. In this case, 1 pixel resolution is determined as a resolution candidate, and for other differential motion vector sizes (absolute values), the default resolution, first alternative resolution, and second alternative resolution are determined as resolution candidates. in other words. If the size of the determined differential motion vector is a multiple of 4, it is better to express it at the first alternative resolution of 4 pixels rather than at the default resolution of 1/4 pixel, using the fewest bits without losing the size of the determined differential motion vector. It becomes a way to express it.

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

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

mvdmvd
index (Q)index (Q)
Quarter-pixelQuarter-pixels
mvdmvd
mvdmvd
index (O)index (O)
One-pixelOne-pixel
mvdmvd
mvdmvd
index (F)index (F)
Four-pixelFour-pixels
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"가 부여된다. 여기서, 차분움직임벡터 인덱스는 결정된 차분움직임벡터에 대응하는 부호화할 값이다. 다시 말해, 차분움직임벡터 인덱스는 차분움직임벡터 정보로서 부호화되는 값이다.The differential motion vector sizes belonging to 1/4 pixel resolution are given an index (Q), the differential motion vector sizes belonging to 1 pixel resolution are given an index (O), and the differential motion vector sizes belonging to 4 pixel resolution are given an index (Q). is given an index (F). Index (Q) starts from 0, and index (O) and index (F) start from 1. According to the index assignment method in Table 1 described above, an index of "5" is assigned to the size of the differential motion vector determined at the default resolution with a value of "1.25", but according to the present embodiment, an index of "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 video encoding device calculates a value to be encoded as the 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 video encoding device expresses the differential motion vector size (absolute value) at the selected resolution and determines an index to be assigned to the differential motion vector size expressed at the selected resolution. The determined index becomes the value to be encoded as the differential motion vector of the current block.

각각의 차분움직임벡터 인덱스를 구하는 공식은 수학식 4 내지 수학식 6과 같다.The formula for calculating each differential motion vector index is as shown in Equation 4 to Equation 6.

Figure pat00004
Figure pat00004

Figure pat00005
Figure pat00005

Figure pat00006
Figure pat00006

여기서, int_value는 결정된 차분움직임벡터의 값의 정수 부분, point_value는 소수 부분을 의미한다. 그리고 는 바닥 함수(floor function)를 나타내고, %는 나머지 연산자(modulus operator)를 나타낸다.Here, int_value means the integer part of the value of the determined differential motion vector, and point_value means the decimal part. and represents the floor function, and % represents the modulus operator.

표 14에 기재된 "Quarter-pixel mvd", "One-pixel mvd" 및 "Four-pixel mvd"는 선택되는 해상도를 나타내는 것이고, 해당 열에 나열된 차분움직임벡터 크기들은 모두 디폴트 해상도(1/4 픽셀 해상도)로 표현된 값들이다.“Quarter-pixel mvd”, “One-pixel mvd”, and “Four-pixel mvd” listed 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). These are the 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 mvds. Table 16 shows the number of bits calculated according to this embodiment by selecting the same resolution for the same quarter-pixel mvd as 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_mvd_minus2abs_mvd_minus2 -- 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)
mvd_sign_flagmvd_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_mvd_minus2abs_mvd_minus2 -- 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)
mvd_sign_flagmvd_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 mvds larger than 40", 4 pixel resolution was arbitrarily applied, and for other quarter-pixel mvds, 1/4 pixel resolution was applied. Comparing Table 16 and Table 15, it can be seen that some of the number of bits required to encode the differential motion vector index (mvd index) value assigned according to the index assigning method according to the present embodiment has been reduced compared to Embodiment 3. there is. Table 17 shows the results of a brief comparison of the mvd index of Examples 3 and 5 and the total number of bits for expressing the mvd index for the same quarter-pixel mvd.

quarter-pixelquarter-pixel
mvdmvd
실시 예 3Example 3 실시 예 5Example 5 DifferenceDifference
mvd indexmvd index Total bitsTotal bits mvd indexmvd 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를 표현하기 위한 비트수가 적어지는 것을 확인할 수 있다.Looking at Table 17, it can be seen that 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, the number of bits for expressing the mvd index decreases. .

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

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

복호화부(410)는 영상 부호화 장치로부터 수신한 비트스트림을 복호화하여 블록분할과 관련된 정보를 추출하여 복호화하고자 하는 현재블록을 결정하고, 현재블록을 복원하기 위해 필요한 예측정보와 잔차신호에 대한 정보 등을 추출한다. The decoder 410 decodes the bitstream received from the video encoding device, extracts information related to block division, determines the current block to be decoded, and provides prediction information and residual signal information necessary to restore the current block. 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 the SPS (Sequence Parameter Set) or PPS (Picture Parameter Set), determines the size of the CTU, and divides the picture into CTUs of the determined size. Then, the CTU is determined as the highest layer of the tree structure, that is, the root node, and the CTU is divided using the tree structure by extracting the division information about the CTU. For example, when dividing a CTU using the QTBT structure, first extract the first flag (QT_split_flag) related to the division of the QT and split each node into four nodes of the lower layer. And, for the node corresponding to the leaf node of the QT, the second flag (BT_split_flag) and split type information related to the split of the BT are extracted and the leaf node is split into a BT structure.

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

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

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

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

역양자화부(420)는 양자화된 변환계수들을 역양자화하고, 역변환부(430)는 역양자화된 변환계수들을 주파수 도메인으로부터 공간 도메인으로 역변환하여 잔차신호들을 복원함으로써 현재블록에 대한 잔차블록을 생성한다.The inverse quantization unit 420 inversely quantizes the quantized transform coefficients, and the inverse transformation unit 430 inversely transforms the inverse quantized transform coefficients from the frequency domain to the spatial domain to restore the residual signals, thereby generating 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 among a plurality of intra prediction modes from the syntax elements for the intra prediction mode extracted from the decoder 410, and determines the intra prediction mode of the current block according to the intra prediction mode. Use these to predict the current block.

인터 예측부(444)는 복호화부(410)로부터 추출된 인터 예측 모드에 대한 신택스 요소를 이용하여 현재블록의 움직임정보를 결정하고, 결정된 움직임정보를 이용하여 현재블록을 예측한다.The inter prediction unit 444 determines motion information of the current block using syntax elements 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 the mode information in the 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 device. Then, one merge candidate is selected from among the merge candidates in the merge list using the merge index information transmitted from the decoder 410. Then, the motion information of the selected merge candidate, that is, the motion vector and reference picture of the merge candidate, are 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 the motion vectors of neighboring blocks of the current block, and uses the predicted motion vector candidates to predict the current block. Determine the predicted motion vector for the motion vector of . The method by which the inter prediction unit 444 derives the predicted motion vector candidates is the same as the method by which the inter prediction unit 424 of the video encoding device derives the predicted motion vector candidates. If the video encoding device uses one candidate among a plurality of predicted motion vector candidates as the predicted motion vector of the current block, the syntax element for the motion information includes predicted motion vector identification information. Therefore, in this case, the inter prediction unit 444 may select the candidate indicated by the prediction motion vector identification information among the prediction motion vector candidates as the prediction motion vector. However, if the video encoding device determines the predicted motion vector using a predefined function for a 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 video encoding device. there is. When the predicted motion vector of the current block is determined, the inter prediction unit 444 adds the predicted motion vector and the differential motion vector delivered from the decoder 410 to determine the motion vector of the current block. Then, the reference picture referenced by the motion vector of the current block is determined using information about the reference picture transmitted from the decoder 410.

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

가산기(450)는 역변환부(430)로부터 출력되는 잔차블록과 인터 예측부(444) 또는 인트라 예측부(442)로부터 출력되는 예측블록을 가산하여 현재 블록을 복원한다. 복원된 현재 블록 내의 픽셀들은 이후에 복호화할 블록을 인트라 예측할 때의 참조픽셀로서 활용된다.The adder 450 restores 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 intra prediction unit 442. Pixels in the restored 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 boundaries between restored blocks to remove blocking artifacts that occur due to block-level decoding and stores them in the memory 470. When all blocks in one picture are reconstructed, the reconstructed picture is later used as a reference picture for inter prediction of blocks in the picture to be decoded.

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

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

영상 복호화 장치는 차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도 중에서 하나의 해상도를 선택한다(S520). 복수의 움직임벡터 해상도는 기 정의될 수 있으며, 디폴트 해상도 및 디폴트 해상도를 대체할 다른 해상도(즉, 대체 해상도)들이 포함될 수 있다. 여기서, 디폴트 해상도 및 대체 해상도들은 영상 부호화 장치와 영상 복호화 장치가 공유하는 기 결정된 특정 움직임벡터 해상도일 수 있고, 또는 영상 부호화 장치가 상위 레벨 영상 영역(예: 영상 시퀀스, 픽처, 슬라이스, CTU 등)에서 결정하여 영상 복호화 장치로 시그널링하는 값일 수도 있다.The video decoding device selects one resolution from a plurality of motion vector resolutions by decoding 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 (i.e., alternative resolutions) may be included. Here, the default resolution and alternative resolutions may be a predetermined specific motion vector resolution shared by the video encoding device and the video decoding device, or the video encoding device may use a high-level video area (e.g., video sequence, picture, slice, CTU, etc.) It may be a value determined in and signaled to the video decoding device.

예를 들어, 디폴트 해상도가 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 video decoding device uses information indicating the resolution of the differential motion vector, and the motion vector resolution is 1. /Decodes information indicating whether it is 4 pixel resolution or integer pixel resolution, and if it is integer pixel resolution, information indicating whether it is 1 pixel resolution or 4 pixel resolution. Hereinafter, the syntax element decoded as information indicating whether the motion vector resolution is 1/4 pixel resolution or integer pixel resolution is referred to as first_bin , and the syntax element decoded as information indicating whether the motion vector resolution is 1 pixel resolution or 4 pixel resolution is referred to as second_bin . It is called.

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

다른 예로, 영상 복호화 장치는 차분움직임벡터의 해상도를 지시하는 정보로서 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 video decoding device can 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 at 1/4 pixel resolution, and the value of mvd_resolution_flag is set to "10". When decoded, the differential motion vector can be 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 컴포넌트에 대하여 동일한 차분움직임벡터의 해상도를 복호화될 수 있다.Resolution information may be decoded for each of the x component and y component of the differential motion vector, or the resolution of the same differential motion vector may be decoded for the x component and y component.

영상 복호화 장치는 차분움직임벡터 정보에 의해 결정된 값(즉, 차분움직임벡터 인덱스)에 선택된 해상도에 대응하는 함수를 적용하여 현재블록의 차분움직임벡터를 복원한다(S530).The video decoding device 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 (i.e., differential motion vector index) (S530).

실시예 3에 따른 영상 복호화 장치의 차분움직임벡터 복호화 방법(S530)은 다음과 같다. 영상 복호화 장치는 차분움직임벡터 인덱스에 선택된 해상도를 곱하여 현재블록의 차분움직임벡터를 복원한다.The differential motion vector decoding method (S530) of the video decoding device according to Example 3 is as follows. The video decoding device 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 restoring the differential motion vector of the current block is shown in Equation 7. Equation 7 is a function that can be applied when 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution are selected.

Figure pat00008
Figure pat00008

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

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

예를 들어, 복수의 움직임벡터 해상도로 1/4 픽셀 해상도, 1 픽셀 해상도 및 4 픽셀 해상도를 이용하는 경우, 각 해상도에 대응하는 오프셋 "α”, "β" 및 "γ" (단, α < β < γ임)를 설정할 수 있다.For example, when using 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution as multiple 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 restoring the differential motion vector of the current block is as shown in Equation 8. Equation 8 is a function that applies when 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution are selected.

Figure pat00009
Figure pat00009

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

다른 예로서, 영상 복호화 장치는 차분움직임벡터 인덱스에 선택된 해상도에 대응하는 오프셋을 가산하고, 오프셋이 가산된 값에 선택된 해상도를 곱함으로써, 현재블록의 차분움직임벡터를 복원할 수도 있다. 이 경우에 대한 현재블록의 차분움직임벡터를 복원하기 위한 함수의 일례는 수학식 9와 같다. 수학식 9는 1/4 픽셀 해상도, 1 픽셀 해상도, 및 4 픽셀 해상도가 선택된 경우에 모두 적용되는 함수이다.As another example, the video decoding device 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 added value of the offset by the selected resolution. An example of a function for restoring the differential motion vector of the current block for this case is as shown in Equation 9. Equation 9 is a function that applies when 1/4 pixel resolution, 1 pixel resolution, and 4 pixel resolution are selected.

Figure pat00010
Figure pat00010

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

1/4 픽셀 해상도에 속하는 차분움직임벡터 크기들에는 인덱스(Q)가 부여되고, 1 픽셀 해상도에 속하는 차분움직임벡터 크기들에는 인덱스(O)가 부여되며, 4 픽셀 해상도에 속하는 차분움직임벡터 크기들에는 인덱스(F)가 부여된다. 인덱스(Q)는 0부터 시작하고 인덱스(O) 및 인덱스(F)는 1부터 시작하여 차분움직임벡터 크기 순으로 1씩 증가하는 인덱스가 부여된다. The differential motion vector sizes belonging to 1/4 pixel resolution are given an index (Q), the differential motion vector sizes belonging to 1 pixel resolution are given an index (O), and the differential motion vector sizes belonging to 4 pixel resolution are given an index (Q). is given an index (F). The index (Q) starts from 0, the index (O) and index (F) start from 1, and the indices are given in increasing order of 1 in the order of the size 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"를 현재블록의 차분움직임벡터로 복원한다.This will be explained in detail using the above-mentioned Table 14 as an example. When the video decoding device selects 1/4 pixel resolution and decodes the differential motion vector index (mvd_index) with a value of "1", the differential motion vector size "0.25" corresponding to the index of "1" is added to the current block. Restore to the differential motion vector of . As another example, if the video decoding device selects 1 pixel resolution and decodes the differential motion vector index (mvd_index) with a value of “1”, the differential motion vector size “1” corresponding to the index of the “1” value is currently It is restored as the differential motion vector of the block. As another example, if the video decoding device selects 4 pixel resolution and decodes the differential motion vector index (mvd_index) with a value of "1", the differential motion vector size "4" corresponding to the index of the value of "1" is set to "4". Restore the differential motion vector of the current block.

선택된 해상도 별로 표 14와 같이 부여된 인덱스들을 이용하여 현재블록의 차분움직임벡터를 복원하기 위한 함수는 수학식 10 내지 12와 같다. 수학식 10은 1/4 픽셀 해상도가 선택된 경우에 적용되는 함수이고, 수학식 11은 1 픽셀 해상도가 선택된 경우에 적용되는 함수이며, 수학식 12는 4 픽셀 해상도가 선택된 경우에 적용되는 함수이다. 다만, 수학식 10 내지 12는 예시에 불과하며, 차분움직임벡터의 크기(absolute value)에 차분움직임벡터 인덱스를 부여하는 본 발명의 다양한 실시예들에 따라 달라질 수 있다.The function for restoring the differential motion vector of the current block using the indices given 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 that assign a differential motion vector index to the size (absolute value) of the differential motion vector.

Figure pat00011
Figure pat00011

Figure pat00012
Figure pat00012

Figure pat00013
Figure pat00013

수학식 10 내지 12에서 mvd 는 복원된 현재블록의 차분움직임벡터를 나타내고, mvd_index 는 복호화된 차분움직임벡터 인덱스를 나타낸다. 그리고 는 바닥 함수(floor function)를 나타내고, %는 나머지 연산자(modulus operator)를 나타낸다.In Equations 10 to 12, mvd represents the restored differential motion vector of the current block, and mvd_index represents the decoded differential motion vector index. and represents the floor function, and % represents the modulus operator.

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

영상 복호화 장치는 현재블록의 차분움직임벡터 정보를 복호화하여 차분움직임벡터 인덱스를 결정한다(S610). 영상 복호화 장치는 결정된 차분움직임벡터 인덱스 값이 "0"이 아닌지 판단하여(S612), "0"인 경우에는 현재블록의 차분움직임벡터를 "0"으로 복원한다(S614).The video decoding device decodes the differential motion vector information of the current block and determines the differential motion vector index (S610). The video decoding device determines whether the determined differential motion vector index value is not “0” (S612). If it is “0”, it 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 video decoding device decodes the first resolution information (e.g., first bin ) indicating the resolution of the differential motion vector (S616), and the decoded first resolution information is 1/ Determine whether 4 pixel resolution or integer pixel resolution is indicated (S618). For example, when the first resolution information is decoded as "0" and indicates 1/4 pixel resolution, and when decoded as "1", it indicates integer pixel resolution, the image decoding device may decode the first resolution information as "0". When decoded, 1/4 pixel resolution is selected as the resolution of the differential motion vector (S620). Then, the video decoding device restores the differential motion vector of the current block by applying a function corresponding to 1/4 pixel resolution to the differential motion vector index (S622). The function corresponding to 1/4 pixel resolution is, for example, Equation 8 to Equation 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과 같다.If the first resolution information is decoded as “1” instead of “0” in step S618, the video decoding device decodes the second resolution information (e.g., second bin ) indicating the resolution of the differential motion vector (S624), and 2 Determine whether the resolution information indicates 1 pixel resolution or 4 pixel resolution (S626). For example, when the second resolution information is decoded as “0” and indicates a 1-pixel resolution, and when it is decoded as “1”, it indicates a 4-pixel resolution, the video decoding device decodes the second resolution information as “0”. Then, 1 pixel resolution is selected as the resolution of the differential motion vector (S628). Then, the video decoding device restores the differential motion vector of the current block by applying a function corresponding to 1 pixel resolution to the differential motion vector index (S630). The functions corresponding to 1 pixel resolution are, for example, Equation 8, Equation 9, and Equation 11.

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

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

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

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

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

Claims (11)

현재블록의 움직임벡터를 부호화하는 방법에 있어서,
복수의 움직임벡터 해상도 중에서 상기 현재블록의 차분움직임벡터에 대한 해상도를 선택하는 단계, 상기 복수의 움직임벡터 해상도는 디폴트 해상도 및 적어도 두 개의 대체 해상도들을 포함함;
상기 현재블록의 움직임벡터와 예측움직임벡터 간의 차이인 상기 차분움직임벡터를, 상기 복수의 움직임벡터 해상도 각각에 서로 다르게 할당된 기정의된 복수의 변수 값들 중 상기 선택된 해상도에 대응하는 변수 값에 의해 정의되는 함수를 이용하여, 수정하는 단계;
수정된 차분움직임벡터를 나타내는 정보를 부호화하는 단계; 및
상기 복수의 움직임벡터 해상도 중 상기 선택된 해상도를 나타내기 위한 해상도 정보를 부호화하는 단계를 포함하고,
상기 수정된 차분움직임벡터를 나타내는 정보는,
상기 수정된 차분움직임벡터의 절대값을 나타내기 위한 하나 이상의 신택스 요소들, 및
상기 수정된 차분움직임벡터의 부호(sign)을 나타내기 위한 신택스 요소를 포함하는 것을 특징으로 하는 움직임벡터 부호화 방법.
In the method of encoding the motion vector of the current block,
selecting a resolution for the differential motion vector of the current block from a plurality of motion vector resolutions, the plurality of motion vector resolutions including a default resolution and at least two alternative resolutions;
The differential motion vector, which is the difference between the motion vector of the current block and the predicted motion vector, is defined by a variable value corresponding to the selected resolution among a plurality of predefined variable values differently assigned to each of the plurality of motion vector resolutions. A step of modifying using a function;
Encoding information representing the modified differential motion vector; and
Comprising: encoding resolution information to represent the selected resolution among the plurality of motion vector resolutions,
The information representing the modified differential motion vector is,
One or more syntax elements for representing the absolute value of the modified differential motion vector, and
A motion vector encoding method comprising a syntax element for representing a sign of the modified differential motion vector.
제1항에 있어서,
상기 대체 해상도들은 1 픽셀 해상도 및 4 픽셀 해상도를 포함하고, 상기 디폴트 해상도는 1/4 픽셀 해상도인, 움직임벡터 부호화 방법.
According to paragraph 1,
The motion vector encoding method of claim 1, wherein the alternative resolutions include 1 pixel resolution and 4 pixel resolution, and the default resolution is 1/4 pixel resolution.
제1항에 있어서,
상기 해상도 정보를 부호화하는 단계는,
상기 차분움직임벡터에 대한 해상도가 상기 디폴트 해상도인지를 나타내는 제1 신택스 요소를 부호화하는 단계; 및
상기 차분움직임벡터에 대한 해상도가 상기 디폴트 해상도가 아닌 경우, 상기 대체 해상도들 중 상기 차분움직임벡터에 대한 해상도를 나타내는 제2 신택스 요소를 부호화하는 단계
를 포함하는 움직임벡터 부호화 방법.
According to paragraph 1,
The step of encoding the resolution information is,
encoding a first syntax element indicating whether the resolution for the differential motion vector is the default resolution; and
If the resolution for the differential motion vector is not the default resolution, encoding a second syntax element indicating the resolution for the differential motion vector among the alternative resolutions.
A motion vector encoding method including.
제1항에 있어서,
상기 선택된 해상도로 부호화된 차분움직임벡터의 값은,
상기 차분움직임벡터로부터 상기 선택된 해상도에 대응하는 변수 값을 감산하고,
상기 변수 값이 감산된 값을 상기 선택된 해상도로 나누어 생성되는 것을 특징으로 하는 움직임벡터 부호화 방법.
According to paragraph 1,
The value of the differential motion vector encoded at the selected resolution is,
Subtracting a variable value corresponding to the selected resolution from the differential motion vector,
A motion vector encoding method characterized in that the variable value is generated by dividing the subtracted value by the selected resolution.
제1항에 있어서,
상기 선택된 해상도로 부호화된 차분움직임벡터의 값은,
상기 차분움직임벡터를 상기 선택된 해상도로 나누고,
상기 선택된 해상도로 나누어진 값으로부터 상기 선택된 해상도에 대응하는 변수 값을 감산하여 생성되는 것을 특징으로 하는 움직임벡터 부호화 방법.
According to paragraph 1,
The value of the differential motion vector encoded at the selected resolution is,
Divide the differential motion vector by the selected resolution,
A motion vector encoding method characterized in that it is generated by subtracting a variable value corresponding to the selected resolution from a value divided by the selected resolution.
현재블록의 움직임벡터를 복호화하기 위한 방법에 있어서,
상기 현재블록의 차분움직임벡터 정보를 복호화하여 차분움직임벡터를 결정하는 단계;
상기 차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도 중에서 상기 차분움직임벡터의 해상도를 선택하는 단계, 상기 복수의 움직임벡터 해상도는 디폴트 해상도 및 적어도 두 개의 대체 해상도들을 포함함;
상기 차분움직임벡터를, 상기 복수의 움직임벡터 해상도들에 서로 다르게 각각 할당된 기정의된 복수의 변수 값들 중 상기 선택된 해상도에 대응하는 변수 값에 의해 정의되는 함수를 이용하여, 수정하는 단계; 및
상기 현재블록의 예측움직임벡터를 결정하고, 상기 수정된 차분움직임벡터와 상기 예측움직임벡터를 이용하여 상기 현재블록의 움직임벡터를 복원하는 단계를 포함하고,
상기 차분움직임벡터 정보는,
상기 차분움직임벡터의 절대값을 나타내기 위한 하나 이상의 신택스 요소들, 및
상기 차분움직임벡터의 부호(sign)을 나타내기 위한 신택스 요소를 포함하는 것을 특징으로 하는 움직임벡터 복호화 방법.
In a method for decoding the motion vector of the current block,
Decoding differential motion vector information of the current block to determine a differential motion vector;
selecting a resolution of the differential motion vector from a plurality of motion vector resolutions by decoding resolution information indicating the resolution of the differential motion vector, the plurality of motion vector resolutions including a default resolution and at least two alternative resolutions;
modifying the differential motion vector using a function defined by a variable value corresponding to the selected resolution among a plurality of predefined variable values differently assigned to the plurality of motion vector resolutions; and
Determining a predicted motion vector of the current block, and restoring the motion vector of the current block using the modified differential motion vector and the predicted motion vector,
The differential motion vector information is,
One or more syntax elements for indicating the absolute value of the differential motion vector, and
A motion vector decoding method comprising a syntax element for representing a sign of the differential motion vector.
제6항에 있어서,
상기 대체 해상도들은 1 픽셀 해상도 및 4 픽셀 해상도를 포함하고, 상기 디폴트 해상도는 1/4 픽셀 해상도인 것을 특징으로 하는 움직임벡터 복호화 방법.
According to clause 6,
The alternative resolutions include 1 pixel resolution and 4 pixel resolution, and the default resolution is 1/4 pixel resolution.
제6항에 있어서,
상기 해상도 정보를 복호화하는 것은,
상기 차분움직임벡터에 대한 해상도가 상기 디폴트 해상도인지를 나타내는 제1 신택스 요소를 복호화하는 단계; 및
상기 차분움직임벡터에 대한 해상도가 상기 디폴트 해상도가 아닌 경우, 상기 대체 해상도들 중 상기 차분움직임벡터에 대한 해상도를 나타내는 제2 신택스 요소를 복호화하는 단계
를 포함하는 움직임벡터 복호화 방법.
According to clause 6,
Decoding the resolution information involves:
Decoding a first syntax element indicating whether the resolution for the differential motion vector is the default resolution; and
When the resolution for the differential motion vector is not the default resolution, decoding a second syntax element indicating the resolution for the differential motion vector among the alternative resolutions.
A motion vector decoding method including.
제6항에 있어서,
상기 현재블록의 차분움직임벡터를 복원하는 단계는,
상기 차분움직임벡터 정보에 의해 결정된 값에 상기 선택된 해상도를 곱하는 단계; 및
상기 선택된 해상도로 곱해진 값에 상기 선택된 해상도에 대응하는 변수 값을 가산하여 상기 현재블록의 차분움직임벡터를 복원하는 단계를 포함하는, 움직임벡터 복호화 방법.
According to clause 6,
The step of restoring the differential motion vector of the current block is,
multiplying the value determined by the differential motion vector information by the selected resolution; and
A motion vector decoding method comprising restoring the differential motion vector of the current block by adding a variable value corresponding to the selected resolution to a value multiplied by the selected resolution.
제6항에 있어서,
상기 현재블록의 차분움직임벡터를 복원하는 단계는,
상기 차분움직임벡터 정보에 의해 결정된 값에 상기 선택된 해상도에 대응하는 변수 값을 가산하는 단계; 및
상기 변수 값이 가산된 값에 상기 선택된 해상도를 곱하는 단계를 포함하는, 움직임벡터 복호화 방법.
According to clause 6,
The step of restoring the differential motion vector of the current block is,
adding a variable value corresponding to the selected resolution to a value determined by the differential motion vector information; and
A motion vector decoding method comprising multiplying a value obtained by adding the variable value by the selected resolution.
영상 복호화 방법에 의해 복호화될 비트스트림으로 저장하는, 디코더에 의해 판독 가능한, 기록 매체에 있어서,
상기 복호화 방법은,
현재블록의 차분움직임벡터 정보를 복호화하여 차분움직임벡터를 결정하는 단계;
상기 차분움직임벡터의 해상도를 나타내는 해상도 정보를 복호화함으로써 복수의 움직임벡터 해상도 중에서 상기 차분움직임벡터의 해상도를 선택하는 단계, 상기 복수의 움직임벡터 해상도는 디폴트 해상도 및 적어도 두 개의 대체 해상도들을 포함하는 포함함;
상기 차분움직임벡터를, 상기 복수의 움직임벡터 해상도들에 서로 다르게 각각 할당된 기정의된 복수의 변수 값들 중 상기 선택된 해상도에 대응하는 변수 값에 의해 정의되는 함수를 이용하여, 수정하는 단계; 및
상기 현재블록의 예측움직임벡터를 결정하고, 상기 수정된 차분움직임벡터와 상기 예측움직임벡터를 이용하여 상기 현재블록의 움직임벡터를 복원하는 단계를 포함하고,
상기 차분움직임벡터 정보는,
상기 차분움직임벡터의 절대값을 나타내기 위한 하나 이상의 신택스 요소들, 및
상기 차분움직임벡터의 부호(sign)을 나타내기 위한 신택스 요소를 포함하는 것을 특징으로 하는 기록매체.
A recording medium readable by a decoder, storing a bitstream to be decoded by a video decoding method,
The decoding method is,
Decoding the differential motion vector information of the current block to determine the differential motion vector;
Selecting a resolution of the differential motion vector from a plurality of motion vector resolutions by decoding resolution information indicating the resolution of the differential motion vector, wherein the plurality of motion vector resolutions include a default resolution and at least two alternative resolutions. ;
modifying the differential motion vector using a function defined by a variable value corresponding to the selected resolution among a plurality of predefined variable values differently assigned to the plurality of motion vector resolutions; and
Determining a predicted motion vector of the current block, and restoring the motion vector of the current block using the modified differential motion vector and the predicted motion vector,
The differential motion vector information is,
One or more syntax elements for indicating the absolute value of the differential motion vector, and
A recording medium comprising a syntax element for representing a sign of the differential motion vector.
KR1020240009122A 2017-03-22 2024-01-19 Method and Apparatus for Encoding and Decoding Motion Vector KR20240013891A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR20170036161 2017-03-22
KR1020170036161 2017-03-22
KR1020230188000A KR20240001100A (en) 2017-03-22 2023-12-21 Method and Apparatus for Encoding and Decoding Motion Vector

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020230188000A Division KR20240001100A (en) 2017-03-22 2023-12-21 Method and Apparatus for Encoding and Decoding Motion Vector

Publications (1)

Publication Number Publication Date
KR20240013891A true KR20240013891A (en) 2024-01-30

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
KR1020240009118A KR20240013890A (en) 2017-03-22 2024-01-19 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

Family Applications Before (4)

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
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
JP7460616B2 (en) * 2018-11-08 2024-04-04 オッポ広東移動通信有限公司 VIDEO ENCODING/DECORDING METHOD, VIDEO ENCODER, VIDEO DECODER, VIDEO ENCODING APPARATUS, VIDEO DECODING APPARATUS, AND COMPUTER-READABLE STORAGE MEDIUM
WO2020096425A1 (en) 2018-11-08 2020-05-14 주식회사 엑스리스 Image signal encoding/decoding method, and device for same
WO2020130520A1 (en) * 2018-12-16 2020-06-25 엘지전자 주식회사 Method and apparatus for processing video signal by using inter prediction
US20220078475A1 (en) * 2019-01-01 2022-03-10 Lg Electronics Inc. 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
US20230055497A1 (en) * 2020-01-06 2023-02-23 Hyundai Motor Company Image encoding and decoding based on reference picture having different resolution
WO2021188571A1 (en) * 2020-03-16 2021-09-23 Beijing Dajia Internet Information Technology Co., Ltd. Improvements on merge mode with motion vector differences

Family Cites Families (4)

* 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
CA2839560C (en) * 2011-06-16 2016-10-04 Fraunhofer-Gesellschaft Zur Forderung Der Angewandten Forschung E.V. Entropy coding of motion vector differences
CN107113442B (en) * 2014-10-31 2020-08-07 三星电子株式会社 Method and apparatus for encoding/decoding motion vector
KR102349788B1 (en) * 2015-01-13 2022-01-11 인텔렉추얼디스커버리 주식회사 Method and apparatus for encoding/decoding video

Also Published As

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

Similar Documents

Publication Publication Date Title
KR102618414B1 (en) Method and Apparatus for Encoding and Decoding Motion Vector
US11943476B2 (en) Methods and apparatuses for coding video data with adaptive secondary transform signaling
US9467713B2 (en) Apparatus for decoding a moving picture
US9609352B2 (en) Apparatus for encoding a moving picture
KR20210134554A (en) Apparatus and Method for Video Encoding or Decoding
WO2020211777A1 (en) Methods and apparatuses for coding video data with secondary transform
US9473789B2 (en) Apparatus for decoding a moving picture
KR20180061027A (en) Method and apparatus for encoding/decoding image and recording medium for storing bitstream
KR20130067280A (en) Decoding method of inter coded moving picture
US11838545B2 (en) Prediction method using current picture referencing mode, and video decoding device therefor
US20220182604A1 (en) Video encoding and decoding using intra block copy
US20220353505A1 (en) Method for reconstructing residual blocks of chroma blocks, and video decoding apparatus
US20220353516A1 (en) Method for adaptively setting resolution, and image decoding apparatus
KR20200081186A (en) Method for deriving motion vector of temporal candidate and apparatus using the same

Legal Events

Date Code Title Description
A107 Divisional application of patent