Apparatus for encoding and decoding image and method for encoding and decoding image thereof

文档序号:108595 发布日期:2021-10-15 浏览:36次 中文

阅读说明:本技术 用于对图像进行编码和解码的设备及其用于对图像进行编码和解码的方法 (Apparatus for encoding and decoding image and method for encoding and decoding image thereof ) 是由 崔雄一 朴缗茱 朴慜祐 郑丞洙 崔棋镐 崔娜莱 安尼斯·塔姆塞 朴银姬 于 2020-02-28 设计创作,主要内容包括:公开了一种根据实施例的用于对图像进行解码的方法,所述方法包括以下步骤:从比特流的序列参数集获得指示针对包括当前图像的图像序列的多个第一参考图像列表的信息;从所述比特流的组头获得针对当前图像中的包括当前块的当前块组的指示符;基于由所述指示符指示的第一参考图像列表获得第二参考图像列表;并且基于包括在第二参考图像列表中的参考图像对当前块的下层块进行预测解码。(Disclosed is a method for decoding an image according to an embodiment, the method comprising the steps of: obtaining information indicating a plurality of first reference picture lists for a picture sequence including a current picture from a sequence parameter set of a bitstream; obtaining an indicator for a current block group including a current block in a current picture from a group header of the bitstream; obtaining a second reference picture list based on the first reference picture list indicated by the indicator; and predictively decoding a lower layer block of the current block based on the reference picture included in the second reference picture list.)

1. An image decoding method, comprising:

obtaining information indicating a plurality of first reference picture lists for a picture sequence including a current picture from a sequence parameter set of a bitstream;

obtaining an indicator for a current block group including a current block in a current picture from a group header of the bitstream;

obtaining a second reference picture list based on a first reference picture list indicated by the indicator among the plurality of first reference picture lists; and is

And predictively decoding a lower layer block of the current block based on the reference picture included in the second reference picture list.

2. The image decoding method of claim 1, wherein the lower layer block included in the next block group in the current picture is predictive-decoded based on a first reference picture list other than the first reference picture list indicated by the indicator among the plurality of first reference picture lists and a second reference picture list.

3. The picture decoding method according to claim 1, wherein the first reference picture list indicated by the indicator includes only reference pictures of a first type,

wherein the step of obtaining the second reference picture list comprises: obtaining a second reference picture list by adding a second type of reference picture indicated by a picture order count, POC, related value obtained from the group header to the first reference picture list indicated by the indicator.

4. The image decoding method of claim 1, wherein the obtaining of the second reference picture list comprises: obtaining a second reference picture list by changing an order of one or more reference pictures of the reference pictures included in the first reference picture list indicated by the indicator.

5. The picture decoding method of claim 1, wherein the first reference picture list indicated by the indicator includes a first type of reference picture and a second type of reference picture,

wherein the step of obtaining the second reference picture list comprises: obtaining a second reference picture list by excluding a second type of reference picture from the first reference picture list indicated by the indicator.

6. The picture decoding method of claim 1, wherein the first reference picture list indicated by the indicator includes a first type of reference picture and a second type of reference picture,

wherein the step of obtaining the second reference picture list comprises: obtaining a second reference picture list by excluding a second type of reference picture from the first reference picture list indicated by the indicator and adding the second type of reference picture indicated by the Picture Order Count (POC) -related value obtained from the group header to the first reference picture list indicated by the indicator.

7. The image decoding method of claim 1, wherein the obtaining of the second reference picture list comprises: obtaining a second reference picture list including a first type of reference picture included in any one of the reference picture lists indicated by the indicator and a second type of reference picture included in another one of the reference picture lists indicated by the indicator.

8. The picture decoding method of claim 7, wherein a higher index is allocated to one of the first type of reference picture and the second type of reference picture than to the other of the first type of reference picture and the second type of reference picture.

9. The image decoding method of claim 7, further comprising: obtaining order information of a first type of reference picture and a second type of reference picture from the group header,

wherein indexes according to the order information are allocated to the first type of reference picture and the second type of reference picture.

10. The image decoding method of claim 1, further comprising:

obtaining, from the group header, a difference between Picture Order Count (POC) -related values of one or more of reference pictures included in a first reference picture list indicated by the indicator and POC-related values of one or more of reference pictures to be included in a second reference picture list,

wherein the step of obtaining the second reference picture list comprises: obtaining a second reference picture list by replacing one or more of the reference pictures included in the first reference picture list indicated by the indicator based on the obtained difference value.

11. The image decoding method of claim 1, further comprising:

determining a plurality of blocks in a current image;

obtaining address information for a group of blocks from the bitstream; and is

Configuring block groups each including one or more blocks in the current picture based on the obtained address information,

wherein the current block is any one of the plurality of blocks, and the current block group is any one of the block groups.

12. The picture decoding method according to claim 11, wherein the address information includes identification information of a lower right block of the blocks included in each of the block groups,

wherein the step of configuring the block group comprises:

configuring a first block group, wherein the first block group includes an upper left square located at an upper left side and a lower right block indicated by identification information of the lower right block among the plurality of blocks;

identifying an upper left square of the second block group based on identification information of blocks included in the first block group; and is

Configuring a second block group, wherein the second block group includes a lower-right block indicated by identification information of the lower-right block and a recognized upper-left square.

13. The image decoding method of claim 1, further comprising:

obtaining at least one post-processing parameter set for luma mapping from the bitstream;

obtaining, from the group header or picture parameter set of the bitstream, identification information indicating a post-processing parameter set applied to a luminance map for prediction samples of a lower layer block obtained as a result of predictive decoding; and is

And performing brightness mapping on the predicted sampling points according to the post-processing parameter set indicated by the identification information.

14. An image decoding apparatus comprising:

an obtainer configured to obtain, from a sequence parameter set of a bitstream, information indicating a plurality of first reference picture lists for a sequence of pictures including a current picture, and obtain, from a group header of the bitstream, an indicator for a current group of blocks including a current block in the current picture; and

a prediction decoder configured to obtain a second reference picture list based on a first reference picture list indicated by the indicator among the plurality of first reference picture lists, and predictively decode a lower layer block of the current block based on a reference picture included in the second reference picture list.

15. An image encoding method comprising:

constructing a plurality of first reference picture lists for a picture sequence including a current picture;

selecting a first reference picture list for a current block group including a current block in a current picture from the plurality of first reference picture lists;

obtaining a second reference image list based on the selected first reference image list; and is

The lower layer block of the current block is prediction-encoded based on the reference picture included in the second reference picture list.

Technical Field

The present disclosure relates to image encoding and decoding. More particularly, the present disclosure relates to a method and apparatus for encoding an image by using a hierarchical structure of the image and a method and apparatus for decoding the image.

Background

In image encoding and decoding, an image may be divided into blocks, and each block may be prediction-encoded and prediction-decoded via inter prediction or intra prediction.

Inter prediction is a method of compressing images by removing temporal redundancy between images, and a representative example of inter prediction is motion estimation encoding. In motion estimation coding, a block of a current picture is predicted by using at least one reference picture. A reference block that is most similar to the current block may be searched for within a predetermined search range by using a predetermined evaluation function. A current block is predicted based on a reference block, and a prediction block generated as a result of the prediction is subtracted from the current block to generate a residual block and encode the residual block. Here, in order to more accurately perform prediction, pixels of a sub-pixel unit smaller than an integer pixel unit may be generated by performing interpolation on a reference image, and inter prediction may be performed based on the pixels of the sub-pixel unit.

In codecs such as h.264 Advanced Video Coding (AVC) and High Efficiency Video Coding (HEVC), in order to predict a motion vector of a current block, a motion vector of a previously coded block adjacent to the current block or a block included in a previously coded picture is used as a predicted motion vector of the current block. A differential motion vector representing a difference between the motion vector of the current block and the prediction motion vector is signaled to a decoder by using a predetermined method.

Disclosure of Invention

Technical problem

The image encoding and decoding apparatus and the image encoding and decoding method thereof according to the embodiments aim to encode and decode an image through a low bit rate by using a hierarchical structure of the image.

Solution to the problem

An image decoding method according to an embodiment includes: obtaining information indicating a plurality of first reference picture lists for a picture sequence including a current picture from a sequence parameter set of a bitstream; obtaining an indicator for a current block group including a current block in a current picture from a group header of the bitstream; obtaining a second reference picture list based on a first reference picture list indicated by the indicator among the plurality of first reference picture lists; and predictively decoding a lower layer block of the current block based on the reference picture included in the second reference picture list.

Advantageous effects of the disclosure

The image encoding and decoding apparatus and the image encoding and decoding method thereof according to the embodiments can encode and decode an image through a low bit rate by using a hierarchical structure of the image.

However, effects that can be achieved by the image encoding and decoding apparatus and the image encoding and decoding method thereof according to the embodiments are not limited to the above, and other effects that are not mentioned may be clearly understood by those of ordinary skill in the art from the following description.

Drawings

A brief description of each figure is provided to better understand the figures referenced herein.

Fig. 1 is a block diagram of an image decoding apparatus according to an embodiment.

Fig. 2 is a block diagram of an image encoding apparatus according to an embodiment.

Fig. 3 illustrates a process of determining at least one coding unit by dividing a current coding unit, performed by an image decoding apparatus according to an embodiment.

Fig. 4 illustrates a process of determining at least one coding unit by dividing a non-square coding unit, performed by an image decoding apparatus according to an embodiment.

Fig. 5 illustrates a process of dividing a coding unit based on at least one of block shape information and division shape mode information performed by an image decoding apparatus according to an embodiment.

Fig. 6 illustrates a method of determining a predetermined coding unit from an odd number of coding units performed by an image decoding apparatus according to an embodiment.

Fig. 7 illustrates an order of processing a plurality of coding units when an image decoding apparatus determines the plurality of coding units by dividing a current coding unit according to an embodiment.

Fig. 8 illustrates a process in which the image decoding apparatus determines that the current coding unit is divided into an odd number of coding units when the coding units cannot be processed in a predetermined order according to the embodiment.

Fig. 9 illustrates a process of determining at least one coding unit by dividing a first coding unit performed by the image decoding apparatus according to the embodiment.

Fig. 10 illustrates that shapes into which the second encoding unit can be divided are limited when the second encoding unit having a non-square shape determined by the image decoding apparatus dividing the first encoding unit satisfies a predetermined condition according to the embodiment.

Fig. 11 illustrates a process of dividing a square encoding unit performed by an image decoding apparatus when the division shape mode information cannot indicate that the square encoding unit is divided into four square encoding units, according to an embodiment.

Fig. 12 illustrates that the processing order between a plurality of coding units may be changed according to the process of dividing the coding units according to the embodiment.

Fig. 13 illustrates a process of determining a depth of a coding unit when a shape and a size of the coding unit are changed when the coding unit is recursively divided such that a plurality of coding units are determined, according to an embodiment.

Fig. 14 illustrates a depth that may be determined based on the shape and size of a coding unit and a Partial Index (PID) for distinguishing the coding units according to an embodiment.

Fig. 15 illustrates determining a plurality of coding units based on a plurality of predetermined data units included in a picture according to an embodiment.

Fig. 16 illustrates a coding unit that can be determined for each picture when a combination of shapes into which the coding unit can be divided is different for each picture according to an embodiment.

Fig. 17 illustrates various shapes of a coding unit that may be determined based on partition shape mode information that may be represented as a binary code according to an embodiment.

Fig. 18 illustrates another shape of a coding unit that may be determined based on partition shape mode information that may be represented as a binary code according to an embodiment.

Fig. 19 shows a block diagram of an image encoding and decoding system that performs loop filtering.

Fig. 20 is a diagram illustrating components of an image decoding apparatus according to an embodiment.

Fig. 21 is an exemplary diagram illustrating a structure of a bitstream generated from a hierarchical structure of images.

Fig. 22 is a diagram illustrating slices, parallel blocks, and Coding Tree Units (CTUs) determined in a current picture.

Fig. 23 is a diagram for describing a method of configuring a slice in a current image.

Fig. 24 is a diagram for describing another method of configuring a slice in a current image.

Fig. 25 is an exemplary diagram illustrating a plurality of first reference picture lists obtained by a sequence parameter set.

Fig. 26 is a diagram for describing a method of obtaining the second reference image list.

Fig. 27 is a diagram for describing a method of obtaining the second reference image list.

Fig. 28 is a diagram for describing another method of obtaining the second reference image list.

Fig. 29 is a diagram for describing another method of obtaining the second reference image list.

Fig. 30 is a diagram for describing another method of obtaining the second reference image list.

Fig. 31 is a diagram showing a bitstream including a plurality of post-processing parameter sets for luminance mapping or adaptive loop filtering.

Fig. 32 is a diagram for describing an image decoding method according to an embodiment.

Fig. 33 is a diagram showing components of an image encoding apparatus according to an embodiment.

Fig. 34 is a diagram for describing an image encoding method according to an embodiment.

Best mode

An image decoding method according to an embodiment includes: obtaining information indicating a plurality of first reference picture lists for a picture sequence including a current picture from a sequence parameter set of a bitstream; obtaining an indicator for a current block group including a current block in a current picture from a group header of the bitstream; obtaining a second reference picture list based on a first reference picture list indicated by the indicator among the plurality of first reference picture lists; and predictively decoding a lower layer block of the current block based on the reference picture included in the second reference picture list.

According to an embodiment, a lower layer block included in a next block group in a current picture may be prediction-decoded based on a first reference picture list other than the first reference picture list indicated by the indicator and a second reference picture list among the plurality of first reference picture lists.

According to an embodiment, the step of obtaining the second reference picture list may comprise: obtaining a second reference picture list by changing an order of one or more reference pictures of the reference pictures included in the first reference picture list indicated by the indicator.

According to an embodiment, the first reference picture list indicated by the indicator may include a first type of reference picture and a second type of reference picture, wherein the obtaining of the second reference picture list may include: obtaining a second reference picture list by excluding a second type of reference picture from the first reference picture list indicated by the indicator.

According to an embodiment, the first reference picture list indicated by the indicator may include a first type of reference picture and a second type of reference picture, wherein the obtaining of the second reference picture list may include: obtaining a second reference picture list by excluding a second type of reference picture from the first reference picture list indicated by the indicator and adding the second type of reference picture indicated by a Picture Order Count (POC) related value obtained from the group header to the first reference picture list indicated by the indicator.

According to an embodiment, the first reference picture list indicated by the indicator may include only reference pictures of the first type, wherein the obtaining of the second reference picture list may include: obtaining a second reference picture list by adding a second type of reference picture indicated by a Picture Order Count (POC) related value obtained from the group header to the first reference picture list indicated by the indicator.

According to an embodiment, the step of obtaining the second reference picture list may comprise: obtaining a second reference picture list including a first type of reference picture included in any one of the reference picture lists indicated by the indicator and a second type of reference picture included in another one of the reference picture lists indicated by the indicator.

According to an embodiment, a higher index may be allocated to one of the first type of reference picture and the second type of reference picture than to the other of the first type of reference picture and the second type of reference picture.

According to an embodiment, the image decoding method may further include: order information of the first type of reference picture and the second type of reference picture is obtained from the group header, wherein an index according to the order information may be allocated to the first type of reference picture and the second type of reference picture.

According to an embodiment, the image decoding method may further include: obtaining, from the group header, a difference value between Picture Order Count (POC) related values of one or more of reference pictures included in a first reference picture list indicated by the indicator and POC related values of one or more of reference pictures to be included in a second reference picture list, wherein obtaining the second reference picture list may comprise: obtaining a second reference picture list by replacing one or more of the reference pictures included in the first reference picture list indicated by the indicator based on the obtained difference value.

According to an embodiment, the image decoding method may further include: determining a plurality of blocks in a current image; obtaining address information for a group of blocks from the bitstream; and configuring a block group each including one or more blocks in the current picture according to the obtained address information, wherein the current block may be any one of the blocks, and the current block group may be any one of the block groups.

According to an embodiment, the address information may include identification information of a bottom-right block of blocks included in each of the block groups, wherein the configuring of the block groups may include: configuring a first block group, wherein the first block group includes an upper left square located at an upper left side and a lower right block indicated by identification information of the lower right block among the plurality of blocks; identifying an upper left square of the second block group based on identification information of blocks included in the first block group; and configuring a second block group, wherein the second block group includes a lower-right block indicated by the identification information of the lower-right block and the recognized upper-left square.

According to an embodiment, the image decoding method may further include: obtaining at least one post-processing parameter set for luma mapping from the bitstream; obtaining, from the group header or picture parameter set of the bitstream, identification information indicating a post-processing parameter set applied to a luminance map for prediction samples of a lower layer block obtained as a result of predictive decoding; and luminance mapping the predicted samples according to a set of post-processing parameters indicated by the identification information.

An image decoding apparatus according to an embodiment includes: an obtainer configured to obtain, from a sequence parameter set of a bitstream, information indicating a plurality of first reference picture lists for a sequence of pictures including a current picture, and obtain, from a group header of the bitstream, an indicator for a current group of blocks including a current block in the current picture; and a prediction decoder configured to obtain a second reference picture list based on a first reference picture list indicated by the indicator among the plurality of first reference picture lists, and predictively decode a lower layer block of the current block based on a reference picture included in the second reference picture list.

An image encoding method according to an embodiment includes: constructing a plurality of first reference picture lists for a picture sequence including a current picture; selecting a first reference picture list for a current block group including a current block in a current picture from the plurality of first reference picture lists; obtaining a second reference image list based on the selected first reference image list; and predictive-encoding a lower layer block of the current block based on the reference picture included in the second reference picture list.

Detailed Description

While the disclosure is susceptible to various modifications and alternative embodiments, specific embodiments have been shown in the drawings and will be described in detail in the written description. However, it is not intended to limit the present disclosure to the particular mode of practice, and it will be understood that all changes, equivalents, and substitutions that do not depart from the spirit and technical scope of the various embodiments are included in the present disclosure.

In the description of the embodiments, specific detailed explanations of related techniques are omitted when it is considered that the specific detailed explanations may unnecessarily obscure the essence of the present disclosure. Further, the numbers (e.g., first, second, etc.) used in the description of the specification are merely identifier codes for distinguishing one element from another element.

Further, in the present specification, it will be understood that when elements are "connected" or "coupled" to each other, the elements may be directly connected or coupled to each other, but may be alternatively connected or coupled to each other through intermediate elements between the elements, unless otherwise specified.

In the present specification, with respect to elements expressed as "units" or "modules", two or more elements may be combined into one element, or one element may be divided into two or more elements according to subdivided functions. Further, each element described below may additionally perform some or all of the functions performed by another element in addition to its own primary function, and some of the primary functions of each element may be performed entirely by another component.

Further, in this specification, "image" or "screen" may mean a still image or a moving image of a video, that is, the video itself.

Further, in this specification, "sampling point" or "signal" means data assigned to a sampling position of an image, that is, data to be processed. For example, the pixel values of the image in the spatial domain and the transform coefficients on the transform domain may be samples. A unit comprising at least one such sample point may be defined as a block.

Hereinafter, an image encoding method and apparatus and an image decoding method and apparatus based on a tree structure encoding unit and a transform unit according to embodiments are described with reference to fig. 1 to 19.

Fig. 1 is a block diagram of an image decoding apparatus 100 according to an embodiment.

The image decoding apparatus 100 may include a bitstream obtainer 110 and a decoder 120. The bitstream obtainer 110 and the decoder 120 may include at least one processor. Further, the bitstream obtainer 110 and the decoder 120 may include a memory storing instructions to be executed by the at least one processor.

The bitstream obtainer 110 may receive a bitstream. The bitstream includes information regarding image encoding of the image encoding apparatus 200 described later. Further, a bitstream may be transmitted from the image encoding apparatus 200. The image encoding apparatus 200 and the image decoding apparatus 100 may be connected in a wired manner or a wireless manner, and the bitstream obtainer 110 may receive the bitstream in a wired manner or a wireless manner. The bitstream obtainer 110 may receive the bitstream from a storage medium such as an optical medium or a hard disk. The decoder 120 may reconstruct an image based on information obtained from the received bitstream. The decoder 120 may obtain syntax elements for reconstructing the image from the bitstream. The decoder 120 may reconstruct the image based on the syntax elements.

To describe the operation of the image decoding apparatus 100 in detail, the bitstream obtainer 110 may receive a bitstream.

The image decoding apparatus 100 may perform an operation of obtaining a binary bit string corresponding to the division shape pattern of the coding unit from the bitstream. Further, the image decoding apparatus 100 may perform an operation of determining a division rule of the coding unit. Further, the image decoding apparatus 100 may perform an operation of dividing the coding unit into a plurality of coding units based on at least one of the binary bit string corresponding to the division shape mode and the division rule. To determine the division rule, the image decoding apparatus 100 may determine the first range of allowable sizes of the coding unit according to a ratio between the width and the height of the coding unit. To determine the division rule, the image decoding apparatus 100 may determine the second range of allowable sizes of the coding unit according to the division shape mode of the coding unit.

Hereinafter, the division of the coding unit is described in detail according to an embodiment of the present disclosure.

First, one picture may be divided into one or more stripes or one or more parallel blocks. A slice or a parallel block may be a sequence of one or more largest coding units, i.e., Coding Tree Units (CTUs). According to an embodiment, one stripe may include one or more parallel blocks, and one stripe may include one or more CTUs. A slice including one parallel block or a plurality of parallel blocks may be determined in a picture.

As a concept compared to CTUs, there is a largest coding block (i.e., a Coding Tree Block (CTB)). CTB denotes an N × N block including N × N samples (N is an integer). Each color component may be divided into one or more CTBs.

When a picture has three arrays of samples (arrays of samples for Y component, Cr component, and Cb component), the CTU includes a CTB of luma samples, two CTBs of chroma samples corresponding to the luma samples, and a syntax structure for encoding the luma samples and the chroma samples. When the picture is a monochrome picture, the CTU includes a CTB of monochrome samples and a syntax structure for encoding the monochrome samples. When a picture is a picture coded in a color plane separated according to color components, the CTU includes a syntax structure for coding the picture and samples of the picture.

One CTB may be divided into mxn encoded blocks including mxn samples (M and N are integers).

When a picture has an array of samples for Y, Cr and Cb components, the coding unit comprises a coding block of luma samples, two coding blocks of chroma samples corresponding to the luma samples and a syntax structure for coding the luma samples and the chroma samples. When the picture is a monochrome picture, the coding unit comprises a coding block of monochrome samples and a syntax structure for coding the monochrome samples. When a picture is a picture coded in a color plane separated according to color components, the coding unit includes a syntax structure for coding the picture and a sample point of the picture.

As described above, the CTB and the CTU are conceptually distinguished from each other, and the coding block and the coding unit are conceptually distinguished from each other. That is, a coding unit (CTU) refers to a data structure including a coding block (CTB) including corresponding samples and syntax elements corresponding to the coding block (CTB). However, since a person having ordinary skill in the art understands that a coding unit (CTU) or a coding block (CTB) refers to a block of a specific size including a specific number of samples, unless otherwise described, the CTB and the CTU or the coding block and the coding unit are referred to in the following description without distinction.

The picture may be divided into CTUs. The size of each CTU may be determined based on information obtained from the bitstream. The shape of each CTU may be a square shape of the same size. However, the embodiments are not limited thereto.

For example, information on the maximum size of a luma coding block may be obtained from a bitstream. For example, the maximum size of the luma coding block indicated by the information on the maximum size of the luma coding block may be one of 4 × 4, 8 × 8, 16 × 16, 32 × 32, 64 × 64, 128 × 128, and 256 × 256.

For example, information on the luma block size difference and the maximum size of the luma coding block that can be split in two can be obtained from the bitstream. The information on the luminance block size difference may refer to a size difference between the luminance CTU and the luminance CTB that may be divided into two. Accordingly, when information on the maximum size of a luma coding block that can be divided into two obtained from a bitstream and information on a luma block size difference are combined with each other, the size of a luma CTU can be determined. The size of the chrominance CTU may be determined by using the size of the luminance CTU. For example, when the Y: Cb: Cr ratio is 4:2:0 according to the color format, the size of the chrominance block may be half the size of the luminance block, and the size of the chrominance CTU may be half the size of the luminance CTU.

According to the embodiment, since information on the maximum size of the bi-partitionable luma coding block is obtained from a bitstream, the maximum size of the bi-partitionable luma coding block may be variably determined. Instead, the maximum size of the tri-partitionable luma coding block may be fixed. For example, the maximum size of a tri-partitionable luma coding block in an I picture may be 32 × 32, and the maximum size of a tri-partitionable luma coding block in a P picture or a B picture may be 64 × 64.

Also, the CTUs may be hierarchically divided into coding units based on division shape mode information obtained from the bitstream. At least one of information indicating whether to perform the quad-division, information indicating whether to perform the multi-division, division direction information, and division type information may be obtained from the bitstream as the division shape mode information.

For example, the information indicating whether to perform the quartiles may indicate whether the current coding unit is quartiled (QUAD _ SPLIT) or not.

When the current coding unit is not divided by four, the information indicating whether to perform multi-division may indicate whether the current coding unit is NO longer divided (NO _ SPLIT) or is divided by two/three.

When the current coding unit is divided into two or three, the division direction information indicates that the current coding unit is divided in one of the horizontal direction and the vertical direction.

The partition type information indicates that the current coding unit is divided into two or three partitions when the current coding unit is divided in a horizontal direction or a vertical direction.

The partition mode of the current coding unit may be determined according to the partition direction information and the partition type information. A division mode when the current coding unit is divided into two in the horizontal direction may be determined as a horizontal bi-division mode (SPLIT _ BT _ HOR), a division mode when the current coding unit is divided into three in the horizontal direction may be determined as a horizontal tri-division mode (SPLIT _ TT _ HOR), a division mode when the current coding unit is divided into two in the vertical direction may be determined as a vertical bi-division mode (SPLIT _ BT _ VER), and a division mode when the current coding unit is divided into three in the vertical direction may be determined as a vertical tri-division mode SPLIT _ TT _ VER.

The image decoding apparatus 100 may obtain partition shape pattern information from one binary bit string from the bitstream. The form of the bitstream received by the image decoding apparatus 100 may include a fixed-length binary code, a unary code, a truncated unary code, a predetermined binary code, and the like. A binary bit string is a binary bit of information. The binary string may comprise at least one bit. The image decoding apparatus 100 may obtain division shape mode information corresponding to the binary bit string based on the division rule. The image decoding apparatus 100 may determine whether to divide the coding unit into four, whether to not divide the coding unit into four, a division direction, and a division type based on one binary bit string.

The coding unit may be less than or equal to the CTU. For example, a CTU is one of the coding units because it is a coding unit having the largest size. When the partition shape mode information on the CTU indicates that the partition is not performed, the coding unit determined in the CTU has the same size as the CTU. When the division shape mode information on the CTU indicates that division is performed, the CTU may be divided into coding units. Further, when the partition shape mode information on the coding unit indicates that the partition is performed, the coding unit may be divided into smaller coding units. However, the division of the picture is not limited thereto, and the CTU and the coding unit may not be distinguished. The division of the coding unit will be described in detail with reference to fig. 3 to 16.

Further, one or more prediction blocks for prediction may be determined from the coding unit. The prediction block may be equal to or smaller than the coding unit. Further, one or more transform blocks for transform may be determined from the coding unit. The transform block may be equal to or smaller than the coding unit.

The shapes and sizes of the transform block and the prediction block may be unrelated to each other.

In another embodiment, the prediction may be performed by using the coding unit as a prediction unit. Further, the transform may be performed by using the coding unit as a transform block.

The division of the coding unit will be described in detail with reference to fig. 3 to 16. The current block and the neighboring block of the present disclosure may indicate one of a CTU, a coding unit, a prediction block, and a transform block. Also, the current block of the current coding unit is a block currently being decoded or encoded or a block currently being divided. The neighboring blocks may be blocks reconstructed before the current block. The neighboring block may be spatially or temporally adjacent to the current block. The neighboring block may be located at one of below left, left side, above left, above right, right side, and below right of the current block.

Fig. 3 illustrates a process of determining at least one coding unit by dividing a current coding unit, performed by the image decoding apparatus 100 according to an embodiment.

The block shape may include 4N × 4N, 4N × 2N, 2N × 4N, 4N × N, N × 4N, 32N × N, N × 32N, 16N × N, N × 16N, 8N × N, or N × 8N. Here, N may be a positive integer. The block shape information is information indicating at least one of a shape, a direction, an aspect ratio, or a size of the coding unit.

The shape of the coding unit may include square and non-square. When the width length and the height length of the coding unit are the same (i.e., when the block shape of the coding unit is 4N × 4N), the image decoding apparatus 100 may determine the block shape information of the coding unit as a square. The image decoding apparatus 100 may determine the shape of the coding unit to be non-square.

When the width and the height of the coding unit are different from each other (i.e., when the block shape of the coding unit is 4N × 2N, 2N × 4N, 4N × N, N × 4N, 32N × N, N × 32N, 16N × N, N × 16N, 8N × N, or N × 8N), the image decoding apparatus 100 may determine the block shape information of the coding unit as a non-square shape. When the shape of the coding unit is non-square, the image decoding apparatus 100 may determine an aspect ratio in the block shape information of the coding unit to be at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32: 1. Further, the image decoding apparatus 100 may determine whether the coding unit is in the horizontal direction or the vertical direction based on the width length and the height length of the coding unit. Further, the image decoding apparatus 100 may determine the size of the coding unit based on at least one of a width length, a height length, or an area of the coding unit.

According to the embodiment, the image decoding apparatus 100 may determine the shape of the coding unit by using the block shape information, and may determine the division method of the coding unit by using the division shape mode information. That is, the coding unit division method indicated by the division shape mode information may be determined based on the block shape indicated by the block shape information used by the image decoding apparatus 100.

The image decoding apparatus 100 may obtain the partition shape mode information from the bitstream. However, the embodiment is not limited thereto, and the image decoding apparatus 100 and the image encoding apparatus 200 may determine the previously agreed division shape mode information based on the block shape information. The image decoding apparatus 100 may determine pre-agreed partition shape mode information for the CTU or the minimum coding unit. For example, the image decoding apparatus 100 may determine the partition shape mode information for the CTU as a quad partition. Further, the image decoding apparatus 100 may determine the division shape mode information regarding the minimum coding unit as "no division is performed". Specifically, the image decoding apparatus 100 may determine that the size of the CTU is 256 × 256. The image decoding apparatus 100 may determine the previously agreed division shape mode information as the quad division. The quad division is a division shape pattern in which the width and height of the coding unit are halved. The image decoding apparatus 100 may obtain coding units of 128 × 128 size from CTUs of 256 × 256 size based on the partition shape mode information. Further, the image decoding apparatus 100 may determine that the size of the minimum coding unit is 4 × 4. The image decoding apparatus 100 may obtain the division shape mode information indicating "not to perform division" for the minimum coding unit.

According to an embodiment, the image decoding apparatus 100 may use block shape information indicating that the current coding unit has a square shape. For example, the image decoding apparatus 100 may determine whether to not divide the square encoding unit, whether to divide the square encoding unit vertically, whether to divide the square encoding unit horizontally, or whether to divide the square encoding unit into four encoding units based on the division shape mode information. Referring to fig. 3, when the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 may not divide the coding unit 310a having the same size as the current coding unit 300 based on the division shape mode information indicating that division is not performed, or may determine the coding units 310b, 310c, 310d, 310e, or 310f divided based on the division shape mode information indicating a specific division method.

Referring to fig. 3, according to the embodiment, the image decoding apparatus 100 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the division shape mode information indicating that the division is performed in the vertical direction. The image decoding apparatus 100 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape mode information indicating that the division is performed in the horizontal direction. The image decoding apparatus 100 may determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical direction and the horizontal direction based on the division shape mode information indicating that the division is performed in the vertical direction and the horizontal direction. According to the embodiment, the image decoding apparatus 100 may determine the three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on the division shape mode information indicating that the tri-division is performed in the vertical direction. The image decoding apparatus 100 may determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on the division shape mode information indicating that the three divisions are performed in the horizontal direction. However, the dividing method of the square coding unit is not limited to the above-described method, and the division shape mode information may indicate various methods. A specific partitioning method for partitioning a square coding unit will be described in detail below with respect to various embodiments.

Fig. 4 illustrates a process of determining at least one coding unit by dividing a non-square coding unit performed by the image decoding apparatus 100 according to an embodiment.

According to an embodiment, the image decoding apparatus 100 may use block shape information indicating that the current coding unit has a non-square shape. The image decoding apparatus 100 may determine whether the non-square current coding unit is not divided or whether the non-square current coding unit is divided by using a specific division method based on the division shape mode information. Referring to fig. 4, when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the image decoding apparatus 100 may determine a coding unit 410 or 460 having the same size as the current coding unit 400 or 450 based on the partition shape mode information indicating that the partitioning is not performed, or may determine coding units 420a and 420b, 430a to 430c, 470a and 470b, or 480a to 480c partitioned based on the partition shape mode information indicating a specific partitioning method. A specific partitioning method for partitioning the non-square coding unit will be described in detail below with respect to various embodiments.

According to the embodiment, the image decoding apparatus 100 may determine the division method of the coding unit by using the division shape mode information, and in this case, the division shape mode information may indicate the number of one or more coding units generated by dividing the coding unit. Referring to fig. 4, when the division shape mode information indicates to divide the current coding unit 400 or 450 into two coding units, the image decoding apparatus 100 may determine the two coding units 420a and 420b or 470a and 470b included in the current coding unit 400 or 450 by dividing the current coding unit 400 or 450 based on the division shape mode information.

According to the embodiment, when the image decoding apparatus 100 divides the non-square current coding unit 400 or 450 based on the division shape mode information, the image decoding apparatus 100 may consider the position of the long side of the non-square current coding unit 400 or 450 to divide the current coding unit. For example, the image decoding apparatus 100 may determine a plurality of coding units by dividing a long side of the current coding unit 400 or 450 based on the shape of the current coding unit 400 or 450.

According to an embodiment, when the division shape mode information indicates that the coding unit is divided (tri-divided) into odd blocks, the image decoding apparatus 100 may determine odd coding units included in the current coding unit 400 or 450. For example, when the division shape mode information indicates that the current coding unit 400 or 450 is divided into three coding units, the image decoding apparatus 100 may divide the current coding unit 400 or 450 into three coding units 430a, 430b, and 430c or 480a, 480b, and 480 c.

According to an embodiment, the ratio of the width and the height of the current coding unit 400 or 450 may be 4:1 or 1: 4. When the ratio of the width to the height is 4:1, the block shape information may be in the horizontal direction because the width length is longer than the height length. When the ratio of the width to the height is 1:4, the block shape information may be in the vertical direction because the width length is shorter than the height length. The image decoding apparatus 100 may determine to divide the current coding unit into odd blocks based on the division shape mode information. Also, the image decoding apparatus 100 may determine the division direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current encoding unit 400 is in the vertical direction, the image decoding apparatus 100 may determine the encoding units 430a to 430c by dividing the current encoding unit 400 in the horizontal direction. Further, when the current encoding unit 450 is in the horizontal direction, the image decoding apparatus 100 may determine the encoding units 480a to 480c by dividing the current encoding unit 450 in the vertical direction.

According to an embodiment, the image decoding apparatus 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and not all of the determined coding units may have the same size. For example, a specific coding unit 430b or 480b of the determined odd number of coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have a size different from that of the other coding units 430a and 430c or 480a and 480 c. That is, the coding unit that can be determined by dividing the current coding unit 400 or 450 may have a plurality of sizes, and in some cases, all of the odd-numbered coding units 430a, 430b, and 430c or 480a, 480b, and 480c may have different sizes.

According to the embodiment, when the division shape mode information indicates that the coding unit is divided into odd blocks, the image decoding apparatus 100 may determine an odd number of coding units included in the current coding unit 400 or 450, and furthermore, may apply a specific restriction to at least one coding unit of the odd number of coding units generated by dividing the current coding unit 400 or 450. Referring to fig. 4, the image decoding apparatus 100 may set a decoding process with respect to a coding unit 430b or 480b to be different from that of other coding units 430a and 430c or 480a or 480c, wherein the coding unit 430b or 480b is located at the center of three coding units 430a, 430b and 430c or 480a, 480b and 480c generated by dividing the current coding unit 400 or 450. For example, the image decoding apparatus 100 may restrict the coding unit 430b or 480b at the center position from being divided no longer or only a certain number of times, unlike the other coding units 430a and 430c or 480a and 480 c.

Fig. 5 illustrates a process of dividing a coding unit based on at least one of block shape information and division shape mode information performed by the image decoding apparatus 100 according to an embodiment.

According to the embodiment, the image decoding apparatus 100 may determine to divide the square first coding unit 500 into coding units or not to divide the square first coding unit 500 based on at least one of the block shape information and the divided shape mode information. According to an embodiment, when the division shape mode information indicates that the first encoding unit 500 is divided in the horizontal direction, the image decoding apparatus 100 may determine the second encoding unit 510 by dividing the first encoding unit 500 in the horizontal direction. The first coding unit, the second coding unit, and the third coding unit used according to the embodiment are terms used to understand a relationship before dividing the coding unit and after dividing the coding unit. For example, the second coding unit may be determined by dividing the first coding unit, and the third coding unit may be determined by dividing the second coding unit. It will be understood that the structure of the first, second and third encoding units follows the above description.

According to the embodiment, the image decoding apparatus 100 may determine to divide the determined second coding unit 510 into coding units or not to divide the determined second coding unit 510 based on the division shape mode information. Referring to fig. 5, the image decoding apparatus 100 may divide the non-square second encoding unit 510 determined by dividing the first encoding unit 500 into one or more third encoding units 520a, or 520b, 520c, and 520d, or may not divide the non-square second encoding unit 510, based on the division shape mode information. The image decoding apparatus 100 may obtain the division shape mode information, and may obtain a plurality of second encoding units (e.g., 510) of various shapes by dividing the first encoding unit 500 based on the obtained division shape mode information, and may divide the second encoding unit 510 by a division method using the first encoding unit 500 based on the division shape mode information. According to an embodiment, when the first encoding unit 500 is divided into the second encoding units 510 based on the division shape mode information of the first encoding unit 500, the second encoding units 510 may also be divided into the third encoding units 520a, or 520b, 520c, and 520d based on the division shape mode information of the second encoding units 510. That is, the coding units may be recursively divided based on the division shape mode information of each coding unit. Accordingly, the square coding unit may be determined by dividing the non-square coding unit, and the non-square coding unit may be determined by recursively dividing the square coding unit.

Referring to fig. 5, a specific coding unit (e.g., a coding unit at a center position or a square coding unit) among an odd number of third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510 may be recursively divided. According to an embodiment, the square third encoding unit 520c among the odd number of third encoding units 520b, 520c, and 520d may be divided into a plurality of fourth encoding units in the horizontal direction. The non-square fourth encoding unit 530b or 530d among the plurality of fourth encoding units 530a, 530b, 530c and 530d may be again divided into a plurality of encoding units. For example, the non-square fourth coding unit 530b or 530d may be divided into an odd number of coding units again. Methods that may be used to recursively divide the coding units are described below with respect to various embodiments.

According to the embodiment, the image decoding apparatus 100 may divide each of the third encoding units 520a, or 520b, 520c, and 520d into encoding units based on the division shape mode information. Also, the image decoding apparatus 100 may determine not to divide the second encoding unit 510 based on the division shape mode information. According to the embodiment, the image decoding apparatus 100 may divide the non-square second encoding unit 510 into an odd number of third encoding units 520b, 520c, and 520 d. The image decoding apparatus 100 may apply a specific restriction to a specific third encoding unit among the odd-numbered third encoding units 520b, 520c, and 520 d. For example, the image decoding apparatus 100 may limit the number of times the third encoding unit 520c at the center position among the odd number of third encoding units 520b, 520c, and 520d is no longer divided or divided by a settable number.

Referring to fig. 5, the image decoding apparatus 100 may limit the third encoding unit 520c at the center position among the odd number of third encoding units 520b, 520c, and 520d included in the non-square second encoding unit 510 to no longer be divided, to be divided by using a specific division method (e.g., to be divided only into four encoding units or to be divided by using the division method of the second encoding unit 510), or to be divided only a specific number of times (e.g., to be divided only n times (where n > 0)). However, the restriction on the third encoding unit 520c at the center position is not limited to the above-described example, and may include various restrictions for decoding the third encoding unit 520c at the center position differently from the other third encoding units 520b and 520 d.

According to the embodiment, the image decoding apparatus 100 may obtain the partition shape mode information for partitioning the current coding unit from a specific position in the current coding unit.

Fig. 6 illustrates a method of determining a specific coding unit from an odd number of coding units performed by the image decoding apparatus 100 according to an embodiment.

Referring to fig. 6, the division shape mode information of the current coding unit 600 or 650 may be obtained from a sample point (e.g., a sample point 640 or 690 of a center position) of a specific position among a plurality of sample points included in the current coding unit 600 or 650. However, the specific position in the current coding unit 600 where the at least one piece of divided shape mode information is available is not limited to the center position in fig. 6, and may include various positions (e.g., upper, lower, left, right, upper-left, lower-left, upper-right, and lower-right positions) included in the current coding unit 600. The image decoding apparatus 100 may obtain the division shape mode information from a specific location and may determine to divide the current coding unit into coding units of various shapes and various sizes or not to divide the current coding unit.

According to an embodiment, the image decoding apparatus 100 may select one of the coding units when the current coding unit is divided into a certain number of coding units. As will be described below with respect to various embodiments, various methods may be used to select one of a plurality of coding units.

According to the embodiment, the image decoding apparatus 100 may divide a current coding unit into a plurality of coding units, and may determine a coding unit at a specific position.

According to an embodiment, the image decoding apparatus 100 may determine a coding unit at a center position among the odd-numbered coding units using information indicating positions of the odd-numbered coding units. Referring to fig. 6, the image decoding apparatus 100 may determine an odd number of coding units 620a, 620b, and 620c or an odd number of coding units 660a, 660b, and 660c by dividing the current coding unit 600 or the current coding unit 650. The image decoding apparatus 100 may determine the intermediate encoding unit 620b or the intermediate encoding unit 660b by using information regarding the positions of the odd-numbered encoding units 620a, 620b, and 620c or the odd-numbered encoding units 660a, 660b, and 660 c. For example, the image decoding apparatus 100 may determine the encoding unit 620b of the central position by determining the positions of the encoding units 620a, 620b, and 620c based on information indicating the positions of specific sampling points included in the encoding units 620a, 620b, and 620 c. In detail, the image decoding apparatus 100 may determine the encoding unit 620b at the center position by determining the positions of the encoding units 620a, 620b, and 620c based on information indicating the positions of the upper left samples 630a, 630b, and 630c of the encoding units 620a, 620b, and 620 c.

According to an embodiment, the information indicating the positions of the upper left samples 630a, 630b, and 630c respectively included in the encoding units 620a, 620b, and 620c may include information about the positions or coordinates of the encoding units 620a, 620b, and 620c in the picture. According to an embodiment, the information indicating the positions of the upper left samples 630a, 630b, and 630c respectively included in the coding units 620a, 620b, and 620c may include information indicating the width or height of the coding units 620a, 620b, and 620c included in the current coding unit 600, and the width or height may correspond to information indicating the difference between the coordinates of the coding units 620a, 620b, and 620c in the picture. That is, the image decoding apparatus 100 may determine the encoding unit 620b at the center position by directly using information on the positions or coordinates of the encoding units 620a, 620b, and 620c in the picture or by using information on the widths or heights of the encoding units corresponding to the differences between the coordinates.

According to an embodiment, the information indicating the position of the upper left sample 630a of the upper encoding unit 620a may include coordinates (xa, ya), the information indicating the position of the upper left sample 630b of the middle encoding unit 620b may include coordinates (xb, yb), and the information indicating the position of the upper left sample 630c of the lower encoding unit 620c may include coordinates (xc, yc). The image decoding apparatus 100 may determine the middle encoding unit 620b by using the coordinates of the upper left samples 630a, 630b, and 630c included in the encoding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the upper left samples 630a, 630b, and 630c are sorted in an ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the sample 630b at the center position may be determined as the coding unit at the center position among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the positions of the upper left samples 630a, 630b, and 630c may include coordinates indicating absolute positions in the picture, or coordinates (dxb, dyb) indicating the relative position of the upper left sample 630b of the middle coding unit 620b with respect to the position of the upper left sample 630a of the upper coding unit 620a and coordinates (dxc, dyc) indicating the relative position of the upper left sample 630c of the lower coding unit 620c with respect to the position of the upper left sample 630a of the upper coding unit 620a may be used. The method of determining the encoding unit at a specific position by using the coordinates of the sampling points included in the encoding unit as the information indicating the positions of the sampling points is not limited to the above-described method, and may include various arithmetic methods capable of using the coordinates of the sampling points.

According to the embodiment, the image decoding apparatus 100 may divide the current encoding unit 600 into a plurality of encoding units 620a, 620b, and 620c, and may select one of the encoding units 620a, 620b, and 620c based on a specific criterion. For example, the image decoding apparatus 100 may select the encoding unit 620b having a size different from the sizes of the other encoding units from among the encoding units 620a, 620b, and 620 c.

According to the embodiment, the image decoding apparatus 100 may determine the width or height of each of the encoding units 620a, 620b, and 620c by using the coordinates (xa, ya) as information indicating the position of the upper left sample 630a of the upper encoding unit 620a, the coordinates (xb, yb) as information indicating the position of the upper left sample 630b of the middle encoding unit 620b, and the coordinates (xc, yc) as information indicating the position of the upper left sample 630c of the lower encoding unit 620 c. The image decoding apparatus 100 may determine the respective sizes of the encoding units 620a, 620b, and 620c by using the coordinates (xa, ya), (xb, yb), and (xc, yc) indicating the positions of the encoding units 620a, 620b, and 620 c. According to an embodiment, the image decoding apparatus 100 may determine the width of the upper encoding unit 620a as the width of the current encoding unit 600. The image decoding apparatus 100 may determine the height of the upper encoding unit 620a as yb-ya. According to an embodiment, the image decoding apparatus 100 may determine the width of the intermediate encoding unit 620b as the width of the current encoding unit 600. The image decoding apparatus 100 may determine the height of the intermediate encoding unit 620b as yc-yb. According to an embodiment, the image decoding apparatus 100 may determine the width or height of the lower encoding unit 620c by using the width or height of the current encoding unit 600 or the widths or heights of the upper encoding unit 620a and the middle encoding unit 620 b. The image decoding apparatus 100 may determine the coding units having a size different from the sizes of the other coding units based on the determined widths and heights of the coding units 620a to 620 c. Referring to fig. 6, the image decoding apparatus 100 may determine an intermediate encoding unit 620b having a size different from the sizes of the upper encoding unit 620a and the lower encoding unit 620c as an encoding unit of a specific position. However, the above-described method of determining a coding unit having a size different from the sizes of other coding units performed by the image decoding apparatus 100 corresponds only to an example of determining a coding unit at a specific position by using the size of a coding unit determined based on the coordinates of the sampling points, and thus, various methods of determining a coding unit at a specific position by comparing the sizes of coding units determined based on the coordinates of the specific sampling points may be used.

The image decoding apparatus 100 may determine the width or height of each of the encoding units 660a, 660b, and 660c by using coordinates (xd, yd) as information indicating the position of the upper left sample 670a of the left encoding unit 660a, coordinates (xe, ye) as information indicating the position of the upper left sample 670b of the middle encoding unit 660b, and coordinates (xf, yf) as information indicating the position of the upper left sample 670c of the right encoding unit 660 c. The image decoding apparatus 100 may determine the respective sizes of the encoding units 660a, 660b, and 660c by using coordinates (xd, yd), (xe, ye), and (xf, yf) indicating the positions of the encoding units 660a, 660b, and 660 c.

According to an embodiment, the image decoding apparatus 100 may determine the width of the left encoding unit 660a as xe-xd. The image decoding apparatus 100 may determine the height of the left encoding unit 660a as the height of the current encoding unit 650. According to an embodiment, the image decoding apparatus 100 may determine the width of the intermediate encoding unit 660b as xf-xe. The image decoding apparatus 100 may determine the height of the intermediate encoding unit 660b as the height of the current encoding unit 600. According to the embodiment, the image decoding apparatus 100 may determine the width or height of the right encoding unit 660c by using the width or height of the current encoding unit 650 or the widths or heights of the left encoding unit 660a and the middle encoding unit 660 b. The image decoding apparatus 100 may determine the coding units having a size different from the sizes of the other coding units based on the determined widths and heights of the coding units 660a to 660 c. Referring to fig. 6, the image decoding apparatus 100 may determine an intermediate encoding unit 660b having a size different from the sizes of the left and right encoding units 660a and 660c as an encoding unit of a specific position. However, the above-described method of determining a coding unit having a size different from the sizes of other coding units performed by the image decoding apparatus 100 corresponds only to an example of determining a coding unit at a specific position by using the size of a coding unit determined based on the coordinates of the sampling points, and thus, various methods of determining a coding unit at a specific position by comparing the size of a coding unit determined based on the coordinates of the specific sampling points may be used.

However, the position of the sampling point considered for determining the position of the coding unit is not limited to the above-described upper-left position, and information on an arbitrary position of the sampling point included in the coding unit may be used.

According to the embodiment, the image decoding apparatus 100 may select a coding unit at a specific position from an odd number of coding units determined by dividing the current coding unit in consideration of the shape of the current coding unit. For example, when the current coding unit has a non-square shape having a width longer than a height, the image decoding apparatus 100 may determine a coding unit at a specific position in the horizontal direction. That is, the image decoding apparatus 100 may determine one of the coding units that are different in position in the horizontal direction and impose a restriction on the coding unit. When the current coding unit has a non-square shape with a height longer than a width, the image decoding apparatus 100 may determine a coding unit at a specific position in the vertical direction. That is, the image decoding apparatus 100 may determine one of the encoding units that are different in position in the vertical direction, and may apply a restriction to the encoding unit.

According to the embodiment, the image decoding apparatus 100 may use information indicating respective positions of the even number of coding units to determine a coding unit at a specific position among the even number of coding units. The image decoding apparatus 100 may determine an even number of coding units by dividing (binary dividing) the current coding unit, and may determine a coding unit at a specific position by using information on positions of the even number of coding units. The operation related thereto may correspond to the operation of determining a coding unit at a specific position (e.g., a center position) among an odd number of coding units, which has been described in detail above with respect to fig. 6, and thus a detailed description thereof will not be provided herein.

According to an embodiment, when a current coding unit that is not square is divided into a plurality of coding units, a coding unit at a specific position among the plurality of coding units may be determined using specific information on a coding unit at the specific position in a dividing operation. For example, the image decoding apparatus 100 may determine a coding unit at a center position among a plurality of coding units determined by dividing the current coding unit using at least one of block shape information and divided shape mode information stored in samples included in an intermediate coding unit in the dividing operation.

Referring to fig. 6, the image decoding apparatus 100 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on the division shape mode information, and may determine a coding unit 620b at a center position among the plurality of coding units 620a, 620b, and 620 c. Further, the image decoding apparatus 100 may determine the encoding unit 620b at the center position based on the position at which the division shape mode information is obtained. That is, the division shape mode information of the current coding unit 600 may be obtained from the sampling point 640 at the center position of the current coding unit 600, and when the current coding unit 600 is divided into the plurality of coding units 620a, 620b, and 620c based on the division shape mode information, the coding unit 620b including the sampling point 640 may be determined as the coding unit at the center position. However, the information for determining the coding unit at the central position is not limited to the division shape pattern information, and various types of information may be used to determine the coding unit at the central position.

According to an embodiment, specific information for identifying a coding unit at a specific position may be obtained from a specific sample point included in a coding unit to be determined. Referring to fig. 6, the image decoding apparatus 100 may determine a coding unit at a specific position (e.g., a coding unit at a central position among a plurality of divided coding units) among a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, using the divided shape mode information obtained from a sample point at the specific position (e.g., a sample point at the central position of the current coding unit 600) in the current coding unit 600. That is, the image decoding apparatus 100 may determine samples at a specific position by considering the block shape of the current encoding unit 600, determine an encoding unit 620b including samples from which specific information (e.g., division shape mode information) is available, from among the plurality of encoding units 620a, 620b, and 620c determined by dividing the current encoding unit 600, and may apply specific restrictions to the encoding unit 620 b. Referring to fig. 6, according to the embodiment, in the decoding operation, the image decoding apparatus 100 may determine a sample 640 at the center position of the current encoding unit 600 as a sample at which specific information may be obtained, and may apply specific restrictions to the encoding unit 620b including the sample 640. However, the positions of the samples from which the specific information is available are not limited to the above-described positions, and may include any positions of the samples included in the encoding unit 620b to be determined to be limiting.

According to an embodiment, the position of a sample point where specific information can be obtained may be determined based on the shape of the current encoding unit 600. According to an embodiment, the block shape information may indicate whether the current coding unit has a square shape or a non-square shape, and a position of a sampling point at which the specific information may be obtained may be determined based on the shape. For example, the image decoding apparatus 100 may determine, as samples at which the specific information is available, samples located on a boundary dividing at least one of the width and the height of the current coding unit into halves by using at least one of the information on the width of the current coding unit and the information on the height of the current coding unit. As another example, when the block shape information of the current coding unit indicates a non-square shape, the image decoding apparatus 100 may determine one of the samples adjacent to the boundary for dividing the long side of the current coding unit into halves as a sample at which the predetermined information can be obtained.

According to an embodiment, when a current coding unit is divided into a plurality of coding units, the image decoding apparatus 100 may determine a coding unit at a specific position among the plurality of coding units using the division shape mode information. According to the embodiment, the image decoding apparatus 100 may obtain the division shape mode information from the sampling point at the specific position in each of the plurality of coding units, and divide the plurality of coding units generated by dividing the current coding unit by using the division shape mode information. That is, the coding units may be recursively divided based on the division shape mode information obtained from the sampling points at the specific positions in each coding unit. The operation of recursively dividing the coding units has been described above with respect to fig. 5, and thus a detailed description thereof will not be provided here.

According to the embodiment, the image decoding apparatus 100 may determine one or more coding units by dividing a current coding unit, and may determine an order of decoding the one or more coding units based on a specific block (e.g., the current coding unit).

Fig. 7 illustrates an order in which the image decoding apparatus 100 processes a plurality of coding units when the plurality of coding units are determined by dividing the current coding unit according to the embodiment.

According to the embodiment, based on the division shape mode information, the image decoding apparatus 100 may determine the second encoding units 710a and 710b by dividing the first encoding unit 700 in the vertical direction, determine the second encoding units 730a and 730b by dividing the first encoding unit 700 in the horizontal direction, or determine the second encoding units 750a to 750d by dividing the first encoding unit 700 in the vertical direction and the horizontal direction.

Referring to fig. 7, the image decoding apparatus 100 may determine that the second encoding units 710a and 710b determined by dividing the first encoding unit 700 in the vertical direction are processed in the horizontal direction order 710 c. The image decoding apparatus 100 may determine that the second encoding units 730a and 730b determined by dividing the first encoding unit 700 in the horizontal direction are processed in the vertical direction order 730 c. The image decoding apparatus 100 may determine that the second encoding units 750a to 750d determined by dividing the first encoding unit 700 in the vertical direction and the horizontal direction are processed in a specific order (e.g., in a raster scan order or a zigzag scan order 750e) in which the encoding units in one line are processed and then the encoding units in the next line are processed.

According to an embodiment, the image decoding apparatus 100 may recursively divide the encoding units. Referring to fig. 7, the image decoding apparatus 100 may determine a plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d by dividing the first coding unit 700, and may recursively divide each of the determined plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750 d. The division method of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may correspond to the division method of the first coding unit 700. As such, each of the plurality of coding units 710a and 710b, 730a and 730b, or 750a to 750d may be independently divided into a plurality of coding units. Referring to fig. 7, the image decoding apparatus 100 may determine the second coding units 710a and 710b by dividing the first coding unit 700 in the vertical direction, and may determine whether each of the second coding units 710a and 710b is divided or not divided independently.

According to the embodiment, the image decoding apparatus 100 may determine the third encoding units 720a and 720b by dividing the left second encoding unit 710a in the horizontal direction, and may not divide the right second encoding unit 710 b.

According to an embodiment, the processing order of the coding units may be determined based on the operation of dividing the coding units. In other words, the processing order of the divided coding units may be determined based on the processing order of the coding units immediately before being divided. The image decoding apparatus 100 may determine the processing order of the third encoding units 720a and 720b determined by dividing the left-side second encoding unit 710a, independently of the right-side second encoding unit 710 b. Since the third encoding units 720a and 720b are determined by dividing the left second encoding unit 710a in the horizontal direction, the third encoding units 720a and 720b may be processed in the vertical direction order 720 c. Since the left-side second encoding unit 710a and the right-side second encoding unit 710b are processed in the horizontal direction order 710c, the right-side second encoding unit 710b may be processed after the third encoding units 720a and 720b included in the left-side second encoding unit 710a are processed in the vertical direction order 720 c. The operation of determining the processing order of the coding units based on the coding units before division is not limited to the above-described example, and the coding units divided and determined to have various shapes may be independently processed in a specific order using various methods.

Fig. 8 illustrates a process in which the image decoding apparatus determines that the current coding unit is divided into an odd number of coding units when the coding units cannot be processed in a predetermined order according to the embodiment.

According to an embodiment, the image decoding apparatus 100 may determine that the current coding unit is divided into an odd number of coding units based on the obtained division shape mode information. Referring to fig. 8, a square first coding unit 800 may be divided into non-square second coding units 810a and 810b, and the second coding units 810a and 810b may be independently divided into third coding units 820a and 820b and 820c to 820 e. According to the embodiment, the image decoding apparatus 100 may determine the plurality of third encoding units 820a and 820b by dividing the left second encoding unit 810a in the horizontal direction, and may divide the right second encoding unit 810b into an odd number of third encoding units 820c to 820 e.

According to the embodiment, the image decoding apparatus 100 may determine whether any coding unit is divided into odd-numbered coding units by determining whether the third coding units 820a and 820b and 820c to 820e can be processed in a specific order. Referring to fig. 8, the image decoding apparatus 100 may determine the third encoding units 820a and 820b and 820c to 820e by recursively dividing the first encoding unit 800. The image decoding apparatus 100 may determine whether any one of the following coding units is divided into an odd number of coding units based on at least one of the block shape information and the divided shape mode information: a first encoding unit 800, second encoding units 810a and 810b, and third encoding units 820a and 820b, and 820c to 820 e. For example, the right second encoding unit 810b of the second encoding units 810a and 810b may be divided into odd number of third encoding units 820c, 820d, and 820 e. The processing order of the plurality of coding units included in the first coding unit 800 may be a specific order (e.g., a zigzag scanning order 830), and the image decoding apparatus 100 may determine whether the third coding units 820c, 820d, and 820e determined by dividing the right-side second coding unit 810b into odd-numbered coding units satisfy a condition for processing in the specific order.

According to the embodiment, the image decoding apparatus 100 may determine whether the third encoding units 820a and 820b and 820c to 820e included in the first encoding unit 800 satisfy a condition for processing in a specific order, and the condition is related to whether at least one of the width and height of the second encoding units 810a and 810b is divided in half along the boundary of the third encoding units 820a and 820b and 820c to 820 e. For example, the third encoding units 820a and 820b determined when the height of the second encoding unit 810a on the left of the non-square shape is divided in half may satisfy the condition. Since the boundary of the third coding units 820c to 820e determined when the right second coding unit 810b is divided into three coding units fails to divide the width or height of the right second coding unit 810b in half, it may be determined that the third coding units 820c to 820e do not satisfy the condition. When the condition is not satisfied as described above, the image decoding apparatus 100 may determine that the scan order is discontinuous, and may determine that the right second encoding unit 810b is divided into an odd number of encoding units based on the determination result. According to the embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may apply a specific restriction to the coding unit at a specific position in the divided coding units. The limitations or the specific locations have been described above with respect to various embodiments, and thus a detailed description thereof will not be provided herein.

Fig. 9 illustrates a process of determining at least one coding unit by dividing the first coding unit 900, which is performed by the image decoding apparatus 100 according to the embodiment.

According to an embodiment, the image decoding apparatus 100 may divide the first encoding unit 900 based on the division shape mode information obtained by the bitstream obtainer 110. The square first coding unit 900 may be divided into four square coding units or may be divided into a plurality of non-square coding units. For example, referring to fig. 9, when the division shape mode information indicates that the first coding unit 900 is divided into non-square coding units, the image decoding apparatus 100 may divide the first coding unit 900 into a plurality of non-square coding units. In detail, when the division shape mode information indicates that an odd number of coding units are determined by dividing the first coding unit 900 in the horizontal direction or the vertical direction, the image decoding apparatus 100 may divide the square first coding unit 900 into the odd number of coding units (e.g., the second coding units 910a, 910b, and 910c determined by dividing the square first coding unit 900 in the vertical direction, or the second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction).

According to an embodiment, the image decoding apparatus 100 may determine whether the second encoding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first encoding unit 900 satisfy a condition for processing in a specific order, and the condition relates to whether at least one of the width and height of the first encoding unit 900 is divided in half along the boundary of the second encoding units 910a, 910b, 910c, 920a, 920b, and 920 c. Referring to fig. 9, since the boundaries of the second coding units 910a, 910b, and 910c determined by dividing the square-shaped first coding unit 900 in the vertical direction do not divide the width of the first coding unit 900 in half, it may be determined that the first coding unit 900 does not satisfy the condition for processing in a specific order. Further, since the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square-shaped first coding unit 900 in the horizontal direction do not divide the height of the first coding unit 900 by half, it may be determined that the first coding unit 900 does not satisfy the condition for performing the processing in the specific order. When the condition is not satisfied as described above, the image decoding apparatus 100 may determine that the scan order is discontinuous, and may determine that the first encoding unit 900 is divided into an odd number of encoding units based on the determination result. According to the embodiment, when the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may apply a specific restriction to the coding unit at a specific position in the divided coding units. The limitations or the specific locations have been described above with respect to various embodiments, and thus a detailed description thereof will not be provided herein.

According to the embodiment, the image decoding apparatus 100 may determine the coding units of various shapes by dividing the first coding unit.

Referring to fig. 9, the image decoding apparatus 100 may divide a square first coding unit 900 or a non-square first coding unit 930 or 950 into coding units of various shapes.

Fig. 10 illustrates that shapes into which the second encoding unit can be divided are limited when the second encoding unit having a non-square shape determined by the image decoding apparatus 100 dividing the first encoding unit 1000 satisfies a certain condition according to an embodiment.

According to an embodiment, the image decoding apparatus 100 may determine to divide the square first coding unit 1000 into the non-square second coding units 1010a and 1010b, or 1020a and 1020b, based on the division shape mode information obtained by the bitstream obtainer 110. The second encoding units 1010a and 1010b, or 1020a and 1020b may be independently divided. As such, the image decoding apparatus 100 may determine to divide each of the second coding units 1010a and 1010b, or 1020a and 1020b into a plurality of coding units or not to divide each of the second coding units 1010a and 1010b, or 1020a and 1020b based on the division shape mode information of each of the second coding units 1010a and 1010b, or 1020a and 1020 b. According to the embodiment, the image decoding apparatus 100 may determine the third coding units 1012a and 1012b by dividing the second coding unit 1010a on the left of the non-square determined by dividing the first coding unit 1000 in the vertical direction in the horizontal direction. However, when the left second encoding unit 1010a is divided in the horizontal direction, the image decoding apparatus 100 may restrict the right second encoding unit 1010b not to be divided in the horizontal direction in which the left second encoding unit 1010a is divided. When the third coding units 1014a and 1014b are determined by dividing the right second coding unit 1010b in the same direction, the third coding units 1012a and 1012b, or 1014a and 1014b may be determined because the left second coding unit 1010a and the right second coding unit 1010b are independently divided in the horizontal direction. However, this case functions the same as the case where the image decoding apparatus 100 divides the first encoding unit 1000 into the second encoding units 1030a, 1030b, 1030c, and 1030d of four squares based on the division shape mode information, and may be inefficient in terms of image decoding.

According to the embodiment, the image decoding apparatus 100 may determine the third encoding units 1022a and 1022b, or 1024a and 1024b by dividing the non-square second encoding unit 1020a or 1020b determined by dividing the first encoding unit 1000 in the horizontal direction in the vertical direction. However, when the second encoding unit (e.g., the upper second encoding unit 1020a) is divided in the vertical direction, the image decoding apparatus 100 may restrict another second encoding unit (e.g., the lower second encoding unit 1020b) not to be divided in the vertical direction in which the upper second encoding unit 1020a is divided, for the above-described reason.

Fig. 11 illustrates a process of dividing a square encoding unit performed by the image decoding apparatus 100 when the division shape mode information cannot indicate that the square encoding unit is divided into four square encoding units according to the embodiment.

According to the embodiment, the image decoding apparatus 100 may determine the second encoding units 1110a and 1110b, or 1120a and 1120b, etc. by dividing the first encoding unit 1100 based on the division shape mode information. The division shape mode information may include information on various methods of dividing the coding unit, but the information on various division methods may not include information for dividing the coding unit into four square coding units. According to such division shape mode information, the image decoding apparatus 100 may not divide the square first coding unit 1100 into four square coding units 1130a, 1130b, 1130c and 1130 d. The image decoding apparatus 100 may determine the non-square second encoding units 1110a and 1110b, or 1120a and 1120b, etc., based on the division shape mode information.

According to the embodiment, the image decoding apparatus 100 may independently divide the non-square second encoding units 1110a and 1110b, or 1120a and 1120b, etc. Each of the second encoding units 1110a and 1110b, or 1120a and 1120b, etc. may be recursively divided in a certain order, and the dividing method may correspond to a method of dividing the first encoding unit 1100 based on the division shape mode information.

For example, the image decoding apparatus 100 may determine the third encoding units 1112a and 1112b of the square shape by dividing the left second encoding unit 1110a in the horizontal direction, and may determine the third encoding units 1114a and 1114b of the square shape by dividing the right second encoding unit 1110b in the horizontal direction. Further, the image decoding apparatus 100 may determine the square third encoding units 1116a, 1116b, 1116c, and 1116d by dividing both the left-side second encoding unit 1110a and the right-side second encoding unit 1110b in the horizontal direction. In this case, a coding unit having the same shape as the second coding units 1130a, 1130b, 1130c and 1130d of four squares divided from the first coding unit 1100 may be determined.

As another example, the image decoding apparatus 100 may determine the square third coding units 1122a and 1122b by dividing the upper second coding unit 1120a in the vertical direction, and may determine the square third coding units 1124a and 1124b by dividing the lower second coding unit 1120b in the vertical direction. Further, the image decoding apparatus 100 may determine the third encoding units 1126a, 1126b, 1126c, and 1126d of a square shape by dividing both the upper second encoding unit 1120a and the lower second encoding unit 1120b in the vertical direction. In this case, a coding unit having the same shape as the second coding units 1130a, 1130b, 1130c and 1130d of four squares divided from the first coding unit 1100 may be determined.

Fig. 12 illustrates that the processing order among a plurality of coding units according to the embodiment may be changed according to the process of dividing the coding units.

According to an embodiment, the image decoding apparatus 100 may divide the first encoding unit 1200 based on the division shape mode information. When the block shape indicates a square shape and the division shape mode information indicates that the first encoding unit 1200 is divided in at least one of the horizontal direction and the vertical direction, the image decoding apparatus 100 may determine the second encoding units 1210a and 1210b, or 1220a and 1220b, etc. by dividing the first encoding unit 1200. Referring to fig. 12, non-square second coding units 1210a and 1210b, or 1220a and 1220b, determined by dividing the first coding unit 1200 only in the horizontal direction or the vertical direction, may be independently divided based on the divided shape mode information of each coding unit. For example, the image decoding apparatus 100 may determine the third encoding units 1216a, 1216b, 1216c, and 1216d by dividing the second encoding units 1210a and 1210b generated by dividing the first encoding unit 1200 in the vertical direction in the horizontal direction, and may determine the third encoding units 1226a, 1226b, 1226c, and 1226d by dividing the second encoding units 1220a and 1220b generated by dividing the first encoding unit 1200 in the horizontal direction in the vertical direction. The operation of dividing the second encoding units 1210a and 1210b, or 1220a and 1220b, has been described above with respect to fig. 11, and thus a detailed description thereof will not be provided herein.

According to an embodiment, the image decoding apparatus 100 may process the encoding units in a specific order. The operation of processing the coding units in a specific order has been described above with respect to fig. 7, and thus a detailed description thereof will not be provided herein. Referring to fig. 12, the image decoding apparatus 100 may determine four square third encoding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d by dividing the square first encoding unit 1200. According to an embodiment, the image decoding apparatus 100 may determine the processing order of the third encoding units 1216a, 1216b, 1216c, and 1216d and 1226a, 1226b, 1226c, and 1226d based on the division method of the first encoding unit 1200.

According to the embodiment, the image decoding apparatus 100 may determine the third encoding units 1216a, 1216b, 1216c, and 1216d by dividing the second encoding units 1210a and 1210b generated by dividing the first encoding unit 1200 in the vertical direction in the horizontal direction, and may process the third encoding units 1216a, 1216b, 1216c, and 1216d in the following processing order 1217: the third encoding units 1216a and 1216c included in the left second encoding unit 1210a are first processed in the vertical direction, and then the third encoding units 1216b and 1216d included in the right second encoding unit 1210b are processed in the vertical direction.

According to the embodiment, the image decoding apparatus 100 may determine the third encoding units 1226a, 1226b, 1226c, and 1226d by dividing the second encoding units 1220a and 1220b generated by dividing the first encoding unit 1200 in the horizontal direction in the vertical direction, and may process the third encoding units 1226a, 1226b, 1226c, and 1226d in the following processing order 1227: the third encoding units 1226a and 1226b included in the upper second encoding unit 1220a are first processed in the horizontal direction, and then the third encoding units 1226c and 1226d included in the lower second encoding unit 1220b are processed in the horizontal direction.

Referring to fig. 12, third encoding units 1216a, 1216b, 1216c, and 1216d, and 1226a, 1226b, 1226c, and 1226d of squares may be determined by dividing the second encoding units 1210a and 1210b, and 1220a and 1220b, respectively. Although the second coding units 1210a and 1210b determined by dividing the first coding unit 1200 in the vertical direction are different from the second coding units 1220a and 1220b determined by dividing the first coding unit 1200 in the horizontal direction, the third coding units 1216a, 1216b, 1216c, and 1216d and the third coding units 1226a, 1226b, 1226c, and 1226d divided from the second coding units 1210a and 1210b and the second coding units 1220a and 1220b finally show coding units of the same shape divided from the first coding unit 1200. In this manner, by recursively dividing the coding units in different ways based on the division shape information, the image decoding apparatus 100 can process the plurality of coding units in different orders even if the coding units are finally determined to be the same shape.

Fig. 13 illustrates a process of determining a depth of a coding unit when a shape and a size of the coding unit are changed when the coding unit is recursively divided to determine a plurality of coding units according to an embodiment.

According to an embodiment, the image decoding apparatus 100 may determine the depth of the coding unit based on a specific standard. For example, the specific criterion may be the length of the long side of the coding unit. When the length of the long side of the coding unit before being divided is 2n (n >0) times the length of the long side of the current coding unit after being divided, the image decoding apparatus 100 may determine that the depth of the current coding unit is increased by n compared to the depth of the coding unit before being divided. In the following description, coding units having increased depths are represented as coding units of lower depths.

Referring to fig. 13, according to an embodiment, the image decoding apparatus 100 may determine the second encoding unit 1302 and the third encoding unit 1304 of lower depths by dividing the first encoding unit 1300 of a SQUARE based on block shape information indicating a SQUARE shape (e.g., the block shape information may be represented as "0: SQUARE"). Assuming that the size of the square first coding unit 1300 is 2N × 2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 into 1/2 may have a size of N × N. Further, the third encoding unit 1304, which is determined by dividing the width and height of the second encoding unit 1302 into 1/2, may have a size of N/2 XN/2. In this case, the width and height of the third encoding unit 1304 are 1/4 the width and height of the first encoding unit 1300. When the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, whose width and height are 1/2 of the width and height of the first coding unit 1300, may be D +1, and the depth of the third coding unit 1304, whose width and height are 1/4 of the width and height of the first coding unit 1300, may be D + 2.

According to an embodiment, the image decoding apparatus 100 may determine the second encoding unit 1312 or 1322 and the third encoding unit 1314 or 1324 of lower depths by dividing the first encoding unit 1310 or 1320 of the non-square based on block shape information indicating the non-square shape (e.g., the block shape information may be represented as "1: NS _ VER" indicating a non-square shape having a height longer than a width, or may be represented as "2: NS _ HOR" indicating a non-square shape having a width longer than a height).

The image decoding apparatus 100 may determine the second encoding unit 1302, 1312, or 1322 by dividing at least one of the width and the height of the first encoding unit 1310 having a size of N × 2N. That is, the image decoding apparatus 100 may determine the second encoding unit 1302 of size N × N or the second encoding unit 1322 of size N × N/2 by dividing the first encoding unit 1310 in the horizontal direction, or may determine the second encoding unit 1312 of size N/2 × N by dividing the first encoding unit 1310 in the horizontal direction and the vertical direction.

According to an embodiment, the image decoding apparatus 100 may determine the second encoding unit 1302, 1312, or 1322 by dividing at least one of the width and the height of the first encoding unit 1320 having a size of 2N × N. That is, the image decoding apparatus 100 may determine the second coding unit 1302 of size N × N or the second coding unit 1312 of size N/2 × N by dividing the first coding unit 1320 in the vertical direction, or may determine the second coding unit 1322 of size N × N/2 by dividing the first coding unit 1320 in the horizontal direction and the vertical direction.

According to the embodiment, the image decoding apparatus 100 may determine the third encoding unit 1304, 1314, or 1324 by dividing at least one of the width and the height of the second encoding unit 1302 of size N × N. That is, the image decoding apparatus 100 can determine the third encoding unit 1304 of size N/2 × N/2, the third encoding unit 1314 of size N/4 × N/2, or the third encoding unit 1324 of size N/2 × N/4 by dividing the second encoding unit 1302 in the vertical direction and the horizontal direction.

According to the embodiment, the image decoding apparatus 100 may determine the third encoding unit 1304, 1314, or 1324 by dividing at least one of the width and height of the second encoding unit 1312 having a size of N/2 × N. That is, the image decoding apparatus 100 may determine the third encoding unit 1304 of size N/2 × N/2 or the third encoding unit 1324 of size N/2 × N/4 by dividing the second encoding unit 1312 in the horizontal direction, or may determine the third encoding unit 1314 of size N/4 × N/2 by dividing the second encoding unit 1312 in the vertical direction and the horizontal direction.

According to the embodiment, the image decoding apparatus 100 may determine the third encoding unit 1304, 1314, or 1324 by dividing at least one of the width and height of the second encoding unit 1322 having the size of N × N/2. That is, the image decoding apparatus 100 may determine the third encoding unit 1304 of size N/2 × N/2 or the third encoding unit 1314 of size N/4 × N/2 by dividing the second encoding unit 1322 in the vertical direction, or may determine the third encoding unit 1324 of size N/2 × N/4 by dividing the second encoding unit 1322 in the vertical direction and the horizontal direction.

According to an embodiment, the image decoding apparatus 100 may divide the square encoding unit 1300, 1302, or 1304 in the horizontal direction or the vertical direction. For example, the image decoding apparatus 100 may determine the first encoding unit 1310 having the size of N × 2N by dividing the first encoding unit 1300 having the size of 2N × 2N in the vertical direction, or may determine the first encoding unit 1320 having the size of 2N × N by dividing the first encoding unit 1300 in the horizontal direction. According to an embodiment, when determining a depth based on the length of the longest side of a coding unit, the depth of the coding unit determined by dividing the first coding unit 1300 having a size of 2N × 2N in the horizontal direction or the vertical direction may be the same as the depth of the first coding unit 1300.

According to an embodiment, the width and height of the third encoding unit 1314 or 1324 may be 1/4 of the width and height of the first encoding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322 having the width and height of 1/2 being the width and height of the first coding unit 1310 or 1320 may be D +1, and the depth of the third coding unit 1314 or 1324 having the width and height of 1/4 being the width and height of the first coding unit 1310 or 1320 may be D + 2.

Fig. 14 illustrates a depth that may be determined based on the shape and size of a coding unit and a Partial Index (PID) for distinguishing the coding units according to an embodiment.

According to the embodiment, the image decoding apparatus 100 may determine the second encoding units of various shapes by dividing the first encoding unit 1400 of a square. Referring to fig. 14, the image decoding apparatus 100 may determine the second encoding units 1402a and 1402b, the second encoding units 1404a and 1404b, and the second encoding units 1406a, 1406b, 1406c, and 1406d by dividing the first encoding unit 1400 in at least one of the vertical direction and the horizontal direction based on the division shape mode information. That is, the image decoding apparatus 100 may determine the second encoding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d based on the division shape mode information of the first encoding unit 1400.

According to an embodiment, the depths of the second encoding units 1402a and 1402b, 1404a and 1404b, and 1406a, 1406b, 1406c, and 1406d determined based on the division shape mode information of the square-shaped first encoding unit 1400 may be determined based on the lengths of their long sides. For example, because the length of the side of the square first encoding unit 1400 is equal to the length of the long side of the non-square second encoding units 1402a and 1402b and 1404a and 1404b, the first encoding unit 1400 and the non-square second encoding units 1402a and 1402b and 1404a and 1404b may have the same depth, e.g., D. However, when the image decoding apparatus 100 divides the first encoding unit 1400 into the four square second encoding units 1406a, 1406b, 1406c, and 1406D based on the division shape mode information, since the length of the sides of the square second encoding units 1406a, 1406b, 1406c, and 1406D is 1/2 of the length of the sides of the first encoding unit 1400, the depths of the second encoding units 1406a, 1406b, 1406c, and 1406D may be D +1 that is 1 lower than the depth D of the first encoding unit 1400.

According to the embodiment, the image decoding apparatus 100 may determine the plurality of second encoding units 1412a and 1412b and 1414a, 1414b, and 1414c by dividing the first encoding unit 1410 having a height longer than a width in the horizontal direction based on the division shape mode information. According to the embodiment, the image decoding apparatus 100 may determine the plurality of second encoding units 1422a and 1422b and 1424a, 1424b, and 1424c by dividing the first encoding unit 1420 whose width is longer than height in the vertical direction based on the division shape mode information.

According to an embodiment, the depths of the second encoding units 1412a and 1412b and 1414a, 1414b and 1414c, or 1422a and 1422b and 1424a, 1424b and 1424c, which are determined based on the partition shape mode information of the non-square first encoding unit 1410 or 1420, may be determined based on the lengths of their long sides. For example, since the length of the sides of the square second coding units 1412a and 1412b is 1/2 that is longer in height than the length of the long side of the non-square-shaped first coding unit 1410 having a width, the depth of the square second coding units 1412a and 1412b is D +1 that is 1 lower than the depth D of the non-square first coding unit 1410.

Further, the image decoding apparatus 100 may divide the non-square first encoding unit 1410 into odd number of second encoding units 1414a, 1414b, and 1414c based on the division shape mode information. The odd number of second coding units 1414a, 1414b, and 1414c may include non-square second coding units 1414a and 1414c and square second coding unit 1414 b. In this case, since the length of the long side of the non-square second coding units 1414a and 1414c and the length of the side of the square second coding unit 1414b are 1/2 of the length of the long side of the first coding unit 1410, the depth of the second coding units 1414a, 1414b, and 1414c may be D +1 which is 1 lower than the depth D of the non-square first coding unit 1410. The image decoding apparatus 100 may determine the depth of a coding unit partitioned from the first coding unit 1420 having a non-square shape whose width is longer than its height by using the above-described method of determining the depth of a coding unit partitioned from the first coding unit 1410.

According to the embodiment, when the odd number of divided coding units do not have an equal size, the image decoding apparatus 100 may determine the PIDs for identifying the divided coding units based on a size ratio between the coding units. Referring to fig. 14, the center-positioned coding unit 1414b of the odd-numbered divided coding units 1414a, 1414b, and 1414c may have a width equal to that of the other coding units 1414a and 1414c and a height twice that of the other coding units 1414a and 1414 c. That is, in this case, the coding unit 1414b at the center position may include two other coding units 1414a or 1414 c. Therefore, when the PID of the coding unit 1414b at the center position is 1 based on the scanning order, the PID of the coding unit 1414c located adjacent to the coding unit 1414b can be increased by 2 and thus can be 3. That is, there may be a discontinuity in PID values. According to the embodiment, the image decoding apparatus 100 may determine whether odd-numbered divided coding units do not have an equal size based on whether there is discontinuity in PIDs for identifying the divided coding units.

According to an embodiment, the image decoding apparatus 100 may determine whether to use a specific division method based on PID values for identifying a plurality of coding units determined by dividing a current coding unit. Referring to fig. 14, the image decoding apparatus 100 may determine even-numbered encoding units 1412a and 1412b or odd-numbered encoding units 1414a, 1414b, and 1414c by dividing a first encoding unit 1410 having a rectangular shape with a height longer than a width. The image decoding apparatus 100 may use the PID indicating the corresponding coding unit in order to identify the corresponding coding unit. According to an embodiment, the PID may be obtained from a sample (e.g., upper-left sample) of a specific location of each coding unit.

According to the embodiment, the image decoding apparatus 100 may determine a coding unit at a specific position in a divided coding unit by using a PID for distinguishing the coding unit. According to the embodiment, when the division shape mode information of the first encoding unit 1410 having a rectangular shape whose height is longer than its width indicates that the encoding unit is divided into three encoding units, the image decoding apparatus 100 may divide the first encoding unit 1410 into three encoding units 1414a, 1414b, and 1414 c. The image decoding apparatus 100 can allocate a PID to each of the three encoding units 1414a, 1414b, and 1414 c. The image decoding apparatus 100 may compare PIDs of odd-numbered divided coding units to determine a coding unit at a center position in the coding unit. The image decoding apparatus 100 can determine the coding unit 1414b whose PID corresponds to an intermediate value in the PID of the coding unit as the coding unit at the center position in the coding unit determined by dividing the first coding unit 1410. According to the embodiment, when the divided coding units do not have equal sizes, the image decoding apparatus 100 may determine PIDs for distinguishing the divided coding units based on a size ratio between the coding units. Referring to fig. 14, the width of the coding unit 1414b generated by dividing the first coding unit 1410 may be equal to the width of the other coding units 1414a and 1414c, and the height thereof may be twice the height of the other coding units 1414a and 1414 c. In this case, when the PID of the coding unit 1414b at the center position is 1, the PID of the coding unit 1414c located adjacent to the coding unit 1414b may be increased by 2 and thus may be 3. When the PID does not uniformly increase as described above, the image decoding apparatus 100 may determine that the coding unit is divided into a plurality of coding units including a coding unit having a size different from the sizes of other coding units. According to an embodiment, when the division shape mode information indicates that the coding unit is divided into an odd number of coding units, the image decoding apparatus 100 may divide the current coding unit in such a manner that a coding unit of a specific position (e.g., a coding unit of a center position) among the odd number of coding units has a size different from sizes of other coding units. In this case, the image decoding apparatus 100 may determine the coding units having the center positions of different sizes by using the PIDs of the coding units. However, the PID and size or position of the coding unit of a specific position are not limited to the above examples, and various PIDs and various positions and sizes of the coding unit may be used.

According to an embodiment, the image decoding apparatus 100 may use a specific data unit in which the encoding unit starts to be recursively divided.

Fig. 15 illustrates determining a plurality of coding units based on a plurality of specific data units included in a picture according to an embodiment.

According to an embodiment, the specific data unit may be defined as a data unit for starting to recursively divide the coding unit by using the division shape mode information. That is, the specific data unit may correspond to a coding unit for determining the highest depth of a plurality of coding units divided from the current picture. In the following description, for convenience of explanation, a specific data unit is referred to as a reference data unit.

According to an embodiment, the reference data unit may have a specific size and a specific size shape. According to an embodiment, the reference data unit may include M × N samples. Here, M and N may be equal to each other and may be integers expressed as powers of 2. That is, the reference data unit may have a square shape or a non-square shape, and may be divided into an integer number of coding units.

According to an embodiment, the image decoding apparatus 100 may divide a current picture into a plurality of reference data units. According to the embodiment, the image decoding apparatus 100 may divide a plurality of reference data units divided from a current picture by using the division shape mode information of each reference data unit. The operation of dividing the reference data unit may correspond to a dividing operation using a quad tree structure.

According to an embodiment, the image decoding apparatus 100 may determine in advance a minimum size allowed for a reference data unit included in a current picture. Accordingly, the image decoding apparatus 100 may determine various reference data units having a size equal to or greater than the minimum size, and may determine one or more coding units by using the division shape mode information with reference to the determined reference data units.

Referring to fig. 15, the image decoding apparatus 100 may use a square reference coding unit 1500 or a non-square reference coding unit 1502. According to an embodiment, the shape and size of a reference coding unit may be determined based on various data units (e.g., sequences, pictures, slices, slice segments, parallel blocks, parallel block groups, CTUs, etc.) that can include at least one reference coding unit.

According to an embodiment, the bitstream obtainer 110 of the image decoding apparatus 100 may obtain at least one of information on a shape of the reference coding unit and information on a size of the reference coding unit from the bitstream for each of the various data units described above. The operation of dividing the square reference coding unit 1500 into one or more coding units has been described above with respect to the operation of dividing the current coding unit 300 of fig. 3, and the operation of dividing the non-square reference coding unit 1502 into one or more coding units has been described above with respect to the operation of dividing the current coding unit 400 or 450 of fig. 4. Therefore, a detailed description thereof will not be provided herein.

According to an embodiment, the image decoding apparatus 100 may determine the size and shape of the reference coding unit using the PID for identifying the size and shape of the reference coding unit according to some data units predetermined based on a specific condition. That is, the bitstream obtainer 110 may obtain only the PID for identifying the size and shape of the reference coding unit for each slice, slice segment, parallel block group, or CTU, which is a data unit (e.g., a data unit having a size equal to or smaller than a slice) among various data units (e.g., a sequence, a picture, a slice segment, a parallel block group, a CTU, etc.) satisfying a specific condition, from the bitstream. The image decoding apparatus 100 can determine the size and shape of the reference data unit for each data unit satisfying a specific condition by using the PID. When the reference coding unit shape information and the reference coding unit size information are obtained and used from the bitstream according to each data unit having a relatively small size, the efficiency of using the bitstream may not be high, and thus, only the PID may be obtained and used instead of directly obtaining the reference coding unit shape information and the reference coding unit size information. In this case, at least one of the size and shape of the reference coding unit corresponding to the PID for identifying the size and shape of the reference coding unit may be predetermined. That is, the image decoding apparatus 100 may determine at least one of the size and the shape of the reference coding unit included in the data unit serving as the unit for obtaining the PID by selecting at least one of the size and the shape of the reference coding unit predetermined based on the PID.

According to an embodiment, the image decoding apparatus 100 may use one or more reference coding units included in the CTU. That is, the CTU divided from the picture may include one or more reference coding units, and the coding unit may be determined by recursively dividing each reference coding unit. According to an embodiment, at least one of the width and the height of the CTU may be an integer multiple of at least one of the width and the height of the reference coding unit. According to an embodiment, the size of the reference coding unit may be obtained by dividing the CTU n times based on the quad tree structure. That is, according to various embodiments, the image decoding apparatus 100 may determine the reference coding unit by dividing the CTU n times based on the quad tree structure, and may divide the reference coding unit based on at least one of the block shape information and the divided shape mode information.

According to the embodiment, the image decoding apparatus 100 may obtain block shape information indicating the shape of the current coding unit or partition shape mode information indicating the partition method of the current coding unit from the bitstream, and may use the obtained information. The partition shape mode information may be included in a bitstream associated with various data units. For example, the image decoding apparatus 100 may use partition shape mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a parallel block header, or a parallel block group header. Further, the image decoding apparatus 100 may obtain syntax elements corresponding to the block shape information or the partition shape mode information from the bitstream according to each CTU, each reference coding unit, or each processing block, and may use the obtained syntax elements.

Hereinafter, a method of determining a division rule according to an embodiment of the present disclosure will be described in detail.

The image decoding apparatus 100 may determine a division rule of the image. The division rule may be predetermined between the image decoding apparatus 100 and the image encoding apparatus 200. The image decoding apparatus 100 may determine a division rule of an image based on information obtained from a bitstream. The image decoding apparatus 100 may determine the division rule based on information obtained from at least one of a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a parallel block header, or a parallel block group header. The image decoding apparatus 100 may determine the division rule differently according to a frame, a slice, a parallel block, a temporal layer, a CTU, or a coding unit.

The image decoding apparatus 100 may determine the division rule based on the block shape of the coding unit. The block shape may include the size, shape, aspect ratio and direction of the coding unit. The image encoding apparatus 200 and the image decoding apparatus 100 may determine the division rule based on the block shape of the encoding unit in advance. However, the embodiments are not limited thereto. The image decoding apparatus 100 may determine the division rule of the image based on information obtained from the bitstream received from the image encoding apparatus 200.

The shape of the coding unit may include square and non-square. When the width length and the height length of the coding unit are the same, the image decoding apparatus 100 may determine that the shape of the coding unit is a square. Further, when the width length and the height length of the coding unit are not the same, the image decoding apparatus 100 may determine that the shape of the coding unit is non-square.

The size of the coding unit may include various sizes such as 4 × 4, 8 × 4, 4 × 8, 8 × 8, 16 × 4, 16 × 8, … …, and 256 × 256. The size of the coding unit may be classified based on a long side length, a short side length, or an area of the coding unit. The image decoding apparatus 100 may apply the same division rule to the coding units classified into the same group. For example, the image decoding apparatus 100 may classify coding units having the same long side length as having the same size. Further, the image decoding apparatus 100 can apply the same division rule to the coding units having the same long-side length.

The aspect ratio of the coding units may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, 1:32, etc. In addition, the direction of the coding unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate a case where the width length of the coding unit is longer than the height length of the coding unit. The vertical direction may indicate a case where the width length of the coding unit is shorter than the height length of the coding unit.

The image decoding apparatus 100 may adaptively determine the division rule based on the size of the coding unit. The image decoding apparatus 100 may differently determine the allowable division shape mode based on the size of the coding unit. For example, the image decoding apparatus 100 may determine whether to allow the division based on the size of the coding unit. The image decoding apparatus 100 may determine the division direction according to the size of the coding unit. The image decoding apparatus 100 may determine an allowable partition type according to the size of the coding unit.

The division rule determined based on the size of the coding unit may be a division rule determined in advance between the image encoding apparatus 200 and the image decoding apparatus 100. Further, the image decoding apparatus 100 may determine the division rule based on information obtained from the bitstream.

The image decoding apparatus 100 may adaptively determine the division rule based on the location of the coding unit. The image decoding apparatus 100 may adaptively determine the division rule based on the position of the coding unit in the image.

Further, the image decoding apparatus 100 may determine the division rule such that the coding units generated via different division paths do not have the same block shape. However, the embodiments are not limited thereto, and the encoding units generated via different division paths have the same block shape. The coding units generated via different division paths may have different decoding processing orders. Since the decoding processing order has been described above with reference to fig. 12, details thereof are not provided.

Fig. 16 illustrates a coding unit that can be determined for each picture when a combination of shapes into which the coding unit can be divided is different for each picture according to an embodiment.

Referring to fig. 16, the image decoding apparatus 100 may determine a combination of division shapes into which a coding unit may be divided differently for each picture. For example, the image decoding apparatus 100 may decode an image by using a picture 1600 that may be divided into four coding units, a picture 1610 that may be divided into two or four coding units, and a picture 1620 that may be divided into two, three, or four coding units, among one or more pictures included in the image. In order to divide the picture 1600 into the plurality of coding units, the image decoding apparatus 100 may use only the division shape information indicating the division into four square coding units. To divide the picture 1610, the image decoding apparatus 100 may use only the division shape information indicating the division into two or four coding units. To divide the picture 1620, the image decoding apparatus 100 may use only the division shape information indicating the division into two, three, or four coding units. The combination of the above-described division shapes is only an embodiment for describing the operation of the image decoding apparatus 100. Therefore, the combination of the above-described division shapes should not be construed as being limited to the above-described embodiments, but should be construed such that various types of combinations of division shapes can be used for the predetermined data unit.

According to an embodiment, the bitstream obtainer 110 of the image decoding apparatus 100 may obtain a bitstream including an index indicating a combination of division shape information for each predetermined data unit (e.g., a sequence, a picture, a slice segment, a parallel block, or a parallel block group). For example, the bitstream obtainer 110 may obtain an index indicating a combination of division shape information from a sequence parameter set, a picture parameter set, a slice header, a parallel block header, or a parallel block group header. The bitstream obtainer 110 of the image decoding apparatus 100 may determine a combination of division shapes into which the coding unit may be divided for each predetermined data unit by using the obtained index, and thus, a different combination of division shapes may be used for each predetermined data unit.

Fig. 17 illustrates various shapes of a coding unit that may be determined based on partition shape mode information that may be represented as a binary code according to an embodiment.

According to the embodiment, the image decoding apparatus 100 may divide the coding unit into various shapes by using the block shape information and the division shape mode information obtained by the bitstream obtainer 110. The shapes into which the coding unit may be divided may correspond to various shapes including the shapes described according to the above-described embodiments.

Referring to fig. 17, the image decoding apparatus 100 may divide a square coding unit in at least one of a horizontal direction and a vertical direction based on the division shape mode information, and may divide a non-square coding unit in the horizontal direction or the vertical direction.

According to the embodiment, when the image decoding apparatus 100 may divide the square coding unit into four square coding units in the horizontal direction and the vertical direction, the division shapes that may be indicated by the division shape mode information for the square coding units may correspond to four types. According to an embodiment, the partition shape pattern information may be represented as a two-bit binary code, and each partition shape may be allocated with a binary code. For example, when the coding unit is not divided, the division shape mode information may be represented as (00) b, when the coding unit is divided in the horizontal direction and the vertical direction, the division shape mode information may be represented as (01) b, when the coding unit is divided in the horizontal direction, the division shape mode information may be represented as (10) b, and when the coding unit is divided in the vertical direction, the division shape mode information may be represented as (11) b.

According to the embodiment, when the image decoding apparatus 100 divides the non-square coding unit in the horizontal direction or the vertical direction, the type of the division shape that can be indicated by the division shape mode information may be determined according to the number of coding units into which the non-square coding unit is divided. Referring to fig. 17, according to an embodiment, the image decoding apparatus 100 may be divided into up to three coding units from a non-square coding unit. The image decoding apparatus 100 may divide the coding unit into two coding units, and in this case, the division shape mode information may be represented as (10) b. The image decoding apparatus 100 may divide the coding unit into three coding units, and in this case, the division shape mode information may be represented as (11) b. The image decoding apparatus 100 may determine that the coding unit is not divided, and in this case, the division shape mode information may be represented as (0) b. That is, in order to use the binary code indicating the partition shape mode information, the image decoding apparatus 100 may use Variable Length Coding (VLC) instead of Fixed Length Coding (FLC).

Referring to fig. 17, a binary code indicating partition shape mode information that does not partition a coding unit may be represented as (0) b according to an embodiment. When a binary code indicating division shape mode information that does not divide a coding unit is configured as (00) b, all 2-bit binary codes of the division shape mode information may have to be used even if there is no division shape mode information configured as (01) b. However, as shown in fig. 17, when three partition shape types for non-square coding units are used, the image decoding apparatus 100 may determine not to partition the coding units even by using the 1-bit binary code (0) b as the partition shape mode information. Accordingly, the bit stream can be efficiently used. However, the division shape of the non-square coding unit indicated by the division shape mode information should not be construed as being limited to the three division shape types shown in fig. 17, but should be construed to include various shapes including the above-described embodiments.

Fig. 18 illustrates another shape of a coding unit that may be determined based on partition shape mode information that may be represented as a binary code according to an embodiment.

Referring to fig. 18, the image decoding apparatus 100 may divide a square coding unit in a horizontal direction or a vertical direction based on the division shape mode information, and may divide a non-square coding unit in the horizontal direction or the vertical direction. That is, the division shape mode information may indicate that the square coding units are divided in one direction. In this case, a binary code indicating division shape pattern information that does not divide the square coding unit may be represented as (0) b. When a binary code indicating division shape mode information that does not divide a coding unit is configured as (00) b, all 2-bit binary codes of the division shape mode information may have to be used even if there is no division shape mode information configured as (01) b. However, as shown in fig. 18, when three partition shape types for a square coding unit are used, the image decoding apparatus 100 may determine not to partition the coding unit even by using the 1-bit binary code (0) b as the partition shape mode information. Accordingly, the bit stream can be efficiently used. However, the division shape of the square coding unit indicated by the division shape mode information should not be construed as being limited to the three division shape types shown in fig. 18, but should be construed to include various shapes including the above-described embodiments.

According to an embodiment, block shape information or partition shape mode information may be represented by using a binary code, and may be directly generated as a bitstream. Further, block shape information or partition shape pattern information, which may be represented as a binary code, may not be directly generated as a bitstream, but may be used as a binary code input in Context Adaptive Binary Arithmetic Coding (CABAC).

According to the embodiment, the processing in which the image decoding apparatus 100 obtains the syntax for the block shape information or the partition shape mode information by CABAC is described. A bitstream including a binary code for syntax may be obtained by the bitstream obtainer 110. The image decoding apparatus 100 may detect a syntax element indicating block shape information or division shape mode information by inverse-binarizing a binary bit string included in the obtained bitstream. According to the embodiment, the image decoding apparatus 100 may obtain a set of binary bit strings corresponding to syntax elements to be decoded, and may decode each binary bit by using probability information. Further, the image decoding apparatus 100 may repeat the process until the binary bit string composed of these decoded binary bits becomes identical to one of the previously obtained binary bit strings. The image decoding apparatus 100 may determine the syntax element by performing inverse binarization on the binary bit string.

According to the embodiment, the image decoding apparatus 100 may determine the syntax for the binary bit string by performing the decoding process of the adaptive binary arithmetic coding, and the image decoding apparatus 100 may update the probability model for the binary bits obtained by the bitstream obtainer 110. Referring to fig. 17, the bitstream obtainer 110 of the image decoding apparatus 100 may obtain a bitstream indicating a binary code representing division shape mode information, according to an embodiment. The image decoding apparatus 100 may determine syntax for the partition shape mode information by using the obtained 1-bit or 2-bit sized binary code. To determine the syntax for the partition shape mode information, the image decoding apparatus 100 may update the probability for each bit of the 2-bit binary code. That is, the image decoding apparatus 100 may update the probability that the value of the next binary digit is 0 or 1 when the next binary digit is decoded, according to whether the value of the first binary digit of the 2-bit binary code is 0 or 1.

According to the embodiment, in the process of determining the syntax, the image decoding apparatus 100 may update the probabilities for the binary bits, in the process of decoding the binary bits of the binary bit string for the syntax, and for predetermined bits in the binary bit string, the image decoding apparatus 100 may not update the probabilities, and may determine that the probabilities are the same.

Referring to fig. 17, in the process of determining the syntax by using the bin string representing the partition shape mode information for the non-square coding unit, the image decoding apparatus 100 may determine the syntax for the partition shape mode information by using one bin having a value of 0 when the non-square coding unit is not partitioned. That is, when the block shape information indicates that the current coding unit has a non-square shape, the first binary digit of the binary digit string for the division shape mode information may be 0 when the non-square coding unit is not divided, and the first binary digit of the binary digit string for the division shape mode information may be 1 when the non-square coding unit is divided into two or three coding units. Accordingly, the probability that the first binary bit of the binary bit string of the partition shape pattern information for the non-square coding unit is 0 may be 1/3, and the probability that the first binary bit of the binary bit string of the partition shape pattern information for the non-square coding unit is 1 may be 2/3. As described above, since the partition shape mode information indicating that the non-square coding unit is not partitioned can be represented by using only a 1-bit binary bit string having a value of 0, the image decoding apparatus 100 can determine syntax for the partition shape mode information by determining whether the second binary bit is 0 or 1 only when the first binary bit of the partition shape mode information is 1. According to the embodiment, when the first binary bit for the division shape mode information is 1, the image decoding apparatus 100 may consider that the probability that the second binary bit is 0 and the probability that the second binary bit is 1 are the same as each other, and may decode the binary bits.

According to the embodiment, in the process of determining the bin for the bin string of the division shape mode information, the image decoding apparatus 100 may use various probabilities for each bin. According to the embodiment, the image decoding apparatus 100 may determine the probability of the binary bits for the division shape mode information differently according to the direction of the non-square block. According to the embodiment, the image decoding apparatus 100 may differently determine the probability for dividing the binary bits of the shape mode information according to the width of the current coding unit or the length of the longer side. According to the embodiment, the image decoding apparatus 100 may differently determine the probability of the binary bits for dividing the shape mode information according to at least one of the shape of the current coding unit and the length of the longer sides.

According to the embodiment, the image decoding apparatus 100 may determine that the probabilities for the binary bits of the division shape mode information are the same for the coding units having the size equal to or greater than the predetermined size. For example, the image decoding apparatus 100 may determine that the probabilities for dividing the binary bits of the shape mode information are the same as each other for a coding unit having a size equal to or greater than 64 samples based on the length of the longer side of the coding unit.

According to an embodiment, the image decoding apparatus 100 may determine initial probabilities of binary bits constituting a binary bit string of partition shape mode information based on a slice type (e.g., I-slice, P-slice, or B-slice).

Fig. 19 shows a block diagram of an image encoding and decoding system that performs loop filtering.

An encoding end 1910 of the image encoding and decoding system 1900 transmits an encoded bitstream of an image, and a decoding end 1950 outputs a reconstructed image by receiving and decoding the bitstream. Here, the encoding terminal 1910 may have a similar configuration to the image encoding apparatus 200, which will be described below, and the decoding terminal 1950 may have a similar configuration to the image decoding apparatus 100.

At the encoding end 1910, the prediction encoder 1915 outputs prediction data via inter-prediction and intra-prediction, and the transformer and quantizer 1920 outputs quantized transform coefficients of residual data between the prediction data and the current input image. The entropy encoder 1925 encodes and transforms the quantized transform coefficients and outputs the quantized transform coefficients as a bitstream. The quantized transform coefficients are reconstructed into spatial-domain data via an inverse quantizer and an inverse transformer 1930, and the spatial-domain reconstructed data is output as a reconstructed image via a deblocking filter 1935 and a loop filter 1940. The reconstructed picture may be used as a reference picture for the next input picture via the predictive encoder 1915.

Encoded image data in a bitstream received by the decoding terminal 1950 is reconstructed into residual data of a spatial domain via the entropy decoder 1955 and the inverse quantizer and inverse transformer 1960. The prediction data and the residual data output from the prediction decoder 1975 may be combined to construct image data of a spatial domain, and the deblocking filter 1965 and the loop filter 1970 may perform filtering on the image data of the spatial domain to output a reconstructed image with respect to the current original image. The reconstructed picture may be used as a reference picture for the next original picture via a predictive decoder 1975.

The loop filter 1940 of the encoding end 1910 performs loop filtering by using filter information input according to a user input or a system setting. The filter information used by the loop filter 1940 is output to the entropy encoder 1925 and transmitted to the decoding terminal 1950 together with the encoded image data. The loop filter 1970 of the decoding terminal 1950 may perform loop filtering based on the filter information input from the decoding terminal 1950.

The various embodiments described above describe operations related to the image decoding method performed by the image decoding apparatus 100. Hereinafter, the operation of the image encoding apparatus 200 that performs the image encoding method corresponding to the inverse process of the image decoding method is described according to various embodiments.

Fig. 2 is a block diagram of an image encoding apparatus 200 capable of encoding an image based on at least one of block shape information and division shape mode information according to an embodiment.

The image encoding apparatus 200 may include an encoder 220 and a bitstream generator 210. The encoder 220 may receive an input image and encode the input image. The encoder 220 may obtain at least one syntax element by encoding the input image. The syntax element may include at least one of a skip flag, a prediction mode, a motion vector difference, a motion vector prediction method (or index), a transform quantization coefficient, a coding block pattern, a coding block flag, an intra prediction mode, a direct flag, a merge flag, a delta QP, a reference index, a prediction direction, and a transform index. The encoder 220 may determine the context model based on block shape information including at least one of a shape, a direction, a ratio between a width and a height, or a size of the coding unit.

The bitstream generator 210 may generate a bitstream based on the encoded input image. For example, the bitstream generator 210 may generate the bitstream by entropy-encoding the syntax element based on the context model. Further, the image encoding apparatus 200 may transmit the bitstream to the image decoding apparatus 100.

According to an embodiment, the encoder 220 of the image encoding apparatus 200 may determine the shape of the encoding unit. For example, the coding unit may have a square shape or a non-square shape, and information indicating the square shape or the non-square shape may be included in the block shape information.

According to an embodiment, the encoder 220 may determine into which shape the coding unit is to be partitioned. The encoder 220 may determine a shape of at least one coding unit included in the coding units, and the bitstream generator 210 may generate a bitstream including partition shape mode information including information on the shape of the coding units.

According to an embodiment, the encoder 220 may determine whether to divide the coding unit. When the encoder 220 determines that only one coding unit is included in the coding unit or the coding unit is not divided, the bitstream generator 210 may generate a bitstream including division shape mode information indicating that the coding unit is not divided. Also, the encoder 220 may divide the coding unit into a plurality of coding units, and the bitstream generator 210 may generate a bitstream including division shape mode information indicating that the coding unit is divided into the plurality of coding units.

According to an embodiment, information indicating how many number of coding units the coding unit is to be divided into or in which direction the coding unit is to be divided may be included in the division shape mode information. For example, the partition shape mode information may indicate that the coding unit is divided in at least one of a vertical direction and a horizontal direction, or may indicate that the coding unit is not divided.

The image encoding apparatus 200 may determine information for the division shape mode based on the division shape mode of the encoding unit. The image encoding apparatus 200 may determine the context model based on at least one of a shape, a direction, a ratio between a width and a height, or a size of the coding unit. Further, the image encoding apparatus 200 may generate information for a division shape mode for dividing the encoding unit as a bitstream based on the context model.

To determine the context model, the image encoding apparatus 200 may obtain an arrangement for making a correspondence between at least one of a shape, a direction, a ratio between a width and a height, or a size of the encoding unit and an index for the context model. The image encoding apparatus 200 may obtain an index for the context model from the arrangement based on at least one of a shape, a direction, a ratio between a width and a height, or a size of the encoding unit. The image encoding apparatus 200 may determine the context model based on an index to the context model.

To determine the context model, the image encoding apparatus 200 may further determine the context model based on block shape information including at least one of a shape, a direction, a ratio between a width and a height, or a size of an adjacent coding unit adjacent to the coding unit. Further, the neighboring coding units may include at least one coding unit among coding units located at a lower left side, a left side, an upper right side, a right side, and a lower right side of the coding unit.

Further, the image encoding apparatus 200 may compare the width of the upper neighboring coding unit with the width of the coding unit in order to determine the context model. Further, the image encoding apparatus 200 may compare the heights of the left adjacent coding unit and the right adjacent coding unit with the height of the coding unit. Further, the image encoding apparatus 200 may determine a context model based on the result of the comparison.

The operation of the image encoding apparatus 200 includes aspects similar to those of the image decoding apparatus 100 described with reference to fig. 3 to 19, and thus will not be described in detail.

Hereinafter, embodiments of the technical concept according to the present disclosure are sequentially described in detail.

Fig. 20 is a block diagram of components of the image decoding apparatus 2000 according to the embodiment.

Referring to fig. 20, the image decoding apparatus 2000 may include an obtainer 2010, a block determiner 2030, a prediction decoder 2050, and a reconstructor 2070. The obtainer 2010 shown in fig. 20 may correspond to the bitstream obtainer 110 shown in fig. 1, and the block determiner 2030, the prediction decoder 2050, and the reconstructor 2070 may correspond to the decoder 120 shown in fig. 1.

The obtainer 2010, the block determiner 2030, the prediction decoder 2050, and the reconstructor 2070 according to the embodiment may be implemented as at least one processor. The image decoding apparatus 2000 may include one or more data memories (not shown) storing input data and output data of the obtainer 2010, the block determiner 2030, the prediction decoder 2050, and the reconstructor 2070. In addition, the image decoding apparatus 2000 may further include a memory controller (not shown) that controls data input and data output of the data memory.

The obtainer 2010 may receive a bitstream generated as a result of encoding the image. The obtainer 2010 may obtain syntax elements for decoding the image from the bitstream. A binary value corresponding to the syntax element may be included in the bitstream according to the hierarchical structure of the picture. The obtainer 2010 may obtain the syntax element by entropy-encoding a binary value included in the bitstream.

Fig. 21 is an exemplary diagram of a structure of a bitstream 2100 generated according to a hierarchical structure of images.

Referring to fig. 21, the bitstream 2100 may include a sequence parameter set 2110, a picture parameter set 2120, a group header 2130, and a block parameter set 2140.

Each of the sequence parameter set 2110, the picture parameter set 2120, the group header 2130, and the block parameter set 2140 includes information used in each layer according to a hierarchical structure of pictures.

In detail, the sequence parameter set 2110 includes information for a sequence of images including one or more images.

The picture parameter set 2120 includes information used in one picture and may refer to the sequence parameter set 2110.

The group header 2130 includes information used in a determined group of groups in an image, and may refer to the picture parameter set 2120 and the sequence parameter set 2110. The headgroup 2130 may be a tape head.

In addition, the block parameter set 2140 includes information used in a certain block in an image, and may refer to the group header 2130, the picture parameter set 2120, and the sequence parameter set 2110.

According to an embodiment, the block parameter set 2140 may be identified as at least one of a parameter set of a CTU, a parameter set of a coding unit, a parameter set of a prediction unit, and a parameter set of a transform unit according to a hierarchical structure of a block determined in a picture.

The obtainer 2010 may obtain information for decoding the image from the bitstream 2100 according to a hierarchical structure of the image, and the block determiner 2030, the prediction decoder 2050, and the reconstructor 2070, which will be described below, may perform a desired operation by using the information obtained by the obtainer 2010.

The structure of the bitstream 2100 shown in fig. 21 is only an example, and one or more parameter sets among the parameter sets shown in fig. 21 may not be included in the bitstream 2100, or a parameter set (e.g., a video parameter set) not shown may be included in the bitstream 2100.

The block determiner 2030 may divide the current image into blocks and configure a block group including at least one block in the current image. Here, a block may correspond to a parallel block, and a block group may correspond to a stripe. A stripe may be referred to as a parallel block set.

The prediction decoder 2050 may perform inter prediction or intra prediction on a lower layer block among blocks divided from a current picture to obtain prediction samples corresponding to the lower layer block. Here, the lower layer block may be at least one of a CTU, a coding unit, and a transform unit.

Hereinafter, a description is given by limiting blocks to parallel blocks and limiting block groups to stripes. However, this is only an example, and when there is a B block including a group of a blocks, the a block may correspond to a block, and the B block may correspond to a group of blocks. For example, when a set of CTUs corresponds to a parallel block, the CTUs may be a block, and the parallel block may be a block group.

As described with reference to fig. 3 to 16, the block determiner 2030 may divide the current image to determine a transform unit, a coding unit, a CTU, parallel blocks, slices, and the like.

Fig. 22 illustrates slices, parallel blocks, and CTUs determined in the current picture 2200.

The current picture 2200 is divided into a plurality of CTUs. The size of the CTU may be determined based on information obtained from the bitstream. The CTUs may have a square shape of the same size.

The parallel blocks include one or more CTUs. The parallel blocks may have a square shape or a rectangular shape.

A stripe includes one or more parallel blocks. The strips may have a square shape or a non-square shape.

According to an embodiment, the block determiner 2030 may divide the current picture 2200 into a plurality of CTUs according to information obtained from a bitstream, and may configure a parallelized block including at least one CTU and a slice including at least one parallelized block in the current picture 2200.

According to an embodiment, the block determiner 2030 may divide the current image 2200 into a plurality of parallel blocks according to information obtained from a bitstream, and may divide each of the parallel blocks into one or more CTUs. Further, the block determiner 2030 may configure a slice including at least one parallelized block in the current image 2200.

According to an embodiment, the block determiner 2030 may divide the current image 2200 into one or more slices according to information obtained from a bitstream, and may divide each slice into one or more parallel blocks. Further, block determiner 2030 may divide each parallel block into one or more CTUs.

The block determiner 2030 may use address information of a slice obtained from the bitstream in order to configure the slice in the current image 2200. The block determiner 2030 may configure a slice including one or more parallel blocks in the current image 2200 according to address information of the slice obtained from the bitstream. The address information of the slice may be obtained from a video parameter set, a sequence parameter set, a picture parameter set, or a group header of the bitstream.

A method of configuring a slice in the current image 2200 performed by the block determiner 2030 is described with reference to fig. 23 and 24.

Fig. 23 and 24 are diagrams for describing a method of configuring a slice in the current image 2200.

When configuring the concurrent blocks in the current image 2200, the block determiner 2030 may configure a slice including at least one concurrent block in the current image 2200 according to address information of a slice obtained from a bitstream.

To describe with reference to fig. 23, the stripes 2310, 2320, 2330, 2340, and 2350 may be determined in the current image 2200 according to the raster scan direction 2300, and the stripes 2310, 2320, 2330, 2340, and 2350 may be decoded in sequence according to the raster scan direction 2300.

According to an embodiment, the address information may include identification values of the bottom-right parallel block located at the bottom-right end among the parallel blocks included in each of the stripes 2310, 2320, 2330, 2340, and 2350.

In detail, the address information of the stripes 2310, 2320, 2330, 2340, and 2350 may include 9 (identification value of the bottom right parallel block of the first stripe 2310), 7 (identification value of the bottom right parallel block of the second stripe 2320), 11 (identification value of the bottom right parallel block of the third stripe 2330), 12 (identification value of the bottom right parallel block of the fourth stripe 2340), and 15 (identification value of the bottom right parallel block of the fifth stripe 2350). According to an embodiment, when the fourth stripe 2340 is configured in the current image 2200, the fifth stripe 2350, which is the last stripe, may be automatically recognized, and thus, address information of the fifth stripe 2350 may not be included in the bitstream.

To configure the first strip 2310, the block determiner 2030 may identify a top-left parallel block, i.e., a parallel block having an identification value of 0, from the parallel blocks of the current image 2200. Further, the block determiner 2030 may determine an area including the parallel block 0 and the parallel block 9 identified from the address information as the first stripe 2310.

Next, to configure the second stripe 2320, the block determiner 2030 may determine a parallel block having the smallest identification value (i.e., the parallel block 2) among parallel blocks not included in the previous stripe (i.e., the first stripe 2310) as a top-left parallel block of the second stripe 2320. Further, the block determiner 2030 may determine a region including the parallel block 2 and the parallel block 7 identified from the address information as the second stripe 2320.

Also, to designate the third strip 2330, the block determiner 2030 may determine a parallel block having a minimum identification value (i.e., the parallel block 10) among parallel blocks not included in previous strips (i.e., the first strip 2310 and the second strip 2320) as a top-left parallel block of the third strip 2330. Further, the block determiner 2030 may determine an area including the parallel block 10 and the parallel block 11 identified from the address information as a third band 2330.

That is, according to an embodiment, a slice may be configured in the current image 2200 by using only identification information of a lower-right parallel block included in a bitstream.

According to another embodiment, as the address information for determining the slice, the obtainer 2010 may obtain an identification value of an upper-left parallel block and an identification value of a lower-right parallel block included in each of the slices, and the block determiner 2030 may configure the slice in the current image 2200 according to the information obtained by the obtainer 2010. Because the top-left and bottom-right parallel blocks included in each of the stripes can be identified from the address information, block determiner 2030 can configure a region including the top-left and bottom-right parallel blocks identified from the address information as stripes.

According to another embodiment, as the address information for configuring the slices, the obtainer 2010 may obtain an identification value of a top-left parallel block included in each of the slices, a width of each slice, and a height of each slice, and the block determiner 2030 may configure the slices in the current image 2200 according to the information obtained by the obtainer 2010.

For example, the address information of the second stripe 2320 in fig. 23 may include 2 as the identification value of the top-left parallel block, 2 as the width of the stripe, and 2 as the height of the stripe. Here, the width and height being 2 means that there are two parallel block rows and two parallel block columns in the width direction and the height direction of the second stripe 2320.

According to an embodiment, the upper left parallel block of the first stripe 2310 is fixed to the parallel block 0, and thus, the identification value of the upper left parallel block of the first stripe 2310 may not be included in the bitstream.

According to another embodiment, the width and height of the stripe obtained from the bitstream may be values obtained by dividing the number of parallel block rows and the number of parallel block columns arranged in the width direction and the height direction of the stripe by a predetermined scaling factor. In other words, when the address information of the second stripe 2320 in fig. 23 indicates 2 as an identification value of the top-left parallel block, 1 as a width of the stripe, and 1 as a height of the stripe, the block determiner 2030 may multiply 1 as the width of the stripe and 1 as the height of the stripe by a predetermined scaling factor (e.g., 2) in order to recognize that two parallel block rows and two parallel block columns exist in the width direction and the height direction of the stripe.

The block determiner 2030 may determine the first to fifth stripes 2310 to 2350 in the current image 2200 according to the address information of the first to fifth stripes 2310 to 2350. When up to the fourth stripe 2340 is determined in the current image 2200 according to the address information, the fifth stripe 2350 may be automatically determined, and thus, the address information of the last stripe may not be included in the bitstream.

According to another embodiment, the address information of a stripe including a parallel block located at a first row or a parallel block located at a first column among the stripes to be determined in the current image 2200 may further include a value indicating the number of stripes that are then present in a right direction or a lower direction of the corresponding stripe, in addition to the identification value of the top-left parallel block of the corresponding stripe, the width of the stripe, and the height of the stripe. The value indicating the number of stripes that are present subsequently in the right-side direction or the lower direction of the stripes may be replaced with a value indicating the number of stripes arranged in the width direction or the height direction of the stripes.

The address information of the first strip 2310 may include information on the presence of one strip in the right direction (i.e., the second strip 2320) and one strip in the lower direction (i.e., the fourth strip 2340). Because the first stripe 2310 includes both a parallel block located at the first row and a parallel block located at the first column in the image 2200, the address information of the first stripe 2310 may include a value indicating the number of stripes that are then present in the right direction of the stripe and a value indicating the number of stripes that are then present in the lower direction of the stripe.

Because the second stripe 2320 includes only parallel blocks located at the first row, the address information of the second stripe 2320 may include a value indicating the number of stripes that are subsequently present in the lower direction of the stripes.

Since a value indicating the number of stripes existing in the right direction and/or the lower direction later is included in the address information, the address information of the last stripe (the second stripe 2320 and/or the fifth stripe 2350 in fig. 23) in the width direction of the current image 2200 may omit the width of the stripe, and the address information of the last stripe (the fourth stripe 2340 and/or the fifth stripe 2350 in fig. 23) in the height direction of the current image 2200 may omit the height of the stripe. Since the block determiner 2030 may already know that the first stripe 2310 has one subsequent stripe existing in the width direction of the current picture 2200, the block determiner 2030 may derive the width of the subsequent stripe of the first stripe 2310 by considering the width of the current picture 2200 even when a value indicating the width of the subsequent stripe is not included in the bitstream. In fig. 23, since there are four parallel blocks in the width direction of the current image 2200 and two parallel blocks in the width direction of the first stripe 2310, it can be recognized that there are two parallel blocks in the width direction of the second stripe 2320 which exists subsequently with respect to the first stripe 2310. Also, since the block determiner 2030 may know that the first stripe 2310 has one subsequent stripe existing in the height direction of the current image 2200, the block determiner 2030 may derive the height of the subsequent stripe of the first stripe 2310 even when a value indicating the height of the subsequent stripe is not included in the bitstream.

According to another embodiment, the obtainer 2010 may obtain division information for dividing the current image 2200 into slices from the bitstream, and the block determiner 2030 may divide the current image 2200 into the slices according to the division information. Here, the division information may indicate, for example, a quarter division, a height quarter division, a width quarter division, and the like.

The block determiner 2030 may divide each of the slices obtained when the current image 2200 is initially divided according to the division information, and may obtain smaller slices hierarchically.

As shown in fig. 24, the block determiner 2030 may determine the two areas 2410 and 2420 by bi-dividing the width of the current image 2200 according to the division information, and may determine the two areas 2412 and 2414 by bi-dividing the height of the left area 2410 according to the division information of the left area 2410. When the division information of the right area 2420 indicates that division is not performed, and the areas 2412 and 2414 divided from the left area 2410 are not further divided, the block determiner 2030 may configure the upper left area 2412 as the first band, the right area 2420 as the second band, and the lower left area 2414 as the third band.

According to another embodiment, the block determiner 2030 may configure slices in the current image 2200 according to preconfigured mapping information, and may further divide at least one slice or merge two or more slices in the current image 2200 according to correction information obtained from a bitstream to configure a final slice. The mapping information may include address information of a slice located in the image. For example, the block determiner 2030 may initially configure slices in the image 2200 according to mapping information obtained from a video parameter set or a sequence parameter set of a bitstream, and may finally configure slices in the image 2200 according to correction information obtained from a picture parameter set.

When the parallel block and the slice are determined in the current image, the block determiner 2030 may inter-predict at least one coding unit among coding units included in the parallel block. Here, a method of configuring a reference picture list for inter prediction is described.

Referring to fig. 20, the prediction decoder 2050 performs prediction decoding on coding units included in parallel blocks determined in a current image. The prediction decoder 2050 may predictively decode the coding unit by inter prediction or intra prediction. According to inter prediction, prediction samples of a coding unit are obtained based on a reference block indicated by a motion vector in a reference image, and reconstructed samples of the coding unit are obtained based on the prediction samples and residual data obtained from a bitstream. According to the prediction mode, residual data may not be included in the bitstream, and in this case, prediction samples may be determined as reconstruction samples.

For inter prediction, it may be necessary to construct a reference picture list including reference pictures. According to an embodiment, the obtainer 2010 may obtain information indicating a plurality of first reference picture lists from a sequence parameter set of a bitstream. The information indicating the plurality of first reference picture lists may include Picture Order Count (POC) related values of the reference pictures. A plurality of first reference picture lists are used for a picture sequence including a current picture.

According to an embodiment, the information indicating the plurality of first reference picture lists may include the number of the first reference picture lists. In this case, the prediction decoder 2050 may construct a first reference picture list corresponding to the number of first reference picture lists identified from the bitstream. In this case, the prediction decoder 2050 may construct the first reference picture list according to the same method performed by the image encoding apparatus 3300.

When encoding a coding unit included in a predetermined slice, using the plurality of first reference picture lists for a picture sequence may be inappropriate according to characteristics of pictures. Accordingly, when there is no reference picture list that can be used for inter prediction of a coding unit in a current slice among the plurality of first reference picture lists, a new reference picture list may be obtained from a slice header. However, in this case, since a new reference picture list is included in the group header, the bit rate may be increased. Therefore, a method for constructing an optimal reference picture list to be used for a current slice by using a plurality of first reference picture lists signaled by a sequence parameter set is required.

According to an embodiment, the obtainer 2010 may obtain, from a group header of the bitstream, an indicator indicating at least one first reference picture list of a plurality of first reference picture lists for the sequence of pictures. In addition, the prediction decoder 2050 may obtain a second reference picture list modified and improved from the first reference picture list indicated by the indicator.

The second reference picture list may be obtained by replacing at least one of the reference pictures included in the first reference picture list indicated by the indicator with another reference picture, by changing an order of one or more of the reference pictures, or by adding a new reference picture to the first reference picture list.

To construct the second reference picture list, the obtainer 2010 may obtain modification and refinement information from a group header of the bitstream. The modification and refinement information may include a POC related value of a reference picture to be removed from the first reference picture list indicated by the indicator, a POC related value of a reference picture to be added to the second reference picture list, a difference between the POC related value of the reference picture to be removed from the first reference picture list and the POC related value of the reference picture to be added to the second reference picture list, information for changing an order of pictures, and the like. According to an embodiment, modification and refinement information may be obtained from parameter sets (e.g., picture parameter sets) in addition to the group header of the bitstream.

When the second reference picture list is obtained, the prediction decoder 2050 may predictively decode the coding unit included in the slice based on at least one of the reference pictures included in the second reference picture list to obtain prediction samples of the coding unit.

The prediction decoder 2050 may predictively decode a coding unit included in a next band by using one of the plurality of first reference picture lists for the image sequence except for the first reference picture list indicated by the indicator and using the second reference picture list. In other words, the second reference picture list obtained for the current slice may also be used for the next slice. In detail, an indicator indicating a reference picture list used in a next slice, from among a first reference picture list and a second reference picture list except for the first reference picture list indicated by the indicator obtained for the current slice, may be newly obtained, and a coding unit included in the next slice may be predictive decoded according to the reference picture list indicated by the indicator or a reference picture list modified and improved from the reference picture list indicated by the indicator. Therefore, even when a new reference picture list is not signaled through a sequence parameter set or a group header, an appropriate reference picture list for predictive decoding of a coding unit of a slice can be constructed only by updating a previous reference picture list.

Hereinafter, a method of obtaining the second reference picture list modified and improved from the first reference picture list is described with reference to fig. 25 to 30.

Fig. 25 is an exemplary diagram illustrating a plurality of first reference picture lists 2510, 2520, and 2530 obtained from a sequence parameter set.

Fig. 25 shows three first reference image lists 2510, 2520, and 2530. This is merely an example, and the number of first reference picture lists obtained from the sequence parameter set may be variously modified.

Referring to fig. 25, the first reference picture lists 2510, 2520 and 2530 may include short-term type reference pictures or long-term type reference pictures. The short-term type reference picture indicates a picture designated as a short-term type among reconstructed pictures stored in a Decoded Picture Buffer (DPB), and the long-term type reference picture indicates a picture designated as a long-term type among reconstructed pictures stored in the DPB.

The reference pictures included in the first reference picture lists 2510, 2520 and 2530 may be specified by POC-related values. In detail, the short-term type reference picture may be specified by a difference value (i.e., a difference value) between the POC of the current picture and the POC of the short-term type reference picture, and the long-term type reference picture may be specified by Least Significant Bits (LSBs) of the POC of the long-term type reference picture. The long-term type reference picture may also be specified by the Most Significant Bit (MSB) of the POC of the long-term type reference picture.

According to an embodiment, the first reference picture lists 2510, 2520 and 2530 may include only short-term type reference pictures or only long-term type reference pictures. That is, all the reference pictures shown in fig. 25 may be short-term type reference pictures or long-term type reference pictures. Further, according to an embodiment, some of the first reference picture lists 2510, 2520 and 2530 may include only short-term type reference pictures, and other first reference picture lists may include only long-term type reference pictures.

Fig. 26 is a diagram for describing a method of obtaining the second reference image list.

The prediction decoder 2050 may obtain the second reference picture list 2600 by changing at least one of the reference pictures included in the first reference picture list 2510 indicated by the indicator to another reference picture. Referring to fig. 26, it can be recognized that the short-term type reference picture having a difference value of-1, the long-term type reference picture having a LSB of 10, and the short-term type reference picture having a difference value of-3 in the first reference picture list 2510 are replaced with the short-term type reference picture having a difference value of-2, the long-term type reference picture having a LSB of 8, and the short-term type reference picture having a difference value of-5, respectively, in the second reference picture list 2600. Fig. 26 shows that all reference images in the first reference image list 2510 are replaced by other reference images. However, this is merely an example, and only one or more of the reference images in the first reference image list 2510 may be replaced with other reference images.

According to an embodiment, the prediction decoder 2050 may replace only a specific type of reference picture (e.g., a long-term type reference picture) among reference pictures included in the first reference picture list 2510 with another long-term type reference picture. That is, a short-term type reference picture among reference pictures included in the first reference picture list 2510 may be maintained as it is in the second reference picture list 2600, and only a long-term type reference picture may be replaced with another long-term type reference picture according to information obtained from a bitstream. Referring to fig. 26, only a specific type of reference image (i.e., a long-term type reference image having an LSB of 10) among reference images included in the first reference image list 2510 may be replaced with a long-term reference image having an LSB of 8 in the second reference image list 2600. According to an embodiment, a long-term type reference image among reference images included in the first reference image list 2510 may be maintained as it is in the second reference image list 2600, and only a short-term type reference image in the first reference image list 2510 may be replaced with another short-term type reference image.

To replace the reference picture, the obtainer 2010 may obtain the POC-related value of the new reference picture from the group header of the bitstream, and the predictive decoder 2050 may include the reference picture indicated by the POC-related value obtained by the obtainer 2010 in the second reference picture list 2600.

In order to specify a reference image to be replaced with a new reference image (i.e., a reference image to be removed) from among the reference images included in the first reference image list 2510, the obtainer 2010 may also obtain an index of the reference image to be removed from the first reference image list 2510 from the bitstream. When all reference pictures included in the first reference picture list 2510 are to be removed, an index of a reference picture to be removed from the first reference picture list 2510 may not be included in the bitstream.

As described above, when a specific type of reference picture is predetermined to be removed from the first reference picture list 2510, the index of the reference picture to be removed may not be included in the bitstream, and the prediction decoder 2050 may remove a predetermined reference picture from the reference pictures included in the first reference picture list 2510 and may include a reference picture indicated by the POC related value obtained from the bitstream in the second reference picture list 2600.

According to an embodiment, the information indicating the new reference picture to be included in the second reference picture list 2600 may be a difference between the POC-related value of the new reference picture and the POC-related value of the reference picture to be removed from the first reference picture list 2510. For example, in fig. 26, since the reference image having the LSB of 10 in the first reference image list 2510 is replaced with the reference image having the LSB of 8 in the second reference image list 2600, the information indicating the new reference image may include 2 (10-8). The prediction decoder 2050 may derive POC-related values for reference pictures to be newly included in the second reference picture list 2600 based on the difference between the POC-related values and the POC-related values of the reference pictures to be removed from the first reference picture list 2510.

According to an embodiment, a new reference picture may be added in the second reference picture list 2600 according to the order of reference pictures to be removed from the first reference picture list 2510 indicated by the indicator. As shown in fig. 26, when the long-term type reference picture assigned with index 1 is removed from the first reference picture list 2510, index 1 may also be assigned to a new reference picture.

Fig. 27 is a diagram for describing another method of obtaining the second reference image list.

The prediction decoder 2050 may obtain the second reference picture list 2700 by excluding a specific type of reference picture from reference pictures in the first reference picture list 2510 indicated by the indicator from the plurality of first reference picture lists for the picture sequence. Referring to fig. 27, it may be recognized that a long-term type reference image among reference images in the first reference image list 2510 indicated by the indicator is not included in the second reference image list 2700.

According to an embodiment, the prediction decoder 2050 may also obtain a second reference picture list 2700 excluding short-term type reference pictures among the reference pictures in the first reference picture list 2510.

Fig. 28 is a diagram for describing another method of obtaining the second reference image list.

The prediction decoder 2050 may also obtain the second reference picture list 2800 by changing the order of reference pictures in the first reference picture list 2510 indicated by the indicator according to modification and improvement information obtained from the group header of the bitstream. Here, according to the modification and improvement information, the order of all reference pictures in the first reference picture list 2510 may be changed, or the order of one or more reference pictures in the first reference picture list 2510 may be changed.

For example, the modification and improvement information obtained from the group header of the bitstream may include an index of reference pictures arranged according to the order in which the reference pictures are to be changed in the first reference picture list 2510. In detail, in fig. 28, when a reference picture indexed 0, a reference picture indexed 1, and a reference picture indexed 2 in the first reference picture list 2510 are to be changed to a reference picture indexed 1, a reference picture indexed 2, and a reference picture indexed 0, respectively, in the second reference picture list 2800, the group header of the bitstream may include (2,0,1) as modification and refinement information. The prediction decoder 2050 may allocate an index 0 to a reference picture allocated with an index 2 in the first reference picture list 2510, allocate an index 1 to a reference picture allocated with an index 0, and allocate an index 2 to a reference picture allocated with an index 1 to construct the second reference picture list 2800.

As another example, the modification and refinement information obtained from the group header of the bitstream may include an index of a reference picture of which order must be changed among reference pictures in the first reference picture list 2510. In detail, in fig. 28, when the order of a reference picture with index 1 and a reference picture with index 2 in the first reference picture list 2510 is to be changed, the group header of the bitstream may include (1,2) as modification and refinement information. The prediction decoder 2050 may allocate an index 2 to a reference picture allocated with an index 1 in the first reference picture list 2510 and allocate an index 1 to a reference picture allocated with an index 2 to construct the second reference picture list 2800.

Fig. 29 is a diagram for describing another method of obtaining the second reference image list.

The number of first reference picture lists indicated by the indicator among the plurality of first reference picture lists for the picture sequence may be plural. That is, as shown in fig. 29, the indicator may indicate the first reference picture list 2910 including only the short-term type reference picture and the first reference picture list 2920 including only the long-term type reference picture.

The prediction decoder 2050 may obtain a second reference picture list 2930 including the short-term type reference picture and the long-term type reference picture included in the first reference picture lists 2910 and 2920 indicated by the indicator. Here, in the second reference picture list 2930, a higher index may be allocated to the long-term type reference picture than the short-term type reference picture. Conversely, in the second reference picture list 2930, a higher index may be allocated to the short-term type reference picture than to the long-term type reference picture.

According to an embodiment, the obtainer 2010 may obtain order information of the short-term type reference picture and the long-term type reference picture from the bitstream, and the prediction decoder 2050 may allocate indexes to the short-term type reference picture and the long-term type reference picture included in the second reference picture list 2930 according to the obtained order information.

According to another embodiment, the first reference picture list 2910 and the first reference picture list 2920 may include at least one reference picture regardless of the type of the reference picture. In this case, when a short-term type reference picture exists in the first reference picture list 2910 indicated by the indicator and a long-term type reference picture exists in the first reference picture list 2920 indicated by the indicator, the prediction decoder 2950 may obtain the second reference picture list 2930 including the short-term type reference picture included in the first reference picture list 2910 and the long-term type reference picture included in the first reference picture list 2920. Alternatively, when a long-term type reference picture exists in the first reference picture list 2910 indicated by the indicator and a short-term type reference picture exists in the first reference picture list 2920 indicated by the indicator, the prediction decoder 2950 may obtain the second reference picture list 2930 including the long-term type reference picture included in the first reference picture list 2910 and the short-term type reference picture included in the first reference picture list 2920.

Fig. 30 is a diagram for describing another method of obtaining the second reference image list.

The first reference picture list 3010 indicated by the indicator may include only short-term reference pictures. According to an embodiment, the first reference picture list 3010 indicated by the indicator may include only long-term type reference pictures.

When the first reference picture list 3010 includes only short-term type reference pictures, the obtainer 2010 may obtain POC-related values of long-term type reference pictures to be included in the second reference picture list 3030 from the bitstream, and may construct the second reference picture list 3030 including the long-term type reference pictures indicated by the obtained POC-related values and the short-term type reference pictures included in the first reference picture list 3010. That is, the first reference picture list 3010 including only short-term type reference pictures may be signaled by a sequence parameter set, and the POC related values of long-term type reference pictures may be signaled by a group header.

When the reference picture list is transmitted through the sequence parameter set instead of the group header, it may not be necessary to transmit the reference picture list for each group of blocks, and thus, the compression rate may be improved due to the reduction of overhead. For example, when the prediction structure is repeated for each group of pictures (GOP), the reference list may be repeatedly transmitted for each GOP. When a reference picture list, which may be frequently transmitted, is transmitted through the sequence parameter set, the bit rate may be further reduced.

Here, the availability for the sequence parameter set may be different according to the type of the reference picture (i.e., whether the reference picture is a long-term type or a short-term type). The short-term type reference picture is associated with a pattern of prediction structure repetitions as exemplified above, while the long-term type reference picture is highly associated with a correlation between the current picture and the long-term reference picture. For example, although the prediction structure is repeated for each GOP, when a long-term type reference picture is no longer valid because the content of a picture is completely changed due to a screen transition or the like, a reference list for a short-term type reference picture may be obtained from a sequence parameter set, and the long-term type reference picture may be separately transmitted through a group header, so that it may be possible to avoid transmitting the entire reference list through the group header.

According to an embodiment, when only a long-term type reference picture is included in the first reference picture list, the obtainer 2010 may obtain POC-related values of short-term type reference pictures to be included in the second reference picture list from the bitstream, and may construct the second reference picture list including the short-term type reference picture indicated by the POC-related values and the long-term type reference picture included in the first reference picture list.

When constructing the second reference picture list 3030, the reference pictures indicated by the POC related values obtained from the group header of the bitstream may be allocated with higher indices or lower indices than the reference pictures included in the first reference picture list 3010.

As described above, when the second reference picture list is completely constructed, the prediction decoder 2050 may inter-predict the coding unit based on the reference picture included in the second reference picture list. As a result of inter prediction, a prediction sample corresponding to a coding unit may be obtained.

The reconstructor 2070 obtains reconstructed samples of the coding unit by using the prediction samples. According to an embodiment, the reconstructor 2070 may obtain the reconstructed samples of the coding unit by adding residual data obtained from the bitstream to the prediction samples.

The reconstructor 2070 may perform luma mapping on the prediction samples of the coding unit before obtaining the reconstructed samples.

The luminance mapping is to change the luminance value of a predicted sample point according to a parameter obtained from a bitstream, and may correspond to a tone mapping, for example.

According to an embodiment, the obtainer 2010 may obtain parameters for luminance mapping from one or more post-processing parameter sets of the bitstream. Each of the one or more post-processing parameter sets may include parameters for luminance mapping or adaptive loop filtering, which will be described below.

The parameters for the luminance mapping may include, for example, a range of luminance values to be changed, a difference value of luminance values to be applied to the predicted sampling points, and the like.

Fig. 31 is a diagram showing a bitstream including a plurality of post-processing parameter sets for luminance mapping or adaptive loop filtering.

The bitstream 3100 may include a plurality of post-processing parameter sets 3150a, 3150b, and 3150c in addition to the above-described Sequence Parameter Set (SPS)3110, Picture Parameter Set (PPS)3120, Group Header (GH)3130, and Block Parameter Set (BPS) 3140. Unlike the SPS 3110, the PPS 3120, the GH 3130, and the BPS 3140, the post-processing parameter sets 3150a, 3150b, and 3150c may be included in the bitstream regardless of the hierarchical structure of the picture.

An identifier may be assigned to each of the post-processing parameter sets 3150a, 3150b, and 3150c in order to identify the post-processing parameter sets 3150a, 3150b, and 3150 c. According to an embodiment, identifiers 0,1, and 2 may be allocated to the post-processing parameter set a 3150a, the post-processing parameter set B3150B, and the post-processing parameter set C3150C, respectively.

One or more of the post-processing parameter sets 3150a, 3150b, and 3150c include parameters for luma mapping, and the other post-processing parameter sets include parameters for adaptive loop filtering. For example, post-processing parameter set a and post-processing parameter set C may include parameters for luma mapping, and post-processing parameter set B may include parameters for adaptive loop filtering.

The obtainer 2010 may obtain, from the PPS 3120, the GH 3130, or the BPS 3140, an identifier indicating a post-processing parameter set used for luminance mapping of prediction samples among the plurality of post-processing parameter sets 3150a, 3150b, and 3150 c. The reconstructor 2070 may change the brightness value of the predicted sample point by using a parameter obtained from the post-processing parameter set indicated by the identifier.

When the obtainer 2010 obtains the identifier from the PPS 3120, the post-processing parameter set indicated by the identifier is used for the prediction samples derived in the current picture, and when the obtainer 2010 obtains the identifier from the GH 3130, the post-processing parameter set indicated by the identifier is used for the prediction samples derived in the current slice. Further, when the obtainer 2010 obtains the identifier from the BPS 3140, the post-processing parameter set indicated by the identifier is used for the prediction samples derived in the current block.

According to an embodiment, the obtainer 2010 may obtain, from the bitstream, an identifier indicating any one of the plurality of post-processing parameter sets 3150a, 3150b, and 3150c, and correction information. Here, the correction information may include information for changing the parameters included in the post-processing parameter set indicated by the identifier. For example, the correction information may include a difference between a value of the parameter included in the post-processing parameter set indicated by the identifier and a value of the parameter to be changed.

The reconstructor 2070 may correct the parameter of the post-processing parameter set indicated by the identifier according to the correction information, and may change the brightness value of the predicted sampling point by using the corrected parameter.

According to a further embodiment, the identifier obtained from the bitstream may indicate a plurality of post-processing parameter sets. In this case, the reconstructor 2070 may construct a new parameter set by combining one or more parameters included in each of the post-processing parameter sets indicated by the identifiers, and may perform luminance mapping on the prediction samples by using the newly constructed parameter set.

The reconstructor 2070 obtains a reconstructed sample corresponding to the current coding unit by using the prediction samples generated as a result of the predictive decoding or the prediction samples on which the luminance mapping is performed. When reconstructed samples are obtained, reconstructor 2070 may apply adaptive loop filtering to the reconstructed samples.

Adaptive loop filtering means one-dimensional filtering performed on the sample values of reconstructed samples by using filter coefficients signaled through a bit stream. Adaptive loop filtering may be performed separately for the luma and chroma values. The filter coefficients may include filter coefficients for a one-dimensional filter. Each filter coefficient of a one-dimensional filter may be represented as a difference between consecutive filter coefficients, and the difference may be signaled via a bitstream.

As described above, one or more of the post-processing parameter sets include parameters for luma mapping, and the other post-processing parameter sets include parameters (e.g., filter coefficients) for adaptive loop filtering. For example, post-processing parameter set a 3150a and post-processing parameter set B3150B may include parameters for adaptive loop filtering, and post-processing parameter set C3150C may include parameters for luma mapping.

The obtainer 2010 may obtain, from the PPS 3120, the GH 3130, or the BPS 3140, an identifier indicating a post-processing parameter set used for adaptive loop filtering for reconstructing samples among the plurality of post-processing parameter sets 3150a, 3150b, and 3150 c. The reconstructor 2070 may filter the reconstructed sample points by using parameters obtained from the post-processing parameter set indicated by the identifier. When the obtainer 2010 obtains an identifier from the PPS, the post-processing parameter set indicated by the identifier is used for the reconstructed samples derived in the current picture, and when the obtainer 2010 obtains the identifier from the GH, the post-processing parameter set indicated by the identifier is used for the reconstructed samples derived in the current slice. Further, when the obtainer 2010 obtains the identifier from the BPS, the post-processing parameter set indicated by the identifier is used for the reconstructed sample point derived in the current block.

According to an embodiment, the obtainer 2010 may obtain, from the bitstream, an identifier indicating any one of the plurality of post-processing parameter sets 3150a, 3150b, and 3150c, and correction information. Here, the correction information may include information for changing the filter coefficient included in the post-processing parameter set indicated by the identifier. For example, the correction information may include a difference value between the value of the filter coefficient included in the post-processing parameter set indicated by the identifier and the value of the filter coefficient to be changed.

The reconstructor 2070 may correct the filter coefficient of the post-processing parameter set indicated by the identifier according to the correction information, and may filter the reconstruction sampling point by using the corrected filter coefficient.

According to a further embodiment, the identifier obtained from the bitstream may indicate a plurality of post-processing parameter sets. In this case, the reconstructor 2070 may construct a new filter coefficient set by combining one or more filter coefficients included in each of the post-processing parameter sets indicated by the identifiers, and may filter the reconstruction sampling points by using the newly constructed filter coefficient set.

According to another embodiment, when the identifier obtained from the bitstream indicates a plurality of post-processing parameter sets, the reconstructor 2070 may filter the luminance values of the reconstructed sampling points by using filter coefficients included in any one of the post-processing parameter sets indicated by the identifier, and may filter the chrominance values of the reconstructed sampling points by using filter coefficients included in another post-processing parameter set indicated by the identifier.

According to another embodiment, the obtainer 2010 may obtain an identifier indicating any one post-processing parameter set and filter coefficient information from the bitstream. In this case, the reconstructor 2070 may combine one or more filter coefficients among the filter coefficients included in the post-processing parameter set indicated by the identifier with the filter coefficients signaled through the bitstream, and may filter the reconstructed samples by using the combined set of filter coefficients.

According to an embodiment, the reconstructor 2070 may additionally perform deblocking filtering on the reconstructed samples on which the adaptive loop filtering is performed.

As described above, the prediction decoder 2050 may decode the coding unit included in the current slice via inter prediction. According to an embodiment, when a coding unit is decoded, the boundary of a current slice may be regarded as a picture boundary.

According to an embodiment, in a decoder-side motion vector modification (DMVR) mode where the decoder directly derives the motion vector of the coding unit, the prediction decoder 2050 may limit the search range to the boundary of a region in the reference picture located at the same position as the current slice when deriving the motion vector of the current coding unit.

According to an embodiment, when a motion vector of a current coding unit signaled through a bitstream indicates a block outside a boundary of a region located at the same position as a current slice in a reference picture, prediction samples may be obtained by filling the region located at the same position as the current slice.

According to an embodiment, the prediction decoder 2050 may regard the boundary of a slice as the boundary of a picture in a bidirectional optical flow (BIO) processing mode, and may perform prediction decoding on a current coding unit. The BIO processing mode indicates a sample-by-sample motion vector improvement process performed for block-by-block motion compensation for bi-directional prediction.

When the obtainer 2010 performs entropy encoding on binary values included in the bitstream based on CABAC, the obtainer 2010 may selectively apply Wavefront Parallel Processing (WPP) by considering the number of parallel blocks included in the slice. The WPP indicates that processing of the current CTU is performed after processing of the CTU on the upper right side is completed to perform parallel encoding/decoding. In detail, the WPP configures a probabilistic model of the first CTU of each row by using probability information obtained by processing the second CTU of the upper row.

When a stripe includes only one parallel block, the obtainer 2010 may configure a probabilistic model for CTUs included in the parallel blocks based on the WPP, and when the stripe includes a plurality of parallel blocks, the obtainer 2010 may not apply the WPP to the CTUs included in the parallel blocks.

Fig. 32 is a diagram for describing an image decoding method according to an embodiment.

In operation S3210, the image decoding apparatus 2000 obtains, from the SPS of the bitstream, information indicating a plurality of first reference picture lists for a picture sequence including a current picture. The plurality of first reference picture lists may include at least one of a short-term type reference picture and a long-term type reference picture.

In operation S3220, the image decoding apparatus 2000 configures a block and a block group including at least one block in a current image. The block may be a parallel block, and the set of blocks may be a stripe.

According to an embodiment, the image decoding apparatus 2000 may divide a current picture into a plurality of CTUs according to information obtained from a bitstream, and may configure a parallel block including at least one CTU and a slice including at least one parallel block in the current picture.

According to an embodiment, the image decoding apparatus 2000 may divide a current image into a plurality of parallel blocks according to information obtained from a bitstream, and may divide each parallel block into one or more CTUs. Further, the block determiner 2030 may configure a slice including at least one parallelized block in the current image.

According to an embodiment, the image decoding apparatus 2000 may divide a current image into one or more slices according to information obtained from a bitstream, and may divide each slice into one or more parallel blocks. Further, block determiner 2030 may divide each parallel block into one or more CTUs.

As described above, the image decoding apparatus 2000 can configure a slice in a current picture according to address information obtained from a bitstream.

In operation S3230, the image decoding apparatus 2000 may obtain an indicator for a current block group including a current block in a current picture from a GH of a bitstream, and may obtain a second reference picture list based on a first reference picture list obtained by the indicator. The image decoding apparatus 2000 may also obtain modification and improvement information for obtaining the second reference picture list and an indicator from the bitstream. The modification and refinement information may include at least one of a POC-related value of a reference picture to be removed from the first reference picture list indicated by the indicator, a POC-related value of a reference picture to be added to the second reference picture list, a difference value between the POC-related value of the reference picture to be removed from the first reference picture list and the POC-related value of the reference picture to be added to the second reference picture list, and information for changing an order of pictures.

In operation S3240, the image decoding apparatus 2000 predictively decodes a lower layer block of the current block based on the reference image included in the second reference image list.

When a predicted sample corresponding to a lower layer block is obtained as a result of predictive decoding, the image decoding apparatus 2000 may specify a post-processing parameter set for luminance mapping the predicted sample, according to an identifier indicating at least one post-processing parameter set among a plurality of post-processing parameter sets. Further, the image decoding apparatus 2000 may change the luminance value of the predicted sampling point by using the parameters included in the post-processing parameter set indicated by the identifier.

According to the embodiment, the image decoding apparatus 2000 may obtain reconstructed samples based on predicted samples obtained as a result of predictive decoding or predicted samples on which luminance mapping is performed, and may perform adaptive loop filtering on the reconstructed samples. To this end, the image decoding apparatus 2000 may specify a post-processing parameter set for adaptive loop filtering according to an identifier indicating at least one post-processing parameter set among a plurality of post-processing parameter sets. Further, the image decoding apparatus 2000 may filter the reconstructed sample points by using the parameters included in the post-processing parameter set indicated by the identifier.

Fig. 33 is a diagram illustrating components of the image encoding apparatus 3300 according to the embodiment.

Referring to fig. 33, the image encoding apparatus 3300 includes a block determiner 3310, a prediction encoder 3330, a reconstructor 3350, and a generator 3370. The generator 3370 shown in fig. 33 may correspond to the bitstream generator 210 shown in fig. 2, and the block determiner 3310, the prediction encoder 3330, and the reconstructor 3350 may correspond to the encoder 220 shown in fig. 2.

The block determiner 3310, the predictive encoder 3330, the reconstructor 3350, and the generator 3370 according to the embodiment may be implemented as at least one processor. The image encoding apparatus 3300 may include one or more data memories (not shown) storing input data and output data of the block determiner 3310, the prediction encoder 3330, the reconstructor 3350, and the generator 3370. In addition, the image encoding apparatus 3300 may include a memory controller (not shown) that controls data input and data output of the data memory.

The block determiner 3310 may divide the current image into blocks, and may configure a block group including at least one block in the current image. Here, the block may correspond to a parallel block, and the block group may correspond to a stripe. A stripe may be referred to as a parallel block set.

As described with reference to fig. 3 to 16, the block determiner 3310 may determine a transform unit, a coding unit, a CTU, parallel blocks, slices, etc., by dividing the current picture.

According to an embodiment, the block determiner 3310 may divide the current picture into a plurality of CTUs, and may configure a parallel block including at least one CTU and a slice including at least one parallel block in the current picture.

According to an embodiment, the block determiner 3310 may divide the current picture into a plurality of parallel blocks, and may divide each parallel block into one or more CTUs. Further, the block determiner 3310 may configure a stripe including at least one parallel block in the current image.

According to an embodiment, the block determiner 3310 may divide the current image into one or more stripes, and may divide each stripe into one or more parallel blocks. Further, the block determiner 3310 may divide each parallel block into one or more CTUs.

The prediction encoder 3330 performs inter prediction or intra prediction on a lower layer block of a block divided from a current picture to obtain prediction samples corresponding to the lower layer block. Here, the lower layer block may be at least one of a CTU, a coding unit, and a transform unit.

The prediction encoder 3330 may prediction-encode the coding unit by inter prediction or intra prediction. According to the inter prediction, a prediction sample of the current coding unit may be obtained based on a reference block indicated by a motion vector in a reference picture, and residual data corresponding to a difference between the prediction sample and the current coding unit may be transmitted to the image decoding apparatus 2000 through a bitstream. The residual data may not be included in the bitstream according to the prediction mode.

Hereinafter, a method of constructing a reference picture list for inter prediction is described.

According to an embodiment, the prediction encoder 3330 may construct a plurality of first reference picture lists for a picture sequence including a current picture. The predictive encoder 3330 selects at least one first reference picture list of a plurality of first reference picture lists for the sequence of pictures. The prediction encoder 3330 may select a first reference picture list for the current slice from the plurality of first reference picture lists. In addition, the predictive encoder 3330 obtains a second reference picture list modified and improved from the selected first reference picture list.

The second reference picture list may be obtained by replacing at least one of the reference pictures included in the first reference picture list with another reference picture, by changing an order of one or more of the reference pictures, or by adding a new reference picture to the first reference picture list.

When the second reference picture list is obtained, the prediction encoder 3330 may encode the coding unit included in the slice through inter prediction by using at least one of the reference pictures included in the second reference picture list.

The prediction encoder 3330 may prediction-encode a coding unit included in a next slice by using a first reference picture list other than a first reference picture list selected for a current slice among a plurality of first reference picture lists for a picture sequence and a second reference picture list. In other words, the second reference picture list obtained for the current slice may also be used for the next slice.

In the following, a method of obtaining a second reference picture list modified and improved from a first reference picture list is described.

According to an embodiment, the prediction encoder 3330 may obtain the second reference picture list by changing at least one of the reference pictures included in the first reference picture list to another reference picture.

According to an embodiment, the prediction encoder 3330 may replace only a specific type of reference picture (e.g., a long-term type reference picture) among reference pictures included in a first reference picture with another long-term type reference picture. That is, a short-term type reference picture among reference pictures included in the first reference picture list may be maintained as it is in the second reference picture list, and only a long-term type reference picture may be replaced with another long-term type reference picture.

According to an embodiment, at least one of the reference pictures included in the first reference picture list may be replaced with another reference picture regardless of the type of the reference picture included in the first reference picture list. According to an embodiment, a new reference picture may be added to the second reference picture list according to the order of reference pictures to be removed from the first reference picture list. That is, when the long-term type reference picture assigned with the index 1 is removed from the first reference picture list, the index 1 may also be assigned to the new reference picture.

According to an embodiment, the prediction encoder 3330 may obtain the second reference picture list by excluding a specific type of reference picture from reference pictures in the first reference picture list selected for the current slice among the plurality of first reference picture lists for the picture sequence.

According to an embodiment, the prediction encoder 3330 may obtain the second reference picture list by changing an order of one or more of the reference pictures in the first reference picture list selected for the current slice among the plurality of first reference picture lists for the picture sequence.

According to an embodiment, the prediction encoder 3330 may obtain the second reference picture list by using the first reference picture list including only the short-term type reference picture and the first reference picture list including only the long-term type reference picture. For example, the prediction encoder 3330 may include a short-term type reference picture included in the first reference picture list and a long-term type reference picture included in the first reference picture list in the second reference picture list.

Further, according to an embodiment, when the first reference picture list includes only short-term type reference pictures, the prediction encoder 3330 may obtain a second reference picture list including a new long-term type reference picture and short-term type reference pictures included in the first reference picture list. In contrast, when the first reference picture list includes only long-term type reference pictures, the prediction encoder 3330 may obtain a second reference picture list including a new short-term type reference picture and long-term type reference pictures included in the first reference picture list.

When the construction of the second reference picture list is completed, the prediction encoder 3330 may inter-predict the encoding unit based on the reference pictures included in the second reference picture list. As a result of inter prediction, a prediction sample corresponding to a coding unit may be obtained.

The reconstructor 3350 obtains reconstructed samples of the coding unit by using the predicted samples. The reconstructed picture including the reconstructed samples may be stored in the DPB as a reference picture for subsequent pictures.

According to an embodiment, the reconstructor 3350 may perform luma mapping on the predicted samples of the coding unit before obtaining the reconstructed samples. The reconstructor 3350 may obtain parameters for the luminance mapping from a plurality of post-processing parameter sets.

Each of the plurality of post-processing parameter sets may include parameters for luminance mapping or adaptive loop filtering, which will be described below. In other words, some of the post-processing parameter sets include parameters for luma mapping and other post-processing parameter sets include parameters for adaptive loop filtering. For example, at least one parameter set may comprise parameters for luminance mapping and the other parameter sets may comprise parameters for adaptive loop filtering. The reconstructor 3350 may generate a plurality of post-processing parameter sets including parameters for luminance mapping or parameters for adaptive loop filtering. As described above, the plurality of post-processing parameter sets may be signaled to the image decoding apparatus 2000 through a bitstream.

The reconstructor 3350 may obtain a parameter from a post-processing parameter set selected from the plurality of post-processing parameter sets, and may change a brightness value of the predicted sampling point by using the obtained parameter.

According to an embodiment, the reconstructor 3350 may correct a parameter of a post-processing parameter set selected from the plurality of post-processing parameter sets, and may change the brightness value of the predicted sampling point by the corrected parameter.

Further, according to an embodiment, the reconstructor 3350 may construct a new parameter set by combining one or more parameters among parameters included in at least two post-processing parameter sets among the plurality of post-processing parameter sets, and may change the brightness value of the predicted sampling point by using the parameters of the newly constructed parameter set.

The reconstructor 3350 obtains a reconstructed sample corresponding to the current coding unit by using a predicted sample generated as a result of predictive decoding or a predicted sample on which luminance mapping is performed. When reconstructed samples are obtained, reconstructor 3350 may apply adaptive loop filtering to the reconstructed samples.

As described above, some of the post-processing parameter sets may include parameters for luma mapping, and other post-processing parameter sets may include parameters for adaptive loop filtering (e.g., filter coefficients). The reconstructor 3350 may filter the reconstructed samples by using parameters obtained from at least one of the plurality of post-processing parameter sets.

According to an embodiment, the reconstructor 3350 may correct a parameter obtained from any one of the plurality of post-processing parameter sets, and may filter the reconstructed sample point by using the corrected parameter.

Further, according to an embodiment, the reconstructor 3350 may construct a new parameter set by combining one or more of parameters included in at least two post-processing parameter sets of the plurality of post-processing parameter sets, and may filter the reconstructed sampling points by using the parameters of the newly constructed parameter set.

Further, according to an embodiment, the reconstructor 3350 may filter the luminance values of the reconstructed sampling points by using any one of the plurality of post-processing parameter sets, and may filter the chrominance values of the reconstructed sampling points by using another post-processing parameter set.

When the prediction encoder 3330 inter-predicts the coding units included in the current slice, the prediction encoder 3330 may treat the boundary of the current slice as a picture boundary.

When the predictive encoder 3330 derives the motion vector of the current coding unit, the predictive encoder 3330 may limit the search range to the boundary of a region in the reference picture that is at the same position as the current slice.

According to an embodiment, the prediction encoder 3330 may regard the boundary of a slice as the boundary of a picture in the BIO processing mode and may prediction-encode the current coding unit.

The generator 3370 generates a bitstream including information for encoding an image. As described above, the bitstream may include SPS, PPS, GH, BPS, and at least one post-processing parameter set.

The information included in the bitstream generated by the generator 3370 is described above with respect to the image decoding apparatus 2000, and thus a detailed description thereof is omitted.

The generator 3370 may entropy-encode a binary value corresponding to the syntax element based on CABAC. Here, the generator 3370 may selectively apply WPP by considering the number of parallel blocks included in a slice. When the stripe includes only one parallel block, the generator 3370 may configure a probabilistic model for CTUs included in the parallel blocks based on the WPP, and when the stripe includes a plurality of parallel blocks, the generator 3370 may not apply the WPP to the CTUs included in the parallel blocks.

Fig. 34 is a diagram for describing an image encoding method according to an embodiment.

In operation S3410, the image encoding apparatus 3300 constructs a plurality of first reference picture lists for a picture sequence including a current picture. The plurality of first reference picture lists may include at least one of a short-term type reference picture and a long-term type reference picture.

In operation S3420, the image encoding apparatus 3300 configures a block and a block group including at least one block in the current image. The block may be a parallel block, and the set of blocks may be a stripe.

According to an embodiment, the image encoding apparatus 3300 may divide a current image into a plurality of CTUs, and may configure a concurrent block including at least one CTU and a slice including at least one concurrent block in the current image.

According to an embodiment, the image encoding apparatus 3300 may divide a current image into a plurality of parallel blocks, and may divide each parallel block into one or more CTUs. Further, the image encoding apparatus 3300 may configure a slice including at least one parallelized block in the current image.

According to an embodiment, the image encoding apparatus 3300 may divide a current image into one or more slices, and may divide each slice into one or more parallel blocks. Further, the image encoding apparatus 3300 may divide each parallel block into one or more CTUs.

In operation S3230, the image encoding apparatus 3300 may select a first reference picture list for a current block group including a current block in a current picture from among a plurality of first reference picture lists, and may obtain a second reference picture list based on the selected first reference picture list.

In operation S3240, the image encoding apparatus 3300 prediction-encodes a lower layer block included in the current block based on the reference image included in the second reference image list.

When a predicted sample corresponding to a lower layer block is obtained as a result of predictive encoding, the image encoding apparatus 3300 may change the luminance value of the predicted sample by using a parameter included in at least one post-processing parameter set of the plurality of post-processing parameter sets.

According to the embodiment, the image encoding apparatus 3300 may obtain reconstructed samples based on predicted samples obtained as a result of predictive encoding or predicted samples on which luminance mapping is performed, and may perform adaptive loop filtering on the reconstructed samples. To this end, the image encoding apparatus 3300 may filter the reconstructed sample points by using parameters included in at least one post-processing parameter set of the plurality of post-processing parameter sets.

In addition, the embodiments of the present disclosure described above may be written as computer-executable programs that may be stored in a medium.

The medium may continuously store computer-executable programs, or may temporarily store computer-executable programs or instructions for execution or download. Further, the medium may be any of various recording media or storage media combined with a single piece or pieces of hardware, and the medium is not limited to a medium directly connected to a computer system but may be distributed over a network. Examples of the medium include magnetic media (such as hard disks, floppy disks, and magnetic tapes), optical recording media (such as CD-ROMs and DVDs), magneto-optical media (such as floppy disks), and ROMs, RAMs, and flash memories configured to store program instructions. Other examples of the medium include a recording medium and a storage medium managed by an application store that distributes applications, or by a website, a server, or the like that provides or distributes other various types of software.

Although one or more embodiments of the present disclosure have been described with reference to the accompanying drawings, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the following claims.

77页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:视频译码中的子图像位置约束

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类