Image split method for image encoding and decoding and apparatus thereof

The method optimizes video encoding and decoding by determining partitioning modes for coded blocks of different color components, addressing the challenge of encoding high-resolution and high-quality video at low bit rates.

JP2024133700AActive Publication Date: 2024-10-02SAMSUNG ELECTRONICS CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2024111809
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-05-10
Filing Date
2024-07-11
Publication Date
2024-10-02
Estimated Expiration
2039-05-10

AI Technical Summary

Technical Problem

Existing video encoding and decoding methods struggle to efficiently encode and decode high-resolution and high-quality video at low bit rates, particularly due to inefficient video segmentation techniques.

Method used

A method for video decoding that involves determining partitioning modes for coded blocks of different color components based on information extracted from a bitstream, allowing for efficient division and decoding of video data units.

Benefits of technology

Enables efficient video encoding and decoding at low bit rates by optimizing the partitioning of video data units, thereby improving the encoding efficiency of high-resolution and high-quality video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024133700000001_ABST
    Figure 2024133700000001_ABST
Patent Text Reader

Abstract

To provide a method and an apparatus for encoding and decoding an image at a low bit rate through efficient split of the image.SOLUTION: A method for decoding an image includes steps of: determining a first coding block and a second coding block corresponding to the first coding block; obtaining first split shape mode information and second split shape mode information from a bitstream when size of the first coding block is less than or equal to predetermined size; and determining a split mode of the first coding block based on the first split shape mode information, and determining a split mode of the second coding block based on the second split shape mode information; and decoding the coding block of a first color component determined based on the split mode of the first coding block and the coding block of a second color component determined based on the split mode of the second coding block.SELECTED DRAWING: Figure 23
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the field of video encoding and decoding, and more particularly to a method and apparatus for dividing an image for efficient encoding and decoding of the image. [Background technology]

[0002] 2. Description of the Related Art With the development of hardware capable of playing and storing high-resolution and high-quality images, there is an increasing need for codecs capable of effectively encoding and decoding high-resolution and high-quality images.

[0003] Recently, methods for effectively encoding such high-resolution and high-quality images have been proposed, such as a method of encoding an image after processing the image to be encoded in an arbitrary manner.

[0004] In order to encode an image, various data units are used, and there may be an inclusion relationship between such data units. In order to determine the size of the data units used for encoding the image, the data units may be divided in various ways, and an optimized data unit may be determined according to image characteristics, after which the image may be encoded and decoded. Summary of the Invention [Problem to be solved by the invention]

[0005] According to one embodiment, a video partitioning method and apparatus therefor address the technical problem of encoding and decoding video at low bit rates through efficient partitioning of video. [Means for solving the problem]

[0006] According to an embodiment, a method for decoding an image may include a step of determining a first coded block of a first color component divided from an image and a second coded block of a second color component corresponding to the first coded block; if a size of the first coded block is equal to or smaller than a predetermined size, a step of acquiring first partition mode information for the first coded block and second partition mode information for the second coded block from a bitstream; determining a partition mode of the first coded block based on the first partition mode information and determining a partition mode of the second coded block based on the second partition mode information; and a step of decoding the coded block of the first color component determined based on the partition mode of the first coded block and the coded block of the second color component determined based on the partition mode of the second coded block based on information acquired from the bitstream. Effect of the Invention

[0007] An image division method and apparatus according to an embodiment of the present invention can encode and decode an image at a low bit rate through efficient division of the image.

[0008] However, the effects that can be achieved by the image division method and apparatus according to one embodiment are not limited to those mentioned above, and other effects not mentioned will be clearly understood by those skilled in the art in the technical field to which the present disclosure pertains from the following description. [Brief description of the drawings]

[0009] In order to provide a more complete understanding of the drawings referred to herein, a brief description of each drawing is provided. [Figure 1] FIG. 2 is a block diagram of a video decoding device according to an embodiment. [Diagram 2] 1 is a block diagram of a video encoding device according to an embodiment; [Diagram 3]1 is a diagram illustrating a process in which a video decoding apparatus divides a current coding unit and determines at least one coding unit, according to an embodiment. [Figure 4] 1 is a diagram illustrating a process in which a video decoding apparatus divides a non-square coding unit and determines at least one coding unit, according to an embodiment. [Diagram 5] 1 is a diagram illustrating a process in which a video decoding apparatus divides a coding unit based on at least one of block configuration information and partition configuration mode information, according to an embodiment. [Figure 6] 1 is a diagram illustrating a method for a video decoding apparatus to determine a predetermined coding unit among an odd number of coding units, according to an embodiment. [Figure 7] 1 is a diagram illustrating an order in which a plurality of coding units are processed when a video decoding apparatus divides a current coding unit to determine the plurality of coding units, according to an embodiment; [Figure 8] 11 is a diagram illustrating a process in which a video decoding apparatus determines that a current coding unit is to be divided into an odd number of coding units when coding units cannot be processed in a predetermined order, according to an embodiment. [Figure 9] 1 is a diagram illustrating a process in which a video decoding apparatus divides a first coding unit and determines at least one coding unit, according to an embodiment. [Figure 10] 11 is a diagram illustrating that, according to one embodiment, a video decoding device restricts the manner in which a second coding unit may be divided when a non-square second coding unit determined by dividing a first coding unit satisfies a certain condition. [Figure 11] 13 is a diagram illustrating a process in which a video decoding device divides a square-shaped coding unit when partition mode information does not indicate that the coding unit is to be divided into four square-shaped coding units, according to one embodiment. [Figure 12] 11 is a diagram illustrating that a processing order among a plurality of coding units may differ depending on a division process of the coding units, according to an embodiment. [Figure 13]11 is a diagram illustrating a process of determining a depth of a coding unit when a coding unit is recursively divided to determine a plurality of coding units according to an embodiment, in which the shape and size of the coding unit change. [Figure 14] 1 is a diagram illustrating a depth determined according to a type and size of a coding unit and an index (PID: part index) for a coding unit partition, according to an embodiment. [Figure 15] 1 is a diagram illustrating a plurality of coding units being determined based on a plurality of predetermined data units included in an image, according to an embodiment; [Figure 16] 1 is a diagram illustrating processing blocks that are used as a reference for determining a determination order of reference coding units included in a video, according to an embodiment; [Figure 17] 11 is a diagram illustrating coding units that may be determined for each image when combinations of forms into which the coding units may be divided vary for each image, according to an embodiment; [Figure 18] 1 illustrates various types of coding units that can be determined based on partition mode information that is also expressed by a binary code, according to an embodiment. [Figure 19] 11 is a diagram illustrating another type of coding unit determined based on partition mode information expressed by a binary code, according to an embodiment; [Figure 20] 1 is a block diagram of an image encoding system and a video decoding system that perform loop filtering; [Figure 21] 1 is a diagram illustrating a method of dividing a coding unit according to an embodiment; [Figure 22] 1 is a diagram illustrating a method for determining a transform unit from a coding unit according to an embodiment; [Figure 23] 1 is a flow chart illustrating a video decoding method according to an embodiment. [Figure 24] 1 is a flow chart illustrating a video encoding method according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] According to one embodiment of the present disclosure, a method for decoding an image may include a step of determining a first coded block of a first color component divided from an image and a second coded block of a second color component corresponding to the first coded block; if a size of the first coded block is equal to or smaller than a predetermined size, a step of acquiring first partition mode information for the first coded block and second partition mode information for the second coded block from a bitstream; a step of determining a partition mode of the first coded block based on the first partition mode information and determining a partition mode of the second coded block based on the second partition mode information; and a step of decoding the coded block of the first color component determined based on the partition mode of the first coded block and the coded block of the second color component determined based on the partition mode of the second coded block based on information acquired from the bitstream.

[0011] In one embodiment, the method may further include determining a partition mode of the first coded block and the second coded block to a default partition mode if the size of the first coded block is larger than a predetermined size, and decoding the coded block of a first color component determined from the first coded block and the coded block of a second color component determined from the second coded block based on information obtained from the bitstream according to the default partition mode.

[0012] The image decoding method may further include a step of independently determining partition modes of the first color component coded block and the corresponding second color component coded block based on first partition mode information and second partition mode information obtained from the bitstream, if a size of the first color component coded block determined from the first coded block according to the default partition mode is equal to or smaller than the predetermined size.

[0013] The second coding block is recursively split, but if the size of a child coding block of the second color component coding block determined by the recursive split of the second coding block is less than a minimum size, the split of the second color component coding block is not allowed.

[0014] The maximum allowable depth of the first coded block is greater than the maximum allowable depth of the second coded block.

[0015] The image decoding method may further include determining a partition mode of a coding block of the first color component determined from the first coding block, taking into account a partition mode of the first coding block.

[0016] The image decoding method may further include a step of determining an allowable partition mode for the coded block of the first color component based on at least one of a block type of the coded block of the first color component determined from the first coded block and a block type of a child coded block that may be determined from the coded block of the first color component, and a step of not parsing information necessary to distinguish between the allowable partition modes and an inallowable partition mode for the coded block of the first color component from the bitstream.

[0017] If the coding block of the first color component determined from the first coding block corresponds to a coding block at a predetermined position among the coding blocks ternary divided from the first coding block, division of the coding block of the first color component is not permitted.

[0018] The method of decoding the image includes: n If the width or width is 2, n The method may further include inverse transforming transform coefficients of a coding block corresponding to

[0019] The method of decoding the image includes: n If the prediction mode of the coding block of the first color component does not correspond to the first color component, the method may further include determining a prediction mode that does not require inverse transformation.

[0020] The method of decoding the image includes: n , determining the transform coefficients of the transform block to be 0 or to a DC value obtained from the bitstream.

[0021] The width or width of the coding block of the first color component is 2 n If it does not correspond to n The image is also divided into at least one coding block corresponding to

[0022] According to one embodiment of the present disclosure, a video decoding device may include a bitstream acquisition unit that acquires a bitstream including a result of encoding the video, and a decoding unit that determines a first encoded block of a first color component and a second encoded block of a second color component corresponding to the first encoded block, and if a size of the first encoded block is equal to or smaller than a predetermined size, acquires first partition mode information for the first encoded block and second partition mode information for the second encoded block from the bitstream, determines a partition mode of the first encoded block based on the first partition mode information, determines a partition mode of the second encoded block based on the second partition mode information, and decodes the encoded block of the first color component determined based on the partition mode of the first encoded block and the encoded block of the second color component determined based on the partition mode of the second encoded block based on information acquired from the bitstream.

[0023] According to one embodiment of the present disclosure, a method for encoding an image may include a step of determining a first encoded block of a first color component divided from an image and a second encoded block of a second color component corresponding to the first encoded block; if a size of the first encoded block is equal to or smaller than a predetermined size, a step of determining a first partition mode for the first encoded block and a second partition mode for the second encoded block; a step of encoding the encoded block of the first color component determined based on the partition mode of the first encoded block and the encoded block of the second color component determined based on the partition mode of the second encoded block; and a step of generating a bitstream including first partition mode information indicating the first partition mode and second partition mode information indicating the second partition mode.

[0024] The present disclosure can be modified in various ways and can have various embodiments, but specific embodiments are illustrated in the drawings and will be described in detail through detailed descriptions. However, they are not intended to limit the embodiments of the present disclosure, and the present disclosure should be understood to include all modifications, equivalents, or alternatives included in the spirit and technical scope of the various embodiments.

[0025] In the description of the present embodiment, if it is determined that a detailed description of related prior art may unnecessarily obscure the gist of the present disclosure, the detailed description will be omitted. In addition, numbers (e.g., first, second, etc.) used in the description of the specification are merely identification symbols for distinguishing one component from another.

[0026] In addition, when a component is referred to as being "coupled" or "connected" to another component in this specification, it should be understood that the component may be directly coupled or connected to the other component, but unless specifically stated to the contrary, it may also be coupled or connected via another component in between.

[0027] In addition, in this specification, a component expressed as a "unit" or "module" may mean that two or more components are combined into one component, or one component is further divided into two or more components according to function. In addition, each component described below may additionally perform some or all of the functions of other components in addition to its own main function, and it goes without saying that some of the main functions of each component may be exclusively performed by other components.

[0028] Additionally, in this specification, an "image" or "picture" can refer to a still or moving image of a video, i.e., the video itself.

[0029] In addition, in this specification, a "sample" refers to data assigned to a sampling position of an image and to be processed. For example, in a spatial domain image, a pixel value and a transform coefficient in a transform domain are also samples. A unit including at least one such sample can be defined as a block.

[0030] In the following, with reference to FIGS. 1 to 24, a video encoding method and apparatus therefor, and a video decoding method and apparatus therefor based on a tree-structured coding unit and a transform unit according to an embodiment are disclosed.

[0031] FIG. 1 illustrates a block diagram of a video decoder 100 according to one embodiment.

[0032] The video decoding device 100 may include a bitstream obtaining unit 110 and a decoding unit 120 .

[0033] The bitstream obtaining unit 110 and the decoding unit 120 may each include at least one processor, and may also include a memory that stores instructions to be executed by the at least one processor.

[0034] The bitstream acquiring unit 110 may receive a bitstream. The bitstream includes information obtained by encoding a video by a video encoding device 200, which will be described later. The bitstream may also be transmitted from the video encoding device 200. The video encoding device 200 and the video decoding device 100 may be connected by wire or wirelessly, and the bitstream acquiring unit 110 may receive the bitstream via a wired or wireless network. The bitstream acquiring unit 110 may also receive the bitstream from a recording medium, such as an optical medium or a hard disk.

[0035] The decoder 120 may reconstruct an image based on information acquired from a received bitstream. The decoder 120 may acquire syntax elements for image reconstruction from the bitstream. The decoder 120 may reconstruct an image based on the syntax elements.

[0036] The operation of the decoder 120 will be described in detail. The decoder 120 may perform an operation of acquiring a bin string corresponding to a partition mode of a coding unit from a bitstream. The decoder 120 may then perform an operation of determining a partition rule for the coding unit. The decoder 120 may also perform an operation of partitioning the coding unit into a plurality of coding units based on at least one of the bin string corresponding to the partition mode and the partition rule.

[0037] In the following, the division of coding units according to one embodiment of the present disclosure will be described in detail.

[0038] First, an image is divided into one or more slices or one or more tiles. A slice or a tile is also a sequence of one or more maximal coding units (CTUs). A maximal coding block (CTB) is a concept that contrasts with a maximal coding unit (CTU).

[0039] A maximal coding block (CTB) means an NxN block containing NxN samples, where N is an integer. Each color component is also divided into one or more maximal coding blocks.

[0040] When an image has three sample arrays (sample arrays for Y, Cr, and Cb components), the largest coding unit (CTU) is a unit including the largest coded block of luma samples, the two largest coded blocks of corresponding chroma samples, and a syntax structure used to code the luma samples and chroma samples. When an image is a monochrome image, the largest coding unit is a unit including the largest coded block of monochrome samples and a syntax structure used to code the monochrome samples.

[0041] A CTB is an MxN coding block that contains MxN samples. The signal is also divided into coding blocks (M and N are integers).

[0042] When an image has a sample array for each of Y, Cr, and Cb components, a coding unit (CU) is a unit including a coding block of luma samples, two coding blocks of corresponding chroma samples, and a syntax structure used to code the luma samples and chroma samples. When an image is a monochrome image, a coding unit is a unit including a coding block of monochrome samples and a syntax structure used to code the monochrome samples.

[0043] As described above, the largest coding block and the largest coding unit are distinct concepts, and the coding block and the coding unit are distinct concepts. That is, the (largest) coding unit refers to a data structure including a (largest) coding block including samples and a syntax structure corresponding thereto. However, since a person skilled in the art can understand that the (largest) coding unit or the (largest) coding block refers to a block of a predetermined size including a predetermined number of samples, in the following description, the largest coding block and the largest coding unit, or the coding block and the coding unit, will be referred to without distinction unless there are special circumstances.

[0044] The image is also divided into maximum coding units (CTUs). The size of the maximum coding units is also determined based on information obtained from the bitstream. The shape of the maximum coding units may have a square shape of the same size, but is not limited thereto.

[0045] For example, information regarding a maximum size of a luma coding block may be obtained from a bitstream, where the maximum size of the luma coding block indicated by the information regarding the maximum size of the luma coding block may be one of 4x4, 8x8, 16x16, 32x32, 64x64, 128x128, and 256x256.

[0046] For example, information on a maximum size of a luma coding block that can be divided into two and information on a luma block size difference may be obtained from a bitstream. The information on the luma block size difference may indicate a size difference between the largest luma coding block and the largest luma coding block that can be divided into two. Thus, the size of the luma largest coding block may be determined by combining the information on the maximum size of a luma coding block that can be divided into two obtained from the bitstream and the information on the luma block size difference. The size of the chroma largest coding block may also be determined by using the size of the luma largest coding block. For example, if the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chroma block is half the size of the luma block, and similarly, the size of the chroma largest coding block is half the size of the luma largest coding block.

[0047] According to an embodiment, since information on the maximum size of a luma coding block that can be binary split is acquired from a bitstream, the maximum size of a luma coding block that can be binary split may be variably determined. In contrast, the maximum size of a luma coding block that can be ternary split may be fixed. For example, in an I image, the maximum size of a luma coding block that can be ternary split is 32x32, and in a P image or a B image, the maximum size of a luma coding block that can be ternary split is 64x64.

[0048] The maximum coding unit is also hierarchically divided into coding units based on partition mode information acquired from the bitstream. As the partition mode information, at least one of information indicating whether or not a multi-split is performed, information indicating whether or not a quad split is performed, partition direction information, and partition type information can be acquired from the bitstream.

[0049] For example, the information indicating whether or not the current coding unit is to be split may indicate whether the current coding unit is not to be split any further (NO_SPLIT) or is to be split (SPLIT).

[0050] When the current coding unit is split, the information indicating whether or not the current coding unit is quad split may indicate whether the current coding unit is quad split (QUAD_SPLIT) or not quad split.

[0051] If the current coding unit is not divided into quads, the division direction information indicates that the current coding unit is divided in one of the horizontal and vertical directions.

[0052] If the current coding unit is split horizontally or vertically, the partition type information indicates that the current coding unit is split by binary partitioning or ternary partitioning.

[0053] The partition mode of the current coding unit may be determined according to the partition direction information and the partition type information. If the current coding unit is binary partitioned horizontally, the partition mode may be determined as binary horizontal partition (SPLIT_BT_HOR), if the current coding unit is ternary partitioned horizontally, the partition mode may be determined as ternary horizontal partition (SPLIT_TT_HOR), if the current coding unit is binary partitioned vertically, the partition mode may be determined as binary vertical partition (SPLIT_BT_VER), and if the current coding unit is ternary partitioned vertically, the partition mode may be determined as ternary vertical partition (SPLIT_BT_VER).

[0054] The decoding unit 120 can obtain the partition mode information from one bin string from the bitstream. The format of the bitstream received by the bitstream obtaining unit 110 may include a fixed length binary code, a unary code, a truncated unary code, a predetermined binary code, etc. The bin string indicates information as a sequence of binary numbers. The bin string is also composed of at least one bit. The decoding unit 120 can obtain the partition mode information corresponding to the bin string based on the partition rule. The decoding unit 120 can determine whether to not partition the coding unit, whether to partition into quads, and the partition direction and partition type based on one bin string.

[0055] A coding unit may be smaller than or equal to a maximum coding unit. For example, the maximum coding unit is also a coding unit having a maximum size, and is therefore also a coding unit. If the partition mode information related to the maximum coding unit indicates that the coding unit is not partitioned, the coding unit determined as the maximum coding unit has the same size as the maximum coding unit. If the partition mode information related to the maximum coding unit indicates that the coding unit is partitioned, the maximum coding unit is also partitioned into coding units. Also, if the partition mode information related to the coding unit indicates partitioning, the coding unit is further partitioned into coding units of smaller sizes. However, the partitioning of an image is not limited thereto, and the maximum coding unit and the coding units cannot be distinguished. The partitioning of coding units will be described in more detail with reference to FIG. 3 to FIG. 16.

[0056] Also, from the coding unit, one or more prediction units for prediction may be determined, the size of the prediction unit being the same as or smaller than the size of the coding unit, and one or more transform units for transformation may be determined, the size of the transform unit being the same as or smaller than the size of the coding unit.

[0057] The shapes and sizes of the transform units and the prediction units are independent of each other.

[0058] In an embodiment, a coding unit may be used as a prediction unit to perform prediction using the coding unit, and a transformation may be performed using the coding unit as a transformation unit.

[0059] Due to various partitioning modes, the width or height of the conversion unit determined from the coding unit is 2 n (n is an integer). In other words, the number of samples arranged along the width or height of the conversion unit is not 2 n The width and height of the transform kernel for inverse transforming the transform coefficients included in the transform unit are 2. n If the width or height is 2 n The transformation kernel cannot be used for inverse transformation of transformation units that do not fall under the . n However, this would require a transformation kernel that does not fall under the above-mentioned range, which would increase the complexity of the transformation and inverse transformation. Therefore, in this disclosure, the width or height of the transformation unit is set to 2 n A method for solving the problem that accurate frequency conversion or inverse conversion cannot be performed due to the above-mentioned problem will be proposed, which will be described later with reference to FIGS.

[0060] Coding unit division is explained in further detail in FIGS.

[0061] FIG. 3 illustrates a process in which the decoder 120 divides a current coding unit to determine at least one coding unit, according to one embodiment.

[0062] The block shape may include 4Nx4N, 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N, where N is a positive integer. The block shape information is information indicating at least one of the shape, direction, width and height ratio, or size of a coding unit.

[0063] The shape of the coding unit may include a square and a non-square. If the width and height of the coding unit are the same (i.e., the block shape of the coding unit is 4Nx4N), the decoder 120 may determine the block shape information of the coding unit to be a square.

[0064] When the width and height of the coding unit are different (i.e., when the block shape of the coding unit is 4Nx2N, 2Nx4N, 4NxN, Nx4N, 32NxN, Nx32N, 16NxN, Nx16N, 8NxN, or Nx8N), the decoder 120 may determine the block shape information of the coding unit to be non-square. When the shape of the coding unit is non-square, the decoder 120 may determine the ratio of the width and height in the block shape information of the coding unit to at least one of 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 1:32, and 32:1. Based on the width and height of the coding unit, the decoder 120 may determine whether the coding unit is horizontal or vertical. Based on at least one of the width, height, and width of the coding unit, the decoder 120 may determine the size of the coding unit.

[0065] According to an embodiment, the decoder 120 may determine the type of the coding unit using the block type information, and may determine the type in which the coding unit is to be divided using the partition type mode information. That is, the division method of the coding unit indicated by the partition type mode information may be determined depending on the block type indicated by the block type information used by the decoder 120.

[0066] The decoding unit 120 may acquire the partition mode information from the bitstream. However, without being limited thereto, the decoding unit 120 and the encoding unit 220 of the video encoding device 200 may determine the partition mode information that has been agreed upon in advance based on the block format information. The decoding unit 120 may determine the partition mode information that has been agreed upon in advance for the maximum coding unit or the minimum coding unit. For example, the decoding unit 120 may determine the partition mode information to be quad partition for the maximum coding unit. Also, the decoding unit 120 may determine the partition mode information to be "not partitioned" for the minimum coding unit. Specifically, the decoding unit 120 may determine the size of the maximum coding unit to be 256x256. The decoding unit 120 may determine the partition mode information that has been agreed upon in advance to be quad partition. Quad partition is a partition mode in which both the width and height of the coding unit are divided into two equal parts. The decoding unit 120 can obtain a coding unit of 128x128 size from the maximum coding unit of 256x256 size based on the partition mode information. Also, the decoding unit 120 can determine the size of the minimum coding unit to be 4x4. The decoding unit 120 can obtain partition mode information indicating "no partition" for the minimum coding unit.

[0067] In addition, the decoder 120 may determine partition mode information of a child coding unit based on partition mode information of a parent coding unit. A child coding unit refers to a coding unit partitioned from a code coding unit. For example, if the partition mode information of a parent coding unit is binary vertical partition, the partition mode of the child coding unit may be a partition mode other than binary vertical partition.

[0068] In addition, the decoding unit 120 may determine the division type of the parent coding unit by considering the block type of the child coding unit generated by dividing the parent coding unit. For example, if the size of the child coding unit generated by dividing the parent coding unit into ternary vertical parts is smaller than a predetermined size, the decoding unit 120 may determine the division type of the parent coding unit to be a division type other than ternary vertical division.

[0069] According to an embodiment, the decoder 120 may use block shape information indicating that the current coding unit is square-shaped. For example, the decoder 120 may determine whether to not split the square coding unit, to split it vertically, to split it horizontally, or to split it into four coding units, depending on the partition shape mode information.

[0070] Referring to FIG. 3, when the block shape information of the current coding unit 300 indicates a square shape, the decoder 120 can determine an unsplit coding unit 310a from the current coding unit 300 based on split shape mode information indicating no splitting, or can determine split coding units 310b, 310c, 310d, 310e, and 310f from the current coding unit 300 based on split shape mode information indicating a predetermined splitting method.

[0071] Referring to FIG. 3, the decoder 120 may determine two coding units 310b obtained by dividing the current coding unit 300 in the vertical direction based on the division mode information indicating binary division in the vertical direction, according to an embodiment. The decoder 120 may determine two coding units 310c obtained by dividing the current coding unit 300 in the horizontal direction based on the division mode information indicating binary division in the horizontal direction. The decoder 120 may determine four coding units 310d obtained by dividing the current coding unit 300 in the vertical and horizontal directions based on the division mode information indicating division in the vertical and horizontal directions. The decoder 120 may determine three coding units 310e obtained by dividing the current coding unit 300 in the vertical direction based on the division mode information indicating ternary division in the vertical direction. The decoder 120 may determine three coding units 310f obtained by dividing the current coding unit 300 in the horizontal direction based on the division mode information indicating ternary division in the horizontal direction. However, the division pattern in which the square coding unit may be divided is not limited to the above-mentioned pattern, and may include various patterns that can be indicated by the division pattern mode information. The division pattern of the square coding unit will be described in detail below through various embodiments.

[0072] FIG. 4 illustrates a process in which the decoder 120 divides a non-square coding unit to determine at least one coding unit, according to one embodiment.

[0073] According to an embodiment, the decoder 120 may use block shape information indicating that the current coding unit is non-square. The decoder 120 may determine whether to not split the non-square current coding unit or to split it according to a predetermined method according to the split shape mode information. Referring to FIG. 4, when the block shape information of the current coding unit 400 or 450 indicates a non-square shape, the decoder 120 may determine coding units 410 or 460 having the same size as the current coding unit 400 or 450 according to the split shape mode information indicating no split, or may determine split coding units 420a, 420b, 430a, 430b, 430c, 470a, 470b, 480a, 480b, and 480c according to the split shape mode information indicating a predetermined split method. The predetermined split method for splitting a non-square coding unit will be described in detail below through various embodiments.

[0074] According to an embodiment, the decoder 120 may determine a form in which a coding unit is divided using the partition mode information, and in this case, the partition mode information may indicate the number of at least one coding unit to be generated by dividing the coding unit. Referring to FIG 4, when the partition mode information indicates that the current coding unit 400 or 450 is divided into two coding units, the decoder 120 may divide the current coding unit 400 or 450 based on the partition mode information and determine two coding units 420a, 420b or 470a, 470b included in the current coding unit.

[0075] According to an embodiment, when the decoder 120 divides the non-square shaped current coding unit 400 or 450 based on the division shape mode information, the decoder 120 may divide the current coding unit in consideration of the position of a long side of the non-square shaped current coding unit 400 or 450. For example, the decoder 120 may determine a plurality of coding units by dividing the current coding unit 400 or 450 in a direction that divides the long side of the current coding unit 400 or 450 in consideration of the shape of the current coding unit 400 or 450.

[0076] According to an embodiment, when the partition mode information indicates that the coding unit is to be partitioned into an odd number of blocks (ternary partitioning), the decoder 120 may determine an odd number of coding units included in the current coding unit 400 or 450. For example, when the partition mode information indicates that the current coding unit 400 or 450 is to be partitioned into three coding units, the decoder 120 may partition the current coding unit 400 or 450 into three coding units 430a, 430b, and 430c or 480a, 480b, and 480c.

[0077] According to an embodiment, the width-to-height ratio of the current coding unit 400 or 450 may be 4:1 or 1:4. When the width-to-height ratio is 4:1, the width is greater than the height, so the block shape information is also in the horizontal direction. When the width-to-height ratio is 1:4, the width is less than the height, so the block shape information is also in the vertical direction. The decoder 120 may determine to divide the current coding unit into an odd number of blocks based on the division shape mode information. In addition, the decoder 120 may determine a division direction of the current coding unit 400 or 450 based on the block shape information of the current coding unit 400 or 450. For example, when the current coding unit 400 is in the vertical direction, the decoder 120 may divide the current coding unit 400 in the horizontal direction to determine coding units 430a, 430b, and 430c. Also, if the current coding unit 450 is horizontal, the decoder 120 may divide the current coding unit 450 vertically to determine coding units 480a, 480b, and 480c.

[0078] According to an embodiment, the decoder 120 may determine an odd number of coding units included in the current coding unit 400 or 450, and the determined coding units may not all have the same size. For example, in the determined odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c, the size of a given coding unit 430b or 480b may be different from the other coding units 430a, 430c, 480a, and 480c. That is, the coding units that may be determined by dividing the current coding unit 400 or 450 may have a plurality of sizes, and in some cases, the odd number of coding units 430a, 430b, 430c, 480a, 480b, and 480c may each have a different size.

[0079] According to an embodiment, when the partition mode information indicates that a coding unit is partitioned into an odd number of blocks, the decoder 120 may determine an odd number of coding units included in the current coding unit 400 or 450, and may further set a predetermined restriction on at least one coding unit among the odd number of coding units generated by partitioning. Referring to FIG 4, the decoder 120 may perform a different decoding process for the coding units 430b and 480b located in the center among the three coding units 430a, 430b, 430c, 480a, 480b, and 480c generated by partitioning the current coding unit 400 or 450 from the other coding units 430a, 430c, 480a, and 480c. For example, the decoder 120 may limit the centrally located coding units 430b and 480b from being further divided, unlike the other coding units 430a, 430c, 480a and 480c, or may limit the coding units 430b and 480b to being divided only a predetermined number of times.

[0080] FIG. 5 illustrates a process in which the decoder 120 divides a coding unit based on at least one of block configuration information and partition configuration mode information, according to an embodiment.

[0081] According to an embodiment, the decoder 120 may determine whether or not to divide the square-shaped first coding unit 500 into coding units based on at least one of the block shape information and the division shape mode information. According to an embodiment, if the division shape mode information indicates that the first coding unit 500 is to be divided in the horizontal direction, the decoder 120 may divide the first coding unit 500 in the horizontal direction to determine the second coding units 510d and 510e. According to an embodiment, the first coding unit, the second coding unit, and the third coding unit used are terms used to understand the division context between the coding units. For example, if the first coding unit is divided, the second coding unit may be determined, and if the second coding unit is divided, the third coding unit may be determined. In the following, the relationship between the first coding unit, the second coding unit, and the third coding unit used may also be understood to be according to the above-mentioned characteristics.

[0082] According to an embodiment, the decoder 120 may determine whether to split the second coding unit 510e into third coding units or not to split the second coding unit 510e based on the split mode information. Referring to Fig. 5, the decoder 120 may split the non-square second coding unit 510e determined by splitting the first coding unit 500 into at least one third coding unit 520a, 520b, 520c, 520d based on the split mode information, or may not split the second coding unit 510e.

[0083] The decoder 120 can acquire partition mode information, and based on the acquired partition mode information, the decoder 120 can divide the first coding unit 500 and determine a plurality of second coding units 510b, 510c, 510d, 510e, 510f, 510g, 510h, and 510i of various types, and the second coding units 510b, 510c, 510d, 510e, 510f, 510g, 510h, and 510i are also divided according to the manner in which the first coding unit 500 was divided based on the partition mode information. According to one embodiment, if the first coding unit 500 is split into second coding units 510b, 510c, 510d, 510e, 510f, 510g, 510h, and 510i based on the split mode information associated with the first coding unit 500, the second coding units 510b, 510c, 510d, 510e, 510f, 510g, 510h, and 510i are also split into third coding units based on the split mode information associated with the second coding units 510b, 510c, 510d, 510e, 510f, 510g, 510h, and 510i. That is, the coding units are also split recursively based on the split mode information associated with each coding unit. Therefore, in the non-square coding unit, a square coding unit may be determined, and the square coding unit may be recursively divided to determine a non-square coding unit. According to an embodiment, when the first coding unit 500 is divided into the second coding units 510b, 510c, 510d, 510e, 510f, 510g, 510h, and 510i based on the division mode information related to the first coding unit 500, the division forms of the second coding units 510b, 510c, 510d, 510e, 510f, 510g, 510h, and 510i may have a division form other than the division form of the first coding unit 500. For example, when the division mode information of the first coding unit 500 indicates quad division, the division forms of the second coding units 510f, 510g, 510h, and 510i may have a division form other than quad division. In this case, when the decoding unit 120 determines the partition mode of the second coding units 510f, 510g, 510h, and 510i, the information indicating whether or not the coding units are partitioned into quads is not parsed from the bitstream.In addition, when the partition mode information of the first coding unit 500 indicates binary vertical partitioning, the partition mode of the second coding units 510b and 510c may have a partition mode other than binary vertical partitioning. In this case, when the decoder 120 determines the partition mode of the second coding units 510b and 510c, the partition direction information indicating the vertical direction and the partition type information indicating the binary partitioning are not parsed from the bitstream.

[0084] Referring to FIG. 5, in the odd number of third coding units 520b, 520c, and 520d determined by dividing the non-square second coding unit 510e, a predetermined coding unit (e.g., a coding unit located in the middle or a square coding unit) is also divided recursively. According to an embodiment, one square-shaped third coding unit 520c among the odd number of third coding units 520b, 520c, and 520d is divided horizontally into a plurality of fourth coding units. One non-square-shaped fourth coding unit 530b or 530d among the plurality of fourth coding units 530a, 530b, 530c, and 530d is further divided into a plurality of coding units. For example, the non-square-shaped fourth coding unit 530b or 530d is further divided into an odd number of coding units. Methods that can be used for the recursive division of coding units will be described below through various embodiments.

[0085] According to an embodiment, the decoder 120 may divide each of the third coding units 520a, 520b, 520c, and 520d into a fourth coding unit based on the division mode information. The decoder 120 may also determine not to divide the second coding units 510b, 510c, 510d, 510e, 510f, 510g, 510h, and 510i based on the division mode information. According to an embodiment, the decoder 120 may divide the non-square second coding unit 510e into an odd number of third coding units 520b, 520c, and 520d. The decoder 120 may set a predetermined restriction on a certain third coding unit among the odd number of third coding units 520b, 520c, and 520d. For example, the decoder 120 may restrict the middle coding unit 520c among the odd number of third coding units 520b, 520c, and 520d so that it is not further divided, or may restrict it to be divided a configurable number of times.

[0086] 5, the decoder 120 may limit the coding unit 520c located in the middle of the odd number of third coding units 520b, 520c, and 520d included in the non-square second coding unit 510e to not be further divided or to be divided in a predetermined division form (e.g., division into four coding units, division into the same division form as the division form of the second coding unit 510e, division into a division form other than the division form of the second coding unit 510e, or division in a division direction other than the division direction of the second coding unit 510e), or to be divided only a predetermined number of times (e.g., division only n times, n>0). In the present disclosure, when the division form of the coding unit is limited to a predetermined division form (e.g., no division, quad division, binary horizontal division, binary vertical division, ternary horizontal division, or ternary vertical division), it means that the coding unit can be divided only in a predetermined division form. Furthermore, the number of divisions of a coding unit being limited to a predetermined number of divisions means that the coding unit can only be divided into the predetermined number of divisions.

[0087] When the division of the coding unit 520c located in the middle of the odd number of third coding units 520b, 520c, and 520d is not permitted, the decoder 120 does not parse the division mode information of the coding unit 520c located in the middle from the bitstream. Also, when the division form of the coding unit 520c located in the middle of the odd number of third coding units 520b, 520c, and 520d is limited to a predetermined division form, the decoder 120 does not parse information required to determine the predetermined division form from the bitstream. For example, when the division form of the coding unit 520c is limited to horizontal division, the decoder 120 does not parse the division direction information indicating the horizontal direction or vertical direction from the bitstream. When the division form of the coding unit 520c is limited to binary division, the decoder 120 does not parse the division type information indicating binary division or ternary division from the bitstream. However, the above restrictions on the coding unit 520c located in the middle are merely examples and should not be construed as being limited to the above-mentioned embodiments, but should be construed as including various restrictions that allow the coding unit 520c located in the middle to be decoded differently from the other coding units 520b, 520d.

[0088] According to an embodiment, the decoder 120 may obtain partition mode information used to partition the current coding unit from a predetermined position within the current coding unit.

[0089] FIG. 6 illustrates a method for the decoder 120 to determine a predetermined coding unit from among an odd number of coding units, according to one embodiment.

[0090] 6, the partition mode information of the current coding unit 600, 650 is also obtained from a sample at a predetermined position (e.g., samples 640, 690 located in the middle) among a plurality of samples included in the current coding unit 600, 650. However, the predetermined position in the current coding unit 600 where at least one of the partition mode information can be obtained is not limited to the center position shown in FIG. 6, but may include various positions (e.g., top end, bottom end, left end, right end, top left end, bottom left end, top right end, or bottom right end) that can be included in the current coding unit 600. The decoder 120 obtains the partition mode information obtained from the predetermined position and may determine whether to partition the current coding unit into coding units of various types and sizes or not to divide the current coding unit.

[0091] According to an embodiment, when a current coding unit is divided into a predetermined number of coding units, the decoder 120 may select one of the coding units. There are various methods for selecting one of the coding units, and such methods will be described below through various embodiments.

[0092] According to an embodiment, the decoder 120 may divide a current coding unit into a plurality of coding units and determine a coding unit at a predetermined position.

[0093] According to an embodiment, the decoder 120 may use information indicating the positions of each of the odd coding units to determine a coding unit located in the middle of the odd coding units. Referring to FIG. 6, the decoder 120 may divide a current coding unit 600 or a current coding unit 650 to determine odd coding units 620a, 620b, and 620c or odd coding units 660a, 660b, and 660c. The decoder 120 may determine the middle coding unit 620b or the middle coding unit 660b using information related to the positions of the odd coding units 620a, 620b, and 620c or the odd coding units 660a, 660b, and 660c. For example, the decoding unit 120 can determine the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of predetermined samples included in the coding units 620a, 620b, and 620c, thereby determining the center coding unit 620b. Specifically, the decoding unit 120 can determine the positions of the coding units 620a, 620b, and 620c based on information indicating the positions of the upper left samples 630a, 630b, and 630c of the coding units 620a, 620b, and 620c, thereby determining the center coding unit 620b.

[0094] According to an embodiment, the information indicating the positions of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, may include information related to the positions or coordinates of the coding units 620a, 620b, and 620c in an image. According to an embodiment, the information indicating the positions of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively, may include information indicating the width or height of the coding units 620a, 620b, and 620c included in the current coding unit 600, and such width or height also corresponds to information indicating the difference between the coordinates of the coding units 620a, 620b, and 620c in an image. That is, the decoder 120 can determine the coding unit 620b located in the middle by directly using information related to the positions or coordinates of the coding units 620a, 620b, and 620c in the image, or by using information related to the width or height of the coding unit corresponding to the difference value between the coordinates.

[0095] According to an embodiment, information indicating a position of the top left sample 630a of the top coding unit 620a may indicate (xa, ya) coordinates, information indicating a position of the top left sample 530b of the middle coding unit 620b may indicate (xb, yb) coordinates, and information indicating a position of the top left sample 630c of the bottom coding unit 620c may indicate (xc, yc) coordinates. The decoder 120 may determine the middle coding unit 620b using the coordinates of the top left samples 630a, 630b, and 630c included in the coding units 620a, 620b, and 620c, respectively. For example, when the coordinates of the top left samples 630a, 630b, and 630c are sorted in ascending or descending order, the coding unit 620b including the coordinates (xb, yb) of the middle sample 630b may be determined as the middle coding unit among the coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. However, the coordinates indicating the positions of the top left samples 630a, 630b, and 630c may indicate coordinates indicating absolute positions in the image, and further, the (dxb, dyb) coordinates indicating the relative position of the top left sample 630b of the middle coding unit 620b and the (dxc, dyc) coordinates indicating the relative position of the top left sample 630c of the bottom coding unit 620c may be used. In addition, the method of determining a coding unit at a predetermined position by using the coordinates of a sample as information indicating the position of the sample included in the coding unit should not be interpreted as being limited to the above-mentioned method, but should be interpreted as various arithmetic methods that can use the coordinates of the sample.

[0096] According to an embodiment, the decoder 120 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c, and may select a coding unit from among the coding units 620a, 620b, and 620c according to a predetermined criterion. For example, the decoder 120 may select the coding unit 620b, which is a different size from the coding units 620a, 620b, and 620c.

[0097] According to an embodiment, the decoder 120 may determine the width or height of each of the coding units 620a, 620b, and 620c using the (xa, ya) coordinates indicating the position of the top left sample 630a of the top coding unit 620a, the (xb, yb) coordinates indicating the position of the top left sample 630b of the middle coding unit 620b, and the (xc, yc) coordinates indicating the position of the top left sample 630c of the bottom coding unit 620c. The decoder 120 may determine the size of each of the coding units 620a, 620b, and 620c using the (xa, ya), (xb, yb), and (xc, yc) coordinates indicating the positions of the coding units 620a, 620b, and 620c. According to an embodiment, the decoder 120 may determine the width of the top coding unit 620a to be the width of the current coding unit 600. The decoder 120 may determine the height of the top coding unit 620a to be yb-ya. According to an embodiment, the decoder 120 may determine the width of the middle coding unit 620b to be the width of the current coding unit 600. The decoder 120 may determine the height of the middle coding unit 620b to be yc-yb. According to an embodiment, the decoder 120 may determine the width or height of the bottom coding unit using the width or height of the current coding unit and the width and height of the top coding unit 620a and the middle coding unit 620b. The decoder 120 may determine a coding unit having a different size from other coding units based on the determined widths and heights of the coding units 620a, 620b, and 620c. Referring to FIG. 6, the decoder 120 may determine the middle coding unit 620b having a different size from the top coding unit 620a and the bottom coding unit 620c as a coding unit at a predetermined position. However, the above-mentioned process in which the decoding unit 120 determines a coding unit having a size different from other coding units is merely one embodiment of determining a coding unit at a predetermined position using the size of the coding unit determined based on sample coordinates, and various other processes of comparing the size of the coding units determined based on predetermined sample coordinates and determining a coding unit at a predetermined position may be used.

[0098] The decoding unit 120 may determine the width or height of each of the coding units 660a, 660b, and 660c using the (xd, yd) coordinates indicating the position of the top left sample 670a of the left coding unit 660a, the (xe, ye) coordinates indicating the position of the top left sample 670b of the middle coding unit 660b, and the (xf, yf) coordinates indicating the position of the top left sample 670c of the right coding unit 660c. The decoding unit 120 may determine the size of each of the coding units 660a, 660b, and 660c using the (xd, yd), (xe, ye), and (xf, yf) coordinates indicating the positions of the coding units 660a, 660b, and 660c.

[0099] According to an embodiment, the decoder 120 may determine the width of the left coding unit 660a to be xe-xd. The decoder 120 may determine the height of the left coding unit 660a to be the height of the current coding unit 650. According to an embodiment, the decoder 120 may determine the width of the middle coding unit 660b to be xf-xe. The decoder 120 may determine the height of the middle coding unit 660b to be the height of the current coding unit 600. According to an embodiment, the decoder 120 may determine the width or height of the right coding unit 660c using the width or height of the current coding unit 650 and the widths and heights of the left coding unit 660a and the middle coding unit 660b. The decoder 120 may determine a coding unit having a size different from other coding units based on the determined widths and heights of the coding units 660a, 660b, and 660c. 6, the decoder 120 may determine a middle coding unit 660b having a size different from the sizes of the left coding unit 660a and the right coding unit 660c as a coding unit at a predetermined position. However, the above-described process in which the decoder 120 determines a coding unit having a size different from other coding units is merely one embodiment in which the coding unit at a predetermined position is determined using the size of the coding unit determined based on sample coordinates, and various other processes may be used to determine a coding unit at a predetermined position by comparing the size of the coding unit determined based on predetermined sample coordinates.

[0100] However, the position of the sample considered to determine the position of the coding unit is not to be interpreted as being limited to the upper left end as mentioned above, but rather, it is also to be interpreted that information related to the position of any sample included in the coding unit may be used.

[0101] According to an embodiment, the decoder 120 may select a coding unit at a predetermined position among the odd number of coding units determined by dividing the current coding unit, taking into consideration the shape of the current coding unit. For example, if the current coding unit is a non-square shape in which the width is greater than the height, the decoder 120 may determine a coding unit at a predetermined position along the horizontal direction. That is, the decoder 120 may determine one of the coding units whose position varies in the horizontal direction and set a restriction on the coding unit. If the current coding unit is a non-square shape in which the height is greater than the width, the decoder 120 may determine a coding unit at a predetermined position along the vertical direction. That is, the decoder 120 may determine one of the coding units whose position varies in the vertical direction and set a restriction on the coding unit.

[0102] According to an embodiment, the decoder 120 may use information indicating the positions of each of the even-numbered coding units to determine a coding unit at a predetermined position among the even-numbered coding units. The decoder 120 may determine the even-numbered coding units by dividing (binary dividing) the current coding unit, and may determine the coding unit at a predetermined position by using information regarding the positions of the even-numbered coding units. A detailed process related to this process corresponds to the process of determining a coding unit at a predetermined position (e.g., a center position) among the odd-numbered coding units described in FIG. 6, and therefore will not be described in detail.

[0103] According to an embodiment, when a non-square current coding unit is divided into a plurality of coding units, in order to determine a coding unit at a predetermined position in the plurality of coding units, the decoding unit 120 may use predetermined information related to the coding unit at a predetermined position in the division process. For example, in order to determine a coding unit at a center position among the plurality of coding units into which the current coding unit is divided, the decoding unit 120 may use at least one of block shape information and division shape mode information stored in a sample included in the center coding unit in the division process.

[0104] 6, the decoder 120 may divide the current coding unit 600 into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, and may determine the coding unit 620b located in the middle of the plurality of coding units 620a, 620b, and 620c. Furthermore, the decoder 120 may determine the coding unit 620b located in the middle, taking into consideration a position where the partition mode information is acquired. That is, the partition mode information of the current coding unit 600 is also acquired from a sample 640 located in the middle of the current coding unit 600, and when the current coding unit 600 is divided into a plurality of coding units 620a, 620b, and 620c based on the partition mode information, the coding unit 620b including the sample 640 may be determined as the coding unit located in the middle. However, information used to determine the coding unit located in the middle is not limited to the partition mode information, and various types of information may be used in the process of determining the coding unit located in the middle.

[0105] According to an embodiment, the predetermined information for identifying the coding unit at the predetermined position is also obtained from a predetermined sample included in the coding unit to be determined. Referring to FIG. 6, the decoder 120 may use partition mode information obtained from a sample at a predetermined position in the current coding unit 600 (e.g., a sample located at the middle of the current coding unit 600) to determine a coding unit at a predetermined position (e.g., a coding unit located at the middle of the coding units) among a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600. That is, the decoder 120 may determine the sample at the predetermined position by considering the block format of the current coding unit 600, and may determine a coding unit 620b including a sample from which predetermined information (e.g., partition mode information) can be obtained among a plurality of coding units 620a, 620b, and 620c determined by dividing the current coding unit 600, and may set a predetermined restriction. 6, according to an embodiment, the decoder 120 may determine a sample 640 located in the middle of the current coding unit 600 as a sample from which certain information may be acquired, and may set a certain restriction in the decoding process of the coding unit 620b including such sample 640. However, the position of the sample from which certain information may be acquired is not limited to the above position, but may be a sample at any position included in the coding unit 620b determined to set the restriction.

[0106] According to an embodiment, the position of the sample from which the predetermined information can be acquired is also determined according to the shape of the current coding unit 600. According to an embodiment, the block shape information may determine whether the shape of the current coding unit is square or non-square, and may determine the position of the sample from which the predetermined information can be acquired according to the shape. For example, the decoder 120 may determine, using at least one of information related to the width and information related to the height of the current coding unit, a sample located on a boundary that divides at least one of the width and height of the current coding unit in half as a sample from which the predetermined information can be acquired. For another example, when the block shape information related to the current coding unit indicates that the current coding unit is non-square, the decoder 120 may determine one of the samples adjacent to a boundary that divides the long side of the current coding unit in half as a sample from which the predetermined information can be acquired.

[0107] According to an embodiment, when the current coding unit is divided into a plurality of coding units, the decoder 120 may use the partition mode information to determine a coding unit at a predetermined position in the plurality of coding units. According to an embodiment, the decoder 120 may obtain the partition mode information from a sample at a predetermined position included in the coding unit, and may divide the plurality of coding units generated by dividing the current coding unit using the partition mode information obtained from a sample at a predetermined position included in each of the plurality of coding units. That is, the coding units are also recursively divided using the partition mode information obtained from a sample at a predetermined position included in each of the coding units. The recursive division process of the coding unit has been described with reference to FIG. 5, and therefore a detailed description thereof will be omitted.

[0108] In one embodiment, the decoder 120 may divide the current coding unit and determine at least one coding unit, and may determine the order in which such at least one coding unit is decoded based on a predetermined block (e.g., the current coding unit).

[0109] FIG. 7 illustrates an order in which multiple coding units are processed when the decoder 120 divides a current coding unit to determine multiple coding units, according to one embodiment.

[0110] According to one embodiment, the decoding unit 120 may, according to the partition mode information, partition the first coding unit 700 vertically to determine the second coding units 710a and 710b, partition the first coding unit 700 horizontally to determine the second coding units 730a and 730b, or partition the first coding unit 700 vertically and horizontally to determine the second coding units 750a, 750b, 750c, and 750d.

[0111] 7, the decoder 120 may determine an order in which second coding units 710a and 710b determined by dividing the first coding unit 700 in the vertical direction are processed in a horizontal direction 710c. The decoder 120 may determine a processing order in which second coding units 730a and 730b determined by dividing the first coding unit 700 in the horizontal direction are processed in a vertical direction 730c. The decoder 120 may determine second coding units 750a, 750b, 750c, and 750d determined by dividing the first coding unit 700 in the vertical and horizontal directions in a predetermined order (e.g., a raster scan order or a z scan order 750e) in which a coding unit located in one row is processed and then a coding unit located in the next row is processed.

[0112] According to an embodiment, the decoder 120 may recursively divide the coding units. Referring to FIG. 7, the decoder 120 may divide the first coding unit 700 to determine a plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d, and may recursively divide each of the determined coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d. A method of dividing the plurality of coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d corresponds to a method of dividing the first coding unit 700. As a result, the multiple coding units 710a, 710b, 730a, 730b, 750a, 750b, 750c, and 750d are each divided into multiple independent coding units. Referring to Fig. 7, the decoder 120 may divide the first coding unit 700 vertically to determine the second coding units 710a and 710b, and may further determine whether to divide the second coding units 710a and 710b independently or not.

[0113] According to one embodiment, the decoder 120 may horizontally split the second coding unit 710a on the left side into third coding units 720a and 720b, while not splitting the second coding unit 710b on the right side.

[0114] According to an embodiment, the processing order of the coding units is also determined based on the division process of the coding units. In other words, the processing order of the divided coding units is also determined based on the processing order of the coding units immediately before the division. The decoder 120 may determine the processing order of the third coding units 720a and 720b determined by dividing the second coding unit 710a on the left side, independently of the second coding unit 710b on the right side. Since the second coding unit 710a on the left side is divided in the horizontal direction and the third coding units 720a and 720b are determined, the third coding units 720a and 720b are also processed in the vertical direction 720c. In addition, since the processing order of the second coding unit 710a on the left side and the second coding unit 710b on the right side corresponds to the horizontal direction 710c, the third coding units 720a and 720b included in the second coding unit 710a on the left side may be processed in the vertical direction 720c before the right coding unit 710b is processed. The above content is intended to explain the process in which the processing order of each coding unit is determined based on the coding units before they are divided, and therefore should not be interpreted as being limited to the above embodiment, but should be interpreted as being used in various ways in which coding units that are divided and determined in various forms can be processed independently in a predetermined order.

[0115] FIG. 8 illustrates a process in which the decoder 120 determines that a current coding unit is to be divided into an odd number of coding units if the coding units cannot be processed in a predetermined order, according to an embodiment.

[0116] According to an embodiment, the decoder 120 may determine that the current coding unit is divided into an odd number of coding units based on the acquired division mode information. Referring to FIG. 8, a square-shaped first coding unit 800 is also divided into non-square-shaped second coding units 810a and 810b, and the second coding units 810a and 810b are also independently divided into third coding units 820a, 820b, 820c, 820d, and 820e. According to an embodiment, the decoder 120 may divide the left coding unit 810a in the second coding unit in the horizontal direction to determine a plurality of third coding units 820a and 820b, and may divide the right coding unit 810b into an odd number of third coding units 820c, 820d, and 820e.

[0117] According to an embodiment, the decoder 120 may determine whether the third coding units 820a, 820b, 820c, 820d, and 820e are also processed in a predetermined order, and may determine whether there are coding units divided into an odd number of coding units. Referring to FIG. 8, the decoder 120 may recursively divide the first coding unit 800 to determine the third coding units 820a, 820b, 820c, 820d, and 820e. The decoder 120 may determine whether the first coding unit 800, the second coding units 810a, 810b, or the third coding units 820a, 820b, 820c, 820d, and 820e are divided into an odd number of coding units in the division type based on at least one of the block type information and the division type mode information. For example, in the second coding units 810a and 810b, the coding units located on the right side are also divided into an odd number of third coding units 820c, 820d, and 820e. The order in which the multiple coding units included in the first coding unit 800 are processed can be a predetermined order (e.g., Z scan order 830), and the decoding unit 120 can determine whether the third coding units 820c, 820d, and 820e determined by dividing the right second coding unit 810b into an odd number of units satisfy the condition for being processed in the predetermined order.

[0118] According to an embodiment, the decoder 120 may determine whether the third coding units 820a, 820b, 820c, 820d, and 820e included in the first coding unit 800 satisfy a condition for being processed in a predetermined order, the condition being related to whether at least one of the width and height of the second coding units 810a and 810b is divided in half along the boundary between the third coding units 820a, 820b, 820c, 820d, and 820e. For example, the third coding units 820a and 820b determined by dividing the height of the non-square left second coding unit 810a in half may satisfy the condition. The third coding units 820c, 820d, and 820e, which are determined by dividing the right second coding unit 810b into three coding units, are also determined not to satisfy the condition because the boundaries of the third coding units 820c, 820d, and 820e do not divide the width or height of the right second coding unit 810b in half. If such a condition is not satisfied, the decoder 120 may determine that there is a disconnection in the scan order, and may determine that the right second coding unit 810b is divided into an odd number of coding units based on the determination result. According to an embodiment, the decoder 120 may set a predetermined restriction on a coding unit at a predetermined position in the divided coding units when the coding units are divided into an odd number of coding units. The contents of such a restriction or the predetermined position have been described in various embodiments, and detailed description thereof will be omitted.

[0119] FIG. 9 illustrates a process in which the decoder 120 divides a first coding unit 900 to determine at least one coding unit, according to one embodiment.

[0120] According to an embodiment, the decoder 120 may divide the first coding unit 900 based on the division mode information acquired via the bitstream acquirer 110. The square-shaped first coding unit 900 may be divided into four square-shaped coding units or into a plurality of non-square-shaped coding units. For example, referring to FIG. 9, if the first coding unit 900 is a square and the division mode information indicates that the first coding unit 900 is to be divided into non-square coding units, the decoder 120 may divide the first coding unit 900 into a plurality of non-square coding units. Specifically, when the division mode information indicates that the first coding unit 900 is to be divided horizontally or vertically to determine an odd number of coding units, the decoding unit 120 can divide the square-shaped first coding unit 900 into second coding units 910a, 910b, and 910c determined by dividing it vertically as an odd number of coding units, or into second coding units 920a, 920b, and 920c determined by dividing it horizontally.

[0121] According to an embodiment, the decoder 120 may determine whether the second coding units 910a, 910b, 910c, 920a, 920b, and 920c included in the first coding unit 900 satisfy a condition to be processed in a predetermined order, and the condition is related to whether at least one of the width and height of the first coding unit 900 is divided in half along the boundary of the second coding units 910a, 910b, 910c, 920a, 920b, and 920c. Referring to FIG. 9, the boundary of the second coding units 910a, 910b, and 910c determined by dividing the square-shaped first coding unit 900 in the vertical direction does not divide the width of the first coding unit 900 in half, so it is also determined that the first coding unit 900 does not satisfy the condition to be processed in a predetermined order. In addition, since the boundaries of the second coding units 920a, 920b, and 920c determined by dividing the square first coding unit 900 in the horizontal direction do not divide the width of the first coding unit 900 in half, it is determined that the first coding unit 900 does not satisfy the condition to be processed in a predetermined order. If such a condition is not satisfied, the decoder 120 may determine that the scan order is broken, and may determine that the first coding unit 900 is divided into an odd number of coding units based on the determination result. According to an embodiment, the decoder 120 may set a predetermined restriction on a coding unit at a predetermined position in the divided coding unit when the coding unit is divided into an odd number of coding units, and the content of such a restriction or the predetermined position has been described through various embodiments, and detailed description thereof will be omitted.

[0122] 9, the decoder 120 may divide a square-shaped first coding unit 900, a non-square-shaped first coding unit 930, or a non-square-shaped first coding unit 950 into various types of coding units.

[0123] FIG. 10 illustrates that, according to one embodiment, when a non-square second coding unit determined by dividing a first coding unit 1000 satisfies a predetermined condition, the division form of the second coding unit is restricted.

[0124] According to an embodiment, the decoder 120 may determine to divide the square-shaped first coding unit 1000 into non-square-shaped second coding units 1010a, 1010b, 1020a, and 1020b based on the division mode information acquired via the bitstream acquisition unit 110. The second coding units 1010a, 1010b, 1020a, and 1020b may be divided independently. Thus, the decoder 120 may determine whether to divide the first coding unit 1000 into a plurality of coding units or not to divide the first coding unit 1000 based on the division mode information associated with each of the second coding units 1010a, 1010b, 1020a, and 1020b. According to an embodiment, the decoder 120 may determine the third coding units 1012a and 1012b by dividing the left non-square-shaped second coding unit 1010a determined by dividing the first coding unit 1000 vertically in the horizontal direction. However, when the left second coding unit 1010a is divided in the horizontal direction, the decoder 120 may restrict the right second coding unit 1010b so that it is not divided in the horizontal direction in the same direction as the left second coding unit 1010a is divided. If the right second coding unit 1010b is divided in the same direction and the third coding units 1014a and 1014b are determined, the left second coding unit 1010a and the right second coding unit 1010b may be divided in the horizontal direction independently, so that the third coding units 1012a, 1012b, 1014a, and 1014b may be determined. However, this is the same result as when the decoder 120 divides the first coding unit 1000 into four square second coding units 1030a, 1030b, 1030c, and 1030d based on the division mode information, and this is inefficient in terms of video decoding.

[0125] According to an embodiment, the decoder 120 may vertically divide the non-square second coding unit 1020a or 1020b, which is determined by dividing the first coding unit 1000 in the horizontal direction, to determine the third coding units 1022a, 1022b, 1024a, and 1024b. However, when the decoder 120 divides one of the second coding units (e.g., the upper second coding unit 1020a) in the vertical direction, the decoder 120 may restrict the other second coding units (e.g., the lower coding unit 1020b) from being vertically divided in the same direction as the upper second coding unit 1020a, for the above-mentioned reasons.

[0126] Also, according to an embodiment, the decoder 120 may determine the non-square second coding units 1040a, 1040b, and 1040c by performing ternary vertical partitioning of the square first coding unit 1000 based on the partition mode information acquired via the bitstream acquisition unit 110. The second coding units 1040a, 1040b, and 1040c may be partitioned independently. Thus, the decoder 120 may determine whether or not to partition the second coding units 1040a, 1040b, and 1040c into a plurality of coding units based on the partition mode information associated with each of the second coding units 1040a, 1040b, and 1040c. According to an embodiment, when the decoder 120 determines not to divide the left second coding unit 1040a and the right second coding unit 1040c, which are non-square shaped and determined by ternary vertical division of the first coding unit 1000, the decoder 120 may limit the division form of the middle coding unit 1040b to a division form other than binary vertical division. This is because the result is the same as the result of binary vertical division of each of the second coding units 1010a and 1010b (i.e., the third coding units 1011a, 1011b, 1011c, and 1011d) determined to be binary vertically divided into the first coding unit 1000, and this is inefficient in terms of video decoding.

[0127] If the division rule does not allow division of the coding unit into a predetermined division form, the decoder 120 does not parse information required to determine the predetermined division form from the bitstream. For example, if horizontal division of the coding unit is not allowed, the decoder 120 does not parse division direction information indicating a horizontal or vertical direction from the bitstream. Also, if binary division of the coding unit is not allowed, the decoder 120 does not parse division type information indicating a binary division or a ternary division from the bitstream.

[0128] FIG. 11 illustrates a process in which the decoder 120 divides a square-shaped coding unit when the division mode information does not indicate that the coding unit is divided into four square-shaped coding units, according to an embodiment.

[0129] According to an embodiment, the decoder 120 may divide the first coding unit 1100 and determine the second coding units 1110a, 1110b, 1120a, and 1120b based on the division mode information. The division mode information may include information related to various types into which the coding unit may be divided, but the information related to the various types may not include information for dividing the coding unit into four square coding units. According to such division mode information, the decoder 120 may not divide the square-shaped first coding unit 1100 into four square-shaped second coding units 1130a, 1130b, 1130c, and 1130d. Based on the division mode information, the decoder 120 may determine the non-square-shaped second coding units 1110a, 1110b, 1120a, and 1120b.

[0130] According to an embodiment, the decoder 120 can independently divide the non-square second coding units 1110a, 1110b, 1120a, and 1120b, and through a recursive method, each of the second coding units 1110a, 1110b, 1120a, and 1120b is also divided in a predetermined order, which is a division method corresponding to the method in which the first coding unit 1100 is divided according to the division mode information.

[0131] For example, the decoder 120 may determine square-shaped third coding units 1112a and 1112b divided horizontally from the left second coding unit 1110a, and may determine square-shaped third coding units 1114a and 1114b divided horizontally from the right second coding unit 1110b. Furthermore, the decoder 120 may determine square-shaped third coding units 1116a, 1116b, 1116c, and 1116d divided horizontally from both the left second coding unit 1110a and the right second coding unit 1110b. In this case, the coding units may be determined in the same form as when the first coding unit 1100 is divided into four square-shaped second coding units 1130a, 1130b, 1130c, and 1130d.

[0132] In another example, the decoder 120 may determine square-shaped third coding units 1122a and 1122b divided vertically from the top second coding unit 1120a, and may determine square-shaped third coding units 1124a and 1124b divided vertically from the bottom second coding unit 1120b. Furthermore, the decoder 120 may determine square-shaped third coding units 1126a, 1126b, 1126a, and 1126b divided vertically from both the top second coding unit 1120a and the bottom second coding unit 1120b. In this case, the coding units may be determined in the same form as when the first coding unit 1100 is divided into four square-shaped second coding units 1130a, 1130b, 1130c, and 1130d.

[0133] FIG. 12 illustrates that the processing order among a plurality of coding units may differ depending on the division process of the coding units, according to an embodiment.

[0134] According to an embodiment, the decoder 120 may divide the first coding unit 1200 based on the division mode information. When the block shape is a square and the division mode information indicates that the first coding unit 1200 is divided in at least one of the horizontal and vertical directions, the decoder 120 may divide the first coding unit 1200 to determine, for example, second coding units 1210a, 1210b, 1220a, and 1220b. Referring to FIG. 12, the non-square second coding units 1210a, 1210b, 1220a, and 1220b determined by dividing the first coding unit 1200 only in the horizontal or vertical direction may be divided independently based on the division mode information associated with each of them. For example, the decoder 120 may determine third coding units 1216a, 1216b, 1216c, and 1216d by dividing the second coding units 1210a and 1210b generated by dividing the first coding unit 1200 vertically, and may determine third coding units 1226a, 1226b, 1226c, and 1226d by dividing the second coding units 1220a and 1220b generated by dividing the first coding unit 1200 horizontally, respectively. The process of dividing the second coding units 1210a, 1210b, 1220a, and 1220b has been described with reference to FIG. 11, and a detailed description thereof will be omitted.

[0135] According to an embodiment, the decoder 120 may process the coding units in a predetermined order. The features related to the processing of the coding units in a predetermined order have been described with reference to FIG. 7, and therefore detailed description thereof will be omitted. Referring to FIG. 12, the decoder 120 may divide the square-shaped first coding unit 1200 to determine four square-shaped third coding units 1216a, 1216b, 1216c, 1216d or 1226a, 1226b, 1226c, 1226d. According to an embodiment, the decoder 120 may determine the processing order of the third coding units 1216a, 1216b, 1216c, 1216d or 1226a, 1226b, 1226c, 1226d according to the manner in which the first coding unit 1200 is divided.

[0136] According to one embodiment, the decoding unit 120 can horizontally divide the second coding units 1210a, 1210b generated by dividing them vertically to determine the third coding units 1216a, 1216b, 1216c, and 1216d, and the decoding unit 120 can process the third coding units 1216a, 1216b, 1216c, and 1216d in an order 1217 of first vertically processing the third coding units 1216a, 1216c included in the left second coding unit 1210a, and then vertically processing the third coding units 1216b, 1216d included in the right second coding unit 1210b.

[0137] According to one embodiment, the decoding unit 120 can vertically divide the second coding units 1220a, 1220b generated by dividing them horizontally to determine the third coding units 1226a, 1226b, 1226c, and 1226d, and the decoding unit 120 can process the third coding units 1226a, 1226b, 1226c, and 1226d in an order 1227 of first horizontally processing the third coding units 1226a, 1226b included in the upper second coding unit 1220a, and then horizontally processing the third coding units 1226c, 1226d included in the lower second coding unit 1220b.

[0138] 12, the second coding units 1210a, 1210b, 1220a, and 1220b are each divided to determine square-shaped third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d. The second coding units 1210a and 1210b determined by dividing in the vertical direction and the second coding units 1220a and 1220b determined by dividing in the horizontal direction are divided in different shapes, but the third coding units 1216a, 1216b, 1216c, 1216d, 1226a, 1226b, 1226c, and 1226d determined thereafter ultimately result in the first coding unit 1200 being divided into coding units of the same shape. As a result, the decoder 120 recursively divides the coding units through different processes based on the division mode information, and as a result, even if the coding units are determined to have the same type, the decoding unit 120 can process multiple coding units determined to have the same type in different orders from each other.

[0139] FIG. 13 illustrates a process of determining the depth of a coding unit according to one embodiment, when a coding unit is recursively divided to determine multiple coding units, as the shape and size of the coding unit change.

[0140] According to an embodiment, the decoder 120 may determine the depth of the coding unit according to a predetermined criterion. For example, the predetermined criterion may be the long side length of the coding unit. The decoder 120 may determine the depth of the coding unit according to a predetermined criterion. For example, the decoder 120 may determine the depth of the coding unit according to a predetermined criterion. n When the coding unit is divided by (n>0), it may be determined that the depth of the current coding unit is increased by n from the depth of the coding unit before the division. Hereinafter, the coding unit with the increased depth will be referred to as a coding unit of a lower depth.

[0141] 13, according to an embodiment, the decoder 120 may divide the square-shaped first coding unit 1300 based on block shape information indicating a square shape (for example, the block shape information may indicate "0:SQUARE") to determine a second coding unit 1302, a third coding unit 1304, etc., of a lower depth. If the size of the square-shaped first coding unit 1300 is 2Nx2N, the second coding unit 1302 determined by dividing the width and height of the first coding unit 1300 by 1 / 2 may have a size of NxN. Furthermore, the third coding unit 1304 determined by dividing the width and height of the second coding unit 1302 by 1 / 2 may have a size of N / 2xN / 2. In this case, the width and height of the third coding unit 1304 correspond to 1 / 4 times that of the first coding unit 1300. If the depth of the first coding unit 1300 is D, the depth of the second coding unit 1302, which is 1 / 2 the width and height of the first coding unit 1300, is also D+1, and the depth of the third coding unit 1304, which is 1 / 4 the width and height of the first coding unit 1300, is also D+2.

[0142] According to one embodiment, based on block shape information indicating a non-square shape (for example, the block shape information may indicate "1:NS_VER" indicating a non-square shape in which the height is greater than the width, or "2:NS_HOR" indicating a non-square shape in which the width is greater than the height), the decoding unit 120 may divide the first coding unit 1310 or 1320, which is non-square, and determine a second coding unit 1312 or 1322, a third coding unit 1314 or 1324, etc., of a lower depth.

[0143] The decoder 120 may divide at least one of the width and height of the first coding unit 1310 having a size of Nx2N to determine, for example, the second coding units 1302, 1312, and 1322. That is, the decoder 120 may divide the first coding unit 1310 in the horizontal direction to determine the second coding unit 1302 having a size of NxN or the second coding unit 1322 having a size of NxN / 2, or may divide the first coding unit 1310 in the horizontal and vertical directions to determine the second coding unit 1312 having a size of N / 2xN.

[0144] According to an embodiment, the decoder 120 may divide at least one of the width and height of the first coding unit 1320 having a size of 2NxN to determine, for example, the second coding units 1302, 1312, and 1322. That is, the decoder 120 may divide the first coding unit 1320 vertically to determine the second coding unit 1302 having a size of NxN or the second coding unit 1312 having a size of N / 2xN, or may divide the first coding unit 1320 horizontally and vertically to determine the second coding unit 1322 having a size of NxN / 2.

[0145] According to an embodiment, the decoder 120 may divide at least one of the width and height of the second coding unit 1302 having a size of NxN to determine, for example, the third coding units 1304, 1314, and 1324. That is, the decoder 120 may divide the second coding unit 1302 in the vertical and horizontal directions to determine the third coding unit 1304 having a size of N / 2xN / 2, the third coding unit 1314 having a size of N / 4xN / 2, or the third coding unit 1324 having a size of N / 2xN / 4.

[0146] According to an embodiment, the decoder 120 may divide at least one of the width and height of the second coding unit 1312 having a size of N / 2xN to determine, for example, the third coding units 1304, 1314, and 1324. That is, the decoder 120 may divide the second coding unit 1312 horizontally to determine the third coding unit 1304 having a size of N / 2xN / 2 or the third coding unit 1324 having a size of N / 2xN / 4, or may divide the second coding unit 1312 vertically and horizontally to determine the third coding unit 1314 having a size of N / 4xN / 2.

[0147] According to an embodiment, the decoder 120 may divide at least one of the width and height of the second coding unit 1322 having a size of NxN / 2 to determine, for example, the third coding units 1304, 1314, and 1324. That is, the decoder 120 may divide the second coding unit 1322 vertically to determine the third coding unit 1304 having a size of N / 2xN / 2 and the third coding unit 1314 having a size of N / 4xN / 2, or may divide the second coding unit 1322 vertically and horizontally to determine the third coding unit 1324 having a size of N / 2xN / 4.

[0148] According to an embodiment, the decoder 120 may divide, for example, square-shaped coding units 1300, 1302, and 1304 in the horizontal or vertical direction. For example, the first coding unit 1300 having a size of 2Nx2N may be divided vertically to determine a first coding unit 1310 having a size of Nx2N, or may be divided horizontally to determine a first coding unit 1320 having a size of 2NxN. According to an embodiment, when the depth is determined based on the longest side length of the coding unit, the depth of the coding unit determined by dividing the first coding unit 1300 having a size of 2Nx2N in the horizontal or vertical direction may be the same as the depth of the first coding unit 1300.

[0149] According to an embodiment, the width and height of the third coding unit 1314 or 1324 also correspond to 1 / 4 times that of the first coding unit 1310 or 1320. When the depth of the first coding unit 1310 or 1320 is D, the depth of the second coding unit 1312 or 1322, which is 1 / 2 times the width and height of the first coding unit 1310 or 1320, is also D+1, and the depth of the third coding unit 1314 or 1324, which is 1 / 4 times the width and height of the first coding unit 1310 or 1320, is also D+2.

[0150] FIG. 14 illustrates a depth determined according to the type and size of a coding unit and an index (PID: part index) for coding unit partitioning according to one embodiment.

[0151] According to an embodiment, the decoder 120 may divide the square-shaped first coding unit 1400 to determine various types of second coding units. Referring to FIG. 14, the decoder 120 may divide the first coding unit 1400 in at least one of the vertical and horizontal directions according to the division mode information to determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d. That is, the decoder 120 may determine the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d based on the division mode information related to the first coding unit 1400.

[0152] According to an embodiment, the depths of the second coding units 1402a, 1402b, 1404a, 1404b, 1406a, 1406b, 1406c, and 1406d determined by the partition mode information related to the square-shaped first coding unit 1400 may be determined based on the long side length. For example, since the length of one side of the square-shaped first coding unit 1400 is the same as the long side length of the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b, the depths of the first coding unit 1400 and the non-square-shaped second coding units 1402a, 1402b, 1404a, and 1404b can be regarded as being the same as D. In contrast, when the decoding unit 120 divides the first coding unit 1400 into four square-shaped second coding units 1406a, 1406b, 1406c, and 1406d based on the division mode information, the length of one side of the square-shaped second coding units 1406a, 1406b, 1406c, and 1406d is 1 / 2 times the length of one side of the first coding unit 1400, so the depth of the second coding units 1406a, 1406b, 1406c, and 1406d is also a depth of D+1, which is one depth lower than the depth D of the first coding unit 1400.

[0153] According to an embodiment, the decoder 120 may divide the first coding unit 1410, whose height is greater than its width, in the horizontal direction according to the division mode information, and divide the first coding unit 1410 into a plurality of second coding units 1412a, 1412b, 1414a, 1414b, and 1414c. According to an embodiment, the decoder 120 may divide the first coding unit 1420, whose width is greater than its height, in the vertical direction according to the division mode information, and divide the first coding unit 1420 into a plurality of second coding units 1422a, 1422b, 1424a, 1424b, and 1424c.

[0154] According to an embodiment, the depths of the second coding units 1412a, 1412b, 1414a, 1414b, 1414c, 1422a, 1422b, 1424a, 1424b, and 1424c determined by the partition mode information related to the non-square first coding unit 1410 or 1420 may be determined based on the long side length. For example, the length of one side of the square second coding units 1412a and 1412b is ½ times the length of one side of the non-square first coding unit 1410 whose height is greater than its width, so the depths of the square second coding units 1412a and 1412b are D+1, which is one depth lower than the depth D of the non-square first coding unit 1410.

[0155] Furthermore, the decoding unit 120 can divide the non-square first coding unit 1410 into an odd number of second coding units 1414a, 1414b, and 1414c based on the division mode information. The odd number of second coding units 1414a, 1414b, and 1414c may include the non-square second coding units 1414a and 1414c and the square second coding unit 1414b. In this case, the long side length of the non-square second coding units 1414a and 1414c and the side length of the square second coding unit 1414b are 1 / 2 times the side length of the first coding unit 1410, so the depths of the second coding units 1414a, 1414b, and 1414c are also D+1, which is one depth lower than D, which is the depth of the first coding unit 1410. The decoder 120 may determine the depth of a coding unit associated with a non-square first coding unit 1420, whose width is greater than its height, in a manner corresponding to the above-mentioned manner for determining the depth of a coding unit associated with the first coding unit 1410.

[0156] According to an embodiment, the decoder 120 may determine the index (PID) for dividing the divided coding units based on the size ratio between the coding units when the coding units divided into an odd number of coding units are not equal in size. Referring to FIG. 14, the coding unit 1414b located in the middle of the coding units 1414a, 1414b, and 1414c divided into an odd number of coding units has the same width as the other coding units 1414a and 1414c, but is twice as high as the other coding units 1414a and 1414c. That is, in this case, the coding unit 1414b located in the middle may include the other coding units 1414a and 1414c. Therefore, if the index (PID) of the coding unit 1414b located in the middle according to the scanning order is 1, the coding unit 1414c located next in the order has an index (PID) of 3, which is increased by 2. That is, discontinuity of the index (PID) values ​​may exist. According to one embodiment, the decoder 120 can determine whether coding units divided into an odd number of parts are not the same size based on whether there is a discontinuity in the index (PID) for partitioning between such divided coding units.

[0157] According to an embodiment, the decoder 120 may determine whether the current coding unit is divided into a specific division type based on an index (PID) value for distinguishing the plurality of coding units determined by dividing the current coding unit. Referring to FIG. 14, the decoder 120 may divide a first coding unit 1410 having a rectangular shape with a height greater than its width to determine an even number of coding units 1412a, 1412b or an odd number of coding units 1414a, 1414b, 1414c. The decoder 120 may use an index (PID) indicating each coding unit to distinguish each of the plurality of coding units. According to an embodiment, the index (PID) may also be obtained from a sample at a predetermined position (e.g., the upper left sample) of each coding unit.

[0158] According to an embodiment, the decoder 120 may determine a coding unit at a predetermined position in the coding units determined by division using an index (PID) for coding unit division. According to an embodiment, when the division mode information related to the first coding unit 1410 having a rectangular shape with a height greater than a width indicates that the first coding unit 1410 is divided into three coding units, the decoder 120 may divide the first coding unit 1410 into three coding units 1414a, 1414b, and 1414c. The decoder 120 may assign an index (PID) related to each of the three coding units 1414a, 1414b, and 1414c. The decoder 120 may compare the index (PID) related to each coding unit to determine the middle coding unit among the odd number of coding units. The decoder 120 may determine a coding unit 1414b having an index (PID) corresponding to a median value among the indexes (PID) of the coding units as a coding unit in a middle position among the coding units determined by dividing the first coding unit 1410 based on the indexes (PID). According to an embodiment, the decoder 120 may determine an index (PID) based on a size ratio between the coding units when the coding units are not the same size in determining the index (PID) for the divided coding unit division. Referring to FIG. 14, the coding unit 1414b generated by dividing the first coding unit 1410 has the same width as the other coding units 1414a and 1414c, but is twice as high as the coding units 1414a and 1414c, which have different heights. In this case, if the index (PID) of the coding unit 1414b located in the middle is 1, the coding unit 1414c located next thereto has an index (PID) of 3, which is increased by 2.In such a case, when the index (PID) is increased uniformly but the increment is different, the decoder 120 may determine that the current coding unit is divided into a plurality of coding units including a coding unit having a different size from the other coding units. According to an embodiment, when the division mode information indicates that the current coding unit is divided into an odd number of coding units, the decoder 120 may divide the current coding unit into a form in which a coding unit at a predetermined position (e.g., a middle coding unit) in the odd number of coding units has a different size from the other coding units. In this case, the decoder 120 may determine the middle coding unit having a different size using an index (PID) related to the coding unit. However, the above-mentioned index (PID) and the size or position of the coding unit at the predetermined position to be determined are specified for the purpose of explaining an embodiment, and should not be interpreted as being limited thereto, and various indexes (PIDs), positions and sizes of coding units may be used.

[0159] According to one embodiment, the decoder 120 may use a predetermined data unit from which the recursive division of the coding units begins.

[0160] FIG. 15 illustrates a plurality of coding units being determined based on a plurality of predetermined data units included in a video, according to one embodiment.

[0161] According to an embodiment, the predetermined data unit is also defined as a data unit into which the coding unit starts to be recursively divided using the division mode information. That is, it also corresponds to a coding unit of the highest depth used in the process of determining a plurality of coding units into which the current image is divided. Hereinafter, for convenience of explanation, such a predetermined data unit will be referred to as a reference data unit.

[0162] According to an embodiment, the reference data unit may have a predetermined size and shape. According to an embodiment, the reference coding unit may include MxN samples, where M and N may be the same or different and may be integers expressed as a power of 2. That is, the reference data unit may have a square or non-square shape, and then be divided into an integer number of coding units.

[0163] According to an embodiment, the decoder 120 may divide the current image into a plurality of reference data units. According to an embodiment, the decoder 120 may divide the current image into a plurality of reference data units using division mode information related to each of the reference data units. The division process of the reference data units may also correspond to a division process using a quad-tree structure.

[0164] According to an embodiment, the decoder 120 may determine in advance a minimum size that a reference data unit included in a current image may have, and may determine various sizes of reference data units that are equal to or larger than the minimum size, and may determine at least one coding unit using division mode information based on the determined reference data unit.

[0165] 15, the decoder 120 may use a square-shaped reference coding unit 1500 or a non-square-shaped reference coding unit 1502. According to an embodiment, the shape and size of the reference coding unit may be determined according to various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) including at least one reference coding unit.

[0166] According to an embodiment, the bitstream acquiring unit 110 may acquire at least one of information related to the type of the reference coding unit and information related to the size of the reference coding unit from the bitstream for each of the various data units. The process of determining at least one coding unit included in the square-shaped reference coding unit 1500 has been described through the process of dividing the current coding unit 300 in Fig. 3, and the process of determining at least one coding unit included in the non-square-shaped reference coding unit 1502 has been described through the process of dividing the current coding unit 400 or 450 in Fig. 4, so detailed description thereof will be omitted.

[0167] According to an embodiment, the decoder 120 may use an index for identifying the size and type of the reference coding unit in order to determine the size and type of the reference coding unit according to a certain data unit that is predetermined based on a predetermined condition. That is, the bitstream acquirer 110 may acquire only an index for identifying the size and type of the reference coding unit for each slice, slice segment, tile, tile group, maximum coding unit, etc. as a data unit that satisfies a predetermined condition (e.g., a data unit having a size equal to or smaller than a slice) among the various data units (e.g., a sequence, a picture, a slice, a slice segment, a tile, a tile group, a maximum coding unit, etc.) from the bitstream. The decoder 120 may determine the size and type of the reference data unit for each data unit that satisfies the predetermined condition by using the index. If information related to the type of the reference coding unit and information related to the size of the reference coding unit are acquired from the bitstream for each data unit of a relatively small size and used, the bitstream may not be used efficiently. Therefore, instead of directly acquiring information related to the type of the reference coding unit and information related to the size of the reference coding unit, only the index may be acquired and used. In this case, at least one of the size and the type of the reference coding unit corresponding to the index indicating the size and the type of the reference coding unit is also predetermined. That is, the decoder 120 can determine at least one of the size and the type of the reference coding unit included in the data unit that is the basis for obtaining the index by selecting at least one of the size and the type of the predetermined reference coding unit according to the index.

[0168] According to an embodiment, the decoder 120 may use at least one reference coding unit included in one maximum coding unit. That is, the maximum coding unit for dividing an image includes at least one reference coding unit, and the coding units may be determined through a recursive division process of each reference coding unit. According to an embodiment, at least one of the width and height of the maximum coding unit corresponds to at least one integer multiple of the width and height of the reference coding unit. According to an embodiment, the size of the reference coding unit is also a size obtained by dividing the maximum coding unit n times according to a quad tree structure. That is, the decoder 120 may determine the reference coding unit by dividing the maximum coding unit n times according to a quad tree structure, and may divide the reference coding unit based on at least one of block configuration information and partition configuration mode information according to various embodiments.

[0169] FIG. 16 illustrates processing blocks that are responsible for determining a determination order of reference coding units included in a video 1600, according to one embodiment.

[0170] According to an embodiment, the decoder 120 may determine at least one processing block for dividing an image. The processing block is a data unit including at least one reference coding unit for dividing an image, and the at least one reference coding unit included in the processing block may be determined in a specific order. That is, the determination order of the at least one reference coding unit determined for each processing block corresponds to one of various orders in which the reference coding unit may be determined, and the determination order of the reference coding unit determined for each processing block may differ for each processing block. The determination order of the reference coding unit determined for each processing block may be one of various orders such as a raster scan, a Z-scan, an N-scan, an up-right diagonal scan, a horizontal scan, and a vertical scan, but the order that may be determined is not limited to the scan order.

[0171] According to an embodiment, the decoder 120 may obtain information on the size of the processing block and determine the size of at least one processing block included in the image. The decoder 120 may obtain information on the size of the processing block from a bitstream and determine the size of at least one processing block included in the image. The size of such a processing block is also a predetermined size of a data unit indicated by the information on the size of the processing block.

[0172] According to an embodiment, the bitstream acquiring unit 110 may acquire information on the size of a processing block from the bitstream for each specific data unit. For example, the information on the size of a processing block may be acquired from the bitstream for each data unit such as an image, a sequence, an image, a slice, a slice segment, a tile, or a tile group. That is, the bitstream acquiring unit 110 may acquire information on the size of a processing block from the bitstream for each of the various data units described above, and the decoding unit 120 may determine the size of at least one processing block for dividing an image using the acquired information on the size of the processing block, and the size of such a processing block may be an integer multiple of a reference coding unit.

[0173] According to an embodiment, the decoder 120 may determine the size of the processing blocks 1602 and 1612 included in the image 1600. For example, the decoder 120 may determine the size of the processing blocks based on information related to the size of the processing blocks acquired from a bitstream. Referring to FIG. 16, according to an embodiment, the decoder 120 may determine the width of the processing blocks 1602 and 1612 to be four times the width of a reference coding unit and the height of the processing blocks 1602 and 1612 to be four times the height of the reference coding unit. The decoder 120 may determine an order in which at least one reference coding unit is determined within at least one processing block.

[0174] According to an embodiment, the decoder 120 may determine each of the processing blocks 1602, 1612 included in the image 1600 based on the size of the processing block, and may determine a determination order of at least one reference coding unit included in the processing blocks 1602, 1612. According to an embodiment, determining the reference coding unit may include determining the size of the reference coding unit.

[0175] According to an embodiment, the decoder 120 may acquire information on a determination order of at least one reference coding unit included in at least one processing block from a bitstream, and may determine an order in which at least one reference coding unit is determined based on the acquired information on the determination order. The information on the determination order is also defined as an order or direction in which the reference coding units are determined within a processing block. That is, the order in which the reference coding units are determined may be determined independently for each processing block.

[0176] According to an embodiment, the decoder 120 may obtain information on the determination order of the reference coding units from the bitstream for each specific data unit. For example, the bitstream obtainer 110 may obtain information on the determination order of the reference coding units from the bitstream for each data unit path such as a picture, a sequence, a picture, a slice, a slice segment, a tile, a tile group, a processing block, etc. Since the information on the determination order of the reference coding units indicates a determination order of the reference coding units within a processing block, the information on the determination order is also obtained for each specific data unit including an integer number of processing blocks.

[0177] According to one embodiment, the decoder 120 may determine at least one reference coding unit based on the determined order.

[0178] According to an embodiment, the bitstream acquiring unit 110 may acquire information related to a reference coding unit determination order as information related to the processing blocks 1602 and 1612 from the bitstream, and the decoding unit 120 may determine an order for determining at least one reference coding unit included in the processing blocks 1602 and 1612, and may determine at least one reference coding unit included in the image 1600 according to the determination order of the coding units. Referring to FIG. 16, the decoding unit 120 may determine a determination order 1604 and 1614 of at least one reference coding unit associated with each of the processing blocks 1602 and 1612. For example, when information related to the determination order of the reference coding units is acquired for each processing block, the determination order of the reference coding units associated with each of the processing blocks 1602 and 1612 may differ for each processing block. When the reference coding unit determination order 1604 associated with the processing block 1602 is the raster scan order, the reference coding units included in the processing block 1602 are also determined in the raster scan order. On the other hand, when the reference coding unit determination order 1614 associated with another processing block 1612 is the reverse of the raster scan order, the reference coding units included in the processing block 1612 are also determined in the reverse of the raster scan order.

[0179] The decoder 120 may decode at least one reference coding unit determined according to an embodiment. The decoder 120 may decode an image based on the reference coding unit determined according to the above embodiment. The method of decoding the reference coding unit may include various methods of decoding an image.

[0180] According to an embodiment, the decoder 120 may acquire and use block type information indicating a type of a current coding unit or partition type mode information indicating a method of dividing the current coding unit from a bitstream. The partition type mode information may be included in a bitstream associated with various data units. For example, the decoder 120 may use partition type mode information included in a sequence parameter set, a picture parameter set, a video parameter set, a slice header, a slice segment header, a tile header, or a tile group header. Furthermore, the decoder 120 may acquire and use a syntax element corresponding to the block type information or the partition type mode information from the bitstream for each maximum coding unit, reference coding unit, and processing block.

[0181] A method for determining a division rule according to an embodiment of the present disclosure will now be described in detail.

[0182] The decoding unit 120 may determine a video partitioning rule. The partitioning rule may be preset between the video decoding device 100 and the video encoding device 200. The decoding unit 120 may determine the video partitioning rule based on information acquired from a bitstream. The decoding unit 120 may determine the partitioning rule based on information acquired from at least one of a sequence parameter set, a video parameter set, a video parameter set, a slice header, a slice segment header, a tile header, and a tile group header. The decoding unit 120 may determine the partitioning rule differently depending on a frame, a slice, a tile, a temporal layer, a maximum coding unit, or a coding unit.

[0183] The decoder 120 may determine a partitioning rule based on a block type of the coding unit. The block type may include a size, a shape, a width, a width-height ratio, and a direction of the coding unit. The video encoder 200 and the video decoder 100 may determine a partitioning rule in advance based on a block type of the coding unit. The decoder 120 may also determine the partitioning rule based on information acquired from a bitstream received from the video encoder 200.

[0184] The shape of the coding unit may include a square and a non-square. If the width and height of the coding unit are the same, the decoder 120 may determine the shape of the coding unit to be a square. Also, if the width and height of the coding unit are not the same, the decoder 120 may determine the shape of the coding unit to be a non-square.

[0185] The size of the coding unit may include various sizes such as 4x4, 8x4, 4x8, 8x8, 16x4, 16x8, ..., 256x256. The size of the coding unit may also be classified according to the long side length, short side length, or width of the coding unit. The decoding unit 120 may apply the same division rule to the coding units classified into the same group. For example, the decoding unit 120 may classify the coding units having the same long side length into the same size. In addition, the decoding unit 120 may apply the same division rule to the coding units having the same long side length.

[0186] The ratio of the width and height of the coding unit may include 1:2, 2:1, 1:4, 4:1, 1:8, 8:1, 1:16, 16:1, 32:1, 1:32, etc. The direction of the coding unit may include a horizontal direction and a vertical direction. The horizontal direction may indicate a case where the width of the coding unit is greater than the height of the coding unit. The vertical direction may indicate a case where the width of the coding unit is less than the height of the coding unit.

[0187] The decoder 120 may adaptively determine a partition rule based on the block type of the coding unit. The decoder 120 may determine different allowable partition mode modes based on the block type. For example, the decoder 120 may determine whether partition is allowed based on the size of the coding unit. The decoder 120 may determine a partition direction according to the size of the coding unit. The decoder 120 may determine allowable partition types according to the size of the coding unit.

[0188] The decoder 120 may compare at least one of the size, shape, width, width-height ratio, and direction of the coding unit with a predetermined criterion and limit the division form of the coding unit to a predetermined division form. For example, if the size of the coding unit is MxN and the ratio of height to width is 1:4, the coding unit is not allowed to be divided, only binary horizontal division is allowed, or quad division is not allowed. In this case, the decoder 120 does not parse information for determining the division form allowed for the coding unit from the bitstream. For example, if quad division is not allowed for the coding unit, the decoder 120 does not parse information indicating whether quad division is allowed.

[0189] The partitioning rule determination based on the size of the coding unit is also a default partitioning rule between the video encoding device 200 and the video decoding device 100. The decoding unit 120 can also determine the partitioning rule based on information acquired from the bitstream.

[0190] The decoder 120 may adaptively determine a division rule based on the position of the coding unit. The decoder 120 may adaptively determine a division rule based on the position of the coding unit in the video.

[0191] Also, the decoder 120 may determine a partition rule so that coding units generated in different partition paths do not have the same block type. For example, as described in relation to FIG. 10, if quad partitioning of the first coding unit 1000 is possible, binary horizontal partitioning of both the second coding units 1010a and 1010b determined through binary vertical partitioning from the first coding unit 100 is not permitted, and binary vertical partitioning of both the second coding units 1020a and 1020b determined through binary horizontal partitioning from the first coding unit 1000 is not permitted. However, the present invention is not limited thereto, and coding units generated in different partition paths may have the same block type. Coding units generated in different partition paths may have different decoding process orders. The decoding process order has been described with reference to FIG. 12, and detailed description thereof will be omitted.

[0192] FIG. 17 illustrates coding units that may be determined for each image when the combination of ways in which the coding units may be divided varies for each image, according to an embodiment.

[0193] Referring to FIG. 17, the decoder 120 may determine different combinations of division patterns into which the coding units may be divided for each image. For example, the decoder 120 may decode an image using an image 1700 divided into four coding units, an image 1710 divided into two or four coding units, and an image 1720 divided into two, three, or four coding units. The decoder 120 may use only division pattern information indicating that the image 1700 is divided into four square coding units to divide the image 1700 into a plurality of coding units. The decoder 120 may use only division pattern information indicating that the image 1710 is divided into two or four coding units to divide the image 1710. The decoder 120 may use only division pattern information indicating that the image 1720 is divided into two, three, or four coding units to divide the image 1720. The above-mentioned combinations of division forms are merely embodiments for explaining the operation of the decoding unit 120, and therefore the above-mentioned combinations of division forms should not be interpreted as being limited to the above-mentioned embodiments, but should be interpreted as various combinations of division forms being available for each specified data unit.

[0194] According to an embodiment, the bitstream acquiring unit 110 may acquire a bitstream including an index indicating a combination of partition type information for each predetermined data unit (e.g., a sequence, a picture, a slice, a slice segment, a tile, or a tile group). For example, the bitstream acquiring unit 110 may acquire an index indicating a combination of partition type information in a sequence parameter set, a picture parameter set, a slice header, a tile header, or a tile group header. The decoding unit 120 may determine a combination of partition types into which a coding unit may be divided for each predetermined data unit using the acquired index, and may thereby use a combination of different partition types for each predetermined data unit.

[0195] FIG. 18 illustrates various types of coding units that are determined based on partition mode information that is also expressed by a binary code, according to one embodiment.

[0196] According to an embodiment, the decoder 120 may divide the coding unit into various types using the block type information and the partition type mode information acquired via the bitstream acquirer 110. The types of the coding unit that may be divided may include various types including the types described in the above embodiments.

[0197] Referring to FIG. 18, the decoder 120 can divide a square-shaped coding unit in at least one of the horizontal and vertical directions based on the division mode information, and can divide a non-square-shaped coding unit in the horizontal or vertical direction.

[0198] According to an embodiment, when the decoder 120 can divide a square coding unit horizontally and vertically into four square coding units, the division form mode information for the square coding unit can indicate four types of division forms. According to an embodiment, the division form mode information is also expressed as a two-digit binary code, and a binary code is assigned to each division form. For example, when the coding unit is not divided, the division form mode information is also expressed as (00)b, when the coding unit is divided horizontally and vertically, the division form mode information is also expressed as (01)b, when the coding unit is divided horizontally, the division form mode information is also expressed as (10)b, and when the coding unit is divided vertically, the division form mode information is also expressed as (11)b.

[0199] According to an embodiment, when the decoder 120 divides a non-square coding unit in the horizontal or vertical direction, the type of division form that the division form mode information can indicate is also determined depending on how many coding units are divided. Referring to FIG. 18, according to an embodiment, the decoder 120 can divide a non-square coding unit into up to three coding units. The decoder 120 can divide the coding unit into two coding units, in which case, the division form mode information can also be expressed as (10)b. The decoder 120 can divide the coding unit into three coding units, in which case, the division form mode information can also be expressed as (11)b. The decoder 120 can decide not to divide the coding unit, in which case, the division form mode information can also be expressed as (0)b. That is, the decoder 120 can use variable length coding (VLC) instead of fixed length coding (FLC) to use a binary code indicating the division form mode information.

[0200] According to an embodiment, referring to FIG. 18, the binary code of the partition mode information indicating that the coding unit is not divided may be expressed as (0)b. If the binary code of the partition mode information indicating that the coding unit is not divided is set to (00)b, the binary code of the 2-bit partition mode information must be used even if there is no partition mode information set to (01)b. However, as shown in FIG. 18, if three partition types related to a non-square coding unit are used, the decoder 120 can determine that the coding unit is not divided even if it uses the 1-bit binary code (0)b as the partition mode information, so that the bitstream can be used efficiently. However, the partition type of the non-square coding unit indicated by the partition mode information should not be interpreted as being limited to the three types shown in FIG. 18, but should be interpreted as being various types including the above-mentioned embodiment.

[0201] FIG. 19 illustrates another form of a coding unit that is also determined based on partition mode information that is also represented by a binary code, according to one embodiment.

[0202] Referring to FIG. 19, the decoder 120 may divide a square coding unit horizontally or vertically and may divide a non-square coding unit horizontally or vertically based on the division mode information. That is, the division mode information may indicate that a square coding unit is divided in one direction. In this case, the binary code of the division mode information indicating that the square coding unit is not divided may be expressed as (0)b. If the binary code of the division mode information indicating that the coding unit is not divided is set to (00)b, the binary code of the 2-bit division mode information must be used even if there is no division mode information set to (01)b. However, as shown in FIG. 19, when three division forms related to a square coding unit are used, the decoder 120 may determine that the coding unit is not divided even if it uses the 1-bit binary code (0)b as the division mode information, and therefore the bitstream can be used efficiently. However, the division form of the square-shaped coding unit indicated by the division form mode information should not be interpreted as being limited to the three forms shown in FIG. 19, but should be interpreted as being in various forms including the above-mentioned embodiments.

[0203] According to one embodiment, the block configuration information or partition mode information is also represented using a binary code, and such information is also immediately generated in the bitstream. Also, the block configuration information or partition mode information represented using a binary code is not immediately generated in the bitstream, but is also used as a binary code input to CABAC (context adaptive binary arithmetic coding).

[0204] According to an embodiment, the decoder 120 may obtain a syntax related to block shape information or partition shape mode information through CABAC. A bitstream including a binary code related to the syntax may be obtained through the bitstream obtainer 110. The decoder 120 may detect a syntax element indicating block shape information or partition shape mode information by debinarizing a bin string included in the obtained bitstream. According to an embodiment, the decoder 120 may obtain a set of binary bin strings corresponding to a syntax element to be decoded and decode each bin using probability information, and the decoder 120 may repeat the process until a bin string composed of the decoded bins is the same as one of the previously obtained bin strings. The decoder 120 may determine a syntax element by debinarizing the bin string.

[0205] According to an embodiment, the decoder 120 may perform a decoding process of adaptive binary arithmetic coding to determine a syntax related to a bin string, and may update a probability model related to the bins acquired through the bitstream acquisition unit 110. Referring to FIG. 18, the bitstream acquisition unit 110 may acquire a bitstream indicating a binary code indicating partition mode information according to an embodiment. The decoder 120 may determine a syntax related to the partition mode information using the acquired binary code having a size of 1 bit or 2 bits. The decoder 120 may update a probability related to each bit in the 2-bit binary code to determine a syntax related to the partition mode information. That is, the decoder 120 may update a probability of having a value of 0 or 1 when decoding a next bin, depending on whether the value of the first bin in the 2-bit binary code is a value of 0 or 1.

[0206] According to one embodiment, in the process of determining the syntax, the decoder 120 may update the probabilities associated with the bins used in the process of decoding the bins of the bin string associated with the syntax, and the decoder 120 may determine that a particular bit in the bin string has the same probability without updating the probability.

[0207] 18, in the process of determining the syntax using a bin string indicating partition mode information related to a non-square coding unit, the decoder 120 may determine the syntax related to the partition mode information using one bin having a value of 0 when the non-square coding unit is not partitioned. That is, when the block topology information indicates that the current coding unit is non-square, the first bin of the bin string related to the partition mode information is 0 when the non-square coding unit is not partitioned, and is 1 when the non-square coding unit is partitioned into two or three coding units. Thus, the probability that the first bin of the bin string of the partition mode information related to the non-square coding unit is 0 is 1 / 3, and the probability that it is 1 is 2 / 3. As described above, since the partition mode information indicating that a non-square coding unit is not partitioned can only be expressed as a 1-bit bin string having a value of 0, the decoder 120 can determine whether the second bin is 0 or 1 only when the first bin of the partition mode information is 1, and can determine the syntax related to the partition mode information. According to an embodiment, the decoder 120 can decode the bins by considering that when the first bin related to the partition mode information is 1, the probability that the second bin is 0 or 1 is the same.

[0208] According to an embodiment, the decoder 120 may use various probabilities associated with each bin in a process of determining bins of a bin string associated with the partition mode information. According to an embodiment, the decoder 120 may determine the probabilities of bins associated with the partition mode information in different ways along the direction of a non-square block. According to an embodiment, the decoder 120 may determine the probabilities of bins associated with the partition mode information in different ways depending on the width or long side length of a current coding unit. According to an embodiment, the decoder 120 may determine the probabilities of bins associated with the partition mode information in different ways depending on at least one of the shape and long side length of a current coding unit.

[0209] According to an embodiment, the decoder 120 may determine that the probability of bins related to the partition mode information is the same for coding units having a predetermined size or more. For example, based on the long side length of the coding unit, the decoder 120 may determine that the probability of bins related to the partition mode information is the same for coding units having a size of 64 samples or more.

[0210] In one embodiment, the decoder 120 also determines initial probabilities for the bins that make up the bin string of the partition mode information based on the slice type (eg, I slice, P slice, or B slice).

[0211] In an embodiment, when determining partition mode information of a coding unit, the decoding unit 120 may determine partition mode information of a luma coding block and partition mode information of a chroma coding block independently. For example, when information indicating that dual tree partitioning is performed (e.g., dual_tree_flag) is included in the bitstream, the decoding unit 120 may determine partition mode information of a luma coding block and partition mode information of a chroma coding block independently. In addition, when information indicating that dual tree partitioning is performed is included in the bitstream and a current slice including a coding unit to be partitioned is an I slice, the decoding unit 120 may determine partition mode information of a luma coding block and partition mode information of a chroma coding block independently.

[0212] If information indicating that dual tree partitioning is not performed is included in the bitstream or if the current slice including the coding unit is not an I slice, the decoding unit 120 can determine that the partition mode information of the luma coding block and the partition mode information of the chroma coding block are the same (i.e., single tree partitioning).

[0213] In one example, when dual tree partitioning is performed, the decoding unit 120 may obtain partition mode information of the luma coding block and partition mode information of the chroma coding block from the bitstream when partitioning a luma coding block having a size equal to or smaller than a predetermined size and a corresponding chroma coding block. Then, the decoding unit 120 may partition the luma coding block according to the partition mode information of the luma coding block, and partition the chroma coding block according to the partition mode information of the chroma coding block. As described above, the luma coding block and the chroma coding block are also recursively partitioned by quad partitioning, ternary partitioning, binary partitioning, etc. The predetermined size may be, but is not limited to, 32x32, 64x64, 128x128, or 256x256. In one embodiment, while a luma coding block smaller than a predetermined size and its corresponding chroma coding block are recursively split, if the size of a child coding block of a chroma coding block is smaller than a predetermined minimum size, splitting of the chroma coding block corresponding to the parent block is not allowed. Also, in one embodiment, when a luma coding block smaller than a predetermined size and its corresponding chroma coding block are split, the maximum depth of the chroma coding block generated as a result of the splitting is lower than the maximum depth of the luma coding block generated as a result of the splitting.

[0214] In the case where dual tree partitioning is performed, when partitioning a luma coding block larger than a predetermined size (e.g., 64x64) and its corresponding chroma coding block, the decoding unit 120 may partition the luma coding block and the chroma coding block in a default partitioning mode, for example, a quad partitioning mode. In this case, the luma coding block and the chroma coding block are also partitioned in the same form. As another example, the decoding unit 120 may acquire partition mode information of a luma coding block larger than a predetermined size (e.g., 64x64) from the bitstream, and partition the luma coding block and the chroma coding block according to the partition mode information of the luma coding block. In other words, a luma coding block larger than a predetermined size and its corresponding chroma coding block are also partitioned in the same partition form according to the partition mode information of the luma coding block. If a luma coding block having a size larger than a predetermined size (e.g., 64x64) and its corresponding chroma coding block are determined as a result of the division of the luma coding block and its corresponding chroma coding block, the luma coding block having a size smaller than the predetermined size and its corresponding chroma coding block may be independently divided according to the partition mode information of the luma coding block and the partition mode information of the chroma coding block, as described above.

[0215] As another example, in the case where dual tree partitioning is performed, when the decoding unit 120 partitions a luma coding block having a predetermined depth or more and a corresponding chroma coding block, the decoding unit 120 may acquire partition mode information of the luma coding block and partition mode information of the chroma coding block from the bitstream. Then, the decoding unit 120 may partition the luma coding block according to the partition mode information of the luma coding block, and partition the chroma coding block according to the partition mode information of the chroma coding block. In one embodiment, while a luma coding block having a predetermined depth or more and a corresponding chroma coding block are recursively partitioned, if the size of a child coding block of the chroma coding block is equal to or smaller than a predetermined minimum size, partitioning of the chroma coding block corresponding to the parent block is not allowed. Also, in one embodiment, when a luma coding block having a predetermined depth or more and a corresponding chroma coding block are partitioned, the maximum depth of the chroma coding block generated as a partition result is lower than the maximum depth of the luma coding block generated as a partition result.

[0216] In the case where dual tree partitioning is performed, when partitioning a luma coding block lower than a predetermined depth and a corresponding chroma coding block, the decoding unit 120 may partition the luma coding block and the chroma coding block according to a predetermined partition mode, for example, a quad partition mode. As another example, the decoding unit 120 may acquire partition mode information of a luma coding block lower than a predetermined depth from a bitstream. Then, the decoding unit 120 may partition the luma coding block and the chroma coding block in the same manner according to the partition mode information of the luma coding block.

[0217] As yet another example, when dual tree partitioning is performed, when partitioning a luma coding block that is equal to or smaller than a predetermined size or equal to or greater than a predetermined depth and its corresponding chroma coding block, the decoder 120 may obtain partition mode information of the luma coding block from the bitstream, partition the luma coding block according to the partition mode information of the luma coding block, and partition the chroma coding block according to a default partition mode regardless of the partition mode information of the luma coding block. When partitioning a luma coding block that is larger than a predetermined size or lower than a predetermined depth and its corresponding chroma coding block, the decoder 120 may partition the luma coding block and the chroma coding block according to a default partition mode, or may partition the luma coding block and the chroma coding block in the same manner according to the partition mode information of the luma coding block.

[0218] As another example, in the case where dual tree partitioning is performed, when partitioning a luma coding block having a size equal to or smaller than a predetermined size or a depth equal to or larger than a predetermined depth and its corresponding chroma coding block, the decoder 120 may acquire partition mode information of the luma coding block from the bitstream and partition the luma coding block and the chroma coding block equally according to the partition mode information of the luma coding block. In this case, if the size of a child coding block determined when a chroma coding block is partitioned according to the partition mode information based on the partition mode information is equal to or smaller than a minimum size, partitioning of the chroma coding block corresponding to a parent block is not permitted.

[0219] FIG. 20 is a block diagram of an image encoding system and a video decoding system that perform loop filtering.

[0220] The encoding end 2010 of the video encoding and decoding system 2000 transmits an encoded bitstream of video, and the decoding end 2050 receives and decodes the bitstream to output a restored video. Here, the encoding end 2010 corresponds to a video encoding device 200, which will be described later, and the decoding end 2050 corresponds to a video decoding device 100, which will be described later.

[0221] In the encoding end 2010, the predictive coding unit 2015 outputs predicted data through inter prediction and intra prediction related to a coding unit, and the transform and quantization unit 2020 transforms the predicted data and residual data of a current input image based on a transform unit, and quantizes and outputs the transform coefficients. The entropy coding unit 2025 encodes the quantized transform coefficients and outputs them as a bitstream. The quantized transform coefficients are restored to spatial domain data through the inverse quantization and inverse transform unit 2030, and the restored spatial domain data is output as a restored image through the deblocking filtering unit 2035 and the loop filtering unit 2040. The restored image is also used as a reference image for the next input image through the predictive coding unit 2015.

[0222] The image data encoded in the bitstream received by the decoding end 2050 is restored to residual data in the spatial domain through the entropy decoding unit 2055 and the inverse quantization and inverse transform unit 2060. The predicted data and the residual data output from the predictive decoding unit 2075 are combined to form image data in the spatial domain, and the deblocking filtering unit 2065 and the loop filtering unit 2070 filter the image data in the spatial domain to output a restored image related to the current original image. The restored image can also be used as a reference image related to the next original image by the predictive decoding unit 2075.

[0223] The loop filtering unit 2040 of the encoding end 2010 performs loop filtering using filter information input by a user or a system setting. The filter information used by the loop filtering unit 2040 is output to the entropy encoding unit 2025 and transmitted to the decoding end 2050 together with the encoded image data. The loop filtering unit 2070 of the decoding end 2050 can perform loop filtering based on the filter information input from the decoding end 2050.

[0224] As described above, the inverse transform of the transform coefficients is also performed on the basis of the transform unit. Depending on the various partitioning modes, the width or height of the transform unit determined from the coding unit may be 2 n (n is an integer). In other words, the number of samples arranged along the width or height of the conversion unit is 2 n The width and height of the transform kernel for inverse transforming the transform coefficients included in the transform unit are 2. n If the width or height is 2 n A transformation kernel may be used for inverse transformations involving transformation units that do not fall within the n This requires a transform kernel that is not ∇x ...

[0225] In one embodiment, the decoder 120 may convert a current transform unit whose width or height is 2 n If not, the decoder 120 may perform inverse transform based on a coding unit including the current transform unit. In other words, the current transform unit is determined from the current coding unit, and the width or height of the current transform unit is 2. n If not, the decoding unit 120 may inverse transform the transform coefficients included in the current coding unit. n If not, the transform coefficients may be inversely transformed based on the parent coding unit of the coding unit.

[0226] In one embodiment, the decoder 120 may convert a current transform unit whose width or height is 2 n If not, the decoding unit 120 may determine the prediction mode of the current coding unit including the current transform unit to be a prediction mode that does not require inverse transform. For example, the prediction mode of the current coding unit may be determined to be a skip mode, a merge skip mode, or an affine skip mode. n If not, the prediction mode information of the current coding unit may not be obtained from the bitstream, and the prediction mode of the current coding unit may be determined to be the skip mode, the merge skip mode, or the affine skip mode. Determining the prediction mode of the current coding unit including the current transform unit to a prediction mode that does not require inverse transform is also useful when inverse transform is performed based on the coding unit. That is, if the width or height of the current coding unit determined through the recursive division process is 2 n If not, the decoding unit 120 may determine the prediction mode of the current coding unit to be a prediction mode that does not require inverse transform.

[0227] In one embodiment, the decoder 120 may also select a transform unit whose width or height is 2 n If not, it may be determined that inverse transform is not necessary for the current transform unit. The decoder 120 may determine that inverse transform is not necessary for the current transform unit by not acquiring information indicating whether inverse transform of the current transform unit is necessary (e.g., a transform skip flag) from the bitstream. In this case, the bitstream includes quantized residual data, and the decoder 120 may dequantize the quantized residual data to acquire residual data in the spatial domain.

[0228] In one embodiment, the decoder 120 may also select a transform unit whose width or height is 2 nIf not, the values ​​of the transform coefficients included in the current transform unit may be determined to be 0. The decoding unit 120 may determine that the values ​​of all the transform coefficients included in the current transform unit are 0 without acquiring information (e.g., tu_cbf) indicating whether a non-zero transform coefficient is included in the current transform unit from the bitstream.

[0229] In one embodiment, the decoder 120 may also select a transform unit whose width or height is 2 n If not, the transform coefficient of the current transform unit may be determined to be a DC value obtained from the bitstream. The DC value may be an average value of the transform coefficients included in the current transform unit. The decoder 120 may not perform an inverse transform on the current transform unit, and may determine the value of the transform coefficient of the current transform unit to be a DC value obtained from the bitstream.

[0230] Also, in one embodiment, as shown in FIG. 21, the decoder 120 may select a width (3x2 b ) or height(2 a ) is 2 n If not, the width and height of the child coding unit are 2 n The current coding unit can be split so that the width and height of the child coding unit are 2 n Therefore, the width and height of the conversion unit determined from the child coding unit are also 2 n This also applies.

[0231] Also, in one embodiment, as shown in FIG. 22, the decoder 120 may select a width (3x2 b ) or height(2 a ) is 2 n If not, the width and height are 2 n The corresponding transform unit can also be determined from the current coding unit.

[0232] The above-described various embodiments have described operations related to a video decoding method performed by the video decoding device 100. Hereinafter, operations of the video encoding device 200 that performs a video encoding method corresponding to a reverse process of the video decoding method will be described through various embodiments.

[0233] FIG. 2 illustrates a block diagram of a video encoding device 200 capable of encoding video based on at least one of block configuration information and partition configuration mode information, according to one embodiment.

[0234] The video encoding device 200 may include an encoding unit 220 and a bitstream generating unit 210. The encoding unit 220 may receive an input image and encode the input image. The encoding unit 220 may encode the input image and obtain at least one syntax element. The syntax element may include at least one of a skip flag, a prediction mode, a motion vector difference, a motion vector prediction method (or index), a transform quantized coefficient, a coded block pattern, a coded block flag, an intra prediction mode, a direct flag, a merge flag, a delta QP, a reference index, a prediction direction, a transform index, and a dual tree flag. The encoding unit 220 may determine a context model based on block shape information including at least one of a shape, a direction, a ratio of width and height, or a size of a coding unit.

[0235] The bitstream generator 210 may generate a bitstream based on the encoded input video. For example, the bitstream generator 210 may generate a bitstream by entropy encoding syntax elements based on a context model. Furthermore, the video encoding device 200 may transmit the bitstream to the video decoding device 100.

[0236] According to an embodiment, the encoding unit 220 of the video encoding device 200 may determine a shape of the coding unit. For example, the coding unit may have a square or non-square shape, and information indicating such a shape may be included in the block shape information.

[0237] According to an embodiment, the encoding unit 220 may determine in what form the coding unit is to be split. The encoding unit 220 may determine the form of at least one coding unit included in the coding unit, and the bitstream generation unit 210 may generate a bitstream including split form mode information including information related to the form of the coding unit. The encoding unit 220 may determine whether dual tree splitting of the coding unit is to be performed, and the bitstream generation unit 210 may generate a bitstream including the corresponding information.

[0238] According to an embodiment, the encoding unit 220 may determine whether the coding unit is divided or not divided. If the encoding unit 220 determines that the coding unit includes only one coding unit or that the coding unit is not divided, the bitstream generation unit 210 may generate a bitstream including division mode information indicating that the coding unit is not divided. Also, if the encoding unit 220 determines that the coding unit is divided into a plurality of coding units, the bitstream generation unit 210 may generate a bitstream including division mode information indicating that the coding unit is divided into a plurality of coding units.

[0239] According to an embodiment, the division mode information may include information indicating how many coding units a coding unit is divided into or in which direction the coding unit is divided, for example, the division mode information may indicate division in at least one of the vertical direction and the horizontal direction, or may indicate no division.

[0240] The image division process of the encoding unit 220 corresponds to the image division process of the video decoding device 100 described with reference to FIG. 3 to FIG. 22, and therefore a detailed description thereof will be omitted. However, if the division form of the coding unit is limited to a predetermined division form according to the division rule, if division of the coding unit is not permitted, or if the division form of the coding unit is permitted only to a division form other than the predetermined division form, the bitstream generation unit 210 does not include information related thereto in the bitstream. For example, if the division form of the coding unit is limited to horizontal division, division direction information indicating the horizontal or vertical direction is not included in the bitstream. Also, if the division form of the coding unit is limited to binary division, division type information indicating binary division or ternary division is not included in the bitstream. Also, if division of the coding unit is not permitted, information indicating whether the coding unit is divided is not included in the bitstream. That is, when the division form of the coding unit follows a division rule preset in the video decoding device 100 and the video encoding device 200, information required to determine the division form mode according to the division rule is not included in the bitstream.

[0241] In addition, in one embodiment, when the prediction mode of a coding unit is limited to a predetermined prediction mode according to a predetermined rule, the bitstream generation unit 210 does not include information indicating the prediction mode of the coding unit in the bitstream. For example, when the prediction mode of a coding unit is determined to be a mode that limits the inverse transform of a transform coefficient (e.g., skip mode, merge skip mode, or affine skip mode), information indicating whether or not the inverse transform of the current transform unit is necessary (e.g., transform skip flag) is not included in the bitstream.

[0242] Also, in one embodiment, the width or height of the current conversion unit is 2 n If this is not the case, then information indicating whether or not the current transform unit contains any non-zero transform coefficients (eg, tu_cbf) is not included in the bitstream.

[0243] Also, in one embodiment, the width or height of the current conversion unit is 2 n If not, the bitstream generator 210 does not include the average value of the transform coefficients of the current transform unit in the bitstream.

[0244] The encoding unit 220 determines information related to the division mode based on the division mode of the coding unit. The bitstream generator 210 determines a context model based on at least one of the size, the size of the coded image, and the coding unit size. The bitstream generator 210 generates information related to a partition mode for partitioning the coding unit in the bitstream based on the context model.

[0245] In order to determine a context model, the encoding unit 220 may obtain an array for associating at least one of a shape, a direction, a ratio of width and height, or a size of a coding unit with an index related to the context model. The encoding unit 220 may obtain an index related to the context model based on at least one of a shape, a direction, a ratio of width and height, or a size of a coding unit in the array. The encoding unit 220 may determine a context model based on the index for the context model.

[0246] The encoder 220 may determine the context model based on block shape information including at least one of a shape, a direction, a ratio of width and height, or a size of a neighboring coding unit adjacent to the coding unit, and the neighboring coding unit may include at least one of a coding unit located on the lower left, left, upper left, upper, upper right, right, or lower right side of the coding unit.

[0247] In addition, the encoding unit 220 may compare the width of the upper neighboring coding unit with the width of the coding unit to determine the context model. In addition, the encoding unit 220 may compare the height of the left and right neighboring coding units with the height of the coding unit. In addition, the video encoding device 200 may determine the context model based on the comparison result.

[0248] The operation of the video encoding device 200 includes contents similar to those of the video decoding device 100 described with reference to FIGS. 3 to 22, and therefore a detailed description thereof will be omitted.

[0249] FIG. 23 is a flow chart illustrating a video decoding method according to an embodiment.

[0250] In operation S2310, the video decoding apparatus 100 determines a first coded block of a first color component separated from the video and a second coded block of a second color component corresponding to the first coded block. The first color component is also luma, and the second color component is also chroma. As described above, the luma coded block and the chroma coded block may be included in a coding unit. If the Y:Cb:Cr ratio is 4:2:0 according to the color format, the size of the chroma coded block is half the size of the luma coded block.

[0251] In operation S2320, if the size of the first coding block is equal to or smaller than a predetermined size, the video decoding apparatus 100 acquires, from the bitstream, first partition mode information for the first coding block and second partition mode information for the second coding block. The first partition mode information and the second partition mode information may include at least one of information indicating whether or not the first coding block is partitioned, information indicating whether or not the second coding block is partitioned, information indicating a partition type, and information indicating a partition direction.

[0252] In operation S2330, the video decoding apparatus 100 determines a partition mode of the first coding block based on the first partition mode information, and determines a partition mode of the second coding block based on the second partition mode information. The partition mode may include no partition, quad partition, binary vertical partition, binary horizontal partition, ternary vertical partition, or ternary horizontal partition. As described above, the partition modes of the first coding block and the second coding block may be restricted by at least one of the block type, the partition mode of the parent coding block, and the block type of the child coding block.

[0253] In operation S2340, the video decoding apparatus 100 decodes a coded block of a first color component determined based on a partition mode of the first coded block and a coded block of a second color component determined based on a partition mode of the second coded block based on information acquired from the bitstream. The size of the coded block of the first color component may be the same as or smaller than the size of the first coded block, and the size of the coded block of the second color component may be the same as or smaller than the size of the second coded block.

[0254] The video decoding device 100 may generate prediction data of the coded block of the first color component and the coded block of the second color component according to prediction mode information acquired from the bitstream. The video decoding device 100 may then inverse transform and inverse quantize residual data acquired from the bitstream, add the residual data to the prediction data, and decode the coded block of the first color component and the coded block of the second color component. Depending on the prediction mode, the residual data may not be included in the bitstream, and in that case, the coded block of the first color component and the coded block of the second color component may be decoded based on the prediction data.

[0255] In one embodiment, the video decoding device 100 may independently and hierarchically divide the coding blocks of the first color component and the coding blocks of the second color component based on the division mode information obtained from the bitstream.

[0256] In one embodiment, steps S2320 to S2340 shown in FIG. 23 are performed even if the depth of the first coding block is equal to or greater than a predetermined depth.

[0257] In addition, if the size of the first encoding block is larger than a predetermined size (or the depth is less than a predetermined depth), the video decoding device 100 can divide the first encoding block and the second encoding block equally using a default division mode.

[0258] FIG. 24 is a flow chart illustrating a video encoding method according to an embodiment.

[0259] In operation S2410, the image encoding device 200 determines a first coded block of a first color component divided from an image and a second coded block of a second color component corresponding to the first coded block, where the first color component is also luma and the second color component is also chroma.

[0260] In operation S2420, if the size of the first coding block is equal to or smaller than a predetermined size, the video coding apparatus 200 determines a first partition mode for the first coding block and a second partition mode for the second coding block. The video coding apparatus 200 may determine the first partition mode and the second partition mode independently.

[0261] At step S2430, the image encoding device 200 encodes a coding block of a first color component determined from the first encoding block based on a first partition mode, and a coding block of a second color component determined from the second encoding block based on a second partition mode.

[0262] The video encoding device 200 may determine prediction modes of the coding blocks of the first and second color components and generate prediction data according to the prediction modes. The video encoding device 100 may determine residual data of sample values ​​of the coding blocks of the first and second color components and the prediction data and transform and quantize the residual data. Information related to the quantized transform coefficients may be entropy coded and included in a bitstream.

[0263] In operation S2440, the image encoding apparatus 100 generates a bitstream including first partition mode information related to the first encoding block and second partition mode information related to the second encoding block.

[0264] In one embodiment, S2420 to S2440 shown in FIG. 24 are the first encoding This is also performed when the depth of the block is equal to or greater than a predetermined depth.

[0265] In addition, if the size of the first coding block is larger than a predetermined size (or if the depth is equal to or smaller than a predetermined depth), the video coding device 100 can divide the first coding block and the second coding block equally using a default division mode.

[0266] The above-described embodiment of the present disclosure can be created into a program that can be executed by a computer, and the created program can also be stored on a medium.

[0267] The medium may be a medium for continuously storing a program executable by a computer or a medium for temporarily storing the program for execution or download. The medium may be a variety of recording means or storage means in the form of a single or several pieces of hardware combined, but is not limited to a medium directly connected to a computer system, and may be distributed on a network. Examples of the medium include magnetic media such as hard disks, floppy disks, and magnetic tapes; optical recording media such as compact disc read only memory (CD-ROM) and digital versatile disc (DVD); magnetic-optical media such as floptical disks; and read only memory (ROM), random access memory (RAM), flash memory, etc., which are configured to store program instructions. Examples of other media include recording media or recording media managed by app stores that distribute applications, sites that supply or distribute various software, and servers.

[0268] The above describes in detail the technical ideas of the present disclosure by citing preferred embodiments. However, the technical ideas of the present disclosure are not limited to the above-described embodiments, and various modifications and changes may be made by those skilled in the art within the scope of the technical ideas of the present disclosure.

[0269] The contents of the claims as originally filed are described below as examples. [Example 1] In the video decoding method, determining a first coded block of a first color component divided from an image and a second coded block of a second color component corresponding to the first coded block; obtaining, from a bitstream, first partition mode information related to the first coding block and second partition mode information related to the second coding block if the size of the first coding block is equal to or smaller than a predetermined size; determining a partition mode of the first coding block based on the first partition mode information, and determining a partition mode of the second coding block based on the second partition mode information; and decoding, based on information obtained from the bitstream, a coded block of a first color component determined based on a partition mode of the first coded block and a coded block of a second color component determined based on a partition mode of the second coded block. [Example 2] The method for decoding the video includes the steps of: determining a partition mode of the first coded block and the second coded block to a default partition mode if the size of the first coded block is greater than a predetermined size; The method for decoding an image described in Example 1, further comprising: decoding a coding block of a first color component determined from the first coding block and a coding block of a second color component determined from the second coding block based on information obtained from the bitstream according to the predetermined division mode. [Example 3] The method for decoding the video includes the steps of: The image decoding method described in Example 2, further comprising a step of independently determining a partition mode of the coded block of the first color component and the corresponding coded block of the second color component based on first partition mode information and second partition mode information obtained from the bitstream if the size of the coded block of the first color component determined from the first coded block according to the default partition mode is equal to or smaller than the predetermined size. [Example 4] The second coding block is divided recursively, A method for decoding an image as described in embodiment 1, characterized in that if a size of a child coding block of the coding block of the second color component determined by recursively dividing the second coding block is less than or equal to a minimum size, division of the coding block of the second color component is not allowed. [Example 5] 2. The method for decoding a video according to claim 1, wherein a maximum allowable depth of the first encoded block is higher than a maximum allowable depth of the second encoded block. [Example 6] The method for decoding the video includes the steps of: The method for decoding an image described in Example 1, further comprising a step of determining a partition mode of a coding block of the first color component determined from the first coding block by considering a partition mode of the first coding block. [Example 7] The method for decoding the video includes the steps of: determining an allowable partitioning mode for the coded block of the first color component based on at least one of a block type of the coded block of the first color component determined from the first coded block and a block type of a child coded block that can be determined from the coded block of the first color component; The image decoding method of embodiment 1, further comprising: not parsing information from the bitstream that is necessary to distinguish between the permissible partition modes and the permissible partition modes for the coding block of the first color component. [Example 8] A method for decoding an image as described in Example 1, characterized in that if the coding block of the first color component determined from the first coding block corresponds to a coding block at a predetermined position among the coding blocks obtained by ternary division of the first coding block, division of the coding block of the first color component is not permitted. [Example 9] The method for decoding the video includes the steps of: The width or width of the transformation block corresponding to the coding block of the first color component is 2 n (n is an integer) if the width or width does not correspond to n 2. The video decoding method according to claim 1, further comprising the step of inverse transforming transform coefficients of a coding block corresponding to the first coding block. [Example 10] The method for decoding the video includes the steps of: The width or width of the transformation block corresponding to the coding block of the first color component is 2 n 13. The image decoding method according to claim 1, further comprising: determining a prediction mode of the coding block of the first color component to be a prediction mode that does not require inverse transformation if the prediction mode does not correspond to the first color component. [Example 11] The method for decoding the video includes the steps of: The width or width of the transformation block corresponding to the coding block of the first color component is 2 n 13. The image decoding method according to claim 1, further comprising the step of determining the transform coefficients of the transform block to be 0 or to a DC value obtained from the bitstream if the transform coefficients do not correspond to the DC value. [Example 12] The width or width of the coding block of the first color component is 2 n If it does not correspond to n2. The video decoding method according to claim 1, wherein the video is divided into at least one coding block corresponding to the first coding block. [Example 13] In a video decoding device, a bitstream acquisition unit for acquiring a bitstream including an encoded result of the image; and a decoding unit configured to determine a first coded block of a first color component and a second coded block of a second color component corresponding to the first coded block, and if a size of the first coded block is equal to or smaller than a predetermined size, to obtain first partition mode information for the first coded block and second partition mode information for the second coded block from the bitstream, to determine a partition mode of the first coded block based on the first partition mode information, to determine a partition mode of the second coded block based on the second partition mode information, and to decode the coded block of the first color component determined based on the partition mode of the first coded block and the coded block of the second color component determined based on the partition mode of the second coded block, based on information obtained from the bitstream. [Example 14] In a video encoding method, determining a first coded block of a first color component divided from an image and a second coded block of a second color component corresponding to the first coded block; if the size of the first coding block is equal to or smaller than a predetermined size, determining a first partition mode for the first coding block and a second partition mode for the second coding block; encoding a coding block of a first color component determined based on a division mode of the first coding block and a coding block of a second color component determined based on a division mode of the second coding block; generating a bitstream including first partition mode information indicating the first partition mode and second partition mode information indicating the second partition mode. [Example 15] 11. A computer-readable recording medium storing a program for executing the video decoding method according to the first embodiment.

Claims

1. In the video decoding method, if a size of a first coded block of a first color component is greater than a first predetermined size, dividing the first coded block and a second coded block of a second color component according to the same division mode; acquiring first partition mode information related to the first coding block and second partition mode information related to the second coding block from a bitstream if the size of the first coding block is equal to or smaller than the first predetermined size; Dividing the first coding block according to a first partition mode identified from the first partition mode information; Dividing the second coding block according to a second partition mode identified from the second partition mode information; when partition information of a third coded block obtained as a result of partitioning the first coded block indicates non-partition, decoding the third coded block based on information obtained from the bitstream; and when partition information of a fourth coded block obtained as a result of partitioning the second coded block indicates non-partition, decoding the fourth coded block based on information obtained from the bitstream, If the partition information of the third coded block indicates partition, the third coded block is partitioned into at least one sub-coded block according to any one of a quad partition mode, a binary partition mode, and a ternary partition mode; If the size of the third coded block is equal to a second predetermined size, any one of the quad partition mode, the binary partition mode, and the ternary partition mode is not allowed for the third coded block; A method for decoding a video, wherein the first predetermined size is 64.

2. In a video encoding method, if a size of a first coded block of a first color component is equal to or smaller than a first predetermined size, dividing the first coded block according to a first division mode and dividing a second coded block of a second color component according to a second division mode; encoding the third coded block obtained as a result of the division of the first coded block when it is determined not to divide the third coded block; encoding the fourth coded block obtained as a result of dividing the second coded block when it is determined not to divide the fourth coded block; generating a bitstream including first partition mode information indicating the first partition mode, second partition mode information indicating the second partition mode, an encoding result of the third coding block, and an encoding result of the fourth coding block; If the size of the first coding block is larger than the first predetermined size, the first coding block and the second coding block are divided according to the same division mode; When it is determined to divide the third coding block, the third coding block is divided into at least one sub-coding block according to any one of a quad partition mode, a binary partition mode, and a ternary partition mode; If the size of the third coded block is equal to a second predetermined size, any one of the quad partition mode, the binary partition mode, and the ternary partition mode is not allowed for the third coded block; A method for encoding a video, wherein the first predetermined size is 64.

3. A recording medium having a program recorded thereon, the program causing a processor to perform an operation of generating a bitstream and transmitting the generated bitstream, the operation comprising: if a size of a first coded block of a first color component is equal to or smaller than a first predetermined size, dividing the first coded block according to a first division mode and dividing a second coded block of a second color component according to a second division mode; encoding the third coded block obtained as a result of the division of the first coded block when it is determined not to divide the third coded block; encoding the fourth coded block obtained as a result of the division of the second coded block when it is determined not to divide the fourth coded block; generating the bitstream including first partition mode information indicating the first partition mode, second partition mode information indicating the second partition mode, an encoding result of the third coding block, and an encoding result of the fourth coding block; and transmitting the generated bitstream, If the size of the first coding block is larger than the first predetermined size, the first coding block and the second coding block are divided according to the same division mode; When it is determined to divide the third coding block, the third coding block is divided into at least one sub-coding block according to any one of a quad partition mode, a binary partition mode, and a ternary partition mode; If the size of the third coded block is equal to a second predetermined size, any one of the quad partition mode, the binary partition mode, and the ternary partition mode is not allowed for the third coded block; A recording medium, wherein the first predetermined size is 64.

4. A method for transmitting a bitstream generated by the video encoding method of claim 2.

Citation Information

Patent Citations

  • Prediction mode cost calculation method and prediction mode cost calculation program

    JP2015179943A

  • Image encoder, image encoding method and image encoding program, and image decoder, image decoding method and image decoding program

    JP2018056685A

  • Luma and Chroma Block Partitioning

    JP2021523590A

  • Video encoding / decoding method and apparatus, and recording medium in which bit stream is stored

    US20200053359A1

  • Image coding device, image coding method, image coding program, image decoding device, image decoding method and image decoding program

    WO2018105148A1