KR20150090010A - 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
KR20150090010A
KR20150090010A KR1020150104336A KR20150104336A KR20150090010A KR 20150090010 A KR20150090010 A KR 20150090010A KR 1020150104336 A KR1020150104336 A KR 1020150104336A KR 20150104336 A KR20150104336 A KR 20150104336A KR 20150090010 A KR20150090010 A KR 20150090010A
Authority
KR
South Korea
Prior art keywords
unit
encoding
depth
mode
coding
Prior art date
Application number
KR1020150104336A
Other languages
Korean (ko)
Other versions
KR101607613B1 (en
Inventor
송학섭
민정혜
니콜라이 쉬라코프
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020150104336A priority Critical patent/KR101607613B1/en
Publication of KR20150090010A publication Critical patent/KR20150090010A/en
Application granted granted Critical
Publication of KR101607613B1 publication Critical patent/KR101607613B1/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/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution

Abstract

Disclosed are a method and an apparatus for image encoding, and a method and an apparatus for image decoding to partition a current picture into blocks in different sizes and to variously set the number of intra-prediction modes applied in accordance with the size of the partitioned blocks.

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 an image, and more particularly, to a method and apparatus for encoding and decoding an image that performs intra prediction by selecting an intra prediction mode in various directions.

MPEG-1, MPEG-2, MPEG-4, H.264/MPEG-4 AVC(Advanced Video Coding)와 같은 영상 압축 방식에서는 영상을 부호화하기 위해서 하나의 픽처를 매크로 블록으로 나눈다. 그리고, 인터 예측 및 인트라 예측에서 이용가능한 모든 부호화 모드에서 각각의 매크로 블록을 부호화한 다음, 매크로 블록의 부호화에 소요되는 비트율과 원 매크로 블록과 복호화된 매크로 블록과의 왜곡 정도에 따라서 부호화 모드를 하나 선택하여 매크로 블록을 부호화한다.In an image compression method such as MPEG-1, MPEG-2, MPEG-4, and H.264 / MPEG-4 Advanced Video Coding (AVC), one picture is divided into macroblocks to encode an image. Then, each macroblock is encoded in all coding modes available for inter prediction and intra prediction, and then an encoding mode is selected according to the bit rate required for encoding the macroblock and the degree of distortion between the original macroblock and the decoded macroblock. And the macro block is encoded.

고해상도 또는 고화질 비디오 컨텐트를 재생, 저장할 수 있는 하드웨어의 개발 및 보급에 따라, 고해상도 또는 고화질 비디오 컨텐트를 효과적으로 부호화하거나 복호화하는 비디오 코덱의 필요성이 증대하고 있다. 기존의 비디오 코덱에 따르면, 비디오는 소정 크기의 매크로블록에 기반하여 제한된 예측 모드에 따라 부호화되고 있다.Background of the Invention [0002] As the development and dissemination of hardware capable of playing back and storing high-resolution or high-definition video content increases the need for video codecs to effectively encode or decode high-definition or high-definition video content. According to the existing video codec, video is encoded according to a limited prediction mode based on a macroblock of a predetermined size.

본 발명은 다양한 크기의 계층적 부호화 단위에 기반하여 다양한 방향성을 갖는 인트라 예측 방법을 적용하는 영상 부호화. 복호화 방법 및 장치를 제공한다.The present invention relates to an image encoding method using intra-prediction methods having various directions based on hierarchical encoding units of various sizes. A decoding method and apparatus are provided.

본 발명의 일 실시예에 따른 영상 부호화 장치는 상기 영상을 최대 크기의 최대 부호화 단위로 분할하고, 상기 최대 부호화 단위를 계층 구조의 부호화 단위들로 분할하는 분할부; 상기 부호화 단위들 중 부호화되는 현재 부호화 단위의 예측을 수행하기 위한 예측 단위의 인트라 예측 모드를 결정하고, 상기 결정된 인트라 예측 모드에 따라서 상기 예측 단위에 대한 인트라 예측을 수행하는 인트라 예측부를 포함하며, 상기 인트라 예측 모드는 복수 개의 방향들 중 특정 방향을 가리키며, 상기 특정 방향은 수평 방향의 픽셀들의 개수를 나타내는 dx(dx는 정수) 개의 픽셀들 및 수직 방향의 픽셀들의 개수를 나타내는 dy(dy는 정수) 개의 픽셀들 중 하나에 의하여 가리켜지며, 상기 인트라 예측부는 상기 예측 단위의 현재 픽셀의 위치 및 상기 인트라 예측 모드에 의하여 가리켜지는 상기 특정 방향에 따라서, 상기 예측 단위의 좌측 및 상측 중 하나에 위치한 적어도 하나의 주변 픽셀을 획득하고, 상기 획득된 주변 픽셀을 이용하여 상기 현재 픽셀의 예측값을 획득하는 것을 특징으로 한다.The image encoding apparatus according to an embodiment of the present invention includes: a division unit for dividing the image into a maximum-size maximum encoding unit and dividing the maximum encoding unit into hierarchical encoding units; An intra prediction unit for determining an intra prediction mode of a prediction unit for performing prediction of a current coding unit to be coded among the coding units and performing intra prediction for the prediction unit according to the determined intra prediction mode, The intra-prediction mode indicates a specific direction among a plurality of directions, and the specific direction is dx (dx is an integer) representing the number of pixels in the horizontal direction and dy (dy is an integer) representing the number of pixels in the vertical direction. Wherein the intra prediction unit predicts, based on the position of the current pixel of the prediction unit and the specific direction indicated by the intra prediction mode, at least one of the left and right of the prediction unit Acquires a peripheral pixel of the image, And obtains a predicted value of the current pixel.

본 발명의 일 실시예에 따른 영상 복호화 장치는 비트스트림으로부터 부호화 단위의 최대 크기에 대한 정보 및 현재 심도의 부호화 단위가 하위 심도의 부호화 단위들로 분할되는지 여부를 나타내는 분할 정보를 추출하고, 상기 분할 정보에 기초하여, 최대 부호화 단위에 포함된 계층 구조의 부호화 단위들을 결정하며, 상기 부호화 단위들 중 복호화되는 현재 심도의 부호화 단위의 예측을 수행하기 위한 예측 단위를 결정하며, 상기 비트스트림으로부터 상기 예측 단위의 인트라 예측 모드 정보를 추출하는 엔트로피 복호화부; 및 상기 추출된 인트라 예측 모드에 따라서 상기 예측 단위에 대한 인트라 예측을 수행하는 인트라 예측부를 포함하며, 상기 인트라 예측 모드는 복수 개의 방향들 중 특정 방향을 가리키며, 상기 특정 방향은 수평 방향의 픽셀들의 개수를 나타내는 dx(dx는 정수) 개의 픽셀들 및 수직 방향의 픽셀들의 개수를 나타내는 dy(dy는 정수) 개의 픽셀들 중 하나에 의하여 가리켜지며, 상기 인트라 예측부는 상기 예측 단위의 현재 픽셀의 위치 및 상기 인트라 예측 모드에 의하여 가리켜지는 상기 특정 방향에 따라서, 상기 예측 단위의 좌측 및 상측 중 하나에 위치한 적어도 하나의 주변 픽셀을 획득하고, 상기 획득된 주변 픽셀을 이용하여 상기 현재 픽셀의 예측값을 획득하는 것을 특징으로 한다.The image decoding apparatus according to an embodiment of the present invention extracts information on a maximum size of an encoding unit from a bitstream and division information indicating whether a current encoding unit of the current depth is divided into low resolution encoding units, Determining a prediction unit for performing a prediction of an encoding unit of a current depth to be decoded among the encoding units, determining a prediction unit for performing a prediction of a current encoding unit from among the encoding units, An entropy decoding unit for extracting intra prediction mode information of a unit; And an intra predictor for performing intra prediction on the prediction unit according to the extracted intra prediction mode, wherein the intra prediction mode indicates a specific direction among a plurality of directions, and the specific direction is a number of pixels in the horizontal direction And dy (dy is an integer) pixels indicating the number of pixels in the vertical direction, and the intraprediction unit detects the position of the current pixel of the prediction unit and the position of the current pixel of the prediction unit, Acquiring at least one neighboring pixel positioned at one of left and upper sides of the prediction unit according to the specific direction indicated by the intra prediction mode and acquiring a predicted value of the current pixel using the obtained neighboring pixels .

본 발명에 따르면 다양한 크기의 부호화 단위에 대하여 보다 다양한 방향으로 인트라 예측 부호화를 수행함으로써 영상의 압축 효율을 향상시킬 수 있다.According to the present invention, intraprediction encoding is performed in various directions for encoding units of various sizes, thereby improving the compression efficiency of an image.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치의 블록도이다.
도 2 는 본 발명의 일 실시예에 따른 영상 복호화 장치의 블록도를 도시한다.
도 3은 본 발명의 일 실시예에 따른 계층적 부호화 단위를 도시한다.
도 4 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부의 블록도를 나타낸 것이다.
도 5 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부의 블록도를 나타낸 것이다.
도 6은 본 발명의 일 실시예에 따른 심도별 부호화 단위 및 예측 단위를 도시한다.
도 7은 본 발명의 일 실시예에 따른, 부호화 단위 및 변환 단위의 관계를 도시한다.
도 8은 본 발명의 일 실시예에 따라, 심도별 부호화 정보들을 도시한다.
도 9 는 본 발명의 일 실시예에 따른 심도별 부호화 단위를 도시한다.
도 10a 내지 10c는 본 발명의 일 실시예에 따른, 부호화 단위, 예측 단위 및 주파수 변환 단위의 관계를 도시한다.
도 11 은 본 발명의 일 실시예에 따른 부호화 단위별 부호화 정보를 도시한다.
도 12는 본 발명의 일 실시예에 따른 부호화 단위의 크기에 따른 인트라 예측 모드들의 개수를 도시한다.
도 13a 내지 도 13c는 본 발명의 일 실시예에 따른 소정 크기의 부호화 단위에 적용되는 인트라 예측 모드의 일 예를 설명하기 위한 도면이다.
도 14는 본 발명의 일 실시예에 따른 소정 크기의 부호화 단위에 적용되는 인트라 예측 모드의 다른 예를 설명하기 위한 도면이다.
도 15는 본 발명의 일 실시예에 따른 다양한 방향성을 갖는 인트라 예측 모드들을 설명하기 위한 참조도이다.
도 16은 본 발명의 일 실시예에 따른 쌍선형 모드를 설명하기 위한 참조도이다.
도 17은 본 발명의 일 실시예에 따라서 현재 부호화 단위의 인트라 예측 모드의 예측값을 생성하는 과정을 설명하기 위한 도면이다.
도 18은 본 발명의 일 실시예에 따라서 서로 다른 크기를 갖는 부호화 단위들 사이의 인트라 예측 모드의 매핑 과정을 설명하기 위한 참조도이다.
도 19는 본 발명의 일 실시예에 따라서 주변 부호화 단위의 인트라 예측 모드들을 대표 인트라 예측 모드들 중 하나로 매핑하는 과정을 설명하기 위한 참조도이다.
도 20은 본 발명의 일 실시예에 따른 영상의 인트라 예측 장치를 나타낸 블록도이다.
도 21은 본 발명의 일 실시예에 따른 영상 부호화 방법을 나타낸 플로우 차트이다.
도 22는 본 발명의 일 실시예에 따른 영상 복호화 방법을 나타낸 플로우 차트이다.
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 to 10C 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.
FIG. 12 shows the number of intra prediction modes according to the size of an encoding unit according to an embodiment of the present invention.
13A to 13C are views for explaining an example of an intra prediction mode applied to a coding unit of a predetermined size according to an embodiment of the present invention.
14 is a view for explaining another example of an intra prediction mode applied to a coding unit of a predetermined size according to an embodiment of the present invention.
15 is a reference diagram for explaining intra prediction modes having various directions according to an embodiment of the present invention.
16 is a reference diagram for explaining a bilinear mode according to an embodiment of the present invention.
17 is a diagram for explaining a process of generating a prediction value of an intra prediction mode of a current encoding unit according to an embodiment of the present invention.
18 is a reference diagram for explaining a process of mapping an intra prediction mode between coding units having different sizes according to an embodiment of the present invention.
19 is a reference diagram for explaining a process of mapping intra-prediction modes of a surrounding encoding unit to one of representative intra-prediction modes according to an embodiment of the present invention.
20 is a block diagram illustrating an apparatus for intra prediction of an image according to an embodiment of the present invention.
FIG. 21 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.
22 is a flowchart illustrating a video decoding method according to an embodiment of the present invention.

이 부호화 단위의 최대 크기에 따라, 현재 픽처의 영상 데이터를 최대 부호화 단위로 분할하며, 각각의 최대 부호화 단위는 심도별로 분할되는 부호화 단위들을 포함할 수 있다. 본 발명의 일 실시예에 따른 최대 부호화 단위는 심도별로 분할되므로, 최대 부호화 단위에 포함된 공간 영역(spatial domain)의 영상 데이터가 심도에 따라 계층적으로 분류될 수 있다. According to the maximum size of the coding unit, the image data of the current picture is divided into a maximum coding unit, and each maximum coding unit may include coding units divided by depth. Since the maximum encoding unit according to an embodiment of the present invention is divided 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 maximum encoding unit can be hierarchically divided 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)는 심도마다 최대 부호화 단위의 영역이 분할된 적어도 하나의 분할 영역을 부호화하여, 적어도 하나의 분할 영역 별로 최종 부호화 결과가 출력될 심도를 결정한다. 즉 부호화 심도 결정부(120)는, 최대 부호화 단위마다 심도별 부호화 단위로 영상 데이터를 부호화하여 가장 작은 부호화 오차가 발생하는 심도를 선택하여 부호화 심도로 결정한다. 부호화 심도는 R-D 코스트(Rate-Distortion Cost) 계산에 기초해 결정될 수 있다. 결정된 부호화 심도 및 최대 부호화 단위별 영상 데이터는 출력부(130)로 출력된다. The encoding depth determination unit 120 encodes at least one divided area in which the area of the maximum encoding unit is divided for each depth, and determines the depth at which the final encoding result is output for each of at least one of the divided areas. That is, the coding depth determination unit 120 selects the depth at which the smallest coding error occurs, and determines the coding depth as the coding depth by coding the image data in units of coding per depth for each maximum coding unit. The coding depth may be determined based on a Rate-Distortion Cost calculation. The determined coding depth and the image data of each coding unit are output to the output 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 encoding unit increases, the encoding unit is hierarchically divided and reduced, and the number of encoding 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 unit is divided into lower depths. 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 coding depths may be set for one maximum coding unit and data of the maximum coding unit may be divided according to the coding units of one or more coding depths.

또한, 최대 부호화 단위에 포함된 상이한 크기의 서브 부호화 단위들은 상이한 크기의 처리 단위에 기초해 예측 또는 주파수 변환될 수 있다. 다시 말해, 영상 부호화 장치(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, predictive coding may be performed based on a processing unit of a type in which at least one of the height or the width of an encoding unit is halved. Hereinafter, a data unit serving as a basis of predictive encoding 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)에서 결정된 적어도 하나의 부호화 심도에 기초하여 부호화된 최대 부호화 단위의 영상 데이터 및 심도별 부호화 모드에 관한 정보를 비트스트림 형태로 출력한다.The output unit 130 outputs, in the form of a bit stream, video data of the maximum encoding unit encoded based on at least one encoding depth determined by the encoding depth determination unit 120 and information on the depth encoding mode.

심도별 부호화 모드에 관한 정보는, 부호화 심도 정보, 부호화 심도의 부호화 단위의 예측 단위의 파티션 타입 정보, 예측 단위별 예측 모드 정보, 변환 단위의 크기 정보 등을 포함할 수 있다.The information on the depth-dependent coding mode may include coding depth information, partition 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 coding depth information can be defined using depth division information indicating whether or not coding is performed at the lower depth coding unit without coding 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 division information of the current depth can be defined so as not to be further divided into lower depths. On the other hand, if the current depth of the current encoding unit is not the encoding depth, the encoding using the lower depth encoding unit should be tried. Therefore, the division information of the current depth may be defined to be divided into the lower depth encoding units.

현재 심도가 부호화 심도가 아니라면, 하위 심도의 부호화 단위로 분할된 부호화 단위에 대해 부호화가 수행된다. 현재 심도의 부호화 단위 내에 하위 심도의 부호화 단위가 하나 이상 존재하므로, 각각의 하위 심도의 부호화 단위마다 반복적으로 부호화가 수행되어, 동일한 심도의 부호화 단위마다 재귀적(recursive) 부호화가 수행될 수 있다.If the current depth is not the encoding depth, encoding is performed on the encoding unit divided into lower-depth encoding units. Since there are one or more lower-level coding units in the current-depth coding unit, the coding is repeatedly performed for each lower-level coding unit 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.

따라서, 일 실시예에 따른 출력부(130)는, 최대 부호화 단위에 포함되어 있는 최소 부호화 단위마다 해당 부호화 정보를 설정할 수 있다. 즉, 부호화 심도의 부호화 단위는 동일한 부호화 정보를 보유하고 있는 최소 부호화 단위를 하나 이상 포함하고 있다. 이를 이용하여, 인근 최소 부호화 단위들이 동일한 심도별 부호화 정보를 갖고 있다면, 동일한 최대 부호화 단위에 포함되는 최소 부호화 단위일 수 있다.Accordingly, the output unit 130 according to the embodiment can set the corresponding 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.

예를 들어 출력부(130)를 통해 출력되는 부호화 정보는, 심도별 부호화 단위별 부호화 정보와 예측 단위별 부호화 정보로 분류될 수 있다. 심도별 부호화 단위별 부호하 정보는, 예측 모드 정보, 파티션 크기 정보를 포함할 수 있다. 예측 단위별로 전송되는 부호화 정보는 인터 모드의 추정 방향에 관한 정보, 인터 모드의 참조 영상 인덱스에 관한 정보, 움직임 벡터에 관한 정보, 인트라 모드의 크로마 성분에 관한 정보, 인트라 모드의 보간 방식에 관한 정보 등을 포함할 수 있다. 또한, 픽처, 슬라이스 또는 GOP별로 정의되는 부호화 단위의 최대 크기에 관한 정보 및 최대 심도에 관한 정보는 비트스트림의 헤더에 삽입될 수 있다.For example, the encoding information output through the output unit 130 may be classified into encoding information per depth unit and encoding information per prediction unit. The under-coding-by-depth coding unit information may include prediction mode information and partition size information. The encoding information to be transmitted for each prediction unit includes information about the estimation direction of the inter mode, information about the reference picture index of the inter mode, information on the motion vector, information on the chroma component of the intra mode, information on the interpolation mode of the intra mode And the like. Information on the maximum size of a coding unit defined for each picture, slice or GOP, and information on the maximum depth can be inserted into the header of the bitstream.

영상 부호화 장치(100)의 가장 간단한 형태의 실시예에 따르면, 심도별 부호화 단위는 한 계층 상위 심도의 부호화 단위의 높이 및 너비를 반분한 크기의 부호화 단위이다. 즉, 현재 심도(k)의 부호화 단위의 크기가 2Nx2N이라면, 하위 심도(k+1)의 부호화 단위의 크기는 NxN 이다. 따라서, 2Nx2N 크기의 현재 부호화 단위는 NxN 크기의 하위 심도 부호화 단위를 최대 4개 포함할 수 있다.According to the simplest embodiment of the image coding apparatus 100, the depth-dependent coding unit is a coding unit having a height divided by the height and width of the coding unit of one layer higher depth. That is, if the size of the encoding unit of the current depth (k) is 2Nx2N, the size of the encoding unit of the lower depth (k + 1) is NxN. Therefore, the current encoding unit of 2Nx2N size can include a maximum of 4 sub-depth encoding 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 apparatus 200 for decoding an image according to an exemplary embodiment of the present invention includes a receiving unit 210, an image data and coding information extracting unit 220, and an image data decoding unit 230.

수신부(210)는 부호화된 비디오에 대한 비트스트림을 수신하여 파싱(parsing)한다. 영상 데이터 및 부호화 정보 추출부(220)는 파싱된 비트스트림으로부터 최대 부호화 단위별로 영상 데이터를 추출하여 영상 데이터 복호화부(230)로 출력한다. 영상 데이터 및 부호화 정부 추출부(220)는 현재 픽처 또는 슬라이스에 대한 헤더로부터 현재 픽처 또는 슬라이스의 최대 부호화 단위에 대한 정보를 추출할 수 있다. The receiving unit 210 receives and parses a bitstream of the encoded video. The image data and encoding information extracting unit 220 extracts image data for each maximum encoding unit from the parsed bit stream and outputs the extracted image data to the image data decoding unit 230. The image data and encoding unit extraction unit 220 can extract information on the maximum encoding unit of the current picture or slice from the header of the current picture or slice.

또한, 영상 데이터 및 부호화 정보 추출부(220)는 파싱된 비트스트림으로부터 최대 부호화 단위별 부호화 심도 및 부호화 모드에 관한 정보를 추출한다. 추출된 부호화 심도 및 부호화 모드에 관한 정보는 영상 데이터 복호화부(230)로 출력된다.Also, the image data and encoding information extracting unit 220 extracts information on the encoding depth and the encoding mode for each maximum encoding unit from the parsed bitstream. 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 can be set for one or more coding depth information, and the information on the coding mode for each coding depth includes information on partition type information, prediction mode information, Size information of the conversion unit, and the like. In addition, as the encoding depth information, depth-based segmentation information may be extracted.

최대 부호화 단위의 분할 형태에 대한 정보는 최대 부호화 단위에 포함된 심도에 따라 상이한 크기의 서브 부호화 단위에 대한 정보를 포함할 수 있으며, 부호화 모드에 관한 정보는 서브 부호화 단위별 예측 단위에 대한 정보, 예측 모드에 대한 정보 및 변환 단위에 대한 정보 등을 포함할 수 있다. 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 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 sub-encoding unit included in the encoding unit of the maximum encoding depth, based on the information on the division type of the maximum encoding unit. The decoding process may include a prediction process including intra prediction and motion compensation and an inverse frequency conversion 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 division information by depth. If the partition information indicates that the current depth is to be decoded, the current depth is the depth of the encoding. Therefore, the image data decoding unit 230 can decode the current depth encoding unit for the image data of the current maximum encoding unit using the partition type, the prediction mode, and the conversion unit size information of the prediction unit. That is, it is possible to observe the encoding information set for the minimum encoding unit and to decode the minimum encoding units that hold the encoding information including the same division information, 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. Therefore, since the maximum depth of the video data 310 is 2, the encoding unit 315 of the video data 310 is encoded from a maximum encoding unit having a major axis size of 64, 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 a depth of two layers 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 from 32 to 16, 8, and 4 Encoding units. Since the image is encoded based on a smaller sub-encoding unit as the depth is deeper, it is suitable to encode an image including a finer 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.

본 발명의 일 실시예에 따른 영상 부호화부(400)는, 도 1의 영상 부호화 장치(100)의 부호화 심도 결정부(120)에서 부호화 심도를 결정하기 위하여 거쳐야 되는 영상 데이터 부호화 작업들을 수행한다.The image encoding unit 400 according to an exemplary embodiment of the present invention performs image data encoding operations to be performed in order to determine the encoding depth in the encoding depth determination unit 120 of the image encoding apparatus 100 of FIG.

도 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 ) Can 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 can process 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 can be taken into consideration.

도 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 is deeper along the vertical axis of the hierarchical structure 600 of the encoding unit according to the embodiment, the height and width of each depth-dependent encoding unit are divided. 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. A depth-1 encoding unit 620 having a size of 32x32, a depth-2 encoding unit 620 having a size 16x16, a depth-3 encoding unit 640 having a size 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 the minimum coding unit and the coding unit of the lowest 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 the coding unit 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, depths are deepened along the vertical axis of the hierarchical structure 600 of encoding units, and the minimum encoding errors can be retrieved by comparing the representative encoding errors per depth by performing encoding for each 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 partition 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 embodiment of the present invention includes information on the encoding mode, information 800 about the partition type, 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 partition type information 800 indicates a prediction unit for predictive encoding of the current encoding unit and information on the type in which the current encoding unit is divided. 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 partition 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 information 810 on the prediction mode indicates the prediction mode of each prediction unit. The prediction unit indicated by the information 800 relating to the partition 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, for example. 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 video decoding apparatus 200 according to an embodiment of the present invention extracts the information 800 about the partition type, the information 810 about the prediction mode, 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.

심도의 변화를 나타내기 위해 분할 정보가 이용될 수 있다. 분할 정보는 현재 심도의 부호화 단위가 하위 심도의 부호화 단위로 분할될지 여부를 나타낸다. Partition information may be used to indicate changes in depth. The division information indicates whether the current-depth encoding unit is divided into lower-depth encoding units.

심도 0 및 2N_0x2N_0 크기의 부호화 단위의 예측 부호화를 위한 예측 단위(910)는 2N_0x2N_0 크기의 파티션 타입(912), 2N_0xN_0 크기의 파티션 타입(914), N_0x2N_0 크기의 파티션 타입(916), N_0xN_0 크기의 파티션 타입(918)을 포함할 수 있다. The prediction unit 910 for the prediction encoding of the coding units of depth 0 and 2N_0x2N_0 has a partition type 912 of 2N_0x2N_0 size, a partition type 914 of 2N_0xN_0 size, a partition type 916 of N_0x2N_0 size, a partition of size N_0xN_0 Type < / RTI >

파티션 타입마다, 한 개의 2N_0x2N_0 크기의 예측 단위, 두 개의 2N_0xN_0 크기의 예측 단위, 두 개의 N_0x2N_0 크기의 예측 단위, 네 개의 N_0xN_0 크기의 예측 단위마다 반복적으로 예측 부호화가 수행되어야 한다. 크기 2N_0x2N_0, 크기 N_0x2N_0, 크기 2N_0xN_0 및 크기 N_0xN_0의 예측 단위에 대해서는, 인트라 모드 및 인터 모드로 움직임 예측이 수행될 수 있다. 스킵 모드는 크기 2N_0x2N_0의 예측 단위에 대해서만 수행될 수 있다.For each partition type, predictive encoding should be repeatedly performed for each prediction unit of 2N_0x2N_0 size, two 2N_0xN_0 size prediction units, two N_0x2N_0 size prediction units, and four N_0xN_0 size prediction units. For a prediction unit of size 2N_0x2N_0, size N_0x2N_0, size 2N_0xN_0, and size N_0xN_0, motion prediction can be performed in intra mode and inter mode. The skip mode can be performed only for the prediction unit of size 2N_0x2N_0.

크기 N_0xN_0의 파티션 타입(918)에 의한 부호화 오차가 가장 작다면, 심도 0를 1로 변경하고(920), 심도 2 및 크기 N_0xN_0의 파티션 타입의 부호화 단위들(922, 924, 926, 928)에 대해 반복적으로 최소 부호화 오차를 검색해 나갈 수 있다. If the coding error by the partition type 918 of the size N_0xN_0 is the smallest, the depth 0 is changed to 1 (920), and the coding units 922, 924, 926 and 928 of the partition type of the depth 2 and the size N_0xN_0 are changed 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. The prediction unit 930 for predicting the coding unit of the depth 1 and the size 2N_1x2N_1 (= N_0xN_0) includes a partition type 932 of size 2N_1x2N_1, a partition type 934 of size 2N_1xN_1, a partition type 936 of size N_1x2N_1, , And a partition type 938 of size N_1xN_1. For each partition type, predictive coding should be repeatedly performed for each 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 partition 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 changed while changing the depth 1 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-based segmentation information can be set until the depth d-1. That is, the prediction unit 950 for predictive coding of the coding unit of the depth d-1 and the size 2N_ (d-1) x2N_ (d-1) A partition type 954 of size 2N_ (d-1) xN_ (d-1), a partition type 956 of size N_ (d-1) x2N_ 1) xN_ (d-1) < / RTI >

파티션 타입마다, 한 개의 크기 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), two predicted units of two sizes 2N_ (d-1) ) prediction unit of x2N_ (d-1), x2N_ (d-1), and four sizes N_ (d-1) xN_ (d-1). Since the maximum depth is d, the coding unit 952 of depth d-1 no longer undergoes the division 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 predicted for each partition type 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 predictive coding 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 divided from the depth 0 to the coding depth, only the division information of the coding depth is set to '0', and the division 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 image decoding apparatus 200 according to an exemplary embodiment of the present invention uses the division information according to the depth to determine the depth with the division information of '0' as a coding depth and can use it for decoding using the information about the coding mode for the corresponding depth have.

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

부호화 단위(1010)는, 최대 부호화 단위에 대해 일 실시예에 따른 영상 부호화 장치(100)가 결정한 부호화 심도별 부호화 단위들이다. 예측 단위(1060)는 부호화 단위(1010) 중 각각의 부호화 심도별 부호화 단위의 예측 단위들이며, 변환 단위(1070)는 각각의 부호화 심도별 부호화 단위의 변환 단위들이다.The encoding unit 1010 is encoding units for encoding depth determined by the image encoding apparatus 100 according to the embodiment with respect to the maximum encoding unit. 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)은 최대 부호화 단위의 심도가 0이라고 하면, 부호화 단위들(1012, 1054)은 심도가 1, 부호화 단위들(1014, 1016, 1018, 1028, 1050, 1052)은 심도가 2, 부호화 단위들(1020, 1022, 1024, 1026, 1030, 1032, 1048)은 심도가 3, 부호화 단위들(1040, 1042, 1044, 1046)은 심도가 4이다. When the depth of the maximum encoding unit is 0, the depth of the encoding units 1012 and 1054 is 1 and the depth of the encoding units 1014, 1016, 1018, 1028, 1050, The coding units 1020, 1022, 1024, 1026, 1030, 1032 and 1048 have a depth of 3 and the coding units 1040, 1042, 1044 and 1046 have a depth of 4.

예측 단위들(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 partition types of 2NxN, the prediction units 1016, 1048 and 1052 are partition types of Nx2N, and the prediction units 1032 are partition types of NxN. That is, the prediction unit of the depth-dependent coding units 1010 is smaller than or equal to each coding unit.

변환 단위들(1070) 중 일부(1052)의 영상 데이터에 대해서는 부호화 단위에 비해 작은 크기의 데이터 단위로 주파수 변환 또는 주파수 역변환이 수행된다. 또한, 변환 단위(1014, 1016, 1022, 1032, 1048, 1050, 1052, 1054)는 예측 단위들(1060) 중 해당 예측 단위와 비교해보면, 서로 다른 크기 또는 형태의 데이터 단위이다. 즉, 본 발명의 일 실시예에 따른 영상 부호화 장치(100) 및 영상 복호화 장치(200)는 동일한 부호화 단위에 대한 예측 및 주파수 변환/역변환 작업이라 할지라도, 각각 별개의 데이터 단위를 기반으로 수행할 수 있다.The image data of a part 1052 of the conversion units 1070 is subjected to frequency conversion or frequency inverse conversion 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)의 출력부(130)는 부호화 단위별 부호화 정보를 출력하고, 본 발명의 일 실시예에 따른 영상 복호화 장치(200)의 부호화 정보 추출부(220)는 부호화 단위별 부호화 정보를 추출할 수 있다.The output unit 130 of the image encoding apparatus 100 according to an exemplary embodiment of the present invention outputs encoding information for each encoding unit and outputs the encoding information to the encoding information extracting unit 200 of the image decoding apparatus 200 according to an embodiment of the present invention 220) can extract the encoding information for each encoding unit.

부호화 정보는 부호화 단위에 대한 분할 정보, 파티션 타입 정보, 예측 모드 정보, 변환 단위 크기 정보를 포함할 수 있다. 도 11에 도시되어 있는 부호화 정보들은 본 발명의 일 실시예에 따른 영상 부호화 장치(100) 및 영상 복호화 장치(200)에서 설정할 수 있는 일 예에 불과하며, 도시된 것에 한정되지 않는다.The encoding information may include division information for the encoding unit, partition 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 division information may indicate the coding depth of the corresponding encoding unit. That is, since depths that are no longer divided according to the division information are coding depths, partition type information, prediction mode, and conversion unit size information can be defined with respect to the coding depth. If it is necessary to further divide by one division according to the division information, encoding should be performed independently for each of the four higher-depth-depth coding units.

파티션 타입 정보는, 부호화 심도의 부호화 단위의 변환 단위의 파티션 타입을 2Nx2N, 2NxN, Nx2N 및 NxN 중 하나로 나타낼 수 있다. 예측 모드는, 움직임 예측 모드를 인트라 모드, 인터 모드 및 스킵 모드 중 하나로 나타낼 수 있다. 인트라 모드 및 인터 모드는 파티션 타입 2Nx2N, 2NxN, Nx2N 및 NxN에서 정의될 수 있으며, 스킵 모드는 파티션 타입 2Nx2N에서만 정의될 수 있다. 변환 단위 크기는 인트라 모드에서 두 종류의 크기, 인터 모드에서 두 종류의 크기로 설정될 수 있다.As the partition type information, the partition 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 and the inter mode can be defined in the partition types 2Nx2N, 2NxN, Nx2N and NxN, and the skip mode can be defined only in the partition 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.

따라서 이 경우 현재 부호화 단위가 주변 데이터 단위를 참조하여 예측하기 경우, 현재 부호화 단위에 인접하는 심도별 부호화 단위 내의 최소 부호화 단위의 부호화 정보가 직접 이용됨으로써 최소 부호화 단위의 데이터가 참조될 수 있다.In this case, when the current encoding unit is predicted with reference to the neighboring data unit, the encoding information of the minimum encoding unit in the depth encoding unit adjacent to the current encoding unit is directly used, so that the data of the minimum encoding unit can be referred to.

또 다른 실시예로, 심도별 부호화 단위의 부호화 정보가 심도별 부호화 단위 내 중 대표되는 최소 부호화 단위에 대해서만 저장되어 있을 수 있다. 이 경우 현재 부호화 단위가 주변 부호화 단위를 참조하여 예측되는 경우, 인접하는 심도별 부호화 단위의 부호화 정보를 이용하여, 심도별 부호화 단위 내에서 현재 부호화 단위에 인접하는 데이터가 검색됨으로써 참조될 수도 있다.In yet another embodiment, the encoding information of the depth encoding unit may be stored only for the minimum encoding unit represented in the depth encoding unit. In this case, when the current encoding unit is predicted by referring to the surrounding encoding unit, the data adjacent to the current encoding unit in the depth encoding unit may be retrieved using the encoding information of the adjacent depth encoding unit.

이하, 도 4의 본 발명의 일 실시예에 따른 영상 부호화 장치(100)의 인트라 예측부(410) 및 도 5의 영상 복호화 장치(200)의 인트라 예측부(550)에서 수행되는 인트라 예측에 대하여 구체적으로 설명한다. 이하의 설명에서, 부호화 단위는 영상의 부호화 단계에서 현재 부호화되는 블록을 지칭하는 용어이며, 복호화 단위는 영상의 복호화 단계에서 현재 복호화되는 블록을 지칭하는 용어이다. 부호화 단위와 복호화 단위라는 용어는 영상의 부호화 단계 및 복호화 단계 중 어느 단계에서 지칭되느냐의 차이만 있을 뿐이며 부호화 단계에서의 부호화 단위는 복호화 단계에서의 복호화 단위로 불리울 수 있다. 용어의 통일성을 위하여 특별한 경우를 제외하고는 부호화 단계 및 복호화 단계에서 동일하게 부호화 단위로 통일하여 부르기로 한다. 또한, 본 발명의 일 실시예에 따른 인트라 예측 방법 및 장치는 일반적인 영상 코덱에서의 인트라 예측에도 적용될 수 있음을 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 명세서를 통해 이해할 수 있을 것이다.The intraprediction performed by the intraprediction unit 410 of the video encoding apparatus 100 and the intraprediction unit 550 of the video decoding apparatus 200 according to an embodiment of the present invention shown in FIG. This will be described in detail. In the following description, a coding unit is a term referring to a block currently coded in an image coding step, and a decoding unit is a term referring to a block to be currently decoded in an image decoding step. The terms encoding unit and decode unit are merely the difference between the encoding step and the decoding step of the image and the encoding unit in the encoding step may be referred to as a decode unit in the decode 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. In addition, it should be understood that the intra prediction method and apparatus according to an exemplary embodiment of the present invention can be applied to intra prediction in a general image codec, as well as those of ordinary skill in the art to which the present invention belongs .

도 12는 본 발명의 일 실시예에 따른 부호화 단위의 크기에 따른 인트라 예측 모드들의 개수를 도시한다.FIG. 12 shows the number of intra prediction modes according to the size of an encoding unit according to an embodiment of the present invention.

본 발명의 일 실시예에 따르면 부호화 단위(복호화 단계에서는 복호화 단위)의 크기에 따라서 부호화 단위에 적용할 인트라 예측 모드들의 개수를 다양하게 설정할 수 있다. 일 예로 도 12를 참조하면 인트라 예측되는 부호화 단위의 크기를 NxN이라고 할 때, 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, 128x128 크기의 부호화 단위 각각에 대하여 실제 수행되는 인트라 예측 모드의 개수는 각각 5, 9, 9, 17, 33, 5, 5개(Example 2의 경우)로 설정될 수 있다. 이와 같이 부호화 단위의 크기에 따라서 실제 수행되는 인트라 예측 모드의 개수를 차별화하는 이유는 부호화 단위의 크기에 따라서 예측 모드 정보를 부호화하기 위한 오버헤드가 다르기 때문이다. 다시 말해서, 작은 크기의 부호화 단위의 경우 전체 영상에서 차지하는 부분이 작음에도 불구하고 이러한 작은 부호화 단위의 예측 모드 등의 부가 정보를 전송하기 위한 오버헤드가 증가할 수 있다. 따라서, 작은 부호화 단위를 너무 많은 예측 모드로 부호화하는 경우 비트량이 증가하여 압축 효율이 저하될 수 있다. 또한, 큰 크기를 갖는 부호화 단위, 예를 들어 64x64 이상의 크기를 갖는 부호화 단위는 일반적으로 영상의 평탄한 영역에 대한 부호화 단위로서 선택되는 경우가 많기 때문에, 이러한 평탄한 영역을 부호화하는데 많이 선택되는 큰 크기의 부호화 단위를 너무 많은 예측 모드로 부호화하는 것 역시 압축 효율 측면에서 비효율적일 수 있다. According to an embodiment of the present invention, the number of intra prediction modes to be applied to a coding unit can be variously set according to the size of a coding unit (decoding unit in the decoding step). For example, referring to FIG. 12, the number of intraprediction modes actually performed for each of the 2x2, 4x4, 8x8, 16x16, 32x32, 64x64, and 128x128 encoding units is NxN, 5, 9, 9, 17, 33, 5, and 5 (in the case of Example 2). The reason for differentiating the number of actually performed intraprediction modes according to the size of the encoding unit is that the overhead for encoding the prediction mode information differs depending on the size of the encoding unit. In other words, in the case of a small-sized coding unit, the overhead for transmitting the additional information such as the prediction mode of the small coding unit may increase although the portion occupying the entire image is small. Therefore, when a small coding unit is coded in too many prediction modes, the bit amount increases and the compression efficiency may be lowered. In addition, since a coding unit having a large size, for example, a coding unit having a size of 64x64 or more is generally selected as a coding unit for a flat region of an image, a coding unit having a large size Encoding of an encoding unit into too many prediction modes may also be inefficient in terms of compression efficiency.

따라서, 본 발명의 일 실시예에 따르면, 부호화 단위가 크게 N1xN1(2≤N1≤8, N1은 정수), N2xN2(16≤N2≤32, N2는 정수), N3xN3(64≤N3, N3는 정수)의 적어도 3종류의 크기로 분류되며, N1xN1 크기를 갖는 부호화 단위마다 수행될 인트라 예측 모드의 개수를 A1(A1은 양의 정수), N2xN2 크기를 갖는 부호화 단위마다 수행될 인트라 예측 모드의 개수를 A2(A2는 양의 정수), N3xN3 크기를 갖는 부호화 단위마다 수행될 인트라 예측 모드의 개수를 A3(A3는 양의 정수)라고 할 때, A3≤A1≤A2 관계를 만족하도록 각 부호화 단위의 크기에 따라서 수행될 인트라 예측 모드의 개수를 설정하는 것이 바람직하다. 즉, 현재 픽처가 작은 크기의 부호화 단위, 중간 크기의 부호화 단위, 큰 크기의 부호화 단위로 크게 분류된다고 할 때, 중간 크기의 부호화 단위가 가장 많은 수의 예측 모드를 갖으며, 작은 크기의 부호화 단위 및 큰 크기의 부호화 단위는 상대적으로 보다 작은 수의 예측 모드를 갖도록 설정하는 것이 바람직하다. 다만, 이에 한정되지 않고 작은 크기 및 큰 크기의 부호화 단위에 대하여도 보다 많은 수의 예측 모드를 갖도록 설정할 수도 있을 것이다. 도 12에 도시된 각 부호화 단위의 크기에 따른 예측 모드의 개수는 일 실시예에 불과하며, 각 부호화 단위의 크기에 따른 예측 모드의 개수는 변경될 수 있다.Therefore, according to an embodiment of the present invention, the coding unit is composed of N1xN1 (2≤N1≤8, N1 is an integer), N2xN2 (16≤N2≤32, N2 is an integer), N3xN3 (A1 is a positive integer), and the number of intra prediction modes to be performed for each coding unit having a size of N2xN2 is defined as the number of intra prediction modes to be performed for each coding unit having the size N1xN1 A2 (A2 is a positive integer), and the number of intra prediction modes to be performed for each coding unit having a size of N3xN3 is A3 (A3 is a positive integer), the size of each coding unit It is desirable to set the number of intra prediction modes to be performed according to the number of intra prediction modes. That is, when the current picture is categorized into a small-sized coding unit, a medium-sized coding unit, and a large-sized coding unit, the medium-sized coding unit has the largest number of prediction modes, And a coding unit of a large size are set to have a relatively smaller number of prediction modes. However, the present invention is not limited to this, and it may be possible to set a larger number of prediction modes for small and large size coding units. The number of prediction modes according to the size of each coding unit shown in FIG. 12 is only one embodiment, and the number of prediction modes according to the size of each coding unit can be changed.

도 13a는 본 발명의 일 실시예에 따른 소정 크기의 부호화 단위에 적용되는 인트라 예측 모드의 일 예를 설명하기 위한 도면이다. 13A is a diagram for explaining an example of an intra prediction mode applied to a coding unit of a predetermined size according to an embodiment of the present invention.

도 12 및 도 13a를 참조하면, 일 예로 4×4 크기를 갖는 부호화 단위의 인트라 예측시에 수직(Vertical) 모드(모드 0), 수평(Horizontal) 모드(모드 1), DC(Direct Current) 모드(모드 2), 대각선 왼쪽(Diagonal Down-Left) 모드(모드 3), 대각선 오른쪽(Diagonal Down-Right) 모드(모드 4), 수직 오른쪽(Vertical-Right) 모드(모드 5), 수평 아래쪽(Horizontal-Down) 모드(모드 6), 수직 왼쪽( Vertical-Left) 모드(모드 7) 및 수평 위쪽(Horizontal-Up) 모드(모드 8)를 갖을 수 있다.Referring to FIGS. 12 and 13A, for example, a vertical mode (mode 0), a horizontal mode (mode 1), a DC (direct current) mode (Mode 2), Diagonal Down-Left Mode (Mode 3), Diagonal Down-Right Mode (Mode 4), Vertical-Right Mode (Mode 5) (Mode 6), Vertical-Left (Mode 7), and Horizontal-Up (Mode 8) modes.

도 13b는 도 13a의 인트라 예측 모드들의 방향을 나타내는 도면이다. 도 13b에서 화살표의 끝에 있는 숫자는 그 방향으로 예측을 수행할 경우 해당 모드값을 나타낸다. 여기서 모드 2는 방향성이 없는 DC 예측 모드로서 도시되어 있지 않다. 13B is a diagram showing the directions of the intra prediction modes of FIG. 13A. The number at the end of the arrow in FIG. 13B indicates the corresponding mode value when the prediction is performed in that direction. Mode 2 is not shown as a directional DC prediction mode.

도 13c는 도 13a에 도시된 부호화 단위에 대한 인트라 예측 방법을 도시한 도면이다. 13C is a diagram illustrating an intra prediction method for the encoding unit shown in FIG. 13A.

도 13c를 참조하면, 부호화 단위의 크기에 의하여 결정된 이용가능한 인트라 예측 모드에 따라서 현재 부호화 단위의 주변 화소인 A - M을 이용하여 예측 부호화 단위를 생성한다. 예를 들어, 도 13a의 모드 0, 즉 수직 모드에 따라, 4×4 크기의 현재 부호화 단위를 예측 부호화하는 동작을 설명한다. 먼저 4×4 크기의 현재 부호화 단위의 위쪽에 인접한 화소 A 내지 D의 화소값을 4×4 현재 부호화 단위의 화소값으로 예측한다. 즉, 화소 A의 값을 4×4 현재 부호화 단위의 첫 번째 열에 포함된 4개의 화소값으로, 화소 B의 값을 4×4 현재 부호화 단위의 두 번째 열에 포함된 4개의 화소값으로, 화소 C의 값을 4×4 현재 부호화 단위의 세 번째 열에 포함된 4개의 화소값으로, 화소 D의 값을 4×4 현재 부호화 단위의 네 번째 열에 포함된 4개의 화소값으로 예측한다. 다음, 상기 화소 A 내지 D를 이용하여 예측된 4×4 현재 부호화 단위와 원래의 4×4 현재 부호화 단위에 포함된 화소의 실제값을 감산하여 오차값을 구한 후 그 오차값을 부호화한다.Referring to FIG. 13C, a prediction encoding unit is generated using A - M, which is a peripheral pixel of the current encoding unit, according to the available intra prediction mode determined by the size of an encoding unit. For example, an operation of predicting a 4 × 4 current encoding unit according to the mode 0, ie, the vertical mode in FIG. 13A, will be described. First, the pixel values of the pixels A to D adjacent to the upper side of the current encoding unit of 4 × 4 size are predicted as pixel values of the 4 × 4 current encoding unit. That is, the value of the pixel A is divided into four pixel values included in the first column of the 4x4 current coding unit, the pixel B is divided into four pixel values included in the second column of the 4x4 current coding unit, Is predicted to the four pixel values included in the third column of the 4x4 current encoding unit and the pixel D value is predicted to the four pixel values included in the fourth column of the 4x4 current encoding unit. Next, an error value is calculated by subtracting the 4x4 current encoding unit predicted using the pixels A to D and the actual value of the pixel included in the original 4x4 current encoding unit, and the error value is encoded.

도 14는 본 발명의 일 실시예에 따른 소정 크기의 부호화 단위에 적용되는 인트라 예측 모드의 다른 예를 설명하기 위한 도면이다. 14 is a view for explaining another example of an intra prediction mode applied to a coding unit of a predetermined size according to an embodiment of the present invention.

도 12 및 도 14를 참조하면, 일 예로 2×2 크기를 갖는 부호화 단위의 인트라 예측시에 수직(Vertical) 모드, 수평(Horizontal) 모드, DC(Direct Current) 모드, 플레인(plane) 모드 및 대각선 오른쪽(Diagonal Down-Right) 모드의 총 5개의 모드가 존재할 수 있다.Referring to FIGS. 12 and 14, for example, in the intra prediction of a 2 × 2 encoding unit, a vertical mode, a horizontal mode, a DC (Direct Current) mode, a plane mode, And a right (Diagonal Down-Right) mode.

한편, 도 12에 도시된 바와 같이 32x32 크기를 갖는 부호화 단위가 33개의 인트라 예측 모드를 갖는다고 할 때, 33개의 인트라 예측 모드의 방향을 설정할 필요가 있다. 본 발명의 일 실시예에서는 도 13 및 도 14에 도시된 바와 같은 인트라 예측 모드 이외에, 다양한 방향의 인트라 예측 모드를 설정하기 위하여 부호화 단위 내의 픽셀을 중심으로 참조 픽셀로서 이용될 주변 픽셀을 선택하기 위한 예측 방향을 dx, dy 파라메터를 이용하여 설정한다. 일 예로, 33개의 예측 모드들을 각각 mode N(N은 0부터 32까지의 정수)이라고 정의할 때, mode 0은 수직 모드, mode 1은 수평 모드, mode 2는 DC 모드, mode 3는 플레인 모드로 설정하고 mode 4 ~ mode31 각각은 다음의 표 1에 표기된 바와 같은 (1,-1), (1,1), (1,2), (2,1), (1,-2), (2,1), (1,-2), (2,-1), (2,-11), (5,-7), (10,-7), (11,3), (4,3), (1,11), (1,-1), (12,-3), (1,-11), (1,-7), (3,-10), (5,-6), (7,-6), (7,-4), (11,1), (6,1), (8,3), (5,3), (5,7), (2,7), (5,-7), (4,-3) 중 하나의 값으로 표현되는 (dx, dy)를 이용하여 tan-1(dy/dx)의 방향성을 갖는 예측 모드로 정의할 수 있다. On the other hand, as shown in FIG. 12, when an encoding unit having a size of 32x32 has 33 intra-prediction modes, it is necessary to set the directions of 33 intra-prediction modes. In an embodiment of the present invention, in addition to the intraprediction modes as shown in FIGS. 13 and 14, in order to set intra prediction modes in various directions, a method for selecting a neighboring pixel to be used as a reference pixel, The prediction direction is set using the dx and dy parameters. For example, when 33 prediction modes are defined as mode N (N is an integer from 0 to 32), mode 0 is a vertical mode, mode 1 is a horizontal mode, mode 2 is a DC mode, and mode 3 is a plane mode (1, 1), (1,1), (1,2), (2,1), (1, -2), (2) (1, -2), (2, -1), (2, -11), (5, -7) , (1,11), (1,1), (12,3), (1,11), (1,7), (3,10), 7, -6), (7, -4), (11,1), (6,1), (8,3), (5,3), (5,7) 5, -7), (4, 3) by using a (dx, dy) is expressed with a value of can be defined as a prediction mode having a directionality of tan -1 (dy / dx).

mode #mode # dxdx dydy mode #mode # dxdx dydy mode 4mode 4 1One -1-One mode 18mode 18 1One -11-11 mode 5mode 5 1One 1One mode 19mode 19 1One -7-7 mode 6mode 6 1One 22 mode 20mode 20 33 -10-10 mode 7mode 7 22 1One mode 21mode 21 55 -6-6 mode 8mode 8 1One -2-2 mode 22mode 22 77 -6-6 mode 9mode 9 22 -1-One mode 23mode 23 77 -4-4 mode 10mode 10 22 -11-11 mode 24mode 24 1111 1One mode 11mode 11 55 -7-7 mode 25mode 25 66 1One mode 12mode 12 1010 -7-7 mode 26mode 26 88 33 mode 13mode 13 1111 33 mode 27mode 27 55 33 mode 14mode 14 44 33 mode 28mode 28 55 77 mode 15mode 15 1One 1111 mode 29mode 29 22 77 mode 16mode 16 1One -1-One mode 30mode 30 55 -7-7 mode 17mode 17 1212 -3-3 mode 31mode 31 44 -3-3 mode 0은 수직 모드, mode 1은 수평 모드, mode 2는 DC 모드, mode 3는 플레인 모드, mode 32는 Bi-linear 모드임.mode 0 is a vertical mode, mode 1 is a horizontal mode, mode 2 is a DC mode, mode 3 is a plane mode, and mode 32 is a bi-linear mode.

마지막 mode 32는 도 16을 이용하여 후술되는 바와 같이 쌍선형(bilinear) 보간을 이용하는 쌍선형 모드로 설정될 수 있다.The last mode 32 may be set to a bilinear mode using bilinear interpolation as described below using FIG.

도 15는 본 발명의 일 실시예에 따른 다양한 방향성을 갖는 인트라 예측 모드들을 설명하기 위한 참조도이다.15 is a reference diagram for explaining intra prediction modes having various directions according to an embodiment of the present invention.

표 1을 참조하여 전술한 바와 같이, 본 발명의 일 실시예에 따른 인트라 예측 모드들은 복수 개의 (dx, dy) 파라메터들을 이용하여 tan-1(dy/dx)의 다양한 방향성을 갖을수 있다.As described above with reference to Table 1, the intra-prediction modes according to an exemplary embodiment of the present invention may have various directions of tan -1 (dy / dx) using a plurality of (dx, dy)

도 15를 참조하면, 현재 부호화 단위 내부의 예측하고자 하는 현재 픽셀(P)을 중심으로 표 1에 표기된 모드별 (dx, dy)의 값에 따라 정해지는 tan-1(dy/dx)의 각도를 갖는 연장선(150) 상에 위치한 주변 픽셀(A, B)를 현재 픽셀(P)의 예측자로 이용할 수 있다. 이 때, 예측자로서 이용되는 주변 픽셀은 이전에 부호화되고 복원된, 현재 부호화 단위의 상측 및 좌측의 이전 부호화 단위의 픽셀인 것이 바람직하다. 또한, 연장선(150)이 정수 위치의 주변 픽셀이 아닌 정수 위치 주변 픽셀의 사이를 통과하는 경우 연장선(150)에 더 가까운 주변 픽셀을 현재 픽셀(P)의 예측자로 이용할 수 있다. 또한, 도시된 바와 같이 연장선(150)과 만나는 상측의 주변 픽셀(A) 및 좌측의 주변 픽셀(B)의 두 개의 주변 픽셀이 존재하는 경우 상측의 주변 픽셀(A) 및 좌측의 주변 픽셀(B)의 평균값을 현재 픽셀(P)의 예측자로 이용하거나, 또는 dx*dy 값이 양수인 경우에는 상측의 주변 픽셀(A)을 이용하고 dx*dy 값이 음수인 경우에는 좌측의 주변 픽셀(B)을 이용할 수 있다. Referring to FIG. 15, the angle of tan -1 (dy / dx) determined according to the value of each mode (dx, dy) shown in Table 1 around the current pixel P to be predicted in the current encoding unit The neighboring pixels A and B located on the extension line 150 having the current pixel P can be used as a predictor of the current pixel P. [ In this case, the neighboring pixels used as the predictor are preferably pixels of the previous coding unit on the upper side and the left side of the current coding unit, which have been previously encoded and restored. Further, a peripheral pixel closer to the extension line 150 can be used as a predictor of the current pixel P when the extension line 150 passes between pixels around the integer position rather than around the integer position. As shown in the figure, when there are two neighboring pixels of the upper side neighboring pixel A and the left neighboring pixel B that meet the extension line 150, the upper neighboring pixel A and the left neighboring pixel B Is used as the predictor of the current pixel P or when the dx * dy value is positive, the upper neighboring pixel A is used and when the dx * dy value is negative, the neighboring pixel B is used. Can be used.

표 1에 표기된 바와 같은 다양한 방향성을 갖는 인트라 예측 모드는 부호화단과 복호화단에서 미리 설정되어서, 각 부호화 단위마다 설정된 인트라 예측 모드의 해당 인덱스만이 전송되도록 하는 것이 바람직하다.It is preferable that the intraprediction modes having various directions as shown in Table 1 are set in the encoding and decoding stages in advance so that only the corresponding indexes of the intra prediction modes set for each encoding unit are transmitted.

도 16은 본 발명의 일 실시예에 따른 쌍선형 모드를 설명하기 위한 참조도이다.16 is a reference diagram for explaining a bilinear mode according to an embodiment of the present invention.

도 16을 참조하면, 쌍선형(Bi-linear) 모드는 현재 부호화 단위 내부의 예측하고자 하는 현재 픽셀(P)를 중심으로 현재 픽셀(P)와 그 상하좌우 경계의 픽셀값, 현재 픽셀(P)의 상하좌우 경계까지의 거리를 고려한 기하 평균값을 계산하여 그 결과값을 현재 픽셀(P)의 예측자로 이용하는 것이다. 즉, 쌍선형 모드에서는 현재 픽셀(P)의 예측자로서 현재 픽셀(P)의 상하좌우 경계에 위치한 픽셀 A(161), 픽셀 B(162), 픽셀 D(166) 및 픽셀 E(167)과 현재 픽셀(P)의 상하좌우 경계까지의 거리의 기하 평균값을 이용한다. 이 때, 쌍선형 모드 역시 인트라 예측 모드 중의 하나이므로 예측시의 참조 픽셀로서 이전에 부호화된 후 복원된 상측과 좌측의 주변 픽셀을 이용하여야 한다. 따라서, 픽셀 A(161) 및 픽셀 (B)로서 현재 부호화 단위 내부의 해당 픽셀값을 그대로 이용하는 것이 아니라 상측 및 좌측의 주변 픽셀을 이용하여 생성된 가상의 픽셀값을 이용한다.Referring to FIG. 16, a bi-linear mode is a mode in which a current pixel P and its neighboring pixel values around the current pixel P to be predicted in the current encoding unit, And the resultant value is used as a predictor of the current pixel P, as shown in FIG. That is, in the bilinear mode, the pixel A 161, the pixel B 162, the pixel D 166, and the pixel E 167 located at the upper, lower, left and right boundaries of the current pixel P as a predictor of the current pixel P A geometric average value of the distances to the upper, lower, left, and right boundaries of the current pixel P is used. In this case, since the bilinear mode is also one of the intra prediction modes, it is necessary to use the reconstructed upper and left surrounding pixels as reference pixels at the time of prediction. Therefore, instead of using the corresponding pixel value in the current encoding unit as the pixel A 161 and the pixel B, the virtual pixel value generated using the upper and left peripheral pixels is used.

구체적으로, 먼저 다음의 수학식 1과 같이 현재 부호화 단위에 인접한 상측 최좌측의 주변 픽셀(RightUpPixel, 164) 및 좌측 최하측의 주변 픽셀(LeftDownPixel,165)의 평균값을 계산함으로써 현재 부호화 단위의 우측 최하단 위치의 가상의 픽셀 C(163)을 계산한다.Specifically, by calculating the average value of the upper leftmost neighboring pixel (RightUpPixel) 164 and the lower leftmost neighboring pixel (LeftDown Pixel) 165 adjacent to the current encoding unit as shown in the following Equation 1, Lt; RTI ID = 0.0 > C (163) < / RTI >

Figure pat00001
Figure pat00001

다음 현재 픽셀(P)의 좌측 경계까지의 거리(W1) 및 우측 경계까지의 거리(W2)를 고려하여 현재 픽셀(P)를 하단으로 연장하였을 때 최하측 경계선에 위치하는 가상의 픽셀 A(161)의 값을 다음의 수학식 2와 같이 계산한다.The virtual pixel A 161 located at the lowermost boundary when the current pixel P is extended to the lower end in consideration of the distance W 1 to the left border of the current pixel P and the distance W 2 to the right border ) Is calculated as shown in the following equation (2).

Figure pat00002
Figure pat00002

유사하게 현재 픽셀(P)의 상측 경계까지의 거리(h1) 및 하측 경계까지의 거리(h2)를 고려하여 현재 픽셀(P)를 우측으로 연장하였을 때 최우측 경계선에 위치하는 가상의 픽셀 B(162)의 값을 다음의 수학식 3과 같이 계산한다.Similarly, when the current pixel P is extended to the right in consideration of the distance h1 to the upper boundary of the current pixel P and the distance h2 to the lower boundary, the imaginary pixel B ( 162) is calculated according to the following equation (3).

Figure pat00003
Figure pat00003

수학식 1 내지 3을 이용하여 현재 픽셀 P(160)의 하측 경계선상의 가상의 픽셀 A(161) 및 우측 경계선상의 가상의 픽셀 B(162)의 값이 결정되면 A+B+D+E의 평균값을 현재 픽셀 P(160)의 예측자로서 이용할 수 있다. 이와 같은 쌍선형 예측 과정은 현재 부호화 단위 내부의 모든 픽셀에 대하여 적용되어, 쌍선형 예측 모드에 따른 현재 부호화 단위의 예측 부호화 단위가 생성된다.When the values of the virtual pixel A 161 on the lower boundary line of the current pixel P 160 and the imaginary pixel B 162 on the right boundary line are determined using Equations 1 to 3, the average value of A + B + D + E May be used as a predictor of the current pixel P (160). Such a bilinear prediction process is applied to all the pixels in the current encoding unit, and a predictive encoding unit of the current encoding unit according to the bilinear prediction mode is generated.

본 발명의 일 실시예에 따르면 부호화 단위의 크기에 따라서 다양하게 설정된 인트라 예측 모드들에 따라서 예측 부호화를 수행함으로써 영상의 특성에 따라서 보다 효율적인 압축을 가능하게 한다.According to an embodiment of the present invention, predictive coding is performed according to various intra prediction modes set according to the size of a coding unit, thereby enabling more efficient compression according to the characteristics of an image.

본 발명의 일 실시예에 따르면 부호화 단위의 크기에 따라서 종래 codec에서 이용되는 인트라 예측 모드의 개수에 비하여 많은 개수의 인트라 예측 모드를 이용하기 때문에 종래 codec과 호환성이 문제될 수 있다. 종래 기술에 따르면 도 13a 및 13b에 도시된 바와 같이 최대 9개의 인트라 예측 모드가 이용 가능하다. 따라서, 본 발명의 일 실시예에 따라서 선택된 다양한 방향의 인트라 예측 모드를, 더 작은 개수의 인트라 예측 모드 중 하나와 매핑시킬 필요가 있다. 즉, 현재 부호화 단위의 이용가능한 인트라 예측 모드의 개수를 N1(N1은 정수)이라고 할 때, 현재 부호화 단위의 이용가능한 인트라 예측 모드와 다른 N2(N2는 정수)개의 인트라 예측 모드를 갖는 소정 크기의 부호화 단위의 호환을 위해서 현재 부호화 단위의 인트라 예측 모드를 N2개의 인트라 예측 모드들 중 가장 유사한 방향의 인트라 예측 모드로 매핑할 수 있다. 예를 들어, 현재 부호화 단위에 대하여 전술한 표 1과 같이 총 33개의 인트라 예측 모드가 이용가능하며, 현재 부호화 단위에 최종적으로 적용된 인트라 예측 모드는 mode 14, 즉 (dx,dy)=(4,3)인 경우로서 tan-1(3/4)≒36.87(도)의 방향성을 갖는다고 가정한다. 이 경우 현재 블록에 적용된 인트라 예측 모드를, 도 13a 및 13b에 도시된 바와 같은 9개의 인트라 예측 모드 중 하나로 매칭시키기 위하여 36.87(도)의 방향성과 가장 유사한 방향을 갖는 mode 4(down_right) 모드가 선택될 수 있다. 즉, 표 1의 mode 14는 도 13a에 도시된 mode 4로 매핑될 수 있다. 유사하게, 현재 부호화 단위에 적용된 인트라 예측 모드가 표 1의 총 33개의 이용가능한 인트라 예측 모드 중 mode 15, 즉 (dx,dy)=(1,11)인 경우로 선택된 경우, 현재 부호화 단위에 적용된 인트라 예측 모드의 방향성은 tan-1(11) ≒84.80(도)를 갖으므로 이러한 방향성과 가장 유사한 도 13b의 mode 0(vertical)모드로 매핑될 수 있다.According to an embodiment of the present invention, since a large number of intra prediction modes are used in comparison with the number of intra prediction modes used in the conventional codec according to the size of an encoding unit, compatibility with the conventional codec may be a problem. According to the prior art, up to nine intra prediction modes are available as shown in Figures 13A and 13B. Therefore, it is necessary to map the intra-prediction modes of various directions selected according to an embodiment of the present invention to one of a smaller number of intra-prediction modes. That is, when the number of intra prediction modes available for the current coding unit is N1 (N1 is an integer), a prediction mode having a predetermined size having N2 (N2 is an integer) intraprediction modes different from the available intra prediction modes of the current coding unit The intra prediction mode of the current coding unit may be mapped to the intra prediction mode of the most similar intra prediction mode among the N2 intra prediction modes for the compatibility of the coding units. For example, a total of 33 intra prediction modes are available for the current coding unit as shown in Table 1, and the intra prediction mode finally applied to the current coding unit is mode 14, i.e. (dx, dy) = (4, 3), it is assumed that tan -1 (3/4) is approximately 36.87 (degrees). In this case, in order to match the intra prediction mode applied to the current block to one of nine intra prediction modes as shown in FIGS. 13A and 13B, a mode 4 (down_right) mode having the direction most similar to 36.87 . That is, the mode 14 in Table 1 can be mapped to the mode 4 shown in FIG. 13A. Similarly, when the intra prediction mode applied to the current encoding unit is selected as a mode 15, i.e., (dx, dy) = (1,11) among a total of 33 available intra prediction modes in Table 1, Since the directionality of the intra-prediction mode has tan -1 (11)? 84.80 (degrees), it can be mapped to the mode 0 (vertical) mode of FIG. 13B most similar to this directionality.

한편, 인트라 예측을 통해 부호화된 부호화 단위를 복호화하기 위해서는 현재 부호화 단위가 어떠한 인트라 예측 모드를 통해 부호화되었는지에 대한 예측 모드 정보가 필요하다. 따라서, 영상의 부호화시에 현재 부호화 단위의 인트라 예측 모드에 관한 정보를 비트스트림에 부가하는데, 각 부호화 단위마다 인트라 예측 모드 정보를 그대로 비트스트림에 부가하는 경우 오버헤드가 증가되어 압축 효율이 낮아질 수 있다.On the other hand, in order to decode an encoding unit encoded through intraprediction, prediction mode information on which intra-prediction mode the current encoding unit is encoded is required. Therefore, when encoding the image, information about the intra-prediction mode of the current encoding unit is added to the bitstream. When the intra-prediction mode information is directly added to the bitstream for each encoding unit, overhead is increased and the compression efficiency is lowered have.

따라서, 본 발명의 일 실시예에서는 현재 부호화 단위의 부호화 결과 결정된 현재 부호화 단위의 인트라 예측 모드에 관한 정보를 그대로 전송하는 것이 아니라, 주변 부호화 단위로부터 예측된 인트라 예측 모드의 예측값과 실제 인트라 예측 모드의 차이값만을 전송한다. Therefore, in an embodiment of the present invention, instead of directly transmitting the information on the intra prediction mode of the current coding unit determined as a result of coding of the current coding unit, the predicted value of the intra prediction mode predicted from the surrounding coding unit and the intra prediction mode Only the difference value is transmitted.

도 17은 본 발명의 일 실시예에 따라서 현재 부호화 단위의 인트라 예측 모드의 예측값을 생성하는 과정을 설명하기 위한 도면이다.17 is a diagram for explaining a process of generating a prediction value of an intra prediction mode of a current encoding unit according to an embodiment of the present invention.

도 17을 참조하면, 현재 부호화 단위를 A(170)라고 할 때, 현재 부호화 단위 A(170)의 인트라 예측 모드는 주변 부호화 단위들에서 결정된 인트라 예측 모드로부터 예측될 수 있다. 예를 들어, 현재 부호화 단위 A(170)의 좌측 부호화 단위 B(171)의 결정된 인트라 예측 모드가 mode 3이며, 상측 부호화 단위 C(172)의 인트라 예측 모드가 mode 4라고 하면, 현재 부호화 단위 A(170)의 인트라 예측 모드는 상측 부호화 단위 C(172) 및 좌측 부호화 단위 B(171)의 예측 모드 중 작은값을 갖는 mode 3으로 예측될 수 있다. 만약, 현재 부호화 단위 A(170)에 대한 실제 인트라 예측 부호화 결과 결정된 인트라 예측 모드가 mode 4라면, 인트라 예측 모드 정보로서 주변 부호화 단위들로부터 예측된 인트라 예측 모드의 값인 mode 3과의 차이인 1만을 전송하고, 복호화시 전술한 바와 동일한 방법으로 현재 복호화 단위의 인트라 예측 모드의 예측값을 생성하고 비트스트림을 통해 전송된 모드 차이값을 인트라 예측 모드의 예측값에 가산하여 현재 복호화 단위에 실제 적용된 인트라 예측 모드 정보를 획득할 수 있다. 전술한 설명에서는 현재 부호화 단위의 상측 및 좌측에 위치한 주변 부호화 단위만을 이용하는 것을 중심으로 설명하였으나, 이외에도 도 17의 E 및 D와 같은 다른 주변 부호화 단위를 이용하여 현재 부호화 단위 A(170)의 인트라 예측 모드를 예측할 수 있을 것이다.Referring to FIG. 17, when the current coding unit is A (170), the intra prediction mode of the current coding unit A 170 can be predicted from the intra prediction mode determined in the surrounding coding units. For example, if the determined intra prediction mode of the left coding unit B 171 of the current coding unit A 170 is mode 3 and the intra prediction mode of the upper coding unit C 172 is mode 4, The intra prediction mode of the coding unit 170 may be predicted as a mode 3 having a smaller one of the prediction modes of the upper coding unit C 172 and the left coding unit B 171. If the intraprediction mode determined as a result of the actual intraprediction encoding for the current encoding unit A 170 is mode 4, only intra-prediction mode information 1, which is a difference between the intra-prediction mode value predicted from the surrounding encoding units, Prediction mode of the current decoding unit in the same manner as described above and adds the mode difference value transmitted through the bitstream to the prediction value of the intra prediction mode to generate an intra prediction mode actually applied to the current decoding unit, Information can be obtained. In the above description, only the surrounding encoding units located on the upper and left sides of the current encoding unit are used. However, intra-prediction of the current encoding unit A 170 using other surrounding encoding units such as E and D in FIG. The mode can be predicted.

한편, 부호화 단위들의 크기에 따라서 실제 수행되는 인트라 예측 모드들이 다르기 때문에 주변 부호화 단위들로부터 예측된 인트라 예측 모드는 현재 부호화 단위의 인트라 예측 모드와 매칭되지 않을 수 있다. 따라서, 서로 다른 크기를 갖는 주변 부호화 단위들로부터 현재 부호화 단위의 인트라 예측 모드를 예측하기 위해서는 서로 다른 인트라 예측 모드를 갖는 부호화 단위들 사이의 인트라 예측 모드들을 통일시키는 매핑(mapping) 과정이 필요하다.Since the intraprediction modes actually performed are different according to the sizes of the coding units, the intra prediction mode predicted from the surrounding coding units may not match the intra prediction mode of the current coding unit. Therefore, in order to predict the intra prediction mode of the current encoding unit from neighboring encoding units having different sizes, a mapping process for unifying the intra prediction modes among the encoding units having different intra prediction modes is required.

도 18은 본 발명의 일 실시예에 따라서 서로 다른 크기를 갖는 부호화 단위들 사이의 인트라 예측 모드의 매핑 과정을 설명하기 위한 참조도이다.18 is a reference diagram for explaining a process of mapping an intra prediction mode between coding units having different sizes according to an embodiment of the present invention.

도 18을 참조하면, 현재 부호화 단위 A(180)는 16x16 크기, 좌측 부호화 단위 B(181)는 8x8 크기, 상측 부호화 단위 C(182)는 4x4의 크기를 갖는다고 가정한다. 또한, 전술한 도 12의 제 1 예와 같이, 4x4, 8x8, 16x16 크기의 부호화 단위들에서 이용가능한 인트라 예측 모드의 개수는 각각 9, 9, 33개로 차이가 난다고 가정한다. 이 경우, 좌측 부호화 단위 B(181) 및 상측 부호화 단위 C(182)에서 이용가능한 인트라 예측 모드와 현재 부호화 단위 A(180)에서 이용가능한 인트라 예측 모드는 다르기 때문에, 좌측 부호화 단위 B(181) 및 상측 부호화 단위 C(182)들로부터 예측된 인트라 예측 모드는 현재 부호화 단위 A(180)의 인트라 예측 모드의 예측값으로 이용하기에 적합하지 않다. 따라서, 본 발명의 일 실시예에 따르면, 주변 부호화 단위들 B 및 C(181,182)의 인트라 예측 모드를 소정 개수의 대표 인트라 예측 모드들 중 가장 유사한 방향의 제 1 및 제 2 대표 인트라 예측 모드들로 각각 변경하고 제 1 및 제 2 대표 인트라 예측 모드 중 더 작은 모드값을 갖는 최종적인 대표 인트라 예측 모드로 선택한다. 그리고, 현재 부호화 단위 A(180)의 크기에 따라 이용가능한 인트라 예측 모드들 중 선택된 대표 인트라 예측 모드와 가장 유사한 방향을 갖는 인트라 예측 모드를 현재 부호화 단위의 인트라 예측 모드로 예측한다.Referring to FIG. 18, it is assumed that the current coding unit A 180 has a size of 16 × 16, the left coding unit B 181 has an 8 × 8 size, and the upper coding unit C 182 has a size of 4 × 4. Also, as in the first example of FIG. 12, it is assumed that the number of intra prediction modes available in 4x4, 8x8, and 16x16 coding units is 9, 9, and 33, respectively. In this case, since the intra prediction modes available in the left encoding unit B 181 and the upper encoding unit C 182 are different from the intra prediction modes available in the current encoding unit A 180, the left encoding units B 181 and The intra prediction mode predicted from the upper side encoding units C 182 is not suitable for use as the predicted value of the intra prediction mode of the current encoding unit A 180. Therefore, according to an embodiment of the present invention, the intra prediction mode of the surrounding encoding units B and C (181, 182) is divided into first and second representative intra prediction modes in the most similar direction among the predetermined number of representative intra prediction modes And selects the final representative intra prediction mode having the smaller one of the first and second representative intra prediction modes. The intra prediction mode having the direction most similar to the selected representative intra prediction mode among the available intra prediction modes according to the size of the current coding unit A 180 is predicted as the intra prediction mode of the current coding unit.

도 19는 본 발명의 일 실시예에 따라서 주변 부호화 단위의 인트라 예측 모드들을 대표 인트라 예측 모드들 중 하나로 매핑하는 과정을 설명하기 위한 참조도이다. 도 19에서는 대표 인트라 예측 모드들로서 수직 모드, 수평 모드, DC(Direct Current) 모드, 대각선 왼쪽 모드, 대각선 오른쪽 모드, 수직 오른쪽 모드, 수직 왼쪽 모드, 수평 위쪽 모드 및 수평 아래쪽 모드들이 설정된 경우를 도시하고 있다. 그러나, 대표 인트라 예측 모드는 도시된 바에 한정되지 않고 다양한 개수의 방향성을 갖도록 설정될 수 있다. 19 is a reference diagram for explaining a process of mapping intra-prediction modes of a surrounding encoding unit to one of representative intra-prediction modes according to an embodiment of the present invention. FIG. 19 shows a case in which vertical, horizontal, DC, diagonal left, diagonal right, vertical right, vertical left, horizontal right, and horizontal right modes are set as representative intra prediction modes have. However, the representative intra-prediction mode is not limited to the illustrated one, and may be set to have various numbers of directions.

도 19를 참조하면, 미리 소정 개수의 대표 인트라 예측 모드들을 설정하고, 주변 부호화 단위의 인트라 예측 모드를 가장 유사한 방향의 대표 인트라 예측 모드로 매핑한다. 예를 들어, 상측 부호화 단위(A)의 결정된 인트라 예측 모드가 MODE_A(190)로 도시된 방향성을 갖으면, 상측 부호화 단위(A)의 인트라 예측 모드 MODE_A(190)는 9개의 미리 설정된 대표 인트라 예측 모드 1 내지 9 중에서 가장 유사한 방향을 갖는 MODE 1로 매핑된다. 유사하게 좌측 부호화 단위(B)의 결정된 인트라 예측 모드가 MODE_B(191)로 도시된 방향성을 갖으면, 좌측 부호화 단위(B)의 인트라 예측 모드 MODE_B(191)는 9개의 미리 설정된 대표 인트라 예측 모드 1 내지 9 중에서 가장 유사한 방향을 갖는 MODE 5로 매핑된다.Referring to FIG. 19, a predetermined number of representative intra prediction modes are set in advance, and the intra prediction mode of the surrounding encoding unit is mapped to the representative intra prediction mode of the most similar direction. For example, if the determined intra prediction mode of the upper coding unit A has a direction indicated by the MODE_A 190, the intra prediction mode MODE_A 190 of the upper coding unit A includes nine preset representative intra prediction Is mapped to MODE 1 having the most similar direction among the modes 1 to 9. Likewise, if the determined intra prediction mode of the left encoding unit B has the direction shown by MODE_B 191, then the intra prediction mode MODE_B 191 of the left encoding unit B has 9 preset representative intra prediction modes 1 To 9, which has the most similar direction among the nine directions.

다음 제 1 대표 인트라 예측 모드 및 제 2 대표 인트라 예측 모드 중에서 더 작은 모드값을 갖는 인트라 예측 모드가 최종적인 주변 부호화 단위의 대표 인트라 예측 모드로 선택된다. 이와 같이 더 작은 모드값을 갖는 대표 인트라 예측 모드를 선택하는 이유는 일반적으로 더 자주 발생하는 인트라 예측 모드들에게 더 작은 모드값이 설정되어 있기 때문이다. 즉, 주변 부호화 단위들로부터 서로 다른 인트라 예측 모드가 예측된 경우 더 작은 모드값을 갖는 인트라 예측 모드가 더 발생 확률이 큰 예측 모드이기 때문에, 서로 다른 예측 모드가 경합하는 경우 현재 부호화 단위의 예측 모드의 예측자로서 더 작은 모드값을 갖는 예측 모드를 선택하는 것이 바람직하다.An intra prediction mode having a smaller mode value from among the first representative intra prediction mode and the second representative intra prediction mode is selected as the representative intra prediction mode of the final peripheral encoding unit. The reason why the representative intra prediction mode having such a smaller mode value is selected is because a smaller mode value is set for the more frequently occurring intra prediction modes. That is, when a different intra-prediction mode is predicted from neighboring encoding units, the intra-prediction mode having a smaller mode value is a prediction mode having a higher probability of occurrence. Therefore, when different prediction modes are contended, It is preferable to select a prediction mode having a smaller mode value as a predictor of the prediction mode.

주변 부호화 단위로부터 대표 인트라 예측 모드가 선택되더라도 대표 인트라 예측 모드를 현재 부호화 단위의 인트라 예측 모드의 예측자로서 그대로 이용할 수 없는 경우가 있다. 전술한 도 18과 같이 현재 부호화 단위 A(180)가 33개의 인트라 예측 모드를 갖으며 대표 인트라 예측 모드는 오직 9개의 인트라 예측 모드를 갖는다면, 대표 인트라 예측 모드에 대응되는 현재 부호화 단위 A(180)의 인트라 예측 모드는 존재하지 않는다. 이와 같은 경우, 전술한 주변 부호화 단위의 인트라 예측 모드를 대표 인트라 예측 모드로 매핑하는 것과 유사하게, 현재 부호화 단위의 크기에 따른 인트라 예측 모드들 중 선택된 대표 인트라 예측 모드와 가장 유사한 방향을 갖는 인트라 예측 모드를 현재 부호화 단위의 인트라 예측 모드 예측자로서 최종적으로 선택할 수 있다. 예를 들어, 도 19에서 주변 부호화 단위로부터 최종적으로 선택된 대표 인트라 예측 모드가 mode 1이라고 한다면, 현재 부호화 단위의 크기에 따라 이용가능한 인트라 예측 모드들 중 mode 1과 가장 유사한 방향성을 갖는 인트라 예측 모드가 현재 부호화 단위의 인트라 예측 모드의 예측자로 최종 선택된다.Even when the representative intra prediction mode is selected from the surrounding encoding unit, the representative intra prediction mode may not be used as the predictor of the intra prediction mode of the current encoding unit. If the current coding unit A 180 has 33 intra prediction modes and the representative intra prediction mode has only 9 intra prediction modes as shown in FIG. 18, the current coding unit A 180 corresponding to the representative intra prediction mode ) Does not exist in the intra prediction mode. In such a case, similar to mapping the intra-prediction mode of the above-described surrounding encoding unit to the representative intra-prediction mode, intra-prediction having a direction most similar to the selected representative intra-prediction mode among the intra- Mode can be finally selected as the intra prediction mode predictor of the current encoding unit. For example, if the representative intra prediction mode finally selected from the surrounding coding unit is mode 1 in FIG. 19, an intra prediction mode having the direction most similar to the mode 1 among the available intra prediction modes according to the size of the current coding unit is And is finally selected as a predictor of the intra prediction mode of the current encoding unit.

도 20은 본 발명의 일 실시예에 따른 영상의 인트라 예측 장치를 나타낸 블록도이다. 본 발명의 일 실시예에 따른 영상의 인트라 예측 장치(2000)는 도 4의 영상 부호화 장치(400)의 인트라 예측부(410) 및 도 5의 영상 복호화 장치(500)의 인트라 예측부(550)로서 동작할 수 있다.20 is a block diagram illustrating an apparatus for intra prediction of an image according to an embodiment of the present invention. The intra prediction apparatus 2000 according to an embodiment of the present invention includes an intra prediction unit 410 of the image coding apparatus 400 and an intra prediction unit 550 of the image decoding apparatus 500 of FIG. As shown in FIG.

도 20을 참조하면, 인트라 예측 모드 결정부(2010)는 전술한 바와 같이 최대 부호화 단위 및 심도에 기초하여 분할된 각 부호화 단위의 크기에 따라서 현재 부호화 단위에 적용할 인트라 예측 모드를 결정한다. 즉, 인트라 예측 모드 결정부(2010)는 다양한 방향의 인트라 예측 모드들 중에서 현재 부호화 단위의 크기에 따라서 적용될 인트라 예측 모드 후보들을 선택한다.Referring to FIG. 20, the intra-prediction mode determining unit 2010 determines an intra-prediction mode to be applied to the current encoding unit according to the sizes of the respective encoding units based on the maximum encoding unit and the depth, as described above. That is, the intra-prediction mode determining unit 2010 selects intra-prediction mode candidates to be applied according to the size of the current encoding unit among intra-prediction modes in various directions.

인트라 예측 모드 수행부(2020)는 결정된 인트라 예측 모드들을 적용하여 각 부호화 단위에 대한 인트라 예측을 수행한다. 인트라 예측 모드 수행부(2020)에서 인트라 예측 결과 생성된 예측 부호화 단위와 원래 부호화 단위 사이의 오차값에 기초하여 최소 오차값을 갖는 최적의 인트라 예측 모드가 부호화 단위의 최종 인트라 예측 모드로 결정된다.The intra-prediction mode execution unit 2020 performs intra-prediction on each coding unit by applying the determined intra-prediction modes. The optimal intra prediction mode having the minimum error value is determined as the final intra prediction mode of the coding unit based on the error value between the predicted coding unit generated by the intra prediction mode performing unit 2020 and the original coding unit.

한편, 도 20에 도시된 인트라 예측 장치(2000)가 복호화 장치에 이용되는 경우, 인트라 예측 모드 결정부(2010)는 도 5의 엔트로피 복호화부(520)에 의하여 부호화된 비트스트림으로부터 추출된 최대 부호화 단위, 최대 부호화 단위의 계층적 분할 정보인 심도 정보를 이용하여 현재 복호화 단위의 크기를 결정하고, 현재 복호화 단위에 적용된 인트라 예측 모드 정보를 이용하여 수행될 인트라 예측 모드를 결정한다. 또한, 인트라 예측 모드 수행부(2020)은 추출된 인트라 예측 모드에 따라서 복호화 단위에 대한 인트라 예측를 수행하여 예측 복호화 단위를 생성한다. 예측 복호화 단위는 비트스트림으로부터 복원된 레지듀얼 데이터와 더하여져서 복호화 단위에 대한 복호화가 수행된다.When the intraprediction apparatus 2000 shown in FIG. 20 is used in a decoding apparatus, the intra prediction mode determination unit 2010 determines the maximum encoding Unit, the depth information which is the hierarchical division information of the maximum encoding unit, determines the size of the current decoding unit, and determines the intra prediction mode to be performed using the intra prediction mode information applied to the current decoding unit. In addition, the intra-prediction mode performing unit 2020 performs intra-prediction on the decoding unit according to the extracted intra-prediction mode to generate a predictive decoding unit. The predictive decoding unit is added to the residual data reconstructed from the bitstream to decode the decoding unit.

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

도 21을 참조하면, 단계 2110에서 현재 픽처를 적어도 하나의 블록으로 분할한다. 전술한 바와 같이, 현재 픽처는 최대 크기를 갖는 부호화 단위인 최대 부호화 단위 및 최대 부호화 단위의 계층적 분할 정보인 심도에 기초하여 분할될 수 있다.Referring to FIG. 21, in step 2110, the current picture is divided into at least one block. As described above, the current picture can be divided based on the maximum encoding unit, which is the encoding unit having the maximum size, and the depth, which is the hierarchical division information of the maximum encoding unit.

단계 2120에서, 분할된 현재 블록의 크기에 따라서 현재 블록에 대하여 수행될 인트라 예측 모드를 결정한다. 전술한 바와 같이, 본 발명의 일 실시예에 따르면 인트라 예측 모드는 현재 블록 내부의 각 픽셀을 중심으로 tan-1(dy/dx) 의 각도를 갖는 연장선 상에 위치하거나 연장선에 가장 가까운 주변 블록의 픽셀을 이용하여 예측을 수행하는 예측 모드를 포함한다. In step 2120, an intra prediction mode to be performed for the current block is determined according to the size of the divided current block. As described above, according to one embodiment of the present invention, the intra-prediction mode is a mode in which a block located on an extension line having an angle of tan -1 (dy / dx) around each pixel in the current block, And a prediction mode for performing prediction using a pixel.

단계 2130에서, 결정된 인트라 예측 모드에 따라서 현재 블록에 대한 인트라 예측을 수행한다. 인트라 예측 모드들 중에서 가장 작은 예측 오차값을 갖는 인트라 예측 모드는 현재 블록의 최종적인 인트라 예측 모드로 선택된다.In step 2130, intra prediction for the current block is performed according to the determined intra prediction mode. The intra prediction mode having the smallest prediction error value among the intra prediction modes is selected as the final intra prediction mode of the current block.

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

도 22를 참조하면, 단계 2210에서 현재 픽처를 소정 크기의 적어도 하나의 블록으로 분할한다. 여기서, 현재 픽처는 비트스트림으로부터 추출된 최대 크기를 갖는 복호화 단위인 최대 복호화 단위 및 최대 복호화 단위의 계층적 분할 정보인 심도 정보에 기초하여 분할될 수 있다. Referring to FIG. 22, in step 2210, the current picture is divided into at least one block of a predetermined size. Here, the current picture may be divided based on the maximum decoding unit which is the decoding unit having the maximum size extracted from the bit stream and the depth information which is the hierarchical division information of the maximum decoding unit.

단계 2220에서, 비트스트림으로부터 현재 블록에 적용된 인트라 예측 모드 정보를 추출한다. 인트라 예측 모드는, 현재 블록의 각 픽셀을 중심으로 tan-1(dy/dx) (dx, dy는 정수)의 각도를 갖는 연장선 상에 위치하거나 상기 연장선에 가장 가까운 주변 블록의 화소를 이용하여 예측을 수행하는 예측 모드를 포함한다. 도 17 내지 19를 참조하여 전술한 바와 같이, 주변 복호화 단위의 인트라 예측 모드들로부터 예측된 인트라 예측 모드 예측자를 이용하는 경우, 현재 복호화 단위의 주변 복호화 단위들이 갖는 인트라 예측 모드들을 대표 인트라 예측 모드들로 매핑한 다음, 대표 인트라 예측 모드들 중에서 더 작은 모드값을 갖는 대표 인트라 예측 모드를 최종 대표 인트라 예측 모드로 선택한다. 그리고, 현재 복호화 단위의 크기에 따라서 결정되는 이용가능한 인트라 예측 모드들 중에서 최종 대표 인트라 예측 모드와 가장 유사한 방향을 갖는 인트라 예측 모드를 현재 복호화 단위의 인트라 예측 모드의 예측자로 선택하고, 비트스트림에 구비된 실제 인트라 예측 모드와 인트라 예측 모드의 예측자 사이의 차이값을 추출하여 이를 인트라 예측 모드의 예측자에 가산함으로써 현재 복호화 단위의 인트라 예측 모드를 결정할 수 있다.In step 2220, the intra prediction mode information applied to the current block is extracted from the bitstream. The intraprediction mode is a mode in which prediction is performed using pixels of a neighboring block located on an extension line having an angle of tan -1 (dy / dx) (dx, dy is an integer) centered on each pixel of the current block, And a prediction mode for performing a prediction mode. As described above with reference to Figs. 17 to 19, when the intra prediction mode predictor predicted from the intra prediction modes of the peripheral decoding unit is used, the intra prediction modes of the neighbor decoding units of the current decoding unit are referred to as representative intra prediction modes And then selects a representative intra-prediction mode having a smaller mode value among the representative intra-prediction modes as a final representative intra-prediction mode. The intra prediction mode having the direction most similar to the last representative intra prediction mode among the available intra prediction modes determined according to the size of the current decoding unit is selected as the predictor of the intra prediction mode of the current decoding unit, The intraprediction mode of the current decoding unit can be determined by extracting a difference value between predictors of the actual intra prediction mode and the intra prediction mode and adding the difference value to the predictor of the intra prediction mode.

단계 2230에서 추출된 인트라 예측 모드에 따라서 복호화 단위에 대한 인트라 예측를 수행하여 복호화 단위를 복호화한다. The intra prediction for the decoding unit is performed according to the intra prediction mode extracted in step 2230 to decode the decoding unit.

한편, 상술한 본 발명의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다. 상기 컴퓨터로 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드디스크 등), 광학The above-described embodiments of the present invention can be embodied in a general-purpose digital computer that can be embodied as a program that can be executed by a computer and operates the program using a computer-readable recording medium. The computer readable recording medium may be a magnetic storage medium (e.g., ROM, floppy disk, hard disk, etc.), optical

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.
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 (2)

비트스트림으로부터 복호화되는 현재 블록에 적용된 인트라 예측 모드 정보를 추출하는 단계; 및
상기 추출된 인트라 예측 모드 정보에 따라서 상기 현재 블록에 대한 인트라 예측을 수행하는 단계를 포함하며,
상기 인트라 예측 모드는
복수 개의 방향들 중 특정 방향을 가리키며, 상기 특정 방향은 수평 방향의 dx(dx는 정수) 및 수직 방향의 dy(dy는 정수) 중 하나에 의하여 지시되며,
상기 인트라 예측을 수행하는 단계는
상기 현재 블록의 현재 픽셀의 위치 및 상기 인트라 예측 모드에 의하여 가리켜지는 상기 특정 방향에 따라서, 상기 현재 블록의 좌측 및 상측 중 하나에 위치한 적어도 하나의 주변 픽셀을 획득하는 단계;
상기 적어도 하나의 주변 픽셀의 개수가 1개인 경우, 1개의 주변 픽셀에 기초하여 현재 픽셀의 예측값을 획득하는 단계; 및
상기 적어도 하나의 주변 픽셀의 개수가 2개인 경우, 2개의 주변 픽셀의 가중 평균값에 기초하여 상기 현재 픽셀의 예측값을 획득하는 단계를 포함하며,
상기 영상은 최대 부호화 단위의 크기에 관한 정보에 따라 복수의 최대 부호화 단위로 분할되고,
상기 최대 부호화 단위는 분할 정보에 따라 심도를 가지는 다수의 부호화 단위들로 계층적으로 분할되고,
현재 심도의 부호화 단위는 상위 심도의 부호화 단위로부터 분할된 정사각 데이터 단위들 중 하나이고,
상기 분할 정보가 상기 현재 심도에서 분할됨을 나타내는 경우에, 상기 현재 심도의 부호화 단위는 주변 부호화 단위들과 독립적으로, 하위 심도의 부호화 단위들로 분할되고,
상기 분할 정보가 상기 하위 심도에서 분할되지 않음을 나타내는 경우에, 적어도 하나의 예측 단위는 상기 하위 심도의 부호화 단위로부터 획득되는 것을 특징으로 하는 영상 복호화 방법.
Extracting intra prediction mode information applied to a current block to be decoded from the bitstream; And
And performing intra prediction on the current block according to the extracted intra prediction mode information,
The intra-prediction mode
Wherein the specific direction is indicated by one of horizontal direction dx (dx is an integer) and vertical direction dy (dy is an integer)
The step of performing the intra prediction
Obtaining at least one neighboring pixel located at one of left and upper sides of the current block in accordance with the position of the current pixel of the current block and the specific direction indicated by the intra prediction mode;
Obtaining a predicted value of a current pixel based on one surrounding pixel when the number of the at least one neighboring pixel is one; And
Obtaining a predicted value of the current pixel based on a weighted average value of two neighboring pixels when the number of the at least one neighboring pixels is two,
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 coding unit is hierarchically divided into a plurality of coding units having depths according to the division 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 if the division information indicates division at the current depth, the current-depth encoding unit is divided into sub-depth encoding units independently of the surrounding encoding units,
Wherein at least one prediction unit is obtained from the coding unit of the lower depth when the division information indicates that the division information is not divided at the lower depth.
비트스트림으로부터 복호화되는 현재 블록에 적용된 인트라 예측 모드 정보를 추출하는 엔트로피 복호화부; 및
상기 추출된 인트라 예측 모드 정보에 따라서 상기 현재 블록에 대한 인트라 예측을 수행하는 인트라 에측부를 포함하며,
상기 인트라 예측 모드는
복수 개의 방향들 중 특정 방향을 가리키며, 상기 특정 방향은 수평 방향의 dx(dx는 정수) 및 수직 방향의 dy(dy는 정수) 중 하나에 의하여 지시되며,
상기 인트라 예측부는
상기 현재 블록의 현재 픽셀의 위치 및 상기 인트라 예측 모드에 의하여 가리켜지는 상기 특정 방향에 따라서, 상기 현재 블록의 좌측 및 상측 중 하나에 위치한 적어도 하나의 주변 픽셀을 획득하고,
상기 적어도 하나의 주변 픽셀의 개수가 1개인 경우, 1개의 주변 픽셀에 기초하여 현재 픽셀의 예측값을 획득하고,
상기 적어도 하나의 주변 픽셀의 개수가 2개인 경우, 2개의 주변 픽셀의 가중 평균값에 기초하여 상기 현재 픽셀의 예측값을 획득하며,
상기 영상은 최대 부호화 단위의 크기에 관한 정보에 따라 복수의 최대 부호화 단위로 분할되고,
상기 최대 부호화 단위는 분할 정보에 따라 심도를 가지는 다수의 부호화 단위들로 계층적으로 분할되고,
현재 심도의 부호화 단위는 상위 심도의 부호화 단위로부터 분할된 정사각 데이터 단위들 중 하나이고,
상기 분할 정보가 상기 현재 심도에서 분할됨을 나타내는 경우에, 상기 현재 심도의 부호화 단위는 주변 부호화 단위들과 독립적으로, 하위 심도의 부호화 단위들로 분할되고,
상기 분할 정보가 상기 하위 심도에서 분할되지 않음을 나타내는 경우에, 적어도 하나의 예측 단위는 상기 하위 심도의 부호화 단위로부터 획득되는 것을 특징으로 하는 영상 복호화 장치.
An entropy decoding unit for extracting intra prediction mode information applied to a current block decoded from a bitstream; And
And an intra prediction unit for performing intra prediction on the current block according to the extracted intra prediction mode information,
The intra-prediction mode
Wherein the specific direction is indicated by one of horizontal direction dx (dx is an integer) and vertical direction dy (dy is an integer)
The intra-
Obtaining at least one neighboring pixel located at one of left and upper sides of the current block according to the position of the current pixel of the current block and the specific direction indicated by the intra prediction mode,
Acquiring a predicted value of a current pixel based on one surrounding pixel when the number of the at least one neighboring pixels is one,
Obtaining a predicted value of the current pixel based on a weighted average value of two neighboring pixels when the number of the at least one neighboring pixels is two,
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 coding unit is hierarchically divided into a plurality of coding units having depths according to the division 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 if the division information indicates division at the current depth, the current-depth encoding unit is divided into sub-depth encoding units independently of the surrounding encoding units,
Wherein at least one prediction unit is obtained from the lower-depth coding unit when the division information indicates that the lower-depth information is not divided.
KR1020150104336A 2015-07-23 2015-07-23 Method and apparatus for image encoding, and method and apparatus for image decoding KR101607613B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020150104336A KR101607613B1 (en) 2015-07-23 2015-07-23 Method and apparatus for image encoding, and method and apparatus for image decoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150104336A KR101607613B1 (en) 2015-07-23 2015-07-23 Method and apparatus for image encoding, and method and apparatus for image decoding

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020140148715A Division KR101607611B1 (en) 2014-10-29 2014-10-29 Method and apparatus for image encoding, and method and apparatus for image decoding

Publications (2)

Publication Number Publication Date
KR20150090010A true KR20150090010A (en) 2015-08-05
KR101607613B1 KR101607613B1 (en) 2016-03-30

Family

ID=53886287

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150104336A KR101607613B1 (en) 2015-07-23 2015-07-23 Method and apparatus for image encoding, and method and apparatus for image decoding

Country Status (1)

Country Link
KR (1) KR101607613B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018124333A1 (en) * 2016-12-28 2018-07-05 엘지전자(주) Intra prediction mode-based image processing method, and apparatus therefor
KR20190041005A (en) * 2016-08-30 2019-04-19 후아웨이 테크놀러지 컴퍼니 리미티드 Motion Compensation Prediction Method and Device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5111127B2 (en) 2008-01-22 2012-12-26 キヤノン株式会社 Moving picture coding apparatus, control method therefor, and computer program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190041005A (en) * 2016-08-30 2019-04-19 후아웨이 테크놀러지 컴퍼니 리미티드 Motion Compensation Prediction Method and Device
US11128874B2 (en) 2016-08-30 2021-09-21 Huawei Technologies Co., Ltd. Motion compensating prediction method and device
WO2018124333A1 (en) * 2016-12-28 2018-07-05 엘지전자(주) Intra prediction mode-based image processing method, and apparatus therefor
US10904567B2 (en) 2016-12-28 2021-01-26 Lg Electronics Inc. Intra prediction mode-based image processing method, and apparatus therefor

Also Published As

Publication number Publication date
KR101607613B1 (en) 2016-03-30

Similar Documents

Publication Publication Date Title
KR101452860B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101503269B1 (en) Method and apparatus for determining intra prediction mode of image coding unit, and method and apparatus for determining intra predion mode of image decoding unit
KR101510108B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR20150059144A (en) Method and apparatus for video intra prediction encoding, and method and apparatus for video intra prediction decoding
KR20150060616A (en) Method and apparatus for decoding image
KR101989160B1 (en) Method and apparatus for image encoding
KR101624659B1 (en) Method and apparatus for decoding video
KR101607613B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101671935B1 (en) Method and apparatus for decoding an image
KR101761278B1 (en) Method and apparatus for image decoding
KR20150045980A (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101883430B1 (en) Method and apparatus for encoding an image, and a computer readable medium
KR101607614B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101725287B1 (en) Method and apparatus for decoding an image
KR101606683B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101886259B1 (en) Method and apparatus for image encoding, and computer-readable medium including encoded bitstream
KR101607611B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101606853B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101775030B1 (en) Method and apparatus for decoding an image
KR20150035932A (en) Method and apparatus for determining intra prediction mode of image coding unit, and method and apparatus for determining intra predion mode of image decoding unit
KR101671934B1 (en) Method and apparatus for decoding an image
KR101671933B1 (en) Method and apparatus for decoding an image
KR101618764B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR101624660B1 (en) Method and apparatus for decoding video
KR101604460B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video

Legal Events

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

Payment date: 20190227

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20200227

Year of fee payment: 5