KR101662739B1 - Method and apparatus for encoding and decoding coding unit of picture boundary - Google Patents

Method and apparatus for encoding and decoding coding unit of picture boundary Download PDF

Info

Publication number
KR101662739B1
KR101662739B1 KR1020140148721A KR20140148721A KR101662739B1 KR 101662739 B1 KR101662739 B1 KR 101662739B1 KR 1020140148721 A KR1020140148721 A KR 1020140148721A KR 20140148721 A KR20140148721 A KR 20140148721A KR 101662739 B1 KR101662739 B1 KR 101662739B1
Authority
KR
South Korea
Prior art keywords
unit
encoding
encoding unit
boundary
coding
Prior art date
Application number
KR1020140148721A
Other languages
Korean (ko)
Other versions
KR20140139459A (en
Inventor
천민수
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020140148721A priority Critical patent/KR101662739B1/en
Publication of KR20140139459A publication Critical patent/KR20140139459A/en
Application granted granted Critical
Publication of KR101662739B1 publication Critical patent/KR101662739B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/174Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a slice, e.g. a line of blocks or a group of blocks

Abstract

현재 픽처의 경계를 벗어난 영역을 포함하고 있는 영상 부호화 단위를 더 작은 부호화 단위로 분할하여, 현재 픽처의 경계를 벗어나지 않은 영역만 부호화하는 방법 및 장치, 이러한 부호화 방법에 의해 부호화된 영상 데이터를 복호화하는 방법 및 장치가 개시된다. A method and an apparatus for dividing an image coding unit including an area beyond the boundary of the current picture into smaller coding units and coding only an area that does not deviate from the boundary of the current picture and decoding the image data coded by this coding method A method and apparatus are disclosed.

Description

픽처 경계의 부호화 단위를 부호화, 복호화 하는 방법 및 장치{Method and apparatus for encoding and decoding coding unit of picture boundary}[0001] The present invention relates to a method and apparatus for encoding and decoding an encoding unit of a picture boundary,

본 발명은 영상 부호화, 복호화 방법 및 장치에 관한 것으로 보다 상세히는 픽처 경계의 영상 부호화 단위를 부호화, 복호화하는 방법 및 장치에 관한 것이다. BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image encoding and decoding method and apparatus, and more particularly, to a method and apparatus for encoding and decoding an image encoding unit of a picture boundary.

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

본 발명이 해결하고자 하는 기술적 과제는 픽처 경계의 부호화 단위를 부호화, 복호화하는 방법 및 장치를 제공하는데 있고, 상기 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공하는데 있다.SUMMARY OF THE INVENTION The present invention provides a method and apparatus for encoding and decoding an encoding unit of a picture boundary, and a computer-readable recording medium having recorded thereon a program for executing the method.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 영상 부호화 방법은 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단하는 단계; 상기 판단 결과에 기초해 제1 부호화 단위를 적어도 하나의 제2 부호화 단위로 분할하는 단계; 및 상기 분할 결과 생성된 적어도 하나의 제2 부호화 단위 중 상기 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위만 부호화하는 단계를 포함한다.According to an aspect of the present invention, there is provided a method of encoding an image, the method comprising: determining whether a first coding unit includes an area outside a boundary of a current picture; Dividing a first encoding unit into at least one second encoding unit based on the determination result; And encoding only a second encoding unit that is not out of bounds of the current picture among at least one second encoding unit generated as a result of the division.

본 발명에 따른 보다 바람직한 실시예에 따르면, 상기 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위의 부호화 시에 상기 제1 부호화 단위의 분할 여부를 나타내는 정보는 부호화하지 않는 것을 특징으로 한다.According to a further preferred embodiment of the present invention, the information indicating whether the first coding unit is divided is not encoded when the second coding unit which is not outside the boundary of the current picture is coded.

본 발명에 따른 보다 바람직한 실시예에 따르면, 상기 제1 부호화 단위의 심도와 상기 제2 부호화 단위의 심도는 상이하며, 상기 심도는 현재 슬라이스 또는 현재 픽처의 최대 부호화 단위에서 상기 제1 부호화 단위 및 상기 제2 부호화 단위로 단계적으로 축소된 정도를 나타내는 것을 특징으로 한다.According to a further preferred embodiment of the present invention, the depth of the first encoding unit and the depth of the second encoding unit are different from each other, and the depth of the first encoding unit and the depth of the current encoding unit of the current slice or the current picture, And a degree of stepwise reduction in the second encoding unit.

본 발명에 따른 보다 바람직한 실시예에 따르면, 상기 판단하는 단계는 상기 제1 부호화 단위의 좌측 또는 우측 경계가 상기 현재 픽처의 좌측 또는 우측 경계를 벗어나는지 판단하는 단계를 포함한다.According to a preferred embodiment of the present invention, the determining step includes determining whether the left or right boundary of the first coding unit is out of the left or right boundary of the current picture.

본 발명에 따른 보다 바람직한 실시예에 따르면, 상기 판단하는 단계는 상기 제1 부호화 단위의 상부 또는 하부 경계가 상기 현재 픽처의 상부 또는 하부 경계를 벗어나는지 판단하는 단계를 포함한다.According to a more preferred embodiment of the present invention, the determining step includes determining whether an upper or lower boundary of the first coding unit is out of an upper or lower boundary of the current picture.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 영상 복호화 방법은 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단하는 단계; 상기 판단 결과에 기초해 상기 제1 부호화 단위를 분할하여 생성된 적어도 하나의 제2 부호화 단위 중 상기 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터를 파싱하는 단계; 및 상기 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터를 복호화하는 단계를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided a method of decoding an image, the method comprising: determining whether a first coding unit includes an area outside a boundary of a current picture; Parsing data for a second encoding unit that is not out of bounds of the current picture among at least one second encoding unit generated by dividing the first encoding unit based on the determination result; And decoding the data for the second encoding unit that does not deviate from the boundary of the current picture.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 영상 부호화 장치는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단하는 판단부; 상기 판단 결과에 기초해 제1 부호화 단위를 적어도 하나의 제2 부호화 단위로 분할하는 제어부; 및 상기 분할 결과 생성된 적어도 하나의 제2 부호화 단위 중 상기 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위만 부호화하는 부호화부를 포함한다.According to an aspect of the present invention, there is provided an apparatus for encoding an image, the apparatus comprising: a determination unit determining whether a first coding unit includes an area outside a boundary of a current picture; A controller for dividing the first encoding unit into at least one second encoding unit based on the determination result; And an encoding unit encoding only a second encoding unit that is not out of bounds of the current picture among at least one second encoding unit generated as a result of the division.

상기 기술적 과제를 해결하기 위한 본 발명의 일 실시예에 따른 영상 복호화 장치는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단하는 판단부; 상기 판단 결과에 기초해 상기 제1 부호화 단위를 분할하여 생성된 적어도 하나의 제2 부호화 단위 중 상기 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터를 파싱하는 파싱부; 및 상기 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터를 복호화하는 복호화부를 포함한다.According to an aspect of the present invention, there is provided an apparatus for decoding an image, the apparatus comprising: a determination unit determining whether a first coding unit includes an area outside a boundary of a current picture; A parsing unit for parsing data for a second encoding unit that is not out of bounds of the current picture among at least one second encoding unit generated by dividing the first encoding unit based on the determination result; And a decoding unit decoding the data for the second encoding unit that does not deviate from the boundary of the current picture.

상기 기술적 과제를 해결하기 위해 본 발명의 일 실시예는 상기된 영상 부호화 방법 및 영상 복호화 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체를 제공한다. According to an aspect of the present invention, there is provided a computer-readable recording medium having recorded thereon a program for executing the image encoding method and the image decoding method.

도 1은 본 발명의 일 실시예에 따른 영상 부호화 장치를 도시한다.
도 2는 본 발명의 일 실시예에 따른 영상 복호화 장치를 도시한다.
도 3은 본 발명의 일 실시예에 따른 계층적 부호화 단위를 도시한다.
도 4는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 부호화부를 도시한다.
도 5는 본 발명의 일 실시예에 따른 부호화 단위에 기초한 영상 복호화부를 도시한다.
도 6은 본 발명의 일 실시예에 따른 최대 부호화 단위, 서브 부호화 단위 및 예측 단위를 도시한다.
도 7은 본 발명의 일 실시예에 따른, 부호화 단위 및 변환 단위를 도시한다.
도 8a 및 8b는 본 발명의 일 실시예에 따른, 부호화 단위, 예측 단위 및 주파수 변환 단위의 분할 형태를 도시한다.
도 9는 본 발명의 또 다른 실시예에 따른 영상 부호화 장치를 도시한다.
도 10a 및 10b는 본 발명의 일 실시예에 따른 픽처 경계의 부호화 단위를 도시한다.
도 11a 및 11b는 본 발명의 일 실시예에 따른 픽처 경계의 부호화 단위를 분할하는 방법을 도시한다.
도 12a 및 12b는 본 발명의 또 다른 실시예에 따른 픽처 경계의 부호화 단위 및 분할 방법을 도시한다.
도 13a 및 13b는 본 발명의 일 실시예에 따른 인트라 예측 방법을 도시한다.
도 14는 본 발명의 일 실시예에 따른 최대 부호화 단위의 인덱싱(indexing)을 도시한다.
도 15는 본 발명의 일 실시예에 따른 영상 부호화 방법을 설명하기 위한 흐름도이다.
도 16은 본 발명의 일 실시예에 또 다른 영상 복호화 장치를 도시한다.
도 17은 본 발명의 일 실시예에 따른 영상 복호화 방법을 설명하기 위한 흐름도이다.
도 18a 내지 18g는 현재 픽처의 경계를 벗어난 영역을 포함하는 2Nx2N 크기의 제1 부호화 단위의 예측 모드들을 도시한다.
도 19는 본 발명의 또 다른 실시예에 따른 영상 부호화 방법을 설명하기 위한 흐름도이다.
도 20a 및 20b는 본 발명의 또 다른 실시예에 따른 픽처 경계의 부호화 단위를 부호화하는 방법을 설명하기 위한 도면이다.
도 21은 본 발명의 또 다른 실시예에 따른 영상 복호화 방법을 설명하기 위한 흐름도이다.
도 22는 본 발명의 또 다른 실시예에 따른 영상 부호화 방법을 설명하기 위한 흐름도이다.
도 23a 및 23b는 본 발명의 또 다른 실시예에 따른 픽처 경계의 부호화 단위를 부호화하는 방법을 설명하기 위한 도면이다.
도 24는 본 발명의 또 다른 실시예에 따른 영상 복호화 방법을 설명하기 위한 흐름도이다.
1 illustrates an image encoding apparatus according to an embodiment of the present invention.
FIG. 2 illustrates 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.
FIG. 4 illustrates an image encoding unit based on an encoding unit according to an embodiment of the present invention.
FIG. 5 illustrates an image decoding unit based on an encoding unit according to an embodiment of the present invention.
FIG. 6 illustrates a maximum encoding unit, a sub-encoding unit, and a prediction unit according to an embodiment of the present invention.
7 shows an encoding unit and a conversion unit according to an embodiment of the present invention.
FIGS. 8A and 8B show a division form of an encoding unit, a prediction unit, and a frequency conversion unit according to an embodiment of the present invention.
9 illustrates an image encoding apparatus according to another embodiment of the present invention.
FIGS. 10A and 10B show coding units of picture boundaries according to an embodiment of the present invention.
11A and 11B illustrate a method of dividing an encoding unit of a picture boundary according to an embodiment of the present invention.
12A and 12B show a picture boundary coding unit and a dividing method according to another embodiment of the present invention.
13A and 13B illustrate an intra prediction method according to an embodiment of the present invention.
FIG. 14 illustrates indexing of a maximum encoding unit according to an embodiment of the present invention.
15 is a flowchart illustrating an image encoding method according to an embodiment of the present invention.
FIG. 16 illustrates still another image decoding apparatus according to an embodiment of the present invention.
17 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.
Figs. 18A to 18G show prediction modes of a first encoding unit of 2Nx2N size including an out-of-bounds area of the current picture.
FIG. 19 is a flowchart illustrating an image encoding method according to another embodiment of the present invention.
20A and 20B are views for explaining a method of encoding a picture unit boundary coding unit according to another embodiment of the present invention.
FIG. 21 is a flowchart illustrating a video decoding method according to another embodiment of the present invention.
22 is a flowchart illustrating a method of encoding an image according to another embodiment of the present invention.
FIGS. 23A and 23B are diagrams for explaining a method of coding a picture unit boundary coding unit according to another embodiment of the present invention.
24 is a flowchart illustrating a video decoding method according to another embodiment of the present invention.

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

도 1 은 본 발명의 일 실시예에 따른 영상 부호화 장치를 도시한다.1 illustrates 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)는 최대 크기의 부호화 단위인 최대 부호화 단위에 기반하여 현재 픽처 또는 현재 슬라이스를 분할할 수 있다. 현재 픽처 또는 현재 슬라이스를 적어도 하나의 최대 부호화 단위로 분할할 수 있다. The maximum coding unit division unit 110 may divide 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 can be divided into at least one maximum encoding unit.

본 발명의 일 실시예에 따르면, 최대 부호화 단위 및 심도를 이용해 부호화 단위가 표현될 수 있다. 전술한 바와 같이 최대 부호화 단위는 현재 픽처의 부호화 단위 중 크기가 가장 큰 부호화 단위를 나타내며, 심도는 부호화 단위가 계층적으로 축소된 정도를 나타낸다. 심도가 커지면서, 부호화 단위는 최대 부호화 단위로부터 최소 부호화 단위까지 축소될 수 있으며, 최대 부호화 단위의 심도는 최소 심도로 정의되고, 최소 부호화 단위의 심도는 최대 심도로 정의될 수 있다. 최대 부호화 단위는 심도가 커짐에 따라 심도별 부호화 단위의 크기는 감소하므로, k 심도의 서브 부호화 단위는 k보다 큰 심도의 복수 개의 서브 부호화 단위를 포함할 수 있다.According to an embodiment of the present invention, an encoding unit can be expressed using a maximum encoding unit and a depth. As described above, the maximum encoding unit indicates the largest encoding unit among the encoding units of the current picture, and the depth indicates the degree to which the encoding units are 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 of depth greater than k.

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

예를 들어, 바다 또는 하늘에 대한 평탄한 영역을 부호화할 때에는 부호화 단위를 크게 할수록 압축률이 향상될 수 있으나, 사람들 또는 빌딩에 대한 복잡한 영역을 부호화할 때에는 부호화 단위를 작게 할수록 압축률이 향상된다.For example, when coding a flat area with respect to the sea or sky, the compression rate can be improved by increasing the coding unit. However, when coding a complex area for people or buildings, the compression ratio is improved as the coding unit is decreased.

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

부호화 심도 결정부(120)는 최대 심도를 결정한다. 최대 심도는 R-D 코스트(Rate-Distortion Cost) 계산에 기초해 결정될 수 있다. 최대 심도는 픽처 또는 슬라이스마다 상이하게 결정되거나, 각각의 최대 부호화 단위마다 상이하게 결정될 수도 있다. 결정된 최대 심도는 부호화 정보 부호화부(140)로 출력되고, 최대 부호화 단위별 영상 데이터는 영상 데이터 부호화부(130)로 출력된다. The encoding depth determination unit 120 determines the maximum depth. The maximum depth may be determined based on the Rate-Distortion Cost calculation. The maximum depth may be determined differently for each picture or slice, or may be determined differently for each maximum encoding unit. 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.

최대 심도는 최대 부호화 단위에 포함될 수 있는 가장 작은 크기의 부호화 단위 즉, 최소 부호화 단위를 의미한다. 다시 말해, 최대 부호화 단위는 상이한 심도에 따라 상이한 크기의 서브 부호화 단위로 분할될 수 있다. 도 8a 및 8b를 참조하여 상세히 후술한다. 또한, 최대 부호화 단위에 포함된 상이한 크기의 서브 부호화 단위들은 상이한 크기의 처리 단위에 기초해 예측 또는 주파수 변환(픽셀 도메인의 값들을 주파수 도메인의 값들로 변환, 예를 들어, 이산 코사인 변환)될 수 있다. 다시 말해, 영상 부호화 장치(100)는 영상 부호화를 위한 복수의 처리 단계들을 다양한 크기 및 다양한 형태의 처리 단위에 기초해 수행할 수 있다. 영상 데이터의 부호화를 위해서는 예측, 주파수 변환, 엔트로피 부호화 등의 처리 단계를 거치는데, 모든 단계에 걸쳐서 동일한 크기의 처리 단위가 이용될 수도 있으며, 단계별로 상이한 크기의 처리 단위를 이용할 수 있다.The maximum depth means the smallest encoding unit, that is, the minimum encoding unit, which can be included in the maximum encoding unit. In other words, the maximum encoding unit may be divided into sub-encoding units of different sizes according to different depths. Will be described later in detail with reference to Figs. 8A and 8B. In addition, the sub-encoding units of different sizes included in the maximum encoding unit can be predicted or frequency transformed (values of the pixel domain can be transformed into values in the frequency domain, for example, discrete cosine transform) based on processing units of different sizes have. 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)는 소정의 부호화 단위를 예측하기 위해, 부호화 단위와 다른 처리 단위를 선택할 수 있다. For example, in order to predict a predetermined encoding unit, the image encoding device 100 may select a different encoding unit from the encoding unit.

부호화 단위의 크기가 2Nx2N(단, N은 양의 정수)인 경우, 예측을 위한 처리 단위는 2Nx2N, 2NxN, Nx2N, NxN 등일 수 있다. 다시 말해, 부호화 단위의 높이 또는 너비 중 적어도 하나를 반분하는 형태의 처리 단위를 기반으로 움직임 예측이 수행될 수도 있다. 이하, 예측의 기초가 되는 처리 단위는 '예측 단위'라 한다.If 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 processing 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)을 이용해 최대 부호화 단위에 포함된 서브 부호화 단위들을 결정할 수 있다. 다시 말해, 최대 부호화 단위가 어떠한 형태의 복수의 서브 부호화 단위로 분할되는지 결정할 수 있는데, 여기서 복수의 서브 부호화 단위는 심도에 따라 크기가 상이하다. 그런 다음, 영상 데이터 부호화부(130)는 부호화 심도 결정부(120)에서 결정된 분할 형태에 기초해 최대 부호화 단위를 부호화하여 비트스트림을 출력한다. The coding depth determiner 120 may determine sub-coding units included in the maximum coding unit using Rate-Distortion Optimization based on a Lagrangian Multiplier. In other words, it is possible to determine what type of sub-encoding unit the maximum encoding unit is divided into, wherein the plurality of sub-encoding units have different sizes depending on the depth. Then, the image data encoding unit 130 encodes the maximum encoding unit based on the division type determined by the encoding depth determination unit 120, and outputs the bit stream.

부호화 정보 부호화부(140)는 부호화 심도 결정부(120)에서 결정된 최대 부호화 단위의 부호화 모드에 대한 정보를 부호화한다. 최대 부호화 단위의 분할 형태에 대한 정보, 최대 심도에 대한 정보 및 심도별 서브 부호화 단위의 부호화 모드에 대한 정보를 부호화하여 비트스트림을 출력한다. 서브 부호화 단위의 부호화 모드에 대한 정보는 서브 부호화 단위의 예측 단위에 대한 정보, 예측 단위별 예측 모드 정보, 서브 부호화 단위의 변환 단위에 대한 정보 등을 포함할 수 있다.The encoding information encoding unit 140 encodes information on the encoding mode of the maximum encoding unit determined by the encoding depth determination unit 120. [ Information on the division type of the maximum encoding unit, information on the maximum depth, and information on the encoding mode of the sub-encoding unit by depth, and outputs the bit stream. The information on the encoding mode of the sub-encoding unit may include information on the prediction unit of the sub-encoding unit, prediction mode information per prediction unit, information on the conversion unit of the sub-encoding unit, and the like.

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

최대 부호화 단위마다 상이한 크기의 서브 부호화 단위가 존재하고, 각각의 서브 부호화 단위마다 부호화 모드에 관한 정보가 결정되어야 하므로, 하나의 최대 부호화 단위에 대해서는 적어도 하나의 부호화 모드에 관한 정보가 결정될 수 있다. There is a sub-encoding unit of a different size for each maximum encoding unit, and information on the encoding mode is determined for each sub-encoding unit, so that information on at least one encoding mode can be determined for one maximum encoding unit.

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

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

도 2 는 본 발명의 일 실시예에 따른 영상 복호화 장치를 도시한다.FIG. 2 illustrates 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)는 현재 픽처 또는 슬라이스에 대한 헤더로부터 현재 픽처 또는 슬라이스의 최대 부호화 단위에 대한 정보를 추출할 수 있다. 다시 말해, 비트스트림을 최대 부호화 단위로 분할하여, 영상 데이터 복호화부(230)가 최대 부호화 단위마다 영상 데이터를 복호화하게 한다.The image-related data acquisition unit 210 parses the bit stream 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 data obtaining unit 210 may extract information on the maximum coding unit of the current picture or slice from the header of the current picture or slice. In other words, the bitstream is divided into a maximum encoding unit, and the video data decoding unit 230 decodes the video data per 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 a maximum encoding unit, a maximum depth, a division type of the maximum encoding unit, and a coding mode of the sub-encoding unit from the header for the current picture . The information on the division type and the encoding mode is output to the video data decoding unit 230. [

최대 부호화 단위의 분할 형태에 대한 정보는 최대 부호화 단위에 포함된 심도에 따라 상이한 크기의 서브 부호화 단위에 대한 정보를 포함할 수 있다. 전술한 바와 같이 분할 형태에 대한 정보는 각각의 부호화 단위에 대해 부호화된 분할 여부를 나타내는 정보(예를 들어, 플래그 정보)일 수 있다.The information on the division type of the maximum encoding unit may include information on the sub-encoding units of different sizes depending on the depth included in the maximum encoding unit. As described above, the information on the division type may be information (e.g., flag information) indicating whether or not the division is coded for each coding unit.

부호화 모드에 관한 정보는 서브 부호화 단위별 예측 단위에 대한 정보, 예측 모드에 대한 정보 및 변환 단위에 대한 정보 등을 포함할 수 있다. The information on the encoding mode may include information on a prediction unit for each sub-encoding unit, information on a prediction mode, and information on a conversion unit.

영상 데이터 복호화부(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.

최대 부호화 단위의 분할 형태에 대한 정보에 기초하여, 영상 데이터 복호화부(230)는 최대 부호화 단위에 포함된 서브 부호화 단위를 복호화할 수 있다. 복호화 과정은 인트라 예측 및 움직임 보상을 포함하는 움직임 예측 과정, 및 주파수 역변환 과정을 포함할 수 있다.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 may perform intra prediction or inter prediction based on information on a prediction unit for each sub-coding unit and prediction mode information for prediction of a sub-coding unit. In addition, the image data decoding unit 230 can perform frequency inverse transform for each sub-encoding unit on the basis of the information on the conversion unit of the sub-encoding unit.

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

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

해상도가 높거나 데이터량이 많은 경우 압축률 향상뿐만 아니라 영상 특성을 정확히 반영하기 위해 부호화 사이즈의 최대 크기가 상대적으로 큰 것이 바람직하다. 따라서, 영상 데이터(330)에 비해, 해상도가 높은 영상 데이터(310 및 320)는 최대 부호화 단위의 크기가 64x64로 선택될 수 있다.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 size of the maximum encoding unit of the image data 310 and 320 having a higher resolution than the image data 330 can be selected to be 64x64.

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

반면, 영상 데이터(330)의 최대 심도는 2이므로, 영상 데이터(330)의 부호화 단위(335)는 장축 크기가 16인 최대 부호화 단위들로부터, 심도가 증가함에 따라 장축 크기가 8, 4인 부호화 단위들까지 포함할 수 있다. On the other hand, since the maximum depth of the image data 330 is 2, the encoding unit 335 of the image data 330 is encoded from the maximum encoding units having the major axis size of 16 to the encoding units having the major axis size of 8 and 4 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 length of 32, 16, 8, and 4 as the depth increases, Sub-encoding units. 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 finer scene.

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

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

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

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

본 발명의 일 실시예에 따른 영상 부호화 방법에 따라 부호화하기 위해, 영상 부호화부(400)의 구성 요소들인 인트라 예측부(410), 움직임 추정부(420), 움직임 보상부(425), 주파수 변환부(430), 양자화부(440), 엔트로피 부호화부(450), 역양자화부(460), 주파수 역변환부(470), 디블로킹부(480) 및 루프 필터링부(490)는 모두 최대 부호화 단위, 심도에 따른 서브 부호화 단위, 예측 단위 및 변환 단위에 기초해 영상 부호화 과정들을 처리한다. 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.

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

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

본 발명의 일 실시예에 따른 영상 복호화 방법에 따라 복호화하기 위해 영상 복호화부(400)의 구성 요소들인 파싱부(510), 엔트로피 복호화부(520), 역양자화부(530), 주파수 역변환부(540), 인트라 예측부(550), 움직임 보상부(560), 디블로킹부(570) 및 루프 필터링부(580)가 모두 최대 부호화 단위, 심도에 따른 서브 부호화 단위, 예측 단위 및 변환 단위에 기초해 영상 복호화 과정들을 처리한다. 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.

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

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

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

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

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

도 6을 참조하면, 각각의 심도별로 가로축을 따라 예측 단위의 예시들이 도시되어 있다. 즉, 심도 0의 최대 부호화 단위(610)의 예측 단위는, 크기 64x64의 부호화 단위(610)와 동일하거나 작은 크기인 크기 64x64의 예측 단위(610), 크기 64x32의 예측 단위(612), 크기 32x64의 예측 단위(614), 크기 32x32의 예측 단위(616)일 수 있다. Referring to FIG. 6, examples of prediction units along the horizontal axis are shown for each depth. That is, the prediction unit of the maximum coding unit 610 of depth 0 is a prediction unit 610 of size 64x64, a prediction unit 612 of size 64x32, and size 32x64, which are the same or smaller than the coding unit 610 of size 64x64, A prediction unit 614 of size 32x32, and a prediction unit 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 has the prediction unit 620 of the size 32x32 which is equal to or smaller than the coding unit 620 of the size 32x32, the prediction unit 622 of the size 32x16, A prediction unit 624 of size 16x16, and a prediction unit 626 of size 16x16.

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

심도 3의 크기 8x8의 부호화 단위(640)의 예측 단위는, 크기 8x8의 부호화 단위(640)와 동일하거나 작은 크기인 크기 8x8의 예측 단위(640), 크기 8x4의 예측 단위(642), 크기 4x8의 예측 단위(644), 크기 4x4의 예측 단위(646)일 수 있다. The prediction unit of the 8x8 encoding unit 640 of depth 3 has a prediction unit 640 of size 8x8, a prediction unit 642 of size 8x4, and a size of 4x8, which are the same or smaller than the encoding unit 640 of size 8x8. A prediction unit 644 of size 4x4, and a prediction unit 646 of size 4x4.

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

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

본 발명의 일 실시예에 따른 영상 부호화 장치(100) 및 영상 복호화 장치(200)는, 최대 부호화 단위 그대로 부호화하거나, 최대 부호화 단위 보다 작거나 같은 서브 부호화 단위로 최대 부호화 단위를 분할하여 부호화한다. 부호화 과정 중 주파수 변환을 위한 변환 단위의 크기는 각각의 부호화 단위보다 크지 않은 변환 단위로 선택된다. 예를 들어, 현재 부호화 단위(710)가 64x64 크기일 때, 32x32 크기의 변환 단위(720)를 이용하여 주파수 변환이 수행될 수 있다. The image encoding apparatus 100 and the image decoding apparatus 200 according to an embodiment of the present invention encode the maximum encoding unit as a unit or encode the maximum encoding unit in units of sub encoding units smaller than or equal to the maximum encoding unit. The size of a conversion unit for frequency conversion during encoding is selected as a conversion unit that is not larger than each encoding unit. For example, when the current encoding unit 710 is 64x64, the frequency conversion can be performed using the 32x32 conversion unit 720. [

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

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

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

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

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

도 8b의 우측은 최대 부호화 단위(810)에 대한 예측 단위의 분할 형태를 도시한다. The right side of FIG. 8B shows the division type of the prediction unit for the maximum coding unit 810.

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

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

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

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

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

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

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

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

도 9는 본 발명의 또 다른 실시예에 따른 영상 부호화 장치를 도시한다.9 illustrates an image encoding apparatus according to another embodiment of the present invention.

도 9를 참조하면, 본 발명의 일 실시예에 따른 영상 부호화 장치(900)는 판단부(910), 제어부(920) 및 부호화부(930)를 포함한다. 영상 부호화 장치(900)는 전술한 심도에 따라 단계적으로 크기가 바뀌는 부호화 단위, 예측 단위 및 변환 단위에 기초해 영상 부호화하는 장치일 수 있다.9, an image encoding apparatus 900 according to an exemplary embodiment of the present invention includes a determination unit 910, a control unit 920, and an encoding unit 930. Referring to FIG. The image encoding apparatus 900 may be an apparatus for encoding an image based on an encoding unit, a prediction unit, and a conversion unit that are gradually changed in size according to the depth described above.

판단부(910)는 부호화를 위해 영상 부호화 장치(900)에 입력된 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단한다. The determination unit 910 determines whether the first encoding unit input to the image encoding apparatus 900 for encoding includes an area outside the boundary of the current picture.

영상 부호화 장치(900)는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하지 않는 경우, 제1 부호화 단위를 그대로 부호화한다. 제1 부호화 단위를 분할하지 않고, 예측하고, 주파수 변환(예를 들어, 이산 코사인 변환)할 수도 있고, 제1 부호화 단위를 도 2, 6, 8a 및 8b와 관련하여 전술한 바와 같이 소정의 심도에 따라 복수의 부호화 단위로 분할한 다음, 예측하고, 주파수 변환할 수도 있다.If the first encoding unit does not include an area outside the boundary of the current picture, the image encoding device 900 codes the first encoding unit as it is. The first encoding unit may be predicted and not subjected to frequency division (for example, discrete cosine transform), and the first encoding unit may be divided into a predetermined depth as described above with reference to FIGS. 2, 6, 8A, And then frequency conversion may be performed.

그러나, 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는 경우에는 제1 부호화 단위를 분할하여 적어도 하나의 제2 부호화 단위를 생성한 다음, 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위만 부호화한다. However, if the first encoding unit includes an area outside the boundary of the current picture, the first encoding unit is divided to generate at least one second encoding unit, and then only the second encoding unit that does not deviate from the boundary of the current picture .

다시 말해, 영상 부호화 장치(900)는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 여부에 따라 상이한 부호화 방법을 이용해 제1 부호화 단위를 부호화하는 바, 판단부(910)는 우선 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단한다. 도 10a 및 10b를 참조하여 후술한다. In other words, the image encoding apparatus 900 encodes the first encoding unit using a different encoding method depending on whether the first encoding unit includes an area outside the boundary of the current picture, and the determination unit 910 encodes the first encoding unit 1 < / RTI > coding unit includes an area outside the boundary of the current picture. Will be described later with reference to Figs. 10A and 10B.

도 10a 및 10b는 본 발명의 일 실시예에 따른 픽처 경계의 부호화 단위를 도시한다. FIGS. 10A and 10B show coding units of picture boundaries according to an embodiment of the present invention.

도 10a 및 10b를 참조하면, 제1 부호화 단위(1020)는 현재 픽처의 경계(1010)에 걸쳐있다. 현재 픽처의 크기가 최대 부호화 단위의 크기의 배수가 아닌 경우, 예를 들어, 최대 부호화 단위의 크기를 32x32로 설정하여 현재 픽처를 부호화하는데 현재 픽처의 가로 또는 세로의 크기가 32의 배수가 아닌 경우에는 최대 부호화 단위가 현재 픽처의 경계(1010)를 벗어난 영역(1024)을 포함할 수 있다. 마찬가지로 도 10b와 같이 제1 부호화 단위(1040)가 현재 픽처의 경계(1030)를 벗어난 영역(1044)을 포함할 수 있다. 도 10a에서 현재 픽처의 경계(1010)의 좌측은 현재 픽처의 내부 영역이고, 우측은 현재 픽처의 외부 영역이며, 도 10b에서 현재 픽처의 경계(1030)의 상부는 현재 픽처의 내부 영역이고, 하부는 현재 픽처의 외부 영역이다. Referring to FIGS. 10A and 10B, the first coding unit 1020 spans the boundary 1010 of the current picture. If the size of the current picture is not a multiple of the size of the maximum encoding unit, for example, the size of the maximum encoding unit is set to 32x32 to encode the current picture. If the size of the current picture is not a multiple of 32 The maximum encoding unit may include an area 1024 outside the boundary 1010 of the current picture. Similarly, as shown in FIG. 10B, the first coding unit 1040 may include an area 1044 outside the boundary 1030 of the current picture. In FIG. 10A, the left side of the boundary 1010 of the current picture is the inner area of the current picture, the right side is the outer area of the current picture, the upper part of the boundary 1030 of the current picture is the inner area of the current picture, Is the outer area of the current picture.

도 10a 및 10b는 제1 부호화 단위(1020 또는 1040)가 현재 픽처의 우측 경계 및 하부 경계에 걸쳐있는 경우를 도시하였으나, 제1 부호화 단위(1020 또는 1040)가 현재 픽처의 좌측 경계 및 상부 경계에 걸쳐있는 경우도 있을 수 있다.10A and 10B show a case where the first coding unit 1020 or 1040 spans the right boundary and the lower boundary of the current picture. However, when the first coding unit 1020 or 1040 is located at the left boundary and the upper boundary of the current picture There may be cases in which it is spread.

판단부(910)는 도 10a 및 10b에 도시된 바와 같이 제1 부호화 단위(1020 또는 1040)가 현재 픽처의 경계(1010 또는 1030)를 벗어난 영역을 포함하고 있는지 여부를 판단하기 위해 제1 부호화 단위(1020 또는 1040)의 경계를 현재 픽처의 경계와 비교한다. 10A and 10B, the determination unit 910 determines whether or not the first coding unit 1020 or 1040 includes an area outside the boundary 1010 or 1030 of the current picture, (1020 or 1040) with the boundary of the current picture.

제1 부호화 단위(1020)의 우측 경계가 현재 픽처의 우측 경계를 벗어나거나, 좌측 경계가 현재 픽처의 좌측 경계를 벗어나면, 제1 부호화 단위(1020)는 현재 픽처의 경계(1010)를 벗어난 영역을 포함하고 있는 것으로 판단할 수 있다. 또한, 제1 부호화 단위(1040)의 하부 경계가 현재 픽처의 하부 경계를 벗어나거나, 상부 경계가 현재 픽처의 상부 경계를 벗어나면, 제1 부호화 단위(1040)가 현재 픽처의 경계(1030)를 벗어난 영역을 포함하고 있는 것으로 판단할 수 있다.If the right boundary of the first coding unit 1020 is out of the right boundary of the current picture or the left boundary is out of the left boundary of the current picture, the first coding unit 1020 is located outside the boundary 1010 of the current picture As shown in FIG. If the lower boundary of the first coding unit 1040 is out of the lower boundary of the current picture or the upper boundary is out of the upper boundary of the current picture, then the first coding unit 1040 is positioned at the boundary 1030 of the current picture It can be judged that it includes an area deviated from the center.

다시 도 9를 참조하면, 판단부(910)에서 제1 부호화 단위(1020 또는 1040)가 현재 픽처의 경계를 벗어난 영역을 포함하고 있는 것으로 판단하면, 제어부(920)는 제1 부호화 단위(1020 또는 1040)를 적어도 하나의 제2 부호화 단위로 분할한다. 9, when the determination unit 910 determines that the first coding unit 1020 or 1040 includes an area outside the boundary of the current picture, the controller 920 determines whether the first coding unit 1020 or 1040 1040) into at least one second encoding unit.

본원 발명의 일 실시예에 따른 영상 부호화 장치(900)는 전술한 계층적인 부호화 단위를 이용해 영상을 부호화, 복호화할 수 있다. 최대 부호화 단위를 소정 심도의 서브 부호화 단위들로 나누어 영상을 부호화, 복호화할 수 있다. 이 때 심도는 최대 부호화 단위에서 소정 서브 부호화 단위로 단계적으로 축소된 정도를 나타낸다. The image encoding apparatus 900 according to an embodiment of the present invention can encode and decode an image using the hierarchical encoding unit. The maximum encoding unit can be divided into sub-encoding units having a predetermined depth to encode and decode an image. At this time, the depth indicates the degree of stepwise reduction from the maximum encoding unit to the predetermined sub-encoding unit.

제어부(920)는 이러한 심도에 따라 제1 부호화 단위(1020)를 적어도 하나의 제2 부호화 단위로 분할한다. 예를 들어, 제1 부호화 단위(1020)가 심도 0의 최대 부호화 단위인 경우, 적어도 하나의 심도 1의 부호화 단위로 제1 부호화 단위(1020)를 분할할 수 있다. 또한, 심도 1의 부호화 단위보다 심도가 큰 부호화 단위, 즉 심도가 2 이상인 부호화 단위로 제1 부호화 단위(1020)를 분할할 수도 있다. 도 11a 및 11b를 참조하여 상세히 설명한다. The controller 920 divides the first coding unit 1020 into at least one second coding unit according to the depth. For example, if the first encoding unit 1020 is the maximum encoding unit of depth 0, the first encoding unit 1020 can be divided into at least one depth 1 encoding unit. In addition, the first encoding unit 1020 may be divided into an encoding unit having a depth greater than that of the depth 1, i.e., an encoding unit having a depth of 2 or more. Will be described in detail with reference to Figs. 11A and 11B.

도 11a 및 11b는 본 발명의 일 실시예에 따른 픽처 경계의 부호화 단위를 분할하는 방법을 도시한다. 11A and 11B illustrate a method of dividing an encoding unit of a picture boundary according to an embodiment of the present invention.

도 11a는 도 10a에 도시된 제1 부호화 단위(1020)가 적어도 하나의 제2 부호화 단위(1110 내지 1140)로 분할되는 경우를 도시한다. 도 10a와 관련하여 전술한 바와 같이 제1 부호화 단위(1020)가 픽처 경계에 걸쳐있는 경우 제1 부호화 단위(1020)는 현재 픽처의 경계를 벗어난 영역(1024)을 포함한다. 11A shows a case where the first coding unit 1020 shown in FIG. 10A is divided into at least one second coding unit 1110 to 1140. FIG. As described above with reference to FIG. 10A, when the first coding unit 1020 extends over the picture boundary, the first coding unit 1020 includes an area 1024 that is out of bounds of the current picture.

제1 부호화 단위(1020)를 상이한 심도의 적어도 하나의 제2 부호화 단위(1110 내지 1140)로 분할하여 현재 픽처의 경계를 벗어나지 않은 영역에 대한 제2 부호화 단위(1110 내지 1120)와 현재 픽처의 경계를 벗어난 영역에 대한 제2 부호화 단위(1130 내지 1140)로 구분한다.The first coding unit 1020 is divided into at least one second coding unit 1110 to 1140 having different depths to divide the second coding units 1110 to 1120 and the boundary between the current picture 1110 and 1120, And the second encoding unit 1130 to 1140 for the area out of the second encoding unit.

도 11b는 도 10b에 도시된 제1 부호화 단위(1040)가 적어도 하나의 제2 부호화 단위(1150 내지 1180)로 분할되는 경우를 도시한다.FIG. 11B shows a case where the first coding unit 1040 shown in FIG. 10B is divided into at least one second coding unit 1150 to 1180.

제1 부호화 단위(1040)를 상이한 심도의 적어도 하나의 제2 부호화 단위(1150 내지 1180)로 분할하여 현재 픽처의 경계를 벗어나지 않은 영역에 대한 제2 부호화 단위(1150 내지 1160)와 현재 픽처의 경계를 벗어난 영역에 대한 제2 부호화 단위(1170 내지 1180)로 구분한다.The first coding unit 1040 is divided into at least one second coding unit 1150 to 1180 having different depths so that the second coding units 1150 to 1160 and the boundary between the current picture and the current picture And second encoding units 1170 to 1180 for an area outside the frame.

도 11a 및 11b는 제1 부호화 단위(1020 또는 1040)를 동일한 크기의 4개의 제2 부호화 단위로 분할하면, 경계를 벗어나지 않은 영역에 대한 제2 부호화 단위와 경계를 벗어난 영역에 대한 제2 부호화 단위를 구분할 수 있는 경우를 도시하였다. 그러나, 제1 부호화 단위(1020 또는 1040)를 동일한 크기의 4개의 제2 부호화 단위로 분할하여도, 경계를 벗어나지 않은 영역에 대한 제2 부호화 단위와 경계를 벗어난 영역에 대한 제2 부호화 단위를 구분할 수 없는 경우가 있다. 도 12a 및 12b를 참조하여 상세히 설명한다. 11A and 11B illustrate a case where the first encoding unit 1020 or 1040 is divided into four second encoding units of the same size and the second encoding unit for an area which is not out of bounds and the second encoding unit Can be distinguished from each other. However, even if the first encoding unit 1020 or 1040 is divided into four second encoding units of the same size, the second encoding unit for the region that does not deviate from the boundary and the second encoding unit for the region outside the border are classified There is a case that can not be. Will be described in detail with reference to Figs. 12A and 12B.

도 12a 및 12b는 본 발명의 또 다른 실시예에 따른 픽처 경계의 부호화 단위 및 분할 방법을 도시한다.12A and 12B show a picture boundary coding unit and a dividing method according to another embodiment of the present invention.

도 12a에 도시된 바와 같이 제1 부호화 단위(1220)가 픽처 경계에 위치하는 경우, 제1 부호화 단위(1220)를 제2 부호화 단위(1230 내지 1260)로 분할하여도 현재 픽처의 경계를 벗어난 제2 부호화 단위와 경계를 벗어나지 않은 제2 부호화 단위를 구분할 수 없다. 일부 제2 부호화 단위(1250 및 1260)가 여전히 경계를 벗어난 영역과 경계를 벗어나지 않은 영역을 포함하고 있기 때문이다. 12A, when the first coding unit 1220 is located at the picture boundary, even if the first coding unit 1220 is divided into the second coding units 1230 to 1260, 2 encoding unit and a second encoding unit that does not deviate from the boundary can not be distinguished. Since some of the second encoding units 1250 and 1260 still include an out-of-bounds region and an out-of-bounds region.

따라서, 분할 부는 도 12a에 도시된 바와 같이 제1 부호화 단위(1220)가 경계에 위치하는 경우, 제1 부호화 단위(1220)를 반복적으로 분할한다. 도 12a에 도시된 실시예에서는 제2 부호화 단위(1250 및 1260)를 한번 더 분할하여 제3 부호화 단위(1252 내지 1258, 1262 내지 1268)를 생성한다. Therefore, the dividing unit repeatedly divides the first encoding unit 1220 when the first encoding unit 1220 is located at the boundary, as shown in FIG. 12A. In the embodiment shown in FIG. 12A, the second encoding units 1250 and 1260 are further divided to generate the third encoding units 1252 to 1258 and 1262 to 1268.

제2 부호화 단위(1250 및 1260)를 더 작은 크기의 제3 부호화 단위로 한번 더 분할함으로써, 경계를 벗어나지 않은 부호화 단위(1230, 1240, 1252, 1254, 1262 및 1264)와 경계를 벗어난 부호화 단위(1256, 1258, 1266 및 1268)를 구분할 수 있다. By dividing the second encoding units 1250 and 1260 into a third encoding unit of smaller size, encoding units 1230, 1240, 1252, 1254, 1262 and 1264 that are not out of bounds and encoding units 1256, 1258, 1266 and 1268).

다시 도 9를 참조하면, 제어부(920)가 도 11a, 11b 및 12b에 도시된 바와 같이 제1 부호화 단위(1020, 1040 또는 1220)를 분할하여, 경계를 벗어난 영역과 경계를 벗어나지 않은 영역을 구분하면, 부호화부(930)는 제1 부호화 단위를 분할하여 생성된 적어도 하나의 부호화 단위 중 현재 픽처의 경계를 벗어나지 않은 부호화 단위만 부호화한다. Referring again to FIG. 9, the controller 920 divides the first encoding unit 1020, 1040, or 1220 as shown in FIGS. 11A, 11B, and 12B to divide an area out of bounds and an area not out of bounds , The encoding unit 930 encodes only an encoding unit that does not deviate from the boundary of the current picture among at least one encoding unit generated by dividing the first encoding unit.

제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하지 않은 경우에는 제1 부호화 단위를 전부를 부호화한다. 제1 부호화 단위를 분할하지 않고, 예측하고, 주파수 변환(예를 들어, 이산 코사인 변환)할 수도 있고, 제1 부호화 단위를 도 2, 6, 8a 및 8b와 관련하여 전술한 바와 같이 소정의 심도에 따라 복수의 부호화 단위로 분할한 다음, 예측하고, 주파수 변환할 수도 있다.If the first coding unit does not include a region out of bounds of the current picture, the first coding unit is entirely coded. The first encoding unit may be predicted and not subjected to frequency division (for example, discrete cosine transform), and the first encoding unit may be divided into a predetermined depth as described above with reference to FIGS. 2, 6, 8A, And then frequency conversion may be performed.

그러나, 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는 경우에는 제어부(920)의 분할 결과에 따라, 경계를 벗어나지 않은 영역의 픽셀 값들만 부호화한다. However, if the first encoding unit includes an area outside the boundary of the current picture, only the pixel values of the area that does not deviate from the boundary are encoded according to the division result of the controller 920.

도 11a에 도시된 실시예에서 좌측에 위치한 제2 부호화 단위(1110 및 1120)를 부호화하고, 도 11b에 도시된 실시예에서 상부에 위치한 제2 부호화 단위(1150 및 1160)를 부호화한다. 도 12b에 도시된 예에서는 좌측에 위치한 제2 부호화 단위(1230 및 1240)와 좌측에 위치한 제3 부호화 단위(1252, 1254, 1262 및 1264)를 부호화한다. 경계를 벗어나지 않은 부호화 단위를 소정의 예측 단위에 기초해 예측하고, 예측 결과 생성되는 레지듀얼 값들을 소정의 변환 단위에 기초해 주파수 변환한다.In the embodiment shown in FIG. 11A, the second encoding units 1110 and 1120 located on the left side are encoded, and the second encoding units 1150 and 1160 located on the upper side in the embodiment shown in FIG. 11B are encoded. In the example shown in FIG. 12B, the second coding units 1230 and 1240 located on the left side and the third coding units 1252, 1254, 1262 and 1264 located on the left side are coded. Predicts encoding units that are not out of bounds based on a predetermined prediction unit, and frequency-converts the residual values generated as a result of prediction, based on a predetermined conversion unit.

본원 발명의 일 실시예에 따른 영상 부호화 장치(900)는 픽처 경계에 위치한 제1 부호화 단위 중 경계를 벗어나지 않은 픽셀 값들만 부호화할 수 있으므로, 경계를 벗어난 불필요한 픽셀 값들의 부호화에 따른 압축률 저하를 방지할 수 있다.Since the image encoding apparatus 900 according to an embodiment of the present invention can encode only pixel values that are not out of bounds among the first encoding units located at the picture boundary, it is possible to prevent the compression rate from being lowered due to encoding of unnecessary pixel values out of bounds can do.

또한, 부호화부(930)의 전술한 분할 여부에 대한 정보(예를 들어, 분할 여부를 나타내는 플래그 정보)도 선택적으로 부호화할 수 있다. 제1 부호화 단위가 픽처 경계에 걸쳐있는 경우 제1 부호화 단위는 제어부(920)에 의해 분할된다. 경계를 벗어나지 않은 영역의 픽셀 값들만 부호화하기 위해 분할은 필수적이므로, 제1 부호화 단위에 대해서는 분할 여부에 대한 정보를 부호화할 필요가 없다. 분할 여부에 대한 정보를 따로 부호화하지 않아도, 복호화하는 측에서 제1 부호화 단위가 분할되는 것을 알 수 있기 때문이다.
In addition, information on the above-described division of the encoding unit 930 (e.g., flag information indicating whether or not to divide) can be selectively encoded. If the first coding unit spans the picture boundary, the first coding unit is divided by the control unit 920. Since division is essential to encode only pixel values of an area that does not deviate from the boundary, it is not necessary to encode information about division in the first encoding unit. This is because it is possible to know that the first encoding unit is divided on the decoding side even if the information on division is not separately encoded.

*그러나, 전술한 영상 부호화 방법에 따라 부호화부(930)가 현재 픽처의 경계를 벗어난 영역의 픽셀 값들을 부호화하지 않기 때문에 경계에 걸쳐있는 제1 부호화 단위가 다른 부호화 단위의 예측에 이용되지 못하는 경우가 발생할 수 있다. 도 13a 및 13b를 참조해 상세히 설명한다. However, since the encoding unit 930 does not encode the pixel values of the area outside the boundary of the current picture according to the above-described image encoding method, if the first encoding unit spanning the boundary can not be used for prediction of another encoding unit May occur. Will be described in detail with reference to Figs. 13A and 13B.

도 13a 및 13b는 본 발명의 일 실시예에 따른 인트라 예측 방법을 도시한다.13A and 13B illustrate an intra prediction method according to an embodiment of the present invention.

도 13a를 참조하면, 본 발명의 일 실시예에 따른 인트라 예측 방법은 소정의 예측 단위(1310)를 인트라 예측함에 있어, 이전에 부호화된 인접한 픽셀 값들(1320)을 이용할 수 있다. 특히, 본 발명의 일 실시에에 따른 인트라 예측은 예측 단위(1310)의 좌측 하부의 새로 방향으로 'PuSize'만큼의 픽셀들을 더 이용할 수도 있다.
Referring to FIG. 13A, an intra prediction method according to an embodiment of the present invention may use previously coded neighboring pixel values 1320 in intra-prediction of a predetermined prediction unit 1310. FIG. In particular, the intra prediction according to an embodiment of the present invention may further use pixels of the 'PuSize' in the lower left direction of the prediction unit 1310.

*본 발명에 따른 영상 부호화 방법은 도 8a에 도시된 바와 같이 계층적인 부호화 단위를 이용해 영상을 부호화한다. 따라서, 예측 단위(1310)의 좌측은 물론 좌측 하부에 인접한 픽셀들을 이용해 인트라 예측을 수행할 수 있다. 예를 들어, 도 8a의 부호화 단위(830)를 인트라 예측할 때, 부호화 단위(830)의 상부 및 우측 상부에 인접한 픽셀 즉, 부호화 단위(812)에 포함된 픽셀들은 물론, 부호화 단위(830)의 좌측 및 좌측 하부에 인접한 픽셀 즉, 부호화 단위(828)에 포함된 픽셀들을 이용해 인트라 예측을 수행할 수 있다.The image encoding method according to the present invention encodes an image using a hierarchical encoding unit as shown in FIG. 8A. Accordingly, intraprediction can be performed using pixels adjacent to the left and lower left of the prediction unit 1310 as well. For example, when intraprediction of the coding unit 830 of FIG. 8A is performed, pixels included in the upper and right upper parts of the coding unit 830, that is, the pixels included in the coding unit 812, It is possible to perform intra prediction using pixels adjacent to the left and lower left sides, that is, pixels included in the coding unit 828. [

그런데, 우측 상부 및 좌측 하부에 인접한 픽셀들이 이용 가능하지 않은 경우가 있을 수 있다. 도 13b에 도시된 바와 같이 부호화 단위(1330)를 부호화 할 때, 우측 상부에 인접한 픽셀 값들 중 일부 픽셀 값들(1346)을 이용할 수 없다. 우측 상부에 위치한 부호화 단위(1340)를 부호화할 때, 현재 픽처의 경계(1350)를 벗어난 영역의 부호화 단위(1344)는 부호화하지 않기 때문이다. 따라서, 부호화 단위(1330)의 인트라 예측에 이용할 수 있는 인접한 픽셀들은 상부, 좌측 및 좌측 하부의 픽셀들뿐이다.However, there may be cases where pixels adjacent to the upper right and lower left are not available. When encoding the encoding unit 1330 as shown in FIG. 13B, some pixel values 1346 of the pixel values adjacent to the upper right can not be used. The coding unit 1344 in the area outside the boundary 1350 of the current picture is not coded when coding the coding unit 1340 located in the upper right corner. Thus, adjacent pixels that are available for intra prediction of the encoding unit 1330 are only the upper, left and lower left pixels.

부호화부(130)는 우측 상부에 인접한 픽셀들을 이용할 수 있는지 여부를 판단하기 위해 'cux+cuSize+cuSize'가 전술한 'Frame_width'보다 큰지 판단한다. 'cux'는 부호화 단위(1330)의 좌측 경계의 X 좌표이고, 'cuSize'는 부호화 단위(1330)의 가로 및 세로 크기이며, 'Frame_width'는 혁재 픽처의 가로 크기이다.The encoding unit 130 determines whether 'cux + cuSize + cuSize' is larger than the above-described 'Frame_width' in order to determine whether or not pixels adjacent to the upper right portion can be used. 'cux' is the X coordinate of the left boundary of the coding unit 1330, 'cuSize' is the horizontal and vertical size of the coding unit 1330, and 'Frame_width' is the horizontal size of the defective picture.

또한, 부호화부(130)는 좌측 하부에 인접한 픽셀들을 이용할 수 있는지 여부를 판단하기 위해 'cuy+cuSize+cuSize'가 전술한 'Frame_height'보다 큰지 판단한다. 'cux'는 부호화 단위(1330)의 좌측 경계의 X 좌표이고, 'cuSize'는 부호화 단위(1330)의 가로 및 세로 크기이며, 'Frame_height'는 현재 픽처의 세로 크기이다.In addition, the encoding unit 130 determines whether 'cuy + cuSize + cuSize' is larger than 'Frame_height' in order to determine whether or not the pixels adjacent to the lower left corner can be used. 'cux' is the X coordinate of the left boundary of the coding unit 1330, 'cuSize' is the horizontal and vertical size of the coding unit 1330, and 'Frame_height' is the vertical size of the current picture.

부호화부(130)는 제1 부호화 단위가 경계를 벗어난 영역을 포함하는지 여부에 기초해 부호화 방법에 대한 정보, 즉 부호화 모드에 대한 정보를 보다 효율적으로 부호화할 수 있다. 제1 부호화 단위가 경계를 벗어난 영역을 포함하는 경우, 제1 부호화 모드가 다른 부호화 모드인 제2 부호화 모드를 의미하도록 부호화 모드에 대한 정보를 부호화할 수 있다.The encoding unit 130 can more efficiently encode information on the encoding method, that is, information on the encoding mode, based on whether the first encoding unit includes an out-of-bound area. If the first encoding unit includes an out-of-bounds region, information on the encoding mode may be encoded so that the first encoding mode is a second encoding mode, which is another encoding mode.

도 18a 내지 18g를 참조하여 제1 부호화 단위의 예측 모드에 대한 정보를 부호화하는 경우를 예로 들어 설명한다.
18A to 18G, information on the prediction mode of the first coding unit is coded as an example.

*도 18a 내지 18g는 현재 픽처의 경계를 벗어난 영역을 포함하는 2Nx2N 크기의 제1 부호화 단위의 예측 모드들을 도시한다. 도 18a 내지 18h에서 빗금친 영역이 현재 픽처의 경계를 벗어난 영역이다.18A to 18G show prediction modes of a first encoding unit of 2Nx2N size including an out-of-bounds area of a current picture. In Figs. 18A to 18H, the hatched area is an area outside the boundary of the current picture.

도 18a를 참조하면, 2Nx2N의 제1 부호화 단위의 우측 Nx2N 영역이 경계를 벗어난 영역이다. 부호화부(930)가 도 18a의 제1 부호화 단위의 부호화함에 있어, 2Nx2N 크기의 예측 모드로 선택하여도 경계를 벗어난 영역은 예측을 수행하지 않으므로, Nx2N 예측 모드로 예측을 수행한다. Referring to FIG. 18A, the Nx2N area on the right side of the first encoding unit of 2Nx2N is an area outside the boundary. In encoding the first encoding unit of FIG. 18A, the encoding unit 930 performs prediction in the Nx2N prediction mode because the region outside the boundary does not perform prediction even if the prediction mode is selected to be 2Nx2N.

다시 말해, 부호화부(930)가 제1 부호화 단위의 예측 모드에 대한 정보를 2Nx2N 예측 모드로 설정하여도 Nx2N 예측 모드로 설정하는 경우와 동일하게 예측이 수행된다. 따라서, Nx2N 예측 모드를 별도로 설정할 필요가 없으며, 2Nx2N 예측 모드에 대한 정보를 Nx2N 예측 모드에 대한 정보로서 이용할 있다. 이는 예측 모드의 종류가 줄어드는 효과와 동일하며, 이에 따라 부호화부(930)가 예측 모드에 대한 정보를 부호화하기 위해 필요한 비트 수를 줄일 수 있다.In other words, even when the encoding unit 930 sets the information on the prediction mode of the first encoding unit to the 2Nx2N prediction mode, the prediction is performed in the same manner as when the encoding unit 930 is set to the Nx2N prediction mode. Therefore, there is no need to separately set the Nx2N prediction mode, and information on the 2Nx2N prediction mode can be used as information on the Nx2N prediction mode. This is the same as the effect of reducing the type of the prediction mode, and accordingly, the number of bits required for encoding the information on the prediction mode by the encoding unit 930 can be reduced.

마찬가지로 도 18b에서도 부호화부(930)는 제1 부호화 단위의 예측 모드를 2Nx2N 예측 모드로 설정하는 것으로 2NxN 예측 모드를 대신할 수 있다. Similarly, in FIG. 18B, the encoding unit 930 can replace the 2NxN prediction mode by setting the prediction mode of the first encoding unit to the 2Nx2N prediction mode.

도 18c에서 부호화부(930)는 제1 부호화 단위의 예측 모드를 2Nx2N 예측 모드로 설정하여 2NxN/2 예측 모드를 대신할 수 있다. 도 18b와 비교하면 도 18c에서는 예측되는 영역의 세로 크기가 1/2로 감소하였다. 그러나, 제1 부호화 단위에서 경계를 벗어나지 않은 영역만 예측하는 것은 도 18b와 동일하므로 제1 부호화 단위의 예측 모드를 2Nx2N 예측 모드로 설정하여 2NxN/2 예측 모드를 대신할 수 있다.In FIG. 18C, the encoding unit 930 can replace the 2NxN / 2 prediction mode by setting the prediction mode of the first encoding unit to the 2Nx2N prediction mode. Compared with FIG. 18B, the vertical size of the predicted area is reduced to 1/2 in FIG. 18C. However, since prediction of only an area not deviated from the boundary in the first coding unit is the same as that of FIG. 18B, the 2NxN / 2 prediction mode can be substituted for the 2Nx2N prediction mode by setting the prediction mode of the first coding unit to 2Nx2N prediction mode.

도 18d에서 부호화부(930)는 제1 부호화 단위의 예측 모드를 NxN 예측 모드로 설정하여 2NxN 예측 모드를 대신할 수 있다. 도 18d의 제1 부호화 단위가 2NxN 예측 모드로 예측되고, 제1 부호화 단위의 우측 반이 경계를 벗어난 영역에 포함된 경우 NxN 예측 모드와 동일하게 NxN 크기로 예측이 수행된다. 따라서, NxN 예측 모드로서 2NxN 예측 모드를 대신할 수 있다.In FIG. 18D, the encoding unit 930 can replace the 2NxN prediction mode by setting the prediction mode of the first encoding unit to the NxN prediction mode. If the first encoding unit in FIG. 18D is predicted to be in the 2NxN prediction mode and the right half of the first encoding unit is included in the out-of-bounds region, the prediction is performed in the NxN size as in the NxN prediction mode. Therefore, the 2NxN prediction mode can be substituted for the NxN prediction mode.

도 18e에서 부호화부(930)는 제1 부호화 단위의 예측 모드를 2NxN 예측 모드로 설정하여 2NxN/2 예측 모드를 대신할 수 있다. 도 18b와 비교하면 세로 크기가 1/2로 감소된 두 개의 예측 단위에 기초해 예측을 수행한다. 따라서, 도 18b에 따라 설정된 2Nx2N 예측 모드에서 세로 크기에 대한 부분만 1/2로 감소시킨 2NxN 예측 모드로 제1 부호화 단위의 예측 모드를 설정할 수 있다.In FIG. 18E, the encoding unit 930 can replace the 2NxN / 2 prediction mode by setting the prediction mode of the first encoding unit to the 2NxN prediction mode. Compared with FIG. 18B, prediction is performed based on two prediction units whose vertical size is reduced to 1/2. Therefore, in the 2Nx2N prediction mode set according to FIG. 18B, the prediction mode of the first encoding unit can be set to the 2NxN prediction mode in which only the portion of the vertical size is reduced to 1/2.

도 18f에서 부호화부(930)는 제1 부호화 단위의 예측 모드를 2Nx2N 예측 모드로 설정하여 NxN 예측 모드를 대신할 수 있다. 도 18f의 제1 부호화 단위도 도 18a, 18b 및 18c와 마찬가지로 제1 부호화 단위에서 경계를 벗어나지 않은 영역만 예측한다. 따라서, 제1 부호화 단위의 예측 모드를 2Nx2N 예측 모드로 설정하여 NxN 예측 모드를 대신할 수 있다.In FIG. 18F, the encoding unit 930 can replace the NxN prediction mode by setting the prediction mode of the first encoding unit to the 2Nx2N prediction mode. The first coding unit in Fig. 18F predicts only the area not deviated from the boundary in the first coding unit as in Figs. 18A, 18B and 18C. Therefore, the prediction mode of the first encoding unit can be set to the 2Nx2N prediction mode to replace the NxN prediction mode.

도 18g에서 부호화부(930)는 제1 부호화 단위의 예측 모드를 Nx2N 예측 모드로 설정하여 N/2xN 예측 모드를 대신할 수 있다. 도 18f와 비교하면 가로 크기가 1/2로 감소된 두 개의 예측 단위에 기초해 예측을 수행한다. 따라서, 도 18b에 따라 설정된 2Nx2N 예측 모드에서 가로 부분을 1/2로 감소시킨 Nx2N 예측 모드로 제1 부호화 단위의 예측 모드를 설정할 수 있다.In FIG. 18G, the encoding unit 930 can replace the N / 2xN prediction mode by setting the prediction mode of the first encoding unit to the Nx2N prediction mode. Compared with FIG. 18F, prediction is performed based on two prediction units whose horizontal size is reduced to 1/2. Therefore, the prediction mode of the first encoding unit can be set to the Nx2N prediction mode in which the horizontal part is reduced to 1/2 in the 2Nx2N prediction mode set according to FIG. 18B.

도 9 내지 13와 관련하여 전술한, 영상 부호화 장치(900)의 부호화 과정은 다음과 같은 프로그래밍 코드에 의해 구현될 수 있다.
The encoding process of the image encoding apparatus 900 described above with reference to FIGS. 9 to 13 can be implemented by the following programming codes.

UInt uiLPelX UInt uiLPelX

UInt uiRPelX UInt uiRPelX

UInt uiTPelY UInt uiTPelY

UInt uiBPelY UInt uiBPelY

if( !(( uiRPelX < pcCU->getSlice()->getWidth() ) && ( uiBPelY < pcCU->getSlice()->getHeight() ) ))getSlice () -> getWidth ()) && (uiBPelY <pcCU-> getSlice () -> getHeight ())))

{{

go_next_depth_process();   go_next_depth_process ();

}
}

상기 프로그래밍 코드를 참조하면, 함수 'UInt uiLPeLX', 'UInt uiRPeLX', 'UInt uiTPeLY' 및 'UInt uiBPeLY'를 이용해 제1 부호화 단위의 왼쪽 X 좌표, 오른쪽 X 좌표, 상부 Y 좌표 및 하부 Y 좌표를 얻고, 'pcCU->getSlice()->getWidth()' 및 'uiBPelY < pcCU->getSlice()->getHeight()'를 이용해 현재 픽처의 가로 크기 및 현재 픽처의 세로 크기를 얻는다. Referring to the programming code, a left X coordinate, a right X coordinate, an upper Y coordinate, and a lower Y coordinate of the first coding unit are calculated using the functions 'UInt uiLPeLX', 'UInt uiRPeLX', 'UInt uiTPeLY', and 'UInt uiBPeLY' And get the horizontal size of the current picture and the vertical size of the current picture using 'pcCU-> getSlice () -> getWidth ()' and 'uiBPelY <pcCU-> getSlice () -> getHeight ()'.

그런 다음, 제1 부호화 단위의 왼쪽 X 좌표와 현재 픽처의 가로 크기를 비교하고, 제1 부호화 단위의 하부 Y 좌표와 현재 픽처의 세로 크기를 비교한다. 제1 부호화 단위의 왼쪽 X 좌표가 현재 픽처의 가로 크기보다 크거나, 제1 부호화 단위의 하부 Y 좌표가 세로 크기보다 큰 경우에는 'go_next_depth_process()' 함수를 호출하여 다음 심도 즉 제1 부호화 단위의 심도 'k'보다 큰 심도 'k+1'의 제2 부호화 단위로 제1 부호화 단위를 분할하고, 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위만 부호화한다.Then, the left X coordinate of the first coding unit is compared with the horizontal size of the current picture, and the lower Y coordinate of the first coding unit is compared with the vertical size of the current picture. If the left X coordinate of the first coding unit is larger than the horizontal size of the current picture or the lower Y coordinate of the first coding unit is larger than the vertical size, the 'go_next_depth_process ()' function is called to set the next depth, The first encoding unit is divided into a second encoding unit of depth 'k + 1' that is greater than depth 'k', and only the second encoding unit that is not out of bounds of the current picture is encoded.

그러나, 영상 부호화 장치(900)가 도 9 내지 13에 도시된 바와 같이 현재 픽처의 경계를 벗어나지 않은 영역만 부호화하는 경우에도, 최대 부호화 단위의 주소는 경계를 벗어난 영역도 부호화된 것으로 가정하여 설정된다. 도 14를 참조하여 상세히 설명한다. However, even when the image encoding apparatus 900 encodes only an area not deviated from the boundary of the current picture as shown in FIGS. 9 to 13, the address of the maximum encoding unit is set assuming that an area outside the boundary is also coded . Will be described in detail with reference to FIG.

도 14는 본 발명의 일 실시예에 따른 최대 부호화 단위의 인덱싱(indexing)을 도시한다. FIG. 14 illustrates indexing of a maximum encoding unit according to an embodiment of the present invention.

도 14를 참조하면, 현재 픽처(1410)를 소정 크기의 최대 부호화 단위로 분할하여 부호화할 때, 현재 픽처의 넓이 'Frame_width' 및 높이 'Frame_height'가 최대 부호화 단위의 가로 크기의 배수가 아니라면, 도 14과 같이 현재 픽처(1310)의 오른쪽 경계 및 하부 경계에 최대 부호화 단위들이 걸쳐있게 된다. Referring to FIG. 14, when the current picture 1410 is divided into a maximum coding unit of a predetermined size and coded, if the width 'Frame_width' and height 'Frame_height' of the current picture are not a multiple of the horizontal size of the maximum coding unit, The maximum coding units are spread over the right boundary and the lower boundary of the current picture 1310 as shown in FIG.

도 9 내지 13에서 본원 발명의 영상 부호화 장치(900)는 경계에 걸쳐있는 최대 부호화 단위를 부호화함에 있어, 현재 픽처의 경계를 벗어나지 않은 영역만 부호화한다. 그러나, 최대 부호화 단위의 주소를 설정할 때에는 'Frame_width' 및 'Frame_height'가 아닌 'Frame_widthN' 및 'Frame_heightN'을 기준으로 최대 부호화 단위의 주소를 설정한다. 다시 말해, 현재 픽처의 오른쪽 경계 및 하부 경계에 걸쳐있는 최대 부호화 단위에도 주소를 부가하여 최대 부호화 단위의 주소를 설정한다. 9 to 13, the image encoding apparatus 900 of the present invention encodes the maximum encoding unit spanning the boundary, and encodes only the region not exceeding the boundary of the current picture. However, when setting the address of the maximum encoding unit, the address of the maximum encoding unit is set based on 'Frame_widthN' and 'Frame_heightN' instead of 'Frame_width' and 'Frame_height'. In other words, an address is added to the maximum encoding unit that spans the right boundary and the lower boundary of the current picture to set the address of the maximum encoding unit.

예를 들어, 첫째 행의 가장 오른쪽에 위치한 최대 부호화 단위는 현재 픽처의 오른쪽 경계에 걸쳐있어, 경계를 벗어나지 않은 영역만 부호화되지만, 주소로서 'P' 부가되며, 따라서, 두 번째 행의 가장 왼쪽에 위치한 최대 부호화 단위의 주소는 'P+1'이 된다.'Frame_widthN' 및 'Frame_heightN'은 다음과 같이 계산될 수 있다.
For example, the largest coding unit located at the rightmost position of the first row is located at the right border of the current picture, and only the region not bounded by the boundary is coded, but the address is added with 'P' The address of the maximum encoding unit located is 'P + 1'. 'Frame_widthN' and 'Frame_heightN' can be calculated as follows.

If Frame_width%LcuSize not equal to 0,If Frame_width% LcuSize not equal to 0,

Frame_widthN = (Frame_width/LcuSize+1)*LcuSize  Frame_widthN = (Frame_width / LcuSize + 1) * LcuSize

If Frame_height%LcuSize not equal to 0,If Frame_height% LcuSize not equal to 0,

Frame_heightN = (Frame_height/LcuSize+1)*LcuSize
Frame_heightN = (Frame_height / LcuSize + 1) * LcuSize

상기 계산식에서 'Frame_width%LcuSize'는 'Frame_width'를 'LcuSize'로 나눈 나머지를 의미하고, 'Frame_height%LcuSize'는 'Frame_height'를 'LcuSize'로 나눈 나머지를 의미한다. 'Frame_width/LcuSize'는 'Frame_width'를 'LcuSize'로 나눈 몫을 의미하고, 'Frame_height/LcuSize'는 'Frame_height'를 'LcuSize'로 나눈 몫을 의미한다. 'LcuSize'는 최대 부호화 단위가 정사각형일 때, 최대 부호화 단위의 가로 및 세로의 크기를 의미한다.'Frame_width% LcuSize' means a remainder obtained by dividing 'Frame_width' by 'LcuSize', and 'Frame_height% LcuSize' means a remainder obtained by dividing 'Frame_height' by 'LcuSize'. 'Frame_width / LcuSize' means a quotient obtained by dividing 'Frame_width' by 'LcuSize', and 'Frame_height / LcuSize' means a quotient obtained by dividing 'Frame_height' by 'LcuSize'. 'LcuSize' means the width and height of the largest encoding unit when the maximum encoding unit is square.

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

도 15를 참조하면, 단계 1510에서 영상 부호화 장치(900)는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단한다. 도 10a, 10b 및 12a와 같이 제1 부호화 단위가 픽처 경계에 걸쳐있어, 경계를 벗어난 영역을 포함하는지 판단한다. 경계를 벗어난 영역을 포함하는지 판단하기 위해 현재 픽처의 경계와 제1 부호화 단위의 경계를 비교한다. 제1 부호화 단위의 좌측 또는 우측 경계가 현재 픽처의 좌측 또는 우측 경계를 벗어나는지 판단하거나, 제1 부호화 단위의 상부 또는 하부 경계가 현재 픽처의 상부 또는 하부 경계를 벗어나는지 판단한다. Referring to FIG. 15, in step 1510, the image encoding apparatus 900 determines whether the first encoding unit includes an area outside the boundary of the current picture. 10A, 10B and 12A, it is determined whether or not the first coding unit spans the picture boundary and includes an area outside the boundary. The boundary of the current picture and the boundary of the first encoding unit are compared with each other to determine whether the boundary includes an area outside the boundary. It is determined whether the left or right boundary of the first coding unit is out of the left or right boundary of the current picture or whether the upper or lower boundary of the first coding unit is out of the upper or lower boundary of the current picture.

단계 1520에서 영상 부호화 장치(900)는 단계 1510에서의 판단 결과에 기초해 제1 부호화 단위를 적어도 하나의 제2 부호화 단위로 분할한다. 제1 부호화 단위의 심도 'k'보다 큰 심도 'k+1'의 제2 부호화 단위로 제1 부호화 단위를 분할할 수 있다. 제2 부호화 단위로 분할하였으나, 제2 부호화 단위가 또 다시 픽처 경계를 벗어난 영역을 포함하는 것으로 판단되면, 분할을 반복하여 분할 결과 생성된 부호화 단위가 픽처 경계를 벗어난 영역을 포함하지 않을 때까지 제1 부호화 단위를 분할한다. In operation 1520, the image encoding apparatus 900 divides the first encoding unit into at least one second encoding unit based on the determination result in operation 1510. The first encoding unit can be divided into a second encoding unit of depth 'k + 1' that is larger than the depth 'k' of the first encoding unit. If it is determined that the second coding unit further includes the area out of the picture boundary, the decoding is repeated until the coding unit generated as a result of division does not include the area outside the picture boundary. Divide one encoding unit.

단계 1530에서 영상 부호화 장치(900)는 단계 1520에서의 분할 결과 생성된 적어도 하나의 제2 부호화 단위 중에서 픽처 경계를 벗어나지 않은 제2 부호화 단위만 선택적으로 부호화한다. 제2 부호화 단위를 예측하여, 레지듀얼 값들을 생성하고, 생성된 레지듀얼 값들을 주파수 변환, 양자화, 엔트로피 부호화한다. 또한, 영상 부호화 장치(900)는 픽처 경계에 걸쳐있는 제1 부호화 단위의 분할은 필수적이므로, 제1 부호화 단위에 대해서는 분할 여부를 나타내는 정보를 부호화하지 않을 수 있다. In step 1530, the image encoding apparatus 900 selectively encodes only the second encoding unit that does not deviate from the picture boundary among the at least one second encoding unit generated as a result of the division in step 1520. Predicts the second encoding unit, generates residual values, and frequency transforms, quantizes, and entropy-encodes the generated residual values. Also, since the image coding apparatus 900 is required to divide the first coding unit spanning the picture boundary, information indicating whether or not to divide the first coding unit may not be coded.

또한, 도 18a 내지 18g와 관련하여 전술한 바와 같이 영상 부호화 장치(900)는 제1 부호화 단위가 경계를 벗어난 영역을 포함하지는 여부에 기초해 부호화 모드에 대한 정보를 부호화할 수 있다.In addition, as described above with reference to FIGS. 18A to 18G, the image encoding apparatus 900 can encode information on the encoding mode based on whether the first encoding unit includes an out-of-bounds region.

도 16은 본 발명의 일 실시예에 또 다른 영상 복호화 장치를 도시한다. FIG. 16 illustrates still another image decoding apparatus according to an embodiment of the present invention.

도 16을 참조하면, 본 발명의 일 실시예에 따른 영상 복호화 장치(1600)는 판단부(1610), 파싱부(1610) 및 복호화부(1620)를 포함한다. 16, an image decoding apparatus 1600 according to an exemplary embodiment of the present invention includes a determination unit 1610, a parser 1610, and a decoding unit 1620.

판단부(1610)는 복호화하려는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단한다. 이전에 복호화된 부호화 단위에 기초해 복호화하려는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역인지 판단할 수 있다. 예를 들어, 도 14에 도시된 실시예에서는 바로 이전에 복호화된 부호화 단위가 'P-1' 부호화 단위인 경우, 복호화하려는 제1 부호화 단위는 현재 픽처의 경계에 걸쳐있어, 경계를 벗어난 영역을 포함하고 있는 것으로 판단할 수 있다. The determination unit 1610 determines whether the first encoding unit to be decoded includes an area outside the boundary of the current picture. It can be determined whether the first encoding unit to be decoded based on the previously decoded encoding unit is an area outside the boundary of the current picture. For example, in the embodiment shown in FIG. 14, when the immediately previous encoding unit is a 'P-1' encoding unit, the first encoding unit to be decoded covers the boundary of the current picture, As shown in FIG.

다시 말해, 현재 복호화되는 제1 부호화 단위의 좌측 또는 우측 경계가 현재 픽처의 좌측 또는 우측 경계를 벗어나는지 판단하거나, 제1 부호화 단위의 상부 또는 하부 경계가 현재 픽처의 상부 또는 하부 경계를 벗어나는지 판단하여, 복호화하려는 제1 부호화 단위가 현재 픽처의 경계에 걸쳐있는지 판단한다. In other words, it is determined whether the left or right boundary of the first coding unit to be currently decoded is out of the left or right boundary of the current picture or whether the upper or lower boundary of the first coding unit is out of the upper or lower boundary of the current picture And judges whether the first coding unit to be decoded is over the boundary of the current picture.

파싱부(1610)는 영상 비트스트림을 수신하고, 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는 것으로 판단되면, 제1 부호화 단위를 분할하여 생성된 적어도 하나의 제2 부호화 단위 중 픽처 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터만 파싱한다. 제2 부호화 단위의 심도는 제1 부호화 단위의 심도 'k'보다 큰 심도 'k+1'의 부호화 단위일 수 있다. 또한, 제1 부호화 단위가 픽처 경계를 벗어난 영역을 포함하지 않는 것으로 판단되면, 제1 부호화 단위에 대한 데이터 전부를 파싱한다. The parsing unit 1610 receives an image bitstream and, if it is determined that the first encoding unit includes an area out of bounds of the current picture, converts the picture of at least one second encoding unit generated by dividing the first encoding unit And parses only the data for the second encoding unit that is not out of bounds. The depth of the second encoding unit may be the encoding unit of the depth 'k + 1' which is larger than the depth 'k' of the first encoding unit. Also, if it is determined that the first encoding unit does not include a region outside the picture boundary, all of the data for the first encoding unit is parsed.

제1 부호화 단위가 픽처 경계를 벗어난 영역을 포함하는 것으로 판단되어, 픽처 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터만 파싱하는 경우, 제1 부호화 단위의 분할 여부에 대한 정보(예를 들어, 플래그 정보)를 파싱하지 않을 수 있다. 픽처 경계에 걸쳐있는 제1 부호화 단위의 분할이 필수적이어서, 분할 여부에 대한 정보를 부호화하지 않은 경우에는 파싱할 정보도 없으나, 분할 여부에 대한 정보가 부호화된 경우에도 분할 여부에 대한 정보를 파싱하지 않을 수 있다. When parsing only the data of the second encoding unit that is not out of the picture boundary and the first encoding unit is judged to include an area outside the picture boundary, information on whether or not the first encoding unit is divided (for example, Information) may not be parsed. It is necessary to divide the first coding unit spanning the picture boundary. If information on division is not coded, there is no information to be parsed. However, even if information on division is coded, .

또한, 분할 여부에 대한 정보를 파싱한 경우에도 제1 부호화 단위를 분할하여 생성된 제2 부호화 단위 중 픽처 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터만 파싱한다. In addition, even when information on division is parsed, only the second coding unit generated by dividing the first coding unit is parsed for only the second coding unit that does not deviate from the picture boundary.

복호화부(1630)는 파싱부(1620)에서 파싱된 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위에 데이터를 복호화한다. 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터를 엔트로피 복호화, 역양자화, 역주파수 변환(예를 들어, 역이산 코사인 변환)하여 레지듀얼 값들을 복원하고, 제2 부호화 단위를 인트라 또는 인터 예측하여 생성된 예측 값과 복원된 레지듀얼 값들을 가산하여 제2 부호화 단위를 복원한다. The decoding unit 1630 decodes the data in the second encoding unit that is not out of bounds of the current picture parsed by the parsing unit 1620. Reconstructs residual values by entropy decoding, inverse quantization, and inverse frequency transform (e.g., inverse discrete cosine transform) on the data of the second encoding unit that is not out of bounds, and generates the second encoding unit by intra or inter prediction And restores the second encoding unit by adding the predicted value and the restored residual values.

복호화 시에 이용하는 부호화 단위의 주소를 설정하는 방법은 도 14에 도시된 바와 동일하며, 복호화 과정에서 인트라 예측을 위해 이용할 수 있는 인접한 픽셀들도 도 13a 및 13b에 도시된 바와 같다. The method of setting the address of the encoding unit used for decoding is the same as that shown in FIG. 14, and neighboring pixels that can be used for intra prediction in the decoding process are as shown in FIGS. 13A and 13B.

복호화부(1630)가 복호화 시에 이용하는 제1 부호화 단위의 부호화 모드에 대한 정보는 도 18a 내지 18g와 관련하여 전술한 바와 같이 경계를 벗어난 영역을 포함하는지 여부에 기초해 부호화된 부호화 모드에 대한 정보일 수 있다.The information on the encoding mode of the first encoding unit used by the decoding unit 1630 for decoding is information on the encoding mode encoded based on whether or not the region includes an out-of-bound region as described above with reference to Figs. 18A to 18G Lt; / RTI &gt;

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

도 17을 참조하면, 단계 1710에서 영상 복호화 장치(1600)는 복호화하려는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단한다. 이전에 복호화된 부호화 단위를 참조하여 제1 부호화 단위의 우측 또는 좌측 경계가 현재 픽처의 우측 또는 좌측 경계를 벗어나는지 판단하거나, 제1 부호화 단위의 상부 또는 하부 경계가 현재 픽처의 상부 또는 하부 경계를 벗어나는지 판단한다. Referring to FIG. 17, in step 1710, the image decoding apparatus 1600 determines whether the first encoding unit to be decoded includes an area outside the boundary of the current picture. It is determined whether the right or left boundary of the first coding unit is out of the right or left boundary of the current picture by referring to the previously decoded coding unit or the upper or lower boundary of the first coding unit is determined as the upper or lower boundary of the current picture Judge whether or not to depart.

단계 1720에서 영상 복호화 장치(1600)는 단계 1710의 판단 결과에 기초해 제1 부호화 단위를 분할하여 생성된 적어도 하나의 제2 부호화 단위 중 픽처 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터를 파싱한다. 단계 1710에서 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하고 있는 것으로 판단된 경우, 제1 부호화 단위를 분할하여 생성된 제2 부호화 단위 중 픽처 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터를 파싱한다. 전술한 바와 같이 제2 부호화 단위는 제1 부호화 단위의 심도 'k'보다 큰 심도 'k+1'의 부호화 단위 일 수 있다. In step 1720, the image decoding apparatus 1600 parses the data of the second encoding unit which is not out of the picture boundary among the at least one second encoding unit generated by dividing the first encoding unit based on the determination result of step 1710 . If it is determined in step 1710 that the first coding unit includes an area out of bounds of the current picture, data for the second coding unit that does not deviate from the picture boundary among the second coding units generated by dividing the first coding unit &Lt; / RTI &gt; As described above, the second coding unit may be a coding unit of the depth 'k + 1' which is larger than the depth 'k' of the first coding unit.

단계 1730에서 영상 복호화 장치(1600)는 단계 1720에서 파싱된 현재 픽처의 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터만 복호화한다. 픽처 경계를 벗어나지 않은 제2 부호화 단위에 대한 데이터를 엔트로피 복호화, 역양자화, 역주파수 변환하여 레지듀얼 값들을 복원하고, 예측 결과 생성된 예측 값들과 가산하여 제2 부호화 단위를 복원한다. In step 1730, the image decoding apparatus 1600 decodes only the data for the second encoding unit which is not out of bounds of the current picture parsed in step 1720. Restores the residual values by entropy decoding, inverse quantization, and inverse frequency transform of the data for the second coding unit which does not deviate from the picture boundary, and adds the predicted values to the predicted values to restore the second coding unit.

영상 복호화 장치(1600)가 복호화 시에 이용하는 제1 부호화 단위의 부호화 모드에 대한 정보는 도 18a 내지 18g와 관련하여 전술한 바와 같이 경계를 벗어난 영역을 포함하는지 여부에 기초해 부호화된 정보일 수 있다.The information on the encoding mode of the first encoding unit used by the video decoding apparatus 1600 in decoding may be information encoded based on whether or not the region includes an out-of-bound area as described above with reference to Figs. 18A to 18G .

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

도 19를 참조하면, 단계 1910에서 영상 부호화 장치(900)는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단한다.Referring to FIG. 19, in operation 1910, the image encoding apparatus 900 determines whether the first encoding unit includes an area outside the boundary of the current picture.

단계 1920에서 영상 부호화 장치(900)는 단계 1910에서의 판단 결과에 기초해 제1 부호화 단위를 적어도 하나의 제2 부호화 단위로 분할한다. 제1 부호화 단위의 심도 'k'보다 큰 심도 'k+1'의 제2 부호화 단위로 제1 부호화 단위를 분할할 수 있다.In operation 1920, the image encoding apparatus 900 divides the first encoding unit into at least one second encoding unit based on the determination result in operation 1910. The first encoding unit can be divided into a second encoding unit of depth 'k + 1' that is larger than the depth 'k' of the first encoding unit.

단계 1930에서 영상 부호화 장치는 단계 1920의 분할 결과 생성된 적어도 하나의 제2 부호화 단위의 경계를 벗어난 영역을 소정의 값들로 패딩한다. 도 20a 및 20b를 참조하여 상세히 설명한다. In step 1930, the image encoding apparatus pads the region outside the boundary of the at least one second encoding unit generated as a result of the division in step 1920 with predetermined values. Will be described in detail with reference to FIGS. 20A and 20B.

도 20a 및 20b는 본 발명의 또 다른 실시예에 따른 픽처 경계의 부호화 단위를 부호화하는 방법을 설명하기 위한 도면이다.20A and 20B are views for explaining a method of encoding a picture unit boundary coding unit according to another embodiment of the present invention.

영상 부호화 장치(900)의 판단부(910)가 제1 부호화 단위(2020)가 픽처의 경계에 걸쳐있는 것으로 판단하면, 제어부(920)는 제1 부호화 단위(2020)를 더 작은 크기 즉, 더 큰 심도의 제2 부호화 단위로 분할한다. 그러나, 제2 부호화 단위가 최소 부호화 단위인 경우에는 제어부(920)가 더 작은 크기의 부호화 단위로 제2 부호화 단위를 분할할 수 없고, 더 이상 분할할 수 없기 때문에 경계를 벗어난 영역과 벗어나지 않은 영역이 부호화 단위에 따라 구분되지 않는다.If the determination unit 910 of the image encoding apparatus 900 determines that the first encoding unit 2020 extends over the boundaries of the pictures, the controller 920 converts the first encoding unit 2020 into a smaller size, And divides into second encoding units having a large depth. However, if the second coding unit is the minimum coding unit, the controller 920 can not divide the second coding unit into smaller coding units and can not divide the second coding unit any more. Therefore, It is not distinguished according to the encoding unit.

따라서, 부호화부(930)는 제2 부호화 단위(2024 및 2028) 중 경계(2010)를 벗어난 영역을 도 20b에 도시된 바와 같이 패딩한다. 현재 픽처의 경계(2010)를 벗어난 영역의 픽셀 값들을 모두 '0'으로 설정하거나, 경계를 벗어난 영역의 픽셀 값들을 인접한 경계를 벗어나지 않은 영역의 픽셀 값들과 동일하게 설정한다.Therefore, the encoding unit 930 paddes an area of the second encoding units 2024 and 2028 outside the boundary 2010 as shown in FIG. 20B. The pixel values of the region outside the boundary 2010 of the current picture are all set to '0', or the pixel values of the region outside the boundary are set to be the same as the pixel values of the region not outside the adjacent boundary.

다시 도 19를 참조하면, 단계 1940에서 영상 부호화 장치(900)는 단계 1930에서 패딩된 영역을 포함하는 적어도 하나의 제2 부호화 단위를 부호화한다.Referring again to FIG. 19, in operation 1940, the image encoding apparatus 900 encodes at least one second encoding unit including the padded region in operation 1930.

영상 부호화 장치(900)의 부호화부(930)는 제2 부호화 단위들(2022 내지 2028)을 예측하여 레지듀얼 값들을 생성하고, 생성된 레지듀얼 값들을 주파수 변환한다. 주파수 변환하여 생성된 주파수 변환 계수들을 양자화하고 엔트로피 부호화하여 제2 부호화 단위들(2022 내지 2028)을 부호화한다.The encoding unit 930 of the image encoding apparatus 900 generates residual values by predicting the second encoding units 2022 to 2028, and frequency-converts the generated residual values. Quantizes the frequency transform coefficients generated by the frequency transform, and entropy-codes the frequency transform coefficients to encode the second encoding units 2022 to 2028.

경계(2010)에 걸친 제2 부호화 단위들(2024 및 2028)를 예측함에 있어, 제2 부호화 단위 전체를 예측할 수도 있고, 경계를 벗어나지 않은 영역만 예측할 수도 있다. 예를 들어, 경계(2010)에 걸친 제2 부호화 단위(2024)가 8x8인 경우, 경계를 벗어난 영역을 포함하는 8x8 크기로 예측할 수도 있고, 경계를 벗어난 영역을 제외한 4x8 크기로 예측할 수도 있다.In predicting the second encoding units 2024 and 2028 over the boundary 2010, the entire second encoding unit may be predicted, or only the region that is not out of bounds may be predicted. For example, if the second coding unit 2024 over the boundary 2010 is 8x8, the prediction may be performed with an 8x8 size including an out-of-bounds region, or a 4x8 size excluding an out-of-bounds region.

또한, 경계(2010)에 걸친 제2 부호화 단위들(2024 및 2028)을 주파수 변환함에 있어, 제2 부호화 단위 전체를 주파수 변환할 수도 있고, 경계를 벗어나지 않은 영역만 주파수 변환할 수도 있다. In frequency conversion of the second coding units 2024 and 2028 over the boundary 2010, the entire second coding unit may be frequency-converted, or the frequency may be frequency-converted only in a region not out of bounds.

예를 들어, 경계(2010)에 걸친 최소 부호화 단위(2024)가 8x8인 경우, 경계를 벗어난 영역을 포함하는 8x8 크기로 주파수 변환을 수행할 수도 있다. 주파수 경계를 벗어난 영역도 예측된 경우 경계를 벗어난 영역도 레지듀얼 값들을 포함하므로, 제2 부호화 단위의 크기로 주파수 변환을 수행할 수 있다. 경계를 벗어난 영역이 예측되지 않아 레지듀얼 값들이 없는 경우에는 경계를 벗어난 영역을 임의의 레지듀얼 값(예를 들어, ‘0’)으로 설정하고, 제2 부호화 단위의 크기로 주파수 변환을 수행할 수 있다. 예측 여부와 무관하게 경계를 벗어난 영역의 레지듀얼 값들은 의미가 없으므로, 주파수 변환에 가장 높은 효율을 보이는 임의의 값으로 경계를 벗어난 영역의 레지듀얼 값들을 설정하고 주파수 변환을 수행할 수도 있다.For example, if the minimum coding unit 2024 across the boundary 2010 is 8x8, frequency conversion may be performed to an 8x8 size including an out-of-bounds region. If a region outside the frequency boundary is also predicted, the region outside the boundary also includes residual values, so that frequency conversion can be performed to the size of the second coding unit. If the region outside the boundary is not predicted and there are no residual values, the region outside the boundary is set to an arbitrary residual value (for example, '0'), and frequency conversion is performed to the size of the second coding unit . Regardless of the prediction, the residual values of the out-of-bounds region are meaningless. Therefore, it is possible to set the residual values of the out-of-bounds region and perform the frequency conversion to an arbitrary value showing the highest efficiency in frequency conversion.

또한, 부호화부(930)는 경계를 벗어난 영역을 제외한 4x8 크기로 주파수 변환을 수행할 수도 있다. 전술한 바와 같이 본원 발명에 따르면, 부호화 단위, 예측 단위 및 변환 단위의 크기가 각각 독립적으로 결정될 수 있으므로, 최소 부호화 단위보다 작은 크기의 변환 단위를 이용해 경계를 벗어나지 않은 영역만 선택적으로 주파수 변환할 수 있다.단계 1940에서 제2 부호화 단위의 부호화와 함께 부호화부(930)는 도 18a 및 18g와 관련하여 전술한 바와 같이 제2 부호화 단위가 경계를 벗어난 영역을 포함하는지 여부에 기초해 부호화 모드에 대한 정보를 부호화할 수도 있다.In addition, the encoding unit 930 may perform frequency conversion to a size of 4x8 except for an area outside the boundary. As described above, according to the present invention, since the sizes of the encoding unit, the prediction unit, and the conversion unit can be independently determined, only a region that does not deviate from the boundary can be selectively frequency-converted using a conversion unit smaller than the minimum encoding unit In step 1940, the encoding unit 930, together with the encoding of the second encoding unit, determines whether or not the second encoding unit includes an out-of-bound region as described above with reference to FIGS. 18A and 18G. Information may be encoded.

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

도 21을 참조하면, 단계 2110에서 영상 복호화 장치(1600)의 판단부(1610)는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단한다.Referring to FIG. 21, in step 2110, the determination unit 1610 of the video decoding apparatus 1600 determines whether the first coding unit includes an area outside the boundary of the current picture.

단계 2120에서 영상 복호화 장치(1600)의 파싱부(1620)는 단계 2110의 판단 결과에 기초해 제1 부호화 단위를 분할하여 생성된 적어도 하나의 제2 부호화 단위 중 패딩된 영역을 포함하는 적어도 하나의 제2 부호화 단위에 대한 데이터를 파싱한다. 도 20a에 도시된 바와 같이 제2 부호화 단위가 최소 부호화 단위이고, 경계에 걸쳐있는 경우 제2 부호화 단위의 일부 영역은 현재 픽처의 경계를 벗어난 영역이다. 이러한 영역은 도 19와 관련하여 전술한 바와 같이 소정의 값으로 패딩될 수 있는 바, 영상 복호화 장치의 파싱부(1620)는 이러한 패딩된 영역을 포함하는 적어도 하나의 제2 부호화 단위에 대한 데이터를 파싱한다.In step 2120, the parsing unit 1620 of the image decoding apparatus 1600 determines whether at least one of the at least one second encoding unit generated by dividing the first encoding unit based on the determination result of step 2110 And parses the data for the second encoding unit. As shown in FIG. 20A, if the second encoding unit is the minimum encoding unit and extends over the boundary, a part of the second encoding unit is an area outside the boundary of the current picture. This area can be padded with a predetermined value as described above with reference to FIG. 19, so that the parsing unit 1620 of the image decoding apparatus decodes the data for at least one second encoding unit including the padded area Parses.

단계 2130에서 영상 복호화 장치(1600)의 복호화부(1630)는 단계 2120에서 파싱된 제2 부호화 단위에 대한 데이터에 기초해 제2 부호화 단위를 복호화한다. 파싱된 제2 부호화 단위에 대한 데이터를 엔트로피 복호화, 역양자화, 역주파수 변환하여 레지듀얼 값들을 복원하고, 예측 결과 생성된 예측 값들과 가산하여 제2 부호화 단위를 복원한다. 도 18a 및 18g와 관련하여 전술한 바와 같이 제2 부호화 단위가 경계를 벗어난 영역을 포함하는지 여부에 기초해 부호화된 부호화 모드에 대한 정보를 복호화하고, 복호화된 부호화 모드에 대한 정보에 따라 제2 부호화 단위를 복호화할 수 있다.In step 2130, the decoding unit 1630 of the image decoding apparatus 1600 decodes the second encoding unit based on the data for the second encoding unit parsed in step 2120. Restores the residual values by entropy decoding, inverse quantization, and inverse frequency transform of the data for the parsed second encoding unit, and adds the predicted values to the predicted values to restore the second encoding unit. As described above with reference to FIGS. 18A and 18G, information on an encoding mode encoded based on whether or not the second encoding unit includes an out-of-bounds area is decoded, and a second encoding process is performed according to information on the decoded encoding mode The unit can be decoded.

도 19와 관련하여 전술한 주파수 변환과 같이 역주파수 변환도 제2 부호화 단위 전체를 역주파수 변환할 수도 있고, 경계를 벗어나지 않은 영역만 역주파수 변환할 수도 있다. 또한, 예측을 수행함에 있어서도 제2 부호화 단위 전체를 예측할 수도 있고, 경계를 벗어나지 않은 영역만 예측할 수도 있다.As with the frequency transform described above with reference to FIG. 19, the inverse frequency transform may perform the inverse frequency transform of the entire second encoding unit, or may perform the inverse frequency transform only of the areas not out of bounds. Also, in performing the prediction, the entire second encoding unit may be predicted, or only the region that is not out of bounds may be predicted.

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

도 22를 참조하면, 단계 2210에서 영상 부호화 장치(900)의 판단부(910)는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단한다.Referring to FIG. 22, in step 2210, the determination unit 910 of the image encoding apparatus 900 determines whether the first encoding unit includes an area outside the boundary of the current picture.

단계 2220에서 영상 부호화 장치(900)는 단계 2210에서의 판단 결과에 기초해 제1 부호화 단위의 경계를 벗어난 영역을 소정의 값으로 패딩한다. 도 23a를 참조하여 상세히 설명한다. In step 2220, the image encoding apparatus 900 paddes an area out of the boundary of the first encoding unit to a predetermined value based on the determination result in step 2210. Will be described in detail with reference to FIG. 23A.

도 23a 및 23b는 본 발명의 또 다른 실시예에 따른 픽처 경계의 부호화 단위를 부호화하는 방법을 설명하기 위한 도면이다.FIGS. 23A and 23B are diagrams for explaining a method of coding a picture unit boundary coding unit according to another embodiment of the present invention.

도 23a를 참조하면, 영상 부호화 장치(900)의 판단부(910)가 제1 부호화 단위(2320)가 픽처의 경계에 걸쳐있는 것으로 판단하면, 부호화부(930)는 제1 부호화 단위(2320) 중 경계(2310)를 벗어난 영역(2322)을 도 23a에 도시된 바와 같이 패딩한다. 현재 픽처의 경계(2310)를 벗어난 영역의 픽셀 값들을 모두 '0'으로 설정하거나, 경계를 벗어난 영역의 픽셀 값들을 인접한 경계를 벗어나지 않은 영역의 픽셀 값들과 동일하게 설정한다.23A, when the determination unit 910 of the image encoding apparatus 900 determines that the first encoding unit 2320 extends over the boundary of a picture, the encoding unit 930 encodes the first encoding unit 2320, The area 2322 outside the middle boundary 2310 is padded as shown in FIG. 23A. The pixel values of the area outside the boundary 2310 of the current picture are all set to '0', or the pixel values of the area outside the boundary are set to be the same as the pixel values of the area not outside the adjacent boundary.

다시 도 22를 참조하면, 단계 2230에서 영상 부호화 장치(900)의 부호화부(930)는 단계 2220에서 경계(2310)를 벗어난 영역(2322)이 패딩된 제1 부호화 단위(2320)를 제1 부호화 단위(2320)보다 작은 크기의 제2 부호화 단위를 이용하는 부호화 모드로 부호화한다. 패딩의 방법에 대한 규칙을 부호화 측과 복호화 측이 공유한다면, 제1 부호화 단위(2320)의 패딩된 영역(2322)을 부호화하지 않아도, 복호화하는 측에서 패딩된 영역(2322)를 복원할 수 있다. 따라서, 경계(2310)를 벗어나지 않은(2324)의 선택적인 부호화를 위해 영상 부호화 장치(900)의 부호화부(930)는 제1 부호화 단위(2320)의 크기보다 작은 크기의 제2 부호화 단위를 이용하는 부호화 모드로 제1 부호화 단위(2320)를 부호화한다. 도 23b를 참조하여 상세히 설명한다.Referring again to FIG. 22, in step 2230, the encoding unit 930 of the image encoding apparatus 900 encodes the first encoding unit 2320 in which the area 2322 outside the boundary 2310 is padded in step 2220, And encoding is performed in an encoding mode using a second encoding unit smaller than the unit 2320. [ If the encoding side and the decoding side share the rules for the padding method, the padded area 2322 on the decoding side can be restored without encoding the padded area 2322 of the first encoding unit 2320 . The encoding unit 930 of the image encoding device 900 uses the second encoding unit smaller than the size of the first encoding unit 2320 for selective encoding of the frame 2324 that does not leave the boundary 2310 And encodes the first encoding unit 2320 in the encoding mode. Will be described in detail with reference to FIG. 23B.

도 23b를 참조하면, 부호화부(930)는 제1 부호화 단위(2320)의 크기보다 작은 크기의 제2 부호화 단위들(2322 내지 2328)를 이용하는 부호화 모드로 제1 부호화 단위(2320)를 부호화한다. 제2 부호화 단위를 이용하는 부호화 모드에 따라 제2 부호화 단위들 각각을 예측하고, 예측 결과 생성된 레지듀얼 값들을 주파수 변환한다. 주파수 변환 결과 생성된 주파수 변환 계수들을 양자화한 다음 엔트로피 부호화한다.23B, the encoding unit 930 encodes the first encoding unit 2320 in an encoding mode using the second encoding units 2322 to 2328 having a size smaller than the size of the first encoding unit 2320 . Predicts each of the second encoding units according to the encoding mode using the second encoding unit, and frequency-converts the residual values generated as a result of the prediction. The frequency transform coefficients generated as a result of frequency conversion are quantized and entropy-encoded.

제2 부호화 단위들 각각을 부호화함에 있어서 경계를 벗어나지 않은 영역의 제2 부호화 단위(2336 및 2338)에 대해서만 예측을 수행하고, 예측 결과에 기초해 경계를 벗어나지 않은 영역의 제2 부호화 단위(2336 및 2338)를 부호화할 수 있다. 경계를 벗어난 영역의 제2 부호화 단위(2332 및 2334)는 예측을 수행하지 않고, 소정의 값(예를 들어, ‘0’)으로 레지듀얼 값을 설정할 수 있다.The second encoding units 2336 and 2338 of the non-boundary region are encoded in the second encoding units 2336 and 2338, and the second encoding units 2336 and 2338 of the non- 2338 can be encoded. The second encoding units 2332 and 2334 of the boundary region can set a residual value to a predetermined value (e.g., '0') without performing prediction.

또한, 경계(2310)를 벗어나지 않은 영역의 제2 부호화 단위(2336 및 2338)에 대한 움직임 벡터 및 픽셀 값에 대한 정보만 부호화하고, 경계(2310)를 벗어난 영역의 제2 부호화 단위(2332 및 2334)의 움직임 벡터 및 픽셀 값에 대한 정보는 부호화하지 않을 수 있다. 픽셀 값에 대한 정보는 제2 부호화 단위(2332 내지 2338) 각각에 포함된 픽셀 값들을 주파수 변환하여 생성된 주파수 변환 계수(예를 들어, 이산 코사인 계수)일 수 있다.Only the information on the motion vectors and pixel values for the second encoding units 2336 and 2338 of the area that does not deviate the boundary 2310 is encoded and the second encoding units 2332 and 2334 ) May not be encoded. The information on the pixel values may be frequency transform coefficients (for example, discrete cosine coefficients) generated by frequency-converting the pixel values included in each of the second encoding units 2332 to 2338.

또한, 단계 2230에서 부호화부(930)는 도 18a 및 18g와 관련하여 전술한 바와 같이 제2 부호화 단위가 경계를 벗어난 영역을 포함하는지 여부에 기초해 부호화 모드에 대한 정보를 부호화할 수도 있다.In addition, in step 2230, the encoding unit 930 may encode information on the encoding mode based on whether or not the second encoding unit includes an out-of-bound area, as described above with reference to Figs. 18A and 18G.

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

도 24를 참조하면, 단계 2410에서 영상 복호화 장치(1600)의 판단부(1610)는 제1 부호화 단위가 현재 픽처의 경계를 벗어난 영역을 포함하는지 판단한다.Referring to FIG. 24, in step 2410, the determination unit 1610 of the video decoding apparatus 1600 determines whether the first encoding unit includes an area outside the boundary of the current picture.

단계 2420에서 영상 복호화 장치(1600)의 파싱부(1620)는 단계 2410의 판단 결과에 기초해 소정의 값으로 패딩된 영역을 포함하는 제1 부호화 단위에 대한 데이터를 파싱한다.In step 2420, the parsing unit 1620 of the image decoding apparatus 1600 parses data on the first encoding unit including the padded area based on the determination result in step 2410. [

파싱되는 데이터는 도 23b의 제1 부호화 단위(2320) 중 경계(2310)를 벗어나지 않은 영역의 제2 부호화 단위(2336 및 2338)에 대한 정보만 포함할 수 있다. 경계(2310)를 벗어나지 않은 영역의 제2 부호화 단위(2336 및 2338)에 대한 움직임 벡터 및 픽셀 값에 대한 정보만 포함할 수 있다.The data to be parsed may include only information on the second encoding units 2336 and 2338 of the first encoding unit 2320 in the area not outside the boundary 2310 in FIG. 23B. And only information on the motion vectors and pixel values for the second encoding units 2336 and 2338 of the region that does not deviate from the boundary 2310.

단계 2430에서 영상 복호화 장치(1600)의 복호화부(1630)는 단계 1620에서 파싱된 데이터를 이용해 제1 부호화 단위를 제1 부호화 단위보다 작은 크기의 제2 부호화 단위를 이용하는 부호화 모드에 따라 복호화한다. 제2 부호화 단위를 이용하는 부호화 모드에 따라 제1 부호화 단위의 제2 부호화 단위들을 엔트로피 복호화, 역양자화, 역주파수 변환 및 예측하여 복호화한다. 도 18a 및 18g와 관련하여 전술한 바와 같이 제2 부호화 단위가 경계를 벗어난 영역을 포함하는지 여부에 기초해 부호화된 부호화 모드에 대한 정보를 복호화하고, 복호화된 부호화 모드에 대한 정보에 따라 제2 부호화 단위를 복호화할 수 있다.In step 2430, the decoding unit 1630 of the image decoding apparatus 1600 decodes the first encoding unit using the parsed data according to the encoding mode using the second encoding unit smaller than the first encoding unit. The second encoding units of the first encoding unit are entropy decoded, inverse quantized, inverse frequency transformed, and predicted and decoded according to the encoding mode using the second encoding unit. As described above with reference to FIGS. 18A and 18G, information on an encoding mode encoded based on whether or not the second encoding unit includes an out-of-bounds area is decoded, and a second encoding process is performed according to information on the decoded encoding mode The unit can be decoded.

파싱된 데이터가 경계(2310)를 벗어나지 않은 영역의 제2 부호화 단위(2336 및 2338)에 대한 정보만 포함하는 경우, 경계(2310)를 벗어나지 않은 영역의 제2 부호화 단위(2336 및 2338)만 제2 부호화 단위를 이용하는 부호화 모드에 따라 복호화한다. Only the second encoding units 2336 and 2338 of the area that does not deviate from the boundary 2310 of the second encoding units 2336 and 2338 in the area that does not deviate the boundary 2310 include only the information of the second encoding units 2336 and 2338 2 encoding unit according to the encoding mode.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명이 상기의 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명의 사상은 아래에 기재된 특허청구범위에 의해서만 파악되어야 하고, 이와 균등하거나 또는 등가적인 변형 모두는 본 발명 사상의 범주에 속한다 할 것이다. 또한, 본 발명에 따른 시스템은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, Modification is possible. Accordingly, the spirit of the present invention should be understood only in accordance with the following claims, and all of the equivalent or equivalent variations will fall within the scope of the present invention. In addition, the system according to the present invention can be embodied as computer-readable codes on a computer-readable recording medium.

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

또한, 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.In addition, the computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored. Examples of the recording medium include a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like, and a carrier wave (for example, transmission via the Internet). 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.

Claims (4)

비디오 복호화 방법에 있어서,
제1 부호화 단위의 좌상측 샘플의 위치로부터 상기 제1 부호화 단위의 크기를 더한 위치가 현재영상의 경계를 벗어난 영역을 포함할 때, 상기 제1 부호화 단위를 복수의 제2 부호화 단위로 분할하는 단계;
상기 제1 부호화 단위의 좌상측 샘플의 위치로부터 상기 제1 부호화 단위의 크기를 더한 위치가 상기 현재영상의 경계를 벗어나지 않을 때, 비트스트림으로부터 상기 제1 부호화 단위를 위한 분할정보를 획득하고, 상기 분할정보가 상기 제1 부호화 단위의 분할을 나타낼 때, 상기 제1 부호화 단위를 복수의 제2 부호화 단위로 분할하는 단계; 및
상기 제2 부호화 단위가 상기 제2 부호화 단위보다 작은 부호화 단위로 더 이상 분할되지 않는 경우, 상기 제2 부호화 단위를 복호화하는 단계를 포함하고,
상기 제2 부호화 단위를 복호화하는 단계는,
상기 제2 부호화 단위가 상기 제2 부호화 단위보다 더 작은 부호화 단위로 더 이상 분할되지 않고, 상기 제2 부호화 단위의 좌상측 샘플의 위치로부터 상기 제2 부호화 단위의 크기를 더한 위치가 상기 현재영상의 경계를 벗어나지 않을 때, 상기 제2 부호화 단위로부터 하나 이상의 예측단위를 결정하고, 상기 예측단위를 이용하여 예측을 수행하고, 상기 제2 부호화 단위로부터 하나 이상의 변환단위를 결정하고, 상기 변환단위를 이용하여 변환을 수행하는 단계를 포함하고,
상기 현재영상은 복수의 최대부호화 단위로 분할되고,
상기 최대 부호화 단위는 상기 분할정보에 따라 현재 심도 및 하위 심도 중 적어도 하나를 포함하는 심도의 부호화 단위로 계층적으로 분할되는 것을 특징으로 하는 비디오 복호화 방법.
A video decoding method comprising:
Dividing the first encoding unit into a plurality of second encoding units when the position of the first encoding unit plus the size of the first encoding unit includes a region outside the boundary of the current image, ;
Acquiring division information for the first encoding unit from a bitstream when a position of the first encoding unit plus the size of the first encoding unit does not deviate from a boundary of the current image, Dividing the first encoding unit into a plurality of second encoding units when the division information indicates division of the first encoding unit; And
And decoding the second encoding unit if the second encoding unit is not further divided into smaller encoding units than the second encoding unit,
Wherein the decoding of the second encoding unit comprises:
Wherein the second encoding unit is not further divided into smaller encoding units than the second encoding unit and a position obtained by adding the size of the second encoding unit to the position of the upper left sample of the second encoding unit is Determining one or more prediction units from the second encoding unit and performing prediction using the prediction unit, determining one or more conversion units from the second encoding unit, and using the conversion unit And performing a conversion,
Wherein the current image is divided into a plurality of maximum encoding units,
Wherein the maximum coding unit is hierarchically divided into a coding unit having a depth including at least one of a current depth and a low depth according to the division information.
제 1 항에 있어서, 상기 비디오 복호화 방법은,
상기 제1 부호화 단위의 우측 경계가 상기 현재영상의 우측 경계를 벗어나는지 판단하는 단계를 더 포함하는 것을 특징으로 하는 비디오 복호화 방법.
The video decoding method according to claim 1,
And determining whether a right boundary of the first encoding unit is out of a right boundary of the current image.
제 1 항에 있어서, 상기 비디오 복호화 방법은,
상기 제1 부호화 단위의 하부 경계가 상기 현재영상의 하부 경계를 벗어나는지 판단하는 단계를 더 포함하는 것을 특징으로 하는 비디오 복호화 방법.
The video decoding method according to claim 1,
Further comprising the step of determining whether a lower boundary of the first encoding unit is out of a lower boundary of the current image.
비디오 복호화 장치에 있어서,
제1 부호화 단위의 좌상측 샘플의 위치로부터 상기 제1 부호화 단위의 크기를 더한 위치가 현재영상의 경계를 벗어난 영역을 포함할 때, 상기 제1 부호화 단위를 복수의 제2 부호화 단위로 분할하고,
상기 제1 부호화 단위의 좌상측 샘플의 위치로부터 상기 제1 부호화 단위의 크기를 더한 위치가 상기 현재영상의 경계를 벗어나지 않을 때, 비트스트림으로부터 상기 제1 부호화 단위를 위한 분할정보를 획득하고, 상기 분할정보가 상기 제1 부호화 단위의 분할을 나타낼 때, 상기 제1 부호화 단위를 복수의 제2 부호화 단위로 분할하는 부호화단위 결정부; 및
상기 제2 부호화 단위가 상기 제2 부호화 단위보다 작은 부호화 단위로 더 이상 분할되지 않는 경우, 상기 제2 부호화 단위를 복호화하는 부호화단위 복호화부를 포함하고,
상기 복호화부는, 상기 제2 부호화 단위가 상기 제2 부호화 단위보다 더 작은 부호화 단위로 더 이상 분할되지 않고, 상기 제2 부호화 단위의 좌상측 샘플의 위치로부터 상기 제2 부호화 단위의 크기를 더한 위치가 상기 현재영상의 경계를 벗어나지 않을 때, 상기 제2 부호화 단위로부터 하나 이상의 예측단위를 결정하고, 상기 예측단위를 이용하여 예측을 수행하고, 상기 제2 부호화 단위로부터 하나 이상의 변환단위를 결정하고, 상기 변환단위를 이용하여 변환을 수행하고,
상기 현재영상은 복수의 최대부호화 단위로 분할되고,
상기 최대 부호화 단위는 상기 분할정보에 따라 현재 심도 및 하위 심도 중 적어도 하나를 포함하는 심도의 부호화 단위로 계층적으로 분할되는 것을 특징으로 하는 비디오 복호화 장치.
A video decoding apparatus comprising:
Dividing the first encoding unit into a plurality of second encoding units when the position of the first encoding unit plus the size of the first encoding unit includes an area outside the boundary of the current image,
Acquiring division information for the first encoding unit from a bitstream when a position of the first encoding unit plus the size of the first encoding unit does not deviate from a boundary of the current image, An encoding unit determination unit for dividing the first encoding unit into a plurality of second encoding units when the segmentation information indicates division of the first encoding unit; And
And a coding unit decoding unit for decoding the second coding unit when the second coding unit is not further divided into coding units smaller than the second coding unit,
Wherein the decoding unit is configured so that the second encoding unit is not further divided into smaller encoding units than the second encoding unit and a position obtained by adding the size of the second encoding unit from the position of the upper left sample of the second encoding unit is Determining one or more prediction units from the second coding unit when the boundary of the current image is not out of bounds, performing prediction using the prediction unit, determining one or more conversion units from the second coding unit, Conversion is performed using conversion unit,
Wherein the current image is divided into a plurality of maximum encoding units,
Wherein the maximum coding unit is hierarchically divided into a coding unit having a depth including at least one of a current depth and a low depth according to the division information.
KR1020140148721A 2014-10-29 2014-10-29 Method and apparatus for encoding and decoding coding unit of picture boundary KR101662739B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140148721A KR101662739B1 (en) 2014-10-29 2014-10-29 Method and apparatus for encoding and decoding coding unit of picture boundary

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140148721A KR101662739B1 (en) 2014-10-29 2014-10-29 Method and apparatus for encoding and decoding coding unit of picture boundary

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020140100657A Division KR101608065B1 (en) 2014-08-05 2014-08-05 Method and apparatus for encoding and decoding coding unit of picture boundary

Publications (2)

Publication Number Publication Date
KR20140139459A KR20140139459A (en) 2014-12-05
KR101662739B1 true KR101662739B1 (en) 2016-10-05

Family

ID=52459452

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140148721A KR101662739B1 (en) 2014-10-29 2014-10-29 Method and apparatus for encoding and decoding coding unit of picture boundary

Country Status (1)

Country Link
KR (1) KR101662739B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019194515A1 (en) * 2018-04-01 2019-10-10 엘지전자 주식회사 Method for video processing and apparatus therefor
WO2019203610A1 (en) * 2018-04-19 2019-10-24 엘지전자 주식회사 Method for processing image and device therefor
WO2019216718A1 (en) * 2018-05-10 2019-11-14 삼성전자주식회사 Method and apparatus for image encoding, and method and apparatus for image decoding

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017142262A1 (en) * 2016-02-16 2017-08-24 삼성전자 주식회사 Adaptive block partitioning method and apparatus
KR20230016708A (en) 2016-10-10 2023-02-02 삼성전자주식회사 Method and device for encoding or decoding encoding unit of picture outline
KR102480350B1 (en) * 2016-10-14 2022-12-23 세종대학교산학협력단 Image encoding method/apparatus, image decoding method/apparatus and recording medium for storing bitstream
US11057624B2 (en) 2016-10-14 2021-07-06 Industry Academy Cooperation Foundation Of Sejong University Image encoding method/device, image decoding method/device, and recording medium in which bitstream is stored
CN116489406A (en) * 2016-10-14 2023-07-25 世宗大学校产学协力团 Video decoding/encoding method, method for transmitting bit stream, and recording medium
KR20220088813A (en) * 2018-05-10 2022-06-28 삼성전자주식회사 Method and apparatus for image encoding, and method and apparatus for image decoding

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007318726A (en) * 2006-04-27 2007-12-06 Canon Inc Image coding apparatus and method, and program and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11146367A (en) * 1997-11-06 1999-05-28 Matsushita Electric Ind Co Ltd Mobile video-phone
KR100624404B1 (en) * 2002-01-05 2006-09-18 삼성전자주식회사 Adaptive coding method and apparatus considering human visual characteristics

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007318726A (en) * 2006-04-27 2007-12-06 Canon Inc Image coding apparatus and method, and program and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019194515A1 (en) * 2018-04-01 2019-10-10 엘지전자 주식회사 Method for video processing and apparatus therefor
WO2019203610A1 (en) * 2018-04-19 2019-10-24 엘지전자 주식회사 Method for processing image and device therefor
US11272221B2 (en) 2018-04-19 2022-03-08 Lg Electronics Inc. Method for partitioning block including image and device therefor
US11750849B2 (en) 2018-04-19 2023-09-05 Lg Electronics Inc. Method for partitioning block including image and device therefor
WO2019216718A1 (en) * 2018-05-10 2019-11-14 삼성전자주식회사 Method and apparatus for image encoding, and method and apparatus for image decoding
US11616963B2 (en) 2018-05-10 2023-03-28 Samsung Electronics Co., Ltd. Method and apparatus for image encoding, and method and apparatus for image decoding

Also Published As

Publication number Publication date
KR20140139459A (en) 2014-12-05

Similar Documents

Publication Publication Date Title
KR101452713B1 (en) Method and apparatus for encoding and decoding coding unit of picture boundary
KR101662739B1 (en) Method and apparatus for encoding and decoding coding unit of picture boundary
KR101545905B1 (en) Method and apparatus for encoding and decoding coding unit of picture boundary
KR101608065B1 (en) Method and apparatus for encoding and decoding coding unit of picture boundary
KR101452714B1 (en) Method and apparatus for encoding and decoding coding unit of picture boundary
KR101434208B1 (en) Method and apparatus for encoding and decoding coding unit of picture boundary
KR101634253B1 (en) Method and apparatus for encoding and decoding image using large transform unit
KR101464979B1 (en) Method and apparatus for encoding and decoding image using large transform unit

Legal Events

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

Payment date: 20190829

Year of fee payment: 4