KR20130070618A - Coding method and apparatus by using tree structure - Google Patents

Coding method and apparatus by using tree structure Download PDF

Info

Publication number
KR20130070618A
KR20130070618A KR1020130056076A KR20130056076A KR20130070618A KR 20130070618 A KR20130070618 A KR 20130070618A KR 1020130056076 A KR1020130056076 A KR 1020130056076A KR 20130056076 A KR20130056076 A KR 20130056076A KR 20130070618 A KR20130070618 A KR 20130070618A
Authority
KR
South Korea
Prior art keywords
information
node
value
layer
encoded
Prior art date
Application number
KR1020130056076A
Other languages
Korean (ko)
Inventor
김수년
임정연
최재훈
이규민
문주희
이영렬
김해광
전병우
한종기
김동원
Original Assignee
에스케이텔레콤 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 에스케이텔레콤 주식회사 filed Critical 에스케이텔레콤 주식회사
Priority to KR1020130056076A priority Critical patent/KR20130070618A/en
Publication of KR20130070618A publication Critical patent/KR20130070618A/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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Abstract

PURPOSE: A method for encoding and decoding a tree structure and a device thereof are provided to encode information for an image by using the tree structure and decode encoded data, thereby improving encoding efficiency. CONSTITUTION: A tree encoder(110) groups predetermined areas having image information as a plurality of groups. The tree encoder determines a minimal value or a maximal value of encoding object information in a grouped area as information of the grouped area. The tree encoder encodes a difference value between a node value for a layer and a node value of an upper layer or a difference value between the node value for the layer and a value which is determined corresponding to a predetermined reference value. An additional information encoder(120) encodes additional information. [Reference numerals] (110) Tree encoder; (120) Additional information encoder; (AA) Information to be encoded for images; (BB) Bit stream

Description

트리 구조를 이용한 부호화/복호화 방법 및 장치{Coding Method and Apparatus by Using Tree Structure}Coding Method and Apparatus by Tree Structure {Coding Method and Apparatus by Using Tree Structure}

본 발명은 트리 구조를 이용한 부호화/복호화 방법 및 장치에 관한 것이다. 더욱 상세하게는, 영상에 대한 다양한 정보를 트리 구조를 이용하여 부호화/복호화함으로써, 부호화 효율을 향상시켜 영상의 압축 효율을 향상시키기 위한 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for encoding / decoding using a tree structure. More specifically, the present invention relates to a method and apparatus for improving coding efficiency by improving encoding efficiency by encoding / decoding various information about an image using a tree structure.

이 부분에 기술된 내용은 단순히 본 발명의 실시예에 대한 배경 정보를 제공할 뿐 종래기술을 구성하는 것은 아니다.The contents described in this section merely provide background information on the embodiment of the present invention and do not constitute the prior art.

동영상 데이터를 압축하는 기술로는 현재 H.261, H.263, MPEG-2, MPEG-4 등이 있다. 이러한 기존의 동영상 압축 기술은 각 영상을 휘도 성분의 16x16 크기의 화소들과 색차 성분의 8x8 크기의 화소들의 사각 영역으로 이루어진 고정된 크기의 매크로블록(Macroblock)들로 나누어 부호화한다. 각 매크로블록의 모든 휘도 성분(Luma Component)과 색차 성분(Chroma Component)들은 공간적으로나 시간적으로 예측되고, 예측 잔여(Predected Residual)는 변환(Transform) 및 양자화(Quantization), 엔트로피 부호화(Entropy Coding) 등이 수행되어 압축된다.Techniques for compressing video data currently include H.261, H.263, MPEG-2, and MPEG-4. The conventional video compression technique encodes each image by dividing each image into fixed-size macroblocks each consisting of a rectangular region of 16x16 pixels of luminance and 8x8 pixels of a chrominance component. Luma and chrominance components of each macroblock are predicted spatially and temporally, and the predicted residuals are transform and quantization, entropy coding, etc. This is done and compressed.

H.264/AVC 압축 표준에 따른 부호화 장치는 각 매크로블록을 16x16 크기, 8x8 크기, 4x4 크기의 더 작은 블록으로 분할하여 인트라 예측 부호화(Intra Prediction Enoding)할 수 있으며, 16x16 화소 블록에 대해서는 4 가지의 예측 모드 중 하나를 사용하고, 8x8 화소 블록과 4x4 화소 블록에 대해서는 9 가지의 예측 모드 중 하나를 사용하여 인트라 예측 부호화한다. 인터 예측 부호화(Inter Prediction Encoding)의 경우, 각 매크로블록은 16x16 크기, 16x8 크기, 8x16 크기, 8x8 크기, 8x4 크기, 4x8 크기, 4x4 화소 블록으로 분할되어 인터 예측 부호화될 수 있다. 변환은 8x8 크기 또는 4x4 화소 블록 단위로 적용되고, 변환 계수(Transform Coefficient)의 양자화는 스칼라(Scalar) 양자화가 사용된다. 이와 같이, 영상 부호화 장치는 영상을 인트라 예측 부호화 또는 인터 예측 부호화함에 따라 부호화하고자 하는 원래의 대상인 영상에 대한 정보뿐만 아니라 인트라 예측 부호화와 인터 예측 부호화에 이용되는 다양한 정보를 부호화해야 한다.The encoding apparatus according to the H.264 / AVC compression standard can intra-prediction encoding by dividing each macroblock into smaller blocks of 16x16 size, 8x8 size, and 4x4 size, and 4 kinds of 16x16 pixel blocks. Intra prediction encoding is performed using one of prediction modes, and one of nine prediction modes for 8x8 pixel blocks and 4x4 pixel blocks. In the case of inter prediction encoding, each macroblock may be divided into 16x16 size, 16x8 size, 8x16 size, 8x8 size, 8x4 size, 4x8 size, and 4x4 pixel blocks to be inter prediction encoded. Transform is applied in units of 8x8 size or 4x4 pixel blocks, and scalar quantization is used for quantization of transform coefficients. As described above, the apparatus for encoding an image should encode various information used for intra prediction encoding and inter prediction encoding, as well as information on an image that is an original target to be encoded by intra prediction encoding or inter prediction encoding.

한편, 최근 4Kx2K 영상과 같은 고해상도 영상의 압축의 필요성이 대두되고 있으나, 큰 크기의 고해상도 영상을 효율적으로 압축하는 기술은 개발되지 않은 실정이다. 하지만, 영상의 크기가 커지고 큰 영상을 분할하여 부호화하는 분할 단위가 커질수록 영상 그 자체의 정보뿐만 아니라 영상을 인트라 예측 부호화와 인터 예측 부호화하는 데 이용되는 정보들이 많아지며, 그로 인해 영상의 압축 효율이 저하되는 문제점이 있다. 따라서, 부호화 효율을 향상시켜 영상의 압축 효율을 향상시키는 기술의 개발이 필요한 실정이다.On the other hand, the need for compression of high resolution images such as 4Kx2K image has recently emerged, but a technique for efficiently compressing a high resolution image of a large size has not been developed. However, as the size of an image increases and the segmentation unit for dividing and encoding a large image increases, not only the information of the image itself but also information used for intra prediction encoding and inter prediction encoding of the image increases, thereby resulting in compression efficiency of the image. There is a problem of this deterioration. Therefore, there is a need to develop a technology for improving coding efficiency by improving coding efficiency.

전술한 문제점을 해결하고 기술의 개발의 요구에 부응하기 위해 본 발명은, 영상에 대한 다양한 정보를 트리 구조를 이용하여 부호화하고 부호화된 데이터를 복호화함으로써, 부호화 효율을 향상시켜 영상의 압축 효율을 향상시키는 데 주된 목적이 있다.In order to solve the above problems and meet the demand of technology development, the present invention encodes various pieces of information about an image using a tree structure and decodes the encoded data, thereby improving encoding efficiency and improving image compression efficiency. Has a main purpose.

전술한 목적을 달성하기 위해 본 발명은, 영상에 대해 부호화하고자하는 정보를 부호화하는 장치에 있어서, 영상 정보를 가지는 소정의 영역들을 복수 개의 그룹으로 그룹화하고, 그룹화된 영역 내의 부호화하고자하는 정보의 최소값 또는 최대값을 그룹화된 영역의 정보로서 결정하여 레이어별 노드값을 최상위 레이어까지 생성하며, 레이어별 노드값과 상위 레이어의 노드값 간의 차이값 또는 레이어별 노드값과 기 설정된 기준에 따라 결정되는 값 간의 차이값을 부호화하는 트리 부호화기 및 레이어의 최대 개수에 대한 정보, 그룹화되는 영역의 개수에 대한 정보 및 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부에 대한 정보를 포함하는 부가 정보를 부호화하는 부가 정보 부호화기를 포함하는 것을 특징으로 하는 부호화 장치를 제공한다.In order to achieve the above object, the present invention provides a device for encoding information to be encoded for an image, the predetermined region having the image information is grouped into a plurality of groups, the minimum value of the information to be encoded in the grouped region Alternatively, the maximum value is determined as the information of the grouped area, and the node value for each layer is generated up to the top layer, and the difference value between the node value of each layer and the node value of the upper layer, or the value determined according to the node value and the preset criteria for each layer. Information about the maximum number of layers and the tree coder encoding the difference between the information, the information about the number of areas to be grouped, and whether the node value for each layer is determined as the minimum value or the maximum value among the node values of the lower layer. Includes an additional information encoder that encodes additional information, including information about It provides a coding apparatus which comprises.

또한, 본 발명의 다른 목적에 의하면, 비트스트림을 복호화하여 정보를 복원하는 장치에 있어서, 비트스트림을 복호화하여 레이어의 최대 개수에 대한 정보, 최하위 레이어의 영역의 크기에 대한 정보 및 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부에 대한 정보를 포함하는 부가 정보를 복원하는 부가 정보 복호화기 및 부가 정보를 이용하여 비트스트림을 복호화하여 레이어별 노드값과 상위 레이어의 노드값 간의 차이값 또는 레이어별 노드값과 기 설정된 기준에 따라 결정되는 값 간의 차이값을 복원하고, 복원되는 차이값과 상위 레이어의 노드값 또는 기 설정된 기준에 따라 결정되는 값 간의 차이값을 더하여 레이어별 노드값을 복원하며, 최하위 레이어의 노드값을 복호화하고자 하는 정보로서 복원하는 트리 복호화기를 포함하는 것을 특징으로 하는 복호화 장치를 제공한다.Further, according to another object of the present invention, in the apparatus for decoding information by decoding the bitstream, information about the maximum number of layers by decoding the bitstream, information about the size of the region of the lowest layer, and node value for each layer Decode the bitstream using the additional information decoder and the additional information to restore the additional information including information on whether to determine the minimum value or the maximum value among the node values of the lower layer. Restores the difference between the node value of the upper layer or the node value for each layer and the value determined according to the preset criteria, and the difference between the restored value and the value determined according to the node value or the preset criteria of the upper layer. Restore the node value of each layer by adding values, and decode the node value of the lowest layer. A decoding apparatus comprising a tree decoder for reconstructing as information is provided.

또한, 본 발명의 또 다른 목적에 의하면, 영상에 대해 부호화하고자 하는 정보를 부호화하는 장치에 있어서, 영상 정보를 가지는 소정의 영역들을 동일한 정보를 가지는 영역끼리 그룹화하고 레이어별 노드마다 노드가 분할되는지 여부에 따라 분할 여부를 나타내는 플래그와 노드값 중 하나 이상을 부호화하는 트리 부호화기 및 레이어의 최대 개수에 대한 정보 및 최하위 레이어의 각 노드가 가리키는 영역의 크기에 대한 정보를 포함하는 부가 정보를 부호화하는 부가 정보 부호화기를 포함하는 것을 특징으로 하는 부호화 장치를 제공한다.According to still another object of the present invention, in an apparatus for encoding information to be encoded for an image, predetermined regions having the image information are grouped with regions having the same information, and whether nodes are divided for each node of each layer. And additional information encoding additional information including information about the maximum number of layers and a tree encoder for encoding one or more of a flag and a node value indicating whether to split, and information about the size of the region indicated by each node of the lowest layer. It provides an encoding device comprising an encoder.

또한, 본 발명의 또 다른 목적에 의하면, 비트스트림을 복호화하여 정보를 복원하는 장치에 있어서, 비트스트림을 복호화하여 레이어의 최대 개수에 대한 정보 및 최하위 레이어의 각 노드가 가리키는 영역의 크기에 대한 정보를 포함하는 부가 정보를 복원하는 부가 정보 복호화기 및 부가 정보를 기초로 비트스트림을 복호화하여 최상위 레이어로부터 최하위 레이어까지 레이어별 노드의 분할 여부를 나타내는 플래그를 복원하고 복원된 플래그에 따라 레이어별 노드의 노드값을 복원하여 정보를 복원하는 트리 복호화기를 포함하는 것을 특징으로 하는 복호화 장치를 제공한다.Further, according to another object of the present invention, in the apparatus for decoding information by decoding the bitstream, information about the maximum number of layers by decoding the bitstream and information about the size of the region indicated by each node of the lowest layer An additional information decoder for restoring additional information including a and a bitstream based on the additional information to restore a flag indicating whether a node for each layer is split from the highest layer to the lowest layer, and to restore the flag of each node according to the restored flag. A decoding apparatus comprising a tree decoder for restoring information by restoring node values.

또한, 본 발명의 또 다른 목적에 의하면, 트리구조를 이용하여 영상 정보를 부호화하는 방법에 있어서, 각 레이어는 적어도 하나의 노드를 포함하고, 각 노드는 하위 레이어의 노드로 분할되거나 또는 분할되지 않는 트리 구조를 형성하는 단계; 각 노드가 하위 레이어의 노드로 분할되는지 여부에 따라 분할 여부를 나타내는 플래그를 부호화하는 단계; 및 레이어의 최대 개수에 대한 정보 및 최하위 레이어의 각 노드가 가리키는 영역의 크기에 대한 정보를 포함하는 부가 정보를 부호화하는 단계를 포함하는 것을 특징으로 하는 부호화 방법을 제공한다.According to still another object of the present invention, in a method of encoding image information using a tree structure, each layer includes at least one node, and each node is divided or not divided into nodes of a lower layer. Forming a tree structure; Encoding a flag indicating whether to divide according to whether each node is divided into nodes of a lower layer; And encoding additional information including information on the maximum number of layers and information on the size of the region indicated by each node of the lowest layer.

또한, 본 발명의 또 다른 목적에 의하면, 트리 구조를 이용하여 영상 정보를 복원하는 방법에 있어서, 트리 구조를 구성하는 레이어의 최대 개수에 대한 정보 및 최하위 레이어의 각 노드가 가리키는 영역의 크기에 대한 정보를 포함하는 부가 정보를 복원하는 단계; 및 부가 정보를 기초로 각 레이어에 포함된 각 노드의 분할 여부를 나타내는 플래그를 복원하고 복원된 플래그에 따라 레이어별 노드의 노드값을 복원하는 단계를 포함하는 것을 특징으로 하는 복호화 방법을 제공한다.Further, according to another object of the present invention, in the method for restoring image information by using a tree structure, the information on the maximum number of layers constituting the tree structure and the size of the area indicated by each node of the lowest layer Restoring additional information including the information; And restoring a flag indicating whether each node included in each layer is divided based on the additional information, and restoring a node value of a node for each layer according to the restored flag.

이러한 본 발명에 따르면, 영상에 대한 다양한 정보를 트리 구조를 이용하여 부호화하고 부호화된 데이터를 복호화함으로써, 부호화 효율을 향상시켜 영상의 압축 효율을 향상시킬 수 있다.According to the present invention, by encoding a variety of information about the image using a tree structure and decoding the encoded data, it is possible to improve the coding efficiency by improving the coding efficiency.

도 1은 본 발명의 제1 실시예에 따른 트리 구조를 이용한 부호화 장치를 간략하게 나타낸 블록 구성도,
도 2는 본 발명의 제1 실시예에 따라 트리 구조를 이용하여 부호화하고자 하는 정보를 나타낸 예시도,
도 3은 본 발명의 제1 실시예에 따라 레이어별 결정되는 영역의 정보를 태그 트리로 나타낸 예시도,
도 4는 본 발명의 제1 실시예에 따라 트리 구조를 이용하여 부호화된 비트를 나타낸 예시도,
도 5는 본 발명의 제1 실시예에 따른 트리 구조를 이용한 부호화 방법을 설명하기 위한 순서도,
도 6은 본 발명의 제1 실시예에 따른 트리 구조를 이용한 복호화 장치를 간략하게 나타낸 블록 구성도,
도 7은 본 발명의 제1 실시예에 따른 트리 구조를 이용한 복호화 방법을 설명하기 위한 순서도,
도 8은 본 발명의 제2 실시예에 따른 트리 구조를 이용하여 부호화 장치를 간략하게 나타낸 블록 구성도,
도 9는 본 발명의 제2 실시예에 따른 트리 구조 구조를 나타낸 예시도,
도 10은 본 발명의 제2 실시예에 따라 트리 구조로 표현된 정보가 부호화된 결과를 나타낸 예시도,
도 11은 본 발명의 제2 실시예에 따라 노드를 하위 계층으로 분할하는 다른 방식을 나타낸 예시도,
도 12 및 도 13은 영역의 정보가 다른 방식으로 분포된 경우 그룹화되는 형태를 나타낸 예시도,
도 14는 본 발명의 제2 실시예에 따른 트리 구조를 이용한 부호화 방법을 설명하기 위한 순서도,
도 15는 본 발명의 제2 실시예에 따른 트리 구조를 이용한 복호화 장치를 간략하게 나타낸 블록 구성도,
도 16은 본 발명의 제2 실시예에 따른 트리 구조를 이용한 복호화 방법을 설명하기 위한 순서도이다.
1 is a block diagram schematically illustrating an encoding apparatus using a tree structure according to a first embodiment of the present invention;
2 is an exemplary diagram showing information to be encoded using a tree structure according to the first embodiment of the present invention;
3 is an exemplary diagram showing information on a region determined for each layer in a tag tree according to the first embodiment of the present invention;
4 is an exemplary diagram showing bits encoded using a tree structure according to the first embodiment of the present invention;
5 is a flowchart illustrating a coding method using a tree structure according to the first embodiment of the present invention;
6 is a block diagram schematically illustrating a decoding apparatus using a tree structure according to a first embodiment of the present invention;
7 is a flowchart illustrating a decoding method using a tree structure according to the first embodiment of the present invention;
8 is a block diagram schematically illustrating an encoding apparatus using a tree structure according to a second embodiment of the present invention;
9 is an exemplary view showing a tree structure structure according to a second embodiment of the present invention;
10 is an exemplary diagram illustrating a result of encoding information represented by a tree structure according to a second embodiment of the present invention;
11 is an exemplary diagram illustrating another method of dividing a node into lower layers according to the second embodiment of the present invention;
12 and 13 are exemplary diagrams illustrating a form of grouping when information of regions is distributed in different ways;
14 is a flowchart for explaining a coding method using a tree structure according to the second embodiment of the present invention;
15 is a block diagram schematically illustrating a decoding apparatus using a tree structure according to a second embodiment of the present invention;
16 is a flowchart for describing a decoding method using a tree structure according to the second embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명에 따른 트리 구조를 이용한 부호화/복호화 방법 및 장치를 상세하게 설명한다.Hereinafter, a method and apparatus for encoding / decoding using a tree structure according to the present invention will be described in detail with reference to the accompanying drawings.

본 발명의 실시예에서는 영상을 부호화하거나 복호화할 때, 영상에 대해 부호화하고자 하는 정보를 트리 구조를 이용하여 부호화함으로써, 부호화 효율을 향상시킨다.In an embodiment of the present invention, when encoding or decoding an image, encoding information is encoded by using a tree structure to improve encoding efficiency.

본 발명의 실시예에서 부호화하고자 하는 정보는 가변 크기의 매크로블록 크기 및 타입(Macroblock Type) 정보, 예측 및 변환을 위한 서브블록의 크기 및 타입을 나타내는 파티션 정보(Partition Information), 인트라 예측 정보, 움직임 벡터(Motion Vector), 움직임 벡터의 예측 방향(Prediction Direction), 최적의 움직임 벡터 예측 후보(Motion Vector Prediction Candidate), 임의 크기 영역의 최적의 보간 필터(Interpolation Filter), 화질 개선 필터 사용 유무, 참조 영상의 번호(Reference Picture Index), 양자화 매트릭스 번호(Quantization Matrix Index), 최적의 움직임 벡터 정밀도(Motion Vector Precision) 및 변환의 크기 정보(Transform Size Information), 영상의 화소 정보(Pixel Information), 소정 블록 내 0이 아닌 변환계수가 있는지 여부는 나타내는 정보(Coded Block Information) 또는 계수 정보(Coefficient Information) 등과 같이 영상의 영상 신호 정보나 영상 신호를 부호화하는 데 이용되는 다양한 정보가 될 수도 있다. In the embodiment of the present invention, the information to be encoded includes macroblock type information having a variable size, partition information indicating the size and type of a subblock for prediction and transformation, intra prediction information, and motion. Motion Vector, Prediction Direction of Motion Vector, Optimal Motion Vector Prediction Candidate, Optimal Interpolation Filter in Arbitrary Size Region, Use of Quality Enhancement Filter, Reference Image Reference Picture Index, Quantization Matrix Index, Optimal Motion Vector Precision, Transform Size Information, Pixel Information of Image, Within a Block Whether there is a non-zero conversion factor is equal to information indicating Coded Block Information or Coefficient Information. It may be a variety of information used to code the video signal information and video signal of the image.

또한, 소정의 영역은 가변 크기의 매크로블록이 될 수도 있고, 64x64 화소 크기의 블록, 32x32 화소 크기의 화소 블록, 16x16 화소 크기의 블록, 16x32 화소 크기의 블록, 4x16 화소 크기의 블록 등과 같이 다양한 크기의 블록일 수도 있으며, 움직임 벡터가 결정되는 블록과 같은 다양한 형태와 크기의 영역일 수 있다.In addition, the predetermined area may be a macroblock of variable size, and may have various sizes such as a 64x64 pixel block, a 32x32 pixel block, a 16x16 pixel block, a 16x32 pixel block, a 4x16 pixel block, or the like. It may be a block of or may be an area of various shapes and sizes, such as a block in which a motion vector is determined.

본 발명의 실시예에서 부호화 및 복호화는 엔트로피 부호화와 엔트로피 복호화에 적용될 수 있지만, 반드시 이에 한정되지 않고 다른 다양한 부호화 복호화에도 적용될 수도 있다.In the embodiment of the present invention, encoding and decoding may be applied to entropy encoding and entropy decoding, but the present invention is not limited thereto and may be applied to various other encoded decoding.

도 1은 본 발명의 제1 실시예에 따른 트리 구조를 이용한 부호화 장치를 간략하게 나타낸 블록 구성도이다.1 is a block diagram schematically illustrating an encoding apparatus using a tree structure according to a first embodiment of the present invention.

본 발명의 제1 실시예에 따른 트리 구조를 이용한 부호화 장치(100)는 트리 부호화기(110) 및 부가 정보 부호화기(120)를 포함하여 구성될 수 있다.The encoding apparatus 100 using the tree structure according to the first embodiment of the present invention may include a tree encoder 110 and a side information encoder 120.

트리 부호화기(110)는 영상에 대해 부호화하고자 하는 정보를 가지는 소정의 영역들을 복수 개의 그룹으로 그룹화하고, 그룹화된 영역 내의 부호화하고자 하는 정보의 최소값 또는 최대값을 그룹화된 영역의 정보로서 결정하여 레이어별 노드값을 최상위 레이어까지 반복하여 생성하며, 레이어별 노드값과 상위 레이어의 노드값 간의 차이값 또는 레이어별 노드값과 기 설정된 기준에 따라 결정되는 값 간의 차이값을 부호화한다.The tree encoder 110 groups predetermined areas having information to be encoded about an image into a plurality of groups, and determines the minimum or maximum values of the information to be encoded in the grouped area as the information of the grouped areas and for each layer. The node value is repeatedly generated to the uppermost layer, and the difference value between the node value of each layer and the node value of the upper layer or the difference value between the node value of each layer and a value determined according to a predetermined criterion is encoded.

여기서, 레이어별 노드값이란 레이어별로 그룹화된 영역의 정보의 값을 말한다. 예를 들어 최하위 레이어에서는 소정의 영역의 정보의 값이 될 수 있으며, 최하위 레이어의 상위 레이어에서는 소정의 영역들이 몇 개로 그룹화된 영역의 정보의 값이 될 수 있다. 그룹화된 영역의 정보의 값은 그룹화된 영역 내에 포함되는 소정의 영역들의 정보의 값들 중 최소값 또는 최대값으로 결정될 수 있다. 또한, 기 설정된 기준에 따라 결정되는 값은 이전 영역 또는 주위 영역 중에서 지금까지 부호화된 영역에서 가장 발생 확률이 높은 값이 될 수 있지만, 반드시 이에 한정되지 않고 다양한 기준에 따라 결정되는 값이 될 수도 있다.Here, the node value for each layer refers to a value of information of regions grouped for each layer. For example, the lowest layer may be a value of information of a predetermined region, and in the upper layer of the lowest layer, predetermined regions may be a value of information of a region grouped into several groups. The value of the information of the grouped area may be determined as the minimum or maximum value of the values of the information of the predetermined areas included in the grouped area. In addition, the value determined according to a predetermined criterion may be the value most likely to occur in the region encoded so far from the previous region or the surrounding region, but is not necessarily limited thereto and may be a value determined according to various criteria. .

이때, 트리 부호화기(110)는 단항 코드(Unary Code), 트런케이티드 단항 코드(Truncated Unary Code) 및 익스포넨셜 골룸 코드(Exp-Golomb Code) 등과 같은 다양한 이진 부호화(Binary Coding) 방법을 이용하여 레이어별 노드값과 상위 레이어의 노드값 간의 차이값을 부호화할 수 있다. 또한, 트리 부호화기(120)는 단항 코드, 트런케이티드 단항 코드, 익스포넨셜 골룸 코드 등과 같은 이진 부호화 방법으로 레이어별 노드값과 상위 레이어의 노드값 간의 차이값을 이진화한 후, 주위의 레이어 또는 상위 레이어의 노드값을 기초로 부호화하고자 하는 레이어의 노드값에 대한 부호화를 위한 확률 모델을 결정하거나 각 레이어마다 확률 모델을 달리하여 이진 산술 부호화(Binary Arithmetic Coding)할 수도 있다.In this case, the tree encoder 110 may use various binary coding methods such as unary code, truncated unary code, and exponential golem code. A difference value between the node value of each layer and the node value of an upper layer may be encoded. In addition, the tree encoder 120 binarizes the difference value between the node value of each layer and the node value of the upper layer by a binary coding method such as a unary code, a truncated unary code, an expansive golem code, and the like. A probabilistic model for encoding a node value of a layer to be encoded may be determined based on the node value of an upper layer, or binary arithmetic coding may be performed by varying the probability model for each layer.

또한, 트리 부호화기(110)는 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는 경우, 노드값이 최대값인 레이어의 하위 레이어의 노드값에 대한 부호화를 스킵한다. 즉, 트리 부호화기(120)는 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는 경우, 어느 레이어의 어느 노드값이 부호화하고자 하는 정보가 가지는 최대값이면 해당 레이어의 노드값을 부호화하고 그 하위 레이어의 노드값들은 모두 같은 값을 가진다고 가정하여 부호화하지 않는다. 반대로, 레이어별 노드값을 하위 레이어의 노드값들 중 최대값으로 결정하는 경우, 노드값이 최소값인 레이어의 하위 레이어의 노드값에 대한 부호화를 스킵한다. 즉, 트리 부호화기(110)는 레이어별 노드값을 하위 레이어의 노드값들 중 최대값으로 결정하는 경우, 어느 레이어의 어느 노드값이 부호화하고자 하는 정보가 가지는 최소값이면 해당 레이어의 노드값을 부호화하고 그 하위 레이어의 노드값들은 모두 같은 값을 가진다고 가정하여 부호화하지 않는다.In addition, when determining the node value of each layer as the minimum value among the node values of the lower layer, the tree encoder 110 skips encoding of the node value of the lower layer of the layer having the maximum node value. That is, when determining the node value of each layer as the minimum value among the node values of the lower layer, the tree encoder 120 encodes the node value of the corresponding layer if the node value of any layer is the maximum value of information to be encoded. The node values of the lower layer are not encoded on the assumption that they all have the same value. On the contrary, when the node value for each layer is determined as the maximum value among the node values of the lower layer, encoding of the node value of the lower layer of the layer having the minimum node value is skipped. That is, when determining the node value for each layer as the maximum value among the node values of the lower layer, the tree encoder 110 encodes the node value of the corresponding layer if the node value of the layer is the minimum value of the information to be encoded. The node values of the lower layer are not encoded on the assumption that they all have the same value.

또한, 트리 부호화기(110)는 부호화하고자 하는 정보의 발생 확률에 따라 부호화를 위해 부호화하고자 하는 정보에 할당되는 부호 번호(Code Number)를 변경하여, 발생 확률에 따라 작은 부호 번호 또는 큰 부호 번호를 할당할 수 있다. 이때, 부호화하고자 하는 정보의 발생 확률은 주위의 소정의 영역의 정보의 발생 확률 또는 부호화하고자 하는 정보가 포함되는 전체 또는 일부의 영역 내에서 이제까지 부호화된 영역의 정보의 발생 확률 등과 같은 다양한 발생 확률을 이용하여 계산될 수 있다.In addition, the tree encoder 110 changes a code number assigned to information to be encoded for encoding according to the occurrence probability of the information to be encoded, and allocates a small code number or a large code number according to the occurrence probability. can do. In this case, the occurrence probability of the information to be encoded may include various occurrence probabilities such as the occurrence probability of the information of a predetermined area or the occurrence probability of the information of the region encoded so far in all or part of the region including the information to be encoded. Can be calculated using.

트리 부호화기(110)는 최상위 레이어의 노드값을 부호화하는 경우, 최상위 레이어의 상위 레이어가 없으므로 최상위 레이어의 상위 레이어의 노드값을 소정의 값으로 설정하고, 최상위 레이어의 노드값과 설정된 소정의 값 간의 차이값을 부호화할 수 있다. 여기서, 최상위 레이어의 상위 레이어의 노드값으로서 설정되는 소정의 값은 부호화하고자 하는 정보가 포함되는 전체 또는 일부의 영역에서 이제까지 부호화되면서 가장 발생 확률이 높은 정보의 값, 미리 설정된 값, 주위의 소정의 영역의 정보의 값들 중에서 가장 발생 확률이 높은 값 등과 같이 다양한 값으로 설정될 수 있다.When the tree encoder 110 encodes the node value of the top layer, since there is no upper layer of the top layer, the tree encoder 110 sets the node value of the top layer of the top layer to a predetermined value, and between the node value of the top layer and the predetermined value. The difference value can be encoded. Here, the predetermined value set as the node value of the upper layer of the uppermost layer is a value of the information most likely to occur while being encoded in the whole or part of the area including the information to be encoded, the predetermined value, and the predetermined predetermined value. Among the information values of the region, various values may be set, such as a value having the highest occurrence probability.

부가 정보 부호화기(110)는 제1 실시예에 따른 트리 구조를 이용하여 소정의 영역의 정보를 부호화하는 데 이용되는 부가 정보를 부호화한다. 여기서, 부가 정보란 레이어의 최대 개수에 대한 정보, 최하위 레이어의 영역의 크기에 대한 정보 및 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부에 대한 정보 등과 같은 정보가 될 수 있다. 이와 같이 부호화된 부가 정보는 비트스트림의 시퀀스 헤더, 픽처 헤더, 슬라이스 헤더 등 소정의 부호화 단위의 헤더에 포함될 수 있다.The additional information encoder 110 encodes additional information used to encode information of a predetermined region by using the tree structure according to the first embodiment. Here, the additional information means information on the maximum number of layers, information on the size of the region of the lowest layer, information on whether the node value for each layer is determined as the minimum value or the maximum value among the node values of the lower layer. The same information can be. The additional information encoded as described above may be included in a header of a predetermined coding unit such as a sequence header, a picture header, and a slice header of the bitstream.

이하에서는 도 2 내지 도 4를 통해 트리 구조를 이용하여 부호화하고자 하는 정보를 부호화하는 과정에 대해 상세히 설명한다.Hereinafter, a process of encoding information to be encoded using a tree structure will be described in detail with reference to FIGS. 2 to 4.

도 2는 본 발명의 제1 실시예에 따라 트리 구조를 이용하여 부호화하고자 하는 정보와 각 정보에 할당된 부호 번호를 나타낸 예시도이다.FIG. 2 is an exemplary diagram showing information to be encoded using a tree structure and code numbers assigned to each information according to the first embodiment of the present invention.

도 2에서는 영상의 매크로블록이 64x64 화소 크기의 블록이고 매크로블록이 8x16 화소 크기의 서브블록으로 분할되어 인터 예측 부호화되는 경우, 각 8x16 화소 크기의 서브블록별로 결정된 움직임 벡터의 정밀도를 예시적으로 나타내었다. 이 경우, 부호화하고자 하는 정보는 소정의 영역에 대한 움직임 벡터 정밀도가 되며, 소정의 영역은 8x16 화소 크기의 서브블록이 된다.FIG. 2 exemplarily shows the precision of a motion vector determined for each 8x16 pixel sized subblock when the macroblock of an image is a 64x64 pixel sized block and the macroblock is divided into 8x16 pixel sized subblocks and inter prediction encoded. It was. In this case, the information to be encoded is a motion vector precision for a predetermined region, and the predetermined region is a subblock having a size of 8x16 pixels.

부호화하고자 하는 데이터의 값을 그대로 이용하여 부호화할 수도 있으며 부호화하고자 하는 데이터에 부호번호를 할당하여 부호화할 수도 있다. 부호 번호를 할당하는 방법은 데이터의 발생 확률에 따라 다양하게 변경될 수 있으며, 도 2의 실시예에서는 1/2 정밀도에 대해 부호 번호 1을, 1/4 정밀도에 대해 부호 번호 2를, 1/8 정밀도에 대해 부호 번호 3을 각각 할당한 예를 나타내었다.본 발명의 제1 실시예에 따른 부호화 장치(100)는 도 2에 도시한 각 움직임 벡터의 정밀도에 부호 번호를 할당하고 도 3에 도시한 바와 같이 트리 구조를 이용하여 부호화하기 위해 소정의 영역을 소정의 개수로 그룹화하고 그룹화된 영역의 정보를 그룹화된 영역 내에 포함된 정보를 기초로 결정하는 과정을 레이어별로 반복하여 레이어별 노드값을 결정할 수 있다.The data to be encoded may be encoded as it is, or may be encoded by assigning a code number to the data to be encoded. The method of assigning a code number may be variously changed according to the occurrence probability of the data. In the embodiment of FIG. 2, the code number 1 for 1/2 precision, the code number 2 for 1/4 precision, and 1 / 8 shows an example of allocating the code number 3 to the 8 precision. The encoding apparatus 100 according to the first embodiment of the present invention allocates the code number to the precision of each motion vector shown in FIG. As shown in the figure, the process of grouping a predetermined area into a predetermined number for encoding using a tree structure and determining the information of the grouped area based on the information contained in the grouped area for each layer is repeated. Can be determined.

도 3은 본 발명의 제1 실시예에 따라 레이어별 결정되는 영역의 정보를 태그 트리로 나타낸 예시도이다.FIG. 3 is an exemplary diagram showing information on regions determined for each layer according to a first embodiment of the present invention as a tag tree.

영상 부호화 장치(100)는 도 2에 도시한 바와 같은 부호화하고자 하는 정보를 트리 구조를 이용하여 부호화하기 위해, 4개의 8x16 화소 크기의 서브블록을 모아 그룹화하고 그룹화된 영역의 정보는 각 그룹화된 영역 내에 포함되는 정보들의 최소값으로 결정하는 과정을 최상위 레이어까지 반복하여 도 3과 같이 트리 구조의 구조를 결정한다.In order to encode the information to be encoded as shown in FIG. 2 using a tree structure, the image encoding apparatus 100 collects and groups four 8x16 pixel subblocks, and the information of the grouped areas is grouped. The process of determining the minimum value of the information included therein is repeated to the uppermost layer to determine the structure of the tree structure as shown in FIG. 3.

이후, 영상 부호화 장치(100)는 트리 구조를 기초로 정보를 부호화하는 데 이용되는 부가 정보로서, 트리 구조의 레이어의 최대 개수에 대한 정보, 최하위 레이어의 영역의 크기에 대한 정보, 레이어별 그룹화된 영역의 정보를 하위 레이어의 영역의 정보들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부에 대한 정보 등을 부호화한다. 다만, 최하위 레이어의 영역의 크기에 대한 정보 대신 그룹화되는 영역의 개수에 대한 정보가 부가 정보에 포함되어 부호화될 수 있다. 도 3에서, 부가 정보인 트리 구조의 레이어의 최대 개수는 4개이고, 최하위 레이어의 영역의 크기는 8x16 화소 크기이며, 레이어별 그룹화된 영역의 정보는 하위 레이어의 영역의 정보들의 최소값이다. 이때, 최하위 레이어의 영역의 크기를 부가 정보로서 부호화하는 대신 그룹화되는 영역의 개수인 4개가 부호화 정보로서 부호화될 수도 있다.Subsequently, the image encoding apparatus 100 is additional information used to encode information based on a tree structure, and includes information on the maximum number of layers of the tree structure, information on the size of the region of the lowest layer, and grouping by layer. Information about whether the information of the region is determined as the minimum value or the maximum value among the information of the region of the lower layer is encoded. However, information on the number of areas to be grouped may be included in the additional information and encoded instead of information on the size of the area of the lowest layer. In FIG. 3, the maximum number of layers of the tree structure as additional information is four, the size of the region of the lowest layer is 8x16 pixels, and the information of the region grouped by layers is the minimum value of the information of the region of the lower layer. At this time, instead of coding the size of the area of the lowermost layer as additional information, four pieces of the number of areas to be grouped may be encoded as coding information.

도 3을 참조하면, 레이어 3의 첫 번째 4개의 영역들의 부호 번호의 최소값은 정밀도 1/2을 의미하는 부호번호 1이므로 레이어 2의 첫 번째 영역의 정보의 값은 정밀도 1/2을 의미하는 부호번호 1이 된다. 이와 같은 방법으로 레이어 3으로부터 레이어 0까지 레이어별로 영역을 그룹화하고 그룹화된 영역 내에 포함된 영역의 정보들의 최소값을 그룹화된 영역의 정보의 값으로 결정하는 과정을 거쳐 도 3과 같은 트리의 구조가 결정된다.Referring to FIG. 3, since the minimum value of the code number of the first four areas of the layer 3 is code number 1 meaning precision 1/2, the value of the information of the first area of the layer 2 is code meaning precision 1/2. It becomes number 1. In this way, the structure of the tree as shown in FIG. 3 is determined by grouping regions by layer from layer 3 to layer 0 and determining a minimum value of information of regions included in the grouped region as a value of information of grouped regions. do.

부호화 장치(100)는 도 3과 같은 트리의 구조가 결정되면, 상위 레이어에서 하위 레이어로 부호 비트를 생성하여 부호화한다. 또한, 부호화 장치(100)는 부호화할 정보의 값의 최대값을 알고 있으므로, 트런케이티드 단항 코드를 이용하여 이진화 비트열을 생성할 수도 있다.When the structure of the tree as shown in FIG. 3 is determined, the encoding apparatus 100 generates and encodes a code bit from an upper layer to a lower layer. In addition, since the encoding apparatus 100 knows the maximum value of the information to be encoded, the encoding apparatus 100 may generate a binarized bit string using the truncated unary code.

이때 각 레이어의 노드를 부호화 하는 방법은 상위노드값과의 차이값을 부호화하는데 차이값을 부호화하는 방법은 차이값만큼의 이진비트 '0'을 부호화하고 끝에 이진비트 1을 부호화한다. 만약 현재 부호화할 노드값이 상위노드값과 차이가 없을 때는 이진비트 '1'을 부호화한다. At this time, a method of encoding a node of each layer encodes a difference value from an upper node value, and a method of encoding a difference value encodes a binary bit '0' as much as a difference value and encodes a binary bit 1 at the end. If the node value to be encoded is not different from the upper node value, the binary bit '1' is encoded.

좀 더 상세하게, 각 노드값을 부호화하는 방법은 다음의 설명하는 (1)~(3)의 경우를 제외하고 부호화하려는 현재노드와 상위노드값과의 차이값을 이진비트 '0'과 '1'을 이용하여 부호화한다. 차이값만의 개수만큼 이진비트 '0'을 부호화하고 끝에 이진비트 1을 부호화한다. 만약 현재 부호화할 노드값이 상위노드값과 차이가 없을 때는 이진비트 '1'을 부호화한다(반대로 차이값의 개수만큼 '1'을 부호화하고 차이가 없을 때 '0'을 부호화할 수도 있다).More specifically, except for the following cases (1) to (3), the method of encoding each node value is a binary bit '0' and '1'. Encode using '. Binary bit '0' is encoded as many as the difference value, and binary bit 1 is encoded at the end. If the node value to be encoded is not different from the upper node value, the binary bit '1' is encoded (or '1' may be encoded as many as the number of difference values and '0' may be encoded if there is no difference).

(1) 각 노드값을 부호화할 때 상위노드값이 부호화할 데이터가 가질수 있는 최대값인 경우 하위노드들은 상위노드 값보다 큰 값을 가질 수 없으므로 부호화하지 않는다. 즉, 하위노드들은 모두 상위노드의 부호 번호와 같은 값을 가진다. (1) When encoding the value of each node, if the upper node value is the maximum value of the data to be encoded, the lower nodes cannot have a value larger than the upper node value and thus are not encoded. That is, the lower nodes all have the same value as the sign number of the upper node.

(2) 차이값을 부호화하는 경우 현재 노드의 값이 부호화할 데이터의 값 또는 부호번호가 가질수 있는 최대값인 경우, 상위노드와의 차이값만큼 이진 비트 '0'을 부호화하고 끝에 현재 노드 부호화의 종료를 나타내는 '1'을 부호화하지 않는다. 예를 들어 부호화할 데이터가 가질 수 있는 최대값이 3이고 상위노드의 값이 1, 현재 부호화대상 노드의 값이 3인 경우, 이진비트 '00'을 부호화한다.(2) When encoding the difference value If the value of the current node is the maximum value of the data or code number to be encoded, the binary bit '0' is encoded as much as the difference value with the upper node, and then Do not encode '1' indicating termination. For example, when the maximum value of the data to be encoded is 3, the value of the upper node is 1, and the value of the current encoding target node is 3, the binary bit '00' is encoded.

(3) 같은 상위노드를 가지는 노드들 중 마지막 노드값을 부호화할 때 마지막 노드를 제외한 노드들의 값이 상위노드의 값보다 모두 큰 경우 마지막 노드값은 부호화하지 않는다. (3) When encoding the last node value among nodes having the same higher node, if the values of nodes except the last node are all greater than the value of the upper node, the last node value is not encoded.

최상위 노드를 부호화할때는 부호화할 데이터 또는 부호번호가 가질수 있는 최소값과의 차이값을 위에 설명한 이진비트 0과 1을 사용하여 부호화한다. 또한 가장 상위노드 값을 부호화하는 또 다른 방법으로 발생확률이 가장 높은 데이터 또는 부호 번호와의 차이값을 부호화할 수도 있다.When encoding the most significant node, the difference value from the minimum value of the data or code number to be encoded is encoded using binary bits 0 and 1 described above. In addition, another method of encoding the highest node value may encode a difference value with the data having the highest probability of occurrence or the code number.

도 4는 본 발명의 제1 실시예에 따라 트리 구조를 이용하여 도 2의 움직임 벡터의 정밀도를 부호화된 비트를 나타낸 예시도이다.4 is an exemplary diagram illustrating bits in which the precision of the motion vector of FIG. 2 is encoded by using a tree structure according to the first embodiment of the present invention.

도 4에서는 도 2에 도시한 영역들의 정보들을 트리 구조를 이용하여 부호화하여 생성된 비트들을 해당 영역들과 대응하여 나타내었다. 이하에서는 도 4를 참조하여 도 2에 도시한 영역의 정보들을 도 3에 도시한 트리 구조를 이용하여 부호화하는 과정을 설명한다. 후술하는 부호화 과정 설명에서 노드값은 부호 번호를 의미한다.In FIG. 4, bits generated by encoding information of regions illustrated in FIG. 2 using a tree structure are shown corresponding to the regions. Hereinafter, a process of encoding the information of the region illustrated in FIG. 2 using the tree structure illustrated in FIG. 3 will be described with reference to FIG. 4. In the following description of the encoding process, the node value means a code number.

영역 (0,0)의 경우, 최상위 레이어인 레이어 0에서 상위 레이어는 없으므로, (만약 1/2 정밀도가 가장 높은 발생 확률을 가진다고 가정하면) 상위 레이어의 노드값이 1(정밀도 1/2)로 설정되어 최상위 레이어의 노드값과 그 상위 레이어의 노드값 간의 차이값은 0이 되고 0을 이진 비트열로 나타내면 1이 된다. 레이어 1에서 (0,0)의 노드값은 1(정밀도 1/2)이고 그 상위 레이어의 노드값은 1(정밀도 1/2)이므로, 그 차이값은 0이 되고 0을 이진 비트열로 나타내면 1이 된다. 레이어 2에서 (0,0)의 노드값은 1(정밀도 1/2)이고 그 상위 레이어의 노드값은 1(정밀도 1/2)이므로, 그 차이값은 0이 되고 0을 이진 비트열로 나타내면 1이 된다. 레이어 3에서 (0,0)의 노드값은 1(정밀도 1/2)이고 그 상위 레이어의 노드값은 1(정밀도 1/2)이므로, 그 차이값은 0이 되고 0을 이진 비트열로 나타내면 1이 된다. 따라서, 도 1에 도시한 영역들 중 (0,0) 영역의 정보를 부호화한 이진 비트열은 1111이 된다.
In the case of region (0,0), there is no higher layer in layer 0, the highest layer, so the node value of the upper layer is 1 (1/2 precision) (assuming 1/2 precision has the highest occurrence probability). The difference value between the node value of the uppermost layer and the node value of the upper layer is 0, and 0 is represented by a binary bit string. In node 1, the node value of (0,0) is 1 (1/2 precision) and the node value of the upper layer is 1 (1/2 precision), so the difference is 0 and 0 is represented as a binary bit string. It becomes 1. In Layer 2, the node value of (0,0) is 1 (1/2 precision) and the node value of the upper layer is 1 (1/2 precision), so the difference is 0 and 0 is represented as a binary bit string. It becomes 1. In layer 3, the node value of (0,0) is 1 (1/2 precision) and the node value of the upper layer is 1 (1/2 precision), so the difference is 0 and 0 is represented as a binary bit string. It becomes 1. Therefore, the binary bit string encoding the information of the region (0,0) of the regions shown in FIG. 1 becomes 1111.

영역 (0,1)의 경우, 레이어 0, 레이어 1, 레이어 2의 노드값은 영역 (0,0)의 노드값을 부호화하는 과정에서 이미 부호화되었으므로 부호화되지 않고, 레이어 3의 노드값만이 부호화된다. 레이어 3에서 (0,1)의 노드값은 2(정밀도 1/4)이고 그 상위 레이어의 노드값은 1(정밀도 1/2)이므로, 부호 번호간의 차이값은 1이 되고 1을 이진 비트열로 나타내면 01이 된다. 따라서, 도 2에 도시한 영역들 중 (0,1) 영역의 정보를 부호화한 이진 비트열은 01이 된다.In the case of region (0,1), the node values of layer 0, layer 1, and layer 2 are not encoded because they are already encoded in the process of encoding the node values of region (0,0), and only node values of layer 3 are encoded. do. In Layer 3, the node value of (0,1) is 2 (1/4 precision) and the node value of the upper layer is 1 (1/2 precision), so the difference between the code numbers is 1 and 1 is a binary bit string. It is 01. Therefore, the binary bit string encoding the information of the region (0,1) among the regions shown in FIG. 2 becomes 01.

영역 (0,4)의 경우, 레이어 0의 노드값은 영역 (0,0)의 노드값을 부호화하는 과정에서 이미 부호화되었으므로 부호화되지 않고, 레이어 1, 레이어 2 및 레이어 3의 노드값만이 부호화된다. 레이어 1에서 (0,1)의 노드값은 1(정밀도 1/2)이고 그 상위 레이어의 노드값은 1(정밀도 1/2)이므로, 그 차이값은 1이 되고 1을 이진 비트열로 나타내면 01이 된다. 레이어 2에서 (0,2)의 노드값은 2(정밀도 1/4)이고 그 상위 레이어의 노드값은 2(정밀도 1/4)이므로, 그 차이값은 0이 되고 0을 이진 비트열로 나타내면 1이 된다. 레이어 3에서 (0,4)의 노드값은 2(정밀도 1/4)이고 그 상위 레이어의 노드값은 2(정밀도 1/4)이므로, 그 차이값은 0이 되고 0을 이진 비트열로 나타내면 1이 된다. 따라서, 도 1에 도시한 영역들 중 (0,4) 영역의 정보를 부호화한 이진 비트열은 0111이 된다.In the case of region (0,4), the node value of layer 0 is not encoded since the node value of region (0,0) has already been encoded, and only the node values of layer 1, layer 2, and layer 3 are encoded. do. In Layer 1, the node value of (0,1) is 1 (1/2 precision) and the node value of the upper layer is 1 (1/2 precision), so the difference is 1 and 1 is represented as a binary bit string. It becomes 01. In layer 2, the node value of (0,2) is 2 (1/4 precision) and the node value of the upper layer is 2 (1/4 precision), so the difference is 0 and 0 is represented as a binary bit string. It becomes 1 In layer 3, the node value of (0,4) is 2 (1/4 precision) and the node value of the upper layer is 2 (1/4 precision), so the difference is 0 and 0 is represented as a binary bit string. It becomes 1 Therefore, the binary bit string encoding the information of the region (0,4) of the regions shown in FIG. 1 becomes 0111.

영역 (2,0)의 경우, 레이어 0와 레이어 1의 노드값은 이미 부호화되었으므로 부호화되지 않고, 레이어 2 및 레이어 3의 노드값만이 부호화된다. 레이어 2에서 (1,0)의 노드값은 3(정밀도 1/8)이고 그 상위 레이어의 노드값은 1(정밀도 1/2)이므로, 그 차이값은 최대값인 2가 되고 해당 노드값이 3(정밀도 1/8)이므로 트런케이티드 단항 코드로 이진 비트열을 생성하면 00이 된다. 최대값이 나왔으므로 해당 노드의 하위 레이어의 노드값들은 부호화하지 않는다.In the case of the region (2,0), the node values of the layer 0 and the layer 1 are already encoded and thus are not encoded, and only the node values of the layer 2 and the layer 3 are encoded. In Layer 2, the node value of (1,0) is 3 (1/8 precision) and the node value of the upper layer is 1 (1/2 precision), so the difference is 2, the maximum value, and the node value is Since it is 3 (1/8 precision), generating a binary bit string with a truncated unary code is 00. Since the maximum value is found, the node values of the lower layer of the node are not encoded.

영역 (2,6)의 경우도 마찬가지로, 레이어 0와 레이어 1의 노드값은 이미 부호화되었으므로 부호화되지 않고, 레이어 2 및 레이어 3의 노드값만이 부호화된다. 레이어 2에서 (0,1)의 노드값은 3(정밀도 1/8)이고 상위 레이어의 노드값은 2(정밀도 1/4)이므로, 그 차이값은 1이 되고 해당 노드값이 3(정밀도 1/8)이므로 트런케이티드 단항 코드로 이진 비트열을 만들면 0이 된다. 이때도 최대값이 나왔으므로 하위 레이어의 노드값들은 부호화되지 않는다.Similarly, in the case of the regions (2, 6), the node values of the layer 0 and the layer 1 are already encoded, and thus are not encoded, and only the node values of the layer 2 and the layer 3 are encoded. In Layer 2, the node value of (0,1) is 3 (1/8 precision) and the node value of the upper layer is 2 (1/4 precision), so the difference is 1 and the node value is 3 (precision 1). / 8), so if you create a binary bit string with a truncated unary code, it will be zero. In this case, because the maximum value is obtained, the node values of the lower layer are not encoded.

부호화 장치(100)는 산술 부호화를 하는 경우, 생성된 이진 비트열을 주위 영역의 정보 또는 이진 비트열을 이용하여 확률 모델을 생성하고 산술 부호화한다. 부호화 장치(100)는 산술 부호화하지 않는 경우, 생성된 이진 비트열을 비트스트림에 포함시킨다.In the case of arithmetic encoding, the encoding apparatus 100 generates and performs arithmetic encoding on the generated binary bit stream using information of the surrounding area or the binary bit stream. If the arithmetic coding is not performed, the encoding apparatus 100 includes the generated binary bit string in the bitstream.

이와 같은 방식으로 도 2에서 예시적으로 나타낸 정보를 트리 구조를 이용하여 부호화하면 비트스트림이 생성된다.In this manner, when the information illustrated in FIG. 2 is encoded using a tree structure, a bitstream is generated.

도 2 내지 도 4를 통해서는 1/2 정밀도에 부호 번호 1가, 1/4 정밀도에 부호 번호 2가, 1/8 해상도에 부호 번호 3이 할당되어 부호화되는 것으로 예를 들었지만, 주위 영역의 정보 또는 이미 부호화된 정보의 발생 확률 등을 이용하여 부호 번호가 정밀도마다 다르게 할당될 수도 있을 것이다.2 through 4, the code number 1 is assigned with 1/2 precision, the code number 2 is assigned with 1/4 precision, and the code number 3 is assigned with 1/8 resolution and encoded. Alternatively, a code number may be differently assigned for each precision by using a probability of occurrence of already encoded information.

도 5는 본 발명의 제1 실시예에 따른 트리 구조를 이용한 부호화 방법을 설명하기 위한 순서도이다.5 is a flowchart illustrating a coding method using a tree structure according to the first embodiment of the present invention.

본 발명의 제1 실시예에 따른 트리 구조를 이용한 부호화 방법에 따르면, 부호화 장치(100)는 영상에 대해 부호화하고자 하는 정보를 가지는 소정의 영역들을 복수 개의 그룹으로 그룹화하고, 그룹화된 영역 내의 부호화하고자 하는 정보의 최소값 또는 최대값을 그룹화된 영역의 정보로서 결정하여 레이어별 노드값을 최상위 레이어까지 생성하며(S510), 레이어별 노드값과 상위 레이어의 노드값 간의 차이값을 부호화하며(S520), 레이어의 최대 개수에 대한 정보, 최하위 레이어의 영역의 크기에 대한 정보 및 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부에 대한 정보를 포함하는 부가 정보를 부호화한다(S530).According to the encoding method using the tree structure according to the first embodiment of the present invention, the encoding apparatus 100 is to group predetermined regions having information to be encoded with respect to an image into a plurality of groups, and to encode within the grouped regions. The minimum value or the maximum value of the information is determined as the information of the grouped region to generate the node value for each layer up to the highest layer (S510), and encode a difference value between the node value for each layer and the node value of the upper layer (S520). Additional information including information on the maximum number of layers, information on the size of the region of the lowest layer, and information on whether the node value of each layer is determined as the minimum value or the maximum value among the node values of the lower layer. Code (S530).

여기서, 부호화 장치(100)는 단계 S530를 반드시 수행해야 하는 것은 아니며, 구현 방식이나 필요에 따라 선택적으로 수행할 수 있다. 예를 들어, 부호화 장치(100)와 후술할 복호화 장치가 서로 간에 레이어의 최대 개수, 최하위 레이어의 영역의 크기 및 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부 중 하나 이상을 약속하여 미리 설정한 경우에는 미리 약속하여 설정한 정보에 대해서는 부호화하지 않고 미리 약속하지 않은 정보에 대해서만 부호화할 수 있다. 만약 모든 정보가 미리 약속되어 설정된 경우에는 부가 정보는 부호화되지 않을 수 있다.Here, the encoding apparatus 100 does not necessarily have to perform step S530, and may selectively perform the method according to an implementation method or need. For example, the encoding apparatus 100 and the decoding apparatus to be described later determine the maximum number of layers, the size of the region of the lowest layer, and the node value for each layer as the minimum value or the maximum value among the node values of the lower layer. In the case where one or more of the information is promised and set in advance, only information that is not promised in advance may be encoded without encoding the information set in advance. If all the information is set in advance, the additional information may not be encoded.

단계 S530에서, 부호화 장치(100)는 최하위 레이어의 영역의 크기에 대한 정보 대신 그룹화되는 영역의 개수에 대한 정보를 부호화 정보에 포함시켜 부호화할 수 있다. 이는, 레이어의 최대 개수가 결정된 경우 그룹화되는 영역의 개수가 결정되는 최하위 레이어의 영역의 크기도 결정될 수 있기 때문이다.In operation S530, the encoding apparatus 100 may encode information by including information about the number of regions to be grouped in encoding information instead of information about the size of the region of the lowest layer. This is because, when the maximum number of layers is determined, the size of the region of the lowest layer where the number of regions to be grouped is determined may also be determined.

단계 S520에서, 부호화 장치(100)는 이진 부호화 방법을 이용하여 차이값을 부호화하거나 이진 부호화 방법을 이용하여 차이값을 부호화한 후 확률 모델을 변경하여 이진 산술 부호화할 수 있다. 이때, 확률 모델은 주위의 레이어 또는 상위 레이어의 노드값을 기초로 결정되거나 각 레이어마다 다르게 변경될 수 있다.In operation S520, the encoding apparatus 100 may encode the difference value using the binary encoding method, or may encode the difference value using the binary encoding method, and then change the probability model to perform binary arithmetic encoding. In this case, the probabilistic model may be determined based on the node value of the surrounding layer or the upper layer or may be changed for each layer differently.

단계 S520에서, 부호화 장치(100)는 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는 경우, 노드값이 최대값인 노드의 하위 레이어의 노드값에 대한 부호화를 스킵할 수 있으며, 레이어별 노드값을 하위 레이어의 노드값들 중 최대값으로 결정하는 경우, 노드값이 최소값인 레이어의 하위 레이어의 노드값에 대한 부호화를 스킵할 수 있다.In operation S520, when the node value for each layer is determined as the minimum value among the node values of the lower layer, the encoding apparatus 100 may skip encoding the node value of the lower layer of the node having the maximum node value. When the node value for each layer is determined as the maximum value among the node values of the lower layer, encoding of the node value of the lower layer of the layer having the minimum node value may be skipped.

단계 S520에서, 부호화 장치(100)는 부호화하고자 하는 정보의 발생 확률에 따라 부호화를 위해 부호화하고자 하는 정보에 할당되는 부호 번호를 변경할 수 있다.In operation S520, the encoding apparatus 100 may change a code number allocated to the information to be encoded for encoding according to the occurrence probability of the information to be encoded.

단계 S520에서, 부호화 장치(100)는 최상위 레이어의 노드값을 부호화하는 경우, 최상위 레이어의 상위 레이어의 노드값을 소정의 값으로 설정하고, 최상위 레이어의 노드값과 설정된 소정의 값 간의 차이값을 부호화할 수 있다.In operation S520, when encoding the node value of the uppermost layer, the encoding apparatus 100 sets the node value of the upper layer of the uppermost layer to a predetermined value, and sets the difference value between the node value of the uppermost layer and the predetermined predetermined value. Can be encoded.

도 6은 본 발명의 제1 실시예에 따른 트리 구조를 이용한 복호화 장치를 간략하게 나타낸 블록 구성도이다.6 is a block diagram schematically illustrating a decoding apparatus using a tree structure according to a first embodiment of the present invention.

본 발명의 제1 실시예에 따른 트리 구조를 이용한 복호화 장치(600)는 부가 정보 복호화기(610) 및 트리 복호화기(620)를 포함하여 구성될 수 있다.The decoding apparatus 600 using the tree structure according to the first embodiment of the present invention may include a side information decoder 610 and a tree decoder 620.

부가 정보 복호화기(610)는 비트스트림을 복호화하여 레이어의 최대 개수에 대한 정보, 최하위 레이어의 영역의 크기에 대한 정보 및 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부에 대한 정보를 포함하는 부가 정보를 복원한다. 이와 같이 복원되는 부가 정보는 트리 복호화기(620)가 트리 구조를 복원하여 레이어별 노드값과 상위 레이어의 노드값 간의 차이값 또는 레이어별 노드값과 기 설정된 기준에 따라 결정되는 값 간의 차이값을 복원하는 데 이용된다. 이때, 부가 정보 복호화기(610)는 비트스트림의 헤더에서 부가 정보가 부호화된 데이터를 추출하고 복호화하여 부가 정보를 복원하는데, 비트스트림의 헤더는 매크로블록 헤더, 슬라이스 헤더, 픽처 헤더, 시퀀스 헤더 등일 수 있다. 기 설정된 기준에 따라 결정되는 값은 이전 영역 또는 주위 영역 중에서 지금까지 복호화된 영역에서 가장 발생 확률이 높은 값이 될 수 있지만, 반드시 이에 한정되지 않고 다양한 기준에 따라 결정되는 값이 될 수도 있다.The additional information decoder 610 decodes the bitstream to determine information on the maximum number of layers, information on the size of the region of the lowest layer, and a node value for each layer as the minimum value among the node values of the lower layer. The additional information including the information on whether or not to determine is restored. The additional information restored as described above may be obtained by the tree decoder 620 restoring the tree structure to obtain a difference value between the node value of each layer and the node value of the upper layer, or a difference value between the node value of each layer and a value determined according to a predetermined criterion. It is used to restore. In this case, the additional information decoder 610 extracts and decodes the data encoded with additional information from the header of the bitstream to restore the additional information. The header of the bitstream may be a macroblock header, a slice header, a picture header, a sequence header, or the like. Can be. The value determined according to the preset criterion may be the value most likely to occur in the region decoded so far from the previous region or the surrounding region, but is not necessarily limited thereto and may be a value determined according to various criteria.

다만, 부호화 정보 복호화기(610)는 반드시 복호화 장치(600)에 포함되어야 하는 것은 아니며, 구현 방식이나 필요에 따라 선택적으로 포함될 수 있다. 예를 들어, 부호화 장치(100)와 복호화 장치(600)가 서로 레이어의 최대 개수, 최하위 레이어의 영역의 크기 및 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부 등에 대해 미리 약속한 경우, 부호화 장치(100)는 부가 정보를 부호화하지 않을 수 있으며 그에 따라 복호화 장치(600)도 비트스트림을 복호화하여 부가 정보를 복원하지 않고 기 설정된 부가 정보를 이용하여 트리 구조를 복원할 수 있다.However, the encoded information decoder 610 is not necessarily included in the decoding apparatus 600, and may be selectively included according to an implementation method or need. For example, the encoding apparatus 100 and the decoding apparatus 600 determine the maximum number of layers, the size of the region of the lowest layer, and the node value for each layer as the minimum value or the maximum value among the node values of the lower layer. If it is promised in advance, the encoding apparatus 100 may not encode the additional information, and accordingly, the decoding apparatus 600 also decodes the bitstream and restores the additional information without using the preset additional information. You can restore the structure.

트리 복호화기(620)는 부가 정보를 이용하여 비트스트림을 복호화하여 레이어별 노드값과 상위 레이어의 노드값 간의 차이값 또는 레이어별 노드값과 기 설정된 기준에 따라 결정되는 값 간의 차이값을 복원하고, 복원되는 차이값과 상위 레이어의 노드값을 더하여 레이어별 노드값을 복원하며, 최하위 레이어의 노드값을 복호화하고자 하는 정보로서 복원한다. 즉, 트리 복호화기(620)는 기 설정되거나 부가 정보 복호화기(610)에 의해 복원되는 부가 정보를 이용하여 개선된 트리 구조를 복원하고, 개선된 트리 구조를 기초로 비트스트림을 복호화하여 레이어별 노드값과 상위 레이어의 노드값 간의 차이값을 복원하고 복원되는 차이값과 상위 레이어의 노드값을 더하여 레이어별 노드값을 복원한다.The tree decoder 620 decodes the bitstream using additional information to restore the difference between the node value of each layer and the node value of the upper layer, or the difference value between the node value of each layer and a value determined according to a predetermined criterion. The node value of each layer is restored by adding the restored difference value and the node value of the upper layer, and the node value of the lowest layer is restored as information to be decoded. That is, the tree decoder 620 restores the improved tree structure by using the additional information which is preset or reconstructed by the side information decoder 610, and decodes the bitstream based on the improved tree structure for each layer. Restore the difference between the node value and the node value of the upper layer, and restore the node value for each layer by adding the restored difference value and the node value of the upper layer.

이때, 트리 복호화기(620)는 단항 코드, 트런케이티드 단항 코드 및 익스포넨셜 골룸 코드 등과 같은 다양한 이진 복호화(Binary Decoding) 방법을 이용하여 비트스트림을 복호화하여 레이어별 노드값과 상위 레이어와의 차이값을 복원할 수 있다. 또한, 트리 복호화기(620)는 단항 코드, 트런케이티드 단항 코드 및 익스포넨셜 골룸 코드 등과 같은 다양한 이진 복호화 방법을 이용하여 비트스트림을 복호화한 후, 주위 레이어 또는 상위 레이어의 노드값으로 복호화하고자 하는 레이어의 확률 모델을 결정하여 이진 산술 복호화(Binary Arithmetic Decoding)할 수도 있다. 또한, 트리 복호화기(620)는 각 레이어마다 확률 모델을 다르게 변경하여 비트스트림을 산술 복호화할 수도 있다.At this time, the tree decoder 620 decodes the bitstream using various binary decoding methods such as unary code, truncated unary code, and expansive golem code to compare the node value of each layer with the higher layer. The difference can be restored. In addition, the tree decoder 620 decodes the bitstream using various binary decoding methods such as unary code, truncated unary code, and expansive golem code, and then decodes the bitstream to the node value of the surrounding layer or higher layer. Binary Arithmetic Decoding may be performed by determining a probability model of a layer. In addition, the tree decoder 620 may arithmically decode the bitstream by changing a probability model differently for each layer.

트리 복호화기(620)는 부가 정보에 의해 부호화 장치(100)에서 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하였음이 식별되는 경우, 노드값이 최대값인 레이어의 하위 레이어의 노드값에 대해서는 모두 같은 값으로 가정하여 복호화하지 않고 스킵한다. 반대로, 트리 복호화기(620)는 부가 정보에 의해 부호화 장치(100)에서 레이어별 노드값을 하위 레이어의 노드값들 중 최대값으로 결정하였음이 식별되는 경우, 노드값이 최소값인 레이어의 하위 레이어의 노드값에 대해서는 모두 같은 값으로 가정하여 복호화하지 않고 스킵한다.When the tree decoder 620 determines that the node value for each layer is determined to be the minimum value among the node values of the lower layer by the additional information, the tree decoder 620 may determine the node of the lower layer of the layer having the maximum value. All values are assumed to be the same value and skipped without decoding. In contrast, when the tree decoder 620 determines that the node value for each layer is determined to be the maximum value among the node values of the lower layer by the additional information, the tree decoder 620 may be a lower layer of the layer having the minimum node value. All node values of are assumed to be the same value and are skipped without decoding.

트리 복호화기(620)는 복호화하고자 하는 정보의 발생 확률에 따라 부호 번호(Code Num)를 다르게 변경할 수도 있다. 즉, 복호화하고자 하는 정보의 발생 확률에 따라 작은 부호 번호 또는 큰 부호 번호를 할당할 수 있다. 복호화하고자 하는 정보의 발생 확률은 복호화하고자 하는 정보를 가지는 주위의 임의의 영역의 정보의 발생 확률 또는 복호화하고자 하는 정보를 가지는 영역 이전에 이미 복호화되어 복원된 정보의 발생 확률 등 다양한 방법으로 계산될 수 있다.The tree decoder 620 may change the code number differently according to the occurrence probability of the information to be decoded. That is, a small code number or a large code number can be allocated according to the occurrence probability of the information to be decoded. The occurrence probability of the information to be decoded can be calculated in various ways, such as the occurrence probability of the information in any area around the information to be decoded or the occurrence probability of the information already decoded and restored before the region having the information to be decoded. have.

트리 복호화기(620)는 최상위 레이어의 노드값과 그 상위 레이어의 노드값 간의 차이값을 복원할 때, 최상위 레이어의 상위 레이어가 없으므로 최상위 레이어의 상위 레이어의 노드값을 임의의 값으로 가정하고 차이값만을 복원한다. 여기서, 임의의 값은 이제까지 복호화하면서 가장 발생 확률이 높은 값, 미리 지정된 값, 주위의 임의 영역의 정보의 값 중 가장 높은 발생 확률을 가지는 값 등 어떠한 값이 될 수도 있다.When the tree decoder 620 restores the difference value between the node value of the top layer and the node value of the top layer, the tree decoder 620 assumes that the node value of the top layer of the top layer is an arbitrary value because there is no top layer of the top layer. Restore only the value. Here, the arbitrary value may be any value, such as a value having the highest probability of occurrence, a predetermined value, a value having the highest probability of occurrence of the information of the surrounding arbitrary region while decoding.

이하에서는 도 2 내지 도 4를 통해 본 발명의 제1 실시예에 따라 트리 구조를 이용하여 비트스트림을 복호화하여 정보를 복원하는 과정을 상세히 설명한다.Hereinafter, a process of restoring information by decoding a bitstream using a tree structure according to the first embodiment of the present invention will be described in detail with reference to FIGS. 2 to 4.

복호화 장치(600)는 비트스트림의 픽처 헤더, 슬라이스 헤더, 매크로블록 헤더 등으로부터 부가 정보가 부호화된 데이터를 추출하고 복호화하여 부가 정보를 복원한다. 또한, 복호화 장치(600)는 기 설정된 부가 정보를 이용할 수도 있다. 부가 정보에는 레이어의 최대 개수에 대한 정보, 최하위 레이어의 영역의 크기에 대한 정보 및 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부에 대한 정보 등이 포함되어 있는데, 복호화 장치(600)는 이러한 부가 정보 중 레이어의 최대 개수와 최하위 레이어의 영역의 크기에 대한 정보를 이용하여 도 3에 도시한 바와 같은 트리 구조를 복원할 수 있다. 이때, 복호화 장치(600)는 최하위 레이어의 영역의 크기에 대한 정보 대신 그룹화되는 영역의 개수에 대한 정보를 이용하여 트리 구조를 복원할 수도 있으며, 최하위 레이어의 영역의 크기에 대한 정보와 그룹화되는 영역의 개수에 대한 정보를 모두 이용하여 트리 구조를 복원할 수도 있다.The decoding apparatus 600 reconstructs the additional information by extracting and decoding data encoded with the additional information from a picture header, a slice header, a macroblock header, and the like of the bitstream. In addition, the decoding apparatus 600 may use preset additional information. The additional information includes information on the maximum number of layers, information on the size of the region of the lowest layer, and information on whether the node value of each layer is determined as the minimum value or the maximum value among the node values of the lower layer. The decoding apparatus 600 may restore the tree structure shown in FIG. 3 by using information about the maximum number of layers and the size of the region of the lowest layer among such additional information. In this case, the decoding apparatus 600 may restore the tree structure by using information about the number of areas to be grouped instead of information about the size of the area of the lowest layer, and the area to be grouped with information about the size of the area of the lowest layer. The tree structure can also be restored by using all information about the number of.

도 3에 도시한 바와 같은 트리 구조가 복원되면, 복호화 장치(600)는 복원된 트리 구조를 이용하여 도 4를 통해 전술한 바와 같이 레이어별 노드값과 상위 레이어의 노드값 간의 차이값이 부호화된 비트스트림을 복호화한다.When the tree structure as shown in FIG. 3 is restored, the decoding apparatus 600 encodes the difference between the node value of each layer and the node value of the higher layer as described above with reference to FIG. 4 using the restored tree structure. Decode the bitstream.

복호화 장치(600)는 복호화할 정보의 최대값을 이미 알고 있으므로, 트런케이티드 단항 코드를 이용하여 이진화 비트열을 복호화한다. 이때, 1/2 정밀도의 부호 번호는 1, 1/4 정밀도의 부호 번호는 2, 1/8 정밀도의 부호 번호는 3인 것으로 가정할 수 있다. 각 정밀도에 따른 부호 번호는 각 정밀도의 발생 확률에 따라 다르게 변경될 수 있다. 만약, 복호화 장치(600)가 이진 비트열을 산술 복호화하는 경우에는 주위 영역의 정보 또는 이진 비트열을 이용하여 확률 모델을 생성하고 다음 비트스트림으로부터 산술 복호화하여 이진 비트열을 생성한다. 복호화 장치(600)가 이진 비트열을 산술 복호화하지 않는 경우에는 비트스트림을 복호화하여 이진 비트열을 생성한다.Since the decoding apparatus 600 already knows the maximum value of the information to be decoded, it decodes the binarized bit string using the truncated unary code. At this time, it can be assumed that the code number of 1/2 precision is 1, the code number of 1/4 precision is 2, and the code number of 1/8 precision is 3. The code number according to each precision may be changed differently according to the occurrence probability of each precision. When the decoding apparatus 600 arithmically decodes a binary bit string, a probability model is generated using information or a binary bit string of a surrounding area, and arithmetic decoding is performed from a next bit stream to generate a binary bit string. If the decoding apparatus 600 does not perform arithmetic decoding on the binary bit string, the decoding device 600 generates the binary bit string by decoding the bit stream.

도 4를 참조하면, 영역 (0,0)의 경우, 최상위 레이어인 레이어 0에서, 상위 레이어는 없으므로 상위 레이어의 노드값으로 1/2 정밀도(가장 높은 발생 확률을 가지는 것으로 가정함)로 가정하면, 이진 비트열 1을 복호화하면 최상위 레이어의 노드값과 그 상위 레이어의 노드값의 차이값은 0이 된다. 레이어 1에서, 이진 비트열 1을 복호화하면 그 상위 레이어의 노드값과의 차이값은 0이 된다. 레이어 2에서, 이진 비트열 1을 복호화하면 그 상위 레이어의 노드값과의 차이값은 0이 된다. 레이어 3에서, 이진 비트열 1을 복호화하면 그 상위 레이어의 노드값과의 차이값은 0이 된다. 각 레이어별 노드값과 그 상위 레이어의 노드값의 차이값에 각 상위 레이어의 노드값을 더하면 각 레이어의 노드값은 1, 즉, 1/2 정밀도가 된다. 따라서, 영역 (0,0)의 복원되는 정보는 1/2 정밀도가 된다.Referring to FIG. 4, in the case of region (0,0), in layer 0, which is the highest layer, since there is no upper layer, it is assumed that the precision is 1/2 precision (assuming the highest occurrence probability) as the node value of the upper layer. When decoding the binary bit string 1, the difference between the node value of the highest layer and the node value of the upper layer becomes 0. In layer 1, when the binary bit string 1 is decoded, the difference value with the node value of the upper layer becomes zero. In layer 2, when the binary bit string 1 is decoded, the difference value with the node value of the upper layer becomes zero. In layer 3, when the binary bit string 1 is decoded, the difference value with the node value of the upper layer becomes zero. When the node value of each upper layer is added to the difference between the node value of each layer and the node value of the upper layer, the node value of each layer becomes 1, that is, 1/2 precision. Therefore, the restored information of the area (0, 0) is 1/2 precision.

영역 (0,1)의 경우, 레이어 0, 레이어 1, 레이어 2에 대해서는 영역 (0,0)에 대해서 정보를 복원할 때 이미 복호화되었으므로 추가로 복호화되지 않고, 레이어 3에서 이진 비트열 01을 복호화하면 그 상위 레이어의 노드값과의 차이값이 1이 된다. 따라서, 영역 (0,1)의 복원되는 정보는 2가 되며 이것은 1/4 정밀도를 뜻한다.In the case of the region (0,1), the layer 0, layer 1, and layer 2 are already decoded when the information is restored for the region (0,0), and thus are not further decoded, and the binary bit string 01 is decoded in the layer 3. If it is, the difference value with the node value of the upper layer becomes 1. Thus, the restored information of the area (0, 1) becomes 2, which means 1/4 precision.

영역 (2,0)의 경우, 레이어 0과 레이어 1에 대해서는 영역 (0,0)에 대해서 정보를 복원할 때 이미 복호화되었으므로 추가로 복호화되지 않고, 레이어 2에서 상위 레이어의 노드값이 1(1/2 정밀도)이므로 상위 레이어의 노드값과의 차이값이 최대값인 2임을 알 수 있으므로 트런케이티드 단항 코드로 이진 비트열 00을 복호화하면 영역 (2,0)의 복원되는 정보는 1/8 정밀도가 된다.In the case of the region (2,0), the layer 0 and the layer 1 are already decoded when the information is restored for the region (0,0), and thus are not further decoded, and the node value of the upper layer in the layer 2 is 1 (1). / 2 precision), so the difference value with the node value of the upper layer is 2, which is the maximum value. Therefore, when the binary bit string 00 is decoded by the truncated unary code, the restored information of the area (2,0) is 1/8. Precision is achieved.

영역 (2,6)의 경우도 마찬가지로, 레이어 2에서 상위 레이어가 1/4 정밀도이므로, 차이값의 최대값이 1이 됨을 알 수 있고 트런케이티드 단항 코드로 이진 비트열 0을 복호화하면 상위 레이어와의 차이값이 1이 되어, 영역 (2,6)의 복원되는 정보는 1/8 정밀도가 된다. 이때, 최대값이 나왔으므로 하위 레이어의 노드값은 복호화하지 않고 모두 1/8 정밀도로 결정된다.Similarly, for the region (2,6), since the upper layer is 1/4 precision in layer 2, it can be seen that the maximum value of the difference value is 1, and if the binary bit string 0 is decoded with the truncated unary code, the upper layer is The difference value with becomes 1, and the information to be restored in the areas 2 and 6 is 1/8 precision. At this time, since the maximum value is obtained, the node values of the lower layer are all determined to be 1/8 precision without decoding.

전술한 예에서는 1/2 정밀도에 부호 번호 1이, 1/4 정밀도에 부호 번호 2, 1/8 정밀도에 부호 번호 3이 할당되는 것으로 가정하여 복호화하였지만, 주위 영역의 정보 또는 복호화되어 복원된 정보의 발생 확률 등을 이용하여 부호 번호를 각 정밀도마다 다르게 변경할 수도 있다.In the above example, decoding was performed assuming that code number 1 is assigned to 1/2 precision, code number 2 is assigned to 1/4 precision, and code number 3 is assigned to 1/8 precision. The code number may be changed differently for each precision by using the probability of occurrence.

도 7은 본 발명의 제1 실시예에 따른 트리 구조를 이용한 복호화 방법을 설명하기 위한 순서도이다.7 is a flowchart for explaining a decoding method using a tree structure according to the first embodiment of the present invention.

본 발명의 제1 실시예에 따른 트리 구조를 이용한 복호화 방법에 따르면, 복호화 장치(600)는 비트스트림을 복호화하여 부가 정보를 복원한다(S710). 즉, 복호화 장치(600)는 비트스트림의 픽처 헤더, 슬라이스 헤더, 매크로블록 헤더 등 소정의 부호화 단위의 헤더에서, 부가 정보가 부호화된 데이터를 추출하고 복호화하여 부가 정보를 복원한다. 여기서, 부가 정보는 레이어의 최대 개수에 대한 정보, 최하위 레이어의 영역의 크기에 대한 정보 및 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부에 대한 정보를 포함할 수 있다.According to the decoding method using the tree structure according to the first embodiment of the present invention, the decoding apparatus 600 decodes the bitstream and restores additional information (S710). That is, the decoding apparatus 600 extracts and decodes data encoded with additional information from a header of a predetermined coding unit such as a picture header, a slice header, and a macroblock header of a bitstream to restore the additional information. The additional information may include information on the maximum number of layers, information on the size of the region of the lowest layer, and information on whether the node value of each layer is determined as the minimum value or the maximum value among the node values of the lower layer. It may include.

다만, 복호화 장치(600)는 단계 S710을 반드시 수행해야 하는 것은 아니며, 구현 방식이나 필요에 따라 선택적으로 수행할 수 있다. 예를 들어, 부호화 장치(100)와 복호화 장치(600)가 서로 간에 부가 정보에 포함된 모든 정보를 미리 약속하여 설정한 경우, 부호화 장치(100)는 부가 정보를 부호화하지 않고 그에 따라 복호화 장치(600)는 기 설정된 부가 정보를 이용하여 비트스트림을 복호화하는 데 활용할 수 있다. 만약, 부호화 장치(100)와 복호화 장치(600)가 부가 정보에 포함된 정보들 중 일부만을 미리 약속하여 설정한 경우, 부호화 장치(100)는 약속되지 않은 정보만을 부호화하고 복호화 장치(600)는 비트스트림을 복호화하여 약속되지 않은 정보만을 복원하여 기 설정된 다른 정보와 함께 이용하여 복호화에 활용할 수도 있다.However, the decoding apparatus 600 does not necessarily need to perform step S710, and may selectively perform the method according to an implementation method or need. For example, when the encoding apparatus 100 and the decoding apparatus 600 have promised and set all the information included in the additional information in advance, the encoding apparatus 100 does not encode the additional information, and accordingly the decoding apparatus ( 600 may be used to decode the bitstream using preset additional information. If the encoding apparatus 100 and the decoding apparatus 600 set only some of the information included in the additional information in advance, the encoding apparatus 100 encodes only the un promised information and the decoding apparatus 600 By decoding the bitstream, only unscheduled information can be recovered and used together with other preset information for decoding.

복호화 장치(600)는 비트스트림을 복호화하여 레이어별 노드값과 상위 레이어의 노드값 간의 차이값을 복원한다(S720). 즉, 복호화 장치(600)는 단계 710에서 복원되거나 기 설정된 부가 정보를 이용하여 개선된 트리 구조를 복원하고, 복원된 개선된 트리 구조를 이용하여 비트스트림을 복호화하여 레이어별 노드값과 상위 레이어의 노드값 간의 차이값을 복원한다.The decoding apparatus 600 restores the difference between the node value of each layer and the node value of the upper layer by decoding the bitstream (S720). That is, the decoding apparatus 600 restores the improved tree structure by using the additional information reconstructed or preset in step 710, and decodes the bitstream by using the reconstructed improved tree structure to determine the node value of each layer and the higher layer. Restore the difference between node values.

복호화 장치(600)는 복원되는 차이값과 상위 레이어의 노드값을 더하여 레이어별 노드값을 복원하고(S730), 최하위 레이어의 노드값을 복호화하고자 하는 정보로서 복원한다(S740).The decoding apparatus 600 restores the node value for each layer by adding the reconstructed difference value and the node value of the upper layer (S730), and restores the node value of the lowest layer as information to be decoded (S740).

단계 S720에서, 복호화 장치(600)는 이진 복호화 방법을 이용하여 비트스트림을 복호화하거나이진 복호화 방법을 이용하여 비트스트림을 복호화한 후 확률 모델을 변경하여 이진 산술 복호화하여 레이어별 노드값을 복원할 수 있다. 여기서, 확률 모델은 주위의 레이어 또는 상위 레이어의 노드값을 기초로 결정되거나 각 레이어마다 다르게 변경될 수 있다.In operation S720, the decoding apparatus 600 may decode the bitstream using a binary decoding method or decode the bitstream using a binary decoding method, and then change the probability model to perform binary arithmetic decoding to restore node values for each layer. have. Here, the probabilistic model may be determined based on the node value of the surrounding layer or the upper layer or may be changed for each layer differently.

단계 S720에서, 복호화 장치(600)는 복호화하고자 하는 정보의 발생 확률에 따라 복호화를 위해 복호화하고자 하는 정보에 할당되는 부호 번호를 변경할 수 있다.In operation S720, the decoding apparatus 600 may change the code number assigned to the information to be decoded for decoding according to the occurrence probability of the information to be decoded.

단계 S730에서, 복호화 장치(600)는 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하였음이 식별되는 경우, 노드값이 최대값인 레이어의 하위 레이어의 노드값을 모두 최대값으로 복원할 수 있다.In operation S730, when it is identified that the node value for each layer is determined to be the minimum value among the node values of the lower layer, the decoding apparatus 600 restores all the node values of the lower layer of the layer having the maximum node value to the maximum value. can do.

단계 S730에서, 복호화 장치(600)는 레이어별 노드값을 하위 레이어의 노드값들 중 최대값으로 결정하였음이 식별되는 경우, 노드값이 최소값인 레이어의 하위 레이어의 노드값을 모두 최소값으로 복원할 수 있다.In operation S730, when it is identified that the node value for each layer is determined as the maximum value among the node values of the lower layer, the decoding apparatus 600 restores all the node values of the lower layer of the layer having the minimum node value to the minimum value. Can be.

단계 S730에서, 복호화 장치(600)는 최상위 레이어의 노드값을 복호화하는 경우, 최상위 레이어의 상위 레이어의 노드값을 소정의 값으로 설정하여 최상위 레이어의 노드값을 복원할 수 있다.In operation S730, when decoding the node value of the uppermost layer, the decoding apparatus 600 may set the node value of the upper layer of the highest layer to a predetermined value to restore the node value of the uppermost layer.

이상에서 전술한 바와 같이 본 발명의 제1 실시예에 따르면, 영상에 대해 부호화하고자 하는 정보를 트리 구조를 이용하여 효율적으로 부호화함으로써 압축 효율을 향상시킬 수 있다.As described above, according to the first exemplary embodiment of the present invention, the compression efficiency can be improved by efficiently encoding information to be encoded on an image using a tree structure.

도 8은 본 발명의 제2 실시예에 따른 트리 구조를 이용하여 부호화 장치를 간략하게 나타낸 블록 구성도이다.8 is a block diagram schematically illustrating an encoding apparatus using a tree structure according to a second embodiment of the present invention.

본 발명의 제2 실시예에 따른 트리 구조를 이용하여 부호화 장치(800)는 가변 크기 블록을 위한 트리 부호화기(810) 및 가변 크기 블록을 위한 부가 정보 부호화기(820)를 포함하여 구성될 수 있다.Using the tree structure according to the second embodiment of the present invention, the encoding apparatus 800 may include a tree encoder 810 for a variable size block and an additional information encoder 820 for a variable size block.

가변 크기 블록을 위한 트리 부호화기(810)는 영상에 대해 부호화하고자 하는 정보를 가지는 소정의 영역들을 동일한 정보를 가지는 영역끼리 그룹화하고 레이어별 노드마다 노드가 분할되는지 여부에 따라 분할 여부를 나타내는 플래그와 노드값 중 하나 이상을 부호화한다.The tree encoder 810 for the variable size block groups predetermined regions having information to be encoded with respect to an image to regions having the same information, and flags and nodes indicating whether to split according to whether the nodes are divided for each node of each layer. Encode one or more of the values.

가변 크기 블록을 위한 부가 정보 부호화기(820)는 제2 실시예에 따른 트리 구조의 레이어의 최대 개수에 대한 정보 및 최하위 레이어의 각 노드가 가리키는 영역의 크기에 대한 정보를 포함하는 부가 정보를 부호화한다. 이와 같이 부호화된 부가 정보는 비트스트림의 헤더에 포함되는데, 비트스트림의 헤더로서는 시퀀스 헤더, 픽처 헤더, 슬라이스 헤더, 매크로블록 헤더 등이 될 수 있다.The additional information encoder 820 for the variable size block encodes additional information including information about the maximum number of layers of the tree structure and information about the size of the region indicated by each node of the lowest layer according to the second embodiment. . The additional information encoded as described above is included in a header of the bitstream. The header of the bitstream may be a sequence header, a picture header, a slice header, a macroblock header, and the like.

이하에서는 도 9 및 도 10을 통해 트리 구조를 이용하여 부호화하고자 하는 정보를 부호화하는 과정에 대해 상세히 설명한다.Hereinafter, a process of encoding information to be encoded using a tree structure will be described in detail with reference to FIGS. 9 and 10.

도 9는 본 발명의 제2 실시예에 따른 트리 구조 구조를 나타낸 예시도이다.9 is an exemplary view showing a tree structure structure according to a second embodiment of the present invention.

9A는 하나의 픽처 내에서 부호화하고자 하는 정보를 가지는 영역들을 나타낸 것이다. 9A에서 각 영역들은 16x16 화소 크기의 매크로블록들일 수 있으며, 각 영역 내에 표시된 A, B, C는 각 영역의 부호화하고자 하는 정보를 나타낸다. 이러한 정보는 움직임 벡터 정밀도가 될 수도 있지만, 반드시 이에 한정되지 않고 분할 타입 정보, 인트라 예측 모드, 계수 정보 등 다양한 정보가 될 수 있다. 다만, 본 발명의 제2 실시예에서, 각 영역들이 16x16 화소 크기의 매크로블록인 것으로 가정하지만, 16x16 화소 크기의 블록뿐만 아니라 64x64 화소 크기의 블록, 32x32 화소 크기의 블록, 16x32 화소 크기의 블록, 16x16 블록, 16x8 화소 크기의 블록, 8x8 블록, 8x4 블록, 4x8 블록 또는 4x4 블록 등 다양한 형태일 수 있다. 또한, 각 영역의 크기는 서로 동일하지 않을 수 있다. 9A shows regions having information to be encoded in one picture. Each region in 9A may be macroblocks having a size of 16 × 16 pixels, and A, B, and C displayed in each region represent information to be encoded in each region. Such information may be motion vector precision, but is not limited thereto, and may be various types of information such as partition type information, intra prediction mode, and coefficient information. However, in the second embodiment of the present invention, each region is assumed to be a 16x16 pixel size macroblock, but not only a 16x16 pixel size block but also a 64x64 pixel size block, a 32x32 pixel size block, a 16x32 pixel size block, 16x16 blocks, 16x8 pixel size blocks, 8x8 blocks, 8x4 blocks, 4x8 blocks, or 4x4 blocks. In addition, the size of each region may not be the same.

9B는 9A에 나타낸 각 영역 중 동일한 정보를 가지는 영역끼리 묶어 나타낸 것이다. 9C는 9B와 같이 묶여진 영역들의 정보를 트리 구조로 나타낸 것이다. 9C에서, 최하위 노드가 가리키는 영역의 크기는16x16 크기의 매크로블록이고 트리 구조의 레이어의 최대 개수는 4이므로, 이와 같은 부가 정보는 부호화되어 해당 영역에 대한 헤더에 포함된다. 9B is a group showing regions having the same information among the regions shown in 9A. 9C represents a tree structure of information of areas bounded by 9B. In 9C, since the size of the region indicated by the lowest node is a macroblock of size 16x16 and the maximum number of layers of the tree structure is 4, such additional information is encoded and included in the header for the region.

도 10은 본 발명의 제2 실시예에 따라 트리 구조로 표현된 정보가 부호화된 결과를 나타낸 예시도이다.10 is an exemplary diagram illustrating a result of encoding information represented by a tree structure according to a second embodiment of the present invention.

9C에 나타낸 트리 구조의 정보를 부호화하면 도 10에 도시한 바와 같은 최종 비트열을 얻을 수 있다. 노드가 하위 레이어의 노드들로 분할되었는지 여부를 하나의 비트로 부호화하는데, 예를 들어 비트값이 '1'인 경우에는 현재 노드가 하위 레이어의 노드들로 분할되었음을 나타내고 비트값이 '0'인 경우에는 현재 노드가 하위 레이어의 노드들로 분할되지 않았음을 나타낸다. 최하위 레이어의 노드의 경우, 하위 레이어의 노드들로 분할되었는지 여부를 부호화하지 않고 최하위 레이어의 노드의 노드값을 부호화한다.By encoding the tree structure information shown in 9C, the final bit string as shown in Fig. 10 can be obtained. Encodes whether a node is divided into nodes of a lower layer into one bit. For example, if the bit value is '1', it indicates that the current node is divided into nodes of the lower layer and the bit value is '0'. Indicates that the current node is not divided into nodes of the lower layer. In the case of the node of the lowest layer, the node value of the node of the lowest layer is encoded without encoding whether the node is divided into the nodes of the lower layer.

9C에서, 레이어 0의 노드에 대해서는 하위 레이어의 노드들로 분할되었으므로 비트값 '1'로 부호화한다. 분할된 레이어 1의 첫 번째 노드의 노드값은 A이고 더 이상 하위 레이어의 노드들로 분할되지 않았으므로 비트값 '0'으로 부호화하고 노드값 A를 부호화한다. 레이어 1의 두 번째 노드는 하위 레이어의 노드들로 분할되었으므로 비트값 '1'로 부호화한다. 레이어 1의 세 번째 노드는 하위 레이어의 노드들로 분할되지 않았으므로 비트값 '0'으로 부호화하고 노드값인 B를 부호화한다. 레이어 1의 마지막 네 번째 노드는 하위 레이어의 노드들로 분할되었으므로 비트값 '1'로 부호화한다. 같은 방식으로 레이어 2의 각 노드들을 부호화하고, 레이어 3에서는 헤더에서 최대 레이어의 개수가 4 개로 지정되었으므로 더 이상의 하위 레이어의 노드들이 없음을 알 수 있으므로 각 노드값만을 부호화한다. In 9C, since the node of the layer 0 is divided into nodes of the lower layer, the node is encoded with the bit value '1'. Since the node value of the first node of the partitioned layer 1 is A and is no longer divided into nodes of the lower layer, the node value is encoded by the bit value '0' and the node value A is encoded. Since the second node of the layer 1 is divided into nodes of the lower layer, the second node is encoded with the bit value '1'. Since the third node of the layer 1 is not divided into the nodes of the lower layer, the third node is encoded with the bit value '0' and the node value B is encoded. Since the last fourth node of layer 1 is divided into nodes of lower layer, it is encoded with bit value '1'. In the same manner, each node of the layer 2 is encoded, and since the maximum number of layers is 4 in the header, it is known that there are no more nodes of the lower layer.

각 노드값은 설명의 편의를 위해 A, B, C로 표시되었으나 각 노드값은 이진비트들로 표현된다. 또한, 도 9를 통해 나타낸 예시에서는, 노드가 하위 레이어의 노드들로로 분할되거나 분할되지 않는 경우의 두 가지만 예를 들었다. 본 실시예에서는 노드가 하위 레이어의 노드들로 분할되는 경우, 4개의 노드로 분할된다. 도 9를 참조하면, 노드가 하위 레이어의 4개의 노드들로 분할된다는 것은 현재 레이어의 노드에 대응하는 영역이 4개의 동일한 서브 영역들로 분할됨을 의미한다. 대안으로서, 도 11에 도시한 바와 같이, 하위 레이어의 노드들로 분할되지 않았음 가로로 긴 두 개 영역의 하위 레이어의 노드들로 나누어짐, 세로로 긴 두 개 영역의 하위 레이어의 노드들로 나누어짐, 4 개 구역의 하위 레이어의 노드들로 나누어짐과 같이 노드는 다양한 형태의 하위 레이어의 노드들로 분할될 수도 있다. 이 때, 상기 4가지 분할의 유형을 지시하는 정보가 복호화 장치로 전송된다.Each node value is represented by A, B, and C for convenience of description, but each node value is represented by binary bits. In addition, in the example illustrated in FIG. 9, only two cases in which a node is divided into nodes of lower layers or not are illustrated. In the present embodiment, when a node is divided into nodes of a lower layer, the node is divided into four nodes. Referring to FIG. 9, the fact that a node is divided into four nodes of a lower layer means that an area corresponding to a node of the current layer is divided into four identical sub areas. Alternatively, as shown in FIG. 11, not divided into the nodes of the lower layer, divided into the nodes of the lower layer of two horizontally long regions, the nodes of the lower layer of two vertically long regions. A node may be divided into nodes of various types of lower layers, such as being divided into nodes of lower layers of four zones. At this time, information indicating the four division types is transmitted to the decoding apparatus.

부호화 장치(800)는 그룹화된 영역이 크지 않은 경우, 상위 레이어의 노드에서 특정한 레이어의 노드들로 분할됨을 나타내는 플래그를 부호화함으로써 하위 레이어의 노드들이 있음을 나타내기 위한 비트량을 줄일 수 있다. 예를 들어, 비트스트림의 헤더에 최대 레이어의 개수가 4개로 지정되고 부호화하고자 하는 정보가 도 12에 도시한 바와 같이 분포되어 있는 경우, 도 12에 도시한 바와 같은 영역은 도 13에 도시한 바와 같이 동일한 정보를 가지는 영역끼리 묶어 표시할 수 있다. 이 경우, 부호화 장치(800)는 최상위 레이어의 노드가 레이어 2 또는 레이어 3의 노드들로 분할됨을 나타내는 플래그를 부호화함으로써, 상위 레이어의 노드가 하위 레이어의 노드들로 분할됨을 나타내는 플래그의 수를 줄여 비트량을 줄일 수 있다.If the grouping area is not large, the encoding apparatus 800 may reduce a bit amount for indicating that there are nodes of a lower layer by encoding a flag indicating that the node of the upper layer is divided into nodes of a specific layer. For example, if the maximum number of layers is designated as four in the header of the bitstream and the information to be encoded is distributed as shown in FIG. 12, the region as shown in FIG. 12 is as shown in FIG. Likewise, regions having the same information can be grouped and displayed. In this case, the encoding apparatus 800 encodes a flag indicating that a node of a top layer is divided into nodes of a layer 2 or a layer 3, thereby reducing the number of flags indicating that a node of a higher layer is divided into nodes of a lower layer. The bit amount can be reduced.

도 14는 본 발명의 제2 실시예에 따른 트리 구조를 이용한 부호화 방법을 설명하기 위한 순서도이다.14 is a flowchart illustrating a coding method using a tree structure according to the second embodiment of the present invention.

본 발명의 제2 실시예에 따른 트리 구조를 이용한 부호화 방법에 따르면 부호화 장치(800)는 정보를 가지는 소정의 영역들을 동일한 정보를 가지는 영역끼리 그룹화하고 레이어별 노드마다 노드가 분할되는지 여부에 따라 분할 여부를 나타내는 플래그와 노드값 중 하나 이상을 부호화하고(S1410), 레이어의 최대 개수에 대한 정보 및 최하위 레이어의 각 노드가 가리키는 영역의 크기에 대한 정보를 포함하는 부가 정보를 부호화한다(S1420).According to the encoding method using the tree structure according to the second embodiment of the present invention, the encoding apparatus 800 groups predetermined regions having information among regions having the same information and divides them according to whether nodes are divided for each node of each layer. At least one of a flag indicating whether or not and a node value are encoded (S1410), and additional information including information about the maximum number of layers and information about the size of the region indicated by each node of the lowest layer is encoded (S1420).

단계 S1410에서, 부호화 장치(800)는 노드가 분할되는 경우에는 노드가 분할됨을 나타내는 플래그를 부호화할 수 있다. 즉, 부호화 장치(800)는 레이어별 노드마다 노드가 분할되는지 여부를 판단하고, 노드가 분할되는 경우 해당 노드값을 부호화하지 않고 해당 노드가 하위 레이어의 노드들로 분할됨을 나타내는 플래그만을 부호화할 수 있다.In operation S1410, when the node is divided, the encoding apparatus 800 may encode a flag indicating that the node is divided. That is, the encoding apparatus 800 may determine whether a node is divided for each node of each layer, and if the node is divided, only the flag indicating that the node is divided into nodes of lower layers without encoding the node value. have.

단계 S1410에서, 부호화 장치(800)는 노드가 분할되지 않는 경우에는 노드가 분할되지 않음을 나타내는 플래그와 노드의 노드값을 부호화할 수 있다. 즉, 부호화 장치(800)는 레이어별 노드마다 노드가 분할되는지 여부를 판단하고 노드가 분할되지 않는 경우에는 해당 노드가 하위 레이어의 노드들로 분할되지 않음을 나타내는 플래그를 부호화할 뿐만 아니라 해당 노드의 노드값을 부호화할 수 있다. 여기서, 노드의 노드값이란 노드가 가지는 정보를 말하며, 동일한 정보를 가지는 영역끼리 그룹화되어 하나의 노드가 되는 경우 그 동일한 정보가 노드값이 된다.In operation S1410, when the node is not divided, the encoding apparatus 800 may encode a flag indicating that the node is not divided and a node value of the node. That is, the encoding apparatus 800 determines whether a node is divided for each node of each layer. If the node is not divided, the encoding apparatus 800 not only encodes a flag indicating that the node is not divided into nodes of lower layers, and also encodes a flag of the node. Node values can be encoded. Here, the node value of a node refers to information that a node has. When the areas having the same information are grouped into one node, the same information becomes the node value.

단계 S1410에서, 부호화 장치(800)는 노드가 최하위 레이어의 노드인 경우, 노드의 노드값만을 부호화할 수 있다. 즉, 부호화 장치(800)는 레이어별 모드마다 노드가 분할되는지 여부를 판단하기 전에 부호화하고자하는 노드가 최하위 레이어인지 여부를 판단하여, 노드가 최하위 레이어인 경우에는 해당 노드의 분할 여부를 나타내는 플래그를 부호화하지 않고 해당 노드의 노드값만을 부호화할 수 있다.In operation S1410, when the node is the node of the lowest layer, the encoding apparatus 800 may encode only the node value of the node. That is, before determining whether a node is divided for each layer mode, the encoding apparatus 800 determines whether the node to be encoded is the lowest layer, and if the node is the lowest layer, sets a flag indicating whether to split the node. Only the node value of the node can be encoded without encoding.

단계 S1420에서, 부호화 장치(800)는 부가 정보가 부호화된 데이터를 비트스트림의 헤더에 포함시킬 수 있다. 여기서, 비트스트림의 헤더는 시퀀스 헤더, 픽처 헤더, 슬라이스 헤더, 매크로블록 헤더 등 다양한 부호화 단위의 헤더일 수 있다.In operation S1420, the encoding apparatus 800 may include data encoded with additional information in a header of the bitstream. Here, the header of the bitstream may be a header of various coding units such as a sequence header, a picture header, a slice header, and a macroblock header.

단계 S1410에서, 부호화 장치(800)는 노드가 분할됨을 나타내는 플래그를 부호화하는 데 있어서, 한 개 또는 두 개 이상의 하위 레이어의 노드들로 바로 분할됨을 나타내는 플래그를 부호화할 수 있다. 즉, 부호화 장치(800)는 노드의 분할 여부를 나타내는 플래그를 부호화할 때, 해당 노드가 하위 레이어의 노드들로 분할되는 경우, 해당 노드가 그 바로 한 개 하위의 레이어로 분할됨을 나타내는 플래그만을 부호화할 수 있는 것이 아니라 두 개, 세 개 등 복수 개의 하위 레이어의 노드들로 분할됨을 나타내는 플래그를 부호화할 수도 있다.In operation S1410, in encoding the flag indicating that the node is divided, the encoding apparatus 800 may encode a flag indicating that the node is directly divided into nodes of one or more lower layers. That is, when the encoding apparatus 800 encodes a flag indicating whether a node is divided, when the node is divided into nodes of a lower layer, only the flag indicating that the node is divided into just one lower layer is encoded. Instead of being able to do this, a flag indicating that a node is divided into nodes of a plurality of lower layers such as two and three may be encoded.

도 15는 본 발명의 제2 실시예에 따른 트리 구조를 이용한 복호화 장치를 간략하게 나타낸 블록 구성도이다.15 is a block diagram schematically illustrating a decoding apparatus using a tree structure according to a second embodiment of the present invention.

본 발명의 제2 실시예에 따른 트리 구조를 이용한 복호화 장치(1500)는 가변 크기 블록을 위한 부가 정보 복호화기(1510) 및 가변 크기 블록을 위한 트리 복호화기(1520)를 포함하여 구성될 수 있다.The decoding apparatus 1500 using the tree structure according to the second embodiment of the present invention may include a side information decoder 1510 for a variable size block and a tree decoder 1520 for a variable size block. .

가변 크기 블록을 위한 부가 정보 복호화기(1510)는 비트스트림을 복호화하여 레이어의 최대 개수에 대한 정보 및 최하위 레이어의 각 노드가 가리키는 영역의 크기에 대한 정보를 포함하는 부가 정보를 복원한다. 이와 같이 복원되는 부가 정보는, 가변 크기 블록을 위한 트리 복호화기(1520)가 트리 구조를 복원하는 데 이용된다. 이때, 가변 크기 블록을 위한 부가 정보 복호화기(1510)는 비트스트림의 헤더에서 부가 정보가 부호화된 데이터를 추출하고 복호화하여 부가 정보를 복원하는데, 비트스트림의 헤더는 매크로블록 헤더, 슬라이스 헤더, 픽처 헤더, 시퀀스 헤더 등일 수 있다.The additional information decoder 1510 for the variable size block decodes the bitstream to recover additional information including information about the maximum number of layers and information about the size of the region indicated by each node of the lowest layer. The additional information restored in this way is used by the tree decoder 1520 for the variable size block to restore the tree structure. At this time, the additional information decoder 1510 for the variable-size block extracts and decodes the encoded data of the additional information in the header of the bitstream to recover the additional information. The header of the bitstream includes a macroblock header, a slice header, Header, sequence header, and so on.

다만, 가변 크기 블록을 위한 부가 정보 복호화기(1510)는 반드시 복호화 장치(1500)에 포함되어야 하는 것은 아니며, 구현 방식이나 필요에 따라 선택적으로 포함될 수 있다. 예를 들어, 부호화 장치(800)와 복호화 장치(1500)가 서로 레이어의 최대 개수 및 최하위 레이어의 각 노드가 가리키는 영역의 크기 등에 대해 미리 약속한 경우, 부호화 장치(800)는 부가 정보를 부호화하지 않을 수 있으며 그에 따라 복호화 장치(1500)도 비트스트림을 복호화하여 부가 정보를 복원하지 않고 기 설정된 부가 정보를 이용하여 트리 구조를 복원할 수 있다.However, the additional information decoder 1510 for the variable size block is not necessarily included in the decoding apparatus 1500 and may be selectively included according to an implementation method or need. For example, when the encoding apparatus 800 and the decoding apparatus 1500 promise in advance about the maximum number of layers and the size of an area indicated by each node of the lowest layer, the encoding apparatus 800 does not encode additional information. As a result, the decoding apparatus 1500 may restore the tree structure by using the predetermined additional information without decoding the bitstream to recover the additional information.

가변 크기 블록을 위한 트리 복호화기(1520)는 부가 정보를 기초로 비트스트림을 복호화하여 최상위 레이어로부터 최하위 레이어까지 레이어별 노드의 분할 여부를 나타내는 플래그를 복원하고 복원된 플래그에 따라 레이어별 노드의 노드값을 복원하여 정보를 복원한다. 즉, 가변 크기 블록을 위한 트리 복호화기(1520)는, 가변 크기 블록을 위한 부가 정보 복호화기(1510)에 의해 복원되거나 기 설정된 부가 정보를 기초로 비트스트림을 복호화하여 최상위 레이어로부터 최하위 레이어까지 레이어별 노드가 분할되는지 여부와 분할되지 않는 경우에는 노드의 노드값을 복원하여 트리 구조 구조를 복원하고, 복원된 트리 구조 구조를 기초로 복호화하고자 하는 정보를 복원한다.The tree decoder 1520 for the variable size block decodes the bitstream based on the additional information to restore a flag indicating whether the node for each layer is split from the highest layer to the lowest layer, and to the node of the node for each layer according to the restored flag. Restore the information by restoring the values. That is, the tree decoder 1520 for the variable size block may decode the bitstream based on the additional information reconstructed or preset by the side information decoder 1510 for the variable size block and layer from the highest layer to the lowest layer. Whether or not each node is divided and if not, restores the node value of the node to restore the tree structure structure, and restores information to be decoded based on the restored tree structure structure.

이하에서는 도 9 및 도 10을 참조하여 복호화 장치(1500)가 본 발명의 제2 실시예에 따라 트리 구조를 이용하여 비트스트림을 복호화하여 정보를 복원하는 과정에 대해 설명한다.Hereinafter, a process in which the decoding apparatus 1500 recovers information by decoding a bitstream using a tree structure according to a second embodiment of the present invention will be described with reference to FIGS. 9 and 10.

복호화 장치(1500)는 비트스트림의 매크로블록 헤더, 슬라이스 헤더, 픽처 헤더 또는 시퀀스 헤더 등으로부터 부호화된 부가 정보를 추출하고 복호화하여 부가 정보를 복원한다. 부가 정보에는 트리 구조의 레이어의 최대 개수에 대한 정보와 최하위 레이어의 각 노드가 가리키는 영역의 크기에 대한 정보가 포함되어 있다.The decoding apparatus 1500 extracts and decodes encoded side information from a macroblock header, a slice header, a picture header, a sequence header, and the like of the bitstream to restore the side information. The additional information includes information on the maximum number of layers in the tree structure and information on the size of the area indicated by each node of the lowest layer.

복호화 장치(1500)는 비트스트림으로부터 도 10의 최종 비트와 같은 비트열을 추출하고 전술한 바와 같이 복원된 부가 정보와 추출된 비트열을 기초로 도 10에 예시적으로 나타낸 바와 같은 트리 구조 구조를 복원한다.The decoding apparatus 1500 extracts a bit string such as the last bit of FIG. 10 from the bitstream, and forms a tree structure as exemplarily shown in FIG. 10 based on the recovered additional information and the extracted bit string as described above. Restore

예를 들어, 비트스트림으로부터 추출한 최종 비트의 비트열에서 비트값을 차례로 읽어 들여 최상위 레이어로부터 최하위 레이어까지 각 레이어별 노드가 하위 레이어의 노드들로 분할되는지 여부를 나타내는 플래그를 복원하고, 복원된 플래그가 하위 레이어의 노드들로 분할되지 않음을 나타내는 경우에는 다음 비트열을 읽어 들여 해당 노드의 노드값을 복원한다. 복원된 노드값이 복원하고자 하는 정보가 된다. 또한, 복원된 플래그가 하위 레이어의 노드들로 분할됨을 나타내는 경우에는 다음 비트값을 읽어들여 다음 노드 또는 다음 레이어의 다음 노드가 그 하위 레이어의 노드들로 분할되는지 여부를 나타내는 플래그를 복원한다. 이와 같은 방식으로 비트열을 차례로 읽어 들여 최하위 레이어까지 정보를 복원한다. 한편, 최하위 레이어의 노드에 대해서는 분할 여부를 나타내는 플래그를 복원하지 않고 각 노드의 노드값만을 복원한다. For example, by reading bit values sequentially from the bit stream of the last bit extracted from the bitstream, a flag indicating whether a node for each layer is divided into nodes of a lower layer from the highest layer to the lowest layer is restored. Indicates that the node is not divided into nodes of the lower layer, the next bit string is read to restore the node value of the node. The restored node value becomes information to be restored. In addition, when the restored flag is divided into the nodes of the lower layer, the next bit value is read to restore the flag indicating whether the next node or the next node of the next layer is divided into the nodes of the lower layer. In this way, the bit stream is read in sequence to restore the information down to the lowest layer. On the other hand, for the node of the lowest layer, only the node value of each node is restored without restoring a flag indicating whether to split.

노드가 하위 레이어의 노드들로 분할되는 경우, 도 9를 통해 나타낸 예시에서와 같이 4개의 노드로 분할된다. 도 9를 참조하면, 노드가 하위 레이어의 4개의 노드들로 분할된다는 것은 현재 레이어의 노드에 대응하는 영역이 4개의 동일한 서브 영역들로 분할됨을 의미한다. 대안으로서, 도 11에 도시한 바와 같이, 하위 레이어의 노드들로 분할되지 않았음, 가로로 긴 두 개 영역의 하위 레이어의 노드들로 나누어짐, 세로로 긴 두 개 영역의 하위 레이어의 노드들로 나누어짐, 4 개 구역의 하위 레이어의 노드들로 나누어짐과 같이 노드는 다양한 형태의 하위 레이어의 노드들로 분할될 수도 있다. 이 때, 상기 4가지 분할의 유형을 지시하는 정보가 부호화 장치로부터 복호화 장치로 전송된다.When a node is divided into nodes of a lower layer, it is divided into four nodes as in the example illustrated in FIG. 9. Referring to FIG. 9, the fact that a node is divided into four nodes of a lower layer means that an area corresponding to a node of the current layer is divided into four identical sub areas. Alternatively, as shown in FIG. 11, not divided into the nodes of the lower layer, divided into the nodes of the lower layer of the two long regions, the nodes of the lower layer of the two long regions. A node may be divided into nodes of various types of lower layers, such as divided into nodes of lower layers of four zones. At this time, information indicating the four types of division is transmitted from the encoding apparatus to the decoding apparatus.

복호화 장치(1500)는 이와 같은 방식으로 최상위 레이어로부터 최하위 레이어까지 정보를 복원하여 9C와 같은 트리 구조 구조를 복원하고, 복원된 트리 구조 구조를 기초로 9B와 9A에 나타낸 각 영역들의 정보를 복원한다.In this manner, the decoding apparatus 1500 restores information from the highest layer to the lowest layer to restore a tree structure such as 9C, and restores information of respective regions shown in 9B and 9A based on the restored tree structure structure. .

만약, 비트스트림의 비트열로부터 추출하고 복호화하여 복원한 플래그가 어느 레이어의 노드가 두 개, 세 개 등 복수 개의 하위 레이어의 노드들로 바로 분할됨을 나타내는 경우, 지시되는 하위 레이어 사이의 레이어에 대한 복호화를 스킵하고 지시되는 하위 레이어의 노드의 분할 여부를 나타내는 플래그 및 해당 노드의 노드값 중 하나 이상을 복호화한다.If a flag extracted and decoded from the bit stream of the bitstream and reconstructed indicates that a node of a layer is directly divided into nodes of a plurality of lower layers such as two or three, the layer between the indicated lower layers Skip decoding and decode one or more of a flag indicating whether a node of the indicated lower layer is divided or a node value of the node.

도 16은 본 발명의 제2 실시예에 따른 트리 구조를 이용한 복호화 방법을 설명하기 위한 순서도이다.16 is a flowchart for describing a decoding method using a tree structure according to the second embodiment of the present invention.

본 발명의 제2 실시예에 따른 트리 구조를 이용한 복호화 방법에 따르면, 복호화 장치(1500)는 비트스트림을 복호화하여 레이어의 최대 개수에 대한 정보 및 최하위 레이어의 각 노드가 가리키는 영역의 크기에 대한 정보를 포함하는 부가 정보를 복원하고(S1610), 부가 정보를 기초로 비트스트림으로부터 추출되는 비트열을 복호화하여 최상위 레이어로부터 최하위 레이어까지 레이어별 노드의 분할 여부를 나타내는 플래그를 복원하고 복원된 플래그에 따라 레이어별 노드의 노드값을 복원하여 정보를 복원한다(S1620).According to the decoding method using the tree structure according to the second embodiment of the present invention, the decoding apparatus 1500 decodes a bitstream to obtain information on the maximum number of layers and information on the size of an area indicated by each node of the lowest layer. Restoring additional information including a (S1610), decoding a bit string extracted from the bitstream based on the additional information, restoring a flag indicating whether a node for each layer is divided from a top layer to a bottom layer, and according to the restored flag Information is restored by restoring the node value of the node for each layer (S1620).

단계 S1620에서, 복호화 장치(1500)는 분할 여부를 나타내는 플래그가 노드가 하위 레이어의 노드들로 분할되지 않음을 나타내는 경우에는 노드의 노드값을 복원할 수 있다. 즉, 복호화 장치(1500)는 레이어별 노드의 분할 여부를 나타내는 플래그를 복원하고, 복원된 플래그가 해당 노드가 하위 레이어의 노드들로 분할됨을 나타내는 경우에는 다음 노드에 대한 복호화를 수행하고, 복원된 플래그가 해당 노드의 하위 레이어의 노드들로 분할되지 않음을 나타내는 경우에만 해당 노드의 노드값을 복원한다.In operation S1620, the decoding apparatus 1500 may restore the node value of the node when the flag indicating whether to divide the node indicates that the node is not divided into nodes of lower layers. That is, the decoding apparatus 1500 restores a flag indicating whether a node for each layer is divided, and if the restored flag indicates that the corresponding node is divided into nodes of a lower layer, the decoding apparatus 1500 performs decoding on the next node and restores the flag. The node value of the node is restored only when the flag indicates that the flag is not divided into nodes of lower layers of the node.

노드가 하위 레이어의 노드들로 분할되는 경우, 도 9를 통해 나타낸 예시에서와 같이 4개의 노드로 분할된다. 또는, 대안으로서, 도 11에 도시한 바와 같이, 하위 레이어의 노드들로 분할되지 않았음, 가로로 긴 두 개 영역의 하위 레이어의 노드들로 나누어짐, 세로로 긴 두 개 영역의 하위 레이어의 노드들로 나누어짐, 4 개 구역의 하위 레이어의 노드들로 나누어짐과 같이 노드는 다양한 형태의 하위 레이어의 노드들로 분할될 수도 있다. 이 때, 상기 4가지 분할의 유형을 지시하는 정보가 부호화 장치로부터 복호화 장치로 전송된다.When a node is divided into nodes of a lower layer, it is divided into four nodes as in the example illustrated in FIG. 9. Alternatively, as shown in FIG. 11, it is not divided into nodes of a lower layer, divided into nodes of a lower layer of two horizontally long regions, and of a lower layer of two vertically long regions. A node may be divided into nodes of various types of lower layers, such as divided into nodes and nodes of lower layers of four zones. At this time, information indicating the four types of division is transmitted from the encoding apparatus to the decoding apparatus.

단계 S1620에서, 복호화 장치(1500)는 최하위 레이어의 노드에 대해서는 각 노드의 노드값만을 복원할 수 있다. 즉, 복호화 장치(1500)는 레이어별 노드의 분할 여부를 나타내는 플래그 및/또는 노드의 노드값을 복원하는 과정에서 복호화하고자하는 노드가 최하위 레이어에 포함되는지 여부를 미리 판단하여 복호화하고자 하는 노드가 최하위 레이어에 포함되는 경우에는 해당 노드의 분할 여부를 나타내는 플래그를 복원하지 않고 해당 노드의 노드값만을 복원한다.In operation S1620, the decoding apparatus 1500 may restore only the node value of each node with respect to the node of the lowest layer. That is, the decoding apparatus 1500 determines in advance whether or not the node to be decoded is included in the lowest layer in the process of restoring a flag indicating whether the node for each layer is divided and / or the node value of the node. When included in the layer, only the node value of the corresponding node is restored without restoring a flag indicating whether the corresponding node is divided.

본 발명의 트리 구조를 이용한 부호화 및 복호화 방법에서 부호화 및 복호화 대상 정보는 본 실시예의 데이터에 한정되지 않고 다음의 다양한 정보의 부호화 및 복호화에도 적용될 수도 있다.In the encoding and decoding method using the tree structure of the present invention, the encoding and decoding target information is not limited to the data of the present embodiment, but may be applied to encoding and decoding of the following various pieces of information.

부호화하고자 하는 정보는 매크로블록 크기 및 타입(Macroblock Type) 정보, 예측 및 변환을 위한 서브블록의 크기 및 타입을 나타내는 매크로블록 파티션 정보(macroblock partition information), 인트라 예측 정보, 움직임 벡터(Motion Vector), 움직임 벡터의 예측 방향(Prediction Direction), 최적의 움직임 벡터 예측 후보(Motion Vector Prediction Candidate), 임의 크기 영역의 최적의 보간 필터(Interpolation Filter), 화질 개선 필터 사용 유무, 참조 영상의 번호(Reference Picture Index), 양자화 매트릭스 번호(Quantization Matrix Index), 최적의 움직임 벡터 정밀도(Motion Vector Precision) 및 변환의 크기 정보(Transform Size Information), 영상의 화소 정보(Pixel Information), 소정 블록내 0이 아닌 변환계수가 있는지 여부는 나타내는 정보(Coded Block Information) 또는 계수 정보(Coefficient Information) 등과 같이 영상의 영상 신호 정보나 영상 신호를 부호화하는 데 이용되는 다양한 정보가 될 수도 있다. The information to be encoded includes macroblock size and type information, macroblock partition information indicating the size and type of a subblock for prediction and transformation, intra prediction information, motion vector, Prediction direction of motion vector, optimal motion vector prediction candidate, optimal interpolation filter of arbitrary size region, use of image quality improvement filter, reference picture index ), Quantization Matrix Index, Optimal Motion Vector Precision, Transform Size Information, Pixel Information of Image, and Non-zero Transform Coefficient in a Block Whether or not there is information such as coded block information or coefficient information Call may be a variety of information used to code the information and the video signal.

본 발명의 실시예에서 매크로블록은 영상 부호화 및 복호화의 기본 단위로서 가변 크기를 가진다. 매크로블록의 크기 정보는 본 발명에 따른 트리 구조를 이용하여 부호화될 수 있다. 이를 위하여 본 발명에 따른 부호화 장치는 매크로블록의 최대 크기, 최소 크기, 트리를 구성하는 레이어들의 최대 개수 및 매크로블록 분할 플래그를 생성하여 복호화 장치로 전송한다. 이러한 매크로블록 최대 및 최소 크기 정보와 트리를 구성하는 레이어들의 최대 개수를 나타내는 정보는 시퀀스, GOP, 픽처, 슬라이스 등의 헤더 정보로 비트스트림에 포함될 수 있다. In an embodiment of the present invention, the macroblock has a variable size as a basic unit of image encoding and decoding. The size information of the macroblock may be encoded using the tree structure according to the present invention. To this end, the encoding apparatus according to the present invention generates the maximum size, the minimum size of the macroblock, the maximum number of layers constituting the tree, and the macroblock splitting flag, and transmits them to the decoding apparatus. Such macroblock maximum and minimum size information and information representing the maximum number of layers constituting the tree may be included in the bitstream as header information such as a sequence, a GOP, a picture, and a slice.

매크로블록 분할 플래그는 도 9 또는 도 11에 도시된 바와 같이, 트리 구조를 이용하여 부호화되어 부호화 단위 헤더에 포함될 수 있다. 다시 말해, 본 발명에 따른 트리 구조를 이용하여 부호화되고 복호되는 정보는 전술한 매크로블록 분할 플래그이다.As illustrated in FIG. 9 or 11, the macroblock splitting flag may be encoded using a tree structure and included in a coding unit header. In other words, the information encoded and decoded using the tree structure according to the present invention is the aforementioned macroblock division flag.

매크로블록의 최대 및 최소 크기는 가로 크기와 세로 크기를 따로 설정하여 임의의 크기의 매크로블록을 사용할 수도 있다. 또한 부호화할 매크로블록 최대 및 최소 크기값은 실제 크기를 지정할 수도 있고 소정의 크기로부터 몇 배를 키울지 또는 축소 시킬지에 대한 값을 보낼수도 있다. 만약 최대 매크로블록의 크기를 소정의 크기로부터 몇 배 키울지에 대한 값을 부호화하는 하고 소정의 크기가 16인 경우, log2(선택된 MBsize/16)의 값을 부호화하는데, 예를 들어 매크로블록의 크기가 16x16인 경우 0을 부호화하고 32x32 크기인 경우 1을 부호화한다. 또한, 가로와 세로에 대한 비율을 따로 부호화 할 수도 있다. The maximum and minimum size of the macroblock may be set to a horizontal size and a vertical size separately to use a macroblock of any size. In addition, the macroblock maximum and minimum size values to be encoded may specify the actual size, and may send a value of how many times to increase or reduce the predetermined size. If the value of how many times the size of the maximum macroblock is to be increased from the predetermined size is encoded and the predetermined size is 16, the value of log 2 (selected MBsize / 16) is encoded, for example, the size of the macroblock. If 0 is 16x16, 0 is coded and if it is 32x32 size, 1 is coded. In addition, the ratio between the width and the height may be separately encoded.

또는 최대 매크로블록의 크기값을 전술한 방법을 통해 부호화한 후 최소 매크로블록의 크기 값은 최대 매크로블록 크기에 대하 최소 매크로블록 크기의 비율 값을 나타내는 log2(최대 매크로블록의 크기/최소 매크로블록의 크기) 값을 부호화할 수도 있다. 또는 반대로 최소 매크로블록의 크기값을 전술한 방법을 통해 부호화한 후, 최대 매크로블록의 크기 값을 log2(최대 매크로블록의 크기/최소 매크로블록의 크기) 값을 통해 부호화할 수도 있다.Alternatively, after encoding the size value of the maximum macroblock through the above-described method, the size value of the minimum macroblock is log 2 (the maximum macroblock size / minimum macroblock) indicating a ratio of the minimum macroblock size to the maximum macroblock size. May be encoded. Alternatively, the size of the minimum macroblock may be encoded through the aforementioned method, and then the size of the maximum macroblock may be encoded through a log 2 (the size of the maximum macroblock / the size of the minimum macroblock).

또한, 본 발명의 일 실시예에 따르면, 매크로블록 파티션 정보(macroblock partition information)를 본 발명에 따른 트리구조를 이용하여 부호화 및 복호화할 수 있다. 매크로블록 파티션 정보는 예측 및/또는 변환을 위한 서브블록(즉, 매크로블록 파티션)의 크기 및/또는 타입과 관련된 정보로서 예측 및/또는 변환을 위한 서브블록의 최대 크기, 최소 크기, 트리를 구성하는 레이어들의 최대 개수 및 매크로블록 파티션 분할 플래그를 포함할 수 있다. 본 발명에 따른 부호화 장치는 이들 매크로블록 파티션 정보를 복호화 장치로 전송한다.In addition, according to an embodiment of the present invention, macroblock partition information may be encoded and decoded using a tree structure according to the present invention. The macroblock partition information is information related to the size and / or type of a subblock (i.e., macroblock partition) for prediction and / or transform and constitutes a maximum size, a minimum size, and a tree of a subblock for prediction and / or transform. The maximum number of layers and a macroblock partition partition flag may be included. The encoding apparatus according to the present invention transmits these macroblock partition information to the decoding apparatus.

예측 및/또는 변환을 위한 서브블록의 최대 및 최소 크기는 전체 영상 시퀀스 단위, 픽처 그룹 (GOP), 픽처 또는 슬라이스 등의 단위로 결정될 수 있다. 이러한 예측 및/또는 변환을 위한 서브 블록의 최대 크기, 최소 크기, 트리를 구성하는 레이어들의 최대 개수에 대한 정보는 시퀀스, GOP, 픽처, 슬라이스 등의 헤더 정보로 비트스트림에 포함될 수 있다. The maximum and minimum sizes of the subblocks for prediction and / or transform may be determined in units of an entire picture sequence unit, a picture group (GOP), a picture, or a slice. Information about the maximum size, minimum size, and maximum number of layers constituting the tree for such prediction and / or transform may be included in the bitstream as header information such as a sequence, a GOP, a picture, and a slice.

한편, 상기 매크로블록 파티션 정보 중 매크로블록 파티션 분할 플래그를, 본 발명에 따른 트리 구조를 이용하여 부호화할 수 있다. 매크로블록 파티션 분할 플래그는 부호화 단위에 해당하는 매크로블록의 헤더 또는 매크로블록 파티션의 헤더에 포함될 수 있다.Meanwhile, the macroblock partition partition flag of the macroblock partition information may be encoded using the tree structure according to the present invention. The macroblock partition partition flag may be included in a header of a macroblock corresponding to a coding unit or a header of a macroblock partition.

한편, 예측 및/또는 변환을 위한 서브블록의 크기 즉, 예측 및/또는 변환의 크기 정보는 예측 및/또는 변환의 최대 및 최소 크기는 가로 크기와 세로 크기를 따로 설정하여 임의의 크기의 예측 및/또는 을 사용할 수도 있다. 또한 사용 가능한 예측 및/또는 변환의 최대 및 최소 크기값은 실제 크기를 지정할 수도 있고 소정의 크기로부터 몇 배를 키울지 또는 축소 시킬지에 대한 값을 보낼수도 있다. 만약 최대 예측 및/또는 변환의 크기를 소정의 크기로부터 몇 배 키울지에 대한 값을 부호화하는 하고 소정의 크기가 4인 경우, log2(선택된 예측 및/또는 변환의 크기/4)의 값을 부호화하는데, 예를들어 예측 및/또는 변환의 크기가 4x4인 경우 0을 부호화하고 8x8 크기인 경우 1을 부호화한다. 또한, 가로와 세로에 대한 비율을 따로 부호화 할 수도 있다. On the other hand, the size of the subblock for prediction and / or transform, that is, the size information of the prediction and / or transform is the maximum and minimum size of the prediction and / or transform is set to the horizontal size and vertical size separately to predict the arbitrary size and You can also use / or. In addition, the maximum and minimum magnitude values of the available predictions and / or transformations may specify the actual magnitude and may send a value to increase or decrease the number of times from the predetermined magnitude. If the value of how many times the size of the maximum prediction and / or transform is to be increased from the predetermined size is encoded and the predetermined size is 4, the value of log 2 (size / 4 of the selected prediction and / or transform) is encoded. For example, 0 is encoded when the prediction and / or transform is 4x4, and 1 is encoded when the size of the 8x8 is 8x8. In addition, the ratio between the width and the height may be separately encoded.

또는 최대 예측 및/또는 변환의 크기값을 전술한 방법을 통해 부호화한 후 최소 예측 및/또는 변환의 크기값은 최대 예측 및/또는 변환 크기에 대한 최소 예측 및/또는 변환 크기의 비율값을 나타내는 log2(최대 예측 및/또는 변환의 크기/최소 예측 및/또는 변환의 크기) 값을 부호화할 수도 있다. 또는 반대로 최소 예측 및/또는 변환의 크기값을 전술한 방법을 통해 부호화한 후, 최대 예측 및/또는 변환의 크기 값을 log2(최대 예측 및/또는 변환의 크기/최소 예측 및/또는 변환의 크기) 값을 통해 부호화할 수도 있다. Or after encoding the magnitude value of the maximum prediction and / or transform through the above-described method, the magnitude value of the minimum prediction and / or transform indicates a ratio value of the minimum prediction and / or transform size to the maximum prediction and / or transform size. The value of log 2 (maximum prediction and / or transform size / minimum prediction and / or transform size) may be encoded. Or vice versa, after encoding the magnitude value of the minimum prediction and / or transform through the method described above, the magnitude value of the maximum prediction and / or transform is log 2 (the magnitude / minimum prediction and / or It can also be encoded through a value).

소정 블록내 0이 아닌 변환계수가 있는지 여부는 나타내는 정보(Coded Block Information)는 예측 또는 변환을 위해 분할된 서브블록 내 0이 아닌 변환 계수 있는지 여부를 나타내는 1비트 길이의 플래그 일 수도 있다. 이때 휘도 성분(Y)과 색차 성분(U, V) 블록에 대해 각각 플래그를 부호화할 수도 있고 휘도 성분과 색차성분(Y, U, V) 세 블록에 대해 하나의 플래그를 통해 0이 아닌 변환 계수의 여부를 나타낼 수도 있다. The coded block information indicating whether there is a non-zero transform coefficient in a predetermined block may be a 1-bit long flag indicating whether there is a non-zero transform coefficient in a divided subblock for prediction or transform. In this case, a flag may be encoded for the luminance component (Y) and the chrominance component (U, V) blocks, respectively, and a non-zero conversion coefficient through one flag for the three luminance component and chrominance component (Y, U, V) blocks It can also indicate whether or not.

또는 세가지 색차성분(Y, U, V)의 모든 블록 내 0이 아닌 변환 계수가 있는지를 나타내는 플래그를 부호화한 후, 0이 아닌 변환계수가 있는 경우에 대해서만 변환의 종류를 부호화 한 후, 각 색차 성분의 서브블록 내 0이 아닌 변환 계수가 있는지 여부를 나타내는 플래그를 각각 부호화 할 수도 있다.Or after encoding a flag indicating whether there are non-zero transform coefficients in all blocks of the three color difference components (Y, U, V), and encoding the type of the transform only for the case where there is a non-zero transform coefficient, Flags indicating whether there are non-zero transform coefficients in the subblock of the component may be encoded respectively.

한편, 전술한 실시예들에서 본 발명에 따른 트리 부호화기는 부호화하고자 하는 영상 정보를 가지는 영역들을 동일한 정보를 가지는 영역끼리 그룹화하는 방식으로 부호화하고자 하는 영상 정보의 트리 구조를 생성한다고 설명하였다. 그러나 이는 트리 구조를 생성하는 일 예일 뿐이고, 그 밖에 다양한 방식으로 트리구조를 생성할 수 있음은 당업자에게 자명하다. 예컨대, 전술한 부호화 및 복호화의 단위인 매크로블록의 크기 또는 예측 또는 변환을 위한 서브블록의 크기는 기준이 되는 블록(예컨대, 최대 크기의 매크로블록)을 보다 적은 크기의 서브블록으로 반복하여 분할하는 방식에 의해 결정될 수 있다. 다시 말해, 기준 블록을 복수의 제1 서브블록으로 분할하고, 각 제1 서브블록을 다시 더 적은 크기의 제2 서브블록으로 분할하거나 또는 분할하지 않음으로써 다양한 크기의 매크로블록들 또는 예측 또는 변환을 위한 서브블록들이 하나의 픽처에 포함될 수 있다. 이 때 서브블록으로의 분할 여부는 분할 플래그에 지시된다. 이와 같은 방법에 의해 매크로블록의 크기 정보(즉, 매크로블록 분할 플래그) 또는 예측 또는 변환을 위한 서브블록의 크기 정보(즉, 매크로블록 파티션 분할 플래그)는 도 9B 또는 9C에 도시한 바와 같은 트리 구조를 가지게 된다. Meanwhile, in the above-described embodiments, it has been described that the tree encoder according to the present invention generates a tree structure of the image information to be encoded by grouping regions having the image information to be encoded with regions having the same information. However, this is only an example of generating a tree structure, and it is apparent to those skilled in the art that the tree structure can be generated in various ways. For example, the size of a macroblock, which is a unit of encoding and decoding described above, or a size of a subblock for prediction or transformation, is obtained by repeatedly dividing a reference block (for example, a macroblock of maximum size) into smaller subblocks. It can be determined by the manner. In other words, by dividing the reference block into a plurality of first subblocks, or by dividing each first subblock into a second subblock of smaller size or not, the macroblocks or the prediction or the transformation of various sizes are performed. Subblocks may be included in one picture. At this time, whether to divide into subblocks is indicated by a partition flag. By such a method, the size information of the macroblock (i.e., macroblock partition flag) or the size information of the subblock for prediction or transform (i.e., macroblock partition partition flag) is a tree structure as shown in Fig. 9B or 9C. Will have

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 또한, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 따라서, 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The foregoing description is merely illustrative of the technical idea of the present invention, and various changes and modifications may be made by those skilled in the art without departing from the essential characteristics of the present invention. It should be noted that the embodiments disclosed in the present invention are not intended to limit the scope of the present invention and are not intended to limit the scope of the present invention. Therefore, the scope of protection of the present invention should be construed according to the following claims, and all technical ideas within the scope of the same shall be construed as being included in the scope of the present invention.

이상에서 설명한 바와 같이 본 발명은 영상을 부호화하고 복호화하는 영상 압축 처리 분야에 적용되어, 영상에 대한 다양한 정보를 트리 구조를 이용하여 부호화하고 부호화된 데이터를 복호화함으로써, 부호화 효율을 향상시켜 영상의 압축 효율을 향상시킬 수 있는 효과를 발생하는 매우 유용한 발명이다.As described above, the present invention is applied to a field of image compression processing for encoding and decoding an image, encoding various information about an image using a tree structure, and decoding the encoded data, thereby improving encoding efficiency and compressing the image. It is a very useful invention that produces the effect of improving the efficiency.

Claims (1)

영상 정보를 부호화하는 장치에 있어서,
상기 영상 정보를 가지는 소정의 영역들을 복수 개의 그룹으로 그룹화하고, 상기 그룹화된 영역 내의 부호화하고자 하는 정보의 최소값 또는 최대값을 그룹화된 영역의 정보로서 결정하여 레이어별 노드값을 최상위 레이어까지 생성하며, 레이어별 노드값과 상위 레이어의 노드값 간의 차이값 또는 레이어별 노드값과 기 설정된 기준에 따라 결정되는 값 간의 차이값을 부호화하는 트리 부호화기; 및
레이어의 최대 개수에 대한 정보, 그룹화되는 영역의 개수에 대한 정보 및 레이어별 노드값을 하위 레이어의 노드값들 중 최소값으로 결정하는지 또는 최대값으로 결정하는지 여부에 대한 정보를 포함하는 부가 정보를 부호화하는 부가 정보 부호화기;
를 포함하는 것을 특징으로 하는 부호화 장치.
An apparatus for encoding video information,
The predetermined region having the image information is grouped into a plurality of groups, the minimum or maximum value of the information to be encoded in the grouped region is determined as the information of the grouped region, and the node value for each layer is generated up to the highest layer. A tree encoder for encoding a difference value between a node value of each layer and a node value of an upper layer, or a difference value between a node value of each layer and a value determined according to a preset reference; And
Encoding additional information including information on the maximum number of layers, information on the number of areas to be grouped, and information on whether the node value of each layer is determined as the minimum value or the maximum value among the node values of the lower layer. An additional information encoder;
Encoding apparatus comprising a.
KR1020130056076A 2013-05-16 2013-05-16 Coding method and apparatus by using tree structure KR20130070618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130056076A KR20130070618A (en) 2013-05-16 2013-05-16 Coding method and apparatus by using tree structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130056076A KR20130070618A (en) 2013-05-16 2013-05-16 Coding method and apparatus by using tree structure

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR20100126315A Division KR101479141B1 (en) 2009-12-10 2010-12-10 Coding Method and Apparatus by Using Tree Structure

Publications (1)

Publication Number Publication Date
KR20130070618A true KR20130070618A (en) 2013-06-27

Family

ID=48865324

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130056076A KR20130070618A (en) 2013-05-16 2013-05-16 Coding method and apparatus by using tree structure

Country Status (1)

Country Link
KR (1) KR20130070618A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111146249A (en) * 2018-11-06 2020-05-12 三星Sdi株式会社 Polarizing plate for light emitting display and light emitting display including the same

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111146249A (en) * 2018-11-06 2020-05-12 三星Sdi株式会社 Polarizing plate for light emitting display and light emitting display including the same
CN111146249B (en) * 2018-11-06 2023-10-13 三星Sdi株式会社 Polarizing plate for light emitting display and light emitting display including the same

Similar Documents

Publication Publication Date Title
KR101479141B1 (en) Coding Method and Apparatus by Using Tree Structure
KR101952182B1 (en) Method for image encoding and computer readable redording meduim thereof
JP2022078048A (en) Method for decoding image and method for encoding image
JP2022050614A (en) Multi-type-tree framework for video coding
KR101479129B1 (en) Video Coding Method and Apparatus Using Variable size Macroblock
CN116866563A (en) Image encoding/decoding method, storage medium, and image data transmission method
KR20110069740A (en) Video coding method and apparatus
JP2005160089A (en) Device and method of generating coded block pattern for alpha channel image, and device and method of coding/decoding alpha channel image using same
KR20130070618A (en) Coding method and apparatus by using tree structure

Legal Events

Date Code Title Description
A107 Divisional application of patent
A201 Request for examination
E601 Decision to refuse application