KR20150092063A - Method and apparatus for decoding video - Google Patents

Method and apparatus for decoding video Download PDF

Info

Publication number
KR20150092063A
KR20150092063A KR1020150105298A KR20150105298A KR20150092063A KR 20150092063 A KR20150092063 A KR 20150092063A KR 1020150105298 A KR1020150105298 A KR 1020150105298A KR 20150105298 A KR20150105298 A KR 20150105298A KR 20150092063 A KR20150092063 A KR 20150092063A
Authority
KR
South Korea
Prior art keywords
unit
encoding
depth
coding
encoding unit
Prior art date
Application number
KR1020150105298A
Other languages
Korean (ko)
Inventor
엘레나 알쉬나
바딤 세레긴
알렉산더 알쉰
니콜라이 쉬라코프
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020150105298A priority Critical patent/KR20150092063A/en
Publication of KR20150092063A publication Critical patent/KR20150092063A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • 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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Abstract

Disclosed are a method and an apparatus for encoding a video, and decoding method and apparatus thereof. The method for encoding a video comprises the steps of: generating a first predictive encoding unit for encoded current encoding unit; generating a second predictive encoding unit by changing pixel value of each pixel of the first predictive encoding unit by selectively using each pixel forming the first predictive encoding unit and at least one surrounding pixel upon whether the current encoding unit includes an area out of a boundary of the current picture or not.

Description

영상의 복호화 방법 및 장치{Method and apparatus for decoding video}TECHNICAL FIELD The present invention relates to a method and apparatus for decoding video,

본 발명은 예측된 영상 데이터의 위치에 따른 후처리를 통해 영상의 압축 효율을 향상시키는 영상의 부호화 방법 및 장치, 그 복호화 방법 및 장치에 관한 것이다.The present invention relates to a method and an apparatus for encoding an image that improve the compression efficiency of an image through post-processing according to the position of predicted image data, and a decoding method and apparatus therefor.

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.

본 발명이 해결하고자 하는 과제는 예측 블록의 픽처 내의 위치에 따른 후처리를 통해 예측 블록 내부의 각 픽셀의 픽셀값을 변경하여 새로운 예측 블록을 생성함으로써 영상의 압축 효율을 향상시키는 영상의 부호화 방법 및 장치, 그 복호화 방법 및 장치를 제공하는 것이다.SUMMARY OF THE INVENTION The present invention is directed to a method and an apparatus for encoding an image for improving compression efficiency of an image by generating a new prediction block by modifying pixel values of pixels in a prediction block through post- An apparatus, a decoding method and an apparatus therefor.

본 발명의 일 실시예에 따른 영상 복호화 방법은 현재 블록의 주변 픽셀들을 이용하여 상기 현재 블록의 제 1 예측값을 획득하는 단계; 및 상기 현재 블록 내에 위치한 픽셀들 중 소정 경계상에 위치한 경계 픽셀에 대해서, 상기 획득된 제 1 예측값과 상기 경계 픽셀과 동일행 또는 동일열에 위치한 적어도 하나의 주변 픽셀을 이용하여 상기 경계 픽셀의 제 2 예측값을 획득하는 단계를 포함하는 것을 특징으로 한다.According to an embodiment of the present invention, there is provided an image decoding method, comprising: obtaining a first predicted value of the current block using neighboring pixels of a current block; And for a boundary pixel located on a predetermined boundary among pixels located in the current block, using the obtained first predicted value and at least one surrounding pixel located in the same row or the same column as the boundary pixel, And obtaining a predicted value.

본 발명의 일 실시예에 따른 영상 복호화 장치는 비트스트림으로부터 현재 블록의 예측 모드 정보를 획득하는 엔트로피 디코더; 및 상기 예측 모드에 따라서, 상기 현재 블록 내에 위치한 픽셀들 중 소정 경계상에 위치한 경계 픽셀에 대해서, 상기 획득된 제 1 예측값과 상기 경계 픽셀과 동일행 또는 동일열에 위치한 적어도 하나의 주변 픽셀을 이용하여 상기 경계 픽셀의 제 2 예측값을 획득하는 예측부를 포함하는 것을 특징으로 한다.An apparatus for decoding an image according to an embodiment of the present invention includes an entropy decoder for obtaining prediction mode information of a current block from a bitstream; And using the obtained first predictive value and at least one neighboring pixel located in the same row or the same column as the boundary pixel for a boundary pixel located on a predetermined boundary among the pixels positioned in the current block according to the prediction mode And a predictor for obtaining a second predicted value of the boundary pixel.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치의 블록도이다.
도 2 는 본 발명의 일 실시예에 따른 영상 복호화 장치의 블록도를 도시한다.
도 3은 본 발명의 일 실시예에 따른 계층적 부호화 단위를 도시한다.
도 4 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부의 블록도를 나타낸 것이다.
도 5 는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부의 블록도를 나타낸 것이다.
도 6은 본 발명의 일 실시예에 따른 심도별 부호화 단위 및 예측 단위를 도시한다.
도 7은 본 발명의 일 실시예에 따른, 부호화 단위 및 변환 단위의 관계를 도시한다.
도 8은 본 발명의 일 실시예에 따라, 심도별 부호화 정보들을 도시한다.
도 9 는 본 발명의 일 실시예에 따른 심도별 부호화 단위를 도시한다.
도 10a 및 10b는 본 발명의 일 실시예에 따른, 부호화 단위, 예측 단위 및 주파수 변환 단위의 관계를 도시한다.
도 11 은 본 발명의 일 실시예에 따른 부호화 단위별 부호화 정보를 도시한다.
도 12는 본 발명의 일 실시예에 따른 인트라 예측 장치(1200)의 구성을 나타낸 블록도이다.
도 13은 본 발명의 일 실시예에 따른 부호화 단위의 크기에 따른 인트라 예측 모드들의 개수를 도시한다.
도 14a 내지 도 14c는 본 발명의 일 실시예에 따른 소정 크기의 부호화 단위에 적용되는 인트라 예측 모드의 일 예를 설명하기 위한 도면이다.
도 15는 본 발명의 일 실시예에 따른 소정 크기의 부호화 단위에 적용되는 인트라 예측 모드의 다른 예를 설명하기 위한 도면이다.
도 16은 본 발명의 일 실시예에 따른 다양한 방향성을 갖는 인트라 예측 모드들을 설명하기 위한 참조도이다.
도 17은 본 발명의 일 실시예에 따른 쌍선형 모드를 설명하기 위한 참조도이다.
도 18은 본 발명의 일 실시예에 따른 제 1 예측 부호화 단위의 후처리 동작을 설명하기 위한 참조도이다.
도 19는 본 발명의 일 실시예에 따른 후처리부(1220)의 동작을 설명하기 위한 참조도이다.
도 20은 본 발명의 일 실시예에 따른 후처리부(1220)에서 이용되는 주변 픽셀들을 설명하기 위한 참조도이다.
도 21은 본 발명의 일 실시예에 따른 영상 부호화 방법을 나타낸 플로우 차트이다.
도 22는 본 발명의 일 실시예에 따라서 부호화 단위의 후처리를 위한 인덱싱(indexing) 과정을 설명하기 위한 참조도이다.
도 23은 본 발명의 다른 실시예에 따라서 부호화 단위의 후처리를 위한 인덱싱(indexing) 과정을 설명하기 위한 참조도이다.
도 24는 본 발명의 일 실시예에 따른 영상 복호화 방법을 나타낸 플로우 차트이다.
1 is a block diagram of an image encoding apparatus according to an embodiment of the present invention.
2 is a block diagram of an image decoding apparatus according to an embodiment of the present invention.
FIG. 3 illustrates a hierarchical encoding unit according to an embodiment of the present invention.
4 is a block diagram of an image encoding unit based on an encoding unit according to an embodiment of the present invention.
5 is a block diagram of an image decoding unit based on an encoding unit according to an embodiment of the present invention.
FIG. 6 illustrates a depth-based coding unit and a prediction unit according to an embodiment of the present invention.
FIG. 7 shows a relationship between an encoding unit and a conversion unit according to an embodiment of the present invention.
FIG. 8 illustrates depth-specific encoding information, in accordance with an embodiment of the present invention.
FIG. 9 shows a depth encoding unit according to an embodiment of the present invention.
FIGS. 10A and 10B show a relationship between an encoding unit, a prediction unit, and a frequency conversion unit according to an embodiment of the present invention.
FIG. 11 shows encoding information for each encoding unit according to an embodiment of the present invention.
12 is a block diagram showing a configuration of an intra prediction apparatus 1200 according to an embodiment of the present invention.
13 shows the number of intra prediction modes according to the size of an encoding unit according to an embodiment of the present invention.
14A to 14C 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.
15 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.
16 is a reference diagram for explaining intra prediction modes having various directions according to an embodiment of the present invention.
17 is a reference diagram for explaining a bilinear mode according to an embodiment of the present invention.
18 is a reference diagram for explaining a post-processing operation of a first predictive-encoding unit according to an embodiment of the present invention.
19 is a reference diagram for explaining the operation of the post-processing unit 1220 according to an embodiment of the present invention.
20 is a reference diagram for explaining peripheral pixels used in the post-processing unit 1220 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 reference diagram for explaining an indexing process for post-processing of an encoding unit according to an embodiment of the present invention.
23 is a reference diagram for explaining an indexing process for post-processing of an encoding unit according to another embodiment of the present invention.
24 is a flowchart illustrating a video decoding method according to an embodiment of the present invention.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

인트라 예측부(410), 움직임 추정부(420) 및 움직임 보상부(425)로부터 출력된 예측 단위에 기초해 레지듀얼 값들이 생성되고, 생성된 레지듀얼 값들은 주파수 변환부(430) 및 양자화부(440)를 거쳐 양자화된 변환 계수로 출력된다. 특히 도 12를 참조하여 후술되는 바와 같이 본 발명의 일 실시예에 따른 인트라 예측부(410)는 인트라 예측된 부호화 단위가 픽처 경계에 속하는 영역을 포함하고 있는지 여부에 따라서 각 픽셀을 그 주변 픽셀을 이용하여 변경하는 후처리의 수행 여부를 결정하고, 픽처 경계에 속하지 않는 부호화 단위에 대해 후처리를 수행한다. 후처리된 부호화 단위와 원 부호화 단위의 차이값인 레지듀얼 값들은 주파수 변환부(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. In particular, as described later with reference to FIG. 12, the intra-prediction unit 410 according to an exemplary embodiment of the present invention predicts each pixel as a neighboring pixel according to whether an intra- And performs post-processing on the encoding units not belonging to the picture boundary. Residual values, which are difference values between the post-processed encoding unit and the original encoding unit, may be outputted as the transform coefficients quantized through the frequency transforming unit 430 and the quantizing unit 440.

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

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

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

도 5를 참조하면, 비트스트림(505)이 파싱부(510)를 거쳐 복호화 대상인 부호화된 영상 데이터 및 복호화를 위해 필요한 부호화 정보가 파싱된다. 부호화된 영상 데이터는 엔트로피 복호화부(520) 및 역양자화부(530)를 거쳐 역양자화된 데이터로 출력되고, 주파수 역변환부(540)를 거쳐 레지듀얼 값들로 복원된다. 레지듀얼 값들은 인트라 예측부(550)의 인트라 예측의 결과 또는 움직임 보상부(560)의 움직임 보상 결과와 가산되어 부호화 단위 별로 복원된다. 특히, 본 발명에 따른 인트라 예측부(550)는 현재 복호화 단위가 픽처의 경계를 벗어나는 영역을 포함하고 있는지 여부에 따라서, 인트라 예측 결과 생성된 예측 부호화 단위의 후처리 여부를 선택적으로 수행한다. 복원된 부호화 단위는 디블로킹부(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. In particular, the intra-prediction unit 550 according to the present invention selectively performs post-processing on a predictive encoding unit generated as an intra-prediction result, depending on whether the current decoding unit includes an area out of a boundary of a picture. The reconstructed coding unit is used for predicting the next coding unit or the next picture through the deblocking unit 570 and the loop filtering unit 580.

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

도 6은 본 발명의 일 실시예에 따른 심도별 부호화 단위 및 예측 단위를 도시한다.FIG. 6 illustrates a depth-based coding unit and a prediction unit according to an embodiment of the present invention.

일 실시예에 따른 영상 부호화 장치(100) 및 일 실시예에 따른 영상 복호화 장치(200)는 영상 특성을 고려하기 위해 계층적인 부호화 단위를 사용한다. 부호화 단위의 최대 높이 및 너비, 최대 심도는 영상의 특성에 따라 적응적으로 결정될 수도 있으며, 사용자의 요구에 따라 다양하게 설정될 수도 있다. 미리 설정된 부호화 단위의 최대 크기에 따라, 심도별 부호화 단위의 크기가 결정될 수도 있다.The image encoding apparatus 100 and the image decoding apparatus 200 according to an embodiment use a hierarchical encoding unit to consider image characteristics. The maximum height, width, and maximum depth of the encoding unit may be adaptively determined according to the characteristics of the image, or may be variously set according to the demand of the user. The size of each coding unit may be determined according to a maximum size of a predetermined coding unit.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

이하, 도 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 referred to in an image coding step, and a coding unit may be defined as a decoding unit in terms of a decoding step of an image. That is, the terms coding unit and decoding unit are different only in terms of the coding and decoding stages of the image, and the coding unit in the coding step may be referred to as a decoding unit in the decoding step. For the sake of uniformity of terms, except for special cases, they shall be uniformly coded in the coding step and the decoding step in the same coding unit.

도 12는 본 발명의 일 실시예에 따른 인트라 예측 장치(1200)의 구성을 나타낸 블록도이다.12 is a block diagram showing a configuration of an intra prediction apparatus 1200 according to an embodiment of the present invention.

도 12를 참조하면, 본 발명의 일 실시예에 따른 인트라 예측 장치(1200)는 예측부(1210), 판단부(1215) 및 후처리부(1220)를 포함한다. 예측부(1210)는 현재 부호화 단위의 크기에 따라 정해지는 인트라 예측 모드들을 적용하여 현재 부호화 단위에 대한 인트라 예측을 수행하여 제 1 예측 부호화 단위를 출력한다. 판단부(1215)는 현재 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 여부를 판단하고, 판단 결과에 따른 소정의 인덱스(MPI_PredMode)를 생성한다.12, an intra prediction apparatus 1200 according to an exemplary embodiment of the present invention includes a prediction unit 1210, a determination unit 1215, and a post-processing unit 1220. The prediction unit 1210 performs intraprediction on the current encoding unit by applying intra-prediction modes determined according to the size of the current encoding unit, and outputs a first predictive encoding unit. The determination unit 1215 determines whether the current encoding unit includes an area outside the boundary of the current picture, and generates a predetermined index (MPI_PredMode) according to the determination result.

인덱스(MPI_PredMode)는 후술되는 후처리(Multi-Parameter Intra-prediction:MPI)의 수행 여부를 나타내는 것으로, 다음의 표 1과 같이 "0"의 값은 후처리를 통해 제 2 예측 부호화 단위를 생성하는 과정이 수행되지 않음을 나타내고, "1"의 값은 제 2 예측 부호화 단위를 생성하는 과정이 수행되어야 함을 나타내도록 설정된다.The index (MPI_PredMode) indicates whether to perform a multi-parameter intra-prediction (MPI) described later. The value of "0" as shown in Table 1 below is used to generate a second predictive- Is not performed, and a value of "1" is set to indicate that the process of generating the second predictive encoding unit should be performed.

MPI_PredModeMPI_PredMode MPI 모드명MPI mode name 의미meaning 00 MPI_Mode0MPI_Mode0 MPI 처리 안함Do not process MPI 1One MPI_Mode1MPI_Mode1 MPI 처리MPI processing

전술한 표 1에서는 후처리 수행 여부에 따라서 인덱스(MPI_PredMode)가 0과 1의 값을 갖는 경우를 설명하였지만, 후처리를 수행하지 않는 경우 및 후처리 모드로서 N개의 모드가 존재한다고 가정하면, 인덱스(MPI_PredMode)는 각 후처리 모드를 구별하기 위한 0~N 까지의 정수값을 갖을 수 있다.In Table 1, the case where the index (MPI_PredMode) has a value of 0 and 1 is described according to whether post-processing is performed. However, if post processing is not performed and N modes exist as a post- (MPI_PredMode) may have an integer value from 0 to N for distinguishing each post-processing mode.

후처리부(1220)는 판단부(1215)의 판단 결과에 따라서 현재 부호화 단위가 픽처의 경계를 벗어난 영역을 포함하고 있지 않은 경우, 즉 인덱스(MPI_PredMode)가 0의 값이 아닌 경우에는 제 1 예측 부호화 단위를 구성하는 각 픽셀의 주변 픽셀을 이용하여 제 1 예측 부호화 단위의 각 픽셀의 픽셀값을 변경하는 후처리를 수행함으로써 제 2 예측 부호화 단위를 출력한다.If the current encoding unit does not include an area outside the picture boundary, that is, if the index (MPI_PredMode) is not 0, the post-processor 1220 performs a first predictive encoding A second predictive encoding unit is output by performing a post-process of changing the pixel value of each pixel of the first predictive encoding unit using surrounding pixels of each pixel constituting the unit.

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

본 발명의 일 실시예에 따르면 부호화 단위(복호화 단계에서는 복호화 단위)의 크기에 따라서 부호화 단위에 적용할 인트라 예측 모드들의 개수를 다양하게 설정할 수 있다. 일 예로 도 13을 참조하면 인트라 예측되는 부호화 단위의 크기를 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. 13, the number of intraprediction modes actually performed for each of 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 관계를 만족하도록 각 부호화 단위의 크기에 따라서 수행될 인트라 예측 모드의 개수를 설정하는 것이 바람직하다. 즉, 현재 픽처가 작은 크기의 부호화 단위, 중간 크기의 부호화 단위, 큰 크기의 부호화 단위로 크게 분류된다고 할 때, 중간 크기의 부호화 단위가 가장 많은 수의 예측 모드를 갖으며, 작은 크기의 부호화 단위 및 큰 크기의 부호화 단위는 상대적으로 보다 작은 수의 예측 모드를 갖도록 설정하는 것이 바람직하다. 다만, 이에 한정되지 않고 작은 크기 및 큰 크기의 부호화 단위에 대하여도 보다 많은 수의 예측 모드를 갖도록 설정할 수도 있을 것이다. 도 13에 도시된 각 부호화 단위의 크기에 따른 예측 모드의 개수는 일 실시예에 불과하며, 각 부호화 단위의 크기에 따른 예측 모드의 개수는 변경될 수 있다.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. 13 is only one embodiment, and the number of prediction modes according to the size of each coding unit can be changed.

도 14a는 본 발명의 일 실시예에 따른 소정 크기의 부호화 단위에 적용되는 인트라 예측 모드의 일 예를 설명하기 위한 도면이다. 14A 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.

도 13 및 도 14a를 참조하면, 일 예로 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. 13 and 14A, 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.

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

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

도 14c를 참조하면, 부호화 단위의 크기에 의하여 결정된 이용가능한 인트라 예측 모드에 따라서 현재 부호화 단위의 주변 픽셀인 A - M을 이용하여 예측 부호화 단위를 생성한다. 예를 들어, 도 14a의 모드 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. 14C, a predictive encoding unit is generated using A - M, which is the neighboring pixel of the current encoding unit, according to the available intra prediction mode determined by the size of the encoding unit. For example, an operation of predicting a 4x4 current encoding unit according to mode 0, that is, a vertical mode in Fig. 14A 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.

도 15는 본 발명의 일 실시예에 따른 소정 크기의 부호화 단위에 적용되는 인트라 예측 모드의 다른 예를 설명하기 위한 도면이다. 15 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.

도 13 및 도 15를 참조하면, 일 예로 2×2 크기를 갖는 부호화 단위의 인트라 예측시에 수직(Vertical) 모드, 수평(Horizontal) 모드, DC(Direct Current) 모드, 플레인(plane) 모드 및 대각선 오른쪽(Diagonal Down-Right) 모드의 총 5개의 모드가 존재할 수 있다.Referring to FIGS. 13 and 15, 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.

한편, 도 13에 도시된 바와 같이 32x32 크기를 갖는 부호화 단위가 33개의 인트라 예측 모드를 갖는다고 할 때, 33개의 인트라 예측 모드의 방향을 설정할 필요가 있다. 본 발명의 일 실시예에서는 도 14 및 도 15에 도시된 바와 같은 인트라 예측 모드 이외에, 다양한 방향의 인트라 예측 모드를 설정하기 위하여 부호화 단위 내의 픽셀을 중심으로 참조 픽셀로서 이용될 주변 픽셀을 선택하기 위한 예측 방향을 dx, dy 파라메터를 이용하여 설정한다. 일 예로, 33개의 예측 모드들을 각각 mode N(N은 0부터 32까지의 정수)이라고 정의할 때, mode 0은 수직 모드, mode 1은 수평 모드, mode 2는 DC 모드, mode 3는 플레인 모드로 설정하고 mode 4 ~ mode31 각각은 다음의 표 2에 표기된 바와 같은 (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. 13, when a coding 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. 14 and 15, 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는 도 17을 이용하여 후술되는 바와 같이 쌍선형(bilinear) 보간을 이용하는 쌍선형 모드로 설정될 수 있다.The last mode 32 may be set to a bilinear mode using bilinear interpolation as described below with reference to FIG.

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

표 2을 참조하여 전술한 바와 같이, 본 발명의 일 실시예에 따른 인트라 예측 모드들은 복수 개의 (dx, dy) 파라메터들을 이용하여 tan-1(dy/dx)의 다양한 방향성을 갖을 수 있다.As described above with reference to Table 2, 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)

도 16을 참조하면, 현재 부호화 단위 내부의 예측하고자 하는 현재 픽셀(P)을 중심으로 표 2에 표기된 모드별 (dx, dy)의 값에 따라 정해지는 tan-1(dy/dx)의 각도를 갖는 연장선(150) 상에 위치한 주변 픽셀(A, B)를 현재 픽셀(P)의 예측자로 이용할 수 있다. 이 때, 예측자로서 이용되는 주변 픽셀은 이전에 부호화되고 복원된, 현재 부호화 단위의 상측 및 좌측의 이전 부호화 단위의 픽셀인 것이 바람직하다. 또한, 연장선(160)이 정수 위치의 주변 픽셀이 아닌 정수 위치 주변 픽셀의 사이를 통과하는 경우 연장선(160)에 더 가까운 주변 픽셀을 현재 픽셀(P)의 예측자로 이용할 수 있다. 또한, 도시된 바와 같이 연장선(160)과 만나는 상측의 주변 픽셀(A) 및 좌측의 주변 픽셀(B)의 두 개의 주변 픽셀이 존재하는 경우 상측의 주변 픽셀(A) 및 좌측의 주변 픽셀(B)의 평균값을 현재 픽셀(P)의 예측자로 이용하거나, 또는 dx*dy 값이 양수인 경우에는 상측의 주변 픽셀(A)을 이용하고 dx*dy 값이 음수인 경우에는 좌측의 주변 픽셀(B)을 이용할 수 있다. Referring to FIG. 16, the angle of tan -1 (dy / dx) determined according to the value of each mode (dx, dy) shown in Table 2 centered on 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 160 can be used as a predictor of the current pixel P when the extension line 160 passes between pixels around an integer position rather than a peripheral pixel at an integer position. As shown in the figure, when two peripheral pixels of the upper side peripheral pixel A and the left side peripheral pixel B that meet the extension line 160 exist, the upper peripheral pixel A and the left peripheral 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.

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

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

도 17을 참조하면, 쌍선형(Bi-linear) 모드는 현재 부호화 단위 내부의 예측하고자 하는 현재 픽셀(P)를 중심으로 현재 픽셀(P)와 그 상하좌우 경계의 픽셀값, 현재 픽셀(P)의 상하좌우 경계까지의 거리를 고려한 기하 평균값을 계산하여 그 결과값을 현재 픽셀(P)의 예측자로 이용하는 것이다. 즉, 쌍선형 모드에서는 현재 픽셀(P)의 예측자로서 현재 픽셀(P)의 상하좌우 경계에 위치한 픽셀 A(171), 픽셀 B(172), 픽셀 D(176) 및 픽셀 E(177)과 현재 픽셀(P)의 상하좌우 경계까지의 거리의 기하 평균값을 이용한다. 이 때, 쌍선형 모드 역시 인트라 예측 모드 중의 하나이므로 예측시의 참조 픽셀로서 이전에 부호화된 후 복원된 상측과 좌측의 주변 픽셀을 이용한다. 따라서, 픽셀 A(161) 및 픽셀 (B)로서 현재 부호화 단위 내부의 해당 픽셀값을 그대로 이용하는 것이 아니라 상측 및 좌측의 주변 픽셀을 이용하여 생성된 가상의 픽셀값을 이용한다.Referring to FIG. 17, a bi-linear mode is a mode in which a current pixel P and its neighboring pixel values around a current pixel P to be predicted in a current encoding unit, a current pixel P, 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 171, the pixel B 172, the pixel D 176, and the pixel E 177 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, the upper and lower neighboring pixels, which have been previously encoded and restored, are used 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.

구체적으로, 먼저 다음의 수학식과 같이 현재 부호화 단위에 인접한 상측 최좌측의 주변 픽셀(RightUpPixel, 174) 및 좌측 최하측의 주변 픽셀(LeftDownPixel,175)의 평균값을 계산함으로써 현재 부호화 단위의 우측 최하단 위치의 가상의 픽셀 C(173)을 계산한다.Specifically, first, by calculating the average value of the upper leftmost neighboring pixel (RightUpPixel) 174 and the lower leftmost neighboring pixel (LeftDownPixel) 175 adjacent to the current encoding unit as shown in the following equation, And calculates a virtual pixel C (173).

C=0.5(LeftDownPixel+RightUpPixel)C = 0.5 (LeftDownPixel + RightUpPixel)

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

A=(C*W1+LeftDownPixel*W2)/(W1+W2)A = (C * W1 + LeftDownPixel * W2) / (W1 + W2)

유사하게 현재 픽셀(P)의 상측 경계까지의 거리(h1) 및 하측 경계까지의 거리(h2)를 고려하여 현재 픽셀(P)를 우측으로 연장하였을 때 최우측 경계선에 위치하는 가상의 픽셀 B(172)의 값을 다음의 수학식과 같이 계산한다.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 ( 172) is calculated according to the following equation.

B=(C*h1+RightUpPixel*h2)/(h1+h2)B = (C * h1 + RightUpPixel * h2) / (h1 + h2)

상기 수학식들을 이용하여 현재 픽셀 P(170)의 하측 경계선상의 가상의 픽셀 A(171) 및 우측 경계선상의 가상의 픽셀 B(172)의 값이 결정되면 A+B+D+E의 평균값을 현재 픽셀 P(170)의 예측자로서 이용할 수 있다. 이와 같은 쌍선형 예측 과정은 현재 부호화 단위 내부의 모든 픽셀에 대하여 적용되어, 쌍선형 예측 모드에 따른 현재 부호화 단위의 예측 부호화 단위가 생성된다.When the values of the virtual pixel A 171 on the lower borderline of the current pixel P 170 and the pixel B 172 on the right borderline are determined using the above equations, the average value of A + B + D + And can be used as a predictor of the pixel P (170). 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 encoding is performed according to various intra prediction modes set according to the size of an encoding unit, thereby enabling more efficient compression depending on the characteristics of an image.

전술한 바와 같이, 도 12의 인트라 예측부(1200)의 예측부(1210)로부터 부호화 단위의 크기에 따라서 다양하게 설정된 인트라 예측 모드들을 적용하여 출력되는 예측 부호화 단위는 적용된 인트라 예측 모드에 따라서 일정한 방향성을 갖는다. 이러한 예측 부호화 단위 내부의 방향성은 부호화되는 현재 부호화 단위의 픽셀들이 일정한 방향성을 갖는 경우에는 예측 효율이 향상될 수 있지만 현재 부호화 단위의 픽셀들이 방향성을 갖지 않는 경우에는 예측 효율이 떨어질 수 있다. 따라서, 후처리부(1220)는 인트라 예측을 통해 생성된 예측 부호화 단위에 대한 후처리 동작으로서, 예측 부호화 단위 내부의 각 픽셀과 적어도 하나의 주변 픽셀을 이용하여 예측 부호화 단위 내부의 각 픽셀의 픽셀값을 변경하여 새로운 예측 부호화 단위를 생성함으로써 영상의 예측 효율을 향상시킨다. 이 때, 후처리부(1220)는 모든 예측 부호화 단위에 대하여 후처리를 수행하는 것이 아니라, 판단부(1215)의 판단 결과에 기초하여 현재 예측 부호화 단위가 픽처의 경계를 벗어난 영역을 포함하고 있지 않는 경우, 즉 MPI_PredMode가 0이 아닌 경우에만 후처리를 수행한다. As described above, the predictive encoding unit output by applying the intra-prediction modes set variously according to the size of the encoding unit from the predictor 1210 of the intra-prediction unit 1200 of FIG. 12 outputs a predetermined directionality Respectively. If the pixels of the current coding unit to be coded have a certain direction, the prediction efficiency may be improved. However, if the pixels of the current coding unit have no directionality, the prediction efficiency may be lowered. Accordingly, the post-processing unit 1220 performs a post-processing operation on the predictive encoding unit generated through the intra-prediction, using the pixels in the predictive encoding unit and at least one neighboring pixel to calculate the pixel value To thereby generate a new predictive encoding unit, thereby improving the prediction efficiency of the image. At this time, the post-processing unit 1220 does not perform post-processing on all of the predictive encoding units, but based on the determination result of the determination unit 1215, the post-processing unit 1220 determines that the current predictive encoding unit does not include an area , That is, if the MPI_PredMode is not 0, post-processing is performed.

도 22는 본 발명의 일 실시예에 따라서 부호화 단위의 후처리를 위한 인덱싱(indexing) 과정을 설명하기 위한 참조도이다.22 is a reference diagram for explaining an indexing process for post-processing of an encoding unit according to an embodiment of the present invention.

도 22를 참조하면, 현재 픽처(2210)를 소정 크기의 부호화 단위로 분할하여 부호화할 때, 현재 픽처(2210)의 폭 'Frame_width'이 부호화 단위의 가로 길이의 배수가 아니거나, 또는 현재 픽처(2210)의 높이 'Frame_height'가 부호화 단위의 세로 길이의 배수가 아니라면, 도 22에 도시된 바와 같이 현재 픽처(2210)의 오른쪽 경계 및 하부 경계의 빗금으로 해칭된 부호화 단위들이 걸쳐있게 된다. 이와 같이 경계를 벗어난 영역을 포함하는 부호화 단위에 대해서 판단부(1215)는 후처리 수행 여부를 나타내는 소정의 인덱스(MPI_PredMode)를 0으로 설정함으로써 후처리부(1220)에서 해당 부호화 단위에 대한 후처리 과정을 스킵할 수 있도록 한다.22, when the current picture 2210 is divided into coding units of a predetermined size and coded, the width 'Frame_width' of the current picture 2210 is not a multiple of the horizontal length of the coding unit, If the height 'Frame_height' of the current picture 2210 is not a multiple of the vertical length of the coding unit, the coding units hatched by the right border and the lower border of the current picture 2210 are overlapped as shown in FIG. The determination unit 1215 determines a coding unit including an out-of-bounds region by setting a predetermined index (MPI_PredMode) indicating whether to perform a post-process to 0, To be skipped.

이와 같이, 현재 예측 부호화 단위가 픽처의 경계를 벗어난 영역을 포함할 때 후처리를 수행하지 않는 이유는, 후처리 과정 자체에서 각 픽셀의 주변 픽셀을 이용하게 되는데 경계를 벗어난 예측 부호화 단위 내의 픽셀에 대해서는 주변 픽셀이 결여되어 있을 뿐만 아니라, 결여된 픽셀을 패딩(padding) 또는 extrapolation 등을 통해 생성하여 후처리를 수행하더라도 원래 없던 픽셀을 새롭게 생성하여 처리하는 것이기 때문에 예측 효율의 향상을 기대하기 어렵기 때문이다. The reason why the post-processing is not performed when the current predictive encoding unit includes an area outside the boundary of the picture is that the surrounding pixels of each pixel are used in the post-processing process itself. It is difficult to expect the improvement of the prediction efficiency because not only surrounding pixels but also missing pixels are generated through padding or extrapolation to perform post-processing and new pixels are newly generated and processed Because.

도 23은 본 발명의 다른 실시예에 따라서 부호화 단위의 후처리를 위한 인덱싱(indexing) 과정을 설명하기 위한 참조도이다.23 is a reference diagram for explaining an indexing process for post-processing of an encoding unit according to another embodiment of the present invention.

도 23을 참조하면, 판단부(1215)의 판단 결과, 부호화 단위(2320)가 픽처의 경계(2310)의 경계에 걸쳐 있는 것으로 판단된 경우 부호화 단위(2320) 전체를 후처리를 수행하지 않는 것으로 설정하는 대신에, 부호화 단위(2320)를 더 큰 심도의 부호화 단위로 분할한 다음, 분할된 더 큰 심도의 부호화 단위 각각이 경계를 벗어나는 영역을 포함하는지 여부를 판단하는 것이 바람직하다. 이러한 분할 과정은 경계에 걸쳐 있는 부호화 단위들(2324, 2328)이 최소 부호화 단위가 되어 더 작은 부호화 단위로 분할할 수 없을 때까지, 즉 최대 심도를 갖을 때까지 반복될 수 있다. 도 23에 도시된 바와 같이, 경계를 벗어난 최소 부호화 단위들(2324,2328)에 대해서는 후처리가 수행되지 않도록 인덱스(MPI_PredMode)가 0으로 설정되고, 경계 내의 최소 부호화 단위들(2322, 2326)은 후처리가 수행되도록 인덱스(MPI_PredMode)가 1로 설정된다.23, when the determination unit 1215 determines that the coding unit 2320 is located on the boundary of the picture boundary 2310, the coding unit 2320 is not subjected to post-processing as a whole Instead of setting, it is desirable to divide the coding unit 2320 into coding units of greater depth, and then determine whether each of the divided coding units of the greater depth includes an out-of-bounds region. This segmentation process can be repeated until the encoding units 2324 and 2328 that span the boundary are the minimum encoding units and can not be divided into smaller encoding units, that is, until the maximum depth is obtained. 23, the index (MPI_PredMode) is set to 0 so that post-processing is not performed on the minimum bounding coding units 2324 and 2328, and the minimum coding units 2322 and 2326 in the boundary are set to 0 The index (MPI_PredMode) is set to 1 so that post-processing is performed.

이하, 도 12의 후처리부(1220)에서 수행되는 예측 부호화 단위의 후처리 동작에 대하여 설명한다.Hereinafter, the post-processing operation of the predictive encoding unit performed by the post-processing unit 1220 of FIG. 12 will be described.

후처리부(1220)는, 판단부(1215)의 판단 결과 현재 부호화 단위가 경계를 벗어나는 영역을 포함하지 않는 경우, 예측부(1210)에서 생성된 제 1 예측 부호화 단위를 구성하는 각 픽셀과 적어도 하나의 주변 픽셀을 이용한 후처리를 통해 제 1 예측 부호화 단위를 구성하는 각 픽셀의 픽셀값을 변경하여 제 2 예측 부호화 단위를 생성한다. 여기서, 예측부(1220)는 전술한 바와 같이 부호화 단위의 크기에 따른 이용가능한 인트라 예측 모드들을 적용하여 제 1 예측 부호화 단위를 생성한다.If the current encoding unit does not include a region out of bounds as a result of the determination by the determination unit 1215, the post-processing unit 1220 generates at least one of the pixels constituting the first predictive encoding unit generated by the predictor 1210 The second predictive encoding unit is generated by changing the pixel values of the pixels constituting the first predictive encoding unit through post-processing using the neighboring pixels of the second predictive encoding unit. Here, the prediction unit 1220 generates the first predictive encoding unit by applying the available intra-prediction modes according to the size of the encoding unit, as described above.

도 18은 본 발명의 일 실시예에 따른 제 1 예측 부호화 단위의 후처리 동작을 설명하기 위한 참조도이다. 도 18에서 도면 부호 1810 내지 1860은 후처리부(1220)에 의하여 처리되는 제 1 예측 부호화 단위 내부의 각 픽셀값이 변경되는 과정을 시간 순서로 나타낸 것이다.18 is a reference diagram for explaining a post-processing operation of a first predictive-encoding unit according to an embodiment of the present invention. In FIG. 18, reference numerals 1810 to 1860 denote, in chronological order, the process of changing pixel values in the first predictive encoding unit processed by the post-processing unit 1220.

도 18을 참조하면, 본 발명의 일 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위 내부의 변경하고자 하는 픽셀과 그 주변 픽셀들의 픽셀값들의 가중 평균값을 계산하여 제 1 예측 부호화 단위의 각 픽셀의 픽셀값을 변경한다. 예를 들어, 도 18에서 제 1 예측 부호화 단위(1810)의 변경하고자 하는 픽셀(1821)의 픽셀값을 f[1][1], 상측에 위치한 픽셀(1822)의 픽셀값을 f[0][1], 좌측에 위치한 픽셀(1823)의 픽셀값을 f[1][0]이라고 하면, 픽셀(1821)의 픽셀값 f[1][1]을 변경한 값을 f'[1][1]이라고 하면, f'[1][1]은 다음의 수학식 1과 같이 계산될 수 있다.Referring to FIG. 18, the post-processing unit 1220 according to an embodiment of the present invention calculates a weighted average value of pixel values of a pixel to be changed and its neighboring pixels in a first predictive encoding unit, Change the pixel value of each pixel. For example, if f [1] [1] is the pixel value of the pixel 1821 to be changed and f [0] is the pixel value of the pixel 1822 located at the upper side in the first predictive encoding unit 1810, 1], the value obtained by changing the pixel value f [1] [1] of the pixel 1821 is represented as f '[1] [0] 1], f '[1] [1] can be calculated by the following equation (1).

Figure pat00001
Figure pat00001

도 18에 도시된 바와 같이, 본 발명의 일 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위 내부의 각 픽셀들에 대해서 최좌상측으로부터 최우하측 방향으로 변경하고자 하는 픽셀과 그 상측 및 좌측에 위치한 픽셀들의 가중 평균값을 계산하여 제 1 예측 부호화 단위의 각 픽셀의 픽셀값을 변경한다. 그러나, 본 발명에 따른 예측 부호화 단위의 후처리 동작은 최좌상측으로부터 최우하측 방향으로 한정되는 것이 아니라, 최우상측으로부터 최좌하측 방향으로, 또는 최우하측으로부터 최좌상측 방향으로, 또는 최좌하측으로부터 최우상측 방향으로 제 1 예측 부호화 단위의 각 픽셀들에 대하여 순차적으로 수행될 수 있다. 예를 들어 후처리부(1220)는 도 18에 도시된 처리 순서와 반대로 최우하측으로부터 최좌상측 방향으로 제 1 예측 부호화 단위의 픽셀들을 변경하는 경우에는 변경하고자 하는 픽셀과 그 하측 및 우측에 위치한 픽셀들의 가중 평균값을 계산하여 제 1 예측 부호화 단위의 각 픽셀의 픽셀값을 변경한다. As shown in FIG. 18, the post-processing unit 1220 according to an embodiment of the present invention includes a pixel to be changed from the uppermost left side to the highest-right side with respect to each pixel in the first predictive- The pixel value of each pixel of the first predictive encoding unit is changed by calculating the weighted average value of the pixels located on the left side. However, the post-processing operation of the predictive encoding unit according to the present invention is not limited to the uppermost-to-lowermost direction from the uppermost-left side, but may be performed from the highest-order side to the lowermost- For each pixel of the first predictive encoding unit in the top-most direction. For example, when the pixels of the first predictive encoding unit are changed from the highest to lowest left in the upper left direction as opposed to the processing procedure shown in FIG. 18, the post-processing unit 1220 determines the pixel to be changed and the pixels The pixel value of each pixel of the first predictive encoding unit is changed.

도 19 및 도 20은 본 발명의 일 실시예에 따른 후처리부(1220)의 동작을 설명하기 위한 참조도이다. 도 19에서 도면 부호 1910은 현재 변경하고자 하는 제 1 예측 부호화 단위의 제 1 픽셀을 나타내며, 도면 부호 1911 내지 1918은 제 1 픽셀(1910)의 주변에 위치한 주변 픽셀들을 나타낸다.19 and 20 are reference views for explaining the operation of the post-processing unit 1220 according to an embodiment of the present invention. In FIG. 19, reference numeral 1910 denotes a first pixel of the first predictive encoding unit to be changed, and reference numerals 1911 to 1918 denote neighboring pixels located around the first pixel 1910.

도 19를 참조하면, 본 발명의 일 실시예에 따른 후처리부(1220)는 도 18에 도시된 바와 같이 제 1 예측 부호화 단위의 상측 및 좌측에 위치한 주변 픽셀에 한정되지 않고, 주변 픽셀들(1911 내지 1918) 중 선택된 소정 개수의 주변 픽셀들을 이용하여 제 1 픽셀(1910)에 대한 후처리를 수행할 수 있다. 즉, 도 20을 참조하면, 현재 부호화 단위의 제 1 픽셀(c)를 중심으로 그 주변 픽셀들(P1 내지 P8) 중에서 소정 개수의 주변 픽셀들을 선택하고, 선택된 주변 픽셀과 제 1 픽셀(c)을 이용한 소정의 연산을 통해 제 1 픽셀(c)의 픽셀값을 변경한다. 예를 들어, 제 1 예측 부호화 단위의 크기를 mxn(m 및 n은 양의 정수), 제 1 예측 부호화 단위 내부의 변경하고자 하는 i(i는 0부터 m-1까지의 정수)번째 열 및 j(j는 0부터 n-1까지의 정수)번째 행에 위치한 제 1 픽셀(1910)의 픽셀값을 f[i][j], 제 1 픽셀(1910)의 주변 픽셀들(1911 내지 1918) 중 제1 픽셀(1910)의 후처리를 위해 선택된 n개(n은 2 또는 3)의 픽셀들의 값을 각각 f1 내지 fn이라고 하면, 후처리부(1220)는 다음의 수학식 2와 같이 제 1 픽셀(1910)의 픽셀값 f[i][j]를 f'[i][j]로 변경한다.Referring to FIG. 19, the post-processing unit 1220 according to an embodiment of the present invention is not limited to neighboring pixels located on the upper and left sides of the first predictive encoding unit as shown in FIG. 18, Processing may be performed on the first pixel 1910 using a predetermined number of peripheral pixels selected from the plurality of peripheral pixels 1918 to 1918. [ That is, referring to FIG. 20, a predetermined number of neighboring pixels among the neighboring pixels P1 to P8 around the first pixel c of the current encoding unit are selected, and the selected neighboring pixels and the first pixel (c) The pixel value of the first pixel c is changed through a predetermined operation using the first pixel c. For example, if the size of the first predictive encoding unit is mxn (m and n are positive integers), i (i is an integer from 0 to m-1) th column to be changed in the first predictive encoding unit, j (j is an integer from 0 to n-1), f [i] [j] is the pixel value of the first pixel 1910 located in the first row of the first pixel 1910 and the neighboring pixels 1911 to 1918 of the first pixel 1910 The post-processing unit 1220 calculates the values of the n (n is 2 or 3) pixels selected for the post-processing of the first pixel 1910 from f1 to fn, respectively, I] [j] to f '[i] [j].

Figure pat00002
Figure pat00002

후처리부(1220)는 제 1 예측 부호화 단위(1900) 내부의 모든 픽셀들에 대하여 전술한 수학식 2를 적용하여 픽셀값을 변경함으로써 제 2 예측 부호화 단위를 생성한다. 전술한 수학식 2에서는 3개까지의 주변 픽셀들을 이용하는 경우를 예시하였으나, 이에 한정되지 않고 후처리부(1220)는 4개 이상의 주변 픽셀들을 이용하여 후처리 동작을 수행할 수 있다.The post-processing unit 1220 generates a second predictive encoding unit by applying the above-described Equation (2) to all the pixels in the first predictive encoding unit 1900, thereby changing the pixel value. In the above equation (2), up to three neighboring pixels are used, but the present invention is not limited thereto. The post-processing unit 1220 may perform post-processing operations using four or more neighboring pixels.

본 발명의 제 2 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위의 변경되는 각 픽셀과, 각 픽셀의 주변에 위치한 픽셀들의 가중 조화 평균값을 통해 제 1 예측 부호화 단위의 각 픽셀의 픽셀값을 변경함으로써 제 2 예측 블록을 생성한다.The post-processing unit 1220 according to the second embodiment of the present invention includes a post-processing unit 1220 and a post-processing unit 1220. The post-processing unit 1220 according to the second embodiment of the present invention calculates a pixel value of each pixel in the first predictive- Thereby generating a second prediction block.

예를 들어, 본 발명의 제 2 실시예에 따른 후처리부(1220)는 다음의 수학식 3과 같이 상측 및 좌측의 주변 픽셀을 이용하여 제 1 예측 부호화 단위의 i번째 열 및 j번째 행에 위치한 픽셀의 픽셀값 f[i][j]를 f'[i][j]로 변경한다.For example, the post-processing unit 1220 according to the second embodiment of the present invention uses the neighboring pixels on the upper side and the left side as shown in the following Equation (3) to locate the i-th column and the j- The pixel value f [i] [j] of the pixel is changed to f '[i] [j].

Figure pat00003
Figure pat00003

수학식 3에서, α, β, γ는 임의의 양의 정수값을 갖을 수 있으며, 일 예로 α=2, β=2, γ=1 일 수 있다.In Equation (3),?,?,? May have any positive integer value, and for example,? = 2,? = 2,? = 1.

본 발명의 제 3 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위의 변경되는 각 픽셀과 각 픽셀의 주변 픽셀들의 가중 기하 평균값을 통해 제 1 예측 부호화 단위의 각 픽셀의 픽셀값을 변경함으로써 제 2 예측 부호화 단위를 생성한다.The post-processing unit 1220 according to the third embodiment of the present invention changes the pixel value of each pixel of the first predictive-encoding unit through the weighted geometric average value of each pixel to be changed and the surrounding pixels of the first predictive- Thereby generating a second predictive encoding unit.

예를 들어, 본 발명의 제 3 실시예에 따른 후처리부(1220)는 다음의 수학식 4와 같이 상측 및 좌측의 주변 픽셀을 이용하여 제 1 예측 부호화 단위의 i번째 열 및 j번째 행에 위치한 픽셀의 픽셀값 f[i][j]를 f'[i][j]로 변경한다.For example, the post-processing unit 1220 according to the third embodiment of the present invention uses the neighboring pixels on the upper side and the left side as shown in the following Equation (4) The pixel value f [i] [j] of the pixel is changed to f '[i] [j].

Figure pat00004
Figure pat00004

수학식 4에서, α, β, γ는 임의의 양의 정수값을 갖을 수 있으며, 일 예로 α=1, β=1, γ=2 일 수 있다. 전술한 수학식 2 내지 4에서는 모두 변경하고자 하는 픽셀 f[i][j]에 상대적으로 큰 가중치를 부여한다.In Equation (4),?,?,? May have any positive integer value, and for example,? = 1,? = 1,? = 2. In Equations (2) to (4) described above, a relatively large weight is given to the pixel f [i] [j] to be changed.

전술한 바와 같이 본 발명의 제 1 실시예 내지 제 3 실시예에서 후처리부(1220)는 변경하고자 하는 픽셀의 상측 및 좌측의 주변 픽셀에 한정되지 않고 도 19에 도시된 바와 같은 주변 픽셀들(1911 내지 1918) 중 선택된 소정 개수의 주변 픽셀들을 이용하여 후처리 동작을 수행할 수 있다. As described above, in the first to third embodiments of the present invention, the post-processing unit 1220 is not limited to peripheral pixels on the upper and left sides of a pixel to be changed, but may include surrounding pixels 1911 To perform a post-processing operation using a predetermined number of peripheral pixels selected from among the peripheral pixels.

본 발명의 제 4 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위의 변경하고자 하는 픽셀과 그 주변 픽셀들 중 선택된 하나의 주변 픽셀의 평균값으로 제 1 예측 부호화 단위의 각 픽셀의 픽셀값을 변경함으로써 제 2 예측 부호화 단위를 생성한다.The post-processing unit 1220 according to the fourth embodiment of the present invention calculates a pixel value of each pixel of the first predictive encoding unit by an average value of a pixel to be changed and a selected one of surrounding pixels of the first predictive- To thereby generate a second predictive encoding unit.

예를 들어, 본 발명의 제 4 실시예에 따른 후처리부(1220)는 다음의 수학식 5와 같이 상측의 주변 픽셀을 이용하여 제 1 예측 부호화 단위의 i번째 열 및 j번째 행에 위치한 픽셀의 픽셀값 f[i][j]를 f'[i][j]로 변경할 수 있다.For example, the post-processing unit 1220 according to the fourth exemplary embodiment of the present invention may use the neighboring pixels on the upper side as shown in the following equation (5) to calculate the pixel values of the pixels located in the i- The pixel value f [i] [j] can be changed to f '[i] [j].

Figure pat00005
Figure pat00005

유사하게 본 발명의 제 5 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위의 변경되는 픽셀과 그 좌측에 위치한 주변 픽셀의 평균값으로 제 1 예측 부호하 단위의 각 픽셀의 픽셀값을 변경함으로써 제 2 예측 부호화 단위를 생성한다.Similarly, the post-processing unit 1220 according to the fifth embodiment of the present invention changes the pixel value of each pixel under the first predictive coding unit to an average value of pixels to be changed in the first predictive coding unit and neighboring pixels located in the left side thereof Thereby generating a second predictive encoding unit.

즉, 본 발명의 제 5 실시예에 따른 후처리부(1220)는 다음의 수학식 6과 같이 제 1 예측 부호화 단위의 i번째 열 및 j번째 행에 위치한 픽셀의 픽셀값 f[i][j]를 f'[i][j]로 변경한다.That is, the post-processing unit 1220 according to the fifth embodiment of the present invention calculates the pixel value f [i] [j] of the pixel located in the i-th column and the j-th row of the first predictive- To f '[i] [j].

Figure pat00006
Figure pat00006

본 발명의 제 6 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위의 변경하고자하는 픽셀, 그 주변 픽셀들 사이의 중간값(median)으로 픽셀값을 변경함으로써 제 2 예측 부호화 단위를 생성한다. 예를 들어, 다시 도 19를 참조하면, 제 1 예측 부호화 단위(1900)의 i번째 열 및 j번째 행에 위치한 제 1 픽셀(1910)의 픽셀값 f[i][j], 제 2 픽셀(1912)의 픽셀값 f[i][j-1], 제 3 픽셀(1911)의 픽셀값 f[i-1][j]들이 다음의 크기 순서; f[i][j-1]>f[i-1][j]>f[i][j]를 갖는다고 가정한다. 이 경우 본 발명의 제 6 실시예에 따른 후처리부(1220)는 변경하고자 하는 제 1 픽셀(510)의 픽셀값 f[i][j]를 중간값인 f[i-1][j]으로 변경한다.The post-processing unit 1220 according to the sixth embodiment of the present invention generates a second predictive encoding unit by modifying a pixel value to a median between pixels to be changed in the first predictive encoding unit and surrounding pixels thereof do. 19, the pixel value f [i] [j] of the first pixel 1910 located in the i-th column and the j-th row of the first predictive encoding unit 1900, The pixel values f [i] [j-1] of the third pixel 1911 and the pixel values f [i-1] [j] of the third pixel 1911 satisfy the following size order; Let f [i] [j-1]> f [i-1] [j]> f [i] [j] be assumed. In this case, the post-processing unit 1220 according to the sixth embodiment of the present invention sets the pixel value f [i] [j] of the first pixel 510 to be changed to f [i-1] [j] Change it.

본 발명의 제 7 실시예 내지 제 9 실시예에 따른 후처리부(1220)는 변경되는 픽셀의 주변 픽셀들을 이용하는 대신에 현재 부호화 단위 이전에 부호화된 후 복원된 인접한 부호화 단위들의 픽셀값을 이용하여 제 2 예측 부호화 단위를 생성한다.The post-processing unit 1220 according to the seventh through ninth embodiments of the present invention may use the pixel values of adjacent encoding units reconstructed after being encoded before the current encoding unit instead of using surrounding pixels of the changed pixel 2 prediction encoding unit.

다시 도 19를 참조하면, 본 발명의 제 7 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위(1900) 내부의 변경하고자 하는 i번째 열 및 j번째 행에 위치한 제 1 픽셀(1910)과 동일한 열에 위치하면서 현재 부호화 단위의 상측 인접 부호화 단위에 위치한 픽셀(1921)의 평균값을 다음의 수학식 7과 같이 계산하여 제 1 픽셀(1910)의 픽셀값을 f'[i][j]로 변경한다.19, the post-processing unit 1220 according to the seventh embodiment of the present invention includes a first pixel 1910 located in an i-th column and a j-th row to be changed in a first predictive encoding unit 1900, The pixel value of the first pixel 1910 is calculated as f '[i] [j] by calculating the average value of the pixels 1921 located in the same column as the current pixel and located in the upper adjacent encoding unit of the current encoding unit, Change it.

Figure pat00007
Figure pat00007

수학식 7에서 f[-1][j]는 제 1 픽셀(1910)과 동일한 열에 위치하면서 현재 부호화 단위의 상측 인접 부호화 단위에 위치한 픽셀(1921)의 픽셀값을 나타낸다.In Equation (7), f [-1] [j] represents the pixel value of the pixel 1921 located in the same column as the first pixel 1910 and located in the upper adjacent encoding unit of the current encoding unit.

유사하게 본 발명의 제 8 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위(1900) 내부의 변경하고자 하는 i번째 열 및 j번째 행에 위치한 제 1 픽셀(1910)과 동일한 행에 위치하면서 현재 부호화 단위의 좌측 인접 부호화 단위에 위치한 픽셀(1922)의 평균값을 다음의 수학식 8과 같이 계산하여 제 1 픽셀(1910)의 픽셀값을 f'[i][j]로 변경한다.Likewise, the post-processing unit 1220 according to the eighth embodiment of the present invention includes a post-processing unit 1220 in the same row as the first pixel 1910 located in the i-th column and the j-th row to be changed in the first predictive- The pixel value of the first pixel 1910 is changed to f '[i] [j] by calculating an average value of the pixels 1922 located in the left adjacent encoding unit of the current encoding unit as shown in Equation (8).

Figure pat00008
Figure pat00008

수학식 8에서 f[i][-1]는 제 1 픽셀(1910)과 동일한 행에 위치하면서 현재 부호화 단위의 좌측 인접 부호화 단위에 위치한 픽셀(1922)의 픽셀값을 나타낸다.In Equation (8), f [i] [- 1] represents the pixel value of the pixel 1922 located in the same row as the first pixel 1910 and located in the left adjacent encoding unit of the current encoding unit.

본 발명의 제 9 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위(1900) 내부의 변경하고자 하는 i번째 열 및 j번째 행에 위치한 제 1 픽셀(1910), 제 1 픽셀(1910)과 동일한 열에 위치하면서 현재 부호화 단위의 상측 인접 부호화 단위에 위치한 픽셀(1921) 및 동일한 행에 위치하면서 현재 부호화 단위의 좌측 인접 부호화 단위에 위치한 픽셀(1922)의 가중 평균값을 다음의 수학식 9와 같이 계산하여 제 1 픽셀(1910)의 픽셀값을 f'[i][j]로 변경한다.The post-processing unit 1220 according to the ninth embodiment of the present invention includes a first pixel 1910, a first pixel 1910, and a second pixel 1910 located in the i-th column and the j-th row to be changed in the first predictive- A weighted average value of a pixel 1921 located in the upper adjacent encoding unit of the current encoding unit and a pixel 1922 located in the same row and located in the left neighboring encoding unit of the current encoding unit is located in the same column as the following Equation 9 And changes the pixel value of the first pixel 1910 to f '[i] [j].

Figure pat00009
Figure pat00009

본 발명의 제 10 실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위(1900) 내부의 변경하고자 하는 제 1 픽셀의 픽셀값 f[i][j]를 다음의 수학식 10 내지 13 중 하나를 이용하여 f'[i][j]로 변경한다.The post-processing unit 1220 according to the tenth embodiment of the present invention compares the pixel value f [i] [j] of the first pixel to be changed within the first predictive coding unit 1900 with the following equation We use one to change it to f '[i] [j].

Figure pat00010
Figure pat00010

Figure pat00011
Figure pat00011

Figure pat00012
Figure pat00012

Figure pat00013
Figure pat00013

수학식 10은 제 1 예측 부호화 단위의 열 단위로 픽셀값들을 아래 방향으로 점차 증가하는 값으로 변경하는 것이며, 수학식 11은 제 1 예측 부호화 단위의 행 단위로 픽셀값들을 오른쪽 방향으로 점차 증가하는 값으로 변경하는 것이다. 수학식 12는 제 1 예측 부호화 단위의 열 단위로 각 픽셀값들을 아래 방향으로 점차 감소하는 값으로 변경하는 것이며, 수학식 13은 제 1 예측 부호화 단위의 행 단위로 각 픽셀값들을 오른쪽 방향으로 점차 감소하는 값으로 변경하는 것이다.Equation (10) is to change the pixel values in a row unit of the first predictive encoding unit to a gradually increasing value in the downward direction, and Equation (11) Value. Equation (12) is to change each pixel value in a row unit of the first predictive encoding unit to a value that gradually decreases in a downward direction, and Expression (13) To a decreasing value.

본 발명의 제 11실시예에 따른 후처리부(1220)는 제 1 예측 부호화 단위 내부의 변경하고자 하는 i번째 열 및 j번째 행에 위치한 제 1 픽셀의 픽셀값을 f[i][j], 제 1 예측 부호화 단위의 최좌상측에 위치한 픽셀의 픽셀값을 f[0][0], 제 1 픽셀과 동일한 j번째 열에 위치하며 제 1 예측 부호화 단위의 최상측행에 위치한 픽셀의 픽셀값을 f[0][j], 제 1 픽셀과 동일한 i번째 행에 위치하며 제 1 예측 부호화 단위의 최좌측열에 위치한 픽셀의 픽셀값을 f[i][0],

Figure pat00014
라고 할 때, 다음의 수학식 14와 같이 제 1 픽셀의 픽셀값을 f'[i][j]로 변경한다.The post-processing unit 1220 according to the eleventh embodiment of the present invention calculates f [i] [j] as the pixel value of the first pixel located in the i-th column and the j-th row to be changed in the first predictive- F [0] [0] is a pixel value of a pixel located at the upper left of the first predictive encoding unit, f [0] [0] is a pixel value of a pixel located at the j- 0] [j], a pixel value of a pixel located in the i-th row which is the same as the first pixel and located in the leftmost column of the first predictive encoding unit is denoted by f [i]
Figure pat00014
, The pixel value of the first pixel is changed to f '[i] [j] as shown in the following Equation (14).

Figure pat00015
Figure pat00015

수학식 14는 일종의 파동 방정식(wave equation)에 기초한 것으로, 제 1 예측 부호화 내부의 픽셀값을 스무딩(smoothing)하기 위해서 제 1 예측 부호화 단위의 최상측행의 픽셀값과 최좌측열의 픽셀값을 경계 조건으로 하여서 G[i][j]를 계산하고, G[i][j]와 f[i][j]의 평균값을 계산함으로써 제 1 예측 부호화 단위의 픽셀들의 픽셀값을 변경하는 것이다.Equation (14) is based on a kind of wave equation. In order to smoothing the pixel value inside the first predictive encoding, the pixel value of the best-forward line in the first predictive encoding unit and the pixel value in the left- , And calculates the average value of G [i] [j] and f [i] [j] by changing the pixel value of the pixels of the first predictive coding unit.

본 발명의 제 1 실시예 내지 제 11 실시예들과 같이 다양한 후처리 모드를 적용하여 생성된 제 2 예측 부호화 단위들을 부호화한 비트스트림의 코스트가 비교되어, 최소 코스트를 갖는 제 2 예측 부호화 단위를 생성하는데 이용된 후처리 모드가 비트스트림의 헤더 영역에 부가된다. 후처리 모드를 비트스트림에 부가할 때 소정 개수의 부호화 단위들에 대한 부호화가 완료된 이후 결정된 후처리 모드의 분포에 기초하여, 많이 이용되는 후처리 모드에 적은 비트를 할당하는 가변 길이 부호화 방식을 적용함으로써 서로 다른 후처리 모드를 구분하여 표시할 수 있다. 예를 들어, 본 발명의 제 1 실시예에 따른 후처리 모드가 대부분의 부호화 단위에서 가장 작은 코스트를 발생시키는 최적의 연산이라고 할 때, 제 1 실시예에 따른 후처리 모드를 나타내는 인덱스에 가장 작은 비트를 할당하여 제 1 실시예에 따른 후처리 모드를 다른 실시예에 따른 후처리 모드들과 구별되도록 할 수 있다.As in the first to eleventh embodiments of the present invention, the cost of the bitstream obtained by encoding the second predictive encoding units generated by applying various post-processing modes is compared, and the second predictive encoding unit having the minimum cost is The post-processing mode used to generate is added to the header area of the bitstream. A variable length coding scheme is employed in which a small number of bits are allocated to a frequently used post-processing mode based on distribution of a post-processing mode determined after encoding of a predetermined number of coding units is completed when a post-processing mode is added to a bitstream Different post-processing modes can be distinguished and displayed. For example, when the post-processing mode according to the first embodiment of the present invention is an optimal operation that generates the smallest cost in most coding units, Bits to distinguish the post-processing mode according to the first embodiment from the post-processing modes according to another embodiment.

한편, 부호화 단위를 더 작은 서브 부호화 단위들로 나누어 예측을 수행하는 경우, 각 서브 부호화 단위 별로 서로 다른 후처리 모드를 적용하여 제 2 예측 부호화 단위를 생성할 수도 있고, 계산을 간소화하고 오버 헤드의 비율을 낮추기 위해서 동일한 부호화 단위에 포함되는 서브 부호화 단위들에는 동일한 후처리 모드가 적용되도록 할 수 있다.Meanwhile, when prediction is performed by dividing an encoding unit into smaller sub-encoding units, it is possible to generate a second predictive encoding unit by applying different post-processing modes to each sub-encoding unit, simplify the calculation, To reduce the rate, the same post-processing mode may be applied to the sub-encoding units included in the same encoding unit.

최적의 후처리 모드를 결정하기 위한 코스트로는 율-왜곡 최적화(Rate-Distortion Optimization) 방식이 이용될 수 있다. 본 발명의 일 실시예에 따른 부호화 방법은 다른 부호화 단위의 참조 데이터로 이용되는 인트라 예측 부호화 단위에 적용되기 때문에 율-왜곡 최적화 방식에서 왜곡값(distortion)에 높은 가중치를 두어 코스트를 계산하는 것이 바람직하다. 즉, 종래 율-왜곡 최적화 방식은 다음의 수학식 15와 같이 부호화된 영상과 원영상의 차이값인 왜곡값 및 발생되는 비트레이트에 기초하여 코스트를 계산한다.A rate-distortion optimization method may be used as the cost for determining the optimal post-processing mode. Since the encoding method according to an embodiment of the present invention is applied to intra prediction encoding units used as reference data of other encoding units, it is preferable to calculate a cost by assigning a high weight to a distortion value in a rate-distortion optimization method Do. That is, the conventional rate-distortion optimization method calculates the cost based on the distortion value, which is the difference between the encoded image and the original image, and the generated bit rate as shown in Equation (15).

Figure pat00016
Figure pat00016

이에 반하여 본 발명의 일 실시예에 따른 부호화 방식에서는 다음의 수학식 16과 같이 종래 율-왜곡 최적화 방식에 비하여 왜곡값에 보다 높은 가중치를 할당하여 최적의 후처리 모드를 결정하는 것이 바람직하다. On the other hand, in the encoding method according to an embodiment of the present invention, it is preferable to allocate a higher weight value to the distortion value in comparison with the conventional rate-distortion optimization method as shown in the following Equation 16 to determine the optimal post-processing mode.

Figure pat00017
Figure pat00017

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

도 21을 참조하면, 단계 2110에서 부호화되는 현재 부호화 단위에 대한 제 1 예측 부호화 단위를 생성한다. 여기서, 제 1 예측 부호화 단위는 일반적인 인트라 예측 방식 및 전술한 바와 같이 부호화 단위의 크기에 따라서 다양한 방향성을 갖는 인트라 예측 모드들을 적용하여 생성된 인트라 예측 블록이다.Referring to FIG. 21, in step 2110, a first predictive encoding unit for the current encoding unit to be encoded is generated. Here, the first predictive coding unit is an intra prediction block generated by applying intra prediction modes having various directions according to a general intra prediction method and a coding unit size as described above.

단계 2120에서, 현재 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 여부가 판단된다. 판단 결과에 따라서, "0"의 값은 후처리를 통해 제 2 예측 부호화 단위를 생성하는 과정이 수행되지 않음을 나타내고, "1"의 값은 제 2 예측 부호화 단위를 생성하는 과정이 수행되어야 함을 나타내는 소정의 인덱스(MPI_PredMode)가 생성될 수 있다.In step 2120, it is determined whether or not the current encoding unit includes an area outside the boundary of the current picture. According to the determination result, a value of "0 " indicates that the process of generating the second predictive encoding unit is not performed through post-processing, and a value of" 1 " A predetermined index (MPI_PredMode) indicative of the index value can be generated.

단계 2120의 판단 결과, 현재 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하고 있지 않은 경우, 단계 2130에서 제 1 예측 부호화 단위를 구성하는 각 픽셀과 적어도 하나의 주변 픽셀을 이용하여 각 픽셀의 픽셀값을 변경함으로써 제 2 예측 부호화 단위를 생성한다. 전술한 후처리부(1220)의 제 1 실시예 내지 제 11 실시예에서 설명한 바와 같이, 제 1 예측 부호화 단위의 변경하고자 하는 픽셀을 중심으로 그 주변 픽셀들에 다양한 후처리 모드를 적용하여 제 1 예측 부호화 단위의 각 픽셀들의 픽셀값을 변경함으로써 제 2 예측 부호화 단위를 생성할 수 있다. 출력된 제 2 예측 부호화 단위와 현재 부호화 단위의 차이값인 레지듀얼에 대한 변환, 양자화 및 엔트로피 부호화 과정이 수행되어 비트스트림이 생성된다. 생성된 비트스트림의 소정 영역에는 제 2 예측 부호화 단위를 생성하는데 이용된 후처리 모드 정보를 부가함으로써 복호화 장치에서 현재 복호화 단위에 대한 제 2 예측 부호화 단위를 생성할 수 있도록 한다.If it is determined in step 2120 that the current encoding unit does not include an area out of the bounds of the current picture, in step 2130, using each pixel constituting the first predictive encoding unit and at least one neighboring pixel, And generates a second predictive encoding unit by changing the value. As described in the first to eleventh embodiments of the post-processing unit 1220, by applying various post-processing modes to surrounding pixels around the pixel to be changed in the first predictive encoding unit, The second predictive encoding unit can be generated by changing the pixel value of each pixel of the encoding unit. A transform, a quantization, and an entropy encoding process are performed on the residue, which is a difference between the output second predictive encoding unit and the current encoding unit, to generate a bitstream. Processing mode information used for generating the second predictive encoding unit is added to a predetermined area of the generated bitstream so that the second predictive encoding unit for the current decoding unit can be generated in the decoding apparatus.

단계 2120의 판단 결과, 현재 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하고 있는 경우, 단계 2140에서 제 2 예측 부호화 단위를 생성하지 않고 제 1 예측 부호화 단위가 현재 부호화 단위의 예측 정보로 그대로 출력된다. 출력된 제 1 예측 부호화 단위와 현재 부호화 단위의 차이값인 레지듀얼에 대한 변환, 양자화 및 엔트로피 부호화 과정이 수행되어 비트스트림이 생성된다. If it is determined in step 2120 that the current encoding unit includes an area outside the boundary of the current picture, the second predictive encoding unit is not generated in step 2140, and the first predictive encoding unit is output as prediction information of the current encoding unit do. The transform, quantization, and entropy encoding are performed on the residue, which is the difference between the output first predictive encoding unit and the current encoding unit, to generate a bitstream.

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

도 24를 참조하면, 단계 2410에서 수신된 비트스트림으로부터 복호화되는 현재 복호화 단위의 예측 모드 정보를 추출한다.Referring to FIG. 24, in step 2410, prediction mode information of the current decoding unit to be decoded is extracted from the bitstream received.

단계 2420에서, 추출된 예측 모드 정보에 따라서 현재 복호화 단위에 대한 제 1 예측 복호화 단위를 생성한다.In step 2420, a first predictive decoding unit for the current decoding unit is generated according to the extracted prediction mode information.

단계 2430에서, 현재 복호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하고 있는지 여부를 판단한다. 판단 결과에 따라서, "0"의 값은 후처리를 통해 제 2 예측 부호화 단위를 생성하는 과정이 수행되지 않음을 나타내고, "1"의 값은 제 2 예측 부호화 단위를 생성하는 과정이 수행되어야 함을 나타내는 소정의 인덱스(MPI_PredMode)가 생성될 수 있다.In step 2430, it is determined whether or not the current decoding unit includes an area outside the boundary of the current picture. According to the determination result, a value of "0 " indicates that the process of generating the second predictive encoding unit is not performed through post-processing, and a value of" 1 " A predetermined index (MPI_PredMode) indicative of the index value can be generated.

단계 2430의 판단 결과, 현재 복호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하고 있지 않은 경우에는, 단계 2440에서 제 1 예측 복호화 단위를 구성하는 각 픽셀과 각 픽셀의 주변 픽셀들을 이용하여 각 픽셀의 픽셀값을 변경하여 제 2 예측 복호화 단위를 생성한다. 전술한 후처리부(1220)의 제 1 실시예 내지 제 11 실시예에서 설명한 바와 같이, 제 1 예측 부호화 단위의 변경하고자 하는 픽셀을 중심으로 그 주변 픽셀들에 다양한 후처리 모드를 적용하여 제 1 예측 부호화 단위의 각 픽셀들의 픽셀값을 변경함으로써 제 2 예측 부호화 단위를 생성할 수 있다. If it is determined in step 2430 that the current decoding unit does not include a region out of the boundary of the current picture, in step 2440, using each pixel constituting the first predictive decoding unit and surrounding pixels of each pixel, And generates a second predictive decoding unit by changing the pixel value. As described in the first to eleventh embodiments of the post-processing unit 1220, by applying various post-processing modes to surrounding pixels around the pixel to be changed in the first predictive encoding unit, The second predictive encoding unit can be generated by changing the pixel value of each pixel of the encoding unit.

단계 2430의 판단 결과, 현재 복호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하고 있는 경우에는, 단계 2450에서 제 2 예측 복호화 단위를 생성하는 후처리 과정을 수행하지 않고 제 1 예측 복호화 단위가 현재 복호화 단위의 예측 정보로 그대로 출력된다. 출력된 제 1 예측 복호화 단위는 비트스트림으로부터 추출된 현재 복호화 단위의 레지듀얼과 가산되어 현재 복호화 단위가 복원된다.
If it is determined in step 2430 that the current decoding unit includes an area out of the boundary of the current picture, it is determined in step 2450 that the first predictive decoding unit does not perform the post-processing for generating the second predictive decoding unit, Unit prediction information. The output first predictive decoding unit is added to the residual of the current decoding unit extracted from the bitstream, and the current decoding unit is restored.

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

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

Claims (2)

비트스트림으로부터 현재 블록의 예측 모드 정보를 획득하는 단계;
상기 예측 모드 정보가 상기 현재 블록의 예측 모드가 인트라 예측 모드임을 나타낼 때, 상기 현재 블록의 이용가능한 주변 픽셀들을 이용하여 상기 현재 블록의 인트라 예측에 이용되는 주변 픽셀들을 결정하는 단계;
상기 주변 픽셀들을 이용하여 상기 현재 블록의 제 1 예측값을 획득하는 단계; 및
상기 획득된 제 1 예측값과 적어도 하나의 주변 픽셀을 이용하여 상기 현재 블록의 상측 경계 및 좌측 경계에 위치한 픽셀들의 제 2 예측값을 획득하는 단계를 포함하며,
영상은 부호화 단위의 최대 크기에 대한 정보에 기초하여 복수 개의 최대 부호화 단위들로 분할되고, 최대 부호화 단위는 분할 정보에 따라서 심도를 갖는 하나 이상의 부호화 단위들로 계층적으로 분할되며, 현재 심도의 부호화 단위는 상위 심도의 부호화 단위로부터 분할된 정사각 데이터 단위들 중 하나이며,
상기 분할 정보가 현재 심도의 분할을 나타낼 경우, 상기 현재 심도의 부호화 단위는 주변 부호화 단위들과 독립적으로 하위 심도의 부호화 단위들로 분할되며,
상기 분할 정보가 현재 심도의 비분할을 나타낼 경우, 상기 현재 심도의 부호화 단위로부터 적어도 하나의 예측 단위가 획득되며, 상기 현재 블록은 상기 적어도 하나의 예측 단위에 대응되는 것을 특징으로 하는 영상 복호화 방법.
Obtaining prediction mode information of a current block from a bitstream;
Determining neighboring pixels used for intra prediction of the current block using available neighboring pixels of the current block when the prediction mode information indicates that the prediction mode of the current block is an intra prediction mode;
Obtaining a first predicted value of the current block using the neighboring pixels; And
And obtaining a second predicted value of pixels located at an upper boundary and a left boundary of the current block using the obtained first predicted value and at least one neighboring pixel,
An image is divided into a plurality of maximum encoding units based on information on a maximum size of an encoding unit, a maximum encoding unit is hierarchically divided into one or more encoding units having depth according to the division information, Unit is one of the square data units divided from the encoding unit of the higher depth,
If the division information indicates division of the current depth, the current-depth coding unit is divided into coding units of lower depth independently of the surrounding coding units,
Wherein at least one prediction unit is obtained from the coding unit of the current depth when the division information indicates non-division of the current depth, and the current block corresponds to the at least one prediction unit.
비트스트림으로부터 현재 블록의 예측 모드 정보를 획득하는 엔트로피 디코더; 및
상기 예측 모드 정보가 상기 현재 블록의 예측 모드가 인트라 예측 모드임을 나타낼 때, 상기 현재 블록의 이용가능한 주변 픽셀들을 이용하여 상기 현재 블록의 인트라 예측에 이용되는 주변 픽셀들을 결정하고, 상기 주변 픽셀들을 이용하여 상기 현재 블록의 제 1 예측값을 획득하며, 상기 획득된 제 1 예측값과 적어도 하나의 주변 픽셀을 이용하여 상기 현재 블록의 상측 경계 및 좌측 경계에 위치한 픽셀들의 제 2 예측값을 획득하는 예측부를 포함하며,
영상은 부호화 단위의 최대 크기에 대한 정보에 기초하여 복수 개의 최대 부호화 단위들로 분할되고, 최대 부호화 단위는 분할 정보에 따라서 심도를 갖는 하나 이상의 부호화 단위들로 계층적으로 분할되며, 현재 심도의 부호화 단위는 상위 심도의 부호화 단위로부터 분할된 정사각 데이터 단위들 중 하나이며,
상기 분할 정보가 현재 심도의 분할을 나타낼 경우, 상기 현재 심도의 부호화 단위는 주변 부호화 단위들과 독립적으로 하위 심도의 부호화 단위들로 분할되며,
상기 분할 정보가 현재 심도의 비분할을 나타낼 경우, 상기 현재 심도의 부호화 단위로부터 적어도 하나의 예측 단위가 획득되며, 상기 현재 블록은 상기 적어도 하나의 예측 단위에 대응되는 것을 특징으로 하는 영상 복호화 장치.
An entropy decoder for obtaining prediction mode information of a current block from a bitstream; And
Wherein when the prediction mode information indicates that the prediction mode of the current block is an intra prediction mode, neighboring pixels used for intra prediction of the current block are determined using available neighboring pixels of the current block, And a predictor for obtaining a first predicted value of the current block and obtaining a second predicted value of pixels located at an upper boundary and a left boundary of the current block using the obtained first predicted value and at least one neighboring pixel, ,
An image is divided into a plurality of maximum encoding units based on information on a maximum size of an encoding unit, a maximum encoding unit is hierarchically divided into one or more encoding units having depth according to the division information, Unit is one of the square data units divided from the encoding unit of the higher depth,
If the division information indicates division of the current depth, the current-depth coding unit is divided into coding units of lower depth independently of the surrounding coding units,
Wherein at least one prediction unit is obtained from the coding unit of the current depth when the division information indicates non-division of the current depth, and the current block corresponds to the at least one prediction unit.
KR1020150105298A 2015-07-24 2015-07-24 Method and apparatus for decoding video KR20150092063A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020150105298A KR20150092063A (en) 2015-07-24 2015-07-24 Method and apparatus for decoding video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150105298A KR20150092063A (en) 2015-07-24 2015-07-24 Method and apparatus for decoding video

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020150052464A Division KR101683177B1 (en) 2015-04-14 2015-04-14 Method and apparatus for decoding video

Publications (1)

Publication Number Publication Date
KR20150092063A true KR20150092063A (en) 2015-08-12

Family

ID=54056682

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150105298A KR20150092063A (en) 2015-07-24 2015-07-24 Method and apparatus for decoding video

Country Status (1)

Country Link
KR (1) KR20150092063A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017200259A1 (en) * 2016-05-16 2017-11-23 삼성전자 주식회사 Video encoding method and apparatus, video decoding method and apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017200259A1 (en) * 2016-05-16 2017-11-23 삼성전자 주식회사 Video encoding method and apparatus, video decoding method and apparatus
KR20180137478A (en) * 2016-05-16 2018-12-27 삼성전자주식회사 Video encoding method and apparatus, decoding method and apparatus thereof
CN109155858A (en) * 2016-05-16 2019-01-04 三星电子株式会社 Method for video coding and equipment, video encoding/decoding method and equipment
US10805637B2 (en) 2016-05-16 2020-10-13 Samsung Electronics Co., Ltd. Video encoding method and apparatus, video decoding method and apparatus

Similar Documents

Publication Publication Date Title
KR101700358B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
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
KR101464538B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR101671935B1 (en) Method and apparatus for decoding an image
KR101649276B1 (en) Method and apparatus for decoding video
KR101699529B1 (en) Method and apparatus for decoding video
KR101703332B1 (en) Method and apparatus for decoding video
KR101677277B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR101883430B1 (en) Method and apparatus for encoding an image, and a computer readable medium
KR101725287B1 (en) Method and apparatus for decoding an image
KR101940255B1 (en) Method and apparatus for encoding video, and computer readable medium
KR101989997B1 (en) Method for decoding video, and computer readable medium
KR101824056B1 (en) Method and apparatus for decoding video
KR101607614B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101766418B1 (en) Method and apparatus for decoding video
KR20150092063A (en) Method and apparatus for decoding video
KR101700369B1 (en) Method and apparatus for decoding video
KR101606683B1 (en) Method and apparatus for image encoding, and method and apparatus for image decoding
KR101683177B1 (en) Method and apparatus for decoding video
KR101606856B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR101606855B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR101606852B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR101485463B1 (en) Method and apparatus for encoding video, and method and apparatus for decoding video
KR101775030B1 (en) Method and apparatus for decoding an image
KR20170093096A (en) Method for decoding video, and computer readable medium

Legal Events

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