KR102114421B1 - Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block - Google Patents

Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block Download PDF

Info

Publication number
KR102114421B1
KR102114421B1 KR1020190113011A KR20190113011A KR102114421B1 KR 102114421 B1 KR102114421 B1 KR 102114421B1 KR 1020190113011 A KR1020190113011 A KR 1020190113011A KR 20190113011 A KR20190113011 A KR 20190113011A KR 102114421 B1 KR102114421 B1 KR 102114421B1
Authority
KR
South Korea
Prior art keywords
motion vector
current block
block
prediction
coding unit
Prior art date
Application number
KR1020190113011A
Other languages
Korean (ko)
Other versions
KR20190108539A (en
Inventor
이태미
한우진
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Publication of KR20190108539A publication Critical patent/KR20190108539A/en
Application granted granted Critical
Publication of KR102114421B1 publication Critical patent/KR102114421B1/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/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/56Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/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/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Landscapes

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

Abstract

현재 블록 이전에 부호화/복호화된 적어도 하나의 블록의 움직임 벡터에 기초해 현재 블록의 움직임 벡터를 결정하고, 결정된 움직임 벡터에 따른 제1 방향, 제2 방향 및 양방향의 예측 중 하나에 기초해 현재 블록을 예측 부호화/복호화하는 방법 및 장치가 개시된다.The motion vector of the current block is determined based on the motion vector of at least one block encoded / decoded before the current block, and the current block is based on one of first, second, and bi-directional predictions according to the determined motion vector Disclosed is a method and apparatus for predictive encoding / decoding.

Description

이전 블록의 움직임 벡터를 현재 블록의 움직임 벡터로 이용하는 영상 부호화, 복호화 방법 및 장치{Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block}Method and apparatus for encoding / decoding image by using motion vector of previous block as motion vector of current block}

본 발명은 영상을 부호화, 복호화하는 방법 및 장치에 관한 것으로 보다 상세히는 인터 예측에 기초해 영상을 부호화, 복호화하는 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for encoding and decoding an image, and more particularly, to a method and apparatus for encoding and decoding an image based on inter prediction.

MPEG-1, MPEG-2, MPEG-4 H.264/MPEG-4 AVC(Advanced Video coding)와 같은 영상 압축 방식에서는 영상을 부호화하기 위해서 소정 크기의 블록으로 나눈다. 그런 다음, 인터 예측(inter prediction) 또는 인트라 예측(intra prediction)을 이용해 각각의 블록을 예측 부호화한다. In video compression schemes such as MPEG-1, MPEG-2, and MPEG-4 H.264 / MPEG-4 Advanced Video Coding (AVC), the video is divided into blocks of a predetermined size in order to encode it. Then, each block is predictively coded using inter prediction or intra prediction.

인터 예측을 위해 현재 블록과 동일 또는 유사한 블록을 적어도 하나의 참조 프레임에서 검색하여, 움직임을 추정하고, 움직임 추정 결과 생성된 움직임 벡터도 픽셀값과 함께 부호화하여 비트스트림에 삽입한다. For inter prediction, a block identical or similar to the current block is searched in at least one reference frame, motion is estimated, and a motion vector generated as a result of motion estimation is encoded together with a pixel value and inserted into a bitstream.

본 발명이 해결하고자 하는 기술적 과제는 적어도 하나의 이전 블록의 움직임 벡터에 기초해 현재 블록의 움직임 벡터를 결정하고, 결정된 움직임 벡터에 기초해 영상을 부호화, 복호화하는 방법 및 장치를 제공하는데 있고, 상기 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공하는데 있다.Technical problem to be solved by the present invention is to provide a method and apparatus for determining a motion vector of a current block based on a motion vector of at least one previous block, and encoding and decoding an image based on the determined motion vector. Disclosed is a computer readable recording medium recording a program for executing a method.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 현재 블록 이전에 복호화된 적어도 하나의 블록의 움직임 벡터에 기초해 현재 블록의 움직임 벡터를 결정하고, 상기 결정된 움직임 벡터를 이용해 현재 블록을 복호화하는 방법은 제1 방향, 제2 방향 및 양방향 중 상기 현재 블록의 복호화에 이용되는 예측 방향에 대한 정보 및 상기 현재 블록의 픽셀 값들에 대한 정보를 복호화하는 단계; 상기 복호화된 예측 방향에 대한 정보에 기초해 상기 현재 블록의 예측 방향을 결정하고, 상기 결정된 예측 방향의 예측을 수행하기 위한 적어도 하나의 움직임 벡터를 결정하는 단계; 및 상기 결정된 예측 방향의 예측을 위한 적어도 하나의 움직임 벡터 및 상기 복호화된 픽셀 값들에 대한 정보에 기초해 상기 현재 블록을 복원하는 단계를 포함하고, 상기 제1 방향은 상기 현재 픽처로부터 선행 픽처로의 방향이고, 상기 제2 방향은 상기 현재 픽처로부터 후행 픽처로의 방향인 것을 특징으로 한다.A motion vector of a current block is determined based on a motion vector of at least one block decoded before the current block according to an embodiment of the present invention for solving the above technical problem, and the current block is decoded using the determined motion vector The method comprises: decoding information about a prediction direction used for decoding of the current block and information about pixel values of the current block among the first direction, the second direction, and both directions; Determining a prediction direction of the current block based on information on the decoded prediction direction, and determining at least one motion vector for performing prediction of the determined prediction direction; And restoring the current block based on at least one motion vector for prediction of the determined prediction direction and information on the decoded pixel values, wherein the first direction is from the current picture to a preceding picture. Direction, and the second direction is a direction from the current picture to a succeeding picture.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 현재 블록 이전에 부호화된 적어도 하나의 블록의 움직임 벡터에 기초해 현재 블록의 움직임 벡터를 결정하고, 상기 결정된 움직임 벡터를 이용해 현재 블록을 부호화하는 방법은 상기 현재 블록 이전에 부호화된 적어도 하나의 블록의 움직임 벡터에 기초해 현재 블록의 제1 방향의 움직임 벡터 및 제2 방향의 움직임 벡터를 결정하는 단계; 상기 제1 방향의 움직임 벡터 및 제2 방향의 움직임 벡터에 기초한 상기 제1 방향의 예측, 상기 제2 방향의 예측 및 양방향의 예측 중 상기 현재 블록의 부호화에 이용되는 예측을 결정하는 단계; 및 상기 예측 방향에 대한 정보 및 상기 결정된 예측에 기초해 생성된 상기 현재 블록의 픽셀 값들에 대한 정보를 부호화하는 단계를 포함하고, 상기 제1 방향은 상기 현재 픽처로부터 선행 픽처로의 방향이고, 상기 제2 방향은 상기 현재 픽처로부터 후행 픽처로의 방향인 것을 특징으로 한다.In order to solve the above technical problem, a motion vector of a current block is determined based on a motion vector of at least one block encoded before the current block according to an embodiment of the present invention, and the current block is encoded using the determined motion vector The method includes determining a motion vector in a first direction and a motion vector in a second direction of the current block based on a motion vector of at least one block encoded before the current block; Determining a prediction used for encoding the current block among prediction in the first direction, prediction in the second direction, and prediction in both directions based on the motion vector in the first direction and the motion vector in the second direction; And encoding information on the prediction direction and information on pixel values of the current block generated based on the determined prediction, wherein the first direction is a direction from the current picture to a preceding picture, and the The second direction is characterized in that it is a direction from the current picture to the trailing picture.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 현재 블록 이전에 복호화된 적어도 하나의 블록의 움직임 벡터에 기초해 현재 블록의 움직임 벡터를 결정하고, 상기 결정된 움직임 벡터를 이용해 현재 블록을 복호화하는 장치는 제1 방향, 제2 방향 및 양방향 중 상기 현재 블록의 복호화에 이용되는 예측 방향에 대한 정보 및 상기 현재 블록의 픽셀 값들에 대한 정보를 복호화하는 복호화부; 상기 복호화된 예측 방향에 대한 정보에 기초해 상기 현재 블록의 예측 방향을 결정하고, 상기 결정된 예측 방향의 예측을 수행하기 위한 적어도 하나의 움직임 벡터를 결정하는 움직임벡터결정부; 및 상기 결정된 예측 방향의 예측을 위한 적어도 하나의 움직임 벡터 및 상기 복호화된 픽셀 값들에 대한 정보에 기초해 상기 현재 블록을 복원하는 복원부를 포함하고, 상기 제1 방향은 상기 현재 픽처로부터 선행 픽처로의 방향이고, 상기 제2 방향은 상기 현재 픽처로부터 후행 픽처로의 방향인 것을 특징으로 한다.A motion vector of a current block is determined based on a motion vector of at least one block decoded before the current block according to an embodiment of the present invention for solving the above technical problem, and the current block is decoded using the determined motion vector The apparatus includes: a decoding unit decoding information on a prediction direction used for decoding of the current block and information on pixel values of the current block among first, second, and bidirectional directions; A motion vector determiner determining a prediction direction of the current block based on information on the decoded prediction direction and determining at least one motion vector for performing prediction of the determined prediction direction; And a reconstruction unit reconstructing the current block based on at least one motion vector for prediction of the determined prediction direction and information on the decoded pixel values, wherein the first direction is from the current picture to a preceding picture. Direction, and the second direction is a direction from the current picture to a succeeding picture.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 현재 블록 이전에 부호화된 적어도 하나의 블록의 움직임 벡터에 기초해 현재 블록의 움직임 벡터를 결정하고, 상기 결정된 움직임 벡터를 이용해 현재 블록을 부호화하는 장치는 상기 현재 블록 이전에 부호화된 적어도 하나의 블록의 움직임 벡터에 기초해 현재 블록의 제1 방향의 움직임 벡터 및 제2 방향의 움직임 벡터를 결정하는 움직임벡터결정부; 상기 제1 방향의 움직임 벡터 및 제2 방향의 움직임 벡터에 기초한 상기 제1 방향의 예측, 상기 제2 방향의 예측 및 양방향의 예측 중 상기 현재 블록의 부호화에 이용되는 예측을 결정하고, 상기 예측 방향에 대한 정보 및 상기 결정된 예측에 기초해 생성된 상기 현재 블록의 픽셀 값들에 대한 정보를 부호화하는 부호화부를 포함하고, 상기 제1 방향은 상기 현재 픽처로부터 선행 픽처로의 방향이고, 상기 제2 방향은 상기 현재 픽처로부터 상기 후행 픽처로의 방향인 것을 특징으로 한다.In order to solve the above technical problem, a motion vector of a current block is determined based on a motion vector of at least one block encoded before the current block according to an embodiment of the present invention, and the current block is encoded using the determined motion vector The apparatus comprises: a motion vector determiner configured to determine a motion vector in a first direction and a motion vector in a second direction of a current block based on a motion vector of at least one block encoded before the current block; The prediction used for encoding the current block among the prediction in the first direction, the prediction in the second direction, and the prediction in both directions based on the motion vector in the first direction and the motion vector in the second direction is determined, and the prediction direction And an encoder for encoding information on pixel values of the current block generated based on the determined information and the determined prediction, wherein the first direction is a direction from the current picture to a preceding picture, and the second direction is It is characterized in that it is a direction from the current picture to the succeeding picture.

상기 기술적 과제를 해결하기 위해 본 발명은 상기 영상 부호화 방법 및/또는 영상 복호화 방법을 실행하기 위한 컴퓨터로 읽을 수 있는 기록 매체를 제공한다.In order to solve the above technical problem, the present invention provides a computer-readable recording medium for executing the image encoding method and / or image decoding method.

본 발명에 따르면, 적어도 하나의 이전 블록의 움직임 벡터를 현재 블록의 움직임 벡터로 이용해 부호화하는 부호화 모드의 발생 확률이 높아지고, 예측의 정확도도 높아져 보다 높은 압축율로 영상을 부호화, 복호화할 수 있다.According to the present invention, an occurrence probability of an encoding mode in which a motion vector of at least one previous block is encoded as a motion vector of a current block is increased, and accuracy of prediction is also increased, so that an image can be encoded and decoded at a higher compression rate.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치를 도시한다.
도 2는 본 발명의 일 실시예에 따른 영상 복호화 장치를 도시한다.
도 3은 본 발명의 일 실시예에 따른 계층적 부호화 단위를 도시한다.
도 4는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부를 도시한다.
도 5는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부를 도시한다.
도 6은 본 발명의 일 실시예에 따른 최대 부호화 단위, 서브 부호화 단위 및 예측 단위를 도시한다.
도 7은 본 발명의 일 실시예에 따른, 부호화 단위 및 변환 단위를 도시한다.
도 8a 및 8b는 본 발명의 일 실시예에 따른, 부호화 단위, 예측 단위 및 주파수 변환 단위의 분할 형태를 도시한다.
도 9는 본 발명의 또 다른 실시예에 따른 영상 부호화 장치를 도시한다.
도 10은 본 발명의 일 실시예에 따른 양방향 예측 픽처에 포함된 블록을 예측하는 방법을 도시한다.
도 11a 및 11b는 본 발명의 일 실시예에 따른 현재 블록의 움직임 벡터를 이전에 부호화된 블록의 움직임 벡터에 기초해 결정하는 방법을 도시한다.
도 12a 및 12b는 본 발명의 또 다른 실시예에 따른 현재 블록의 움직임 벡터를 이전에 부호화된 블록의 움직임 벡터에 기초해 결정하는 방법을 도시한다.
도 13a 및 13b는 본 발명의 또 다른 실시예에 따른 현재 블록의 움직임 벡터를 이전에 부호화된 블록의 움직임 벡터에 기초해 결정하는 방법을 도시한다.
도 14는 본 발명의 또 다른 실시예에 따른 영상 복호화 장치를 도시한다.
도 15는 본 발명의 일 실시예에 따른 영상 부호화 방법을 설명하기 위한 흐름도이다.
도 16은 본 발명의 일 실시예에 따른 영상 복호화 방법을 설명하기 위한 흐름도이다.
1 shows an image encoding apparatus according to an embodiment of the present invention.
2 shows an image decoding apparatus according to an embodiment of the present invention.
3 shows a hierarchical coding unit according to an embodiment of the present invention.
4 illustrates an image encoder based on coding units according to an embodiment of the present invention.
5 illustrates an image decoder based on coding units according to an embodiment of the present invention.
6 illustrates a maximum coding unit, a sub coding unit, and a prediction unit according to an embodiment of the present invention.
7 illustrates a coding unit and a transformation unit, according to an embodiment of the present invention.
8A and 8B illustrate a split form of a coding unit, a prediction unit, and a frequency transform unit, according to an embodiment of the present invention.
9 shows a video encoding apparatus according to another embodiment of the present invention.
10 illustrates a method of predicting a block included in a bidirectional predictive picture according to an embodiment of the present invention.
11A and 11B illustrate a method of determining a motion vector of a current block based on a motion vector of a previously coded block according to an embodiment of the present invention.
12A and 12B illustrate a method of determining a motion vector of a current block based on a motion vector of a previously coded block according to another embodiment of the present invention.
13A and 13B illustrate a method of determining a motion vector of a current block based on a motion vector of a previously coded block according to another embodiment of the present invention.
14 shows a video decoding apparatus according to another embodiment of the present invention.
15 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.
16 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.

이하에서는 도면을 참조하여 본 발명의 실시예들을 상세히 설명한다. Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

도 1 은 본 발명의 일 실시예에 따른 영상 부호화 장치를 도시한다.1 shows an image encoding apparatus according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 일 실시예에 따른 영상 부호화 장치(100)는 최대 부호화 단위 분할부(110), 부호화 심도 결정부(120), 영상 데이터 부호화부(130) 및 부호화 정보 부호화부(140)를 포함한다.Referring to FIG. 1, an image encoding apparatus 100 according to an embodiment of the present invention includes a maximum coding unit splitter 110, an encoding depth determining unit 120, an image data encoding unit 130, and an encoding information encoding unit. 140.

최대 부호화 단위 분할부(110)는 최대 크기의 부호화 단위인 최대 부호화 단위에 기반하여 현재 프레임 또는 현재 슬라이스를 분할할 수 있다. 현재 프레임 또는 현재 슬라이스를 적어도 하나의 최대 부호화 단위로 분할할 수 있다. The largest coding unit splitter 110 may split the current frame or the current slice based on the largest coding unit that is the largest coding unit. The current frame or current slice may be divided into at least one largest coding unit.

본 발명의 일 실시예에 따르면, 최대 부호화 단위 및 심도를 이용해 부호화 단위가 표현될 수 있다. 전술한 바와 같이 최대 부호화 단위는 현재 프레임의 부호화 단위 중 크기가 가장 큰 부호화 단위를 나타내며, 심도는 부호화 단위가 계층적으로 축소된 정도를 나타낸다. 심도가 커지면서, 부호화 단위는 최대 부호화 단위로부터 최소 부호화 단위까지 축소될 수 있으며, 최대 부호화 단위의 심도는 최소 심도로 정의되고, 최소 부호화 단위의 심도는 최대 심도로 정의될 수 있다. 최대 부호화 단위는 심도가 커짐에 따라 심도별 부호화 단위의 크기는 감소하므로, k 심도의 서브 부호화 단위는 k보다 큰 심도의 복수 개의 서브 부호화 단위를 포함할 수 있다.According to an embodiment of the present invention, a coding unit may be expressed using a maximum coding unit and depth. As described above, the largest coding unit represents the largest coding unit among the coding units of the current frame, and the depth indicates the degree to which the coding unit is hierarchically reduced. As the depth increases, a coding unit may be reduced from a maximum coding unit to a minimum coding unit, a depth of the maximum coding unit may be defined as a minimum depth, and a depth of the minimum coding unit may be defined as a maximum depth. Since the maximum coding unit decreases in size according to depths as the depth increases, a sub-coding unit of a k depth may include a plurality of sub-coding units having a depth greater than k.

부호화되는 프레임의 크기가 커짐에 따라, 더 큰 단위로 영상을 부호화하면 더 높은 영상 압축률로 영상을 부호화할 수 있다. 그러나, 부호화 단위를 크게 하고, 그 크기를 고정시켜버리면, 계속해서 변하는 영상의 특성을 반영하여 효율적으로 영상을 부호화할 수 없다. As the size of an encoded frame increases, when an image is encoded in a larger unit, an image may be encoded with a higher image compression rate. However, if the coding unit is enlarged and the size is fixed, it is impossible to efficiently encode the image by reflecting the characteristics of the image that is continuously changing.

예를 들어, 바다 또는 하늘에 대한 평탄한 영역을 부호화할 때에는 부호화 단위를 크게 할수록 압축률이 향상될 수 있으나, 사람들 또는 빌딩에 대한 복잡한 영역을 부호화할 때에는 부호화 단위를 작게 할수록 압축률이 향상된다.For example, when encoding a flat region for the sea or the sky, the larger the coding unit may be, the higher the compression rate may be, but when coding a complex region for people or buildings, the smaller the coding unit, the higher the compression rate.

이를 위해 본 발명의 일 실시예는 프레임 또는 슬라이스마다 상이한 크기의 최대 영상 부호화 단위를 설정하고, 최대 심도를 설정한다. 최대 심도는 부호화 단위가 축소될 수 있는 최대 횟수를 의미하므로, 최대 심도에 따라 최대 영상 부호화 단위에 포함된 최소 부호화 단위 크기를 가변적으로 설정할 수 있게 된다.To this end, an embodiment of the present invention sets a maximum image coding unit having a different size for each frame or slice, and sets a maximum depth. Since the maximum depth means the maximum number of times that a coding unit can be reduced, it is possible to variably set the size of the minimum coding unit included in the maximum video coding unit according to the maximum depth.

부호화 심도 결정부(120)는 최대 심도를 결정한다. 최대 심도는 R-D 코스트(Rate-Distortion Cost) 계산에 기초해 결정될 수 있다. 최대 심도는 프레임 또는 슬라이스마다 상이하게 결정되거나, 각각의 최대 부호화 단위마다 상이하게 결정될 수도 있다. 결정된 최대 심도는 부호화 정보 부호화부(140)로 출력되고, 최대 부호화 단위별 영상 데이터는 영상 데이터 부호화부(130)로 출력된다. The coded depth determining unit 120 determines a maximum depth. The maximum depth may be determined based on R-D cost (Rate-Distortion Cost) calculation. The maximum depth may be determined differently for each frame or slice, or may be determined differently for each largest coding unit. The determined maximum depth is output to the encoding information encoder 140, and image data for each largest coding unit is output to the image data encoder 130.

최대 심도는 최대 부호화 단위에 포함될 수 있는 가장 작은 크기의 부호화 단위 즉, 최소 부호화 단위를 의미한다. 다시 말해, 최대 부호화 단위는 상이한 심도에 따라 상이한 크기의 서브 부호화 단위로 분할될 수 있다. 도 8a 및 8b를 참조하여 상세히 후술한다. 또한, 최대 부호화 단위에 포함된 상이한 크기의 서브 부호화 단위들은 상이한 크기의 처리 단위에 기초해 예측 또는 변환될 수 있다. 변환은 공간 도메인의 픽셀 값들을 주파수 도메인의 계수들로 변환으로서 이산 코사인 변환(discrete cosine transform) 또는 KLT(Karhunen Loever Transform)일 수 있다.The maximum depth means the smallest coding unit that can be included in the largest coding unit, that is, the smallest coding unit. In other words, the largest coding unit may be divided into sub-coding units of different sizes according to different depths. This will be described later in detail with reference to FIGS. 8A and 8B. Also, sub-coding units of different sizes included in the largest coding unit may be predicted or transformed based on processing units of different sizes. The transform may be a discrete cosine transform (KLT) or a Karhunen Loever Transform (KLT) as transforming pixel values in the spatial domain into coefficients in the frequency domain.

다시 말해, 영상 부호화 장치(100)는 영상 부호화를 위한 복수의 처리 단계들을 다양한 크기 및 다양한 형태의 처리 단위에 기초해 수행할 수 있다. 영상 데이터의 부호화를 위해서는 예측, 변환, 엔트로피 부호화 등의 처리 단계를 거치는데, 모든 단계에 걸쳐서 동일한 크기의 처리 단위가 이용될 수도 있으며, 단계별로 상이한 크기의 처리 단위를 이용할 수 있다.In other words, the image encoding apparatus 100 may perform a plurality of processing steps for image encoding based on various sizes and various types of processing units. In order to encode the image data, processing steps such as prediction, transformation, and entropy encoding are performed, and processing units of the same size may be used in all stages, and processing units of different sizes may be used in steps.

예를 들어 영상 부호화 장치(100)는 소정의 부호화 단위를 예측하기 위해, 부호화 단위와 다른 처리 단위를 선택할 수 있다. For example, the image encoding apparatus 100 may select a processing unit different from the coding unit in order to predict a predetermined coding unit.

부호화 단위의 크기가 2Nx2N(단, N은 양의 정수)인 경우, 예측을 위한 처리 단위는 2Nx2N, 2NxN, Nx2N, NxN 등일 수 있다. 다시 말해, 부호화 단위의 높이 또는 너비 중 적어도 하나를 반분하는 형태의 처리 단위를 기반으로 움직임 예측이 수행될 수도 있다. 이하, 예측의 기초가 되는 처리 단위는 '예측 단위'라 한다.When the size of the coding unit is 2Nx2N (where N is a positive integer), the processing unit for prediction may be 2Nx2N, 2NxN, Nx2N, NxN, or the like. In other words, motion prediction may be performed based on a processing unit in which at least one of the height or width of the coding unit is halved. Hereinafter, a processing unit that is the basis of prediction is referred to as a 'prediction unit'.

예측 모드는 인트라 모드, 인터 모드 및 스킵 모드 중 적어도 하나일 수 있으며, 특정 예측 모드는 특정 크기 또는 형태의 예측 단위에 대해서만 수행될 수 있다. 예를 들어, 인트라 모드는 정방형인 2Nx2N, NxN 크기의 예측 단위에 대해서만 수행될 수 있다. 또한, 스킵 모드는 2Nx2N 크기의 예측 단위에 대해서만 수행될 수 있다. 부호화 단위 내부에 복수의 예측 단위가 있다면, 각각의 예측 단위에 대해 예측을 수행하여 부호화 오차가 가장 작은 예측 모드가 선택될 수 있다.The prediction mode may be at least one of an intra mode, an inter mode, and a skip mode, and a specific prediction mode may be performed only on prediction units having a specific size or shape. For example, the intra mode can be performed only on a prediction unit having a square size of 2Nx2N and NxN. In addition, the skip mode can be performed only on prediction units having a size of 2Nx2N. If there are a plurality of prediction units in the coding unit, prediction may be performed on each prediction unit to select a prediction mode having the smallest coding error.

또한, 영상 부호화 장치(100)는 부호화 단위와 다른 크기의 처리 단위에 기초해 영상 데이터를 변환할 수 있다. 부호화 단위의 변환을 위해서 부호화 단위보다 작거나 같은 크기의 데이터 단위를 기반으로 변환이 수행될 수 있다. 이하, 변환의 기초가 되는 처리 단위를 '변환 단위'라 한다.Also, the image encoding apparatus 100 may convert image data based on a processing unit having a different size from the encoding unit. In order to transform the coding unit, transformation may be performed based on a data unit having a size equal to or smaller than the coding unit. Hereinafter, the processing unit that is the basis of the conversion is referred to as a 'conversion unit'.

부호화 심도 결정부(120)는 라그랑지 곱(Lagrangian Multiplier) 기반의 율-왜곡 최적화 기법(Rate-Distortion Optimization)을 이용해 최대 부호화 단위에 포함된 서브 부호화 단위들을 결정할 수 있다. 다시 말해, 최대 부호화 단위가 어떠한 형태의 복수의 서브 부호화 단위로 분할되는지 결정할 수 있는데, 여기서 복수의 서브 부호화 단위는 심도에 따라 크기가 상이하다. 그런 다음, 영상 데이터 부호화부(130)는 부호화 심도 결정부(120)에서 결정된 분할 형태에 기초해 최대 부호화 단위를 부호화하여 비트스트림을 출력한다. The encoding depth determiner 120 may determine sub-coding units included in the largest coding unit using a Lagrangian Multiplier-based rate-distortion optimization technique. In other words, it is possible to determine what type of maximum coding unit is divided into a plurality of sub-coding units, where the plurality of sub-coding units have different sizes according to depths. Then, the image data encoding unit 130 encodes the largest coding unit based on the division type determined by the encoding depth determination unit 120 and outputs a bitstream.

부호화 정보 부호화부(140)는 부호화 심도 결정부(120)에서 결정된 최대 부호화 단위의 부호화 모드에 대한 정보를 부호화한다. 최대 부호화 단위의 분할 형태에 대한 정보, 최대 심도에 대한 정보 및 심도별 서브 부호화 단위의 부호화 모드에 대한 정보를 부호화하여 비트스트림을 출력한다. 서브 부호화 단위의 부호화 모드에 대한 정보는 서브 부호화 단위의 예측 단위에 대한 정보, 예측 단위별 예측 모드 정보, 서브 부호화 단위의 변환 단위에 대한 정보 등을 포함할 수 있다.The encoding information encoding unit 140 encodes information about an encoding mode of a maximum coding unit determined by the encoding depth determination unit 120. A bitstream is output by encoding information on a split type of a largest coding unit, information on a maximum depth, and information on a coding mode of a sub-coding unit according to depths. Information about a coding mode of a sub coding unit may include information about a prediction unit of a sub coding unit, prediction mode information for each prediction unit, and information about a transformation unit of a sub coding unit.

최대 부호화 단위의 분할 형태에 대한 정보는 각각의 부호화 단위에 대해 분할 여부를 나타내는 정보일 수 있다. 예를 들어, 최대 부호화 단위를 분할하여 부호화하는 경우, 최대 부호화 단위에 대해 분할 여부를 나타내는 정보를 부호화하고, 최대 부호화 단위를 분할하여 생성된 서브 부호화 단위를 다시 분할하여 부호화하는 경우에도, 각각의 서브 부호화 단위에 대해서 분할 여부를 나타내는 정보를 부호화한다. 분할 여부를 나타내는 정보는 분할 여부를 나타내는 플래그 정보일 수 있다.The information on the split type of the largest coding unit may be information indicating whether to split each coding unit. For example, when the maximum coding unit is split and coded, information indicating whether or not the maximum coding unit is split is coded, and sub-coding units generated by splitting the maximum coding unit are split and coded again, respectively. Information indicating whether to split is coded for the sub-coding unit. Information indicating whether to divide or not may be flag information indicating whether to divide.

최대 부호화 단위마다 상이한 크기의 서브 부호화 단위가 존재하고, 각각의 서브 부호화 단위마다 부호화 모드에 관한 정보가 결정되어야 하므로, 하나의 최대 부호화 단위에 대해서는 적어도 하나의 부호화 모드에 관한 정보가 결정될 수 있다. Since sub-coding units having different sizes exist for each largest coding unit, and information about a coding mode must be determined for each sub-coding unit, information about at least one coding mode may be determined for one largest coding unit.

영상 부호화 장치(100)는 심도가 커짐에 따라 최대 부호화 단위를 높이 및 너비를 반분하여 서브 부호화 단위를 생성할 수 있다. 즉, k 심도의 부호화 단위의 크기가 2Nx2N이라면, k+1 심도의 부호화 단위의 크기는 NxN 이다.As the depth increases, the image encoding apparatus 100 may generate a sub-coding unit by dividing the maximum coding unit in half by height and width. That is, if the size of the coding unit of the k depth is 2Nx2N, the size of the coding unit of the k + 1 depth is NxN.

따라서, 일 실시예에 따른 영상 부호화 장치(100)는 영상의 특성을 고려한 최대 부호화 단위의 크기 및 최대 심도를 기반으로, 각각의 최대 부호화 단위마다 최적의 분할 형태를 결정할 수 있다. 영상 특성을 고려하여 가변적으로 최대 부호화 단위의 크기를 조절하고, 상이한 심도의 서브 부호화 단위로 최대 부호화 단위를 분할하여 영상을 부호화함으로써, 다양한 해상도의 영상을 보다 효율적으로 부호화할 수 있다. Accordingly, the image encoding apparatus 100 according to an embodiment may determine an optimal division type for each maximum coding unit based on the size and maximum depth of the maximum coding unit in consideration of the characteristics of the image. It is possible to more efficiently encode images of various resolutions by variably adjusting the size of the largest coding unit in consideration of image characteristics, and splitting the largest coding unit into sub-coding units of different depths to encode the images.

도 2 는 본 발명의 일 실시예에 따른 영상 복호화 장치를 도시한다.2 shows an image decoding apparatus according to an embodiment of the present invention.

도 2를 참조하면, 본 발명의 일 실시예에 따른 영상 복호화 장치(200)는 영상 데이터 획득부(210), 부호화 정보 추출부(220) 및 영상 데이터 복호화부(230)를 포함한다. Referring to FIG. 2, the image decoding apparatus 200 according to an embodiment of the present invention includes an image data acquisition unit 210, an encoding information extraction unit 220, and an image data decoding unit 230.

영상 관련 데이터 획득부(210)는 영상 복호화 장치(200)가 수신한 비트스트림을 파싱하여, 최대 부호화 단위별로 영상 데이터를 획득하여 영상 데이터 복호화부(230)로 출력한다. 영상 데이터 획득부(210)는 현재 프레임 또는 슬라이스에 대한 헤더로부터 현재 프레임 또는 슬라이스의 최대 부호화 단위에 대한 정보를 추출할 수 있다. 다시 말해, 비트스트림을 최대 부호화 단위로 분할하여, 영상 데이터 복호화부(230)가 최대 부호화 단위마다 영상 데이터를 복호화하게 한다.The image-related data acquisition unit 210 parses the bitstream received by the image decoding apparatus 200, acquires image data for each largest coding unit, and outputs the image data to the image data decoding unit 230. The image data acquisition unit 210 may extract information on the maximum coding unit of the current frame or slice from the header for the current frame or slice. In other words, the bitstream is divided into the largest coding unit, and the image data decoder 230 decodes the image data for each largest coding unit.

부호화 정보 추출부(220)는 영상 복호화 장치(200)가 수신한 비트열을 파싱하여, 현재 프레임에 대한 헤더로부터 최대 부호화 단위, 최대 심도, 최대 부호화 단위의 분할 형태, 서브 부호화 단위의 부호화 모드에 관한 정보를 추출한다. 분할 형태 및 부호화 모드에 관한 정보는 영상 데이터 복호화부(230)로 출력된다. The encoding information extraction unit 220 parses the bit stream received by the image decoding apparatus 200, and extracts a maximum encoding unit, a maximum depth, and a maximum encoding unit split form and a sub-coding unit encoding mode from a header for a current frame. Extract information about. Information on the split mode and the encoding mode is output to the image data decoder 230.

최대 부호화 단위의 분할 형태에 대한 정보는 최대 부호화 단위에 포함된 심도에 따라 상이한 크기의 서브 부호화 단위에 대한 정보를 포함할 수 있다. 전술한 바와 같이 분할 형태에 대한 정보는 각각의 부호화 단위에 대해 부호화된 분할 여부를 나타내는 정보(예를 들어, 플래그 정보)일 수 있다. 부호화 모드에 관한 정보는 서브 부호화 단위별 예측 단위에 대한 정보, 예측 모드에 대한 정보 및 변환 단위에 대한 정보 등을 포함할 수 있다. The information on the split type of the largest coding unit may include information on sub-coding units of different sizes according to depths included in the largest coding unit. As described above, the information on the split type may be information (eg, flag information) indicating whether or not to be coded for each coding unit. Information about a coding mode may include information about a prediction unit for each sub-coding unit, information about a prediction mode, and information about a transformation unit.

영상 데이터 복호화부(230)는 부호화 정보 추출부에서 추출된 정보에 기초하여 각각의 최대 부호화 단위의 영상 데이터를 복호화하여 현재 프레임을 복원한다. The image data decoding unit 230 restores the current frame by decoding the image data of each largest coding unit based on the information extracted by the encoding information extraction unit.

최대 부호화 단위의 분할 형태에 대한 정보에 기초하여, 영상 데이터 복호화부(230)는 최대 부호화 단위에 포함된 서브 부호화 단위를 복호화할 수 있다. 복호화 과정은 인트라 예측 및 움직임 보상을 포함하는 인터 예측 과정 및 역변환 과정을 포함할 수 있다.Based on the information on the split type of the largest coding unit, the image data decoder 230 may decode the sub coding unit included in the largest coding unit. The decoding process may include an inter prediction process including intra prediction and motion compensation, and an inverse transform process.

영상 데이터 복호화부(230)는 서브 부호화 단위의 예측을 위해, 서브 부호화 단위별 예측 단위에 대한 정보 및 예측 모드에 대한 정보에 기초해 인트라 예측 또는 인터 예측을 수행할 수 있다. 또한, 영상 데이터 복호화부(230)는 서브 부호화 단위의 변환 단위에 대한 정보에 기초해 서브 부호화 단위마다 역변환을 수행할 수 있다.The image data decoder 230 may perform intra prediction or inter prediction based on information on a prediction unit for each sub coding unit and information on a prediction mode, for prediction of a sub coding unit. In addition, the image data decoder 230 may perform inverse transformation for each sub-coding unit based on information on the transform unit of the sub-coding unit.

도 3 은 본 발명의 일 실시예에 따른 계층적 부호화 단위를 도시한다.3 shows a hierarchical coding unit according to an embodiment of the present invention.

도 3을 참조하면, 본 발명에 따른 계층적 부호화 단위는 너비x높이가 64x64인 부호화 단위부터, 32x32, 16x16, 8x8, 및 4x4를 포함할 수 있다. 정사각형 형태의 부호화 단위 이외에도, 너비x높이가 64x32, 32x64, 32x16, 16x32, 16x8, 8x16, 8x4, 4x8인 부호화 단위들이 존재할 수 있다.Referring to FIG. 3, the hierarchical coding unit according to the present invention may include 32x32, 16x16, 8x8, and 4x4 from coding units having a width x height of 64x64. In addition to the square coding units, there may be coding units having a width x height of 64x32, 32x64, 32x16, 16x32, 16x8, 8x16, 8x4, 4x8.

도 3을 참조하면, 해상도가 1920x1080인 영상 데이터(310)에 대해서, 최대 부호화 단위의 크기는 64x64, 최대 심도가 2로 설정되어 있다. Referring to FIG. 3, for video data 310 having a resolution of 1920x1080, a maximum coding unit size is set to 64x64 and a maximum depth of 2.

또 다른 해상도가 1920x1080인 영상 데이터(320)에 대해서 최대 부호화 단위의 크기는 64x64, 최대 심도가 4로 설정되어 있다. 해상도가 352x288인 비디오 데이터(330)에 대해서 최대 부호화 단위의 크기는 16x16, 최대 심도가 2로 설정되어 있다.For the video data 320 having another resolution of 1920x1080, the size of the largest coding unit is 64x64 and the maximum depth is set to 4. For video data 330 having a resolution of 352x288, the size of the largest coding unit is set to 16x16 and the maximum depth is 2.

해상도가 높거나 데이터량이 많은 경우 압축률 향상뿐만 아니라 영상 특성을 정확히 반영하기 위해 부호화 사이즈의 최대 크기가 상대적으로 큰 것이 바람직하다. 따라서, 영상 데이터(330)에 비해, 해상도가 높은 영상 데이터(310 및 320)는 최대 부호화 단위의 크기가 64x64로 선택될 수 있다.When the resolution is high or the amount of data is large, it is preferable that the maximum size of the encoding size is relatively large in order to accurately reflect image characteristics as well as to improve the compression rate. Accordingly, as compared to the image data 330, the image data 310 and 320 having high resolution may be selected to have a size of 64x64 for the largest coding unit.

최대 심도는 계층적 부호화 단위에서 총 계층수를 나타낸다. 영상 데이터(310)의 최대 심도는 2이므로, 영상 데이터(310)의 부호화 단위(315)는 장축 크기가 64인 최대 부호화 단위로부터, 심도가 증가함에 따라 장축 크기가 32, 16인 서브 부호화 단위들까지 포함할 수 있다. The maximum depth represents the total number of layers in the hierarchical coding unit. Since the maximum depth of the image data 310 is 2, the coding unit 315 of the image data 310 is from the largest coding unit having a long axis size of 64, and sub-coding units having a long axis size of 32 or 16 as the depth increases. Can include up to.

반면, 영상 데이터(330)의 최대 심도는 2이므로, 영상 데이터(330)의 부호화 단위(335)는 장축 크기가 16인 최대 부호화 단위들로부터, 심도가 증가함에 따라 장축 크기가 8, 4인 부호화 단위들까지 포함할 수 있다. On the other hand, since the maximum depth of the image data 330 is 2, the coding unit 335 of the image data 330 is encoded from the largest coding units having a long axis size of 16, and the long axis sizes of 8 and 4 are increased as the depth increases. Units may also be included.

영상 데이터(320)의 최대 심도는 4이므로, 비디오 데이터(320)의 부호화 단위(325)는 장축 크기가 64인 최대 부호화 단위로부터, 심도가 증가함에 따라 장축 크기가 32, 16, 8, 4인 서브 부호화 단위들까지 포함할 수 있다. 심도가 증가할수록 더 작은 서브 부호화 단위에 기초해 영상을 부호화하므로 보다 세밀한 장면을 포함하고 있는 영상을 부호화하는데 적합해진다.Since the maximum depth of the image data 320 is 4, the coding unit 325 of the video data 320 is from the largest coding unit having a long axis size of 64, and as the depth increases, the long axis size is 32, 16, 8, or 4 It may include sub-coding units. As the depth increases, an image is encoded based on a smaller sub-coding unit, and thus it is suitable for encoding an image including a more detailed scene.

도 4 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부를 도시한다.4 illustrates an image encoder based on coding units, according to an embodiment of the present invention.

인트라 예측부(410)는 현재 프레임(405) 중 인트라 모드의 예측 단위에 대해 인트라 예측을 수행하고, 움직임 추정부(420) 및 움직임 보상부(425)는 인터 모드의 예측 단위에 대해 현재 프레임(405) 및 참조 프레임(495)을 이용해 인터 예측 및 움직임 보상을 수행한다.The intra prediction unit 410 performs intra prediction on the prediction unit of the intra mode among the current frames 405, and the motion estimation unit 420 and the motion compensation unit 425 present the current frame ( 405) and the reference frame 495 to perform inter prediction and motion compensation.

인트라 예측부(410), 움직임 추정부(420) 및 움직임 보상부(425)로부터 출력된 예측 단위에 기초해 레지듀얼 값들이 생성되고, 생성된 레지듀얼 값들은 변환부(430) 및 양자화부(440)를 거쳐 양자화된 변환 계수로 출력된다. Residual values are generated based on prediction units output from the intra prediction unit 410, the motion estimation unit 420, and the motion compensation unit 425, and the generated residual values are transform units 430 and quantization units ( 440) and output as a quantized transform coefficient.

양자화된 변환 계수는 역양자화부(460), 역변환부(470)를 통해 다시 레지듀얼 값으로 복원되고, 복원된 레지듀얼 값들은 디블로킹부(480) 및 루프 필터링부(490)를 거쳐 후처리되어 참조 프레임(495)으로 출력된다. 양자화된 변환 계수는 엔트로피 부호화부(450)를 거쳐 비트스트림(455)으로 출력될 수 있다.The quantized transform coefficients are restored to residual values through the inverse quantization unit 460 and the inverse transform unit 470, and the restored residual values are post-processed through the deblocking unit 480 and the loop filtering unit 490. Is output to the reference frame 495. The quantized transform coefficient may be output to the bitstream 455 through the entropy encoder 450.

본 발명의 일 실시예에 따른 영상 부호화 방법에 따라 부호화하기 위해, 영상 부호화부(400)의 구성 요소들인 인트라 예측부(410), 움직임 추정부(420), 움직임 보상부(425), 변환부(430), 양자화부(440), 엔트로피 부호화부(450), 역양자화부(460), 역변환부(470), 디블로킹부(480) 및 루프 필터링부(490)는 모두 최대 부호화 단위, 심도에 따른 서브 부호화 단위, 예측 단위 및 변환 단위에 기초해 영상 부호화 과정들을 처리한다. In order to encode according to an image encoding method according to an embodiment of the present invention, an intra prediction unit 410, a motion estimation unit 420, a motion compensation unit 425, and a transformation unit that are components of the image encoding unit 400 The 430, the quantization unit 440, the entropy encoding unit 450, the inverse quantization unit 460, the inverse transformation unit 470, the deblocking unit 480, and the loop filtering unit 490 are all the largest coding units and depths. The image encoding processes are processed based on a sub-coding unit, a prediction unit, and a transformation unit according to.

도 5는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부를 도시한다.5 illustrates an image decoder based on coding units according to an embodiment of the present invention.

비트스트림(505)이 파싱부(510)를 거쳐 복호화 대상인 부호화된 영상 데이터 및 복호화를 위해 필요한 부호화 정보가 파싱된다. 부호화된 영상 데이터는 엔트로피 복호화부(520) 및 역양자화부(530)를 거쳐 역양자화된 데이터로 출력되고, 역변환부(540)를 거쳐 레지듀얼 값들로 복원된다. 레지듀얼 값들은 인트라 예측부(550)의 인트라 예측의 결과 또는 움직임 보상부(560)의 움직임 보상 결과와 가산되어 부호화 단위 별로 복원된다. 복원된 부호화 단위는 디블로킹부(570) 및 루프 필터링부(580)를 거쳐 다음 부호화 단위 또는 다음 프레임의 예측에 이용된다. The bitstream 505 passes through the parsing unit 510, and the encoded image data to be decoded and encoding information necessary for decoding are parsed. The encoded image data is output as inverse-quantized data through an entropy decoding unit 520 and an inverse quantization unit 530, and is restored to residual values through an inverse transformation unit 540. The residual values are added to the result of the intra prediction of the intra prediction unit 550 or the result of the motion compensation of the motion compensation unit 560 and reconstructed for each coding unit. The reconstructed coding unit is used for prediction of a next coding unit or a next frame through a deblocking unit 570 and a loop filtering unit 580.

본 발명의 일 실시예에 따른 영상 복호화 방법에 따라 복호화하기 위해 영상 복호화부(400)의 구성 요소들인 파싱부(510), 엔트로피 복호화부(520), 역양자화부(530), 역변환부(540), 인트라 예측부(550), 움직임 보상부(560), 디블로킹부(570) 및 루프 필터링부(580)가 모두 최대 부호화 단위, 심도에 따른 서브 부호화 단위, 예측 단위 및 변환 단위에 기초해 영상 복호화 과정들을 처리한다. The parsing unit 510, the entropy decoding unit 520, the inverse quantization unit 530, and the inverse transform unit 540, which are components of the image decoding unit 400, for decoding according to the image decoding method according to an embodiment of the present invention ), The intra prediction unit 550, the motion compensation unit 560, the deblocking unit 570, and the loop filtering unit 580 are all based on the largest coding unit, sub-coding units according to depths, prediction units, and transformation units. Processes video decoding processes.

특히, 인트라 예측부(550), 움직임 보상부(560)는 최대 부호화 단위 및 심도를 고려하여 서브 부호화 단위 내의 예측 단위 및 예측 모드를 결정하며, 역변환부(540)는 변환 단위의 크기를 고려하여 역변환을 수행한다.In particular, the intra prediction unit 550 and the motion compensation unit 560 determine the prediction unit and prediction mode in the sub coding unit in consideration of the maximum coding unit and depth, and the inverse transform unit 540 takes into account the size of the transformation unit Inverse transformation is performed.

도 6은 본 발명의 일 실시예에 따른 최대 부호화 단위, 서브 부호화 단위 및 예측 단위를 도시한다.6 illustrates a maximum coding unit, a sub coding unit, and a prediction unit according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 부호화 장치(100) 및 영상 복호화 장치(200)는 영상 특성을 고려하여 부호화, 복호화를 수행하기 위해 계층적인 부호화 단위를 이용한다. 최대 부호화 단위 및 최대 심도는 영상의 특성에 따라 적응적으로 설정되거나, 사용자의 요구에 따라 다양하게 설정될 수 있다. The image encoding apparatus 100 and the image decoding apparatus 200 according to an embodiment of the present invention use hierarchical coding units to perform encoding and decoding in consideration of image characteristics. The maximum coding unit and the maximum depth may be adaptively set according to characteristics of an image, or may be variously set according to a user's request.

본 발명의 일 실시예에 따른 부호화 단위의 계층 구조(600)는 최대 부호화 단위(610)의 높이 및 너비가 64이며, 최대 심도가 4인 경우를 도시한다. 부호화 단위의 계층 구조(600)의 세로축을 따라서 심도가 증가하고, 심도의 증가에 따라 서브 부호화 단위(620 내지 650)의 너비 및 높이가 축소된다. 또한, 부호화 단위의 계층 구조(600)의 가로축을 따라, 최대 부호화 단위(610) 및 서브 부호화 단위(620 내지 650)의 예측 단위가 도시되어 있다.The hierarchical structure 600 of the coding unit according to an embodiment of the present invention shows a case where the maximum coding unit 610 has a height and a width of 64 and a maximum depth of 4. Depth increases along the vertical axis of the hierarchical structure 600 of the coding unit, and widths and heights of the sub coding units 620 to 650 decrease as the depth increases. Also, along the horizontal axis of the hierarchical structure 600 of coding units, prediction units of the largest coding unit 610 and the sub coding units 620 to 650 are illustrated.

최대 부호화 단위(610)는 심도가 0이며, 부호화 단위의 크기, 즉 너비 및 높이가 64x64이다. 세로축을 따라 심도가 증가하며, 크기 32x32인 심도 1의 서브 부호화 단위(620), 크기 16x16인 심도 2의 서브 부호화 단위(630), 크기 8x8인 심도 3의 서브 부호화 단위(640), 크기 4x4인 심도 4의 서브 부호화 단위(650)가 존재한다. 크기 4x4인 심도 4의 서브 부호화 단위(650)는 최소 부호화 단위이다.The maximum coding unit 610 has a depth of 0, and the size of the coding unit, that is, width and height, is 64x64. Depth increases along the vertical axis, sub-coding unit 620 of depth 1 of size 32x32, sub-coding unit 630 of depth 2 of size 16x16, sub-coding unit 640 of depth 3 of size 8x8, size 4x4 There is a sub-coding unit 650 of depth 4. The sub-coding unit 650 having a size of 4x4 and having a depth of 4 is a minimum coding unit.

도 6을 참조하면, 각각의 심도별로 가로축을 따라 예측 단위의 예시들이 도시되어 있다. 즉, 심도 0의 최대 부호화 단위(610)의 예측 단위는, 크기 64x64의 부호화 단위(610)와 동일하거나 작은 크기인 크기 64x64의 예측 단위(610), 크기 64x32의 예측 단위(612), 크기 32x64의 예측 단위(614), 크기 32x32의 예측 단위(616)일 수 있다. Referring to FIG. 6, examples of prediction units along a horizontal axis for each depth are illustrated. That is, the prediction unit of the largest coding unit 610 of depth 0 is the same as or smaller than the coding unit 610 of size 64x64, the prediction unit 610 of size 64x64, the prediction unit 612 of size 64x32, size 32x64 The prediction unit 614 may be a prediction unit 616 having a size of 32x32.

심도 1의 크기 32x32의 부호화 단위(620)의 예측 단위는, 크기 32x32의 부호화 단위(620)와 동일하거나 작은 크기인 크기 32x32의 예측 단위(620), 크기 32x16의 예측 단위(622), 크기 16x32의 예측 단위(624), 크기 16x16의 예측 단위(626)일 수 있다. The prediction unit of the coding unit 620 of the size 32x32 of the depth 1 is the prediction unit 620 of the size 32x32 which is the same or smaller than the coding unit 620 of the size 32x32, the prediction unit 622 of the size 32x16, the size 16x32 The prediction unit 624 may be a prediction unit 626 having a size of 16x16.

심도 2의 크기 16x16의 부호화 단위(630)의 예측 단위는, 크기 16x16의 부호화 단위(630)와 동일하거나 작은 크기인 크기 16x16의 예측 단위(630), 크기 16x8의 예측 단위(632), 크기 8x16의 예측 단위(634), 크기 8x8의 예측 단위(636)일 수 있다. The prediction unit of the size 16x16 coding unit 630 of the depth 2 is the size 16x16 prediction unit 630, the size 16x8 prediction unit 632, the size 8x16, which is the same or smaller than the size 16x16 coding unit 630. The prediction unit 634 of, may be a prediction unit 636 of size 8x8.

심도 3의 크기 8x8의 부호화 단위(640)의 예측 단위는, 크기 8x8의 부호화 단위(640)와 동일하거나 작은 크기인 크기 8x8의 예측 단위(640), 크기 8x4의 예측 단위(642), 크기 4x8의 예측 단위(644), 크기 4x4의 예측 단위(646)일 수 있다. The prediction unit of the coding unit 640 of the size 8x8 of the depth 3 is the prediction unit 640 of the size 8x8, the prediction unit 642 of the size 8x4, the size 4x8 of the prediction unit 640 of the size equal to or smaller than the coding unit 640 of the size 8x8 The prediction unit 644 may be a prediction unit 646 having a size of 4x4.

마지막으로, 심도 4의 크기 4x4의 부호화 단위(650)는 최대 심도의 부호화 단위이고, 예측 단위는 크기 4x4의 예측 단위(650)이다. 그러나, 최대 심도의 부호화 단위라고 하여 반드시 부호화 단위와 예측 단위의 크기가 동일할 필요는 없으며, 다른 부호화 단위(610 내지 650)와 마찬가지로 부호화 단위보다 작은 크기의 예측 단위로 분할하여 예측을 수행할 수도 있다.Lastly, a coding unit 650 having a depth of 4 and a size of 4x4 is a coding unit having a maximum depth, and a prediction unit is a prediction unit 650 having a size of 4x4. However, the coding units of the maximum depth do not necessarily have the same size of the coding unit and the prediction unit, and like other coding units 610 to 650, prediction may be performed by dividing into prediction units having a size smaller than the coding unit. have.

도 7은 본 발명의 일 실시예에 따른, 부호화 단위 및 변환 단위를 도시한다.7 illustrates a coding unit and a transformation unit, according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 부호화 장치(100) 및 영상 복호화 장치(200)는, 최대 부호화 단위 그대로 부호화하거나, 최대 부호화 단위 보다 작거나 같은 서브 부호화 단위로 최대 부호화 단위를 분할하여 부호화한다. 부호화 과정 중 변환을 위한 변환 단위의 크기도 부호화 단위 및 예측 단위와 무관하게 가장 높은 압축률을 위한 크기로 선택될 수 있다. 예를 들어, 현재 부호화 단위(710)가 64x64 크기일 때, 32x32 크기의 변환 단위(720)를 이용하여 변환이 수행될 수 도 있다.The video encoding apparatus 100 and the video decoding apparatus 200 according to an embodiment of the present invention encode the same as the maximum coding unit, or split and encode the maximum coding unit into sub-coding units smaller than or equal to the maximum coding unit. The size of the transform unit for transformation during the encoding process may also be selected as the size for the highest compression rate regardless of the coding unit and the prediction unit. For example, when the current coding unit 710 is 64x64 in size, transformation may be performed using a 32x32 sized transformation unit 720.

도 8a 및 8b는 본 발명의 일 실시예에 따른, 부호화 단위, 예측 단위 및 변환 단위의 분할 형태를 도시한다.8A and 8B show a split form of a coding unit, a prediction unit, and a transformation unit, according to an embodiment of the present invention.

도 8a는 본 발명의 일 실시예에 따른 부호화 단위 및 예측 단위를 도시한다. 8A illustrates coding units and prediction units according to an embodiment of the present invention.

도 8a의 좌측은 최대 부호화 단위(810)를 부호화하기 위해 본 발명의 일 실시예에 따른 영상 부호화 장치(100)가 선택한 분할 형태를 도시한다. 영상 부호화 장치(100)는 다양한 형태로 최대 부호화 단위(810)를 분할하고, 부호화한 다음 다양한 분할 형태의 부호화 결과를 R-D 코스트에 기초해 비교하여 최적의 분할 형태를 선택한다. 최대 부호화 단위(810)를 그대로 부호화하는 것이 최적일 경우에는 도 8a 및 8b와 같이 최대 부호화 단위(810)를 분할하지 않고 최대 부호화 단위(800)를 부호화할 수도 있다. The left side of FIG. 8A shows a split form selected by the image encoding apparatus 100 according to an embodiment of the present invention to encode the largest coding unit 810. The video encoding apparatus 100 divides the largest coding unit 810 into various forms, encodes, and compares the encoding results of the various types of splits based on the R-D cost to select an optimal split form. When it is optimal to encode the maximum coding unit 810 as it is, the maximum coding unit 800 may be encoded without dividing the maximum coding unit 810 as illustrated in FIGS. 8A and 8B.

도 8a의 좌측을 참조하면, 심도 0인 최대 부호화 단위(810)를 심도 1 이상의 서브 부호화 단위로 분할하여 부호화한다. 최대 부호화 단위(810)를 네 개의 심도 1의 서브 부호화 단위로 분할한 다음, 전부 또는 일부의 심도 1의 서브 부호화 단위를 다시 심도 2의 서브 부호화 단위로 분할한다.Referring to the left side of FIG. 8A, the largest coding unit 810 having a depth of 0 is split into sub-coding units having a depth of 1 or greater, and then encoded. The maximum coding unit 810 is divided into four sub-coding units of depth 1, and then all or part of the sub-coding units of depth 1 is further divided into sub-coding units of depth 2.

심도 1의 서브 부호화 단위 중 우측 상부에 외치한 서브 부호화 단위 및 좌측 하부에 위치한 서브 부호화 단위가 심도 2 이상의 서브 부호화 단위로 분할되었다. 심도 2 이상의 서브 부호화 단위 중 일부는 다시 심도 3 이상의 서브 부호화 단위로 분할될 수 있다.Among the sub-coding units of depth 1, a sub-coding unit shouting at the upper right and a sub-coding unit located at the lower left are divided into sub-coding units having a depth of 2 or higher. Some of the sub coding units having a depth of 2 or higher may be divided into sub coding units having a depth of 3 or higher.

도 8b의 우측은 최대 부호화 단위(810)에 대한 예측 단위의 분할 형태를 도시한다. The right side of FIG. 8B shows a split form of a prediction unit with respect to the largest coding unit 810.

도 8a의 우측을 참조하면, 최대 부호화 단위에 대한 예측 단위(860)는 최대 부호화 단위(810)와 상이하게 분할될 수 있다. 다시 말해, 서브 부호화 단위들 각각에 대한 예측 단위는 서브 부호화 단위보다 작을 수 있다. Referring to the right side of FIG. 8A, the prediction unit 860 for the largest coding unit may be divided differently from the largest coding unit 810. In other words, the prediction unit for each of the sub coding units may be smaller than the sub coding unit.

예를 들어, 심도 1의 서브 부호화 단위 중 우측 하부에 외치한 서브 부호화 단위(854)에 대한 예측 단위는 서브 부호화 단위(854)보다 작을 수 있다. 심도 2의 서브 부호화 단위들(814, 816, 818, 828, 850, 852) 중 일부 서브 부호화 단위(815, 816, 850, 852)에 대한 예측 단위는 서브 부호화 단위보다 작을 수 있다. For example, a prediction unit for a sub-coding unit 854 that is placed in the lower right of the sub-coding units of depth 1 may be smaller than the sub-coding unit 854. Prediction units for some sub-coding units 815, 816, 850, and 852 of the sub-coding units 814, 816, 818, 828, 850, and 852 of depth 2 may be smaller than the sub-coding units.

또한, 심도 3의 서브 부호화 단위(822, 832, 848)에 대한 예측 단위는 서브 부호화 단위보다 작을 수 있다. 예측 단위는 각각의 서브 부호화 단위를 높이 또는 너비 방향으로 반분한 형태일 수도 있고, 높이 및 너비 방향으로 4분한 형태일 수도 있다.Also, a prediction unit for sub-coding units 822, 832, and 848 of depth 3 may be smaller than a sub-coding unit. The prediction unit may have a form in which each sub-coding unit is divided in a height or width direction, or may be in a form of a quadrant in the height and width direction.

도 8b는 본 발명의 일 실시예에 따른 예측 단위 및 변환 단위를 도시한다. 8B illustrates prediction units and transformation units according to an embodiment of the present invention.

도 8b의 좌측은 도 8a의 우측에 도시된 최대 부호화 단위(810)에 대한 예측 단위의 분할 형태를 도시하고, 도 8b의 우측은 최대 부호화 단위(810)의 변환 단위의 분할 형태를 도시한다. The left side of FIG. 8B shows a split form of a prediction unit for the largest coding unit 810 illustrated on the right side of FIG. 8A, and the right side of FIG. 8B shows a split form of a transform unit of the maximum coding unit 810.

도 8b의 우측을 참조하면, 변환 단위(870)의 분할 형태는 예측 단위(860)와 상이하게 설정될 수 있다. Referring to the right side of FIG. 8B, the division form of the transformation unit 870 may be set differently from the prediction unit 860.

예를 들어, 심도 1의 부호화 단위(854)에 대한 예측 단위가 높이를 반분한 형태로 선택되더라도, 변환 단위는 심도 1의 부호화 단위(854)의 크기와 동일한 크기로 선택될 수 있다. 마찬가지로, 심도 2의 부호화 단위(814, 850)에 대한 예측 단위가 심도 2의 부호화 단위(814, 850)의 높이를 반분한 형태로 선택되더라도 변환 단위는 심도 2의 부호화 단위(814, 850)의 원래 크기와 동일한 크기로 선택될 수 있다. For example, even if the prediction unit for the coding unit 854 of the depth 1 is selected in a form in which the height is halved, the transform unit may be selected to have the same size as the size of the coding unit 854 of the depth 1. Likewise, even if the prediction unit for the coding units 814 and 850 of depth 2 is selected in a form in which the heights of the coding units 814 and 850 of depth 2 are selected in half, the transformation unit is the coding unit 814 and 850 of depth 2 It can be selected in the same size as the original size.

예측 단위보다 더 작은 크기로 변환 단위가 선택될 수도 있다. 예를 들어, 심도 2의 부호화 단위(852)에 대한 예측 단위가 너비를 반분한 형태로 선택된 경우에 변환 단위는 예측 단위보다 더 작은 크기인 높이 및 너비를 반분한 형태로 선택될 수 있다.A transform unit may be selected with a size smaller than the prediction unit. For example, when the prediction unit for the coding unit 852 of depth 2 is selected in a form in which the width is halved, the transformation unit may be selected in a form in which the height and width, which are smaller than the prediction unit, are halved.

도 9는 본 발명의 또 다른 실시예에 따른 영상 부호화 장치를 도시한다. 도 9의 영상 부호화 장치(900)는 도 1의 영상 부호화 장치(100) 및 도 4의 영상 부호화 장치(400)에 포함되어 인터 예측에 기초해 현재 블록을 부호화하는 장치일 수 있다.9 shows a video encoding apparatus according to another embodiment of the present invention. The image encoding apparatus 900 of FIG. 9 may be included in the image encoding apparatus 100 of FIG. 1 and the image encoding apparatus 400 of FIG. 4 and may be an apparatus for encoding a current block based on inter prediction.

도 9를 참조하면, 영상 부호화 장치(900)는 움직임벡터결정부(910) 및 부호화부(920)를 포함한다. Referring to FIG. 9, the image encoding apparatus 900 includes a motion vector determination unit 910 and an encoding unit 920.

일부 부호화 모드는 현재 블록 이전에 부호화된 적어도 하나의 블록의 움직임 벡터에 기초해 현재 블록의 움직임 벡터를 결정하고, 결정된 움직임 벡터에 기초해 현재 블록을 부호화한다. 직접예측 모드(direct prediction mode)와 스킵 모드(skip mode)가 이러한 모드들의 예시들이다. 직접예측 모드와 스킵 모드는 모두 현재 블록의 움직임 벡터가 이전에 부호화된 정보에 기초해 결정되기 때문에 현재 블록에 대한 정보로서 움직임 벡터를 별도로 부호화하지 않는 부호화 모드들이다. In some encoding modes, a motion vector of a current block is determined based on a motion vector of at least one block encoded before the current block, and a current block is encoded based on the determined motion vector. Direct prediction mode and skip mode are examples of these modes. Both the direct prediction mode and the skip mode are coding modes that do not separately encode a motion vector as information about the current block because the motion vector of the current block is determined based on previously coded information.

다만, 직접예측 모드는 현재 블록에서 움직임 벡터에 따라 생성된 예측 블록을 감산하여 생성된 레지듀얼 블록을 픽셀 값에 대한 정보로서 부호화함에 반해, 스킵 모드는 예측 블록이 현재 블록과 동일한 것으로 간주하여 스킵 모드로 부호화되었음을 나타내는 플래그 정보만 픽셀 값에 대한 정보로서 부호화하는 것이 상이하다.However, in the direct prediction mode, the residual block generated by subtracting the prediction block generated according to the motion vector from the current block is encoded as information about the pixel value, whereas in the skip mode, the prediction block is regarded as the same as the current block and is skipped. It is different to encode only the flag information indicating that the mode has been encoded as information about the pixel value.

직접예측 모드와 스킵 모드는 모두 인터 예측에 기초한 부호화임에도 불구하고, 움직임 벡터를 별도로 부호화하지 않으므로, 압축률 향상에 크게 영향을 미친다. 그런데, 이러한 직접예측 모드 및 스킵 모드는 특정 예측 방향의 예측만 수행하여 현재 블록을 부호화하기 때문에 발생 확률이 낮고, 예측이 부정확할 가능성이 높다는 단점이 있다. 따라서, 본 발명의 일 실시예에 따른 영상 부호화 장치(900)는 양방향 예측 픽처에 포함된 현재 블록을 직접예측 모드 또는 스킵 모드로 부호화할 때, 다양한 예측 방향으로 예측하여 부호화하는 바, 이하 도면들을 참조하여 상세히 설명한다.Although both the direct prediction mode and the skip mode are encoding based on inter prediction, since the motion vector is not separately encoded, the compression rate is greatly affected. However, the direct prediction mode and the skip mode are disadvantageous in that the probability of occurrence is low and the probability of incorrect prediction is high because the current block is encoded by performing only prediction in a specific prediction direction. Therefore, when encoding the current block included in the bidirectional prediction picture in the direct prediction mode or the skip mode, the image encoding apparatus 900 according to an embodiment of the present invention predicts and encodes various prediction directions. This will be described in detail with reference.

도 10은 본 발명의 일 실시예에 따른 양방향 예측 픽처에 포함된 블록을 예측하는 방법을 도시한다. 10 illustrates a method of predicting a block included in a bidirectional predictive picture according to an embodiment of the present invention.

도 10을 참조하면, 양방향 예측 픽처인 현재 픽처(1000)에 포함된 현재 블록(1010)을 부호화할 때에 현재 블록은 현재 픽처 이전 시간의 픽처(1020) 및 현재 픽처 이후 시간의 픽처(1030) 중 적어도 하나를 참조하여 예측 부호화된다. 이전 시간의 픽처(1020) 및 이후 시간의 픽처(1030) 중 적어도 하나에서 현재 블록(1010)에 대응되는 적어도 하나의 블록(1022 및 1032)을 검색하고, 검색된 블록에 기초해 현재 블록을 예측 부호화한다. Referring to FIG. 10, when encoding a current block 1010 included in a current picture 1000 that is a bidirectional predictive picture, the current block is one of a picture 1020 at a time before the current picture and a picture 1030 at a time after the current picture. It is predictively coded with reference to at least one. Search for at least one block 1022 and 1032 corresponding to the current block 1010 from at least one of a previous time picture 1020 and a later time picture 1030, and predictively encode the current block based on the searched block do.

다시 말해, 현재 픽처(1000)로부터 이전 픽처(1020)로의 방향을 제1 방향(즉, L0 방향)이라할 때, 현재 블록(1010)은 제1 방향의 픽처에서 검색된 대응 블록(1022)에 기초해 예측될 수 있다. (이하 '제1 방향 예측'이라 한다.) 마찬가지로, 현재 픽처(1000)로부터 이후 픽처(1030)로의 방향을 제2 방향(즉, L1 방향)이라할 때, 현재 블록(1010)은 제2 방향의 픽처에서 검색된 대응 블록(1032)에 기초해 예측될 수 있다. (이하, '제2 방향 예측'이라 한다.) 또한, 현재 블록(1010)은 제1 방향 예측 및 제2 방향 예측 모두 즉, 양방향 예측에 기초해 예측될 수도 있다.In other words, when the direction from the current picture 1000 to the previous picture 1020 is referred to as a first direction (ie, L0 direction), the current block 1010 is based on the corresponding block 1022 retrieved from the picture in the first direction. Can be predicted. (Hereinafter referred to as 'first direction prediction'.) Similarly, when the direction from the current picture 1000 to the subsequent picture 1030 is referred to as a second direction (ie, L1 direction), the current block 1010 is the second direction It can be predicted based on the corresponding block 1032 retrieved from the picture of. (Hereinafter, it is referred to as “second direction prediction.”) Also, the current block 1010 may be predicted based on both first direction prediction and second direction prediction, that is, bidirectional prediction.

그런데, 종래 기술에 따른 직접예측 모드는 현재 블록(1010)에 대해 양방향 예측을 수행하는 경우에만 적용될 수 있다. 다시 말해, 제1 방향 예측만을 수행하여 현재 블록이 예측 부호화되는 경우에는 직접예측 모드에 따라 부호화할 수 없으며, 제2 방향 예측만을 수행하여 현재 블록이 예측 부호화되는 경우에도 직접예측 모드에 따라 부호화할 수 없다. 종래 기술에 따른 스킵 모드도 마찬가지이다. 종래 기술에 따른 스킵 모드에 따르면, 현재 블록(1010)에 인접한 이전에 부호화된 블록의 움직임 벡터에 의해 결정된 현재 블록(1010)의 움직임 벡터는 제1 방향의 움직임 벡터(mv_L0)이어야 하며, 제1 방향 예측에 기초해 생성된 예측 블록을 현재 블록(1010)과 동일한 것으로 간주하여 스킵 모드로 부호화되었음을 나타내는 플래그 정보를 부호화한다.However, the direct prediction mode according to the related art can be applied only when bidirectional prediction is performed on the current block 1010. In other words, when the current block is predictively coded by performing only the first direction prediction, it cannot be encoded according to the direct prediction mode, and even when the current block is predictively encoded by performing only the second direction prediction, encoding is performed according to the direct prediction mode. Can't. The same is true for the skip mode according to the prior art. According to the skip mode according to the prior art, the motion vector of the current block 1010 determined by the motion vector of the previously coded block adjacent to the current block 1010 should be the motion vector (mv_L0) in the first direction, and the first The prediction block generated based on the direction prediction is regarded as the same as the current block 1010, and flag information indicating that it is encoded in the skip mode is encoded.

요컨대, 종래 기술에 따르면, 양방향 예측 픽처에 포함된 블록에 대해 수행될 수 있는 예측은 제1 방향 예측, 제2 방향 예측 및 양방향 예측임에도 불구하고, 직접예측 모드 및 스킵 모드는 특정 방향으로 예측을 수행하는 경우에만 적용될 수 있으므로, 압축률에 큰 영향을 미치는 직접예측 모드 및 스킵 모드가 제한적으로 적용되는 단점이 있다. In short, according to the prior art, although the prediction that can be performed on a block included in the bidirectional prediction picture is the first direction prediction, the second direction prediction, and the bidirectional prediction, the direct prediction mode and the skip mode predict prediction in a specific direction. Since it can be applied only when performing, there is a disadvantage that the direct prediction mode and the skip mode, which greatly affect the compression rate, are limitedly applied.

이러한 단점을 해결하기 위해, 본 발명에 따른 영상 부호화 장치(900)는 현재 블록(1010)의 움직임 벡터를 이전에 부호화된 정보에 기초해 결정하여, 움직임 벡터는 부호화하지 않으면서, 예측은 모든 방향에 대해 수행할 수 있는 영상 부호화 방법에 따라 부호화를 수행한다. To solve this disadvantage, the video encoding apparatus 900 according to the present invention determines the motion vector of the current block 1010 based on previously encoded information, without encoding the motion vector, and prediction is performed in all directions Encoding is performed according to an image encoding method that can be performed for.

움직임벡터결정부(910)는 제1 방향 예측, 제2 방향 예측 및 양방향 예측을 수행하기 위해 현재 블록(1010)의 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 결정한다. 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터는 현재 블록 이전에 부호화된 적어도 하나의 블록의 움직임 벡터에 기초해 결정한다.The motion vector determiner 910 determines a first direction motion vector and a second direction motion vector of the current block 1010 to perform first direction prediction, second direction prediction, and bidirectional prediction. The first direction motion vector and the second direction motion vector are determined based on the motion vector of at least one block encoded before the current block.

제1 방향 움직임 벡터 및 제2 방향 움직임 벡터는 종래 기술에 따른 움직임 벡터 결정 방법에 따라 결정할 수 있다. 예를 들어, 현재 블록(1010)을 직접예측 모드 즉, 움직임 벡터에 대한 정보를 부호화하지 않고, 레지듀얼 블록에 대한 정보만 부호화하는 모드에 따라 부호화하는 경우에는 H.264/AVC 직접예측 모드의 움직임 벡터를 결정하는 방법에 따라 움직임 벡터를 결정할 수 있다. 현재 블록(1010)을 스킵 모드 즉, 움직임 벡터에 대한 정보 및 레지듀얼 블록에 대한 정보를 모두 부호화하지 않는 모드에 따라 부호화하는 경우에는 H.264/AVC 스킵 모드의 움직임 벡터를 결정하는 방법에 따라 움직임 벡터를 결정할 수 있다.The first direction motion vector and the second direction motion vector may be determined according to a conventional motion vector determination method. For example, when the current block 1010 is encoded according to a direct prediction mode, that is, without encoding information about a motion vector, and only encoding information about a residual block, the H.264 / AVC direct prediction mode is used. A motion vector may be determined according to a method for determining a motion vector. When the current block 1010 is encoded in a skip mode, that is, in a mode that does not encode all information about a motion vector and information about a residual block, according to a method of determining a motion vector in an H.264 / AVC skip mode The motion vector can be determined.

H.264/AVC 직접예측 모드에는 시간 직접예측 모드와 공간 직접예측 모드가 있다. 따라서, H.264/AVC의 시간 직접예측 모드에서 현재 블록의 움직임 벡터를 결정하는 방법 및 공간 직접 예측 모드에서 현재 블록의 움직임 벡터를 결정하는 방법이 움직임벡터결정부(910)가 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 결정하는데 이용될 수 있다. 도 11a 및 11b를 참조하여 상세히 설명한다.The H.264 / AVC direct prediction mode includes a temporal direct prediction mode and a spatial direct prediction mode. Accordingly, the method for determining the motion vector of the current block in the temporal direct prediction mode of H.264 / AVC and the method for determining the motion vector of the current block in the spatial direct prediction mode are the motion vector determining unit 910 moving in the first direction. It can be used to determine a vector and a second direction motion vector. This will be described in detail with reference to FIGS. 11A and 11B.

도 11a는 본 발명의 일 실시예에 따른 현재 블록의 움직임 벡터를 이전에 부호화된 블록의 움직임 벡터에 기초해 결정하는 방법을 도시한다. 11A illustrates a method of determining a motion vector of a current block based on a motion vector of a previously coded block according to an embodiment of the present invention.

도 11a를 참조하면, 현재 블록(1010)을 시간 직접예측 모드로 부호화하는 경우에는 현재 픽처(1110)의 현재 블록(1010)의 움직임 벡터는 시간적으로 후행하는 픽처(1114)의 동일한 위치(colocated)의 블록(1120)의 움직임 벡터를 이용해 생성될 수 있다. Referring to FIG. 11A, when the current block 1010 is encoded in a time direct prediction mode, the motion vector of the current block 1010 of the current picture 1110 is colocated with respect to the temporally trailing picture 1114. It can be generated using the motion vector of the block 1120 of.

다시 말해, 시간적으로 후행하는 픽처(1114)를 앵커(anchor) 픽처라 할 때, 앵커 픽처(1114)에서 현재 블록의 동일한 위치의 블록(1120)의 움직임 벡터에 기초해 현재 블록의 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 결정할 수 있다. 동일한 위치의 블록(1120)의 움직임 벡터를 현재 픽처(1110)와 선행 픽처(1112) 사이의 시간 거리(temporal distance) 및 앵커 픽처(1114)와 선행 픽처(1112) 사이의 시간 거리에 기초해 블록(1120)의 움직임 벡터를 스케일링(scaling)하여 현재 블록(1010)의 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 결정할 수 있다.In other words, when the temporally trailing picture 1114 is called an anchor picture, the first direction movement of the current block based on the motion vector of the block 1120 at the same position of the current block in the anchor picture 1114 The vector and the second direction motion vector can be determined. The motion vector of the block 1120 in the same position is based on the temporal distance between the current picture 1110 and the preceding picture 1112 and the time distance between the anchor picture 1114 and the preceding picture 1112 The first motion vector and the second motion vector of the current block 1010 may be determined by scaling the motion vector of 1120.

예를 들어, 현재 블록(1010)과 동일한 위치의 블록(1120)의 움직임 벡터 mv_colA가 현재 픽처(1010) 이전 시간의 픽처(1112)의 검색된 블록(1122)에 대해 생성되면, 현재 블록(1110)의 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터인 mv_L0A 및 mv_L1A는 다음과 같이 생성될 수 있다. For example, if the motion vector mv_colA of the block 1120 at the same position as the current block 1010 is generated for the searched block 1122 of the picture 1112 at a time before the current picture 1010, the current block 1110 The first direction motion vectors and the second direction motion vectors of mv_L0A and mv_L1A may be generated as follows.

mv_L0A = (t1/t2) * mv_colAmv_L0A = (t1 / t2) * mv_colA

mv_L1A = mv_L0A - mv_colAmv_L1A = mv_L0A-mv_colA

여기서, mv_L0A는 현재 블록(1010)의 제1 방향 움직임 벡터를 의미하고, mv_L1A는 현재 블록(1010)의 제2 방향 움직임 벡터를 의미한다.Here, mv_L0A means the first direction motion vector of the current block 1010, and mv_L1A means the second direction motion vector of the current block 1010.

도 11b는 본 발명의 일 실시예에 따른 현재 블록의 움직임 벡터를 이전에 부호화된 블록의 움직임 벡터에 기초해 결정하는 방법을 도시한다.11B illustrates a method of determining a motion vector of a current block based on a motion vector of a previously coded block according to an embodiment of the present invention.

도 11b를 참조하면, 현재 블록(1010)의 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터는 현재 블록(1100)에 인접한 블록들(1130 내지 1134)의 움직임 벡터인 mv_A, mv_B 및 mv_C에 기초해 결정될 수 있다. 현재 블록(1010)의 좌측, 상부 및 우측 상부에 위치한 블록들의 움직임 벡터에 기초해 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 결정한다. Referring to FIG. 11B, the first direction motion vector and the second direction motion vector of the current block 1010 are based on the motion vectors mv_A, mv_B, and mv_C of blocks 1130 to 1134 adjacent to the current block 1100. Can be determined. The first direction motion vector and the second direction motion vector are determined based on the motion vectors of the blocks located on the left, upper, and upper right sides of the current block 1010.

현재 블록을 공간 직접예측 모드로 부호화하는 경우에는 mv_A, mv_B 및 mv_C 중 제1 방향의 움직임 벡터들의 중앙값을 현재 블록(1010)의 제1 방향 움직임 벡터로 결정하고, mv_A, mv_B 및 mv_C 중 제2 방향의 움직임 벡터들의 중앙값(median)을 현재 블록(1010)의 제2 방향 움직임 벡터로 결정한다. 제1 방향 움직임 벡터를 결정할 때, mv_A, mv_B 및 mv_C 중 제2 방향인 움직임 벡터는 '0'으로 설정하여 중앙값을 계산하고, 제2 방향 움직임 벡터를 결정할 때, mv_A, mv_B 및 mv_C 중 제1 방향인 움직임 벡터는 '0'으로 설정하고, 중앙값을 계산한다.When the current block is encoded in the spatial direct prediction mode, the median of motion vectors in the first direction among mv_A, mv_B, and mv_C is determined as a first direction motion vector of the current block 1010, and a second of mv_A, mv_B, and mv_C The median of the motion vectors in the direction is determined as the second motion vector of the current block 1010. When determining the first direction motion vector, the motion vector that is the second direction of mv_A, mv_B, and mv_C is set to '0' to calculate the median value, and when determining the second direction motion vector, the first of mv_A, mv_B, and mv_C The direction motion vector is set to '0' and the median is calculated.

mv_A, mv_B 및 mv_C에 따른 제1 방향 참조 번호 중 제일 작은 번호에 대응되는 픽처를 제1 방향 참조 픽처로 결정하고, mv_A, mv_B 및 mv_C에 따른 제2 방향 참조 번호 중 제일 작은 번호에 대응되는 픽처를 제2 방향 참조 픽처로 결정한다.A picture corresponding to the smallest number among first direction reference numbers according to mv_A, mv_B, and mv_C is determined as a first direction reference picture, and a picture corresponding to the smallest number of second direction reference numbers according to mv_A, mv_B, and mv_C Is determined as the second direction reference picture.

현재 블록(1010)을 스킵 모드로 부호화하는 경우에는 도 11b에 도시된 바와 같이 현재 블록(1010)에 인접한 블록들(1130 내지 1134)의 움직임 벡터 mv_A, mv_B 및 mv_C 중에서 제1 방향 움직임 벡터들의 중앙값을 현재 블록의 움직임 벡터로 결정할 수 있다. When the current block 1010 is encoded in the skip mode, as shown in FIG. 11B, the median of the first direction motion vectors among the motion vectors mv_A, mv_B, and mv_C of blocks 1130 to 1134 adjacent to the current block 1010 Can be determined as the motion vector of the current block.

도 11a 및 11b에 따라 영상 부호화 장치(900)가 움직임 벡터를 결정하고, 현재 블록을 부호화하면, 복호화하는 측에서는 도 11a 및 11b와 동일한 방법을 이용해 현재 블록의 움직임 벡터를 결정하고, 복원할 수 있다. 다시 말해, 영상을 부호화하는 측과 복호화하는 측은 동일한 움직임 벡터 결정 방법을 암묵적(implicit)으로 공유하고, 공유된 움직임 벡터 결정 방법에 따라 현재 블록의 움직임 벡터를 결정할 수 있다.When the video encoding apparatus 900 determines the motion vector according to FIGS. 11A and 11B and encodes the current block, the decoding side may determine and reconstruct the motion vector of the current block using the same method as FIGS. 11A and 11B. . In other words, the side that encodes the image and the side that decodes the image can implicitly share the same motion vector determination method, and determine the motion vector of the current block according to the shared motion vector determination method.

그러나, 본 발명의 또 다른 실시예에 따르면, 부호화하는 측이 현재 블록 이전에 부호화된 복수의 블록의 움직임 벡터에 기초해 복수의 움직임 벡터 후보를 생성하고, 생성된 복수의 움직임 벡터 후보에서 현재 블록의 움직임 벡터를 특정하기 위한 정보를 명시적(explicit)으로 부호화하여 비스트스트림에 삽입하고, 복호화하는 측은 명시적으로 부호화되어 삽입된 정보에 기초해 현재 블록의 움직임 벡터를 결정할 수 있다. 이하 도 12a 및 12d를 참조하여 상세히 설명한다.However, according to another embodiment of the present invention, the encoding side generates a plurality of motion vector candidates based on motion vectors of a plurality of blocks encoded before the current block, and the current block from the generated plurality of motion vector candidates The information for specifying the motion vector of is explicitly encoded and inserted into the Beaststream, and the decoding side can determine the motion vector of the current block based on the information that is explicitly encoded and inserted. It will be described in detail below with reference to FIGS. 12A and 12D.

도 12a 및 12b는 본 발명의 또 다른 실시예에 따른 현재 블록의 움직임 벡터를 이전에 부호화된 블록의 움직임 벡터에 기초해 결정하는 방법을 도시한다. 12A and 12B illustrate a method of determining a motion vector of a current block based on a motion vector of a previously coded block according to another embodiment of the present invention.

도 12a를 참조하면, 움직임벡터결정부(910)는 현재 블록에 인접한 이전에 부호화된 블록들의 움직임 벡터에 기초해 복수의 움직임 벡터 후보를 생성할 수 있다. 현재 블록의 상부에 인접한 블록들 중 가장 좌측의 a0 블록, 좌측에 인접한 가장 상부의 b0 블록, 우측상부에 인접한 c 블록, 좌측상부에 인접한 d 블록 및 우측하부에 인접한 e 블록의 움직임 벡터가 복수의 움직임 벡터 후보일 수 있다.Referring to FIG. 12A, the motion vector determiner 910 may generate a plurality of motion vector candidates based on motion vectors of previously coded blocks adjacent to the current block. Among the blocks adjacent to the top of the current block, the motion vectors of the leftmost a0 block, the uppermost b0 block, the upper right c block, the upper left d block, and the lower right e block motion vectors It may be a motion vector candidate.

a0 블록, b0 블록, c 블록 및 d 블록의 움직임 벡터 중 제1 방향의 움직임 벡터들 중 하나가 현재 블록의 제1 방향의 움직임 벡터로 결정되고, a0 블록, b0 블록, c 블록 및 d 블록의 움직임 벡터 중 제2 방향의 움직임 벡터들 중 하나가 현재 블록의 제2 방향의 움직임 벡터로 결정될 수 있다. 예를 들어, a0 블록, b0 블록, c 블록 및 d 블록의 움직임 벡터 중 a0 블록 및 b0 블록의 움직임 벡터가 제1 방향의 움직임 벡터들이라면, a0 블록의 움직임 벡터 및 b0 블록의 움직임 벡터 중 하나를 현재 블록의 제1 방향 움직임 벡터로 결정할 수 있고, 나머지 c 블록 및 d 블록의 움직임 벡터 중 하나를 현재 블록의 제2 방향 움직임 벡터로 결정할 수 있다.One of the motion vectors in the first direction among motion vectors of the a0 block, the b0 block, the c block, and the d block is determined as the motion vector in the first direction of the current block, and the a0 block, b0 block, c block, and d block One of the motion vectors in the second direction among the motion vectors may be determined as a motion vector in the second direction of the current block. For example, if the motion vectors of the a0 block and the b0 block among the motion vectors of the a0 block, the b0 block, the c block, and the d block are motion vectors in the first direction, one of the motion vector of the a0 block and the motion vector of the b0 block The first direction motion vector of the current block may be determined, and one of the motion vectors of the remaining c blocks and d blocks may be determined as the second direction motion vector of the current block.

복수의 움직임 벡터 후보 중 하나를 현재 블록의 움직임 벡터로 결정하는 방법에는 제한이 없으나, 일반적으로 현재 블록을 보다 정확하게 예측할 수 있는 움직임 벡터를 선택할 수 있다. 전술한 예에서, 제1 방향의 움직임 벡터인 a0 블록의 움직임 벡터 및 b0 블록의 움직임 벡터 중 a0 블록의 움직임 벡터에 따라 예측을 수행하였을 때, 현재 블록이 보다 더 정확하게 예측된다면, a0 블록의 움직임 벡터를 현재 블록의 제1 방향 움직임 벡터로 결정할 수 있다. 각각의 움직임 벡터에 따라 예측한 결과 생성된 예측 블록을 현재 블록에서 감산하여 생성된 레지듀얼 블록의 SAD(sum of absolute difference)를 계산하고, SAD가 작은 움직임 벡터를 현재 블록의 움직임 벡터로 결정할 수 있다.Although there is no limitation in the method of determining one of the plurality of motion vector candidates as the motion vector of the current block, it is generally possible to select a motion vector that can more accurately predict the current block. In the above example, when prediction is performed according to the motion vector of the a0 block among the motion vector of the a0 block and the motion vector of the b0 block, which are motion vectors in the first direction, if the current block is predicted more accurately, the motion of the a0 block The vector may be determined as the first direction motion vector of the current block. The prediction block generated as a result of prediction according to each motion vector is subtracted from the current block to calculate the sum of absolute difference (SAD) of the residual block, and a motion vector having a small SAD can be determined as the motion vector of the current block. have.

도 12b를 참조하면, 현재 블록의 인접한 모든 블록의 움직임 벡터를 움직임 벡터 후보로서 이용할 수 있다. 다시 말해, 상부에 인접한 블록들 중 가장 좌측의 a0 블록뿐만 아니라 상부에 인접한 모든 블록들의 움직임 벡터가 움직임 벡터 후보로서 이용될 수 있고, 좌측에 인접한 불록들 중 가장 상부의 b0 블록뿐만 아니라 좌측에 인접한 모든 블록들의 움직임 벡터가 움직임 벡터 후보로서 이용될 수 있다. Referring to FIG. 12B, motion vectors of all blocks adjacent to the current block may be used as a motion vector candidate. In other words, a motion vector of not only the leftmost a0 block among blocks adjacent to the top but also all blocks adjacent to the top can be used as a motion vector candidate, and the topmost b0 block among blocks adjacent to the left side is adjacent to the left side as well. The motion vector of all blocks can be used as a motion vector candidate.

도 12a와 관련하여 전술한 바와 같이 모든 블록의 움직임 벡터 후보에서 제1 방향의 움직임 벡터들 중 하나가 현재 블록의 제1 방향 움직임 벡터로서 결정되고, 제2 방향의 움직임 벡터들 중 하나가 현재 블록의 제2 방향 움직임 벡터로서 결정될 수 있다.As described above with reference to FIG. 12A, in the motion vector candidate of all blocks, one of the motion vectors in the first direction is determined as the first direction motion vector of the current block, and one of the motion vectors in the second direction is the current block. It can be determined as a second direction motion vector of.

종합하면, 도 11a, 11b, 12a 및 12b에 따라 움직임벡터결정부(910)는 다음과 같이 다음과 같은 복수의 움직임 벡터 후보 중에서 하나를 현재 블록의 움직임 벡터로 결정할 수 있다.In summary, according to FIGS. 11A, 11B, 12A, and 12B, the motion vector determiner 910 may determine one of a plurality of motion vector candidates as a motion vector of the current block as follows.

C = {median(mv_a0, mv_b0, mv_c), mv_a0, mv_a1 ..., mv_aN, mv_b0, mv_b1, ... , mv_bN, mv_c, mv_d, mv_e, mv_L0A, mv_L1A} C = {median (mv_a0, mv_b0, mv_c), mv_a0, mv_a1 ..., mv_aN, mv_b0, mv_b1, ..., mv_bN, mv_c, mv_d, mv_e, mv_L0A, mv_L1A}

mv_L0A 및 mv_L1A는 도 11a에 따른 움직임 벡터일 수 있으며, median(mv_a0, mv_b0, mv_c)은 도 11b에 따른 움직임 벡터일 수 있다. 나머지 움직임 벡터들은 도 12a 및 12b와 관련하여 전술하였다.mv_L0A and mv_L1A may be motion vectors according to FIG. 11A, and median (mv_a0, mv_b0, mv_c) may be motion vectors according to FIG. 11B. The remaining motion vectors are described above with respect to FIGS. 12A and 12B.

C 집합에 포함된 제1 방향의 움직임 벡터들 중에서 현재 블록의 제1 방향 움직임 벡터가 결정되고, C 집합에 포함된 제2 방향의 움직임 벡터들 중에서 현재 블록의 제2 방향 움직임 벡터가 결정될 수 있다.A first direction motion vector of the current block may be determined from among motion vectors of the first direction included in the C set, and a second direction motion vector of the current block may be determined from among motion vectors of the second direction included in the C set. .

또한, 본 발명의 또 다른 실시예에 따르면, 후보들의 개수를 줄이고, 그 중에서 현재 블록의 움직임 벡터를 결정할 수도 있다.In addition, according to another embodiment of the present invention, the number of candidates may be reduced, and among them, a motion vector of the current block may be determined.

C = {median(mv_a', mv_b', mv_c'), mv_a', mv_b', mv_c', mv_L0A, mv_L1A}C = {median (mv_a ', mv_b', mv_c '), mv_a', mv_b ', mv_c', mv_L0A, mv_L1A}

여기서, mv_x는 x 블록의 움직임 벡터를 의미하고, median()은 중앙값을 의미하며, mv_a'은 mv_a0, mv_a1 ..., mv_aN 중 유효한 최초의 움직임 벡터를 의미한다. 예를 들어, a0 블록이 인트라 예측을 이용해 부호화된 경우 a0의 움직임 벡터인 mv_a0은 유효하지 않으므로, mv_a'=mv_a1이 되며, a1 블록의 움직임 벡터도 유효하지 않은 경우에는 mv_a'=mv_a2이다.Here, mv_x means the motion vector of the x block, median () means the median value, and mv_a 'means the first valid motion vector among mv_a0, mv_a1 ..., and mv_aN. For example, when the a0 block is coded using intra prediction, mv_a0, which is a motion vector of a0, is invalid, so mv_a '= mv_a1, and when the motion vector of the a1 block is also invalid, mv_a' = mv_a2.

마찬가지로, mv_b'은 mv_b0, mv_b1, ... , mv_bN 중 유효한 최초의 움직임 벡터를 의미하고, mv_c'은 mv_c, mv_d, mv_e 중 유효한 최초의 움직임 벡터를 의미한다. Similarly, mv_b 'denotes the first valid motion vector among mv_b0, mv_b1, ..., mv_bN, and mv_c' denotes the first valid motion vector among mv_c, mv_d, and mv_e.

mv_L0A 및 mv_L1A는 도 11a에 따른 움직임 벡터일 수 있다. 또한, 본 발명의 또 다른 실시예에 따르면, mv_L0A 및 mvL1A 대신 인접한 픽처들 사이의 시간 거리를 이용해 생성된 다른 움직임 벡터가 후보에 포함될 수 있다. 도 13a 및 13b를 참조하여 상세히 설명한다.mv_L0A and mv_L1A may be motion vectors according to FIG. 11A. Further, according to another embodiment of the present invention, other motion vectors generated using time distances between adjacent pictures may be included in candidates instead of mv_L0A and mvL1A. This will be described in detail with reference to FIGS. 13A and 13B.

도 13a 및 13b는 본 발명의 또 다른 실시예에 따른 현재 블록의 움직임 벡터를 이전에 부호화된 블록의 움직임 벡터에 기초해 결정하는 방법을 도시한다. 13A and 13B illustrate a method of determining a motion vector of a current block based on a motion vector of a previously coded block according to another embodiment of the present invention.

도 13a를 참조하면, 시간 거리에 기초해 결정된 움직임 벡터 후보는 종래 기술에 따른 시간 직접예측 모드와 다른 방법으로 다른 방법으로 결정될 수 있다. Referring to FIG. 13A, a motion vector candidate determined based on a time distance may be determined in a different method from a time direct prediction mode according to the prior art.

현재 픽처(1110)의 현재 블록(1010)의 움직임 벡터 후보는 선행 픽처(1112)의 동일한 위치(colocated)의 블록(1320)의 움직임 벡터를 이용해 생성될 수 있다. 예를 들어, 현재 블록(1010)과 동일한 위치의 블록(1320)의 움직임 벡터 mv_colB가 후행 픽처(1114)의 검색된 블록(1322)에 대해 생성되면, 현재 블록(1010)의 움직임 벡터 후보들인 mv_L0B 및 mv_L1B 는 다음과 같이 생성될 수 있다. The motion vector candidate of the current block 1010 of the current picture 1110 may be generated using the motion vector of the block 1320 at the same position of the preceding picture 1112. For example, if the motion vector mv_colB of the block 1320 at the same position as the current block 1010 is generated for the searched block 1322 of the trailing picture 1114, the motion vector candidates of the current block 1010 are mv_L0B and mv_L1B may be generated as follows.

mv_L1B = (t3/t4) * mv_colBmv_L1B = (t3 / t4) * mv_colB

mv_L0B = mv_L1B - mv_colBmv_L0B = mv_L1B-mv_colB

여기서, mv_L0B는 현재 블록(1010)의 제1 방향 움직임 벡터 후보를 의미하고, mv_L1B는 현재 블록(1010)의 제2 방향 움직임 벡터 후보를 의미한다.Here, mv_L0B means a first direction motion vector candidate of the current block 1010, and mv_L1B means a second direction motion vector candidate of the current block 1010.

도 13b를 참조하면, 현재 픽처(1110)의 현재 블록(1010)의 움직임 벡터 후보는 선행 픽처(1112)의 동일한 위치(colocated)의 블록(1330)의 움직임 벡터를 이용해 결정할 수 있다. 예를 들어, 현재 블록(1010)과 동일한 위치의 블록(1330)의 움직임 벡터 mv_colC가 또 다른 선행 픽처(1116)의 검색된 블록(1332)에 대해 생성되면, 현재 블록(1010)의 움직임 벡터 후보인 mv_L0C는 다음과 같이 생성될 수 있다.Referring to FIG. 13B, a motion vector candidate of the current block 1010 of the current picture 1110 may be determined using the motion vector of the block 1330 at the same position of the preceding picture 1112. For example, if the motion vector mv_colC of the block 1330 at the same position as the current block 1010 is generated for the searched block 1332 of another preceding picture 1116, the motion vector candidate of the current block 1010 is mv_L0C may be generated as follows.

mv_L0C = (t6/t5) x mv_colCmv_L0C = (t6 / t5) x mv_colC

도 13a 및 13b와 관련하여 전술한 mv_L0B, mv_L1B 및 mv_L0B는 전술한 현재 블록(1010)의 움직임 벡터의 후보들인 C 집합에 포함될 수 있다. mv_L0A, mv_L1A를 대신해 C 집합에 포함될 수도 있고, 추가로 C 집합에 포함될 수도 있다. 13A and 13B, the aforementioned mv_L0B, mv_L1B, and mv_L0B may be included in the C set of candidates of the motion vector of the current block 1010 described above. Instead of mv_L0A and mv_L1A, they may be included in the C set, or may be additionally included in the C set.

다시 도 9를 참조하면, 움직임벡터결정부(910)가 현재 블록 이전에 부호화된 블록들의 움직임 벡터에 기초해 현재 블록의 움직임 벡터를 결정하면, 부호화부(920)는 현재 블록에 대한 정보를 부호화한다.Referring back to FIG. 9, when the motion vector determiner 910 determines the motion vector of the current block based on the motion vectors of blocks encoded before the current block, the encoder 920 encodes information about the current block. do.

현재 블록의 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터가 결정되면, 부호화부(920)는 결정된 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터에 기초해 제1 방향의 예측, 제2 방향의 예측 및 양방향 예측을 수행한다. 그런 다음, 현재 블록을 가장 정확하게 예측하는 예측 방향을 결정한다. 제1 방향의 예측 결과, 제2 방향의 예측 결과 및 양방향 예측 결과를 현재 블록과 비교하여 레지듀얼 블록의 SAD가 가장 적은 예측 방향을 결정할 수 있다. 제1 방향의 예측, 제2 방향의 예측 및 양방향 예측을 모두 수행하여, 부호화한 결과를 RD 코스트(rate distortion cost)에 기초해 비교하여 예측 방향을 결정할 수도 있다. When the first direction motion vector and the second direction motion vector of the current block are determined, the encoder 920 predicts the first direction and the second direction based on the determined first direction motion vector and the second direction motion vector. And bidirectional prediction. Then, the prediction direction for predicting the current block most accurately is determined. The prediction direction in the first direction, the prediction result in the second direction, and the bidirectional prediction result may be compared with the current block to determine a prediction direction with the lowest SAD of the residual block. Prediction in the first direction, prediction in the second direction, and bidirectional prediction are all performed, and the coded results may be compared based on an RD cost (rate distortion cost) to determine a prediction direction.

예측 방향이 결정되면, 결정된 예측 방향에 대한 정보 및 픽셀 값들에 대한 정보를 부호화한다. 예측 방향에 대한 정보가 시퀀스 파라미터, 슬라이스 파라미터 또는 블록 파라미터로서 부호화될 수 있다. 제1 방향, 제2 방향 및 양방향에 소정의 이진수를 할당하고, 현재 블록의 부호화에 이용되는 예측 방향에 대응되는 이진수를 엔트로피 부호화하여 비트스트림에 삽입할 수 있다.When the prediction direction is determined, information about the determined prediction direction and pixel values is encoded. Information about the prediction direction may be encoded as a sequence parameter, slice parameter, or block parameter. A predetermined binary number is allocated to the first direction, the second direction, and both directions, and the binary number corresponding to the prediction direction used for encoding of the current block can be entropy-encoded and inserted into the bitstream.

픽셀 값들에 대한 정보로서 직접예측 모드와 같이 레지듀얼 블록에 대한 정보를 별도로 부호화할 수 있다. 결정된 예측 방향에 따른 예측 결과 생성된 예측 블록을 현재 블록에서 감산하여 레지듀얼 블록을 생성하고, 레지듀얼 블록을 변환하여, 주파수 영역의 계수들을 생성하고, 생성된 계수들을 양자화, 엔트로피 부호화할 수 있다. 변환은 이산 코사인 변환 또는 KLT 변환일 수 있다.As information on pixel values, information on a residual block, such as a direct prediction mode, may be separately coded. The prediction block generated as a result of prediction according to the determined prediction direction is subtracted from the current block to generate a residual block, transform the residual block, generate coefficients in the frequency domain, and quantize and entropy the generated coefficients. . The transform can be a discrete cosine transform or a KLT transform.

또한, 픽셀 값들에 대한 정보로서 종래 기술에 따른 스킵 모드와 예측 블록과 현재 블록이 동일함을 나타내는 플래그 정보만 부호화할 수도 있다. 결정된 예측 방향에 따른 예측 결과 생성된 예측 블록을 현재 블록과 동일한 것으로 간주하여 현재 블록과 예측 블록이 동일함을 나타내는 플래그 정보만 부호화할 수 있다. Also, as information on pixel values, only the skip mode according to the related art and the flag information indicating that the prediction block and the current block are the same may be encoded. The prediction block generated as a result of prediction according to the determined prediction direction is regarded as the same as the current block, and only flag information indicating that the current block and the prediction block are the same can be encoded.

예측을 위해 참조하는 픽처는 이전에 부호화된 블록들의 참조 번호(reference index)에 기초해 유추될 수 있다. 도 11b와 관련하여 전술한 바와 같이 이전에 부호화된 블록들의 참조 번호에 기초해 현재 블록의 참조 번호를 결정하고, 이에 대응되는 참조 픽처가 결정될 수도 있다. 또한, 움직임벡터결정부(910)에서 결정된 움직임 벡터에 대응되는 참조 픽처가 현재 블록의 참조 픽처로 결정될 수 있다. 예를 들어, 도 11a와 관련하여 전술한 바와 같이 mv_L0A가 현재 블록의 제1 방향 움직임 벡터로 결정되면, mv_L0A에 따른 선행 픽처(1112)가 현재 블록의 참조 픽처로서 자동적으로 결정될 수 있다.A picture referenced for prediction may be inferred based on a reference index of previously coded blocks. As described above with reference to FIG. 11B, a reference number of a current block is determined based on a reference number of previously coded blocks, and a reference picture corresponding thereto may be determined. Also, a reference picture corresponding to the motion vector determined by the motion vector determining unit 910 may be determined as a reference picture of the current block. For example, as described above with reference to FIG. 11A, if mv_L0A is determined as the first direction motion vector of the current block, a preceding picture 1112 according to mv_L0A may be automatically determined as a reference picture of the current block.

움직임벡터결정부(910)가 도 12a, 12b, 13a 및 13b와 같이 복수의 움직임 벡터 후보들 중에서 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 명시적으로 결정한 경우에 부호화부(920)는 복수의 임직임 벡터 후보에서 현재 블록의 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터 중 적어도 하나를 지시(signalling)하는 정보를 부호화할 수도 있다.When the motion vector determination unit 910 explicitly determines the first direction motion vector and the second direction motion vector among a plurality of motion vector candidates as shown in FIGS. 12A, 12B, 13A, and 13B, the encoder 920 may include a plurality of motion vector. The information indicating the at least one of the first direction motion vector and the second direction motion vector of the current block may be encoded in the candidate vector candidate.

예측 방향을 결정한 결과 제1 방향으로만 예측을 수행하는 것으로 결정된 경우에는 복수의 움직임 벡터 후보들에서 제1 방향 움직임 벡터를 지시하는 정보만 부호화한다. 제2 방향으로만 예측을 수행하는 경우에도 제2 방향 움직임 벡터를 지시하는 정보만 부호화할 수 있다. 그러나, 양방향 예측을 수행하는 경우에는 복수의 움직임 벡터 후보들에서 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 지시하는 정보를 부호화할 수 있다.When it is determined that prediction is performed only in the first direction as a result of determining the prediction direction, only information indicating the first direction motion vector is encoded by a plurality of motion vector candidates. Even when prediction is performed only in the second direction, only information indicating the second direction motion vector may be encoded. However, in the case of performing bidirectional prediction, information indicating a first direction motion vector and a second direction motion vector may be encoded from a plurality of motion vector candidates.

전술한 C 집합에 포함된 모든 움직임 벡터 각각에 이진수를 할당하고, 그 중 현재 블록의 움직임 벡터로서 결정된 제1 방향 움직임 벡터 및/또는 제2 방향 움직임 벡터에 할당된 이진수를 부호화할 수 있다. 그러나, 전술한 바와 같이 현재 블록의 제1 방향 움직임 벡터는 C 집합에 포함된 제1 방향의 움직임 벡터들 중에서 하나로 결정되는 바, C 집합에 포함된 제1 방향의 움직임 벡터들에 순서대로 할당된 이진수 중에서 현재 블록의 제1 방향 움직임 벡터로 결정된 움직임 벡터에 할당된 이진수를 제1 방향 움직임 벡터를 지시하는 정보로서 부호화할 수 있다. 제2 방향 움직임 벡터도 마찬가지로, C 집합에 포함된 제2 방향의 움직임 벡터들에 순서대로 할당된 이진수 중에서 현재 블록의 제2 방향 움직임 벡터로 결정된 움직임 벡터에 할당된 이진수를 제2 방향 움직임 벡터를 지시하는 정보로서 부호화할 수 있다.Binary numbers may be allocated to each of the motion vectors included in the above-described C set, and among them, binary numbers assigned to the first direction motion vector and / or the second direction motion vector determined as the motion vector of the current block may be encoded. However, as described above, the first direction motion vector of the current block is determined as one of the first direction motion vectors included in the C set, and is sequentially assigned to the first direction motion vectors included in the C set. Among binary numbers, a binary number allocated to a motion vector determined as a first direction motion vector of a current block may be encoded as information indicating the first direction motion vector. Likewise, in the second direction motion vector, the second direction motion vector is the binary number assigned to the motion vector determined as the second direction motion vector of the current block among the binary numbers sequentially assigned to the second direction motion vectors included in the C set. It can be encoded as indicated information.

도 14는 본 발명의 또 다른 실시예에 따른 영상 복호화 장치를 도시한다. 도 14의 영상 복호화 장치(1400)는 도 2의 영상 복호화 장치(200) 및 도 5의 영상 부호화 장치(500)에 포함되어 인터 예측을 수행하여, 현재 블록을 복호화하는 장치일 수 있다.14 shows a video decoding apparatus according to another embodiment of the present invention. The image decoding apparatus 1400 of FIG. 14 may be included in the image decoding apparatus 200 of FIG. 2 and the image encoding apparatus 500 of FIG. 5 to perform inter prediction to decode a current block.

도 14를 참조하면, 본 발명의 일 실시예에 따른 영상 복호화 장치(1400)는 복호화부(1410), 움직임벡터결정부(1420) 및 복원부(1430)를 포함한다. Referring to FIG. 14, an image decoding apparatus 1400 according to an embodiment of the present invention includes a decoding unit 1410, a motion vector determining unit 1420, and a restoration unit 1430.

복호화부(1410)는 현재 블록에 대한 데이터를 포함하는 비트스트림을 수신하고, 예측 방향에 대한 정보를 복호화한다. 영상 복호화 장치(1400)는 현재 블록 이전에 복호화된 적어도 하나의 블록의 움직임 벡터에 기초해 현재 블록의 움직임 벡터를 결정하고, 결정된 움직임 벡터에 기초해 현재 블록을 복원하는 복호화 모드에 따라 복호화를 수행하는 바, 현재 블록의 움직임 벡터를 결정하기에 앞서, 현재 블록의 예측 방향에 대한 정보를 복호화한다. 시퀀스 파라미터, 슬라이스 파라미터 또는 블록 파라미터로서 비트스트림에 포함되어 있는 예측 방향에 대한 정보를 복호화한다.The decoder 1410 receives a bitstream including data for a current block, and decodes information about a prediction direction. The image decoding apparatus 1400 determines a motion vector of the current block based on a motion vector of at least one block decoded before the current block, and performs decoding according to a decoding mode that restores the current block based on the determined motion vector Therefore, before determining the motion vector of the current block, information on the prediction direction of the current block is decoded. As a sequence parameter, slice parameter, or block parameter, information about a prediction direction included in a bitstream is decoded.

직접예측 모드나 스킵 모드와 같이 이전에 부호화된 블록의 움직임 벡터에 기초해 현재 블록의 움직임 벡터를 결정하는 부호화/복호화 모드는 특정 방향의 예측만을 이용하여 현재 블록을 부호화/복호화하였으나, 본 발명에 따른 부호화/복호화 방법은 제1 방향의 예측, 제2 방향의 예측 및 양방향 예측 모두에 기초해 직접예측 모드나 스킵 모드로 현재 블록을 부호화/복호화할 수 있다. 이를 위해 전술한 영상 부호화 장치(900)는 예측 방향에 대한 정보를 부호화하여 비트스트림에 삽입한다. 복호화부(1410)는 영상 부호화 장치(900)에서 비스트스트림에 삽입한 예측 방향에 대한 정보를 복호화한다.An encoding / decoding mode for determining a motion vector of a current block based on a motion vector of a previously coded block, such as a direct prediction mode or a skip mode, encodes / decodes a current block using only prediction in a specific direction. According to the encoding / decoding method, the current block may be encoded / decoded in a direct prediction mode or a skip mode based on both prediction in the first direction, prediction in the second direction, and bidirectional prediction. To this end, the above-described image encoding apparatus 900 encodes information about a prediction direction and inserts it into a bitstream. The decoder 1410 decodes information about a prediction direction inserted into the Beaststream by the video encoding apparatus 900.

복호화부(1410)는 예측 방향에 대한 정보와 함께 복수의 움직임 벡터 후보에서 현재 블록의 움직임 벡터를 지시하는 정보를 복호화할 수도 있다. 현재 블록의 움직임 벡터가 전술한 바와 같이 부호화 측과 복호화 측 사이에 공유된 움직임 벡터 결정 방법에 따라 암시적으로 결정되는 경우에는 현재 블록의 움직임 벡터는 이미 정해진 방법에 따라 하나로 결정되므로, 움직임 벡터를 지시하는 정보를 복호화할 필요가 없다. 그러나, 전술한 바와 같이 이전에 부호화된 복수의 블록의 움직임 벡터에 기초해 복수의 움직임 벡터 후보를 생성하고, 그 중에서 현재 블록의 움직임 벡터가 결정된 경우에는 복수의 움직임 벡터 후보에서 현재 블록의 움직임 벡터를 특정하기 위한 정보를 복호화할 수 있다.The decoder 1410 may decode information indicating a motion vector of a current block from a plurality of motion vector candidates along with information on a prediction direction. When the motion vector of the current block is implicitly determined according to a method of determining a motion vector shared between the encoding side and the decoding side as described above, the motion vector of the current block is determined as one according to a predetermined method. There is no need to decrypt the indicated information. However, as described above, a plurality of motion vector candidates are generated based on motion vectors of a plurality of previously coded blocks, and when a motion vector of the current block is determined, a motion vector of the current block from a plurality of motion vector candidates Information for specifying can be decoded.

또한, 복호화부(1410)는 현재 블록의 픽셀 값에 대한 정보를 복호화한다. 현재 블록의 레지듀얼 블록에 대한 정보를 복호화하거나, 현재 블록이 예측 블록과 동일함을 나타내는 플래그 정보를 복호화한다. 복호화부(1410)는 레지듀얼 블록에 대한 정보를 엔트로피 복호화, 역양자화, 역변환하여 레지듀얼 블록을 복원할 수 있다. In addition, the decoder 1410 decodes information on pixel values of the current block. The information on the residual block of the current block is decoded, or flag information indicating that the current block is the same as the prediction block is decoded. The decoder 1410 may restore the residual block by entropy decoding, inverse quantizing, and inverse transforming information about the residual block.

움직임벡터결정부(1420)는 복호화부(1410)에서 복호화된 예측 방향에 대한 정보에 기초해 소정 방향의 예측을 수행하기 위한 현재 블록의 움직임 벡터를 결정한다. 복호화된 예측 방향에 대한 정보를 참조한 결과, 제1 방향의 예측을 수행하는 것으로 판단되면, 제1 방향 움직임 벡터를 결정하고, 제2 방향의 예측을 수행하는 것으로 판단되면, 제2 방향 움직임 벡터를 결정한다. 양방향 예측을 수행하는 것으로 판단되면, 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 결정한다.The motion vector determiner 1420 determines a motion vector of a current block for performing prediction in a predetermined direction based on information about a prediction direction decoded by the decoder 1410. As a result of referring to the decoded prediction direction information, if it is determined to perform prediction in the first direction, the first direction motion vector is determined, and if it is determined to perform prediction in the second direction, the second direction motion vector is determined. Decide. If it is determined to perform bidirectional prediction, the first direction motion vector and the second direction motion vector are determined.

부호화 측과 복호화 측 사이의 공유된 움직임 벡터 결정 방법에 따라 암묵적으로 현재 블록의 움직임 벡터가 결정되는 경우에는 공유된 움직임 벡터 결정 방법에 따라 현재 블록의 움직임 벡터를 결정한다. 암묵적으로 현재 블록의 움직임 벡터를 결정하는 방법은 도 11a 및 11b와 관련하여 전술하였다.When the motion vector of the current block is implicitly determined according to the shared motion vector determination method between the encoding side and the decoding side, the motion vector of the current block is determined according to the shared motion vector determination method. The method for implicitly determining the motion vector of the current block has been described above with reference to FIGS. 11A and 11B.

그러나, 복수의 움직임 벡터 후보 중에서 현재 블록의 움직임 벡터를 결정하는 경우에는 복호화부(1410)에서 복호화된 복수의 움직임 벡터 후보에서 현재 블록을 지시하는 정보에 기초해 현재 블록의 움직임 벡터를 결정한다. 현재 블록 이전에 복호화된 적어도 하나의 블록의 움직임 벡터를 이용해 복수의 움직임 벡터 후보를 생성하고, 생성된 복수의 움직임 벡터 후보에서 현재 블록의 움직임 벡터를 결정한다.However, when determining a motion vector of a current block among a plurality of motion vector candidates, the motion vector of the current block is determined based on information indicating the current block from the plurality of motion vector candidates decoded by the decoder 1410. A plurality of motion vector candidates are generated using the motion vectors of at least one block decoded before the current block, and a motion vector of the current block is determined from the generated plurality of motion vector candidates.

현재 블록이 제1 방향의 예측만 이용하는 경우에는 복호화부(1410)에서 복호화된 제1 방향 움직임 벡터를 지시하는 정보를 참조해 복수의 움직임 벡터 후보들 중에서 제1 방향 움직임 벡터를 결정하고, 현재 블록이 제2 방향의 예측만 이용하는 경우에는 복호화부(1410)에서 복호화된 제2 방향 움직임 벡터를 지시하는 정보를 참조해 복수의 움직임 벡터 후보들 중에서 제2 방향 움직임 벡터를 결정한다. 현재 블록이 양방향 예측을 이용하는 경우에는 복호화부(1410)에서 복호화된 제1 방향 움직임 벡터를 지시하는 정보 및 제2 방향 움직임 벡터를 지시하는 정보를 참조해, 복수의 움직임 벡터 후보들 중에서 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 결정할 수 있다.When the current block uses only prediction in the first direction, the decoder 1410 determines a first direction motion vector among a plurality of motion vector candidates by referring to information indicating the decoded first direction motion vector, and the current block When only the prediction of the second direction is used, the second direction motion vector is determined from among a plurality of motion vector candidates by referring to information indicating the decoded second direction motion vector by the decoder 1410. When the current block uses bidirectional prediction, the first direction motion among the plurality of motion vector candidates is referred to by referring to information indicating the first direction motion vector and the second direction motion vector decoded by the decoder 1410. The vector and the second direction motion vector can be determined.

복원부(1430)는 복호화부(1410)에서 복호화된 픽셀 값들에 대한 정보 및 움직임벡터결정부(1420)에서 결정된 현재 블록의 움직임 벡터에 기초해 현재 블록을 복원한다. The reconstruction unit 1430 reconstructs the current block based on information about pixel values decoded by the decoder 1410 and a motion vector of the current block determined by the motion vector determination unit 1420.

움직임벡터결정부(1410)에서 결정된 움직임 벡터에 따라 제1 방향의 예측, 제2 방향의 예측 또는 양방향의 예측을 수행하여 현재 블록의 예측 블록을 생성한다. 복호화부(1410)에서 픽셀 값들에 대한 정보를 복호화한 결과, 레지듀얼 블록이 복원된 경우에는 복원된 레지듀얼 블록과 예측 블록을 가산하여 현재 블록을 복원한다. 복호화부(1410)에서 예측 블록이 현재 블록과 동일함을 나타내는 플래그 정보가 복호화된 경우에는 예측 블록을 그대로 복원된 현재 블록으로 이용한다. The prediction of the current block is generated by performing prediction in the first direction, prediction in the second direction, or prediction in both directions according to the motion vector determined by the motion vector determining unit 1410. As a result of decoding the information on the pixel values by the decoder 1410, when the residual block is restored, the current block is reconstructed by adding the restored residual block and the prediction block. When the flag information indicating that the prediction block is the same as the current block is decoded by the decoder 1410, the prediction block is used as the restored current block.

예측을 위해 참조하는 픽처는 이전에 복호화된 블록들의 참조 번호(reference index)에 기초해 유추될 수 있다. 도 11b와 관련하여 전술한 바와 같이 이전에 복호화된 블록들의 참조 번호에 기초해 현재 블록의 참조 번호를 결정하고, 이에 대응되는 참조 픽처가 결정될 수도 있다. 또한, 움직임벡터결정부(1410)에서 결정된 움직임 벡터에 대응되는 참조 픽처가 현재 블록의 참조 픽처로 결정될 수 있다. 예를 들어, 도 11a와 관련하여 전술한 바와 같이 mv_L0A가 현재 블록의 제1 방향 움직임 벡터로 결정되면, mv_L0A에 따른 선행 픽처(1112)가 현재 블록의 참조 픽처로서 자동적으로 결정될 수 있다.A picture referenced for prediction may be inferred based on a reference index of previously decoded blocks. As described above with reference to FIG. 11B, the reference number of the current block is determined based on the reference number of previously decoded blocks, and a reference picture corresponding thereto may be determined. Also, a reference picture corresponding to a motion vector determined by the motion vector determining unit 1410 may be determined as a reference picture of the current block. For example, as described above with reference to FIG. 11A, if mv_L0A is determined as the first direction motion vector of the current block, a preceding picture 1112 according to mv_L0A may be automatically determined as a reference picture of the current block.

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

도 15를 참조하면, 단계 1510에서 영상 부호화 장치는 현재 블록의 움직임 벡터를 결정한다. 양방향 예측 픽처인 현재 픽처에 포함된 현재 블록의 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 결정한다. 현재 블록의 움직임 벡터는 도 11a 및 11b를 참조하여 전술한 바와 같이 부호화하는 측과 복호화하는 측 사이에 공유된 움직임 벡터 결정 방법에 따라 암묵적으로 결정될 수도 있고, 도 12a, 12b, 13a 및 13b를 참조하여 전술한 바와 같이 복수의 움직임 벡터 후보를 생성하고, 생성된 복수의 움직임 벡터 후보 중에서 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 결정할 수도 있다. 15, in step 1510, the image encoding apparatus determines a motion vector of the current block. The first direction motion vector and the second direction motion vector of the current block included in the current picture, which is a bidirectional prediction picture, are determined. 11A and 11B, the motion vector of the current block may be implicitly determined according to a shared motion vector determination method between the encoding side and the decoding side as described above, and refer to FIGS. 12A, 12B, 13A, and 13B. As described above, a plurality of motion vector candidates may be generated, and a first direction motion vector and a second direction motion vector may be determined from among the generated plurality of motion vector candidates.

단계 1520에서 영상 부호화 장치는 제1 방향 예측, 제2 방향 예측 및 양방향 예측 중 현재 블록의 부호화에 이용되는 예측을 결정한다. 제1 방향 움직임 벡터에 따른 제1 방향 예측, 제2 방향 움직임 벡터에 따른 제2 방향 예측, 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터에 따른 양방향 예측 중 현재 블록의 부호화에 이용되는 예측을 결정한다. In operation 1520, the video encoding apparatus determines prediction used for encoding the current block among first direction prediction, second direction prediction, and bidirectional prediction. A prediction used for encoding of a current block is determined among first direction prediction according to a first direction motion vector, second direction prediction according to a second direction motion vector, bidirectional prediction according to a first direction motion vector and a second direction motion vector do.

제1 방향 예측, 제2 방향 예측 및 양방향 예측 중 현재 블록을 가장 정확하게 예측할 수 있는 예측을 현재 블록을 부호화하는데 이용되는 예측으로 결정할 수 있다. 전술한 바와 같이 예측 블록과 현재 블록의 SAD가 가장 장은 예측이 현재 블록을 부호화하는데 이용되는 예측으로 결정될 수 있다.Among the first direction prediction, the second direction prediction, and the bidirectional prediction, a prediction that can predict the current block most accurately can be determined as a prediction used to encode the current block. As described above, the longest prediction between the prediction block and the SAD of the current block may be determined as a prediction used to encode the current block.

단계 1530에서 영상 부호화 장치는 단계 1530에서 결정된 예측의 예측 방향에 대한 정보를 부호화한다. 제1 방향, 제2 방향 및 양방향에 각각 이진수를 할당하고, 현재 블록의 부호화에 이용되는 예측 방향에 대응되는 이진수를 부호화할 수 있다. 부호화된 이진수를 소정의 엔트로피 부호화 방법에 의해 엔트로피 부호화될 수 있다. 예측 방향에 대한 정보가 시퀀스 파라미터, 슬라이스 파라미터 또는 블록 파라미터로서 부호화될 수 있다.In operation 1530, the image encoding apparatus encodes information about a prediction direction of prediction determined in operation 1530. Binary numbers may be allocated to the first direction, the second direction, and both directions, and binary numbers corresponding to the prediction direction used for encoding the current block may be encoded. The encoded binary number may be entropy encoded by a predetermined entropy encoding method. Information about the prediction direction may be encoded as a sequence parameter, slice parameter, or block parameter.

현재 블록의 픽셀 값들에 대한 정보도 부호화되는데, 현재 블록에서 예측 블록을 감산하여 생성된 레지듀얼 블록의 레지듀얼 값들에 대한 정보를 부호화할 수 있다. 레지듀얼 블록을 변환, 양자화 및 엔트로피 부호화할 수 있다. 또한, 전술한 바와 같이 예측 블록이 현재 블록과 동일함을 나타내는 플래그 정보만 부호화할 수도 있다.Information about pixel values of the current block is also encoded, and information about residual values of the residual block generated by subtracting the prediction block from the current block may be encoded. The residual block can be transformed, quantized, and entropy-encoded. Also, as described above, only the flag information indicating that the prediction block is the same as the current block may be encoded.

복수의 움직임 벡터 후보들에서 현재 블록의 부호화에 이용된 움직임 벡터를 특정하기 위한 정보도 부호화할 수 있다. 현재 블록 이전에 부호화된 적어도 하나의 블록의 움직임 벡터에 기초해 복수의 움직임 벡터 후보를 생성하고, 그 중 하나를 현재 블록의 움직임 벡터를 선택하여 현재 블록의 움직임 벡터로서 이용한 경우에 복수의 움직임 벡터 후보에서 선택된 움직임 벡터를 지시하는 정보를 부호화할 수 있다. 단계 1520에서 현재 블록의 예측 방향으로 제1 방향이 결정되었으면, 제1 방향 움직임 벡터에 대한 정보만 부호화되고, 단계 1530에서 현재 블록의 예측 방향으로 제2 방향이 결정되었으면, 제2 방향 움직임 벡터에 대한 정보만 부호화될 수 있다. 단계 1520에서 현재 블록의 예측 방향으로 양방향 예측이 결정되었으면, 제1 방향 움직임 벡터에 대한 정보 및 제2 방향 움직임 벡터에 대한 정보가 모두 부호화된다.Information for specifying a motion vector used for encoding the current block from a plurality of motion vector candidates may also be encoded. A plurality of motion vectors are generated when a plurality of motion vector candidates are generated based on the motion vectors of at least one block encoded before the current block, and one of them is selected as a motion vector of the current block by selecting one of them. Information indicating a motion vector selected from candidates may be encoded. If the first direction is determined in the prediction direction of the current block in step 1520, only information about the first direction motion vector is encoded, and in step 1530, if the second direction is determined in the prediction direction of the current block, in the second direction motion vector Only information about can be encoded. If the bidirectional prediction is determined in the prediction direction of the current block in step 1520, both information about the first direction motion vector and information about the second direction motion vector are encoded.

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

도 16을 참조하면, 단계 1610에서 영상 복호화 장치는 제1 방향, 제2 방향 및 양방향 중 현재 블록의 복호화에 이용되는 예측 방향에 대한 정보를 복호화한다. 비트스트림에 포함되어 있는 예측 방향에 대한 정보를 복호화한다. 제1 방향, 제2 방향 및 양방향 각각에 할당되어 있는 이진수는 현재 블록의 복호화에 이용되는 예측 방향에 대응되는 이진수를 복호화한다. 시퀀스 파라미터, 슬라이스 파라미터 또는 블록 파라미터로서 비트스트림에 포함되어 있는 예측 방향에 대한 정보를 복호화한다.Referring to FIG. 16, in step 1610, the image decoding apparatus decodes information about a prediction direction used for decoding a current block among first, second, and bidirectional directions. The information about the prediction direction included in the bitstream is decoded. Binary numbers assigned to each of the first direction, the second direction, and both directions decode binary numbers corresponding to the prediction direction used for decoding the current block. As a sequence parameter, slice parameter, or block parameter, information about a prediction direction included in a bitstream is decoded.

또한, 영상 복호화 장치는 단계 1610에서 현재 블록의 픽셀 값들에 대한 정보를 복호화한다. 현재 블록의 레지듀얼 블록에 포함된 레지듀얼 값들에 대한 정보를 복호화할 수 있다. 레지듀얼 블록에 대한 데이터를 엔트로피 복호화, 역양자화, 역변환하여 레지듀얼 블록을 복원한다. 현재 블록이 예측 블록과 동일함을 나타내는 정보를 복호화할 수도 있다.In addition, the image decoding apparatus decodes information about pixel values of the current block in step 1610. Information about residual values included in the residual block of the current block may be decoded. The residual block is reconstructed by entropy decoding, inverse quantization, and inverse transforming data on the residual block. Information indicating that the current block is the same as the prediction block may be decoded.

현재 블록의 움직임 벡터가 전술한 복수의 움직임 벡터 후보 중에서 결정되는 경우에는 복수의 움직임 벡터 후보에서 현재 블록의 복호화에 이용되는 움직임 벡터를 특정하기 위한 정보가 복호화될 수 있다. 예측 방향에 대한 정보를 복호화한 결과, 현재 블록의 예측 방향이 제1 방향이면, 복수의 움직임 벡터 후보에서 현재 블록의 제1 방향 움직임 벡터를 지시하는 정보가 복호화될 수 있고, 현재 블록의 예측 방향이 제2 방향이면, 복수의 움직임 벡터 후보에서 현재 블록의 제2 방향 움직임 벡터를 지시하는 정보가 복호화될 수 있다. 현재 블록의 예측 방향이 양방향이면, 복수의 움직임 벡터 후보에서 제1 방향 움직임 벡터 및 제2 방향 움직임 벡터를 지시하는 정보가 복호화될 수 있다.When the motion vector of the current block is determined from the plurality of motion vector candidates described above, information for specifying a motion vector used for decoding the current block from the plurality of motion vector candidates may be decoded. As a result of decoding the information about the prediction direction, if the prediction direction of the current block is the first direction, information indicating a first direction motion vector of the current block from a plurality of motion vector candidates may be decoded, and the prediction direction of the current block If this is the second direction, information indicating the second direction motion vector of the current block may be decoded from a plurality of motion vector candidates. If the prediction direction of the current block is bidirectional, information indicating the first direction motion vector and the second direction motion vector from a plurality of motion vector candidates may be decoded.

단계 1620에서 영상 복호화 장치는 단계 1610에서 복호화된 예측 방향에 대한 정보에 기초해 현재 블록의 예측 방향을 결정한다. 단계 1610에서 복호화된 예측 방향에 대응되는 이진수에 기초해 현재 블록의 예측 방향을 결정한다. 예측 방향에 결정되면, 결정된 예측 방향의 예측을 수행하기 위한 적어도 하나의 움직임 벡터를 결정한다. In step 1620, the image decoding apparatus determines a prediction direction of the current block based on the information about the prediction direction decoded in step 1610. In step 1610, the prediction direction of the current block is determined based on the binary number corresponding to the decoded prediction direction. When determined in the prediction direction, at least one motion vector for performing prediction of the determined prediction direction is determined.

전술한 바와 같이 부호화하는 측과 복호화하는 측 사이에 공유된 움직임 벡터 결정 방법에 따라 암시적으로 현재 블록의 움직임 벡터가 결정될 수 있다. 또한, 복수의 움직임 벡터 후보에서 현재 블록의 움직임 벡터를 명시적으로 선택한 경우에는 현재 블록 이전에 복호화된 적어도 하나의 블록의 움직임 벡터에 기초해 복수의 움직임 벡터 후보를 생성하고, 생성된 복수의 움직임 벡터 후보에서 현재 블록의 움직임 벡터를 결정할 수 있다. 단계 1610에서 복호화된 복수의 움직임 벡터 후보에서 현재 블록의 움직임 벡터를 지시하는 정보에 기초해 현재 블록의 움직임 벡터를 결정할 수 있다. 단계 1610에서 복호화된 정보에 기초해 제1 방향 움직임 벡터, 제2 방향 움직임 벡터 중 적어도 하나가 결정될 수 있다.As described above, a motion vector of a current block may be implicitly determined according to a method of determining a motion vector shared between a side that encodes and a side that decodes. In addition, when a motion vector of a current block is explicitly selected from a plurality of motion vector candidates, a plurality of motion vector candidates are generated based on the motion vectors of at least one block decoded before the current block, and the generated plurality of motions From the vector candidate, the motion vector of the current block can be determined. The motion vector of the current block may be determined based on information indicating the motion vector of the current block from the plurality of motion vector candidates decoded in step 1610. At least one of a first direction motion vector and a second direction motion vector may be determined based on the information decoded in step 1610.

단계 1630에서 영상 복호화 장치는 현재 블록을 복원한다. 단계 1620에서 결정된 현재 블록의 움직임 벡터에 기초해 예측 블록을 생성하고, 생성된 예측 블록에 기초해 현재 블록을 복원한다.In step 1630, the video decoding apparatus restores the current block. A prediction block is generated based on the motion vector of the current block determined in step 1620, and the current block is reconstructed based on the generated prediction block.

단계 1620에서 결정된 현재 블록의 제1 방향 움직임 벡터 및/또는 제2 방향 움직임 벡터에 기초해 제1 방향 예측, 제2 방향 예측 및 양방향 예측 중 하나를 수행하여, 현재 블록의 예측 블록을 생성한다. The prediction block of the current block is generated by performing one of the first direction prediction, the second direction prediction, and the bi-directional prediction based on the first direction motion vector and / or the second direction motion vector of the current block determined in step 1620.

단계 1610에서 레지듀얼 블록이 복원된 경우에는 생성된 예측 블록과 복원된 레지듀얼 블록을 가산하여 현재 블록을 복원한다. 단계 1610에서 예측 블록과 현재 블록과 현재 블록이 동일함을 나타내는 정보가 복호화된 경우에는 예측 블록이 현재 블록이 된다.When the residual block is restored in step 1610, the current block is restored by adding the generated prediction block and the restored residual block. In step 1610, when information indicating that the prediction block is the same as the current block and the current block is decoded, the prediction block becomes the current block.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명이 상기의 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명의 사상은 아래에 기재된 특허청구범위에 의해서만 파악되어야 하고, 이와 균등하거나 또는 등가적인 변형 모두는 본 발명 사상의 범주에 속한다 할 것이다. 또한, 본 발명에 따른 시스템은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. As described above, although the present invention has been described by limited embodiments and drawings, the present invention is not limited to the above embodiments, and various modifications and modifications from these descriptions will be made by those skilled in the art to which the present invention pertains. Deformation is possible. Accordingly, the spirit of the present invention should be understood only by the claims set forth below, and all equivalent or equivalent modifications thereof will fall within the scope of the spirit of the present invention. In addition, the system according to the present invention can be embodied as computer readable codes on a computer readable recording medium.

예를 들어, 본 발명의 예시적인 실시예에 따른 영상 부호화 장치, 영상 복호화 장치, 움직임 벡터 부호화 장치 및 움직임 벡터 복호화 장치는 도 1, 2, 4, 5, 9 및 14에 도시된 바와 같은 장치의 각각의 유닛들에 커플링된 버스, 상기 버스에 결합된 적어도 하나의 프로세서를 포함할 수 있다. 또한, 명령, 수신된 메시지 또는 생성된 메시지를 저장하기 위해 상기 버스에 결합되어, 전술한 바와 같은 명령들을 수행하기 위한 적어도 하나의 프로세서에 커플링된 메모리를 포함할 수 있다. For example, an image encoding apparatus, an image decoding apparatus, a motion vector encoding apparatus, and a motion vector decoding apparatus according to an exemplary embodiment of the present invention may include the apparatuses as shown in FIGS. 1, 2, 4, 5, 9, and 14. A bus coupled to each unit, and at least one processor coupled to the bus may be included. It may also include a memory coupled to the bus to store instructions, received messages or generated messages, coupled to at least one processor for performing the instructions as described above.

또한, 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광데이터 저장장치 등을 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.In addition, the computer-readable recording medium includes all kinds of recording devices in which data readable by a computer system is stored. Examples of the recording medium include ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage device. The computer-readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

Claims (2)

영상의 복호화 방법에 있어서,
비트스트림으로부터 획득된 분할 여부를 나타내는 정보에 따라 최대 부호화 단위를 적어도 하나의 부호화 단위로 계층적으로 분할하는 단계;
상기 적어도 하나의 부호화 단위 중 현재 부호화 단위에 포함된 현재 블록을 결정하는 단계;
상기 비트스트림으로부터 L0 방향, L1 방향 및 양방향 중 어느 하나를 나타내는 상기 현재 블록의 예측 방향에 대한 정보를 획득하는 단계;
상기 현재 블록의 이전에 복호화된 적어도 하나의 블록의 움직임 벡터에 기초하여 상기 현재 블록의 움직임 벡터 후보를 생성하는 단계; 및
상기 예측 방향에 대한 정보에 따라, 상기 움직임 벡터 후보에 포함된 L0 방향의 움직임 벡터 후보 및 L1 방향의 움직임 벡터 후보 중 적어도 어느 하나의 움직임 벡터 후보를 이용하여 상기 현재 블록의 적어도 하나의 움직임 벡터를 결정하는 단계를 포함하고,
상기 적어도 하나의 블록은, 상기 현재 블록의 좌하측 블록, 상기 좌하측 블록의 상측에 위치한 블록, 및 L0 방향 또는 L1 방향에 위치한 시간적 참조 픽처에 포함되며 상기 현재 블록과 동일 위치의 블록 중 적어도 하나를 포함하고,
상기 현재 블록의 움직임 벡터 후보가 L0 방향 또는 L1 방향에 위치한 시간적 참조 픽처에 포함되는 상기 현재 블록과 동일 위치의 블록의 움직임 벡터를 이용하여 결정되는 경우, 상기 동일 위치의 블록을 포함하는 상기 시간적 참조 픽처와 상기 동일 위치의 블록이 참조하는 참조 픽처 사이의 제 1 시간적 거리 및 상기 현재 블록을 포함하는 현재 픽처와 상기 현재 블록이 참조하는 참조 픽처 사이의 제 2 시간적 거리에 기초하여, 상기 동일 위치의 블록의 움직임 벡터를 스케일링함으로써, 상기 현재 블록의 움직임 벡터 후보가 결정되고,
상기 영상이 최대 크기를 갖는 상기 최대 부호화 단위로 분할되고, 상기 최대 부호화 단위는 심도를 가지는 상기 적어도 하나의 부호화 단위로 계층적으로 분할되고, 현재 심도의 부호화 단위는 상위 심도의 부호화 단위로부터 분할된 정사각형의 부호화 단위들 중 하나이며, 상기 현재 심도의 부호화 단위는 이웃 부호화 단위와 독립적으로 하위 심도의 부호화 단위로 분할되며,
상기 현재 심도의 부호화 단위가 예측 복호화를 위해 적어도 하나의 예측 단위들로 분할되는 경우, 상기 현재 블록은 상기 현재 심도의 부호화 단위를 분할한 적어도 하나의 예측 단위이고,
상기 현재 심도의 부호화 단위로부터 하나 이상의 변환 단위들이 결정되고, 상기 변환 단위를 이용하여 상기 부호화 단위에 대한 역변환이 수행되는 것을 특징으로 하는 영상 복호화 방법.
In the video decoding method,
Hierarchically dividing the largest coding unit into at least one coding unit according to information indicating whether split is obtained from the bitstream;
Determining a current block included in a current coding unit among the at least one coding unit;
Obtaining information about a prediction direction of the current block indicating one of the L0 direction, the L1 direction, and the bidirectional direction from the bitstream;
Generating a motion vector candidate of the current block based on a motion vector of at least one block previously decoded of the current block; And
According to the information on the prediction direction, at least one motion vector of the current block is used using at least one of a motion vector candidate in the L0 direction and a motion vector candidate in the L1 direction included in the motion vector candidate. Including determining
The at least one block is included in a lower left block of the current block, a block located above the left lower block, and a temporal reference picture located in the L0 direction or the L1 direction, and at least one of blocks having the same position as the current block Including,
When the motion vector candidate of the current block is determined using a motion vector of a block at the same position as the current block included in the temporal reference picture located in the L0 direction or the L1 direction, the temporal reference including the block at the same position Based on a first temporal distance between a picture and a reference picture referenced by the block at the same position and a second temporal distance between a current picture containing the current block and a reference picture referenced by the current block, at the same position By scaling a motion vector of a block, a motion vector candidate of the current block is determined,
The image is divided into the largest coding unit having the largest size, the largest coding unit is hierarchically divided into the at least one coding unit having a depth, and the coding unit of the current depth is split from the coding unit of the higher depth. One of the coding units of the square, the coding unit of the current depth is divided into coding units of the lower depth independently of the neighboring coding unit,
When the coding unit of the current depth is split into at least one prediction unit for prediction decoding, the current block is at least one prediction unit that splits the coding unit of the current depth,
At least one transform unit is determined from a coding unit of the current depth, and an inverse transform is performed on the coding unit using the transform unit.
영상을 복호화하는 장치에 있어서,
비트스트림으로부터 획득된 분할 여부를 나타내는 정보에 따라 최대 부호화 단위를 적어도 하나의 부호화 단위들로 계층적으로 분할하고, 상기 적어도 하나의 부호화 단위들 중 현재 부호화 단위에 포함된 현재 블록을 결정하고, 상기 비트스트림으로부터 L0 방향, L1 방향 및 양방향 중 어느 하나를 나타내는 상기 현재 블록의 예측 방향에 대한 정보를 획득하는 복호화부; 및
상기 현재 블록의 이전에 복호화된 적어도 하나의 블록의 움직임 벡터에 기초하여 상기 현재 블록의 움직임 벡터 후보를 생성하고, 상기 예측 방향에 대한 정보에 따라, 상기 움직임 벡터 후보에 포함된 L0 방향의 움직임 벡터 후보 및 L1 방향의 움직임 벡터 후보 중 적어도 어느 하나의 움직임 벡터 후보를 이용하여 상기 현재 블록의 적어도 하나의 움직임 벡터를 결정하는 움직임벡터결정부를 포함하고,
상기 적어도 하나의 블록은, 상기 현재 블록의 좌하측 블록, 상기 좌하측 블록의 상측에 위치한 블록, 및 L0 방향 또는 L1 방향에 위치한 시간적 참조 픽처에 포함되며 상기 현재 블록과 동일 위치의 블록 중 적어도 하나를 포함하고,
상기 현재 블록의 움직임 벡터 후보가 L0 방향 또는 L1 방향에 위치한 시간적 참조 픽처에 포함되는 상기 현재 블록과 동일 위치의 블록의 움직임 벡터를 이용하여 결정되는 경우, 상기 동일 위치의 블록을 포함하는 상기 시간적 참조 픽처와 상기 동일 위치의 블록이 참조하는 참조 픽처 사이의 제 1 시간적 거리 및 상기 현재 블록을 포함하는 현재 픽처와 상기 현재 블록이 참조하는 참조 픽처 사이의 제 2 시간적 거리에 기초하여, 상기 동일 위치의 블록의 움직임 벡터를 스케일링함으로써, 상기 현재 블록의 움직임 벡터 후보가 결정되고,
상기 영상이 최대 크기를 갖는 상기 최대 부호화 단위로 분할되고, 상기 최대 부호화 단위는 심도를 가지는 상기 적어도 하나의 부호화 단위로 계층적으로 분할되고, 현재 심도의 부호화 단위는 상위 심도의 부호화 단위로부터 분할된 정사각형의 부호화 단위들 중 하나이며, 상기 현재 심도의 부호화 단위는 이웃 부호화 단위와 독립적으로 하위 심도의 부호화 단위로 분할되며,
상기 현재 심도의 부호화 단위가 예측 복호화를 위해 적어도 하나의 예측 단위들로 분할되는 경우, 상기 현재 블록은 상기 현재 심도의 부호화 단위를 분할한 적어도 하나의 예측 단위이고,
상기 현재 심도의 부호화 단위로부터 하나 이상의 변환 단위들이 결정되고, 상기 변환 단위를 이용하여 상기 부호화 단위에 대한 역변환이 수행되는 것을 특징으로 하는 영상 복호화 장치.
A device for decoding an image,
A maximum coding unit is hierarchically divided into at least one coding unit according to information indicating whether split is obtained from a bitstream, a current block included in a current coding unit among the at least one coding unit is determined, and the A decoder for obtaining information on a prediction direction of the current block indicating one of a L0 direction, a L1 direction, and a bidirectional direction from a bitstream; And
A motion vector candidate of the current block is generated based on a motion vector of at least one block previously decoded in the current block, and a motion vector in the L0 direction included in the motion vector candidate is generated according to information on the prediction direction. And a motion vector determination unit for determining at least one motion vector of the current block using at least one motion vector candidate among a candidate and a motion vector candidate in the L1 direction,
The at least one block is included in a lower left block of the current block, a block located above the left lower block, and a temporal reference picture located in the L0 direction or the L1 direction, and at least one of blocks having the same position as the current block Including,
When the motion vector candidate of the current block is determined using a motion vector of a block at the same position as the current block included in the temporal reference picture located in the L0 direction or the L1 direction, the temporal reference including the block at the same position Based on a first temporal distance between a picture and a reference picture referenced by the block at the same position and a second temporal distance between a current picture containing the current block and a reference picture referenced by the current block, at the same position By scaling a motion vector of a block, a motion vector candidate of the current block is determined,
The image is divided into the largest coding unit having the largest size, the largest coding unit is hierarchically divided into the at least one coding unit having a depth, and the coding unit of the current depth is split from the coding unit of the higher depth. One of the coding units of the square, the coding unit of the current depth is divided into coding units of the lower depth independently of the neighboring coding unit,
When the coding unit of the current depth is split into at least one prediction unit for prediction decoding, the current block is at least one prediction unit that splits the coding unit of the current depth,
An image decoding apparatus characterized in that one or more transform units are determined from the coding units of the current depth, and inverse transform is performed on the coding units using the transform units.
KR1020190113011A 2010-01-19 2019-09-11 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block KR102114421B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US29614110P 2010-01-19 2010-01-19
US61/296,141 2010-01-19

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020180055041A Division KR102027474B1 (en) 2010-01-19 2018-05-14 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block

Publications (2)

Publication Number Publication Date
KR20190108539A KR20190108539A (en) 2019-09-24
KR102114421B1 true KR102114421B1 (en) 2020-05-22

Family

ID=44922600

Family Applications (5)

Application Number Title Priority Date Filing Date
KR1020110005377A KR101607308B1 (en) 2010-01-19 2011-01-19 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block
KR1020160034725A KR101752763B1 (en) 2010-01-19 2016-03-23 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block
KR1020170080735A KR101859451B1 (en) 2010-01-19 2017-06-26 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block
KR1020180055041A KR102027474B1 (en) 2010-01-19 2018-05-14 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block
KR1020190113011A KR102114421B1 (en) 2010-01-19 2019-09-11 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block

Family Applications Before (4)

Application Number Title Priority Date Filing Date
KR1020110005377A KR101607308B1 (en) 2010-01-19 2011-01-19 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block
KR1020160034725A KR101752763B1 (en) 2010-01-19 2016-03-23 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block
KR1020170080735A KR101859451B1 (en) 2010-01-19 2017-06-26 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block
KR1020180055041A KR102027474B1 (en) 2010-01-19 2018-05-14 Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block

Country Status (4)

Country Link
JP (1) JP2016154395A (en)
KR (5) KR101607308B1 (en)
CN (1) CN105025298B (en)
PH (4) PH12016501593B1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101293200B1 (en) * 2011-09-23 2013-08-05 세종대학교산학협력단 Method and apparatus for hevc image encoding
KR102070431B1 (en) * 2012-01-19 2020-01-28 삼성전자주식회사 Method and apparatus for encoding video with restricting bi-directional prediction and block merging, method and apparatus for decoding video
KR101510585B1 (en) * 2013-01-29 2015-04-08 세종대학교산학협력단 Device and method for encoding/decoding motion information
WO2017195914A1 (en) * 2016-05-11 2017-11-16 엘지전자 주식회사 Inter prediction method and apparatus in video coding system
CN116567262A (en) 2016-05-24 2023-08-08 韩国电子通信研究院 Image encoding/decoding method and recording medium therefor
US11647228B2 (en) 2016-07-15 2023-05-09 Lg Electronics Inc. Method and apparatus for encoding and decoding video signal using transform domain prediction for prediction unit partition
CN111083933B (en) * 2018-08-21 2023-02-03 华为技术有限公司 Data storage and acquisition method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004208258A (en) * 2002-04-19 2004-07-22 Matsushita Electric Ind Co Ltd Motion vector calculating method
US8064520B2 (en) * 2003-09-07 2011-11-22 Microsoft Corporation Advanced bi-directional predictive coding of interlaced video
KR101042623B1 (en) * 2004-11-17 2011-06-20 삼성전자주식회사 Method for deinterlacing in use of field variable partition type and apparatus thereof
KR101330630B1 (en) * 2006-03-13 2013-11-22 삼성전자주식회사 Method and apparatus for encoding moving picture, method and apparatus for decoding moving picture, applying adaptively an optimal prediction mode
KR101505195B1 (en) * 2008-02-20 2015-03-24 삼성전자주식회사 Method for direct mode encoding and decoding
KR101517768B1 (en) * 2008-07-02 2015-05-06 삼성전자주식회사 Method and apparatus for encoding video and method and apparatus for decoding video

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Guillaume L. et al., "RD optimized coding for motion vector predictor selection", IEEE Trans. On CSVT, Vol. 18, No. 9, September 2008*
Jaeil KIm et al., "Enlarging MB size for high fidelity video coding beyond HD",ITU-T STUDY GROUP 16 Question 6, 36th meeting, 8-10 October, 2008*

Also Published As

Publication number Publication date
KR20180067472A (en) 2018-06-20
PH12016501593A1 (en) 2017-07-10
KR20160046319A (en) 2016-04-28
PH12016501593B1 (en) 2017-07-10
KR20110085925A (en) 2011-07-27
PH12016501595B1 (en) 2017-07-10
KR102027474B1 (en) 2019-10-01
PH12016501594B1 (en) 2017-07-10
CN105025298A (en) 2015-11-04
KR101607308B1 (en) 2016-03-29
PH12016501594A1 (en) 2017-07-10
KR101752763B1 (en) 2017-06-30
CN105025298B (en) 2019-04-16
PH12016501595A1 (en) 2017-07-10
KR20190108539A (en) 2019-09-24
KR101859451B1 (en) 2018-05-21
PH12016501592B1 (en) 2017-07-10
JP2016154395A (en) 2016-08-25
PH12016501592A1 (en) 2017-07-10
KR20170094096A (en) 2017-08-17

Similar Documents

Publication Publication Date Title
JP5856268B2 (en) Video decoding method
KR102114421B1 (en) Method and apparatus for encoding/decoding image by using motion vector of previous block as motion vector of current block
KR20110085896A (en) Method and apparatus for encoding/decoding motion vector based on reduced motion vector predictor candidates
KR20110083365A (en) Method and apparatus for encoding/decoding motion vector
KR101691553B1 (en) Method and apparatus for decoding image
KR101882949B1 (en) Method and apparatus for encoding image, and computer-readable medium
KR101783965B1 (en) Method and apparatus for decoding image
KR101477546B1 (en) Apparatus for decoding motion vector
KR20140064757A (en) Method and apparatus for encoding/decoding motion vector
KR101477545B1 (en) Method for decoding motion vector
JP6935553B2 (en) Methods and Devices for Coding / Decoding Motion Vectors Based on Reduced Predicted Motion Vector Candidates
KR101617796B1 (en) Method and apparatus for decoding image
KR101606812B1 (en) Method and apparatus for decoding image
KR101454664B1 (en) Method for decoding motion vector
AU2015201666B2 (en) Method and apparatus for encoding and decoding motion vector based on reduced motion vector predictor candidates
KR20140136415A (en) Method and apparatus for encoding/decoding motion vector

Legal Events

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