Method and apparatus for encoding/decoding image by using boundary processing and recording medium for storing bitstream

文档序号:621641 发布日期:2021-05-07 浏览:11次 中文

阅读说明:本技术 通过使用边界处理对图像进行编码/解码的方法和设备以及用于存储比特流的记录介质 (Method and apparatus for encoding/decoding image by using boundary processing and recording medium for storing bitstream ) 是由 林成昶 姜晶媛 李河贤 李镇浩 金晖容 于 2019-09-19 设计创作,主要内容包括:提供了一种对图像进行编码/解码的方法和设备。用于对图像进行解码的方法包括以下步骤:从比特流解码出关于当前画面中包括的当前块的块分区的信息;基于所述信息确定当前块的分区方法;以及通过使用确定的分区方法来对当前块进行分区,其中,所述分区方法是基于当前块是否包括预定边界被确定的。(Provided are a method and apparatus for encoding/decoding an image. The method for decoding an image includes the steps of: decoding information regarding a block partition of a current block included in a current picture from a bitstream; determining a partition method of the current block based on the information; and partitioning the current block by using the determined partitioning method, wherein the partitioning method is determined based on whether the current block includes a predetermined boundary.)

1. A method of decoding an image, the method comprising:

decoding information regarding a block partition of a current block included in a current picture from a bitstream;

determining a partition method of the current block based on the information; and

by partitioning the current block using the determined partitioning method,

wherein the partitioning method is determined based on whether the current block includes a predetermined boundary.

2. The method of claim 1, wherein the information on block partitions includes at least one of the following information: information on a size of the current block, information on a depth of the current block, and information on whether to perform partitioning.

3. The method of claim 1, wherein the partitioning method comprises at least one of the following partitions: quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning.

4. The method of claim 1, wherein the predetermined boundary comprises at least one of: a right side boundary, a lower boundary, a left side boundary, and an upper boundary of at least one of a picture, a sub-picture, a slice, a parallel block, and a partition to which the current block belongs.

5. The method of claim 1, wherein the partitioning method is determined as a quad-tree partition when the current block includes a right side boundary and a lower boundary of the current picture and a width of the current block is greater than a size of a minimum quad-tree block.

6. The method of claim 1, wherein the partition method is determined as a partition other than a vertical binary tree partition when the current block includes a right side boundary of the current picture and a height of the current block is greater than a size of a maximum transform block.

7. The method of claim 1, wherein the partitioning method is determined as a partition other than a horizontal binary tree partition when the current block includes a lower boundary of the current picture and a width of the current block is greater than a size of a maximum transform block.

8. The method of claim 1, wherein the partition method is determined as a partition other than a vertical binary tree partition when a width of the current block is equal to or less than a size of a maximum transform block and a height of the current block is greater than the size of the maximum transform block.

9. The method of claim 1, wherein the partitioning method is determined as a partition other than a horizontal binary tree partition when a height of the current block is equal to or less than a size of a maximum transform block and a width of the current block is greater than the size of the maximum transform block.

10. The method of claim 6, wherein the size of the largest transform block is a value signaled from the encoder to the decoder.

11. A method of encoding an image, the method comprising:

determining a partition method of a current block included in a current picture;

partitioning the current block by using the determined partitioning method; and

information on block partitions of the partition method is encoded,

wherein the partitioning method is determined based on whether the current block includes a predetermined boundary.

12. The method of claim 11, wherein the information on the block partition comprises at least one of the following information: information on a size of the current block, information on a depth of the current block, and information on whether to perform partitioning.

13. The method of claim 11, wherein the partitioning method comprises at least one of the following partitions: quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning.

14. The method of claim 11, wherein the predetermined boundary comprises at least one of: a right side boundary, a lower boundary, a left side boundary, and an upper boundary of at least one of a picture, a sub-picture, a slice, a parallel block, and a partition to which the current block belongs.

15. The method of claim 1, wherein the partitioning method is determined as a quad-tree partition when the current block includes a right side boundary and a lower boundary of the current picture and a width of the current block is greater than a size of a minimum quad-tree block.

16. The method of claim 11, wherein the partition method is determined as a partition other than a vertical binary tree partition when the current block includes a right side boundary of the current picture and a height of the current block is greater than a size of a maximum transform block.

17. The method of claim 11, wherein the partitioning method is determined as a partition other than a horizontal binary tree partition when the current block includes a lower boundary of the current picture and a width of the current block is greater than a size of a maximum transform block.

18. The method of claim 11, wherein the partition method is determined as a partition other than a vertical binary tree partition when a width of the current block is equal to or less than a size of a maximum transform block and a height of the current block is greater than the size of the maximum transform block.

19. The method of claim 11, wherein the partitioning method is determined as a partition other than a horizontal binary tree partition when a height of the current block is equal to or less than a size of a maximum transform block and a width of the current block is greater than the size of the maximum transform block.

20. A computer-readable non-volatile recording medium storing image data for an image decoding method, wherein the image data includes information regarding a block partition of a current block included in a current picture,

and in the image decoding method, information on a block partition is used to determine a partition method of the current block, the determined partition method is used to partition the current block, and the partition method is determined based on whether the current block includes a predetermined boundary.

Technical Field

The present invention relates to a method and apparatus for encoding/decoding an image, and a recording medium storing a bitstream. More particularly, the present invention relates to a method and apparatus for encoding/decoding an image based on a block structure, and a recording medium storing a bitstream.

Background

Recently, demands for high-resolution and high-quality video, such as High Definition (HD) and Ultra High Definition (UHD) video, have increased in various application fields. Since video data has higher resolution and higher quality, the amount of data increases more relative to existing video data. Therefore, when media (such as existing wired broadband lines and wireless broadband lines) are used to transmit video data or to store video data in existing storage media, transmission costs and storage costs increase. In order to solve these problems occurring with the improvement of the resolution and quality of image data, efficient image encoding/decoding techniques are required for higher resolution and higher quality images.

Image compression techniques include various techniques including: an inter prediction technique of predicting pixel values included in a current picture from a previous picture or a subsequent picture of the current picture; an intra prediction technique of predicting a pixel value included in a current picture by using pixel information in the current picture; transform and quantization techniques for compressing the energy of the residual signal; an entropy coding technique that assigns short codes to values with high occurrence frequencies and long codes to values with low occurrence frequencies; and so on. Image data can be efficiently compressed by using such image compression techniques, and can be transmitted or stored.

In conventional image encoding/decoding, only a block structure in the form of a quadtree is used, and thus there is a limitation in improving encoding efficiency.

Disclosure of Invention

Technical problem

An object of the present invention is to provide an image encoding/decoding method and apparatus for improving image encoding/decoding efficiency.

In addition, another object of the present invention is to provide a method and apparatus for efficiently performing block partitioning using block shapes having various aspect ratios or on the boundaries of pictures/sub-pictures/slices/parallel blocks/partitions, etc., in order to improve image encoding/decoding efficiency.

In addition, another object of the present invention is to provide a recording medium storing a bitstream generated by the image encoding/decoding method and apparatus of the present invention.

Technical scheme

According to the present invention, there is provided a method of decoding an image, the method comprising: decoding information regarding a block partition of a current block included in a current picture from a bitstream; determining a partition method of the current block based on the information; and partitioning the current block by using the determined partitioning method, wherein the partitioning method is determined based on whether the current block includes a predetermined boundary.

According to one embodiment, the information on the block partition includes at least one of the following information: information on a size of the current block, information on a depth of the current block, and information on whether to perform partitioning.

According to one embodiment, the partitioning method includes at least one of the following partitions: quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning.

According to one embodiment, the predetermined boundaries include at least one of the following boundaries: a right side boundary, a lower boundary, a left side boundary, and an upper boundary of at least one of a picture, a sub-picture, a slice, a parallel block, and a partition to which the current block belongs.

According to one embodiment, when the current block includes a right side boundary and a lower boundary of the current picture and the width of the current block is greater than the size of the minimum quad-tree block, the partition method is determined as a quad-tree partition.

According to one embodiment, the partitioning method is determined as a partition other than a vertical binary tree partition when the current block includes a right side boundary of the current picture and a height of the current block is greater than a size of the maximum transform block.

According to one embodiment, the partitioning method is determined as a partition other than a horizontal binary tree partition when the current block includes a lower boundary of the current picture and a width of the current block is greater than a size of the maximum transform block.

According to one embodiment, the partitioning method is determined as a partition other than a vertical binary tree partition when the width of the current block is equal to or smaller than the size of the maximum transform block and the height of the current block is larger than the size of the maximum transform block.

According to one embodiment, the partitioning method is determined as a partition other than a horizontal binary tree partition when the height of the current block is equal to or smaller than the size of the maximum transform block and the width of the current block is larger than the size of the maximum transform block.

According to one embodiment, the size of the largest transform block may be a value signaled from the encoder to the decoder.

Further, according to the present invention, there is provided a method of encoding an image, the method including: determining a partition method of a current block included in a current picture; partitioning the current block by using the determined partitioning method; and encoding information regarding block partitions of a partition method, wherein the partition method is determined based on whether the current block includes a predetermined boundary.

According to one embodiment, the information on the block partition includes at least one of the following information: information on a size of the current block, information on a depth of the current block, and information on whether to perform partitioning.

According to one embodiment, the partitioning method includes at least one of the following partitions: quadtree partitioning, horizontal binary tree partitioning, vertical binary tree partitioning, horizontal ternary tree partitioning, and vertical ternary tree partitioning.

According to one embodiment, the predetermined boundaries include at least one of the following boundaries: a right side boundary, a lower boundary, a left side boundary, and an upper boundary of at least one of a picture, a sub-picture, a slice, a parallel block, and a partition to which the current block belongs.

According to one embodiment, when the current block includes a right side boundary and a lower boundary of the current picture and the width of the current block is greater than the size of the minimum quad-tree block, the partition method is determined as a quad-tree partition.

According to one embodiment, the partitioning method is determined as a partition other than a vertical binary tree partition when the current block includes a right side boundary of the current picture and a height of the current block is greater than a size of the maximum transform block.

According to one embodiment, the partitioning method is determined as a partition other than a horizontal binary tree partition when the current block includes a lower boundary of the current picture and a width of the current block is greater than a size of the maximum transform block.

According to one embodiment, the partitioning method is determined as a partition other than a vertical binary tree partition when the width of the current block is equal to or smaller than the size of the maximum transform block and the height of the current block is larger than the size of the maximum transform block.

According to one embodiment, the partitioning method is determined as a partition other than a horizontal binary tree partition when the height of the current block is equal to or smaller than the size of the maximum transform block and the width of the current block is larger than the size of the maximum transform block.

According to one embodiment, the size of the largest transform block may be a value signaled from the encoder to the decoder.

Further, according to the present invention, there is provided a computer-readable non-volatile recording medium storing image data for an image decoding method, wherein the image data includes information on a block partition of a current block included in a current picture, and in the image decoding method, the information on the block partition is used to determine a partition method of the current block, the determined partition method is used to partition the current block, and the partition method is determined based on whether the current block includes a predetermined boundary.

Advantageous effects

In order to improve image encoding/decoding efficiency, a method and apparatus for performing at least one of using block shapes having various aspect ratios and efficiently performing block partitioning on boundaries of pictures/sub-pictures/slices/parallel blocks/partitions, etc., and a recording medium storing a bitstream are provided.

According to the present invention, there are provided an image encoding/decoding method and apparatus for improving image encoding/decoding efficiency.

In addition, according to the present invention, there is provided a method and apparatus for efficiently performing block partitioning using block shapes having various aspect ratios or on the boundaries of pictures/sub-pictures/slices/parallel blocks/partitions, etc., in order to improve image encoding/decoding efficiency.

In addition, according to the present invention, there is provided a recording medium storing a bitstream generated by the image encoding/decoding method and apparatus of the present invention.

Drawings

Fig. 1 is a block diagram showing a configuration of an embodiment of an encoding apparatus to which the present invention is applied.

Fig. 2 is a block diagram of an embodiment of a decoding apparatus to which the present invention is applied.

Fig. 3 is a diagram schematically showing a partition structure when an image is encoded and decoded.

Fig. 4 is a diagram illustrating an example of intra prediction.

Fig. 5 is a diagram illustrating an example of inter prediction.

Fig. 6 is a diagram illustrating transformation and quantization.

Fig. 7 is a diagram illustrating reference samples that can be used for intra prediction.

Fig. 8 is a diagram illustrating a boundary of a picture/sprite/slice/parallel block/partition, etc. according to an embodiment of the present invention.

Fig. 9 is a diagram illustrating a partitioning method according to an embodiment of a block of the present invention.

FIG. 10 is a view illustrating that at least one of the width and the height of a region to be encoded/decoded of a current block is not an Nth power of 2 (2) according to an embodiment of the present inventionN) A diagram of a situation of (1).

Fig. 11 is a diagram illustrating a flowchart of a method of decoding an image according to an embodiment of the present invention.

Fig. 12 is a diagram of a flowchart of an image encoding method according to an embodiment of the present invention.

Detailed Description

While the invention is susceptible to various modifications and alternative embodiments, examples of which are now provided and described in detail with reference to the accompanying drawings. However, the present invention is not limited thereto, although the exemplary embodiments may be construed to include all modifications, equivalents, or alternatives within the technical spirit and scope of the present invention. In various aspects, like reference numerals refer to the same or similar functionality. In the drawings, the shapes and sizes of elements may be exaggerated for clarity. In the following detailed description of the present invention, reference is made to the accompanying drawings that show, by way of illustration, specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the disclosure. It is to be understood that the various embodiments of the disclosure, although different, are not necessarily mutually exclusive. For example, a particular feature, structure, or characteristic described herein in connection with one embodiment may be implemented within other embodiments without departing from the spirit and scope of the disclosure. In addition, it is to be understood that the location or arrangement of individual elements within each disclosed embodiment may be modified without departing from the spirit and scope of the disclosure. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present disclosure is defined only by the appended claims, appropriately interpreted, along with the full range of equivalents to which the claims are entitled.

The terms "first," "second," and the like as used in the specification may be used to describe various components, but the components should not be construed as limited to these terms. These terms are only used to distinguish one component from another. For example, a "first" component could be termed a "second" component, and a "second" component could similarly be termed a "first" component, without departing from the scope of the present invention. The term "and/or" includes a combination of items or any of items.

It will be understood that, in the present specification, when an element is referred to simply as being "connected to" or "coupled to" another element, rather than "directly connected to" or "directly coupled to" another element, the element may be "directly connected to" or "directly coupled to" the other element, or connected to or coupled to the other element with the other element interposed therebetween. In contrast, when an element is referred to as being "directly coupled" or "directly connected" to another element, there are no intervening elements present.

In addition, constituent parts shown in the embodiments of the present invention are independently shown to represent characteristic functions different from each other. Therefore, this does not mean that each constituent element is constituted by a separate hardware or software constituent unit. In other words, for convenience, each constituent includes each of the enumerated constituents. Thus, at least two constituent parts of each constituent part may be combined to form one constituent part, or one constituent part may be partitioned into a plurality of constituent parts to perform each function. An embodiment in which each constituent is combined and an embodiment in which one constituent is partitioned are also included in the scope of the present invention, if not departing from the spirit of the present invention.

The terminology used in the description presented herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. Unless the context clearly dictates otherwise, expressions used in the singular include expressions in the plural. In this written description, it will be understood that terms such as "comprising," "having," and the like, are intended to indicate the presence of the features, numbers, steps, actions, elements, components, or combinations thereof disclosed in the written description, and are not intended to preclude the possibility that one or more other features, numbers, steps, actions, elements, components, or combinations thereof, may be present or may be added. In other words, when a specific element is referred to as being "included", elements other than the corresponding element are not excluded, and additional elements may be included in the embodiment of the present invention or the scope of the present invention.

In addition, some of the constituents may not be indispensable constituents for performing the basic functions of the present invention, but are selective constituents for merely improving the performance thereof. The present invention can be implemented by including only indispensable constituent elements for implementing the essence of the present invention and not including constituent elements for improving performance. A structure including only indispensable constituents and not including only selective constituents for improving the performance is also included in the scope of the present invention.

Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing exemplary embodiments of the present invention, well-known functions or constructions will not be described in detail since they may unnecessarily obscure the understanding of the present invention. The same constituent elements in the drawings are denoted by the same reference numerals, and a repetitive description of the same elements will be omitted.

Hereinafter, an image may refer to a picture constituting a video, or may refer to a video itself. For example, "encoding or decoding an image or both encoding and decoding" may refer to "encoding or decoding a moving picture or both encoding and decoding" and may refer to "encoding or decoding one of images of a moving picture or both encoding and decoding".

Hereinafter, the terms "moving picture" and "video" may be used as the same meaning and may be replaced with each other.

Hereinafter, the target image may be an encoding target image as an encoding target and/or a decoding target image as a decoding target. In addition, the target image may be an input image input to the encoding apparatus, and an input image input to the decoding apparatus. Here, the target image may have the same meaning as the current picture.

Hereinafter, the terms "image", "picture", "frame", and "screen" may be used in the same meaning and may be replaced with each other.

Hereinafter, the target block may be an encoding target block as an encoding target and/or a decoding target block as a decoding target. In addition, the target block may be a current block that is a target of current encoding and/or decoding. For example, the terms "target block" and "current block" may be used with the same meaning and may be substituted for each other.

Hereinafter, the terms "block" and "unit" may be used with the same meaning and may be replaced with each other. Or "block" may represent a particular unit.

Hereinafter, the terms "region" and "fragment" may be substituted for each other.

Hereinafter, the specific signal may be a signal representing a specific block. For example, the original signal may be a signal representing the target block. The prediction signal may be a signal representing a prediction block. The residual signal may be a signal representing a residual block.

In embodiments, each of the particular information, data, flags, indices, elements, attributes, and the like may have a value. A value of information, data, flags, indices, elements, and attributes equal to "0" may represent a logical false or first predefined value. In other words, the values "0", false, logical false and the first predefined value may be substituted for each other. A value of information, data, flags, indices, elements, and attributes equal to "1" may represent a logical true or a second predefined value. In other words, the values "1", true, logically true, and the second predefined value may be substituted for each other.

When the variable i or j is used to represent a column, a row, or an index, the value of i may be an integer equal to or greater than 0, or an integer equal to or greater than 1. That is, the column, row, index, etc. may start counting from 0, or may start counting from 1.

Description of the terms

An encoder: indicating the device performing the encoding. I.e. representing an encoding device.

A decoder: indicating the device performing the decoding. I.e. representing a decoding device.

Block (2): is an array of M × N samples. Here, M and N may represent positive integers, and a block may represent a two-dimensional form of a sample point array. A block may refer to a unit. The current block may represent an encoding target block that becomes a target at the time of encoding or a decoding target block that becomes a target at the time of decoding. In addition, the current block may be at least one of an encoding block, a prediction block, a residual block, and a transform block.

Sampling points are as follows: are the basic units that make up the block. According to the bit depth (Bd), the sampling points can be represented from 0 to 2Bd-a value of 1. In the present invention, a sampling point can be used as a meaning of a pixel. That is, samples, pels, pixels may have the same meaning as each other.

A unit: may refer to encoding and decoding units. When encoding and decoding an image, a unit may be a region generated by partitioning a single image. In addition, when a single image is partitioned into sub-partition units during encoding or decoding, a unit may represent a sub-partition unit. That is, the image may be partitioned into a plurality of cells. When encoding and decoding an image, predetermined processing for each unit may be performed. A single cell may be partitioned into sub-cells that are smaller in size than the cell. Depending on the function, a unit may represent a block, a macroblock, a coding tree unit, a coding tree block, a coding unit, a coding block, a prediction unit, a prediction block, a residual unit, a residual block, a transform unit, a transform block, and the like. In addition, to distinguish a unit from a block, the unit may include a luma component block, a chroma component block associated with the luma component block, and syntax elements for each of the chroma component blocks. The cells may have various sizes and shapes, in particular, the shape of the cells may be a two-dimensional geometric figure, such as a square, rectangle, trapezoid, triangle, pentagon, and the like. In addition, the unit information may include a unit type indicating a coding unit, a prediction unit, a transform unit, etc., and at least one of a unit size, a unit depth, an order of encoding and decoding of the unit, etc.

A coding tree unit: a single coding tree block configured with a luminance component Y and two coding tree blocks associated with chrominance components Cb and Cr. In addition, the coding tree unit may represent syntax elements including blocks and each block. Each coding tree unit may be partitioned by using at least one of a quadtree partitioning method, a binary tree partitioning method, and a ternary tree partitioning method to configure a unit of a lower hierarchy such as a coding unit, a prediction unit, a transform unit, and the like. The coding tree unit may be used as a term for specifying a sample block that becomes a processing unit when encoding/decoding an image that is an input image. Here, the quadtree may mean a quadtree.

When the size of the coding block is within a predetermined range, the partitioning may be performed using only the quadtree partitioning. Here, the predetermined range may be defined as at least one of a maximum size and a minimum size of the coding block that can be partitioned using only the quadtree partition. Information indicating the maximum/minimum size of coding blocks allowing quad-tree partitioning may be signaled through a bitstream and may be signaled in at least one unit of a sequence, picture parameter, parallel block group, or slice (slice). Alternatively, the maximum/minimum size of the coding block may be a fixed size predetermined in the encoder/decoder. For example, when the size of the coding block corresponds to 256 × 256 to 64 × 64, it is possible to partition using only quad-tree partitioning. Alternatively, when the size of the coding block is larger than the size of the maximum conversion block, it is possible to perform partitioning using only the quadtree partitioning. Here, the block to be partitioned may be at least one of an encoding block and a transform block. In this case, information (e.g., split _ flag) indicating the partition of the coding block may be a flag indicating whether to perform the quadtree partitioning. When the size of the coding block falls within a predetermined range, it is possible to perform partitioning using only binary tree or ternary tree partitioning. In this case, the above description of quad-tree partitioning can be applied to binary tree partitioning or ternary tree partitioning in the same manner.

And (3) encoding a tree block: may be used as a term for specifying any one of a Y coding tree block, a Cb coding tree block, and a Cr coding tree block.

Adjacent blocks: may represent blocks adjacent to the current block. The blocks adjacent to the current block may represent blocks that are in contact with the boundary of the current block or blocks located within a predetermined distance from the current block. The neighboring blocks may represent blocks adjacent to a vertex of the current block. Here, the block adjacent to the vertex of the current block may mean a block vertically adjacent to a neighboring block horizontally adjacent to the current block or a block horizontally adjacent to a neighboring block vertically adjacent to the current block.

Reconstruction of neighboring blocks: may represent neighboring blocks that are adjacent to the current block and have been encoded or decoded in space/time. Here, reconstructing neighboring blocks may mean reconstructing neighboring cells. The reconstructed spatially neighboring blocks may be blocks that are within the current picture and have been reconstructed by encoding or decoding or both. The reconstruction temporal neighboring block is a block at a position corresponding to the current block of the current picture within the reference picture or a neighboring block of the block.

Depth of cell: may represent the degree of partitioning of the cell. In the tree structure, the highest node (root node) may correspond to the first unit that is not partitioned. Additionally, the highest node may have the smallest depth value. In this case, the depth of the highest node may be level 0. A node with a depth of level 1 may represent a unit that was created by first partitioning the first unit. A node with a depth of level 2 may represent a unit generated by partitioning the first unit twice. A node with a depth of level n may represent a unit generated by partitioning the first unit n times. A leaf node may be the lowest node and is a node that cannot be partitioned further. The depth of a leaf node may be a maximum level. For example, the predefined value for the maximum level may be 3. The depth of the root node may be the lowest, and the depth of the leaf node may be the deepest. In addition, when a cell is represented as a tree structure, the level at which the cell exists may represent the cell depth.

Bit stream: a bitstream including encoded image information may be represented.

Parameter set: corresponding to header information among configurations within the bitstream. At least one of a video parameter set, a sequence parameter set, a picture parameter set, and an adaptation parameter set may be included in the parameter set. In addition, the parameter set may include a slice header, a parallel block (tile) group header, and parallel block header information. The term "parallel block group" denotes a group of parallel blocks and has the same meaning as a stripe.

An adaptive parameter set refers to a parameter set that can be shared and referenced by different pictures, sub-pictures, slices, groups of parallel blocks, or partitions. In addition, a sub-picture, slice, group of parallel blocks, parallel block, or partition in a picture may refer to different sets of adaptation parameters to use information in different sets of adaptation parameters.

With respect to adaptive parameter sets, a sub-picture, slice, group of parallel blocks, parallel block, or partition in a picture may refer to different adaptive parameter sets by using an identifier of the respective adaptive parameter set.

With respect to the adaptive parameter sets, slices, parallel block groups, parallel blocks, or partitions in a sub-picture may refer to different adaptive parameter sets by using identifiers of the respective adaptive parameter sets.

With respect to adaptive parameter sets, concurrent blocks or partitions in a slice may refer to different adaptive parameter sets by using identifiers of the respective adaptive parameter sets.

With respect to the adaptive parameter sets, the partitions in a concurrent block may refer to different adaptive parameter sets by using identifiers of the respective adaptive parameter sets.

The parameter set or header of the sub-picture may include information on an adaptive parameter set identifier. Accordingly, an adaptive parameter set corresponding to the adaptive parameter set identifier may be used in the sub-picture.

The parameter set or header of the parallel block may include an adaptive parameter set identifier so that an adaptive parameter set corresponding to the adaptive parameter set identifier may be used in the parallel block.

The header of the partition may include information on the adaptive parameter set identifier so that the adaptive parameter set corresponding to the adaptive parameter set identifier may be used in the partition.

A picture may be partitioned into one or more parallel block rows and one or more parallel block columns.

A sprite may be partitioned into one or more parallel block rows and one or more parallel block columns within the picture. A sprite may be an area within the picture having a rectangular/square form and may include one or more CTUs. In addition, at least one or more parallel blocks/tiles/stripes may be included within one sprite.

A parallel block may be a region having a rectangular/square form within a picture, and may include one or more CTUs. In addition, a parallel block may be partitioned into one or more partitions.

A chunk may represent one or more rows of CTUs within a parallel block. A parallel block may be partitioned into one or more blocks, and each block may have at least one or more CTU rows. A parallel block that cannot be partitioned into two or more blocks may represent a block.

A stripe may comprise one or more parallel blocks within a picture and may comprise one or more tiles within a parallel block.

And (3) analysis: may represent determining the value of the syntax element by performing entropy decoding, or may represent entropy decoding itself.

Symbol: at least one of a syntax element, a coding parameter, and a transform coefficient value that may represent the encoding/decoding target unit. Further, the symbol may represent an entropy encoding target or an entropy decoding result.

Prediction mode: may be information indicating a mode encoded/decoded using intra prediction or a mode encoded/decoded using inter prediction.

A prediction unit: may represent basic units when performing prediction, such as inter prediction, intra prediction, inter compensation, intra compensation, and motion compensation. A single prediction unit may be partitioned into multiple partitions of smaller size, or may be partitioned into multiple lower level prediction units. The plurality of partitions may be basic units in performing prediction or compensation. The partitions generated by the partition prediction unit may also be prediction units.

Prediction unit partitioning: may represent a shape obtained by partitioning a prediction unit.

The reference picture list may refer to a list including one or more reference pictures used for inter prediction or motion compensation. There are several types of available reference picture lists, including LC (list combination), L0 (list 0), L1 (list 1), L2 (list 2), L3 (list 3).

The inter prediction indicator may refer to a direction of inter prediction of the current block (unidirectional prediction, bidirectional prediction, etc.). Alternatively, the inter prediction indicator may refer to the number of reference pictures used to generate a prediction block for the current block. Alternatively, the inter prediction indicator may refer to the number of prediction blocks used in inter prediction or motion compensation of the current block.

The prediction list indicates whether to use at least one reference picture in a particular reference picture list to generate a prediction block using a flag. The inter prediction indicator may be derived using the prediction list utilization flag, and conversely, the prediction list utilization flag may be derived using the inter prediction indicator. For example, when the prediction list utilization flag has a first value of zero (0), it indicates that a reference picture in the reference picture list is not used to generate the prediction block. On the other hand, when the prediction list utilization flag has a second value of one (1), it indicates that the reference picture list is used to generate the prediction block.

The reference picture index may refer to an index indicating a specific reference picture in the reference picture list.

The reference picture may represent a reference picture that is referenced by a particular block for purposes of inter prediction or motion compensation for the particular block. Alternatively, the reference picture may be a picture including a reference block that is referred to by the current block for inter prediction or motion compensation. Hereinafter, the terms "reference picture" and "reference picture" have the same meaning and may be interchanged.

The motion vector may be a two-dimensional vector used for inter prediction or motion compensation. The motion vector may represent an offset between the encoding/decoding target block and the reference block. For example, (mvX, mvY) may represent a motion vector. Here, mvX may represent a horizontal component, and mvY may represent a vertical component.

The search range may be a two-dimensional area searched to retrieve a motion vector during inter prediction. For example, the size of the search range may be M × N. Here, M and N are both integers.

The motion vector candidate may refer to a prediction candidate block or a motion vector of a prediction candidate block at the time of prediction of a motion vector. In addition, the motion vector candidate may be included in a motion vector candidate list.

The motion vector candidate list may represent a list consisting of one or more motion vector candidates.

The motion vector candidate index may represent an indicator indicating a motion vector candidate in the motion vector candidate list. Alternatively, it may be an index of a motion vector predictor.

The motion information may represent information including at least one of a motion vector, a reference picture index, an inter prediction indicator, a prediction list utilization flag, reference picture list information, a reference picture, a motion vector candidate index, a merge candidate, and a merge index.

The merge candidate list may represent a list composed of one or more merge candidates.

The merge candidates may represent spatial merge candidates, temporal merge candidates, combined bi-predictive merge candidates, or zero merge candidates. The merge candidate may include motion information such as an inter prediction indicator, a reference picture index of each list, a motion vector, a prediction list utilization flag, and an inter prediction indicator.

The merge index may represent an indicator indicating a merge candidate in the merge candidate list. Alternatively, the merge index may indicate a block in a reconstructed block spatially/temporally adjacent to the current block, from which the merge candidate has been derived. Alternatively, the merge index may indicate at least one piece of motion information of the merge candidate.

A transformation unit: may represent a basic unit when encoding/decoding (such as transform, inverse transform, quantization, inverse quantization, transform coefficient encoding/decoding) is performed on the residual signal. A single transform unit may be partitioned into multiple lower-level transform units having smaller sizes. Here, the transformation/inverse transformation may include at least one of a first transformation/first inverse transformation and a second transformation/second inverse transformation.

Zooming: may represent a process of multiplying the quantized level by a factor. The transform coefficients may be generated by scaling the quantized levels. Scaling may also be referred to as inverse quantization.

Quantization parameters: may represent values used when transform coefficients are used during quantization to generate quantized levels. The quantization parameter may also represent a value used when generating transform coefficients by scaling quantized levels during inverse quantization. The quantization parameter may be a value mapped on a quantization step.

Incremental quantization parameter: may represent a difference between the predicted quantization parameter and the quantization parameter of the encoding/decoding target unit.

Scanning: a method of ordering coefficients within a cell, block or matrix may be represented. For example, changing a two-dimensional matrix of coefficients to a one-dimensional matrix may be referred to as scanning, and changing a one-dimensional matrix of coefficients to a two-dimensional matrix may be referred to as scanning or inverse scanning.

Transform coefficients: may represent coefficient values generated after performing a transform in an encoder. The transform coefficient may represent a coefficient value generated after at least one of entropy decoding and inverse quantization is performed in a decoder. The quantized level obtained by quantizing the transform coefficient or the residual signal or the quantized transform coefficient level may also fall within the meaning of the transform coefficient.

Level of quantization: may represent values generated by quantizing a transform coefficient or a residual signal in an encoder. Alternatively, the quantized level may represent a value that is an inverse quantization target subjected to inverse quantization in a decoder. Similarly, the quantized transform coefficient levels as a result of the transform and quantization may also fall within the meaning of quantized levels.

Non-zero transform coefficients: may represent transform coefficients having values other than zero, or transform coefficient levels or quantized levels having values other than zero.

Quantization matrix: a matrix used in quantization processing or inverse quantization processing performed in order to improve subjective image quality or objective image quality may be represented. The quantization matrix may also be referred to as a scaling list.

Quantization matrix coefficients: each element within the quantization matrix may be represented. The quantized matrix coefficients may also be referred to as matrix coefficients.

Default matrix: may represent a predefined quantization matrix predefined in the encoder or decoder.

Non-default matrix: may represent quantization matrices that are not predefined in the encoder or decoder but signaled by the user.

And (3) statistical value: the statistical value for at least one of the variables, encoding parameters, constant values, etc. having a particular value that can be calculated may be one or more of an average, a sum, a weighted average, a weighted sum, a minimum, a maximum, a most frequently occurring value, a median, an interpolation of the respective particular value.

Fig. 1 is a block diagram showing a configuration of an encoding apparatus according to an embodiment to which the present invention is applied.

The encoding device 100 may be an encoder, a video encoding device, or an image encoding device. The video may comprise at least one image. The encoding apparatus 100 may sequentially encode at least one image.

Referring to fig. 1, the encoding apparatus 100 may include a motion prediction unit 111, a motion compensation unit 112, an intra prediction unit 120, a switch 115, a subtractor 125, a transform unit 130, a quantization unit 140, an entropy encoding unit 150, an inverse quantization unit 160, an inverse transform unit 170, an adder 175, a filter unit 180, and a reference picture buffer 190.

The encoding apparatus 100 may perform encoding of an input image by using an intra mode or an inter mode, or both the intra mode and the inter mode. Further, the encoding apparatus 100 may generate a bitstream including encoding information by encoding an input image and output the generated bitstream. The generated bitstream may be stored in a computer-readable recording medium or may be streamed through a wired/wireless transmission medium. When the intra mode is used as the prediction mode, the switch 115 may switch to intra. Alternatively, when the inter mode is used as the prediction mode, the switch 115 may switch to the inter mode. Here, the intra mode may mean an intra prediction mode, and the inter mode may mean an inter prediction mode. The encoding apparatus 100 may generate a prediction block for an input block of an input image. Further, the encoding apparatus 100 may encode the residual block using the input block and the residual of the prediction block after generating the prediction block. The input image may be referred to as a current picture that is a current encoding target. The input block may be referred to as a current block that is a current encoding target, or as an encoding target block.

When the prediction mode is the intra mode, the intra prediction unit 120 may use samples of blocks that have been encoded/decoded and are adjacent to the current block as reference samples. The intra prediction unit 120 may perform spatial prediction on the current block by using the reference samples or generate prediction samples of the input block by performing spatial prediction. Here, the intra prediction may mean prediction inside a frame.

When the prediction mode is an inter mode, the motion prediction unit 111 may retrieve a region that best matches the input block from a reference picture when performing motion prediction, and derive a motion vector by using the retrieved region. In this case, a search area may be used as the area. The reference pictures may be stored in the reference picture buffer 190. Here, when encoding/decoding of a reference picture is performed, the reference picture may be stored in the reference picture buffer 190.

The motion compensation unit 112 may generate a prediction block by performing motion compensation on the current block using the motion vector. Here, inter prediction may mean prediction or motion compensation between frames.

When the value of the motion vector is not an integer, the motion prediction unit 111 and the motion compensation unit 112 may generate a prediction block by applying an interpolation filter to a partial region of a reference picture. In order to perform inter-picture prediction or motion compensation on a coding unit, it may be determined which mode among a skip mode, a merge mode, an Advanced Motion Vector Prediction (AMVP) mode, and a current picture reference mode is used for motion prediction and motion compensation on a prediction unit included in a corresponding coding unit. Then, inter-picture prediction or motion compensation may be performed differently depending on the determined mode.

The subtractor 125 may generate a residual block by using the difference of the input block and the prediction block. The residual block may be referred to as a residual signal. The residual signal may represent the difference between the original signal and the predicted signal. Further, the residual signal may be a signal generated by transforming or quantizing or transforming and quantizing the difference between the original signal and the prediction signal. The residual block may be a residual signal of a block unit.

The transform unit 130 may generate a transform coefficient by performing a transform on the residual block and output the generated transform coefficient. Here, the transform coefficient may be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit 130 may skip the transform of the residual block.

The level of quantization may be generated by applying quantization to the transform coefficients or to the residual signal. Hereinafter, the level of quantization may also be referred to as a transform coefficient in embodiments.

The quantization unit 140 may generate a quantized level by quantizing the transform coefficient or the residual signal according to the parameter, and output the generated quantized level. Here, the quantization unit 140 may quantize the transform coefficient by using the quantization matrix.

The entropy encoding unit 150 may generate a bitstream by performing entropy encoding on the values calculated by the quantization unit 140 or on encoding parameter values calculated when encoding is performed according to the probability distribution, and output the generated bitstream. The entropy encoding unit 150 may perform entropy encoding on the sample point information of the image and information for decoding the image. For example, the information for decoding the image may include syntax elements.

When entropy encoding is applied, symbols are represented such that a smaller number of bits are allocated to symbols having a high generation probability and a larger number of bits are allocated to symbols having a low generation probability, and thus, the size of a bit stream for symbols to be encoded can be reduced. The entropy encoding unit 150 may use an encoding method for entropy encoding such as exponential golomb, Context Adaptive Variable Length Coding (CAVLC), Context Adaptive Binary Arithmetic Coding (CABAC), or the like. For example, the entropy encoding unit 150 may perform entropy encoding by using a variable length coding/code (VLC) table. Further, the entropy encoding unit 150 may derive a binarization method of the target symbol and a probability model of the target symbol/bin, and perform arithmetic encoding by using the derived binarization method and context model.

In order to encode the transform coefficient levels (quantized levels), the entropy encoding unit 150 may change the coefficients of the two-dimensional block form into the one-dimensional vector form by using a transform coefficient scanning method.

The encoding parameters may include information (flags, indices, etc.) such as syntax elements that are encoded in the encoder and signaled to the decoder, as well as information derived when performing encoding or decoding. The encoding parameter may represent information required when encoding or decoding an image. For example, at least one value or a combination of the following may be included in the encoding parameter: unit/block size, unit/block depth, unit/block partition information, unit/block shape, unit/block partition structure, whether or not to perform partition in the form of a quadtree, whether or not to perform partition in the form of a binary tree, the partition direction (horizontal direction or vertical direction) in the form of a binary tree, the partition form (symmetric partition or asymmetric partition) in the form of a binary tree, whether or not the current coding unit is partitioned by partition in the form of a ternary tree, the direction (horizontal direction or vertical direction) of partition in the form of a ternary tree, the type (symmetric type or asymmetric type) of partition in the form of a ternary tree, whether or not the current coding unit is partitioned by partition in the form of a multi-type tree, the direction (horizontal direction or vertical direction) of partition in the form of a multi-type tree, the type (symmetric type or asymmetric type) of partition in the form of a multi-type tree, the tree structure (binary, Prediction mode (intra prediction or inter prediction), luma intra prediction mode/direction, chroma intra prediction mode/direction, intra partition information, inter partition information, coding block partition flag, prediction block partition flag, transform block partition flag, reference sample filtering method, reference sample filter tap, reference sample filter coefficient, prediction block filtering method, prediction block filter tap, prediction block filter coefficient, prediction block boundary filtering method, prediction block boundary filter tap, prediction block boundary filter coefficient, intra prediction mode, inter prediction mode, motion information, motion vector difference, reference picture index, inter prediction angle, inter prediction indicator, prediction list utilization flag, reference picture list, reference picture, motion vector predictor index, motion vector predictor candidate, chroma intra prediction mode/direction, motion vector candidate list, whether merge mode is used, merge index, merge candidate list, whether skip mode is used, interpolation filter type, interpolation filter tap, interpolation filter coefficient, motion vector size, representation accuracy of motion vector, transform type, transform size, information whether first (first) transform is used, information whether second transform is used, first transform index, second transform index, information whether residual signal is present, coding block pattern, Coding Block Flag (CBF), quantization parameter residual, quantization matrix, whether intra loop filter is applied, intra loop filter coefficient, intra loop filter tap, intra loop filter shape/form, whether deblocking filter is applied, deblocking filter coefficient, deblocking filter tap, merging candidate list, whether skip mode is used, interpolation filter tap, interpolation filter coefficient, motion vector size, information on whether motion vector is represented, transform type, transform size, information on whether first (first) transform is used, information, Deblocking filter strength, deblocking filter shape/form, whether adaptive sample offset is applied, adaptive sample offset value, adaptive sample offset class, adaptive sample offset type, whether adaptive loop filter is applied, adaptive loop filter coefficients, adaptive loop filter taps, adaptive loop filter shape/form, binarization/inverse binarization method, context model determination method, context model update method, whether normal mode is performed, whether bypass mode is performed, context dibit, bypass dibit, significant coefficient flag, last significant coefficient flag, coding flag for unit of coefficient group, location of last significant coefficient, flag as to whether value of coefficient is greater than 1, flag as to whether value of coefficient is greater than 2, flag as to whether value of coefficient is greater than 3, coding flag as to unit of coefficient group, location of last significant coefficient, flag as to whether value of coefficient is greater than 1, flag as to whether value of coefficient is greater than 2, flag as to whether value, Information on remaining coefficient values, sign information, reconstructed luma samples, reconstructed chroma samples, residual luma samples, residual chroma samples, luma transform coefficients, chroma transform coefficients, quantized luma levels, quantized chroma levels, transform coefficient level scanning methods, sizes of motion vector search regions at the decoder side, shapes of motion vector search regions at the decoder side, the number of motion vector searches at the decoder side, information on CTU sizes, information on minimum block sizes, information on maximum block depths, information on minimum block depths, image display/output order, slice identification information, slice type, slice partition information, parallel block identification information, parallel block type, parallel block partition information, parallel block group identification information, parallel block group type, motion vector search region shape, slice identification information, slice shape, parallel block shape, parallel block group partition information, picture type, bit depth of input samples, bit depth of reconstructed samples, bit depth of residual samples, bit depth of transform coefficients, bit depth of quantized levels, and information on a luminance signal or information on a chrominance signal.

Here, signaling the flag or index may mean that the corresponding flag or index is entropy-encoded by an encoder and included in a bitstream, and may mean that the corresponding flag or index is entropy-decoded from the bitstream by a decoder.

When the encoding apparatus 100 performs encoding by inter prediction, the encoded current picture may be used as a reference picture for another image that is subsequently processed. Accordingly, the encoding apparatus 100 may reconstruct or decode the encoded current picture or store the reconstructed or decoded image as a reference picture in the reference picture buffer 190.

The quantized level may be inversely quantized in the inverse quantization unit 160 or may be inversely transformed in the inverse transformation unit 170. The inverse quantized or inverse transformed coefficients, or both, may be added to the prediction block by adder 175. A reconstructed block may be generated by adding the inverse quantized or inverse transformed coefficients or both the inverse quantized and inverse transformed coefficients to the prediction block. Here, the inverse quantized or inverse transformed coefficient or the coefficient subjected to both inverse quantization and inverse transformation may represent a coefficient on which at least one of inverse quantization and inverse transformation is performed, and may represent a reconstructed residual block.

The reconstructed block may pass through the filter unit 180. Filter unit 180 may apply at least one of a deblocking filter, Sample Adaptive Offset (SAO), and Adaptive Loop Filter (ALF) to the reconstructed samples, reconstructed blocks, or reconstructed images. The filter unit 180 may be referred to as an in-loop filter.

The deblocking filter may remove block distortion generated in a boundary between blocks. To determine whether to apply the deblocking filter, whether to apply the deblocking filter to the current block may be determined based on samples included in a number of rows or columns included in the block. When a deblocking filter is applied to a block, another filter may be applied according to the required deblocking filtering strength.

To compensate for coding errors, an appropriate offset value may be added to the sample value by using a sample adaptive offset. The sample adaptive offset may correct the offset of the deblocked image from the original image in units of samples. A method of applying an offset in consideration of edge information on each sampling point may be used, or the following method may be used: the sampling points of the image are divided into a predetermined number of areas, an area to which an offset is applied is determined, and the offset is applied to the determined area.

The adaptive loop filter may perform filtering based on a comparison of the filtered reconstructed image and the original image. The samples included in the image may be partitioned into predetermined groups, a filter to be applied to each group may be determined, and the differential filtering may be performed on each group. The information whether or not to apply the ALF may be signaled through a Coding Unit (CU), and the form and coefficient of the ALF to be applied to each block may vary.

The reconstructed block or the reconstructed image that has passed through the filter unit 180 may be stored in the reference picture buffer 190. The reconstructed block processed by the filter unit 180 may be a portion of a reference picture. That is, the reference picture is a reconstructed image composed of the reconstruction blocks processed by the filter unit 180. The stored reference pictures may be used later in inter prediction or motion compensation.

Fig. 2 is a block diagram showing a configuration of a decoding apparatus according to an embodiment and to which the present invention is applied.

The decoding apparatus 200 may be a decoder, a video decoding apparatus, or an image decoding apparatus.

Referring to fig. 2, the decoding apparatus 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an intra prediction unit 240, a motion compensation unit 250, an adder 255, a filter unit 260, and a reference picture buffer 270.

The decoding apparatus 200 may receive the bitstream output from the encoding apparatus 100. The decoding apparatus 200 may receive a bitstream stored in a computer-readable recording medium or may receive a bitstream streamed through a wired/wireless transmission medium. The decoding apparatus 200 may decode the bitstream by using an intra mode or an inter mode. Further, the decoding apparatus 200 may generate a reconstructed image or a decoded image generated by decoding, and output the reconstructed image or the decoded image.

When the prediction mode used at the time of decoding is an intra mode, the switch may be switched to intra. Alternatively, when the prediction mode used at the time of decoding is an inter mode, the switch may be switched to the inter mode.

The decoding apparatus 200 may obtain a reconstructed residual block by decoding an input bitstream and generate a prediction block. When the reconstructed residual block and the prediction block are obtained, the decoding apparatus 200 may generate a reconstructed block that is a decoding target by adding the reconstructed residual block to the prediction block. The decoding target block may be referred to as a current block.

The entropy decoding unit 210 may generate symbols by entropy decoding the bitstream according to the probability distribution. The generated symbols may comprise symbols in the form of quantized levels. Here, the entropy decoding method may be an inverse process of the above-described entropy encoding method.

To decode the transform coefficient levels (quantized levels), the entropy decoding unit 210 may change the coefficients of the one-directional vector form into a two-dimensional block form by using a transform coefficient scanning method.

The quantized levels may be inversely quantized in the inverse quantization unit 220 or inversely transformed in the inverse transformation unit 230. The quantized level may be the result of inverse quantization or inverse transformation, or both, and may be generated as a reconstructed residual block. Here, the inverse quantization unit 220 may apply a quantization matrix to the quantized level.

When using the intra mode, the intra prediction unit 240 may generate a prediction block by performing spatial prediction on the current block, wherein the spatial prediction uses a sample value of a block that is adjacent to the decoding target block and has already been decoded.

When the inter mode is used, the motion compensation unit 250 may generate a prediction block by performing motion compensation on the current block, wherein the motion compensation uses the reference picture stored in the reference picture buffer 270 and the motion vector.

The adder 225 may generate a reconstructed block by adding the reconstructed residual block to the prediction block. Filter unit 260 may apply at least one of a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the reconstructed block or the reconstructed image. The filter unit 260 may output a reconstructed image. The reconstructed block or reconstructed image may be stored in the reference picture buffer 270 and used when performing inter prediction. The reconstructed block processed by the filter unit 260 may be a portion of a reference picture. That is, the reference picture is a reconstructed image composed of the reconstruction blocks processed by the filter unit 260. The stored reference pictures may be used later in inter prediction or motion compensation.

Fig. 3 is a diagram schematically showing a partition structure of an image when the image is encoded and decoded. FIG. 3 schematically illustrates an example of partitioning a single unit into multiple lower level units.

In order to efficiently partition an image, a Coding Unit (CU) may be used when encoding and decoding. The coding unit may be used as a basic unit when encoding/decoding an image. Further, the encoding unit may be used as a unit for distinguishing an intra prediction mode from an inter prediction mode when encoding/decoding an image. The coding unit may be a basic unit for prediction, transform, quantization, inverse transform, inverse quantization, or encoding/decoding processing of transform coefficients.

Referring to fig. 3, a picture 300 is sequentially partitioned by a maximum coding unit (LCU), and the LCU unit is determined as a partition structure. Here, the LCU may be used in the same meaning as a Coding Tree Unit (CTU). A unit partition may refer to partitioning a block associated with the unit. In the block partition information, information of a unit depth may be included. The depth information may represent the number of times or degree the unit is partitioned or both. A single unit may be partitioned into a plurality of lower level units hierarchically associated with depth information based on a tree structure. In other words, a unit and a unit of a lower level generated by partitioning the unit may correspond to a node and a child node of the node, respectively. Each of the partitioned lower level units may have depth information. The depth information may be information representing the size of the CU, and may be stored in each CU. The cell depth represents the number and/or degree of times associated with partitioning a cell. Thus, partition information of a lower-ranked unit may include information about the size of the lower-ranked unit.

The partition structure may represent a distribution of Coding Units (CUs) within LCU 310. Such a distribution may be determined according to whether a single CU is partitioned into multiple (positive integers equal to or greater than 2 including 2, 4, 8, 16, etc.) CUs. The horizontal size and the vertical size of the CU generated by the partitioning may be half of the horizontal size and the vertical size of the CU before the partitioning, respectively, or may have sizes smaller than the horizontal size and the vertical size before the partitioning according to the number of times of the partitioning, respectively. A CU may be recursively partitioned into multiple CUs. By recursively partitioning, at least one of the height and the width of the CU after the partitioning may be reduced compared to at least one of the height and the width of the CU before the partitioning. The partitioning of CUs may be performed recursively until a predefined depth or a predefined size. For example, the depth of an LCU may be 0 and the depth of a minimum coding unit (SCU) may be a predefined maximum depth. Here, as described above, the LCU may be a coding unit having a maximum coding unit size, and the SCU may be a coding unit having a minimum coding unit size. Partitions start from LCU 310, and CU depth is increased by 1 when the horizontal size or vertical size, or both, of a CU is reduced by partitioning. For example, for each depth, the size of a non-partitioned CU may be 2N × 2N. Further, in the case of a partitioned CU, a CU of size 2N × 2N may be partitioned into four CUs of size N × N. As the depth increases by 1, the size of N may be halved.

In addition, information on whether a CU is partitioned or not may be represented by using partition information of the CU. The partition information may be 1-bit information. All CUs except the SCU may include partition information. For example, when the value of the partition information is a first value, the CU may not be partitioned, and when the value of the partition information is a second value, the CU may be partitioned.

For example, the CTUs may have dimensions (such as 64 × 64, 128 × 128, 256 × 256, 512 × 512, etc.) that are the same in height as in width. Here, the height or width of the CTU may be at least one of positive integers of multiples of 2, 4, or 8. In addition, for example, the CTU may have sizes (such as 128 × 64, 64 × 128, 256 × 64, 64 × 256, 512 × 64, 64 × 512, 256 × 128, 128 × 256, etc.) in which the height and the width are different from each other. Similarly, here, the height or width of the CTU may be at least one of a positive integer of a multiple of 2, 4, or 8.

For example, a CU may be the same size in height and width (such as 4 × 4, 8 × 8, 16 × 16, 32 × 32, 64 × 64, 128 × 128, 256 × 256, 512 × 512, etc.). Here, the height or width of the CU may be at least one of positive integers of multiples of 2, 4, or 8. In addition, for example, a CU may have a size in which the height and the width are different from each other, (such as 4 × 8, 8 × 4, 4 × 16, 16 × 4, 4 × 32, 32 × 4, 4 × 64, 64 × 4, 8 × 16, 16 × 8, 8 × 32, 32 × 8, 8 × 64, 64 × 8, 16 × 32, 32 × 16, 16 × 64, 64 × 16, 16 × 128, 128 × 16, 32 × 64, 64 × 32, 32 × 128, 128 × 32, 128 × 64, 64 × 128, 256 × 64, 64 × 256, 512 × 64, 64 × 512, 256 × 128, 128 × 256, and the like). Similarly, here, the height or width of a CU may be at least one of a positive integer that is a multiple of 2, 4, or 8.

For example, the SCU may have the same size (such as 2 × 2, 4 × 4, 8 × 8, 16 × 16, 32 × 32, 64 × 64, 128 × 128, 256 × 256, 512 × 512, etc.) in height and width. Here, the height or width of the CTU may be at least one of positive integers of multiples of 2, 4, or 8. In addition, for example, the CTU may have a size (such as 2 × 4, 4 × 2, 2 × 8, 8 × 2, 2 × 16, 16 × 2, 2 × 32, 32 × 2, 4 × 8, 8 × 4, 4 × 16, 16 × 4, 4 × 32, 32 × 4, 4 × 64, 64 × 4, 8 × 16, 16 × 8, 8 × 32, 32 × 8, 8 × 64, 64 × 8, 16 × 32, 32 × 16, 16 × 64, 64 × 16, 16 × 128, 128 × 16, 32 × 64, 64 × 32, 32 × 128, 128 × 32, 128 × 64, 64 × 128, 256 × 64, 64 × 256, 512 × 64, 64 × 512, 256 × 128, 128 × 256, etc.) in which a height and a width are different from each other. Similarly, here, the height or width of the CTU may be at least one of a positive integer of a multiple of 2, 4, or 8.

At least one of the CTUs, CUs, SCUs, and sub-CUs may have a width to height ratio or a height to width ratio of at least one of: n, 1.5 XN: N, 2 XN: N, 2.5 XN: N, 3 XN: N, 3.5 XN: N, 4 XN: N, 4.5 XN: N, 5 XN: N, 5.5 XN: N, 6 XN: N, N: 1.5X N, N: 2X N, N: 2.5X N, N: 3X N, N: 3.5X N, N: 4X N, N: 4.5X N, N: 5X N, N:5.5 XN and N:6 XN. Here, N may be a positive integer of 2, 4, 6, 8, etc. In addition, here, the sub-CU may mean a unit obtained by partitioning a CU at least for the first time when encoding/decoding the CU, instead of a unit obtained from a block partition structure.

Referring to fig. 3, an LCU having a depth of 0 may be a 64 × 64 block. 0 may be a minimum depth. The SCU with depth 3 may be an 8 x 8 block. 3 may be the maximum depth. CUs of the 32 × 32 block and the 16 × 16 block may be represented as depth 1 and depth 2, respectively.

For example, when a single coding unit is partitioned into four coding units, the horizontal and vertical dimensions of the partitioned four coding units may be half the size of the horizontal and vertical dimensions of the CU before being partitioned. In one embodiment, when a coding unit having a size of 32 × 32 is partitioned into four coding units, each of the partitioned four coding units may have a size of 16 × 16. When a single coding unit is partitioned into four coding units, it can be said that the coding units can be partitioned into a quad-tree form.

For example, when one coding unit is partitioned into two sub-coding units, the horizontal size or vertical size (width or height) of each of the two sub-coding units may be half of the horizontal size or vertical size of the original coding unit. For example, when a coding unit having a size of 32 × 32 is vertically partitioned into two sub-coding units, each of the two sub-coding units may have a size of 16 × 32. For example, when a coding unit having a size of 8 × 32 is horizontally partitioned into two sub coding units, each of the two sub coding units may have a size of 8 × 16. When a coding unit is partitioned into two sub-coding units, it may be said that the coding unit is partitioned or partitioned by a binary tree partition structure.

For example, when one Coding Unit (CU) is partitioned into two sub-CUs, the two sub-CUs may respectively have a width or height having a ratio of 1/K (K-1)/K or (K-1)/K:1/K compared to the width or height of the CU. Here, K may be a positive integer of 2, 3, 4, 5, 6, 7, 8, 16, 32, etc.

In an example, when a CU having a size of 32 × 32 is vertically partitioned into two sub-CUs having a ratio of 1:3, the two sub-CUs may have sizes of 8 × 32 and 24 × 32, respectively.

In another example, when a CU having a size of 8 × 32 is horizontally partitioned into two sub-CUs having a ratio of 1:3, the two sub-CUs may have sizes of 8 × 8 and 8 × 24, respectively.

For example, when one coding unit is partitioned into three sub-coding units, the horizontal size or the vertical size of the coding unit may be partitioned at a ratio of 1:2:1, thereby generating three sub-coding units having a ratio of 1:2:1 in the horizontal size or the vertical size. For example, when a coding unit of size 16 × 32 is horizontally partitioned into three sub-coding units, the three sub-coding units may have sizes of 16 × 8, 16 × 16, and 16 × 8, respectively, in order from the uppermost sub-coding unit to the lowermost sub-coding unit. For example, when a coding unit having a size of 32 × 32 is vertically partitioned into three sub-coding units, the three sub-coding units may have sizes of 8 × 32, 16 × 32, and 8 × 32, respectively, in order from a left sub-coding unit to a right sub-coding unit. When one coding unit is partitioned into three sub-coding units, it may be said that the coding unit is partitioned by three or partitioned according to a ternary tree partition structure.

For example, when one CU is partitioned into three sub-CUs, the three sub-CUs may be obtained by partitioning the width or height of the CU according to a ratio of K: L: M (such as 1:2:1, 2:1:1, 1:1:2, 1:4:1, 4:1:1, 1:1:4, 1:3:2, 2:3:1, 1:6:1, 6:1:1, 1:1:6, 1:5:2, 2:5:1, etc.).

In an example, when a CU with a size of 16 × 32 is horizontally partitioned into three sub-CUs with a ratio of 1:6:1, the three sub-CUs may have sizes of 16 × 4, 16 × 24, and 16 × 4, respectively, from above.

In another example, a CU with a size of 32 × 32 is vertically partitioned into three sub-CUs with a ratio of 6:1:1, which may have sizes of 24 × 32, 4 × 32, and 4 × 32, respectively, from the left side.

For example, when the size of a CU is not a multiple of the sum of K, L and M (i.e., K + L + M), the CU may be partitioned according to a preset rule. In an example, when M has a maximum value of K: L: M, a positive integer n may be added to M such that the size of CU becomes a multiple of (K +1+ M + n). In other words, a CU may be partitioned according to the ratio of K: L (M + n).

In fig. 3, a Coding Tree Unit (CTU)320 is an example of a CTU to which a quad tree partition structure, a binary tree partition structure, and a ternary tree partition structure are all applied.

As described above, in order to partition the CTU, at least one of a quad tree partition structure, a binary tree partition structure, and a ternary tree partition structure may be applied. Various tree partition structures may be sequentially applied to the CTUs according to a predetermined priority order. For example, a quadtree partitioning structure may be preferentially applied to CTUs. Coding units that can no longer be partitioned using the quadtree partition structure may correspond to leaf nodes of the quadtree. Coding units corresponding to leaf nodes of a quadtree may be used as root nodes of a binary tree and/or ternary tree partition structure. That is, coding units corresponding to leaf nodes of a quadtree may be further partitioned according to a binary tree partition structure or a ternary tree partition structure, or may not be further partitioned. Accordingly, by preventing an encoded block resulting from binary tree partitioning or ternary tree partitioning of encoding units corresponding to leaf nodes of a quadtree from undergoing further quadtree partitioning, block partitioning operations and/or operations of signaling partition information may be efficiently performed.

For example, binary tree partitioning may be preferentially applied to CTUs. CUs that cannot be binary tree partitioned may also correspond to leaf nodes of the binary tree. The CUs corresponding to the leaf nodes of the binary tree may become root nodes of the quadtree and/or the ternary tree. In other words, CUs corresponding to leaf nodes of the binary tree may be partitioned according to the quadtree or the ternary tree, or CUs corresponding to leaf nodes of the binary tree may not be further partitioned. Here, binary tree partitioning is not further performed on CUs generated by performing quad-tree partitioning or ternary-tree partitioning on CUs corresponding to leaf nodes of the binary tree, and thus signaling of block partitioning and/or partition information can be efficiently performed.

For example, the ternary tree partitioning may be preferentially applied to CTUs. CUs that cannot perform ternary tree partitioning may also correspond to leaf nodes of the ternary tree. The CUs corresponding to leaf nodes of the ternary tree may become root nodes of the quaternary tree and/or the binary tree. In other words, CUs corresponding to leaf nodes of a ternary tree may or may not be further partitioned according to a quadtree or a binary tree. Here, the ternary tree partitioning is not further performed on CUs generated by performing the quaternary tree partitioning or binary tree partitioning on CUs corresponding to leaf nodes of the ternary tree, and thus signaling of block partitions and/or partition information can be efficiently performed.

For example, for the CTU, a quadtree partition, a ternary tree partition, a binary tree partition may be sequentially applied.

For example, for the CTU, a ternary tree partition, a binary tree partition, a quaternary tree partition may be sequentially applied.

For example, for the CTU, in the quadtree partition, the binary tree partition, and the ternary tree partition, the partition partitioning the height or width according to the symmetric ratio may be performed, and then the partition according to the asymmetric ratio may be performed.

For example, when performing binary tree partitioning on a CTU, the partition priority may vary depending on whether a symmetric ratio or an asymmetric ratio is applied to the height or width.

For example, when the ternary tree partitioning is performed on the CTUs, the partition priority may be varied according to whether a symmetric ratio or an asymmetric ratio is applied to the height or the width, or according to whether a symmetric ratio or an asymmetric ratio is applied to at least two of the three sub-CTUs.

The fact that the coding units corresponding to the nodes of the quad tree are partitioned may be signaled using quad tree partition information. The quadtree partition information having a first value (e.g., "1") may indicate that the current coding unit is partitioned in a quadtree partition structure. The quadtree partition information having a second value (e.g., "0") may indicate that the current coding unit is not partitioned according to the quadtree partition structure. The quadtree partition information may be a flag having a predetermined length (e.g., one bit).

There may be no priority between the binary tree partition and the ternary tree partition. That is, the coding units corresponding to the leaf nodes of the quadtree may further undergo any of the binary tree partition and the ternary tree partition. In addition, the coding units produced by binary tree partitioning or ternary tree partitioning may undergo further binary tree partitioning or further ternary tree partitioning, or may not be further partitioned.

There may not be a partition priority between the quadtree partition and the ternary tree partition. In other words, quadtree partitioning or ternary tree partitioning may be performed on CUs corresponding to leaf nodes of the binary tree. In addition, CUs generated by quadtree partitioning or trifurcated tree partitioning may be partitioned again based on quadtrees or trifurcated trees, or may not be further partitioned.

There may not be a partition priority between the quadtree partition and the binary tree partition. In other words, quadtree partitioning or binary tree partitioning may be performed on CUs corresponding to leaf nodes of a ternary tree. In addition, a CU generated by quadtree partitioning or binary tree partitioning may be partitioned again based on the quadtree or binary tree, or may not be further partitioned.

In the case of binary tree partitioning or ternary tree partitioning, there may not be a partition priority between partition trees depending on whether a symmetric ratio or an asymmetric ratio is applied to the height or width.

A tree structure in which there is no priority between a binary tree partition and a ternary tree partition is referred to as a multi-type tree structure. The coding units corresponding to the leaf nodes of the quadtree may be used as root nodes of the multi-type tree. Whether or not to partition the coding units corresponding to the nodes of the multi-type tree may be signaled using at least one of multi-type tree partition indication information, partition direction information, and partition tree information. In order to partition coding units corresponding to nodes of the multi-type tree, multi-type tree partition indication information, partition direction information, and partition tree information may be sequentially signaled.

The order of signaling may be values preset in the encoder/decoder or may be values signaled from the encoder to the decoder.

The multi-type tree partition indication information having a first value (e.g., "1") may indicate that the current coding unit is to undergo multi-type tree partitioning. The multi-type tree partition indication information having the second value (e.g., "0") may indicate that the current coding unit will not undergo multi-type tree partitioning.

When the coding units corresponding to the nodes of the multi-type tree are further partitioned according to the multi-type tree partition structure, the coding units may include partition direction information. The partition direction information may indicate in which direction the current coding unit is to be partitioned for the multi-type tree partition. The partition direction information having a first value (e.g., "1") may indicate that the current coding unit is to be vertically partitioned. The partition direction information having the second value (e.g., "0") may indicate that the current coding unit is to be horizontally partitioned.

When the coding units corresponding to the nodes of the multi-type tree are further partitioned according to the multi-type tree partition structure, the current coding unit may include partition tree information. The partition tree information may indicate a tree partition structure to be used for partitioning nodes of the multi-type tree. The partition tree information having a first value (e.g., "1") may indicate that the current coding unit is to be partitioned in a binary tree partition structure. The partition tree information having the second value (e.g., "0") may indicate that the current coding unit is to be partitioned in a ternary tree partition structure.

The partition indication information, the partition tree information, and the partition direction information may each be a flag having a predetermined length (e.g., one bit).

The partitioning of the CU corresponding to each node of the multi-type tree may be signaled by using at least one of information on whether to perform multi-type tree partitioning, information on a partitioning direction, information on a partitioning ratio, and information on a partitioning tree. In order to perform partitioning on a CU corresponding to each node of the multi-type tree, information on whether to perform partitioning, information on a direction of partitioning, information on a partition ratio, and information on a partition tree may be sequentially signaled.

In addition, in order to perform partitioning on CUs corresponding to each node of the multi-type tree, information on whether to perform partitioning, information on a partitioning direction, information on a partitioning tree, and information on a partitioning ratio may be sequentially signaled.

In addition, in order to perform partitioning on CUs corresponding to each node of the multi-type tree, information on whether to perform partitioning, information on a partition ratio, information on a partition direction, and information on a partition tree may be sequentially signaled.

When partitioning is performed on a CU corresponding to each node of the multi-type tree, the CU may further include information on a partition ratio. The information about the partitions may indicate a ratio for performing the multi-type tree partitioning.

Hereinafter, an example in which the partition ratio indicates information on the partition ratio when performing binary tree partitioning is shown.

In an example, the information regarding the partition ratio having the first value may indicate that the width or height of the corresponding CU is partitioned based on the binary tree according to a 1:1 ratio.

In another example, the information on the partition ratio having the second value may indicate that the width or height of the corresponding CU is partitioned based on the binary tree according to the ratio of 1: 3.

In another example, the information on the partition ratio having the third value may indicate that the width or height of the corresponding CU is partitioned based on the binary tree according to the ratio of 1: 7.

In another example, the information on the partition ratio having the fourth value may indicate that the width or height of the corresponding CU is partitioned based on the binary tree according to the ratio of 1: 15.

Hereinafter, an example in which the partition ratio indicates information on the partition ratio when performing binary tree partitioning is shown.

In an example, the information regarding the partition ratio having the first value may indicate that the width or height of the corresponding CU is partitioned based on the binary tree according to a 1:1 ratio.

In another example, the information on the partition ratio having the second value may indicate that the width or height of the corresponding CU is partitioned based on the binary tree according to the ratio of 3: 1.

In another example, the information on the partition ratio having the third value may indicate that the width or height of the corresponding CU is partitioned based on the binary tree according to the ratio of 1: 3.

Hereinafter, an example in which the partition ratio indicates information on the partition ratio when the ternary tree partition is performed is shown.

In an example, the information on the partition ratio having the first value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:2: 1.

In another example, the information on the partition ratio having the second value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to the ratio of 1:4: 1.

In an example, the information on the partition ratio having the third value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:6: 1.

In another example, the information on the partition ratio having the third value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:8: 1.

Hereinafter, an example in which the partition ratio indicates information on the partition ratio when the ternary tree partition is performed is shown.

In an example, the information on the partition ratio having the first value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:2: 1.

In another example, the information on the partition ratio having the second value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 2:1: 1.

In an example, the information on the partition ratio having the third value may indicate that the width or height of the corresponding CU is partitioned based on the ternary tree according to a ratio of 1:1: 2.

In another example, the information on the partition ratio having the fourth value may indicate that the width or height of the corresponding CU is partitioned based on the binary tree according to the ratio of 1: 3. In other words, the information on the partition ratio of the binary tree partition may be indicated by using the information on the partition ratio of the ternary tree partition.

The information on the partition ratio may be a flag or an index having a predetermined length (e.g., 1 bit), or may be an index having a variable length.

The values of the information on the partition ratio and the relationship with the partition ratio are not limited to the above examples in each case. When the information on the partition has a specific value, it may indicate that binary tree partitioning or ternary tree partitioning is performed at a partition ratio of n: m or n: m: r, and the relationship of the ratio associated with each value may be variably set. Here, n, m, and r may all be integers greater than zero.

Partitions used for the case where priorities between quadtree partitions and ternary tree partitions do not exist may be referred to as multi-type tree partitions. In other words, the CUs corresponding to the leaf nodes of the binary tree may become the root nodes of the multi-type tree. The partitioning of the CU corresponding to each node of the multi-type tree may be signaled by using at least one of information on whether to perform multi-type tree partitioning, information on a partitioning direction, information on a partitioning ratio, and information on a partitioning tree.

Partitions used for the case where priority between quadtree partitions and binary tree partitions does not exist may be referred to as multi-type tree partitions. In other words, the CUs corresponding to the leaf nodes of the binary tree may become the root nodes of the multi-type tree. The partitioning of the CU corresponding to each node of the multi-type tree may be signaled by using at least one of information on whether to perform multi-type tree partitioning, information on a partitioning direction, information on a partitioning ratio, and information on a partitioning tree.

At least any one of the quadtree partition indication information, the multi-type tree partition indication information, the partition direction information, and the partition tree information may be entropy-encoded/entropy-decoded. In order to entropy-encode/entropy-decode those types of information, information on neighboring coding units adjacent to the current coding unit may be used. For example, there is a high probability that the partition type (partitioned or not partitioned, partition tree, partition ratio, and/or partition direction) of the left neighboring coding unit and/or the upper neighboring coding unit of the current coding unit is similar to the partition type of the current coding unit. Accordingly, context information for entropy-encoding/decoding information regarding the current coding unit may be derived from information regarding neighboring coding units. The information on the neighboring coding units may include at least any one of quad tree partition information, binary tree partition information, ternary tree partition information, multi-type tree partition indication information, partition direction information, partition ratio information, and partition tree information.

As another example, in binary tree partitioning and ternary tree partitioning, binary tree partitioning may be performed preferentially. That is, the current coding unit may first undergo binary tree partitioning, and then coding units corresponding to leaf nodes of the binary tree may be set as root nodes for the ternary tree partitioning. In this case, neither quad-tree nor binary-tree partitioning may be performed for coding units corresponding to nodes of the ternary tree.

Coding units that cannot be partitioned in a quadtree partition structure, a binary tree partition structure, and/or a ternary tree partition structure become basic units for coding, prediction, and/or transformation. That is, the coding unit cannot be further partitioned for prediction and/or transform. Therefore, partition structure information and partition information for partitioning a coding unit into prediction units and/or transform units may not exist in a bitstream.

Among CUs, CUs that are additionally partitioned M times according to quadtree partitioning, binary tree partitioning, and/or ternary tree partitioning may become units of encoding, prediction, and/or transformation. In other words, a CU may be partitioned M additional times for prediction and/or transformation. Here, when encoding/decoding is performed on an image, a CU additionally partitioned M times may be used in the form of a resultant unit, and the resultant unit may not be partitioned in a block structure. Accordingly, a partition structure, partition information, and the like for additionally performing partitioning of a CU into prediction units and/or transform units may not exist in a bitstream. Here, M may be, for example, 1 or a positive integer.

For example, a CU may also be partitioned M and N times, respectively, in order to perform prediction and/or transformation. M and N may be positive integers different from each other.

However, when the size of the coding unit (i.e., a basic unit for partitioning) is greater than the size of the maximum transform block, the coding unit may be recursively partitioned until the size of the coding unit is reduced to be equal to or less than the size of the maximum transform block. At least one of the size of the CU and the size of the maximum transform may represent at least one of a width, a height, and an area. Alternatively, at least one of the size of the CU and the size of the largest transform block may represent depth information specifying the size of the CU or block. Alternatively, the dimension may represent a ratio between the width and the height. For example, when the size of the coding unit is 64 × 64 and when the size of the maximum transform block is 32 × 32, the coding unit may be partitioned into four 32 × 32 blocks for transform. For example, when the size of a coding unit is 32 × 64 and the size of a maximum transform block is 32 × 32, the coding unit may be partitioned into two 32 × 32 blocks for transform. In this case, the partition of the coding unit for the transform is not separately signaled, and may be determined by a comparison between a horizontal size or a vertical size of the coding unit and a horizontal size or a vertical size of the maximum transform block. For example, when the horizontal size (width) of the coding unit is larger than the horizontal size (width) of the maximum transform block, the coding unit may be vertically halved. For example, when the vertical size (height) of the coding unit is greater than the vertical size (height) of the maximum transform block, the coding unit may be horizontally halved.

In addition, when the size of the CU is greater than the size of the largest transform block, a Coded Block Flag (CBF) with respect to the corresponding CU may be determined as a first value according to at least one of a slice type and partition information. Here, the first value may represent 0, where 0 indicates that a transform coefficient or a quantization level does not exist within the corresponding CU. Here, the slice type may be a P slice or a B slice. Here, the partition information may represent 0, where 0 is a first value indicating that the CU is not partitioned.

In an example, when the current slice is a B slice, the size of the CU is 128 × 128, the size of the largest transform block is 64 × 64, and the partition information is 0, the value of the coding block flag of the CU may be determined to be 0.

In another example, when the current slice is an I-slice, the size of the CU is 128 × 128, the size of the largest transform block is 64 × 64, and the partition information is 0, the value of the coding block flag of the CU may be determined to be 0.

In another example, when the current slice is a P slice, the size of the CU is 64 × 128, the size of the largest transform block is 64 × 64, and the partition information is 0, the value of the coding block flag of the CU may be determined to be 0.

In another example, when the current slice is a P slice, the size of the CU is 64 × 32, the size of the largest transform block is 32 × 16, and the partition information is 0, the value of the coding block flag of the CU may be determined to be 0.

In another example, when the current slice is a B slice, the size of the CU is 128 × 128, the size of the maximum transform block is 32 × 32, and the partition information is 0, the size/partition information on the CU may be additionally entropy-encoded/decoded. When the size/partition information on the CU is 0 (where 0 is a first value), the size of the CU may be determined to be 128 × 128 and the value of the coded block flag of the CU may be determined to be 0. In addition, when the size/partition information on the CU is 1 (where 1 is a second value), the CU having a size of 128 × 128 is partitioned into four CUs having a size of 64 × 64 based on the quad tree, and the value of the coding block flag of the CU may be determined to be 0. In other words, when the width or height of a CU is four times larger than the width or height of the largest transform block, size/partition information on the CU may be additionally entropy-encoded/decoded, and the size of the CU whose value of the coded block flag is 0 may be determined.

In another example, when the current slice is a B slice, the size of the CU is 128 × 64, the size of the maximum transform block is 32 × 16, and the partition information is 0, the size/partition information on the CU may be additionally entropy-encoded/decoded. When the size/partition information on the CU is 0 (where 0 is a first value), the size of the CU may be determined to be 128 × 64 and the value of the coded block flag of the CU may be determined to be 0. In addition, when the size/partition information on the CU is 1 (where 1 is a second value), the CU having a size of 128 × 64 is partitioned into four CUs of 64 × 32 size based on the quad tree, and the value of the coding block flag of the CU may be determined to be 0.

In addition, when the size of a CU is greater than the size of the maximum transform block, the mode of the corresponding CU may be determined as a skip mode or as an AMVP mode according to a slice type, in which an encoding block flag has a first value and a difference value representing a motion vector is signaled. Here, the slice type may be a P slice or a B slice.

In an example, when the current slice is a B slice, the size of the CU is 128 × 128, the size of the maximum transform block is 64 × 64, and the partition information is 0, the mode of the CU may be determined as a skip mode.

In another example, when the current slice is a P slice, the size of the CU is 64 × 128, the size of the largest transform block is 64 × 64, and the partition information is 0, the mode of the CU may be determined as an AMVP mode in which the value of the coded block flag is 0.

In another example, when the current slice is a B slice, the size of the CU is 128 × 128, the size of the maximum transform block is 32 × 32, and the partition information is 0, the size/partition information on the CU may be additionally entropy-encoded/decoded. When the size/partition information on the CU is 0 (where 0 is a first value), the size of the CU may be determined to be 128 × 128 and the mode of the CU may be determined to be a skip mode. In addition, when the size/partition information on the CU is 1 (where 1 is a second value), the CU having a size of 128 × 128 is partitioned into four CUs having a size of 64 × 64 based on the quad tree, and the mode of the CU may be determined as the skip mode.

In another example, when the current slice is a P slice, the size of the CU is 128 × 64, the size of the maximum transform block is 32 × 16, and the partition information is 0, the size/partition information on the CU may be additionally entropy-encoded/decoded. When the size/partition information on the CU is 0 (where 0 is a first value), the size of the CU may be determined to be 128 × 64 and the mode of the CU may be determined to be an AMVP mode, where the value of the coding block flag is 0 in the AMVP mode. In addition, when the size/partition information on the CU is 1 (where 1 is a second value), the CU having a size of 128 × 64 is partitioned into four CUs of 64 × 32 size based on the quad tree, and the mode of the CU may be determined as an AMVP mode in which the value of the coding block flag is 0.

In the above example, at least one of the size of the CU and the size of the largest transform block may represent at least one of a width, a height, and an area.

At least one of the size of the CU and the size of the largest transform block may be a value preset in the encoder/decoder or may be a value signaled from the encoder to the decoder.

In addition, when the depth of a CU is 0 and the partition information is 0, a value of a Coded Block Flag (CBF) of the corresponding CU may be determined as the first value.

In addition, when the depth of a CU is 0 and the partition information is 0, a mode of the corresponding CU may be determined as a skip mode or an AMVP mode, in which a coded block flag has a first value and a difference value of a motion vector is signaled.

In the above example, the coded block flag may include at least one of a coded block flag of a luminance signal and a coded block flag of a chrominance signal.

Information of the maximum and/or minimum size of the coding unit and information of the maximum and/or minimum size of the transform block may be signaled or determined at a higher level of the coding unit. The higher levels may be, for example, sequence level, sprite level, picture level, parallel block group level, slice level, partition level, etc. For example, the minimum size of the coding unit may be determined to be 4 × 4. For example, the maximum size of the transform block may be determined to be 64 × 64. For example, the minimum size of the transform block may be determined to be 4 × 4. Here, the information on the minimum and/or maximum size of the CU and the information on the minimum and/or maximum size of the transform block may be signaled for each slice and between each slice, or may be determined as a value signaled from an encoder to a decoder regardless of a slice type.

Information about the minimum and/or maximum size of a CU may be signaled for the partition type of the current block. For example, when the partition type of the current CU is one of a quad tree, a binary tree, and a ternary tree, information on the minimum and/or maximum size that the CU of the corresponding type may have may be signaled.

In addition, information on the minimum and/or maximum size of a CU of a specific partition type may be signaled according to information on the minimum and/or maximum size of a general CU.

In addition, the information on the minimum and/or maximum size of a CU of a particular type may be signaled according to the information on the minimum and/or maximum size of a CU of a particular partition type.

In addition, information about the minimum and/or maximum size of a CU of a particular partition type may be signaled in the form of a logarithmic value. In an example, here, the exponent of the logarithm may be 2.

In addition, information on the minimum and/or maximum size of the CU for each partition type may be signaled based on a luminance signal or a chrominance signal. Hereinafter, a value represented by Y or luminance and information represented by C or chrominance may represent information on a luminance unit and a chrominance unit, respectively.

In an example, a difference between a minimum size of a CU after the quadtree partition and a minimum size of a general CU may be signaled. For example, the difference between the minimum size of a CU after a quadtree partition and the minimum size of a general CU may be signaled by slice _ log2_ diff _ min _ qt _ min _ cb _ luma or slice _ log2_ diff _ min _ qt _ min _ cb _ chroma. The decoder may derive the minimum size of the CU after the quadtree partition (MinQtSizeY or MinQtSizeC) by using slice _ log2_ diff _ min _ qt _ min _ cb _ luma or slice _ log2_ diff _ min _ qt _ min _ cb _ chroma) and the minimum size of the general CU (MinCbLog2 SizeY). Hereinafter, when the CU after the quadtree partition has a minimum size, it may correspond to a case where the CU after the quadtree partition corresponds to a leaf node of the quadtree partition.

In another example, the difference between the maximum size of a CU after a binary tree partition and the minimum size of a CU after a quad tree partition may be signaled. For example, the difference between the maximum size of a CU after a binary tree partition and the minimum size of a CU after a quadtree partition may be signaled by slice _ log2_ diff _ max _ bt _ min _ qt _ luma or slice _ log2_ diff _ max _ bt _ min _ qt _ chroma. The decoder may derive the maximum size of the CU after the binary tree partition (MaxBtSizeY or MaxBtSizeC) by using slice _ log2_ diff _ max _ bt _ min _ qt _ luma or slice _ log2_ diff _ max _ bt _ min _ qt _ chromal and the minimum size of the CU after the quad tree partition (minqtlg 2SizeY or minqtlg 2 SizeC). In addition, the decoder may derive the minimum size (MinBtSizeY or MinBtSizeC) of the CU after the binary tree partition by using the minimum size (MinCbLog2SizeY) of the general CU.

In another example, the difference between the maximum size of a CU after a ternary tree partition and the minimum size of a CU after a quaternary tree partition may be signaled. For example, the difference between the maximum size of a CU after a ternary tree partition and the minimum size of a CU after a quaternary tree partition may be signaled by slice _ log2_ diff _ max _ tt _ min _ qt _ luma or slice _ log2_ diff _ max _ tt _ min _ qt _ chroma. The decoder may derive the maximum size of the CU after the quad tree partition (maxttsize or maxttsize) by using slice _ log2_ diff _ max _ tt _ min _ qt _ luma or slice _ log2_ diff _ max _ tt _ min _ qt _ chroma and the minimum size of the CU after the quad tree partition (MinQtLog2SizeY or MinQtLog2 SizeC). In addition, the decoder may derive the minimum size (MinTtSizeY or MinTtSizeC) of the CU by using the minimum size (MinCbLog2SizeY) of the general CU after the ternary tree partitioning.

Information of a minimum size of a coding unit corresponding to a leaf node of the quadtree (quadtree minimum size) and/or information of a maximum depth from a root node of the multi-type tree to the leaf node (maximum tree depth of the multi-type tree) may be signaled or determined at a higher level of the coding unit. For example, the higher level may be a sequence level, a picture level, a sprite level, a slice level, a parallel block group level, a parallel block level, a partition level, etc. Information of a minimum size of the quadtree and/or information of a maximum depth of the multi-type tree may be signaled for each of the intra-picture slices and the inter-picture slices, or may be determined as a value signaled from an encoder to a decoder regardless of a slice type. Here, the information on the maximum depth of the multi-type tree may be signaled or determined in the parent stage of the CU by dividing the information on the maximum depth of the multi-type tree into information on the maximum depth of the binary tree and information on the maximum depth of the ternary tree.

Information about the maximum depth of the multi-type tree may be signaled according to information about the minimum size and/or the maximum size of the general CU.

Additionally, information regarding the maximum depth of the multi-type tree may be signaled in the form of log values. In an example, here, the exponent of the logarithm may be 2.

In addition, information regarding the maximum depth of the multi-type tree may be signaled based on a luminance or chrominance signal. Hereinafter, a value represented by Y or luminance and information represented by C or chrominance may represent information on a luminance unit and a chrominance unit, respectively.

For example, information about the maximum depth of a multi-type tree may be signaled. For example, information regarding the maximum depth of the multi-type tree may be signaled through slice _ max _ mtt _ hierarchy _ depth _ luma or slice _ max _ mtt _ hierarchy _ depth _ chroma. In an example, slice _ max _ mtt _ hierarchy _ depth _ luma or slice _ max _ mtt _ hierarchy _ depth _ chroma may have values from 0 to CtbLog2SizeY-MinCbLog2 SizeY. The decoder may derive the maximum depth (MaxMttDepthY or MaxMttDepthC) of the multi-type tree by using slice _ max _ mtt _ hierarchy _ depth _ luma or slice _ max _ mtt _ hierarchy _ depth _ chroma.

The difference information between the size of the CTU and the maximum size of the transform block may be signaled or determined at a higher level of the coding unit. For example, the higher level may be a sequence level, a picture level, a sub-picture level, a slice level, a parallel block group level, a parallel block level, a partition level, and the like. Information of the maximum size of the coding unit corresponding to each node of the binary tree (hereinafter, referred to as the maximum size of the binary tree) may be determined based on the size of the coding tree unit and the difference information. The maximum size of the coding unit corresponding to each node of the ternary tree (hereinafter, referred to as the maximum size of the ternary tree) may vary depending on the type of the slice. For example, for intra-picture stripes, the maximum size of the treble may be 32 x 32. For example, for inter-picture slices, the maximum size of the ternary tree may be 128 × 128. Similarly, the maximum size of the CU corresponding to each node of the binary tree (the maximum size of the binary tree) may have different values according to the stripe type. For example, in the case of intra-stripe, the maximum size of the binary tree may be 32 × 32. In addition, for example, in the case between stripes, the maximum size of the binary tree may be 128 × 128. Information on the maximum size of the CU corresponding to each node of the ternary tree (the maximum size of the ternary tree) may be determined based on the size of the coding tree unit and the above-described difference information. For example, a minimum size of a coding unit corresponding to each node of the binary tree (hereinafter, referred to as a minimum size of the binary tree) and/or a minimum size of a coding unit corresponding to each node of the ternary tree (hereinafter, referred to as a minimum size of the ternary tree) may be set to a minimum size of the coding block.

As another example, the maximum size of the binary tree and/or the maximum size of the ternary tree may be signaled or determined at the stripe level. Optionally, a minimum size of the binary tree and/or a minimum size of the ternary tree may be signaled or determined at the slice level.

In another example, the maximum size of the binary tree and/or the maximum size of the ternary tree may be signaled or determined in a sequence level, a picture level, a sprite level, a slice level, a parallel block group level, a parallel block level, a partitioning level, and/or the like. Additionally, the minimum size of the binary tree and/or the minimum size of the ternary tree may be signaled or determined in a sequence level, a picture level, a sprite level, a slice level, a parallel block group level, a parallel block level, a block level, and/or the like.

In another example, the maximum depth of the binary tree and/or the maximum depth of the ternary tree may be signaled or determined in a sequence level, a picture level, a sprite level, a slice level, a parallel block group level, a parallel block level, a partitioning level, and/or the like. Additionally, the minimum depth of the binary tree and/or the minimum depth of the ternary tree may be signaled or determined in a sequence level, a picture level, a sprite level, a slice level, a parallel block group level, a parallel block level, a partitioning level, and/or the like.

In accordance with the above-described size and depth information of various blocks, quad-tree partition information, multi-type tree partition indication information, partition tree information, partition rate levels, and/or partition direction information may or may not be included in a bitstream.

For example, when the size of the coding unit is not greater than the minimum size of the quadtree, the coding unit does not include the quadtree partition information. Accordingly, the quadtree partition information may be derived from the second value.

For example, when sizes (horizontal and vertical sizes) of the coding units corresponding to the nodes of the multi-type tree are larger than the maximum sizes (horizontal and vertical sizes) of the binary tree and/or the ternary tree, the coding units may not be partitioned by the binary tree or the ternary tree. Thus, the multi-type tree partition indication information may not be signaled, but may be inferred from the second value.

Alternatively, when the sizes (horizontal size and vertical size) of the coding units corresponding to the nodes of the multi-type tree are the same as the maximum sizes (horizontal size and vertical size) of the binary tree and/or are twice as large as the maximum sizes (horizontal size and vertical size) of the ternary tree, the coding units may not be further partitioned by the binary tree or the ternary tree. Accordingly, the multi-type tree partition indication information may not be signaled, but may be derived from the second value. This is because when the coding units are partitioned by the binary tree partition structure and/or the ternary tree partition structure, coding units smaller than the minimum size of the binary tree and/or the minimum size of the ternary tree are generated.

Alternatively, binary tree partitioning or ternary tree partitioning may be restricted based on the size of the virtual pipeline data unit (hereinafter, pipeline buffer size). For example, when a coding unit is partitioned into sub-coding units that do not fit into the pipeline buffer size by binary tree partitioning or ternary tree partitioning, the corresponding binary tree partitioning or ternary tree partitioning may be limited. The pipeline buffer size may be the size of the largest transform block (e.g., 64 x 64). For example, when the pipeline buffer size is 64 × 64, the following partitions may be restricted.

-nxm (N and/or M is 128) ternary tree partitions for coding units

128 xn (N < ═ 64) binary tree partitioning for the horizontal direction of the coding units

-N × 128(N < ═ 64) binary tree partitioning for the vertical direction of the coding units

Alternatively, when the depth of the coding unit corresponding to the node of the multi-type tree is equal to the maximum depth of the multi-type tree, the coding unit may not be further partitioned by the binary tree and/or the ternary tree. Thus, the multi-type tree partition indication information may not be signaled, but may be inferred from the second value.

Alternatively, the multi-type tree partition indication information may be signaled only when at least one of the vertical direction binary tree partition, the horizontal direction binary tree partition, the vertical direction ternary tree partition, and the horizontal direction ternary tree partition is possible for the coding units corresponding to the nodes of the multi-type tree. Otherwise, the coding unit may not be partitioned by a binary tree and/or a ternary tree. Accordingly, the multi-type tree partition indication information may not be signaled, but may be derived from the second value.

Alternatively, the partition direction information may be signaled only when both the vertical-direction binary tree partition and the horizontal-direction binary tree partition or both the vertical-direction ternary tree partition and the horizontal-direction ternary tree partition are possible for the coding units corresponding to the nodes of the multi-type tree. Otherwise, the partition direction information may not be signaled, but may be derived from a value indicating possible partition directions.

Alternatively, the partition tree information may be signaled only when both the vertical direction binary tree partition and the vertical direction ternary tree partition or both the horizontal direction binary tree partition and the horizontal direction ternary tree partition are possible for the coding tree corresponding to the nodes of the multi-type tree. Otherwise, the partition tree information may not be signaled, but may be derived from values indicating possible partition tree structures.

When at least one of the width and height of the cell or block is not an nth power of 2 (2)N) When the residual signal is not present, the corresponding block may be encoded/decoded.

In an example, a Coded Block Flag (CBF) of a unit or block may not be entropy coded/decoded or may be estimated (inferred) to be 0.

In another example, a skip mode flag for an encoding mode of a unit or block may not be entropy encoded/decoded and is estimated to be a skip mode.

Thus, it is not the nth power of 2 (2) for at least one of width and heightN) May not perform the transform/inverse transform. In other words, at least one of the transformation matrix and the inverse transformation matrix that does not have the form of an nth power of 2 may not be necessary.

Fig. 4 is a diagram illustrating an intra prediction process.

The arrow from the center to the outside in fig. 4 may represent the prediction direction of the intra prediction mode.

Intra-coding and/or decoding may be performed by using reference samples of neighboring blocks of the current block. The neighboring blocks may be reconstructed neighboring blocks. For example, intra-coding and/or decoding may be performed by using coding parameters or values of reference samples included in the reconstructed neighboring blocks.

The prediction block may represent a block generated by performing intra prediction. The prediction block may correspond to at least one of a CU, a PU, and a TU. The unit of the prediction block may have a size of one of a CU, a PU, and a TU. The prediction block may be a square block having a size of 2 × 2, 4 × 4, 16 × 16, 32 × 32, 64 × 64, or the like, or may be a rectangular block having a size of 2 × 8, 4 × 8, 2 × 16, 4 × 16, 8 × 16, or the like.

The intra prediction may be performed according to an intra prediction mode for the current block. The number of intra prediction modes that the current block may have may be a fixed value, and may be a value differently determined according to the properties of the prediction block. For example, the properties of the prediction block may include the size of the prediction block, the shape of the prediction block, and the like.

The number of intra prediction modes may be fixed to N regardless of the block size. Alternatively, the number of intra prediction modes may be 3, 5, 9, 17, 34, 35, 36, 65, 67, or the like. Alternatively, the number of intra prediction modes may vary according to the block size or the color component type or both the block size and the color component type. For example, the number of intra prediction modes may vary depending on whether the color component is a luminance signal or a chrominance signal. For example, as the block size becomes larger, the number of intra prediction modes may increase. Alternatively, the number of intra prediction modes of the luma component block may be greater than the number of intra prediction modes of the chroma component block.

The intra prediction mode may be a non-angle mode or an angle mode. The non-angle mode may be a DC mode or a planar mode, and the angle mode may be a prediction mode having a specific direction or angle. The intra prediction mode may be represented by at least one of a mode number, a mode value, a mode number, a mode angle, and a mode direction. The number of intra prediction modes may be M greater than 1, including non-angular and angular modes. In order to intra-predict the current block, a step of determining whether samples included in a reconstructed neighboring block can be used as reference samples of the current block may be performed. When there are samples that cannot be used as reference samples of the current block, a value obtained by copying or performing interpolation or performing both copying and interpolation on at least one sample value among samples included in the reconstructed neighboring blocks may be used to replace an unavailable sample value of the samples, and thus the replaced sample value is used as a reference sample of the current block.

Fig. 7 is a diagram illustrating reference samples that can be used for intra prediction.

As shown in fig. 7, at least one of the reference sample line 0 to the reference sample line 3 may be used for intra prediction of the current block. In fig. 7, instead of retrieving from reconstructed neighboring blocks, the samples for segment a and segment F may be padded with samples closest to segment B and segment E, respectively. Index information indicating a reference sample line to be used for intra prediction of the current block may be signaled. When the upper boundary of the current block is the boundary of the CTU, only the reference sample line 0 may be available. Therefore, in this case, the index information may not be signaled. When the reference sample line other than the reference sample line 0 is used, filtering for a prediction block, which will be described later, may not be performed.

When intra-predicting, a filter may be applied to at least one of the reference samples and the prediction samples based on the intra-prediction mode and the current block size/shape.

In the case of the planar mode, when generating a prediction block of the current block, a sample value of the prediction target sample may be generated by using a weighted sum of an upper reference sample and a left reference sample of the current sample and an upper right reference sample and a lower left reference sample of the current block according to a position of the prediction target sample within the prediction block. In addition, in case of the DC mode, when a prediction block of the current block is generated, an average value of the upper reference sample and the left reference sample of the current block may be used. In addition, in case of the angle mode, a prediction block may be generated by using an upper reference sample, a left side reference sample, a right upper reference sample, and/or a lower left reference sample of the current block. To generate predicted sample values, interpolation of real units may be performed.

In case of intra prediction between color components, a prediction block for a current block of a second color component may be generated based on a corresponding reconstructed block of a first color component. For example, the first color component may be a luminance component and the second color component may be a chrominance component. For intra prediction between color components, parameters of a linear model between the first color component and the second color component may be derived based on the template. The template may include top and/or left neighboring samples of the current block and top and/or left neighboring samples of the reconstructed block of the first color component corresponding thereto. For example, the parameters of the linear model may be derived using the sample value of the first color component having the largest value among the sample points in the template and the sample value of the second color component corresponding thereto, and the sample value of the first color component having the smallest value among the sample points in the template and the sample value of the second color component corresponding thereto. When deriving parameters of the linear model, the corresponding reconstructed block may be applied to the linear model to generate a prediction block for the current block. According to the video format, subsampling may be performed on reconstructed blocks of the first color component and adjacent samples of the corresponding reconstructed block. For example, when one sample of the second color component corresponds to four samples of the first color component, the four samples of the first color component may be subsampled to calculate one corresponding sample. In this case, parameter derivation of the linear model and intra prediction between color components may be performed based on the respective subsampled samples. Whether to perform intra prediction between color components and/or a range of templates may be signaled as an intra prediction mode.

The current block may be partitioned into two sub-blocks or four sub-blocks in a horizontal direction or a vertical direction. The sub-blocks of a partition may be reconstructed sequentially. That is, intra prediction may be performed on the sub-blocks to generate sub-prediction blocks. In addition, inverse quantization and/or inverse transformation may be performed on the sub-block to generate a sub-residual block. The reconstructed sub-block may be generated by adding the sub-prediction block to the sub-residual block. The reconstructed sub-block may be used as a reference sample for intra prediction of the sub-block. A sub-block may be a block that includes a predetermined number (e.g., 16) or more samples. Thus, for example, when the current block is an 8 × 4 block or a 4 × 8 block, the current block may be partitioned into two sub-blocks. Also, when the current block is a 4 × 4 block, the current block may not be partitioned into sub-blocks. When the current block has other sizes, the current block may be partitioned into four sub-blocks. Information about whether to perform intra prediction based on the subblock and/or partition directions (horizontal or vertical) may be signaled. The sub-block based intra prediction may be limited to be performed only when the reference sample line 0 is used. When the subblock-based intra prediction is performed, filtering for a prediction block, which will be described later, may not be performed.

The final prediction block may be generated by performing filtering on the prediction block that is intra-predicted. The filtering may be performed by applying a predetermined weight to the filtering target sample, the left reference sample, the upper reference sample, and/or the upper left reference sample. The weight for filtering and/or the reference sample point (range, position, etc.) may be determined based on at least one of the block size, the intra prediction mode, and the position of the filtering target sample point in the prediction block. The filtering may be performed only in case of a predetermined intra prediction mode (e.g., DC, planar, vertical, horizontal, diagonal, and/or adjacent diagonal mode). The adjacent diagonal patterns may be patterns that add k to or subtract k from the diagonal patterns. For example, k may be a positive integer of 8 or less.

The intra prediction mode of the current block may be entropy-encoded/entropy-decoded by predicting an intra prediction mode of a block existing adjacent to the current block. When the intra prediction modes of the current block and the neighboring block are the same, the same information of the intra prediction modes of the current block and the neighboring block may be signaled by using predetermined flag information. In addition, indicator information of the same intra prediction mode as that of the current block among intra prediction modes of the neighboring blocks may be signaled. When the intra prediction mode of the current block is different from that of the adjacent block, the intra prediction mode information of the current block may be entropy-encoded/entropy-decoded by performing entropy-encoding/entropy-decoding based on the intra prediction mode of the adjacent block.

Fig. 5 is a diagram illustrating an embodiment of inter-picture prediction processing.

In fig. 5, a rectangle may represent a picture. In fig. 5, arrows indicate prediction directions. Pictures can be classified into intra pictures (I pictures), predictive pictures (P pictures), and bi-predictive pictures (B pictures) according to the coding type of the picture.

I pictures can be encoded by intra prediction without the need for inter-picture prediction. P pictures can be encoded through inter-picture prediction by using reference pictures existing in one direction (i.e., forward or backward) with respect to a current block. B pictures can be encoded through inter-picture prediction by using reference pictures existing in two directions (i.e., forward and backward) with respect to a current block. When inter-picture prediction is used, the encoder may perform inter-picture prediction or motion compensation, and the decoder may perform corresponding motion compensation.

Hereinafter, an embodiment of inter-picture prediction will be described in detail.

Inter-picture prediction or motion compensation may be performed using the reference picture and the motion information.

The motion information of the current block may be derived during inter-picture prediction by each of the encoding apparatus 100 and the decoding apparatus 200. The motion information of the current block may be derived by using motion information of reconstructed neighboring blocks, motion information of a co-located block (also referred to as a col block or a co-located block), and/or motion information of blocks adjacent to the co-located block. The co-located block may represent a block spatially co-located with the current block within a previously reconstructed co-located picture (also referred to as a col picture or a co-located picture). The co-located picture may be one picture among one or more reference pictures included in the reference picture list.

The derivation method of motion information may be different depending on the prediction mode of the current block. For example, the prediction modes applied to the inter prediction include an AMVP mode, a merge mode, a skip mode, a merge mode having a motion vector difference, a sub-block merge mode, a triangle partition mode, an inter-intra combined prediction mode, an affine mode, and the like. Here, the merge mode may be referred to as a motion merge mode.

For example, when AMVP is used as the prediction mode, at least one of a motion vector of a reconstructed neighboring block, a motion vector of a co-located block, a motion vector of a block adjacent to the co-located block, and a (0,0) motion vector may be determined as a motion vector candidate for the current block, and a motion vector candidate list may be generated by using the motion vector candidates. The motion vector candidate of the current block may be derived by using the generated motion vector candidate list. Motion information of the current block may be determined based on the derived motion vector candidates. The motion vector of the co-located block or the motion vector of a block adjacent to the co-located block may be referred to as a temporal motion vector candidate, and the reconstructed motion vector of the neighboring block may be referred to as a spatial motion vector candidate.

The encoding apparatus 100 may calculate a Motion Vector Difference (MVD) between the motion vector of the current block and the motion vector candidate, and may perform entropy encoding on the Motion Vector Difference (MVD). In addition, the encoding apparatus 100 may perform entropy encoding on the motion vector candidate index and generate a bitstream. The motion vector candidate index may indicate a best motion vector candidate among the motion vector candidates included in the motion vector candidate list. The decoding apparatus may perform entropy decoding on the motion vector candidate index included in the bitstream, and may select a motion vector candidate of the decoding target block from among the motion vector candidates included in the motion vector candidate list by using the entropy-decoded motion vector candidate index. In addition, the decoding apparatus 200 may add the entropy-decoded MVD to the motion vector candidate extracted by the entropy decoding, thereby deriving the motion vector of the decoding target block.

In addition, the encoding apparatus 100 may perform entropy encoding on the resolution information of the calculated MVD. The decoding apparatus 200 may adjust the resolution of the entropy-decoded MVD using the MVD resolution information.

In addition, the encoding apparatus 100 calculates a Motion Vector Difference (MVD) between the motion vector in the current block and the motion vector candidate based on the affine model, and performs entropy encoding on the MVD. The decoding apparatus 200 derives a motion vector on a per sub-block basis by deriving an affine control motion vector of the decoded target block from the sum of the entropy-decoded MVD and the affine control motion vector candidate.

The bitstream may include a reference picture index indicating a reference picture. The reference picture index may be entropy-encoded by the encoding apparatus 100 and then signaled to the decoding apparatus 200 as a bitstream. The decoding apparatus 200 may generate a prediction block of the decoding target block based on the derived motion vector and the reference picture index information.

Another example of a method of deriving motion information of a current block may be a merge mode. The merge mode may represent a method of merging motions of a plurality of blocks. The merge mode may represent a mode in which motion information of the current block is derived from motion information of neighboring blocks. When the merge mode is applied, the merge candidate list may be generated using motion information of the reconstructed neighboring blocks and/or motion information of the co-located blocks. The motion information may include at least one of a motion vector, a reference picture index, and an inter-picture prediction indicator. The prediction indicator may indicate unidirectional prediction (L0 prediction or L1 prediction) or bidirectional prediction (L0 prediction and L1 prediction).

The merge candidate list may be a list of stored motion information. The motion information included in the merge candidate list may be at least one of: motion information of a neighboring block adjacent to the current block (spatial merge candidate), motion information of a co-located block of the current block in a reference picture (temporal merge candidate), new motion information generated by a combination of motion information existing in a merge candidate list, motion information of a block encoded/decoded before the current block (history-based merge candidate), and a zero merge candidate.

The encoding apparatus 100 may generate a bitstream by performing entropy encoding on at least one of the merging flag and the merging index, and may signal the bitstream to the decoding apparatus 200. The merge flag may be information indicating whether a merge mode is performed for each block, and the merge index may be information indicating which of neighboring blocks of the current block is a merge target block. For example, the neighboring blocks of the current block may include a left neighboring block located at the left side of the current block, an upper neighboring block arranged above the current block, and a temporal neighboring block temporally adjacent to the current block.

In addition, the encoding apparatus 100 performs entropy encoding on correction information for correcting a motion vector among the motion information of the merging candidates, and signals it to the decoding apparatus 200. The decoding apparatus 200 may correct the motion vector of the merge candidate selected according to the merge index based on the correction information. Here, the correction information may include at least one of information on whether to perform correction, correction direction information, and correction size information. As described above, the prediction mode in which the motion vector of the merging candidate is corrected based on the signaled correction information may be referred to as a merging mode having a motion vector difference.

The skip mode may be a mode in which motion information of neighboring blocks is applied to the current block as it is. When the skip mode is applied, the encoding apparatus 100 may perform entropy encoding on information of the fact of which block motion information is to be used as motion information of the current block to generate a bitstream, and may signal the bitstream to the decoding apparatus 200. The encoding apparatus 100 may not signal syntax elements regarding at least any one of motion vector difference information, a coded block flag, and a transform coefficient level to the decoding apparatus 200.

The sub-block merge mode may represent a mode in which motion information is derived in units of sub-blocks of a coding block (CU). When the sub-block merge mode is applied, the sub-block merge candidate list may be generated using motion information (sub-block-based temporal merge candidate) and/or affine control point motion vector merge candidates of sub-blocks co-located with a current sub-block in a reference picture.

The triangle partition mode may represent a mode in which motion information is derived by partitioning a current block into diagonal directions, each prediction sample is derived using each of the derived motion information, and a prediction sample of the current block is derived by weighting each of the derived prediction samples.

The inter-intra combined prediction mode may represent a mode in which prediction samples of the current block are derived by weighting prediction samples generated by inter prediction and prediction samples generated by intra prediction.

The decoding apparatus 200 may correct the derived motion information by itself. The decoding apparatus 200 may search for a predetermined region based on the reference block indicated by the derived motion information and derive motion information having the minimum SAD as corrected motion information.

The decoding apparatus 200 may compensate for the prediction samples derived via the inter prediction using the optical flow.

Fig. 6 is a diagram illustrating a transform and quantization process.

As shown in fig. 6, a transform process and/or a quantization process are performed on the residual signal to generate a quantized level signal. The residual signal is the difference between the original block and the predicted block (i.e., intra-predicted block or inter-predicted block). The prediction block is a block generated by intra prediction or inter prediction. The transform may be a first transform, a second transform, or both a first transform and a second transform. The first transform on the residual signal generates transform coefficients, and the second transform on the transform coefficients generates second transform coefficients.

At least one scheme selected from among various predefined transformation schemes is used to perform the first transformation. Examples of such predefined transformation schemes include Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), and Karhunen-loeve transform (KLT), for example. The transform coefficients generated by the first transform may undergo a second transform. The transform scheme for the primary transform and/or the secondary transform may be determined according to encoding parameters of the current block and/or neighboring blocks of the current block. Optionally, transformation information indicating the transformation scheme may be signaled. The DCT-based transform may include, for example, DCT-2, DCT-8, and so on. The DST-based transformation may include, for example, DST-7.

The quantized level signal (quantized coefficient) may be generated by performing quantization on the residual signal or the result of performing the first transform and/or the second transform. The quantized level signal may be scanned according to at least one of a diagonal upper-right scan, a vertical scan, and a horizontal scan, depending on an intra prediction mode of the block or a block size/shape. For example, when the coefficients are scanned in a diagonal top right scan, the block-form coefficients change to a one-dimensional vector form. In addition to the diagonal upper right scan, a horizontal scan that horizontally scans coefficients in the form of two-dimensional blocks or a vertical scan that vertically scans coefficients in the form of two-dimensional blocks may be used depending on the intra prediction mode and/or the size of the transform block. The scanned quantized level coefficients may be entropy encoded for insertion into the bitstream.

The decoder entropy decodes the bitstream to obtain quantized level coefficients. The quantized level coefficients may be arranged in a two-dimensional block form by inverse scanning. For the reverse scan, at least one of a diagonal upper right scan, a vertical scan, and a horizontal scan may be used.

The quantized level coefficients may then be inverse quantized, then inverse transformed twice as needed, and finally inverse transformed for the first time as needed to produce a reconstructed residual signal.

Inverse mapping in the dynamic range may be performed for the luma component reconstructed by intra-prediction or inter-prediction before in-loop filtering. The dynamic range may be divided into 16 equal segments and the mapping function for each segment may be signaled. The mapping function may be signaled at the stripe level or parallel block group level. An inverse mapping function for performing inverse mapping may be derived based on the mapping function. In-loop filtering, reference picture storage, and motion compensation are performed in the inverse mapping region, and a prediction block generated by inter prediction is converted to the mapping region via mapping using a mapping function and then used to generate a reconstructed block. However, since the intra prediction is performed in the mapping region, the prediction block generated via the intra prediction may be used to generate a reconstructed block without mapping/inverse mapping.

When the current block is a residual block of the chrominance components, the residual block may be converted to an inverse mapping region by performing scaling on the chrominance components of the mapping region. The availability of scaling may be signaled at the stripe level or parallel block group level. Scaling may only be applied when a mapping of the luma component is available and the partitions of the luma component and the partitions of the chroma component follow the same tree structure. Scaling may be performed based on an average of sample values of a luminance prediction block corresponding to a chroma block. In this case, when the current block uses inter prediction, the luma prediction block may represent a mapped luma prediction block. The values required for scaling may be derived by referring to a look-up table using the index of the slice to which the average of the sample values of the luma prediction block belongs. Finally, the residual block may be converted to an inverse mapping region by scaling the residual block using the derived value. Chroma component block recovery, intra prediction, inter prediction, in-loop filtering, and reference picture storage may then be performed in the inverse mapped region.

Information indicating whether mapping/inverse mapping of the luminance component and the chrominance component is available may be signaled through a sequence parameter set.

A prediction block for the current block may be generated based on a block vector indicating a displacement between the current block and a reference block in the current picture. In this way, a prediction mode for generating a prediction block with reference to a current picture is referred to as an Intra Block Copy (IBC) mode. The IBC mode may be applied to an mxn (M < ═ 64, N < ═ 64) coding unit. The IBC mode may include a skip mode, a merge mode, an AMVP mode, and the like. In the case of the skip mode or the merge mode, a merge candidate list is constructed and a merge index is signaled so that one merge candidate can be specified. The block vector of the designated merge candidate may be used as the block vector of the current block. The merge candidate list may include at least one of a spatial candidate, a history-based candidate, a candidate based on an average of two candidates, and a zero merge candidate. In the case of AMVP mode, the difference block vector may be signaled. In addition, a prediction block vector may be derived from a left neighboring block and an upper neighboring block of the current block. The index of the neighboring block to be used may be signaled. The prediction block in IBC mode is included in the current CTU or the left CTU and is limited to blocks in the already reconstructed region. For example, the value of the block vector may be restricted such that the prediction block of the current block is located in the region of three 64 × 64 blocks preceding the 64 × 64 block to which the current block belongs in the encoding/decoding order. By limiting the values of the block vectors in this manner, memory consumption and device complexity according to an IBC mode implementation may be reduced.

Fig. 8 is a diagram illustrating a boundary of a picture/sprite/slice/parallel block/partition, etc. according to an embodiment of the present invention.

Fig. 8 (a) is a diagram illustrating an example in which a current block includes both a right side boundary and a lower boundary.

Fig. 8 (b) is a diagram illustrating an example in which the current block includes a lower boundary. Fig. 8 (c) is a diagram illustrating an example in which the current block includes a right side boundary.

When the current block includes a right boundary, it may mean that the horizontal coordinate of at least one sample included in the current block is greater than the horizontal coordinate of a sample adjacent to and included in the picture/sub-picture/slice/parallel block/partition, etc.

For example, when the current block includes a right side boundary, it may mean that a horizontal coordinate position obtained by adding a width of the current block in a horizontal direction and coordinates (x, y) corresponding to a (0,0) position of the current block (an upper-left position of the current block) is greater than a horizontal coordinate of a boundary of picture/sub-picture/slice/parallel block/partition.

In addition, when the current block includes a lower boundary, it may mean that the vertical coordinate of at least one sample included in the current block is greater than the vertical coordinate of a sample adjacent to and included in the picture/sub-picture/slice/parallel block/partition, etc.

For example, when the current block includes a lower boundary, it may mean that a vertical coordinate position obtained by adding the height of the current block in the vertical direction and coordinates (x, y) corresponding to a (0,0) position of the current block (upper-left position of the current block) is greater than a vertical coordinate of a boundary of picture/sub-picture/slice/parallel block/partition.

Fig. 9 is a diagram illustrating a partitioning method according to an embodiment of a block of the present invention.

Fig. 9 (a) is a diagram showing an example of vertical binary tree partitioning. Fig. 9 (b) is a diagram showing an example of horizontal binary tree partitioning. Fig. 9 (c) is a diagram showing an example of vertical treeing partition. Fig. 9 (d) is a diagram showing an example of horizontal treeing partition.

When the current block includes a boundary of a picture/sub-picture/slice/parallel block/partition, etc., the partitioning of the current block may be implicitly performed. Hereinafter, the boundary may represent at least one boundary of picture/sub-picture/slice/parallel block/partition, etc. Here, each boundary of the picture/sprite/slice/parallel block/partition may represent at least one of a right boundary, a lower boundary, a left boundary, and an upper boundary. Here, the implicit partition may mean a case where a corresponding block is partitioned by using a specific partitioning method without using an encoding parameter additionally signaled. Alternatively, the implicit partitioning may represent a case where a corresponding block is partitioned by using a specific partitioning method regardless of whether there is an encoding parameter additionally signaled when a predetermined condition is satisfied.

At least one of the right and left side boundaries may represent a vertical boundary. At least one of the upper boundary and the lower boundary may represent a horizontal boundary.

When the boundary is a vertical boundary or a horizontal boundary, a vertical partition or a horizontal partition may be available on the current block. In addition, the partitioning may be implicitly performed on the current block according to the size of the current block.

In addition, when the current block is partitioned, a specific partition method may be performed, and information regarding the specific partition method may be encoded/decoded. Here, the specific partitioning method may be determined according to whether the boundary is a vertical boundary or a horizontal boundary, and may be at least one of a quad-tree partition, a vertical binary tree partition, a horizontal binary tree partition, a vertical ternary tree partition, and a horizontal ternary tree partition.

In an example, when the current block includes a vertical boundary, at least one of a quad-tree partition, a vertical binary-tree partition, and a vertical ternary-tree partition may be performed such that a block obtained by partitioning the current block does not exceed the vertical boundary.

In another example, when the current block includes a horizontal boundary, at least one of a quad-tree partition, a horizontal binary tree partition, and a horizontal ternary tree partition may be performed such that a block obtained by partitioning the current block does not exceed the horizontal boundary.

In another example, when the current block includes a right boundary, the partitioning of the current block may be restricted such that the vertical binary tree partitioning is performed only on the current block. The vertical binary tree partitioning may be performed implicitly on the current block. In addition, information regarding a vertical binary tree partition of the current block may be entropy-encoded/decoded. Here, the information regarding partitions other than the vertical binary tree partition may not be entropy-encoded/decoded.

In detail, when the current block includes a right side boundary and the height of the current block exceeds the size of the maximum transform block, the current block may be restricted such that performing vertical binary tree partitioning on the current block is unavailable.

For example, when the current block includes a right side boundary and the height of the current block exceeds the size 64 of the maximum transform block, the current block may be restricted such that performing vertical binary tree partitioning on the current block is not available.

In addition, when the current block includes a right side boundary but the current block does not include a lower boundary, the current block may be restricted such that performing horizontal binary tree partitioning on the current block is unavailable.

In another example, when the current block includes a lower boundary, the partitioning of the current block may be restricted such that horizontal binary tree partitioning is performed only on the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. In addition, information regarding a horizontal binary tree partition of the current block may be entropy encoded/decoded. Here, information regarding partitions other than the horizontal binary tree partitions may not be entropy encoded/decoded.

In detail, when the current block includes a lower boundary, the current block may be restricted such that performing vertical binary tree partitioning on the current block is not available.

In addition, when the current block includes a lower boundary and a width of the current block exceeds a size of the maximum transform block, the current block may be restricted such that performing horizontal binary tree partitioning on the current block is unavailable.

In another example, when the current block includes a right boundary, the partition of the current block may be restricted such that the vertical trie partition is performed only on the current block. Vertical trie partitioning may be performed implicitly on the current block. In addition, information regarding a vertical trie partition of the current block may be entropy-encoded/decoded. Here, information regarding partitions other than the vertical ternary tree partition may not be entropy-encoded/decoded.

In another example, when the current block includes a right boundary, the partitioning of the current block may be restricted such that the vertical binary tree partitioning is performed only on the current block. The vertical binary tree partitioning may be performed implicitly on the current block. In addition, information regarding a vertical binary tree partition of the current block may be entropy-encoded/decoded. Here, the information regarding partitions other than the vertical binary tree partition may not be entropy-encoded/decoded.

In another example, when the current block includes a lower boundary, the partitioning of the current block may be restricted such that horizontal binary tree partitioning is performed only on the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. In addition, information regarding a horizontal binary tree partition of the current block may be entropy encoded/decoded. Here, information regarding partitions other than the horizontal binary tree partitions may not be entropy encoded/decoded.

In another example, when the current block includes a lower boundary, the partitioning of the current block may be restricted such that horizontal trie partitioning is performed only on the current block. Horizontal trie partitioning may be performed implicitly on the current block. In addition, information regarding a horizontal ternary tree partition of the current block may be entropy-encoded/decoded. Here, information regarding partitions other than the horizontal ternary tree partition may not be entropy-encoded/decoded.

In another example, when the current block includes at least one of a right side boundary and an upper boundary, the current block may be restricted such that performing the ternary tree partition on the current block is unavailable.

In another example, when the current block includes both a right side boundary and a lower boundary, the partitioning of the current block may be restricted such that only quad-tree partitioning is performed on the current block. The quadtree partitioning may be performed implicitly for the current block. In addition, information regarding the quadtree partition of the current block may be entropy-encoded/decoded. Herein, information regarding partitions other than the quadtree partitions may not be entropy encoded/decoded.

In another example, when the current block includes a right side boundary and the height of the current block is greater than the size of the maximum transform block, the current block may be restricted such that performing vertical binary tree partitioning on the current block is not available. Here, the quadtree partitioning may be performed on the current block. The quadtree partitioning may be implicitly performed on the current block without performing entropy encoding/decoding on information regarding the partitions.

In another example, when the current block includes a lower boundary and a width of the current block is greater than a size of a maximum transform block, the current block may be restricted such that performing horizontal binary tree partitioning on the current block is not available. Here, the quadtree partitioning may be performed on the current block. The quadtree partitioning may be implicitly performed on the current block without performing entropy encoding/decoding on information regarding the partitions.

In another example, when the current block includes a right side boundary, the height of the current block is greater than the size of the maximum transform block, and the partition for the current block is a vertical binary tree partition, the current block may be restricted such that performing binary tree partitioning on the current block is unavailable. Here, the quadtree partitioning may be performed on the current block. The quadtree partitioning may be implicitly performed on the current block without performing entropy encoding/decoding on information regarding the partitions.

In another example, when the current block includes a lower boundary, a width of the current block is greater than a size of the maximum transform block, and a partition for the current block is a horizontal binary tree partition, the current block may be restricted such that performing binary tree partitioning on the current block is unavailable. Here, the quadtree partitioning may be performed on the current block. The quadtree partitioning may be implicitly performed on the current block without performing entropy encoding/decoding on information regarding the partitions.

In order to determine the partition structure of the current block, the following syntax may be defined.

In an example, qtbtt _ dual _ tree _ intra _ flag may indicate that for an I slice, each CTU is partitioned based on a 64 × 64 coding unit, and the 64 × 64 coding unit is used as a root node of a luminance component and a chrominance component.

For example, when the qtbtt _ dual _ tree _ intra _ flag has a first value (e.g., 0), it may indicate that each CTU may be partitioned based on a 64 × 64 coding unit and the 64 × 64 coding unit is not used as a root node of a luminance component and a chrominance component, and when the qtbtt _ dual _ tree _ intra _ flag has a second value (e.g., 1), it may indicate that each CTU may be partitioned based on a 64 × 64 coding unit and the 64 × 64 coding unit is used as a root node of a luminance component and a chrominance component.

When the qtbtt _ dual _ tree _ intra _ flag has a first value (e.g., 0), the partition structure of the luminance component may be the same as that of the chrominance component. However, the block size of the luminance component and the block size of the chrominance component may be different from each other according to the type of the chrominance component. In the above case, reference may be made to the use of a single tree structure. A SINGLE TREE type may be identified as SINGLE _ TREE.

When the slice type is an I slice and the qtbttt _ dual _ tree _ intra _ flag has a second value (e.g., 1), the block partition structure of the luminance component and the block partition structure of the chrominance component from the 64 × 64 coding unit may be different from each other. In the above case, reference may be made to the use of a dual tree structure. The TREE type of the luminance component in the DUAL TREE structure may be identified as DUAL _ TREE _ LUMA, and the TREE type of the chrominance component in the DUAL TREE structure may be identified as DUAL _ TREE _ CHROMA.

In the case of a single tree structure, the minimum block of the chrominance components may be set to a 2 × 2 block. Here, blocks smaller than the 2 × 2 block may not be used for the chrominance component. In other words, from blocks having a block size equal to or greater than the 2 × 2 block, partitions based on the block size of the 2 × 2 block may not be available.

In addition, in the case of a single tree structure, the minimum block of the chrominance components may be set to a 4 × 4 block. Here, 2 × 2 blocks, 2 × 4 blocks, and 4 × 2 blocks may not be used for the chrominance components. In other words, from blocks having a block size equal to or greater than at least one of a 2 × 2 block, a 2 × 4 block, and a 4 × 2 block, a partition based on at least one of the 2 × 2 block, the 2 × 4 block, and the 4 × 2 block may not be available.

In addition, in the case of a dual tree structure, the minimum block of the chrominance component may be set to a 4 × 4 block. Here, 2 × 2 blocks, 2 × 4 blocks, and 4 × 2 blocks may not be used for the chrominance components. In other words, from blocks having a block size equal to or greater than at least one of a 2 × 2 block, a 2 × 4 block, and a 4 × 2 block, a partition based on at least one of the 2 × 2 block, the 2 × 4 block, and the 4 × 2 block may not be available.

The current block may be restricted such that performing quadtree partitioning on the current block is unavailable when the current block satisfies at least one of the following conditions.

-a case where the TREE type to which the current block belongs is SINGLE _ TREE or DUAL _ TREE _ LUMA, and the width or height of the current block is equal to or less than MinQtSizeY representing the minimum quadtree size of the LUMA component.

A case where a TREE type to which the current block belongs is DUAL _ TREE _ CHROMA, and a value obtained by dividing the width or height of the current block by subwidth c, which is a sub-sampling factor of the chrominance signal in the horizontal direction, is equal to or less than MinQtSizeC, which represents the minimum quad-TREE size of the luminance component (here, a subwidth c value, which is a sub-sampling factor of the chrominance signal in the horizontal direction, may be used as the width of the current block, and a subheight c value, which is a sub-sampling factor of the chrominance signal in the vertical direction, may be used as the height of the current block

-the case where the depth of the binary tree partition and the ternary tree partition of the current block (the depth of the multi-type tree) is not 0.

A case where the TREE type to which the current block belongs is DUAL _ TREE _ CHROMA, and a value obtained by dividing the width or height of the current block by sub width c, which is a sub-sampling factor of the chrominance signal in the horizontal direction, is equal to or less than 4 (here, a sub width c value, which is a sub-sampling factor of the chrominance signal in the horizontal direction, may be used for the width of the current block, and a sub height c value, which is a sub-sampling factor of the chrominance signal in the vertical direction, may be used for the height of the current block

-the TREE type to which the current block belongs is DUAL _ TREE _ CHROMA, and the mode type of the current block is a case of at least one of an intra prediction mode, an Intra Block Copy (IBC) mode, and a palette coding mode.

In addition, depending on the width and/or height of the current block (CU), performing binary tree partitioning and/or ternary tree partitioning may be restricted from being available.

In an example, when the width and/or height of the current block is L, it may be restricted that performing the ternary tree partitioning is unavailable. Here, L may be 128.

In another example, when N is less than 64 within a current block of size mxn (M is width and N is height), execution horizontal binary tree partitioning may be restricted from being available. Here, M may be 128.

In another example, when M is less than 64 within a current block of size mxn (M is width and N is height), performing vertical binary tree partitioning may be restricted from being available. Here, N may be 128.

In another example, when the width of the current block is equal to or less than the size of the maximum transform block and the height of the current block is greater than the size of the maximum transform block, the current block may be restricted such that performing vertical binary tree partitioning on the current block is not available. For example, when the width of the current block is equal to or less than 64 or 32, which is the maximum transform block size, and the height of the current block is greater than 64 or 32, which is the maximum transform block size, the current block may be restricted such that performing vertical binary tree partitioning on the current block is not available.

In another example, when the height of the current block is equal to or less than the size of the maximum transform block and the width of the current block is greater than the size of the maximum transform block, the current block may be restricted such that performing horizontal binary tree partitioning on the current block is unavailable. For example, when the width of the current block is greater than 64 or 32, which is the maximum transform block size, and the height of the current block is equal to or less than 64 or 32, which is the maximum transform block size, the current block may be restricted such that performing horizontal binary tree partitioning on the current block is not available.

In another example, when the width or height of the current block is equal to or less than the minimum binary tree size of the luma component, the current block may be restricted such that performing binary tree partitioning on the current block is not available.

In another example, when the width of the current block is greater than the size of the maximum binary tree, the current block may be restricted such that performing binary tree partitioning on the current block is not available.

In another example, when the height of the current block is greater than the size of the maximum binary tree, the current block may be restricted such that performing binary tree partitioning on the current block is not available.

In another example, when the depth of the binary tree partition and the ternary tree partition of the current block (the depth of the multi-type tree) is equal to or greater than the maximum depth of the binary tree partition and the ternary tree partition (the maximum depth of the multi-type tree), the current block may be restricted such that performing the binary tree partition on the current block is unavailable.

In another example, when the TREE type to which the current block belongs is DUAL _ TREE _ CHROMA, and a product of a value obtained by dividing the width of the current block by a sub width value that is a sub-sampling factor of a chrominance signal in a horizontal direction and a value obtained by dividing the height of the current block by a sub height c value that is a sub-sampling factor of a chrominance signal in a vertical direction is equal to or less than 16, the current block may be restricted such that binary TREE partitioning is not available for the current block.

In another example, when the TREE type to which the current block belongs is DUAL _ TREE _ CHROMA, and the mode type of the current block is at least one of an intra prediction mode, an Intra Block Copy (IBC) mode, and a palette coding mode, the current block may be restricted such that performing binary TREE partitioning on the current block is unavailable.

In another example, when the width or height of the current block is greater than the size of the maximum transform block, the current block may be restricted such that performing the ternary tree partitioning on the current block is not available.

In another example, when a width or height of the current block is greater than a size of a maximum transform block and greater than a minimum value of a maximum trie size, the current block may be restricted such that it is not available to perform a trie partition on the current block.

In another example, when the width or height of the current block is equal to or less than twice the minimum trie size, the current block may be restricted such that it is not available to perform the trie partitioning on the current block.

In another example, when the depth of the binary tree partition and the ternary tree partition of the current block (the depth of the multi-type tree) is equal to or greater than the maximum depth of the binary tree partition and the ternary tree partition (the maximum depth of the multi-type tree), the current block may be restricted such that the ternary tree partition is not available for the current block.

In another example, when the TREE type to which the current block belongs is DUAL _ TREE _ CHROMA, and a product of a value obtained by dividing the width of the current block by a sub width value that is a sub-sampling factor of a chrominance signal in a horizontal direction and a value obtained by dividing the height of the current block by a sub height value that is a sub-sampling factor of a chrominance signal in a vertical direction is equal to or less than 32, the current block may be restricted such that the ternary TREE partitioning is not available for the current block.

In another example, when the TREE type to which the current block belongs is DUAL _ TREE _ CHROMA and the mode type of the current block is at least one of an intra prediction mode, an Intra Block Copy (IBC) mode, and a palette coding mode, the current block may be restricted such that the ternary TREE partitioning is not available for the current block.

Here, the size of the maximum transform block may be 64 or 32, and is indicated by a flag signaled from the encoder to the decoder. For example, when the signaled flag has a first value, the size of the maximum transform block may be 64. In addition, when the signaled flag has the second value, the size of the maximum transform block may be 32.

In another example, the current block may be restricted such that ternary tree partitioning is allowed in a 128 x 128 sized current block, vertical binary tree partitioning is allowed in a 128 x 64 sized current block, and horizontal binary tree partitioning is allowed in a 64 x 128 sized current block. In addition, the current block may be restricted such that the ternary tree partition is not allowed in the current blocks of 128 × 64 size and 64 × 128 size.

When the current block is partitioned, the resulting sub-blocks may be restricted such that their ratio (width: height) does not become a certain ratio. In other words, the current block may be restricted such that the current block is partitioned into sub-blocks having a certain ratio equal to or less than (width: height). For example, the ratio of (width: height) may be 1: N, and the ratio of (height: width) may be N:1. Here, N may be a positive integer of 2, 3, 4, 5, 6, 7, 8, or the like. In addition, N may be determined based on at least one of an encoding parameter of the current block and an encoding parameter of the candidate block. In addition, N may be a value preset in the encoder/decoder, or may be a value signaled from the encoder to the decoder.

When the ratio of the result sub-blocks obtained by partitioning the current block becomes greater than the above ratio, the information partitions of the result sub-blocks may not be entropy-encoded/decoded.

As a first example of partitioning the current block, when the current block includes a boundary of a picture/sub-picture/slice/parallel block/partition, etc., the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

1-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available for the current block. Binary tree partitioning may be performed implicitly on the current block.

2) Case where the current block includes a lower boundary

2-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and greater than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2-2) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and equal to or less than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only a quad-tree partition or a horizontal binary-tree partition is available for the current block. The information regarding whether to perform the quadtree partitioning or the horizontal binary tree partitioning on the current block may be entropy-encoded/decoded.

2-3) additionally (when the current block is a binary or ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

3) Case where the current block includes a right boundary

3-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and greater than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

3-2) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and equal to or less than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only a quad-tree partition or a vertical binary-tree partition is available for the current block. The information regarding whether to perform the quadtree partitioning or the vertical binary tree partitioning on the current block may be entropy-encoded/decoded.

3-3) additionally (when the current block is a binary or ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

As a second example of partitioning the current block, when the current block includes a boundary of picture/sub-picture/slice/parallel block/partition or the like, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the maximum binary tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

1-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available for the current block. Binary tree partitioning may be performed implicitly on the current block.

2) Case where the current block includes a lower boundary

2-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and greater than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2-2) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and equal to or less than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only a quad-tree partition or a horizontal binary-tree partition is available for the current block. The information regarding whether to perform the quadtree partitioning or the horizontal binary tree partitioning on the current block may be entropy-encoded/decoded.

2-3) additionally (when the current block is a binary or ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

3) Case where the current block includes a right boundary

3-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and greater than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

3-2) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and equal to or less than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only a quad-tree partition or a vertical binary-tree partition is available for the current block. The information regarding whether to perform the quadtree partitioning or the vertical binary tree partitioning on the current block may be entropy-encoded/decoded.

3-3) additionally (when the current block is a binary or ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

As a third example of partitioning the current block, when the current block includes a boundary of picture/sub-picture/slice/parallel block/partition or the like, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the size of the current block is greater than the size of the maximum quadtree block, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available for the current block. Binary tree partitioning may be performed implicitly on the current block.

1-2) additionally, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2) Case where the current block includes a lower boundary

2-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and greater than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2-2) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and equal to or less than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only a quad-tree partition or a horizontal binary-tree partition is available for the current block. The information regarding whether to perform the quadtree partitioning or the horizontal binary tree partitioning on the current block may be entropy-encoded/decoded.

2-3) additionally (when the current block is a binary or ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block may be restricted such that only horizontal binary tree partitions are available on the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

3) Case where the current block includes a right boundary

3-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and greater than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

3-2) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and equal to or less than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only a quad-tree partition or a vertical binary-tree partition is available for the current block. The information regarding whether to perform the quadtree partitioning or the vertical binary tree partitioning on the current block may be entropy-encoded/decoded.

3-3) additionally (when the current block is a binary or ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

As a fourth example of partitioning the current block, when the current block includes a boundary of picture/sub-picture/slice/parallel block/partition or the like, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the size of the current block is greater than the size of the minimum binary tree block, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available on the current block. Binary tree partitioning may be performed implicitly on the current block.

1-2) additionally, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2) Case where the current block includes a lower boundary

2-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and greater than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2-2) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and equal to or less than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only a quad-tree partition or a horizontal binary-tree partition is available for the current block. The information regarding whether to perform the quadtree partitioning or the horizontal binary tree partitioning on the current block may be entropy-encoded/decoded.

2-3) additionally (when the current block is a binary or ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

3) Case where the current block includes a right boundary

3-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and greater than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

3-2) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and equal to or less than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only a quad-tree partition or a vertical binary-tree partition is available for the current block. The information regarding whether to perform the quadtree partitioning or the vertical binary tree partitioning on the current block may be entropy-encoded/decoded.

3-3) additionally (when the current block is a binary or ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

As a fifth example of partitioning the current block, when the current block includes a boundary of picture/sub-picture/slice/parallel block/partition or the like, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

1-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available for the current block. In other words, binary tree partitioning may be performed implicitly on the current block.

2) Case where the current block includes a lower boundary

2-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2-2) additionally (when the current block is a binary or ternary tree block, or when the size of the current block is smaller than the size of the smallest quadtree block), the partitioning of the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

3) Case where the current block includes a right boundary

3-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

3-2) additionally (when the current block is a binary or ternary tree block, or when the size of the current block is equal to or smaller than the size of the minimum quad-tree block), the partitioning of the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

As a sixth example of partitioning the current block, when the current block includes a boundary of picture/sub-picture/slice/parallel block/partition or the like, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

1-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available to the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available for the current block. In other words, binary tree partitioning may be performed implicitly on the current block.

2) Case where the current block includes a lower boundary

2-1) when the size of the current block is larger than the size of the minimum quad-tree block, only quad-tree partitions may be restricted from being available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

3) Case where the current block includes a right boundary

3-1) when the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

3-2) additionally, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

As a seventh example of partitioning the current block, when the current block includes a boundary of picture/sub-picture/slice/parallel block/partition or the like, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

1-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available for the current block. In other words, binary tree partitioning may be performed implicitly on the current block.

2) Case where the current block includes a lower boundary

2-1) when the size of the current block is greater than the size of the minimum binary tree block, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

2-2) additionally, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

3) Case where the current block includes a right boundary

3-1) when the size of the current block is larger than the size of the minimum binary tree block, the partition to the current block may be restricted such that only a vertical binary tree partition is available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

3-2) additionally, the partitioning of the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

As an eighth example of partitioning the current block, when the current block includes a boundary of picture/sub-picture/slice/parallel block/partition or the like, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

1-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available for the current block. In other words, binary tree partitioning may be performed implicitly on the current block.

2) Case where the current block includes a lower boundary

2-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and greater than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2-2) additionally (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is equal to or smaller than the size of the minimum quadtree block or equal to or smaller than the size of the maximum binary tree block), the partitioning of the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

3) Case where the current block includes a right boundary

3-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block and greater than the size of the maximum binary-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

3-2) additionally (when the current block is a binary tree block or a ternary tree block, or when the size of the current block is equal to or smaller than the size of the minimum quadtree block or equal to or smaller than the size of the maximum binary tree block), the partitioning of the current block may be restricted such that only a vertical binary tree partition is available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

As a ninth example of partitioning the current block, when the current block includes a boundary of picture/sub-picture/slice/parallel block/partition or the like, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

1-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available for the current block. In other words, binary tree partitioning may be performed implicitly on the current block.

2) Case where the current block includes a lower boundary

2-1) when the size of the current block is larger than the size of the maximum binary tree block, the partition to the current block may be restricted such that only the quad-tree partition is available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

3) Case where the current block includes a right boundary

3-1) when the size of the current block is larger than the size of the maximum binary tree block, the partition to the current block may be restricted such that only the quad-tree partition is available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

3-2) additionally, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

As a tenth example of partitioning the current block, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like when the current block includes the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

1-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available for the current block. In other words, binary tree partitioning may be performed implicitly on the current block.

2) Case where the current block includes a lower boundary

2-1) when the size of the current block is greater than the size of the maximum quadtree block, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

2-2) additionally, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

3) Case where the current block includes a right boundary

3-1) when the size of the current block is greater than the size of the maximum quadtree block, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

3-2) additionally, the partitioning of the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

As an eleventh example of partitioning the current block, when the current block includes a boundary of picture/sub-picture/slice/parallel block/partition or the like, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) Case where the current block includes both the right boundary and the lower boundary

1-1) when the current block is a quad-tree block and the size of the current block is greater than the size of the minimum quad-tree block, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

1-2) additionally, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block. Alternatively, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block. Thus, the partition to the current block may be restricted such that only binary tree partitions are available for the current block. In other words, binary tree partitioning may be performed implicitly on the current block.

2) When the current block includes a lower boundary, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

3) When the current block includes a right boundary, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

As a twelfth example of partitioning the current block, when the current block includes a boundary of picture/sub-picture/slice/parallel block/partition or the like, in order to efficiently perform block partitioning in the boundary of picture/sub-picture/slice/parallel block/partition or the like, the following process may be performed.

1) When the current block includes both a right side boundary and a lower boundary, the partition to the current block may be restricted such that only quad-tree partitions are available for the current block. The quadtree partitioning may be performed implicitly on the current block. Accordingly, at least one of the binary tree partition and the ternary tree partition may not be performed on the current block.

2) When the current block includes a lower boundary, the partition to the current block may be restricted such that only horizontal binary tree partitions are available for the current block. Horizontal binary tree partitioning may be performed implicitly on the current block.

3) When the current block includes a right boundary, the partition to the current block may be restricted such that only vertical binary tree partitions are available for the current block. The vertical binary tree partitioning may be performed implicitly on the current block.

When the current block includes a boundary of picture/sub-picture/slice/parallel block/partition, etc., encoding/decoding may not be performed on an area within the current block that exceeds the boundary of picture/sub-picture/slice/parallel block/partition, etc., and thus at least one of the width and height of the area to be encoded/decoded within the current block may not be 2 to the power N (2)N)。

For at least one of the width and height of the region to be encoded/decoded is not the power N of 2 (2)N) May not be the case for the current block ofThe encoding/decoding is performed in the form of a residual signal of a region to be encoded/decoded.

At least one of a width and a height with respect to a region to be encoded/decoded may not be an nth power of 2 (2) when the current block includes at least one of a right side boundary and a lower boundary, when the current block includes the right side boundary, and when the current block includes the lower boundaryN) The information of the block of (a) is entropy encoded/decoded.

FIG. 10 is a view illustrating that at least one of the width and the height of a region to be encoded/decoded of a current block is not an Nth power of 2 (2) according to an embodiment of the present inventionN) A diagram of a situation of (1). Fig. 10 (a) is a diagram illustrating an example in which a current block includes both a right side boundary and a lower boundary. Fig. 10 (b) is a diagram illustrating an example in which a current block includes a lower boundary. Fig. 10 (c) is a diagram illustrating an example in which the current block includes a right side boundary.

For at least one of when the current block includes at least one of a right side boundary and a lower boundary, when the current block includes a right side boundary, and when the current block includes a lower boundary, as shown in fig. 10, with respect to whether at least one of the width and the height of a region to be encoded/decoded of the current block is not the N-th power of 2 (2)N) The boundary processing information in the form of performing the encoding/decoding or whether to perform the encoding/decoding in at least one of the first to twelfth examples may be encoded/decoded.

In other words, the boundary processing information may be entropy-encoded/decoded in the form of a flag. In addition, the boundary processing information may indicate the following two cases.

When the boundary processing information has a first value, using at least one of a width and a height of a region to be encoded/decoded of the current block that is not an nth power of 2 (2)N) In the form of (1).

When the boundary processing information has the second value, at least one of the first to twelfth examples is used.

When the boundary processing information has a first value, encoding/decoding may be performed on a remaining area outside an area beyond the boundary within the current block.

In addition, when the boundary processing information has the second value, the current block may be implicitly partitioned by using at least one of the first to twelfth examples, or encoding/decoding of the current block may be performed by entropy-encoding/decoding information on the partitions.

In other words, the boundary processing information may be entropy-encoded/decoded in an index form. In addition, the boundary processing information may indicate the following N cases. Here, N may be determined based on at least one encoding parameter of the current block. In addition, N may be a value preset in the encoder/decoder, or may be a value signaled from the encoder to the decoder.

When the boundary processing information has a first value, using at least one of a width and a height of a region to be encoded/decoded of the current block that is not an nth power of 2 (2)N) In the form of (1).

When the boundary processing information has the second value, at least one of the first to twelfth examples is used.

When the boundary processing information has the third value, at least one of the first to twelfth examples other than the example for the case where the boundary processing information has the second value is used.

When the boundary processing information has the nth value, at least one of the first to twelfth examples except for the example for the case where the boundary processing information has the second to N-1 th values is used.

When the boundary processing information has the M-th value, an example of combining at least two of the first to twelfth examples is used.

When the boundary processing information has a first value, encoding/decoding may be performed on a remaining area outside an area beyond the boundary within the current block.

In addition, when the boundary processing information does not have the first value, the current block may be implicitly partitioned by using at least one of the first to twelfth examples, or encoding/decoding of the current block may be performed by entropy-encoding/decoding information on the partitions.

By using at least one of the above examples of performing block partitioning on the boundary of picture/sprite/slice/parallel block/partition, etc., block partitioning is efficiently performed in a form that minimizes determination of various complex conditions, complexity in performing block partitioning can be reduced.

In addition, the size of the minimum quad-tree block may represent the minimum size of the quad-tree. In addition, the size of the maximum quad-tree block may represent the maximum size of the quad-tree. In addition, the size of the minimum binary tree block may represent the minimum size of the binary tree. Additionally, the size of the largest binary tree block may represent the largest size of the binary tree.

At least one of a minimum size of the quad-tree block, a maximum size of the quad-tree block, a minimum size of the binary-tree block, and a maximum size of the binary-tree block may be determined based on at least one encoding parameter of the current block. In addition, at least one of the minimum size of the quad-tree block, the maximum size of the quad-tree block, the minimum size of the binary-tree block, and the maximum size of the binary-tree block may be a value preset in the encoder/decoder or a value signaled from the encoder to the decoder.

At least one encoding parameter of a neighboring block in the block partition structure may be used as the at least one encoding parameter of the current block.

For example, at least one of information on a unit partition of an adjacent block, whether to perform a partition in a quadtree form, whether to perform a partition in a binary tree form, a partition direction (horizontal direction or vertical direction) in a binary tree form, a partition form (symmetric partition or asymmetric partition) in a binary tree form, a partition ratio in a binary tree form, whether to perform a partition in a ternary tree form, a partition direction (horizontal direction or vertical direction) in a ternary tree form, a partition form (symmetric partition or asymmetric partition) in a ternary tree form, and a partition ratio in a ternary tree form may be used as information on a unit partition of a current block, whether to perform a partition in a quadtree form, whether to perform a partition in a binary tree form, a partition direction in a binary tree form, a partition form in a binary tree form, a partition ratio in a binary tree form, whether to perform a partition in a ternary tree form, whether to perform a partition in a current block, At least one of information of a partition direction in the form of a ternary tree, a partition form in the form of a ternary tree, and a partition ratio in the form of a ternary tree.

At least one encoding parameter of a neighboring block in the block partition structure may be used to derive at least one encoding parameter of the current block.

For example, at least one of the neighboring blocks with respect to the unit partition, whether to perform the partition in the form of a quadtree, whether to perform the partition in the form of a binary tree, the partition direction in the form of a binary tree, the partition form in the form of a binary tree, the partition ratio in the form of a binary tree, whether to perform the partition in the form of a ternary tree, the partition direction in the form of a ternary tree, the partition information in the form of a ternary tree, and the partition ratio in the form of a ternary tree may be used to derive the current block with respect to the unit, at least one of information on whether to perform the partition in the form of a quad tree, whether to perform the partition in the form of a binary tree, a partition direction in the form of a binary tree, a partition form in the form of a binary tree, a partition ratio in the form of a binary tree, whether to perform the partition in the form of a ternary tree, a partition direction in the form of a ternary tree, a partition form in the form of a ternary tree, and a partition ratio in the form of a ternary tree.

Here, deriving the at least one encoding parameter of the current block using the at least one encoding parameter of the neighboring block may mean determining the at least one encoding parameter of the current block by using the at least one encoding parameter of the neighboring block.

The at least one coding parameter of a neighboring block in the block partition structure may be used to derive the at least one coding parameter of another block.

For example, at least one of the information of the neighboring blocks regarding the unit partition, whether to perform the partition in the form of a quadtree, whether to perform the partition in the form of a binary tree, the partition direction in the form of a binary tree, the partition form in the form of a binary tree, the partition ratio in the form of a binary tree, whether to perform the partition in the form of a ternary tree, the partition direction in the form of a ternary tree, the partition form in the form of a ternary tree, and the partition ratio in the form of a ternary tree may be used to derive the partition regarding the unit of another block, at least one of information on whether to perform the partition in the form of a quad tree, whether to perform the partition in the form of a binary tree, a partition direction in the form of a binary tree, a partition form in the form of a binary tree, a partition ratio in the form of a binary tree, whether to perform the partition in the form of a ternary tree, a partition direction in the form of a ternary tree, a partition form in the form of a ternary tree, and a partition ratio in the form of a ternary tree.

Here, deriving the at least one coding parameter of the other block using the at least one coding parameter of the neighboring block may represent determining the at least one coding parameter of the other block by using the at least one coding parameter of the neighboring block.

At least one encoding parameter of a neighboring block in the block partition structure may be used for intra prediction of the current block.

For example, at least one of an intra prediction mode, an intra prediction direction, a reference sample filtering method, a prediction block filter tap, and a prediction block filtering coefficient of the neighboring block may be used for intra prediction of the current block.

At least one encoding parameter of a neighboring block in the block partition structure may be used for inter prediction or motion compensation of the current block.

For example, at least one of an inter prediction mode, motion information, a motion vector, a reference picture index, an inter prediction direction, an inter prediction indicator, a reference picture list, a motion vector predictor, a motion vector candidate list, whether to use a merge mode, a merge candidate list, whether to use a skip mode, an interpolation filter type, an interpolation filter tap, and an interpolation filter coefficient may be used for inter prediction or motion compensation of the current block.

At least one encoding parameter of a neighboring block in the block partition structure may be used for transform, inverse transform, quantization, or inverse quantization of the current block. Here, the transformation and the inverse transformation may include at least one of a first transformation, a second transformation, a first inverse transformation, and a second inverse transformation.

For example, at least one of a transform type, a transform size, information on whether a first transform is used, information on whether a second transform is used, a first transform index, a second transform index, information on whether a residual signal is present, a coded block mode, a coded block flag, a quantization parameter, a quantization matrix of a neighboring block may be used for transform, inverse transform, quantization, or inverse quantization of the current block.

At least one encoding parameter of a neighboring block in the block partition structure may be used for entropy encoding/decoding of the current block.

For example, at least one of the neighboring blocks with respect to the unit partition, whether to perform the partition in the form of a quadtree, whether to perform the partition in the form of a binary tree, the partition direction in the form of a binary tree, the partition form in the form of a binary tree, the partition ratio in the form of a binary tree, whether to perform the partition in the form of a ternary tree, the partition direction in the form of a ternary tree, the information in the form of the partition in the form of a ternary tree, and the partition ratio in the form of a ternary tree may be used to partition the current block with respect to the unit, at least one of information on whether to perform the partition in the form of a quadtree, whether to perform the partition in the form of a binary tree, a partition direction in the form of a binary tree, a partition form in the form of a binary tree, a partition ratio in the form of a binary tree, whether to perform the partition in the form of a ternary tree, a partition direction in the form of a ternary tree, a partition form in the form of a ternary tree, and a partition ratio in the form of a ternary tree is entropy-encoded/decoded. Here, the entropy encoding/decoding may include determining a binarization/debinarization method, determining a context model, updating the context model, performing a normal mode, performing a bypass mode, and the like.

At least one coding parameter of a neighboring block in the block partition structure may be used for a method of performing filtering on the current block (such as an in-loop filter, a deblocking filter, an adaptive sample offset, an adaptive in-loop filter, etc.).

For example, at least one of whether an in-loop filter is applied, in-loop filter coefficients, in-loop filter taps, in-loop filter shapes, in-loop filter forms, whether a deblocking filter is applied, deblocking filter coefficients, deblocking filter taps, deblocking filter strengths, deblocking filter shapes, deblocking filter forms, whether an adaptive sample offset is applied, adaptive sample offset values, adaptive sample offset classes, adaptive sample offset types, whether an adaptive in-loop filter is applied, adaptive in-loop filter coefficients, adaptive in-loop filter taps, adaptive in-loop filter shapes, and adaptive in-loop filter forms of neighboring blocks may be used in a method of performing filtering on a current block (such as a deblocking filter, adaptive sample offset, adaptive in-loop filter, etc.).

At least one coding parameter of a neighboring block in the block partition structure may be used for intra prediction, inter prediction or motion compensation, entropy coding/decoding, and filtering methods (such as an in-loop filter, a deblocking filter, an adaptive sample offset, an adaptive in-loop filter, etc.) of another neighboring block.

At least one encoding parameter of a luminance signal block in the block partition structure may be used as at least one encoding parameter of a chrominance signal block. In addition, at least one coding parameter of a luminance signal block in the block partition structure may be used to derive at least one coding parameter of a chrominance signal block. In addition, the at least one coding parameter of the luminance signal block in the block partition structure may be used for at least one of intra prediction, inter prediction, motion compensation, transformation, inverse transformation, quantization, inverse quantization, entropy coding/decoding, in-loop filter, deblocking filter, adaptive sample offset, adaptive in-loop filter of the chrominance signal block.

At least one encoding parameter of the Cb/Cr signal block in the block partition structure may be used as at least one encoding parameter of the Cb/Cr signal block. In addition, the at least one encoding parameter of the Cb/Cr signal block in the block partition structure may be used to derive the at least one encoding parameter of the Cb/Cr block signal. In addition, the at least one encoding parameter of the Cb/Cr signal block in the block partition structure may be used for at least one of intra prediction, inter prediction, motion compensation, transformation, inverse transformation, quantization, inverse quantization, entropy encoding/decoding, in-loop filter, deblocking filter, adaptive sample offset, adaptive in-loop filter of the Cr/Cb signal block.

For each of the result blocks obtained by using the above block partition structure, at least one encoding parameter and information described below may be entropy-encoded/decoded. In addition, the method indicated by the following information may be performed based on at least one of a block size and a block shape of at least one piece of entropy encoding/decoding information.

The motion information may include at least one of: motion vectors, reference picture indices, inter prediction indicators, information on whether skip mode is used (skip _ flag), information on whether merge mode is used (merge _ flag), merge index information (merge _ index), information on motion vector resolution, information on overlapped block motion compensation, information on local illumination compensation, information on affine motion compensation, information on decoder-side motion vector derivation, and information on bi-directional optical flow.

The information on the resolution of the motion vector may be information indicating whether at least one of the motion vector and the difference between the motion vectors uses a specific resolution. Here, the resolution may represent precision. In addition, the specific resolution may be set in at least one of an integer pixel (integer pel) unit, 1/2 pixel (1/2pel) unit, 1/4 pixel (1/4pel) unit, 1/8 pixel (1/8pel) unit, 1/16 pixel (1/16pel) unit, 1/32 pixel (1/32pel) unit, and 1/64 pixel (1/64pel) unit.

The information on the overlapped block motion compensation may indicate whether a motion vector of a neighboring block spatially adjacent to the current block is additionally used in order to calculate a weighted sum of the prediction block of the current block when motion compensation is performed on the current block.

The information on the local illumination compensation may be information indicating whether at least one of a weighting factor and an offset value is applied when generating the prediction block of the current block. Here, the weighting factor and the offset value may be values calculated based on the reference block.

The information on the affine motion compensation may be information representing whether an affine motion model is used when performing motion compensation on the current block. Herein, the affine motion model may be a model calculated by partitioning one block into sub-blocks using a plurality of parameters and by calculating a motion vector of the sub-blocks using a representative motion vector.

The information on the decoder-side motion vector derivation may be information indicating whether a motion vector required for motion compensation is derived and used in the decoder. The information on the motion vector may not be entropy encoded/decoded based on the information on the decoder-side motion vector derivation. In addition, when the information on the decoder-side motion vector derivation indicates that a motion vector is derived and used in the decoder, the information on the merge mode may be entropy-encoded/decoded. In other words, the information on the decoder-side motion vector derivation may indicate whether the merge mode is used in the decoder.

The information on the bidirectional optical flow may be information indicating whether to perform motion compensation by correcting a motion vector on a pixel or sub-block basis. The pixel or sub-block based motion vectors may not be entropy encoded/decoded based on information about bi-directional optical flow. Here, correcting the motion vector may be replacing a block-based motion vector with a pixel-or sub-block-based motion vector value.

Fig. 11 is a diagram illustrating a flowchart of a method of decoding an image according to an embodiment of the present invention.

In S1101, information regarding a block partition of a current block included in a current picture may be decoded from a bitstream.

Here, the information on the block partition may include at least one of information on a current block size, information on a current block depth, and information on whether to perform the partition.

At S1102, a partition method of the current block may be determined based on information regarding block partitions.

Here, the partitioning method may include at least one of a quad tree partition, a horizontal binary tree partition, a vertical binary tree partition, a horizontal ternary tree partition, and a vertical ternary tree partition.

At S1103, the current block may be partitioned by using the determined partition method.

Here, the partition method may be determined based on whether the current block includes a predetermined boundary.

Here, the predetermined boundary may include at least one of a right boundary, a lower boundary, a left boundary, and an upper boundary of a picture, a sub-picture, a slice, a parallel block, and a partition to which the current block belongs.

In addition, when the current block includes a right side boundary and a lower boundary of the current picture and the width of the current block is greater than the size of the minimum quad-tree block, the partition method may be determined as a quad-tree partition.

In addition, when the current block includes a right side boundary of the current picture and the height of the current block is greater than the size of the maximum transform block, the partition method may be determined as a partition other than the vertical binary tree partition.

In addition, when the current block includes a lower boundary of the current picture and the width of the current block is greater than the size of the maximum transform block, the partition method may be determined as a partition other than the horizontal binary tree partition.

In addition, when the width of the current block is equal to or less than the size of the maximum transform block and the height of the current block is greater than the size of the maximum transform block, the partition method may be determined as a partition other than the vertical binary tree partition.

In addition, when the height of the current block is equal to or less than the size of the maximum transform block and the width of the current block is greater than the size of the maximum transform block, the partition method may be determined as a partition other than the horizontal binary tree partition.

Here, the size of the maximum transform block may be a value signaled from the encoder to the decoder.

Fig. 12 is a diagram of a flowchart of an image encoding method according to an embodiment of the present invention.

In S1201, a partition method of a current block included in a current picture may be determined.

At S1202, the current block may be partitioned by using the determined partition method.

Here, the partitioning method may include at least one of a quad tree partition, a horizontal binary tree partition, a vertical binary tree partition, a horizontal ternary tree partition, and a vertical ternary tree partition.

Here, the partition method may be determined based on whether the current block includes a predetermined boundary.

Here, the predetermined boundary may include at least one of a right boundary, a lower boundary, a left boundary, and an upper boundary of a picture, a sub-picture, a slice, a parallel block, and a partition to which the current block belongs.

In addition, when the current block includes a right side boundary and a lower boundary of the current picture and the width of the current block is greater than the size of the minimum quad-tree block, the partition method may be determined as a quad-tree partition.

In addition, when the current block includes a right side boundary of the current picture and the height of the current block is greater than the size of the maximum transform block, the partition method may be determined as a partition other than the vertical binary tree partition.

In addition, when the current block includes a lower boundary of the current picture and the width of the current block is greater than the size of the maximum transform block, the partition method may be determined as a partition other than the horizontal binary tree partition.

In addition, when the width of the current block is equal to or less than the size of the maximum transform block and the height of the current block is greater than the size of the maximum transform block, the partition method may be determined as a partition other than the vertical binary tree partition.

In addition, when the height of the current block is equal to or less than the size of the maximum transform block and the width of the current block is greater than the size of the maximum transform block, the partition method may be determined as a partition other than the horizontal binary tree partition.

Here, the size of the maximum transform block may be a value signaled from the encoder to the decoder.

At S1203, information regarding block partitioning of the above partitioning method may be encoded.

Here, the information on the block partition may include at least one of information on a current block size, information on a current block depth, and information on whether to perform the partition.

At least one of the above examples of the coding unit may be used when the image is partitioned based on at least one of a Prediction Unit (PU), a Transform Unit (TU), a Prediction Block (PB), and a Transform Block (TB).

The above examples of the present invention may be applied according to at least one size of the coding block, the prediction block, the block, and the unit. Here, the size may be defined as a minimum size and/or a maximum size such that the above example is applied, or as a fixed size to which the above example is applied. In addition, in the above example, the first example may be applied to the first size, and the second example may be applied to the second size. In other words, the above examples may be combined according to size. In addition, the above examples of the present invention may be applied when the size is equal to or greater than the minimum size and equal to or less than the maximum size. In other words, when the block size is included in a specific range, the above example may be applied.

In addition, the above examples of the present invention may be applied when the size is equal to or greater than the minimum size and equal to or less than the maximum size. Here, the minimum size and the maximum size may be one size of a coding block, a prediction block, a block, and a unit, respectively. In other words, the minimum-sized block and the maximum-sized block may be different from each other. For example, the above examples of the present invention may be applied when the size of the current block is equal to or greater than the minimum size of the prediction block and equal to or less than the maximum size of the encoding block.

For example, the above example of the present invention may be applied when the size of the current block is equal to or greater than 8 × 8. For example, the above example of the present invention may be applied when the size of the current block is equal to or greater than 16 × 16. For example, the above example of the present invention may be applied when the size of the current block is equal to or greater than 32 × 32. For example, the above example of the present invention may be applied when the size of the current block is equal to or greater than 64 × 64. For example, the above example of the present invention may be applied when the size of the current block is equal to or greater than 128 × 128. For example, the above example of the present invention may be applied when the size of the current block is 4 × 4. For example, the above example of the present invention may be applied when the size of the current block is equal to or smaller than 8 × 8. For example, the above example of the present invention may be applied when the size of the current block is equal to or smaller than 16 × 16. For example, the above example of the present invention may be applied when the size of the current block is equal to or greater than 8 × 8 and equal to or less than 16 × 16. For example, the above example of the present invention may be applied when the size of the current block is equal to or greater than 16 × 16 and equal to or less than 64 × 64.

The above examples of the present invention may be applied according to temporal layers. Additional identifiers for identifying temporal layers to which the above examples may apply may be signaled and the above examples may be applied to temporal layers specified by the respective identifiers. Here, the identifier may be defined as a minimum layer and/or a maximum layer to which the above example may be applied, or as a specific temporal layer indicating that the above example may be applied.

For example, the above example can be applied only when the temporal layer of the current picture is the lowest layer. For example, the above example can be applied only when the identifier of the temporal layer of the current picture is zero. For example, the above example can be applied only when the identifier of the temporal layer of the current picture is 1. For example, the above example can be applied only when the temporal layer of the current picture is the highest layer.

As described in the above examples of the present invention, the reference picture set used when generating the reference picture list (reference picture list construction) and modifying the reference picture list may use at least one of the reference picture lists L0, L1, L2, and L3.

According to the above example of the present invention, at least 1 to at most N motion vectors of the current block may be used when calculating the boundary strength in the deblocking filter. Here, N may represent a positive integer equal to or greater than 1 (such as 2, 3, 4, etc.).

The above example of the present invention may be applied when the motion vector has at least one of a 16 pixel (16pel) unit, an 8 pixel (8pel) unit, a 4 pixel (4pel) unit, an integer pixel (integer pel) unit, an 1/2 pixel (1/2pel) unit, an 1/4 pixel (1/4pel) unit, a 1/8 pixel (1/8pel) unit, an 1/16 pixel (1/16pel) unit, a 1/32 pixel (1/32pel) unit, and a 1/64 pixel (1/64pel) unit. In addition, when encoding/decoding the current block, the motion vector may be selectively used for each pixel unit.

The above examples of the present invention may be applied according to a band type.

The block shapes of the above examples to which the present invention may be applied may be square or non-square.

The above examples may be performed in the same way in the encoder and decoder.

The image may be encoded/decoded by using at least one of the above examples or by combining at least two of the above examples.

The order in which the above examples are applied in the encoder and decoder may be different, or the order in which the examples are applied in the encoder and decoder may be the same.

The above example may be performed for each of the luminance signal and the chrominance signal, or may be performed in the same manner for the luminance signal and the chrominance signal.

At least one of the syntax elements (such as flags, indices, etc.) that are entropy encoded in the encoder and entropy decoded in the decoder may use at least one of: binarization, debinarization and entropy coding/decoding methods. Here, the binarization, debinarization, and entropy encoding/decoding method may include at least one of: signed 0-order exp _ Golomb binarization/debinarization method (se (v)), signed k-order exp _ Golomb binarization/debinarization method (sek (v)), unsigned positive integer 0-order exp _ Golomb binarization/debinarization method (ue (v)), unsigned positive integer k-order exp _ Golomb binarization/debinarization method (uek (v)), fixed length binarization/debinarization method (f (n)), truncated rice binarization/debinarization method or truncated unary binarization/debinarization method (tu (v)), binary truncated binarization/debinarization method (tb (v)), context-based adaptive arithmetic coding/decoding method (ae (v)), byte-by-byte bit string (b (8)), signed integer/debinarization method (i (n)), and, Unsigned integer binarization/debinarization methods (u (n)), and unary binarization/debinarization methods.

The encoding/decoding of the current block is not limited to any one of the above examples, and a specific example or a combination thereof of the above examples may be applied to the encoding/decoding of the current block.

In the above-described embodiments, the method is described based on the flowchart having a series of steps or units, but the present invention is not limited to the order of the steps, and some steps may be performed simultaneously with other steps or in a different order. In addition, those of ordinary skill in the art will appreciate that the steps in the flowcharts are not mutually exclusive, and that other steps may be added to the flowcharts or certain steps may be deleted from the flowcharts without affecting the scope of the present invention.

Embodiments include various aspects of examples. Not all possible combinations for the various aspects may be described, but those skilled in the art will recognize different combinations. Accordingly, the present invention is intended to embrace all such alternatives, modifications and variances that fall within the scope of the appended claims.

Embodiments of the present invention may be implemented in the form of program instructions that are executable by various computer components and recorded in computer-readable recording media. The computer readable recording medium may include individual program instructions, data files, data structures, etc., or a combination of program instructions, data files, data structures, etc. The program instructions recorded in the computer-readable recording medium may be specially designed and constructed for the present invention or well known to those skilled in the computer software art. Examples of the computer-readable recording medium include: magnetic recording media (such as hard disks, floppy disks, and magnetic tape); optical data storage media (such as CD-ROM or DVD-ROM); magnetically optimized media (such as optical floppy disks); and hardware devices that are specifically configured to store and implement program instructions (such as Read Only Memory (ROM), Random Access Memory (RAM), flash memory, etc.). Examples of the program instructions include not only machine language code formatted by a compiler, but also high-level language code that may be implemented by a computer using an interpreter. The hardware devices may be configured to be operated by one or more software modules to perform a process according to the present invention, or vice versa.

Although the present invention has been described in terms of specific items such as detailed elements, and limited embodiments and drawings, they are provided only to assist in a more comprehensive understanding of the present invention, and the present invention is not limited to the above-described embodiments. It will be understood by those skilled in the art that various modifications and changes may be made in light of the above description.

Therefore, the spirit of the present invention should not be limited to the above-described embodiments, and the entire scope of the appended claims and their equivalents will fall within the scope and spirit of the present invention.

INDUSTRIAL APPLICABILITY

The invention can be used for encoding or decoding images.

59页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:图像处理装置、方法和程序

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类