KR20140067996A - Method and apparatus for image encoding, and method and apparatus for image decoding - Google Patents

Method and apparatus for image encoding, and method and apparatus for image decoding Download PDF

Info

Publication number
KR20140067996A
KR20140067996A KR1020140058653A KR20140058653A KR20140067996A KR 20140067996 A KR20140067996 A KR 20140067996A KR 1020140058653 A KR1020140058653 A KR 1020140058653A KR 20140058653 A KR20140058653 A KR 20140058653A KR 20140067996 A KR20140067996 A KR 20140067996A
Authority
KR
South Korea
Prior art keywords
unit
depth
encoding
coding
information
Prior art date
Application number
KR1020140058653A
Other languages
Korean (ko)
Other versions
KR101489222B1 (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
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=51124039&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=KR20140067996(A) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR20140058653A priority Critical patent/KR101489222B1/en
Publication of KR20140067996A publication Critical patent/KR20140067996A/en
Application granted granted Critical
Publication of KR101489222B1 publication Critical patent/KR101489222B1/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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability

Abstract

Disclosed are a method and an apparatus to encode an image and a method and an apparatus to decode the image. The method to encode an image comprises: splitting a current picture into maximum coding units; determining a split structure of the maximum coding units and a prediction mode and reduction of each split coding unit by encoding image data of the maximum coding units based on the depths of the coding units; setting reduction information and skip mode information about each of the coding units and the reduction information containing whether a coding unit of a lower depth, whereby each of the coding units is included, is split or not; and encoding the reduction information and skip mode information set according to each coding unit.

Description

영상의 부호화 방법 및 장치, 영상 복호화 방법 및 장치{Method and apparatus for image encoding, and method and apparatus for image decoding}BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image encoding method and apparatus,

본 발명은 영상의 부호화 및 복호화에 관한 것이다.The present invention relates to encoding and decoding of images.

영상의 예측 부호화에는 인트라 예측 및 인터 예측 방식이 있다. 인트라 예측은 단일 프레임 내에서 인접한 픽셀들의 상관관계(correlation)에 기초한 예측 방식이다. 인터 예측은 움직임 예측 및 보상을 통해 인접 프레임으로부터 부호화되는 데이터와 유사한 영역을 예측하는 방식이다.There are intra prediction and inter prediction methods for predictive coding of an image. Intra prediction is a prediction method based on the correlation of adjacent pixels within a single frame. Inter prediction is a method of predicting an area similar to data to be encoded from adjacent frames through motion prediction and compensation.

일반적으로 어느 블록의 움직임 벡터는 인접 블록의 움직임 벡터와 밀접한 상관 관계를 가진다. 그렇기 때문에 인접 블록으로부터 현재 블록의 움직임 벡터를 예측하고 현재 블록의 움직임 벡터와 예측 움직임 벡터와의 차분 움직임 벡터만을 부호화함으로써, 부호화시에 발생되는 비트량을 줄일 수 있다.Generally, a motion vector of a certain block has a close correlation with a motion vector of an adjacent block. Therefore, the amount of bits generated at the time of encoding can be reduced by predicting the motion vector of the current block from the adjacent block and encoding only the difference motion vector between the motion vector of the current block and the predicted motion vector.

스킵 모드는 매크로블록의 움직임 벡터가 주변 블록의 움직임 벡터를 이용하여 예측된 예측 움직임 벡터와 동일하고, 예측 오차가 충분히 작은 경우 선택되는 모드이다. 매크로블록의 예측 모드로서 스킵 모드가 선택된 경우 부호화기는 매크로블록이 스킵 모드 정보만을 전송하며 레지듀얼 데이터는 전송하지 않는다. 복호화기에서는 스킵 모드로 부호화된 매크로블록에 대해서 그 주변 블록으로부터 예측된 예측 움직임 벡터를 이용하여 움직임 보상을 수행하여 매크로블록을 복원할 수 있다.The skip mode is a mode in which a motion vector of a macroblock is the same as a predicted motion vector predicted using a motion vector of a neighboring block, and is selected when the prediction error is sufficiently small. When the skip mode is selected as the prediction mode of the macroblock, the encoder transmits only the skip mode information and does not transmit the residual data. The decoder can recover the macroblock by performing motion compensation using the predicted motion vector predicted from the neighboring block for the macroblock coded in the skip mode.

본 발명이 해결하고자 하는 기술적 과제는 다양한 크기의 계층적 부호화 단위에 기초하여 부호화된 영상의 분할 형태 정보 및 각 부호화 단위의 스킵 모드 정보를 효율적으로 전송하는 영상 부호화, 복호화 방법 및 장치를 제공하는 것이다.Disclosure of Invention Technical Problem [8] The present invention provides a method and apparatus for encoding and decoding image data, which is based on hierarchical encoding units of various sizes, and efficiently transmits skip mode information of each encoding unit .

본 발명의 일 실시예에 따른 영상 부호화 방법은 현재 픽처를 최대 크기의 부호화 단위인 적어도 하나의 최대 부호화 단위로 분할하는 단계; 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 상기 최대 부호화 단위의 영상 데이터를 부호화하여 상기 최대 부호화 단위의 분할 형태 및 분할된 각 부호화 단위의 예측 모드를 결정하는 단계; 상기 각 부호화 단위마다 상기 각 부호화 단위가 포함되는 하위 심도의 부호화 단위의 분할 여부를 포함하는 축소 정보를 설정하는 단계; 상기 각 부호화 단위마다 상기 결정된 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 설정하는 단계; 및 상기 각 부호화 단위마다 설정된 축소 정보 및 스킵 정보를 부호화하는 단계를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided an image encoding method including: dividing a current picture into at least one maximum encoding unit which is a maximum-size encoding unit; Determining a division mode of the maximum coding unit and a prediction mode of each of the divided coding units by encoding the image data of the maximum coding unit on the basis of the depth coding unit that is hierarchically reduced as the depth increases; Setting shrink information including whether or not a lower-depth encoding unit including the encoding unit is divided for each encoding unit; Setting skip information indicating whether the determined prediction mode is a skip mode for each coding unit; And encoding the reduced information and skip information set for each encoding unit.

본 발명의 다른 실시예에 따른 영상 부호화 방법은 현재 픽처를 최대 크기의 부호화 단위인 적어도 하나의 최대 부호화 단위로 분할하는 단계; 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 상기 최대 부호화 단위의 영상 데이터를 부호화하여 상기 최대 부호화 단위의 분할 형태 및 분할된 각 부호화 단위의 예측 모드를 결정하는 단계; 상기 각 부호화 단위마다 상기 각 부호화 단위 및 상기 각 부호화 단위가 포함되는 하위 심도의 예측 모드가 스킵 모드인지 여부를 포함하는 스킵 정보를 설정하는 단계; 상기 각 부호화 단위마다 상기 각 부호화 단위가 포함되는 하위 심도의 부호화 단위의 분할 여부를 포함하는 축소 정보를 설정하는 단계; 및 상기 각 부호화 단위마다 설정된 축소 정보 및 스킵 정보를 부호화하는 단계를 포함하는 것을 특징으로 한다.According to another aspect of the present invention, there is provided an image encoding method including: dividing a current picture into at least one maximum encoding unit which is a maximum-size encoding unit; Determining a division mode of the maximum coding unit and a prediction mode of each of the divided coding units by encoding the image data of the maximum coding unit on the basis of the depth coding unit that is hierarchically reduced as the depth increases; Setting skip information including whether the prediction mode of the lower depth including the coding unit and the coding unit is a skip mode for each coding unit; Setting shrink information including whether or not a lower-depth encoding unit including the encoding unit is divided for each encoding unit; And encoding the reduced information and skip information set for each encoding unit.

본 발명의 일 실시예에 따른 영상 복호화 방법은 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 최대 크기의 부호화 단위인 최대 부호화 단위별로 부호화된 영상 데이터로부터, 복호화되는 현재 복호화 단위가 포함되는 하위 심도의 복호화 단위의 분할 여부를 포함하는 축소 정보를 추출하는 단계; 상기 영상 데이터로부터 상기 현재 복호화 단위의 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 추출하는 단계; 상기 축소 정보에 따라서 상기 현재 복호화 단위가 포함된 최대 복호화 단위의 분할 형태를 결정하는 단계; 및 상기 스킵 정보에 따라서 상기 현재 복호화 단위의 예측 모드가 스킵 모드인지 여부를 판단하는 단계를 포함하는 것을 특징으로 한다.The image decoding method according to an embodiment of the present invention is a method for decoding a current decoded image data from image data encoded for each maximum encoding unit, which is a maximum-size encoding unit, based on a depth- Extracting reduced information including whether or not the decoding unit of the lower depth including the division is included; Extracting skip information indicating whether the prediction mode of the current decoding unit is a skip mode from the image data; Determining a division type of a maximum decoding unit including the current decoding unit according to the reduction information; And determining whether the prediction mode of the current decoding unit is a skip mode according to the skip information.

본 발명의 다른 실시예에 따른 영상 복호화 방법은 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 최대 크기의 부호화 단위인 최대 부호화 단위별로 부호화된 영상 데이터로부터, 복호화되는 현재 복호화 단위 및 상기 현재 복호화 단위가 포함되는 하위 심도의 복호화 단위의 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 추출하는 단계; 상기 현재 복호화 단위가 포함되는 하위 심도의 복호화 단위의 분할 여부를 포함하는 축소 정보를 추출하는 단계; 상기 추출된 스킵 정보에 따라서 상기 현재 복호화 단위 및 상기 하위 심도의 복호화 단위의 예측 모드가 스킵 모드인지 여부를 판단하는 단계; 및 상기 축소 정보에 따라서 상기 현재 복호화 단위가 포함된 최대 복호화 단위의 분할 형태를 결정하는 단계를 포함하는 것을 특징으로 한다.The image decoding method according to another exemplary embodiment of the present invention is a method for decoding a current decoded image data from image data encoded for each maximum encoding unit, which is a maximum-size encoding unit, based on a depth- And extracting skip information indicating whether a prediction mode of a lower-resolution decoding unit including the current decoding unit is a skip mode; Extracting reduced information including whether to divide a decoding unit of a lower depth including the current decoding unit; Determining whether a prediction mode of a decoding unit of the current decoding unit and the lower decoding unit is a skip mode according to the extracted skip information; And determining a division type of the maximum decoding unit including the current decoding unit according to the reduction information.

본 발명의 일 실시예에 따른 영상 부호화 장치는 현재 픽처를 최대 크기의 부호화 단위인 적어도 하나의 최대 부호화 단위로 분할하는 최대 부호화 단위 분할부; 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 상기 최대 부호화 단위의 영상 데이터를 부호화하여 상기 최대 부호화 단위의 분할 형태 및 분할된 각 부호화 단위의 예측 모드를 결정하는 부호화 심도 결정부; 상기 각 부호화 단위마다 상기 각 부호화 단위가 포함되는 하위 심도의 부호화 단위의 분할 여부를 포함하는 축소 정보 및 상기 각 부호화 단위마다 상기 결정된 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 설정하고 상기 설정된 축소 정보 및 스킵 정보를 부호화하는 부호화 정보 부호화부를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided an image encoding apparatus including: a maximum encoding unit division unit for dividing a current picture into at least one maximum encoding unit, which is a maximum-size encoding unit; A coding depth determination unit for determining a division mode of the maximum coding unit and a prediction mode of each divided coding unit by encoding image data of the maximum coding unit on the basis of the depth coding unit as the depth increases, ; Setting skip information indicating whether skip mode is determined for each of the encoding units and skip information indicating whether skip mode is determined for each of the encoding units; And an encoded information encoding unit for encoding the information and skip information.

본 발명의 다른 실시예에 따른 영상 부호화 장치는 현재 픽처를 최대 크기의 부호화 단위인 적어도 하나의 최대 부호화 단위로 분할하는 최대 부호화 단위 분할부; 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호 단위에 기반하여 상기 최대 부호화 단위의 영상 데이터를 부호화하여 상기 최대 부호화 단위의 분할 형태 및 분할된 각 부호화 단위의 예측 모드를 결정하는 부호화 심도 결정부; 상기 각 부호화 단위마다 상기 각 부호화 단위 및 상기 각 부호화 단위가 포함되는 하위 심도의 예측 모드가 스킵 모드인지 여부를 포함하는 스킵 정보 및 상기 각 부호화 단위마다 상기 각 부호화 단위가 포함되는 하위 심도의 부호화 단위의 분할 여부를 포함하는 축소 정보를 설정하고 상기 각 부호화 단위마다 상기 설정된 축소 정보 및 스킵 정보를 부호화하는 부호화 정보 부호화부를 포함하는 것을 특징으로 한다.According to another aspect of the present invention, there is provided an image encoding apparatus including: a maximum encoding unit division unit for dividing a current picture into at least one maximum encoding unit, which is a maximum size encoding unit; A coding depth determination unit for determining a division mode of the maximum coding unit and a prediction mode of each divided coding unit by coding the image data of the maximum coding unit on the basis of the depth- ; Wherein the coding unit includes skip information including whether the prediction mode of the lower depth including the coding unit and the coding unit is a skip mode for each coding unit, And a coding information coding unit for coding the set down information and the skip information for each coding unit.

본 발명의 일 실시예에 따른 영상 복호화 장치는 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 최대 크기의 부호화 단위인 최대 부호화 단위별로 부호화된 영상 데이터로부터, 복호화되는 현재 복호화 단위가 포함되는 하위 심도의 복호화 단위의 분할 여부를 포함하는 축소 정보 및 상기 현재 복호화 단위의 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 추출하는 부호화 정보 추출부; 및 상기 축소 정보에 따라서 상기 현재 복호화 단위가 포함된 최대 복호화 단위의 분할 형태를 결정하고, 상기 스킵 정보에 따라서 상기 현재 복호화 단위의 예측 모드가 스킵 모드인지 여부를 판단하는 복호화부를 포함하는 것을 특징으로 한다.The image decoding apparatus according to an embodiment of the present invention decodes a current decoding unit to be decoded from image data encoded per a maximum encoding unit, which is a maximum-size encoding unit, based on a depth- And a skip information indicating whether the prediction mode of the current decoding unit is a skip mode or not; And a decoding unit that determines a division type of the maximum decoding unit including the current decoding unit according to the reduction information and determines whether the prediction mode of the current decoding unit is a skip mode according to the skip information, do.

본 발명의 다른 실시예에 따른 영상 복호화 장치는 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 최대 크기의 부호화 단위인 최대 부호화 단위별로 부호화된 영상 데이터로부터, 복호화되는 현재 복호화 단위 및 상기 현재 복호화 단위가 포함되는 하위 심도의 복호화 단위의 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보 및 상기 현재 복호화 단위가 포함되는 하위 심도의 복호화 단위의 분할 여부를 포함하는 축소 정보를 추출하는 부호화 정보 추출부; 및 상기 추출된 스킵 정보에 따라서 상기 현재 복호화 단위 및 상기 하위 심도의 복호화 단위의 예측 모드가 스킵 모드인지 여부를 판단하고, 상기 축소 정보에 따라서 상기 현재 복호화 단위가 포함된 최대 복호화 단위의 분할 형태를 결정하는 복호화부를 포함하는 것을 특징으로 한다.The apparatus for decoding an image according to another embodiment of the present invention decodes a current decoded image unit from decoded image data of each maximum encoding unit, which is a maximum-size encoding unit, based on a depth- And skip information indicating whether a prediction mode of a decoding unit of a lower depth including the current decoding unit is a skip mode and a decoding process of extracting reduced information including whether to divide a decoding unit of a lower depth including the current decoding unit An information extracting unit; And determining whether the prediction mode of the decoding unit of the current decoding unit and the lower depth decoding unit is a skip mode according to the extracted skip information, and determining a division type of the maximum decoding unit including the current decoding unit according to the reduction information And a decoding unit for deciding the decoding result.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치의 블록도이다.
도 2 는 본 발명의 일 실시예에 따른 영상 복호화 장치의 블록도를 도시한다.
도 3은 본 발명의 일 실시예에 따른 계층적 부호화 단위를 도시한다.
도 4 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부의 블록도를 나타낸 것이다.
도 5 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부의 블록도를 나타낸 것이다.
도 6은 본 발명의 일 실시예에 따른 심도별 부호화 단위 및 예측 단위를 도시한다.
도 7은 본 발명의 일 실시예에 따른, 부호화 단위 및 변환 단위의 관계를 도시한다.
도 8은 본 발명의 일 실시예에 따라, 심도별 부호화 정보들을 도시한다.
도 9 는 본 발명의 일 실시예에 따른 심도별 부호화 단위를 도시한다.
도 10a 및 10b는 본 발명의 일 실시예에 따른, 부호화 단위, 예측 단위 및 주파수 변환 단위의 관계를 도시한다.
도 11 은 본 발명의 일 실시예에 따른 부호화 단위별 부호화 정보를 도시한다.
도 12는 본 발명의 일 실시예에 따라 심도별 부호화 단위에 기반하여 결정된 최대 부호화 단위의 분할 형태의 일 예이다.
도 13은 도 12의 심도 2의 부호화 단위(1220)가 갖는 축소 정보를 설명하기 위한 도면이다.
도 14는 도 12의 심도 3의 부호화 단위(1230)가 갖는 축소 정보를 설명하기 위한 도면이다.
도 15에 본 발명의 일 실시예에서 따른 부호화 단위의 처리 순서의 일 예를 나타낸 도면이다.
도 16은 본 발명의 일 실시예에 따른 영상 부호화 방법을 나타낸 플로우 차트이다.
도 17은 본 발명의 다른 실시예에 따른 영상 부호화 방법을 나타낸 플로우 차트이다.
도 18은 본 발명의 일 실시예에 따른 영상 복호화 방법을 나타낸 플로우 차트이다.
도 19는 본 발명의 일 실시예에 따른 영상 복호화 방법에 따라 최대 크기 복호화 단위를 분할하는 과정 및 스킵 정보를 복호화하는 과정을 나타낸 플로우 차트이다.
도 20은 본 발명의 다른 실시예에 따른 영상 복호화 방법을 나타낸 플로우 차트이다.
도 21은 본 발명의 다른 실시예에 따른 영상 복호화 방법에 따라 최대 크기 복호화 단위를 분할하는 과정 및 스킵 정보를 복호화하는 과정을 나타낸 플로우 차트이다.
1 is a block diagram of an image encoding apparatus according to an embodiment of the present invention.
2 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.
FIG. 3 illustrates a hierarchical encoding unit according to an embodiment of the present invention.
4 is a block diagram of an image encoding unit based on an encoding unit according to an embodiment of the present invention.
5 is a block diagram of an image decoding unit based on an encoding unit according to an embodiment of the present invention.
FIG. 6 illustrates a depth-based coding unit and a prediction unit according to an embodiment of the present invention.
FIG. 7 shows a relationship between an encoding unit and a conversion unit according to an embodiment of the present invention.
FIG. 8 illustrates depth-specific encoding information, in accordance with an embodiment of the present invention.
FIG. 9 shows a depth encoding unit according to an embodiment of the present invention.
FIGS. 10A and 10B show a relationship between an encoding unit, a prediction unit, and a frequency conversion unit according to an embodiment of the present invention.
FIG. 11 shows encoding information for each encoding unit according to an embodiment of the present invention.
12 is an example of a division type of the maximum encoding unit determined based on the depth encoding unit according to an embodiment of the present invention.
13 is a diagram for explaining reduction information that the encoding unit 1220 in the depth 2 of FIG. 12 has.
FIG. 14 is a diagram for explaining reduction information possessed by the encoding unit 1230 in the depth 3 of FIG.
FIG. 15 is a diagram illustrating an example of a processing procedure of an encoding unit according to an embodiment of the present invention.
16 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.
17 is a flowchart illustrating an image encoding method according to another embodiment of the present invention.
18 is a flowchart illustrating a video decoding method according to an embodiment of the present invention.
FIG. 19 is a flowchart illustrating a process of dividing a maximum-size decoding unit according to an image decoding method according to an embodiment of the present invention and decoding skip information.
20 is a flowchart illustrating a video decoding method according to another embodiment of the present invention.
FIG. 21 is a flowchart illustrating a process of dividing a maximum-size decoding unit and decoding skip information according to the image decoding method according to another embodiment of the present invention.

이하 첨부된 도면을 참조하여 본 발명의 바람직한 실시예들에 따른 영상 부호화 장치 및 영상 복호화 장치, 영상 부호화 방법 및 영상 복호화 방법을 설명한다.Hereinafter, an image encoding apparatus, an image decoding apparatus, an image encoding method, and an image decoding method according to preferred embodiments of the present invention will be described with reference to the accompanying drawings.

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

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

최대 부호화 단위 분할부(110)는 최대 크기의 부호화 단위인 최대 부호화 단위에 기반하여 현재 픽처 또는 현재 슬라이스를 분할한다. 현재 픽처 또는 현재 슬라이스는 적어도 하나의 최대 부호화 단위로 분할된다. 분할된 영상 데이터는 적어도 하나의 최대 부호화 단위별로 부호화 심도 결정부(120)로 출력될 수 있다.The maximum coding unit division unit 110 divides the current picture or the current slice based on the maximum coding unit which is the coding unit of the maximum size. The current picture or current slice is divided into at least one maximum encoding unit. The divided image data may be output to the coding depth determination unit 120 for each of at least one maximum coding unit.

본 발명의 일 실시예에 따르면, 최대 부호화 단위 및 심도를 이용해 부호화 단위가 표현될 수 있다. 최대 부호화 단위는 현재 픽처의 부호화 단위 중 크기가 가장 큰 부호화 단위를 나타내며, 심도는 부호화 단위가 계층적으로 축소된 서브 부호화 단위의 크기를 나타낸다. 심도가 커지면서, 부호화 단위는 최대 부호화 단위로부터 최소 부호화 단위까지 축소될 수 있으며, 최대 부호화 단위의 심도는 최소 심도로 정의되고, 최소 부호화 단위의 심도는 최대 심도로 정의될 수 있다. 최대 부호화 단위는 심도가 커짐에 따라 심도별 부호화 단위의 크기는 감소하므로, k 심도의 서브 부호화 단위는 k+1 이상의 심도를 갖는 복수 개의 서브 부호화 단위를 포함할 수 있다.According to an embodiment of the present invention, an encoding unit can be expressed using a maximum encoding unit and a depth. The maximum coding unit indicates the largest coding unit among the coding units of the current picture, and the depth indicates the size of the sub-coding unit in which the coding unit is hierarchically reduced. As the depth increases, the encoding unit can be reduced from the maximum encoding unit to the minimum encoding unit, the depth of the maximum encoding unit can be defined as the minimum depth, and the depth of the minimum encoding unit can be defined as the maximum depth. As the depth of the maximum encoding unit increases, the size of the depth-dependent encoding unit decreases. Therefore, the sub-encoding unit of k depth may include a plurality of sub-encoding units having a depth of k + 1 or more.

전술한 바와 같이 부호화 단위의 최대 크기에 따라, 현재 픽처의 영상 데이터를 최대 부호화 단위로 분할하며, 각각의 최대 부호화 단위는 심도별로 축소되는 부호화 단위들을 포함할 수 있다. 본 발명의 일 실시예에 따른 최대 부호화 단위는 심도별로 축소되므로, 최대 부호화 단위에 포함된 공간 영역(spatial domain)의 영상 데이터가 심도에 따라 계층적으로 분류될 수 있다. As described above, according to the maximum size of the encoding unit, the image data of the current picture is divided into a maximum encoding unit, and each maximum encoding unit may include encoding units reduced by depth. Since the maximum encoding unit according to an embodiment of the present invention is reduced by depth, image data of a spatial domain included in the maximum encoding unit can be hierarchically classified according to depth.

최대 부호화 단위로부터 최상위 부호화 단위까지 현재 부호화 단위의 높이 및 너비를 계층적으로 축소한 총 횟수를 제한하는 최대 심도 및 부호화 단위의 최대 크기가 미리 설정되어 있을 수 있다. 이러한 최대 부호화 단위 및 최대 심도는 픽처 또는 슬라이스 단위로 설정될 수 있다. 즉, 픽처 또는 슬라이스마다 상이한 최대 부호화 단위 및 최대 심도를 갖을 수 있으며, 최대 심도에 따라 최대 영상 부호화 단위에 포함된 최소 부호화 단위 크기를 가변적으로 설정할 수 있다. 이와 같이 픽처 또는 슬라이스마다 최대 부호화 단위 및 최대 심도를 가변적으로 설정할 수 있게 함으로써, 평탄한 영역의 영상은 보다 큰 최대 부호화 단위를 이용하여 부호화함으로써 압축률을 향상시키고, 복잡도가 큰 영상은 보다 작은 크기의 부호화 단위를 이용하여 영상의 압축 효율을 향상시킬 수 있다.The maximum depth for limiting the total number of times the height and width of the current encoding unit are hierarchically reduced from the maximum encoding unit to the highest encoding unit and the maximum size of the encoding unit may be preset. The maximum encoding unit and the maximum depth may be set in units of pictures or slices. That is, each picture or slice may have a different maximum coding unit and maximum depth, and the minimum coding unit size included in the maximum image coding unit may be variably set according to the maximum depth. By setting the maximum coding unit and the maximum depth for each picture or slice in this manner, it is possible to improve the compression ratio by coding the image of the flat area using a larger maximum coding unit, and the image with a large complexity can be encoded The compression efficiency of the image can be improved by using the unit.

부호화 심도 결정부(120)는 최대 부호화 단위마다 상이한 최대 심도를 결정한다. 최대 심도는 R-D 코스트(Rate-Distortion Cost) 계산에 기초해 결정될 수 있다. 결정된 최대 심도는 부호화 정보 부호화부(140)로 출력되고, 최대 부호화 단위별 영상 데이터는 영상 데이터 부호화부(130)로 출력된다. The encoding depth determination unit 120 determines a maximum depth that is different for each maximum encoding unit. The maximum depth may be determined based on the Rate-Distortion Cost calculation. The determined maximum depth is output to the encoding information encoding unit 140, and the image data for each maximum encoding unit is output to the image data encoding unit 130.

최대 부호화 단위 내의 영상 데이터는 최대 심도 이하의 적어도 하나의 심도에 따라 심도별 부호화 단위에 기반하여 부호화되고, 각각의 심도별 부호화 단위에 기반한 부호화 결과가 비교된다. 심도별 부호화 단위의 부호화 오차의 비교 결과 부호화 오차가 가장 작은 심도가 선택될 수 있다. 각각의 최대화 부호화 단위마다 적어도 하나의 부호화 심도가 결정될 수 있다. The image data in the maximum encoding unit is encoded based on the depth encoding unit according to at least one depth below the maximum depth, and the encoding results based on the respective depth encoding units are compared. As a result of the comparison of the encoding error of the depth-dependent encoding unit, the depth with the smallest encoding error can be selected. At least one coding depth may be determined for each maximum coding unit.

최대 부호화 단위의 크기는 심도가 증가함에 따라 부호화 단위가 계층적으로 분할되어 축소되며 부호화 단위의 개수는 증가한다. 또한, 하나의 최대 부호화 단위에 포함되는 동일한 심도의 부호화 단위들이라 하더라도, 각각의 데이터에 대한 부호화 오차를 측정하고 상위 심도로의 축소 여부가 결정된다. 따라서, 하나의 최대 부호화 단위에 포함되는 데이터라 하더라도 위치에 따라 심도별 부호화 오차가 다르므로 위치에 따라 부호화 심도가 달리 결정될 수 있다. 다시 말해, 최대 부호화 단위는 상이한 심도에 따라 상이한 크기의 서브 부호화 단위로 분할될 수 있다.하나의 최대 부호화 단위에 대해 부호화 심도가 하나 이상 설정될 수 있으며, 최대 부호화 단위의 데이터는 하나 이상의 부호화 심도의 부호화 단위에 따라 분할될 수 있다.As the depth of the maximum coding unit increases, the coding unit is hierarchically divided and reduced, and the number of coding units increases. In addition, even if encoding units of the same depth included in one maximum encoding unit, the encoding error of each data is measured and it is determined whether or not the encoding units are reduced to a higher depth. Therefore, even if the data included in one maximum coding unit has a different coding error according to the position, the coding depth can be determined depending on the position. In other words, the maximum encoding unit may be divided into sub-encoding units of different sizes according to different depths. One or more encoding depths may be set for one maximum encoding unit, and data of the maximum encoding unit may be set to one or more encoding depths As shown in FIG.

또한, 최대 부호화 단위에 포함된 상이한 크기의 서브 부호화 단위들은 상이한 크기의 처리 단위에 기초해 예측 또는 주파수 변환될 수 있다. 다시 말해, 영상 부호화 장치(100)는 영상 부호화를 위한 복수의 처리 단계들을 다양한 크기 및 다양한 형태의 처리 단위에 기초해 수행할 수 있다. 영상 데이터의 부호화를 위해서는 예측, 주파수 변환, 엔트로피 부호화 등의 처리 단계를 거치는데, 모든 단계에 걸쳐서 동일한 크기의 처리 단위가 이용될 수도 있으며, 단계별로 상이한 크기의 처리 단위를 이용할 수 있다.Further, the sub-encoding units of different sizes included in the maximum encoding unit can be predicted or frequency-converted based on the processing units of different sizes. In other words, the image encoding apparatus 100 can perform a plurality of processing steps for image encoding based on various sizes and processing units of various types. In order to encode video data, processing steps such as prediction, frequency conversion, and entropy encoding are performed. Processing units of the same size may be used in all stages, and processing units of different sizes may be used in each step.

예를 들어 영상 부호화 장치(100)는 부호화 단위를 예측하기 위해, 부호화 단위와 다른 처리 단위를 선택할 수 있다. 일 예로, 부호화 단위의 크기가 2Nx2N(단, N은 양의 정수)인 경우, 예측을 위한 처리 단위는 2Nx2N, 2NxN, Nx2N, NxN 등일 수 있다. 다시 말해, 부호화 단위의 높이 또는 너비 중 적어도 하나를 반분하는 형태의 처리 단위를 기반으로 움직임 예측이 수행될 수도 있다. 이하, 예측의 기초가 되는 데이터 단위는 '예측 단위'라 한다.For example, in order to predict a coding unit, the image coding apparatus 100 may select a coding unit and a different processing unit. For example, when the size of the encoding unit is 2Nx2N (where N is a positive integer), the processing unit for prediction may be 2Nx2N, 2NxN, Nx2N, NxN, and the like. In other words, motion prediction may be performed based on a processing unit of a type that halves at least one of a height or a width of an encoding unit. Hereinafter, a data unit serving as a 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 the specific prediction mode may be performed only for a prediction unit of a specific size or type. For example, the intra mode can be performed only for a 2Nx2N, NxN sized prediction unit, which is a square. In addition, the skip mode can be performed only for a prediction unit of 2Nx2N size. If there are a plurality of prediction units in an encoding unit, a prediction mode having the smallest coding error can be selected by performing prediction for each prediction unit.

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

부호화 심도 결정부(120)는 라그랑자 곱(Lagrangian Multiplier) 기반의 율-왜곡 최적화 기법(Rate-Distortion Optimization)을 이용하여 심도별 부호화 단위의 부호화 오차를 측정하여 최적의 부호화 오차를 갖는 최대 부호화 단위의 분할 형태를 결정할 수 있다. 다시 말해, 부호화 심도 결정부(120)는 최대 부호화 단위가 어떠한 형태의 복수의 서브 부호화 단위로 분할되는지 결정할 수 있는데, 여기서 복수의 서브 부호화 단위는 심도에 따라 크기가 상이하다.The coding depth determiner 120 measures the coding error of each depth coding unit using a Lagrangian Multiplier based Rate-Distortion Optimization technique and calculates the maximum coding unit having the optimal coding error Can be determined. In other words, the coding depth determiner 120 can determine which type of the maximum coding unit is divided into a plurality of sub-coding units, wherein the plurality of sub-coding units have different sizes depending on the depth.

영상 데이터 부호화부(130)는, 부호화 심도 결정부(120)에서 결정된 적어도 하나의 부호화 심도에 기초하여 최대 부호화 단위의 영상 데이터를 부호화하여 비트스트림을 출력한다. 부호화 심도 결정부(120)에서 최소 부호화 오차를 측정하기 위해 부호화가 이미 수행되었으므로, 이를 이용해 부호화된 데이터 스트림을 출력할 수도 있다.The image data encoding unit 130 encodes the image data of the maximum encoding unit based on at least one encoding depth determined by the encoding depth determination unit 120 and outputs the bit stream. Since the encoding depth determination unit 120 has already performed the encoding process for measuring the minimum encoding error, the encoded data stream may be output using the encoding process.

부호화 정보 부호화부(140)는, 부호화 심도 결정부(120)에서 결정된 적어도 하나의 부호화 심도에 기초하여, 최대 부호화 단위마다 심도별 부호화 모드에 관한 정보를 부호화하여 비트스트림을 출력한다. 심도별 부호화 모드에 관한 정보는, 부호화 심도 정보, 부호화 심도의 부호화 단위의 예측 단위의 분할 타입 정보, 예측 단위별 예측 모드 정보, 변환 단위의 크기 정보 등을 포함할 수 있다.The encoding information encoding unit 140 encodes information on the depth encoding mode for each maximum encoding unit based on at least one encoding depth determined by the encoding depth determining unit 120 and outputs a bit stream. The information on the depth-dependent coding mode may include coding depth information, division type information of a prediction unit of a coding unit of coding depth, prediction mode information per prediction unit, size information of a conversion unit, and the like.

부호화 심도 정보는, 현재 심도로 부호화하지 않고 상위 심도의 부호화 단위로 부호화할지 여부를 나타내는 심도별 축소 정보를 이용하여 정의될 수 있다. 현재 부호화 단위의 현재 심도가 부호화 심도라면, 현재 부호화 단위는 현재 심도의 부호화 단위로 부호화되므로 현재 심도의 축소 정보는 더 이상 상위 심도로 축소되지 않도록 정의될 수 있다. 반대로, 현재 부호화 단위의 현재 심도가 부호화 심도가 아니라면 상위 심도의 부호화 단위를 이용한 부호화를 시도해보아야 하므로, 현재 심도의 축소 정보는 상위 심도의 부호화 단위로 축소되도록 정의될 수 있다.The encoding depth information may be defined using depth reduction information indicating whether or not encoding is performed in a high-depth encoding unit without encoding at the current depth. If the current depth of the current encoding unit is the encoding depth, the current encoding unit is encoded in the current depth encoding unit, so that the reduction information of the current depth can be defined not to be further reduced to the higher depth. Conversely, if the current depth of the current encoding unit is not the encoding depth, encoding using the higher-depth encoding unit should be attempted, so that the current depth reduction information can be defined to be reduced to higher-depth encoding units.

현재 심도가 부호화 심도가 아니라면, 상위 심도의 부호화 단위로 축소된 부호화 단위에 대해 부호화가 수행된다. 현재 심도의 부호화 단위 내에 상위 심도의 부호화 단위가 하나 이상 존재하므로, 각각의 상위 심도의 부호화 단위마다 반복적으로 부호화가 수행되어, 동일한 심도의 부호화 단위마다 재귀적(recursive) 부호화가 수행될 수 있다.If the current depth is not the depth of the encoding, encoding is performed for the lower-depth encoding unit. Since at least one coding unit of higher depth is present in the coding unit of the current depth, the coding is repeatedly performed for each coding unit of the higher depth so that recursive coding can be performed for each coding unit of the same depth.

하나의 최대 부호화 단위 안에 적어도 하나의 부호화 심도가 결정되며 부호화 심도마다 적어도 하나의 부호화 모드에 관한 정보가 결정되어야 하므로, 하나의 최대 부호화 단위에 대해서는 적어도 하나의 부호화 모드에 관한 정보가 결정될 수 있다. 또한, 최대 부호화 단위의 데이터는 심도에 따라 계층적으로 분할되어 위치 별로 부호화 심도가 다를 수 있으므로, 데이터에 대해 부호화 심도 및 부호화 모드에 관한 정보가 설정될 수 있다.At least one coding depth is determined in one maximum coding unit and at least one coding mode information is determined for each coding depth so that information on at least one coding mode can be determined for one maximum coding unit. In addition, since the data of the maximum encoding unit is hierarchically divided according to the depth and the depth of encoding may be different for each position, information on the encoding depth and the encoding mode can be set for the data.

따라서, 일 실시예에 따른 부호화 정보 부호화부(140)는, 최대 부호화 단위에 포함되어 있는 최소 부호화 단위마다 해당 부호화 정보를 설정할 수 있다. 즉, 부호화 심도의 부호화 단위는 동일한 부호화 정보를 보유하고 있는 최소 부호화 단위를 하나 이상 포함하고 있다. 이를 이용하여, 인근 최소 부호화 단위들이 동일한 심도별 부호화 정보를 갖고 있다면, 동일한 최대 부호화 단위에 포함되는 최소 부호화 단위일 수 있다.Therefore, the encoding information encoding unit 140 according to the embodiment can set the encoding information for each minimum encoding unit included in the maximum encoding unit. That is, the coding unit of the coding depth includes at least one minimum coding unit that holds the same coding information. By using this, if the neighboring minimum encoding units have the same depth encoding information, it can be the minimum encoding unit included in the same maximum encoding unit.

영상 부호화 장치(100)의 가장 간단한 형태의 실시예에 따르면, 심도별 부호화 단위는 한 계층 하위 심도의 부호화 단위의 높이 및 너비를 반분한 크기의 부호화 단위이다. 즉, 현재 심도(k)의 부호화 단위의 크기가 2Nx2N이라면, 상위 심도(k+1)의 부호화 단위의 크기는 NxN 이다. 따라서, 2Nx2N 크기의 현재 부호화 단위는 NxN 크기의 상위 심도 부호화 단위를 최대 4개 포함할 수 있다.According to the simplest embodiment of the image encoding apparatus 100, the depth-of-coded unit is a unit of a size which is halved in height and width of a single-layer low-depth encoding unit. That is, if the size of the encoding unit of the current depth (k) is 2Nx2N, the size of the encoding unit of the higher depth (k + 1) is NxN. Therefore, the current coding unit of 2Nx2N size can include up to 4 upper depth coding units of NxN size.

따라서, 일 실시예에 따른 영상 복호화 장치(100)는 현재 픽처의 특성을 고려하여 결정된 최대 부호화 단위의 크기 및 최대 심도를 기반으로, 각각의 최대 부호화 단위마다 최적의 형태 분할 형태를 결정할 수 있다. 또한, 각각의 최대 부호화 단위마다 다양한 예측 모드, 주파수 변환 방식 등으로 부호화할 수 있으므로, 다양한 영상 크기의 부호화 단위의 영상 특성을 고려하여 최적의 부호화 모드가 결정될 수 있다.Therefore, the image decoding apparatus 100 according to an exemplary embodiment can determine an optimum shape division type for each maximum encoding unit based on the size and the maximum depth of the maximum encoding unit determined in consideration of the characteristics of the current picture. In addition, since each encoding unit can be encoded by various prediction modes, frequency conversion methods, and the like, an optimal encoding mode can be determined in consideration of image characteristics of encoding units of various image sizes.

영상의 해상도가 매우 높거나 데이터량이 매우 큰 영상을 종래의 16x16 크기의 매크로블록 단위로 부호화한다면, 픽처당 매크로블록의 수가 과도하게 많아진다. 이에 따라, 매크로블록마다 생성되는 압축 정보도 많아지므로 압축 정보의 전송 부담이 커지고 데이터 압축 효율이 감소하는 경향이 있다. 따라서, 본 발명의 일 실시예에 따른 영상 부호화 장치는, 영상의 크기를 고려하여 부호화 단위의 최대 크기를 증가시키면서, 영상 특성을 고려하여 부호화 단위를 조절할 수 있으므로, 영상 압축 효율이 증대될 수 있다.If an image having a very high image resolution or a very large data amount is encoded in units of a conventional 16x16 macroblock, the number of macroblocks per picture becomes excessively large. This increases the amount of compression information generated for each macroblock, so that the burden of transmission of compressed information increases and the data compression efficiency tends to decrease. Therefore, the image encoding apparatus according to the embodiment of the present invention can increase the maximum size of the encoding unit in consideration of the image size, and adjust the encoding unit in consideration of the image characteristic, so that the image compression efficiency can be increased .

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

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

영상 관련 데이터 획득부(210)는 영상 복호화 장치(200)가 수신한 비트열을 파싱하여, 최대 부호화 단위별로 영상 데이터를 획득하여 영상 데이터 복호화부(230)로 출력한다. 영상 관련 데이터 획득부(210)는 현재 픽처 또는 슬라이스에 대한 헤더로부터 현재 픽처 또는 슬라이스의 최대 부호화 단위에 대한 정보를 추출할 수 있다. 본 발명의 일 실시예에 따른 영상 복호화 장치(200)는 최대 부호화 단위 단위별로 영상 데이터를 복호화한다. The image-related data acquisition unit 210 parses the bit string received by the image decoding apparatus 200, acquires image data for each maximum encoding unit, and outputs the image data to the image data decoding unit 230. The image-related data obtaining unit 210 may extract information on the maximum encoding unit of the current picture or slice from the header of the current picture or slice. The image decoding apparatus 200 according to an embodiment of the present invention decodes image data in units of a maximum encoding unit.

부호화 정보 추출부(220)는 영상 복호화 장치(200)가 수신한 비트열을 파싱하여, 현재 픽처에 대한 헤더로부터 최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보를 추출한다. 추출된 부호화 심도 및 부호화 모드에 관한 정보는 영상 데이터 복호화부(230)로 출력된다.The encoding information extracting unit 220 parses the bit stream received by the video decoding apparatus 200 and extracts information on the encoding depth and the encoding mode for each maximum encoding unit from the header of the current picture. The information on the extracted coding depth and coding mode is output to the image data decoding unit 230.

최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보는, 하나 이상의 부호화 심도 정보에 대해 설정될 수 있으며, 부호화 심도별 부호화 모드에 관한 정보는, 부호화 단위별 예측 단위의 분할 타입 정보, 예측 모드 정보 및 변환 단위의 크기 정보 등을 포함할 수 있다. 또한, 부호화 심도 정보로서, 심도별 축소 정보가 추출될 수도 있다.Information on the coding depth and the coding mode per coding unit may be set for one or more coding depth information, and the information on the coding mode according to the coding depth includes information on division type information, prediction mode information, Size information of the conversion unit, and the like. In addition, reduction information for each depth may be extracted as the encoding depth information.

최대 부호화 단위의 분할 형태에 대한 정보는 최대 부호화 단위에 포함된 심도에 따라 상이한 크기의 서브 부호화 단위에 대한 정보를 포함할 수 있으며, 부호화 모드에 관한 정보는 서브 부호화 단위별 예측 단위에 대한 정보, 예측 모드에 대한 정보 및 변환 단위에 대한 정보 등을 포함할 수 있다. The information on the division type of the maximum encoding unit may include information on sub-encoding units of different sizes according to the depth included in the maximum encoding unit, the information on the encoding mode may include information on a prediction unit for each sub- Information on the prediction mode, information on the conversion unit, and the like.

영상 데이터 복호화부(230)는 부호화 정보 추출부에서 추출된 정보에 기초하여 각각의 최대 부호화 단위의 영상 데이터를 복호화하여 현재 픽처를 복원한다. 최대 부호화 단위의 분할 형태에 대한 정보에 기초하여, 영상 데이터 복호화부(230)는 최대 부호화 단위에 포함된 서브 부호화 단위를 복호화할 수 있다. 복호화 과정은 인트라 예측 및 움직임 보상을 포함하는 움직임 예측 과정, 및 주파수 역변환 과정을 포함할 수 있다.The image data decoding unit 230 decodes the image data of each maximum encoding unit based on the information extracted by the encoding information extracting unit to restore the current picture. The image data decoding unit 230 can decode the sub-encoding unit included in the maximum encoding unit based on the information on the division type of the maximum encoding unit. The decoding process may include a motion prediction process including intra prediction and motion compensation, and an inverse frequency conversion process.

영상 데이터 복호화부(230)는 최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보에 기초하여 각각의 최대 부호화 단위의 영상 데이터를 복호화하여 현재 픽처를 복원한다. 최대 부호화 단위별 부호화 심도 정보에 기초하여, 영상 데이터 복호화부(230)는 적어도 하나의 부호화 심도의 부호화 단위마다 영상 데이터를 복호화할 수 있다. 복호화 과정은 인트라 예측 및 움직임 보상을 포함하는 예측 과정 및 역변환 과정을 포함할 수 있다.The image data decoding unit 230 decodes the image data of each maximum encoding unit based on the information on the encoding depth and the encoding mode for each maximum encoding unit to reconstruct the current picture. The image data decoding unit 230 can decode the image data for each coding unit of at least one coding depth based on the coding depth information for each coding unit. The decoding process may include a prediction process including intra prediction and motion compensation and an inverse process.

영상 데이터 복호화부(230)는, 부호화 단위별 예측을 위해 부호화 심도별 부호화 단위의 예측 단위의 분할 타입 정보 및 예측 모드 정보에 기초하여, 부호화 단위마다 각각의 예측 단위 및 예측 모드로 인트라 예측 또는 움직임 보상을 수행할 수 있다. 또한, 영상 데이터 복호화부(230)는, 최대 부호화 단위별 역변환을 위해, 부호화 심도별 부호화 단위의 변환 단위의 크기 정보에 기초하여, 부호화 단위마다 각각의 변환 단위로 역변환을 수행할 수 있다.The image data decoding unit 230 performs intra prediction or motion prediction in each prediction unit and prediction mode for each coding unit on the basis of the division type information and the prediction mode information of the prediction unit of the coding unit for each coding depth, Compensation can be performed. In addition, the image data decoding unit 230 may perform inverse conversion on each conversion unit for each encoding unit, based on the size information of the conversion unit of the encoding unit by encoding depth, for inverse conversion for each maximum encoding unit.

영상 데이터 복호화부(230)는 심도별 축소 정보를 이용하는 현재 최대 부호화 단위의 부호화 심도를 결정할 수 있다. 만약, 축소 정보가 현재 심도로 복호화할 것을 나타내고 있다면 현재 심도가 부호화 심도이다. 따라서, 영상 데이터 복호화부(230)는 현재 최대 부호화 단위의 영상 데이터에 대해 현재 심도의 부호화 단위를 예측 단위의 분할 타입, 예측 모드 및 변환 단위 크기 정보를 이용하여 복호화할 수 있다. 즉, 최소 부호화 단위에 대해 설정되어 있는 부호화 정보를 관찰하여, 동일한 축소 정보를 포함한 부호화 정보를 보유하고 있는 최소 부호화 단위를 모아, 하나의 데이터 단위로 복호화할 수 있다. The image data decoding unit 230 can determine the coding depth of the current maximum encoding unit using the depth-dependent reduction information. If the reduced information indicates that the current depth is to be decoded, the current depth is the depth of the encoding. Accordingly, the image data decoding unit 230 can decode the current depth encoding unit for the current image data of the maximum encoding unit using the division type, the prediction mode, and the conversion unit size information of the prediction unit. That is, it is possible to observe the coding information set for the minimum coding unit, and collect the minimum coding units holding the coding information including the same reduction information, and decode them into one data unit.

일 실시예에 따른 영상 복호화 장치(200)는, 부호화 과정에서 최대 부호화 단위마다 재귀적으로 부호화를 수행하여 최소 부호화 오차를 발생시킨 부호화 단위에 대한 정보를 획득하여, 현재 픽처에 대한 복호화에 이용할 수 있다. 즉, 최대 부호화 단위마다 최적 부호화 단위로 영상 데이터의 복호화가 가능해진다. 따라서, 높은 해상도의 영상 또는 데이터량이 과도하게 많은 영상이라도 부호화단으로부터 전송된 최적 부호화 모드에 관한 정보를 이용하여, 영상의 특성에 적응적으로 결정된 부호화 단위의 크기 및 부호화 모드에 따라 효율적으로 영상 데이터를 복호화하여 복원할 수 있다.The image decoding apparatus 200 according to an exemplary embodiment recursively performs encoding for each maximum encoding unit in the encoding process to obtain information on the encoding unit that has generated the minimum encoding error and can use it for decoding the current picture have. That is, it is possible to decode video data in the optimal encoding unit for each maximum encoding unit. Accordingly, even if an image with a high resolution or an excessively large amount of data is used, the information on the optimal encoding mode transmitted from the encoding end is used, and the image data is efficiently encoded according to the encoding unit size and encoding mode, Can be decoded and restored.

도 3은 본 발명의 일 실시예에 따른 계층적 부호화 단위를 도시한다.FIG. 3 illustrates a hierarchical encoding 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 a coding unit having a width x height of 64x64. In addition to the square-shaped encoding units, there may be encoding units whose width x height is 64x32, 32x64, 32x16, 16x32, 16x8, 8x16, 8x4, 4x8.

도 3에서 비디오 데이터(310)에 대해서는, 해상도는 1920x1080, 최대 부호화 단위의 크기는 64, 최대 심도가 2로 설정되어 있다. 또한, 비디오 데이터(320)에 대해서는, 해상도는 1920x1080, 부호화 단위의 최대 크기는 64, 최대 심도가 4로 설정되어 있다. 또한, 비디오 데이터(330)에 대해서는, 해상도는 352x288, 부호화 단위의 최대 크기는 16, 최대 심도가 2로 설정되어 있다.3, the resolution is set to 1920 x 1080, the size of the maximum encoding unit is set to 64, and the maximum depth is set to 2 for the video data 310. For the video data 320, the resolution is set to 1920 x 1080, the maximum size of the encoding unit is set to 64, and the maximum depth is set to 4. [ For the video data 330, the resolution is set to 352 x 288, the maximum size of the encoding unit is set to 16, and the maximum depth is set to 2.

해상도가 높거나 데이터량이 많은 경우 압축률 향상뿐만 아니라 영상 특성을 정확히 반영하기 위해 부호화 사이즈의 최대 크기가 상대적으로 큰 것이 바람직하다. 따라서, 비디오 데이터(330)에 비해, 해상도가 높은 비디오 데이터(310, 320)는 부호화 사이즈의 최대 크기가 64로 선택될 수 있다.It is desirable that the maximum size of the encoding size is relatively large in order to accurately reflect not only the compression ratio but also the image characteristic when the resolution is high or the data amount is large. Therefore, the maximum size of the video data 310 and 320 having the higher resolution than the video data 330 can be selected to be 64. FIG.

최대 심도는 계층적 부호화 단위에서 총 계층수를 나타낸다. 따라서, 비디오 데이터(310)의 최대 심도는 2이므로, 비디오 데이터(310)의 부호화 단위(315)는 장축 크기가 64인 최대 부호화 단위로부터, 심도가 두 계층 증가하여 장축 크기가 32, 16인 부호화 단위들까지 포함할 수 있다. 반면, 비디오 데이터(330)의 최대 심도는 2이므로, 비디오 데이터(330)의 부호화 단위(335)는 장축 크기가 16인 부호화 단위들로부터, 심도가 두 계층 증가하여 장축 크기가 8, 4인 부호화 단위들까지 포함할 수 있다. The maximum depth indicates the total number of layers in the hierarchical encoding unit. Accordingly, since the maximum depth of the video data 310 is 2, the encoding unit 315 of the video data 310 is encoded in units of 32, 16, Units. On the other hand, since the maximum depth of the video data 330 is 2, the encoding unit 335 of the video data 330 has the depth of two layers increased from the encoding units having the major axis size of 16, Units.

비디오 데이터(320)의 최대 심도는 4이므로, 비디오 데이터(320)의 부호화 단위(325)는 장축 크기가 64인 최대 부호화 단위로부터, 심도가 네 계층 증가하여 장축 크기가 32, 16, 8, 4인 부호화 단위들까지 포함할 수 있다.심도가 증가할수록 더 작은 서브 부호화 단위에 기초해 영상을 부호화하므로 보다 세밀한 장면을 포함하고 있는 영상을 부호화하는데 적합해진다.Since the maximum depth of the video data 320 is 4, the encoding unit 325 of the video data 320 has a depth of four layers with a major axis size of 32, 16, 8, 4 Encoding unit. As the depth increases, the image is encoded based on a smaller sub-encoding unit, which makes it suitable for encoding an image including a more detailed scene.

도 4 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부의 블록도를 나타낸 것이다.4 is a block diagram of an image encoding unit based on an encoding unit according to an embodiment of the present invention.

도 4를 참조하면, 인트라 예측부(410)는 현재 프레임(405) 중 인트라 모드의 예측 단위에 대해 인트라 예측을 수행하고, 움직임 추정부(420) 및 움직임 보상부(425)는 인터 모드의 예측 단위에 대해 현재 프레임(405) 및 참조 프레임(495)을 이용해 인터 예측 및 움직임 보상을 수행한다.4, the intra-prediction unit 410 performs intra-prediction on a prediction unit of an intra mode in the current frame 405, and the motion estimation unit 420 and the motion compensation unit 425 perform intra- Inter prediction and motion compensation are performed using the current frame 405 and the reference frame 495 with respect to the unit.

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

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

본 발명의 일 실시예에 따른 영상 부호화 방법에 따라 부호화하기 위해, 영상 부호화부(400)의 구성 요소들인 인트라 예측부(410), 움직임 추정부(420), 움직임 보상부(425), 주파수 변환부(430), 양자화부(440), 엔트로피 부호화부(450), 역양자화부(460), 주파수 역변환부(470), 디블로킹부(480) 및 루프 필터링부(490)는 모두 최대 부호화 단위, 심도에 따른 서브 부호화 단위, 예측 단위 및 변환 단위에 기초해 영상 부호화 과정들을 처리한다. 특히, 인트라 예측부(410), 움직임 추정부(420) 및 움직임 보상부(425)는 부호화 단위의 최대 크기 및 심도를 고려하여 부호화 단위 내의 예측 단위 및 예측 모드를 결정하며, 주파수 변환부(430)는 부호화 단위의 최대 크기 및 심도를 고려하여 변환 단위의 크기를 고려하여야 한다.In order to perform encoding according to the 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, The inverse quantization unit 460, the inverse quantization unit 470, the deblocking unit 480 and the loop filtering unit 490 of the quantization unit 430, the quantization unit 440, the entropy coding unit 450, the inverse quantization unit 460, , Sub-encoding units according to depth, prediction units, and conversion units. In particular, the intra prediction unit 410, the motion estimation unit 420, and the motion compensation unit 425 determine the prediction unit and the prediction mode in the coding unit in consideration of the maximum size and depth of the coding unit, and the frequency conversion unit 430 ) Should consider the size of the conversion unit considering the maximum size and depth of the encoding unit.

도 5 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부의 블록도를 나타낸 것이다.5 is a block diagram of an image decoding unit based on an encoding unit according to an embodiment of the present invention.

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

본 발명의 일 실시예에 따른 영상 복호화 방법에 따라 복호화하기 위해 영상 복호화부(400)의 구성 요소들인 파싱부(510), 엔트로피 복호화부(520), 역양자화부(530), 주파수 역변환부(540), 인트라 예측부(550), 움직임 보상부(560), 디블로킹부(570) 및 루프 필터링부(580)가 모두 최대 부호화 단위, 심도에 따른 서브 부호화 단위, 예측 단위 및 변환 단위에 기초해 영상 복호화 과정들을 처리한다. 특히, 인트라 예측부(550), 움직임 보상부(560)는 부호화 단위의 최대 크기 및 심도를 고려하여 부호화 단위 내의 예측 단위 및 예측 모드를 결정하며, 주파수 역변환부(540)는 부호화 단위의 최대 크기 및 심도를 고려하여 변환 단위의 크기를 고려하여야 한다.A parsing unit 510, an entropy decoding unit 520, an inverse quantization unit 530, an inverse frequency transforming unit (hereinafter referred to as an inverse quantization unit) 530, 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 maximum encoding unit, the depth-dependent sub-encoding unit, the prediction unit, And processes the image decoding processes. In particular, the intra prediction unit 550 and the motion compensation unit 560 determine a prediction unit and a prediction mode in an encoding unit in consideration of the maximum size and depth of an encoding unit, and the frequency inverse transform unit 540 transforms the maximum size And the depth of the conversion unit.

도 6은 본 발명의 일 실시예에 따른 심도별 부호화 단위 및 예측 단위를 도시한다.FIG. 6 illustrates a depth-based 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 use a hierarchical encoding unit to consider image characteristics. The maximum height, width, and maximum depth of the encoding unit may be adaptively determined according to the characteristics of the image, or may be variously set according to the demand of the user. The size of each coding unit may be determined according to a maximum size of a predetermined coding unit.

본 발명의 일 실시예에 따른 부호화 단위의 계층 구조(600)는 부호화 단위의 최대 높이 및 너비가 64이며, 최대 심도가 4인 경우를 도시하고 있다. 일 실시예에 따른 부호화 단위의 계층 구조(600)의 세로축을 따라서 심도가 증가하므로 심도별 부호화 단위의 높이 및 너비가 각각 축소된다. 또한, 부호화 단위의 계층 구조(600)의 가로축을 따라, 각각의 심도별 부호화 단위의 예측 기반이 되는 부분적 데이터 단위인 예측 단위가 도시되어 있다.The hierarchical structure 600 of the encoding unit according to an embodiment of the present invention shows a case where the maximum height and width of the encoding unit is 64 and the maximum depth is 4. Since the depth increases along the vertical axis of the hierarchical structure 600 of the coding unit according to the embodiment, the height and width of the coding unit for each depth are reduced. In addition, along the horizontal axis of the hierarchical structure 600 of the coding unit, a prediction unit which is a partial data unit which is a prediction base of each coding unit of depth is shown.

최대 부호화 단위(610)는 부호화 단위의 계층 구조(600) 중 최대 부호화 단위로서 심도가 0이며, 부호화 단위의 크기, 즉 높이 및 너비가 64x64이다. 세로축을 따라 심도가 증가하며, 크기 32x32인 심도 1의 부호화 단위(620), 크기 16x16인 심도 2의 부호화 단위(630), 크기 8x8인 심도 3의 부호화 단위(640), 크기 4x4인 심도 4의 부호화 단위(650)가 존재한다. 크기 4x4인 심도 4의 부호화 단위(650)는 최소 부호화 단위이다.The maximum coding unit 610 is the largest coding unit among the hierarchical structures 600 of the coding units and has a depth of 0, and the size of the coding units, i.e., the height and the width, is 64x64. The depth of the image is increased along the vertical axis, and a depth 1 encoding unit 620 having a size of 32x32, a depth 2 encoding unit 630 having a size 16x16, a depth encoding unit 640 having a depth 8x8, a depth 4x4 having a size 4x4 There is an encoding unit 650. An encoding unit 650 of depth 4 of size 4x4 is the minimum encoding unit.

또한 도 6을 참조하면, 각각의 심도별로 가로축을 따라, 부호화 단위의 예측 단위로서, 부분적 데이터 단위들이 도시되어 있다. 즉, 심도 0의 크기 64x64의 최대 부호화 단위(610)의 예측 단위는, 크기 64x64의 부호화 단위(610)에 포함되는 크기 64x64의 부분적 데이터 단위(610), 크기 64x32의 부분적 데이터 단위들(612), 크기 32x64의 부분적 데이터 단위들(614), 크기 32x32의 부분적 데이터 단위들(616)일 수 있다. Referring also to FIG. 6, partial data units are shown along the horizontal axis for each depth, as a prediction unit of an encoding unit. That is, the prediction unit of the maximum encoding unit 610 having a depth 0 size of 64x64 is a partial data unit 610 of size 64x64, partial data units 612 of size 64x32 included in the encoding unit 610 of size 64x64, Partial data units 614 of size 32x64, and partial data units 616 of size 32x32.

심도 1의 크기 32x32의 부호화 단위(620)의 예측 단위는, 크기 32x32의 부호화 단위(620)에 포함되는 크기 32x32의 부분적 데이터 단위(620), 크기 32x16의 부분적 데이터 단위들(622), 크기 16x32의 부분적 데이터 단위들(624), 크기 16x16의 부분적 데이터 단위들(626)일 수 있다. The prediction unit of the 32x32 coding unit 620 having the depth 1 is the partial data unit 620 of the size 32x32 included in the coding unit 620 of the size 32x32, the partial data units 622 of the size 32x16, Partial data units 624 of size 16x16, and partial data units 626 of size 16x16.

심도 2의 크기 16x16의 부호화 단위(630)의 예측 단위는, 크기 16x16의 부호화 단위(630)에 포함되는 크기 16x16의 부분적 데이터 단위(630), 크기 16x8의 부분적 데이터 단위들(632), 크기 8x16의 부분적 데이터 단위들(634), 크기 8x8의 부분적 데이터 단위들(636)일 수 있다. The prediction unit of the 16x16 coding unit 630 of depth 2 is a partial data unit 630 of size 16x16, partial data units 632 of size 16x8, a size of 8x16 16x16 included in the coding unit 630 of size 16x16, Partial data units 634 of size 8x8, and partial data units 636 of size 8x8.

심도 3의 크기 8x8의 부호화 단위(640)의 예측 단위는, 크기 8x8의 부호화 단위(640)에 포함되는 크기 8x8의 부분적 데이터 단위(640), 크기 8x4의 부분적 데이터 단위들(642), 크기 4x8의 부분적 데이터 단위들(644), 크기 4x4의 부분적 데이터 단위들(646)일 수 있다. The prediction unit of the encoding unit 640 having the depth 3 of 8x8 is a partial data unit 640 of the size 8x8, partial data units 642 of the size 8x4, a size 4x8 of the size 8x8 included in the encoding unit 640 of the size 8x8, Partial data units 644 of size 4x4, and partial data units 646 of size 4x4.

마지막으로, 심도 4의 크기 4x4의 부호화 단위(650)는 최소 부호화 단위이며 최상위 심도의 부호화 단위이고, 해당 예측 단위도 크기 4x4의 데이터 단위(650)이다.Finally, a coding unit 650 of size 4x4 is a minimum coding unit and a coding unit of the highest depth, and the prediction unit is a data unit 650 of size 4x4.

일 실시예에 따른 영상 부호화 장치의 부호화 심도 결정부(120)는, 최대 부호화 단위(610)의 부호화 심도를 결정하기 위해, 최대 부호화 단위(610)에 포함되는 각각의 심도의 부호화 단위마다 부호화를 수행하여야 한다. In order to determine the depth of encoding of the maximum encoding unit 610, the encoding depth determining unit 120 of the image encoding apparatus according to an exemplary embodiment may perform encoding for each depth unit included in the maximum encoding unit 610 Should be performed.

동일한 범위 및 크기의 데이터를 포함하기 위한 심도별 부호화 단위의 개수는, 심도가 증가할수록 심도별 부호화 단위의 개수도 증가한다. 예를 들어, 심도 1의 부호화 단위 한 개가 포함하는 데이터에 대해서, 심도 2의 부호화 단위는 네 개가 필요하다. 따라서, 동일한 데이터의 부호화 결과를 심도별로 비교하기 위해서, 한 개의 심도 1의 부호화 단위 및 네 개의 심도 2의 부호화 단위를 이용하여 각각 부호화되어야 한다.The number of coding units per depth to include data of the same range and size increases as the depth of field increases. For example, for data containing one coding unit at depth 1, four coding units at depth 2 are required. Therefore, in order to compare the encoding results of the same data by depth, they should be encoded using a single depth 1 encoding unit and four depth 2 encoding units, respectively.

각각의 심도별 부호화를 위해서는, 부호화 단위의 계층 구조(600)의 가로축을 따라, 심도별 부호화 단위의 예측 단위들마다 부호화를 수행하여, 해당 심도에서 가장 작은 부호화 오차인 대표 부호화 오차가 선택될 수다. 또한, 부호화 단위의 계층 구조(600)의 세로축을 따라 심도를 증가시키며, 각각의 심도마다 부호화를 수행하여, 심도별 대표 부호화 오차를 비교하여 최소 부호화 오차가 검색될 수 있다. 최대 부호화 단위(610) 중 최소 부호화 오차가 발생하는 심도가 최대 부호화 단위(610)의 부호화 심도 및 분할 타입으로 선택될 수 있다. For each depth-of-field coding, encoding is performed for each prediction unit of the depth-dependent coding unit along the horizontal axis of the hierarchical structure 600 of the coding unit, and a representative coding error, which is the smallest coding error at the corresponding depth, is selected . In addition, the minimum coding error can be searched by increasing the depth along the vertical axis of the hierarchical structure 600 of the coding unit, performing coding for each depth, and comparing representative coding errors per depth. The depth at which the minimum coding error occurs among the maximum coding units 610 can be selected as the coding depth and the division type of the maximum coding unit 610. [

도 7은 본 발명의 일 실시예에 따른, 부호화 단위 및 변환 단위의 관계를 도시한다. FIG. 7 shows a relationship between an encoding unit and a conversion unit according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 부호화 장치(100) 및 영상 복호화 장치(200)는, 최대 부호화 단위마다 최대 부호화 단위보다 작거나 같은 크기의 부호화 단위로 영상을 분할하여 부호화하거나 복호화한다. 부호화 과정 중 주파수 변환을 위한 변환 단위의 크기는 각각의 부호화 단위보다 크지 않은 데이터 단위를 기반으로 선택될 수 있다. 예를 들어, 현재 부호화 단위(710)가 64x64 크기일 때, 32x32 크기의 변환 단위(720)를 이용하여 주파수 변환이 수행될 수 있다. 또한, 64x64 크기의 부호화 단위(710)의 데이터를 64x64 크기 이하의 32x32, 16x16, 8x8, 4x4 크기의 변환 단위들로 각각 주파수 변환을 수행하여 부호화한 후, 원본과의 오차가 가장 적은 변환 단위가 선택될 수 있다.The image encoding apparatus 100 and the image decoding apparatus 200 according to an embodiment of the present invention divide and encode or decode an image with a coding unit smaller than or equal to the maximum encoding unit for each maximum encoding unit. The size of the conversion unit for frequency conversion during encoding can be selected based on data units that are not larger than the respective encoding units. For example, when the current encoding unit 710 is 64x64, the frequency conversion can be performed using the 32x32 conversion unit 720. [ In addition, the data of the encoding unit 710 of 64x64 size is encoded by performing the frequency conversion with the conversion units of 32x32, 16x16, 8x8, and 4x4 size of 64x64 or smaller, respectively, and then the conversion unit having the smallest error with the original Can be selected.

도 8은 본 발명의 일 실시예에 따라, 심도별 부호화 정보들을 도시한다.FIG. 8 illustrates depth-specific encoding information, in accordance with an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 부호화 장치(100)의 부호화 정보 부호화부는 부호화 모드에 관한 정보로서, 각각의 부호화 심도의 부호화 단위마다 분할 타입에 관한 정보(800), 예측 모드에 관한 정보(810), 변환 단위 크기에 대한 정보(820)를 부호화하여 전송할 수 있다.The encoding information encoding unit of the image encoding apparatus 100 according to an exemplary embodiment of the present invention includes information on the encoding mode and information on the division type 800 and information on the prediction mode 810 ), And information 820 on the conversion unit size may be encoded and transmitted.

분할 타입에 대한 정보(800)는, 현재 부호화 단위의 움직임 예측을 위해 예측 단위로서, 현재 부호화 단위가 분할된 타입에 대한 정보를 나타낸다. 예를 들어, 심도 0 및 크기 2Nx2N의 현재 부호화 단위 CU_0는, 크기 2Nx2N의 예측 단위(802), 크기 2NxN의 예측 단위(804), 크기 Nx2N의 예측 단위(806), 크기 NxN의 예측 단위(808) 중 어느 하나의 타입으로 분할되어 예측 단위로 이용될 수 있다. 이 경우 현재 부호화 단위의 분할 타입에 관한 정보(800)는 크기 2Nx2N의 예측 단위(802), 크기 2NxN의 예측 단위(804), 크기 Nx2N의 예측 단위(806) 및 크기 NxN의 예측 단위(808) 중 하나를 나타내도록 설정된다.The division type information 800 indicates information on a type in which the current coding unit is divided as a prediction unit for motion prediction of the current coding unit. For example, the current encoding unit CU_0 of depth 0 and size 2Nx2N includes a prediction unit 802 of size 2Nx2N, a prediction unit 804 of size 2NxN, a prediction unit 806 of size Nx2N, a prediction unit 808 of size NxN ) And can be used as a prediction unit. In this case, information 800 regarding the division type of the current encoding unit includes a prediction unit 802 of size 2Nx2N, a prediction unit 804 of size 2NxN, a prediction unit 806 of size Nx2N, and a prediction unit 808 of size NxN. Lt; / RTI >

예측 모드에 관한 정보(810)는, 각각의 예측 단위의 움직임 예측 모드를 나타낸다. 예를 들어 예측 모드에 관한 정보(810)를 통해, 분할 타입에 관한 정보(800)가 가리키는 예측 단위가 인트라 모드(812), 인터 모드(814) 및 스킵 모드(816) 중 하나로 움직임 예측이 수행되는지 여부가 설정될 수 있다.The prediction mode information 810 indicates a motion prediction mode of each prediction unit. The prediction unit indicated by the information 800 regarding the division type is predicted to be one of the intra mode 812, the inter mode 814 and the skip mode 816 through the prediction mode information 810 Can be set.

또한, 변환 단위 크기에 관한 정보(820)는 현재 부호화 단위를 어떠한 변환 단위를 기반으로 주파수 변환을 수행할지 여부를 나타낸다. 예를 들어, 변환 단위는 제 1 인트라 변환 단위 크기(822), 제 2 인트라 변환 단위 크기(824), 제 1 인터 변환 단위 크기(826), 제 2 인트라 변환 단위 크기(828) 중 하나일 수 있다.In addition, the information 820 on the conversion unit size indicates whether to perform frequency conversion on the basis of which conversion unit the current encoding unit is performed. For example, the conversion unit may be one of a first intra-conversion unit size 822, a second intra-conversion unit size 824, a first inter-conversion unit size 826, have.

본 발명의 일 실시예에 따른 영상 복호화 장치(200)의 부호화 정보 추출부는, 각각의 심도별 부호화 단위마다 분할 타입에 관한 정보(800), 예측 모드에 관한 정보(810), 변환 단위 크기에 대한 정보(820)를 추출하여 복호화에 이용할 수 있다.The encoding information extracting unit of the image decoding apparatus 200 according to an embodiment of the present invention extracts information on the division type 800, information on the prediction mode 810, Information 820 can be extracted and used for decoding.

도 9 는 본 발명의 일 실시예에 따른 심도별 부호화 단위를 도시한다. FIG. 9 shows a depth encoding unit according to an embodiment of the present invention.

심도의 증가 여부를 나타내기 위해 축소 정보가 이용될 수 있다. 축소 정보는 현재 심도의 부호화 단위가 상위 심도의 부호화 단위로 축소될지 여부를 나타낸다. Reduced information may be used to indicate whether the depth is increased. The reduction information indicates whether or not the current-depth encoding unit is reduced to a higher-depth encoding unit.

심도 0 및 2N_0x2N_0 크기의 부호화 단위의 움직임 예측을 위한 예측 단위(910)는 2N_0x2N_0 크기의 분할 타입(912), 2N_0xN_0 크기의 분할 타입(914), N_0x2N_0 크기의 분할 타입(916), N_0xN_0 크기의 분할 타입(918)을 포함할 수 있다. A prediction unit 910 for motion prediction of a coding unit of depth 0 and 2N_0x2N_0 size includes a division type 912 of 2N_0x2N_0 size, a division type 914 of 2N_0xN_0 size, a division type 916 of N_0x2N_0 size, a division of N_0xN_0 size Type < / RTI >

분할 타입마다, 한 개의 2N_0xN_0 크기의 예측 단위, 두 개의 2N_0xN_0 크기의 예측 단위, 두 개의 N_0x2N_0 크기의 예측 단위, 네 개의 N_0xN_0 크기의 예측 단위마다 반복적으로 움직임 예측을 통한 부호화가 수행되어야 한다. 크기 2N_0xN_0 및 크기 N_0xN_0의 예측 단위에 대해서는, 인트라 모드 및 인터 모드로 움직임 예측이 수행될 수 있으며, 크기 N_0x2N_0 및 크기 N_0xN_0의 예측 단위로는 인터 모드로만 움직임 예측이 수행될 수 있다. 스킵 모드는 크기 2N_0xN_0의 예측 단위에 대해서만 수행될 수 있다.For each segmentation type, it is necessary to repeatedly perform motion prediction through a prediction unit of 2N_0xN_0 size, two prediction units of 2N_0xN_0 size, two prediction units of N_0x2N_0 size, and prediction units of four N_0xN_0 sizes. For the prediction unit of size 2N_0xN_0 and size N_0xN_0, motion prediction can be performed in intra mode and inter mode, and motion prediction can be performed only in inter mode as a prediction unit of size N_0x2N_0 and size N_0xN_0. The skip mode can be performed only for the prediction unit of size 2N_0xN_0.

크기 N_0xN_0의 분할 타입(918)에 의한 부호화 오차가 가장 작다면, 심도 0를 1로 증가(920)시키고, 심도 2 및 크기 N_0xN_0의 분할 타입의 부호화 단위들(922, 924, 926, 928)에 대해 반복적으로 최소 부호화 오차를 검색해 나갈 수 있다. If the coding error by the division type 918 of the size N_0xN_0 is the smallest, the depth 0 is increased to 1 (920), and the coding units 922, 924, 926 and 928 of the division type of the depth 2 and the size N_0xN_0 The minimum coding error can be repeatedly searched for.

동일한 심도의 부호화 단위들(922, 924, 926, 928)에 대해 부호화가 반복적으로 수행되므로, 이중 하나만 예를 들어 심도 1의 부호화 단위의 부호화를 설명한다. 심도 1 및 크기 2N_1x2N_1 (=N_0xN_0)의 부호화 단위의 움직임 예측을 위한 예측 단위(930)는, 크기 2N_1x2N_1의 분할 타입(932), 크기 2N_1xN_1의 분할 타입(934), 크기 N_1x2N_1의 분할 타입(936), 크기 N_1xN_1의 분할 타입(938)을 포함할 수 있다. 분할 타입마다, 한 개의 크기 2N_1x2N_1의 예측 단위, 두 개의 크기 2N_1xN_1의 예측 단위, 두 개의 크기 N_1x2N_1의 예측 단위, 네 개의 크기 N_1xN_1의 예측 단위마다 반복적으로 움직임 예측을 통한 부호화가 수행되어야 한다.Since encoding is repeatedly performed on the encoding units 922, 924, 926, and 928 of the same depth, encoding of only one of the encoding units of depth 1, for example, will be described. A prediction unit 930 for motion prediction of a coding unit of depth 1 and a size 2N_1x2N_1 (= N_0xN_0) includes a division type 932 of size 2N_1x2N_1, a division type 934 of size 2N_1xN_1, a division type 936 of size N_1x2N_1, , And a division type 938 of size N_1xN_1. For each segmentation type, it is necessary to repeatedly perform motion prediction through a prediction unit of a size 2N_1x2N_1, a prediction unit of two sizes 2N_1xN_1, a prediction unit of two sizes N_1x2N_1, and a prediction unit of four sizes N_1xN_1.

또한, 크기 N_1xN_1 크기의 분할 타입(938)에 의한 부호화 오차가 가장 작다면, 심도 1을 심도 2로 증가(940)시키면서, 심도 2 및 크기 N_2xN_2의 부호화 단위들(942, 944, 946, 948)에 대해 반복적으로 최소 부호화 오차를 검색해 나갈 수 있다. If the coding error by the division type 938 of the size N_1xN_1 is the smallest, the coding units 942, 944, 946 and 948 of the depth 2 and the size N_2xN_2 are increased while the depth 1 is increased to the depth 2 (940) The minimum coding error can be repeatedly searched for.

최대 심도가 d인 경우, 심도별 축소 정보는 심도 d-1일 때까지 설정될 수 있다. 즉, 심도 d-1 및 크기 2N_(d-1)x2N_(d-1)의 부호화 단위의 움직임 예측을 위한 예측 단위(950)는, 크기 2N_(d-1)x2N_(d-1)의 분할 타입(952), 크기 2N_(d-1)xN_(d-1)의 분할 타입(954), 크기 N_(d-1)x2N_(d-1)의 분할 타입(956), 크기 N_(d-1)xN_(d-1)의 분할 타입(958)을 포함할 수 있다. If the maximum depth is d, the depth reduction information can be set until the depth d-1. That is, the prediction unit 950 for motion prediction of the coding unit of the depth d-1 and the size 2N_ (d-1) x2N_ (d-1) A division type 954 of size N_ (d-1) xN_ (d-1), a division type 956 of size N_ 1) xN_ (d-1).

분할 타입마다, 한 개의 크기 2N_(d-1)x2N_(d-1)의 예측 단위, 두 개의 크기 2N_(d-1)xN_(d-1)의 예측 단위, 두 개의 크기 N_(d-1)x2N_(d-1)의 예측 단위, 네 개의 크기 N_(d-1)xN_(d-1)의 예측 단위마다 반복적으로 움직임 예측을 통한 부호화가 수행되어야 한다. 최대 심도가 d이므로, 심도 d-1의 부호화 단위(952)는 더 이상 축소 과정을 거치지 않는다.(D-1) x2N_ (d-1), a prediction unit of two sizes 2N_ (d-1) ) x2N_ (d-1), and four sizes N_ (d-1) xN_ (d-1). Since the maximum depth is d, the encoding unit 952 of depth d-1 no longer undergoes the reduction process.

본 발명의 일 실시예에 따른 영상 부호화 장치(100)는 부호화 단위(912)를 위한 부호화 심도를 결정하기 위해, 심도별 부호화 오차를 비교하여 가장 작은 부호화 오차가 발생하는 심도를 선택한다. 예를 들어, 심도 0의 부호화 단위에 대한 부호화 오차는 분할 타입(912, 914, 916, 918)마다 움직임 예측을 수행하여 부호화한 후 가장 작은 부호화 오차가 발생하는 예측 단위가 결정된다. 마찬가지로 심도 0, 1, ..., d-1 마다 부호화 오차가 가장 작은 예측 단위가 검색될 수 있다. 심도 d에서는, 크기 2N_dx2N_d의 부호화 단위이면서 예측 단위(960)를 기반으로 한 움직임 예측을 통해 부호화 오차가 결정될 수 있다. 이와 같이 심도 0, 1, ..., d-1, d의 모든 심도별 최소 부호화 오차를 비교하여 오차가 가장 작은 심도가 선택되어 부호화 심도로 결정될 수 있다. 부호화 심도 및 해당 심도의 예측 단위는 부호화 모드에 관한 정보로써 부호화되어 전송될 수 있다. 또한, 심도 0으로부터 부호화 심도에 이르기까지 부호화 단위가 축소되어야 하므로, 부호화 심도의 축소 정보만이 '0'으로 설정되고, 부호화 심도를 제외한 심도별 축소 정보는 '1'로 설정되어야 한다. The image encoding apparatus 100 according to an exemplary embodiment of the present invention compares depth-based encoding errors to determine depths for encoding units 912 and selects the depths at which the smallest encoding error occurs. For example, a coding error for a coding unit of depth 0 is determined by performing motion prediction for each of the division types 912, 914, 916, and 918, and a prediction unit in which the smallest coding error occurs is determined. Similarly, a prediction unit having the smallest coding error can be searched for every depth 0, 1, ..., d-1. At the depth d, the coding error can be determined through motion prediction based on the prediction unit 960, which is a coding unit of size 2N_dx2N_d. In this way, the minimum coding errors of the depths 0, 1, ..., d-1, and d are compared with each other, and the depth with the smallest error is selected to be determined as the coding depth. The coding depth and the prediction unit of the corresponding depth can be encoded and transmitted as information on the coding mode. In addition, since the coding unit must be reduced from the depth 0 to the coding depth, only the coding depth reduction information is set to '0', and the reduction information by depth is set to '1' except for the coding depth.

본 발명의 일 실시예에 따른 영상 복호화 장치(200)의 부호화 정보 추출부(220)는 부호화 단위(912)에 대한 부호화 심도 및 예측 단위에 관한 정보를 추출하여 부호화 단위(912)를 복호화하는데 이용할 수 있다. 일 실시예에 따른 영상 복호화 장치(200)는 심도별 축소 정보를 이용하여 축소 정보가 '0'인 심도를 부호화 심도로 파악하고, 해당 심도에 대한 부호화 모드에 관한 정보를 이용하여 복호화에 이용할 수 있다.The encoding information extracting unit 220 of the image decoding apparatus 200 according to an embodiment of the present invention extracts information on the encoding depth and the prediction unit for the encoding unit 912 and uses the information on the encoding depth 912 to decode the encoding unit 912 . The video decoding apparatus 200 according to an exemplary embodiment of the present invention uses the reduced information according to the depth to determine the depth with the reduced information of '0' as a coding depth and use the information on the coding mode for the corresponding depth to decode have.

도 10a 및 10b는 본 발명의 일 실시예에 따른, 부호화 단위, 예측 단위 및 주파수 변환 단위의 관계를 도시한다.FIGS. 10A and 10B show a relationship between an encoding unit, a prediction unit, and a frequency conversion unit according to an embodiment of the present invention.

부호화 단위(1010)는, 최대 부호화 단위(1000)에 대해 일 실시예에 따른 영상 부호화 장치(100)가 결정한 부호화 심도별 부호화 단위들이다. 예측 단위(1060)는 부호화 단위(1010) 중 각각의 부호화 심도별 부호화 단위의 예측 단위들이며, 변환 단위(1070)는 각각의 부호화 심도별 부호화 단위의 변환 단위들이다.The coding unit 1010 is coding units for coding depth determined by the image coding apparatus 100 according to the embodiment with respect to the maximum coding unit 1000. [ The prediction unit 1060 is a prediction unit of each coding depth unit among the coding units 1010 and the conversion unit 1070 is a conversion unit of each coding depth unit.

심도별 부호화 단위들(1010)은 최대 부호화 단위(1000)의 심도가 0이라고 하면, 부호화 단위들(1012, 1054)은 심도가 1, 부호화 단위들(1014, 1016, 1018, 1028, 1050, 1052)은 심도가 2, 부호화 단위들(1020, 1022, 1024, 1026, 1030, 1032, 1038)은 심도가 3, 부호화 단위들(1040, 1042, 1044, 1046)은 심도가 4이다. When the depth of the maximum coding unit 1000 is 0, the coding units 1012 and 1054 have depth 1 and coding units 1014, 1016, 1018, 1028, 1050 and 1052 The depths of the encoding units 1020, 1022, 1024, 1026, 1030, 1032 and 1038 are 3 and the depths of the encoding units 1040, 1042, 1044 and 1046 are 4, respectively.

예측 단위들(1060) 중 일부(1014, 1016, 1022, 1032, 1048, 1050, 1052, 1054)는 부호화 단위가 분할된 타입이다. 즉, 예측 단위(1014, 1022, 1050, 1054)는 2NxN의 분할 타입이며, 예측 단위(1016, 1048, 1052)는 Nx2N의 분할 타입, 예측 단위(1032)는 NxN의 분할 타입이다. 즉, 심도별 부호화 단위들(1010)의 예측 단위는 각각의 부호화 단위보다 작거나 같다. A portion (1014, 1016, 1022, 1032, 1048, 1050, 1052, 1054) of the prediction units 1060 is a type in which the coding unit is divided. That is, the prediction units 1014, 1022, 1050 and 1054 are divided into 2NxN, the prediction units 1016, 1048 and 1052 are divided into Nx2N, and the prediction unit 1032 is divided into NxN. That is, the prediction unit of the depth-dependent coding units 1010 is smaller than or equal to each coding unit.

변환 단위들(1070) 중 일부(1052, 1054)의 영상 데이터에 대해서는 부호화 단위에 비해 작은 크기의 데이터 단위로 주파수 변환 또는 주파수 역변환이 수행된다. 또한, 변환 단위(1014, 1016, 1022, 1032, 1048, 1050, 1052, 1054)는 예측 단위들(1060) 중 해당 예측 단위와 비교해보면, 서로 다른 크기 또는 형태의 데이터 단위이다. 즉, 본 발명의 일 실시예에 따른 영상 부호화 장치(100) 및 영상 복호화 장치(200)는 동일한 부호화 단위에 대한 예측 및 주파수 변환/역변환 작업이라 할지라도, 각각 별개의 데이터 단위를 기반으로 수행할 수 있다.Frequency conversion or inverse frequency conversion is performed on the image data of a part (1052, 1054) of the conversion units (1070) in units of data smaller in size than the encoding unit. The conversion units 1014, 1016, 1022, 1032, 1048, 1050, 1052, and 1054 are data units of different sizes or types when compared with the prediction units of the prediction units 1060. That is, the image encoding apparatus 100 and the image decoding apparatus 200 according to an exemplary embodiment of the present invention perform prediction and frequency conversion / inverse transform operations on the same encoding unit, respectively, based on separate data units .

도 11 은 본 발명의 일 실시예에 따른 부호화 단위별 부호화 정보를 도시한다.FIG. 11 shows encoding information for each encoding unit according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 영상 부호화 장치(100)의 부호화 정보 부호화부(140)는 부호화 단위별 부호화 정보를 부호화하고, 본 발명의 일 실시예에 따른 영상 복호화 장치(200)의 부호화 정보 추출부(220)는 부호화 단위별 부호화 정보를 추출할 수 있다.The encoding information encoding unit 140 of the image encoding apparatus 100 according to an embodiment of the present invention encodes the encoding information of each encoding unit and extracts encoding information of the image encoding apparatus 200 according to an embodiment of the present invention Unit 220 can extract the encoding information for each encoding unit.

부호화 정보는 부호화 단위에 대한 축소 정보, 분할 타입 정보, 예측 모드 정보, 변환 단위 크기 정보를 포함할 수 있다. 도 11에 도시되어 있는 부호화 정보들은 본 발명의 일 실시예에 따른 영상 부호화 장치(100) 및 영상 복호화 장치(200)에서 설정할 수 있는 일 예에 불과하며, 도시된 것에 한정되지 않는다.The encoding information may include reduction information for a coding unit, division type information, prediction mode information, and conversion unit size information. The encoding information shown in FIG. 11 is only an example that can be set in the image encoding apparatus 100 and the image decoding apparatus 200 according to an embodiment of the present invention, and is not limited to the illustrated ones.

축소 정보는 해당 부호화 단위의 부호화 심도를 나타낼 수 있다. 즉, 축소 정보에 따라 더 이상 축소되지 않는 심도가 부호화 심도이므로, 부호화 심도에 대해서 분할 타입 정보, 예측 모드, 변환 단위 크기 정보가 정의될 수 있다. 축소 정보에 따라 한 단계 더 축소되어야 하는 경우에는, 축소된 4개의 상위 심도의 부호화 단위마다 독립적으로 부호화가 수행되어야 한다.The reduction information may indicate the coding depth of the encoding unit. That is, since the depth that is not further reduced according to the reduction information is the encoding depth, the division type information, the prediction mode, and the conversion unit size information can be defined with respect to the encoding depth. In the case where it is required to be further reduced according to the reduction information, the encoding should be performed independently for each of the reduced four higher-depth encoding units.

분할 타입 정보는, 부호화 심도의 부호화 단위의 변환 단위의 분할 타입을 2Nx2N, 2NxN, Nx2N 및 NxN 중 하나로 나타낼 수 있다. 예측 모드는, 움직임 예측 모드를 인트라 모드, 인터 모드 및 스킵 모드 중 하나로 나타낼 수 있다. 인트라 모드는 분할 타입 2Nx2N 및 NxN에서만 정의될 수 있으며, 스킵 모드는 분할 타입 2Nx2N에서만 정의될 수 있다. 변환 단위 크기는 인트라 모드에서 두 종류의 크기, 인터 모드에서 두 종류의 크기로 설정될 수 있다.As the division type information, the division type of the conversion unit of the coding unit of the coding depth can be represented by 2Nx2N, 2NxN, Nx2N and NxN. The prediction mode may indicate the motion prediction mode as one of an intra mode, an inter mode, and a skip mode. The intra mode can be defined only in the split type 2Nx2N and NxN, and the skip mode can be defined only in the split type 2Nx2N. The conversion unit size can be set to two kinds of sizes in the intra mode and two kinds of sizes in the inter mode.

부호화 단위 내의 최소 부호화 단위마다, 소속되어 있는 부호화 심도의 부호화 단위별 부호화 정보를 수록하고 있을 수 있다. 따라서, 인접한 최소 부호화 단위들끼리 각각 보유하고 있는 부호화 정보들을 확인하면, 동일한 부호화 심도의 부호화 단위에 포함되는지 여부가 확인될 수 있다. 또한, 최소 부호화 단위가 보유하고 있는 부호화 정보를 이용하면 해당 부호화 심도의 부호화 단위를 확인할 수 있으므로, 최대 부호화 단위 내의 부호화 심도들의 분포가 유추될 수 있다.
The encoding unit-specific encoding information of the belonging encoding depth may be stored for each minimum encoding unit in the encoding unit. Therefore, if encoding information held in each of the adjacent minimum encoding units is checked, it can be confirmed whether or not the encoding information is included in the encoding unit of the same encoding depth. In addition, since the encoding unit of the encoding depth can be identified by using the encoding information held in the minimum encoding unit, the distribution of encoding depths in the maximum encoding unit can be inferred.

이하, 본 발명의 일 실시예에 따라 심도별 부호화 단위에 기반하여 부호화된 최대 부호화 단위의 분할 형태 정보를 나타내는 축소 정보(split flag)와 최대 부호화 단위에 포함된 각 부호화 단위의 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 계층적으로 부호화하는 방법에 대하여 구체적으로 설명한다. 이하의 설명에서, 부호화 단위는 영상의 부호화 단계에서 지칭되는 용어이며, 영상의 복호화 단계의 측면에서 부호화 단위는 복호화 단위로 정의될 수 있다. 즉, 부호화 단위와 복호화 단위라는 용어는 영상의 부호화 단계 및 복호화 단계 중 어느 단계에서 지칭되느냐의 차이만 있을 뿐이며 부호화 단계에서의 부호화 단위는 복호화 단계에서의 복호화 단위로 불리울 수 있다. 용어의 통일성을 위하여 특별한 경우를 제외하고는 부호화 단계 및 복호화 단계에서 동일하게 부호화 단위로 통일하여 부르기로 한다.Hereinafter, according to an embodiment of the present invention, a split flag indicating division type information of a maximum encoding unit encoded based on a depth encoding unit and a prediction mode of each encoding unit included in the maximum encoding unit are divided into a skip mode A method of hierarchically encoding skip information indicating whether or not skip information is present will be described in detail. In the following description, a coding unit is a term referred to in an image coding step, and a coding unit may be defined as a decoding unit in terms of a decoding step of an image. That is, the terms coding unit and decoding unit are different only in terms of the coding and decoding stages of the image, and the coding unit in the coding step may be referred to as a decoding unit in the decoding step. For the sake of uniformity of terms, except for special cases, they shall be uniformly coded in the coding step and the decoding step in the same coding unit.

도 16은 본 발명의 일 실시예에 따른 영상 부호화 방법을 나타낸 플로우 차트이다.16 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.

도 1 및 도 16을 참조하면, 단계 1610에서 최대 부호화 단위 분할부(110)는 현재 픽처를 최대 크기의 부호화 단위인 적어도 하나의 최대 부호화 단위로 분할한다. Referring to FIGS. 1 and 16, in step 1610, the maximum coding unit division unit 110 divides the current picture into at least one maximum coding unit which is a coding unit of the maximum size.

단계 1620에서, 부호화 심도 결정부(120)는 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 최대 부호화 단위의 영상 데이터를 부호화하여 최대 부호화 단위의 분할 형태 및 분할된 각 부호화 단위의 예측 모드를 결정한다. 전술한 바와 같이, 부호화 심도 결정부(120)는 현재 픽처의 최대 부호화 단위마다 심도별 부호화 단위로 영상 데이터를 부호화하여 가장 작은 부호화 오차가 발생하는 심도를 선택하여 선택된 심도를 부호화 심도로 결정한다. 구체적으로, 부호화 심도 결정부(120)는 최대 부호화 단위 내의 영상 데이터를 최대 심도 이하의 적어도 하나의 심도에 따라 심도별 부호화 단위에 기반하여 부호화하고, 각각의 심도별 부호화 단위에 기반한 부호화 결과를 비교하여 비교 결과 부호화 오차가 가장 작은 심도를 선택한다. 또한, 부호화 심도 결정부(120)는 하나의 최대 부호화 단위에 포함되는 동일한 심도의 부호화 단위들이라 하더라도, 각각의 데이터에 대한 부호화 오차를 측정하고 상위 심도로의 축소 여부를 결정한다.In step 1620, the encoding depth determination unit 120 encodes the image data of the maximum encoding unit based on the depth-dependent encoding units that are hierarchically reduced as the depth increases, Lt; / RTI > As described above, the coding depth determiner 120 encodes the image data in units of depth coding for each maximum coding unit of the current picture, selects a depth at which the smallest coding error occurs, and determines the selected depth as the coding depth. Specifically, the coding depth determiner 120 encodes the video data in the maximum coding unit based on the depth coding units according to at least one depth below the maximum depth, and compares the coding results based on the coding units for each depth And selects the depth with the smallest coding error as a comparison result. Also, the coding depth determiner 120 measures coding errors for each data and determines whether to reduce the coding depth to a higher depth, even if the coding units are of the same depth included in one maximum coding unit.

단계 1630에서, 부호화 정보 부호화부(140)는 각 부호화 단위마다 각 부호화 단위가 포함되는 하위 심도의 부호화 단위의 분할 여부를 포함하는 축소 정보를 설정한다. 축소 정보를 설정하는 과정에 대하여는 도 12 내지 도 14를 참조하여 후술한다. In step 1630, the encoding information encoding unit 140 sets the reduction information including whether or not the lower-depth encoding unit including each encoding unit is divided for each encoding unit. The process of setting the reduction information will be described later with reference to FIG. 12 to FIG.

단계 1640에서 부호화 정보 부호화부(140)는 각 부호화 단위마다 결정된 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 설정한다. 단계 1650에서 각 부호화 단위마다 설정된 축소 정보 및 스킵 정보를 부호화한다.In step 1640, the encoding information encoding unit 140 sets skip information indicating whether the prediction mode determined for each encoding unit is the skip mode. In step 1650, the reduction information and skip information set for each encoding unit are encoded.

도 12는 본 발명의 일 실시예에 따라 심도별 부호화 단위에 기반하여 결정된 최대 부호화 단위의 분할 형태의 일 예이다.12 is an example of a division type of the maximum encoding unit determined based on the depth encoding unit according to an embodiment of the present invention.

도 12에서, 도면 부호 1200으로 표시된 가장 큰 블록이 최대 부호화 단위이며, 최대 부호화 단위(1200)은 최대 심도 3의 값을 갖는다고 가정한다. 즉, 최대 부호화 단위(1200)의 크기를 2Nx2N 이라고 하면, 최대 부호화 단위(1200)는 NxN 크기의 심도 1의 부호화 단위(1210), (N/2)x(N/2) 크기의 심도 2의 부호화 단위(1220) 및 (N/4)x(N/4) 크기의 심도 3의 부호화 단위(1220)들을 이용하여 분할될 수 있다. 도 12에 도시된 바와 같은 최대 부호화 단위(1200)의 분할 형태를 전송하기 위하여, 본 발명의 일 실시예에 따르면 부호화 정보 부호화부(140)는 각 부호화 단위마다 각 부호화 단위가 포함되는 하위 심도의 부호화 단위의 분할 여부를 포함하는 축소 정보를 설정한다. 예를 들어, NxN 크기의 심도 1의 부호화 단위(1210)는 그 하위 부호화 단위인 심도 0의 최대 부호화 단위(1200)의 분할 여부를 나타내는 1bit의 축소 정보를 갖는다. 축소정보의 각 비트가 "1"의 값을 갖는 경우 해당 심도의 부호화 단위가 분할되는 경우를 나타내며, 축소정보의 각 비트가 "0"의 값을 갖는 경우 해당 심도의 부호화 단위가 분할되지 않는 경우라고 한다면, 도 12에 도시된 바와 같은 분할 형태를 갖기 위해서 심도 1의 부호화 단위(1210)은 "1"의 값을 갖는 축소 정보를 갖는다.In FIG. 12, it is assumed that the largest block denoted by reference numeral 1200 is a maximum encoding unit, and the maximum encoding unit 1200 has a maximum depth 3. That is, assuming that the size of the maximum encoding unit 1200 is 2Nx2N, the maximum encoding unit 1200 is an encoding unit 1210 of NxN depth 1, a depth 2 of (N / 2) x (N / 2) May be segmented using coding units 1220 of depth 3 with coding unit 1220 and (N / 4) x (N / 4) size. In order to transmit the division type of the maximum encoding unit 1200 as shown in FIG. 12, according to an embodiment of the present invention, the encoding information encoding unit 140 encodes the sub-depth And sets reduction information including whether or not the encoding unit is divided. For example, the coding unit 1210 having the depth 1 of NxN size has 1-bit reduction information indicating whether the maximum coding unit 1200 of the depth 0, which is the lower coding unit, is divided. When each bit of the reduction information has a value of "1 ", the encoding unit of the corresponding depth is divided. If each bit of the reduction information has a value of" 0 & , The coding unit 1210 of depth 1 has reduction information having a value of "1 " in order to have a division form as shown in Fig.

도 13은 도 12의 심도 2의 부호화 단위(1220)가 갖는 축소 정보를 설명하기 위한 도면이다. 도 13의 도면 부호 1320은 도 12에 도시된 심도 2의 부호화 단위(1220)에 대응된다.13 is a diagram for explaining reduction information that the encoding unit 1220 in the depth 2 of FIG. 12 has. Reference numeral 1320 in Fig. 13 corresponds to the coding unit 1220 in the depth 2 shown in Fig.

도 13을 참조하면, 부호화 정보 부호화부(140)는 심도 2의 부호화 단위(1320)의 축소 정보로서 심도 2의 부호화 단위(1320)가 포함되는 심도 1의 부호화 단위(1310) 및 심도 0의 최대 부호화 단위(1300)의 분할 여부를 나타내는 2bit의 축소 정보를 설정한다. 축소정보의 각 비트가 "1"의 값을 갖는 경우 해당 심도의 부호화 단위가 분할되는 경우를 나타내며, 축소정보의 각 비트가 "0"의 값을 갖는 경우 해당 심도의 부호화 단위가 분할되지 않는 경우라고 한다면, 심도 2의 부호화 단위(1320)는 심도 1의 부호화 단위(1310) 및 심도 0의 최대 부호화 단위(1300)가 모두 분할되어야지만 생성될 수 있기 때문에, 심도 2의 부호화 단위(1320)는 "11"이라는 2bit의 축소 정보를 갖는다. 13, the encoding information encoding unit 140 encodes the encoding unit 1310 having the depth 1 and the encoding unit 1320 having the depth 2 including the encoding unit 1320 having the depth 2 as the reduction information of the encoding unit 1320 having the depth 2, 2-bit reduction information indicating whether or not the coding unit 1300 is divided is set. When each bit of the reduction information has a value of "1 ", the encoding unit of the corresponding depth is divided. If each bit of the reduction information has a value of" 0 & The encoding unit 1320 of depth 2 can be generated only when both the encoding unit 1310 of depth 1 and the maximum encoding unit 1300 of depth 0 are generated. Quot; 11 ".

도 14는 도 12의 심도 3의 부호화 단위(1230)가 갖는 축소 정보를 설명하기 위한 도면이다. 도 14의 도면 부호 1430은 도 12에 도시된 심도 3의 부호화 단위(1230)에 대응된다.FIG. 14 is a diagram for explaining reduction information possessed by the encoding unit 1230 in the depth 3 of FIG. 14. Reference numeral 1430 in FIG. 14 corresponds to the encoding unit 1230 in the depth 3 shown in FIG.

도 14를 참조하면, 부호화 정보 부호화부(140)는 심도 3의 부호화 단위(1430)의 축소 정보로서 심도 3의 부호화 단위(1430)가 포함되는 심도 2의 부호화 단위(1420), 심도 1의 부호화 단위(1410) 및 최대 부호화 단위(1400)의 분할 여부를 나타내는 3bit의 축소 정보를 갖는다. 축소정보의 각 비트가 "1"의 값을 갖는 경우 해당 심도의 부호화 단위가 분할되는 경우를 나타내며, 축소정보의 각 비트가 "0"의 값을 갖는 경우 해당 심도의 부호화 단위가 분할되지 않는 경우라고 한다면, 심도 3의 부호화 단위(1430)는 심도 2의 부호화 단위(1420), 심도 1의 부호화 단위(1410) 및 심도 0의 최대 부호화 단위(1400)가 모두 분할되어야지만 생성될 수 있기 때문에, 심도 3의 부호화 단위(1430)는 "111"이라는 3bit의 축소 정보를 갖는다. Referring to FIG. 14, the encoding information encoding unit 140 encodes the encoding unit 1420 of the depth 2 including the encoding unit 1430 of the depth 3 as the reduction information of the encoding unit 1430 of the depth 3, Bit reduction information indicating whether the unit 1410 and the maximum coding unit 1400 are divided. When each bit of the reduction information has a value of "1 ", the encoding unit of the corresponding depth is divided. If each bit of the reduction information has a value of" 0 & , The coding unit 1430 of depth 3 can be generated only when the coding unit 1420 of depth 2, the coding unit 1410 of depth 1 and the maximum coding unit 1400 of depth 0 are all divided, The encoding unit 1430 at depth 3 has 3-bit reduction information of "111 ".

이와 같이 부호화 정보 부호화부(140)는 최대 부호화 단위로부터 최상위 부호화 단위까지 현재 부호화 단위의 높이 및 너비를 계층적으로 축소한 횟수를 나타내는 최대 심도를 d(d는 정수), 현재 부호화 단위의 심도를 n(0≤n≤(d-1), n은 정수)이라고 할 때, 현재 부호화 단위가 포함되는 하위 심도의 부호화 단위의 분할 여부를 n 비트의 축소 정보를 이용하여 설정할 수 있다. n 비트의 축소 정보의 각 비트는 심도 0 부터 심도 (n-1)까지의 현재 부호화 단위보다 하위 심도의 부호화 단위들의 분할 여부를 나타내도록 설정된다. 이 때, n 비트의 축소 정보 중 MSB(Most Significant Bit) 및 LSB(Least Significant Bit) 중 어떤 순서로 하위 심도의 분할 여부를 나타낼 것인지는 필요에 따라 변경 가능할 것이다.In this way, the coding information coding unit 140 sets the maximum depth d (d is an integer) indicating the number of times the height and width of the current coding unit are hierarchically reduced from the maximum coding unit to the highest coding unit, the depth of the current coding unit (n-1), where n is an integer (0? n? (d-1), and n is an integer), it is possible to determine whether the lower- Each bit of the n-bit reduced information is set to indicate whether or not the lower-depth coding units are divided from the current coding unit from the depth 0 to the depth (n-1). At this time, it is possible to change the order in which the sub-depths are divided in order of MSB (Most Significant Bit) and LSB (Least Significant Bit) among the n-bit reduction information.

한편, 이와 같이 현재 부호화 단위가 포함된 하위 심도의 분할 여부를 축소 정보로서 각 부호화 단위마다 설정하는 경우 최대 부호화 단위에서 각 부호화 단위가 속하는 위치는 부호화단과 복호화단에서 동일한 처리 순서에 따라 부호화 단위를 처리하는 경우 분할 여부에 대한 정보로부터 쉽게 결정될 수 있을 것이다. 예를 들어, 도 15에 도시된 바와 같이 본 발명의 일 실시예에서 최대 부호화 단위(1500) 내의 각 부호화 단위는 동일 심도의 부호화 단위를 지그재그 스캔 순서로 처리되며, 복호화시에도 동일한 지그재그 스캔 순서로 동일 심도의 복호화 단위를 처리한다고 하면, 전술한 각 부호화 단위가 갖는 하위 심도의 부호화 단위의 분할여부를 나타내는 축소 정보로부터 부호화시에 결정된 최대 부호화 단위의 분할 형태를 복원하는 것이 가능하다. 본 발명의 일 실시예에 따른 블록 처리 순서는 예시한 지그재그 스캔 순서 이외에 다양하게 설정될 수 있지만 복호화시에 최대 부호화 단위의 분할 형태를 결정할 수 있도록 하기 위해서 부호화시와 복호화시에 동일하게 부호화 단위의 처리 순서를 설정하는 것이 필요하다.If the division of the lower depth including the current coding unit is set for each coding unit as the reduction information, the position to which each coding unit belongs in the maximum coding unit is set to the coding unit and the decoding unit in the same processing order It can be easily determined from the information on whether or not to divide it. For example, as shown in FIG. 15, in an embodiment of the present invention, each coding unit in the maximum coding unit 1500 processes the coding units of the same depth in a zigzag scanning order, and in the same zigzag scanning order It is possible to restore the division form of the largest coding unit determined at the time of coding from the reduction information indicating whether or not the coding units of the lower depths of each coding unit described above are divided. The block processing procedure according to an embodiment of the present invention may be variously set in addition to the illustrated zigzag scanning order. However, in order to determine the division type of the maximum encoding unit at the time of decoding, It is necessary to set the processing order.

부호화 정보 부호화부(140)는 각 부호화 단위의 결정된 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 각 부호화 단위마다 1비트를 할당하여 설정한다. 예를 들어, 스킵 정보의 비트가 "1"의 값을 갖는 경우 해당 부호화 단위의 예측 모드가 스킵 모드임을 나타내며, "0"의 값을 갖는 경우 해당 부호화 단위가 스킵 모드 이외의 다른 예측 모드에 따라 예측된 것임을 나타낼 수 있다. 이와 같이 부호화 단위마다 스킵 정보를 설정하는 이유는 스킵 모드의 경우 별도의 예측 과정없이 주변 부호화 단위의 움직임 정보로부터 복원될 수 있고, 또한 스킵 모드로 결정된 부호화 단위는 복호화시에 별도의 분할 과정이 생략될 수 있어서 영상의 압축 효율 및 처리 성능을 향상시킬 수 있기 때문이다.The coding information coding unit 140 sets skip information indicating whether the determined prediction mode of each coding unit is the skip mode by allocating 1 bit for each coding unit. For example, if the bit of skip information has a value of "1 ", it indicates that the prediction mode of the encoding unit is a skip mode. If the bit has a value of" 0 & It can be shown that it is predicted. The reason why the skip information is set for each encoding unit can be restored from the motion information of the surrounding encoding unit without a separate prediction process in the skip mode and the encoding unit determined in the skip mode is skipped in decoding So that the compression efficiency and processing performance of the image can be improved.

도 17은 본 발명의 다른 실시예에 따른 영상 부호화 방법을 나타낸 플로우 차트이다.17 is a flowchart illustrating an image encoding method according to another embodiment of the present invention.

도 17을 참조하면, 단계 1710에서 최대 부호화 단위 분할부(110)는 현재 픽처를 최대 크기의 부호화 단위인 적어도 하나의 최대 부호화 단위로 분할한다.Referring to FIG. 17, in step 1710, the maximum coding unit division unit 110 divides the current picture into at least one maximum coding unit which is the coding unit of the maximum size.

단계 1720에서, 부호화 심도 결정부(120)는 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 최대 부호화 단위의 영상 데이터를 부호화하여 최대 부호화 단위의 분할 형태 및 분할된 각 부호화 단위의 예측 모드를 결정한다. 전술한 바와 같이, 부호화 심도 결정부(120)는 현재 픽처의 최대 부호화 단위마다 심도별 부호화 단위로 영상 데이터를 부호화하여 가장 작은 부호화 오차가 발생하는 심도를 선택하여 선택된 심도를 부호화 심도로 결정한다. In step 1720, the encoding depth determiner 120 encodes the image data of the maximum encoding unit based on the depth-dependent encoding units that are hierarchically reduced as the depth increases, and outputs the segmentation type of the maximum encoding unit, Lt; / RTI > As described above, the coding depth determiner 120 encodes the image data in units of depth coding for each maximum coding unit of the current picture, selects a depth at which the smallest coding error occurs, and determines the selected depth as the coding depth.

단계 1730에서, 부호화 정보 부호화부(140)는 각 부호화 단위마다 각 부호화 단위 및 상기 각 부호화 단위가 포함되는 하위 심도의 예측 모드가 스킵 모드인지 여부를 포함하는 스킵 정보를 설정한다. 즉, 본 발명의 다른 실시예에 따르면 각 부호화 단위의 스킵 정보는 현재 부호화 단위뿐만 아니라 현재 부호화 단위가 포함되는 하위 심도의 부호화 단위의 스킵 모드를 포함하도록 할 수 있다. 구체적으로, 최대 부호화 단위로부터 최상위 부호화 단위까지 현재 부호화 단위의 높이 및 너비를 계층적으로 축소한 횟수를 나타내는 최대 심도를 d(d는 정수), 현재 부호화 단위의 심도를 n(0≤n≤(d-1), n은 정수)이라고 할 때, 부호화 정보 부호화부(140)는 현재 부호화 단위 및 하위 (n-1)개의 심도의 부호화 단위의 예측 모드가 스킵 모드인지 여부를 n 비트의 스킵 정보를 이용하여 설정할 수 있다. n=1인 경우, 즉 현재 부호화 단위가 심도 1의 크기를 갖는 부호화 단위라면 바로 하위 심도의 부호화 단위는 최대 부호화 단위가 되므로 이 경우에는 자신의 예측 모드가 스킵 모드인지 여부를 나타내는 1비트의 스킵 정보만을 갖는다. 예를 들어, 도 12에서 심도 1의 부호화 단위(1210)는 자신의 예측 모드가 스킵 모드인지 여부를 나타내는 1 bit의 스킵 정보를 갖는다. In step 1730, the coding information coding unit 140 sets skip information including whether the prediction mode of each coding unit and lower depth including the coding unit is a skip mode for each coding unit. That is, according to another embodiment of the present invention, the skip information of each coding unit may include not only the current coding unit but also a skip mode of the lower-depth coding unit including the current coding unit. Specifically, the maximum depth indicating the number of times the height and width of the current coding unit are hierarchically reduced from the maximum coding unit to the highest coding unit is d (d is an integer), the depth of the current coding unit is n (0? N? (n-1) and n is an integer), the encoding information encoding unit 140 determines whether the prediction mode of the current encoding unit and the encoding unit of the lower (n-1) depths is a skip mode, As shown in FIG. If n = 1, that is, if the current coding unit is a coding unit having a depth of 1, then the lower-depth coding unit becomes the highest coding unit. In this case, a 1-bit skip indicating whether the prediction mode is a skip mode Information. For example, in FIG. 12, the coding unit 1210 of depth 1 has skip information of 1 bit indicating whether its prediction mode is a skip mode.

다른 예로서, 도 13을 참조하면 부호화 정보 부호화부(140)는 심도 2의 부호화 단위(1320)의 스킵 정보로서 심도 2의 부호화 단위(1320)의 스킵 정보를 나타내는 1 bit와, 심도 2의 부호화 단위(1320)가 포함되는 심도 1의 부호화 단위(1310)의 스킵 정보를 나타내는 1bit의 총 2bit의 스킵 정보를 설정한다. 또 다른 예로서, 도 14를 참조하면, 부호화 정보 부호화부(140)는 심도 3의 부호화 단위(1430)의 스킵 정보로서 심도 3의 부호화 단위(1430)의 스킵 정보, 심도 3의 부호화 단위(1430)가 포함되는 심도 2의 부호화 단위(1420)의 스킵 정보 및 심도 1의 부호화 단위(1410)의 스킵 정보의 총 3bit의 축소 정보를 갖도록 설정할 수 있다.As another example, referring to FIG. 13, the encoded information encoding unit 140 may include 1 bit indicating skip information of the encoding unit 1320 of depth 2 as skip information of the encoding unit 1320 of depth 2, Bit skip information indicating 1 bit skip information of the coding unit 1310 of depth 1 including the unit 1320 is set. 14, the coded information encoding unit 140 skips the skip information of the coding unit 1430 of depth 3 and the skip information of the coding unit 1430 of depth 3 as skip information of the coding unit 1430 of depth 3, And the skip information of the coding unit 1410 of the depth 1 and the skip information of the total of 3 bits of the skip information of the depth 1 coding unit 1410. [

다시 도 17을 참조하면, 단계 1740에서 각 부호화 단위마다 각 부호화 단위가 포함되는 하위 심도의 부호화 단위의 분할 여부를 포함하는 축소 정보를 설정한다. 단계 1740에 따른 축소 정보를 설정하는 단계는 전술한 본 발명의 일 실시예와 동일한 바 구체적인 설명은 생략한다.Referring again to FIG. 17, in step 1740, reduction information including whether or not a lower-depth coding unit including each coding unit is divided is set for each coding unit. The step of setting the reduction information according to step 1740 is the same as the embodiment of the present invention described above, and a detailed description thereof will be omitted.

단계 1750에서, 각 부호화 단위마다 설정된 축소 정보 및 스킵 정보를 부호화한다.In step 1750, the reduction information and skip information set for each encoding unit are encoded.

도 18은 본 발명의 일 실시예에 따른 영상 복호화 방법을 나타낸 플로우 차트이다. 본 발명의 일 실시예에 따른 영상 복호화 방법은 도 16에 도시된 본 발명의 일 실시예에 따라서 부호화된 비트스트림을 복호화하는 경우에 대응된다.18 is a flowchart illustrating a video decoding method according to an embodiment of the present invention. The image decoding method according to an embodiment of the present invention corresponds to decoding of a bit stream encoded according to an embodiment of the present invention shown in FIG.

도 2 및 도 18을 참조하면, 단계 1810에서 부호화 정보 추출부(220)는 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 최대 크기의 부호화 단위인 최대 부호화 단위별로 부호화된 영상 데이터로부터, 복호화되는 현재 복호화 단위가 포함되는 하위 심도의 복호화 단위의 분할 여부를 포함하는 축소 정보를 추출한다.Referring to FIGS. 2 and 18, in step 1810, the encoding information extracting unit 220 extracts the encoded image per a maximum encoding unit, which is a maximum-size encoding unit, based on depth-dependent encoding units that are hierarchically reduced as the depth increases Extracts from the data the reduction information including whether or not the decoding unit of the lower depth including the current decoding unit to be decoded is divided.

단계 1820에서, 부호화 정보 추출부(220)는 영상 데이터로부터 현재 복호화 단위의 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 추출한다.In step 1820, the encoding information extracting unit 220 extracts skip information indicating whether the prediction mode of the current decoding unit is the skip mode, from the image data.

단계 1830에서, 복호화부(230)는 축소 정보에 따라서 현재 복호화 단위가 포함된 최대 복호화 단위의 분할 형태를 결정한다. 전술한 바와 같이, 축소 정보는 현재 복호화 단위가 포함되는 하위 심도의 복호화 단위의 분할 여부를 나타내는 n 비트의 축소 정보를 포함하고 있으므로, 이러한 축소 정보를 이용하여 최대 복호화 단위를 현재 복호화 단위가 갖는 심도의 부호화 단위까지 분할할 수 있다.In step 1830, the decoding unit 230 determines the division type of the maximum decoding unit including the current decoding unit according to the reduction information. As described above, since the reduction information includes n-bit reduction information indicating whether or not the decoding unit of the lower depth including the current decoding unit is divided, it is possible to reduce the maximum decoding unit to the depth of the current decoding unit Can be divided up to the encoding unit of FIG.

단계 1840에서, 복호화부(230)는 스킵 정보에 따라서 현재 복호화 단위의 예측 모드가 스킵 모드인지 여부를 판단한다. 만약 현재 복호화 단위가 스킵 모드로 예측된 경우 분할 과정은 중단되고 부호화 정보에 포함된 다른 정보 등이 복호화되기 시작된다.In step 1840, the decoding unit 230 determines whether the prediction mode of the current decoding unit is the skip mode according to the skip information. If the current decoding unit is predicted as a skip mode, the dividing process is stopped and other information included in the encoding information is decoded.

도 19는 본 발명의 일 실시예에 따른 영상 복호화 방법에 따라 최대 크기 복호화 단위를 분할하는 과정 및 스킵 정보를 복호화하는 과정을 나타낸 플로우 차트이다.FIG. 19 is a flowchart illustrating a process of dividing a maximum-size decoding unit according to an image decoding method according to an embodiment of the present invention and decoding skip information.

도 19를 참조하면, 단계 1910에서 최대 부호화 단위에 속한 부호화 단위들의 부호화 정보가 추출된다. 전술한 바와 같이 부호화 단위에는 축소 정보 및 스킵 정보가 포함되어 있다.Referring to FIG. 19, in step 1910, encoding information of the encoding units belonging to the maximum encoding unit is extracted. As described above, the encoding unit includes the reduction information and the skip information.

단계 1920에서, 축소 정보를 복호화하고 단계 1930에서 복호화된 축소 정보에 따라서 현재 설정된 심도에 따라 최대 복호화 단위를 분할하여 현재 복호화 단위가 갖는 심도까지 분할되었는지 여부를 판단한다. 일 예로, 전술한 바와 같이 현재 복호화 단위가 "11"의 축소 정보를 갖는 심도 2의 복호화 단위라면 최대 복호화 단위를 2번 축소시킨 부호화 단위에 포함되어야 한다. In step 1920, the reduced information is decoded. In step 1930, in accordance with the reduced information decoded in step 1930, the maximum decoded unit is divided according to the currently set depth to determine whether it is divided up to the depth of the current decoded unit. For example, as described above, if the current decoding unit is a decoding unit of depth 2 having reduced information of "11 ", it should be included in the coding unit obtained by reducing the maximum decoding unit twice.

단계 1930의 판단결과, 현재 복호화 단위가 갖는 심도까지 최대 복호화 단위가 분할되지 않은 경우라면 단계 1935에서 심도를 하나 증가시킨다.If it is determined in step 1930 that the maximum decoding unit is not divided up to the depth of the current decoding unit, step 1935 increases the depth by one.

단계 1930의 판단 결과, 현재 복호화 단위가 갖는 심도까지 최대 복호화 단위가 분할된 경우라면 단계 1940에서 스킵 정보를 복호화한다. 단계 1950에서 현재 복호화 단위의 예측 모드가 스킵 모드인지 여부를 판단하여, 만약 스킵 모드라면 단계 1960에서 현재 복호화 단위가 마지막 복호화 단위인지를 판단하여 다음 최대 복호화 단위의 복호화로 진행하거나(단계 1970) 복호화 단위의 인덱스 값을 한 단계 증가시켜 다음 복호화 단위의 복호화가 진행되도록 한다(단계 1980)If it is determined in step 1930 that the maximum decoding unit is divided up to the depth of the current decoding unit, skip information is decoded in step 1940. It is determined whether the current decoding mode is a skip mode. If the current decoding mode is a skip mode, it is determined in step 1960 whether the current decoding unit is the last decoding unit and proceeds to decoding in the next maximum decoding unit (step 1970) The index value of the unit is increased by one step so that decoding of the next decoding unit proceeds (step 1980)

단계 1950의 판단 결과, 단계 1955에서 현재 복호화 단위의 예측 모드가 스킵 모드라면 축소 정보 및 스킵 정보 이외의 다른 영상 데이터에 관한 정보를 복호화한다.As a result of the determination in step 1950, if the prediction mode of the current decoding unit is the skip mode in step 1955, information on image data other than the reduced information and skip information is decoded.

도 20은 본 발명의 다른 실시예에 따른 영상 복호화 방법을 나타낸 플로우 차트이다. 본 발명의 다른 실시예에 따른 영상 복호화 방법은 도 17에 도시된 본 발명의 다른 실시예에 따라서 부호화된 비트스트림을 복호화하는 경우에 대응된다.20 is a flowchart illustrating a video decoding method according to another embodiment of the present invention. The image decoding method according to another embodiment of the present invention corresponds to decoding of a bit stream encoded according to another embodiment of the present invention shown in FIG.

도 2 및 도 20을 참조하면, 단계 2010에서 부호화 정보 추출부(220)는 심도가 증가함에 따라 계층적으로 축소되는 심도별 부호화 단위에 기반하여 최대 크기의 부호화 단위인 최대 부호화 단위별로 부호화된 영상 데이터로부터, 복호화되는 현재 복호화 단위 및 현재 복호화 단위가 포함되는 하위 심도의 복호화 단위의 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 추출한다.Referring to FIGS. 2 and 20, in step 2010, the encoding information extracting unit 220 extracts the encoded image per a maximum encoding unit, which is a maximum-size encoding unit, based on the depth-dependent encoding units that are hierarchically reduced as the depth increases From the data, skip information indicating whether the prediction mode of the decoding unit of the lower depth including the current decoding unit to be decoded and the current decoding unit is the skip mode is extracted.

단계 2020에서, 부호화 정보 추출부(220)는 영상 데이터로부터 현재 복호화 단위가 포함되는 하위 심도의 복호화 단위의 분할 여부를 포함하는 축소 정보를 추출한다.In step 2020, the encoding information extracting unit 220 extracts reduction information including whether the decoding unit of the lower depth including the current decoding unit is divided from the image data.

단계 2030에서, 복호화부(230)는 추출된 스킵 정보에 따라서 현재 복호화 단위 및 하위 심도의 복호화 단위의 예측 모드가 스킵 모드인지 여부를 판단한다. 이와 같이 본 발명의 다른 실시예에 따라서 축소 정보를 복호화하기 이전에 스킵 정보를 먼저 복호화하는 경우 스킵 모드로 판단된 복호화 단위에 대해서는 분할 과정이 생략될 수 있기 때문에 영상의 처리 성능을 향상시킬 수 있다.In step 2030, the decoding unit 230 determines whether the prediction mode of the decoding unit of the current decoding unit and the lower decoding unit is the skip mode, according to the extracted skip information. As described above, according to another embodiment of the present invention, when the skip information is decoded prior to decoding the reduced information, the decoding process can be omitted for the decoded unit determined as the skip mode, so that the processing performance of the image can be improved .

단계 2040에서 스킵 모드로 판단되지 않은 복호화 단위에 대하여 축소 정보에 따라서 현재 복호화 단위가 포함된 최대 복호화 단위의 분할 형태를 결정한다.In step 2040, the division type of the maximum decoding unit including the current decoding unit is determined according to the reduction information for the decoding unit not determined as the skip mode.

도 21은 본 발명의 다른 실시예에 따른 영상 복호화 방법에 따라 최대 크기 복호화 단위를 분할하는 과정 및 스킵 정보를 복호화하는 과정을 나타낸 플로우 차트이다.FIG. 21 is a flowchart illustrating a process of dividing a maximum-size decoding unit and decoding skip information according to the image decoding method according to another embodiment of the present invention.

도 21을 참조하면, 단계 2110에서 최대 부호화 단위에 속한 부호화 단위들의 부호화 정보가 추출된다. 전술한 바와 같이 부호화 단위에는 축소 정보 및 스킵 정보가 포함되어 있다.Referring to FIG. 21, in step 2110, encoding information of encoding units belonging to the maximum encoding unit is extracted. As described above, the encoding unit includes the reduction information and the skip information.

단계 2120에서, 스킵 정보를 복호화하고, 단계 2130에서 복호화된 스킵 정보에 따라서 헌재 복호화 단위의 예측 모드가 스킵 모드인지 여부를 판단한다. 현재 복호화 단위의 예측 모드가 스킵 모드인 경우, 현재 복호화 단위가 마지막 복호화 단위인지 여부를 판단하여(단계 2135) 마지막 복호화 단위라면 다음 최대 복호화 단위의 복호화로 진행하고(단계 2140), 마지막 복호화 단위가 아니라면 복호화 단위 인덱스를 하나 증가시켜 다음 복호화 단위에 대한 복호화가 진행되도록 한다(단계 2145). 현재 복호화 단위의 예측 모드가 스킵 모드가 아니라면, 단계 2150에서 현재 복호화 단위의 축소 정보를 복호화한다.In step 2120, skip information is decoded and it is determined whether the prediction mode of the busy decoding unit is the skip mode according to the skip information decoded in step 2130. If the prediction mode of the current decoding unit is the skip mode, it is determined whether the current decoding unit is the last decoding unit (Step 2135). If the current decoding unit is the last decoding unit, the process proceeds to the decoding of the next maximum decoding unit (Step 2140) If not, the decoding unit index is increased by one to allow decoding to be performed for the next decoding unit (step 2145). If the prediction mode of the current decoding unit is not the skip mode, the reduction information of the current decoding unit is decoded in step 2150.

단계 2160에서 복호화된 축소 정보에 따라서 현재 설정된 심도에 따라 최대 복호화 단위를 분할하여 현재 복호화 단위가 갖는 심도까지 분할되었는지 여부를 판단한다. 일 예로, 전술한 바와 같이 현재 복호화 단위가 "11"의 축소 정보를 갖는 심도 2의 복호화 단위라면 최대 복호화 단위를 2번 축소시켜야 한다.The maximum decoding unit is divided according to the currently set depth according to the reduced information decoded in step 2160, and it is determined whether or not the maximum decoding unit is divided up to the depth of the current decoding unit. For example, if the current decoding unit is a decoding unit of depth 2 having reduced information of "11 ", the maximum decoding unit should be reduced by two.

단계 2160의 판단결과, 현재 복호화 단위가 갖는 심도까지 최대 복호화 단위가 분할되지 않은 경우라면 단계 2180에서 심도를 하나 증가시키고, 단계 2160의 판단 결과 현재 복호화 단위가 갖는 심도까지 최대 복호화 단위가 분할된 경우라면 단계 2170에서 축소 정보 및 스킵 정보 이외의 다른 영상 데이터에 관한 정보를 복호화를 개시한다.
If it is determined in step 2160 that the maximum decoding unit is not divided up to the depth of the current decoding unit, the depth is increased by one in step 2180. If it is determined in step 2160 that the maximum decoding unit is divided up to the depth of the current decoding unit The decoding of the information related to the video data other than the reduced information and the skip information is started in step 2170.

본 발명에 따른 영상의 부호화, 복호화 방법은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 포함된. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The image coding and decoding method according to the present invention can also be implemented as computer-readable codes on a computer-readable recording medium. A computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored. Examples of the computer-readable recording medium include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like. The computer readable recording medium may also be distributed over a networked computer system so that computer readable code can be stored and executed in a distributed manner.

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다. The present invention has been described with reference to the preferred embodiments. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

Claims (1)

영상 복호화 방법에 있어서,
심도가 증가함에 따라 상위 심도의 부호화 단위들로 계층적으로 분할되는 최대 부호화 단위를 이용하여 부호화된 영상 데이터로부터, 복호화되는 현재 부호화 단위가 포함되는 하위 심도의 부호화 단위의 분할 여부를 나타내는 축소 정보를 추출하는 단계;
상기 영상 데이터로부터 상기 현재 부호화 단위의 예측 모드가 스킵 모드인지 여부를 나타내는 스킵 정보를 추출하는 단계;
상기 축소 정보에 따라서 상기 현재 부호화 단위가 포함된 최대 부호화 단위의 분할 형태를 결정하는 단계; 및
상기 스킵 정보에 따라서 상기 현재 부호화 단위의 예측 모드가 스킵 모드인지 여부를 판단하는 단계를 포함하며,
상기 영상은 최대 부호화 단위의 크기에 관한 정보에 따라 복수의 최대 부호화 단위로 분할되고,
상기 최대 부호화 단위는 축소 정보에 따라 심도를 가지는 다수의 부호화 단위들로 계층적으로 분할되고,
현재 심도의 부호화 단위는 상위 심도의 부호화 단위로부터 분할된 정사각 데이터 단위들 중 하나이고,
상기 축소 정보가 상기 현재 심도에서 분할됨을 나타내는 경우에, 상기 현재 심도의 부호화 단위는 주변 부호화 단위들과 독립적으로, 하위 심도의 부호화 단위들로 분할되고,
상기 축소 정보가 상기 하위 심도에서 분할되지 않음을 나타내는 경우에, 상기 하위 심도의 부호화 단위로부터 적어도 하나의 예측 단위가 획득되는 것을 특징으로 하는 영상의 복호화 방법.
In the image decoding method,
As the depth of field increases, reduction information indicating whether or not the lower-depth coding unit including the current coding unit to be decoded is divided is extracted from the image data coded using the highest coding unit hierarchically divided into higher-depth coding units Extracting;
Extracting skip information indicating whether the prediction mode of the current encoding unit is a skip mode from the image data;
Determining a division type of a maximum encoding unit including the current encoding unit according to the reduction information; And
And determining whether the prediction mode of the current encoding unit is a skip mode according to the skip information,
Wherein the image is divided into a plurality of maximum encoding units according to information on a size of a maximum encoding unit,
Wherein the maximum encoding unit is hierarchically divided into a plurality of encoding units having a depth according to the reduction information,
The encoding unit of the current depth is one of the square data units divided from the encoding unit of the higher depth,
Wherein the coding unit of the current depth is divided into coding units of lower depth independently of the surrounding coding units when the reduction information indicates that the coding information is divided at the current depth,
Wherein at least one prediction unit is obtained from the coding unit of the lower depth when the reduction information indicates that the reduction information is not divided at the lower depth.
KR20140058653A 2014-05-15 2014-05-15 Method and apparatus for image encoding, and method and apparatus for image decoding KR101489222B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR20140058653A KR101489222B1 (en) 2014-05-15 2014-05-15 Method and apparatus for image encoding, and method and apparatus for image decoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR20140058653A KR101489222B1 (en) 2014-05-15 2014-05-15 Method and apparatus for image encoding, and method and apparatus for image decoding

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020090067827A Division KR101483750B1 (en) 2009-07-24 2009-07-24 Method and apparatus for image encoding, and method and apparatus for image decoding

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020140147798A Division KR101525015B1 (en) 2014-10-28 2014-10-28 Method and apparatus for image encoding, and method and apparatus for image decoding

Publications (2)

Publication Number Publication Date
KR20140067996A true KR20140067996A (en) 2014-06-05
KR101489222B1 KR101489222B1 (en) 2015-02-04

Family

ID=51124039

Family Applications (1)

Application Number Title Priority Date Filing Date
KR20140058653A KR101489222B1 (en) 2014-05-15 2014-05-15 Method and apparatus for image encoding, and method and apparatus for image decoding

Country Status (1)

Country Link
KR (1) KR101489222B1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5021891A (en) * 1990-02-27 1991-06-04 Qualcomm, Inc. Adaptive block size image compression method and system
KR20080066522A (en) * 2007-01-11 2008-07-16 삼성전자주식회사 Method and apparatus for encoding and decoding multi-view image

Also Published As

Publication number Publication date
KR101489222B1 (en) 2015-02-04

Similar Documents

Publication Publication Date Title
KR101483750B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101457894B1 (en) Method and apparatus for encoding image, and method and apparatus for decoding image
JP5997317B2 (en) Video decoding method and video decoding apparatus
KR101675116B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR101857794B1 (en) Method and apparatus for encoding/decoding video with predicting quantization parameter of hierarchical data unit
KR20110112224A (en) Method and apparatus for encdoing/decoding information regarding encoding mode
KR101969933B1 (en) Method and apparatus for encoding residual block, and method and apparatus for decoding residual block
KR101662741B1 (en) Method for image decoding
KR101719737B1 (en) Method and apparatus for encoding residual block, and method and apparatus for decoding residual block
KR101618766B1 (en) Method and apparatus for image decoding
KR101618214B1 (en) Method for image decoding
KR101489222B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101525015B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101863689B1 (en) Method and apparatus for encoding residual block, and method and apparatus for decoding residual block
KR101604038B1 (en) Method and apparatus for encoding residual block, and method and apparatus for decoding residual block
KR101604035B1 (en) Method and apparatus for decoding an image
KR101625631B1 (en) Method and apparatus for encoding residual block, and method and apparatus for decoding residual block
KR101625629B1 (en) Method and apparatus for decoding an image
KR101604033B1 (en) Method and apparatus for decoding an image
KR101464980B1 (en) Method and apparatus for encoding and decoding image using large transform unit

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
A107 Divisional application of patent
J202 Request for trial for correction [limitation]
J301 Trial decision

Free format text: TRIAL DECISION FOR CORRECTION REQUESTED 20150305

Effective date: 20151120

FPAY Annual fee payment

Payment date: 20171228

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20181227

Year of fee payment: 5